@ixo/topic-protocol 0.5.0 → 0.6.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/README.md CHANGED
@@ -9,7 +9,7 @@ identity of a discussion.
9
9
 
10
10
  ## Status
11
11
 
12
- **Version:** 0.5.0
12
+ **Version:** 0.6.0
13
13
 
14
14
  **Maturity:** Draft implementation candidate
15
15
  **Execution source of truth:** [Linear Topic Protocol project](https://linear.app/ixo-world/project/topic-protocol-4ea58bc7910d)
@@ -23,6 +23,7 @@ and external action execution require their dedicated conformance evidence.
23
23
 
24
24
  - [Architecture decisions](docs/adr/README.md)
25
25
  - [Why Topics matter](docs/topics-feature-guide.md) — a non-technical feature guide
26
+ - [Extending Topic Kinds](docs/extending-topic-kinds.md) — third-party custom Kind and Kind Profile guide
26
27
  - [Protocol chapters](docs/protocol/README.md)
27
28
  - [Machine-readable contracts](contracts/README.md)
28
29
  - [Reference implementation](docs/reference-implementation.md)
@@ -39,7 +40,8 @@ key-value adapter at its integration boundary.
39
40
 
40
41
  The package includes:
41
42
 
42
- - strict Draft 2020-12 validation for all 18 contracts;
43
+ - strict Draft 2020-12 validation for all 20 contracts, including Kind Profiles and Job Cards;
44
+ - pinned, declarative Kind Profiles with safe standard-Kind fallback;
43
45
  - deterministic Topic-index reconciliation, structured search, and personal ranking;
44
46
  - deterministic Topic projection from a root and authorised operations;
45
47
  - singular accepted Overview projection with deterministic conflict handling;
@@ -0,0 +1,29 @@
1
+ {
2
+ "version": 1,
3
+ "id": "https://topic-protocol.ixo.world/profiles/job-card",
4
+ "profileVersion": "1.0.0",
5
+ "label": "Job",
6
+ "description": "A portable digital job card coordinated through a Task-based Topic.",
7
+ "kind": {
8
+ "customId": "org.ixo.job-card",
9
+ "baseKind": "task",
10
+ "recipe": "project"
11
+ },
12
+ "resource": {
13
+ "type": "org.ixo.job-card",
14
+ "version": 1,
15
+ "schema": "https://topic-protocol.ixo.world/schemas/job-card.schema.json"
16
+ },
17
+ "acceptance": {
18
+ "requiredResourcePaths": ["/jobNumber", "/phase"]
19
+ },
20
+ "projection": {
21
+ "key": "org.ixo.topic-kind/job-card/v1",
22
+ "roomVisibleFields": ["/jobNumber", "/phase", "/priority", "/scheduled/start"]
23
+ },
24
+ "presentation": {
25
+ "fallbackLabel": "Job",
26
+ "primaryFields": ["/jobNumber", "/phase", "/priority", "/scheduled/start", "/site", "/asset"]
27
+ },
28
+ "capabilities": ["topic/write", "topic/change-status", "topic/confirm-completion"]
29
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://topic-protocol.ixo.world/schemas/job-card.schema.json",
4
+ "title": "IXO Job Card resource v1",
5
+ "type": "object",
6
+ "required": ["version", "type", "id"],
7
+ "properties": {
8
+ "version": { "const": 1 },
9
+ "type": { "const": "org.ixo.job-card" },
10
+ "id": { "type": "string", "pattern": "^urn:ixo:job:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
11
+ "jobNumber": { "type": "string", "minLength": 1, "maxLength": 80 },
12
+ "phase": { "type": "string", "enum": ["requested", "scheduled", "dispatched", "in_progress", "ready_for_review", "completed", "cancelled"] },
13
+ "priority": { "type": "string", "enum": ["low", "normal", "high", "urgent"] },
14
+ "instructions": { "type": "string", "minLength": 1, "maxLength": 10000 },
15
+ "scheduled": {
16
+ "type": "object",
17
+ "properties": {
18
+ "start": { "$ref": "https://topic-protocol.ixo.world/schemas/topic-contract-state.schema.json#/$defs/temporalTarget" },
19
+ "end": { "$ref": "https://topic-protocol.ixo.world/schemas/topic-contract-state.schema.json#/$defs/temporalTarget" }
20
+ },
21
+ "additionalProperties": false
22
+ },
23
+ "site": { "$ref": "#/$defs/resourceTarget" },
24
+ "asset": { "$ref": "#/$defs/resourceTarget" },
25
+ "requestedBy": { "type": "string", "minLength": 1, "maxLength": 256 },
26
+ "assignedTo": {
27
+ "type": "array",
28
+ "uniqueItems": true,
29
+ "maxItems": 100,
30
+ "items": { "type": "string", "minLength": 1, "maxLength": 256 }
31
+ },
32
+ "extensions": { "type": "object" }
33
+ },
34
+ "additionalProperties": false,
35
+ "$defs": {
36
+ "resourceTarget": {
37
+ "type": "object",
38
+ "required": ["label"],
39
+ "properties": {
40
+ "label": { "type": "string", "minLength": 1, "maxLength": 280 },
41
+ "id": { "type": "string", "minLength": 1, "maxLength": 512 }
42
+ },
43
+ "additionalProperties": false
44
+ }
45
+ }
46
+ }
@@ -47,6 +47,29 @@
47
47
  }
48
48
  ]
