@treeseed/sdk 0.13.0-rc.52 → 0.13.0-rc.54

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 (25) hide show
  1. package/README.md +4 -0
  2. package/dist/agent-capacity/authority/agent-authority-presets.js +2 -1
  3. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +2 -2
  4. package/dist/capacity-provider/client.d.ts +15 -0
  5. package/dist/capacity-provider/client.js +6 -0
  6. package/dist/content/validation/agent-operational-content-schemas.d.ts +14 -14
  7. package/dist/content/validation/auxiliary-content-schemas.d.ts +4 -4
  8. package/dist/content/validation/content-model-schemas.d.ts +28 -28
  9. package/dist/content/validation/portable-content-data.d.ts +5 -5
  10. package/dist/deployment/schemas.js +1 -1
  11. package/dist/operator-contracts/canonical-command-tree.js +26 -5
  12. package/dist/operator-contracts/catalog/communication-operations.d.ts +286 -19
  13. package/dist/operator-contracts/catalog/communication-operations.js +56 -2
  14. package/dist/operator-contracts/catalog/inbox-operations.d.ts +261 -0
  15. package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
  16. package/dist/operator-contracts/communication/contracts.d.ts +1223 -33
  17. package/dist/operator-contracts/communication/contracts.js +99 -7
  18. package/dist/operator-contracts/control-plane-operations.d.ts +577 -51
  19. package/dist/operator-contracts/control-plane-operations.js +4 -1
  20. package/dist/operator-contracts/inbox/contracts.d.ts +1099 -0
  21. package/dist/operator-contracts/inbox/contracts.js +134 -0
  22. package/dist/operator-contracts/index.d.ts +1 -0
  23. package/dist/operator-contracts/index.js +1 -0
  24. package/dist/operator-contracts/mcp.js +1 -1
  25. package/package.json +1 -1
