@juspay/neurolink 11.29.2 → 11.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/dist/auth/anthropicOAuth.d.ts +50 -0
- package/dist/auth/anthropicOAuth.js +78 -0
- package/dist/browser/neurolink.min.js +393 -393
- package/dist/cli/commands/proxy.d.ts +2 -0
- package/dist/cli/commands/proxy.js +284 -4
- package/dist/cli/commands/proxyExpose.d.ts +35 -0
- package/dist/cli/commands/proxyExpose.js +252 -0
- package/dist/cli/commands/proxyPeer.d.ts +29 -0
- package/dist/cli/commands/proxyPeer.js +738 -0
- package/dist/cli/commands/proxyShare.d.ts +37 -0
- package/dist/cli/commands/proxyShare.js +1080 -0
- package/dist/cli/parser.js +7 -1
- package/dist/proxy/peerStore.d.ts +52 -0
- package/dist/proxy/peerStore.js +324 -0
- package/dist/proxy/peerTransport.d.ts +38 -0
- package/dist/proxy/peerTransport.js +242 -0
- package/dist/proxy/proxyPaths.d.ts +8 -0
- package/dist/proxy/proxyPaths.js +55 -17
- package/dist/proxy/requestLogger.js +8 -0
- package/dist/proxy/residentGrants.d.ts +57 -0
- package/dist/proxy/residentGrants.js +393 -0
- package/dist/proxy/shareAudit.d.ts +81 -0
- package/dist/proxy/shareAudit.js +280 -0
- package/dist/proxy/shareContext.d.ts +38 -0
- package/dist/proxy/shareContext.js +92 -0
- package/dist/proxy/shareGate.d.ts +64 -0
- package/dist/proxy/shareGate.js +216 -0
- package/dist/proxy/shareGrants.d.ts +115 -0
- package/dist/proxy/shareGrants.js +590 -0
- package/dist/proxy/shareLease.d.ts +101 -0
- package/dist/proxy/shareLease.js +192 -0
- package/dist/proxy/shareLedger.d.ts +105 -0
- package/dist/proxy/shareLedger.js +406 -0
- package/dist/proxy/shareListener.d.ts +60 -0
- package/dist/proxy/shareListener.js +143 -0
- package/dist/proxy/shareNotes.d.ts +97 -0
- package/dist/proxy/shareNotes.js +234 -0
- package/dist/proxy/sharePolicy.d.ts +110 -0
- package/dist/proxy/sharePolicy.js +366 -0
- package/dist/proxy/shareProvisioning.d.ts +110 -0
- package/dist/proxy/shareProvisioning.js +237 -0
- package/dist/proxy/shareReceipts.d.ts +99 -0
- package/dist/proxy/shareReceipts.js +303 -0
- package/dist/proxy/shareSigning.d.ts +40 -0
- package/dist/proxy/shareSigning.js +78 -0
- package/dist/server/routes/claudeProxyRoutes.js +1066 -3
- package/dist/types/cli.d.ts +61 -0
- package/dist/types/proxy.d.ts +781 -0
- package/package.json +2 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `neurolink proxy share` — the lender's controls.
|
|
3
|
+
*
|
|
4
|
+
* Every mutation here lands in the running proxy without a restart: the grant
|
|
5
|
+
* store re-reads its file when the mtime moves, so `share pause` takes effect on
|
|
6
|
+
* the borrower's next request rather than at the next deploy.
|
|
7
|
+
*
|
|
8
|
+
* @module cli/commands/proxyShare
|
|
9
|
+
*/
|
|
10
|
+
import type { CommandModule } from "yargs";
|
|
11
|
+
import type { ProxyShareArgs, ProxyShareEntitlement, ProxyShareGates, ProxyShareWindowSlice } from "../../types/index.js";
|
|
12
|
+
/** Parse `7d`, `12h`, `90m` or a bare number of days into milliseconds. */
|
|
13
|
+
export declare function parseDurationMs(value: string): number | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Parse a window-slice expression.
|
|
16
|
+
*
|
|
17
|
+
* Accepts `20` (both windows), or `5h=20,7d=15` to set them apart. Both windows
|
|
18
|
+
* matter: a borrower can be harmless inside any single 5-hour session and still
|
|
19
|
+
* drain the week.
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseWindowSlice(value: string): ProxyShareWindowSlice | undefined;
|
|
22
|
+
/** Parse `12h<60` / `12h<60@25` — window, utilization threshold, slice cap. */
|
|
23
|
+
export declare function parseSpillover(value: string): ProxyShareGates["spillover"] | undefined;
|
|
24
|
+
/** Parse `21-9` into an hour-of-day admission window. */
|
|
25
|
+
export declare function parseSchedule(value: string): ProxyShareGates["schedule"] | undefined;
|
|
26
|
+
/** Parse `100/week` or `50/session` into a refill policy. */
|
|
27
|
+
export declare function parseRefill(value: string): ProxyShareEntitlement["refill"] | undefined;
|
|
28
|
+
/** Parse `20/min` or a bare number into a per-minute request ceiling. */
|
|
29
|
+
export declare function parseRate(value: string): number | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Build the link a borrower consumes with `peer add --link`.
|
|
32
|
+
*
|
|
33
|
+
* The token rides in the fragment because fragments are not transmitted: a link
|
|
34
|
+
* pasted into anything that resolves the URL leaks the host, never the secret.
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildShareLink(publicUrl: string, token: string, receiptSecret?: string): string;
|
|
37
|
+
export declare const proxyShareCommand: CommandModule<object, ProxyShareArgs>;
|