@ixo/topic-protocol 1.0.0-rc.2 → 1.0.0-rc.4

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.
Files changed (77) hide show
  1. package/README.md +5 -2
  2. package/dist/profiles/releases/1.0.0-rc.3.json +8442 -0
  3. package/dist/schemas/external-project-snapshot.schema.json +121 -0
  4. package/dist/schemas/external-work-state-map.schema.json +1 -1
  5. package/dist/schemas/project-plan.schema.json +75 -0
  6. package/dist/schemas/project-projection.schema.json +187 -0
  7. package/dist/schemas/topic-contract-body.schema.json +1 -0
  8. package/dist/schemas/topic-operation.schema.json +155 -13
  9. package/dist/schemas/topic-recipe.schema.json +53 -3
  10. package/dist/schemas/topic-root.schema.json +1 -1
  11. package/dist/schemas/topic-shape.schema.json +1 -1
  12. package/dist/schemas/topic-state.schema.json +1 -0
  13. package/dist/src/contracts/schemas.d.ts +734 -54
  14. package/dist/src/contracts/schemas.js +6 -0
  15. package/dist/src/contracts/schemas.js.map +1 -1
  16. package/dist/src/contracts/topic-contract.d.ts +4 -2
  17. package/dist/src/contracts/topic-contract.js +6 -1
  18. package/dist/src/contracts/topic-contract.js.map +1 -1
  19. package/dist/src/contracts/validator.js +53 -3
  20. package/dist/src/contracts/validator.js.map +1 -1
  21. package/dist/src/index.d.ts +11 -2
  22. package/dist/src/index.js +9 -0
  23. package/dist/src/index.js.map +1 -1
  24. package/dist/src/projector/payload.d.ts +53 -3
  25. package/dist/src/projector/payload.js +107 -15
  26. package/dist/src/projector/payload.js.map +1 -1
  27. package/dist/src/projector/project.js +3 -3
  28. package/dist/src/projector/project.js.map +1 -1
  29. package/dist/src/projector/state.d.ts +2 -2
  30. package/dist/src/projector/state.js +103 -3
  31. package/dist/src/projector/state.js.map +1 -1
  32. package/dist/src/projector/types.d.ts +10 -4
  33. package/dist/src/projector/types.js +1 -0
  34. package/dist/src/projector/types.js.map +1 -1
  35. package/dist/src/projects/project.d.ts +7 -0
  36. package/dist/src/projects/project.js +294 -0
  37. package/dist/src/projects/project.js.map +1 -0
  38. package/dist/src/projects/types.d.ts +127 -0
  39. package/dist/src/projects/types.js +14 -0
  40. package/dist/src/projects/types.js.map +1 -0
  41. package/dist/src/shapes/availability.d.ts +2 -0
  42. package/dist/src/shapes/availability.js +19 -0
  43. package/dist/src/shapes/availability.js.map +1 -0
  44. package/dist/src/shapes/commands.d.ts +3 -0
  45. package/dist/src/shapes/commands.js +10 -0
  46. package/dist/src/shapes/commands.js.map +1 -0
  47. package/dist/src/shapes/fields.d.ts +9 -0
  48. package/dist/src/shapes/fields.js +41 -0
  49. package/dist/src/shapes/fields.js.map +1 -0
  50. package/dist/src/shapes/now.js +4 -1
  51. package/dist/src/shapes/now.js.map +1 -1
  52. package/dist/src/shapes/progress.d.ts +5 -1
  53. package/dist/src/shapes/progress.js +99 -49
  54. package/dist/src/shapes/progress.js.map +1 -1
  55. package/dist/src/shapes/reachability.d.ts +3 -0
  56. package/dist/src/shapes/reachability.js +29 -0
  57. package/dist/src/shapes/reachability.js.map +1 -0
  58. package/dist/src/shapes/recipes.js +124 -21
  59. package/dist/src/shapes/recipes.js.map +1 -1
  60. package/dist/src/shapes/releases.d.ts +9 -0
  61. package/dist/src/shapes/releases.js +12 -0
  62. package/dist/src/shapes/releases.js.map +1 -0
  63. package/dist/src/shapes/resolver.d.ts +3 -0
  64. package/dist/src/shapes/resolver.js +62 -16
  65. package/dist/src/shapes/resolver.js.map +1 -1
  66. package/dist/src/shapes/types.d.ts +16 -2
  67. package/dist/src/shapes/types.js +2 -0
  68. package/dist/src/shapes/types.js.map +1 -1
  69. package/dist/src/work-bridge/types.d.ts +14 -1
  70. package/package.json +1 -1
  71. package/profiles/releases/1.0.0-rc.3.json +8442 -0
  72. package/recipes/agent-delivery.json +54 -4
  73. package/recipes/blueprint-design.json +613 -0
  74. package/recipes/registry.json +30 -6
  75. package/recipes/research-brief.json +53 -2
  76. package/recipes/software-build.json +566 -0
  77. package/recipes/verified-work-payment.json +56 -5