@@ -0,0 +1,134 @@
1
+ import { z } from "zod";
2
+ const inboxItemKindSchema = z.enum(["proposal", "question"]);
3
+ const inboxItemStatusSchema = z.enum(["outstanding", "answered", "approved", "rejected", "closed", "deleted"]);
4
+ const inboxActionKindSchema = z.enum(["publish_revision", "approve", "reject", "comment", "answer", "reply", "reopen"]);
5
+ const inboxProvenanceSchema = z.object({
6
+ repositoryId: z.string().nullable(),
7
+ contentPath: z.string().nullable(),
8
+ commitSha: z.string().nullable(),
9
+ digest: z.string().nullable()
10
+ }).strict();
11
+ const inboxActionDescriptorSchema = z.object({
12
+ action: inboxActionKindSchema,
13
+ label: z.string(),
14
+ enabled: z.boolean(),
15
+ reason: z.string().nullable(),
16
+ requiresFeedback: z.boolean(),
17
+ confirmation: z.enum(["never", "input_required"])
18
+ }).strict();
19
+ const inboxCommentSchema = z.object({
20
+ id: z.string(),
21
+ parentId: z.string().nullable(),
22
+ kind: z.enum(["comment", "answer", "reply"]),
23
+ authorId: z.string(),
24
+ authorLabel: z.string(),
25
+ markdown: z.string(),
26
+ createdAt: z.string().datetime(),
27
+ provenance: inboxProvenanceSchema
28
+ }).strict();
29
+ const inboxItemSchema = z.object({
30
+ schemaVersion: z.literal("treeseed.inbox-item/v1"),
31
+ id: z.string(),
32
+ teamId: z.string(),
33
+ projectId: z.string(),
34
+ projectSlug: z.string(),
35
+ kind: inboxItemKindSchema,
36
+ title: z.string(),
37
+ markdown: z.string(),
38
+ status: inboxItemStatusSchema,
39
+ authorId: z.string(),
40
+ authorLabel: z.string(),
41
+ version: z.number().int().positive(),
42
+ discussionId: z.string().nullable(),
43
+ createdAt: z.string().datetime(),
44
+ updatedAt: z.string().datetime(),
45
+ provenance: inboxProvenanceSchema,
46
+ availableActions: z.array(inboxActionDescriptorSchema),
47
+ comments: z.array(inboxCommentSchema),
48
+ etag: z.string()
49
+ }).strict();
50
+ const inboxItemSummarySchema = inboxItemSchema.pick({
51
+ id: true,
52
+ teamId: true,
53
+ projectId: true,
54
+ projectSlug: true,
55
+ kind: true,
56
+ title: true,
57
+ status: true,
58
+ authorId: true,
59
+ authorLabel: true,
60
+ version: true,
61
+ createdAt: true,
62
+ updatedAt: true,
63
+ etag: true
64
+ });
65
+ const inboxItemPageSchema = z.object({
66
+ schemaVersion: z.literal("treeseed.inbox-page/v1"),
67
+ items: z.array(inboxItemSummarySchema),
68
+ cursor: z.string().nullable()
69
+ }).strict();
70
+ const inboxEventSchema = z.object({
71
+ schemaVersion: z.literal("treeseed.inbox-event/v1"),
72
+ sequence: z.string(),
73
+ id: z.string(),
74
+ teamId: z.string(),
75
+ itemId: z.string().nullable(),
76
+ type: z.enum(["item.created", "item.updated", "item.deleted", "draft.updated", "comment.created", "question.answered", "question.reopened", "proposal.revised", "proposal.decided"]),
77
+ actorId: z.string(),
78
+ occurredAt: z.string().datetime(),
79
+ summary: z.string(),
80
+ payload: z.record(z.unknown())
81
+ }).strict();
82
+ const inboxTimelineSchema = z.object({ events: z.array(inboxEventSchema), cursor: z.string() }).strict();
83
+ const inboxDraftPurposeSchema = z.enum(["feedback", "proposal_revision"]);
84
+ const inboxDraftSchema = z.object({
85
+ schemaVersion: z.literal("treeseed.inbox-draft/v1"),
86
+ itemId: z.string(),
87
+ purpose: inboxDraftPurposeSchema,
88
+ markdown: z.string(),
89
+ baseVersion: z.number().int().positive(),
90
+ revision: z.number().int().nonnegative(),
91
+ updatedAt: z.string().datetime(),
92
+ etag: z.string()
93
+ }).strict();
94
+ const inboxDraftWriteSchema = z.object({ markdown: z.string().max(1e5), baseVersion: z.number().int().positive() }).strict();
95
+ const inboxQuestionCreateSchema = z.object({
96
+ projectId: z.string(),
97
+ title: z.string().trim().min(1).max(180),
98
+ markdown: z.string().trim().min(1).max(1e5),
99
+ recipients: z.array(z.string()).max(64).default([]),
100
+ relatedObjectives: z.array(z.string()).max(64).default([])
101
+ }).strict();
102
+ const inboxActionRequestSchema = z.object({
103
+ action: inboxActionKindSchema,
104
+ markdown: z.string().max(1e5).optional(),
105
+ parentId: z.string().optional(),
106
+ changeReason: z.string().max(2e3).optional(),
107
+ draftRevision: z.number().int().nonnegative().optional()
108
+ }).strict();
109
+ const inboxMutationReceiptSchema = z.object({
110
+ schemaVersion: z.literal("treeseed.inbox-mutation-receipt/v1"),
111
+ item: inboxItemSchema,
112
+ action: inboxActionKindSchema.optional(),
113
+ replayed: z.boolean(),
114
+ receipts: z.array(z.record(z.unknown())).default([])
115
+ }).strict();
116
+ export {
117
+ inboxActionDescriptorSchema,
118
+ inboxActionKindSchema,
119
+ inboxActionRequestSchema,
120
+ inboxCommentSchema,
121
+ inboxDraftPurposeSchema,
122
+ inboxDraftSchema,
123
+ inboxDraftWriteSchema,
124
+ inboxEventSchema,
125
+ inboxItemKindSchema,
126
+ inboxItemPageSchema,
127
+ inboxItemSchema,
128
+ inboxItemStatusSchema,
129
+ inboxItemSummarySchema,
130
+ inboxMutationReceiptSchema,
131
+ inboxProvenanceSchema,
132
+ inboxQuestionCreateSchema,
133
+ inboxTimelineSchema
134
+ };
@@ -8,4 +8,5 @@ export * from './mcp.js';
8
8
  export * from './oauth.js';
9
9
  export * from './communication/contracts.js';
10
10
  export * from './communication/addressing.js';
11
+ export * from './inbox/contracts.js';
11
12
  export * from './seed/seed-bundle.js';
@@ -8,4 +8,5 @@ export * from "./mcp.js";
8
8
  export * from "./oauth.js";
9
9
  export * from "./communication/contracts.js";
10
10
  export * from "./communication/addressing.js";
11
+ export * from "./inbox/contracts.js";
11
12
  export * from "./seed/seed-bundle.js";
@@ -10,7 +10,7 @@ const TREESEED_MCP_PROMPTS = [
10
10
  { name: "research", description: "Research a governed TreeSeed question and accumulate knowledge.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] },
11
11
  { name: "governance-review", description: "Review a proposal or decision using current governance evidence.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] },
12
12
  { name: "workday-planning", description: "Plan a time-based workday without bypassing API authority.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] },
13
- { name: "project-agent-chat", description: "Prepare an explicit governed project-agent chat invocation.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] }
13
+ { name: "project-agent-chat", description: "Prepare an explicit governed team-topic chat invocation for project agents.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] }
14
14
  ];
15
15
  function resourcePath(restPath) {
16
16
  const [root, version, ...segments] = restPath.split("/");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.52",
3
+ "version": "0.13.0-rc.54",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {