@culvii/cli 0.0.6 → 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 (63) hide show
  1. package/COMMANDS.md +1 -1
  2. package/USAGE.md +4 -3
  3. package/dist/{DeployView-I4Y55LV4.js → DeployView-D4UEXMDJ.js} +1 -1
  4. package/dist/{HelpView-ZMOAJNYC.js → HelpView-E7HS4SVF.js} +1 -1
  5. package/dist/{WhoamiView-VHDXFFLX.js → WhoamiView-TKSYSHQ2.js} +1 -1
  6. package/dist/{WorkspaceView-RNFALIPM.js → WorkspaceView-ID7ZMBHV.js} +1 -1
  7. package/dist/chunk-IPETC2TK.js +3 -0
  8. package/dist/index.js +27 -676
  9. package/dist/lib/evaluator.js +2 -2
  10. package/dist/login-OGOHEHFE.js +39 -0
  11. package/dist/{logout-VOWHM2QB.js → logout-BRUJBFUK.js} +1 -1
  12. package/dist/skill-bundle-7KYK5GBL.js +1377 -0
  13. package/package.json +9 -5
  14. package/skills/culvii/.culvii-skill.json +59 -0
  15. package/skills/culvii/SKILL.md +73 -0
  16. package/skills/culvii/agents/openai.yaml +4 -0
  17. package/skills/culvii/examples/agent-workflow.culvii.ts +24 -0
  18. package/skills/culvii/examples/complete-workflow.culvii.ts +37 -0
  19. package/skills/culvii/examples/output-surface.culvii.ts +45 -0
  20. package/skills/culvii/examples/wait-surface.culvii.ts +24 -0
  21. package/skills/culvii/references/agents.md +29 -0
  22. package/skills/culvii/references/authoring-files.md +21 -0
  23. package/skills/culvii/references/cli-guide.md +22 -0
  24. package/skills/culvii/references/cli-reference.md +184 -0
  25. package/skills/culvii/references/feedback-cycle.md +43 -0
  26. package/skills/culvii/references/integrations.md +13 -0
  27. package/skills/culvii/references/kit-api.md +35 -0
  28. package/skills/culvii/references/node-core-agent.md +27 -0
  29. package/skills/culvii/references/node-core-browser-automation.md +53 -0
  30. package/skills/culvii/references/node-core-code.md +28 -0
  31. package/skills/culvii/references/node-core-http.md +42 -0
  32. package/skills/culvii/references/node-core-if.md +26 -0
  33. package/skills/culvii/references/node-core-jwt.md +31 -0
  34. package/skills/culvii/references/node-core-set.md +24 -0
  35. package/skills/culvii/references/node-cron-trigger.md +25 -0
  36. package/skills/culvii/references/node-elasticsearch.md +39 -0
  37. package/skills/culvii/references/node-gmail-trigger.md +44 -0
  38. package/skills/culvii/references/node-gmail.md +57 -0
  39. package/skills/culvii/references/node-google-calendar.md +51 -0
  40. package/skills/culvii/references/node-google-docs.md +46 -0
  41. package/skills/culvii/references/node-manual-trigger.md +24 -0
  42. package/skills/culvii/references/node-microsoft-outlook-trigger.md +41 -0
  43. package/skills/culvii/references/node-microsoft-outlook.md +55 -0
  44. package/skills/culvii/references/node-microsoft-sharepoint.md +40 -0
  45. package/skills/culvii/references/node-s3.md +40 -0
  46. package/skills/culvii/references/node-slack-trigger.md +40 -0
  47. package/skills/culvii/references/node-slack.md +38 -0
  48. package/skills/culvii/references/node-twilio.md +39 -0
  49. package/skills/culvii/references/node-wait-timer.md +24 -0
  50. package/skills/culvii/references/node-webhook-trigger.md +24 -0
  51. package/skills/culvii/references/nodes-index.md +27 -0
  52. package/skills/culvii/references/runtime-values.md +36 -0
  53. package/skills/culvii/references/surface-authoring.md +27 -0
  54. package/skills/culvii/references/surface-display.md +390 -0
  55. package/skills/culvii/references/surface-feedback.md +41 -0
  56. package/skills/culvii/references/surface-input-actions.md +143 -0
  57. package/skills/culvii/references/surface-layout.md +97 -0
  58. package/skills/culvii/references/validation.md +18 -0
  59. package/skills/culvii/references/workflows.md +30 -0
  60. package/dist/chunk-LD5ISISS.js +0 -3
  61. package/dist/login-4VBBCK4V.js +0 -36
  62. /package/dist/{chunk-5NBKYMD7.js → chunk-56C3DFV2.js} +0 -0
  63. /package/dist/{chunk-JFIFRAAR.js → chunk-RS5GDTRN.js} +0 -0
package/COMMANDS.md CHANGED
@@ -38,7 +38,7 @@ All commands can be run as `culvii <command>` or `node dist/index.js <command>`.
38
38
 
39
39
  | Command | Flags | Description |
40
40
  |---------|-------|-------------|
