@culvii/cli 0.0.7 → 0.0.8

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.
Files changed (70) hide show
  1. package/COMMANDS.md +5 -5
  2. package/README.md +15 -6
  3. package/USAGE.md +11 -10
  4. package/dist/DeployView-D4UEXMDJ.js +2 -0
  5. package/dist/DevView-GPKSSOLA.js +2 -0
  6. package/dist/EnvView-3ZURMIZS.js +2 -0
  7. package/dist/{HelpView-YLCEPIFY.js → HelpView-E7HS4SVF.js} +1 -1
  8. package/dist/WhoamiView-TKSYSHQ2.js +2 -0
  9. package/dist/{WorkspaceView-RNFALIPM.js → WorkspaceView-ID7ZMBHV.js} +1 -1
  10. package/dist/{chunk-IRZMWFC3.js → chunk-IPETC2TK.js} +1 -1
  11. package/dist/index.js +33 -683
  12. package/dist/lib/evaluator.js +2 -2
  13. package/dist/login-OGOHEHFE.js +39 -0
  14. package/dist/{logout-TDZA462P.js → logout-BRUJBFUK.js} +1 -1
  15. package/dist/skill-bundle-7KYK5GBL.js +1377 -0
  16. package/package.json +9 -5
  17. package/skills/culvii/.culvii-skill.json +59 -0
  18. package/skills/culvii/SKILL.md +73 -0
  19. package/skills/culvii/agents/openai.yaml +4 -0
  20. package/skills/culvii/examples/agent-workflow.culvii.ts +24 -0
  21. package/skills/culvii/examples/complete-workflow.culvii.ts +37 -0
  22. package/skills/culvii/examples/output-surface.culvii.ts +45 -0
  23. package/skills/culvii/examples/wait-surface.culvii.ts +24 -0
  24. package/skills/culvii/references/agents.md +29 -0
  25. package/skills/culvii/references/authoring-files.md +21 -0
  26. package/skills/culvii/references/cli-guide.md +22 -0
  27. package/skills/culvii/references/cli-reference.md +184 -0
  28. package/skills/culvii/references/feedback-cycle.md +43 -0
  29. package/skills/culvii/references/integrations.md +13 -0
  30. package/skills/culvii/references/kit-api.md +35 -0
  31. package/skills/culvii/references/node-core-agent.md +27 -0
  32. package/skills/culvii/references/node-core-browser-automation.md +53 -0
  33. package/skills/culvii/references/node-core-code.md +28 -0
  34. package/skills/culvii/references/node-core-http.md +42 -0
  35. package/skills/culvii/references/node-core-if.md +26 -0
  36. package/skills/culvii/references/node-core-jwt.md +31 -0
  37. package/skills/culvii/references/node-core-set.md +24 -0
  38. package/skills/culvii/references/node-cron-trigger.md +25 -0
  39. package/skills/culvii/references/node-elasticsearch.md +39 -0
  40. package/skills/culvii/references/node-gmail-trigger.md +44 -0
  41. package/skills/culvii/references/node-gmail.md +57 -0
  42. package/skills/culvii/references/node-google-calendar.md +51 -0
  43. package/skills/culvii/references/node-google-docs.md +46 -0
  44. package/skills/culvii/references/node-manual-trigger.md +24 -0
  45. package/skills/culvii/references/node-microsoft-outlook-trigger.md +41 -0
  46. package/skills/culvii/references/node-microsoft-outlook.md +55 -0
  47. package/skills/culvii/references/node-microsoft-sharepoint.md +40 -0
  48. package/skills/culvii/references/node-s3.md +40 -0
  49. package/skills/culvii/references/node-slack-trigger.md +40 -0
  50. package/skills/culvii/references/node-slack.md +38 -0
  51. package/skills/culvii/references/node-twilio.md +39 -0
  52. package/skills/culvii/references/node-wait-timer.md +24 -0
  53. package/skills/culvii/references/node-webhook-trigger.md +24 -0
  54. package/skills/culvii/references/nodes-index.md +27 -0
  55. package/skills/culvii/references/runtime-values.md +36 -0
  56. package/skills/culvii/references/surface-authoring.md +27 -0
  57. package/skills/culvii/references/surface-display.md +390 -0
  58. package/skills/culvii/references/surface-feedback.md +41 -0
  59. package/skills/culvii/references/surface-input-actions.md +143 -0
  60. package/skills/culvii/references/surface-layout.md +97 -0
  61. package/skills/culvii/references/validation.md +18 -0
  62. package/skills/culvii/references/workflows.md +30 -0
  63. package/dist/DeployView-GEJNL26A.js +0 -2
  64. package/dist/DevView-SOPAMSZ4.js +0 -2
  65. package/dist/EnvView-MCZC2NBO.js +0 -2
  66. package/dist/WhoamiView-67HV2L5J.js +0 -2
  67. package/dist/chunk-MPKGJC7N.js +0 -2
  68. package/dist/login-G5QUR55L.js +0 -36
  69. /package/dist/{chunk-5NBKYMD7.js → chunk-56C3DFV2.js} +0 -0
  70. /package/dist/{chunk-JFIFRAAR.js → chunk-RS5GDTRN.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@culvii/cli",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Culvii CLI",
5
5
  "private": false,
6
6
  "type": "module",
@@ -10,6 +10,7 @@
10
10
  },
11
11
  "files": [
12
12
  "dist",
13
+ "skills",
13
14
  "README.md",
14
15
  "COMMANDS.md",
15
16
  "USAGE.md"
@@ -49,6 +50,7 @@
49
50
  "tsup": "8.5.1",
50
51
  "typescript": "6.0.3",
51
52
  "vitest": "^4.1.5",
53
+ "@culvii/kit": "0.0.7",
52
54
  "surface-contract": "1.0.0"
53
55
  },
