@treeseed/sdk 0.13.0-rc.65 → 0.13.0-rc.67

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 (31) hide show
  1. package/dist/.treeseed-build-complete.json +1 -1
  2. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +304 -0
  3. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.js +44 -0
  4. package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +9 -0
  5. package/dist/agent-capacity/contracts/capacity/assignments/context-pack-compiler.d.ts +25 -0
  6. package/dist/agent-capacity/contracts/capacity/assignments/context-pack-compiler.js +67 -0
  7. package/dist/agent-capacity/validation/agent-definition-schema.js +2 -0
  8. package/dist/capacity/agents/agent-capacity.d.ts +2 -0
  9. package/dist/capacity/agents/agent-capacity.js +2 -0
  10. package/dist/capacity-provider/capability-ontology.d.ts +292 -3
  11. package/dist/capacity-provider/capability-ontology.js +23 -1
  12. package/dist/content/validation/agent-operational-content-schemas.d.ts +338 -16
  13. package/dist/content/validation/agent-operational-content-schemas.js +18 -3
  14. package/dist/content/validation/content-model-schemas.d.ts +362 -23
  15. package/dist/content/validation/portable-content-data.d.ts +20 -3
  16. package/dist/deployment/schemas.d.ts +84 -3
  17. package/dist/deployment/schemas.js +9 -1
  18. package/dist/entrypoints/clients/control-plane-client.js +5 -3
  19. package/dist/graph/context-query-contracts.d.ts +16 -1
  20. package/dist/graph/context-query-contracts.js +5 -0
  21. package/dist/model-registry/agent-operational-models.js +1 -1
  22. package/dist/operator-contracts/canonical-command-tree.js +1 -1
  23. package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +127 -0
  24. package/dist/operator-contracts/catalog/knowledge-share-operations.js +25 -0
  25. package/dist/operator-contracts/control-plane-operations.d.ts +125 -0
  26. package/dist/operator-contracts/control-plane-operations.js +2 -0
  27. package/dist/operator-contracts/index.d.ts +1 -0
  28. package/dist/operator-contracts/index.js +1 -0
  29. package/dist/operator-contracts/knowledge/contracts.d.ts +130 -0
  30. package/dist/operator-contracts/knowledge/contracts.js +39 -0
  31. package/package.json +1 -1
@@ -645,6 +645,131 @@ export declare const CONTROL_PLANE_OPERATIONS: {
645
645
  readonly publishReview: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
646
646
  reviewId: string;
647
647
  }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