41
- | `culvii skill install` | `[--agent <claude\|cursor\|windsurf\|github\|opencode\|gemini\|kiro\|codex\|agents>] [--global]` | Install the Culvii SDK skill file for your AI coding agent. Auto-detects which agents are present. `--global` installs to your home directory instead of the current project. Does not require auth. |
41
+ | `culvii skill install` | `[--agent <claude\|cursor\|windsurf\|github\|opencode\|gemini\|kiro\|codex\|agents>] [--global] [--force]` | Install the complete Culvii skill bundle for your AI coding agent. Auto-detects agent directories; `--force` replaces an unmanaged existing Culvii skill directory. Does not require auth or network access. |
42
42
 
43
43
  ---
44
44
 
package/USAGE.md CHANGED
@@ -188,18 +188,19 @@ culvii dev
188
188
  ## AI Agent Skills
189
189
 
190
190
  ```bash
191
- culvii skill install [--agent <name>] [--global]
191
+ culvii skill install [--agent <name>] [--global] [--force]
192
192
  ```
193
- Installs the Culvii SDK skill file for your AI coding agent (Claude Code, Cursor, Windsurf, opencode, Gemini CLI, Kiro, GitHub Copilot, Codex CLI). The skill teaches the agent how to write correct Culvii code using @culvii/kit.
193
+ Installs the complete offline Culvii skill bundle for your AI coding agent (Claude Code, Cursor, Windsurf, OpenCode, Gemini CLI, Kiro, GitHub Copilot, Codex CLI). Upgrade `@culvii/cli` and rerun this command to install a newer managed bundle.
194
194
  Does not require authentication.
195
195
 
196
- Auto-detects which agents are present in your project by checking for their config directories. Always also installs a universal fallback at `.agents/skills/culvii/SKILL.md`.
196
+ Auto-detects which agents are present in your project by checking for their config directories. Always also installs the portable/Codex bundle at `.agents/skills/culvii`.
197
197
 
198
198
  **Supported agents:** `claude`, `cursor`, `windsurf`, `github`, `opencode`, `gemini`, `kiro`, `codex`, `agents`
199
199
 
200
200
  **Flags:**
201
201
  - `--agent <name>` — target a specific agent instead of auto-detecting
202
202
  - `--global` — install to your home directory instead of the current project
203
+ - `--force` — replace an existing unmanaged `culvii` skill directory
203
204
 
204
205
  **Example:**