49
49
  },
50
+ "kindProfileRef": {
51
+ "type": "object",
52
+ "required": ["id", "version", "schema", "digest"],
53
+ "properties": {
54
+ "id": { "type": "string", "format": "uri" },
55
+ "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
56
+ "schema": { "type": "string", "format": "uri" },
57
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
58
+ },
59
+ "additionalProperties": false
60
+ },
61
+ "kindResource": {
62
+ "type": "object",
63
+ "required": ["profile", "type", "id", "version", "value"],
64
+ "properties": {
65
+ "profile": { "$ref": "#/$defs/kindProfileRef" },
66
+ "type": { "type": "string", "minLength": 1, "maxLength": 128 },
67
+ "id": { "type": "string", "minLength": 1, "maxLength": 512 },
68
+ "version": { "type": "integer", "minimum": 1 },
69
+ "value": { "type": "object" }
70
+ },
71
+ "additionalProperties": false
72
+ },
50
73
  "anchor": {
51
74
  "oneOf": [
52
75
  {
@@ -189,6 +212,8 @@
189
212
  "revision": { "type": "string", "minLength": 1 },
190
213
  "status": { "type": "string", "enum": ["draft", "accepted", "superseded"] },
191
214
  "kindRef": { "$ref": "#/$defs/kindRef" },
215
+ "kindProfile": { "$ref": "#/$defs/kindProfileRef" },
216
+ "kindResource": { "$ref": "#/$defs/kindResource" },
192
217
  "authoredBy": { "type": "string", "minLength": 1 },
193
218
  "authoredAt": { "type": "string", "format": "date-time" },
194
219
  "workingMode": { "type": "string", "enum": ["solo", "team", "client"] },
@@ -253,6 +278,7 @@
253
278
  "title": { "type": "string", "minLength": 1, "maxLength": 280 },
254
279
  "status": { "type": "string", "enum": ["draft", "active", "waiting", "blocked", "resolved", "archived", "redirected"] },
255
280
  "kindRef": { "$ref": "#/$defs/kindRef" },
281
+ "kindProfile": { "$ref": "#/$defs/kindProfileRef" },
256
282
  "appearance": { "$ref": "#/$defs/appearance" },
257
283
  "attachmentCount": { "type": "integer", "minimum": 0 },
258
284
  "operationCount": { "type": "integer", "minimum": 0 }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://topic-protocol.ixo.world/schemas/topic-kind-profile.schema.json",
4
+ "title": "Topic Kind Profile v1",
5
+ "type": "object",
6
+ "required": ["version", "id", "profileVersion", "label", "kind", "resource", "acceptance", "projection", "presentation"],
7
+ "properties": {
8
+ "version": { "const": 1 },
9
+ "id": { "type": "string", "format": "uri" },
10
+ "profileVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
11
+ "label": { "type": "string", "minLength": 1, "maxLength": 80 },
12
+ "description": { "type": "string", "minLength": 1, "maxLength": 1000 },
13
+ "kind": {
14
+ "type": "object",
15
+ "required": ["customId", "baseKind", "recipe"],
16
+ "properties": {
17
+ "customId": { "type": "string", "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)+$", "maxLength": 128 },
18
+ "baseKind": { "type": "string", "enum": ["task", "agent_task", "proposal", "evaluation", "claims", "question", "discussion", "incident"] },
19
+ "recipe": { "type": "string", "enum": ["project", "flow", "proposal", "evaluation", "claims", "research", "discussion", "incident"] }
20
+ },
21
+ "additionalProperties": false
22
+ },
23
+ "resource": {
24
+ "type": "object",
25
+ "required": ["type", "version", "schema"],
26
+ "properties": {
27
+ "type": { "type": "string", "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)+$", "maxLength": 128 },
28
+ "version": { "type": "integer", "minimum": 1 },
29
+ "schema": { "type": "string", "format": "uri" }
30
+ },
31
+ "additionalProperties": false
32
+ },
33
+ "acceptance": {
34
+ "type": "object",
35
+ "required": ["requiredResourcePaths"],
36
+ "properties": {
37
+ "requiredResourcePaths": {
38
+ "type": "array",
39
+ "uniqueItems": true,
40
+ "maxItems": 50,
41
+ "items": { "type": "string", "pattern": "^/" }
42
+ }
43
+ },
44
+ "additionalProperties": false
45
+ },
46
+ "projection": {
47
+ "type": "object",
48
+ "required": ["key", "roomVisibleFields"],
49
+ "properties": {
50
+ "key": { "type": "string", "pattern": "^[a-z0-9]+(?:[._/-][a-z0-9]+)+$", "maxLength": 160 },
51
+ "roomVisibleFields": {
52
+ "type": "array",
53
+ "uniqueItems": true,
54
+ "maxItems": 20,
55
+ "items": { "type": "string", "pattern": "^/" }
56
+ }
57
+ },
58
+ "additionalProperties": false
59
+ },
60
+ "presentation": {
61
+ "type": "object",
62
+ "required": ["fallbackLabel", "primaryFields"],
63
+ "properties": {
64
+ "fallbackLabel": { "type": "string", "minLength": 1, "maxLength": 80 },
65
+ "primaryFields": {
66
+ "type": "array",
67
+ "uniqueItems": true,
68
+ "maxItems": 20,
69
+ "items": { "type": "string", "pattern": "^/" }
70
+ }
71
+ },
72
+ "additionalProperties": false
73
+ },
74
+ "capabilities": {
75
+ "type": "array",
76
+ "uniqueItems": true,
77
+ "maxItems": 20,
78
+ "items": { "type": "string", "minLength": 1, "maxLength": 128 }
79
+ }
80
+ },
81
+ "additionalProperties": false
82
+ }
@@ -128,6 +128,99 @@ export declare const SCHEMA_REGISTRY: Readonly<{
128
128
  };
129
129
  additionalProperties: boolean;
130
130
  };
131
+ "job-card": {
132
+ $schema: string;
133
+ $id: string;
134
+ title: string;
135
+ type: string;
136
+ required: string[];
137
+ properties: {
138
+ version: {
139
+ const: number;
140
+ };
141
+ type: {
142
+ const: string;
143
+ };
144
+ id: {
145
+ type: string;
146
+ pattern: string;
147
+ };
148
+ jobNumber: {
149
+ type: string;
150
+ minLength: number;
151
+ maxLength: number;
152
+ };
153
+ phase: {
154
+ type: string;
155
+ enum: string[];
156
+ };
157
+ priority: {
158
+ type: string;
159
+ enum: string[];
160
+ };
161
+ instructions: {
162
+ type: string;
163
+ minLength: number;
164
+ maxLength: number;
165
+ };
166
+ scheduled: {
167
+ type: string;
168
+ properties: {
169
+ start: {
170
+ $ref: string;
171
+ };
172
+ end: {
173
+ $ref: string;
174
+ };
175
+ };
176
+ additionalProperties: boolean;
177
+ };
178
+ site: {
179
+ $ref: string;
180
+ };
181
+ asset: {
182
+ $ref: string;
183
+ };
184
+ requestedBy: {
185
+ type: string;
186
+ minLength: number;
187
+ maxLength: number;
188
+ };
189
+ assignedTo: {
190
+ type: string;
191
+ uniqueItems: boolean;
192
+ maxItems: number;
193
+ items: {
194
+ type: string;
195
+ minLength: number;
196
+ maxLength: number;
197
+ };
198
+ };
199
+ extensions: {
200
+ type: string;
201
+ };
202
+ };
203
+ additionalProperties: boolean;
204
+ $defs: {
205
+ resourceTarget: {
206
+ type: string;
207
+ required: string[];
208
+ properties: {
209
+ label: {
210
+ type: string;
211
+ minLength: number;
212
+ maxLength: number;
213
+ };
214
+ id: {
215
+ type: string;
216
+ minLength: number;
217
+ maxLength: number;
218
+ };
219
+ };
220
+ additionalProperties: boolean;
221
+ };
222
+ };
223
+ };
131
224
  "room-policy": {
132
225
  $schema: string;
133
226
  $id: string;
@@ -338,6 +431,56 @@ export declare const SCHEMA_REGISTRY: Readonly<{
338
431
  additionalProperties: boolean;
339
432
  })[];
340
433
  };
