@jini-ai/daemon 0.5.3 → 0.5.4
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 +4 -0
- package/dist/agent-executor/contracts.d.ts +12 -10
- package/dist/agent-executor/contracts.js +0 -9
- package/dist/agent-executor/event-translation.d.ts +2 -2
- package/dist/agent-executor/event-translation.js +0 -2
- package/dist/agent-executor/events.d.ts +9 -4
- package/dist/agent-executor/events.js +21 -5
- package/dist/agent-executor/handoff.d.ts +1 -1
- package/dist/agent-executor/handoff.js +0 -1
- package/dist/agent-executor/launch.d.ts +1 -1
- package/dist/agent-executor/launch.js +22 -1
- package/dist/agent-executor/mcp-bridge.d.ts +2 -2
- package/dist/agent-executor/mcp-bridge.js +0 -2
- package/dist/agent-executor/model-receipts.d.ts +6 -0
- package/dist/agent-executor/model-receipts.js +26 -0
- package/dist/agent-executor.d.ts +7 -1665
- package/dist/agent-executor.js +7 -3007
- package/dist/core/read-only-tools.d.ts +130 -0
- package/dist/core/read-only-tools.js +115 -0
- package/dist/core/tool-audit.d.ts +131 -0
- package/dist/core/tool-audit.js +113 -0
- package/dist/http/active-context.d.ts +2 -2
- package/dist/http/agents.d.ts +8 -2
- package/dist/http/agents.js +6 -2
- package/dist/http/component-catalog.d.ts +2 -2
- package/dist/http/connectors.d.ts +17 -17
- package/dist/http/daemon-status.d.ts +2 -2
- package/dist/http/db-ops.d.ts +3 -3
- package/dist/http/delegated-tools.d.ts +1 -1
- package/dist/http/delegated-tools.js +1 -1
- package/dist/http/frontend-sessions.d.ts +1 -1
- package/dist/http/health.d.ts +6 -6
- package/dist/http/host-tools.d.ts +2 -2
- package/dist/http/media.d.ts +4 -4
- package/dist/http/memory.d.ts +15 -15
- package/dist/http/remote-run-events.d.ts +2 -2
- package/dist/http/research.d.ts +1 -1
- package/dist/http/routines.d.ts +7 -7
- package/dist/http/run-credentials.d.ts +2 -2
- package/dist/http/run-credentials.js +2 -2
- package/dist/http/runs.d.ts +4 -4
- package/dist/http/terminals.d.ts +6 -6
- package/dist/http/tool-catalog.d.ts +2 -2
- package/dist/http/xai.d.ts +6 -6
- package/dist/index.d.ts +75 -571
- package/dist/index.js +75 -571
- package/dist/read-only-tools.d.ts +1 -129
- package/dist/read-only-tools.js +2 -114
- package/dist/run-credentials.d.ts +47 -23
- package/dist/run-credentials.js +24 -8
- package/dist/scheduler.d.ts +5 -0
- package/dist/scheduler.js +13 -1
- package/dist/session-coordination.d.ts +58 -24
- package/dist/session-coordination.js +40 -12
- package/dist/store/event-log/sqlite.js +3 -3
- package/dist/surface-exchanges.d.ts +207 -61
- package/dist/surface-exchanges.js +167 -20
- package/dist/tool-audit.d.ts +1 -113
- package/dist/tool-audit.js +2 -94
- package/dist/tool-recovery/diagnostics.d.ts +132 -0
- package/dist/tool-recovery/diagnostics.js +110 -0
- package/dist/tool-recovery/federated-refusal.d.ts +92 -0
- package/dist/tool-recovery/federated-refusal.js +152 -0
- package/dist/tool-recovery/index.d.ts +6 -0
- package/dist/tool-recovery/index.js +6 -0
- package/dist/tool-recovery/recovery.d.ts +49 -0
- package/dist/tool-recovery/recovery.js +419 -0
- package/dist/tool-recovery/redaction.d.ts +166 -0
- package/dist/tool-recovery/redaction.js +192 -0
- package/dist/tool-recovery/stack.d.ts +69 -0
- package/dist/tool-recovery/stack.js +62 -0
- package/package.json +35 -12
|
@@ -58,7 +58,7 @@ export interface DaemonShutdownResponse {
|
|
|
58
58
|
* injectable readiness check) and are guaranteed reachable without a bearer token or an `Origin`
|
|
59
59
|
* header. This route is still useful for a human/CLI wanting the richer operator detail below.
|
|
60
60
|
*/
|
|
61
|
-
export declare const daemonStatusRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, DaemonStatusResponse, DaemonStatusDeps>;
|
|
61
|
+
export declare const daemonStatusRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, DaemonStatusResponse, DaemonStatusDeps, undefined>;
|
|
62
62
|
/**
|
|
63
63
|
* `POST /api/daemon/shutdown` — schedules a graceful shutdown. Responds
|
|
64
64
|
* immediately (matching the origin's behavior) and defers the actual
|
|
@@ -66,7 +66,7 @@ export declare const daemonStatusRoute: import("@jini-ai/http-kit").JsonRouteSpe
|
|
|
66
66
|
* written before whatever the caller's shutdown callback does takes effect.
|
|
67
67
|
* Gated same-origin: this is a control-plane action, not a public read.
|
|
68
68
|
*/
|
|
69
|
-
export declare const daemonShutdownRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, DaemonShutdownResponse, DaemonStatusDeps>;
|
|
69
|
+
export declare const daemonShutdownRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, DaemonShutdownResponse, DaemonStatusDeps, undefined>;
|
|
70
70
|
/** Mounts both daemon-status routes on `app`. A pack's `http(app, services)` calls this directly. */
|
|
71
71
|
export declare function registerDaemonStatusRoutes({ app, deps, adapter }: {
|
|
72
72
|
readonly app: Express;
|
package/dist/http/db-ops.d.ts
CHANGED
|
@@ -107,13 +107,13 @@ export interface DaemonDbHttpDeps {
|
|
|
107
107
|
readonly onInternalError?: (context: DaemonDbInternalErrorContext) => void;
|
|
108
108
|
}
|
|
109
109
|
/** `GET /api/daemon/db` — the database inventory (schema version, tables, row counts, size). */
|
|
110
|
-
export declare const daemonDbInspectRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, DaemonDbStatusReport, DaemonDbHttpDeps>;
|
|
110
|
+
export declare const daemonDbInspectRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, DaemonDbStatusReport, DaemonDbHttpDeps, undefined>;
|
|
111
111
|
/** `POST /api/daemon/db/verify?quick=` — `PRAGMA integrity_check`/`quick_check` plus `foreign_key_check`. */
|
|
112
112
|
export declare const daemonDbVerifyRoute: import("@jini-ai/http-kit").JsonRouteSpec<{
|
|
113
113
|
quick: boolean;
|
|
114
|
-
}, DbIntegrityReport, DaemonDbHttpDeps>;
|
|
114
|
+
}, DbIntegrityReport, DaemonDbHttpDeps, undefined>;
|
|
115
115
|
/** `POST /api/daemon/db/vacuum` — runs `VACUUM` and reports bytes reclaimed. */
|
|
116
|
-
export declare const daemonDbVacuumRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, DaemonDbVacuumResult, DaemonDbHttpDeps>;
|
|
116
|
+
export declare const daemonDbVacuumRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, DaemonDbVacuumResult, DaemonDbHttpDeps, undefined>;
|
|
117
117
|
/** Mounts all three DB-ops routes on `app`. A pack's `http({ app, services })` calls this directly. */
|
|
118
118
|
export declare function registerDaemonDbRoutes({ app, deps, adapter }: {
|
|
119
119
|
readonly app: Express;
|
|
@@ -103,7 +103,7 @@ export interface DelegatedToolsHttpDeps {
|
|
|
103
103
|
* became terminal between this route's existence check and the bridge's first emitted event)
|
|
104
104
|
* reaches the same SEC-005 redaction path.
|
|
105
105
|
*/
|
|
106
|
-
export declare const delegatedToolExecuteRoute: import("@jini-ai/http-kit").JsonRouteSpec<DelegatedToolExecuteRequest, DelegatedToolExecuteResponse, DelegatedToolsHttpDeps>;
|
|
106
|
+
export declare const delegatedToolExecuteRoute: import("@jini-ai/http-kit").JsonRouteSpec<DelegatedToolExecuteRequest, DelegatedToolExecuteResponse, DelegatedToolsHttpDeps, undefined>;
|
|
107
107
|
/** Mounts `POST /api/delegated-tool-calls` on `app`. A pack's `http(app, services)` calls this directly. */
|
|
108
108
|
export declare function registerDelegatedToolRoutes({ app, deps, adapter }: {
|
|
109
109
|
readonly app: Express;
|
|
@@ -31,7 +31,7 @@ import { createDelegatedToolBridge } from '../index.js';
|
|
|
31
31
|
import { defineJsonRoute, mountJsonRoute } from '@jini-ai/http-kit';
|
|
32
32
|
import { validationError } from '@jini-ai/http-kit';
|
|
33
33
|
import { err, ok } from '@jini-ai/http-kit';
|
|
34
|
-
import * as readOnlyTools from '../read-only-tools.js';
|
|
34
|
+
import * as readOnlyTools from '../core/read-only-tools.js';
|
|
35
35
|
/** Route preflight shares the same registration decision as nested dispatch. */
|
|
36
36
|
function checkReadOnlyConstraint(deps, input) {
|
|
37
37
|
if (input.requireReadOnly !== true)
|
|
@@ -93,7 +93,7 @@ export declare function handleFrontendSessionStream({ req, res, deps }: {
|
|
|
93
93
|
* handler awaiting it. Always `200`; `{settled:false}` reports a duplicate or unknown answer,
|
|
94
94
|
* which is an expected outcome rather than a transport error.
|
|
95
95
|
*/
|
|
96
|
-
export declare const frontendSessionResponseRoute: import("@jini-ai/http-kit").JsonRouteSpec<FrontendSessionResponseRequest, FrontendSessionResponseBody, FrontendSessionsHttpDeps>;
|
|
96
|
+
export declare const frontendSessionResponseRoute: import("@jini-ai/http-kit").JsonRouteSpec<FrontendSessionResponseRequest, FrontendSessionResponseBody, FrontendSessionsHttpDeps, undefined>;
|
|
97
97
|
/**
|
|
98
98
|
* Mounts both frontend-session routes on `app`.
|
|
99
99
|
*
|
package/dist/http/health.d.ts
CHANGED
|
@@ -80,12 +80,12 @@ export interface ReadinessResponse {
|
|
|
80
80
|
export interface VersionResponse {
|
|
81
81
|
readonly version: string;
|
|
82
82
|
}
|
|
83
|
-
export declare const healthRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, LivenessResponse, HealthHttpDeps>;
|
|
84
|
-
export declare const apiHealthRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, LivenessResponse, HealthHttpDeps>;
|
|
85
|
-
export declare const readyRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, ReadinessResponse, HealthHttpDeps>;
|
|
86
|
-
export declare const apiReadyRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, ReadinessResponse, HealthHttpDeps>;
|
|
87
|
-
export declare const versionInfoRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, VersionResponse, HealthHttpDeps>;
|
|
88
|
-
export declare const apiVersionInfoRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, VersionResponse, HealthHttpDeps>;
|
|
83
|
+
export declare const healthRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, LivenessResponse, HealthHttpDeps, undefined>;
|
|
84
|
+
export declare const apiHealthRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, LivenessResponse, HealthHttpDeps, undefined>;
|
|
85
|
+
export declare const readyRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, ReadinessResponse, HealthHttpDeps, undefined>;
|
|
86
|
+
export declare const apiReadyRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, ReadinessResponse, HealthHttpDeps, undefined>;
|
|
87
|
+
export declare const versionInfoRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, VersionResponse, HealthHttpDeps, undefined>;
|
|
88
|
+
export declare const apiVersionInfoRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, VersionResponse, HealthHttpDeps, undefined>;
|
|
89
89
|
/** Mounts all six health/readiness/version routes on `app`. Call this before installing `express.json()`/the bearer-auth/origin-guard middleware — see module doc. */
|
|
90
90
|
export declare function registerHealthRoutes({ app, deps, adapter }: {
|
|
91
91
|
readonly app: Express;
|
|
@@ -164,7 +164,7 @@ export declare function listAvailableEditors(_required: Record<string, never>, {
|
|
|
164
164
|
readonly probeEnv?: HostToolProbeEnv | undefined;
|
|
165
165
|
}): Promise<HostEditorsResponse>;
|
|
166
166
|
/** `GET /api/editors` — lists the host-tool catalogue applicable to this platform with live availability. */
|
|
167
|
-
export declare const hostEditorsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, HostEditorsResponse, Record<string, never
|
|
167
|
+
export declare const hostEditorsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, HostEditorsResponse, Record<string, never>, undefined>;
|
|
168
168
|
export interface OpenResourceInEditorRequest {
|
|
169
169
|
readonly resourceRef: string;
|
|
170
170
|
readonly editorId: string;
|
|
@@ -204,7 +204,7 @@ export interface HostToolsOpenInDeps {
|
|
|
204
204
|
* operationally useful to the caller and does not cross a trust boundary
|
|
205
205
|
* the way an internal agent-run exception can.
|
|
206
206
|
*/
|
|
207
|
-
export declare const openResourceInEditorRoute: import("@jini-ai/http-kit").JsonRouteSpec<OpenResourceInEditorRequest, OpenResourceInEditorResponse, HostToolsOpenInDeps>;
|
|
207
|
+
export declare const openResourceInEditorRoute: import("@jini-ai/http-kit").JsonRouteSpec<OpenResourceInEditorRequest, OpenResourceInEditorResponse, HostToolsOpenInDeps, undefined>;
|
|
208
208
|
/** Mounts `GET /api/editors` and `POST /api/resources/:resourceRef/open-in` on `app`. A pack's `http(app, services)` calls this directly. */
|
|
209
209
|
export declare function registerHostToolsRoutes({ app, adapter }: {
|
|
210
210
|
readonly app: Express;
|
package/dist/http/media.d.ts
CHANGED
|
@@ -123,19 +123,19 @@ interface MediaTaskListQuery {
|
|
|
123
123
|
export interface MediaGenerateResponse {
|
|
124
124
|
readonly task: MediaTask;
|
|
125
125
|
}
|
|
126
|
-
export declare const mediaGenerateRoute: import("@jini-ai/http-kit").JsonRouteSpec<MediaGenerateRequest, MediaGenerateResponse, MediaHttpDeps>;
|
|
126
|
+
export declare const mediaGenerateRoute: import("@jini-ai/http-kit").JsonRouteSpec<MediaGenerateRequest, MediaGenerateResponse, MediaHttpDeps, undefined>;
|
|
127
127
|
export interface MediaTaskResponse {
|
|
128
128
|
readonly task: MediaTask;
|
|
129
129
|
}
|
|
130
|
-
export declare const mediaTaskGetRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MediaTaskResponse, MediaHttpDeps>;
|
|
130
|
+
export declare const mediaTaskGetRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MediaTaskResponse, MediaHttpDeps, undefined>;
|
|
131
131
|
export interface MediaTaskDeleteResponse {
|
|
132
132
|
readonly ok: true;
|
|
133
133
|
}
|
|
134
|
-
export declare const mediaTaskDeleteRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MediaTaskDeleteResponse, MediaHttpDeps>;
|
|
134
|
+
export declare const mediaTaskDeleteRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MediaTaskDeleteResponse, MediaHttpDeps, undefined>;
|
|
135
135
|
export interface MediaTaskListResponse {
|
|
136
136
|
readonly tasks: readonly MediaTask[];
|
|
137
137
|
}
|
|
138
|
-
export declare const mediaTaskListRoute: import("@jini-ai/http-kit").JsonRouteSpec<MediaTaskListQuery, MediaTaskListResponse, MediaHttpDeps>;
|
|
138
|
+
export declare const mediaTaskListRoute: import("@jini-ai/http-kit").JsonRouteSpec<MediaTaskListQuery, MediaTaskListResponse, MediaHttpDeps, undefined>;
|
|
139
139
|
/** Mounts every media route on `app`. A pack's `http(app, services)` calls this directly. */
|
|
140
140
|
export declare function registerMediaRoutes({ app, deps, adapter }: {
|
|
141
141
|
readonly app: Express;
|
package/dist/http/memory.d.ts
CHANGED
|
@@ -162,13 +162,13 @@ export interface MemoryOverviewResponse {
|
|
|
162
162
|
readonly index: string;
|
|
163
163
|
readonly entries: readonly MemoryNoteEntrySummary[];
|
|
164
164
|
}
|
|
165
|
-
export declare const memoryOverviewRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryOverviewResponse, MemoryHttpDeps>;
|
|
165
|
+
export declare const memoryOverviewRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryOverviewResponse, MemoryHttpDeps, undefined>;
|
|
166
166
|
export interface MemoryTreeResponse {
|
|
167
167
|
readonly enabled: boolean;
|
|
168
168
|
readonly rootDir: string;
|
|
169
169
|
readonly tree: readonly MemoryTreeNode[];
|
|
170
170
|
}
|
|
171
|
-
export declare const memoryTreeRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryTreeResponse, MemoryHttpDeps>;
|
|
171
|
+
export declare const memoryTreeRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryTreeResponse, MemoryHttpDeps, undefined>;
|
|
172
172
|
export interface MemoryTreeNodePatch {
|
|
173
173
|
readonly name?: string;
|
|
174
174
|
readonly description?: string;
|
|
@@ -183,30 +183,30 @@ export interface MemoryUpdateTreeNodeResponse {
|
|
|
183
183
|
readonly entry: MemoryNoteEntry;
|
|
184
184
|
readonly tree: readonly MemoryTreeNode[];
|
|
185
185
|
}
|
|
186
|
-
export declare const memoryUpdateTreeNodeRoute: import("@jini-ai/http-kit").JsonRouteSpec<MemoryUpdateTreeNodeInput, MemoryUpdateTreeNodeResponse, MemoryHttpDeps>;
|
|
186
|
+
export declare const memoryUpdateTreeNodeRoute: import("@jini-ai/http-kit").JsonRouteSpec<MemoryUpdateTreeNodeInput, MemoryUpdateTreeNodeResponse, MemoryHttpDeps, undefined>;
|
|
187
187
|
export interface MemoryIndexResponse {
|
|
188
188
|
readonly index: string;
|
|
189
189
|
}
|
|
190
|
-
export declare const memoryWriteIndexRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryIndexResponse, MemoryHttpDeps>;
|
|
190
|
+
export declare const memoryWriteIndexRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryIndexResponse, MemoryHttpDeps, undefined>;
|
|
191
191
|
export interface MemoryConfigResponse {
|
|
192
192
|
readonly enabled: boolean;
|
|
193
193
|
}
|
|
194
|
-
export declare const memoryWriteConfigRoute: import("@jini-ai/http-kit").JsonRouteSpec<Partial<MemoryNoteStoreOptions>, MemoryConfigResponse, MemoryHttpDeps>;
|
|
194
|
+
export declare const memoryWriteConfigRoute: import("@jini-ai/http-kit").JsonRouteSpec<Partial<MemoryNoteStoreOptions>, MemoryConfigResponse, MemoryHttpDeps, undefined>;
|
|
195
195
|
export interface MemoryExtractionsResponse {
|
|
196
196
|
readonly extractions: readonly unknown[];
|
|
197
197
|
}
|
|
198
|
-
export declare const memoryListExtractionsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryExtractionsResponse, MemoryHttpDeps>;
|
|
198
|
+
export declare const memoryListExtractionsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryExtractionsResponse, MemoryHttpDeps, undefined>;
|
|
199
199
|
export interface MemoryRemovedResponse {
|
|
200
200
|
readonly removed: number;
|
|
201
201
|
}
|
|
202
|
-
export declare const memoryClearExtractionsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryRemovedResponse, MemoryHttpDeps>;
|
|
203
|
-
export declare const memoryRemoveExtractionRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryRemovedResponse, MemoryHttpDeps>;
|
|
202
|
+
export declare const memoryClearExtractionsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryRemovedResponse, MemoryHttpDeps, undefined>;
|
|
203
|
+
export declare const memoryRemoveExtractionRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryRemovedResponse, MemoryHttpDeps, undefined>;
|
|
204
204
|
export interface MemoryVerificationsResponse {
|
|
205
205
|
readonly verifications: readonly unknown[];
|
|
206
206
|
}
|
|
207
|
-
export declare const memoryListVerificationsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryVerificationsResponse, MemoryHttpDeps>;
|
|
208
|
-
export declare const memoryClearVerificationsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryRemovedResponse, MemoryHttpDeps>;
|
|
209
|
-
export declare const memoryRemoveVerificationRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryRemovedResponse, MemoryHttpDeps>;
|
|
207
|
+
export declare const memoryListVerificationsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryVerificationsResponse, MemoryHttpDeps, undefined>;
|
|
208
|
+
export declare const memoryClearVerificationsRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, MemoryRemovedResponse, MemoryHttpDeps, undefined>;
|
|
209
|
+
export declare const memoryRemoveVerificationRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryRemovedResponse, MemoryHttpDeps, undefined>;
|
|
210
210
|
export interface MemoryEntryInput {
|
|
211
211
|
readonly id?: string;
|
|
212
212
|
readonly name: string;
|
|
@@ -217,17 +217,17 @@ export interface MemoryEntryInput {
|
|
|
217
217
|
export interface MemoryEntryResponse {
|
|
218
218
|
readonly entry: MemoryNoteEntry;
|
|
219
219
|
}
|
|
220
|
-
export declare const memoryCreateEntryRoute: import("@jini-ai/http-kit").JsonRouteSpec<MemoryEntryInput, MemoryEntryResponse, MemoryHttpDeps>;
|
|
221
|
-
export declare const memoryReadEntryRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryEntryResponse, MemoryHttpDeps>;
|
|
220
|
+
export declare const memoryCreateEntryRoute: import("@jini-ai/http-kit").JsonRouteSpec<MemoryEntryInput, MemoryEntryResponse, MemoryHttpDeps, undefined>;
|
|
221
|
+
export declare const memoryReadEntryRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryEntryResponse, MemoryHttpDeps, undefined>;
|
|
222
222
|
interface MemoryUpdateEntryInput {
|
|
223
223
|
readonly id: string;
|
|
224
224
|
readonly input: MemoryEntryInput;
|
|
225
225
|
}
|
|
226
|
-
export declare const memoryUpdateEntryRoute: import("@jini-ai/http-kit").JsonRouteSpec<MemoryUpdateEntryInput, MemoryEntryResponse, MemoryHttpDeps>;
|
|
226
|
+
export declare const memoryUpdateEntryRoute: import("@jini-ai/http-kit").JsonRouteSpec<MemoryUpdateEntryInput, MemoryEntryResponse, MemoryHttpDeps, undefined>;
|
|
227
227
|
export interface MemoryDeleteEntryResponse {
|
|
228
228
|
readonly ok: true;
|
|
229
229
|
}
|
|
230
|
-
export declare const memoryDeleteEntryRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryDeleteEntryResponse, MemoryHttpDeps>;
|
|
230
|
+
export declare const memoryDeleteEntryRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, MemoryDeleteEntryResponse, MemoryHttpDeps, undefined>;
|
|
231
231
|
/**
|
|
232
232
|
* `GET /api/memory/events` — one SSE connection multiplexing three channels
|
|
233
233
|
* (matching OD's own reasoning: "so the browser opens one connection instead
|
|
@@ -54,8 +54,8 @@ export interface RemoteToolResultRequest {
|
|
|
54
54
|
export interface RemoteRunEventResponse {
|
|
55
55
|
readonly recorded: true;
|
|
56
56
|
}
|
|
57
|
-
export declare const remoteToolUseRoute: import("@jini-ai/http-kit").JsonRouteSpec<RemoteToolUseRequest, RemoteRunEventResponse, RemoteRunEventHttpDeps>;
|
|
58
|
-
export declare const remoteToolResultRoute: import("@jini-ai/http-kit").JsonRouteSpec<RemoteToolResultRequest, RemoteRunEventResponse, RemoteRunEventHttpDeps>;
|
|
57
|
+
export declare const remoteToolUseRoute: import("@jini-ai/http-kit").JsonRouteSpec<RemoteToolUseRequest, RemoteRunEventResponse, RemoteRunEventHttpDeps, undefined>;
|
|
58
|
+
export declare const remoteToolResultRoute: import("@jini-ai/http-kit").JsonRouteSpec<RemoteToolResultRequest, RemoteRunEventResponse, RemoteRunEventHttpDeps, undefined>;
|
|
59
59
|
/**
|
|
60
60
|
* Mounts both remote-run-event routes on `app`, gated by {@link requireRemoteToolBridgeToken}.
|
|
61
61
|
* Unlike `registerRunRoutes`/`registerDelegatedToolRoutes`, these routes do not use
|
package/dist/http/research.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ interface ResearchSearchRequest {
|
|
|
37
37
|
readonly query: string;
|
|
38
38
|
readonly maxSources?: number;
|
|
39
39
|
}
|
|
40
|
-
export declare const researchSearchRoute: import("@jini-ai/http-kit").JsonRouteSpec<ResearchSearchRequest, ResearchSearchResponse, ResearchHttpDeps>;
|
|
40
|
+
export declare const researchSearchRoute: import("@jini-ai/http-kit").JsonRouteSpec<ResearchSearchRequest, ResearchSearchResponse, ResearchHttpDeps, undefined>;
|
|
41
41
|
/** Mounts `POST /api/research/search` on `app`. A pack's `http(app, services)` calls this directly. */
|
|
42
42
|
export declare function registerResearchRoutes({ app, deps, adapter }: {
|
|
43
43
|
readonly app: Express;
|
package/dist/http/routines.d.ts
CHANGED
|
@@ -87,17 +87,17 @@ interface RoutineRunsQuery {
|
|
|
87
87
|
export interface RoutineListResponse {
|
|
88
88
|
readonly routines: readonly Routine[];
|
|
89
89
|
}
|
|
90
|
-
export declare const routineListRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, RoutineListResponse, RoutineHttpDeps>;
|
|
90
|
+
export declare const routineListRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, RoutineListResponse, RoutineHttpDeps, undefined>;
|
|
91
91
|
export interface RoutineResponse {
|
|
92
92
|
readonly routine: Routine;
|
|
93
93
|
}
|
|
94
|
-
export declare const routineCreateRoute: import("@jini-ai/http-kit").JsonRouteSpec<RoutineCreateInput, RoutineResponse, RoutineHttpDeps>;
|
|
95
|
-
export declare const routineGetRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RoutineResponse, RoutineHttpDeps>;
|
|
96
|
-
export declare const routineUpdateRoute: import("@jini-ai/http-kit").JsonRouteSpec<RoutineUpdateRequest, RoutineResponse, RoutineHttpDeps>;
|
|
94
|
+
export declare const routineCreateRoute: import("@jini-ai/http-kit").JsonRouteSpec<RoutineCreateInput, RoutineResponse, RoutineHttpDeps, undefined>;
|
|
95
|
+
export declare const routineGetRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RoutineResponse, RoutineHttpDeps, undefined>;
|
|
96
|
+
export declare const routineUpdateRoute: import("@jini-ai/http-kit").JsonRouteSpec<RoutineUpdateRequest, RoutineResponse, RoutineHttpDeps, undefined>;
|
|
97
97
|
export interface RoutineDeleteResponse {
|
|
98
98
|
readonly ok: true;
|
|
99
99
|
}
|
|
100
|
-
export declare const routineDeleteRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RoutineDeleteResponse, RoutineHttpDeps>;
|
|
100
|
+
export declare const routineDeleteRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RoutineDeleteResponse, RoutineHttpDeps, undefined>;
|
|
101
101
|
export interface RoutineRunNowResponse {
|
|
102
102
|
readonly routine: Routine | null;
|
|
103
103
|
readonly run: RoutineRun | null;
|
|
@@ -105,11 +105,11 @@ export interface RoutineRunNowResponse {
|
|
|
105
105
|
readonly conversationId: string;
|
|
106
106
|
readonly agentRunId: string;
|
|
107
107
|
}
|
|
108
|
-
export declare const routineRunNowRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RoutineRunNowResponse, RoutineHttpDeps>;
|
|
108
|
+
export declare const routineRunNowRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RoutineRunNowResponse, RoutineHttpDeps, undefined>;
|
|
109
109
|
export interface RoutineRunsResponse {
|
|
110
110
|
readonly runs: readonly RoutineRun[];
|
|
111
111
|
}
|
|
112
|
-
export declare const routineRunsListRoute: import("@jini-ai/http-kit").JsonRouteSpec<RoutineRunsQuery, RoutineRunsResponse, RoutineHttpDeps>;
|
|
112
|
+
export declare const routineRunsListRoute: import("@jini-ai/http-kit").JsonRouteSpec<RoutineRunsQuery, RoutineRunsResponse, RoutineHttpDeps, undefined>;
|
|
113
113
|
/** Mounts every routine route on `app`. A pack's `http(app, services)` calls this directly. */
|
|
114
114
|
export declare function registerRoutineRoutes({ app, deps, adapter }: {
|
|
115
115
|
readonly app: Express;
|
|
@@ -48,7 +48,7 @@ export interface RunOwnershipRequired {
|
|
|
48
48
|
/** Mount after authentication on routes with a runId parameter. Denial envelopes pass through intact.
|
|
49
49
|
* @complexity O(1) adapter work plus the injected ownership lookup; no storage or identity defaults.
|
|
50
50
|
*/
|
|
51
|
-
export declare function createRunOwnershipMiddleware({ authorize, principalHeaderName, isEventStream }: RunOwnershipRequired): RequestHandler;
|
|
51
|
+
export declare function createRunOwnershipMiddleware({ authorize, principalHeaderName, isEventStream }: RunOwnershipRequired, _optional?: Record<string, never>): RequestHandler;
|
|
52
52
|
export interface OwnedRunListRequired<Run> {
|
|
53
53
|
readonly principalHeaderName: string;
|
|
54
54
|
readonly listRuns: (required: Record<string, never>, optional: {
|
|
@@ -69,5 +69,5 @@ export interface OwnedRunListRequired<Run> {
|
|
|
69
69
|
* Missing principals receive the existing 401 envelope before the list port is called.
|
|
70
70
|
* @complexity O(n) policy filtering for n listed runs; O(1) adapter space excluding results.
|
|
71
71
|
*/
|
|
72
|
-
export declare function createOwnedRunListHandler<Run>({ listRuns, filterOwnedRuns, principalHeaderName }: OwnedRunListRequired<Run>): RequestHandler;
|
|
72
|
+
export declare function createOwnedRunListHandler<Run>({ listRuns, filterOwnedRuns, principalHeaderName }: OwnedRunListRequired<Run>, _optional?: Record<string, never>): RequestHandler;
|
|
73
73
|
//# sourceMappingURL=run-credentials.d.ts.map
|
|
@@ -27,7 +27,7 @@ export function createDaemonAuthMiddleware({ authorize, authorizationHeaderName
|
|
|
27
27
|
/** Mount after authentication on routes with a runId parameter. Denial envelopes pass through intact.
|
|
28
28
|
* @complexity O(1) adapter work plus the injected ownership lookup; no storage or identity defaults.
|
|
29
29
|
*/
|
|
30
|
-
export function createRunOwnershipMiddleware({ authorize, principalHeaderName, isEventStream }) {
|
|
30
|
+
export function createRunOwnershipMiddleware({ authorize, principalHeaderName, isEventStream }, _optional = {}) {
|
|
31
31
|
return async (req, res, next) => {
|
|
32
32
|
try {
|
|
33
33
|
const decision = await authorize({ runId: req.params.runId || undefined, principalId: req.get(principalHeaderName) || undefined, eventStream: isEventStream({ path: req.path }) });
|
|
@@ -46,7 +46,7 @@ export function createRunOwnershipMiddleware({ authorize, principalHeaderName, i
|
|
|
46
46
|
* Missing principals receive the existing 401 envelope before the list port is called.
|
|
47
47
|
* @complexity O(n) policy filtering for n listed runs; O(1) adapter space excluding results.
|
|
48
48
|
*/
|
|
49
|
-
export function createOwnedRunListHandler({ listRuns, filterOwnedRuns, principalHeaderName }) {
|
|
49
|
+
export function createOwnedRunListHandler({ listRuns, filterOwnedRuns, principalHeaderName }, _optional = {}) {
|
|
50
50
|
return async (req, res, next) => {
|
|
51
51
|
try {
|
|
52
52
|
const principalId = req.get(principalHeaderName) || undefined;
|
package/dist/http/runs.d.ts
CHANGED
|
@@ -48,16 +48,16 @@ export interface RunCancelResponse {
|
|
|
48
48
|
export interface RunListResponse {
|
|
49
49
|
readonly runs: readonly RunStatus[];
|
|
50
50
|
}
|
|
51
|
-
export declare const runStartRoute: import("@jini-ai/http-kit").JsonRouteSpec<RunCreateRequest, RunStartResponse, RunHttpDeps>;
|
|
51
|
+
export declare const runStartRoute: import("@jini-ai/http-kit").JsonRouteSpec<RunCreateRequest, RunStartResponse, RunHttpDeps, undefined>;
|
|
52
52
|
/** `GET /api/runs` — lists runs, optionally scoped to a `contextRef` query parameter. */
|
|
53
53
|
export declare const runListRoute: import("@jini-ai/http-kit").JsonRouteSpec<{
|
|
54
54
|
contextRef?: string;
|
|
55
|
-
}, RunListResponse, RunHttpDeps>;
|
|
56
|
-
export declare const runStatusRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RunStatusResponse, RunHttpDeps>;
|
|
55
|
+
}, RunListResponse, RunHttpDeps, undefined>;
|
|
56
|
+
export declare const runStatusRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RunStatusResponse, RunHttpDeps, undefined>;
|
|
57
57
|
export declare const runCancelRoute: import("@jini-ai/http-kit").JsonRouteSpec<{
|
|
58
58
|
runId: string;
|
|
59
59
|
reason?: string;
|
|
60
|
-
}, RunCancelResponse, RunHttpDeps>;
|
|
60
|
+
}, RunCancelResponse, RunHttpDeps, undefined>;
|
|
61
61
|
/**
|
|
62
62
|
* The core of `GET /api/runs/:runId/events` — canonical events as SSE, with Last-Event-ID
|
|
63
63
|
* reconnect support. Takes `runId`/`afterCursor` already resolved by the caller. `res` is typed
|
package/dist/http/terminals.d.ts
CHANGED
|
@@ -35,14 +35,14 @@ export interface TerminalCreateRequest {
|
|
|
35
35
|
* open-in route does, then authorizes+spawns the session through
|
|
36
36
|
* `ToolExecutor.execute(..., 'terminal.create', ...)`.
|
|
37
37
|
*/
|
|
38
|
-
export declare const terminalCreateRoute: import("@jini-ai/http-kit").JsonRouteSpec<TerminalCreateRequest, TerminalSessionInfo, TerminalsHttpDeps>;
|
|
38
|
+
export declare const terminalCreateRoute: import("@jini-ai/http-kit").JsonRouteSpec<TerminalCreateRequest, TerminalSessionInfo, TerminalsHttpDeps, undefined>;
|
|
39
39
|
export interface TerminalListResponse {
|
|
40
40
|
readonly terminals: readonly TerminalSessionInfo[];
|
|
41
41
|
}
|
|
42
42
|
/** `GET /api/terminals` — sessions the calling principal owns, optionally narrowed by `resourceRef`. Never gated through `ToolExecutor` — a read scoped to the caller's own sessions, matching `runs.ts`'s `runListRoute` precedent. */
|
|
43
43
|
export declare const terminalListRoute: import("@jini-ai/http-kit").JsonRouteSpec<{
|
|
44
44
|
resourceRef?: string;
|
|
45
|
-
}, TerminalListResponse, TerminalsHttpDeps>;
|
|
45
|
+
}, TerminalListResponse, TerminalsHttpDeps, undefined>;
|
|
46
46
|
export interface TerminalActionResponse {
|
|
47
47
|
readonly ok: boolean;
|
|
48
48
|
readonly terminal?: TerminalSessionInfo;
|
|
@@ -64,17 +64,17 @@ export declare function actionResultToApiResult({ result, notFoundMessage }: {
|
|
|
64
64
|
export declare const terminalStdinRoute: import("@jini-ai/http-kit").JsonRouteSpec<{
|
|
65
65
|
id: string;
|
|
66
66
|
data: string;
|
|
67
|
-
}, TerminalActionResponse, TerminalsHttpDeps>;
|
|
67
|
+
}, TerminalActionResponse, TerminalsHttpDeps, undefined>;
|
|
68
68
|
/** `POST /api/terminals/:id/resize` — resizes the session's pty. */
|
|
69
69
|
export declare const terminalResizeRoute: import("@jini-ai/http-kit").JsonRouteSpec<{
|
|
70
70
|
id: string;
|
|
71
71
|
cols: number;
|
|
72
72
|
rows: number;
|
|
73
|
-
}, TerminalActionResponse, TerminalsHttpDeps>;
|
|
73
|
+
}, TerminalActionResponse, TerminalsHttpDeps, undefined>;
|
|
74
74
|
/** `POST /api/terminals/:id/kill` — sends `SIGTERM` to the session's pty. */
|
|
75
|
-
export declare const terminalKillRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, TerminalActionResponse, TerminalsHttpDeps>;
|
|
75
|
+
export declare const terminalKillRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, TerminalActionResponse, TerminalsHttpDeps, undefined>;
|
|
76
76
|
/** `DELETE /api/terminals/:id` — alias for `kill`, matching OD's dual `POST .../kill` / `DELETE` routes. */
|
|
77
|
-
export declare const terminalDeleteRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, TerminalActionResponse, TerminalsHttpDeps>;
|
|
77
|
+
export declare const terminalDeleteRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, TerminalActionResponse, TerminalsHttpDeps, undefined>;
|
|
78
78
|
/** The one method {@link createDeferredEndGate} needs from `sse.ts`'s channel — narrowed so the gate is unit-testable against a bare fake, not a real `SseChannel`. */
|
|
79
79
|
interface DeferredEndChannel {
|
|
80
80
|
end(): void;
|
|
@@ -52,7 +52,7 @@ export declare const toolCatalogSearchRoute: import("@jini-ai/http-kit").JsonRou
|
|
|
52
52
|
limit: number;
|
|
53
53
|
}, {
|
|
54
54
|
hits: readonly ToolCatalogSearchHit[];
|
|
55
|
-
}, ToolCatalogHttpDeps>;
|
|
55
|
+
}, ToolCatalogHttpDeps, undefined>;
|
|
56
56
|
/**
|
|
57
57
|
* `GET /api/tools/:id` — full descriptor (schema included), paid for only once a candidate survives
|
|
58
58
|
* search.
|
|
@@ -68,7 +68,7 @@ export declare const toolCatalogSearchRoute: import("@jini-ai/http-kit").JsonRou
|
|
|
68
68
|
*/
|
|
69
69
|
export declare const toolCatalogDescribeRoute: import("@jini-ai/http-kit").JsonRouteSpec<{
|
|
70
70
|
id: string;
|
|
71
|
-
}, ToolCatalogEntry, ToolCatalogHttpDeps>;
|
|
71
|
+
}, ToolCatalogEntry, ToolCatalogHttpDeps, undefined>;
|
|
72
72
|
/** Mounts both tool-catalog routes on `app`. A pack's `http({ app, services })` calls this directly. */
|
|
73
73
|
export declare function registerToolCatalogRoutes({ app, deps, adapter }: {
|
|
74
74
|
readonly app: Express;
|
package/dist/http/xai.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface XaiOauthStartResponse {
|
|
|
45
45
|
readonly port: number;
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
export declare const xaiOauthStartRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, XaiOauthStartResponse, XaiHttpDeps>;
|
|
48
|
+
export declare const xaiOauthStartRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, XaiOauthStartResponse, XaiHttpDeps, undefined>;
|
|
49
49
|
export interface XaiOkResponse {
|
|
50
50
|
readonly ok: true;
|
|
51
51
|
}
|
|
@@ -53,8 +53,8 @@ interface XaiOauthCompleteRequest {
|
|
|
53
53
|
readonly state: string;
|
|
54
54
|
readonly code: string;
|
|
55
55
|
}
|
|
56
|
-
export declare const xaiOauthCompleteRoute: import("@jini-ai/http-kit").JsonRouteSpec<XaiOauthCompleteRequest, XaiOkResponse, XaiHttpDeps>;
|
|
57
|
-
export declare const xaiOauthCancelRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, XaiOkResponse, XaiHttpDeps>;
|
|
56
|
+
export declare const xaiOauthCompleteRoute: import("@jini-ai/http-kit").JsonRouteSpec<XaiOauthCompleteRequest, XaiOkResponse, XaiHttpDeps, undefined>;
|
|
57
|
+
export declare const xaiOauthCancelRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, XaiOkResponse, XaiHttpDeps, undefined>;
|
|
58
58
|
export interface XaiAuthStatusResponse {
|
|
59
59
|
readonly connected: boolean;
|
|
60
60
|
readonly expiresAt: number | null;
|
|
@@ -62,8 +62,8 @@ export interface XaiAuthStatusResponse {
|
|
|
62
62
|
readonly savedAt: number | null;
|
|
63
63
|
readonly listening: boolean;
|
|
64
64
|
}
|
|
65
|
-
export declare const xaiAuthStatusRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, XaiAuthStatusResponse, XaiHttpDeps>;
|
|
66
|
-
export declare const xaiOauthDisconnectRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, XaiOkResponse, XaiHttpDeps>;
|
|
65
|
+
export declare const xaiAuthStatusRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, XaiAuthStatusResponse, XaiHttpDeps, undefined>;
|
|
66
|
+
export declare const xaiOauthDisconnectRoute: import("@jini-ai/http-kit").JsonRouteSpec<void, XaiOkResponse, XaiHttpDeps, undefined>;
|
|
67
67
|
interface XaiSearchRequest {
|
|
68
68
|
readonly query: string;
|
|
69
69
|
readonly allowedXHandles?: readonly string[];
|
|
@@ -79,7 +79,7 @@ export interface XaiSearchResponse {
|
|
|
79
79
|
readonly citations: readonly string[];
|
|
80
80
|
readonly model: string;
|
|
81
81
|
}
|
|
82
|
-
export declare const xaiSearchRoute: import("@jini-ai/http-kit").JsonRouteSpec<XaiSearchRequest, XaiSearchResponse, XaiHttpDeps>;
|
|
82
|
+
export declare const xaiSearchRoute: import("@jini-ai/http-kit").JsonRouteSpec<XaiSearchRequest, XaiSearchResponse, XaiHttpDeps, undefined>;
|
|
83
83
|
/** Mounts every xAI route on `app`. A pack's `http(app, services)` calls this directly. */
|
|
84
84
|
export declare function registerXaiRoutes({ app, deps, adapter }: {
|
|
85
85
|
readonly app: Express;
|