@nobulex/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/express.d.ts +322 -0
- package/dist/adapters/express.d.ts.map +1 -0
- package/dist/adapters/express.js +356 -0
- package/dist/adapters/express.js.map +1 -0
- package/dist/adapters/index.d.ts +15 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +15 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/langchain.d.ts +183 -0
- package/dist/adapters/langchain.d.ts.map +1 -0
- package/dist/adapters/langchain.js +203 -0
- package/dist/adapters/langchain.js.map +1 -0
- package/dist/adapters/vercel-ai.d.ts +122 -0
- package/dist/adapters/vercel-ai.d.ts.map +1 -0
- package/dist/adapters/vercel-ai.js +128 -0
- package/dist/adapters/vercel-ai.js.map +1 -0
- package/dist/benchmarks.d.ts +164 -0
- package/dist/benchmarks.d.ts.map +1 -0
- package/dist/benchmarks.js +327 -0
- package/dist/benchmarks.js.map +1 -0
- package/dist/benchmarks.test.d.ts +2 -0
- package/dist/benchmarks.test.d.ts.map +1 -0
- package/dist/benchmarks.test.js +71 -0
- package/dist/benchmarks.test.js.map +1 -0
- package/dist/conformance.d.ts +160 -0
- package/dist/conformance.d.ts.map +1 -0
- package/dist/conformance.js +1242 -0
- package/dist/conformance.js.map +1 -0
- package/dist/events.d.ts +176 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +208 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +384 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +695 -0
- package/dist/index.js.map +1 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/index.test.js +986 -0
- package/dist/index.test.js.map +1 -0
- package/dist/middleware.d.ts +104 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +222 -0
- package/dist/middleware.js.map +1 -0
- package/dist/middleware.test.d.ts +5 -0
- package/dist/middleware.test.d.ts.map +1 -0
- package/dist/middleware.test.js +735 -0
- package/dist/middleware.test.js.map +1 -0
- package/dist/plugins/auth.d.ts +49 -0
- package/dist/plugins/auth.d.ts.map +1 -0
- package/dist/plugins/auth.js +82 -0
- package/dist/plugins/auth.js.map +1 -0
- package/dist/plugins/cache.d.ts +40 -0
- package/dist/plugins/cache.d.ts.map +1 -0
- package/dist/plugins/cache.js +191 -0
- package/dist/plugins/cache.js.map +1 -0
- package/dist/plugins/index.d.ts +16 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +12 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/metrics-plugin.d.ts +32 -0
- package/dist/plugins/metrics-plugin.d.ts.map +1 -0
- package/dist/plugins/metrics-plugin.js +61 -0
- package/dist/plugins/metrics-plugin.js.map +1 -0
- package/dist/plugins/plugins.test.d.ts +8 -0
- package/dist/plugins/plugins.test.d.ts.map +1 -0
- package/dist/plugins/plugins.test.js +640 -0
- package/dist/plugins/plugins.test.js.map +1 -0
- package/dist/plugins/retry-plugin.d.ts +55 -0
- package/dist/plugins/retry-plugin.d.ts.map +1 -0
- package/dist/plugins/retry-plugin.js +133 -0
- package/dist/plugins/retry-plugin.js.map +1 -0
- package/dist/telemetry.d.ts +183 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +241 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/types.d.ts +200 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"express.js","sourceRoot":"","sources":["../../src/adapters/express.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAoHpE,gFAAgF;AAEhF;;GAEG;AACH,SAAS,sBAAsB,CAAC,GAAoB;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AAU,KAAK,SAAS;wBAAE,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC;oBACvD,IAAI,GAAG,CAAC,GAAG;wBAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,uCAAuC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;oBAClG,OAAO;gBACT,CAAC;YACH,CAAC;YAED,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;YACpC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;YAExC,OAAO,MAAM;iBACV,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;iBAC1C,IAAI,CAAC,CAAC,MAAwB,EAAE,EAAE;gBACjC,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;oBACrB,IAAI,GAAG,CAAC,SAAS;wBAAE,GAAG,CAAC,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;oBAC7D,IAAI,EAAE,CAAC;gBACT,CAAC;qBAAM,CAAC;oBACN,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;gBACxB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework adapters for the Stele SDK.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all adapter factories and their associated types for
|
|
5
|
+
* Express/HTTP, Vercel AI SDK, and LangChain integrations.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export { steleMiddleware, steleGuardHandler, createCovenantRouter, createWellKnownHandler, kovaGatewayMiddleware, } from './express.js';
|
|
10
|
+
export type { IncomingRequest, OutgoingResponse, NextFunction, SteleMiddlewareOptions, SteleGuardHandlerOptions, CovenantRouterOptions, CovenantRouter, AsyncHandler, WellKnownOptions, KovaGatewayOptions, } from './express.js';
|
|
11
|
+
export { SteleAccessDeniedError, withStele, withSteleTools, createToolGuard, } from './vercel-ai.js';
|
|
12
|
+
export type { ToolLike, SteleToolOptions, } from './vercel-ai.js';
|
|
13
|
+
export { SteleCallbackHandler, withSteleTool, createChainGuard, } from './langchain.js';
|
|
14
|
+
export type { LangChainToolLike, SteleLangChainOptions, CallbackEvent, } from './langchain.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAItB,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,cAAc,EACd,eAAe,GAChB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,QAAQ,EACR,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,GACd,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework adapters for the Stele SDK.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all adapter factories and their associated types for
|
|
5
|
+
* Express/HTTP, Vercel AI SDK, and LangChain integrations.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
// ─── Express / HTTP adapter ──────────────────────────────────────────────────
|
|
10
|
+
export { steleMiddleware, steleGuardHandler, createCovenantRouter, createWellKnownHandler, kovaGatewayMiddleware, } from './express.js';
|
|
11
|
+
// ─── Vercel AI SDK adapter ───────────────────────────────────────────────────
|
|
12
|
+
export { SteleAccessDeniedError, withStele, withSteleTools, createToolGuard, } from './vercel-ai.js';
|
|
13
|
+
// ─── LangChain adapter ──────────────────────────────────────────────────────
|
|
14
|
+
export { SteleCallbackHandler, withSteleTool, createChainGuard, } from './langchain.js';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAEhF,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAetB,gFAAgF;AAEhF,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,cAAc,EACd,eAAe,GAChB,MAAM,gBAAgB,CAAC;AAOxB,+EAA+E;AAE/E,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stele adapter for LangChain.
|
|
3
|
+
*
|
|
4
|
+
* Provides a callback handler that logs agent actions to the Stele
|
|
5
|
+
* audit trail, and tool/chain wrappers that enforce covenant constraints
|
|
6
|
+
* before execution.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { SteleClient, SteleCallbackHandler, withSteleTool } from '@nobulex/sdk';
|
|
13
|
+
*
|
|
14
|
+
* const handler = new SteleCallbackHandler({ client, covenant });
|
|
15
|
+
* const protectedTool = withSteleTool(myTool, { client, covenant });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import type { SteleClient } from '../index.js';
|
|
19
|
+
import type { CovenantDocument } from '@nobulex/core';
|
|
20
|
+
import type { EvaluationResult } from '../types.js';
|
|
21
|
+
export { SteleAccessDeniedError } from './vercel-ai.js';
|
|
22
|
+
/**
|
|
23
|
+
* Minimal tool shape compatible with LangChain's BaseTool.
|
|
24
|
+
*
|
|
25
|
+
* Supports the three method patterns found in the LangChain ecosystem:
|
|
26
|
+
* - `call(input)` -- the public API in LangChain JS
|
|
27
|
+
* - `invoke(input)` -- the LCEL (LangChain Expression Language) API
|
|
28
|
+
* - `_call(input)` -- the internal/protected implementation method
|
|
29
|
+
*/
|
|
30
|
+
export interface LangChainToolLike {
|
|
31
|
+
/** The tool name, used for default action/resource derivation. */
|
|
32
|
+
name: string;
|
|
33
|
+
/** Optional description of what the tool does. */
|
|
34
|
+
description?: string;
|
|
35
|
+
/** LangChain public call method. */
|
|
36
|
+
call?: (input: unknown) => Promise<unknown>;
|
|
37
|
+
/** LCEL invoke method. */
|
|
38
|
+
invoke?: (input: unknown) => Promise<unknown>;
|
|
39
|
+
/** Internal implementation method. */
|
|
40
|
+
_call?: (input: unknown) => Promise<unknown>;
|
|
41
|
+
/** Allow additional properties. */
|
|
42
|
+
[key: string]: unknown;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Options for wrapping LangChain tools with Stele enforcement.
|
|
46
|
+
*/
|
|
47
|
+
export interface SteleLangChainOptions {
|
|
48
|
+
/** The SteleClient instance for covenant evaluation. */
|
|
49
|
+
client: SteleClient;
|
|
50
|
+
/** The covenant document whose constraints are enforced. */
|
|
51
|
+
covenant: CovenantDocument;
|
|
52
|
+
/**
|
|
53
|
+
* Custom function to derive the CCL action string from a tool and its input.
|
|
54
|
+
* Defaults to `tool.name`.
|
|
55
|
+
*/
|
|
56
|
+
actionFromTool?: (tool: LangChainToolLike, input: unknown) => string;
|
|
57
|
+
/**
|
|
58
|
+
* Custom function to derive the CCL resource string from a tool and its input.
|
|
59
|
+
* Defaults to `'/' + tool.name`.
|
|
60
|
+
*/
|
|
61
|
+
resourceFromTool?: (tool: LangChainToolLike, input: unknown) => string;
|
|
62
|
+
/**
|
|
63
|
+
* Custom handler invoked when a tool call is denied. If provided,
|
|
64
|
+
* its return value is returned instead of throwing. If not provided,
|
|
65
|
+
* a `SteleAccessDeniedError` is thrown.
|
|
66
|
+
*/
|
|
67
|
+
onDenied?: (tool: LangChainToolLike, result: EvaluationResult) => unknown;
|
|
68
|
+
}
|
|
69
|
+
/** A recorded event from the SteleCallbackHandler audit trail. */
|
|
70
|
+
export interface CallbackEvent {
|
|
71
|
+
/** The event type (e.g. 'tool:start', 'chain:end', 'tool:error'). */
|
|
72
|
+
type: string;
|
|
73
|
+
/** Payload data associated with the event. */
|
|
74
|
+
data: Record<string, unknown>;
|
|
75
|
+
/** ISO 8601 timestamp of when the event was recorded. */
|
|
76
|
+
timestamp: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A LangChain-compatible callback handler that records agent actions
|
|
80
|
+
* to a Stele audit trail.
|
|
81
|
+
*
|
|
82
|
+
* This handler does not enforce constraints; it only observes and
|
|
83
|
+
* logs. Use it alongside `withSteleTool` for enforcement + auditing.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const handler = new SteleCallbackHandler({ client, covenant });
|
|
88
|
+
* await handler.handleToolStart({ name: 'search' }, 'query');
|
|
89
|
+
* console.log(handler.events); // [{ type: 'tool:start', ... }]
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare class SteleCallbackHandler {
|
|
93
|
+
/** The SteleClient used for event emission. */
|
|
94
|
+
readonly client: SteleClient;
|
|
95
|
+
/** The covenant document being audited. */
|
|
96
|
+
readonly covenant: CovenantDocument;
|
|
97
|
+
/** Ordered list of recorded events. */
|
|
98
|
+
readonly events: CallbackEvent[];
|
|
99
|
+
constructor(options: {
|
|
100
|
+
client: SteleClient;
|
|
101
|
+
covenant: CovenantDocument;
|
|
102
|
+
});
|
|
103
|
+
/**
|
|
104
|
+
* Record a tool invocation start event.
|
|
105
|
+
*
|
|
106
|
+
* @param tool - The tool being invoked.
|
|
107
|
+
* @param input - The input passed to the tool.
|
|
108
|
+
*/
|
|
109
|
+
handleToolStart(tool: {
|
|
110
|
+
name: string;
|
|
111
|
+
}, input: unknown): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Record a tool invocation completion event.
|
|
114
|
+
*
|
|
115
|
+
* @param output - The output produced by the tool.
|
|
116
|
+
*/
|
|
117
|
+
handleToolEnd(output: unknown): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Record a tool invocation error event.
|
|
120
|
+
*
|
|
121
|
+
* @param error - The error that occurred.
|
|
122
|
+
*/
|
|
123
|
+
handleToolError(error: Error): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* Record a chain execution start event.
|
|
126
|
+
*
|
|
127
|
+
* @param chain - The chain being executed.
|
|
128
|
+
* @param inputs - The inputs passed to the chain.
|
|
129
|
+
*/
|
|
130
|
+
handleChainStart(chain: {
|
|
131
|
+
name?: string;
|
|
132
|
+
}, inputs: unknown): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Record a chain execution completion event.
|
|
135
|
+
*
|
|
136
|
+
* @param outputs - The outputs produced by the chain.
|
|
137
|
+
*/
|
|
138
|
+
handleChainEnd(outputs: unknown): Promise<void>;
|
|
139
|
+
/**
|
|
140
|
+
* Record a chain execution error event.
|
|
141
|
+
*
|
|
142
|
+
* @param error - The error that occurred.
|
|
143
|
+
*/
|
|
144
|
+
handleChainError(error: Error): Promise<void>;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Wrap a LangChain-style tool with Stele covenant enforcement.
|
|
148
|
+
*
|
|
149
|
+
* Wraps all three call patterns (`call`, `invoke`, `_call`) when present.
|
|
150
|
+
* Before delegation, evaluates the action/resource against the covenant.
|
|
151
|
+
* If denied, throws a `SteleAccessDeniedError` (or invokes `onDenied`).
|
|
152
|
+
*
|
|
153
|
+
* @param tool - The LangChain tool to wrap.
|
|
154
|
+
* @param options - Enforcement options including client and covenant.
|
|
155
|
+
* @returns A new tool with guarded call methods.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```typescript
|
|
159
|
+
* const protectedTool = withSteleTool(searchTool, { client, covenant });
|
|
160
|
+
* await protectedTool.invoke('my query'); // throws if denied
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
export declare function withSteleTool<T extends LangChainToolLike>(tool: T, options: SteleLangChainOptions): T;
|
|
164
|
+
/**
|
|
165
|
+
* Create a reusable guard for LangChain chain runs.
|
|
166
|
+
*
|
|
167
|
+
* Returns an async function that evaluates the chain name as both
|
|
168
|
+
* the action and resource before delegating to the provided function.
|
|
169
|
+
*
|
|
170
|
+
* @param options - Enforcement options.
|
|
171
|
+
* @returns An async function `(chainName, input, fn) => Promise<unknown>`
|
|
172
|
+
* that enforces the covenant before executing the chain function.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```typescript
|
|
176
|
+
* const guard = createChainGuard({ client, covenant });
|
|
177
|
+
* const result = await guard('read', 'my input', async () => {
|
|
178
|
+
* return runChain();
|
|
179
|
+
* });
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
export declare function createChainGuard(options: SteleLangChainOptions): (chainName: string, input: unknown, fn: () => Promise<unknown>) => Promise<unknown>;
|
|
183
|
+
//# sourceMappingURL=langchain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"langchain.d.ts","sourceRoot":"","sources":["../../src/adapters/langchain.ts"],"names":[],"mappings":"A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AI,EAAE,CAAC,EACP,OAAO,EAAE,qBAAqB,GAC7B,CAAC,CA6CH;AAID;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,qBAAqB,GAC7B,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAyBrF"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stele adapter for LangChain.
|
|
3
|
+
*
|
|
4
|
+
* Provides a callback handler that logs agent actions to the Stele
|
|
5
|
+
* audit trail, and tool/chain wrappers that enforce covenant constraints
|
|
6
|
+
* before execution.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { SteleClient, SteleCallbackHandler, withSteleTool } from '@nobulex/sdk';
|
|
13
|
+
*
|
|
14
|
+
* const handler = new SteleCallbackHandler({ client, covenant });
|
|
15
|
+
* const protectedTool = withSteleTool(myTool, { client, covenant });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import { SteleAccessDeniedError } from './vercel-ai.js';
|
|
19
|
+
// Re-export the shared error so consumers can import from either adapter
|
|
20
|
+
export { SteleAccessDeniedError } from './vercel-ai.js';
|
|
21
|
+
// ─── SteleCallbackHandler ────────────────────────────────────────────────────
|
|
22
|
+
/**
|
|
23
|
+
* A LangChain-compatible callback handler that records agent actions
|
|
24
|
+
* to a Stele audit trail.
|
|
25
|
+
*
|
|
26
|
+
* This handler does not enforce constraints; it only observes and
|
|
27
|
+
* logs. Use it alongside `withSteleTool` for enforcement + auditing.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const handler = new SteleCallbackHandler({ client, covenant });
|
|
32
|
+
* await handler.handleToolStart({ name: 'search' }, 'query');
|
|
33
|
+
* console.log(handler.events); // [{ type: 'tool:start', ... }]
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export class SteleCallbackHandler {
|
|
37
|
+
/** The SteleClient used for event emission. */
|
|
38
|
+
client;
|
|
39
|
+
/** The covenant document being audited. */
|
|
40
|
+
covenant;
|
|
41
|
+
/** Ordered list of recorded events. */
|
|
42
|
+
events = [];
|
|
43
|
+
constructor(options) {
|
|
44
|
+
this.client = options.client;
|
|
45
|
+
this.covenant = options.covenant;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Record a tool invocation start event.
|
|
49
|
+
*
|
|
50
|
+
* @param tool - The tool being invoked.
|
|
51
|
+
* @param input - The input passed to the tool.
|
|
52
|
+
*/
|
|
53
|
+
async handleToolStart(tool, input) {
|
|
54
|
+
this.events.push({
|
|
55
|
+
type: 'tool:start',
|
|
56
|
+
data: { tool: tool.name, input },
|
|
57
|
+
timestamp: new Date().toISOString(),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Record a tool invocation completion event.
|
|
62
|
+
*
|
|
63
|
+
* @param output - The output produced by the tool.
|
|
64
|
+
*/
|
|
65
|
+
async handleToolEnd(output) {
|
|
66
|
+
this.events.push({
|
|
67
|
+
type: 'tool:end',
|
|
68
|
+
data: { output },
|
|
69
|
+
timestamp: new Date().toISOString(),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Record a tool invocation error event.
|
|
74
|
+
*
|
|
75
|
+
* @param error - The error that occurred.
|
|
76
|
+
*/
|
|
77
|
+
async handleToolError(error) {
|
|
78
|
+
this.events.push({
|
|
79
|
+
type: 'tool:error',
|
|
80
|
+
data: { error: error.message },
|
|
81
|
+
timestamp: new Date().toISOString(),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Record a chain execution start event.
|
|
86
|
+
*
|
|
87
|
+
* @param chain - The chain being executed.
|
|
88
|
+
* @param inputs - The inputs passed to the chain.
|
|
89
|
+
*/
|
|
90
|
+
async handleChainStart(chain, inputs) {
|
|
91
|
+
this.events.push({
|
|
92
|
+
type: 'chain:start',
|
|
93
|
+
data: { chain: chain.name, inputs },
|
|
94
|
+
timestamp: new Date().toISOString(),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Record a chain execution completion event.
|
|
99
|
+
*
|
|
100
|
+
* @param outputs - The outputs produced by the chain.
|
|
101
|
+
*/
|
|
102
|
+
async handleChainEnd(outputs) {
|
|
103
|
+
this.events.push({
|
|
104
|
+
type: 'chain:end',
|
|
105
|
+
data: { outputs },
|
|
106
|
+
timestamp: new Date().toISOString(),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Record a chain execution error event.
|
|
111
|
+
*
|
|
112
|
+
* @param error - The error that occurred.
|
|
113
|
+
*/
|
|
114
|
+
async handleChainError(error) {
|
|
115
|
+
this.events.push({
|
|
116
|
+
type: 'chain:error',
|
|
117
|
+
data: { error: error.message },
|
|
118
|
+
timestamp: new Date().toISOString(),
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// ─── withSteleTool ───────────────────────────────────────────────────────────
|
|
123
|
+
/**
|
|
124
|
+
* Wrap a LangChain-style tool with Stele covenant enforcement.
|
|
125
|
+
*
|
|
126
|
+
* Wraps all three call patterns (`call`, `invoke`, `_call`) when present.
|
|
127
|
+
* Before delegation, evaluates the action/resource against the covenant.
|
|
128
|
+
* If denied, throws a `SteleAccessDeniedError` (or invokes `onDenied`).
|
|
129
|
+
*
|
|
130
|
+
* @param tool - The LangChain tool to wrap.
|
|
131
|
+
* @param options - Enforcement options including client and covenant.
|
|
132
|
+
* @returns A new tool with guarded call methods.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* const protectedTool = withSteleTool(searchTool, { client, covenant });
|
|
137
|
+
* await protectedTool.invoke('my query'); // throws if denied
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export function withSteleTool(tool, options) {
|
|
141
|
+
const { client, covenant, actionFromTool, resourceFromTool, onDenied } = options;
|
|
142
|
+
const wrapped = { ...tool };
|
|
143
|
+
const guard = async (input, originalFn) => {
|
|
144
|
+
const action = actionFromTool ? actionFromTool(tool, input) : tool.name;
|
|
145
|
+
const resource = resourceFromTool ? resourceFromTool(tool, input) : '/' + tool.name;
|
|
146
|
+
const result = await client.evaluateAction(covenant, action, resource);
|
|
147
|
+
if (!result.permitted) {
|
|
148
|
+
if (onDenied) {
|
|
149
|
+
return onDenied(tool, result);
|
|
150
|
+
}
|
|
151
|
+
throw new SteleAccessDeniedError(`Action '${action}' on resource '${resource}' denied by covenant`, result);
|
|
152
|
+
}
|
|
153
|
+
return originalFn.call(tool, input);
|
|
154
|
+
};
|
|
155
|
+
if (tool.call) {
|
|
156
|
+
const originalCall = tool.call;
|
|
157
|
+
wrapped.call = (input) => guard(input, originalCall);
|
|
158
|
+
}
|
|
159
|
+
if (tool.invoke) {
|
|
160
|
+
const originalInvoke = tool.invoke;
|
|
161
|
+
wrapped.invoke = (input) => guard(input, originalInvoke);
|
|
162
|
+
}
|
|
163
|
+
if (tool._call) {
|
|
164
|
+
const original_call = tool._call;
|
|
165
|
+
wrapped._call = (input) => guard(input, original_call);
|
|
166
|
+
}
|
|
167
|
+
return wrapped;
|
|
168
|
+
}
|
|
169
|
+
// ─── createChainGuard ────────────────────────────────────────────────────────
|
|
170
|
+
/**
|
|
171
|
+
* Create a reusable guard for LangChain chain runs.
|
|
172
|
+
*
|
|
173
|
+
* Returns an async function that evaluates the chain name as both
|
|
174
|
+
* the action and resource before delegating to the provided function.
|
|
175
|
+
*
|
|
176
|
+
* @param options - Enforcement options.
|
|
177
|
+
* @returns An async function `(chainName, input, fn) => Promise<unknown>`
|
|
178
|
+
* that enforces the covenant before executing the chain function.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```typescript
|
|
182
|
+
* const guard = createChainGuard({ client, covenant });
|
|
183
|
+
* const result = await guard('read', 'my input', async () => {
|
|
184
|
+
* return runChain();
|
|
185
|
+
* });
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
export function createChainGuard(options) {
|
|
189
|
+
const { client, covenant, onDenied } = options;
|
|
190
|
+
return async (chainName, input, fn) => {
|
|
191
|
+
const action = chainName;
|
|
192
|
+
const resource = '/' + chainName;
|
|
193
|
+
const result = await client.evaluateAction(covenant, action, resource);
|
|
194
|
+
if (!result.permitted) {
|
|
195
|
+
if (onDenied) {
|
|
196
|
+
return onDenied({ name: chainName }, result);
|
|
197
|
+
}
|
|
198
|
+
throw new SteleAccessDeniedError(`Chain '${chainName}' on resource '${resource}' denied by covenant`, result);
|
|
199
|
+
}
|
|
200
|
+
return fn();
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=langchain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"langchain.js","sourceRoot":"","sources":["../../src/adapters/langchain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,yEAAyE;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAiExD,gFAAgF;AAEhF;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,oBAAoB;IAC/B,+CAA+C;IACtC,MAAM,CAAc;IAC7B,2CAA2C;IAClC,QAAQ,CAAmB;IACpC,uCAAuC;IAC9B,MAAM,GAAoB,EAAE,CAAC;IAEtC,YAAY,OAA4D;QACtE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CA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E,CAAC;gBACb,OAAO,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAuB,EAAE,MAAM,CAAC,CAAC;YACpE,CAAC;YACD,MAAM,IAAI,sBAAsB,CAC9B,UAAU,SAAS,kBAAkB,QAAQ,sBAAsB,EACnE,MAAM,CACP,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,EAAE,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stele adapter for Vercel AI SDK.
|
|
3
|
+
*
|
|
4
|
+
* Wraps AI SDK tool definitions with covenant enforcement.
|
|
5
|
+
* Before a tool's `execute()` is called, the action/resource pair is
|
|
6
|
+
* evaluated against the covenant's CCL constraints. If denied, a
|
|
7
|
+
* `SteleAccessDeniedError` is thrown (or the custom `onDenied` handler
|
|
8
|
+
* is invoked). If permitted, the original `execute()` runs normally.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { SteleClient, withStele, withSteleTools } from '@nobulex/sdk';
|
|
15
|
+
*
|
|
16
|
+
* const protectedTool = withStele(myTool, { client, covenant });
|
|
17
|
+
* const protectedTools = withSteleTools({ search, browse }, { client, covenant });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
import type { SteleClient } from '../index.js';
|
|
21
|
+
import type { CovenantDocument } from '@nobulex/core';
|
|
22
|
+
import type { EvaluationResult } from '../types.js';
|
|
23
|
+
/**
|
|
24
|
+
* Error thrown when a tool call is denied by a Stele covenant.
|
|
25
|
+
*
|
|
26
|
+
* Carries the full `EvaluationResult` so callers can inspect the
|
|
27
|
+
* matched rule, severity, and reason for the denial.
|
|
28
|
+
*/
|
|
29
|
+
export declare class SteleAccessDeniedError extends Error {
|
|
30
|
+
/** The evaluation result that triggered the denial. */
|
|
31
|
+
readonly evaluationResult: EvaluationResult;
|
|
32
|
+
constructor(message: string, result: EvaluationResult);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Minimal tool shape compatible with the Vercel AI SDK.
|
|
36
|
+
*
|
|
37
|
+
* Only `execute` is required for wrapping; `name` and `description`
|
|
38
|
+
* are used for default action/resource derivation.
|
|
39
|
+
*/
|
|
40
|
+
export interface ToolLike {
|
|
41
|
+
name?: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
execute?: (...args: unknown[]) => Promise<unknown>;
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Options for wrapping Vercel AI SDK tools with Stele enforcement.
|
|
48
|
+
*/
|
|
49
|
+
export interface SteleToolOptions {
|
|
50
|
+
/** The SteleClient instance for covenant evaluation. */
|
|
51
|
+
client: SteleClient;
|
|
52
|
+
/** The covenant document whose constraints are enforced. */
|
|
53
|
+
covenant: CovenantDocument;
|
|
54
|
+
/**
|
|
55
|
+
* Custom function to derive the CCL action string from a tool and its args.
|
|
56
|
+
* Defaults to `tool.name ?? 'execute'`.
|
|
57
|
+
*/
|
|
58
|
+
actionFromTool?: (tool: ToolLike, args: unknown[]) => string;
|
|
59
|
+
/**
|
|
60
|
+
* Custom function to derive the CCL resource string from a tool and its args.
|
|
61
|
+
* Defaults to `'/' + (tool.name ?? 'unknown')`.
|
|
62
|
+
*/
|
|
63
|
+
resourceFromTool?: (tool: ToolLike, args: unknown[]) => string;
|
|
64
|
+
/**
|
|
65
|
+
* Custom handler invoked when a tool call is denied. If provided,
|
|
66
|
+
* its return value is returned instead of throwing. If not provided,
|
|
67
|
+
* a `SteleAccessDeniedError` is thrown.
|
|
68
|
+
*/
|
|
69
|
+
onDenied?: (tool: ToolLike, result: EvaluationResult) => unknown;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Wrap a single Vercel AI SDK tool with Stele covenant enforcement.
|
|
73
|
+
*
|
|
74
|
+
* Returns a new tool object whose `execute()` evaluates the
|
|
75
|
+
* action/resource against the covenant before delegating to the
|
|
76
|
+
* original implementation.
|
|
77
|
+
*
|
|
78
|
+
* @param tool - The tool to wrap.
|
|
79
|
+
* @param options - Enforcement options including client and covenant.
|
|
80
|
+
* @returns A new tool with a guarded `execute()` method.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* const protectedTool = withStele(myTool, { client, covenant });
|
|
85
|
+
* await protectedTool.execute('arg1'); // throws if denied
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare function withStele<T extends ToolLike>(tool: T, options: SteleToolOptions): T;
|
|
89
|
+
/**
|
|
90
|
+
* Wrap an array of tools with Stele covenant enforcement.
|
|
91
|
+
*
|
|
92
|
+
* @param tools - Array of tools to wrap.
|
|
93
|
+
* @param options - Enforcement options.
|
|
94
|
+
* @returns A new array of wrapped tools.
|
|
95
|
+
*/
|
|
96
|
+
export declare function withSteleTools(tools: ToolLike[], options: SteleToolOptions): ToolLike[];
|
|
97
|
+
/**
|
|
98
|
+
* Wrap a record of tools with Stele covenant enforcement.
|
|
99
|
+
*
|
|
100
|
+
* @param tools - Record of named tools to wrap.
|
|
101
|
+
* @param options - Enforcement options.
|
|
102
|
+
* @returns A new record with the same keys and wrapped tool values.
|
|
103
|
+
*/
|
|
104
|
+
export declare function withSteleTools(tools: Record<string, ToolLike>, options: SteleToolOptions): Record<string, ToolLike>;
|
|
105
|
+
/**
|
|
106
|
+
* Create a reusable guard function that enforces a covenant on any tool call.
|
|
107
|
+
*
|
|
108
|
+
* Unlike `withStele` which returns a new tool, `createToolGuard` returns a
|
|
109
|
+
* function you call manually, passing the tool and arguments each time.
|
|
110
|
+
*
|
|
111
|
+
* @param options - Enforcement options.
|
|
112
|
+
* @returns An async function `(tool, ...args) => Promise<unknown>` that
|
|
113
|
+
* evaluates the covenant and delegates to `tool.execute()`.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* const guard = createToolGuard({ client, covenant });
|
|
118
|
+
* const result = await guard(myTool, 'arg1', 'arg2');
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export declare function createToolGuard(options: SteleToolOptions): (tool: ToolLike, ...args: unknown[]) => Promise<unknown>;
|
|
122
|
+
//# sourceMappingURL=vercel-ai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel-ai.d.ts","sourceRoot":"","sources":["../../src/adapters/vercel-ai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,uDAAuD;IACvD,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;gBAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB;CAKtD;AAID;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,MAAM,EAAE,WAAW,CAAC;IACpB,4DAA4D;IAC5D,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,MAAM,CAAC;IAC7D;;;OAGG;IACH,gBAAg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