@treeseed/sdk 0.13.0-rc.121 → 0.13.0-rc.122
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/dist/.treeseed-build-complete.json +1 -1
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +1594 -922
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +22 -1
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +40 -40
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +1 -59
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.d.ts +1 -1
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +1 -1
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +18 -20
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +1 -1
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +0 -67
- package/dist/agent-capacity/contracts/configuration/configuration.d.ts +1 -1
- package/dist/agent-capacity/contracts/configuration/configuration.js +0 -2
- package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +8 -8
- package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +0 -23
- package/dist/agent-capacity/contracts/runtime/runtime-observability.d.ts +2 -154
- package/dist/agent-capacity/contracts/support/agent-atlas.d.ts +0 -13
- package/dist/agent-capacity/contracts/support/execution-graph.d.ts +176 -176
- package/dist/agent-capacity/contracts/support/execution-graph.js +1 -1
- package/dist/agent-capacity/contracts/support/financial-records.d.ts +1 -6
- package/dist/agent-capacity/contracts/support/planning-records.d.ts +1 -87
- package/dist/agent-capacity/grant.d.ts +34 -0
- package/dist/agent-capacity/grant.js +4 -0
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +1042 -1042
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +11 -11
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.js +0 -1
- package/dist/agent-capacity/validation/assignment-records.d.ts +1 -6
- package/dist/agent-capacity/validation/assignment-records.js +4 -35
- package/dist/agent-capacity/validation/configuration.d.ts +1 -1
- package/dist/agent-capacity/validation/configuration.js +2 -6
- package/dist/agent-capacity/validation/grant.d.ts +11 -0
- package/dist/agent-capacity/validation/grant.js +31 -0
- package/dist/capacity/agents/agent-capacity.d.ts +2 -4
- package/dist/capacity/agents/agent-capacity.js +1 -3
- package/dist/capacity-provider/capability-ontology.d.ts +138 -138
- package/dist/capacity-provider/client.d.ts +1 -2
- package/dist/capacity-provider/client.js +0 -6
- package/dist/capacity-provider/contracts/environment-profiles.d.ts +8 -8
- package/dist/capacity-provider/core-capability-catalog.d.ts +4 -4
- package/dist/capacity-provider/environment-catalog.d.ts +166 -166
- package/dist/capacity-provider/install-configuration.d.ts +2 -2
- package/dist/capacity-provider/sandbox-contracts.d.ts +52 -52
- package/dist/capacity-provider/source-workspace.d.ts +102 -4
- package/dist/capacity-provider/source-workspace.js +5 -1
- package/dist/content/validation/agent-operational-content-schemas.d.ts +108 -108
- package/dist/content/validation/auxiliary-content-schemas.d.ts +108 -108
- package/dist/content/validation/content-model-schemas.d.ts +9473 -6284
- package/dist/content/validation/content-model-schemas.js +116 -48
- package/dist/content/validation/portable-content-data.d.ts +351 -181
- package/dist/content/validation/portable-content-data.js +6 -1
- package/dist/deployment/ai/storage.d.ts +14 -14
- package/dist/deployment/ai-hosting.d.ts +10 -10
- package/dist/deployment/ai-instance.d.ts +14 -14
- package/dist/deployment/ai-mode.d.ts +82 -82
- package/dist/deployment/hosted-topology-template.d.ts +24 -24
- package/dist/deployment/hosted-topology.d.ts +219 -219
- package/dist/deployment/postgres/contracts.d.ts +52 -52
- package/dist/deployment/postgres/transfer.d.ts +4 -4
- package/dist/deployment/schemas.d.ts +780 -780
- package/dist/development/schemas.d.ts +439 -439
- package/dist/knowledge/contracts.d.ts +9 -2
- package/dist/knowledge/contracts.js +2 -2
- package/dist/model-registry/discussion-models.js +0 -1
- package/dist/operator-contracts/canonical-command-tree.js +3 -1
- package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +2 -2
- package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +17 -17
- package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +4 -4
- package/dist/operator-contracts/catalog/communication-operations.d.ts +100 -100
- package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +40 -40
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +54 -54
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +5 -5
- package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +10 -10
- package/dist/operator-contracts/catalog/services/secret-operations.d.ts +8 -8
- package/dist/operator-contracts/communication/contracts.d.ts +273 -273
- package/dist/operator-contracts/control-plane-operations.d.ts +236 -242
- package/dist/operator-contracts/control-plane-operations.js +0 -2
- package/dist/operator-contracts/inbox/contracts.d.ts +204 -204
- package/dist/operator-contracts/knowledge/contracts.d.ts +16 -16
- package/dist/platform/agent-schema-verification.d.ts +3 -0
- package/dist/platform/agent-schema-verification.js +94 -0
- package/dist/platform/verification.js +6 -0
- package/dist/sdk-types/support/planning-policy.d.ts +1 -1
- package/dist/secrets-capability/shared-access.d.ts +2 -2
- package/dist/secrets-capability/shared-resources.d.ts +46 -46
- package/dist/secrets-capability/vault-contracts.d.ts +2 -2
- package/dist/security/encrypted-envelope.d.ts +8 -8
- package/package.json +3 -2
- package/dist/agent-capacity/allocation.d.ts +0 -183
- package/dist/agent-capacity/allocation.js +0 -5
- package/dist/agent-capacity/artifact-mutation-receipt.d.ts +0 -49
- package/dist/agent-capacity/artifact-mutation-receipt.js +0 -36
- package/dist/agent-capacity/artifacts.d.ts +0 -123
- package/dist/agent-capacity/artifacts.js +0 -39
- package/dist/agent-capacity/contracts/support/decision-work.d.ts +0 -227
- package/dist/agent-capacity/contracts/support/decision-work.js +0 -0
- package/dist/agent-capacity/validation/allocation.d.ts +0 -12
- package/dist/agent-capacity/validation/allocation.js +0 -115
|
@@ -5,21 +5,21 @@ export declare const knowledgeShareGrantInputSchema: z.ZodObject<{
|
|
|
5
5
|
projectIds: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
6
6
|
contentModels: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
7
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">, ("
|
|
8
|
+
operations: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodEnum<["read", "query", "context", "graph"]>, "many">, ("query" | "read" | "context" | "graph")[], ("query" | "read" | "context" | "graph")[]>>;
|
|
9
9
|
expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
10
10
|
}, "strict", z.ZodTypeAny, {
|
|
11
11
|
expiresAt: string | null;
|
|
12
|
-
|
|
12
|
+
projectIds: string[];
|
|
13
13
|
paths: string[];
|
|
14
|
+
operations: ("query" | "read" | "context" | "graph")[];
|
|
14
15
|
targetTeamId: string;
|
|
15
|
-
projectIds: string[];
|
|
16
16
|
contentModels: string[];
|
|
17
17
|
}, {
|
|
18
|
-
targetTeamId: string;
|
|
19
18
|
projectIds: string[];
|
|
19
|
+
targetTeamId: string;
|
|
20
20
|
expiresAt?: string | null | undefined;
|
|
21
|
-
operations?: ("read" | "context" | "query" | "graph")[] | undefined;
|
|
22
21
|
paths?: string[] | undefined;
|
|
22
|
+
operations?: ("query" | "read" | "context" | "graph")[] | undefined;
|
|
23
23
|
contentModels?: string[] | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
export declare const knowledgeShareSchema: z.ZodEffects<z.ZodObject<{
|
|
@@ -27,7 +27,7 @@ export declare const knowledgeShareSchema: z.ZodEffects<z.ZodObject<{
|
|
|
27
27
|
projectIds: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
28
28
|
contentModels: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
29
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">, ("
|
|
30
|
+
operations: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodEnum<["read", "query", "context", "graph"]>, "many">, ("query" | "read" | "context" | "graph")[], ("query" | "read" | "context" | "graph")[]>>;
|
|
31
31
|
expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
32
32
|
} & {
|
|
33
33
|
schemaVersion: z.ZodLiteral<"treeseed.knowledge-share/v1">;
|
|
@@ -43,11 +43,11 @@ export declare const knowledgeShareSchema: z.ZodEffects<z.ZodObject<{
|
|
|
43
43
|
expiresAt: string | null;
|
|
44
44
|
schemaVersion: "treeseed.knowledge-share/v1";
|
|
45
45
|
createdAt: string;
|
|
46
|
-
operations: ("read" | "context" | "query" | "graph")[];
|
|
47
|
-
paths: string[];
|
|
48
46
|
updatedAt: string;
|
|
49
|
-
targetTeamId: string;
|
|
50
47
|
projectIds: string[];
|
|
48
|
+
paths: string[];
|
|
49
|
+
operations: ("query" | "read" | "context" | "graph")[];
|
|
50
|
+
targetTeamId: string;
|
|
51
51
|
contentModels: string[];
|
|
52
52
|
sourceTeamId: string;
|
|
53
53
|
revokedAt: string | null;
|
|
@@ -57,13 +57,13 @@ export declare const knowledgeShareSchema: z.ZodEffects<z.ZodObject<{
|
|
|
57
57
|
schemaVersion: "treeseed.knowledge-share/v1";
|
|
58
58
|
createdAt: string;
|
|
59
59
|
updatedAt: string;
|
|
60
|
-
targetTeamId: string;
|
|
61
60
|
projectIds: string[];
|
|
61
|
+
targetTeamId: string;
|
|
62
62
|
sourceTeamId: string;
|
|
63
63
|
revokedAt: string | null;
|
|
64
64
|
expiresAt?: string | null | undefined;
|
|
65
|
-
operations?: ("read" | "context" | "query" | "graph")[] | undefined;
|
|
66
65
|
paths?: string[] | undefined;
|
|
66
|
+
operations?: ("query" | "read" | "context" | "graph")[] | undefined;
|
|
67
67
|
contentModels?: string[] | undefined;
|
|
68
68
|
}>, {
|
|
69
69
|
status: "active" | "revoked" | "expired";
|
|
@@ -71,11 +71,11 @@ export declare const knowledgeShareSchema: z.ZodEffects<z.ZodObject<{
|
|
|
71
71
|
expiresAt: string | null;
|
|
72
72
|
schemaVersion: "treeseed.knowledge-share/v1";
|
|
73
73
|
createdAt: string;
|
|
74
|
-
operations: ("read" | "context" | "query" | "graph")[];
|
|
75
|
-
paths: string[];
|
|
76
74
|
updatedAt: string;
|
|
77
|
-
targetTeamId: string;
|
|
78
75
|
projectIds: string[];
|
|
76
|
+
paths: string[];
|
|
77
|
+
operations: ("query" | "read" | "context" | "graph")[];
|
|
78
|
+
targetTeamId: string;
|
|
79
79
|
contentModels: string[];
|
|
80
80
|
sourceTeamId: string;
|
|
81
81
|
revokedAt: string | null;
|
|
@@ -85,13 +85,13 @@ export declare const knowledgeShareSchema: z.ZodEffects<z.ZodObject<{
|
|
|
85
85
|
schemaVersion: "treeseed.knowledge-share/v1";
|
|
86
86
|
createdAt: string;
|
|
87
87
|
updatedAt: string;
|
|
88
|
-
targetTeamId: string;
|
|
89
88
|
projectIds: string[];
|
|
89
|
+
targetTeamId: string;
|
|
90
90
|
sourceTeamId: string;
|
|
91
91
|
revokedAt: string | null;
|
|
92
92
|
expiresAt?: string | null | undefined;
|
|
93
|
-
operations?: ("read" | "context" | "query" | "graph")[] | undefined;
|
|
94
93
|
paths?: string[] | undefined;
|
|
94
|
+
operations?: ("query" | "read" | "context" | "graph")[] | undefined;
|
|
95
95
|
contentModels?: string[] | undefined;
|
|
96
96
|
}>;
|
|
97
97
|
export declare const teamKnowledgeRequestSchema: z.ZodObject<{
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { describeContentFrontmatterSchema } from "../content/validation/content-model-schemas.js";
|
|
2
|
+
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
3
|
+
const models = {
|
|
4
|
+
Book: "book",
|
|
5
|
+
Knowledge: "knowledge",
|
|
6
|
+
Objective: "objective",
|
|
7
|
+
Discussion: "discussion",
|
|
8
|
+
DiscussionMessage: "discussion_message"
|
|
9
|
+
};
|
|
10
|
+
function record(value) {
|
|
11
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
12
|
+
}
|
|
13
|
+
function dereference(schema, root) {
|
|
14
|
+
const reference = typeof schema.$ref === "string" ? schema.$ref : "";
|
|
15
|
+
if (!reference.startsWith("#/$defs/")) return schema;
|
|
16
|
+
return {
|
|
17
|
+
...record(record(root.$defs)[reference.slice("#/$defs/".length)]),
|
|
18
|
+
...Object.fromEntries(Object.entries(schema).filter(([key]) => key !== "$ref"))
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function structuralSchema(value, root) {
|
|
22
|
+
const schema = dereference(record(value), root);
|
|
23
|
+
const normalized = {};
|
|
24
|
+
for (const key of ["type", "const", "enum", "minLength", "maxLength", "pattern", "format", "minimum", "maximum", "minItems", "maxItems"]) {
|
|
25
|
+
if (schema[key] !== void 0) normalized[key] = schema[key];
|
|
26
|
+
}
|
|
27
|
+
if (normalized.type === "integer" && schema.exclusiveMinimum === 0 && normalized.minimum === void 0) normalized.minimum = 1;
|
|
28
|
+
if (normalized.const !== void 0 || normalized.enum !== void 0) delete normalized.type;
|
|
29
|
+
if (schema.items !== void 0) normalized.items = structuralSchema(schema.items, root);
|
|
30
|
+
if (schema.properties !== void 0) normalized.properties = Object.fromEntries(
|
|
31
|
+
Object.entries(record(schema.properties)).sort(([left], [right]) => left.localeCompare(right)).map(([key, child]) => [key, structuralSchema(child, root)])
|
|
32
|
+
);
|
|
33
|
+
if (Array.isArray(schema.required)) normalized.required = [...schema.required].sort();
|
|
34
|
+
if (schema.additionalProperties === false) normalized.additionalProperties = false;
|
|
35
|
+
else if (schema.additionalProperties && Object.keys(record(schema.additionalProperties)).length) {
|
|
36
|
+
normalized.additionalProperties = structuralSchema(schema.additionalProperties, root);
|
|
37
|
+
}
|
|
38
|
+
return normalized;
|
|
39
|
+
}
|
|
40
|
+
function structuralDifferences(expected, actual, path = "") {
|
|
41
|
+
if (JSON.stringify(expected) === JSON.stringify(actual)) return [];
|
|
42
|
+
if (!expected || !actual || typeof expected !== "object" || typeof actual !== "object" || Array.isArray(expected) || Array.isArray(actual)) return [path || "<root>"];
|
|
43
|
+
const left = expected, right = actual;
|
|
44
|
+
return [.../* @__PURE__ */ new Set([...Object.keys(left), ...Object.keys(right)])].sort().flatMap((key) => structuralDifferences(left[key], right[key], path ? `${path}.${key}` : key));
|
|
45
|
+
}
|
|
46
|
+
function verifyAgentContentSchema(document, path = "docs/agent.schema.yml") {
|
|
47
|
+
const definitions = document?.$defs ?? {};
|
|
48
|
+
const diagnostics = [];
|
|
49
|
+
for (const [definition, model] of Object.entries(models)) {
|
|
50
|
+
const declared = definitions[definition];
|
|
51
|
+
const schema = describeContentFrontmatterSchema(model);
|
|
52
|
+
const shape = "shape" in schema ? schema.shape : {};
|
|
53
|
+
if (!declared?.properties || !Array.isArray(declared.required)) {
|
|
54
|
+
diagnostics.push({ code: "agent_schema_missing", path, message: `${definition} must declare properties and required fields.` });
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const declaredKeys = Object.keys(declared.properties).sort();
|
|
58
|
+
const actualKeys = Object.keys(shape).sort();
|
|
59
|
+
const missing = actualKeys.filter((key) => !declaredKeys.includes(key));
|
|
60
|
+
const extra = declaredKeys.filter((key) => !actualKeys.includes(key));
|
|
61
|
+
if (missing.length || extra.length) diagnostics.push({
|
|
62
|
+
code: "agent_schema_fields_mismatch",
|
|
63
|
+
path,
|
|
64
|
+
message: `${definition} differs from SDK ${model} fields; missing: ${missing.join(", ") || "none"}; extra: ${extra.join(", ") || "none"}.`
|
|
65
|
+
});
|
|
66
|
+
const required = actualKeys.filter((key) => !shape[key].isOptional()).sort();
|
|
67
|
+
const declaredRequired = [...declared.required].sort();
|
|
68
|
+
if (JSON.stringify(required) !== JSON.stringify(declaredRequired)) diagnostics.push({
|
|
69
|
+
code: "agent_schema_required_mismatch",
|
|
70
|
+
path,
|
|
71
|
+
message: `${definition} required fields differ; SDK: ${required.join(", ") || "none"}; declaration: ${declaredRequired.join(", ") || "none"}.`
|
|
72
|
+
});
|
|
73
|
+
for (const [field, specification] of Object.entries(declared.properties)) {
|
|
74
|
+
if (specification && Object.hasOwn(specification, "const") && shape[field] && !shape[field].safeParse(specification.const).success) diagnostics.push({
|
|
75
|
+
code: "agent_schema_constant_mismatch",
|
|
76
|
+
path,
|
|
77
|
+
message: `${definition}.${field} constant is rejected by the SDK validator.`
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const generated = record(zodToJsonSchema(schema, { name: definition, $refStrategy: "none" }));
|
|
81
|
+
const generatedDefinition = record(record(generated.definitions)[definition]);
|
|
82
|
+
const expectedStructure = JSON.stringify(structuralSchema(declared, document));
|
|
83
|
+
const actualStructure = JSON.stringify(structuralSchema(generatedDefinition, generated));
|
|
84
|
+
if (expectedStructure !== actualStructure) diagnostics.push({
|
|
85
|
+
code: "agent_schema_structure_mismatch",
|
|
86
|
+
path,
|
|
87
|
+
message: `${definition} nested declarative constraints differ from the SDK validator at ${structuralDifferences(JSON.parse(expectedStructure), JSON.parse(actualStructure)).slice(0, 8).join(", ")}.`
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return diagnostics;
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
verifyAgentContentSchema
|
|
94
|
+
};
|
|
@@ -5,6 +5,7 @@ import { execFileSync } from "node:child_process";
|
|
|
5
5
|
import { parse } from "yaml";
|
|
6
6
|
import { hostTemplateSchema, integrationLockSchema } from "./contracts.js";
|
|
7
7
|
import { inventorySchema, profileSchema } from "./schemas.js";
|
|
8
|
+
import { verifyAgentContentSchema } from "./agent-schema-verification.js";
|
|
8
9
|
const allowedRoots = /* @__PURE__ */ new Set([".github", "config", "docs", "profiles", "seeds", "templates"]);
|
|
9
10
|
const allowedFiles = /* @__PURE__ */ new Set([".gitignore", "AGENTS.md", "LICENSE", "LICENSE.md", "README.md", "skills-lock.json", "treeseed.site.yaml"]);
|
|
10
11
|
const allowedExtensions = /* @__PURE__ */ new Set([".md", ".yaml", ".yml", ".json", ".lock", ".toml"]);
|
|
@@ -63,6 +64,11 @@ function semanticDiagnostics(root, tracked) {
|
|
|
63
64
|
for (const profile of host.profiles) if (!profiles.has(profile)) report("host_profile_unknown", path, `Host template profile ${profile} does not exist.`);
|
|
64
65
|
if (![...integrationDigests.values()].includes(host.integration.digest)) report("host_integration_unknown", path, "Host template integration digest is not present in a referenced integration lock.");
|
|
65
66
|
}
|
|
67
|
+
const agentSchemaPath = "docs/agent.schema.yml";
|
|
68
|
+
if (tracked.has(agentSchemaPath)) {
|
|
69
|
+
const schema = safe(agentSchemaPath, () => document(agentSchemaPath));
|
|
70
|
+
if (schema) diagnostics.push(...verifyAgentContentSchema(schema, agentSchemaPath));
|
|
71
|
+
}
|
|
66
72
|
const production = site.production;
|
|
67
73
|
if (production && production.mutation !== "blocked") report("production_not_fail_closed", sitePath, "Production mutation must remain blocked until promotion gates pass.");
|
|
68
74
|
if (production?.topology && !tracked.has(production.topology)) report("topology_reference_invalid", sitePath, "Production topology must reference a tracked declaration.");
|
|
@@ -126,7 +126,7 @@ export interface ProjectCapacityDiagnostics {
|
|
|
126
126
|
environment: ProjectEnvironmentName | 'local';
|
|
127
127
|
providers: CapacityProviderMembershipView[];
|
|
128
128
|
executionProviders: CapacityExecutionProvider[];
|
|
129
|
-
grants: import('../../agent-capacity/
|
|
129
|
+
grants: import('../../agent-capacity/grant.js').CapacityGrantV2[];
|
|
130
130
|
activeReservations: CapacityReservation[];
|
|
131
131
|
nativeCapacity?: NativeCapacitySummary | null;
|
|
132
132
|
remaining: {
|
|
@@ -43,9 +43,9 @@ export declare function selectServiceBinding(request: BindingSelection, pinned:
|
|
|
43
43
|
version: number;
|
|
44
44
|
projectId: string;
|
|
45
45
|
teamId: string;
|
|
46
|
-
|
|
46
|
+
grantId: string | null;
|
|
47
47
|
capability: string;
|
|
48
|
+
environment: "staging" | "production" | "shared";
|
|
48
49
|
connectionId: string;
|
|
49
|
-
grantId: string | null;
|
|
50
50
|
ownerTeamId: string;
|
|
51
51
|
};
|
|
@@ -51,7 +51,7 @@ export declare const organizationTeamInvitationSchema: z.ZodObject<{
|
|
|
51
51
|
status: z.ZodEnum<["pending", "accepted", "rejected", "revoked", "expired"]>;
|
|
52
52
|
version: z.ZodNumber;
|
|
53
53
|
}, "strict", z.ZodTypeAny, {
|
|
54
|
-
status: "rejected" | "revoked" | "
|
|
54
|
+
status: "rejected" | "revoked" | "pending" | "accepted" | "expired";
|
|
55
55
|
id: string;
|
|
56
56
|
version: number;
|
|
57
57
|
expiresAt: string;
|
|
@@ -60,7 +60,7 @@ export declare const organizationTeamInvitationSchema: z.ZodObject<{
|
|
|
60
60
|
organizationAuthorizedBy: string;
|
|
61
61
|
teamAuthorizedBy: string | null;
|
|
62
62
|
}, {
|
|
63
|
-
status: "rejected" | "revoked" | "
|
|
63
|
+
status: "rejected" | "revoked" | "pending" | "accepted" | "expired";
|
|
64
64
|
id: string;
|
|
65
65
|
version: number;
|
|
66
66
|
expiresAt: string;
|
|
@@ -150,14 +150,14 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
150
150
|
projectIds: z.ZodArray<z.ZodString, "many">;
|
|
151
151
|
assignmentIds: z.ZodArray<z.ZodString, "many">;
|
|
152
152
|
}, "strict", z.ZodTypeAny, {
|
|
153
|
-
environment: "
|
|
154
|
-
assignmentIds: string[];
|
|
153
|
+
environment: "staging" | "production" | "shared";
|
|
155
154
|
projectIds: string[];
|
|
155
|
+
assignmentIds: string[];
|
|
156
156
|
resourceIds: string[];
|
|
157
157
|
}, {
|
|
158
|
-
environment: "
|
|
159
|
-
assignmentIds: string[];
|
|
158
|
+
environment: "staging" | "production" | "shared";
|
|
160
159
|
projectIds: string[];
|
|
160
|
+
assignmentIds: string[];
|
|
161
161
|
resourceIds: string[];
|
|
162
162
|
}>;
|
|
163
163
|
limits: z.ZodObject<{
|
|
@@ -191,12 +191,18 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
191
191
|
version: number;
|
|
192
192
|
expiresAt: string | null;
|
|
193
193
|
scope: {
|
|
194
|
-
environment: "
|
|
195
|
-
assignmentIds: string[];
|
|
194
|
+
environment: "staging" | "production" | "shared";
|
|
196
195
|
projectIds: string[];
|
|
196
|
+
assignmentIds: string[];
|
|
197
197
|
resourceIds: string[];
|
|
198
198
|
};
|
|
199
199
|
origin: "explicit" | "default-policy";
|
|
200
|
+
limits: {
|
|
201
|
+
maxConcurrentOperations: number;
|
|
202
|
+
maxOperationsPerWindow: number;
|
|
203
|
+
windowSeconds: number;
|
|
204
|
+
};
|
|
205
|
+
permissions: string[];
|
|
200
206
|
authority: {
|
|
201
207
|
kind: "organization";
|
|
202
208
|
organizationId: string;
|
|
@@ -204,12 +210,6 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
204
210
|
kind: "deployment";
|
|
205
211
|
audiencePolicyId: string;
|
|
206
212
|
};
|
|
207
|
-
limits: {
|
|
208
|
-
maxConcurrentOperations: number;
|
|
209
|
-
maxOperationsPerWindow: number;
|
|
210
|
-
windowSeconds: number;
|
|
211
|
-
};
|
|
212
|
-
permissions: string[];
|
|
213
213
|
recipientTeamId: string;
|
|
214
214
|
defaultPolicyId: string | null;
|
|
215
215
|
}, {
|
|
@@ -227,12 +227,18 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
227
227
|
version: number;
|
|
228
228
|
expiresAt: string | null;
|
|
229
229
|
scope: {
|
|
230
|
-
environment: "
|
|
231
|
-
assignmentIds: string[];
|
|
230
|
+
environment: "staging" | "production" | "shared";
|
|
232
231
|
projectIds: string[];
|
|
232
|
+
assignmentIds: string[];
|
|
233
233
|
resourceIds: string[];
|
|
234
234
|
};
|
|
235
235
|
origin: "explicit" | "default-policy";
|
|
236
|
+
limits: {
|
|
237
|
+
maxConcurrentOperations: number;
|
|
238
|
+
maxOperationsPerWindow: number;
|
|
239
|
+
windowSeconds: number;
|
|
240
|
+
};
|
|
241
|
+
permissions: string[];
|
|
236
242
|
authority: {
|
|
237
243
|
kind: "organization";
|
|
238
244
|
organizationId: string;
|
|
@@ -240,12 +246,6 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
240
246
|
kind: "deployment";
|
|
241
247
|
audiencePolicyId: string;
|
|
242
248
|
};
|
|
243
|
-
limits: {
|
|
244
|
-
maxConcurrentOperations: number;
|
|
245
|
-
maxOperationsPerWindow: number;
|
|
246
|
-
windowSeconds: number;
|
|
247
|
-
};
|
|
248
|
-
permissions: string[];
|
|
249
249
|
recipientTeamId: string;
|
|
250
250
|
defaultPolicyId: string | null;
|
|
251
251
|
}>, {
|
|
@@ -263,12 +263,18 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
263
263
|
version: number;
|
|
264
264
|
expiresAt: string | null;
|
|
265
265
|
scope: {
|
|
266
|
-
environment: "
|
|
267
|
-
assignmentIds: string[];
|
|
266
|
+
environment: "staging" | "production" | "shared";
|
|
268
267
|
projectIds: string[];
|
|
268
|
+
assignmentIds: string[];
|
|
269
269
|
resourceIds: string[];
|
|
270
270
|
};
|
|
271
271
|
origin: "explicit" | "default-policy";
|
|
272
|
+
limits: {
|
|
273
|
+
maxConcurrentOperations: number;
|
|
274
|
+
maxOperationsPerWindow: number;
|
|
275
|
+
windowSeconds: number;
|
|
276
|
+
};
|
|
277
|
+
permissions: string[];
|
|
272
278
|
authority: {
|
|
273
279
|
kind: "organization";
|
|
274
280
|
organizationId: string;
|
|
@@ -276,12 +282,6 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
276
282
|
kind: "deployment";
|
|
277
283
|
audiencePolicyId: string;
|
|
278
284
|
};
|
|
279
|
-
limits: {
|
|
280
|
-
maxConcurrentOperations: number;
|
|
281
|
-
maxOperationsPerWindow: number;
|
|
282
|
-
windowSeconds: number;
|
|
283
|
-
};
|
|
284
|
-
permissions: string[];
|
|
285
285
|
recipientTeamId: string;
|
|
286
286
|
defaultPolicyId: string | null;
|
|
287
287
|
}, {
|
|
@@ -299,12 +299,18 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
299
299
|
version: number;
|
|
300
300
|
expiresAt: string | null;
|
|
301
301
|
scope: {
|
|
302
|
-
environment: "
|
|
303
|
-
assignmentIds: string[];
|
|
302
|
+
environment: "staging" | "production" | "shared";
|
|
304
303
|
projectIds: string[];
|
|
304
|
+
assignmentIds: string[];
|
|
305
305
|
resourceIds: string[];
|
|
306
306
|
};
|
|
307
307
|
origin: "explicit" | "default-policy";
|
|
308
|
+
limits: {
|
|
309
|
+
maxConcurrentOperations: number;
|
|
310
|
+
maxOperationsPerWindow: number;
|
|
311
|
+
windowSeconds: number;
|
|
312
|
+
};
|
|
313
|
+
permissions: string[];
|
|
308
314
|
authority: {
|
|
309
315
|
kind: "organization";
|
|
310
316
|
organizationId: string;
|
|
@@ -312,12 +318,6 @@ export declare const sharedResourceGrantSchema: z.ZodEffects<z.ZodObject<{
|
|
|
312
318
|
kind: "deployment";
|
|
313
319
|
audiencePolicyId: string;
|
|
314
320
|
};
|
|
315
|
-
limits: {
|
|
316
|
-
maxConcurrentOperations: number;
|
|
317
|
-
maxOperationsPerWindow: number;
|
|
318
|
-
windowSeconds: number;
|
|
319
|
-
};
|
|
320
|
-
permissions: string[];
|
|
321
321
|
recipientTeamId: string;
|
|
322
322
|
defaultPolicyId: string | null;
|
|
323
323
|
}>;
|
|
@@ -337,40 +337,40 @@ export declare const serviceBindingSchema: z.ZodEffects<z.ZodObject<{
|
|
|
337
337
|
version: number;
|
|
338
338
|
projectId: string;
|
|
339
339
|
teamId: string;
|
|
340
|
-
|
|
340
|
+
grantId: string | null;
|
|
341
341
|
capability: string;
|
|
342
|
+
environment: "staging" | "production" | "shared";
|
|
342
343
|
connectionId: string;
|
|
343
|
-
grantId: string | null;
|
|
344
344
|
ownerTeamId: string;
|
|
345
345
|
}, {
|
|
346
346
|
id: string;
|
|
347
347
|
version: number;
|
|
348
348
|
projectId: string;
|
|
349
349
|
teamId: string;
|
|
350
|
-
|
|
350
|
+
grantId: string | null;
|
|
351
351
|
capability: string;
|
|
352
|
+
environment: "staging" | "production" | "shared";
|
|
352
353
|
connectionId: string;
|
|
353
|
-
grantId: string | null;
|
|
354
354
|
ownerTeamId: string;
|
|
355
355
|
}>, {
|
|
356
356
|
id: string;
|
|
357
357
|
version: number;
|
|
358
358
|
projectId: string;
|
|
359
359
|
teamId: string;
|
|
360
|
-
|
|
360
|
+
grantId: string | null;
|
|
361
361
|
capability: string;
|
|
362
|
+
environment: "staging" | "production" | "shared";
|
|
362
363
|
connectionId: string;
|
|
363
|
-
grantId: string | null;
|
|
364
364
|
ownerTeamId: string;
|
|
365
365
|
}, {
|
|
366
366
|
id: string;
|
|
367
367
|
version: number;
|
|
368
368
|
projectId: string;
|
|
369
369
|
teamId: string;
|
|
370
|
-
|
|
370
|
+
grantId: string | null;
|
|
371
371
|
capability: string;
|
|
372
|
+
environment: "staging" | "production" | "shared";
|
|
372
373
|
connectionId: string;
|
|
373
|
-
grantId: string | null;
|
|
374
374
|
ownerTeamId: string;
|
|
375
375
|
}>;
|
|
376
376
|
export type ServiceBinding = z.infer<typeof serviceBindingSchema>;
|
|
@@ -80,16 +80,16 @@ export declare const vaultAllocationSchema: z.ZodObject<{
|
|
|
80
80
|
teamId: string;
|
|
81
81
|
grantId: string | null;
|
|
82
82
|
permissions: ("read" | "write" | "delete")[];
|
|
83
|
-
vaultId: string;
|
|
84
83
|
pathPrefix: string;
|
|
84
|
+
vaultId: string;
|
|
85
85
|
}, {
|
|
86
86
|
id: string;
|
|
87
87
|
version: number;
|
|
88
88
|
teamId: string;
|
|
89
89
|
grantId: string | null;
|
|
90
90
|
permissions: ("read" | "write" | "delete")[];
|
|
91
|
-
vaultId: string;
|
|
92
91
|
pathPrefix: string;
|
|
92
|
+
vaultId: string;
|
|
93
93
|
}>;
|
|
94
94
|
export declare const vaultCredentialReferenceSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
95
95
|
mode: z.ZodLiteral<"managed">;
|
|
@@ -18,10 +18,10 @@ export declare const encryptedEnvelopeAadSchema: z.ZodObject<{
|
|
|
18
18
|
resourceId: string;
|
|
19
19
|
teamId?: string | undefined;
|
|
20
20
|
assignmentId?: string | undefined;
|
|
21
|
+
sequence?: number | undefined;
|
|
21
22
|
topicId?: string | undefined;
|
|
22
23
|
sendId?: string | undefined;
|
|
23
24
|
invocationId?: string | undefined;
|
|
24
|
-
sequence?: number | undefined;
|
|
25
25
|
eventType?: string | undefined;
|
|
26
26
|
}, {
|
|
27
27
|
schemaVersion: string;
|
|
@@ -30,10 +30,10 @@ export declare const encryptedEnvelopeAadSchema: z.ZodObject<{
|
|
|
30
30
|
resourceId: string;
|
|
31
31
|
teamId?: string | undefined;
|
|
32
32
|
assignmentId?: string | undefined;
|
|
33
|
+
sequence?: number | undefined;
|
|
33
34
|
topicId?: string | undefined;
|
|
34
35
|
sendId?: string | undefined;
|
|
35
36
|
invocationId?: string | undefined;
|
|
36
|
-
sequence?: number | undefined;
|
|
37
37
|
eventType?: string | undefined;
|
|
38
38
|
}>;
|
|
39
39
|
export declare const encryptedEnvelopeSchema: z.ZodObject<{
|
|
@@ -87,10 +87,10 @@ export declare const encryptedEnvelopeSchema: z.ZodObject<{
|
|
|
87
87
|
resourceId: string;
|
|
88
88
|
teamId?: string | undefined;
|
|
89
89
|
assignmentId?: string | undefined;
|
|
90
|
+
sequence?: number | undefined;
|
|
90
91
|
topicId?: string | undefined;
|
|
91
92
|
sendId?: string | undefined;
|
|
92
93
|
invocationId?: string | undefined;
|
|
93
|
-
sequence?: number | undefined;
|
|
94
94
|
eventType?: string | undefined;
|
|
95
95
|
}, {
|
|
96
96
|
schemaVersion: string;
|
|
@@ -99,10 +99,10 @@ export declare const encryptedEnvelopeSchema: z.ZodObject<{
|
|
|
99
99
|
resourceId: string;
|
|
100
100
|
teamId?: string | undefined;
|
|
101
101
|
assignmentId?: string | undefined;
|
|
102
|
+
sequence?: number | undefined;
|
|
102
103
|
topicId?: string | undefined;
|
|
103
104
|
sendId?: string | undefined;
|
|
104
105
|
invocationId?: string | undefined;
|
|
105
|
-
sequence?: number | undefined;
|
|
106
106
|
eventType?: string | undefined;
|
|
107
107
|
}>;
|
|
108
108
|
aadDigest: z.ZodString;
|
|
@@ -111,9 +111,9 @@ export declare const encryptedEnvelopeSchema: z.ZodObject<{
|
|
|
111
111
|
}, "strict", z.ZodTypeAny, {
|
|
112
112
|
schemaVersion: "treeseed.encrypted-envelope/v1";
|
|
113
113
|
createdAt: string;
|
|
114
|
+
keyId: string;
|
|
114
115
|
algorithm: "aes-256-gcm";
|
|
115
116
|
keyProvider: string;
|
|
116
|
-
keyId: string;
|
|
117
117
|
keyVersion: number;
|
|
118
118
|
wrappedDek: {
|
|
119
119
|
nonce: string;
|
|
@@ -132,10 +132,10 @@ export declare const encryptedEnvelopeSchema: z.ZodObject<{
|
|
|
132
132
|
resourceId: string;
|
|
133
133
|
teamId?: string | undefined;
|
|
134
134
|
assignmentId?: string | undefined;
|
|
135
|
+
sequence?: number | undefined;
|
|
135
136
|
topicId?: string | undefined;
|
|
136
137
|
sendId?: string | undefined;
|
|
137
138
|
invocationId?: string | undefined;
|
|
138
|
-
sequence?: number | undefined;
|
|
139
139
|
eventType?: string | undefined;
|
|
140
140
|
};
|
|
141
141
|
aadDigest: string;
|
|
@@ -143,9 +143,9 @@ export declare const encryptedEnvelopeSchema: z.ZodObject<{
|
|
|
143
143
|
}, {
|
|
144
144
|
schemaVersion: "treeseed.encrypted-envelope/v1";
|
|
145
145
|
createdAt: string;
|
|
146
|
+
keyId: string;
|
|
146
147
|
algorithm: "aes-256-gcm";
|
|
147
148
|
keyProvider: string;
|
|
148
|
-
keyId: string;
|
|
149
149
|
keyVersion: number;
|
|
150
150
|
wrappedDek: {
|
|
151
151
|
nonce: string;
|
|
@@ -164,10 +164,10 @@ export declare const encryptedEnvelopeSchema: z.ZodObject<{
|
|
|
164
164
|
resourceId: string;
|
|
165
165
|
teamId?: string | undefined;
|
|
166
166
|
assignmentId?: string | undefined;
|
|
167
|
+
sequence?: number | undefined;
|
|
167
168
|
topicId?: string | undefined;
|
|
168
169
|
sendId?: string | undefined;
|
|
169
170
|
invocationId?: string | undefined;
|
|
170
|
-
sequence?: number | undefined;
|
|
171
171
|
eventType?: string | undefined;
|
|
172
172
|
};
|
|
173
173
|
aadDigest: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeseed/sdk",
|
|
3
|
-
"version": "0.13.0-rc.
|
|
3
|
+
"version": "0.13.0-rc.122",
|
|
4
4
|
"description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/node": "^24.6.0",
|
|
63
63
|
"tsx": "^4.21.0",
|
|
64
|
-
"vitest": "4.1.11"
|
|
64
|
+
"vitest": "4.1.11",
|
|
65
|
+
"zod-to-json-schema": "^3.25.1"
|
|
65
66
|
},
|
|
66
67
|
"exports": {
|
|
67
68
|
"./identity": {
|