@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
|
@@ -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);
|