@jini-ai/http-kit 0.2.1 → 0.3.1
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/dist/agents.d.ts +8 -0
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js.map +1 -1
- package/dist/delegated-tools.d.ts +47 -1
- package/dist/delegated-tools.d.ts.map +1 -1
- package/dist/delegated-tools.js +61 -1
- package/dist/delegated-tools.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +15 -15
- package/LICENSE +0 -201
package/dist/agents.d.ts
CHANGED
|
@@ -36,6 +36,14 @@ export interface AgentSummary {
|
|
|
36
36
|
readonly modelsSource?: 'live' | 'fallback';
|
|
37
37
|
readonly supportsCustomModel?: boolean;
|
|
38
38
|
readonly diagnostic?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether this runtime can receive external MCP servers (Tovu/Jini tools) at all, per
|
|
41
|
+
* `@jini-ai/agent-runtime`'s `runtimeSupportsExternalTools(def)` — the def-level source of
|
|
42
|
+
* truth. `undefined` means the host did not populate this field (pre-existing hosts on an older
|
|
43
|
+
* `@jini-ai/http-kit` continue to omit it); a UI gating on this should treat `undefined` the same
|
|
44
|
+
* as `true` (no known reason to warn) rather than assuming the worst.
|
|
45
|
+
*/
|
|
46
|
+
readonly supportsTools?: boolean;
|
|
39
47
|
}
|
|
40
48
|
export interface AgentsHttpDeps {
|
|
41
49
|
/** Returns the host's cached or freshly resolved client-safe agent inventory. */
|
package/dist/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAmC,KAAK,cAAc,EAAE,MA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E,OAAO,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Express } from 'express';
|
|
2
|
-
import type
|
|
2
|
+
import { type Principal, type ToolRegistry } from '@jini-ai/core';
|
|
3
3
|
import { type RunLifecycle, type ToolExecutionResult, type ToolExecutor } from '@jini-ai/daemon';
|
|
4
4
|
import { type AdapterContext } from './adapter.js';
|
|
5
5
|
export interface DelegatedToolExecuteRequest {
|
|
@@ -7,6 +7,20 @@ export interface DelegatedToolExecuteRequest {
|
|
|
7
7
|
readonly toolUseId: string;
|
|
8
8
|
readonly toolId: string;
|
|
9
9
|
readonly input?: unknown;
|
|
10
|
+
/**
|
|
11
|
+
* When `true`, the call is refused unless `toolId`'s registration declares itself read-only
|
|
12
|
+
* (`@jini-ai/core`'s `isReadOnlyTool`). Set by a caller that has already promised ITS own caller
|
|
13
|
+
* that the surface only reads — `@jini-ai/mcp`'s `execute_readonly_delegated_tool`, whose
|
|
14
|
+
* `readOnlyHint: true` annotation is exactly such a promise.
|
|
15
|
+
*
|
|
16
|
+
* The constraint is enforced HERE rather than in the calling process because only this side can
|
|
17
|
+
* resolve a tool id against the live `ToolRegistry`. A caller-side check would be a claim; this
|
|
18
|
+
* is the fact.
|
|
19
|
+
*
|
|
20
|
+
* Omitted means unconstrained, which is what every existing caller sends — the original
|
|
21
|
+
* `execute_delegated_tool` path is untouched by this field's existence.
|
|
22
|
+
*/
|
|
23
|
+
readonly requireReadOnly?: boolean;
|
|
10
24
|
}
|
|
11
25
|
export interface DelegatedToolExecuteResponse {
|
|
12
26
|
readonly result: ToolExecutionResult;
|
|
@@ -30,7 +44,39 @@ export interface DelegatedToolsHttpDeps {
|
|
|
30
44
|
readonly resolvePrincipal: (request: DelegatedToolExecuteRequest) => Principal | Promise<Principal>;
|
|
31
45
|
/** Host-owned sink for the real exception behind a generic `INTERNAL_ERROR` response (SEC-005). Defaults to `console.error`. */
|
|
32
46
|
readonly onInternalError?: (context: DelegatedToolsInternalErrorContext) => void;
|
|
47
|
+
/**
|
|
48
|
+
* The same `ToolRegistry` `deps.toolExecutor` was built over, supplied so a
|
|
49
|
+
* {@link DelegatedToolExecuteRequest.requireReadOnly} call can be checked against the descriptor
|
|
50
|
+
* that will actually run. Descriptors only — this route never gains a way to reach a handler.
|
|
51
|
+
*
|
|
52
|
+
* Optional so that mounting this route stays a non-breaking one-liner for every host that
|
|
53
|
+
* predates the constraint. A host that omits it does not get a WEAKER gate: a `requireReadOnly`
|
|
54
|
+
* call it cannot verify is refused outright ({@link READ_ONLY_UNVERIFIABLE_MESSAGE}), never
|
|
55
|
+
* waived. Unconstrained calls behave identically with or without it.
|
|
56
|
+
*/
|
|
57
|
+
readonly toolRegistry?: ToolRegistry;
|
|
33
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Refusal text for a `requireReadOnly` call naming a tool that is not registered read-only —
|
|
61
|
+
* including one that is not registered at all, which is the same answer for the same reason
|
|
62
|
+
* (nothing corroborates that it only reads).
|
|
63
|
+
*
|
|
64
|
+
* Names the tool and the remedy, because the caller is a model choosing between two gateways and
|
|
65
|
+
* "denied" alone would leave it guessing which one to try. `describe_tool` already discloses
|
|
66
|
+
* whether an id exists, so distinguishing "unknown" from "writes" here would buy the caller nothing
|
|
67
|
+
* and cost a second message to keep in step.
|
|
68
|
+
*/
|
|
69
|
+
export declare function readOnlyRefusalMessage(toolId: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Refusal text for a `requireReadOnly` call this host has no way to check, because it mounted the
|
|
72
|
+
* route without {@link DelegatedToolsHttpDeps.toolRegistry}.
|
|
73
|
+
*
|
|
74
|
+
* Refusing is the only safe answer: the alternative — running the call because the constraint could
|
|
75
|
+
* not be evaluated — would let a write through a caller that annotated itself read-only, which is
|
|
76
|
+
* strictly worse than having no read-only gateway at all. The message names the missing dep so the
|
|
77
|
+
* fix is one line in the host's own wiring rather than an investigation.
|
|
78
|
+
*/
|
|
79
|
+
export declare const READ_ONLY_UNVERIFIABLE_MESSAGE = "this host cannot verify read-only tools \u2014 POST /api/delegated-tool-calls was mounted without DelegatedToolsHttpDeps.toolRegistry, so a requireReadOnly call cannot be checked and is refused";
|
|
34
80
|
/**
|
|
35
81
|
* `POST /api/delegated-tool-calls` — executes one delegated tool call against an already-started
|
|
36
82
|
* run. Maps `ToolExecutionResult.status` to the HTTP response via `toolExecutionResultToApiResult`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegated-tools.d.ts","sourceRoot":"","sources":["../src/delegated-tools.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"delegated-tools.d.ts","sourceRoot":"","sources":["../src/delegated-tools.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAkB,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAA6B,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5H,OAAO,EAAmC,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAIpF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,MAAM,EAAE,wBAAwB,GAAG,mBAAmB,CAAC;IAChE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,wMAAwM;IACxM,QAAQ,CAAC,gBAAgB,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACpG,gIAAgI;IAChI,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,kCAAkC,KAAK,IAAI,CAAC;IACjF;;;;;;;;;OASG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;CACtC;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,sMACqJ,CAAC;AAwHjM;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,uHAgDpC,CAAC;AAEH,4GAA4G;AAC5G,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAErH"}
|
package/dist/delegated-tools.js
CHANGED
|
@@ -27,10 +27,55 @@
|
|
|
27
27
|
*/
|
|
28
28
|
import { randomUUID } from 'node:crypto';
|
|
29
29
|
import { createApiError } from '@jini-ai/protocol';
|
|
30
|
+
import { isReadOnlyTool } from '@jini-ai/core';
|
|
30
31
|
import { createDelegatedToolBridge } from '@jini-ai/daemon';
|
|
31
32
|
import { defineJsonRoute, mountJsonRoute } from './adapter.js';
|
|
32
33
|
import { validationError } from './request.js';
|
|
33
34
|
import { err, ok } from './types.js';
|
|
35
|
+
/**
|
|
36
|
+
* Refusal text for a `requireReadOnly` call naming a tool that is not registered read-only —
|
|
37
|
+
* including one that is not registered at all, which is the same answer for the same reason
|
|
38
|
+
* (nothing corroborates that it only reads).
|
|
39
|
+
*
|
|
40
|
+
* Names the tool and the remedy, because the caller is a model choosing between two gateways and
|
|
41
|
+
* "denied" alone would leave it guessing which one to try. `describe_tool` already discloses
|
|
42
|
+
* whether an id exists, so distinguishing "unknown" from "writes" here would buy the caller nothing
|
|
43
|
+
* and cost a second message to keep in step.
|
|
44
|
+
*/
|
|
45
|
+
export function readOnlyRefusalMessage(toolId) {
|
|
46
|
+
return `tool "${toolId}" is not registered as read-only — this gateway executes only tools whose registration declares readOnly; call it through execute_delegated_tool instead`;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Refusal text for a `requireReadOnly` call this host has no way to check, because it mounted the
|
|
50
|
+
* route without {@link DelegatedToolsHttpDeps.toolRegistry}.
|
|
51
|
+
*
|
|
52
|
+
* Refusing is the only safe answer: the alternative — running the call because the constraint could
|
|
53
|
+
* not be evaluated — would let a write through a caller that annotated itself read-only, which is
|
|
54
|
+
* strictly worse than having no read-only gateway at all. The message names the missing dep so the
|
|
55
|
+
* fix is one line in the host's own wiring rather than an investigation.
|
|
56
|
+
*/
|
|
57
|
+
export const READ_ONLY_UNVERIFIABLE_MESSAGE = 'this host cannot verify read-only tools — POST /api/delegated-tool-calls was mounted without DelegatedToolsHttpDeps.toolRegistry, so a requireReadOnly call cannot be checked and is refused';
|
|
58
|
+
/**
|
|
59
|
+
* Evaluates a request's read-only constraint against the live registry.
|
|
60
|
+
*
|
|
61
|
+
* @param deps - Supplies the optional `toolRegistry` the check reads.
|
|
62
|
+
* @param input - The parsed request; an absent/false `requireReadOnly` short-circuits to `null`.
|
|
63
|
+
* @returns `null` when the call may proceed, or the `ApiError` to answer with.
|
|
64
|
+
* @complexity O(n) in registered tool count on a constrained call only (`ToolRegistry` exposes
|
|
65
|
+
* enumeration, not lookup by id); O(1) — a single boolean test — on every unconstrained call,
|
|
66
|
+
* which is every call the pre-existing gateway makes.
|
|
67
|
+
*/
|
|
68
|
+
function checkReadOnlyConstraint(deps, input) {
|
|
69
|
+
if (input.requireReadOnly !== true)
|
|
70
|
+
return null;
|
|
71
|
+
if (deps.toolRegistry === undefined) {
|
|
72
|
+
return createApiError('TOOL_OPERATION_DENIED', READ_ONLY_UNVERIFIABLE_MESSAGE);
|
|
73
|
+
}
|
|
74
|
+
const descriptor = deps.toolRegistry.list().find((candidate) => candidate.id === input.toolId);
|
|
75
|
+
if (isReadOnlyTool(descriptor))
|
|
76
|
+
return null;
|
|
77
|
+
return createApiError('TOOL_OPERATION_DENIED', readOnlyRefusalMessage(input.toolId));
|
|
78
|
+
}
|
|
34
79
|
/** Logs the real failure server-side and returns the generic, correlation-id-bearing public error (SEC-005: never the raw exception). */
|
|
35
80
|
function defaultInternalErrorSink(context) {
|
|
36
81
|
// eslint-disable-next-line no-console
|
|
@@ -64,7 +109,15 @@ function parseDelegatedToolExecute(input) {
|
|
|
64
109
|
if (toolId === undefined) {
|
|
65
110
|
return err(validationError('toolId must be a non-empty string', [{ path: 'toolId', message: 'required non-empty string' }]));
|
|
66
111
|
}
|
|
67
|
-
|
|
112
|
+
// Spread-in rather than always-present so an unconstrained body parses to exactly the object it
|
|
113
|
+
// parsed to before this field existed — the existing gateway's request shape is byte-identical,
|
|
114
|
+
// which is what the "additive only" constraint means at the wire.
|
|
115
|
+
//
|
|
116
|
+
// Only a literal `true` arms the constraint. Anything else (absent, `false`, a truthy string) is
|
|
117
|
+
// "unconstrained", never a parse error: this field can only ever TIGHTEN a call, so a malformed
|
|
118
|
+
// value that fell through to the normal gateway is the same outcome as not sending it at all.
|
|
119
|
+
const requireReadOnly = input.body['requireReadOnly'] === true ? { requireReadOnly: true } : {};
|
|
120
|
+
return ok({ runId, toolUseId, toolId, input: input.body.input, ...requireReadOnly });
|
|
68
121
|
}
|
|
69
122
|
/**
|
|
70
123
|
* Maps a settled `ToolExecutionResult` to the wire `Result` — the same status mapping
|
|
@@ -120,6 +173,13 @@ export const delegatedToolExecuteRoute = defineJsonRoute({
|
|
|
120
173
|
if (run === undefined) {
|
|
121
174
|
return err(createApiError('NOT_FOUND', `run "${input.runId}" was not found`));
|
|
122
175
|
}
|
|
176
|
+
// Before `resolvePrincipal`, and long before the bridge: a refused call must cost nothing
|
|
177
|
+
// downstream and must leave no trace of an execution that was never going to happen. It sits
|
|
178
|
+
// after the run-existence check only so that a bad `runId` still answers 404 the way it always
|
|
179
|
+
// did, regardless of the constraint.
|
|
180
|
+
const readOnlyRefusal = checkReadOnlyConstraint(deps, input);
|
|
181
|
+
if (readOnlyRefusal !== null)
|
|
182
|
+
return err(readOnlyRefusal);
|
|
123
183
|
let principal;
|
|
124
184
|
try {
|
|
125
185
|
principal = await deps.resolvePrincipal(input);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegated-tools.js","sourceRoot":"","sources":["../src/delegated-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"delegated-tools.js","sourceRoot":"","sources":["../src/delegated-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAqC,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAkE,MAAM,iBAAiB,CAAC;AAC5H,OAAO,EAAE,eAAe,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AACpF,O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AAyB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export { registerToolCatalogRoutes, toolCatalogDescribeRoute, toolCatalogSearchR
|
|
|
59
59
|
export type { ComponentCatalogEntry, ComponentCatalogHttpDeps, ComponentCatalogQuery, ComponentCatalogSearchHit, } from './component-catalog.js';
|
|
60
60
|
export { registerComponentCatalogRoutes, componentCatalogDescribeRoute, componentCatalogSearchRoute, } from './component-catalog.js';
|
|
61
61
|
export type { DelegatedToolExecuteRequest, DelegatedToolExecuteResponse, DelegatedToolsHttpDeps, DelegatedToolsInternalErrorContext, } from './delegated-tools.js';
|
|
62
|
-
export { delegatedToolExecuteRoute, registerDelegatedToolRoutes } from './delegated-tools.js';
|
|
62
|
+
export { delegatedToolExecuteRoute, readOnlyRefusalMessage, READ_ONLY_UNVERIFIABLE_MESSAGE, registerDelegatedToolRoutes, } from './delegated-tools.js';
|
|
63
63
|
export type { RemoteRunEventHttpDeps, RemoteRunEventResponse, RemoteToolBridgeTokenConfig, RemoteToolResultRequest, RemoteToolUseRequest, } from './remote-run-events.js';
|
|
64
64
|
export { registerRemoteRunEventRoutes, remoteToolResultRoute, remoteToolUseRoute, requireRemoteToolBridgeToken, } from './remote-run-events.js';
|
|
65
65
|
export type { FrontendSessionAttachedEvent, FrontendSessionErrorEvent, FrontendSessionInvocationEvent, FrontendSessionResponseBody, FrontendSessionResponseRequest, FrontendSessionStreamEvent, FrontendSessionsHttpDeps, } from './frontend-sessions.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,YAAY,EACV,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,MAAM,EACN,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAA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pB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,sBAAsB,EACtB,kCAAkC,GACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,YAAY,EACV,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,MAAM,EACN,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAErC,YAAY,EACV,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,iBAAiB,EACjB,aAAa,EACb,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAE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B,4BAA4B,EAC5B,2BAA2B,EAC3B,sBAAsB,EACtB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE5E,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,+BAA+B,EAC/B,eAAe,EACf,wBAAwB,EACxB,gCAAgC,EAChC,0BAA0B,EAC1B,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,qBAAqB,EACrB,WAAW,EACX,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,GACf,MAAM,UAAU,CAAC;AAMlB,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,YAAY,IAAI,kBAAkB,GACnC,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ export { registerRoutineRoutes, routineCreateRoute, routineDeleteRoute, routineG
|
|
|
20
20
|
export { createDaemonDbToolRegistrations, daemonDbInspectRoute, daemonDbVacuumRoute, daemonDbVerifyRoute, DB_INSPECT_TOOL_ID, DB_VACUUM_TOOL_ID, DB_VERIFY_TOOL_ID, denyAllDaemonDbPolicy, registerDaemonDbRoutes, } from './db-ops.js';
|
|
21
21
|
export { registerToolCatalogRoutes, toolCatalogDescribeRoute, toolCatalogSearchRoute, } from './tool-catalog.js';
|
|
22
22
|
export { registerComponentCatalogRoutes, componentCatalogDescribeRoute, componentCatalogSearchRoute, } from './component-catalog.js';
|
|
23
|
-
export { delegatedToolExecuteRoute, registerDelegatedToolRoutes } from './delegated-tools.js';
|
|
23
|
+
export { delegatedToolExecuteRoute, readOnlyRefusalMessage, READ_ONLY_UNVERIFIABLE_MESSAGE, registerDelegatedToolRoutes, } from './delegated-tools.js';
|
|
24
24
|
export { registerRemoteRunEventRoutes, remoteToolResultRoute, remoteToolUseRoute, requireRemoteToolBridgeToken, } from './remote-run-events.js';
|
|
25
25
|
export { FRONTEND_SESSION_RESPONSE_ROUTE_PATH, FRONTEND_SESSION_STREAM_ROUTE_PATH, frontendSessionResponseRoute, handleFrontendSessionStream, parseCapabilityQuery, registerFrontendSessionRoutes, } from './frontend-sessions.js';
|
|
26
26
|
export { createFrontendControl } from './frontend-control.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAMrC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,iBAAiB,EACjB,aAAa,EACb,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,6BAA6B,GAC9B,MAAM,+BAA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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/http-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Composable Express route packs and JSON-route transport for a @jini-ai/core daemon composition: request parsing, response serialization, same-origin guard, and a route-pack registrar.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"access": "public",
|
|
37
37
|
"registry": "https://registry.npmjs.org"
|
|
38
38
|
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"express": "^4.21.0",
|
|
41
|
-
"@jini-ai/core": "0.1.2",
|
|
42
|
-
"@jini-ai/protocol": "0.1.2",
|
|
43
|
-
"@jini-ai/platform": "0.1.2",
|
|
44
|
-
"@jini-ai/daemon": "0.2.1",
|
|
45
|
-
"@jini-ai/agent-runtime": "0.2.1"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@types/express": "^4.17.21",
|
|
49
|
-
"@vitest/coverage-v8": "^2.1.9",
|
|
50
|
-
"@jini-ai/chat": "0.1.0"
|
|
51
|
-
},
|
|
52
39
|
"scripts": {
|
|
53
40
|
"build": "tsc -p tsconfig.json",
|
|
54
41
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
55
42
|
"test": "vitest run",
|
|
56
43
|
"test:coverage": "vitest run --coverage"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@jini-ai/agent-runtime": "workspace:*",
|
|
47
|
+
"@jini-ai/core": "workspace:*",
|
|
48
|
+
"@jini-ai/daemon": "workspace:*",
|
|
49
|
+
"@jini-ai/platform": "workspace:*",
|
|
50
|
+
"@jini-ai/protocol": "workspace:*",
|
|
51
|
+
"express": "^4.21.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@jini-ai/chat": "workspace:*",
|
|
55
|
+
"@types/express": "^4.17.21",
|
|
56
|
+
"@vitest/coverage-v8": "^2.1.9"
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for describing the origin of the Work and
|
|
141
|
-
reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Support. While redistributing the Work or
|
|
166
|
-
Derivative Works thereof, You may choose to offer, and charge a
|
|
167
|
-
fee for, acceptance of support, warranty, indemnity, or other
|
|
168
|
-
liability obligations and/or rights consistent with this License.
|
|
169
|
-
However, in accepting such obligations, You may act only on Your
|
|
170
|
-
own behalf and on Your sole responsibility, not on behalf of any
|
|
171
|
-
other Contributor, and only if You agree to indemnify, defend,
|
|
172
|
-
and hold each Contributor harmless for any liability incurred by,
|
|
173
|
-
or claims asserted against, such Contributor by reason of your
|
|
174
|
-
accepting any such warranty or support.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2026 Open Design contributors
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|