@contractspec/bundle.library 3.7.7 → 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 +150 -146
- package/CHANGELOG.md +130 -0
- package/dist/components/docs/examples/DocsExamplesPage.js +55 -2
- package/dist/components/docs/examples/ExampleShowcasePage.d.ts +5 -0
- package/dist/components/docs/examples/ExampleShowcasePage.js +258 -0
- package/dist/components/docs/examples/exampleShowcaseData.d.ts +10 -0
- package/dist/components/docs/examples/exampleShowcaseData.js +53 -0
- package/dist/components/docs/examples/index.d.ts +1 -0
- package/dist/components/docs/examples/index.js +261 -2
- package/dist/components/docs/generated/docs-index.generated.d.ts +6 -6
- package/dist/components/docs/index.js +4372 -4114
- 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 +5132 -4874
- package/dist/node/components/docs/examples/DocsExamplesPage.js +55 -2
- package/dist/node/components/docs/examples/ExampleShowcasePage.js +257 -0
- package/dist/node/components/docs/examples/exampleShowcaseData.js +52 -0
- package/dist/node/components/docs/examples/index.js +261 -2
- package/dist/node/components/docs/index.js +4372 -4114
- 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 +5132 -4874
- package/package.json +48 -23
- package/src/components/docs/examples/DocsExamplesPage.tsx +13 -2
- package/src/components/docs/examples/ExampleShowcasePage.tsx +122 -0
- package/src/components/docs/examples/exampleShowcaseData.ts +65 -0
- package/src/components/docs/examples/index.ts +1 -0
- 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
|
@@ -41,10 +41,17 @@ function LibrariesAiAgentPage() {
|
|
|
41
41
|
}),
|
|
42
42
|
/* @__PURE__ */ jsx(CodeBlock, {
|
|
43
43
|
language: "typescript",
|
|
44
|
-
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.
|
|
44
|
+
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.contracts-spec/agent';
|
|
45
45
|
|
|
46
46
|
const SupportBot = defineAgent({
|
|
47
|
-
meta: {
|
|
47
|
+
meta: {
|
|
48
|
+
key: 'support.bot',
|
|
49
|
+
version: '1.0.0',
|
|
50
|
+
description: 'Resolve tickets and escalate low-confidence decisions.',
|
|
51
|
+
owners: ['support'],
|
|
52
|
+
tags: ['support'],
|
|
53
|
+
stability: 'experimental',
|
|
54
|
+
},
|
|
48
55
|
instructions: 'Resolve tickets. Escalate when confidence < 0.75.',
|
|
49
56
|
tools: [{ name: 'support_resolve_ticket' }],
|
|
50
57
|
policy: {
|
|
@@ -66,19 +73,17 @@ const registry = new AgentRegistry().register(SupportBot);`
|
|
|
66
73
|
}),
|
|
67
74
|
/* @__PURE__ */ jsx(CodeBlock, {
|
|
68
75
|
language: "typescript",
|
|
69
|
-
code: `import {
|
|
76
|
+
code: `import { createUnifiedAgent, ApprovalWorkflow } from '@contractspec/lib.ai-agent';
|
|
70
77
|
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
approvalWorkflow: new ApprovalWorkflow(),
|
|
78
|
+
const approvals = new ApprovalWorkflow();
|
|
79
|
+
const agent = createUnifiedAgent(SupportBot, {
|
|
80
|
+
backend: 'ai-sdk',
|
|
81
|
+
tools: new Map([['support_resolve_ticket', async (input) => resolveTicket(input)]]),
|
|
76
82
|
});
|
|
77
83
|
|
|
78
|
-
const result = await
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}`
|
|
84
|
+
const result = await agent.run(ticket.body);
|
|
85
|
+
// Route low-confidence or manual-review flows through approvals when needed.
|
|
86
|
+
`
|
|
82
87
|
})
|
|
83
88
|
]
|
|
84
89
|
}),
|
|
@@ -95,26 +100,21 @@ if (result.approvalRequestId) {
|
|
|
95
100
|
/* @__PURE__ */ jsxs("li", {
|
|
96
101
|
children: [
|
|
97
102
|
/* @__PURE__ */ jsx("code", {
|
|
98
|
-
children: "
|
|
103
|
+
children: "createUnifiedAgent"
|
|
99
104
|
}),
|
|
100
105
|
", ",
|
|
101
106
|
/* @__PURE__ */ jsx("code", {
|
|
102
|
-
children: "
|
|
107
|
+
children: "ContractSpecAgent"
|
|
103
108
|
}),
|
|
104
109
|
",",
|
|
105
110
|
" ",
|
|
106
111
|
/* @__PURE__ */ jsx("code", {
|
|
107
|
-
children: "
|
|
112
|
+
children: "UnifiedAgent"
|
|
108
113
|
})
|
|
109
114
|
]
|
|
110
115
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
children:
|
|
113
|
-
/* @__PURE__ */ jsx("code", {
|
|
114
|
-
children: "ToolExecutor"
|
|
115
|
-
}),
|
|
116
|
-
" with schema-enforced tool definitions"
|
|
117
|
-
]
|
|
116
|
+
/* @__PURE__ */ jsx("li", {
|
|
117
|
+
children: "MCP, operation-backed, memory, and subagent tool adapters"
|
|
118
118
|
}),
|
|
119
119
|
/* @__PURE__ */ jsxs("li", {
|
|
120
120
|
children: [
|
|
@@ -63,10 +63,9 @@ const draft = await responder.draft(ticket, resolution, classification);`
|
|
|
63
63
|
/* @__PURE__ */ jsx(CodeBlock, {
|
|
64
64
|
language: "typescript",
|
|
65
65
|
code: `import { createSupportTools } from '@contractspec/lib.support-bot/bot';
|
|
66
|
-
import { ToolExecutor } from '@contractspec/lib.ai-agent';
|
|
67
66
|
|
|
68
67
|
const tools = createSupportTools({ resolver, classifier, responder });
|
|
69
|
-
|
|
68
|
+
// Pass these tools into your host runtime or agent adapter.`
|
|
70
69
|
})
|
|
71
70
|
]
|
|
72
71
|
}),
|
|
@@ -266,10 +266,17 @@ function LibrariesAiAgentPage() {
|
|
|
266
266
|
}),
|
|
267
267
|
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
268
268
|
language: "typescript",
|
|
269
|
-
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.
|
|
269
|
+
code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.contracts-spec/agent';
|
|
270
270
|
|
|
271
271
|
const SupportBot = defineAgent({
|
|
272
|
-
meta: {
|
|
272
|
+
meta: {
|
|
273
|
+
key: 'support.bot',
|
|
274
|
+
version: '1.0.0',
|
|
275
|
+
description: 'Resolve tickets and escalate low-confidence decisions.',
|
|
276
|
+
owners: ['support'],
|
|
277
|
+
tags: ['support'],
|
|
278
|
+
stability: 'experimental',
|
|
279
|
+
},
|
|
273
280
|
instructions: 'Resolve tickets. Escalate when confidence < 0.75.',
|
|
274
281
|
tools: [{ name: 'support_resolve_ticket' }],
|
|
275
282
|
policy: {
|
|
@@ -291,19 +298,17 @@ const registry = new AgentRegistry().register(SupportBot);`
|
|
|
291
298
|
}),
|
|
292
299
|
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
293
300
|
language: "typescript",
|
|
294
|
-
code: `import {
|
|
301
|
+
code: `import { createUnifiedAgent, ApprovalWorkflow } from '@contractspec/lib.ai-agent';
|
|
295
302
|
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
approvalWorkflow: new ApprovalWorkflow(),
|
|
303
|
+
const approvals = new ApprovalWorkflow();
|
|
304
|
+
const agent = createUnifiedAgent(SupportBot, {
|
|
305
|
+
backend: 'ai-sdk',
|
|
306
|
+
tools: new Map([['support_resolve_ticket', async (input) => resolveTicket(input)]]),
|
|
301
307
|
});
|
|
302
308
|
|
|
303
|
-
const result = await
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}`
|
|
309
|
+
const result = await agent.run(ticket.body);
|
|
310
|
+
// Route low-confidence or manual-review flows through approvals when needed.
|
|
311
|
+
`
|
|
307
312
|
})
|
|
308
313
|
]
|
|
309
314
|
}),
|
|
@@ -320,26 +325,21 @@ if (result.approvalRequestId) {
|
|
|
320
325
|
/* @__PURE__ */ jsxs2("li", {
|
|
321
326
|
children: [
|
|
322
327
|
/* @__PURE__ */ jsx2("code", {
|
|
323
|
-
children: "
|
|
328
|
+
children: "createUnifiedAgent"
|
|
324
329
|
}),
|
|
325
330
|
", ",
|
|
326
331
|
/* @__PURE__ */ jsx2("code", {
|
|
327
|
-
children: "
|
|
332
|
+
children: "ContractSpecAgent"
|
|
328
333
|
}),
|
|
329
334
|
",",
|
|
330
335
|
" ",
|
|
331
336
|
/* @__PURE__ */ jsx2("code", {
|
|
332
|
-
children: "
|
|
337
|
+
children: "UnifiedAgent"
|
|
333
338
|
})
|
|
334
339
|
]
|
|
335
340
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
children:
|
|
338
|
-
/* @__PURE__ */ jsx2("code", {
|
|
339
|
-
children: "ToolExecutor"
|
|
340
|
-
}),
|
|
341
|
-
" with schema-enforced tool definitions"
|
|
342
|
-
]
|
|
341
|
+
/* @__PURE__ */ jsx2("li", {
|
|
342
|
+
children: "MCP, operation-backed, memory, and subagent tool adapters"
|
|
343
343
|
}),
|
|
344
344
|
/* @__PURE__ */ jsxs2("li", {
|
|
345
345
|
children: [
|
|
@@ -3881,10 +3881,9 @@ const draft = await responder.draft(ticket, resolution, classification);`
|
|
|
3881
3881
|
/* @__PURE__ */ jsx23(CodeBlock22, {
|
|
3882
3882
|
language: "typescript",
|
|
3883
3883
|
code: `import { createSupportTools } from '@contractspec/lib.support-bot/bot';
|
|
3884
|
-
import { ToolExecutor } from '@contractspec/lib.ai-agent';
|
|
3885
3884
|
|
|
3886
3885
|
const tools = createSupportTools({ resolver, classifier, responder });
|
|
3887
|
-
|
|
3886
|
+
// Pass these tools into your host runtime or agent adapter.`
|
|
3888
3887
|
})
|
|
3889
3888
|
]
|
|
3890
3889
|
}),
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createDefaultTransformEngine,
|
|
4
4
|
registerBasicValidation,
|
|
5
5
|
registerDefaultReactRenderer
|
|
6
|
-
} from "@contractspec/lib.contracts-
|
|
6
|
+
} from "@contractspec/lib.contracts-runtime-client-react/transform-engine";
|
|
7
7
|
function createTemplateTransformEngine() {
|
|
8
8
|
const engine = createDefaultTransformEngine();
|
|
9
9
|
registerDefaultReactRenderer(engine);
|