@clowder-ai/plugin-sdk 0.1.0-beta.10

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.
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Contract-mirror constants — runtime key sets and enum values that
3
+ * mirror @clowder-ai/plugin-contract TypeScript interfaces and types.
4
+ *
5
+ * These exist because the contract expresses certain closed constraints
6
+ * (additionalProperties: false, enum unions) only at the type level,
7
+ * with no runtime array/set export.
8
+ *
9
+ * ## DELETION TARGET
10
+ *
11
+ * Every constant in this module is scheduled for deletion when the
12
+ * contract exports a runtime equivalent (beta.5 delta scope, Fable
13
+ * ruling on S1 R3 contract seam). Each constant documents which
14
+ * contract source it mirrors.
15
+ *
16
+ * ## Drift prevention
17
+ *
18
+ * contract-mirror.test.ts verifies each constant against the contract
19
+ * source (schema JSON enum where available, structural assertions
20
+ * against contract types elsewhere). Drift = CI red.
21
+ *
22
+ * Pattern precedent: #10 MAX_FRAME_BYTES alias + drift test → Fable
23
+ * ruling 1 (fixtures test-only import) → this ruling (systematic).
24
+ */
25
+ /**
26
+ * MessagingErrorCode runtime values.
27
+ *
28
+ * Mirror of: messaging.schema.json → definitions.MessagingErrorCode.enum
29
+ * Contract type: MessagingErrorCode (contract.generated.ts:217)
30
+ * Drift test: automated, vs schema JSON enum (exact member + order match)
31
+ */
32
+ export declare const MESSAGING_ERROR_CODES: readonly ["VALIDATION", "PERMISSION", "NOT_FOUND", "CONFLICT", "RETRYABLE_INFLIGHT", "STALE_CURSOR"];
33
+ export declare const MESSAGING_ERROR_CODE_SET: Set<string>;
34
+ /**
35
+ * Mirror of: WireSuccessResponse interface (envelope.ts:108-113)
36
+ * Keys: jsonrpc, id, result — additionalProperties: false
37
+ */
38
+ export declare const RESPONSE_SUCCESS_KEYS: Set<string>;
39
+ /**
40
+ * Mirror of: WireApplicationErrorResponse / WireStandardErrorResponse
41
+ * (envelope.ts:129-166). Keys: jsonrpc, id, error — additionalProperties: false
42
+ */
43
+ export declare const RESPONSE_ERROR_KEYS: Set<string>;
44
+ /**
45
+ * Mirror of: WireNotification interface (envelope.ts:89-96)
46
+ * Keys: jsonrpc, method, params — additionalProperties: false
47
+ */
48
+ export declare const NOTIFICATION_ALLOWED_KEYS: Set<string>;
49
+ /**
50
+ * Mirror of: WireRequest interface (envelope.ts:66-75)
51
+ * Keys: jsonrpc, id, method, params — additionalProperties: false
52
+ */
53
+ export declare const REQUEST_ALLOWED_KEYS: Set<string>;
54
+ /**
55
+ * Mirror of: WireRequest.params / WireNotification.params (envelope.ts:71-74, 93-95)
56
+ * Keys: meta, input — additionalProperties: false
57
+ */
58
+ export declare const PARAMS_ALLOWED_KEYS: Set<string>;
59
+ /**
60
+ * Mirror of: CallMeta interface (envelope.ts:43-52)
61
+ * Keys: deadlineUnixMs — additionalProperties: false, v0 single field
62
+ */
63
+ export declare const META_ALLOWED_KEYS: Set<string>;
64
+ /** Mirror of: PingInput (row-shapes.ts:144-147). Keys: {nonce} */
65
+ export declare const PING_INPUT_KEYS: Set<string>;
66
+ /** Mirror of: DrainInput (row-shapes.ts:183-193). Keys: {deadlineUnixMs} */
67
+ export declare const DRAIN_INPUT_KEYS: Set<string>;
68
+ /** Mirror of: SubscribeInput (row-shapes.ts:27-30). Keys: {handle} */
69
+ export declare const SUBSCRIBE_INPUT_KEYS: Set<string>;
70
+ /** Mirror of: MessagingAckRequest (row-shapes.ts:76-81). Keys: {subscriptionId, ackToken} */
71
+ export declare const ACK_INPUT_KEYS: Set<string>;
72
+ /** Mirror of: GrantsChangedInput = GrantSnapshot (row-shapes.ts:128, grants.ts). Keys: {grantRevision, effectiveGrants} */
73
+ export declare const GRANTS_CHANGED_INPUT_KEYS: Set<string>;
74
+ /** Mirror of: CandidateHello (handshake.ts:62-71). */
75
+ export declare const CANDIDATE_HELLO_KEYS: Set<string>;
76
+ /** Mirror of: SessionBinding (handshake.ts:82-101). */
77
+ export declare const SESSION_BINDING_KEYS: Set<string>;
78
+ /** Mirror of: BrokerReadyParams (handshake.ts:113-116). */
79
+ export declare const BROKER_READY_PARAMS_KEYS: Set<string>;
80
+ /** Mirror of: PingResult (row-shapes.ts:152-158). Keys: {nonce} */
81
+ export declare const PING_RESULT_KEYS: Set<string>;
82
+ /** Mirror of: SubscribeResult (row-shapes.ts:35-39). Keys: {subscriptionId} */
83
+ export declare const SUBSCRIBE_RESULT_KEYS: Set<string>;
84
+ /**
85
+ * Mirror of: deliver acknowledgement result closed member set.
86
+ * Row 9 (host.messaging.deliver) has a frozen ack result shape
87
+ * {deliveryId: string, length 1..128 code points} — additionalProperties: false.
88
+ *
89
+ * Despite row 9 being RESERVED overall (DeliverResult = never in types),
90
+ * the ack shape is frozen per the #1165 protocol specification. The
91
+ * deliveryId echo is the fundamental delivery acknowledgement mechanism.
92
+ *
93
+ * Maintainer requirement: enforce closed member set + string bounds.
94
+ */
95
+ export declare const DELIVER_RESULT_KEYS: Set<string>;
96
+ /** Minimum deliveryId code-point length (frozen row 9 ack shape). */
97
+ export declare const DELIVER_DELIVERY_ID_MIN_LENGTH: 1;
98
+ /** Maximum deliveryId code-point length (frozen row 9 ack shape). */
99
+ export declare const DELIVER_DELIVERY_ID_MAX_LENGTH: 128;
100
+ /**
101
+ * Mirror of: StandardWireError body keys (errors.ts:240-299)
102
+ * Standard errors: {code, message} — no data field.
103
+ */
104
+ export declare const ERROR_BODY_STANDARD_KEYS: Set<string>;
105
+ /**
106
+ * Mirror of: ApplicationWireError body keys (errors.ts:182-234)
107
+ * Application errors: {code, message, data} — data required.
108
+ */
109
+ export declare const ERROR_BODY_APPLICATION_KEYS: Set<string>;
110
+ /**
111
+ * Mirror of: HandshakeRejectedError.data / DeliveryRejectedError.data /
112
+ * SnapshotUnavailableError.data — all {reason: <enum>}
113
+ */
114
+ export declare const REASON_DATA_KEYS: Set<string>;
115
+ /**
116
+ * Mirror of: DomainError.data (errors.ts:205-206)
117
+ * Keys: {code: MessagingErrorCode} — additionalProperties: false
118
+ */
119
+ export declare const CODE_DATA_KEYS: Set<string>;
120
+ //# sourceMappingURL=contract-mirror.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-mirror.d.ts","sourceRoot":"","sources":["../src/contract-mirror.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,sGAOxB,CAAC;AAEX,eAAO,MAAM,wBAAwB,aAAyC,CAAC;AAM/E;;;GAGG;AACH,eAAO,MAAM,qBAAqB,aAAuC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,mBAAmB,aAAsC,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,yBAAyB,aAA2C,CAAC;AAElF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,aAAiD,CAAC;AAMnF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,aAA6B,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAA8B,CAAC;AAM7D,kEAAkE;AAClE,eAAO,MAAM,eAAe,aAAqB,CAAC;AAElD,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,aAA8B,CAAC;AAE5D,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,aAAsB,CAAC;AAExD,6FAA6F;AAC7F,eAAO,MAAM,cAAc,aAA0C,CAAC;AAEtE,2HAA2H;AAC3H,eAAO,MAAM,yBAAyB,aAAgD,CAAC;AAMvF,sDAAsD;AACtD,eAAO,MAAM,oBAAoB,aAK/B,CAAC;AAEH,uDAAuD;AACvD,eAAO,MAAM,oBAAoB,aAU/B,CAAC;AAEH,2DAA2D;AAC3D,eAAO,MAAM,wBAAwB,aAA4B,CAAC;AAMlE,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,aAAqB,CAAC;AAEnD,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,aAA8B,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,aAA0B,CAAC;AAE3D,qEAAqE;AACrE,eAAO,MAAM,8BAA8B,EAAG,CAAU,CAAC;AAEzD,qEAAqE;AACrE,eAAO,MAAM,8BAA8B,EAAG,GAAY,CAAC;AAM3D;;;GAGG;AACH,eAAO,MAAM,wBAAwB,aAA+B,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,2BAA2B,aAAuC,CAAC;AAMhF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,aAAsB,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,cAAc,aAAoB,CAAC"}
@@ -0,0 +1,179 @@
1
+ /**
2
+ * Contract-mirror constants — runtime key sets and enum values that
3
+ * mirror @clowder-ai/plugin-contract TypeScript interfaces and types.
4
+ *
5
+ * These exist because the contract expresses certain closed constraints
6
+ * (additionalProperties: false, enum unions) only at the type level,
7
+ * with no runtime array/set export.
8
+ *
9
+ * ## DELETION TARGET
10
+ *
11
+ * Every constant in this module is scheduled for deletion when the
12
+ * contract exports a runtime equivalent (beta.5 delta scope, Fable
13
+ * ruling on S1 R3 contract seam). Each constant documents which
14
+ * contract source it mirrors.
15
+ *
16
+ * ## Drift prevention
17
+ *
18
+ * contract-mirror.test.ts verifies each constant against the contract
19
+ * source (schema JSON enum where available, structural assertions
20
+ * against contract types elsewhere). Drift = CI red.
21
+ *
22
+ * Pattern precedent: #10 MAX_FRAME_BYTES alias + drift test → Fable
23
+ * ruling 1 (fixtures test-only import) → this ruling (systematic).
24
+ */
25
+ // ═══════════════════════════════════════════════════════════════════════════
26
+ // Enum mirrors — contract has type-only unions, no runtime arrays
27
+ // ═══════════════════════════════════════════════════════════════════════════
28
+ /**
29
+ * MessagingErrorCode runtime values.
30
+ *
31
+ * Mirror of: messaging.schema.json → definitions.MessagingErrorCode.enum
32
+ * Contract type: MessagingErrorCode (contract.generated.ts:217)
33
+ * Drift test: automated, vs schema JSON enum (exact member + order match)
34
+ */
35
+ export const MESSAGING_ERROR_CODES = [
36
+ 'VALIDATION',
37
+ 'PERMISSION',
38
+ 'NOT_FOUND',
39
+ 'CONFLICT',
40
+ 'RETRYABLE_INFLIGHT',
41
+ 'STALE_CURSOR',
42
+ ];
43
+ export const MESSAGING_ERROR_CODE_SET = new Set(MESSAGING_ERROR_CODES);
44
+ // ═══════════════════════════════════════════════════════════════════════════
45
+ // Envelope outer key sets (additionalProperties: false)
46
+ // ═══════════════════════════════════════════════════════════════════════════
47
+ /**
48
+ * Mirror of: WireSuccessResponse interface (envelope.ts:108-113)
49
+ * Keys: jsonrpc, id, result — additionalProperties: false
50
+ */
51
+ export const RESPONSE_SUCCESS_KEYS = new Set(['jsonrpc', 'id', 'result']);
52
+ /**
53
+ * Mirror of: WireApplicationErrorResponse / WireStandardErrorResponse
54
+ * (envelope.ts:129-166). Keys: jsonrpc, id, error — additionalProperties: false
55
+ */
56
+ export const RESPONSE_ERROR_KEYS = new Set(['jsonrpc', 'id', 'error']);
57
+ /**
58
+ * Mirror of: WireNotification interface (envelope.ts:89-96)
59
+ * Keys: jsonrpc, method, params — additionalProperties: false
60
+ */
61
+ export const NOTIFICATION_ALLOWED_KEYS = new Set(['jsonrpc', 'method', 'params']);
62
+ /**
63
+ * Mirror of: WireRequest interface (envelope.ts:66-75)
64
+ * Keys: jsonrpc, id, method, params — additionalProperties: false
65
+ */
66
+ export const REQUEST_ALLOWED_KEYS = new Set(['jsonrpc', 'id', 'method', 'params']);
67
+ // ═══════════════════════════════════════════════════════════════════════════
68
+ // Params / meta key sets (closed nested objects)
69
+ // ═══════════════════════════════════════════════════════════════════════════
70
+ /**
71
+ * Mirror of: WireRequest.params / WireNotification.params (envelope.ts:71-74, 93-95)
72
+ * Keys: meta, input — additionalProperties: false
73
+ */
74
+ export const PARAMS_ALLOWED_KEYS = new Set(['meta', 'input']);
75
+ /**
76
+ * Mirror of: CallMeta interface (envelope.ts:43-52)
77
+ * Keys: deadlineUnixMs — additionalProperties: false, v0 single field
78
+ */
79
+ export const META_ALLOWED_KEYS = new Set(['deadlineUnixMs']);
80
+ // ═══════════════════════════════════════════════════════════════════════════
81
+ // Per-method CLOSED-row input key sets (additionalProperties: false)
82
+ // ═══════════════════════════════════════════════════════════════════════════
83
+ /** Mirror of: PingInput (row-shapes.ts:144-147). Keys: {nonce} */
84
+ export const PING_INPUT_KEYS = new Set(['nonce']);
85
+ /** Mirror of: DrainInput (row-shapes.ts:183-193). Keys: {deadlineUnixMs} */
86
+ export const DRAIN_INPUT_KEYS = new Set(['deadlineUnixMs']);
87
+ /** Mirror of: SubscribeInput (row-shapes.ts:27-30). Keys: {handle} */
88
+ export const SUBSCRIBE_INPUT_KEYS = new Set(['handle']);
89
+ /** Mirror of: MessagingAckRequest (row-shapes.ts:76-81). Keys: {subscriptionId, ackToken} */
90
+ export const ACK_INPUT_KEYS = new Set(['subscriptionId', 'ackToken']);
91
+ /** Mirror of: GrantsChangedInput = GrantSnapshot (row-shapes.ts:128, grants.ts). Keys: {grantRevision, effectiveGrants} */
92
+ export const GRANTS_CHANGED_INPUT_KEYS = new Set(['grantRevision', 'effectiveGrants']);
93
+ // ═══════════════════════════════════════════════════════════════════════════
94
+ // Handshake object key sets (type-only structural contract)
95
+ // ═══════════════════════════════════════════════════════════════════════════
96
+ /** Mirror of: CandidateHello (handshake.ts:62-71). */
97
+ export const CANDIDATE_HELLO_KEYS = new Set([
98
+ 'pluginId',
99
+ 'packageDigest',
100
+ 'contractVersion',
101
+ 'wireVersion',
102
+ ]);
103
+ /** Mirror of: SessionBinding (handshake.ts:82-101). */
104
+ export const SESSION_BINDING_KEYS = new Set([
105
+ 'pluginId',
106
+ 'packageDigest',
107
+ 'contractVersion',
108
+ 'wireVersion',
109
+ 'pluginInstanceId',
110
+ 'brokerSessionId',
111
+ 'grantRevision',
112
+ 'effectiveGrants',
113
+ 'bindingNonce',
114
+ ]);
115
+ /** Mirror of: BrokerReadyParams (handshake.ts:113-116). */
116
+ export const BROKER_READY_PARAMS_KEYS = new Set(['bindingNonce']);
117
+ // ═══════════════════════════════════════════════════════════════════════════
118
+ // Per-method CLOSED-row result key sets (additionalProperties: false)
119
+ // ═══════════════════════════════════════════════════════════════════════════
120
+ /** Mirror of: PingResult (row-shapes.ts:152-158). Keys: {nonce} */
121
+ export const PING_RESULT_KEYS = new Set(['nonce']);
122
+ /** Mirror of: SubscribeResult (row-shapes.ts:35-39). Keys: {subscriptionId} */
123
+ export const SUBSCRIBE_RESULT_KEYS = new Set(['subscriptionId']);
124
+ /**
125
+ * Mirror of: deliver acknowledgement result closed member set.
126
+ * Row 9 (host.messaging.deliver) has a frozen ack result shape
127
+ * {deliveryId: string, length 1..128 code points} — additionalProperties: false.
128
+ *
129
+ * Despite row 9 being RESERVED overall (DeliverResult = never in types),
130
+ * the ack shape is frozen per the #1165 protocol specification. The
131
+ * deliveryId echo is the fundamental delivery acknowledgement mechanism.
132
+ *
133
+ * Maintainer requirement: enforce closed member set + string bounds.
134
+ */
135
+ export const DELIVER_RESULT_KEYS = new Set(['deliveryId']);
136
+ /** Minimum deliveryId code-point length (frozen row 9 ack shape). */
137
+ export const DELIVER_DELIVERY_ID_MIN_LENGTH = 1;
138
+ /** Maximum deliveryId code-point length (frozen row 9 ack shape). */
139
+ export const DELIVER_DELIVERY_ID_MAX_LENGTH = 128;
140
+ // ═══════════════════════════════════════════════════════════════════════════
141
+ // Error body key sets (closed per error variant)
142
+ // ═══════════════════════════════════════════════════════════════════════════
143
+ /**
144
+ * Mirror of: StandardWireError body keys (errors.ts:240-299)
145
+ * Standard errors: {code, message} — no data field.
146
+ */
147
+ export const ERROR_BODY_STANDARD_KEYS = new Set(['code', 'message']);
148
+ /**
149
+ * Mirror of: ApplicationWireError body keys (errors.ts:182-234)
150
+ * Application errors: {code, message, data} — data required.
151
+ */
152
+ export const ERROR_BODY_APPLICATION_KEYS = new Set(['code', 'message', 'data']);
153
+ // ═══════════════════════════════════════════════════════════════════════════
154
+ // Per-arm application error data key sets (additionalProperties: false)
155
+ // ═══════════════════════════════════════════════════════════════════════════
156
+ /**
157
+ * Mirror of: HandshakeRejectedError.data / DeliveryRejectedError.data /
158
+ * SnapshotUnavailableError.data — all {reason: <enum>}
159
+ */
160
+ export const REASON_DATA_KEYS = new Set(['reason']);
161
+ /**
162
+ * Mirror of: DomainError.data (errors.ts:205-206)
163
+ * Keys: {code: MessagingErrorCode} — additionalProperties: false
164
+ */
165
+ export const CODE_DATA_KEYS = new Set(['code']);
166
+ // ═══════════════════════════════════════════════════════════════════════════
167
+ // NOTE: Constants NOT in this module (derived from contract imports)
168
+ // ═══════════════════════════════════════════════════════════════════════════
169
+ //
170
+ // The following are built from contract-imported arrays, not mirrors:
171
+ // KNOWN_ERROR_CODES = new Set(ALL_ERROR_CODES) — from contract
172
+ // APPLICATION_CODES = new Set(APPLICATION_ERROR_CODES) — from contract
173
+ // HANDSHAKE_REASONS = new Set(HANDSHAKE_REJECT_REASONS) — from contract
174
+ // DELIVERY_REASONS = new Set(DELIVERY_REJECT_REASONS) — from contract
175
+ // SNAPSHOT_REASONS = new Set(SNAPSHOT_UNAVAILABLE_REASONS) — from contract
176
+ // NULL_ID_ERROR_CODES = new Set([PARSE_ERROR_CODE]) — from contract
177
+ //
178
+ // These stay in wire-dispatch.ts as performance wrappers, not mirrors.
179
+ //# sourceMappingURL=contract-mirror.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-mirror.js","sourceRoot":"","sources":["../src/contract-mirror.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,8EAA8E;AAC9E,kEAAkE;AAClE,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,UAAU;IACV,oBAAoB;IACpB,cAAc;CACN,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAS,qBAAqB,CAAC,CAAC;AAE/E,8EAA8E;AAC9E,wDAAwD;AACxD,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,CAAC,M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AAC,CAAC;AAErE;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AAEhF,8EAA8E;AAC9E,wEAAwE;AACxE,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEhD,8EAA8E;AAC9E,qEAAqE;AACrE,8EAA8E;AAC9E,EAAE;AACF,sEAAsE;AACtE,yEAAyE;AACzE,0EAA0E;AAC1E,0EAA0E;AAC1E,0EAA0E;AAC1E,8EAA8E;AAC9E,0EAA0E;AAC1E,EAAE;AACF,uEAAuE"}
@@ -0,0 +1,34 @@
1
+ /** Host-bound events.publish helper for declared C-2 signals. */
2
+ import { type EventsPublishInput, type EventsPublishResult, type SignalDeclaration, type SignalSchemaCatalog } from '@clowder-ai/plugin-contract';
3
+ import type { LocalHandshakeState } from './handshake-client.js';
4
+ export type EventsPublishErrorCode = 'SESSION_NOT_ACTIVATED' | 'GRANT_MISSING' | 'SESSION_NOT_LIVE' | 'SIGNAL_UNDECLARED' | 'INVALID_DECLARATIONS' | 'INVALID_INPUT' | 'INVALID_RESULT';
5
+ export declare class EventsPublishError extends Error {
6
+ readonly code: EventsPublishErrorCode;
7
+ constructor(code: EventsPublishErrorCode, message: string);
8
+ }
9
+ export interface EventsPublishHostTransport {
10
+ /**
11
+ * Calls the Host Broker. The SDK deliberately supplies no codec, route,
12
+ * credential, producer identity, or provenance field of its own.
13
+ */
14
+ call(method: 'events.publish', input: EventsPublishInput): Promise<unknown>;
15
+ }
16
+ export interface StdioSessionLiveness {
17
+ readonly kind: 'stdio-session';
18
+ /** Host/runtime-owned connection-or-lease verdict; no plugin clock math. */
19
+ isLive(): boolean;
20
+ }
21
+ export interface EventsPublisherOptions {
22
+ readonly transport: EventsPublishHostTransport;
23
+ /** Contract-validated manifest signals.provides snapshot. */
24
+ readonly declaredSignals: readonly SignalDeclaration[];
25
+ /** Host/package-loader-resolved schemas keyed by the declaration schemaRef. */
26
+ readonly signalSchemas: SignalSchemaCatalog;
27
+ readonly getHandshakeState: () => LocalHandshakeState;
28
+ readonly liveness: StdioSessionLiveness;
29
+ }
30
+ export interface EventsPublisher {
31
+ publish(input: unknown): Promise<EventsPublishResult>;
32
+ }
33
+ export declare function createEventsPublisher(options: EventsPublisherOptions): EventsPublisher;
34
+ //# sourceMappingURL=events-publisher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events-publisher.d.ts","sourceRoot":"","sources":["../src/events-publisher.ts"],"names":[],"mappings":"AAAA,iEAAiE;AAEjE,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,MAAM,sBAAsB,GAC9B,uBAAuB,GACvB,eAAe,GACf,kBAAkB,GAClB,mBAAmB,GACnB,sBAAsB,GACtB,eAAe,GACf,gBAAgB,CAAC;AAErB,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;gBAE1B,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM;CAK1D;AAED,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7E;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,4EAA4E;IAC5E,MAAM,IAAI,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,SAAS,EAAE,0BAA0B,CAAC;IAC/C,6DAA6D;IAC7D,QAAQ,CAAC,eAAe,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACvD,+EAA+E;IAC/E,QAAQ,CAAC,aAAa,EAAE,mBAAmB,CAAC;IAC5C,QAAQ,CAAC,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;CACzC;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACvD;AA+BD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CA2CtF"}
@@ -0,0 +1,62 @@
1
+ /** Host-bound events.publish helper for declared C-2 signals. */
2
+ import { validateDeclaredEventsPublishInput, validateEventsPublishResult, } from '@clowder-ai/plugin-contract';
3
+ export class EventsPublishError extends Error {
4
+ code;
5
+ constructor(code, message) {
6
+ super(message);
7
+ this.name = 'EventsPublishError';
8
+ this.code = code;
9
+ }
10
+ }
11
+ function requireLiveSession(options) {
12
+ const state = options.getHandshakeState();
13
+ if (state.phase !== 'activated') {
14
+ throw new EventsPublishError('SESSION_NOT_ACTIVATED', 'events.publish requires an activated Host-bound session');
15
+ }
16
+ if (!state.binding.effectiveGrants.includes('events.publish')) {
17
+ throw new EventsPublishError('GRANT_MISSING', 'the active Host grant snapshot does not include events.publish');
18
+ }
19
+ let live = false;
20
+ try {
21
+ live = options.liveness.isLive();
22
+ }
23
+ catch {
24
+ live = false;
25
+ }
26
+ if (!live) {
27
+ throw new EventsPublishError('SESSION_NOT_LIVE', 'the Host-owned stdio session liveness verdict is not live');
28
+ }
29
+ }
30
+ export function createEventsPublisher(options) {
31
+ return {
32
+ async publish(candidate) {
33
+ requireLiveSession(options);
34
+ const inputValidation = validateDeclaredEventsPublishInput(options.declaredSignals, options.signalSchemas, candidate);
35
+ if (!inputValidation.valid) {
36
+ const keywords = new Set(inputValidation.errors.map(({ keyword }) => keyword));
37
+ const code = keywords.has('declaredSignalType')
38
+ ? 'SIGNAL_UNDECLARED'
39
+ : keywords.has('signalDeclaration') ||
40
+ keywords.has('signalSchemaUnresolved') ||
41
+ keywords.has('signalSchemaInvalid')
42
+ ? 'INVALID_DECLARATIONS'
43
+ : 'INVALID_INPUT';
44
+ throw new EventsPublishError(code, `events.publish input rejected: ${inputValidation.errors
45
+ .map(({ instancePath, message }) => `${instancePath || '/'} ${message}`)
46
+ .join('; ')}`);
47
+ }
48
+ // Snapshot after validation so caller mutation cannot change the value
49
+ // while the transport is serializing it.
50
+ const input = structuredClone(inputValidation.value);
51
+ const result = await options.transport.call('events.publish', input);
52
+ const resultValidation = validateEventsPublishResult(result);
53
+ if (!resultValidation.valid) {
54
+ throw new EventsPublishError('INVALID_RESULT', `events.publish Host result rejected: ${resultValidation.errors
55
+ .map(({ instancePath, message }) => `${instancePath || '/'} ${message}`)
56
+ .join('; ')}`);
57
+ }
58
+ return structuredClone(resultValidation.value);
59
+ },
60
+ };
61
+ }
62
+ //# sourceMappingURL=events-publisher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events-publisher.js","sourceRoot":"","sources":["../src/events-publisher.ts"],"names":[],"mappings":"AAAA,iEAAiE;AAEjE,OAAO,EACL,kCAAkC,EAClC,2BAA2B,GAK5B,MAAM,6BAA6B,CAAC;AAarC,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAClC,IAAI,CAAyB;IAEtC,YAAY,IAA4B,EAAE,OAAe;QACvD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AA8BD,SAAS,kBAAkB,CAAC,OAA+B;IACzD,MAAM,KAAK,GAAG,OAAO,CAAC,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,CAAC,GAAG,CAAC,wBAAwB,CAAC;wBACtC,QAAQ,CAAC,GAAG,CAAC,qBAAqB,CAAC;wBACrC,CAAC,CAAC,sBAAsB;wBACxB,CAAC,CAAC,eAAe,CAAC;gBACtB,MAAM,IAAI,kBAAkB,CAC1B,IAAI,EACJ,kCAAkC,eAAe,CAAC,MAAM;qBACrD,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,GAAG,YAAY,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;qBACvE,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;YACJ,CAAC;YAED,uEAAuE;YACvE,yCAAyC;YACzC,MAAM,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YACrD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;YACrE,MAAM,gBAAgB,GAAG,2BAA2B,CAAC,MAAM,CAAC,CAAC;YAC7D,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;gBAC5B,MAAM,IAAI,kBAAkB,CAC1B,gBAAgB,EAChB,wCAAwC,gBAAgB,CAAC,MAAM;qBAC5D,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,GAAG,YAAY,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;qBACvE,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;YACJ,CAAC;YACD,OAAO,eAAe,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACjD,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { type Capability, type ContentEditorProviderContribution, type ConnectorContribution, type DirectToolContribution, type IdentityContribution, type LimbContribution, type McpContribution, type MessageSubscriptionContribution, type PluginManifest, type ScheduleContribution, type ServiceContribution, type SkillContribution, type StaticContribution, type UiContribution, type WebhookContribution } from '@clowder-ai/plugin-contract';
2
+ export interface FeatureBinding {
3
+ readonly pluginInstanceId: string;
4
+ readonly featureId: string;
5
+ readonly packageRevision: string;
6
+ readonly integrityEpoch: number;
7
+ readonly activationRevision: number;
8
+ readonly grantRevision: number;
9
+ readonly grantedCapabilities: readonly Capability[];
10
+ /** Opaque Host-issued authority. SDK code transports it but never interprets it. */
11
+ readonly executionLease: string;
12
+ }
13
+ export interface HostContributionReceipt {
14
+ readonly registrationId: string;
15
+ readonly registryRevision: number;
16
+ }
17
+ export interface FeatureHostAdapter {
18
+ readConfig(binding: FeatureBinding, key: string): Promise<unknown>;
19
+ readSecret(binding: FeatureBinding, key: string): Promise<string>;
20
+ readState(binding: FeatureBinding, key: string): Promise<unknown>;
21
+ writeState(binding: FeatureBinding, key: string, value: unknown): Promise<void>;
22
+ registerContribution(binding: FeatureBinding, contribution: StaticContribution): Promise<HostContributionReceipt>;
23
+ disposeContribution(binding: FeatureBinding, receipt: HostContributionReceipt): Promise<void>;
24
+ }
25
+ export declare class FeatureContextRevokedError extends Error {
26
+ constructor();
27
+ }
28
+ export declare class ContributionConflictError extends Error {
29
+ constructor(key: string);
30
+ }
31
+ export interface ContributionRegistration {
32
+ readonly key: string;
33
+ readonly receipt: HostContributionReceipt;
34
+ dispose(): Promise<void>;
35
+ }
36
+ type RegistrationInput<T extends StaticContribution> = T extends unknown ? Omit<T, 'type'> : never;
37
+ export interface ContributionRegistrar<T extends StaticContribution> {
38
+ register(input: RegistrationInput<T>): Promise<ContributionRegistration>;
39
+ }
40
+ export interface FeatureContext {
41
+ readonly featureId: string;
42
+ readonly config: {
43
+ get(key: string): Promise<unknown>;
44
+ };
45
+ readonly secrets: {
46
+ get(key: string): Promise<string>;
47
+ };
48
+ readonly state: {
49
+ get(key: string): Promise<unknown>;
50
+ set(key: string, value: unknown): Promise<void>;
51
+ };
52
+ readonly identity: ContributionRegistrar<IdentityContribution>;
53
+ readonly scheduler: ContributionRegistrar<ScheduleContribution>;
54
+ readonly tools: ContributionRegistrar<DirectToolContribution>;
55
+ readonly mcp: ContributionRegistrar<McpContribution>;
56
+ readonly skills: ContributionRegistrar<SkillContribution>;
57
+ readonly limbs: ContributionRegistrar<LimbContribution>;
58
+ readonly webhooks: ContributionRegistrar<WebhookContribution>;
59
+ readonly messaging: {
60
+ readonly subscribe: ContributionRegistrar<MessageSubscriptionContribution>['register'];
61
+ };
62
+ readonly services: ContributionRegistrar<ServiceContribution>;
63
+ readonly connectors: ContributionRegistrar<ConnectorContribution>;
64
+ readonly ui: ContributionRegistrar<UiContribution>;
65
+ readonly contentEditors: ContributionRegistrar<ContentEditorProviderContribution>;
66
+ }
67
+ export interface FeatureContextSession {
68
+ readonly context: FeatureContext;
69
+ revoke(): Promise<void>;
70
+ }
71
+ /**
72
+ * Creates the author-facing context around a Host-issued binding.
73
+ *
74
+ * This helper does not grant authority: every adapter operation carries the opaque lease and the Host
75
+ * remains responsible for verifying its signature, revisions, grants, integrity epoch, and liveness.
76
+ */
77
+ export declare function createFeatureContextSession(binding: FeatureBinding, adapter: FeatureHostAdapter): FeatureContextSession;
78
+ export type FeatureActivator = (context: FeatureContext) => void | Promise<void>;
79
+ export interface PluginDefinitionInput {
80
+ readonly manifest: unknown;
81
+ readonly activate?: Readonly<Record<string, FeatureActivator>>;
82
+ }
83
+ export interface DefinedPlugin {
84
+ readonly manifest: PluginManifest;
85
+ readonly activate: Readonly<Record<string, FeatureActivator>>;
86
+ }
87
+ /** Validate one manifest truth and bind only activators for declared feature IDs. */
88
+ export declare function definePlugin(input: PluginDefinitionInput): DefinedPlugin;
89
+ export {};
90
+ //# sourceMappingURL=feature-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-context.d.ts","sourceRoot":"","sources":["../src/feature-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,iCAAiC,EACtC,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,oBA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