54
56
  "engines": {
@@ -56,12 +58,14 @@
56
58
  "pnpm": ">=10.0.0"
57
59
  },
58
60
  "scripts": {
59
- "prebuild": "node scripts/generate-skill-content.js",
61
+ "skill:generate": "node --import tsx scripts/generate-skill-bundle.ts",
62
+ "skill:check": "node --import tsx scripts/generate-skill-bundle.ts --check",
63
+ "prebuild": "pnpm skill:generate",
60
64
  "build": "tsup",
61
- "predev": "node scripts/generate-skill-content.js",
65
+ "predev": "pnpm skill:generate",
62
66
  "dev": "tsup --watch",
63
- "pretest": "node scripts/generate-skill-content.js",
64
- "test": "vitest run",
67
+ "pretest": "pnpm --filter @culvii/kit build && pnpm skill:check && pnpm skill:generate",
68
+ "test": "vitest run && tsc --noEmit -p tsconfig.skill-examples.json",
65
69
  "test:watch": "vitest",
66
70
  "test:coverage": "vitest run --coverage"
67
71
  }
@@ -0,0 +1,59 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "culvii",
4
+ "bundleHash": "687dba881f07be592c3ce200cefbccacd5e7aac67d122256075255f690563d10",
5
+ "generatorVersion": 1,
6
+ "sources": {
7
+ "@culvii/kit": "0.0.7",
8
+ "nodes": "1.0.0",
9
+ "surface-contract": "1.0.0",
10
+ "@culvii/cli": "0.0.8"
11
+ },
12
+ "files": {
13
+ "agents/openai.yaml": "80196c1dbde488639e31d4bbc0addcd253ba626ea0b3cb524d06ee1eabe3263b",
14
+ "examples/agent-workflow.culvii.ts": "934fcd2368ed8d8a02b7557dd2003b462def5f668021173a88cf7ab2393d9c5a",
15
+ "examples/complete-workflow.culvii.ts": "6b939592800bb5b94358fd7e8352a20499a16a31b2d310fcf2cd9609d9e12b66",
16
+ "examples/output-surface.culvii.ts": "1959d8bc5c987c32d6c21fa6f36a1eb70bea5a18742885dff85f353170645702",
17
+ "examples/wait-surface.culvii.ts": "ae533ae4cf2ed533bc333528bd971d65b4140be033e65025663f78bc99d77cf2",
18
+ "references/agents.md": "20cbcc3c184d91794f986217f293043c526d157c261a696e46ebf8e7744947c4",
19
+ "references/authoring-files.md": "ea93dafc36e6643a1040e430aec0fd41f1a5f93c5d24794ae3db0624b26dff53",
20
+ "references/cli-guide.md": "e7f6d69ec3cbc94fc584a64684883732e4e5ba6933fe1526dfe4b33e0eb19753",
21
+ "references/cli-reference.md": "e976edf090b5a8c1b8c4f9edc8df434a3c3c69348123ab0c4290547a971612f2",
22
+ "references/feedback-cycle.md": "0e5cf8142769d2ae6d8331cd0a04a6c1d54b8e9afb24b51eed8dfed4115d2c36",
23
+ "references/integrations.md": "9fa3db838b4e48d3aae2949012bbbfa7ce84b32779048d17c21ac4548482ee68",
24
+ "references/kit-api.md": "27ad6b8578dd2cf8606636f580a024551057171a74a4c8b5a3a12764f57cf263",
25
+ "references/node-core-agent.md": "09b0b3a5607dbdd06f3f463d140f9633a27b580e59b22f135f1bb349b7fcc0bf",
26
+ "references/node-core-browser-automation.md": "797f7dbd3374c2ea38de830ab2e9b08a2762e45a3cf56dad1ff274cf8109e7e7",
27
+ "references/node-core-code.md": "2768aa7a0fec5f12d716ece9727b038ee2a205647e7c41bd85f0139165bbbd51",
28
+ "references/node-core-http.md": "4799365201368c31d270644161a6e415d5ecfa25d9c75cf5e550330aff7679b4",
29
+ "references/node-core-if.md": "3298f6dbe803eae9e3a69eb7084b08f43a6c76e139e56051539c7603a705b7e1",
30
+ "references/node-core-jwt.md": "8828d11751ee88474f962a296cf29b279fa055ea2b95d9ee0362d211596bdedb",
31
+ "references/node-core-set.md": "511944327b31f9af70fbdcc5769c512a78129f901f98bb03ae3e464205b76468",
32
+ "references/node-cron-trigger.md": "ab958969a2a30b6643ad1d31a3241fed427d3db2e3871ea7ab68c0af4d4cc82b",
33
+ "references/node-elasticsearch.md": "b79e86b337e3391296036ac65a267b619ecdde5c34f7765c15abb8b5a292c5e5",
34
+ "references/node-gmail-trigger.md": "f359ea35b30edbc1d723aa3f9f013fa4aaec6082d114211c2dfc369b765e6e87",
35
+ "references/node-gmail.md": "ce3dc186d6483d12680ccd66b208fd32319aa8fc610ef8d11936f323c4526918",
36
+ "references/node-google-calendar.md": "5258b43f2434446723ccabfc1f7e023d251661a5d451ba5c639f96452737ebab",
37
+ "references/node-google-docs.md": "9c98ddd0f287fbc0322128c2c29707bf66b964557c796074dbfa7ace7e613ee1",
38
+ "references/node-manual-trigger.md": "4bebd22e2a76d6e90acb08ece0d88a6c7040f1a0ac11da298f712251194b7086",
39
+ "references/node-microsoft-outlook-trigger.md": "e74d4984e85e87f7a8be1f762e72fd77b2ddce984034126612484966e9429ab0",
40
+ "references/node-microsoft-outlook.md": "4767160228debe361881e6e5fc9cfda55add3b026728221e4a5bd2eb4be9fc87",
41
+ "references/node-microsoft-sharepoint.md": "7b89f9073da94a39f477ca8aeb2964dee0bb7dee99784841a403884a75c5a822",
42
+ "references/node-s3.md": "e25649b8103460ebf7c35c96626aa3c9e181dcb1ca2d8af3203afb801a6062ea",
43
+ "references/node-slack-trigger.md": "a0bdeb27a0d035fb85d25bcd59d54ba2da622be143333431c35a53b5728b7b65",
44
+ "references/node-slack.md": "e02d5c72948f311fb2847ce59ee11c9ba2a0fd02c59ba661236aa9540091aa3d",
45
+ "references/node-twilio.md": "337e1163ae54ebad046d7ba9030a8c54503ef39007396a0b5ee10598ed34ff6e",
46
+ "references/node-wait-timer.md": "72749e63f27b512aa6c51190fbc7a79195cdc37acd6c0f2305285012ce5fd06d",
47
+ "references/node-webhook-trigger.md": "b98b9cfc92b2e6eb5b1d75e651abccd022b7914d609052d7f7de4e588af45b5a",
48
+ "references/nodes-index.md": "de160eca230166f6b795f515a9e5884d3ba814b6600a5d412cc0c54a77d68cbb",
49
+ "references/runtime-values.md": "93dbe09b2f150ffec02a1d1e2bebdce3eda6e885f1daaae05354ecaceb41f038",
50
+ "references/surface-authoring.md": "b8b666d57f3101461604d94f2910e6c1fc9948411cc773b3b3916f5d89c8b32d",
51
+ "references/surface-display.md": "0afaf3c04fb2a7718e3bf2db0d55e968f7acab80c20f1d3a9a96282e6688a709",
52
+ "references/surface-feedback.md": "45009b5b4d050f0af2a186d478ae9a9964990d2e37f7e4e655d6a2e03ea6cb49",
53
+ "references/surface-input-actions.md": "54cd475120fcb650e4c876b9787905d47b87638483d73fc7dc7fb3a06305a8da",
54
+ "references/surface-layout.md": "3381fea6ed2ed16f4d1e9a9186aa853ecf834fb8f31a1bd09408e9c218e6b559",
55
+ "references/validation.md": "224ab2041ab6d823b8468b381e16a9823eb2a97b2ea33a812e89b2592ac72f68",
56
+ "references/workflows.md": "5988f86d8053c44c12decf4d43e98c13d2b3e22f124060198ede182b1e0fc648",
57
+ "SKILL.md": "8fc95b5ac2a0347d77d8155d67622033960392e85fb519dacdc67e864874c388"
58
+ }
59
+ }
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: culvii
3
+ description: Use this skill when writing and validating Culvii agents, workflows, nodes, or dynamic UI surfaces with @culvii/kit and culvii dev, including recursive runtime expressions, surface bindings, and cross-resource references.
4
+ ---
5
+
6
+ # Culvii authoring
7
+
8
+ Build Culvii resources in TypeScript using public @culvii/kit APIs. This file routes you to the minimum detailed references needed for the task.
9
+
10
+ ## Start here
11
+
12
+ 1. Inspect the project's package.json, culvii.yaml, and existing *.culvii.ts files before generating code.
13
+ 2. Read [authoring files](references/authoring-files.md), then read only the task-specific references below.
14
+ 3. Never invent node types, component types, props, flags, or APIs. Open the generated reference first.
15
+ 4. Never write raw credentials. Resolve Culvii credential IDs through [integration selection](references/integrations.md); never ask the user to copy or paste an ID.
16
+ 5. Author the requested resources as drafts, then follow the authenticated validation loop in [the CLI development guide](references/cli-guide.md). Never guess the tenant, never run culvii deploy, and never leave culvii dev running.
17
+
18
+ For every newly authored workflow, offer runtime widget configuration before starting `culvii dev`. If the user opts in, follow [surface configuration and visual approval](references/surface-feedback.md): choose custom, existing, or default per node, and attach every custom candidate before the first validation. Do not finish while a custom surface is unvalidated or awaiting visual approval.
19
+
20
+ ## Missing required inputs
21
+
22
+ - Gather every known blocking input before authoring placeholders. Ask them together in one interactive prompt, or the fewest batches allowed by the agent.
23
+ - Use the agent's native in-run question tool, such as Codex request_user_input or Claude AskUserQuestion, so the task pauses and resumes in the same run. Never return a final answer merely to request missing values.
24
+ - Use selectable options only when every option is a complete usable value or a decision that needs no dependent value. Options must come from the user's request, existing project files, or real command output; never invent IDs.
25
+ - An answer such as "DM by user ID" is incomplete when the actual user ID is still missing. If a semantic decision and an ID are both required, collect both in the same in-run prompt or immediately ask for the ID before continuing.
26
+ - For credentials, follow [integration selection](references/integrations.md). For an unknown channel, user, tenant, or resource ID, use a free-text input when the agent supports one. If the question UI only offers radio options plus custom/Other, explicitly ask the user to select custom/Other and paste the literal ID; do not offer a semantic radio answer that can be mistaken for the ID.
27
+ - After the user responds, verify that every required opaque value contains the literal usable ID. Continue authoring and validation automatically only when all required values are present. If no interactive question tool exists, leave the task explicitly waiting for input rather than marking it complete.
28
+
29
+ ## Task routing
30
+
31
+ - Agents, models, secondary agents, permissions, and tools: [agents](references/agents.md) and [Kit API](references/kit-api.md).
32
+ - Workflows, steps, branching, errors, and references: [workflows](references/workflows.md), [runtime values](references/runtime-values.md), and [validation](references/validation.md).
33
+ - Surfaces: [surface configuration and visual approval](references/surface-feedback.md), [surface authoring](references/surface-authoring.md), then [layout](references/surface-layout.md), [display](references/surface-display.md), or [input/actions](references/surface-input-actions.md).
34
+ - CLI use: [development lifecycle](references/cli-guide.md), [workflow feedback cycle](references/feedback-cycle.md), and [exact CLI reference](references/cli-reference.md).
35
+ - Credentials and provider integrations: [integration selection](references/integrations.md).
36
+ - Node selection: [node index](references/nodes-index.md), then the exact page linked below.
37
+
38
+ ## Node references
39
+
40
+ - [`core.agent`](references/node-core-agent.md)
41
+ - [`core.browserAutomation`](references/node-core-browser-automation.md)
42
+ - [`core.code`](references/node-core-code.md)
43
+ - [`core.http`](references/node-core-http.md)
44
+ - [`core.if`](references/node-core-if.md)
45
+ - [`core.jwt`](references/node-core-jwt.md)
46
+ - [`core.set`](references/node-core-set.md)
47
+ - [`cronTrigger`](references/node-cron-trigger.md)
48
+ - [`elasticsearch`](references/node-elasticsearch.md)
49
+ - [`gmail`](references/node-gmail.md)
50
+ - [`gmailTrigger`](references/node-gmail-trigger.md)
51
+ - [`googleCalendar`](references/node-google-calendar.md)
52
+ - [`googleDocs`](references/node-google-docs.md)
53
+ - [`manualTrigger`](references/node-manual-trigger.md)
54
+ - [`microsoftOutlook`](references/node-microsoft-outlook.md)
55
+ - [`microsoftOutlookTrigger`](references/node-microsoft-outlook-trigger.md)
56
+ - [`microsoftSharepoint`](references/node-microsoft-sharepoint.md)
57
+ - [`s3`](references/node-s3.md)
58
+ - [`slack`](references/node-slack.md)
59
+ - [`slackTrigger`](references/node-slack-trigger.md)
60
+ - [`twilio`](references/node-twilio.md)
61
+ - [`waitTimer`](references/node-wait-timer.md)
62
+ - [`webhookTrigger`](references/node-webhook-trigger.md)
63
+
64
+ ## Examples
65
+
66
+ - [Agent and workflow](examples/agent-workflow.culvii.ts)
67
+ - [Output surface](examples/output-surface.culvii.ts)
68
+ - [Wait surface](examples/wait-surface.culvii.ts)
69
+ - [Complete workflow](examples/complete-workflow.culvii.ts)
70
+
71
+ ## Safety
72
+
73
+ Do not bypass platform validation, add unsupported surface markup/CSS/JavaScript, or expose raw binary data. Never run culvii deploy. Test workflows through the feedback cycle; do not execute standalone agents. Always close the exact culvii dev process you started and wait for it to exit before finishing. Workflow expressions use {{ ... }} selectors; surface bindings use JSON Pointer objects. Keep them separate.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Culvii"
3
+ short_description: "Build Culvii agents, workflows, and surfaces"
4
+ default_prompt: "Use $culvii to build and validate a Culvii agent or workflow."
@@ -0,0 +1,24 @@
1
+ import { MultiAgentEngine, Step, Workflow, createAgentModelConfigFromRef } from '@culvii/kit';
2
+
3
+ const MODEL = createAgentModelConfigFromRef('openai/gpt-4.1', 'credential-id');
4
+
5
+ function createAgent() {
6
+ return new MultiAgentEngine({
7
+ id: 'review-agent', name: 'Review Agent', role: 'primary',
8
+ description: 'Reviews a request.', systemPrompt: 'Return a concise review.',
9
+ model: MODEL, secondaryAgents: [],
10
+ });
11
+ }
12
+
13
+ function createWorkflow() {
14
+ const trigger = new Step({ id: 'trigger', name: 'Manual Trigger', type: 'manualTrigger' });
15
+ const run = new Step({
16
+ id: 'run-review', name: 'Run Review', type: 'core.agent',
17
+ params: { agentReferenceKey: 'review-agent', prompt: 'Review the request.', autoCloseSession: true },
18
+ });
19
+ trigger.connectTo(run);
20
+ return new Workflow({ id: 'review-workflow', name: 'Review Workflow', steps: [trigger, run] });
21
+ }
22
+
23
+ createAgent();
24
+ createWorkflow();
@@ -0,0 +1,37 @@
1
+ import { MultiAgentEngine, Step, Workflow, createAgentModelConfigFromRef, defineWorkflowTool } from '@culvii/kit';
2
+
3
+ const MODEL = createAgentModelConfigFromRef('anthropic/claude-sonnet-4-5', 'credential-id');
4
+
5
+ function createLookupWorkflow() {
6
+ const trigger = new Step({ id: 'lookup-trigger', name: 'Lookup Trigger', type: 'manualTrigger' });
7
+ const lookup = new Step({ id: 'lookup', name: 'Lookup', type: 'core.set', params: { values: { plan: 'Enterprise' } } });
8
+ trigger.connectTo(lookup);
9
+ return new Workflow({ id: 'lookup-workflow', name: 'Lookup Workflow', steps: [trigger, lookup] });
10
+ }
11
+
12
+ function createAgent() {
13
+ return new MultiAgentEngine({
14
+ id: 'concierge-agent', name: 'Concierge Agent', role: 'primary',
15
+ description: 'Looks up and reviews account context.', systemPrompt: 'Use lookup_account before answering.', model: MODEL,
16
+ tools: { lookup_account: defineWorkflowTool({ name: 'lookup_account', description: 'Looks up account data.', workflowId: 'lookup-workflow' }) },
17
+ secondaryAgents: [],
18
+ });
19
+ }
20
+
21
+ function createParentWorkflow() {
22
+ const trigger = new Step({ id: 'trigger', name: 'Manual Trigger', type: 'manualTrigger' });
23
+ const prepare = new Step({
24
+ id: 'prepare', name: 'Prepare', type: 'core.set',
25
+ params: { values: { account: 'Acme', nested: { ids: ['={{ $system.execId }}', '={{ $json.account }}'] } } },
26
+ });
27
+ const agent = new Step({
28
+ id: 'agent', name: 'Concierge', type: 'core.agent',
29
+ params: { agentReferenceKey: 'concierge-agent', prompt: "Review {{ $('Prepare').json.account }}", autoCloseSession: true },
30
+ });
31
+ trigger.connectTo(prepare); prepare.connectTo(agent);
32
+ return new Workflow({ id: 'parent-workflow', name: 'Parent Workflow', steps: [trigger, prepare, agent] });
33
+ }
34
+
35
+ createLookupWorkflow();
36
+ createAgent();
37
+ createParentWorkflow();
@@ -0,0 +1,45 @@
1
+ import { Step, Surface, Workflow } from '@culvii/kit';
2
+
3
+ function createOutputSurface() {
4
+ return new Surface({
5
+ id: 'result-surface',
6
+ name: 'Result Surface',
7
+ slot: 'output',
8
+ definition: {
9
+ schema: 'kit.ui/v1',
10
+ root: 'outer',
11
+ components: [
12
+ { id: 'outer', type: 'Stack', children: ['card'] },
13
+ { id: 'card', type: 'Card', props: { title: 'Execution result' }, children: ['inner'] },
14
+ { id: 'inner', type: 'Stack', children: ['status', 'execution'] },
15
+ {
16
+ id: 'status',
17
+ type: 'StatusPill',
18
+ props: { status: { path: '/$output/Prepare/main/0/0/status' } },
19
+ },
20
+ {
21
+ id: 'execution',
22
+ type: 'Text',
23
+ props: { text: { path: '/$exec/id', default: 'pending' } },
24
+ },
25
+ ],
26
+ },
27
+ });
28
+ }
29
+
30
+ function createWorkflow() {
31
+ const prepare = new Step({
32
+ id: 'prepare',
33
+ name: 'Prepare',
34
+ type: 'core.set',
35
+ params: { values: { status: 'ready' } },
36
+ ui: { output: createOutputSurface() },
37
+ });
38
+ return new Workflow({
39
+ id: 'output-surface-workflow',
40
+ name: 'Output Surface Workflow',
41
+ steps: [prepare],
42
+ });
43
+ }
44
+
45
+ createWorkflow();
@@ -0,0 +1,24 @@
1
+ import { Step, Surface, Workflow } from '@culvii/kit';
2
+
3
+ function createWaitSurface() {
4
+ return new Surface({
5
+ id: 'approval-surface', name: 'Approval Surface', slot: 'wait',
6
+ definition: { schema: 'kit.ui/v1', root: 'form', components: [
7
+ { id: 'form', type: 'Form', props: { title: 'Review result' }, children: ['comment', 'approve'] },
8
+ { id: 'comment', type: 'TextArea', props: { label: 'Comment', bind: '/$form/comment' } },
9
+ { id: 'approve', type: 'Button', props: { label: 'Continue', variant: 'primary' }, actions: {
10
+ click: { type: 'node.resume', payload: { comment: { path: '/$form/comment', default: '' } } },
11
+ } },
12
+ ], form: { fields: [{ name: 'comment', label: 'Comment', type: 'textarea' }] } },
13
+ });
14
+ }
15
+
16
+ function createWorkflow() {
17
+ const review = new Step({
18
+ id: 'review', name: 'Review', type: 'core.set', params: { values: { status: 'pending' } },
19
+ ui: { wait: createWaitSurface() },
20
+ });
21
+ return new Workflow({ id: 'approval-workflow', name: 'Approval Workflow', steps: [review] });
22
+ }
23
+
24
+ createWorkflow();
@@ -0,0 +1,29 @@
1
+ # Agents
2
+
3
+ Create a root agent with `new MultiAgentEngine(primaryConfig)`. A primary agent requires `id`, `name`, `role: 'primary'`, `systemPrompt`, `model`, and `secondaryAgents`. Include a useful `description`. A secondary agent is defined inline with `role: 'secondary'`; secondary agents cannot contain further secondary agents.
4
+
5
+ Create models with `createAgentModelConfigFromRef('<provider>/<model>', '<credential-id>', options?)`. Supported built-in providers are `anthropic`, `openai`, `gemini`, `vertexai`, and `google-vertex`. A credential ID is required; never use an API key as the ID.
6
+
7
+ ```ts
8
+ const MODEL = createAgentModelConfigFromRef('anthropic/claude-sonnet-4-5', 'credential-uuid');
9
+ const agent = new MultiAgentEngine({
10
+ id: 'support-agent',
11
+ name: 'Support Agent',
12
+ role: 'primary',
13
+ description: 'Resolves support requests with a research specialist.',
14
+ systemPrompt: 'Solve the request and delegate research when useful.',
15
+ model: MODEL,
16
+ secondaryAgents: [{
17
+ id: 'researcher', name: 'Researcher', role: 'secondary',
18
+ description: 'Finds supporting evidence.', systemPrompt: 'Return concise evidence.', model: MODEL,
19
+ }],
20
+ });
21
+ ```
22
+
23
+ Built-in permissions live at `metadata.runtimeDetails.permissions`. Only keys in `BUILTIN_AGENT_PERMISSIONS` are valid: `*`, `web:fetch`, `web:crawl`, `workflow:binary:read`, `workflow:binary:write`, `workflow:pdf:read`, `workflow:docx:read`, `workflow:docx:write`, and `workflow:docx:append`. Workflow-prefixed capabilities are available only during a workflow execution.
24
+
25
+ Workflow tools belong in root `tools` and are created with `defineWorkflowTool({ name, description, workflowId, triggerNodeName?, inputSchema? })`. Omit `tools` when there are no tools. `workflowId` references a local workflow resource ID, not a display name.
26
+
27
+ Agent references flow in the other direction through a `core.agent` step's `params.agentReferenceKey`, which must exactly equal the `MultiAgentEngine` ID. Never use `agentId`.
28
+
29
+ Further reading: [Multi-Agent API](https://culvii.com/docs/sdk-reference/api-reference/multi-agent-api/) and [Authentication](https://culvii.com/docs/sdk-reference/guides/authentication/).
@@ -0,0 +1,21 @@
1
+ # Authoring files
2
+
3
+ Before writing code, inspect `package.json`, `culvii.yaml`, and every existing `*.culvii.ts` file. Preserve the project's module style and dependency versions.
4
+
5
+ Each evaluated `*.culvii.ts` file should import public APIs from `@culvii/kit`, construct resources inside named functions, and call those functions at the bottom. Do not export resources as a substitute for construction: dev discovery observes constructors through `DevRegistry`.
6
+
7
+ ```ts
8
+ import { MultiAgentEngine, Step, Surface, Workflow, createAgentModelConfigFromRef } from '@culvii/kit';
9
+
10
+ const MODEL = createAgentModelConfigFromRef('openai/gpt-4.1', 'CREDENTIAL_ID');
11
+
12
+ function createAgent() { return new MultiAgentEngine({ /* ... */ }); }
13
+ function createWorkflow() { return new Workflow({ /* ... */ }); }
14
+ function createSurface() { return new Surface({ /* ... */ }); }
15
+
16
+ createAgent();
17
+ createWorkflow();
18
+ createSurface();
19
+ ```
20
+
21
+ Use stable kebab-case resource IDs and unique step names. Credential IDs are references to credentials stored in Culvii; never place raw secrets in source.
@@ -0,0 +1,22 @@
1
+ # CLI development guide
2
+
3
+ Safe lifecycle:
4
+
5
+ 1. Inspect `package.json`, `culvii.yaml`, and existing `*.culvii.ts` files.
6
+ 2. Author resources using installed `@culvii/kit` types. For every new workflow, complete the pre-validation choices in [surface configuration and visual approval](surface-feedback.md), including attaching any custom candidate surfaces, before starting `culvii dev`.
7
+ 3. Run `culvii whoami --json` to check the stored login and active context.
8
+ 4. If the user is not authenticated, run `culvii login` as a tracked process. If command execution or opening the browser requires approval, request that approval and continue as soon as the user allows it. Keep the login process running while its local callback server opens the user's browser and waits for authentication. When login lists multiple tenants, present those exact tenants through the agent's native in-run question tool, then write the selected tenant number followed by Enter to the same login process. Never choose a tenant or end the run while login is awaiting input. The CLI uses its interactive selector in a real terminal and automatically falls back to a plain numbered prompt when raw terminal mode is unavailable. Ask the user to run login manually only after execution is denied or the environment actually fails to launch the browser, callback server, or writable input process. Prefer the same `culvii` executable that will run `culvii dev`; if it is not on PATH, resolve the project-local CLI without hard-coding a machine-specific absolute path.
9
+ 5. After a fresh login, keep the tenant selected during login and do not ask again. For an existing authenticated session whose tenant has not been confirmed for the task, run `culvii switch` to list contexts. If more than one is available, show those exact tenants through the native question tool and run `culvii switch <tenant-slug>` with the user's selection. Never choose a tenant for the user.
10
+ 6. Run `culvii whoami --json` again and verify that the authenticated identity and active tenant match the user's selection.
11
+ 7. Start `culvii dev` as a tracked long-running process and retain its exact process/session handle. If another dev session is already active, do not start or terminate anything; ask the user to close their existing session.
12
+ 8. Inspect the initial evaluation and sync output. If it reports evaluation, schema, surface, node, or cross-resource validation errors, fix the authored files and let the running watcher validate them again. Repeat until validation and draft sync succeed.
13
+ 9. For a requested workflow, complete the [workflow feedback cycle](feedback-cycle.md), including visual approval of custom surfaces, while this dev session remains active.
14
+ 10. In a cleanup step that runs after success, failure, cancellation, or a blocker, send Ctrl-C/SIGINT to the exact `culvii dev` process the agent started and wait for it to exit. Confirm the CLI disconnected and discarded the draft session. If graceful shutdown fails, terminate only that exact process and report that cleanup could not be confirmed. Never use a broad process kill.
15
+ 11. Do not present the resources as complete while validation or feedback errors remain or while the dev process is still running.
16
+ 12. Never run `culvii deploy`. Deployment is a separate user-operated action outside this skill.
17
+
18
+ `culvii dev` watches `*.culvii.ts`, evaluates resources, validates their combined reference graph, and syncs drafts. Removed resources become orphans for the session. Ending the session cleans up draft resources. Do not assume a successful TypeScript build proves cross-resource references are valid.
19
+
20
+ Use [cli-reference.md](cli-reference.md) for exact commands and flags generated from the registered Commander tree.
21
+
22
+ Further reading: [`culvii dev`](https://culvii.com/docs/cli/dev/) and [`culvii deploy`](https://culvii.com/docs/cli/deploy/).
@@ -0,0 +1,184 @@
1
+ # CLI reference
2
+
3
+ Generated from the registered Commander command tree. Disabled and unregistered commands are excluded.
4
+
5
+ ## `culvii`
6
+
7
+ Culvii CLI
8
+
9
+ Options:
10
+
11
+ - `--debug` — Enable debug logging to ~/.culvii/logs/cli.log
12
+ - `-V, --version` — output the version number
13
+
14
+ ## `culvii auth`
15
+
16
+ Authentication commands
17
+
18
+ ## `culvii auth login`
19
+
20
+ Login to Culvii
21
+
22
+ ## `culvii auth logout`
23
+
24
+ Logout of Culvii
25
+
26
+ ## `culvii deploy`
27
+
28
+ Deploy an agent
29
+
30
+ Options:
31
+
32
+ - `--env <env>` (required) — Environment (sandbox or prod)
33
+ - `--workspace-slug <slug>` — Target workspace slug (overrides config)
34
+
35
+ ## `culvii dev`
36
+
37
+ Start the development server and file watcher
38
+
39
+ ## `culvii env [environment]`
40
+
41
+ Show or switch the active environment (dev, sandbox, prod)
42
+
43
+ ## `culvii execution`
44
+
45
+ Inspect workflow executions
46
+
47
+ Options:
48
+
49
+ - `--env <env>` — Target environment (dev, sandbox, or prod)
50
+
51
+ ## `culvii execution get <execution-id>`
52
+
53
+ Get execution details, step outputs, and errors
54
+
55
+ Options:
56
+
57
+ - `--json` — Print machine-readable JSON
58
+
59
+ ## `culvii execution list`
60
+
61
+ List workspace executions
62
+
63
+ Options:
64
+
65
+ - `--json` — Print machine-readable JSON
66
+ - `--limit <limit>` — Results per page
67
+ - `--page <page>` — Page number
68
+ - `--status <status>` — Filter by execution status
69
+ - `--trigger <trigger>` — Filter by trigger type
70
+ - `--workflow <workflow>` — Filter by workflow reference key or ID
71
+
72
+ ## `culvii init [project-name]`
73
+
74
+ Scaffold a new Culvii project with working agent and workflow files
75
+
76
+ Options:
77
+
78
+ - `--here` — Scaffold into the current directory instead of a named subdirectory
79
+ - `--provider <provider>` — Model provider: openai | anthropic | gemini | google-vertex
80
+ - `--template <template>` — Template: agent-only | agent-workflow | agent-workflow-tool | multi-agent
81
+ - `-y, --yes` — Accept all defaults non-interactively
82
+
83
+ ## `culvii integration`
84
+
85
+ List and manage Culvii integrations
86
+
87
+ Options:
88
+
89
+ - `--env <env>` — Target environment (dev, sandbox, or prod)
90
+
91
+ ## `culvii integration list`
92
+
93
+ List available integration credentials and their scopes
94
+
95
+ Options:
96
+
97
+ - `--json` — Print machine-readable JSON
98
+
99
+ ## `culvii login`
100
+
101
+ Login to Culvii
102
+
103
+ ## `culvii logout`
104
+
105
+ Logout of Culvii
106
+
107
+ ## `culvii rename <old-slug> <new-slug>`
108
+
109
+ Rename a resource
110
+
111
+ Options:
112
+
113
+ - `--env <env>` — Target environment (sandbox or prod)
114
+ - `--resource-type <type>` (required) — Type of resource (agent)
115
+ - `--workspace-slug <slug>` — Target workspace slug (overrides config)
116
+
117
+ ## `culvii skill`
118
+
119
+ Manage AI agent skills
120
+
121
+ ## `culvii skill install`
122
+
123
+ Install the Culvii authoring skill bundle for AI agents
124
+
125
+ Options:
126
+
127
+ - `--agent <agent>` — Specify agent (claude|cursor|windsurf|github|opencode|gemini|kiro|codex|agents)
128
+ - `--force` — Replace an existing unmanaged Culvii skill directory
129
+ - `--global` — Install globally instead of in the current project
130
+
131
+ ## `culvii switch [tenant-slug]`
132
+
133
+ Switch the active tenant context
134
+
135
+ ## `culvii whoami`
136
+
137
+ Show current authenticated user context
138
+
139
+ Options:
140
+
141
+ - `--json` — Output as JSON
142
+
143
+ ## `culvii workflow`
144
+
145
+ Workflow execution commands
146
+
147
+ Options:
148
+
149
+ - `--env <env>` — Target environment (dev, sandbox, or prod)
150
+
151
+ ## `culvii workflow run <workflow>`
152
+
153
+ Start a workflow execution
154
+
155
+ Options:
156
+
157
+ - `--json` — Print machine-readable JSON
158
+ - `--mocks-file <path>` — JSON object mapping node IDs to mock outputs
159
+ - `--payload <json>` — Trigger payload as JSON
160
+ - `--payload-file <path>` — Read trigger payload from a JSON file
161
+ - `--trigger <node-name>` (required) — Trigger node name
162
+
163
+ ## `culvii workspace`
164
+
165
+ Workspace commands
166
+
167
+ Options:
168
+
169
+ - `--env <env>` — Target environment (sandbox or prod)
170
+
171
+ ## `culvii workspace create`
172
+
173
+ Create a new workspace
174
+
175
+ Options:
176
+
177
+ - `--name <name>` (required) — Workspace name
178
+ - `--slug <slug>` (required) — Workspace slug
179
+
180
+ ## `culvii workspace list`
181
+
182
+ List workspaces
183
+
184
+ Further reading: [`culvii dev`](https://culvii.com/docs/cli/dev/) and [`culvii deploy`](https://culvii.com/docs/cli/deploy/).
@@ -0,0 +1,43 @@
1
+ # Workflow feedback cycle
2
+
3
+ Use this only after `culvii dev` has validated and synced the requested draft resources.
4
+
5
+ 1. Keep the tracked `culvii dev` process running.
6
+ 2. Execute feedback only through a `manualTrigger`. If the selected authored trigger is cron, webhook, or polling, first snapshot its exact type, params, credentials, and other trigger-specific fields. Temporarily change that same step to `manualTrigger` while preserving its `id`, `name`, connections, and attached surfaces; remove incompatible trigger-only fields until restoration. Let the active `culvii dev` watcher validate and sync the temporary graph before continuing.
7
+ 3. Create a JSON payload matching the real runtime trigger's expected output shape. This representative payload becomes the mocked manual-trigger output automatically and supplies both downstream workflow data and surface preview data. Never mock or invoke the cron, webhook, or polling implementation itself.
8
+ 4. For every node reachable from the manual trigger whose generated node reference says `Feedback mock: required`, create a mock output keyed by the node's authored `id`. Do not include cron, webhook, or polling triggers in the mock file. Do not mock `core.agent`; agents must execute through their workflow node.
9
+ 5. Start the draft workflow with `culvii workflow run <workflow-reference-key> --trigger <manual-node-name> --payload-file <path> --mocks-file <path> --json`.
10
+ 6. Fetch `culvii execution get <execution-id> --json` until its status is `success` or `failed`. This status polling is not a workflow wait and must not resume paused nodes.
11
+ 7. On failure, inspect the execution error and the failing step's input/output ports. Fix the authored resource or mock fixture, allow `culvii dev` to resync, and rerun. Stop after three failed attempts and report the remaining error unless the user asks to continue.
12
+ 8. On success, inspect the final and intermediate step outputs for the requested behavior. If the workflow has custom candidate surfaces, use these outputs to complete their [visual approval loop](surface-feedback.md#visual-approval-loop). Return to the development lifecycle only after all surface decisions are resolved; keep `culvii dev` running until then.
13
+ 9. In success, failure, cancellation, and blocker cleanup, restore the temporarily converted trigger exactly from the snapshot. Wait for `culvii dev` to validate and sync the restored authored graph before stopping the dev process. Do not modify an originally authored manual trigger.
14
+
15
+ The platform applies these execution-only overrides; the agent must not write them into the authored files:
16
+
17
+ - Every node receives `pauseAfterExecution: false`.
18
+ - `core.agent` receives `autoCloseSession: true`.
19
+ - Agents outside the workflow are not executed.
20
+ - Surfaces do not control execution progress. Their visual approval uses sanitized execution output but does not change workflow execution.
21
+
22
+ ## Mock file
23
+
24
+ The file is a JSON object keyed by workflow node ID. An object produces one output item; an array produces multiple items on the first output. Use `batches` only when a node needs multiple output indexes.
25
+
26
+ ```json
27
+ {
28
+ "gmail-send": { "id": "mock-message-1", "threadId": "mock-thread-1" },
29
+ "outlook-read": [
30
+ { "id": "mail-1", "subject": "Urgent request", "from": "person@example.com" }
31
+ ],
32
+ "multi-output-node": {
33
+ "batches": [
34
+ [{ "matched": true }],
35
+ [{ "matched": false }]
36
+ ]
37
+ }
38
+ }
39
+ ```
40
+
41
+ In mock mode, the trigger payload becomes the selected manual trigger's output. Feedback execution rejects non-manual triggers. A node marked as requiring a feedback mock fails safely when its mock is missing instead of executing. Nodes not marked this way, including core workflow logic and workflow-contained agents, execute normally.
42
+
43
+ Use `culvii execution list --workflow <workflow> --page <n> --limit <n> --json` to find earlier runs. Use [cli-reference.md](cli-reference.md) for the current generated flags.
@@ -0,0 +1,13 @@
1
+ # Integration selection
2
+
3
+ Use this flow whenever an agent model or workflow node requires a Culvii credential ID.
4
+
5
+ 1. After authentication and tenant selection, run `culvii integration list --json` in the user's project.
6
+ 2. Use only a connected integration whose provider, platform scope, and OAuth scopes cover the requested operation. The command returns each usable `credentialId` and the active tenant/environment's `addUrl`.
7
+ 3. If exactly one integration matches, use its `credentialId` directly in the authored resource without asking the user to copy it.
8
+ 4. If several match, ask one in-run selectable question. Label each option with its integration name, provider, and scope; retain the option-to-`credentialId` mapping internally.
9
+ 5. If none match, show the exact `addUrl` returned by the command on its own line as `🟨 **Integration URL:** \`<addUrl>\`` and ask the user to add or connect the integration. The yellow marker is portable; do not emit raw ANSI color codes because structured question dialogs control their own text colors. Keep the current agent run open. After the user confirms completion, rerun `culvii integration list --json` and continue from its real output.
10
+
11
+ Never ask the user to find, copy, or paste a credential ID. Never invent one. A tenant-scoped integration applies tenant-wide; an environment-scoped integration applies only to its environment; a workspace-scoped integration applies only to the listed workspace IDs. Treat `connected: false` or insufficient OAuth scopes as unusable and explain what must be connected or authorized at the displayed URL.
12
+
13
+ Users can run `culvii integration list` themselves for a readable table or add `--json` for machine-readable output. See [the generated CLI reference](cli-reference.md) for current flags.