@canonmsg/agent-sdk 13.0.3 → 13.2.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/README.md +11 -1
- package/dist/chunks/{chunk-ZPBOGOAD.js → chunk-5YKGDUJX.js} +271 -359
- package/dist/chunks/{chunk-XKUG2BQR.js → chunk-6FD6KFQN.js} +528 -167
- package/dist/cli.js +50 -6
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -2
- package/dist/internal/core/client.d.ts +1 -215
- package/dist/internal/core/index.d.ts +0 -1
- package/dist/internal/endpoint/completions.d.ts +45 -0
- package/dist/internal/endpoint/engine.d.ts +15 -0
- package/dist/internal/endpoint/index.d.ts +1 -0
- package/dist/internal/endpoint/transient-publisher.d.ts +3 -2
- package/dist/media.js +1 -1
- package/dist/runner/errands.d.ts +2 -2
- package/dist/runner/runner.d.ts +34 -1
- package/dist/runner/wake.d.ts +16 -0
- package/package.json +1 -1
- package/dist/internal/core/completed-output-journal.d.ts +0 -34
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A runtime's finished turn output, saved before it is published so a host that
|
|
3
|
-
* dies between the native result and Canon delivery replays exactly that
|
|
4
|
-
* output on restart instead of losing it, and never runs the turn again.
|
|
5
|
-
*/
|
|
6
|
-
export interface CompletedOutputRecordBase {
|
|
7
|
-
version: 1;
|
|
8
|
-
turnId: string;
|
|
9
|
-
conversationId: string;
|
|
10
|
-
createdAt: string;
|
|
11
|
-
/** Who could read the conversation when the output was produced. */
|
|
12
|
-
audience: {
|
|
13
|
-
memberIds: string[];
|
|
14
|
-
membershipRevision?: number;
|
|
15
|
-
} | null;
|
|
16
|
-
}
|
|
17
|
-
export interface CompletedOutputJournal<T extends CompletedOutputRecordBase> {
|
|
18
|
-
/** Durably save a record; saving the identical record again is a no-op, a different one is refused. */
|
|
19
|
-
save(record: T): void;
|
|
20
|
-
/** Every saved record, oldest first, after recovering writes a crash interrupted. */
|
|
21
|
-
list(): T[];
|
|
22
|
-
remove(turnId: string): void;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Atomic, fsynced, one file per turn under a folder keyed by `scope` (runtime,
|
|
26
|
-
* environment, principal, ownership generation, installation), so a transferred
|
|
27
|
-
* agent or another installation never sees these plaintext records.
|
|
28
|
-
*/
|
|
29
|
-
export declare function createCompletedOutputJournal<T extends CompletedOutputRecordBase>(directory: string, scope: unknown, options: {
|
|
30
|
-
/** Names the runtime in errors, e.g. `Codex`. */
|
|
31
|
-
label: string;
|
|
32
|
-
/** Runtime-specific shape check beyond the base fields; false is an invalid record. */
|
|
33
|
-
validate?: (record: T) => boolean;
|
|
34
|
-
}): CompletedOutputJournal<T>;
|