434
+ kindProfileRef: {
435
+ type: string;
436
+ required: string[];
437
+ properties: {
438
+ id: {
439
+ type: string;
440
+ format: string;
441
+ };
442
+ version: {
443
+ type: string;
444
+ pattern: string;
445
+ };
446
+ schema: {
447
+ type: string;
448
+ format: string;
449
+ };
450
+ digest: {
451
+ type: string;
452
+ pattern: string;
453
+ };
454
+ };
455
+ additionalProperties: boolean;
456
+ };
457
+ kindResource: {
458
+ type: string;
459
+ required: string[];
460
+ properties: {
461
+ profile: {
462
+ $ref: string;
463
+ };
464
+ type: {
465
+ type: string;
466
+ minLength: number;
467
+ maxLength: number;
468
+ };
469
+ id: {
470
+ type: string;
471
+ minLength: number;
472
+ maxLength: number;
473
+ };
474
+ version: {
475
+ type: string;
476
+ minimum: number;
477
+ };
478
+ value: {
479
+ type: string;
480
+ };
481
+ };
482
+ additionalProperties: boolean;
483
+ };
341
484
  anchor: {
342
485
  oneOf: {
343
486
  type: string;
@@ -603,6 +746,12 @@ export declare const SCHEMA_REGISTRY: Readonly<{
603
746
  kindRef: {
604
747
  $ref: string;
605
748
  };
749
+ kindProfile: {
750
+ $ref: string;
751
+ };
752
+ kindResource: {
753
+ $ref: string;
754
+ };
606
755
  authoredBy: {
607
756
  type: string;
608
757
  minLength: number;
@@ -806,6 +955,9 @@ export declare const SCHEMA_REGISTRY: Readonly<{
806
955
  kindRef: {
807
956
  $ref: string;
808
957
  };
958
+ kindProfile: {
959
+ $ref: string;
960
+ };
809
961
  appearance: {
810
962
  $ref: string;
811
963
  };
@@ -1148,6 +1300,145 @@ export declare const SCHEMA_REGISTRY: Readonly<{
1148
1300
  };
1149
1301
  additionalProperties: boolean;
1150
1302
  };
1303
+ "topic-kind-profile": {
1304
+ $schema: string;
1305
+ $id: string;
1306
+ title: string;
1307
+ type: string;
1308
+ required: string[];
1309
+ properties: {
1310
+ version: {
1311
+ const: number;
1312
+ };
1313
+ id: {
1314
+ type: string;
1315
+ format: string;
1316
+ };
1317
+ profileVersion: {
1318
+ type: string;
1319
+ pattern: string;
1320
+ };
1321
+ label: {
1322
+ type: string;
1323
+ minLength: number;
1324
+ maxLength: number;
1325
+ };
1326
+ description: {
1327
+ type: string;
1328
+ minLength: number;
1329
+ maxLength: number;
1330
+ };
1331
+ kind: {
1332
+ type: string;
1333
+ required: string[];
1334
+ properties: {
1335
+ customId: {
1336
+ type: string;
1337
+ pattern: string;
1338
+ maxLength: number;
1339
+ };
1340
+ baseKind: {
1341
+ type: string;
1342
+ enum: string[];
1343
+ };
1344
+ recipe: {
1345
+ type: string;
1346
+ enum: string[];
1347
+ };
1348
+ };
1349
+ additionalProperties: boolean;
1350
+ };
1351
+ resource: {
1352
+ type: string;
1353
+ required: string[];
1354
+ properties: {
1355
+ type: {
1356
+ type: string;
1357
+ pattern: string;
1358
+ maxLength: number;
1359
+ };
1360
+ version: {
1361
+ type: string;
1362
+ minimum: number;
1363
+ };
1364
+ schema: {
1365
+ type: string;
1366
+ format: string;
1367
+ };
1368
+ };
1369
+ additionalProperties: boolean;
1370
+ };
1371
+ acceptance: {
1372
+ type: string;
1373
+ required: string[];
1374
+ properties: {
1375
+ requiredResourcePaths: {
1376
+ type: string;
1377
+ uniqueItems: boolean;
1378
+ maxItems: number;
1379
+ items: {
1380
+ type: string;
1381
+ pattern: string;
1382
+ };
1383
+ };
1384
+ };
1385
+ additionalProperties: boolean;
1386
+ };
1387
+ projection: {
1388
+ type: string;
1389
+ required: string[];
1390
+ properties: {
1391
+ key: {
1392
+ type: string;
1393
+ pattern: string;
1394
+ maxLength: number;
1395
+ };
1396
+ roomVisibleFields: {
1397
+ type: string;
1398
+ uniqueItems: boolean;
1399
+ maxItems: number;
1400
+ items: {
1401
+ type: string;
1402
+ pattern: string;
1403
+ };
1404
+ };
1405
+ };
1406
+ additionalProperties: boolean;
1407
+ };
1408
+ presentation: {
1409
+ type: string;
1410
+ required: string[];
1411
+ properties: {
1412
+ fallbackLabel: {
1413
+ type: string;
1414
+ minLength: number;
1415
+ maxLength: number;
1416
+ };
1417
+ primaryFields: {
1418
+ type: string;
1419
+ uniqueItems: boolean;
1420
+ maxItems: number;
1421
+ items: {
1422
+ type: string;
1423
+ pattern: string;
1424
+ };
1425
+ };
1426
+ };
1427
+ additionalProperties: boolean;
1428
+ };
1429
+ capabilities: {
1430
+ type: string;
1431
+ uniqueItems: boolean;
1432
+ maxItems: number;
1433
+ items: {
1434
+ type: string;
1435
+ minLength: number;
1436
+ maxLength: number;
1437
+ };
1438
+ };
1439
+ };
1440
+ additionalProperties: boolean;
1441
+ };
1151
1442
  "topic-message": {
1152
1443
  $schema: string;
1153
1444
  $id: string;
@@ -1779,4 +2070,4 @@ export declare const SCHEMA_REGISTRY: Readonly<{
1779
2070
  };
1780
2071
  }>;
1781
2072
  export type ContractName = keyof typeof SCHEMA_REGISTRY;
1782
- export declare const CONTRACT_NAMES: readonly ("action-receipt" | "agent-run" | "external-session-binding" | "room-policy" | "topic-capsule" | "topic-contract-state" | "topic-file-attachment" | "topic-index-entry" | "topic-index" | "topic-message" | "topic-operation" | "topic-preferences" | "topic-record" | "topic-record-message" | "topic-relation" | "topic-root" | "topic-state" | "topic-source-message")[];
2073
+ export declare const CONTRACT_NAMES: readonly ("action-receipt" | "agent-run" | "external-session-binding" | "job-card" | "room-policy" | "topic-capsule" | "topic-contract-state" | "topic-file-attachment" | "topic-index-entry" | "topic-index" | "topic-kind-profile" | "topic-message" | "topic-operation" | "topic-preferences" | "topic-record" | "topic-record-message" | "topic-relation" | "topic-root" | "topic-state" | "topic-source-message")[];
@@ -1,12 +1,14 @@
1
1
  import actionReceipt from "../../schemas/action-receipt.schema.json" with { type: "json" };
2
2
  import agentRun from "../../schemas/agent-run.schema.json" with { type: "json" };
3
3
  import externalSessionBinding from "../../schemas/external-session-binding.schema.json" with { type: "json" };
4
+ import jobCard from "../../schemas/job-card.schema.json" with { type: "json" };
4
5
  import roomPolicy from "../../schemas/room-policy.schema.json" with { type: "json" };
5
6
  import topicCapsule from "../../schemas/topic-capsule.schema.json" with { type: "json" };
6
7
  import topicContractState from "../../schemas/topic-contract-state.schema.json" with { type: "json" };
7
8
  import topicFileAttachment from "../../schemas/topic-file-attachment.schema.json" with { type: "json" };
8
9
  import topicIndexEntry from "../../schemas/topic-index-entry.schema.json" with { type: "json" };
9
10
  import topicIndex from "../../schemas/topic-index.schema.json" with { type: "json" };
11
+ import topicKindProfile from "../../schemas/topic-kind-profile.schema.json" with { type: "json" };
10
12
  import topicMessage from "../../schemas/topic-message.schema.json" with { type: "json" };
11
13
  import topicOperation from "../../schemas/topic-operation.schema.json" with { type: "json" };
12
14
  import topicPreferences from "../../schemas/topic-preferences.schema.json" with { type: "json" };
@@ -20,12 +22,14 @@ export const SCHEMA_REGISTRY = Object.freeze({
20
22
  "action-receipt": actionReceipt,
21
23
  "agent-run": agentRun,
22
24
  "external-session-binding": externalSessionBinding,
25
+ "job-card": jobCard,
23
26
  "room-policy": roomPolicy,
24
27
  "topic-capsule": topicCapsule,
25
28
  "topic-contract-state": topicContractState,
26
29
  "topic-file-attachment": topicFileAttachment,
27
30
  "topic-index-entry": topicIndexEntry,
28
31
  "topic-index": topicIndex,
32
+ "topic-kind-profile": topicKindProfile,
29
33
  "topic-message": topicMessage,
30
34
  "topic-operation": topicOperation,
31
35
  "topic-preferences": topicPreferences,
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/contracts/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,0CAA0C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3F,OAAO,QAAQ,MAAM,qCAAqC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjF,OAAO,sBAAsB,MAAM,oDAAoD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC9G,OAAO,UAAU,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACrF,OAAO,YAAY,MAAM,yCAAyC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACzF,OAAO,kBAAkB,MAAM,gDAAgD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,mBAAmB,MAAM,iDAAiD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxG,OAAO,eAAe,MAAM,6CAA6C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChG,OAAO,UAAU,M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,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,EAAoB,CACtD,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { TopicKindProfileRef, TopicKindResourceBinding } from "./topic-kind-profile.js";
1
2
  export declare const PERSISTED_TOPIC_KINDS: readonly ["task", "agent_task", "proposal", "evaluation", "claims", "question", "discussion", "incident"];
2
3
  export declare const TOPIC_CONTRACT_RECIPES: readonly ["project", "flow", "proposal", "evaluation", "claims", "research", "discussion", "incident"];
3
4
  export type PersistedTopicKind = (typeof PERSISTED_TOPIC_KINDS)[number];
@@ -71,6 +72,8 @@ export interface TopicContractBodyV2 {
71
72
  readonly revision: string;
72
73
  readonly status: "draft" | "accepted" | "superseded";
73
74
  readonly kindRef: TopicKindRef;
75
+ readonly kindProfile?: TopicKindProfileRef;
76
+ readonly kindResource?: TopicKindResourceBinding;
74
77
  readonly authoredBy: string;
75
78
  readonly authoredAt: string;
76
79
  readonly workingMode: "solo" | "team" | "client";
@@ -1 +1 @@
1
- {"version":3,"file":"topic-contract.js","sourceRoot":"","sources":["../../../src/contracts/topic-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM;IACN,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,UAAU;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS;IACT,MAAM;IACN,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,UAAU;CACF,CAAC;AAoJX,MAAM,cAAc,GAA8D;IAChF,IAAI,EAAE,SAAS;IACf,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;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;IAC1C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAChC,MAAM,IAAI,kBAAkB,CAC1B,4BAA4B,EAC5B,6CAA6C,EAC7C,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,CACrD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { type TemporalTarget, type TopicContractBodyV2, type TopicContractCompletenessIssue, type TopicContractRecipe, type PersistedTopicKind } from "./topic-contract.js";
2
+ export interface TopicKindProfileRef {
3
+ readonly id: string;
4
+ readonly version: string;
5
+ readonly schema: string;
6
+ readonly digest: `sha256:${string}`;
7
+ }
8
+ export interface TopicKindProfileV1 {
9
+ readonly version: 1;
10
+ readonly id: string;
11
+ readonly profileVersion: string;
12
+ readonly label: string;
13
+ readonly description?: string;
14
+ readonly kind: {
15
+ readonly customId: string;
16
+ readonly baseKind: PersistedTopicKind;
17
+ readonly recipe: TopicContractRecipe;
18
+ };
19
+ readonly resource: {
20
+ readonly type: string;
21
+ readonly version: number;
22
+ readonly schema: string;
23
+ };
24
+ readonly acceptance: {
25
+ readonly requiredResourcePaths: readonly string[];
26
+ };
27
+ readonly projection: {
28
+ readonly key: string;
29
+ readonly roomVisibleFields: readonly string[];
30
+ };
31
+ readonly presentation: {
32
+ readonly fallbackLabel: string;
33
+ readonly primaryFields: readonly string[];
34
+ };
35
+ readonly capabilities?: readonly string[];
36
+ }
37
+ export interface TopicKindResourceBinding<TValue extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>> {
38
+ readonly profile: TopicKindProfileRef;
39
+ readonly type: string;
40
+ readonly id: string;
41
+ readonly version: number;
42
+ readonly value: TValue;
43
+ }
44
+ export declare const JOB_CARD_PHASES: readonly ["requested", "scheduled", "dispatched", "in_progress", "ready_for_review", "completed", "cancelled"];
45
+ export declare const JOB_CARD_PRIORITIES: readonly ["low", "normal", "high", "urgent"];
46
+ export type JobCardPhase = (typeof JOB_CARD_PHASES)[number];
47
+ export type JobCardPriority = (typeof JOB_CARD_PRIORITIES)[number];
48
+ export interface JobCardV1 extends Readonly<Record<string, unknown>> {
49
+ readonly version: 1;
50
+ readonly type: "org.ixo.job-card";
51
+ readonly id: string;
52
+ readonly jobNumber?: string;
53
+ readonly phase?: JobCardPhase;
54
+ readonly priority?: JobCardPriority;
55
+ readonly instructions?: string;
56
+ readonly scheduled?: {
57
+ readonly start?: TemporalTarget;
58
+ readonly end?: TemporalTarget;
59
+ };
60
+ readonly site?: {
61
+ readonly label: string;
62
+ readonly id?: string;
63
+ };
64
+ readonly asset?: {
65
+ readonly label: string;
66
+ readonly id?: string;
67
+ };
68
+ readonly requestedBy?: string;
69
+ readonly assignedTo?: readonly string[];
70
+ readonly extensions?: Readonly<Record<string, unknown>>;
71
+ }
72
+ export declare const JOB_CARD_KIND_REF: Readonly<{
73
+ readonly source: "custom";
74
+ readonly customId: "org.ixo.job-card";
75
+ readonly label: "Job";
76
+ readonly baseKind: "task";
77
+ }>;
78
+ export declare const JOB_CARD_KIND_PROFILE: TopicKindProfileV1;
79
+ export declare const JOB_CARD_KIND_PROFILE_REF: TopicKindProfileRef;
80
+ export declare function resolveTopicKindProfile(ref: TopicKindProfileRef): TopicKindProfileV1 | undefined;
81
+ export declare function contractCompletenessWithProfiles(body: TopicContractBodyV2): readonly TopicContractCompletenessIssue[];
@@ -0,0 +1,76 @@
1
+ import jobCardKindProfile from "../../profiles/job-card/profile.json" with { type: "json" };
2
+ import { contractCompleteness } from "./topic-contract.js";
3
+ import { validateContract } from "./validator.js";
4
+ export const JOB_CARD_PHASES = [
5
+ "requested",
6
+ "scheduled",
7
+ "dispatched",
8
+ "in_progress",
9
+ "ready_for_review",
10
+ "completed",
11
+ "cancelled",
12
+ ];
13
+ export const JOB_CARD_PRIORITIES = ["low", "normal", "high", "urgent"];
14
+ export const JOB_CARD_KIND_REF = Object.freeze({
15
+ source: "custom",
16
+ customId: "org.ixo.job-card",
17
+ label: "Job",
18
+ baseKind: "task",
19
+ });
20
+ export const JOB_CARD_KIND_PROFILE = Object.freeze(jobCardKindProfile);
21
+ export const JOB_CARD_KIND_PROFILE_REF = Object.freeze({
22
+ id: JOB_CARD_KIND_PROFILE.id,
23
+ version: JOB_CARD_KIND_PROFILE.profileVersion,
24
+ schema: "https://topic-protocol.ixo.world/schemas/topic-kind-profile.schema.json",
25
+ digest: "sha256:0991eb565e1253c5caf92e7f06a392edacda6d9d90c3b3111ebfa6bf65b8eaf5",
26
+ });
27
+ function sameProfileRef(left, right) {
28
+ return left.id === right.id
29
+ && left.version === right.version
30
+ && left.schema === right.schema
31
+ && left.digest === right.digest;
32
+ }
33
+ export function resolveTopicKindProfile(ref) {
34
+ return sameProfileRef(ref, JOB_CARD_KIND_PROFILE_REF) ? JOB_CARD_KIND_PROFILE : undefined;
35
+ }
36
+ function jobCardIssues(body) {
37
+ if (body.kindRef.source !== "custom" || body.kindRef.customId !== JOB_CARD_KIND_REF.customId)
38
+ return [];
39
+ if (body.status !== "accepted")
40
+ return [];
41
+ const binding = body.kindResource;
42
+ if (binding === undefined) {
43
+ return [{ path: "/kindResource", message: "Accepted Job contracts require a Job Card resource" }];
44
+ }
45
+ const issues = [];
46
+ if (body.kindProfile === undefined || !sameProfileRef(body.kindProfile, JOB_CARD_KIND_PROFILE_REF)) {
47
+ issues.push({ path: "/kindProfile", message: "Job contracts require the supported pinned Job Kind Profile" });
48
+ }
49
+ if (!sameProfileRef(binding.profile, JOB_CARD_KIND_PROFILE_REF)) {
50
+ issues.push({ path: "/kindResource/profile", message: "Job Card resource must use the pinned Job Kind Profile" });
51
+ }
52
+ if (binding.type !== JOB_CARD_KIND_PROFILE.resource.type || binding.version !== JOB_CARD_KIND_PROFILE.resource.version) {
53
+ issues.push({ path: "/kindResource", message: "Job Card resource type and version must match its Kind Profile" });
54
+ }
55
+ const value = binding.value;
56
+ if (value.id !== binding.id) {
57
+ issues.push({ path: "/kindResource/value/id", message: "Job Card binding and resource identifiers must match" });
58
+ }
59
+ const validation = validateContract("job-card", value);
60
+ if (!validation.ok) {
61
+ for (const error of validation.errors) {
62
+ issues.push({ path: `/kindResource/value${error.instancePath === "/" ? "" : error.instancePath}`, message: error.message });
63
+ }
64
+ }
65
+ if (!value.jobNumber?.trim()) {
66
+ issues.push({ path: "/kindResource/value/jobNumber", message: "Accepted Job contracts require a job number" });
67
+ }
68
+ if (value.phase === undefined) {
69
+ issues.push({ path: "/kindResource/value/phase", message: "Accepted Job contracts require a job phase" });
70
+ }
71
+ return issues;
72
+ }
73
+ export function contractCompletenessWithProfiles(body) {
74
+ return [...contractCompleteness(body), ...jobCardIssues(body)];
75
+ }
76
+ //# sourceMappingURL=topic-kind-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topic-kind-profile.js","sourceRoot":"","sources":["../../../src/contracts/topic-kind-profile.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sCAAsC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5F,OAAO,EAAE,oBAAoB,EAA4J,MAAM,qBAAqB,CAAC;AACrN,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAuClD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW;IACX,WAAW;IACX,YAAY;IACZ,aAAa;IACb,kBAAkB;IAClB,WAAW;IACX,WAAW;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAqBhF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,kBAAkB;IAC5B,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,MAAM;CACe,CAAC,CAAC;AAEnC,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAkC,CAAC;AAExG,MAAM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AE,CAAC;QAC7B,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,+BAA+B,EAAE,OAAO,EAAE,6CAA6C,EAAE,CAAC,CAAC;IACjH,CAAC;IACD,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,4CAA4C,EAAE,CAAC,CAAC;IAC5G,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,IAAyB;IACxE,OAAO,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;AACjE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export { CONTRACT_NAMES, type ContractName, } from "./contracts/schemas.js";
2
2
  export { assertContract, validateContract, type ContractValidationError, type ContractValidationResult, } from "./contracts/validator.js";
3
3
  export { PERSISTED_TOPIC_KINDS, TOPIC_CONTRACT_RECIPES, assertContractComplete, baseTopicKind, contractCompleteness, topicRecipeForKind, type PersistedTopicKind, type TemporalTarget, type TopicAppearance, type TopicAutomationBindingV2, type TopicContractBodyV2, type TopicContractCompletenessIssue, type TopicContractRecipe, type TopicIconName, type TopicKindRef, type TopicRecurrence, type TopicReminder, type TopicRiskV2, type TopicStatementV2, type TopicUserSettings, type Weekday, } from "./contracts/topic-contract.js";
4
+ export { JOB_CARD_KIND_PROFILE, JOB_CARD_KIND_PROFILE_REF, JOB_CARD_KIND_REF, JOB_CARD_PHASES, JOB_CARD_PRIORITIES, contractCompletenessWithProfiles, resolveTopicKindProfile, type JobCardPhase, type JobCardPriority, type JobCardV1, type TopicKindProfileRef, type TopicKindProfileV1, type TopicKindResourceBinding, } from "./contracts/topic-kind-profile.js";
4
5
  export { TopicProtocolError, type TopicProtocolErrorCode, } from "./errors.js";
5
6
  export { projectTopic } from "./projector/project.js";
6
7
  export { adoptedTopicAnchor, nativeTopicAnchor, selectCanonicalTopicAnchor } from "./matrix/anchors.js";
package/dist/src/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export { CONTRACT_NAMES, } from "./contracts/schemas.js";
2
2
  export { assertContract, validateContract, } from "./contracts/validator.js";
3
3
  export { PERSISTED_TOPIC_KINDS, TOPIC_CONTRACT_RECIPES, assertContractComplete, baseTopicKind, contractCompleteness, topicRecipeForKind, } from "./contracts/topic-contract.js";
4
+ export { JOB_CARD_KIND_PROFILE, JOB_CARD_KIND_PROFILE_REF, JOB_CARD_KIND_REF, JOB_CARD_PHASES, JOB_CARD_PRIORITIES, contractCompletenessWithProfiles, resolveTopicKindProfile, } from "./contracts/topic-kind-profile.js";
4
5
  export { TopicProtocolError, } from "./errors.js";
5
6
  export { projectTopic } from "./projector/project.js";
6
7
  export { adoptedTopicAnchor, nativeTopicAnchor, selectCanonicalTopicAnchor } from "./matrix/anchors.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,GAEf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,gBAAgB,GAGjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EACb,oBAAoB,EACpB,kBAAkB,GAgBnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,GAEnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,0BAA0B,EAC1B,qBAAqB,EACrB,aAAa,EACb,sBAAsB,GACvB,MAAM,qBAA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AsB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,GAkBzB,MAAM,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/topic-protocol",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Reference contracts and deterministic projection for IXO Topics",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -17,6 +17,7 @@
17
17
  "types": "./dist/src/index.d.ts",
18
18
  "files": [
19
19
  "dist",
20
+ "profiles",
20
21
  "README.md"
21
22
  ],
22
23
  "exports": {
@@ -24,7 +25,8 @@
24
25
  "types": "./dist/src/index.d.ts",
25
26
  "import": "./dist/src/index.js"
26
27
  },
27
- "./schemas/*": "./dist/schemas/*"
28
+ "./schemas/*": "./dist/schemas/*",
29
+ "./profiles/*": "./profiles/*"
28
30
  },
29
31
  "scripts": {
30
32
  "build": "tsc -p tsconfig.build.json",
@@ -0,0 +1,11 @@
1
+ # Job Card Kind Profile
2
+
3
+ `profile.json` is the immutable profile document for the first-party Job Kind
4
+ extension. It is pinned from Topic contracts by exact version and SHA-256
5
+ digest. The Job-specific resource validates against
6
+ `schemas/job-card.schema.json`.
7
+
8
+ Generic Topic clients fall back to the standard `task` Kind and `project`
9
+ recipe. Profile-aware clients may edit and project the room-visible fields
10
+ declared by the profile, but must keep the complete Job Card in the encrypted
11
+ contract body or its authorised bound resource.
@@ -0,0 +1,29 @@
1
+ {
2
+ "version": 1,
3
+ "id": "https://topic-protocol.ixo.world/profiles/job-card",
4
+ "profileVersion": "1.0.0",
5
+ "label": "Job",
6
+ "description": "A portable digital job card coordinated through a Task-based Topic.",
7
+ "kind": {
8
+ "customId": "org.ixo.job-card",
9
+ "baseKind": "task",
10
+ "recipe": "project"
11
+ },
12
+ "resource": {
13
+ "type": "org.ixo.job-card",
14
+ "version": 1,
15
+ "schema": "https://topic-protocol.ixo.world/schemas/job-card.schema.json"
16
+ },
17
+ "acceptance": {
18
+ "requiredResourcePaths": ["/jobNumber", "/phase"]
19
+ },
20
+ "projection": {
21
+ "key": "org.ixo.topic-kind/job-card/v1",
22
+ "roomVisibleFields": ["/jobNumber", "/phase", "/priority", "/scheduled/start"]
23
+ },
24
+ "presentation": {
25
+ "fallbackLabel": "Job",
26
+ "primaryFields": ["/jobNumber", "/phase", "/priority", "/scheduled/start", "/site", "/asset"]
27
+ },
28
+ "capabilities": ["topic/write", "topic/change-status", "topic/confirm-completion"]
29
+ }