@jini-ai/daemon 0.5.3 → 0.6.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/agent-executor/contracts.d.ts +45 -14
  3. package/dist/agent-executor/contracts.js +0 -9
  4. package/dist/agent-executor/event-translation.d.ts +2 -2
  5. package/dist/agent-executor/event-translation.js +0 -2
  6. package/dist/agent-executor/events.d.ts +26 -6
  7. package/dist/agent-executor/events.js +198 -11
  8. package/dist/agent-executor/handoff.d.ts +1 -1
  9. package/dist/agent-executor/handoff.js +0 -1
  10. package/dist/agent-executor/index.d.ts +1 -1
  11. package/dist/agent-executor/launch.d.ts +1 -1
  12. package/dist/agent-executor/launch.js +47 -3
  13. package/dist/agent-executor/mcp-bridge.d.ts +2 -2
  14. package/dist/agent-executor/mcp-bridge.js +19 -8
  15. package/dist/agent-executor/model-receipts.d.ts +6 -0
  16. package/dist/agent-executor/model-receipts.js +26 -0
  17. package/dist/agent-executor.d.ts +7 -1665
  18. package/dist/agent-executor.js +7 -3007
  19. package/dist/core/read-only-tools.d.ts +130 -0
  20. package/dist/core/read-only-tools.js +115 -0
  21. package/dist/core/tool-audit.d.ts +131 -0
  22. package/dist/core/tool-audit.js +113 -0
  23. package/dist/http/active-context.d.ts +2 -2
  24. package/dist/http/agents.d.ts +8 -2
  25. package/dist/http/agents.js +6 -2
  26. package/dist/http/component-catalog.d.ts +2 -2
  27. package/dist/http/connectors.d.ts +17 -17
  28. package/dist/http/daemon-status.d.ts +2 -2
  29. package/dist/http/db-ops.d.ts +3 -3
  30. package/dist/http/delegated-tools.d.ts +1 -1
  31. package/dist/http/delegated-tools.js +1 -1
  32. package/dist/http/frontend-sessions.d.ts +1 -1
  33. package/dist/http/health.d.ts +6 -6
  34. package/dist/http/host-tools.d.ts +2 -2
  35. package/dist/http/index.d.ts +2 -2
  36. package/dist/http/index.js +1 -1
  37. package/dist/http/media.d.ts +4 -4
  38. package/dist/http/memory.d.ts +15 -15
  39. package/dist/http/remote-run-events.d.ts +2 -2
  40. package/dist/http/research.d.ts +1 -1
  41. package/dist/http/route-manifest.js +2 -2
  42. package/dist/http/routines.d.ts +7 -7
  43. package/dist/http/run-credentials.d.ts +2 -2
  44. package/dist/http/run-credentials.js +2 -2
  45. package/dist/http/runs.d.ts +31 -6
  46. package/dist/http/runs.js +36 -1
  47. package/dist/http/terminals.d.ts +6 -6
  48. package/dist/http/tool-catalog.d.ts +2 -2
  49. package/dist/http/xai.d.ts +6 -6
  50. package/dist/index.d.ts +75 -571
  51. package/dist/index.js +75 -571
  52. package/dist/read-only-tools.d.ts +1 -129
  53. package/dist/read-only-tools.js +2 -114
  54. package/dist/run-credentials.d.ts +47 -23
  55. package/dist/run-credentials.js +24 -8
  56. package/dist/scheduler.d.ts +5 -0
  57. package/dist/scheduler.js +13 -1
  58. package/dist/session-coordination.d.ts +58 -24
  59. package/dist/session-coordination.js +40 -12
  60. package/dist/store/event-log/sqlite.js +3 -3
  61. package/dist/surface-exchanges.d.ts +207 -61
  62. package/dist/surface-exchanges.js +167 -20
  63. package/dist/tool-audit.d.ts +1 -113
  64. package/dist/tool-audit.js +2 -94
  65. package/dist/tool-recovery/diagnostics.d.ts +132 -0
  66. package/dist/tool-recovery/diagnostics.js +110 -0
  67. package/dist/tool-recovery/federated-refusal.d.ts +92 -0
  68. package/dist/tool-recovery/federated-refusal.js +152 -0
  69. package/dist/tool-recovery/index.d.ts +6 -0
  70. package/dist/tool-recovery/index.js +6 -0
  71. package/dist/tool-recovery/recovery.d.ts +49 -0
  72. package/dist/tool-recovery/recovery.js +419 -0
  73. package/dist/tool-recovery/redaction.d.ts +166 -0
  74. package/dist/tool-recovery/redaction.js +192 -0
  75. package/dist/tool-recovery/stack.d.ts +69 -0
  76. package/dist/tool-recovery/stack.js +62 -0
  77. 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;