205
206
  ```bash
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import {a as a$4}from'./chunk-5NBKYMD7.js';import {a}from'./chunk-R67TA4FU.js';import {a as a$3}from'./chunk-FQVHJUX4.js';import {a as a$1}from'./chunk-JYNOILCD.js';import'./chunk-57XLDHK6.js';import {o,l,c,a as a$2,e,w}from'./chunk-YKFGEPLO.js';import'./chunk-YPLDPHHD.js';import'./chunk-7UWDMECF.js';import {useEffect}from'react';import {useApp,useInput,Box,Text}from'ink';import {jsxs,jsx}from'react/jsx-runtime';function I(e){let c=e.versionCount??1,p=e.activeVersion??e.previousVersion;return `Deletes all ${c} ${c===1?"version":"versions"}${p?`; active is v${p}`:""}.`}function D(e){if(e.type==="surface"){let d=e.activeVersion??e.previousVersion;return d?`active v${d}`:"active"}let c=e.executions??0,p=e.activeExecutions??0,o=e.activeVersion??e.previousVersion;return `${c} total, active${o?` v${o}`:""}: ${p} executions`}function A({state:e$1,onConfirm:c$1}){let{exit:p}=useApp();return useEffect(()=>{if(e$1.type==="success"||e$1.type==="no_changes"||e$1.type==="aborted"||e$1.type==="error"){let o=setTimeout(()=>p(),100);return ()=>clearTimeout(o)}},[e$1.type,p]),useInput((o,d)=>{e$1.type==="confirming"&&(o.toLowerCase()==="y"?c$1?.(true):(o.toLowerCase()==="n"||d.escape)&&c$1?.(false));}),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"deploy"}),e$1.type==="planning"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Planning deploy\u2026"})}),e$1.type==="confirming"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,gap:1,children:[jsxs(Box,{flexDirection:"column",children:[jsxs(Text,{color:o,children:["Plan for ",jsx(Text,{color:l,bold:true,children:e$1.env}),":"]}),jsxs(Box,{flexDirection:"column",marginTop:1,children:[e$1.plan.created.map(o$1=>jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:c,children:"+"}),jsx(Text,{color:l,children:o$1.slug}),jsx(Text,{color:o,children:"CREATED"})]},o$1.slug)),e$1.plan.versioned.map(o$1=>jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:a$2,children:"~"}),jsx(Text,{color:l,children:o$1.slug}),jsxs(Text,{color:o,children:["VERSIONED (",D(o$1),")"]})]},o$1.slug)),e$1.plan.destroyed.map(o$1=>jsxs(Box,{flexDirection:"column",children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:e,children:"-"}),jsx(Text,{color:l,children:o$1.slug}),jsxs(Text,{color:o,children:["DELETE (",D(o$1),")"]})]}),jsx(Box,{paddingLeft:2,children:jsx(Text,{color:e,children:I(o$1)})})]},o$1.slug))]})]}),jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:o,children:"Deploy to "}),jsx(Text,{color:l,bold:true,children:e$1.env}),jsx(Text,{color:o,children:"?"}),jsx(Text,{color:a$2,bold:true,children:"[y/N]"})]})]}),e$1.type==="applying"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Applying\u2026"})}),e$1.type==="no_changes"&&jsx(Box,{paddingLeft:2,children:jsx(a$3.Dim,{children:"Nothing to deploy. All resources are up to date."})}),e$1.type==="aborted"&&e$1.reason==="user_cancelled"&&jsx(Box,{paddingLeft:2,children:jsx(a$3.Dim,{children:"Deployment cancelled."})}),e$1.type==="error"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,children:[jsx(a$3.Err,{children:e$1.message}),e$1.detail&&jsx(a$3.Dim,{children:e$1.detail})]}),e$1.type==="success"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,gap:1,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:c,children:w}),jsxs(Text,{color:l,bold:true,children:["Deployed to ",e$1.env]})]}),jsx(a$4,{variant:"ok",content:[{k:"created",v:jsxs(Text,{color:l,children:[e$1.created," resource(s)"]})},{k:"versioned",v:jsxs(Text,{color:l,children:[e$1.versioned," resource(s)"]})},{k:"destroyed",v:jsxs(Text,{color:l,children:[e$1.destroyed," resource(s)"]})}]}),jsxs(Box,{flexDirection:"column",children:[(e$1.createdItems||[]).map(o=>jsxs(Text,{color:c,children:["+ ",o.slug]},`created-${o.slug}`)),(e$1.versionedItems||[]).map(o=>jsxs(Text,{color:a$2,children:["~ ",o.slug]},`versioned-${o.slug}`)),(e$1.destroyedItems||[]).map(o=>jsxs(Text,{color:e,children:["- ",o.slug]},`destroyed-${o.slug}`))]})]})]})}export{A as DeployView};
2
+ import {a as a$4}from'./chunk-56C3DFV2.js';import {a}from'./chunk-R67TA4FU.js';import {a as a$3}from'./chunk-FQVHJUX4.js';import {a as a$1}from'./chunk-JYNOILCD.js';import'./chunk-57XLDHK6.js';import {o,l,c,a as a$2,e,w}from'./chunk-YKFGEPLO.js';import'./chunk-YPLDPHHD.js';import'./chunk-7UWDMECF.js';import {useEffect}from'react';import {useApp,useInput,Box,Text}from'ink';import {jsxs,jsx}from'react/jsx-runtime';function I(e){let c=e.versionCount??1,p=e.activeVersion??e.previousVersion;return `Deletes all ${c} ${c===1?"version":"versions"}${p?`; active is v${p}`:""}.`}function D(e){if(e.type==="surface"){let d=e.activeVersion??e.previousVersion;return d?`active v${d}`:"active"}let c=e.executions??0,p=e.activeExecutions??0,o=e.activeVersion??e.previousVersion;return `${c} total, active${o?` v${o}`:""}: ${p} executions`}function A({state:e$1,onConfirm:c$1}){let{exit:p}=useApp();return useEffect(()=>{if(e$1.type==="success"||e$1.type==="no_changes"||e$1.type==="aborted"||e$1.type==="error"){let o=setTimeout(()=>p(),100);return ()=>clearTimeout(o)}},[e$1.type,p]),useInput((o,d)=>{e$1.type==="confirming"&&(o.toLowerCase()==="y"?c$1?.(true):(o.toLowerCase()==="n"||d.escape)&&c$1?.(false));}),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"deploy"}),e$1.type==="planning"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Planning deploy\u2026"})}),e$1.type==="confirming"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,gap:1,children:[jsxs(Box,{flexDirection:"column",children:[jsxs(Text,{color:o,children:["Plan for ",jsx(Text,{color:l,bold:true,children:e$1.env}),":"]}),jsxs(Box,{flexDirection:"column",marginTop:1,children:[e$1.plan.created.map(o$1=>jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:c,children:"+"}),jsx(Text,{color:l,children:o$1.slug}),jsx(Text,{color:o,children:"CREATED"})]},o$1.slug)),e$1.plan.versioned.map(o$1=>jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:a$2,children:"~"}),jsx(Text,{color:l,children:o$1.slug}),jsxs(Text,{color:o,children:["VERSIONED (",D(o$1),")"]})]},o$1.slug)),e$1.plan.destroyed.map(o$1=>jsxs(Box,{flexDirection:"column",children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:e,children:"-"}),jsx(Text,{color:l,children:o$1.slug}),jsxs(Text,{color:o,children:["DELETE (",D(o$1),")"]})]}),jsx(Box,{paddingLeft:2,children:jsx(Text,{color:e,children:I(o$1)})})]},o$1.slug))]})]}),jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:o,children:"Deploy to "}),jsx(Text,{color:l,bold:true,children:e$1.env}),jsx(Text,{color:o,children:"?"}),jsx(Text,{color:a$2,bold:true,children:"[y/N]"})]})]}),e$1.type==="applying"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Applying\u2026"})}),e$1.type==="no_changes"&&jsx(Box,{paddingLeft:2,children:jsx(a$3.Dim,{children:"Nothing to deploy. All resources are up to date."})}),e$1.type==="aborted"&&e$1.reason==="user_cancelled"&&jsx(Box,{paddingLeft:2,children:jsx(a$3.Dim,{children:"Deployment cancelled."})}),e$1.type==="error"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,children:[jsx(a$3.Err,{children:e$1.message}),e$1.detail&&jsx(a$3.Dim,{children:e$1.detail})]}),e$1.type==="success"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,gap:1,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:c,children:w}),jsxs(Text,{color:l,bold:true,children:["Deployed to ",e$1.env]})]}),jsx(a$4,{variant:"ok",content:[{k:"created",v:jsxs(Text,{color:l,children:[e$1.created," resource(s)"]})},{k:"versioned",v:jsxs(Text,{color:l,children:[e$1.versioned," resource(s)"]})},{k:"destroyed",v:jsxs(Text,{color:l,children:[e$1.destroyed," resource(s)"]})}]}),jsxs(Box,{flexDirection:"column",children:[(e$1.createdItems||[]).map(o=>jsxs(Text,{color:c,children:["+ ",o.slug]},`created-${o.slug}`)),(e$1.versionedItems||[]).map(o=>jsxs(Text,{color:a$2,children:["~ ",o.slug]},`versioned-${o.slug}`)),(e$1.destroyedItems||[]).map(o=>jsxs(Text,{color:e,children:["- ",o.slug]},`destroyed-${o.slug}`))]})]})]})}export{A as DeployView};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import {p as p$1}from'./chunk-LD5ISISS.js';import'./chunk-HX54IFSD.js';import {a}from'./chunk-FQVHJUX4.js';import {q,r as r$1}from'./chunk-YKFGEPLO.js';import'./chunk-YPLDPHHD.js';import'./chunk-7UWDMECF.js';import {useEffect}from'react';import {useApp,Box,Text}from'ink';import {jsxs,jsx}from'react/jsx-runtime';function p({children:i}){return jsx(Text,{color:q,children:i})}function s({children:i}){return jsx(Text,{color:r$1,children:i})}var r={Flag:p,Arg:s};function P(){let{exit:i}=useApp();return useEffect(()=>{i();},[i]),jsxs(Box,{flexDirection:"column",children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(a.OutStrong,{children:"culvii"}),jsx(a.Dim,{children:"\u2014 the operating system for governed agents"})]}),jsxs(a.Dim,{children:["0.0.6"," \xB7 https://culvii.dev"]}),jsx(a.Sep,{}),jsxs(Box,{paddingBottom:1,children:[jsx(a.OutStrong,{children:"USAGE"}),jsxs(a.Out,{children:[" culvii ","<command>"," [subcommand] [flags]"]})]}),jsxs(Box,{paddingBottom:1,flexDirection:"column",children:[jsx(a.OutStrong,{children:"CORE COMMANDS"}),jsxs(Box,{flexDirection:"column",children:[jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:15,children:jsx(Text,{children:jsx(r.Flag,{children:" auth"})})}),jsx(a.Out,{children:"login, rotate keys, inspect identity"})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:15,children:jsx(Text,{children:jsx(r.Flag,{children:" init"})})}),jsx(a.Out,{children:"scaffold a new agent from a template"})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:15,children:jsx(Text,{children:jsx(r.Flag,{children:" deploy"})})}),jsx(a.Out,{children:"push an agent to an environment"})]})]})]}),jsxs(Box,{paddingBottom:1,flexDirection:"column",children:[jsx(a.OutStrong,{children:"FLAGS"}),jsxs(Box,{flexDirection:"column",children:[jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:26,children:jsxs(Text,{children:[jsx(r.Flag,{children:" --env "}),jsx(r.Arg,{children:"<name>"})]})}),jsxs(a.Out,{children:["target environment (default: ",p$1,")"]})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:26,children:jsx(Text,{children:jsx(r.Flag,{children:" --json"})})}),jsx(a.Out,{children:"machine-readable output"})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:26,children:jsx(Text,{children:jsx(r.Flag,{children:" --no-color"})})}),jsx(a.Out,{children:"disable ANSI colors"})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:26,children:jsx(Text,{children:jsx(r.Flag,{children:" -h, --help"})})}),jsx(a.Out,{children:"help for any command"})]})]})]}),jsxs(a.Dim,{children:["Run `culvii ","<command>"," --help` for more. Everything here respects your policy bundle."]})]})}
2
+ import {p as p$1}from'./chunk-IPETC2TK.js';import'./chunk-HX54IFSD.js';import {a}from'./chunk-FQVHJUX4.js';import {q,r as r$1}from'./chunk-YKFGEPLO.js';import'./chunk-YPLDPHHD.js';import'./chunk-7UWDMECF.js';import {useEffect}from'react';import {useApp,Box,Text}from'ink';import {jsxs,jsx}from'react/jsx-runtime';function p({children:i}){return jsx(Text,{color:q,children:i})}function s({children:i}){return jsx(Text,{color:r$1,children:i})}var r={Flag:p,Arg:s};function P(){let{exit:i}=useApp();return useEffect(()=>{i();},[i]),jsxs(Box,{flexDirection:"column",children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(a.OutStrong,{children:"culvii"}),jsx(a.Dim,{children:"\u2014 the operating system for governed agents"})]}),jsxs(a.Dim,{children:["0.0.8"," \xB7 https://culvii.dev"]}),jsx(a.Sep,{}),jsxs(Box,{paddingBottom:1,children:[jsx(a.OutStrong,{children:"USAGE"}),jsxs(a.Out,{children:[" culvii ","<command>"," [subcommand] [flags]"]})]}),jsxs(Box,{paddingBottom:1,flexDirection:"column",children:[jsx(a.OutStrong,{children:"CORE COMMANDS"}),jsxs(Box,{flexDirection:"column",children:[jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:15,children:jsx(Text,{children:jsx(r.Flag,{children:" auth"})})}),jsx(a.Out,{children:"login, rotate keys, inspect identity"})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:15,children:jsx(Text,{children:jsx(r.Flag,{children:" init"})})}),jsx(a.Out,{children:"scaffold a new agent from a template"})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:15,children:jsx(Text,{children:jsx(r.Flag,{children:" deploy"})})}),jsx(a.Out,{children:"push an agent to an environment"})]})]})]}),jsxs(Box,{paddingBottom:1,flexDirection:"column",children:[jsx(a.OutStrong,{children:"FLAGS"}),jsxs(Box,{flexDirection:"column",children:[jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:26,children:jsxs(Text,{children:[jsx(r.Flag,{children:" --env "}),jsx(r.Arg,{children:"<name>"})]})}),jsxs(a.Out,{children:["target environment (default: ",p$1,")"]})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:26,children:jsx(Text,{children:jsx(r.Flag,{children:" --json"})})}),jsx(a.Out,{children:"machine-readable output"})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:26,children:jsx(Text,{children:jsx(r.Flag,{children:" --no-color"})})}),jsx(a.Out,{children:"disable ANSI colors"})]}),jsxs(Box,{flexDirection:"row",children:[jsx(Box,{width:26,children:jsx(Text,{children:jsx(r.Flag,{children:" -h, --help"})})}),jsx(a.Out,{children:"help for any command"})]})]})]}),jsxs(a.Dim,{children:["Run `culvii ","<command>"," --help` for more. Everything here respects your policy bundle."]})]})}
3
3
  export{P as HelpView};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import {a as a$3}from'./chunk-5NBKYMD7.js';import {a}from'./chunk-R67TA4FU.js';import {a as a$2}from'./chunk-FQVHJUX4.js';import {a as a$1}from'./chunk-JYNOILCD.js';import'./chunk-57XLDHK6.js';import {x,e,l,w,c,o}from'./chunk-YKFGEPLO.js';import'./chunk-YPLDPHHD.js';import'./chunk-7UWDMECF.js';import {useEffect}from'react';import {useApp,Box,Text}from'ink';import {jsxs,jsx}from'react/jsx-runtime';function R({state:e$1}){let{exit:a$4}=useApp();return useEffect(()=>{if(e$1.type!=="loading"){let m=setTimeout(()=>a$4(),100);return ()=>clearTimeout(m)}},[e$1.type,a$4]),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"whoami"}),e$1.type==="loading"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Fetching identity\u2026"})}),e$1.type==="error"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:e,children:x}),jsx(Text,{color:l,children:e$1.message})]}),e$1.detail&&jsx(Box,{paddingLeft:2,children:jsx(a$2.Dim,{children:e$1.detail})})]}),e$1.type==="success"&&jsxs(Box,{flexDirection:"column",gap:1,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:c,children:w}),jsx(Text,{color:l,children:e$1.email})]}),jsx(a$3,{variant:"default",compact:true,content:[{k:"tenant",v:jsxs(Text,{color:l,children:[e$1.tenantName," ",jsxs(Text,{color:o,children:["(",e$1.tenant,")"]})]})},{k:"workspace",v:jsx(Text,{color:l,children:e$1.workspace||jsx(Text,{color:o,children:"none"})})},{k:"access",v:e$1.access.length>0?jsx(Box,{flexDirection:"column",children:e$1.access.map((m,T)=>jsx(Text,{color:l,children:m},T))}):jsx(Text,{color:o,children:"none"})}]})]})]})}export{R as WhoamiView};
2
+ import {a as a$3}from'./chunk-56C3DFV2.js';import {a}from'./chunk-R67TA4FU.js';import {a as a$2}from'./chunk-FQVHJUX4.js';import {a as a$1}from'./chunk-JYNOILCD.js';import'./chunk-57XLDHK6.js';import {x,e,l,w,c,o}from'./chunk-YKFGEPLO.js';import'./chunk-YPLDPHHD.js';import'./chunk-7UWDMECF.js';import {useEffect}from'react';import {useApp,Box,Text}from'ink';import {jsxs,jsx}from'react/jsx-runtime';function R({state:e$1}){let{exit:a$4}=useApp();return useEffect(()=>{if(e$1.type!=="loading"){let m=setTimeout(()=>a$4(),100);return ()=>clearTimeout(m)}},[e$1.type,a$4]),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"whoami"}),e$1.type==="loading"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Fetching identity\u2026"})}),e$1.type==="error"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:e,children:x}),jsx(Text,{color:l,children:e$1.message})]}),e$1.detail&&jsx(Box,{paddingLeft:2,children:jsx(a$2.Dim,{children:e$1.detail})})]}),e$1.type==="success"&&jsxs(Box,{flexDirection:"column",gap:1,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:c,children:w}),jsx(Text,{color:l,children:e$1.email})]}),jsx(a$3,{variant:"default",compact:true,content:[{k:"tenant",v:jsxs(Text,{color:l,children:[e$1.tenantName," ",jsxs(Text,{color:o,children:["(",e$1.tenant,")"]})]})},{k:"workspace",v:jsx(Text,{color:l,children:e$1.workspace||jsx(Text,{color:o,children:"none"})})},{k:"access",v:e$1.access.length>0?jsx(Box,{flexDirection:"column",children:e$1.access.map((m,T)=>jsx(Text,{color:l,children:m},T))}):jsx(Text,{color:o,children:"none"})}]})]})]})}export{R as WhoamiView};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import {a as a$3}from'./chunk-5NBKYMD7.js';import {a}from'./chunk-R67TA4FU.js';import {a as a$2}from'./chunk-FQVHJUX4.js';import {a as a$1}from'./chunk-JYNOILCD.js';import {a as a$4}from'./chunk-57XLDHK6.js';import {w,l,p,n,m}from'./chunk-YKFGEPLO.js';import'./chunk-YPLDPHHD.js';import'./chunk-7UWDMECF.js';import {useEffect}from'react';import {useApp,Box,Text}from'ink';import {jsxs,jsx}from'react/jsx-runtime';function B({columns:e,data:n$1,rowAccent:l$1}){return jsxs(Box,{flexDirection:"column",marginY:1,children:[jsx(Box,{flexDirection:"row",borderBottom:true,borderStyle:"single",borderTop:false,borderLeft:false,borderRight:false,borderColor:p,paddingBottom:0,marginBottom:0,children:e.map((i,c)=>jsx(Box,{width:i.width,flexBasis:i.width?void 0:i.flex||1,flexGrow:i.width?0:i.flex||1,flexShrink:i.width?0:1,paddingRight:c<e.length-1?2:0,justifyContent:i.align==="right"?"flex-end":i.align==="center"?"center":"flex-start",children:jsx(a$4,{color:n,bold:true,children:i.label})},String(i.key)))}),n$1.map((i,c)=>{let C=(l$1?l$1(i,c):false)?l:m;return jsx(Box,{flexDirection:"row",paddingY:0,children:e.map((t,S)=>{let f=i[t.key];return jsx(Box,{width:t.width,flexBasis:t.width?void 0:t.flex||1,flexGrow:t.width?0:t.flex||1,flexShrink:t.width?0:1,paddingRight:S<e.length-1?2:0,justifyContent:t.align==="right"?"flex-end":t.align==="center"?"center":"flex-start",overflow:"hidden",children:t.render?t.render(f,i):jsx(a$4,{color:C,wrap:"truncate-end",children:f!=null?String(f):""})},String(t.key))})},c)})]})}function J({state:e}){let{exit:n}=useApp();return useEffect(()=>{if(e.type!=="loading"){let l=setTimeout(()=>n(),100);return ()=>clearTimeout(l)}},[e.type,n]),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"workspace create"}),e.type==="loading"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Creating workspace\u2026"})}),e.type==="error"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,children:[jsx(a$2.Err,{children:e.message}),e.detail&&jsx(a$2.Dim,{children:e.detail})]}),e.type==="success"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,gap:1,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:l,children:w}),jsx(Text,{color:l,bold:true,children:e.name})]}),jsx(a$3,{variant:"default",content:[{k:"id",v:jsx(Text,{color:l,children:e.id})},{k:"slug",v:jsx(Text,{color:l,children:e.slug})}]})]})]})}var W=[{key:"name",label:"name",width:24},{key:"slug",label:"slug",width:24},{key:"id",label:"id",width:32}];function Q({state:e}){let{exit:n}=useApp();return useEffect(()=>{if(e.type!=="loading"){let l=setTimeout(()=>n(),100);return ()=>clearTimeout(l)}},[e.type,n]),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"workspace list"}),e.type==="loading"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Fetching workspaces\u2026"})}),e.type==="error"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,children:[jsx(a$2.Err,{children:e.message}),e.detail&&jsx(a$2.Dim,{children:e.detail})]}),e.type==="success"&&e.workspaces.length===0&&jsx(Box,{paddingLeft:2,children:jsx(a$2.Dim,{children:"No workspaces found."})}),e.type==="success"&&e.workspaces.length>0&&jsx(Box,{paddingLeft:2,children:jsx(B,{columns:W,data:e.workspaces})})]})}export{J as WorkspaceCreateView,Q as WorkspaceListView};
2
+ import {a as a$3}from'./chunk-56C3DFV2.js';import {a}from'./chunk-R67TA4FU.js';import {a as a$2}from'./chunk-FQVHJUX4.js';import {a as a$1}from'./chunk-JYNOILCD.js';import {a as a$4}from'./chunk-57XLDHK6.js';import {w,l,p,n,m}from'./chunk-YKFGEPLO.js';import'./chunk-YPLDPHHD.js';import'./chunk-7UWDMECF.js';import {useEffect}from'react';import {useApp,Box,Text}from'ink';import {jsxs,jsx}from'react/jsx-runtime';function B({columns:e,data:n$1,rowAccent:l$1}){return jsxs(Box,{flexDirection:"column",marginY:1,children:[jsx(Box,{flexDirection:"row",borderBottom:true,borderStyle:"single",borderTop:false,borderLeft:false,borderRight:false,borderColor:p,paddingBottom:0,marginBottom:0,children:e.map((i,c)=>jsx(Box,{width:i.width,flexBasis:i.width?void 0:i.flex||1,flexGrow:i.width?0:i.flex||1,flexShrink:i.width?0:1,paddingRight:c<e.length-1?2:0,justifyContent:i.align==="right"?"flex-end":i.align==="center"?"center":"flex-start",children:jsx(a$4,{color:n,bold:true,children:i.label})},String(i.key)))}),n$1.map((i,c)=>{let C=(l$1?l$1(i,c):false)?l:m;return jsx(Box,{flexDirection:"row",paddingY:0,children:e.map((t,S)=>{let f=i[t.key];return jsx(Box,{width:t.width,flexBasis:t.width?void 0:t.flex||1,flexGrow:t.width?0:t.flex||1,flexShrink:t.width?0:1,paddingRight:S<e.length-1?2:0,justifyContent:t.align==="right"?"flex-end":t.align==="center"?"center":"flex-start",overflow:"hidden",children:t.render?t.render(f,i):jsx(a$4,{color:C,wrap:"truncate-end",children:f!=null?String(f):""})},String(t.key))})},c)})]})}function J({state:e}){let{exit:n}=useApp();return useEffect(()=>{if(e.type!=="loading"){let l=setTimeout(()=>n(),100);return ()=>clearTimeout(l)}},[e.type,n]),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"workspace create"}),e.type==="loading"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Creating workspace\u2026"})}),e.type==="error"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,children:[jsx(a$2.Err,{children:e.message}),e.detail&&jsx(a$2.Dim,{children:e.detail})]}),e.type==="success"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,gap:1,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:l,children:w}),jsx(Text,{color:l,bold:true,children:e.name})]}),jsx(a$3,{variant:"default",content:[{k:"id",v:jsx(Text,{color:l,children:e.id})},{k:"slug",v:jsx(Text,{color:l,children:e.slug})}]})]})]})}var W=[{key:"name",label:"name",width:24},{key:"slug",label:"slug",width:24},{key:"id",label:"id",width:32}];function Q({state:e}){let{exit:n}=useApp();return useEffect(()=>{if(e.type!=="loading"){let l=setTimeout(()=>n(),100);return ()=>clearTimeout(l)}},[e.type,n]),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"workspace list"}),e.type==="loading"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:"Fetching workspaces\u2026"})}),e.type==="error"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,children:[jsx(a$2.Err,{children:e.message}),e.detail&&jsx(a$2.Dim,{children:e.detail})]}),e.type==="success"&&e.workspaces.length===0&&jsx(Box,{paddingLeft:2,children:jsx(a$2.Dim,{children:"No workspaces found."})}),e.type==="success"&&e.workspaces.length>0&&jsx(Box,{paddingLeft:2,children:jsx(B,{columns:W,data:e.workspaces})})]})}export{J as WorkspaceCreateView,Q as WorkspaceListView};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import {a}from'./chunk-HX54IFSD.js';import {Analytics}from'@segment/analytics-node';var h={CLI_INSTALLED:"cli_installed",CLI_VERSION_VIEWED:"cli_version_viewed",CLI_HELP_VIEWED:"cli_help_viewed",CLI_UNHANDLED_ERROR:"cli_unhandled_error",LOGIN_STARTED:"login_started",LOGIN_SUCCEEDED:"login_succeeded",LOGIN_FAILED:"login_failed",LOGOUT:"logout",DEV_STARTED:"dev_started",DEV_STOPPED:"dev_stopped",DEV_FAILED:"dev_failed",DEPLOY_STARTED:"deploy_started",DEPLOY_SUCCEEDED:"deploy_succeeded",DEPLOY_FAILED:"deploy_failed",DEPLOY_ABORTED:"deploy_aborted",API_KEY_CREATED:"api_key_created",API_KEY_LISTED:"api_key_listed",API_KEY_REVOKED:"api_key_revoked",API_KEY_ROTATED:"api_key_rotated",API_KEY_CREATE_FAILED:"api_key_create_failed",API_KEY_LIST_FAILED:"api_key_list_failed",API_KEY_ROTATE_FAILED:"api_key_rotate_failed",API_KEY_REVOKE_FAILED:"api_key_revoke_failed",TENANT_SWITCHED:"tenant_switched",ENV_SWITCHED:"env_switched",ENV_SWITCH_FAILED:"env_switch_failed",WORKSPACE_CREATED:"workspace_created",WORKSPACE_LISTED:"workspace_listed",TENANT_SWITCH_FAILED:"tenant_switch_failed",WORKSPACE_CREATE_FAILED:"workspace_create_failed",WORKSPACE_LIST_FAILED:"workspace_list_failed",WHOAMI_VIEWED:"whoami_viewed",RENAME_STARTED:"rename_started",RENAME_SUCCEEDED:"rename_succeeded",RENAME_FAILED:"rename_failed",INIT_STARTED:"init_started",INIT_SUCCEEDED:"init_succeeded",INIT_FAILED:"init_failed"},D="byn3jQco5axUIlfeohbQYYPGrZgGpw7A",x=process.env.CULVII_TELEMETRY!=="false",r=x?new Analytics({writeKey:D,flushAt:1,flushInterval:0}):null;function g(){return {surface:"cli",cli_version:"0.0.8",node_version:process.version,os:process.platform,arch:process.arch}}var c=null;async function w(){if(c)return c;try{let{ConfigStore:n}=await import('./config-store-WSXGIIJ4.js');c=(await new n().read({exitOnError:!1})).anonymousId??"unknown";}catch{c="unknown";}return c}var d=null,E=null,f=false;function U(){f=false;}async function y(){if(f)return {userId:d,tenantId:E};try{let{ConfigStore:n}=await import('./config-store-WSXGIIJ4.js'),e=await new n().read({exitOnError:!1}),i=e.contexts[e.active];E=i?.tenant_id??null,d=i?.user_id??e.anonymousId??null;}catch{d=null,E=null;}finally{f=true;}return {userId:d,tenantId:E}}async function C(n,t={},e,i){if(r)try{let o=await y(),a=e??o.userId,s=i!==void 0?i:o.tenantId,_=await w();a?r.track({userId:a,event:n,properties:{...g(),...s?{tenant_id:s}:{},...t}}):r.track({anonymousId:_,event:n,properties:{...g(),...t}});}catch{}}async function V(n,t,e,i={}){await C(n,i,t,e);}async function b(n,t={}){if(r)try{r.identify({userId:n,traits:t});}catch{}}async function F(n,t){if(r)try{r.alias({userId:n,previousId:t});}catch{}}async function K(n,t,e={}){if(r)try{r.group({userId:n,groupId:t,traits:e});}catch{}}var l=null;async function p(){if(r)return l||(l=r.flush({timeout:3e3}).catch(()=>{}).finally(()=>{l=null;}),l)}var u={dev:"development",sandbox:"sandbox",prod:"production"};function k(n){let t=Object.entries(u).find(([,e])=>e===n);return t?t[0]:null}var L=["dev","sandbox","prod"];function W(n){let t=new Set(n.map(k).filter(e=>e!==null));return L.find(e=>t.has(e))??null}var v;function G(n){v=n&&n in u?n:void 0;}function H(){return v}var R="https://api.platform.culvii.com",S={apiBaseUrl:R,clientId:"7fklt2iomn19epdbhpmfblk820",cognitoDomain:"culvii-console.auth.us-east-2.amazoncognito.com"},I=process.env.CULVII_ENV,N=I&&I in u?I:"dev",O={...S,logicalEnvironment:N,scopes:["openid","email","profile"],callbackPorts:[52700,52701,52702,52703,52704,52705,52706,52707,52708,52709],callbackPath:"/callback"};async function M(n){let e=await new a().read(),i=e.contexts[e.active];i||(console.error("Error: Active context key not found in contexts in ~/.culvii/config."),console.error("Please run `culvii login` to authenticate and configure your active context."),await p(),process.exit(1));let o={...i},a$1=n?.env??v;a$1&&(o.environment=a$1);let s=o.environment||"dev";o.environment_id=o.environment_ids?.[s]??o.environment_id,o.workspace_ids&&s in o.workspace_ids&&(o.workspace_id=o.workspace_ids[s]??null),o.workspace_slugs&&s in o.workspace_slugs&&(o.workspace_slug=o.workspace_slugs[s]??null),n?.workspace&&(o.workspace_id=n.workspace);let _=O.apiBaseUrl;return _||(console.error("Error: No API URL found for the configured platform."),await p(),process.exit(1)),{apiUrl:_,context:o}}function j(n){let t=n.environment||"dev",e=n.environment_ids?.[t]??n.environment_id;return {...n.tenant_id?{"x-tenant-id":n.tenant_id}:{},...e?{"x-environment-id":e}:{"x-environment-slug":u[t]}}}
3
+ export{h as a,w as b,U as c,y as d,C as e,V as f,b as g,F as h,K as i,p as j,u as k,k as l,W as m,G as n,H as o,N as p,O as q,M as r,j as s};