@canonmsg/agent-sdk 13.2.0 → 13.2.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/chunks/{chunk-YHDDOADK.js → chunk-2NVLVPSG.js} +1 -1
- package/dist/chunks/{chunk-YJUPKU47.js → chunk-BPSFHEAA.js} +2 -2
- package/dist/chunks/{chunk-5YKGDUJX.js → chunk-HTLKCUQG.js} +82 -361
- package/dist/chunks/{chunk-DTAWEQCM.js → chunk-POBMFS2K.js} +2 -2
- package/dist/chunks/{chunk-6FD6KFQN.js → chunk-TJBG6NKF.js} +5 -5
- package/dist/chunks/{chunk-5WPAB5MB.js → chunk-VIS5WXNH.js} +0 -24
- package/dist/chunks/{mls-crypto-NZVMSUFU.js → mls-crypto-ZBEC26B5.js} +2 -2
- package/dist/cli.js +6 -6
- package/dist/index.js +6 -6
- package/dist/internal/endpoint/engine.d.ts +2 -6
- package/dist/internal/endpoint/events.d.ts +1 -2
- package/dist/internal/endpoint/index.d.ts +0 -5
- package/dist/internal/endpoint/media.d.ts +2 -61
- package/dist/internal/endpoint/queue.d.ts +1 -3
- package/dist/media.js +4 -4
- package/dist/mls-wasm-host.js +3 -3
- package/package.json +2 -3
- package/dist/internal/endpoint/artifact-images.d.ts +0 -60
- package/dist/internal/endpoint/artifact-reducer.d.ts +0 -35
- package/dist/internal/endpoint/artifact-views.d.ts +0 -113
- package/dist/internal/endpoint/artifacts.d.ts +0 -75
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { type ArtifactAsset, type ArtifactCommand, type ArtifactCommandBody, type ArtifactDefinition, type ArtifactDomainOutcome, type ArtifactOutcomeCode, type ArtifactReadResult, type ArtifactSnapshot } from '../backend-contracts/index.js';
|
|
2
|
-
import type { Endpoint } from './engine.js';
|
|
3
|
-
import { type ArtifactConflict } from './artifact-reducer.js';
|
|
4
|
-
/** The command was rejected by the shared rules; nothing new was accepted. */
|
|
5
|
-
export declare class ArtifactRejectedError extends Error {
|
|
6
|
-
readonly code: ArtifactOutcomeCode | 'UNSUPPORTED_VERSION';
|
|
7
|
-
readonly outcome?: ArtifactDomainOutcome;
|
|
8
|
-
readonly conflicts?: ArtifactConflict[];
|
|
9
|
-
/** The projection the command was evaluated against: the author's fresh state. */
|
|
10
|
-
readonly current?: ArtifactReadResult;
|
|
11
|
-
constructor(message: string, options: {
|
|
12
|
-
code: ArtifactOutcomeCode | 'UNSUPPORTED_VERSION';
|
|
13
|
-
outcome?: ArtifactDomainOutcome;
|
|
14
|
-
conflicts?: ArtifactConflict[];
|
|
15
|
-
current?: ArtifactReadResult;
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* `accepted`: the relay stored the command and the shared rules accepted it.
|
|
20
|
-
* `queued`: the durable outbox keeps retrying delivery; snapshot and outcome
|
|
21
|
-
* are a local prediction. Callers must not resend.
|
|
22
|
-
*/
|
|
23
|
-
export interface ArtifactWriteResult extends ArtifactReadResult {
|
|
24
|
-
outcome: ArtifactDomainOutcome;
|
|
25
|
-
status: 'accepted' | 'queued';
|
|
26
|
-
}
|
|
27
|
-
/** `unavailable` codes include NO_DEFINITION and ARTIFACT_LOADING (a long log still replaying; a later listing has it). */
|
|
28
|
-
export interface ArtifactLibrary {
|
|
29
|
-
artifacts: ArtifactSnapshot[];
|
|
30
|
-
unavailable: Array<{
|
|
31
|
-
artifactId: string;
|
|
32
|
-
code: string;
|
|
33
|
-
message: string;
|
|
34
|
-
}>;
|
|
35
|
-
}
|
|
36
|
-
/** The client stamps the schema; a caller-supplied schema must match it. */
|
|
37
|
-
export type ArtifactCommandInput = ArtifactCommandBody | ArtifactCommand;
|
|
38
|
-
export interface ArtifactWriteOptions {
|
|
39
|
-
commandId?: string;
|
|
40
|
-
waitMs?: number;
|
|
41
|
-
}
|
|
42
|
-
export interface ArtifactCreateOptions {
|
|
43
|
-
artifactId?: string;
|
|
44
|
-
commandId?: string;
|
|
45
|
-
waitMs?: number;
|
|
46
|
-
}
|
|
47
|
-
export interface ArtifactClientOptions {
|
|
48
|
-
encoding?: 'json' | 'mls';
|
|
49
|
-
/** How long a listing waits for one work before reporting it as still loading (default 4 s). */
|
|
50
|
-
listItemWaitMs?: number;
|
|
51
|
-
}
|
|
52
|
-
export interface ArtifactClient {
|
|
53
|
-
list(conversationId: string): Promise<ArtifactLibrary>;
|
|
54
|
-
read(conversationId: string, artifactId: string, options?: {
|
|
55
|
-
revisionId?: string;
|
|
56
|
-
}): Promise<ArtifactReadResult>;
|
|
57
|
-
create(conversationId: string, definition: ArtifactDefinition, options?: ArtifactCreateOptions): Promise<ArtifactWriteResult>;
|
|
58
|
-
apply(conversationId: string, artifactId: string, command: ArtifactCommandInput, options?: ArtifactWriteOptions): Promise<ArtifactWriteResult>;
|
|
59
|
-
retainAsset(conversationId: string, artifactId: string, assetId: string): Promise<ArtifactAsset>;
|
|
60
|
-
getAsset(conversationId: string, artifactId: string, assetId: string): Promise<ArtifactAsset>;
|
|
61
|
-
/** Polls the log head only; reads (and replays) when it moves. */
|
|
62
|
-
observe(conversationId: string, artifactId: string, listener: (value: ArtifactReadResult) => void, onError?: (error: unknown) => void): () => void;
|
|
63
|
-
observeList(conversationId: string, listener: (value: ArtifactLibrary) => void, onError?: (error: unknown) => void): () => void;
|
|
64
|
-
/**
|
|
65
|
-
* An opaque command ID for one deliberate request: `cmd-` and 40 hex
|
|
66
|
-
* characters of an HMAC-SHA256 over the canonical JSON of `material`, keyed
|
|
67
|
-
* by this installation's secret. Stable for retries on this installation,
|
|
68
|
-
* unrelated elsewhere, and never a server-testable hash of its content.
|
|
69
|
-
* Throws PREPARATION_INSTALLATION_FENCED on an endpoint another logout fenced.
|
|
70
|
-
*/
|
|
71
|
-
deriveCommandId(material: unknown[]): Promise<string>;
|
|
72
|
-
/** The same derivation (separate domain) as an RFC 4122-shaped UUID, for image request IDs. */
|
|
73
|
-
deriveRequestId(material: unknown[]): Promise<string>;
|
|
74
|
-
}
|
|
75
|
-
export declare function createArtifactClient(endpoint: Endpoint, options?: ArtifactClientOptions): ArtifactClient;
|