@@ -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
  *
@@ -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;
@@ -9,8 +9,8 @@ export type { CatalogueEntry, HostEditor, HostEditorsResponse, HostToolLaunchPla
9
9
  export { applicableForPlatform, CATALOGUE, currentPlatform, defaultProbeEnv, hostEditorsRoute, launchHostTool, listAvailableEditors, pathDirs, probeCommandOnPath, probeMacBundle, registerHostToolsRoutes, resolveEntry, resolveHostToolLaunchPlan, } from './host-tools.js';
10
10
  export type { DaemonShutdownResponse, DaemonStatusDeps, DaemonStatusResponse, } from './daemon-status.js';
11
11
  export { daemonShutdownRoute, daemonStatusRoute, registerDaemonStatusRoutes } from './daemon-status.js';
12
- export type { RunCancelResponse, RunCreateRequest, RunHttpDeps, RunInternalErrorContext, RunListResponse, RunStartContext, RunStartHandler, RunStartResponse, RunStatusResponse, } from './runs.js';
13
- export { registerRunEventStream, registerRunRoutes, RUN_EVENTS_ROUTE_PATH, runCancelRoute, runListRoute, runStartRoute, runStatusRoute, } from './runs.js';
12
+ export type { RunCancelResponse, RunCreateRequest, RunHttpDeps, RunInternalErrorContext, RunListResponse, RunStartContext, RunMessageRequest, RunMessageResponse, RunStartHandler, RunStartResponse, RunStatusResponse, } from './runs.js';
13
+ export { registerRunEventStream, registerRunRoutes, RUN_EVENTS_ROUTE_PATH, runCancelRoute, runListRoute, runMessageRoute, RUN_MESSAGE_MAX_CHARS, runStartRoute, runStatusRoute, } from './runs.js';
14
14
  export { JINI_ROUTE_MANIFEST, manifestRoutesForFamilies, routeFamilyManifest } from './route-manifest.js';
15
15
  export type { AgentListResponse, AgentModelSummary, AgentsHttpDeps, AgentSummary } from './agents.js';
16
16
  export { agentListRoute, agentRescanRoute, registerAgentRoutes } from './agents.js';
@@ -3,7 +3,7 @@ export { cancelRunsOwnedBy } from './cancel-owned-runs.js';
3
3
  export { ACTIVE_CONTEXT_TTL_MS, getActiveRoute, registerActiveContextRoutes, setActiveRoute, } from './active-context.js';
4
4
  export { applicableForPlatform, CATALOGUE, currentPlatform, defaultProbeEnv, hostEditorsRoute, launchHostTool, listAvailableEditors, pathDirs, probeCommandOnPath, probeMacBundle, registerHostToolsRoutes, resolveEntry, resolveHostToolLaunchPlan, } from './host-tools.js';
5
5
  export { daemonShutdownRoute, daemonStatusRoute, registerDaemonStatusRoutes } from './daemon-status.js';
6
- export { registerRunEventStream, registerRunRoutes, RUN_EVENTS_ROUTE_PATH, runCancelRoute, runListRoute, runStartRoute, runStatusRoute, } from './runs.js';
6
+ export { registerRunEventStream, registerRunRoutes, RUN_EVENTS_ROUTE_PATH, runCancelRoute, runListRoute, runMessageRoute, RUN_MESSAGE_MAX_CHARS, runStartRoute, runStatusRoute, } from './runs.js';
7
7
  export { JINI_ROUTE_MANIFEST, manifestRoutesForFamilies, routeFamilyManifest } from './route-manifest.js';
8
8
  export { agentListRoute, agentRescanRoute, registerAgentRoutes } from './agents.js';
9
9
  export { memoryClearExtractionsRoute, memoryClearVerificationsRoute, memoryCreateEntryRoute, memoryDeleteEntryRoute, memoryListExtractionsRoute, memoryListVerificationsRoute, memoryOverviewRoute, memoryReadEntryRoute, memoryRemoveExtractionRoute, memoryRemoveVerificationRoute, memoryTreeRoute, memoryUpdateEntryRoute, memoryUpdateTreeNodeRoute, memoryWriteConfigRoute, memoryWriteIndexRoute, registerMemoryEventStream, registerMemoryRoutes, } from './memory.js';
@@ -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;
@@ -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
@@ -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;
@@ -31,7 +31,7 @@
31
31
  import { agentListRoute, agentRescanRoute } from './agents.js';
32
32
  import { delegatedToolExecuteRoute } from './delegated-tools.js';
33
33
  import { apiHealthRoute, apiReadyRoute, apiVersionInfoRoute, healthRoute, readyRoute, versionInfoRoute, } from './health.js';
34
- import { RUN_EVENTS_ROUTE_PATH, runCancelRoute, runListRoute, runStartRoute, runStatusRoute, } from './runs.js';
34
+ import { RUN_EVENTS_ROUTE_PATH, runCancelRoute, runMessageRoute, runListRoute, runStartRoute, runStatusRoute, } from './runs.js';
35
35
  import { toolCatalogDescribeRoute, toolCatalogSearchRoute } from './tool-catalog.js';
36
36
  /**
37
37
  * Projects route specs onto `RouteRegistration`s, upper-casing the method so entries compare directly
@@ -52,7 +52,7 @@ function fromSpecs(...specs) {
52
52
  export const JINI_ROUTE_MANIFEST = {
53
53
  health: fromSpecs(healthRoute, apiHealthRoute, readyRoute, apiReadyRoute, versionInfoRoute, apiVersionInfoRoute),
54
54
  runs: [
55
- ...fromSpecs(runStartRoute, runListRoute, runStatusRoute, runCancelRoute),
55
+ ...fromSpecs(runStartRoute, runListRoute, runStatusRoute, runCancelRoute, runMessageRoute),
56
56
  // Registered with a bare `app.get` rather than a route spec (by `registerRunRoutes` itself), so
57
57
  // it contributes its exported path constant instead of a copied literal.
58
58
  { method: 'GET', path: RUN_EVENTS_ROUTE_PATH },
@@ -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;
@@ -1,6 +1,6 @@
1
1
  import type { Express } from 'express';
2
2
  import { type RunStatus } from '@jini-ai/protocol';
3
- import type { RunLifecycle } from '../index.js';
3
+ import type { RunLifecycle, UserMessageDelivery } from '../index.js';
4
4
  import { type AdapterContext } from '@jini-ai/http-kit';
5
5
  import type { ServerResponse } from 'node:http';
6
6
  /**
@@ -34,6 +34,15 @@ export interface RunHttpDeps {
34
34
  readonly onStarted?: RunStartHandler;
35
35
  /** Host-owned sink for the real exception behind a generic `INTERNAL_ERROR` response (SEC-005). Defaults to `console.error`. */
36
36
  readonly onInternalError?: (context: RunInternalErrorContext) => void;
37
+ /**
38
+ * Delivers a message the human sent mid-run into that run's live agent — a host passes its
39
+ * `AgentExecutor.sendUserMessage`. Omitted, every such message reports `'unsupported'`, so the
40
+ * client falls back to interrupting the run and sending the text as the next turn.
41
+ */
42
+ readonly deliverUserMessage?: (input: {
43
+ readonly runId: string;
44
+ readonly text: string;
45
+ }) => UserMessageDelivery | Promise<UserMessageDelivery>;
37
46
  }
