@contractspec/bundle.library 3.8.2 → 3.8.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.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +74 -0
- package/dist/components/docs/generated/docs-index.generated.d.ts +6 -6
- package/dist/components/docs/index.js +23 -24
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +22 -22
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +1 -2
- package/dist/components/docs/libraries/index.js +23 -24
- package/dist/components/templates/engine/index.d.ts +1 -1
- package/dist/components/templates/engine/index.js +1 -1
- package/dist/index.js +23 -24
- package/dist/node/components/docs/index.js +23 -24
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +22 -22
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +1 -2
- package/dist/node/components/docs/libraries/index.js +23 -24
- package/dist/node/components/templates/engine/index.js +1 -1
- package/dist/node/index.js +23 -24
- package/package.json +24 -23
- package/src/components/docs/generated/docs-index._common.json +1 -1
- package/src/components/docs/generated/docs-index.ai-chat-assistant.json +8 -0
- package/src/components/docs/generated/docs-index.artisan-knowledge-product.json +18 -0
- package/src/components/docs/generated/docs-index.artisan-payments-stripe.json +34 -0
- package/src/components/docs/generated/docs-index.data-grid-showcase.json +18 -0
- package/src/components/docs/generated/docs-index.generated.ts +6 -6
- package/src/components/docs/generated/docs-index.harness-lab.json +10 -0
- package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +8 -0
- package/src/components/docs/generated/docs-index.manifest.json +50 -5
- package/src/components/docs/generated/docs-index.messaging-agent-actions.json +18 -0
- package/src/components/docs/generated/docs-index.mobile-demo-tasks.json +34 -0
- package/src/components/docs/generated/docs-index.opencode-cli.json +2 -2
- package/src/components/docs/generated/docs-index.platform-control-plane.json +250 -0
- package/src/components/docs/generated/docs-index.platform-harness.json +178 -0
- package/src/components/docs/generated/docs-index.platform-integrations.json +22 -14
- package/src/components/docs/generated/docs-index.visualization-showcase.json +18 -0
- package/src/components/docs/libraries/LibrariesAiAgentPage.tsx +20 -17
- package/src/components/docs/libraries/LibrariesSupportBotPage.tsx +1 -2
- package/src/components/templates/engine/index.ts +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -3,7 +3,7 @@ $ bun run prebuild && bun run build:bundle && bun run build:types
|
|
|
3
3
|
$ contractspec-bun-build prebuild
|
|
4
4
|
$ contractspec-bun-build transpile
|
|
5
5
|
[contractspec-bun-build] transpile target=bun root=src entries=300 noBundle=false
|
|
6
|
-
Bundled 300 modules in
|
|
6
|
+
Bundled 300 modules in 120ms
|
|
7
7
|
|
|
8
8
|
application/context-storage/index.js 1.0 KB (entry point)
|
|
9
9
|
presentation/features/templates/types.js 8 bytes (entry point)
|
|
@@ -169,7 +169,7 @@ Bundled 300 modules in 95ms
|
|
|
169
169
|
components/docs/ops/DistributedTracingOpsPage.js 2.39 KB (entry point)
|
|
170
170
|
components/docs/libraries/index.js 162.31 KB (entry point)
|
|
171
171
|
components/docs/libraries/LibrariesSchemaPage.js 10.75 KB (entry point)
|
|
172
|
-
components/docs/libraries/LibrariesSupportBotPage.js 4.
|
|
172
|
+
components/docs/libraries/LibrariesSupportBotPage.js 4.91 KB (entry point)
|
|
173
173
|
components/docs/libraries/LibrariesTestingPage.js 4.98 KB (entry point)
|
|
174
174
|
components/docs/libraries/LibrariesUIKitPage.js 8.28 KB (entry point)
|
|
175
175
|
components/docs/libraries/LibrariesWorkflowComposerPage.js 3.19 KB (entry point)
|
|
@@ -195,7 +195,7 @@ Bundled 300 modules in 95ms
|
|
|
195
195
|
components/docs/knowledge/KnowledgeSourcesPage.js 16.77 KB (entry point)
|
|
196
196
|
components/docs/knowledge/KnowledgeSpacesPage.js 13.52 KB (entry point)
|
|
197
197
|
components/docs/libraries/LibrariesAccessibilityPage.js 7.45 KB (entry point)
|
|
198
|
-
components/docs/libraries/LibrariesAiAgentPage.js 5.
|
|
198
|
+
components/docs/libraries/LibrariesAiAgentPage.js 5.48 KB (entry point)
|
|
199
199
|
components/docs/libraries/LibrariesAnalyticsPage.js 3.22 KB (entry point)
|
|
200
200
|
components/docs/libraries/LibrariesContentGenPage.js 4.1 KB (entry point)
|
|
201
201
|
components/docs/libraries/LibrariesContractsPage.js 10.41 KB (entry point)
|
|
@@ -307,7 +307,7 @@ Bundled 300 modules in 95ms
|
|
|
307
307
|
application/mcp/contractsMcpTypes.js 8 bytes (entry point)
|
|
308
308
|
|
|
309
309
|
[contractspec-bun-build] transpile target=node root=src entries=300 noBundle=false
|
|
310
|
-
Bundled 300 modules in
|
|
310
|
+
Bundled 300 modules in 127ms
|
|
311
311
|
|
|
312
312
|
application/context-storage/index.js 0.99 KB (entry point)
|
|
313
313
|
presentation/features/templates/types.js 0 KB (entry point)
|
|
@@ -473,7 +473,7 @@ Bundled 300 modules in 115ms
|
|
|
473
473
|
components/docs/ops/DistributedTracingOpsPage.js 2.38 KB (entry point)
|
|
474
474
|
components/docs/libraries/index.js 162.29 KB (entry point)
|
|
475
475
|
components/docs/libraries/LibrariesSchemaPage.js 10.75 KB (entry point)
|
|
476
|
-
components/docs/libraries/LibrariesSupportBotPage.js 4.
|
|
476
|
+
components/docs/libraries/LibrariesSupportBotPage.js 4.90 KB (entry point)
|
|
477
477
|
components/docs/libraries/LibrariesTestingPage.js 4.97 KB (entry point)
|
|
478
478
|
components/docs/libraries/LibrariesUIKitPage.js 8.27 KB (entry point)
|
|
479
479
|
components/docs/libraries/LibrariesWorkflowComposerPage.js 3.18 KB (entry point)
|
|
@@ -499,7 +499,7 @@ Bundled 300 modules in 115ms
|
|
|
499
499
|
components/docs/knowledge/KnowledgeSourcesPage.js 16.76 KB (entry point)
|
|
500
500
|
components/docs/knowledge/KnowledgeSpacesPage.js 13.51 KB (entry point)
|
|
501
501
|
components/docs/libraries/LibrariesAccessibilityPage.js 7.44 KB (entry point)
|
|
502
|
-
components/docs/libraries/LibrariesAiAgentPage.js 5.
|
|
502
|
+
components/docs/libraries/LibrariesAiAgentPage.js 5.47 KB (entry point)
|
|
503
503
|
components/docs/libraries/LibrariesAnalyticsPage.js 3.21 KB (entry point)
|
|
504
504
|
components/docs/libraries/LibrariesContentGenPage.js 4.1 KB (entry point)
|
|
505
505
|
components/docs/libraries/LibrariesContractsPage.js 10.40 KB (entry point)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
1
1
|
# @contractspec/bundle.library
|
|
2
2
|
|
|
3
|
+
## 3.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 81256ea: Split agent definition contracts out of `@contractspec/lib.ai-agent` and make
|
|
8
|
+
`@contractspec/lib.contracts-spec` the source of truth for agent declaration APIs.
|
|
9
|
+
|
|
10
|
+
Major changes:
|
|
11
|
+
|
|
12
|
+
- Move `AgentSpec`, `AgentToolConfig`, `AgentPolicy`, `AgentRegistry`,
|
|
13
|
+
`createAgentRegistry`, `defineAgent`, and related definition-only types into
|
|
14
|
+
`@contractspec/lib.contracts-spec/agent`.
|
|
15
|
+
- Add `@contractspec/lib.contracts-spec/agent/spec` and
|
|
16
|
+
`@contractspec/lib.contracts-spec/agent/registry` export subpaths.
|
|
17
|
+
- Remove `@contractspec/lib.ai-agent/spec`,
|
|
18
|
+
`@contractspec/lib.ai-agent/spec/spec`, and
|
|
19
|
+
`@contractspec/lib.ai-agent/spec/registry`.
|
|
20
|
+
- Remove the spec layer from the `@contractspec/lib.ai-agent` root barrel so it
|
|
21
|
+
is runtime-focused.
|
|
22
|
+
|
|
23
|
+
Workspace consumers were migrated to import agent-definition contracts from
|
|
24
|
+
`@contractspec/lib.contracts-spec/agent`, and packages that only needed the
|
|
25
|
+
contract layer dropped their direct dependency on `@contractspec/lib.ai-agent`.
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [81256ea]
|
|
28
|
+
- Updated dependencies [2619dd8]
|
|
29
|
+
- Updated dependencies [6de2f1c]
|
|
30
|
+
- Updated dependencies [81256ea]
|
|
31
|
+
- Updated dependencies [a4489bb]
|
|
32
|
+
- Updated dependencies [9cb304e]
|
|
33
|
+
- @contractspec/lib.contracts-spec@5.0.0
|
|
34
|
+
- @contractspec/lib.contracts-runtime-client-react@3.8.0
|
|
35
|
+
- @contractspec/lib.contracts-runtime-server-mcp@3.7.12
|
|
36
|
+
- @contractspec/lib.contracts-integrations@3.8.4
|
|
37
|
+
- @contractspec/lib.schema@3.7.10
|
|
38
|
+
- @contractspec/lib.content-gen@3.7.12
|
|
39
|
+
- @contractspec/lib.contracts-library@3.7.12
|
|
40
|
+
- @contractspec/lib.contracts-runtime-server-graphql@3.7.12
|
|
41
|
+
- @contractspec/lib.contracts-runtime-server-rest@3.7.12
|
|
42
|
+
- @contractspec/lib.design-system@3.8.5
|
|
43
|
+
- @contractspec/lib.example-shared-ui@6.0.12
|
|
44
|
+
- @contractspec/lib.knowledge@3.7.12
|
|
45
|
+
- @contractspec/lib.surface-runtime@0.5.12
|
|
46
|
+
- @contractspec/lib.ui-kit-web@3.9.4
|
|
47
|
+
- @contractspec/module.examples@3.8.4
|
|
48
|
+
- @contractspec/module.context-storage@0.7.12
|
|
49
|
+
|
|
50
|
+
## 3.8.3
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- fix: release
|
|
55
|
+
- Updated dependencies
|
|
56
|
+
- @contractspec/lib.contracts-runtime-server-graphql@3.7.11
|
|
57
|
+
- @contractspec/lib.contracts-runtime-server-rest@3.7.11
|
|
58
|
+
- @contractspec/lib.contracts-runtime-server-mcp@3.7.11
|
|
59
|
+
- @contractspec/lib.contracts-integrations@3.8.3
|
|
60
|
+
- @contractspec/module.context-storage@0.7.11
|
|
61
|
+
- @contractspec/lib.contracts-library@3.7.11
|
|
62
|
+
- @contractspec/lib.example-shared-ui@6.0.11
|
|
63
|
+
- @contractspec/lib.provider-ranking@0.7.9
|
|
64
|
+
- @contractspec/lib.runtime-sandbox@2.7.10
|
|
65
|
+
- @contractspec/lib.surface-runtime@0.5.11
|
|
66
|
+
- @contractspec/lib.contracts-spec@4.1.3
|
|
67
|
+
- @contractspec/lib.design-system@3.8.4
|
|
68
|
+
- @contractspec/lib.ai-providers@3.7.9
|
|
69
|
+
- @contractspec/lib.content-gen@3.7.11
|
|
70
|
+
- @contractspec/module.examples@3.8.3
|
|
71
|
+
- @contractspec/lib.ui-kit-web@3.9.3
|
|
72
|
+
- @contractspec/lib.knowledge@3.7.11
|
|
73
|
+
- @contractspec/lib.ui-link@3.7.9
|
|
74
|
+
- @contractspec/lib.logger@3.7.9
|
|
75
|
+
- @contractspec/lib.schema@3.7.9
|
|
76
|
+
|
|
3
77
|
## 3.8.2
|
|
4
78
|
|
|
5
79
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type DocsIndexSource = 'generated' | 'docblock';
|
|
2
|
-
export
|
|
2
|
+
export type DocsIndexEntry = {
|
|
3
3
|
id: string;
|
|
4
4
|
title: string;
|
|
5
5
|
summary?: string;
|
|
@@ -11,17 +11,17 @@ export interface DocsIndexEntry {
|
|
|
11
11
|
visibility?: string;
|
|
12
12
|
version?: string;
|
|
13
13
|
owners?: string[];
|
|
14
|
-
}
|
|
15
|
-
export
|
|
14
|
+
};
|
|
15
|
+
export type DocsIndexChunk = {
|
|
16
16
|
key: string;
|
|
17
17
|
file: string;
|
|
18
18
|
total: number;
|
|
19
|
-
}
|
|
20
|
-
export
|
|
19
|
+
};
|
|
20
|
+
export type DocsIndexManifest = {
|
|
21
21
|
generatedAt: string;
|
|
22
22
|
total: number;
|
|
23
23
|
version: string | null;
|
|
24
24
|
contentRoot: string | null;
|
|
25
25
|
chunks: DocsIndexChunk[];
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
27
|
export declare const DOCS_INDEX_MANIFEST = "docs-index.manifest.json";
|
|
@@ -19320,10 +19320,17 @@ function LibrariesAiAgentPage() {
|
|
|
19320
19320
|
}),
|
|
19321
19321
|
/* @__PURE__ */ jsx76(CodeBlock35, {
|
|
19322
19322
|
language: "typescript",
|
|
19323
|
-
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.
|
|
19323
|
+
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.contracts-spec/agent';
|
|
19324
19324
|
|
|
19325
19325
|
const SupportBot = defineAgent({
|
|
19326
|
-
meta: {
|
|
19326
|
+
meta: {
|
|
19327
|
+
key: 'support.bot',
|
|
19328
|
+
version: '1.0.0',
|
|
19329
|
+
description: 'Resolve tickets and escalate low-confidence decisions.',
|
|
19330
|
+
owners: ['support'],
|
|
19331
|
+
tags: ['support'],
|
|
19332
|
+
stability: 'experimental',
|
|
19333
|
+
},
|
|
19327
19334
|
instructions: 'Resolve tickets. Escalate when confidence < 0.75.',
|
|
19328
19335
|
tools: [{ name: 'support_resolve_ticket' }],
|
|
19329
19336
|
policy: {
|
|
@@ -19345,19 +19352,17 @@ const registry = new AgentRegistry().register(SupportBot);`
|
|
|
19345
19352
|
}),
|
|
19346
19353
|
/* @__PURE__ */ jsx76(CodeBlock35, {
|
|
19347
19354
|
language: "typescript",
|
|
19348
|
-
code: `import {
|
|
19355
|
+
code: `import { createUnifiedAgent, ApprovalWorkflow } from '@contractspec/lib.ai-agent';
|
|
19349
19356
|
|
|
19350
|
-
const
|
|
19351
|
-
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
approvalWorkflow: new ApprovalWorkflow(),
|
|
19357
|
+
const approvals = new ApprovalWorkflow();
|
|
19358
|
+
const agent = createUnifiedAgent(SupportBot, {
|
|
19359
|
+
backend: 'ai-sdk',
|
|
19360
|
+
tools: new Map([['support_resolve_ticket', async (input) => resolveTicket(input)]]),
|
|
19355
19361
|
});
|
|
19356
19362
|
|
|
19357
|
-
const result = await
|
|
19358
|
-
|
|
19359
|
-
|
|
19360
|
-
}`
|
|
19363
|
+
const result = await agent.run(ticket.body);
|
|
19364
|
+
// Route low-confidence or manual-review flows through approvals when needed.
|
|
19365
|
+
`
|
|
19361
19366
|
})
|
|
19362
19367
|
]
|
|
19363
19368
|
}),
|
|
@@ -19374,26 +19379,21 @@ if (result.approvalRequestId) {
|
|
|
19374
19379
|
/* @__PURE__ */ jsxs76("li", {
|
|
19375
19380
|
children: [
|
|
19376
19381
|
/* @__PURE__ */ jsx76("code", {
|
|
19377
|
-
children: "
|
|
19382
|
+
children: "createUnifiedAgent"
|
|
19378
19383
|
}),
|
|
19379
19384
|
", ",
|
|
19380
19385
|
/* @__PURE__ */ jsx76("code", {
|
|
19381
|
-
children: "
|
|
19386
|
+
children: "ContractSpecAgent"
|
|
19382
19387
|
}),
|
|
19383
19388
|
",",
|
|
19384
19389
|
" ",
|
|
19385
19390
|
/* @__PURE__ */ jsx76("code", {
|
|
19386
|
-
children: "
|
|
19391
|
+
children: "UnifiedAgent"
|
|
19387
19392
|
})
|
|
19388
19393
|
]
|
|
19389
19394
|
}),
|
|
19390
|
-
/* @__PURE__ */
|
|
19391
|
-
children:
|
|
19392
|
-
/* @__PURE__ */ jsx76("code", {
|
|
19393
|
-
children: "ToolExecutor"
|
|
19394
|
-
}),
|
|
19395
|
-
" with schema-enforced tool definitions"
|
|
19396
|
-
]
|
|
19395
|
+
/* @__PURE__ */ jsx76("li", {
|
|
19396
|
+
children: "MCP, operation-backed, memory, and subagent tool adapters"
|
|
19397
19397
|
}),
|
|
19398
19398
|
/* @__PURE__ */ jsxs76("li", {
|
|
19399
19399
|
children: [
|
|
@@ -22935,10 +22935,9 @@ const draft = await responder.draft(ticket, resolution, classification);`
|
|
|
22935
22935
|
/* @__PURE__ */ jsx97(CodeBlock55, {
|
|
22936
22936
|
language: "typescript",
|
|
22937
22937
|
code: `import { createSupportTools } from '@contractspec/lib.support-bot/bot';
|
|
22938
|
-
import { ToolExecutor } from '@contractspec/lib.ai-agent';
|
|
22939
22938
|
|
|
22940
22939
|
const tools = createSupportTools({ resolver, classifier, responder });
|
|
22941
|
-
|
|
22940
|
+
// Pass these tools into your host runtime or agent adapter.`
|
|
22942
22941
|
})
|
|
22943
22942
|
]
|
|
22944
22943
|
}),
|
|
@@ -42,10 +42,17 @@ function LibrariesAiAgentPage() {
|
|
|
42
42
|
}),
|
|
43
43
|
/* @__PURE__ */ jsx(CodeBlock, {
|
|
44
44
|
language: "typescript",
|
|
45
|
-
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.
|
|
45
|
+
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.contracts-spec/agent';
|
|
46
46
|
|
|
47
47
|
const SupportBot = defineAgent({
|
|
48
|
-
meta: {
|
|
48
|
+
meta: {
|
|
49
|
+
key: 'support.bot',
|
|
50
|
+
version: '1.0.0',
|
|
51
|
+
description: 'Resolve tickets and escalate low-confidence decisions.',
|
|
52
|
+
owners: ['support'],
|
|
53
|
+
tags: ['support'],
|
|
54
|
+
stability: 'experimental',
|
|
55
|
+
},
|
|
49
56
|
instructions: 'Resolve tickets. Escalate when confidence < 0.75.',
|
|
50
57
|
tools: [{ name: 'support_resolve_ticket' }],
|
|
51
58
|
policy: {
|
|
@@ -67,19 +74,17 @@ const registry = new AgentRegistry().register(SupportBot);`
|
|
|
67
74
|
}),
|
|
68
75
|
/* @__PURE__ */ jsx(CodeBlock, {
|
|
69
76
|
language: "typescript",
|
|
70
|
-
code: `import {
|
|
77
|
+
code: `import { createUnifiedAgent, ApprovalWorkflow } from '@contractspec/lib.ai-agent';
|
|
71
78
|
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
approvalWorkflow: new ApprovalWorkflow(),
|
|
79
|
+
const approvals = new ApprovalWorkflow();
|
|
80
|
+
const agent = createUnifiedAgent(SupportBot, {
|
|
81
|
+
backend: 'ai-sdk',
|
|
82
|
+
tools: new Map([['support_resolve_ticket', async (input) => resolveTicket(input)]]),
|
|
77
83
|
});
|
|
78
84
|
|
|
79
|
-
const result = await
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}`
|
|
85
|
+
const result = await agent.run(ticket.body);
|
|
86
|
+
// Route low-confidence or manual-review flows through approvals when needed.
|
|
87
|
+
`
|
|
83
88
|
})
|
|
84
89
|
]
|
|
85
90
|
}),
|
|
@@ -96,26 +101,21 @@ if (result.approvalRequestId) {
|
|
|
96
101
|
/* @__PURE__ */ jsxs("li", {
|
|
97
102
|
children: [
|
|
98
103
|
/* @__PURE__ */ jsx("code", {
|
|
99
|
-
children: "
|
|
104
|
+
children: "createUnifiedAgent"
|
|
100
105
|
}),
|
|
101
106
|
", ",
|
|
102
107
|
/* @__PURE__ */ jsx("code", {
|
|
103
|
-
children: "
|
|
108
|
+
children: "ContractSpecAgent"
|
|
104
109
|
}),
|
|
105
110
|
",",
|
|
106
111
|
" ",
|
|
107
112
|
/* @__PURE__ */ jsx("code", {
|
|
108
|
-
children: "
|
|
113
|
+
children: "UnifiedAgent"
|
|
109
114
|
})
|
|
110
115
|
]
|
|
111
116
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
children:
|
|
114
|
-
/* @__PURE__ */ jsx("code", {
|
|
115
|
-
children: "ToolExecutor"
|
|
116
|
-
}),
|
|
117
|
-
" with schema-enforced tool definitions"
|
|
118
|
-
]
|
|
117
|
+
/* @__PURE__ */ jsx("li", {
|
|
118
|
+
children: "MCP, operation-backed, memory, and subagent tool adapters"
|
|
119
119
|
}),
|
|
120
120
|
/* @__PURE__ */ jsxs("li", {
|
|
121
121
|
children: [
|
|
@@ -64,10 +64,9 @@ const draft = await responder.draft(ticket, resolution, classification);`
|
|
|
64
64
|
/* @__PURE__ */ jsx(CodeBlock, {
|
|
65
65
|
language: "typescript",
|
|
66
66
|
code: `import { createSupportTools } from '@contractspec/lib.support-bot/bot';
|
|
67
|
-
import { ToolExecutor } from '@contractspec/lib.ai-agent';
|
|
68
67
|
|
|
69
68
|
const tools = createSupportTools({ resolver, classifier, responder });
|
|
70
|
-
|
|
69
|
+
// Pass these tools into your host runtime or agent adapter.`
|
|
71
70
|
})
|
|
72
71
|
]
|
|
73
72
|
}),
|
|
@@ -267,10 +267,17 @@ function LibrariesAiAgentPage() {
|
|
|
267
267
|
}),
|
|
268
268
|
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
269
269
|
language: "typescript",
|
|
270
|
-
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.
|
|
270
|
+
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.contracts-spec/agent';
|
|
271
271
|
|
|
272
272
|
const SupportBot = defineAgent({
|
|
273
|
-
meta: {
|
|
273
|
+
meta: {
|
|
274
|
+
key: 'support.bot',
|
|
275
|
+
version: '1.0.0',
|
|
276
|
+
description: 'Resolve tickets and escalate low-confidence decisions.',
|
|
277
|
+
owners: ['support'],
|
|
278
|
+
tags: ['support'],
|
|
279
|
+
stability: 'experimental',
|
|
280
|
+
},
|
|
274
281
|
instructions: 'Resolve tickets. Escalate when confidence < 0.75.',
|
|
275
282
|
tools: [{ name: 'support_resolve_ticket' }],
|
|
276
283
|
policy: {
|
|
@@ -292,19 +299,17 @@ const registry = new AgentRegistry().register(SupportBot);`
|
|
|
292
299
|
}),
|
|
293
300
|
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
294
301
|
language: "typescript",
|
|
295
|
-
code: `import {
|
|
302
|
+
code: `import { createUnifiedAgent, ApprovalWorkflow } from '@contractspec/lib.ai-agent';
|
|
296
303
|
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
approvalWorkflow: new ApprovalWorkflow(),
|
|
304
|
+
const approvals = new ApprovalWorkflow();
|
|
305
|
+
const agent = createUnifiedAgent(SupportBot, {
|
|
306
|
+
backend: 'ai-sdk',
|
|
307
|
+
tools: new Map([['support_resolve_ticket', async (input) => resolveTicket(input)]]),
|
|
302
308
|
});
|
|
303
309
|
|
|
304
|
-
const result = await
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}`
|
|
310
|
+
const result = await agent.run(ticket.body);
|
|
311
|
+
// Route low-confidence or manual-review flows through approvals when needed.
|
|
312
|
+
`
|
|
308
313
|
})
|
|
309
314
|
]
|
|
310
315
|
}),
|
|
@@ -321,26 +326,21 @@ if (result.approvalRequestId) {
|
|
|
321
326
|
/* @__PURE__ */ jsxs2("li", {
|
|
322
327
|
children: [
|
|
323
328
|
/* @__PURE__ */ jsx2("code", {
|
|
324
|
-
children: "
|
|
329
|
+
children: "createUnifiedAgent"
|
|
325
330
|
}),
|
|
326
331
|
", ",
|
|
327
332
|
/* @__PURE__ */ jsx2("code", {
|
|
328
|
-
children: "
|
|
333
|
+
children: "ContractSpecAgent"
|
|
329
334
|
}),
|
|
330
335
|
",",
|
|
331
336
|
" ",
|
|
332
337
|
/* @__PURE__ */ jsx2("code", {
|
|
333
|
-
children: "
|
|
338
|
+
children: "UnifiedAgent"
|
|
334
339
|
})
|
|
335
340
|
]
|
|
336
341
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
children:
|
|
339
|
-
/* @__PURE__ */ jsx2("code", {
|
|
340
|
-
children: "ToolExecutor"
|
|
341
|
-
}),
|
|
342
|
-
" with schema-enforced tool definitions"
|
|
343
|
-
]
|
|
342
|
+
/* @__PURE__ */ jsx2("li", {
|
|
343
|
+
children: "MCP, operation-backed, memory, and subagent tool adapters"
|
|
344
344
|
}),
|
|
345
345
|
/* @__PURE__ */ jsxs2("li", {
|
|
346
346
|
children: [
|
|
@@ -3882,10 +3882,9 @@ const draft = await responder.draft(ticket, resolution, classification);`
|
|
|
3882
3882
|
/* @__PURE__ */ jsx23(CodeBlock22, {
|
|
3883
3883
|
language: "typescript",
|
|
3884
3884
|
code: `import { createSupportTools } from '@contractspec/lib.support-bot/bot';
|
|
3885
|
-
import { ToolExecutor } from '@contractspec/lib.ai-agent';
|
|
3886
3885
|
|
|
3887
3886
|
const tools = createSupportTools({ resolver, classifier, responder });
|
|
3888
|
-
|
|
3887
|
+
// Pass these tools into your host runtime or agent adapter.`
|
|
3889
3888
|
})
|
|
3890
3889
|
]
|
|
3891
3890
|
}),
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* Import presentations dynamically or use the main templates/engine.ts
|
|
10
10
|
* which handles the build order correctly.
|
|
11
11
|
*/
|
|
12
|
+
import { TransformEngine } from '@contractspec/lib.contracts-runtime-client-react/transform-engine';
|
|
12
13
|
import type { PresentationSpec } from '@contractspec/lib.contracts-spec/presentations';
|
|
13
|
-
import { TransformEngine } from '@contractspec/lib.contracts-spec/presentations/transform-engine';
|
|
14
14
|
/**
|
|
15
15
|
* Create a configured TransformEngine for template rendering
|
|
16
16
|
*/
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createDefaultTransformEngine,
|
|
5
5
|
registerBasicValidation,
|
|
6
6
|
registerDefaultReactRenderer
|
|
7
|
-
} from "@contractspec/lib.contracts-
|
|
7
|
+
} from "@contractspec/lib.contracts-runtime-client-react/transform-engine";
|
|
8
8
|
function createTemplateTransformEngine() {
|
|
9
9
|
const engine = createDefaultTransformEngine();
|
|
10
10
|
registerDefaultReactRenderer(engine);
|
package/dist/index.js
CHANGED
|
@@ -19329,10 +19329,17 @@ function LibrariesAiAgentPage() {
|
|
|
19329
19329
|
}),
|
|
19330
19330
|
/* @__PURE__ */ jsx76(CodeBlock35, {
|
|
19331
19331
|
language: "typescript",
|
|
19332
|
-
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.
|
|
19332
|
+
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.contracts-spec/agent';
|
|
19333
19333
|
|
|
19334
19334
|
const SupportBot = defineAgent({
|
|
19335
|
-
meta: {
|
|
19335
|
+
meta: {
|
|
19336
|
+
key: 'support.bot',
|
|
19337
|
+
version: '1.0.0',
|
|
19338
|
+
description: 'Resolve tickets and escalate low-confidence decisions.',
|
|
19339
|
+
owners: ['support'],
|
|
19340
|
+
tags: ['support'],
|
|
19341
|
+
stability: 'experimental',
|
|
19342
|
+
},
|
|
19336
19343
|
instructions: 'Resolve tickets. Escalate when confidence < 0.75.',
|
|
19337
19344
|
tools: [{ name: 'support_resolve_ticket' }],
|
|
19338
19345
|
policy: {
|
|
@@ -19354,19 +19361,17 @@ const registry = new AgentRegistry().register(SupportBot);`
|
|
|
19354
19361
|
}),
|
|
19355
19362
|
/* @__PURE__ */ jsx76(CodeBlock35, {
|
|
19356
19363
|
language: "typescript",
|
|
19357
|
-
code: `import {
|
|
19364
|
+
code: `import { createUnifiedAgent, ApprovalWorkflow } from '@contractspec/lib.ai-agent';
|
|
19358
19365
|
|
|
19359
|
-
const
|
|
19360
|
-
|
|
19361
|
-
|
|
19362
|
-
|
|
19363
|
-
approvalWorkflow: new ApprovalWorkflow(),
|
|
19366
|
+
const approvals = new ApprovalWorkflow();
|
|
19367
|
+
const agent = createUnifiedAgent(SupportBot, {
|
|
19368
|
+
backend: 'ai-sdk',
|
|
19369
|
+
tools: new Map([['support_resolve_ticket', async (input) => resolveTicket(input)]]),
|
|
19364
19370
|
});
|
|
19365
19371
|
|
|
19366
|
-
const result = await
|
|
19367
|
-
|
|
19368
|
-
|
|
19369
|
-
}`
|
|
19372
|
+
const result = await agent.run(ticket.body);
|
|
19373
|
+
// Route low-confidence or manual-review flows through approvals when needed.
|
|
19374
|
+
`
|
|
19370
19375
|
})
|
|
19371
19376
|
]
|
|
19372
19377
|
}),
|
|
@@ -19383,26 +19388,21 @@ if (result.approvalRequestId) {
|
|
|
19383
19388
|
/* @__PURE__ */ jsxs76("li", {
|
|
19384
19389
|
children: [
|
|
19385
19390
|
/* @__PURE__ */ jsx76("code", {
|
|
19386
|
-
children: "
|
|
19391
|
+
children: "createUnifiedAgent"
|
|
19387
19392
|
}),
|
|
19388
19393
|
", ",
|
|
19389
19394
|
/* @__PURE__ */ jsx76("code", {
|
|
19390
|
-
children: "
|
|
19395
|
+
children: "ContractSpecAgent"
|
|
19391
19396
|
}),
|
|
19392
19397
|
",",
|
|
19393
19398
|
" ",
|
|
19394
19399
|
/* @__PURE__ */ jsx76("code", {
|
|
19395
|
-
children: "
|
|
19400
|
+
children: "UnifiedAgent"
|
|
19396
19401
|
})
|
|
19397
19402
|
]
|
|
19398
19403
|
}),
|
|
19399
|
-
/* @__PURE__ */
|
|
19400
|
-
children:
|
|
19401
|
-
/* @__PURE__ */ jsx76("code", {
|
|
19402
|
-
children: "ToolExecutor"
|
|
19403
|
-
}),
|
|
19404
|
-
" with schema-enforced tool definitions"
|
|
19405
|
-
]
|
|
19404
|
+
/* @__PURE__ */ jsx76("li", {
|
|
19405
|
+
children: "MCP, operation-backed, memory, and subagent tool adapters"
|
|
19406
19406
|
}),
|
|
19407
19407
|
/* @__PURE__ */ jsxs76("li", {
|
|
19408
19408
|
children: [
|
|
@@ -22944,10 +22944,9 @@ const draft = await responder.draft(ticket, resolution, classification);`
|
|
|
22944
22944
|
/* @__PURE__ */ jsx97(CodeBlock55, {
|
|
22945
22945
|
language: "typescript",
|
|
22946
22946
|
code: `import { createSupportTools } from '@contractspec/lib.support-bot/bot';
|
|
22947
|
-
import { ToolExecutor } from '@contractspec/lib.ai-agent';
|
|
22948
22947
|
|
|
22949
22948
|
const tools = createSupportTools({ resolver, classifier, responder });
|
|
22950
|
-
|
|
22949
|
+
// Pass these tools into your host runtime or agent adapter.`
|
|
22951
22950
|
})
|
|
22952
22951
|
]
|
|
22953
22952
|
}),
|
|
@@ -19319,10 +19319,17 @@ function LibrariesAiAgentPage() {
|
|
|
19319
19319
|
}),
|
|
19320
19320
|
/* @__PURE__ */ jsx76(CodeBlock35, {
|
|
19321
19321
|
language: "typescript",
|
|
19322
|
-
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.
|
|
19322
|
+
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.contracts-spec/agent';
|
|
19323
19323
|
|
|
19324
19324
|
const SupportBot = defineAgent({
|
|
19325
|
-
meta: {
|
|
19325
|
+
meta: {
|
|
19326
|
+
key: 'support.bot',
|
|
19327
|
+
version: '1.0.0',
|
|
19328
|
+
description: 'Resolve tickets and escalate low-confidence decisions.',
|
|
19329
|
+
owners: ['support'],
|
|
19330
|
+
tags: ['support'],
|
|
19331
|
+
stability: 'experimental',
|
|
19332
|
+
},
|
|
19326
19333
|
instructions: 'Resolve tickets. Escalate when confidence < 0.75.',
|
|
19327
19334
|
tools: [{ name: 'support_resolve_ticket' }],
|
|
19328
19335
|
policy: {
|
|
@@ -19344,19 +19351,17 @@ const registry = new AgentRegistry().register(SupportBot);`
|
|
|
19344
19351
|
}),
|
|
19345
19352
|
/* @__PURE__ */ jsx76(CodeBlock35, {
|
|
19346
19353
|
language: "typescript",
|
|
19347
|
-
code: `import {
|
|
19354
|
+
code: `import { createUnifiedAgent, ApprovalWorkflow } from '@contractspec/lib.ai-agent';
|
|
19348
19355
|
|
|
19349
|
-
const
|
|
19350
|
-
|
|
19351
|
-
|
|
19352
|
-
|
|
19353
|
-
approvalWorkflow: new ApprovalWorkflow(),
|
|
19356
|
+
const approvals = new ApprovalWorkflow();
|
|
19357
|
+
const agent = createUnifiedAgent(SupportBot, {
|
|
19358
|
+
backend: 'ai-sdk',
|
|
19359
|
+
tools: new Map([['support_resolve_ticket', async (input) => resolveTicket(input)]]),
|
|
19354
19360
|
});
|
|
19355
19361
|
|
|
19356
|
-
const result = await
|
|
19357
|
-
|
|
19358
|
-
|
|
19359
|
-
}`
|
|
19362
|
+
const result = await agent.run(ticket.body);
|
|
19363
|
+
// Route low-confidence or manual-review flows through approvals when needed.
|
|
19364
|
+
`
|
|
19360
19365
|
})
|
|
19361
19366
|
]
|
|
19362
19367
|
}),
|
|
@@ -19373,26 +19378,21 @@ if (result.approvalRequestId) {
|
|
|
19373
19378
|
/* @__PURE__ */ jsxs76("li", {
|
|
19374
19379
|
children: [
|
|
19375
19380
|
/* @__PURE__ */ jsx76("code", {
|
|
19376
|
-
children: "
|
|
19381
|
+
children: "createUnifiedAgent"
|
|
19377
19382
|
}),
|
|
19378
19383
|
", ",
|
|
19379
19384
|
/* @__PURE__ */ jsx76("code", {
|
|
19380
|
-
children: "
|
|
19385
|
+
children: "ContractSpecAgent"
|
|
19381
19386
|
}),
|
|
19382
19387
|
",",
|
|
19383
19388
|
" ",
|
|
19384
19389
|
/* @__PURE__ */ jsx76("code", {
|
|
19385
|
-
children: "
|
|
19390
|
+
children: "UnifiedAgent"
|
|
19386
19391
|
})
|
|
19387
19392
|
]
|
|
19388
19393
|
}),
|
|
19389
|
-
/* @__PURE__ */
|
|
19390
|
-
children:
|
|
19391
|
-
/* @__PURE__ */ jsx76("code", {
|
|
19392
|
-
children: "ToolExecutor"
|
|
19393
|
-
}),
|
|
19394
|
-
" with schema-enforced tool definitions"
|
|
19395
|
-
]
|
|
19394
|
+
/* @__PURE__ */ jsx76("li", {
|
|
19395
|
+
children: "MCP, operation-backed, memory, and subagent tool adapters"
|
|
19396
19396
|
}),
|
|
19397
19397
|
/* @__PURE__ */ jsxs76("li", {
|
|
19398
19398
|
children: [
|
|
@@ -22934,10 +22934,9 @@ const draft = await responder.draft(ticket, resolution, classification);`
|
|
|
22934
22934
|
/* @__PURE__ */ jsx97(CodeBlock55, {
|
|
22935
22935
|
language: "typescript",
|
|
22936
22936
|
code: `import { createSupportTools } from '@contractspec/lib.support-bot/bot';
|
|
22937
|
-
import { ToolExecutor } from '@contractspec/lib.ai-agent';
|
|
22938
22937
|
|
|
22939
22938
|
const tools = createSupportTools({ resolver, classifier, responder });
|
|
22940
|
-
|
|
22939
|
+
// Pass these tools into your host runtime or agent adapter.`
|
|
22941
22940
|
})
|
|
22942
22941
|
]
|
|
22943
22942
|
}),
|