@@ -18,4 +18,2 @@ export interface DaemonLaunchOptions { | ||
| }; | ||
| /** Keep captures in console history too (webhook only; off by default). */ | ||
| store?: boolean; | ||
| /** Local delivery (webhook only): mirror captures to this base URL. */ | ||
@@ -22,0 +20,0 @@ deliver?: string; |
@@ -19,3 +19,3 @@ /** | ||
| const ttlMs = parseTtlMs(ttl); // validate before spending a credit; null = never | ||
| const { subdomain, publicUrl, connectUrl } = await provisionDaemonTunnel(ttl, options.subdomain, mode, options.store); | ||
| const { subdomain, publicUrl, connectUrl } = await provisionDaemonTunnel(ttl, options.subdomain, mode); | ||
| const startedAt = new Date().toISOString(); | ||
@@ -22,0 +22,0 @@ const expiresAt = ttlMs === null ? 'never' : new Date(Date.now() + ttlMs).toISOString(); |
+4
-4
@@ -6,3 +6,3 @@ /** | ||
| * sessions), this reads the history OtterKit stored server-side: console | ||
| * endpoints (always stored) and CLI webhooks provisioned with --store. | ||
| * endpoints only - CLI webhook captures stay in the local log. | ||
| * Talks to the console API (OTTERKIT_API_URL) with the login token, so it | ||
@@ -45,3 +45,3 @@ * works from any machine on the account - and gives agents the same | ||
| if (resp.status === 404) { | ||
| throw new HistoryError('not_found', `No webhook session "${subdomain}" on this account. CLI sessions store history only with --store.`); | ||
| throw new HistoryError('not_found', `No webhook session "${subdomain}" on this account. Only console (cloud) endpoints store history server-side.`); | ||
| } | ||
@@ -75,3 +75,3 @@ if (!resp.ok || !json.data) { | ||
| if (resp.status === 404) { | ||
| throw new HistoryError('not_found', `No webhook session "${subdomain}" on this account. CLI sessions store history only with --store.`); | ||
| throw new HistoryError('not_found', `No webhook session "${subdomain}" on this account. Only console (cloud) endpoints store history server-side.`); | ||
| } | ||
@@ -140,3 +140,3 @@ if (!resp.ok || !json.data) { | ||
| console.log(`\n ${dim('No stored requests for')} ${c.bold}${subdomain}${c.reset}`); | ||
| console.log(` ${dim('Console endpoints store automatically; CLI webhooks need --store. Local captures: otterkit inspect.')}\n`); | ||
| console.log(` ${dim('Only console (cloud) endpoints store server-side. Local captures: otterkit inspect.')}\n`); | ||
| return; | ||
@@ -143,0 +143,0 @@ } |
+4
-9
@@ -129,6 +129,2 @@ /** | ||
| .describe('Auto-response body (default {"received":true})'), | ||
| store: z | ||
| .boolean() | ||
| .optional() | ||
| .describe('Also persist captures to the OtterKit console history (server-side). Off by default: captures stay in the local log only - the private default for sensitive payloads.'), | ||
| verify: z | ||
@@ -174,3 +170,2 @@ .object({ | ||
| respondBody: args.respondBody, | ||
| store: args.store, | ||
| verify: args.verify, | ||
@@ -513,4 +508,4 @@ }); | ||
| description: 'Read the requests OtterKit stored server-side for a webhook endpoint - works from any ' + | ||
| 'machine on the account, no local log needed. Console endpoints always store; CLI ' + | ||
| 'webhooks only with --store (otherwise use the local capture log tools). Returns ' + | ||
| 'machine on the account, no local log needed. Console (cloud) endpoints only; CLI ' + | ||
| 'webhook captures stay on the machine (use the local capture log tools). Returns ' + | ||
| 'headers, base64 body, source IP, and served status, newest first.', | ||
@@ -551,4 +546,4 @@ inputSchema: { | ||
| 'Groups by path (and by a detected event field like type/event), reports field ' + | ||
| 'optionality as present-in-N/M counts. Needs stored history: console endpoints always ' + | ||
| 'store; CLI webhooks only with --store.', | ||
| 'optionality as present-in-N/M counts. Needs stored history: console (cloud) ' + | ||
| 'endpoints only - CLI webhook captures stay on the machine.', | ||
| inputSchema: { | ||
@@ -555,0 +550,0 @@ subdomain: z.string().describe('Webhook endpoint whose stored bodies to analyze'), |
@@ -30,3 +30,3 @@ declare const TUNNEL_SERVER: string; | ||
| export declare function getBackendName(): string; | ||
| export declare function provisionTunnel(subdomain?: string, kind?: 'tunnel' | 'webhook', store?: boolean, ttl?: string): Promise<ProvisionResult>; | ||
| export declare function provisionTunnel(subdomain?: string, kind?: 'tunnel' | 'webhook', ttl?: string): Promise<ProvisionResult>; | ||
| /** A request captured on the /try page before the session was claimed. */ | ||
@@ -50,3 +50,3 @@ export interface ClaimedRequest { | ||
| export declare function claimTrySession(code: string, ttl?: string): Promise<ClaimResult>; | ||
| export declare function provisionDaemonTunnel(ttl: string, subdomain?: string, kind?: 'tunnel' | 'webhook', store?: boolean): Promise<DaemonProvisionResult>; | ||
| export declare function provisionDaemonTunnel(ttl: string, subdomain?: string, kind?: 'tunnel' | 'webhook'): Promise<DaemonProvisionResult>; | ||
| export { TUNNEL_SERVER }; |
@@ -42,3 +42,3 @@ /** | ||
| } | ||
| async function provision(url, subdomain, kind, store, ttl) { | ||
| async function provision(url, subdomain, kind, ttl) { | ||
| const token = getToken(); | ||
@@ -54,6 +54,2 @@ if (!token) | ||
| target.searchParams.set('kind', kind); | ||
| // CLI webhooks default to no-store (captures stay in the local log); | ||
| // --store opts into server-side console history. | ||
| if (store) | ||
| target.searchParams.set('store', 'true'); | ||
| // Auto-stop TTL ('never' = run until stopped); server defaults to 24h. | ||
@@ -98,4 +94,4 @@ if (ttl) | ||
| } | ||
| export async function provisionTunnel(subdomain, kind = 'tunnel', store, ttl) { | ||
| return (await provision(`${TUNNEL_SERVER}/api/agent/tunnels`, subdomain, kind, store, ttl)); | ||
| export async function provisionTunnel(subdomain, kind = 'tunnel', ttl) { | ||
| return (await provision(`${TUNNEL_SERVER}/api/agent/tunnels`, subdomain, kind, ttl)); | ||
| } | ||
@@ -135,5 +131,5 @@ /** | ||
| } | ||
| export async function provisionDaemonTunnel(ttl, subdomain, kind = 'tunnel', store) { | ||
| return (await provision(`${TUNNEL_SERVER}/api/agent/tunnels/daemon?ttl=${ttl}`, subdomain, kind, store)); | ||
| export async function provisionDaemonTunnel(ttl, subdomain, kind = 'tunnel') { | ||
| return (await provision(`${TUNNEL_SERVER}/api/agent/tunnels/daemon?ttl=${ttl}`, subdomain, kind)); | ||
| } | ||
| export { TUNNEL_SERVER }; |
+1
-1
| { | ||
| "name": "otterkit", | ||
| "version": "0.35.0", | ||
| "version": "0.37.0", | ||
| "description": "OtterKit CLI - provision and connect tunnels for AI agents", | ||
@@ -5,0 +5,0 @@ "mcpName": "io.github.useotterkit/otterkit", |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
278998
-0.34%6514
-0.21%