UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

38 lines (37 loc) • 2.02 kB
/** * `neurolink proxy share` — the lender's controls. * * Every mutation here lands in the running proxy without a restart: the grant * store re-reads its file when the mtime moves, so `share pause` takes effect on * the borrower's next request rather than at the next deploy. * * @module cli/commands/proxyShare */ import type { CommandModule } from "yargs"; import type { ProxyShareArgs, ProxyShareEntitlement, ProxyShareGates, ProxyShareWindowSlice } from "../../types/index.js"; /** Parse `7d`, `12h`, `90m` or a bare number of days into milliseconds. */ export declare function parseDurationMs(value: string): number | undefined; /** * Parse a window-slice expression. * * Accepts `20` (both windows), or `5h=20,7d=15` to set them apart. Both windows * matter: a borrower can be harmless inside any single 5-hour session and still * drain the week. */ export declare function parseWindowSlice(value: string): ProxyShareWindowSlice | undefined; /** Parse `12h<60` / `12h<60@25` — window, utilization threshold, slice cap. */ export declare function parseSpillover(value: string): ProxyShareGates["spillover"] | undefined; /** Parse `21-9` into an hour-of-day admission window. */ export declare function parseSchedule(value: string): ProxyShareGates["schedule"] | undefined; /** Parse `100/week` or `50/session` into a refill policy. */ export declare function parseRefill(value: string): ProxyShareEntitlement["refill"] | undefined; /** Parse `20/min` or a bare number into a per-minute request ceiling. */ export declare function parseRate(value: string): number | undefined; /** * Build the link a borrower consumes with `peer add --link`. * * The token rides in the fragment because fragments are not transmitted: a link * pasted into anything that resolves the URL leaks the host, never the secret. */ export declare function buildShareLink(publicUrl: string, token: string, receiptSecret?: string): string; export declare const proxyShareCommand: CommandModule<object, ProxyShareArgs>;