@moltzap/protocol 2026.408.0 → 2026.425.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/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/rpc-registry.d.ts +446 -0
- package/dist/rpc-registry.d.ts.map +1 -0
- package/dist/rpc-registry.js +67 -0
- package/dist/rpc-registry.js.map +1 -0
- package/dist/rpc.d.ts +42 -0
- package/dist/rpc.d.ts.map +1 -0
- package/dist/rpc.js +29 -0
- package/dist/rpc.js.map +1 -0
- package/dist/schema/apps.d.ts +86 -0
- package/dist/schema/apps.d.ts.map +1 -0
- package/dist/schema/apps.js +77 -0
- package/dist/schema/apps.js.map +1 -0
- package/dist/schema/contacts.d.ts +8 -18
- package/dist/schema/contacts.d.ts.map +1 -1
- package/dist/schema/contacts.js +9 -13
- package/dist/schema/contacts.js.map +1 -1
- package/dist/schema/conversations.d.ts +15 -8
- package/dist/schema/conversations.d.ts.map +1 -1
- package/dist/schema/conversations.js +18 -7
- package/dist/schema/conversations.js.map +1 -1
- package/dist/schema/delivery.d.ts +1 -4
- package/dist/schema/delivery.d.ts.map +1 -1
- package/dist/schema/delivery.js +2 -3
- package/dist/schema/delivery.js.map +1 -1
- package/dist/schema/errors.d.ts +13 -0
- package/dist/schema/errors.d.ts.map +1 -1
- package/dist/schema/errors.js +14 -0
- package/dist/schema/errors.js.map +1 -1
- package/dist/schema/events.d.ts +112 -93
- package/dist/schema/events.d.ts.map +1 -1
- package/dist/schema/events.js +84 -25
- package/dist/schema/events.js.map +1 -1
- package/dist/schema/identity.d.ts +19 -17
- package/dist/schema/identity.d.ts.map +1 -1
- package/dist/schema/identity.js +7 -14
- package/dist/schema/identity.js.map +1 -1
- package/dist/schema/index.d.ts +4 -2
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +4 -2
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/messages.d.ts +3 -7
- package/dist/schema/messages.d.ts.map +1 -1
- package/dist/schema/messages.js +4 -6
- package/dist/schema/messages.js.map +1 -1
- package/dist/schema/methods/apps.d.ts +123 -0
- package/dist/schema/methods/apps.d.ts.map +1 -0
- package/dist/schema/methods/apps.js +93 -0
- package/dist/schema/methods/apps.js.map +1 -0
- package/dist/schema/methods/auth.d.ts +102 -90
- package/dist/schema/methods/auth.d.ts.map +1 -1
- package/dist/schema/methods/auth.js +86 -74
- package/dist/schema/methods/auth.js.map +1 -1
- package/dist/schema/methods/contacts.d.ts +39 -74
- package/dist/schema/methods/contacts.d.ts.map +1 -1
- package/dist/schema/methods/contacts.js +35 -29
- package/dist/schema/methods/contacts.js.map +1 -1
- package/dist/schema/methods/conversations.d.ts +48 -52
- package/dist/schema/methods/conversations.d.ts.map +1 -1
- package/dist/schema/methods/conversations.js +89 -38
- package/dist/schema/methods/conversations.js.map +1 -1
- package/dist/schema/methods/invites.d.ts +1 -3
- package/dist/schema/methods/invites.d.ts.map +1 -1
- package/dist/schema/methods/invites.js +8 -1
- package/dist/schema/methods/invites.js.map +1 -1
- package/dist/schema/methods/messages.d.ts +12 -44
- package/dist/schema/methods/messages.d.ts.map +1 -1
- package/dist/schema/methods/messages.js +22 -28
- package/dist/schema/methods/messages.js.map +1 -1
- package/dist/schema/methods/presence.d.ts +7 -22
- package/dist/schema/methods/presence.d.ts.map +1 -1
- package/dist/schema/methods/presence.js +12 -6
- package/dist/schema/methods/presence.js.map +1 -1
- package/dist/schema/methods/push.d.ts +8 -6
- package/dist/schema/methods/push.d.ts.map +1 -1
- package/dist/schema/methods/push.js +20 -7
- package/dist/schema/methods/push.js.map +1 -1
- package/dist/schema/methods/system.d.ts +4 -0
- package/dist/schema/methods/system.d.ts.map +1 -0
- package/dist/schema/methods/system.js +11 -0
- package/dist/schema/methods/system.js.map +1 -0
- package/dist/schema/presence.d.ts +1 -12
- package/dist/schema/presence.d.ts.map +1 -1
- package/dist/schema/presence.js +2 -7
- package/dist/schema/presence.js.map +1 -1
- package/dist/schema/surfaces.d.ts +31 -25
- package/dist/schema/surfaces.d.ts.map +1 -1
- package/dist/schema/surfaces.js +40 -21
- package/dist/schema/surfaces.js.map +1 -1
- package/dist/testing/agent-registration.d.ts +49 -0
- package/dist/testing/agent-registration.d.ts.map +1 -0
- package/dist/testing/agent-registration.js +77 -0
- package/dist/testing/agent-registration.js.map +1 -0
- package/dist/testing/arbitraries/frames.d.ts +24 -0
- package/dist/testing/arbitraries/frames.d.ts.map +1 -0
- package/dist/testing/arbitraries/frames.js +36 -0
- package/dist/testing/arbitraries/frames.js.map +1 -0
- package/dist/testing/arbitraries/from-typebox.d.ts +37 -0
- package/dist/testing/arbitraries/from-typebox.d.ts.map +1 -0
- package/dist/testing/arbitraries/from-typebox.js +131 -0
- package/dist/testing/arbitraries/from-typebox.js.map +1 -0
- package/dist/testing/arbitraries/index.d.ts +4 -0
- package/dist/testing/arbitraries/index.d.ts.map +1 -0
- package/dist/testing/arbitraries/index.js +4 -0
- package/dist/testing/arbitraries/index.js.map +1 -0
- package/dist/testing/arbitraries/rpc.d.ts +66 -0
- package/dist/testing/arbitraries/rpc.d.ts.map +1 -0
- package/dist/testing/arbitraries/rpc.js +98 -0
- package/dist/testing/arbitraries/rpc.js.map +1 -0
- package/dist/testing/canonicalize.d.ts +38 -0
- package/dist/testing/canonicalize.d.ts.map +1 -0
- package/dist/testing/canonicalize.js +55 -0
- package/dist/testing/canonicalize.js.map +1 -0
- package/dist/testing/captures.d.ts +61 -0
- package/dist/testing/captures.d.ts.map +1 -0
- package/dist/testing/captures.js +99 -0
- package/dist/testing/captures.js.map +1 -0
- package/dist/testing/codec.d.ts +44 -0
- package/dist/testing/codec.d.ts.map +1 -0
- package/dist/testing/codec.js +170 -0
- package/dist/testing/codec.js.map +1 -0
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.d.ts +6 -0
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.d.ts.map +1 -0
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.js +33 -0
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.js.map +1 -0
- package/dist/testing/conformance/adversity.d.ts +36 -0
- package/dist/testing/conformance/adversity.d.ts.map +1 -0
- package/dist/testing/conformance/adversity.js +360 -0
- package/dist/testing/conformance/adversity.js.map +1 -0
- package/dist/testing/conformance/boundary.d.ts +56 -0
- package/dist/testing/conformance/boundary.d.ts.map +1 -0
- package/dist/testing/conformance/boundary.js +129 -0
- package/dist/testing/conformance/boundary.js.map +1 -0
- package/dist/testing/conformance/client/_fixtures.d.ts +71 -0
- package/dist/testing/conformance/client/_fixtures.d.ts.map +1 -0
- package/dist/testing/conformance/client/_fixtures.js +102 -0
- package/dist/testing/conformance/client/_fixtures.js.map +1 -0
- package/dist/testing/conformance/client/adversity.d.ts +39 -0
- package/dist/testing/conformance/client/adversity.d.ts.map +1 -0
- package/dist/testing/conformance/client/adversity.js +162 -0
- package/dist/testing/conformance/client/adversity.js.map +1 -0
- package/dist/testing/conformance/client/boundary.d.ts +12 -0
- package/dist/testing/conformance/client/boundary.d.ts.map +1 -0
- package/dist/testing/conformance/client/boundary.js +68 -0
- package/dist/testing/conformance/client/boundary.js.map +1 -0
- package/dist/testing/conformance/client/delivery.d.ts +38 -0
- package/dist/testing/conformance/client/delivery.d.ts.map +1 -0
- package/dist/testing/conformance/client/delivery.js +202 -0
- package/dist/testing/conformance/client/delivery.js.map +1 -0
- package/dist/testing/conformance/client/index.d.ts +16 -0
- package/dist/testing/conformance/client/index.d.ts.map +1 -0
- package/dist/testing/conformance/client/index.js +16 -0
- package/dist/testing/conformance/client/index.js.map +1 -0
- package/dist/testing/conformance/client/rpc-semantics.d.ts +26 -0
- package/dist/testing/conformance/client/rpc-semantics.d.ts.map +1 -0
- package/dist/testing/conformance/client/rpc-semantics.js +145 -0
- package/dist/testing/conformance/client/rpc-semantics.js.map +1 -0
- package/dist/testing/conformance/client/runner.d.ts +258 -0
- package/dist/testing/conformance/client/runner.d.ts.map +1 -0
- package/dist/testing/conformance/client/runner.js +228 -0
- package/dist/testing/conformance/client/runner.js.map +1 -0
- package/dist/testing/conformance/client/schema-conformance.d.ts +25 -0
- package/dist/testing/conformance/client/schema-conformance.d.ts.map +1 -0
- package/dist/testing/conformance/client/schema-conformance.js +123 -0
- package/dist/testing/conformance/client/schema-conformance.js.map +1 -0
- package/dist/testing/conformance/client/suite.d.ts +90 -0
- package/dist/testing/conformance/client/suite.d.ts.map +1 -0
- package/dist/testing/conformance/client/suite.js +209 -0
- package/dist/testing/conformance/client/suite.js.map +1 -0
- package/dist/testing/conformance/coverage-policy.d.ts +8 -0
- package/dist/testing/conformance/coverage-policy.d.ts.map +1 -0
- package/dist/testing/conformance/coverage-policy.js +10 -0
- package/dist/testing/conformance/coverage-policy.js.map +1 -0
- package/dist/testing/conformance/delivery.d.ts +40 -0
- package/dist/testing/conformance/delivery.d.ts.map +1 -0
- package/dist/testing/conformance/delivery.js +231 -0
- package/dist/testing/conformance/delivery.js.map +1 -0
- package/dist/testing/conformance/env.d.ts +3 -0
- package/dist/testing/conformance/env.d.ts.map +1 -0
- package/dist/testing/conformance/env.js +14 -0
- package/dist/testing/conformance/env.js.map +1 -0
- package/dist/testing/conformance/index.d.ts +10 -0
- package/dist/testing/conformance/index.d.ts.map +1 -0
- package/dist/testing/conformance/index.js +10 -0
- package/dist/testing/conformance/index.js.map +1 -0
- package/dist/testing/conformance/registry.d.ts +93 -0
- package/dist/testing/conformance/registry.d.ts.map +1 -0
- package/dist/testing/conformance/registry.js +62 -0
- package/dist/testing/conformance/registry.js.map +1 -0
- package/dist/testing/conformance/rpc-semantics.d.ts +67 -0
- package/dist/testing/conformance/rpc-semantics.d.ts.map +1 -0
- package/dist/testing/conformance/rpc-semantics.js +394 -0
- package/dist/testing/conformance/rpc-semantics.js.map +1 -0
- package/dist/testing/conformance/runner.d.ts +78 -0
- package/dist/testing/conformance/runner.d.ts.map +1 -0
- package/dist/testing/conformance/runner.js +65 -0
- package/dist/testing/conformance/runner.js.map +1 -0
- package/dist/testing/conformance/schema-conformance.d.ts +30 -0
- package/dist/testing/conformance/schema-conformance.d.ts.map +1 -0
- package/dist/testing/conformance/schema-conformance.js +229 -0
- package/dist/testing/conformance/schema-conformance.js.map +1 -0
- package/dist/testing/conformance/suite.d.ts +92 -0
- package/dist/testing/conformance/suite.d.ts.map +1 -0
- package/dist/testing/conformance/suite.js +233 -0
- package/dist/testing/conformance/suite.js.map +1 -0
- package/dist/testing/errors.d.ts +78 -0
- package/dist/testing/errors.d.ts.map +1 -0
- package/dist/testing/errors.js +34 -0
- package/dist/testing/errors.js.map +1 -0
- package/dist/testing/index.d.ts +25 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +37 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/models/dispatch.d.ts +61 -0
- package/dist/testing/models/dispatch.d.ts.map +1 -0
- package/dist/testing/models/dispatch.js +197 -0
- package/dist/testing/models/dispatch.js.map +1 -0
- package/dist/testing/models/index.d.ts +3 -0
- package/dist/testing/models/index.d.ts.map +1 -0
- package/dist/testing/models/index.js +3 -0
- package/dist/testing/models/index.js.map +1 -0
- package/dist/testing/models/state.d.ts +37 -0
- package/dist/testing/models/state.d.ts.map +1 -0
- package/dist/testing/models/state.js +14 -0
- package/dist/testing/models/state.js.map +1 -0
- package/dist/testing/test-client.d.ts +70 -0
- package/dist/testing/test-client.d.ts.map +1 -0
- package/dist/testing/test-client.js +266 -0
- package/dist/testing/test-client.js.map +1 -0
- package/dist/testing/test-server.d.ts +62 -0
- package/dist/testing/test-server.d.ts.map +1 -0
- package/dist/testing/test-server.js +134 -0
- package/dist/testing/test-server.js.map +1 -0
- package/dist/testing/toxics/client.d.ts +52 -0
- package/dist/testing/toxics/client.d.ts.map +1 -0
- package/dist/testing/toxics/client.js +120 -0
- package/dist/testing/toxics/client.js.map +1 -0
- package/dist/testing/toxics/defaults.d.ts +43 -0
- package/dist/testing/toxics/defaults.d.ts.map +1 -0
- package/dist/testing/toxics/defaults.js +9 -0
- package/dist/testing/toxics/defaults.js.map +1 -0
- package/dist/testing/toxics/index.d.ts +4 -0
- package/dist/testing/toxics/index.d.ts.map +1 -0
- package/dist/testing/toxics/index.js +4 -0
- package/dist/testing/toxics/index.js.map +1 -0
- package/dist/testing/toxics/profile.d.ts +69 -0
- package/dist/testing/toxics/profile.d.ts.map +1 -0
- package/dist/testing/toxics/profile.js +57 -0
- package/dist/testing/toxics/profile.js.map +1 -0
- package/dist/types.d.ts +7 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -1
- package/dist/validators.d.ts +49 -177
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +77 -48
- package/dist/validators.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +18 -40
- package/LICENSE +0 -21
- package/dist/optional/contact-events.d.ts +0 -3
- package/dist/optional/contact-events.d.ts.map +0 -1
- package/dist/optional/contact-events.js +0 -5
- package/dist/optional/contact-events.js.map +0 -1
- package/dist/optional/contact-methods.d.ts +0 -5
- package/dist/optional/contact-methods.d.ts.map +0 -1
- package/dist/optional/contact-methods.js +0 -5
- package/dist/optional/contact-methods.js.map +0 -1
- package/dist/phone-hash.d.ts +0 -10
- package/dist/phone-hash.d.ts.map +0 -1
- package/dist/phone-hash.js +0 -17
- package/dist/phone-hash.js.map +0 -1
- package/dist/schema/methods/phone-contacts.d.ts +0 -30
- package/dist/schema/methods/phone-contacts.d.ts.map +0 -1
- package/dist/schema/methods/phone-contacts.js +0 -10
- package/dist/schema/methods/phone-contacts.js.map +0 -1
- package/dist/test-client.d.ts +0 -34
- package/dist/test-client.d.ts.map +0 -1
- package/dist/test-client.js +0 -176
- package/dist/test-client.js.map +0 -1
- package/dist/test-fixtures/phone-hashes.d.ts +0 -18
- package/dist/test-fixtures/phone-hashes.d.ts.map +0 -1
- package/dist/test-fixtures/phone-hashes.js +0 -24
- package/dist/test-fixtures/phone-hashes.js.map +0 -1
package/dist/rpc.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {} from "@sinclair/typebox";
|
|
2
|
+
import Ajv from "ajv";
|
|
3
|
+
import addFormats from "ajv-formats";
|
|
4
|
+
/**
|
|
5
|
+
* Shared AJV instance across every `defineRpc` call. Pre-compiles each
|
|
6
|
+
* `params` schema once at module load so validation is a single function
|
|
7
|
+
* call per inbound RPC — no per-call compilation cost on the hot path.
|
|
8
|
+
*/
|
|
9
|
+
const ajv = addFormats(new Ajv({ strict: true, allErrors: true }));
|
|
10
|
+
/**
|
|
11
|
+
* Build an `RpcDefinition` from a TypeBox params + result schema. Compiles
|
|
12
|
+
* the params validator at call time. Result schema is carried along but
|
|
13
|
+
* not currently validated on the wire (clients trust server output).
|
|
14
|
+
*/
|
|
15
|
+
export function defineRpc(def) {
|
|
16
|
+
return {
|
|
17
|
+
name: def.name,
|
|
18
|
+
paramsSchema: def.params,
|
|
19
|
+
resultSchema: def.result,
|
|
20
|
+
validateParams: ajv.compile(def.params),
|
|
21
|
+
// Phantom — never read at runtime. Typed as `Static<P>` so
|
|
22
|
+
// `typeof def.Params` at the type level yields the params type.
|
|
23
|
+
// #ignore-sloppy-code-next-line[as-unknown-as]: TS phantom-type witness; runtime is null, type carrier only
|
|
24
|
+
Params: null,
|
|
25
|
+
// #ignore-sloppy-code-next-line[as-unknown-as]: TS phantom-type witness; runtime is null, type carrier only
|
|
26
|
+
Result: null,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=rpc.js.map
|
package/dist/rpc.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,MAAM,mBAAmB,CAAC;AAC9D,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,UAAU,MAAM,aAAa,CAAC;AAQrC;;;;GAIG;AACH,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AA4BnE;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAIvB,GAAyC;IACzC,OAAO;QACL,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,YAAY,EAAE,GAAG,CAAC,MAAM;QACxB,YAAY,EAAE,GAAG,CAAC,MAAM;QACxB,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;QACvC,2DAA2D;QAC3D,gEAAgE;QAChE,4GAA4G;QAC5G,MAAM,EAAE,IAA4B;QACpC,4GAA4G;QAC5G,MAAM,EAAE,IAA4B;KACrC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type Static } from "@sinclair/typebox";
|
|
2
|
+
export declare const AppSessionId: import("@sinclair/typebox").TString;
|
|
3
|
+
export declare const AppParticipantStatusEnum: import("@sinclair/typebox").TUnsafe<"pending" | "admitted" | "rejected">;
|
|
4
|
+
export declare const AppPermissionSchema: import("@sinclair/typebox").TObject<{
|
|
5
|
+
resource: import("@sinclair/typebox").TString;
|
|
6
|
+
access: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const AppManifestConversationSchema: import("@sinclair/typebox").TObject<{
|
|
9
|
+
key: import("@sinclair/typebox").TString;
|
|
10
|
+
name: import("@sinclair/typebox").TString;
|
|
11
|
+
participantFilter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"all" | "initiator" | "none">>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const AppManifestSchema: import("@sinclair/typebox").TObject<{
|
|
14
|
+
appId: import("@sinclair/typebox").TString;
|
|
15
|
+
name: import("@sinclair/typebox").TString;
|
|
16
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
17
|
+
permissions: import("@sinclair/typebox").TObject<{
|
|
18
|
+
required: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
19
|
+
resource: import("@sinclair/typebox").TString;
|
|
20
|
+
access: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
21
|
+
}>>;
|
|
22
|
+
optional: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
23
|
+
resource: import("@sinclair/typebox").TString;
|
|
24
|
+
access: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
25
|
+
}>>;
|
|
26
|
+
}>;
|
|
27
|
+
skillUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
28
|
+
skillMinVersion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
29
|
+
challengeTimeoutMs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
30
|
+
permissionTimeoutMs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
31
|
+
limits: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
32
|
+
maxParticipants: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
33
|
+
}>>;
|
|
34
|
+
conversations: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
35
|
+
key: import("@sinclair/typebox").TString;
|
|
36
|
+
name: import("@sinclair/typebox").TString;
|
|
37
|
+
participantFilter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"all" | "initiator" | "none">>;
|
|
38
|
+
}>>>;
|
|
39
|
+
hooks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
40
|
+
before_message_delivery: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
41
|
+
/**
|
|
42
|
+
* Optional HTTPS endpoint. When set the MoltZap server POSTs
|
|
43
|
+
* hook context to this URL instead of dispatching to an
|
|
44
|
+
* in-process handler. Body and response shape are documented
|
|
45
|
+
* in `docs/guides/app-hooks.mdx`.
|
|
46
|
+
*/
|
|
47
|
+
webhook: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
48
|
+
timeout_ms: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
49
|
+
}>>;
|
|
50
|
+
on_join: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
51
|
+
webhook: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
52
|
+
timeout_ms: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
53
|
+
}>>;
|
|
54
|
+
on_close: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
55
|
+
webhook: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
56
|
+
timeout_ms: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
57
|
+
}>>;
|
|
58
|
+
on_session_active: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
59
|
+
webhook: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
60
|
+
timeout_ms: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
61
|
+
}>>;
|
|
62
|
+
/**
|
|
63
|
+
* Optional shared secret used to HMAC-SHA256 sign outbound webhook
|
|
64
|
+
* bodies. The signature is sent as `X-MoltZap-Signature:
|
|
65
|
+
* sha256=<hex>`. If unset, webhooks are sent unsigned — apps
|
|
66
|
+
* should only configure webhook URLs on trusted private networks
|
|
67
|
+
* in that case.
|
|
68
|
+
*/
|
|
69
|
+
secret: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
70
|
+
}>>;
|
|
71
|
+
}>;
|
|
72
|
+
export declare const AppSessionSchema: import("@sinclair/typebox").TObject<{
|
|
73
|
+
id: import("@sinclair/typebox").TString;
|
|
74
|
+
appId: import("@sinclair/typebox").TString;
|
|
75
|
+
initiatorAgentId: import("@sinclair/typebox").TString;
|
|
76
|
+
status: import("@sinclair/typebox").TUnsafe<"active" | "waiting" | "failed" | "closed">;
|
|
77
|
+
conversations: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
78
|
+
createdAt: import("@sinclair/typebox").TString;
|
|
79
|
+
closedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
80
|
+
}>;
|
|
81
|
+
export type AppPermission = Static<typeof AppPermissionSchema>;
|
|
82
|
+
export type AppManifest = Static<typeof AppManifestSchema>;
|
|
83
|
+
export type AppManifestConversation = Static<typeof AppManifestConversationSchema>;
|
|
84
|
+
export type AppSession = Static<typeof AppSessionSchema>;
|
|
85
|
+
export type AppParticipantStatus = Static<typeof AppParticipantStatusEnum>;
|
|
86
|
+
//# sourceMappingURL=apps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/schema/apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,YAAY,qCAA4B,CAAC;AAEtD,eAAO,MAAM,wBAAwB,0EAInC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;EAM/B,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;EAOzC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA+Bd;;;;;eAKG;;;;;;;;;;;;;;;;QA0CT;;;;;;WAMG;;;EAQZ,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;EAW5B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAC/D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC3D,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACzD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { stringEnum, brandedId, DateTimeString } from "../helpers.js";
|
|
3
|
+
import { AgentId, ConversationId } from "./primitives.js";
|
|
4
|
+
export const AppSessionId = brandedId("AppSessionId");
|
|
5
|
+
export const AppParticipantStatusEnum = stringEnum([
|
|
6
|
+
"pending",
|
|
7
|
+
"admitted",
|
|
8
|
+
"rejected",
|
|
9
|
+
]);
|
|
10
|
+
export const AppPermissionSchema = Type.Object({
|
|
11
|
+
resource: Type.String(),
|
|
12
|
+
access: Type.Array(Type.String()),
|
|
13
|
+
}, { additionalProperties: false });
|
|
14
|
+
export const AppManifestConversationSchema = Type.Object({
|
|
15
|
+
key: Type.String(),
|
|
16
|
+
name: Type.String(),
|
|
17
|
+
participantFilter: Type.Optional(stringEnum(["all", "initiator", "none"])),
|
|
18
|
+
}, { additionalProperties: false });
|
|
19
|
+
export const AppManifestSchema = Type.Object({
|
|
20
|
+
appId: Type.String(),
|
|
21
|
+
name: Type.String(),
|
|
22
|
+
description: Type.Optional(Type.String()),
|
|
23
|
+
permissions: Type.Object({
|
|
24
|
+
required: Type.Array(AppPermissionSchema),
|
|
25
|
+
optional: Type.Array(AppPermissionSchema),
|
|
26
|
+
}, { additionalProperties: false }),
|
|
27
|
+
skillUrl: Type.Optional(Type.String()),
|
|
28
|
+
skillMinVersion: Type.Optional(Type.String()),
|
|
29
|
+
challengeTimeoutMs: Type.Optional(Type.Integer({ default: 30000 })),
|
|
30
|
+
permissionTimeoutMs: Type.Optional(Type.Integer({ default: 120000 })),
|
|
31
|
+
limits: Type.Optional(Type.Object({
|
|
32
|
+
maxParticipants: Type.Optional(Type.Integer({ default: 50 })),
|
|
33
|
+
}, { additionalProperties: false })),
|
|
34
|
+
conversations: Type.Optional(Type.Array(AppManifestConversationSchema)),
|
|
35
|
+
hooks: Type.Optional(Type.Object({
|
|
36
|
+
before_message_delivery: Type.Optional(Type.Object({
|
|
37
|
+
/**
|
|
38
|
+
* Optional HTTPS endpoint. When set the MoltZap server POSTs
|
|
39
|
+
* hook context to this URL instead of dispatching to an
|
|
40
|
+
* in-process handler. Body and response shape are documented
|
|
41
|
+
* in `docs/guides/app-hooks.mdx`.
|
|
42
|
+
*/
|
|
43
|
+
webhook: Type.Optional(Type.String({ format: "uri" })),
|
|
44
|
+
timeout_ms: Type.Optional(Type.Integer({ default: 5000, minimum: 100, maximum: 30000 })),
|
|
45
|
+
}, { additionalProperties: false })),
|
|
46
|
+
on_join: Type.Optional(Type.Object({
|
|
47
|
+
webhook: Type.Optional(Type.String({ format: "uri" })),
|
|
48
|
+
timeout_ms: Type.Optional(Type.Integer({ default: 5000, minimum: 100, maximum: 30000 })),
|
|
49
|
+
}, { additionalProperties: false })),
|
|
50
|
+
on_close: Type.Optional(Type.Object({
|
|
51
|
+
webhook: Type.Optional(Type.String({ format: "uri" })),
|
|
52
|
+
timeout_ms: Type.Optional(Type.Integer({ default: 5000, minimum: 100, maximum: 30000 })),
|
|
53
|
+
}, { additionalProperties: false })),
|
|
54
|
+
on_session_active: Type.Optional(Type.Object({
|
|
55
|
+
webhook: Type.Optional(Type.String({ format: "uri" })),
|
|
56
|
+
timeout_ms: Type.Optional(Type.Integer({ default: 5000, minimum: 100, maximum: 30000 })),
|
|
57
|
+
}, { additionalProperties: false })),
|
|
58
|
+
/**
|
|
59
|
+
* Optional shared secret used to HMAC-SHA256 sign outbound webhook
|
|
60
|
+
* bodies. The signature is sent as `X-MoltZap-Signature:
|
|
61
|
+
* sha256=<hex>`. If unset, webhooks are sent unsigned — apps
|
|
62
|
+
* should only configure webhook URLs on trusted private networks
|
|
63
|
+
* in that case.
|
|
64
|
+
*/
|
|
65
|
+
secret: Type.Optional(Type.String()),
|
|
66
|
+
}, { additionalProperties: false })),
|
|
67
|
+
}, { additionalProperties: false });
|
|
68
|
+
export const AppSessionSchema = Type.Object({
|
|
69
|
+
id: AppSessionId,
|
|
70
|
+
appId: Type.String(),
|
|
71
|
+
initiatorAgentId: AgentId,
|
|
72
|
+
status: stringEnum(["waiting", "active", "failed", "closed"]),
|
|
73
|
+
conversations: Type.Record(Type.String(), ConversationId),
|
|
74
|
+
createdAt: DateTimeString,
|
|
75
|
+
closedAt: Type.Optional(DateTimeString),
|
|
76
|
+
}, { additionalProperties: false });
|
|
77
|
+
//# sourceMappingURL=apps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.js","sourceRoot":"","sources":["../../src/schema/apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1D,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAC;IACjD,SAAS;IACT,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAC5C;IACE,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;IACvB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;CAClC,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,MAAM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|
|
|
1
1
|
import { type Static } from "@sinclair/typebox";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ContactSourceEnum: import("@sinclair/typebox").TUnsafe<"email" | "phone" | "manual">;
|
|
3
|
+
export declare const RelationshipType: import("@sinclair/typebox").TString;
|
|
3
4
|
export declare const ContactSchema: import("@sinclair/typebox").TObject<{
|
|
4
5
|
id: import("@sinclair/typebox").TString;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
targetName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
|
-
targetPhone: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
13
|
-
agents: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
14
|
-
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15
|
-
id: import("@sinclair/typebox").TString;
|
|
16
|
-
displayName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
17
|
-
status: import("@sinclair/typebox").TUnsafe<"active" | "pending_claim" | "suspended">;
|
|
18
|
-
ownerUserId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
19
|
-
name: import("@sinclair/typebox").TString;
|
|
20
|
-
}>>>;
|
|
21
|
-
lastSeenAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6
|
+
contactUserId: import("@sinclair/typebox").TString;
|
|
7
|
+
source: import("@sinclair/typebox").TUnsafe<"email" | "phone" | "manual">;
|
|
8
|
+
relationship: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
10
|
+
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>>>;
|
|
11
|
+
}>>;
|
|
22
12
|
}>;
|
|
23
13
|
export type Contact = Static<typeof ContactSchema>;
|
|
24
14
|
//# sourceMappingURL=contacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/schema/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/schema/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,iBAAiB,mEAA2C,CAAC;AAE1E,eAAO,MAAM,gBAAgB,qCAAgB,CAAC;AAE9C,eAAO,MAAM,aAAa;;;;;;;;EAkBzB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/dist/schema/contacts.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { stringEnum
|
|
2
|
+
import { stringEnum } from "../helpers.js";
|
|
3
3
|
import { ContactId, UserId } from "./primitives.js";
|
|
4
|
-
|
|
5
|
-
export const
|
|
4
|
+
export const ContactSourceEnum = stringEnum(["phone", "manual", "email"]);
|
|
5
|
+
export const RelationshipType = Type.String();
|
|
6
6
|
export const ContactSchema = Type.Object({
|
|
7
7
|
id: ContactId,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
targetName: Type.Optional(Type.String()),
|
|
15
|
-
targetPhone: Type.Optional(Type.String()),
|
|
16
|
-
agents: Type.Optional(Type.Array(AgentCardSchema)),
|
|
17
|
-
lastSeenAt: Type.Optional(Type.String({ format: "date-time" })),
|
|
8
|
+
contactUserId: UserId,
|
|
9
|
+
source: ContactSourceEnum,
|
|
10
|
+
relationship: Type.Optional(RelationshipType),
|
|
11
|
+
metadata: Type.Optional(Type.Object({
|
|
12
|
+
tags: Type.Optional(Type.Array(Type.Record(Type.String(), Type.String()))),
|
|
13
|
+
}, { additionalProperties: false })),
|
|
18
14
|
}, { additionalProperties: false });
|
|
19
15
|
//# sourceMappingURL=contacts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/schema/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/schema/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CACtC;IACE,EAAE,EAAE,SAAS;IACb,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,iBAAiB;IACzB,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC7C,QAAQ,EAAE,IAAI,CAAC,QAAQ,CACrB,IAAI,CAAC,MAAM,CACT;QACE,IAAI,EAAE,IAAI,CAAC,QAAQ,CACjB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CACtD;KACF,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CACF;CACF,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC"}
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import { type Static } from "@sinclair/typebox";
|
|
2
2
|
export declare const ConversationTypeEnum: import("@sinclair/typebox").TUnsafe<"dm" | "group">;
|
|
3
3
|
export declare const ParticipantRoleEnum: import("@sinclair/typebox").TUnsafe<"owner" | "admin" | "member">;
|
|
4
|
+
export declare const ConversationMetadataSchema: import("@sinclair/typebox").TObject<{
|
|
5
|
+
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>>>;
|
|
6
|
+
}>;
|
|
4
7
|
export declare const ConversationSchema: import("@sinclair/typebox").TObject<{
|
|
5
8
|
id: import("@sinclair/typebox").TString;
|
|
6
9
|
type: import("@sinclair/typebox").TUnsafe<"dm" | "group">;
|
|
7
10
|
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
|
-
createdBy: import("@sinclair/typebox").
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
11
|
+
createdBy: import("@sinclair/typebox").TString;
|
|
12
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
13
|
+
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>>>;
|
|
14
|
+
}>>;
|
|
15
|
+
lastMessageTimestamp: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
16
|
createdAt: import("@sinclair/typebox").TString;
|
|
13
17
|
updatedAt: import("@sinclair/typebox").TString;
|
|
14
18
|
}>;
|
|
15
19
|
export declare const ConversationParticipantSchema: import("@sinclair/typebox").TObject<{
|
|
16
20
|
conversationId: import("@sinclair/typebox").TString;
|
|
17
21
|
participant: import("@sinclair/typebox").TObject<{
|
|
18
|
-
type: import("@sinclair/typebox").TUnsafe<"
|
|
22
|
+
type: import("@sinclair/typebox").TUnsafe<"agent">;
|
|
19
23
|
id: import("@sinclair/typebox").TString;
|
|
20
24
|
}>;
|
|
21
25
|
role: import("@sinclair/typebox").TUnsafe<"owner" | "admin" | "member">;
|
|
22
26
|
joinedAt: import("@sinclair/typebox").TString;
|
|
23
|
-
|
|
27
|
+
lastReadMessageId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
24
28
|
mutedUntil: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25
29
|
agentName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
26
30
|
agentDisplayName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -30,10 +34,13 @@ export declare const ConversationSummarySchema: import("@sinclair/typebox").TObj
|
|
|
30
34
|
type: import("@sinclair/typebox").TUnsafe<"dm" | "group">;
|
|
31
35
|
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
32
36
|
lastMessagePreview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
33
|
-
|
|
37
|
+
lastMessageTimestamp: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
34
38
|
unreadCount: import("@sinclair/typebox").TInteger;
|
|
39
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
40
|
+
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>>>;
|
|
41
|
+
}>>;
|
|
35
42
|
participants: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
36
|
-
type: import("@sinclair/typebox").TUnsafe<"
|
|
43
|
+
type: import("@sinclair/typebox").TUnsafe<"agent">;
|
|
37
44
|
id: import("@sinclair/typebox").TString;
|
|
38
45
|
}>>>;
|
|
39
46
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/schema/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/schema/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,oBAAoB,qDAA8B,CAAC;AAChE,eAAO,MAAM,mBAAmB,mEAA2C,CAAC;AAE5E,eAAO,MAAM,0BAA0B;;EAKtC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;EAY9B,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAkBzC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;EAsBrC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC7D,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
2
|
import { stringEnum, DateTimeString } from "../helpers.js";
|
|
3
|
-
import { ConversationId } from "./primitives.js";
|
|
4
|
-
import { ParticipantRefSchema } from "./identity.js";
|
|
3
|
+
import { ConversationId, AgentId, MessageId } from "./primitives.js";
|
|
5
4
|
export const ConversationTypeEnum = stringEnum(["dm", "group"]);
|
|
6
5
|
export const ParticipantRoleEnum = stringEnum(["owner", "admin", "member"]);
|
|
6
|
+
export const ConversationMetadataSchema = Type.Object({
|
|
7
|
+
tags: Type.Optional(Type.Array(Type.Record(Type.String(), Type.String()))),
|
|
8
|
+
}, { additionalProperties: false });
|
|
7
9
|
export const ConversationSchema = Type.Object({
|
|
8
10
|
id: ConversationId,
|
|
9
11
|
type: ConversationTypeEnum,
|
|
10
12
|
name: Type.Optional(Type.String()),
|
|
11
|
-
createdBy:
|
|
13
|
+
createdBy: AgentId,
|
|
14
|
+
metadata: Type.Optional(ConversationMetadataSchema),
|
|
15
|
+
lastMessageTimestamp: Type.Optional(DateTimeString),
|
|
12
16
|
createdAt: DateTimeString,
|
|
13
17
|
updatedAt: DateTimeString,
|
|
14
18
|
}, { additionalProperties: false });
|
|
15
19
|
export const ConversationParticipantSchema = Type.Object({
|
|
16
20
|
conversationId: ConversationId,
|
|
17
|
-
participant:
|
|
21
|
+
participant: Type.Object({
|
|
22
|
+
type: stringEnum(["agent"]),
|
|
23
|
+
id: Type.String({ format: "uuid" }),
|
|
24
|
+
}, { additionalProperties: false }),
|
|
18
25
|
role: ParticipantRoleEnum,
|
|
19
26
|
joinedAt: DateTimeString,
|
|
20
|
-
|
|
27
|
+
lastReadMessageId: Type.Optional(MessageId),
|
|
21
28
|
mutedUntil: Type.Optional(DateTimeString),
|
|
22
29
|
agentName: Type.Optional(Type.String()),
|
|
23
30
|
agentDisplayName: Type.Optional(Type.String()),
|
|
@@ -27,8 +34,12 @@ export const ConversationSummarySchema = Type.Object({
|
|
|
27
34
|
type: ConversationTypeEnum,
|
|
28
35
|
name: Type.Optional(Type.String()),
|
|
29
36
|
lastMessagePreview: Type.Optional(Type.String()),
|
|
30
|
-
|
|
37
|
+
lastMessageTimestamp: Type.Optional(DateTimeString),
|
|
31
38
|
unreadCount: Type.Integer({ minimum: 0 }),
|
|
32
|
-
|
|
39
|
+
metadata: Type.Optional(ConversationMetadataSchema),
|
|
40
|
+
participants: Type.Optional(Type.Array(Type.Object({
|
|
41
|
+
type: stringEnum(["agent"]),
|
|
42
|
+
id: Type.String({ format: "uuid" }),
|
|
43
|
+
}, { additionalProperties: false }))),
|
|
33
44
|
}, { additionalProperties: false });
|
|
34
45
|
//# sourceMappingURL=conversations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/schema/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/schema/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC,MAAM,CACnD;IACE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CAC3E,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAC3C;IACE,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,IAAI,CAAC,Q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AChD,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;IACnD,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IACnD,YAAY,EAAE,IAAI,CAAC,QAAQ,CACzB,IAAI,CAAC,KAAK,CACR,IAAI,CAAC,MAAM,CACT;QACE,IAAI,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC;QAC3B,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;KACpC,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CACF,CACF;CACF,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC"}
|
|
@@ -3,10 +3,7 @@ export declare const DeliveryStatusEnum: import("@sinclair/typebox").TUnsafe<"se
|
|
|
3
3
|
export declare const DeliveryEntrySchema: import("@sinclair/typebox").TObject<{
|
|
4
4
|
messageId: import("@sinclair/typebox").TString;
|
|
5
5
|
conversationId: import("@sinclair/typebox").TString;
|
|
6
|
-
|
|
7
|
-
type: import("@sinclair/typebox").TUnsafe<"user" | "agent">;
|
|
8
|
-
id: import("@sinclair/typebox").TString;
|
|
9
|
-
}>;
|
|
6
|
+
agentId: import("@sinclair/typebox").TString;
|
|
10
7
|
status: import("@sinclair/typebox").TUnsafe<"sent" | "delivered" | "read">;
|
|
11
8
|
deliveredAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
9
|
readAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../src/schema/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../src/schema/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,kBAAkB,oEAA4C,CAAC;AAE5E,eAAO,MAAM,mBAAmB;;;;;;;EAU/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/schema/delivery.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
2
|
import { stringEnum, DateTimeString } from "../helpers.js";
|
|
3
|
-
import { MessageId, ConversationId } from "./primitives.js";
|
|
4
|
-
import { ParticipantRefSchema } from "./identity.js";
|
|
3
|
+
import { MessageId, ConversationId, AgentId } from "./primitives.js";
|
|
5
4
|
export const DeliveryStatusEnum = stringEnum(["sent", "delivered", "read"]);
|
|
6
5
|
export const DeliveryEntrySchema = Type.Object({
|
|
7
6
|
messageId: MessageId,
|
|
8
7
|
conversationId: ConversationId,
|
|
9
|
-
|
|
8
|
+
agentId: AgentId,
|
|
10
9
|
status: DeliveryStatusEnum,
|
|
11
10
|
deliveredAt: Type.Optional(DateTimeString),
|
|
12
11
|
readAt: Type.Optional(DateTimeString),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../../src/schema/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../../src/schema/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAC5C;IACE,SAAS,EAAE,SAAS;IACpB,cAAc,EAAE,cAAc;IAC9B,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,kBAAkB;IAC1B,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;IAC1C,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CACtC,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC"}
|
package/dist/schema/errors.d.ts
CHANGED
|
@@ -14,6 +14,19 @@ export declare const ErrorCodes: {
|
|
|
14
14
|
readonly Blocked: -32006;
|
|
15
15
|
readonly ConversationFull: -32007;
|
|
16
16
|
readonly ProtocolMismatch: -32008;
|
|
17
|
+
readonly AppNotFound: -32010;
|
|
18
|
+
readonly AgentNotFound: -32011;
|
|
19
|
+
readonly SkillTimeout: -32012;
|
|
20
|
+
readonly SkillMismatch: -32013;
|
|
21
|
+
readonly PermissionTimeout: -32014;
|
|
22
|
+
readonly PermissionDenied: -32015;
|
|
23
|
+
readonly IdentityRejected: -32016;
|
|
24
|
+
readonly MaxParticipants: -32017;
|
|
25
|
+
readonly AgentNoOwner: -32018;
|
|
26
|
+
readonly HookBlocked: -32019;
|
|
27
|
+
readonly SessionClosed: -32020;
|
|
28
|
+
readonly SessionNotFound: -32021;
|
|
29
|
+
readonly ConversationArchived: -32022;
|
|
17
30
|
};
|
|
18
31
|
export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
19
32
|
export declare const RpcErrorSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/schema/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/schema/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Bb,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAErE,eAAO,MAAM,cAAc;;;;EAO1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dist/schema/errors.js
CHANGED
|
@@ -16,6 +16,20 @@ export const ErrorCodes = {
|
|
|
16
16
|
Blocked: -32006,
|
|
17
17
|
ConversationFull: -32007,
|
|
18
18
|
ProtocolMismatch: -32008,
|
|
19
|
+
// App codes (-32010 to -32029)
|
|
20
|
+
AppNotFound: -32010,
|
|
21
|
+
AgentNotFound: -32011,
|
|
22
|
+
SkillTimeout: -32012,
|
|
23
|
+
SkillMismatch: -32013,
|
|
24
|
+
PermissionTimeout: -32014,
|
|
25
|
+
PermissionDenied: -32015,
|
|
26
|
+
IdentityRejected: -32016,
|
|
27
|
+
MaxParticipants: -32017,
|
|
28
|
+
AgentNoOwner: -32018,
|
|
29
|
+
HookBlocked: -32019,
|
|
30
|
+
SessionClosed: -32020,
|
|
31
|
+
SessionNotFound: -32021,
|
|
32
|
+
ConversationArchived: -32022,
|
|
19
33
|
};
|
|
20
34
|
export const RpcErrorSchema = Type.Object({
|
|
21
35
|
code: Type.Integer(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/schema/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,6CAA6C;IAC7C,UAAU,EAAE,CAAC,KAAK;IAClB,cAAc,EAAE,CAAC,KAAK;IACtB,cAAc,EAAE,CAAC,KAAK;IACtB,aAAa,EAAE,CAAC,KAAK;IACrB,aAAa,EAAE,CAAC,KAAK;IACrB,uCAAuC;IACvC,YAAY,EAAE,CAAC,KAAK;IACpB,SAAS,EAAE,CAAC,KAAK;IACjB,QAAQ,EAAE,CAAC,KAAK;IAChB,QAAQ,EAAE,CAAC,KAAK;IAChB,WAAW,EAAE,CAAC,KAAK;IACnB,aAAa,EAAE,CAAC,KAAK;IACrB,OAAO,EAAE,CAAC,KAAK;IACf,gBAAgB,EAAE,CAAC,KAAK;IACxB,gBAAgB,EAAE,CAAC,KAAK;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/schema/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,6CAA6C;IAC7C,UAAU,EAAE,CAAC,KAAK;IAClB,cAAc,EAAE,CAAC,KAAK;IACtB,cAAc,EAAE,CAAC,KAAK;IACtB,aAAa,EAAE,CAAC,KAAK;IACrB,aAAa,EAAE,CAAC,KAAK;IACrB,uCAAuC;IACvC,YAAY,EAAE,CAAC,KAAK;IACpB,SAAS,EAAE,CAAC,KAAK;IACjB,QAAQ,EAAE,CAAC,KAAK;IAChB,QAAQ,EAAE,CAAC,KAAK;IAChB,WAAW,EAAE,CAAC,KAAK;IACnB,aAAa,EAAE,CAAC,KAAK;IACrB,OAAO,EAAE,CAAC,KAAK;IACf,gBAAgB,EAAE,CAAC,KAAK;IACxB,gBAAgB,EAAE,CAAC,KAAK;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