@byok-sdk/cloud 0.8.1 → 0.9.0-rc.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/agent-memory-projection.d.ts +72 -0
- package/dist/capabilities.d.ts +8 -0
- package/dist/cloud.d.ts +28 -1
- package/dist/composition/in-memory.d.ts +5 -1
- package/dist/errors.d.ts +16 -0
- package/dist/handlers/agent-memory-projections.d.ts +15 -0
- package/dist/handlers/messages.d.ts +14 -1
- package/dist/handlers/shared.d.ts +12 -0
- package/dist/inbound.d.ts +14 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +481 -19
- package/dist/index.js.map +1 -1
- package/dist/stores/in-memory/agent-memory-projection.d.ts +29 -0
- package/package.json +3 -3
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional hosted Agent-memory projection ports and reference store.
|
|
3
|
+
*
|
|
4
|
+
* Local `MEMORY.md` and `notes/` remain the sole authoring authority. This
|
|
5
|
+
* module only accepts a redacted full snapshot after a host-owned authorizer
|
|
6
|
+
* grants the exact authenticated task identity; it never offers a read,
|
|
7
|
+
* import, merge, history, RAG, or product-fact surface.
|
|
8
|
+
*/
|
|
9
|
+
import type { TenantId } from '@byok-sdk/core';
|
|
10
|
+
import { type AgentMemoryProjectionMutation, type AgentMemoryProjectionReceipt, type AgentMemoryProjectionEraseResult } from '@byok-sdk/protocol';
|
|
11
|
+
export type { AgentMemoryProjectionMeteringReceipt, AgentMemoryProjectionMutation, AgentMemoryProjectionReceipt, AgentMemoryProjectionEraseResult, } from '@byok-sdk/protocol';
|
|
12
|
+
export interface AgentMemoryProjectionAuthorizerInput {
|
|
13
|
+
readonly tenantId: TenantId;
|
|
14
|
+
readonly deviceId: string;
|
|
15
|
+
readonly taskId: string;
|
|
16
|
+
readonly agentRef: AgentMemoryProjectionMutation['agentRef'];
|
|
17
|
+
readonly sessionRef: AgentMemoryProjectionMutation['sessionRef'];
|
|
18
|
+
readonly runtimeId: AgentMemoryProjectionMutation['runtimeId'];
|
|
19
|
+
readonly grantRef: AgentMemoryProjectionMutation['grantRef'];
|
|
20
|
+
/** Server-granted active writer epoch; a client may not upgrade it unilaterally. */
|
|
21
|
+
readonly writerEpoch: AgentMemoryProjectionMutation['writerEpoch'];
|
|
22
|
+
readonly policyRevision: AgentMemoryProjectionMutation['policyRevision'];
|
|
23
|
+
}
|
|
24
|
+
export type AgentMemoryProjectionAuthorization = {
|
|
25
|
+
readonly outcome: 'authorized';
|
|
26
|
+
} | {
|
|
27
|
+
readonly outcome: 'denied';
|
|
28
|
+
readonly reasonCode: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Embedder-owned consent and grant authority. A model never provides a
|
|
32
|
+
* consent flag: it presents only an opaque grantRef, which this port binds to
|
|
33
|
+
* the authenticated tenant/device/task/AgentRef/session/runtime/grant/policy
|
|
34
|
+
* identity. The host must retain an exact historical permit until its
|
|
35
|
+
* mutation is accepted, explicitly revoked, or superseded by a higher writer
|
|
36
|
+
* epoch; reaching task terminal state alone must not implicitly delete it.
|
|
37
|
+
*/
|
|
38
|
+
export interface AgentMemoryProjectionAuthorizer {
|
|
39
|
+
authorize(input: AgentMemoryProjectionAuthorizerInput): Promise<AgentMemoryProjectionAuthorization>;
|
|
40
|
+
/** Revoke hosted-projection authorization before the server asks the store to erase. */
|
|
41
|
+
revoke(input: {
|
|
42
|
+
readonly tenantId: TenantId;
|
|
43
|
+
readonly agentId: string;
|
|
44
|
+
}): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
/** Input to the durable projection store. `redactedBytes` has already been decoded from the portable base64url body. */
|
|
47
|
+
export interface AgentMemoryProjectionCommitInput {
|
|
48
|
+
readonly tenantId: TenantId;
|
|
49
|
+
readonly deviceId: string;
|
|
50
|
+
readonly mutation: AgentMemoryProjectionMutation;
|
|
51
|
+
readonly redactedBytes: Uint8Array;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Durable hosted snapshot and immutable metering receipt authority.
|
|
55
|
+
*
|
|
56
|
+
* `commit` must hash the supplied bytes and compare them with the portable
|
|
57
|
+
* redacted hash before every write. It accepts a new epoch only at sourceSeq
|
|
58
|
+
* one, accepts same-epoch writes only gap-free, returns `idempotent` for an
|
|
59
|
+
* exact replay, and rejects stale/gap/binding/hash mismatches. The accepted
|
|
60
|
+
* snapshot and its metering receipt share one transaction boundary.
|
|
61
|
+
*/
|
|
62
|
+
export interface AgentMemoryProjectionStore {
|
|
63
|
+
commit(input: AgentMemoryProjectionCommitInput): Promise<AgentMemoryProjectionReceipt>;
|
|
64
|
+
/**
|
|
65
|
+
* Server-side deletion leaves a body-free epoch fence. The host must mint a
|
|
66
|
+
* later writer grant from `nextWriterEpoch`; no device/runtime is required.
|
|
67
|
+
*/
|
|
68
|
+
erase(input: {
|
|
69
|
+
readonly tenantId: TenantId;
|
|
70
|
+
readonly agentId: string;
|
|
71
|
+
}): Promise<AgentMemoryProjectionEraseResult>;
|
|
72
|
+
}
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export declare const CLOUD_CAPABILITIES: {
|
|
|
61
61
|
* routes it would then 404.
|
|
62
62
|
*/
|
|
63
63
|
readonly skillPacks: 'skills.pack';
|
|
64
|
+
/** Optional, one-way redacted Agent-memory snapshot mutation route. */
|
|
65
|
+
readonly agentMemoryProjection: 'agent.memory.projection';
|
|
64
66
|
};
|
|
65
67
|
export type CloudCapability = (typeof CLOUD_CAPABILITIES)[keyof typeof CLOUD_CAPABILITIES];
|
|
66
68
|
/** The wire DTO for `GET /byok/capabilities` — core's shape, bound to a cloud-owned route. */
|
|
@@ -83,6 +85,12 @@ export interface FullCapabilityDeclarationOptions {
|
|
|
83
85
|
* existing deployment refuse to construct.
|
|
84
86
|
*/
|
|
85
87
|
readonly includeSkillPacks?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Hosted Agent memory is default-off: a composition needs both an embedder
|
|
90
|
+
* grant authorizer and a durable projection store before it may declare the
|
|
91
|
+
* mutation route.
|
|
92
|
+
*/
|
|
93
|
+
readonly includeAgentMemoryProjection?: boolean;
|
|
86
94
|
}
|
|
87
95
|
/** Every capability the standard composition can serve, plus explicitly wired composition-bound ones. */
|
|
88
96
|
export declare function fullCapabilityDeclaration(version?: number, options?: FullCapabilityDeclarationOptions): CapabilityDeclaration;
|
package/dist/cloud.d.ts
CHANGED
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
import { type BoardItem, type BoardItemInput, type BoardListQuery, type BoardPage, type CapabilityDeclaration, type Clock, type CoreStores, type PresenceHint, type SkillPackStore, type TenantId, type TenantReadiness } from '@byok-sdk/core';
|
|
18
18
|
import type { ActivityTail } from './activity';
|
|
19
19
|
import type { ApprovalTimelineTail } from './approval-timeline';
|
|
20
|
-
import { type Envelope, type AgentContentReadPayload, type AgentHomeProjectionCompletionRequest, type AgentHomeProjectionPayload, type AgentHomeProjectionReadback, type TaskOfferPayload, type TaskOfferForAgentPayload, type TaskOfferForAgentWithEgressPayload, type TaskOfferForAgentWithEgressFreshPayload, type TaskOfferWithToolsetsPayload } from '@byok-sdk/protocol';
|
|
20
|
+
import { type Envelope, type AgentContentReadPayload, type AgentMessagePublishPayload, type AgentMessageServerContext, type AgentHomeProjectionCompletionRequest, type AgentHomeProjectionPayload, type AgentHomeProjectionReadback, type AgentMemoryProjectionEraseResult, type TaskOfferPayload, type TaskOfferForAgentPayload, type TaskOfferForAgentWithEgressPayload, type TaskOfferForAgentWithEgressFreshPayload, type TaskOfferWithToolsetsPayload } from '@byok-sdk/protocol';
|
|
21
21
|
import type { TokenSigner } from './auth/tokens';
|
|
22
22
|
import type { CloudCrypto } from './crypto/port';
|
|
23
23
|
import { type RouteDescriptor } from './router/registry';
|
|
24
24
|
import { type AgentHomeProjectionReceiptInput } from './agent-home-projections';
|
|
25
|
+
import type { AgentMemoryProjectionAuthorizer, AgentMemoryProjectionStore } from './agent-memory-projection';
|
|
25
26
|
import type { BlobContentProxy, CloudStores, DeviceRecord, AgentEgressRecord, PairingCodeInfo, RequestReceipt, TaskAttempt } from './stores/ports';
|
|
26
27
|
import { type TerminalResult } from './terminal-result';
|
|
27
28
|
import type { TruthCommitter, TruthObjectDownloads } from './truth/contract';
|
|
@@ -66,6 +67,23 @@ export interface ByokCloudOptions {
|
|
|
66
67
|
readonly capabilities: CapabilityDeclaration;
|
|
67
68
|
/** Recorded on the control-plane principal every host-side call is made under. */
|
|
68
69
|
readonly operatorId?: string;
|
|
70
|
+
/** Product-owned consumer; destination lookup is keyed by authenticated task context, never model input. */
|
|
71
|
+
readonly agentMessage?: {
|
|
72
|
+
consume(input: {
|
|
73
|
+
readonly tenant: TenantId;
|
|
74
|
+
readonly deviceId: string;
|
|
75
|
+
readonly taskId: string;
|
|
76
|
+
readonly context: AgentMessageServerContext;
|
|
77
|
+
readonly payload: AgentMessagePublishPayload;
|
|
78
|
+
}): Promise<{
|
|
79
|
+
readonly outcome: 'accepted' | 'held' | 'refused';
|
|
80
|
+
readonly reasonCode?: string;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
/** Embedder-owned grant and consent authority for optional hosted Agent-memory projection. */
|
|
84
|
+
readonly agentMemoryProjectionAuthorizer?: AgentMemoryProjectionAuthorizer;
|
|
85
|
+
/** Durable snapshot + immutable metering receipt authority for optional hosted Agent-memory projection. */
|
|
86
|
+
readonly agentMemoryProjectionStore?: AgentMemoryProjectionStore;
|
|
69
87
|
readonly maxBlobSizeBytes?: number;
|
|
70
88
|
readonly longPollHoldMs?: number;
|
|
71
89
|
readonly longPollIntervalMs?: number;
|
|
@@ -114,6 +132,8 @@ export interface AgentEgressDispatchInput {
|
|
|
114
132
|
/** Supply one to make the enqueue addressable by the host's own id; otherwise cloud mints one. */
|
|
115
133
|
readonly taskId?: string;
|
|
116
134
|
readonly payload: TaskOfferForAgentWithEgressPayload;
|
|
135
|
+
/** Host-only product destination/freshness authority; never serialized to the daemon. */
|
|
136
|
+
readonly agentMessageContext?: AgentMessageServerContext;
|
|
117
137
|
}
|
|
118
138
|
/** Strict Agent dispatch whose selected runtime mints its session after start. */
|
|
119
139
|
export interface AgentEgressFreshSessionDispatchInput {
|
|
@@ -121,6 +141,8 @@ export interface AgentEgressFreshSessionDispatchInput {
|
|
|
121
141
|
readonly taskId?: string;
|
|
122
142
|
/** Deliberately session-free strict payload for the fresh-runtime path. */
|
|
123
143
|
readonly payload: TaskOfferForAgentWithEgressFreshPayload;
|
|
144
|
+
/** Host-only product destination/freshness authority; never serialized to the daemon. */
|
|
145
|
+
readonly agentMessageContext?: AgentMessageServerContext;
|
|
124
146
|
}
|
|
125
147
|
/** A task-free, independently capability-gated Agent content read. */
|
|
126
148
|
export interface AgentContentReadInput {
|
|
@@ -194,6 +216,11 @@ export interface ByokCloud {
|
|
|
194
216
|
getAgentHomeProjectionStatus(tenant: TenantId, deviceId: string, input: AgentHomeProjectionStatusInput): Promise<AgentHomeProjectionReadback | undefined>;
|
|
195
217
|
/** Direct device completion endpoint authority; first exact terminal receipt wins. */
|
|
196
218
|
completeAgentHomeProjection(tenant: TenantId, deviceId: string, receipt: AgentHomeProjectionCompletionRequest): Promise<AgentHomeProjectionReadback>;
|
|
219
|
+
/**
|
|
220
|
+
* Server-side consent revocation and hosted projection erasure. It does not
|
|
221
|
+
* depend on a device being online and never imports anything back locally.
|
|
222
|
+
*/
|
|
223
|
+
eraseAgentMemoryProjection(tenant: TenantId, agentId: string): Promise<AgentMemoryProjectionEraseResult>;
|
|
197
224
|
/** Host control plane: durably request cancellation by tenant/task id. Idempotent. */
|
|
198
225
|
cancelTask(tenant: TenantId, taskId: string, reason?: string): Promise<TaskAttempt>;
|
|
199
226
|
readTaskAttempt(tenant: TenantId, taskId: string): Promise<TaskAttempt | undefined>;
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
import { type CapabilityDeclaration, type Clock, type CoreStores, type SkillPackStore } from '@byok-sdk/core';
|
|
11
11
|
import { type TokenSigner } from '../auth/tokens';
|
|
12
12
|
import type { CloudCrypto } from '../crypto/port';
|
|
13
|
-
import { type ByokCloud } from '../cloud';
|
|
13
|
+
import { type ByokCloud, type ByokCloudOptions } from '../cloud';
|
|
14
14
|
import type { BlobContentProxy, CloudStores } from '../stores/ports';
|
|
15
15
|
import type { TruthCommitter, TruthObjectDownloads } from '../truth/contract';
|
|
16
|
+
import type { AgentMemoryProjectionAuthorizer, AgentMemoryProjectionStore } from '../agent-memory-projection';
|
|
16
17
|
export interface InMemoryByokCloudOptions {
|
|
17
18
|
readonly clock?: Clock;
|
|
18
19
|
readonly crypto?: CloudCrypto;
|
|
@@ -49,6 +50,9 @@ export interface InMemoryByokCloudOptions {
|
|
|
49
50
|
*/
|
|
50
51
|
readonly skillPacks?: SkillPackStore;
|
|
51
52
|
readonly skillPackPageLimit?: number;
|
|
53
|
+
readonly agentMessage?: ByokCloudOptions['agentMessage'];
|
|
54
|
+
readonly agentMemoryProjectionAuthorizer?: AgentMemoryProjectionAuthorizer;
|
|
55
|
+
readonly agentMemoryProjectionStore?: AgentMemoryProjectionStore;
|
|
52
56
|
}
|
|
53
57
|
export interface InMemoryByokCloud {
|
|
54
58
|
readonly cloud: ByokCloud;
|
package/dist/errors.d.ts
CHANGED
|
@@ -63,6 +63,22 @@ export declare const CLOUD_ERROR_CODES: {
|
|
|
63
63
|
readonly agent_home_projection_receipt_mismatch: 'agent_home_projection_receipt_mismatch';
|
|
64
64
|
/** A receipt-store row at the projection namespace violated the frozen projection schema. */
|
|
65
65
|
readonly agent_home_projection_receipt_invalid: 'agent_home_projection_receipt_invalid';
|
|
66
|
+
/** A hosted Agent-memory mutation did not match the durable task/device/AgentRef binding. */
|
|
67
|
+
readonly agent_memory_projection_task_mismatch: 'agent_memory_projection_task_mismatch';
|
|
68
|
+
/** The embedder-owned grant/consent authority denied a hosted memory mutation. */
|
|
69
|
+
readonly agent_memory_projection_authorization_denied: 'agent_memory_projection_authorization_denied';
|
|
70
|
+
/** A redacted snapshot's decoded bytes did not match its declared hash or byte count. */
|
|
71
|
+
readonly agent_memory_projection_hash_mismatch: 'agent_memory_projection_hash_mismatch';
|
|
72
|
+
/** A writer epoch/source sequence already names a different immutable projection mutation. */
|
|
73
|
+
readonly agent_memory_projection_replay_mismatch: 'agent_memory_projection_replay_mismatch';
|
|
74
|
+
/** A hosted memory mutation came from an older writer epoch. */
|
|
75
|
+
readonly agent_memory_projection_stale_epoch: 'agent_memory_projection_stale_epoch';
|
|
76
|
+
/** A server-side erase fence prevents a deleted writer epoch from re-entering. */
|
|
77
|
+
readonly agent_memory_projection_erased_epoch: 'agent_memory_projection_erased_epoch';
|
|
78
|
+
/** A prior erase reached the protocol writer-epoch ceiling and cannot mint a later writer. */
|
|
79
|
+
readonly agent_memory_projection_epoch_exhausted: 'agent_memory_projection_epoch_exhausted';
|
|
80
|
+
/** A hosted memory mutation skipped or reset a required source sequence. */
|
|
81
|
+
readonly agent_memory_projection_sequence_gap: 'agent_memory_projection_sequence_gap';
|
|
66
82
|
};
|
|
67
83
|
export type CloudErrorCode = (typeof CLOUD_ERROR_CODES)[keyof typeof CLOUD_ERROR_CODES];
|
|
68
84
|
export declare class ByokCloudError extends Error {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Device-authenticated write route for the optional one-way hosted memory projection. */
|
|
2
|
+
import type { Context } from 'hono';
|
|
3
|
+
import { type AgentMemoryProjectionCommitResponse } from '@byok-sdk/protocol';
|
|
4
|
+
import { type DeviceRouteDeps } from './shared';
|
|
5
|
+
import type { TenantStores } from '../tenant-stores';
|
|
6
|
+
/**
|
|
7
|
+
* The protocol's 512 KiB redacted ceiling encodes to about 700 KiB of
|
|
8
|
+
* base64url. A finite 1 MiB request ceiling leaves room for the bounded JSON
|
|
9
|
+
* envelope and rejects oversized input before JSON.parse allocates it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_MAX_AGENT_MEMORY_PROJECTION_REQUEST_BYTES: number;
|
|
12
|
+
export interface AgentMemoryProjectionRouteDeps extends DeviceRouteDeps {
|
|
13
|
+
readonly commit: (stores: TenantStores, deviceId: string, mutation: import('@byok-sdk/protocol').AgentMemoryProjectionCommitRequest, redactedBytes: Uint8Array) => Promise<AgentMemoryProjectionCommitResponse>;
|
|
14
|
+
}
|
|
15
|
+
export declare function agentMemoryProjectionHandler(deps: AgentMemoryProjectionRouteDeps): (c: Context) => Promise<Response>;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* `duplicate` for whatever already landed.
|
|
21
21
|
*/
|
|
22
22
|
import type { Context } from 'hono';
|
|
23
|
-
import { type AgentContentReceiptPayload } from '@byok-sdk/protocol';
|
|
23
|
+
import { type AgentContentReceiptPayload, type AgentMessageDispositionPayload, type AgentMessagePublishPayload } from '@byok-sdk/protocol';
|
|
24
24
|
import type { ActivityBounds } from '../coordination';
|
|
25
25
|
import type { AgentEgressRecord } from '../stores/ports';
|
|
26
26
|
import type { TenantStores } from '../tenant-stores';
|
|
@@ -35,5 +35,18 @@ export interface MessagesRouteDeps extends DeviceRouteDeps {
|
|
|
35
35
|
readonly appendReliableEgressAck: (stores: TenantStores, record: AgentEgressRecord) => Promise<void>;
|
|
36
36
|
/** Content receipt rows share the reliable spool/ack protocol but preserve their own exact payload authority. */
|
|
37
37
|
readonly appendContentReceiptAck: (stores: TenantStores, deviceId: string, payload: AgentContentReceiptPayload) => Promise<void>;
|
|
38
|
+
readonly agentMessage?: {
|
|
39
|
+
consume(input: {
|
|
40
|
+
readonly tenant: TenantStores['tenant'];
|
|
41
|
+
readonly deviceId: string;
|
|
42
|
+
readonly taskId: string;
|
|
43
|
+
readonly context: import('@byok-sdk/protocol').AgentMessageServerContext;
|
|
44
|
+
readonly payload: AgentMessagePublishPayload;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
readonly outcome: 'accepted' | 'held' | 'refused';
|
|
47
|
+
readonly reasonCode?: string;
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
50
|
+
readonly appendAgentMessageDisposition: (stores: TenantStores, deviceId: string, taskId: string, payload: AgentMessageDispositionPayload) => Promise<void>;
|
|
38
51
|
}
|
|
39
52
|
export declare function messagesHandler(deps: MessagesRouteDeps): (c: Context) => Promise<Response>;
|
|
@@ -14,6 +14,18 @@ export interface ErrorBody {
|
|
|
14
14
|
readonly error: string;
|
|
15
15
|
}
|
|
16
16
|
export declare function readJsonBody(c: Context): Promise<unknown>;
|
|
17
|
+
export interface BoundedJsonBodyResult {
|
|
18
|
+
readonly body: unknown;
|
|
19
|
+
readonly tooLarge: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Read and parse one JSON request while retaining a hard byte ceiling before
|
|
23
|
+
* JSON.parse. The declared length is only an early rejection; the stream is
|
|
24
|
+
* still counted because chunked requests may omit Content-Length or lie about
|
|
25
|
+
* it. Invalid JSON remains represented by `body: undefined` for the caller's
|
|
26
|
+
* existing validation status.
|
|
27
|
+
*/
|
|
28
|
+
export declare function readBoundedJsonBody(c: Context, maximum: number): Promise<BoundedJsonBodyResult>;
|
|
17
29
|
export interface DeviceRouteDeps {
|
|
18
30
|
readonly bearer: BearerAuthDeps;
|
|
19
31
|
readonly root: CloudRootStores;
|
package/dist/inbound.d.ts
CHANGED
|
@@ -27,10 +27,23 @@
|
|
|
27
27
|
* A duplicate is still a wire-level success (§8.2): it just did not re-run
|
|
28
28
|
* anything. Only `rejected`/`rate_limited` are excluded from `accepted`.
|
|
29
29
|
*/
|
|
30
|
-
import { type Envelope } from '@byok-sdk/protocol';
|
|
30
|
+
import { type AgentMessageDispositionPayload, type AgentMessagePublishPayload, type AgentMessageServerContext, type Envelope } from '@byok-sdk/protocol';
|
|
31
31
|
import { type ActivityBounds } from './coordination';
|
|
32
32
|
import type { TenantStores } from './tenant-stores';
|
|
33
33
|
export type InboundOutcome = 'accepted' | 'duplicate' | 'rejected' | 'rate_limited';
|
|
34
|
+
export declare function handleAgentMessagePublish(stores: TenantStores, deviceId: string, taskId: string, payload: AgentMessagePublishPayload, consume: ((input: {
|
|
35
|
+
readonly tenant: TenantStores['tenant'];
|
|
36
|
+
readonly deviceId: string;
|
|
37
|
+
readonly taskId: string;
|
|
38
|
+
readonly context: AgentMessageServerContext;
|
|
39
|
+
readonly payload: AgentMessagePublishPayload;
|
|
40
|
+
}) => Promise<{
|
|
41
|
+
readonly outcome: 'accepted' | 'held' | 'refused';
|
|
42
|
+
readonly reasonCode?: string;
|
|
43
|
+
}>) | undefined): Promise<{
|
|
44
|
+
readonly outcome: InboundOutcome;
|
|
45
|
+
readonly disposition?: AgentMessageDispositionPayload;
|
|
46
|
+
}>;
|
|
34
47
|
/** Receipt key a task's terminal is recorded under — the idempotency seam S3b's journal will share. */
|
|
35
48
|
export declare function terminalReceiptKey(taskId: string): string;
|
|
36
49
|
export declare function handleInboundEnvelope(stores: TenantStores, deviceId: string, envelope: Envelope, activityBounds?: ActivityBounds): Promise<InboundOutcome>;
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export { createInMemoryByokCloud } from './composition/in-memory';
|
|
|
25
25
|
export type { InMemoryByokCloud, InMemoryByokCloudOptions } from './composition/in-memory';
|
|
26
26
|
export { ByokCloudError, CLOUD_ERROR_CODES, isCloudError } from './errors';
|
|
27
27
|
export type { CloudErrorCode } from './errors';
|
|
28
|
+
export { InMemoryAgentMemoryProjectionAuthorizer, InMemoryAgentMemoryProjectionStore, } from './stores/in-memory/agent-memory-projection';
|
|
29
|
+
export type { AgentMemoryProjectionAuthorization, AgentMemoryProjectionEraseResult, AgentMemoryProjectionAuthorizer, AgentMemoryProjectionAuthorizerInput, AgentMemoryProjectionCommitInput, AgentMemoryProjectionMeteringReceipt, AgentMemoryProjectionMutation, AgentMemoryProjectionReceipt, AgentMemoryProjectionStore, } from './agent-memory-projection';
|
|
28
30
|
export { CLOUD_CAPABILITIES, CapabilitiesResponseSchema, declares, fullCapabilityDeclaration, } from './capabilities';
|
|
29
31
|
export type { CapabilitiesResponse, CloudCapability, FullCapabilityDeclarationOptions, } from './capabilities';
|
|
30
32
|
export { CloudRouteRegistry, ROUTE_CLASSES, ROUTE_METHODS, routeKey } from './router/registry';
|