@openvtc/trust-tasks 0.2.3 → 0.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/consent/_shared/0.1/consent.schema.json
4
+ */
5
+
6
+ /**
7
+ * Platform-agnostic definitions shared across the consent/* tasks.
8
+ */
9
+ export interface ConsentSharedDefinitions {
10
+ [k: string]: unknown | undefined;
11
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/consent/approver-list/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Fetch approver bindings, optionally filtered by platform or context.
8
+ */
9
+ export interface ConsentListApproversPayload {
10
+ /**
11
+ * Optional. Restrict to this platform tag.
12
+ */
13
+ platform?: string;
14
+ /**
15
+ * Optional. Restrict to this context path.
16
+ */
17
+ context?: string;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
22
+ */
23
+ export interface Ext {
24
+ [k: string]: unknown | undefined;
25
+ }
26
+
27
+ /** Trust Task type URI. */
28
+ export const TYPE_URI = "https://trusttasks.org/spec/consent/approver-list/1.0" as const;
29
+
30
+ /** Trust Task response type URI (request type URI + "#response"). */
31
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/consent/approver-list/1.0#response" as const;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/consent/approver-set/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * An admin binds the operator who approves inbound-messaging consent for a platform within a context.
8
+ */
9
+ export interface ConsentSetApproverPayload {
10
+ /**
11
+ * Messaging-platform tag, e.g. "signal".
12
+ */
13
+ platform: string;
14
+ /**
15
+ * The VTA context path this binding applies to.
16
+ */
17
+ context: string;
18
+ /**
19
+ * VID of the operator authorized to decide consent.
20
+ */
21
+ approver: string;
22
+ /**
23
+ * How the prompt reaches the approver; defaults to bridge-relay.
24
+ */
25
+ route?: "wake" | "bridge-relay";
26
+ /**
27
+ * Optional routing detail (e.g. the operator's opaque conversationRef).
28
+ */
29
+ routeHint?: string;
30
+ ext?: Ext;
31
+ }
32
+ /**
33
+ * Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
34
+ */
35
+ export interface Ext {
36
+ [k: string]: unknown | undefined;
37
+ }
38
+
39
+ /** Trust Task type URI. */
40
+ export const TYPE_URI = "https://trusttasks.org/spec/consent/approver-set/1.0" as const;
41
+
42
+ /** Trust Task response type URI (request type URI + "#response"). */
43
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/consent/approver-set/1.0#response" as const;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/consent/decision/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * An approver allows or denies an AI agent's access to a messaging conversation.
8
+ */
9
+ export interface ConsentDecisionPayload {
10
+ subject: ConsentSubject;
11
+ /**
12
+ * Whether the subject is permitted. The ABSENCE of any grant is treated as `deny` (default-deny).
13
+ */
14
+ effect: "allow" | "deny";
15
+ /**
16
+ * Granted scope. REQUIRED when `effect` is `allow`.
17
+ */
18
+ scope?: "receive" | "converse";
19
+ /**
20
+ * Echoes the consent/request challenge this decision answers. Omit only for an operator-initiated pre-authorization.
21
+ */
22
+ challenge?: string;
23
+ /**
24
+ * Optional grant TTL; after it the subject must be re-consented.
25
+ */
26
+ expiresAt?: string;
27
+ ext?: Ext;
28
+ }
29
+ /**
30
+ * The platform-agnostic identifier of WHAT is being consented to: one conversation, for one agent.
31
+ */
32
+ export interface ConsentSubject {
33
+ /**
34
+ * Messaging-platform tag, e.g. "signal", "whatsapp", "slack".
35
+ */
36
+ platform: string;
37
+ /**
38
+ * The bridge's OPAQUE conversation handle (e.g. "sig-1a2b3c4d"). NEVER the raw platform address — the VTA never learns the phone number / chat id.
39
+ */
40
+ conversationRef: string;
41
+ /**
42
+ * The interaction kind: a 1:1 direct message, a multi-party group, or a broadcast channel.
43
+ */
44
+ kind: "dm" | "group" | "channel";
45
+ /**
46
+ * VID (DID) of the AI agent the conversation would reach.
47
+ */
48
+ agent: string;
49
+ }
50
+ /**
51
+ * Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
52
+ */
53
+ export interface Ext {
54
+ [k: string]: unknown | undefined;
55
+ }
56
+
57
+ /** Trust Task type URI. */
58
+ export const TYPE_URI = "https://trusttasks.org/spec/consent/decision/1.0" as const;
59
+
60
+ /** Trust Task response type URI (request type URI + "#response"). */
61
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/consent/decision/1.0#response" as const;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/consent/list/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * A bridge fetches the consent grants it should enforce.
8
+ */
9
+ export interface ConsentListPayload {
10
+ /**
11
+ * Optional. Restrict to grants for this agent VID.
12
+ */
13
+ agent?: string;
14
+ /**
15
+ * Optional. Restrict to this platform tag.
16
+ */
17
+ platform?: string;
18
+ subject?: ConsentSubject;
19
+ /**
20
+ * Optional opaque cursor; return only grants changed after it.
21
+ */
22
+ since?: string;
23
+ ext?: Ext;
24
+ }
25
+ /**
26
+ * Optional. A full subject, to point-check a single conversation.
27
+ */
28
+ export interface ConsentSubject {
29
+ /**
30
+ * Messaging-platform tag, e.g. "signal", "whatsapp", "slack".
31
+ */
32
+ platform: string;
33
+ /**
34
+ * The bridge's OPAQUE conversation handle (e.g. "sig-1a2b3c4d"). NEVER the raw platform address — the VTA never learns the phone number / chat id.
35
+ */
36
+ conversationRef: string;
37
+ /**
38
+ * The interaction kind: a 1:1 direct message, a multi-party group, or a broadcast channel.
39
+ */
40
+ kind: "dm" | "group" | "channel";
41
+ /**
42
+ * VID (DID) of the AI agent the conversation would reach.
43
+ */
44
+ agent: string;
45
+ }
46
+ /**
47
+ * Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
48
+ */
49
+ export interface Ext {
50
+ [k: string]: unknown | undefined;
51
+ }
52
+
53
+ /** Trust Task type URI. */
54
+ export const TYPE_URI = "https://trusttasks.org/spec/consent/list/1.0" as const;
55
+
56
+ /** Trust Task response type URI (request type URI + "#response"). */
57
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/consent/list/1.0#response" as const;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/consent/request/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * A bridge asks the VTA whether an inbound conversation may reach an AI agent, prompting operator consent on first contact.
8
+ */
9
+ export interface ConsentRequestPayload {
10
+ subject: ConsentSubject;
11
+ /**
12
+ * The access the bridge seeks for the agent on this conversation.
13
+ */
14
+ scope: "receive" | "converse";
15
+ /**
16
+ * base64url-encoded nonce (≥128 bits entropy) echoed by the matching consent/decision, so the bridge can correlate the decision to this request.
17
+ */
18
+ challenge: string;
19
+ /**
20
+ * Optional operator-facing label (e.g. "Signal group 'Family'"). MUST NOT contain a raw platform address.
21
+ */
22
+ displayHint?: string;
23
+ /**
24
+ * Optional multihash digest of the held first message, binding the request to concrete content.
25
+ */
26
+ firstMessageDigest?: string;
27
+ /**
28
+ * Optional VTA context path the bridge runs under, to scope approver resolution.
29
+ */
30
+ contextHint?: string;
31
+ ext?: Ext;
32
+ }
33
+ /**
34
+ * The platform-agnostic identifier of WHAT is being consented to: one conversation, for one agent.
35
+ */
36
+ export interface ConsentSubject {
37
+ /**
38
+ * Messaging-platform tag, e.g. "signal", "whatsapp", "slack".
39
+ */
40
+ platform: string;
41
+ /**
42
+ * The bridge's OPAQUE conversation handle (e.g. "sig-1a2b3c4d"). NEVER the raw platform address — the VTA never learns the phone number / chat id.
43
+ */
44
+ conversationRef: string;
45
+ /**
46
+ * The interaction kind: a 1:1 direct message, a multi-party group, or a broadcast channel.
47
+ */
48
+ kind: "dm" | "group" | "channel";
49
+ /**
50
+ * VID (DID) of the AI agent the conversation would reach.
51
+ */
52
+ agent: string;
53
+ }
54
+ /**
55
+ * Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
56
+ */
57
+ export interface Ext {
58
+ [k: string]: unknown | undefined;
59
+ }
60
+
61
+ /** Trust Task type URI. */
62
+ export const TYPE_URI = "https://trusttasks.org/spec/consent/request/1.0" as const;
63
+
64
+ /** Trust Task response type URI (request type URI + "#response"). */
65
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/consent/request/1.0#response" as const;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/consent/revoke/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * An operator revokes a standing consent grant.
8
+ */
9
+ export interface ConsentRevokePayload {
10
+ subject: ConsentSubject;
11
+ /**
12
+ * Optional operator note recorded in the audit trail.
13
+ */
14
+ reason?: string;
15
+ ext?: Ext;
16
+ }
17
+ /**
18
+ * The platform-agnostic identifier of WHAT is being consented to: one conversation, for one agent.
19
+ */
20
+ export interface ConsentSubject {
21
+ /**
22
+ * Messaging-platform tag, e.g. "signal", "whatsapp", "slack".
23
+ */
24
+ platform: string;
25
+ /**
26
+ * The bridge's OPAQUE conversation handle (e.g. "sig-1a2b3c4d"). NEVER the raw platform address — the VTA never learns the phone number / chat id.
27
+ */
28
+ conversationRef: string;
29
+ /**
30
+ * The interaction kind: a 1:1 direct message, a multi-party group, or a broadcast channel.
31
+ */
32
+ kind: "dm" | "group" | "channel";
33
+ /**
34
+ * VID (DID) of the AI agent the conversation would reach.
35
+ */
36
+ agent: string;
37
+ }
38
+ /**
39
+ * Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
40
+ */
41
+ export interface Ext {
42
+ [k: string]: unknown | undefined;
43
+ }
44
+
45
+ /** Trust Task type URI. */
46
+ export const TYPE_URI = "https://trusttasks.org/spec/consent/revoke/1.0" as const;
47
+
48
+ /** Trust Task response type URI (request type URI + "#response"). */
49
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/consent/revoke/1.0#response" as const;
package/src/index.ts CHANGED
@@ -34,6 +34,13 @@ export * as AuthWhoami_v0_1 from "./auth/whoami/0.1/payload";
34
34
  export * as ChatMessage_v1_0 from "./chat/message/1.0/payload";
35
35
  export * as ConfirmRequest_v0_1 from "./confirm/request/0.1/payload";
36
36
  export * as ConfirmResponse_v0_1 from "./confirm/response/0.1/payload";
37
+ export * as ConsentShared_v0_1 from "./consent/_shared/0.1/consent";
38
+ export * as ConsentApproverList_v1_0 from "./consent/approver-list/1.0/payload";
39
+ export * as ConsentApproverSet_v1_0 from "./consent/approver-set/1.0/payload";
40
+ export * as ConsentDecision_v1_0 from "./consent/decision/1.0/payload";
41
+ export * as ConsentList_v1_0 from "./consent/list/1.0/payload";
42
+ export * as ConsentRequest_v1_0 from "./consent/request/1.0/payload";
43
+ export * as ConsentRevoke_v1_0 from "./consent/revoke/1.0/payload";
37
44
  export * as DeviceBindingShared_v0_1 from "./device/_shared/0.1/device-binding";
38
45
  export * as DeviceBindingShared_v0_2 from "./device/_shared/0.2/device-binding";
39
46
  export * as DeviceDisable_v0_1 from "./device/disable/0.1/payload";