@openvtc/trust-tasks 0.2.5 → 0.2.7

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.5",
3
+ "version": "0.2.7",
4
4
  "description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
- * Source: specs/chat/message/1.0/payload.schema.json
3
+ * Source: specs/chat/message/0.1/payload.schema.json
4
4
  */
5
5
 
6
6
  /**
@@ -23,6 +23,10 @@ export interface ChatMessagePayload {
23
23
  * OPTIONAL. Plain-text body. Absent for attachment-only messages.
24
24
  */
25
25
  text?: string;
26
+ /**
27
+ * OPTIONAL. @-mentions carried by the message, ordered to match the U+FFFC sentinel placeholders in `text`: the Nth U+FFFC binds to the Nth entry. Absent/empty when the message mentions no one. The producer is responsible for emitting one U+FFFC sentinel per mention, in order — translating each platform's native mention encoding into this neutral form.
28
+ */
29
+ mentions?: Mention[];
26
30
  /**
27
31
  * OPTIONAL. Attachments carried by reference, never inline.
28
32
  */
@@ -31,6 +35,14 @@ export interface ChatMessagePayload {
31
35
  * OPTIONAL. The `id` of the message this one replies to.
32
36
  */
33
37
  replyToId?: string;
38
+ /**
39
+ * OPTIONAL. True when the conversation is a group/channel, false (or absent) for a 1:1 DM. Part of the signed record so the audit chain captures where a message was sent, not just its text.
40
+ */
41
+ isGroup?: boolean;
42
+ /**
43
+ * OPTIONAL. Platform-confirmed signal that this (inbound) message addresses the agent — e.g. an @-mention of the agent, or any DM. Lets a group-aware consumer decide whether a group message is for it without agent-name heuristics. Distinct from `mentions`, which lists the participants referenced in the body. Outbound messages leave this absent/false.
44
+ */
45
+ isMention?: boolean;
34
46
  prev?: ChainLink;
35
47
  /**
36
48
  * RFC 3339 timestamp the author asserts for this message.
@@ -38,6 +50,24 @@ export interface ChatMessagePayload {
38
50
  sentAt: string;
39
51
  ext?: Ext;
40
52
  }
53
+ export interface Mention {
54
+ /**
55
+ * Opaque, bridge-issued handle for the mentioned participant. MUST NOT be a raw platform address; like `conversationId` it carries no platform-native identifier (phone number, UUID, member id) upstream.
56
+ */
57
+ participant: string;
58
+ /**
59
+ * OPTIONAL. Human-readable name the source platform supplied for the participant. A non-authoritative rendering hint — never used for identity. Absent when the platform exposes no name in the mention.
60
+ */
61
+ displayName?: string;
62
+ /**
63
+ * Source-platform native start offset of the sentinel span in `text`. Advisory: offset units differ across platforms, so the authoritative binding is positional (Nth U+FFFC → Nth mention), not by offset.
64
+ */
65
+ start: number;
66
+ /**
67
+ * Source-platform native length of the sentinel span in `text`. Advisory; see `start`.
68
+ */
69
+ length: number;
70
+ }
41
71
  export interface AttachmentRef {
42
72
  /**
43
73
  * Opaque attachment id, resolvable via the bridge's attachment fetch.
@@ -81,7 +111,7 @@ export interface Ext {
81
111
  }
82
112
 
83
113
  /** Trust Task type URI. */
84
- export const TYPE_URI = "https://trusttasks.org/spec/chat/message/1.0" as const;
114
+ export const TYPE_URI = "https://trusttasks.org/spec/chat/message/0.1" as const;
85
115
 
86
116
  /** Trust Task response type URI (request type URI + "#response"). */
87
- export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/chat/message/1.0#response" as const;
117
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/chat/message/0.1#response" as const;
package/src/index.ts CHANGED
@@ -31,7 +31,7 @@ export * as AuthStepUpApproveResponse_v0_2 from "./auth/step-up/approve-response
31
31
  export * as AuthStepUpPolicy_v0_1 from "./auth/step-up/policy/0.1/payload";
32
32
  export * as AuthStepUpPolicy_v0_2 from "./auth/step-up/policy/0.2/payload";
33
33
  export * as AuthWhoami_v0_1 from "./auth/whoami/0.1/payload";
34
- export * as ChatMessage_v1_0 from "./chat/message/1.0/payload";
34
+ export * as ChatMessage_v0_1 from "./chat/message/0.1/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
37
  export * as ConsentShared_v0_1 from "./consent/_shared/0.1/consent";