38
47
  export interface RunStartResponse {
39
48
  readonly run: RunStatus;
@@ -45,19 +54,35 @@ export interface RunStatusResponse {
45
54
  export interface RunCancelResponse {
46
55
  readonly run: RunStatus;
47
56
  }
57
+ export interface RunMessageRequest {
58
+ readonly runId: string;
59
+ readonly text: string;
60
+ }
61
+ export interface RunMessageResponse {
62
+ readonly delivery: 'delivered';
63
+ }
64
+ /** Ceiling on one mid-run message, matching what a person can reasonably type or paste into a composer. */
65
+ export declare const RUN_MESSAGE_MAX_CHARS = 100000;
48
66
  export interface RunListResponse {
49
67
  readonly runs: readonly RunStatus[];
50
68
  }
51
- export declare const runStartRoute: import("@jini-ai/http-kit").JsonRouteSpec<RunCreateRequest, RunStartResponse, RunHttpDeps>;
69
+ export declare const runStartRoute: import("@jini-ai/http-kit").JsonRouteSpec<RunCreateRequest, RunStartResponse, RunHttpDeps, undefined>;
52
70
  /** `GET /api/runs` — lists runs, optionally scoped to a `contextRef` query parameter. */
53
71
  export declare const runListRoute: import("@jini-ai/http-kit").JsonRouteSpec<{
54
72
  contextRef?: string;
55
- }, RunListResponse, RunHttpDeps>;
56
- export declare const runStatusRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RunStatusResponse, RunHttpDeps>;
73
+ }, RunListResponse, RunHttpDeps, undefined>;
74
+ export declare const runStatusRoute: import("@jini-ai/http-kit").JsonRouteSpec<string, RunStatusResponse, RunHttpDeps, undefined>;
57
75
  export declare const runCancelRoute: import("@jini-ai/http-kit").JsonRouteSpec<{
58
76
  runId: string;
59
77
  reason?: string;
60
- }, RunCancelResponse, RunHttpDeps>;
78
+ }, RunCancelResponse, RunHttpDeps, undefined>;
79
+ /**
80
+ * `POST /api/runs/:runId/messages` — a message the human sent while the run is going. `202` when it
81
+ * reached the live agent; `409 CONFLICT` with `details.delivery` (`'unsupported'` or
82
+ * `'not-running'`) when it did not, which tells the client whether to interrupt the run and send the
83
+ * text as the next turn, or simply send it next because the run is already ending.
84
+ */
85
+ export declare const runMessageRoute: import("@jini-ai/http-kit").JsonRouteSpec<RunMessageRequest, RunMessageResponse, RunHttpDeps, undefined>;
61
86
  /**
62
87
  * The core of `GET /api/runs/:runId/events` — canonical events as SSE, with Last-Event-ID
63
88
  * reconnect support. Takes `runId`/`afterCursor` already resolved by the caller. `res` is typed
@@ -82,7 +107,7 @@ export declare function registerRunEventStream({ app, deps }: {
82
107
  readonly app: Express;
83
108
  readonly deps: RunHttpDeps;
84
109
  }, _optional?: Record<string, never>): void;
85
- /** Mounts create/status/cancel JSON endpoints and the SSE event stream as one run transport. */
110
+ /** Mounts create/status/cancel/message JSON endpoints and the SSE event stream as one run transport. */
86
111
  export declare function registerRunRoutes({ app, deps, adapter }: {
87
112
  readonly app: Express;
88
113
  readonly deps: RunHttpDeps;
package/dist/http/runs.js CHANGED
@@ -57,6 +57,23 @@ function parseRunCreate(input) {
57
57
  }
58
58
  });
59
59
  }
60
+ /** Ceiling on one mid-run message, matching what a person can reasonably type or paste into a composer. */
61
+ export const RUN_MESSAGE_MAX_CHARS = 100_000;
62
+ function parseRunMessage(input) {
63
+ const parsedRunId = parseRunId(input);
64
+ if (!parsedRunId.ok)
65
+ return parsedRunId;
66
+ if (!isRecord(input.body))
67
+ return err({ error: validationError({ message: 'body must be a JSON object' }) });
68
+ const text = optionalString(input.body, 'text');
69
+ if (text === undefined || text === null) {
70
+ return err({ error: validationError({ message: 'text must be a non-empty string' }, { issues: [{ path: 'text', message: 'required non-empty string' }] }) });
71
+ }
72
+ if (text.length > RUN_MESSAGE_MAX_CHARS) {
73
+ return err({ error: validationError({ message: `text must be at most ${RUN_MESSAGE_MAX_CHARS} characters` }, { issues: [{ path: 'text', message: 'too long' }] }) });
74
+ }
75
+ return ok({ value: { runId: parsedRunId.value, text } });
76
+ }
60
77
  function parseRunList(input) {
61
78
  const value = input.query.contextRef;
62
79
  if (value === undefined)
@@ -121,6 +138,23 @@ export const runCancelRoute = defineJsonRoute({
121
138
  return ok({ value: { run: await deps.lifecycle.cancel(input) } });
122
139
  }
123
140
  }, { requireSameOrigin: true });
