stitchkit 0.99.0 → 0.100.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/CHANGELOG.md +44 -0
- package/dist/agent-runtime/contained-darwin.d.ts +0 -17
- package/dist/agent-runtime/contained-darwin.d.ts.map +1 -1
- package/dist/agent-runtime/contained-write.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-attempt.d.ts +22 -0
- package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -0
- package/dist/agent-runtime/invocation-failure.d.ts +6 -0
- package/dist/agent-runtime/invocation-failure.d.ts.map +1 -0
- package/dist/agent-runtime/invocation-payload.d.ts +18 -0
- package/dist/agent-runtime/invocation-payload.d.ts.map +1 -0
- package/dist/agent-runtime/invocation-read.d.ts +131 -0
- package/dist/agent-runtime/invocation-read.d.ts.map +1 -0
- package/dist/agent-runtime/invocation-schema.d.ts +378 -0
- package/dist/agent-runtime/invocation-schema.d.ts.map +1 -0
- package/dist/agent-runtime/invocations.d.ts +46 -0
- package/dist/agent-runtime/invocations.d.ts.map +1 -0
- package/dist/agent-runtime/run-acquisition.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution-state.d.ts +4 -2
- package/dist/agent-runtime/run-execution-state.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution.d.ts.map +1 -1
- package/dist/agent-runtime/run-failure.d.ts.map +1 -1
- package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -1
- package/dist/agent-runtime/run-operation-lifecycle.d.ts +2 -2
- package/dist/agent-runtime/run-operation-lifecycle.d.ts.map +1 -1
- package/dist/agent-runtime/run-provider-ledger.d.ts +1 -0
- package/dist/agent-runtime/run-provider-ledger.d.ts.map +1 -1
- package/dist/agent-runtime/runtime.d.ts +11 -0
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/store-create.d.ts.map +1 -1
- package/dist/agent-runtime/store-event-once.d.ts +29 -0
- package/dist/agent-runtime/store-event-once.d.ts.map +1 -0
- package/dist/agent-runtime/store.d.ts +5 -0
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/application/change-subscription.d.ts +36 -0
- package/dist/application/change-subscription.d.ts.map +1 -0
- package/dist/application/diagnostic-journal-contract.d.ts +3 -6
- package/dist/application/diagnostic-journal-contract.d.ts.map +1 -1
- package/dist/application/notification-delivery.d.ts +32 -0
- package/dist/application/notification-delivery.d.ts.map +1 -0
- package/dist/application/notification-outbox-state.d.ts +37 -0
- package/dist/application/notification-outbox-state.d.ts.map +1 -0
- package/dist/application/notification-outbox.d.ts +7 -1
- package/dist/application/notification-outbox.d.ts.map +1 -1
- package/dist/application/watch-hub-core.d.ts +10 -15
- package/dist/application/watch-hub-core.d.ts.map +1 -1
- package/dist/application/watch-hub.d.ts +10 -2
- package/dist/application/watch-hub.d.ts.map +1 -1
- package/dist/browser/session-credentials.d.ts +20 -0
- package/dist/browser/session-credentials.d.ts.map +1 -0
- package/dist/browser/session.d.ts +31 -0
- package/dist/browser/session.d.ts.map +1 -0
- package/dist/durability/events.d.ts +6 -0
- package/dist/durability/events.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +3 -2
- package/dist/entrypoints/agent-runtime/harness.js +5 -3
- package/dist/entrypoints/agent-runtime/sandbox.js +3 -2
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
- package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
- package/dist/entrypoints/agent-runtime/testing.js +3 -3
- package/dist/entrypoints/agent-runtime.d.ts +3 -0
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +15 -4
- package/dist/entrypoints/application/diagnostic-journal.js +2 -1
- package/dist/entrypoints/application.d.ts +3 -1
- package/dist/entrypoints/application.d.ts.map +1 -1
- package/dist/entrypoints/application.js +629 -189
- package/dist/entrypoints/files.js +2 -1
- package/dist/entrypoints/index.d.ts +2 -0
- package/dist/entrypoints/index.d.ts.map +1 -1
- package/dist/entrypoints/index.js +172 -0
- package/dist/entrypoints/live.js +68 -13
- package/dist/entrypoints/react.d.ts +1 -1
- package/dist/entrypoints/react.d.ts.map +1 -1
- package/dist/entrypoints/react.js +59 -16
- package/dist/{index-wsm5w4ee.js → index-0b1cnze2.js} +35 -3
- package/dist/{index-gxrt5h6v.js → index-cyktc4bp.js} +3 -0
- package/dist/{index-px2gm2jp.js → index-fhwqwxe0.js} +17 -55
- package/dist/{index-e4hkgm5t.js → index-gw8bmyaj.js} +4 -2
- package/dist/{index-8p52kd5p.js → index-js7gqrb1.js} +96 -14
- package/dist/{index-wt743f7f.js → index-k6gpggb9.js} +2 -1
- package/dist/index-q3pyb9n0.js +22 -0
- package/dist/{index-sp1tzwnb.js → index-s84he4v7.js} +2 -2
- package/dist/{index-jhx828hc.js → index-xwhjjw2x.js} +878 -279
- package/dist/{index-1m2thnq0.js → index-y9qn426m.js} +2 -2
- package/dist/index-zjjyynm3.js +42 -0
- package/dist/internal/coalesced-task.d.ts +15 -0
- package/dist/internal/coalesced-task.d.ts.map +1 -0
- package/dist/internal/darwin-binding.d.ts +19 -0
- package/dist/internal/darwin-binding.d.ts.map +1 -0
- package/dist/internal/exclusive-lock.d.ts +20 -7
- package/dist/internal/exclusive-lock.d.ts.map +1 -1
- package/dist/internal/mutation-queue.d.ts +4 -0
- package/dist/internal/mutation-queue.d.ts.map +1 -0
- package/dist/internal/process-identity.d.ts +1 -1
- package/dist/internal/process-identity.d.ts.map +1 -1
- package/dist/internal/process-instance.d.ts +26 -0
- package/dist/internal/process-instance.d.ts.map +1 -0
- package/dist/live/watch-client-state.d.ts +71 -0
- package/dist/live/watch-client-state.d.ts.map +1 -0
- package/dist/live/watch-client.d.ts +5 -1
- package/dist/live/watch-client.d.ts.map +1 -1
- package/dist/live/watch-contract.d.ts +12 -0
- package/dist/live/watch-contract.d.ts.map +1 -1
- package/dist/react/cache-bridge.d.ts +10 -0
- package/dist/react/cache-bridge.d.ts.map +1 -1
- package/llms/agent-runtime.2.txt +94 -0
- package/llms/agent-runtime.3.txt +24 -0
- package/llms/application.2.txt +68 -2
- package/llms/application.txt +32 -2
- package/llms/files.txt +1 -1
- package/llms/live.txt +7 -0
- package/llms/react.txt +8 -0
- package/llms/server.3.txt +35 -0
- package/llms/stitchkit.2.txt +41 -0
- package/llms/stitchkit.3.txt +22 -0
- package/llms/stitchkit.txt +3 -3
- package/llms/upgrading-0.37.0.txt +176 -0
- package/llms/{upgrading-0.37.0-0.58.0.txt → upgrading-0.44.0-0.60.0.txt} +229 -169
- package/llms/{upgrading-0.59.0-0.71.0.txt → upgrading-0.61.0-0.73.0.txt} +122 -229
- package/llms/{upgrading-0.72.0-0.99.0.txt → upgrading-0.74.0-0.100.0.txt} +67 -122
- package/llms/upgrading.txt +4 -3
- package/llms-full.txt +393 -6
- package/llms.txt +10 -9
- package/native/darwin-arm64.node +0 -0
- package/native/darwin-x64.node +0 -0
- package/package.json +1 -1
- package/dist/agent-runtime/run-mutation-queue.d.ts +0 -21
- package/dist/agent-runtime/run-mutation-queue.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,50 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.100.0] — 2026-09-28
|
|
19
|
+
|
|
20
|
+
### ⚠️ Breaking changes
|
|
21
|
+
|
|
22
|
+
- `stitchkit/application`, `stitchkit/live` — watched reads now enforce finite
|
|
23
|
+
capacity by default: 1024 hub sources, 1024 hub subscribers, 1024 client keys
|
|
24
|
+
and 128 listeners per key. Excess admission is refused instead of retaining
|
|
25
|
+
unbounded state. Before: `createWatchHub({ read, watchable })` admitted an
|
|
26
|
+
unlimited number of hub sources/subscribers. After, for a larger workload:
|
|
27
|
+
`createWatchHub({ read, watchable, maxSources: 4096, maxSubscribers: 4096 })`.
|
|
28
|
+
Set `maxKeys` and `maxListenersPerKey` on `createWatchClient` when needed.
|
|
29
|
+
See ADR 0208 and the 0.100.0 migration in `docs/guide/upgrading.md`.
|
|
30
|
+
|
|
31
|
+
**Who must act:** watch consumers whose hub or client exceeds these defaults.
|
|
32
|
+
Choose explicit finite limits for the expected workload. Other consumers may
|
|
33
|
+
keep their existing configuration; new session and delivery APIs are opt-in.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- `stitchkit` — `createSessionScope` fences requests and final delivery by login
|
|
38
|
+
lifetime; `createSessionCredentials` coordinates refresh and credential writes.
|
|
39
|
+
- `stitchkit/application` — managed change subscriptions with bounded keys,
|
|
40
|
+
reconnect and periodic reconciliation; watch admission scopes and capacity limits;
|
|
41
|
+
optional outbox action checkpoints and a separate projection receipt.
|
|
42
|
+
- `stitchkit/live`, `stitchkit/react` — session-scoped watch instances and explicit
|
|
43
|
+
watched-handle/cache bindings. Hub reconciliation can repair lost hints without
|
|
44
|
+
reconnect. Existing non-session watches and single-send outboxes remain supported.
|
|
45
|
+
|
|
46
|
+
- `stitchkit/agent-runtime` — public `createModelInvocationLedger` for plain text
|
|
47
|
+
completions and shared agent provider receipts, with atomic idempotent admission,
|
|
48
|
+
verified caller context, explicit fallback attempts, transport correlation IDs,
|
|
49
|
+
provenance-aware usage and encrypted payload artifacts in the existing store.
|
|
50
|
+
Opt in with the runtime `invocations` option. See ADR 0206 and the
|
|
51
|
+
[migration example](docs/guide/agent-runtime.md#plain-completions-and-shared-invocation-receipts).
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
|
|
55
|
+
- `stitchkit/files`, `stitchkit/application` — exclusive locks and journal reclaim
|
|
56
|
+
guards identify the owning boot and process lifetime, so a PID reused after a
|
|
57
|
+
crash or reboot no longer impersonates an abandoned owner. Linux uses proc
|
|
58
|
+
start ticks and namespaces; macOS uses the packaged native kernel probe.
|
|
59
|
+
Unknown identity refuses takeover. Legacy records retain conservative PID
|
|
60
|
+
checks and require operator recovery when a live PID has been reused. See ADR 0210.
|
|
61
|
+
|
|
18
62
|
## [0.99.0] — 2026-09-27
|
|
19
63
|
|
|
20
64
|
### ⚠️ Breaking changes
|
|
@@ -5,27 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type Stats } from 'node:fs';
|
|
7
7
|
import type { ContainedFileHandle } from './contained-files.js';
|
|
8
|
-
export interface DarwinEntry {
|
|
9
|
-
name: string;
|
|
10
|
-
mode: number;
|
|
11
|
-
size: number;
|
|
12
|
-
}
|
|
13
|
-
export interface DarwinBinding {
|
|
14
|
-
openDirectoryAt(directory: number, name: string): number;
|
|
15
|
-
openFileAt(directory: number, name: string): number;
|
|
16
|
-
createFileAt(directory: number, name: string, mode: number): number;
|
|
17
|
-
createDirectoryAt(directory: number, name: string, mode: number): boolean;
|
|
18
|
-
statAt(directory: number, name: string): Omit<DarwinEntry, 'name'> | null;
|
|
19
|
-
listAt(directory: number): readonly DarwinEntry[];
|
|
20
|
-
renameAt(directory: number, source: string, target: string): void;
|
|
21
|
-
unlinkAt(directory: number, name: string): void;
|
|
22
|
-
}
|
|
23
8
|
export declare const FILE_TYPE_DIRECTORY = 16384;
|
|
24
9
|
export declare const FILE_TYPE_REGULAR = 32768;
|
|
25
10
|
export declare const FILE_TYPE_SYMLINK = 40960;
|
|
26
11
|
export declare function modeIs(mode: number, type: number): boolean;
|
|
27
|
-
export declare function hasFunctions(value: unknown, names: readonly string[]): boolean;
|
|
28
|
-
export declare function loadDarwinBinding(): DarwinBinding;
|
|
29
12
|
export declare class NumericFileHandle implements ContainedFileHandle {
|
|
30
13
|
readonly fd: number;
|
|
31
14
|
constructor(fd: number);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contained-darwin.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/contained-darwin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"contained-darwin.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/contained-darwin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA2D,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,eAAO,MAAM,mBAAmB,QAAW,CAAC;AAC5C,eAAO,MAAM,iBAAiB,QAAW,CAAC;AAC1C,eAAO,MAAM,iBAAiB,QAAW,CAAC;AAE1C,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,qBAAa,iBAAkB,YAAW,mBAAmB;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM;IAA/B,YAAqB,EAAE,EAAE,MAAM,EAAI;IAEnC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAIrB;IAED,IAAI,CACF,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAMhC;IAED,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAIrB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contained-write.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/contained-write.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contained-write.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/contained-write.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,mBAAmB,CAAC;AAsD3B,0FAA0F;AAC1F,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAC9C,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,IAAI,CAAC,CAsChB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type LanguageModel } from 'ai';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import type { createInvocationPayloads } from './invocation-payload.js';
|
|
4
|
+
import type { InvocationProcessSchema, ModelInvocationAttemptContext, ModelInvocationRecord } from './invocation-schema.js';
|
|
5
|
+
import type { AgentResolvedModel } from './models.js';
|
|
6
|
+
/** Available inside the provider's fetch/transport; no time/model-name correlation. */
|
|
7
|
+
export declare function currentModelInvocationAttempt(): ModelInvocationAttemptContext | undefined;
|
|
8
|
+
export interface InvocationAttemptWriter {
|
|
9
|
+
identity: {
|
|
10
|
+
conversationId: string;
|
|
11
|
+
invocationId: string;
|
|
12
|
+
operationId: string;
|
|
13
|
+
runId?: string;
|
|
14
|
+
};
|
|
15
|
+
process: z.infer<typeof InvocationProcessSchema>;
|
|
16
|
+
payloads: ReturnType<typeof createInvocationPayloads>;
|
|
17
|
+
append(record: ModelInvocationRecord): Promise<void>;
|
|
18
|
+
onAttempt?(context: ModelInvocationAttemptContext): void | Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
/** The single audited provider boundary, used by completion and the existing agent loop. */
|
|
21
|
+
export declare function wrapInvocationModel(writer: InvocationAttemptWriter, selected: AgentResolvedModel, step: number, model?: LanguageModel): LanguageModel;
|
|
22
|
+
//# sourceMappingURL=invocation-attempt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-attempt.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/invocation-attempt.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAmD,MAAM,IAAI,CAAC;AACzF,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AASnD,uFAAuF;AACvF,wBAAgB,6BAA6B,IAAI,6BAA6B,GAAG,SAAS,CAGzF;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE;QACR,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;IACjD,QAAQ,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;IACtD,MAAM,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,SAAS,CAAC,CAAC,OAAO,EAAE,6BAA6B,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E;AAED,4FAA4F;AAC5F,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,uBAAuB,EAC/B,QAAQ,EAAE,kBAAkB,EAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,aAA8B,GACpC,aAAa,CAsLf"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Receipt/storage/audit refusals belong to the runtime, never to the upstream provider. */
|
|
2
|
+
export declare class InvocationReceiptError extends Error {
|
|
3
|
+
constructor(cause: unknown);
|
|
4
|
+
}
|
|
5
|
+
export declare function invocationAudit<T>(work: () => Promise<T>): Promise<T>;
|
|
6
|
+
//# sourceMappingURL=invocation-failure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-failure.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/invocation-failure.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,KAAK,EAAE,OAAO,EAGzB;CACF;AACD,wBAAsB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAM3E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { AgentRuntimeStore } from './store.js';
|
|
3
|
+
/** Serialize SDK payloads at the typed external boundary, retaining binary bytes privately. */
|
|
4
|
+
export declare function invocationJson(value: unknown): z.JSONType;
|
|
5
|
+
export declare function invocationHash(value: unknown): string;
|
|
6
|
+
export declare function createInvocationPayloads(store: AgentRuntimeStore, key: Uint8Array, maxBytes: number): {
|
|
7
|
+
write(identity: {
|
|
8
|
+
conversationId: string;
|
|
9
|
+
invocationId: string;
|
|
10
|
+
operationId: string;
|
|
11
|
+
runId?: string;
|
|
12
|
+
}, value: unknown): Promise<{
|
|
13
|
+
artifactId: `${string}-${string}-${string}-${string}-${string}`;
|
|
14
|
+
sha256: string;
|
|
15
|
+
}>;
|
|
16
|
+
decrypt(conversationId: string, value: unknown): z.JSONType;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=invocation-payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-payload.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/invocation-payload.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,+FAA+F;AAC/F,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,cAc5C;AACD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIrD;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EACxB,GAAG,EAAE,UAAU,EACf,QAAQ,EAAE,MAAM;IAMR,KAAK,WACC;QACR,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,SACM,OAAO;;;;IA+BhB,OAAO,iBAAiB,MAAM,SAAS,OAAO;EAgCjD"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { createInvocationPayloads } from './invocation-payload.js';
|
|
3
|
+
import type { AgentRuntimeStore } from './store.js';
|
|
4
|
+
export declare const InvocationReadInputSchema: z.ZodObject<{
|
|
5
|
+
conversationId: z.ZodString;
|
|
6
|
+
fromSeq: z.ZodOptional<z.ZodInt>;
|
|
7
|
+
limit: z.ZodInt;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export declare function readInvocationRecords(store: AgentRuntimeStore, input: z.infer<typeof InvocationReadInputSchema>): Promise<{
|
|
10
|
+
items: {
|
|
11
|
+
seq: number;
|
|
12
|
+
occurredAt: string;
|
|
13
|
+
record: {
|
|
14
|
+
conversationId: string;
|
|
15
|
+
invocationId: string;
|
|
16
|
+
operationId: string;
|
|
17
|
+
runId?: string | undefined;
|
|
18
|
+
type: "invocation/started";
|
|
19
|
+
mode: "agent" | "completion";
|
|
20
|
+
trace: {
|
|
21
|
+
operationId: string;
|
|
22
|
+
purpose: string;
|
|
23
|
+
project: string;
|
|
24
|
+
parent?: {
|
|
25
|
+
traceId: string;
|
|
26
|
+
invocationId?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
experiment?: string | undefined;
|
|
29
|
+
case?: string | undefined;
|
|
30
|
+
profile?: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
caller: {
|
|
33
|
+
subject: string;
|
|
34
|
+
};
|
|
35
|
+
executingProcess: {
|
|
36
|
+
instanceId: string;
|
|
37
|
+
pid: number;
|
|
38
|
+
hostname: string;
|
|
39
|
+
};
|
|
40
|
+
fingerprint: string;
|
|
41
|
+
requested: {
|
|
42
|
+
models: string[];
|
|
43
|
+
payloadSha256: string;
|
|
44
|
+
};
|
|
45
|
+
} | {
|
|
46
|
+
conversationId: string;
|
|
47
|
+
invocationId: string;
|
|
48
|
+
operationId: string;
|
|
49
|
+
runId?: string | undefined;
|
|
50
|
+
attemptId: string;
|
|
51
|
+
step: number;
|
|
52
|
+
type: "provider/request";
|
|
53
|
+
requested: {
|
|
54
|
+
modelId: string;
|
|
55
|
+
provider: string;
|
|
56
|
+
};
|
|
57
|
+
executingProcess: {
|
|
58
|
+
instanceId: string;
|
|
59
|
+
pid: number;
|
|
60
|
+
hostname: string;
|
|
61
|
+
};
|
|
62
|
+
sent: {
|
|
63
|
+
modelId: string;
|
|
64
|
+
provider: string;
|
|
65
|
+
payloadSha256: string;
|
|
66
|
+
artifactId: string;
|
|
67
|
+
tools: number;
|
|
68
|
+
};
|
|
69
|
+
} | {
|
|
70
|
+
conversationId: string;
|
|
71
|
+
invocationId: string;
|
|
72
|
+
operationId: string;
|
|
73
|
+
runId?: string | undefined;
|
|
74
|
+
attemptId: string;
|
|
75
|
+
step: number;
|
|
76
|
+
type: "provider/response";
|
|
77
|
+
status: "cancelled" | "failed" | "succeeded";
|
|
78
|
+
effective: {
|
|
79
|
+
provider: string | null;
|
|
80
|
+
modelId: string | null;
|
|
81
|
+
responseId: string | null;
|
|
82
|
+
};
|
|
83
|
+
usage: {
|
|
84
|
+
inputTokens: {
|
|
85
|
+
value?: number | undefined;
|
|
86
|
+
provenance: "computed" | "estimated" | "provider-reported" | "unavailable";
|
|
87
|
+
};
|
|
88
|
+
outputTokens: {
|
|
89
|
+
value?: number | undefined;
|
|
90
|
+
provenance: "computed" | "estimated" | "provider-reported" | "unavailable";
|
|
91
|
+
};
|
|
92
|
+
reasoningTokens?: {
|
|
93
|
+
value?: number | undefined;
|
|
94
|
+
provenance: "computed" | "estimated" | "provider-reported" | "unavailable";
|
|
95
|
+
} | undefined;
|
|
96
|
+
cacheReadTokens?: {
|
|
97
|
+
value?: number | undefined;
|
|
98
|
+
provenance: "computed" | "estimated" | "provider-reported" | "unavailable";
|
|
99
|
+
} | undefined;
|
|
100
|
+
cacheWriteTokens?: {
|
|
101
|
+
value?: number | undefined;
|
|
102
|
+
provenance: "computed" | "estimated" | "provider-reported" | "unavailable";
|
|
103
|
+
} | undefined;
|
|
104
|
+
cost?: {
|
|
105
|
+
value?: number | undefined;
|
|
106
|
+
currency?: string | undefined;
|
|
107
|
+
provenance: "computed" | "estimated" | "provider-reported" | "unavailable";
|
|
108
|
+
} | undefined;
|
|
109
|
+
};
|
|
110
|
+
artifactId: string;
|
|
111
|
+
payloadSha256: string;
|
|
112
|
+
} | {
|
|
113
|
+
conversationId: string;
|
|
114
|
+
invocationId: string;
|
|
115
|
+
operationId: string;
|
|
116
|
+
runId?: string | undefined;
|
|
117
|
+
type: "invocation/finished";
|
|
118
|
+
failure?: {
|
|
119
|
+
artifactId: string;
|
|
120
|
+
payloadSha256: string;
|
|
121
|
+
} | undefined;
|
|
122
|
+
status: "cancelled" | "failed" | "succeeded";
|
|
123
|
+
};
|
|
124
|
+
}[];
|
|
125
|
+
nextSeq?: number | undefined;
|
|
126
|
+
}>;
|
|
127
|
+
export declare function readInvocationPayload(store: AgentRuntimeStore, payloads: ReturnType<typeof createInvocationPayloads>, input: {
|
|
128
|
+
conversationId: string;
|
|
129
|
+
artifactId: string;
|
|
130
|
+
}): Promise<z.JSONType>;
|
|
131
|
+
//# sourceMappingURL=invocation-read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-read.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/invocation-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,yBAAyB;;;;kBAM3B,CAAC;AAEZ,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,iBAAiB,EACxB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BjD;AAED,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,iBAAiB,EACxB,QAAQ,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,EACrD,KAAK,EAAE;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,uBAkBtD"}
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ModelInvocationTraceSchema: z.ZodObject<{
|
|
3
|
+
operationId: z.ZodString;
|
|
4
|
+
purpose: z.ZodString;
|
|
5
|
+
project: z.ZodString;
|
|
6
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
7
|
+
traceId: z.ZodString;
|
|
8
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strict>>;
|
|
10
|
+
experiment: z.ZodOptional<z.ZodString>;
|
|
11
|
+
case: z.ZodOptional<z.ZodString>;
|
|
12
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type ModelInvocationTrace = z.infer<typeof ModelInvocationTraceSchema>;
|
|
15
|
+
export declare const CompletionInvocationInputSchema: z.ZodObject<{
|
|
16
|
+
conversationId: z.ZodString;
|
|
17
|
+
idempotencyKey: z.ZodString;
|
|
18
|
+
trace: z.ZodObject<{
|
|
19
|
+
operationId: z.ZodString;
|
|
20
|
+
purpose: z.ZodString;
|
|
21
|
+
project: z.ZodString;
|
|
22
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
traceId: z.ZodString;
|
|
24
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strict>>;
|
|
26
|
+
experiment: z.ZodOptional<z.ZodString>;
|
|
27
|
+
case: z.ZodOptional<z.ZodString>;
|
|
28
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
prompt: z.ZodString;
|
|
31
|
+
models: z.ZodArray<z.ZodString>;
|
|
32
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
maxOutputTokens: z.ZodOptional<z.ZodInt>;
|
|
34
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
seed: z.ZodOptional<z.ZodInt>;
|
|
37
|
+
}, z.core.$strict>>;
|
|
38
|
+
timeoutMs: z.ZodInt;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
export type CompletionInvocationInput = z.infer<typeof CompletionInvocationInputSchema>;
|
|
41
|
+
export declare const InvocationCallerSchema: z.ZodObject<{
|
|
42
|
+
subject: z.ZodString;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
export declare const InvocationProcessSchema: z.ZodObject<{
|
|
45
|
+
instanceId: z.ZodString;
|
|
46
|
+
pid: z.ZodInt;
|
|
47
|
+
hostname: z.ZodString;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
export declare const InvocationStartedSchema: z.ZodObject<{
|
|
50
|
+
conversationId: z.ZodString;
|
|
51
|
+
invocationId: z.ZodString;
|
|
52
|
+
operationId: z.ZodString;
|
|
53
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
54
|
+
type: z.ZodLiteral<"invocation/started">;
|
|
55
|
+
mode: z.ZodEnum<{
|
|
56
|
+
agent: "agent";
|
|
57
|
+
completion: "completion";
|
|
58
|
+
}>;
|
|
59
|
+
trace: z.ZodObject<{
|
|
60
|
+
operationId: z.ZodString;
|
|
61
|
+
purpose: z.ZodString;
|
|
62
|
+
project: z.ZodString;
|
|
63
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
traceId: z.ZodString;
|
|
65
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, z.core.$strict>>;
|
|
67
|
+
experiment: z.ZodOptional<z.ZodString>;
|
|
68
|
+
case: z.ZodOptional<z.ZodString>;
|
|
69
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strict>;
|
|
71
|
+
caller: z.ZodObject<{
|
|
72
|
+
subject: z.ZodString;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
executingProcess: z.ZodObject<{
|
|
75
|
+
instanceId: z.ZodString;
|
|
76
|
+
pid: z.ZodInt;
|
|
77
|
+
hostname: z.ZodString;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
fingerprint: z.ZodString;
|
|
80
|
+
requested: z.ZodObject<{
|
|
81
|
+
models: z.ZodArray<z.ZodString>;
|
|
82
|
+
payloadSha256: z.ZodString;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
export declare const InvocationAttemptContextSchema: z.ZodObject<{
|
|
86
|
+
conversationId: z.ZodString;
|
|
87
|
+
invocationId: z.ZodString;
|
|
88
|
+
operationId: z.ZodString;
|
|
89
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
90
|
+
attemptId: z.ZodString;
|
|
91
|
+
step: z.ZodInt;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
export type ModelInvocationAttemptContext = z.infer<typeof InvocationAttemptContextSchema>;
|
|
94
|
+
export declare const InvocationRequestSchema: z.ZodObject<{
|
|
95
|
+
conversationId: z.ZodString;
|
|
96
|
+
invocationId: z.ZodString;
|
|
97
|
+
operationId: z.ZodString;
|
|
98
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
99
|
+
attemptId: z.ZodString;
|
|
100
|
+
step: z.ZodInt;
|
|
101
|
+
type: z.ZodLiteral<"provider/request">;
|
|
102
|
+
requested: z.ZodObject<{
|
|
103
|
+
modelId: z.ZodString;
|
|
104
|
+
provider: z.ZodString;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
executingProcess: z.ZodObject<{
|
|
107
|
+
instanceId: z.ZodString;
|
|
108
|
+
pid: z.ZodInt;
|
|
109
|
+
hostname: z.ZodString;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
sent: z.ZodObject<{
|
|
112
|
+
modelId: z.ZodString;
|
|
113
|
+
provider: z.ZodString;
|
|
114
|
+
payloadSha256: z.ZodString;
|
|
115
|
+
artifactId: z.ZodString;
|
|
116
|
+
tools: z.ZodInt;
|
|
117
|
+
}, z.core.$strict>;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
export declare const InvocationResponseSchema: z.ZodObject<{
|
|
120
|
+
conversationId: z.ZodString;
|
|
121
|
+
invocationId: z.ZodString;
|
|
122
|
+
operationId: z.ZodString;
|
|
123
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
124
|
+
attemptId: z.ZodString;
|
|
125
|
+
step: z.ZodInt;
|
|
126
|
+
type: z.ZodLiteral<"provider/response">;
|
|
127
|
+
status: z.ZodEnum<{
|
|
128
|
+
cancelled: "cancelled";
|
|
129
|
+
failed: "failed";
|
|
130
|
+
succeeded: "succeeded";
|
|
131
|
+
}>;
|
|
132
|
+
effective: z.ZodObject<{
|
|
133
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
134
|
+
modelId: z.ZodNullable<z.ZodString>;
|
|
135
|
+
responseId: z.ZodNullable<z.ZodString>;
|
|
136
|
+
}, z.core.$strict>;
|
|
137
|
+
usage: z.ZodObject<{
|
|
138
|
+
inputTokens: z.ZodObject<{
|
|
139
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
140
|
+
provenance: z.ZodEnum<{
|
|
141
|
+
computed: "computed";
|
|
142
|
+
estimated: "estimated";
|
|
143
|
+
"provider-reported": "provider-reported";
|
|
144
|
+
unavailable: "unavailable";
|
|
145
|
+
}>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
outputTokens: z.ZodObject<{
|
|
148
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
149
|
+
provenance: z.ZodEnum<{
|
|
150
|
+
computed: "computed";
|
|
151
|
+
estimated: "estimated";
|
|
152
|
+
"provider-reported": "provider-reported";
|
|
153
|
+
unavailable: "unavailable";
|
|
154
|
+
}>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
reasoningTokens: z.ZodOptional<z.ZodObject<{
|
|
157
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
158
|
+
provenance: z.ZodEnum<{
|
|
159
|
+
computed: "computed";
|
|
160
|
+
estimated: "estimated";
|
|
161
|
+
"provider-reported": "provider-reported";
|
|
162
|
+
unavailable: "unavailable";
|
|
163
|
+
}>;
|
|
164
|
+
}, z.core.$strip>>;
|
|
165
|
+
cacheReadTokens: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
167
|
+
provenance: z.ZodEnum<{
|
|
168
|
+
computed: "computed";
|
|
169
|
+
estimated: "estimated";
|
|
170
|
+
"provider-reported": "provider-reported";
|
|
171
|
+
unavailable: "unavailable";
|
|
172
|
+
}>;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
cacheWriteTokens: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
176
|
+
provenance: z.ZodEnum<{
|
|
177
|
+
computed: "computed";
|
|
178
|
+
estimated: "estimated";
|
|
179
|
+
"provider-reported": "provider-reported";
|
|
180
|
+
unavailable: "unavailable";
|
|
181
|
+
}>;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
186
|
+
provenance: z.ZodEnum<{
|
|
187
|
+
computed: "computed";
|
|
188
|
+
estimated: "estimated";
|
|
189
|
+
"provider-reported": "provider-reported";
|
|
190
|
+
unavailable: "unavailable";
|
|
191
|
+
}>;
|
|
192
|
+
}, z.core.$strip>>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
artifactId: z.ZodString;
|
|
195
|
+
payloadSha256: z.ZodString;
|
|
196
|
+
}, z.core.$strict>;
|
|
197
|
+
export declare const InvocationFinishedSchema: z.ZodObject<{
|
|
198
|
+
conversationId: z.ZodString;
|
|
199
|
+
invocationId: z.ZodString;
|
|
200
|
+
operationId: z.ZodString;
|
|
201
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
202
|
+
type: z.ZodLiteral<"invocation/finished">;
|
|
203
|
+
failure: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
artifactId: z.ZodString;
|
|
205
|
+
payloadSha256: z.ZodString;
|
|
206
|
+
}, z.core.$strict>>;
|
|
207
|
+
status: z.ZodEnum<{
|
|
208
|
+
cancelled: "cancelled";
|
|
209
|
+
failed: "failed";
|
|
210
|
+
succeeded: "succeeded";
|
|
211
|
+
}>;
|
|
212
|
+
}, z.core.$strict>;
|
|
213
|
+
export declare const ModelInvocationRecordSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
214
|
+
conversationId: z.ZodString;
|
|
215
|
+
invocationId: z.ZodString;
|
|
216
|
+
operationId: z.ZodString;
|
|
217
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
218
|
+
type: z.ZodLiteral<"invocation/started">;
|
|
219
|
+
mode: z.ZodEnum<{
|
|
220
|
+
agent: "agent";
|
|
221
|
+
completion: "completion";
|
|
222
|
+
}>;
|
|
223
|
+
trace: z.ZodObject<{
|
|
224
|
+
operationId: z.ZodString;
|
|
225
|
+
purpose: z.ZodString;
|
|
226
|
+
project: z.ZodString;
|
|
227
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
traceId: z.ZodString;
|
|
229
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
230
|
+
}, z.core.$strict>>;
|
|
231
|
+
experiment: z.ZodOptional<z.ZodString>;
|
|
232
|
+
case: z.ZodOptional<z.ZodString>;
|
|
233
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
caller: z.ZodObject<{
|
|
236
|
+
subject: z.ZodString;
|
|
237
|
+
}, z.core.$strict>;
|
|
238
|
+
executingProcess: z.ZodObject<{
|
|
239
|
+
instanceId: z.ZodString;
|
|
240
|
+
pid: z.ZodInt;
|
|
241
|
+
hostname: z.ZodString;
|
|
242
|
+
}, z.core.$strict>;
|
|
243
|
+
fingerprint: z.ZodString;
|
|
244
|
+
requested: z.ZodObject<{
|
|
245
|
+
models: z.ZodArray<z.ZodString>;
|
|
246
|
+
payloadSha256: z.ZodString;
|
|
247
|
+
}, z.core.$strict>;
|
|
248
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
249
|
+
conversationId: z.ZodString;
|
|
250
|
+
invocationId: z.ZodString;
|
|
251
|
+
operationId: z.ZodString;
|
|
252
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
253
|
+
attemptId: z.ZodString;
|
|
254
|
+
step: z.ZodInt;
|
|
255
|
+
type: z.ZodLiteral<"provider/request">;
|
|
256
|
+
requested: z.ZodObject<{
|
|
257
|
+
modelId: z.ZodString;
|
|
258
|
+
provider: z.ZodString;
|
|
259
|
+
}, z.core.$strict>;
|
|
260
|
+
executingProcess: z.ZodObject<{
|
|
261
|
+
instanceId: z.ZodString;
|
|
262
|
+
pid: z.ZodInt;
|
|
263
|
+
hostname: z.ZodString;
|
|
264
|
+
}, z.core.$strict>;
|
|
265
|
+
sent: z.ZodObject<{
|
|
266
|
+
modelId: z.ZodString;
|
|
267
|
+
provider: z.ZodString;
|
|
268
|
+
payloadSha256: z.ZodString;
|
|
269
|
+
artifactId: z.ZodString;
|
|
270
|
+
tools: z.ZodInt;
|
|
271
|
+
}, z.core.$strict>;
|
|
272
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
273
|
+
conversationId: z.ZodString;
|
|
274
|
+
invocationId: z.ZodString;
|
|
275
|
+
operationId: z.ZodString;
|
|
276
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
277
|
+
attemptId: z.ZodString;
|
|
278
|
+
step: z.ZodInt;
|
|
279
|
+
type: z.ZodLiteral<"provider/response">;
|
|
280
|
+
status: z.ZodEnum<{
|
|
281
|
+
cancelled: "cancelled";
|
|
282
|
+
failed: "failed";
|
|
283
|
+
succeeded: "succeeded";
|
|
284
|
+
}>;
|
|
285
|
+
effective: z.ZodObject<{
|
|
286
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
287
|
+
modelId: z.ZodNullable<z.ZodString>;
|
|
288
|
+
responseId: z.ZodNullable<z.ZodString>;
|
|
289
|
+
}, z.core.$strict>;
|
|
290
|
+
usage: z.ZodObject<{
|
|
291
|
+
inputTokens: z.ZodObject<{
|
|
292
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
293
|
+
provenance: z.ZodEnum<{
|
|
294
|
+
computed: "computed";
|
|
295
|
+
estimated: "estimated";
|
|
296
|
+
"provider-reported": "provider-reported";
|
|
297
|
+
unavailable: "unavailable";
|
|
298
|
+
}>;
|
|
299
|
+
}, z.core.$strip>;
|
|
300
|
+
outputTokens: z.ZodObject<{
|
|
301
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
302
|
+
provenance: z.ZodEnum<{
|
|
303
|
+
computed: "computed";
|
|
304
|
+
estimated: "estimated";
|
|
305
|
+
"provider-reported": "provider-reported";
|
|
306
|
+
unavailable: "unavailable";
|
|
307
|
+
}>;
|
|
308
|
+
}, z.core.$strip>;
|
|
309
|
+
reasoningTokens: z.ZodOptional<z.ZodObject<{
|
|
310
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
311
|
+
provenance: z.ZodEnum<{
|
|
312
|
+
computed: "computed";
|
|
313
|
+
estimated: "estimated";
|
|
314
|
+
"provider-reported": "provider-reported";
|
|
315
|
+
unavailable: "unavailable";
|
|
316
|
+
}>;
|
|
317
|
+
}, z.core.$strip>>;
|
|
318
|
+
cacheReadTokens: z.ZodOptional<z.ZodObject<{
|
|
319
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
320
|
+
provenance: z.ZodEnum<{
|
|
321
|
+
computed: "computed";
|
|
322
|
+
estimated: "estimated";
|
|
323
|
+
"provider-reported": "provider-reported";
|
|
324
|
+
unavailable: "unavailable";
|
|
325
|
+
}>;
|
|
326
|
+
}, z.core.$strip>>;
|
|
327
|
+
cacheWriteTokens: z.ZodOptional<z.ZodObject<{
|
|
328
|
+
value: z.ZodOptional<z.ZodInt>;
|
|
329
|
+
provenance: z.ZodEnum<{
|
|
330
|
+
computed: "computed";
|
|
331
|
+
estimated: "estimated";
|
|
332
|
+
"provider-reported": "provider-reported";
|
|
333
|
+
unavailable: "unavailable";
|
|
334
|
+
}>;
|
|
335
|
+
}, z.core.$strip>>;
|
|
336
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
337
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
338
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
339
|
+
provenance: z.ZodEnum<{
|
|
340
|
+
computed: "computed";
|
|
341
|
+
estimated: "estimated";
|
|
342
|
+
"provider-reported": "provider-reported";
|
|
343
|
+
unavailable: "unavailable";
|
|
344
|
+
}>;
|
|
345
|
+
}, z.core.$strip>>;
|
|
346
|
+
}, z.core.$strip>;
|
|
347
|
+
artifactId: z.ZodString;
|
|
348
|
+
payloadSha256: z.ZodString;
|
|
349
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
350
|
+
conversationId: z.ZodString;
|
|
351
|
+
invocationId: z.ZodString;
|
|
352
|
+
operationId: z.ZodString;
|
|
353
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
354
|
+
type: z.ZodLiteral<"invocation/finished">;
|
|
355
|
+
failure: z.ZodOptional<z.ZodObject<{
|
|
356
|
+
artifactId: z.ZodString;
|
|
357
|
+
payloadSha256: z.ZodString;
|
|
358
|
+
}, z.core.$strict>>;
|
|
359
|
+
status: z.ZodEnum<{
|
|
360
|
+
cancelled: "cancelled";
|
|
361
|
+
failed: "failed";
|
|
362
|
+
succeeded: "succeeded";
|
|
363
|
+
}>;
|
|
364
|
+
}, z.core.$strict>], "type">;
|
|
365
|
+
export type ModelInvocationRecord = z.infer<typeof ModelInvocationRecordSchema>;
|
|
366
|
+
export declare const InvocationPayloadSchema: z.ZodObject<{
|
|
367
|
+
conversationId: z.ZodString;
|
|
368
|
+
invocationId: z.ZodString;
|
|
369
|
+
operationId: z.ZodString;
|
|
370
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
371
|
+
artifactId: z.ZodString;
|
|
372
|
+
sha256: z.ZodString;
|
|
373
|
+
bytes: z.ZodInt;
|
|
374
|
+
iv: z.ZodString;
|
|
375
|
+
tag: z.ZodString;
|
|
376
|
+
ciphertext: z.ZodString;
|
|
377
|
+
}, z.core.$strict>;
|
|
378
|
+
//# sourceMappingURL=invocation-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-schema.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/invocation-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;kBAU5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;kBAmBjC,CAAC;AACZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AASxF,eAAO,MAAM,sBAAsB;;kBAAqC,CAAC;AACzE,eAAO,MAAM,uBAAuB;;;;kBAMzB,CAAC;AAOZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQzB,CAAC;AACZ,eAAO,MAAM,8BAA8B;;;;;;;kBAGhC,CAAC;AACZ,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAE3F,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;kBAazB,CAAC;AACZ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAO1B,CAAC;AACZ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;kBAI1B,CAAC;AACZ,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAKtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,eAAO,MAAM,uBAAuB;;;;;;;;;;;kBAOzB,CAAC"}
|