@@ -2,7 +2,7 @@ export declare const SHAPE_PHASES: readonly ["forming", "working", "verifying",
2
2
  export declare const SHAPE_CONDITIONS: readonly ["on-track", "needs-input", "needs-confirmation", "review-due", "expired", "waiting", "blocked", "failed", "disputed", "degraded"];
3
3
  export declare const SHAPE_ATTENTION_STATES: readonly ["none", "viewer-action-required", "viewer-review-required", "viewer-confirmation-required"];
4
4
  export declare const BASE_RECIPE_CODES: readonly ["project", "flow", "proposal", "evaluation", "claims", "research", "discussion", "incident"];
5
- export declare const TOPIC_RECIPE_CODES: readonly ["research-brief", "agent-delivery", "verified-work-payment"];
5
+ export declare const TOPIC_RECIPE_CODES: readonly ["software-build", "blueprint-design", "research-brief", "agent-delivery", "verified-work-payment"];
6
6
  export type ShapePhaseV1 = (typeof SHAPE_PHASES)[number];
7
7
  export type ShapeConditionV1 = (typeof SHAPE_CONDITIONS)[number];
8
8
  export type ShapeAttentionV1 = (typeof SHAPE_ATTENTION_STATES)[number];
@@ -14,6 +14,7 @@ export type ShapeEvidenceRequirementV1 = {
14
14
  readonly kind: "operation" | "record" | "receipt";
15
15
  readonly type: string;
16
16
  readonly finality?: "observed" | "accepted" | "verified" | "final";
17
+ readonly status?: string;
17
18
  };
18
19
  export type TopicSubjectRefV1 = {
19
20
  readonly kind: "actor";
@@ -72,6 +73,7 @@ export type ShapeGateV1 = ({
72
73
  readonly kind: "field-any";
73
74
  readonly paths: readonly string[];
74
75
  readonly predicate: "present" | "accepted";
76
+ readonly values?: Readonly<Record<string, readonly string[]>>;
75
77
  } | {
76
78
  readonly kind: "record";
77
79
  readonly type: string;
@@ -190,6 +192,7 @@ export interface TopicRecipeV1 {
190
192
  readonly baseRecipe: BaseRecipeCodeV1;
191
193
  readonly creates: "draft";
192
194
  readonly shape: TopicShapeV1;
195
+ readonly project?: ProjectRecipeConfigurationV1;
193
196
  }
194
197
  export interface EffectiveTopicShapeV1 {
195
198
  readonly version: 1;
@@ -221,6 +224,13 @@ export interface TopicProgressSourceV2 extends TopicProgressSourceV1 {
221
224
  readonly bodyHash?: `sha256:${string}`;
222
225
  readonly policyDigest?: `sha256:${string}`;
223
226
  readonly authorityProofRef?: string;
227
+ /** Authenticated context immediately before this event, supplied by the history adapter. */
228
+ readonly context?: {
229
+ readonly status: TopicProgressInputV1["status"];
230
+ readonly block?: TopicProgressBlockV1;
231
+ readonly dispute?: TopicDisputeV1;
232
+ readonly evaluationTime?: TopicEvaluationTimeV1;
233
+ };
224
234
  }
225
235
  export interface TopicEvaluationTimeV1 {
226
236
  readonly at: string;
@@ -234,7 +244,7 @@ export interface TopicDisputeV1 {
234
244
  readonly reasonCode: string;
235
245
  readonly raisedBy: string;
236
246
  readonly affectedRevision: string;
237
- readonly resolver: TopicSubjectRefV1;
247
+ readonly resolver?: TopicSubjectRefV1;
238
248
  readonly process?: TopicDisputePolicyV1["process"];
239
249
  readonly resolutionRef?: string;
240
250
  }
@@ -257,6 +267,8 @@ export interface TopicProgressInputV1 {
257
267
  readonly axisStates: Readonly<Record<string, string>>;
258
268
  readonly sources: readonly TopicProgressSourceV1[];
259
269
  readonly presentFields?: readonly string[];
270
+ readonly fieldValues?: Readonly<Record<string, string>>;
271
+ readonly supportedCommands?: readonly string[];
260
272
  readonly acceptedFields?: readonly string[];
261
273
  readonly bindings?: readonly ("flow" | "claim" | "resource")[];
262
274
  readonly actorAssignments?: Readonly<Record<string, readonly string[]>>;
@@ -348,6 +360,7 @@ export interface TopicProgressProjectionV2 extends TopicProgressProjectionCommon
348
360
  }
349
361
  export interface TopicViewerAuthorityV1 {
350
362
  readonly viewerId: string;
363
+ readonly supportedCommands?: readonly string[];
351
364
  readonly matrixWrite: boolean;
352
365
  readonly verifiedAbilities: readonly string[];
353
366
  readonly roleAssignments: Readonly<Record<string, readonly string[]>>;
@@ -389,4 +402,5 @@ export interface TopicNowProjectionV2 {
389
402
  };
390
403
  readonly blockedOn?: TopicProgressBlockV1["target"];
391
404
  }
405
+ import type { ProjectRecipeConfigurationV1 } from "../projects/types.js";
392
406
  export {};
@@ -37,6 +37,8 @@ export const BASE_RECIPE_CODES = [
37
37
  "incident",
38
38
  ];
39
39
  export const TOPIC_RECIPE_CODES = [
40
+ "software-build",
41
+ "blueprint-design",
40
42
  "research-brief",
41
43
  "agent-delivery",
42
44
  "verified-work-payment",
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/shapes/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS;IACT,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,UAAU;IACV,UAAU;IACV,SAAS;CACD,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU;IACV,aAAa;IACb,oBAAoB;IACpB,YAAY;IACZ,SAAS;IACT,SAAS;IACT,SAAS;IACT,QAAQ;IACR,UAAU;IACV,UAAU;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,MAAM;IACN,wBAAwB;IACxB,wBAAwB;IACxB,8BAA8B;CACtB,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,SAAS;IACT,MAAM;IACN,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,UAAU;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,gBAAgB;IAChB,gBAAgB;IAChB,uBAAuB;CACf,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/shapes/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS;IACT,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,UAAU;IACV,UAAU;IACV,SAAS;CACD,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU;IACV,aAAa;IACb,oBAAoB;IACpB,YAAY;IACZ,SAAS;IACT,SAAS;IACT,SAAS;IACT,QAAQ;IACR,UAAU;IACV,UAAU;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,MAAM;IACN,wBAAwB;IACxB,wBAAwB;IACxB,8BAA8B;CACtB,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,SAAS;IACT,MAAM;IACN,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,UAAU;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;IAChB,uBAAuB;CACf,CAAC"}
@@ -13,7 +13,7 @@ export interface ExternalWorkStateMapV1 {
13
13
  readonly profileId: string;
14
14
  readonly provider: string;
15
15
  readonly organizationId: string;
16
- readonly teamId: string;
16
+ readonly teamId?: string;
17
17
  readonly mappings: readonly ExternalWorkStateMapping[];
18
18
  }
19
19
  export interface ExternalWorkflowStateInput {
@@ -112,6 +112,19 @@ export interface WorkItemSnapshotV1 extends Readonly<Record<string, unknown>> {
112
112
  readonly topicId: string;
113
113
  readonly digest: Sha256Digest;
114
114
  }
115
+ /**
116
+ * Immutable provider-neutral observation of an external project/container.
117
+ * Its state is evidence only: even `handoff_ready` cannot alter Topic
118
+ * authority, Project lifecycle, or closer acceptance.
119
+ */
120
+ export interface ExternalProjectSnapshotV1 extends Readonly<Record<string, unknown>> {
121
+ readonly version: 1;
122
+ readonly snapshotId: string;
123
+ readonly bindingId: string;
124
+ readonly topicId: string;
125
+ readonly digest: Sha256Digest;
126
+ }
127
+ export type ExternalWorkSnapshotV1 = WorkItemSnapshotV1 | ExternalProjectSnapshotV1;
115
128
  export interface DeliveryPacketV1 {
116
129
  readonly version: 1;
117
130
  readonly deliveryPacketId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/topic-protocol",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "Reference contracts and deterministic projection for IXO Topics",
5
5
  "type": "module",
6
6
  "sideEffects": false,