141
+ /**
142
+ * `POST /api/runs/:runId/messages` — a message the human sent while the run is going. `202` when it
143
+ * reached the live agent; `409 CONFLICT` with `details.delivery` (`'unsupported'` or
144
+ * `'not-running'`) when it did not, which tells the client whether to interrupt the run and send the
145
+ * text as the next turn, or simply send it next because the run is already ending.
146
+ */
147
+ export const runMessageRoute = defineJsonRoute({
148
+ method: 'post', path: '/api/runs/:runId/messages', parse: parseRunMessage, handle: async ({ input, deps }) => {
149
+ const run = await deps.lifecycle.get({ runId: input.runId });
150
+ if (run === undefined)
151
+ return err({ error: createApiError({ code: 'NOT_FOUND', message: `run "${input.runId}" was not found` }) });
152
+ const delivery = deps.deliverUserMessage ? await deps.deliverUserMessage({ runId: input.runId, text: input.text }) : 'unsupported';
153
+ if (delivery === 'delivered')
154
+ return ok({ value: { delivery } });
155
+ return err({ error: createApiError({ code: 'CONFLICT', message: `run "${input.runId}" did not take the message` }, { details: { delivery } }) });
156
+ }
157
+ }, { requireSameOrigin: true, successStatus: 202 });
124
158
  function sendStreamFailure(res, kind) {
125
159
  if (kind.kind === 'unknown-run') {
126
160
  sendRawApiError({ res, status: 404, error: createApiError({ code: 'NOT_FOUND', message: 'run was not found' }) });
@@ -210,12 +244,13 @@ export function registerRunEventStream({ app, deps }, _optional = {}) {
210
244
  await handleRunEventStreamRequest({ res, runId, afterCursor: requestedAfterCursor(req), deps });
211
245
  });
212
246
  }
213
- /** Mounts create/status/cancel JSON endpoints and the SSE event stream as one run transport. */
247
+ /** Mounts create/status/cancel/message JSON endpoints and the SSE event stream as one run transport. */
214
248
  export function registerRunRoutes({ app, deps, adapter }, _optional = {}) {
215
249
  mountJsonRoute({ app, spec: runStartRoute, deps, adapter });
216
250
  mountJsonRoute({ app, spec: runListRoute, deps, adapter });
217
251
  mountJsonRoute({ app, spec: runStatusRoute, deps, adapter });
218
252
  mountJsonRoute({ app, spec: runCancelRoute, deps, adapter });
253
+ mountJsonRoute({ app, spec: runMessageRoute, deps, adapter });
219
254
  registerRunEventStream({ app, deps });
220
255
  }
221
256
  //# sourceMappingURL=runs.js.map
@@ -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;
@@ -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;