648
+ readonly shares: {
649
+ list: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
650
+ teamId: string;
651
+ }, {}, undefined, {
652
+ items: {
653
+ status: "revoked" | "active" | "expired";
654
+ schemaVersion: "treeseed.knowledge-share/v1";
655
+ id: string;
656
+ createdAt: string;
657
+ updatedAt: string;
658
+ targetTeamId: string;
659
+ projectIds: string[];
660
+ sourceTeamId: string;
661
+ revokedAt: string | null;
662
+ expiresAt?: string | null | undefined;
663
+ operations?: ("read" | "context" | "query" | "graph")[] | undefined;
664
+ paths?: string[] | undefined;
665
+ contentModels?: string[] | undefined;
666
+ }[];
667
+ }>;
668
+ show: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
669
+ teamId: string;
670
+ shareId: string;
671
+ }, {}, undefined, {
672
+ status: "revoked" | "active" | "expired";
673
+ schemaVersion: "treeseed.knowledge-share/v1";
674
+ id: string;
675
+ createdAt: string;
676
+ updatedAt: string;
677
+ targetTeamId: string;
678
+ projectIds: string[];
679
+ sourceTeamId: string;
680
+ revokedAt: string | null;
681
+ expiresAt?: string | null | undefined;
682
+ operations?: ("read" | "context" | "query" | "graph")[] | undefined;
683
+ paths?: string[] | undefined;
684
+ contentModels?: string[] | undefined;
685
+ }>;
686
+ grant: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
687
+ teamId: string;
688
+ }, {}, {
689
+ targetTeamId: string;
690
+ projectIds: string[];
691
+ expiresAt?: string | null | undefined;
692
+ operations?: ("read" | "context" | "query" | "graph")[] | undefined;
693
+ paths?: string[] | undefined;
694
+ contentModels?: string[] | undefined;
695
+ }, {
696
+ status: "revoked" | "active" | "expired";
697
+ schemaVersion: "treeseed.knowledge-share/v1";
698
+ id: string;
699
+ createdAt: string;
700
+ updatedAt: string;
701
+ targetTeamId: string;
702
+ projectIds: string[];
703
+ sourceTeamId: string;
704
+ revokedAt: string | null;
705
+ expiresAt?: string | null | undefined;
706
+ operations?: ("read" | "context" | "query" | "graph")[] | undefined;
707
+ paths?: string[] | undefined;
708
+ contentModels?: string[] | undefined;
709
+ }>;
710
+ revoke: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
711
+ teamId: string;
712
+ shareId: string;
713
+ }, {}, {}, {
714
+ status: "revoked" | "active" | "expired";
715
+ schemaVersion: "treeseed.knowledge-share/v1";
716
+ id: string;
717
+ createdAt: string;
718
+ updatedAt: string;
719
+ targetTeamId: string;
720
+ projectIds: string[];
721
+ sourceTeamId: string;
722
+ revokedAt: string | null;
723
+ expiresAt?: string | null | undefined;
724
+ operations?: ("read" | "context" | "query" | "graph")[] | undefined;
725
+ paths?: string[] | undefined;
726
+ contentModels?: string[] | undefined;
727
+ }>;
728
+ };
729
+ readonly teamSearch: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
730
+ teamId: string;
731
+ }, {}, {
732
+ request: Record<string, unknown>;
733
+ projectIds?: string[] | undefined;
734
+ projectSlugs?: string[] | undefined;
735
+ sharedSources?: {
736
+ teamId: string;
737
+ projectIds?: string[] | undefined;
738
+ }[] | undefined;
739
+ }, Record<string, unknown>>;
740
+ readonly teamQuery: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
741
+ teamId: string;
742
+ }, {}, {
743
+ request: Record<string, unknown>;
744
+ projectIds?: string[] | undefined;
745
+ projectSlugs?: string[] | undefined;
746
+ sharedSources?: {
747
+ teamId: string;
748
+ projectIds?: string[] | undefined;
749
+ }[] | undefined;
750
+ }, Record<string, unknown>>;
751
+ readonly teamContext: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
752
+ teamId: string;
753
+ }, {}, {
754
+ request: Record<string, unknown>;
755
+ projectIds?: string[] | undefined;
756
+ projectSlugs?: string[] | undefined;
757
+ sharedSources?: {
758
+ teamId: string;
759
+ projectIds?: string[] | undefined;
760
+ }[] | undefined;
761
+ }, Record<string, unknown>>;
762
+ readonly teamGraph: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
763
+ teamId: string;
764
+ }, {}, {
765
+ request: Record<string, unknown>;
766
+ projectIds?: string[] | undefined;
767
+ projectSlugs?: string[] | undefined;
768
+ sharedSources?: {
769
+ teamId: string;
770
+ projectIds?: string[] | undefined;
771
+ }[] | undefined;
772
+ }, Record<string, unknown>>;
648
773
  };
649
774
  readonly governance: {
650
775
  readonly proposals: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
@@ -5,6 +5,7 @@ import { inboxOperations } from "./catalog/inbox-operations.js";
5
5
  import { adminAccountOperations, adminTeamOperations } from "./catalog/admin-account-team-operations.js";
6
6
  import { TREEAI_CONTROL_PLANE_OPERATIONS } from "./catalog/treeai-operations.js";
7
7
  import { capabilityOntologyOperations } from "./catalog/capability-ontology-operations.js";
8
+ import { knowledgeShareOperations } from "./catalog/knowledge-share-operations.js";
8
9
  import { buildControlPlaneCatalog, flattenControlPlaneOperations } from "./catalog/control-plane-catalog.js";
9
10
  const empty = z.object({}).strict();
10
11
  const none = z.undefined();
@@ -187,6 +188,7 @@ const CONTROL_PLANE_OPERATIONS = {
187
188
  updateStatus: resource("discussions.status.update", "POST", "/v1/discussions/{discussionId}/status", { discussionId: z.string().min(1) }, { capability: "discussions.write", scopes: ["treeseed:knowledge:write"], concurrency: true })
188
189
  },
189
190
  knowledge: {
191
+ ...knowledgeShareOperations(),
190
192
  library: resource("knowledge.library.list", "GET", "/v1/knowledge/library", {}, { capability: "knowledge.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
191
193
  reader: resource("knowledge.reader.show", "GET", "/v1/knowledge/reader", {}, { capability: "knowledge.read", surfaces: ["rest", "mcp_resource"] }),
192
194
  context: resource("knowledge.context.show", "GET", "/v1/knowledge/context", {}, { capability: "knowledge.read", surfaces: ["rest", "mcp_tool"] }),
@@ -9,5 +9,6 @@ export * from './oauth.js';
9
9
  export * from './communication/contracts.js';
10
10
  export * from './communication/addressing.js';
11
11
  export * from './inbox/contracts.js';
12
+ export * from './knowledge/contracts.js';
12
13
  export * from '../capacity-provider/capability-ontology.js';
13
14
  export * from './seed/seed-bundle.js';
@@ -9,5 +9,6 @@ export * from "./oauth.js";
9
9
  export * from "./communication/contracts.js";
10
10
  export * from "./communication/addressing.js";
11
11
  export * from "./inbox/contracts.js";
12
+ export * from "./knowledge/contracts.js";
12
13
  export * from "../capacity-provider/capability-ontology.js";
13
14
  export * from "./seed/seed-bundle.js";
@@ -0,0 +1,130 @@
1
+ import { z } from 'zod';
2
+ export declare const knowledgeShareOperationSchema: z.ZodEnum<["read", "query", "context", "graph"]>;
3
+ export declare const knowledgeShareGrantInputSchema: z.ZodObject<{
4
+ targetTeamId: z.ZodString;
5
+ projectIds: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
6
+ contentModels: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
7
+ paths: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
8
+ operations: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodEnum<["read", "query", "context", "graph"]>, "many">, ("read" | "context" | "query" | "graph")[], ("read" | "context" | "query" | "graph")[]>>;
9
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10
+ }, "strict", z.ZodTypeAny, {
11
+ expiresAt: string | null;
12
+ operations: ("read" | "context" | "query" | "graph")[];
13
+ paths: string[];
14
+ targetTeamId: string;
15
+ projectIds: string[];
16
+ contentModels: string[];
17
+ }, {
18
+ targetTeamId: string;
19
+ projectIds: string[];
20
+ expiresAt?: string | null | undefined;
21
+ operations?: ("read" | "context" | "query" | "graph")[] | undefined;
22
+ paths?: string[] | undefined;
23
+ contentModels?: string[] | undefined;
24
+ }>;
25
+ export declare const knowledgeShareSchema: z.ZodEffects<z.ZodObject<{
26
+ targetTeamId: z.ZodString;
27
+ projectIds: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
28
+ contentModels: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
29
+ paths: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
30
+ operations: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodEnum<["read", "query", "context", "graph"]>, "many">, ("read" | "context" | "query" | "graph")[], ("read" | "context" | "query" | "graph")[]>>;
31
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
32
+ } & {
33
+ schemaVersion: z.ZodLiteral<"treeseed.knowledge-share/v1">;
34
+ id: z.ZodString;
35
+ sourceTeamId: z.ZodString;
36
+ status: z.ZodEnum<["active", "revoked", "expired"]>;
37
+ createdAt: z.ZodString;
38
+ updatedAt: z.ZodString;
39
+ revokedAt: z.ZodNullable<z.ZodString>;
40
+ }, "strict", z.ZodTypeAny, {
41
+ status: "revoked" | "active" | "expired";
42
+ schemaVersion: "treeseed.knowledge-share/v1";
43
+ id: string;
44
+ createdAt: string;
45
+ expiresAt: string | null;
46
+ operations: ("read" | "context" | "query" | "graph")[];
47
+ paths: string[];
48
+ updatedAt: string;
49
+ targetTeamId: string;
50
+ projectIds: string[];
51
+ contentModels: string[];
52
+ sourceTeamId: string;
53
+ revokedAt: string | null;
54
+ }, {
55
+ status: "revoked" | "active" | "expired";
56
+ schemaVersion: "treeseed.knowledge-share/v1";
57
+ id: string;
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ targetTeamId: string;
61
+ projectIds: string[];
62
+ sourceTeamId: string;
63
+ revokedAt: string | null;
64
+ expiresAt?: string | null | undefined;
65
+ operations?: ("read" | "context" | "query" | "graph")[] | undefined;
66
+ paths?: string[] | undefined;
67
+ contentModels?: string[] | undefined;
68
+ }>, {
69
+ status: "revoked" | "active" | "expired";
70
+ schemaVersion: "treeseed.knowledge-share/v1";
71
+ id: string;
72
+ createdAt: string;
73
+ expiresAt: string | null;
74
+ operations: ("read" | "context" | "query" | "graph")[];
75
+ paths: string[];
76
+ updatedAt: string;
77
+ targetTeamId: string;
78
+ projectIds: string[];
79
+ contentModels: string[];
80
+ sourceTeamId: string;
81
+ revokedAt: string | null;
82
+ }, {
83
+ status: "revoked" | "active" | "expired";
84
+ schemaVersion: "treeseed.knowledge-share/v1";
85
+ id: string;
86
+ createdAt: string;
87
+ updatedAt: string;
88
+ targetTeamId: string;
89
+ projectIds: string[];
90
+ sourceTeamId: string;
91
+ revokedAt: string | null;
92
+ expiresAt?: string | null | undefined;
93
+ operations?: ("read" | "context" | "query" | "graph")[] | undefined;
94
+ paths?: string[] | undefined;
95
+ contentModels?: string[] | undefined;
96
+ }>;
97
+ export declare const teamKnowledgeRequestSchema: z.ZodObject<{
98
+ projectIds: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
99
+ projectSlugs: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
100
+ sharedSources: z.ZodDefault<z.ZodArray<z.ZodObject<{
101
+ teamId: z.ZodString;
102
+ projectIds: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
103
+ }, "strict", z.ZodTypeAny, {
104
+ teamId: string;
105
+ projectIds: string[];
106
+ }, {
107
+ teamId: string;
108
+ projectIds?: string[] | undefined;
109
+ }>, "many">>;
110
+ request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
111
+ }, "strict", z.ZodTypeAny, {
112
+ request: Record<string, unknown>;
113
+ projectIds: string[];
114
+ projectSlugs: string[];
115
+ sharedSources: {
116
+ teamId: string;
117
+ projectIds: string[];
118
+ }[];
119
+ }, {
120
+ request: Record<string, unknown>;
121
+ projectIds?: string[] | undefined;
122
+ projectSlugs?: string[] | undefined;
123
+ sharedSources?: {
124
+ teamId: string;
125
+ projectIds?: string[] | undefined;
126
+ }[] | undefined;
127
+ }>;
128
+ export type KnowledgeShare = z.infer<typeof knowledgeShareSchema>;
129
+ export type KnowledgeShareGrantInput = z.infer<typeof knowledgeShareGrantInputSchema>;
130
+ export type TeamKnowledgeRequest = z.infer<typeof teamKnowledgeRequestSchema>;
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ const nonEmpty = z.string().trim().min(1);
3
+ const uniqueStrings = (minimum = 0) => z.array(nonEmpty).min(minimum).superRefine((values, context) => {
4
+ if (new Set(values).size !== values.length) context.addIssue({ code: z.ZodIssueCode.custom, message: "Values must be unique." });
5
+ });
6
+ const knowledgeShareOperationSchema = z.enum(["read", "query", "context", "graph"]);
7
+ const knowledgeShareGrantInputSchema = z.object({
8
+ targetTeamId: nonEmpty,
9
+ projectIds: uniqueStrings(1),
10
+ contentModels: uniqueStrings().default([]),
11
+ paths: uniqueStrings(1).default(["**"]),
12
+ operations: z.array(knowledgeShareOperationSchema).min(1).superRefine((values, context) => {
13
+ if (new Set(values).size !== values.length) context.addIssue({ code: z.ZodIssueCode.custom, message: "Operations must be unique." });
14
+ }).default(["read", "query", "context", "graph"]),
15
+ expiresAt: z.string().datetime({ offset: true }).nullable().default(null)
16
+ }).strict();
17
+ const knowledgeShareSchema = knowledgeShareGrantInputSchema.extend({
18
+ schemaVersion: z.literal("treeseed.knowledge-share/v1"),
19
+ id: nonEmpty,
20
+ sourceTeamId: nonEmpty,
21
+ status: z.enum(["active", "revoked", "expired"]),
22
+ createdAt: z.string().datetime({ offset: true }),
23
+ updatedAt: z.string().datetime({ offset: true }),
24
+ revokedAt: z.string().datetime({ offset: true }).nullable()
25
+ }).strict().superRefine((value, context) => {
26
+ if (value.sourceTeamId === value.targetTeamId) context.addIssue({ code: z.ZodIssueCode.custom, path: ["targetTeamId"], message: "Knowledge shares are only for another team." });
27
+ });
28
+ const teamKnowledgeRequestSchema = z.object({
29
+ projectIds: uniqueStrings().default([]),
30
+ projectSlugs: uniqueStrings().default([]),
31
+ sharedSources: z.array(z.object({ teamId: nonEmpty, projectIds: uniqueStrings().default([]) }).strict()).default([]),
32
+ request: z.record(z.unknown())
33
+ }).strict();
34
+ export {
35
+ knowledgeShareGrantInputSchema,
36
+ knowledgeShareOperationSchema,
37
+ knowledgeShareSchema,
38
+ teamKnowledgeRequestSchema
39
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.65",
3
+ "version": "0.13.0-rc.67",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {