@treeseed/sdk 0.13.0-rc.55 → 0.13.0-rc.56
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/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +0 -2
- package/dist/agent-capacity/validation/activity-profile.js +18 -9
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +540 -618
- package/dist/agent-capacity/validation/agent-definition-schema.js +8 -28
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +11 -11
- package/dist/capacity-provider/capability-ontology.d.ts +1211 -0
- package/dist/capacity-provider/capability-ontology.js +200 -0
- package/dist/capacity-provider/contracts/governance.d.ts +37 -2
- package/dist/capacity-provider/core-capability-catalog.d.ts +47 -0
- package/dist/capacity-provider/core-capability-catalog.js +63 -0
- package/dist/capacity-provider/environment-catalog.d.ts +877 -0
- package/dist/capacity-provider/environment-catalog.js +116 -0
- package/dist/capacity-provider/index.d.ts +3 -0
- package/dist/capacity-provider/index.js +3 -0
- package/dist/capacity-provider/sandbox-contracts.d.ts +147 -26
- package/dist/capacity-provider/sandbox-contracts.js +16 -1
- package/dist/capacity-provider/validation.d.ts +2 -1
- package/dist/capacity-provider/validation.js +34 -1
- package/dist/content/validation/content-model-schemas.d.ts +985 -1128
- package/dist/content/validation/portable-content-data.d.ts +90 -103
- package/dist/deployment/schemas.d.ts +17 -17
- package/dist/deployment/schemas.js +1 -1
- package/dist/operator-contracts/canonical-command-tree.js +6 -0
- package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +164 -0
- package/dist/operator-contracts/catalog/capability-ontology-operations.js +24 -0
- package/dist/operator-contracts/catalog/control-plane-catalog.d.ts +6 -0
- package/dist/operator-contracts/catalog/control-plane-catalog.js +18 -0
- package/dist/operator-contracts/control-plane-operations.d.ts +510 -342
- package/dist/operator-contracts/control-plane-operations.js +7 -10
- package/dist/operator-contracts/index.d.ts +1 -0
- package/dist/operator-contracts/index.js +1 -0
- package/dist/types/agents/agent-activity-profile.d.ts +15 -33
- package/package.json +1 -1
|
@@ -4,6 +4,8 @@ import { communicationOperations, providerCommunicationLifecycleOperations, prov
|
|
|
4
4
|
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
|
+
import { capabilityOntologyOperations } from "./catalog/capability-ontology-operations.js";
|
|
8
|
+
import { buildControlPlaneCatalog, flattenControlPlaneOperations } from "./catalog/control-plane-catalog.js";
|
|
7
9
|
const empty = z.object({}).strict();
|
|
8
10
|
const none = z.undefined();
|
|
9
11
|
const record = z.record(z.unknown());
|
|
@@ -98,6 +100,7 @@ function resource(operationId, method, path, pathShape, options = { capability:
|
|
|
98
100
|
}, { path: z.object(pathShape).strict(), query: kind === "read" ? record : empty, body: kind === "read" ? none : record, output: payload });
|
|
99
101
|
}
|
|
100
102
|
const CONTROL_PLANE_OPERATIONS = {
|
|
103
|
+
capabilities: capabilityOntologyOperations(),
|
|
101
104
|
inbox: inboxOperations(),
|
|
102
105
|
treeai: TREEAI_CONTROL_PLANE_OPERATIONS,
|
|
103
106
|
status: {
|
|
@@ -453,6 +456,8 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
453
456
|
}
|
|
454
457
|
},
|
|
455
458
|
providers: {
|
|
459
|
+
capabilityProposal: noPathProvider("providers.capabilities.propose", "POST", "/v1/provider/capability-proposals"),
|
|
460
|
+
capabilityProposalStatus: providerPath("providers.capabilities.proposal.show", "GET", "/v1/provider/capability-proposals/{proposalId}", { proposalId: z.string().min(1) }, { read: true }),
|
|
456
461
|
list: resource("providers.list", "GET", "/v1/teams/{teamId}/capacity-providers", { teamId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
|
|
457
462
|
show: resource("providers.show", "GET", "/v1/teams/{teamId}/capacity-providers/{providerId}", { teamId: z.string().min(1), providerId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli", "mcp_resource"] }),
|
|
458
463
|
status: resource("providers.status", "GET", "/v1/teams/{teamId}/capacity-providers/{providerId}/status", { teamId: z.string().min(1), providerId: z.string().min(1) }, { capability: "providers.read", surfaces: ["rest", "cli", "mcp_tool"] }),
|
|
@@ -501,16 +506,8 @@ const CONTROL_PLANE_OPERATIONS = {
|
|
|
501
506
|
workflowRun: providerPath("providers.assignments.workflow.show", "GET", "/v1/provider/assignments/{assignmentId}/workflow-runs/{runId}", { assignmentId: z.string().min(1), runId: z.string().min(1) }, { read: true })
|
|
502
507
|
}
|
|
503
508
|
};
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
else if (value && typeof value === "object") for (const child of Object.values(value)) flatten(child, output);
|
|
507
|
-
return output;
|
|
508
|
-
}
|
|
509
|
-
const CONTROL_PLANE_OPERATION_LIST = Object.freeze(flatten(CONTROL_PLANE_OPERATIONS));
|
|
510
|
-
const CONTROL_PLANE_CATALOG = Object.freeze({
|
|
511
|
-
schemaVersion: "treeseed.control-plane-catalog/v1",
|
|
512
|
-
operations: CONTROL_PLANE_OPERATION_LIST.map((operation) => operation.descriptor)
|
|
513
|
-
});
|
|
509
|
+
const CONTROL_PLANE_OPERATION_LIST = Object.freeze(flattenControlPlaneOperations(CONTROL_PLANE_OPERATIONS));
|
|
510
|
+
const CONTROL_PLANE_CATALOG = buildControlPlaneCatalog(CONTROL_PLANE_OPERATION_LIST);
|
|
514
511
|
function controlPlaneOperation(operationId) {
|
|
515
512
|
const operation = CONTROL_PLANE_OPERATION_LIST.find((candidate) => candidate.descriptor.operationId === operationId);
|
|
516
513
|
if (!operation) throw new Error(`Unknown control-plane operation ${operationId}.`);
|
|
@@ -9,4 +9,5 @@ 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 '../capacity-provider/capability-ontology.js';
|
|
12
13
|
export * from './seed/seed-bundle.js';
|
|
@@ -9,4 +9,5 @@ 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 "../capacity-provider/capability-ontology.js";
|
|
12
13
|
export * from "./seed/seed-bundle.js";
|
|
@@ -4,6 +4,18 @@ export interface AgentContentRevisionRef {
|
|
|
4
4
|
id: string;
|
|
5
5
|
revision: number;
|
|
6
6
|
}
|
|
7
|
+
export interface AgentCapabilityConfigurationValue {
|
|
8
|
+
value: unknown;
|
|
9
|
+
requirement: 'required' | 'preferred';
|
|
10
|
+
}
|
|
11
|
+
export interface AgentCapabilityRequirement {
|
|
12
|
+
capabilityId: string;
|
|
13
|
+
versionRange: string;
|
|
14
|
+
requirement: 'required' | 'preferred';
|
|
15
|
+
alternativeGroup?: string | null;
|
|
16
|
+
requiredFeatures?: string[];
|
|
17
|
+
configuration?: Record<string, AgentCapabilityConfigurationValue>;
|
|
18
|
+
}
|
|
7
19
|
export interface AgentActivityProfile {
|
|
8
20
|
activityType?: AgentActivityType;
|
|
9
21
|
enabled: boolean;
|
|
@@ -15,6 +27,7 @@ export interface AgentActivityProfile {
|
|
|
15
27
|
contextQueryRefs?: AgentContentRevisionRef[];
|
|
16
28
|
contextQuerySetRefs?: AgentContentRevisionRef[];
|
|
17
29
|
instructionTemplateRefs?: AgentContentRevisionRef[];
|
|
30
|
+
capabilityRequirements?: AgentCapabilityRequirement[];
|
|
18
31
|
artifactTriggers?: Array<{
|
|
19
32
|
event: string;
|
|
20
33
|
artifactKind: string;
|
|
@@ -27,15 +40,6 @@ export interface AgentActivityProfile {
|
|
|
27
40
|
requiredArtifactKinds?: string[];
|
|
28
41
|
blockOnOpenQuestions?: boolean;
|
|
29
42
|
};
|
|
30
|
-
providerOverrides?: {
|
|
31
|
-
requiredCapabilities?: string[];
|
|
32
|
-
disallowedProviderIds?: string[];
|
|
33
|
-
promptRef?: string;
|
|
34
|
-
instructionTemplateRefs?: AgentContentRevisionRef[];
|
|
35
|
-
maxRuntimeSeconds?: number;
|
|
36
|
-
maxTotalTokens?: number;
|
|
37
|
-
maxCostAmount?: number;
|
|
38
|
-
};
|
|
39
43
|
tools: AgentToolPolicy;
|
|
40
44
|
signals?: AgentSignalPolicy;
|
|
41
45
|
outputs: AgentOutputContract;
|
|
@@ -48,7 +52,7 @@ export interface AgentChatProfileConfiguration {
|
|
|
48
52
|
foundation: 'discussion-v1';
|
|
49
53
|
responseStyle?: string;
|
|
50
54
|
promptTask?: string;
|
|
51
|
-
|
|
55
|
+
capabilityRequirements?: AgentCapabilityRequirement[];
|
|
52
56
|
maxRuntimeSeconds?: number;
|
|
53
57
|
maxTotalTokens?: number;
|
|
54
58
|
warningTokens?: number;
|
|
@@ -81,8 +85,6 @@ export interface AgentDefinition {
|
|
|
81
85
|
chatProfile?: AgentChatProfileConfiguration;
|
|
82
86
|
}
|
|
83
87
|
export interface AgentExecutionConfig {
|
|
84
|
-
provider?: string;
|
|
85
|
-
model?: string;
|
|
86
88
|
approvalPolicy?: 'never' | 'on_request' | 'always' | string;
|
|
87
89
|
sandboxMode?: 'read_only' | 'workspace_write' | string;
|
|
88
90
|
reasoningEffort?: 'low' | 'medium' | 'high' | string;
|
|
@@ -99,30 +101,10 @@ export interface AgentExecutionConfig {
|
|
|
99
101
|
leaseSeconds: number;
|
|
100
102
|
retryLimit: number;
|
|
101
103
|
branchPrefix: string;
|
|
102
|
-
providerProfile?: AgentProviderProfile;
|
|
103
104
|
}
|
|
104
105
|
export type AgentProviderFallbackPolicy = 'allow_substitution' | 'require_same_model_class' | 'fail_if_unavailable' | 'ask_for_approval';
|
|
105
|
-
export interface AgentExecutionProviderPreference {
|
|
106
|
-
providerId?: string;
|
|
107
|
-
provider?: string;
|
|
108
|
-
model?: string;
|
|
109
|
-
modelClass?: string;
|
|
110
|
-
weight: number;
|
|
111
|
-
reason?: string;
|
|
112
|
-
}
|
|
113
|
-
export interface AgentProviderFallback {
|
|
114
|
-
providerId?: string;
|
|
115
|
-
provider?: string;
|
|
116
|
-
model?: string;
|
|
117
|
-
modelClass?: string;
|
|
118
|
-
maxQualityPenalty?: number;
|
|
119
|
-
}
|
|
120
106
|
export interface AgentProviderProfile {
|
|
121
|
-
|
|
122
|
-
preferredExecutionProviders: AgentExecutionProviderPreference[];
|
|
123
|
-
acceptableFallbacks: AgentProviderFallback[];
|
|
124
|
-
disallowedProviders?: string[];
|
|
125
|
-
disallowedRegions?: string[];
|
|
107
|
+
capabilityRequirements: AgentCapabilityRequirement[];
|
|
126
108
|
fallbackPolicy: AgentProviderFallbackPolicy;
|
|
127
109
|
}
|
|
128
110
|
export interface ExecutionResourceNeed {
|