@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.
- package/COMMANDS.md +5 -5
- package/README.md +15 -6
- package/USAGE.md +11 -10
- package/dist/DeployView-D4UEXMDJ.js +2 -0
- package/dist/DevView-GPKSSOLA.js +2 -0
- package/dist/EnvView-3ZURMIZS.js +2 -0
- package/dist/{HelpView-YLCEPIFY.js → HelpView-E7HS4SVF.js} +1 -1
- package/dist/WhoamiView-TKSYSHQ2.js +2 -0
- package/dist/{WorkspaceView-RNFALIPM.js → WorkspaceView-ID7ZMBHV.js} +1 -1
- package/dist/{chunk-IRZMWFC3.js → chunk-IPETC2TK.js} +1 -1
- package/dist/index.js +33 -683
- package/dist/lib/evaluator.js +2 -2
- package/dist/login-OGOHEHFE.js +39 -0
- package/dist/{logout-TDZA462P.js → logout-BRUJBFUK.js} +1 -1
- package/dist/skill-bundle-7KYK5GBL.js +1377 -0
- package/package.json +9 -5
- package/skills/culvii/.culvii-skill.json +59 -0
- package/skills/culvii/SKILL.md +73 -0
- package/skills/culvii/agents/openai.yaml +4 -0
- package/skills/culvii/examples/agent-workflow.culvii.ts +24 -0
- package/skills/culvii/examples/complete-workflow.culvii.ts +37 -0
- package/skills/culvii/examples/output-surface.culvii.ts +45 -0
- package/skills/culvii/examples/wait-surface.culvii.ts +24 -0
- package/skills/culvii/references/agents.md +29 -0
- package/skills/culvii/references/authoring-files.md +21 -0
- package/skills/culvii/references/cli-guide.md +22 -0
- package/skills/culvii/references/cli-reference.md +184 -0
- package/skills/culvii/references/feedback-cycle.md +43 -0
- package/skills/culvii/references/integrations.md +13 -0
- package/skills/culvii/references/kit-api.md +35 -0
- package/skills/culvii/references/node-core-agent.md +27 -0
- package/skills/culvii/references/node-core-browser-automation.md +53 -0
- package/skills/culvii/references/node-core-code.md +28 -0
- package/skills/culvii/references/node-core-http.md +42 -0
- package/skills/culvii/references/node-core-if.md +26 -0
- package/skills/culvii/references/node-core-jwt.md +31 -0
- package/skills/culvii/references/node-core-set.md +24 -0
- package/skills/culvii/references/node-cron-trigger.md +25 -0
- package/skills/culvii/references/node-elasticsearch.md +39 -0
- package/skills/culvii/references/node-gmail-trigger.md +44 -0
- package/skills/culvii/references/node-gmail.md +57 -0
- package/skills/culvii/references/node-google-calendar.md +51 -0
- package/skills/culvii/references/node-google-docs.md +46 -0
- package/skills/culvii/references/node-manual-trigger.md +24 -0
- package/skills/culvii/references/node-microsoft-outlook-trigger.md +41 -0
- package/skills/culvii/references/node-microsoft-outlook.md +55 -0
- package/skills/culvii/references/node-microsoft-sharepoint.md +40 -0
- package/skills/culvii/references/node-s3.md +40 -0
- package/skills/culvii/references/node-slack-trigger.md +40 -0
- package/skills/culvii/references/node-slack.md +38 -0
- package/skills/culvii/references/node-twilio.md +39 -0
- package/skills/culvii/references/node-wait-timer.md +24 -0
- package/skills/culvii/references/node-webhook-trigger.md +24 -0
- package/skills/culvii/references/nodes-index.md +27 -0
- package/skills/culvii/references/runtime-values.md +36 -0
- package/skills/culvii/references/surface-authoring.md +27 -0
- package/skills/culvii/references/surface-display.md +390 -0
- package/skills/culvii/references/surface-feedback.md +41 -0
- package/skills/culvii/references/surface-input-actions.md +143 -0
- package/skills/culvii/references/surface-layout.md +97 -0
- package/skills/culvii/references/validation.md +18 -0
- package/skills/culvii/references/workflows.md +30 -0
- package/dist/DeployView-GEJNL26A.js +0 -2
- package/dist/DevView-SOPAMSZ4.js +0 -2
- package/dist/EnvView-MCZC2NBO.js +0 -2
- package/dist/WhoamiView-67HV2L5J.js +0 -2
- package/dist/chunk-MPKGJC7N.js +0 -2
- package/dist/login-G5QUR55L.js +0 -36
- /package/dist/{chunk-5NBKYMD7.js → chunk-56C3DFV2.js} +0 -0
- /package/dist/{chunk-JFIFRAAR.js → chunk-RS5GDTRN.js} +0 -0
package/COMMANDS.md
CHANGED
|
@@ -12,7 +12,7 @@ All commands can be run as `culvii <command>` or `node dist/index.js <command>`.
|
|
|
12
12
|
| `culvii logout` | Clear stored tokens. |
|
|
13
13
|
| `culvii auth login` | Alias for `culvii login` |
|
|
14
14
|
| `culvii auth logout` | Alias for `culvii logout` |
|
|
15
|
-
| `culvii whoami [--json]
|
|
15
|
+
| `culvii whoami [--json]` | Show current user, active tenant, workspace, and scoped access. `--json` outputs machine-readable JSON. |
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -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
|
|
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
|
|
|
@@ -65,7 +65,7 @@ Note: `culvii dev` accepts no flags. The `--workspace` flag shown in older docs
|
|
|
65
65
|
|
|
66
66
|
| Command | Flags | Description |
|
|
67
67
|
|---------|-------|-------------|
|
|
68
|
-
| `culvii deploy` | `--env <sandbox\|prod> --workspace-slug <slug
|
|
68
|
+
| `culvii deploy` | `--env <sandbox\|prod> --workspace-slug <slug>` | Deploy agents and workflows to sandbox or prod. Displays created, versioned, and deleted resources, then requires one confirmation. |
|
|
69
69
|
|
|
70
70
|
---
|
|
71
71
|
|
|
@@ -86,7 +86,7 @@ Note: `culvii dev` accepts no flags. The `--workspace` flag shown in older docs
|
|
|
86
86
|
|
|
87
87
|
| Command | Flags | Description |
|
|
88
88
|
|---------|-------|-------------|
|
|
89
|
-
| `culvii rename <old-slug> <new-slug>` | `--resource-type
|
|
89
|
+
| `culvii rename <old-slug> <new-slug>` | `--resource-type agent [--workspace-slug <slug>] [--env]` | Rename an agent while preserving its UUID and execution history. |
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
@@ -116,4 +116,4 @@ Commands including `deploy`, `rename`, `workspace`, `key`, `dev`, and `init` ren
|
|
|
116
116
|
| `culvii audit query/verify` | Audit trail viewer (UI shell only, not yet wired to API). (currently disabled, pending public release) |
|
|
117
117
|
| `culvii policy validate/check` | Policy commands (UI shell only, not yet wired to API). (currently disabled, pending public release) |
|
|
118
118
|
| `culvii approve list/<id>` | Approval commands (UI shell only, not yet wired to API). (currently disabled, pending public release) |
|
|
119
|
-
| `culvii errors` | Error viewer (UI shell only, not yet wired to API). (currently disabled, pending public release) |
|
|
119
|
+
| `culvii errors` | Error viewer (UI shell only, not yet wired to API). (currently disabled, pending public release) |
|
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
The Culvii CLI is the local development and deployment tool for the Culvii agent platform. It manages authentication, local file watching, WebSocket-based dev synchronization, and Terraform-style declarative deployments.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
|
+
|
|
6
7
|
- Node.js (v22+)
|
|
7
8
|
- pnpm (part of the monorepo)
|
|
8
9
|
|
|
@@ -23,39 +24,46 @@ Once built, you can run the CLI locally using `node dist/index.js` or via the mo
|
|
|
23
24
|
## Getting Started
|
|
24
25
|
|
|
25
26
|
### 1. Authenticate
|
|
27
|
+
|
|
26
28
|
Before running any commands, authenticate your machine.
|
|
27
29
|
|
|
28
30
|
```bash
|
|
29
31
|
culvii auth login
|
|
30
32
|
```
|
|
31
|
-
|
|
33
|
+
|
|
34
|
+
This opens your browser to log in via OAuth. Upon success, your credentials, tenants, and active context are stored locally in `~/.culvii/`.
|
|
32
35
|
|
|
33
36
|
### 2. Local Development
|
|
37
|
+
|
|
34
38
|
The `dev` command starts a local watcher that hot-syncs your local agent and workflow definitions to a development workspace over WebSockets.
|
|
35
39
|
|
|
36
40
|
```bash
|
|
37
41
|
culvii dev
|
|
38
42
|
```
|
|
43
|
+
|
|
39
44
|
- **Auto-provisioning:** The CLI automatically creates a developer workspace (`dev-<user-id>`) and a developer API key for you.
|
|
40
45
|
- **Watching:** It watches for changes in `**/*.ts` files (ignoring `node_modules`, `dist`).
|
|
41
46
|
- **Syncing:** Whenever a change is detected, it evaluates your agent definitions and streams the updates to the cloud in real-time.
|
|
42
47
|
|
|
43
48
|
### 3. Deployment
|
|
49
|
+
|
|
44
50
|
Deploys your agents and workflows to a specific environment using a declarative plan/apply flow.
|
|
45
51
|
|
|
46
52
|
```bash
|
|
47
53
|
culvii deploy --env sandbox --workspace-slug <workspace-slug>
|
|
48
54
|
```
|
|
55
|
+
|
|
49
56
|
- **Targeting:** Requires both `--env` (`sandbox` or `prod`) and `--workspace-slug <slug>`.
|
|
50
57
|
- **Validation:** Checks for missing definitions or dangling agent references.
|
|
51
58
|
- **Plan/Apply:** Displays a diff plan (Created, Updated, Destroyed). Requires manual `[y/N]` confirmation.
|
|
52
|
-
- **
|
|
59
|
+
- **Reconciliation:** Resources missing from the submitted definitions are listed in the plan and deleted after the overall confirmation.
|
|
53
60
|
|
|
54
61
|
---
|
|
55
62
|
|
|
56
63
|
## File Discovery
|
|
57
64
|
|
|
58
65
|
To determine what to evaluate and sync, the CLI looks in your current working directory:
|
|
66
|
+
|
|
59
67
|
1. **`culvii.yaml`**: If present, it reads the `entrypoints` array.
|
|
60
68
|
2. **Fallback Globbing**: If no configuration file exists, it recursively finds all `*.culvii.ts` files in your project.
|
|
61
69
|
|
|
@@ -74,18 +82,19 @@ To determine what to evaluate and sync, the CLI looks in your current working di
|
|
|
74
82
|
| `culvii key` | Manage API keys. |
|
|
75
83
|
| `culvii switch` | Switch active tenant/context. |
|
|
76
84
|
| `culvii whoami` | View your current authenticated identity and active context. Supports --json and --env. |
|
|
77
|
-
| `culvii rename` |
|
|
85
|
+
| `culvii rename` | Rename a deployed agent. `--resource-type agent` is required. |
|
|
78
86
|
| `culvii skill install` | Install the Culvii SDK skill for your AI coding agent. No auth required. |
|
|
79
87
|
|
|
80
|
-
|
|
88
|
+
_Coming soon: audit, policy, approve, logs_
|
|
81
89
|
|
|
82
|
-
|
|
90
|
+
_(Run `culvii --help` for the full list of available commands and flags)_
|
|
83
91
|
|
|
84
92
|
---
|
|
85
93
|
|
|
86
94
|
## Local State & Configuration
|
|
87
95
|
|
|
88
96
|
The CLI manages state securely in your home directory (`~/.culvii/`):
|
|
97
|
+
|
|
89
98
|
- **`config`**: Active contexts, workspace mappings, environment targets, and auto-generated API keys.
|
|
90
99
|
- **`tokens.json`**: Active OAuth access and refresh tokens.
|
|
91
100
|
- **`.lock`**: Lockfile ensuring atomic concurrent reads/writes when multiple CLI instances run.
|
|
@@ -102,4 +111,4 @@ export CULVII_TELEMETRY=false
|
|
|
102
111
|
|
|
103
112
|
## Interactive UI
|
|
104
113
|
|
|
105
|
-
Most commands render a rich terminal UI when running in a supported TTY. They automatically fall back to plain text output in CI/CD environments, pipes, or terminals without color/unicode support. Set `CI=1` to force non-interactive mode.
|
|
114
|
+
Most commands render a rich terminal UI when running in a supported TTY. They automatically fall back to plain text output in CI/CD environments, pipes, or terminals without color/unicode support. Set `CI=1` to force non-interactive mode.
|
package/USAGE.md
CHANGED
|
@@ -45,9 +45,9 @@ culvii auth logout # alias
|
|
|
45
45
|
|
|
46
46
|
### Who am I
|
|
47
47
|
```bash
|
|
48
|
-
culvii whoami [--json]
|
|
48
|
+
culvii whoami [--json]
|
|
49
49
|
```
|
|
50
|
-
Displays current user, active tenant,
|
|
50
|
+
Displays current user, active tenant, workspace, and scoped access. `--json` outputs machine-readable JSON.
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
@@ -112,7 +112,7 @@ entrypoints:
|
|
|
112
112
|
## Deploy
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
culvii deploy --env <env> --workspace-slug <slug>
|
|
115
|
+
culvii deploy --env <env> --workspace-slug <slug>
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
`--env` is required and must be `sandbox` or `prod` (not `dev` — use `culvii dev` for local iteration).
|
|
@@ -122,8 +122,8 @@ culvii deploy --env <env> --workspace-slug <slug> [--allow-destroy]
|
|
|
122
122
|
1. Evaluates all `*.culvii.ts` files in the current directory
|
|
123
123
|
2. Calls the plan API to compute a diff against what's currently deployed
|
|
124
124
|
3. Displays the plan (CREATED / UPDATED / DESTROYED)
|
|
125
|
-
4.
|
|
126
|
-
5. Applies the plan
|
|
125
|
+
4. Shows every missing resource that will be deleted
|
|
126
|
+
5. Applies the plan after one overall confirmation
|
|
127
127
|
|
|
128
128
|
**Example:**
|
|
129
129
|
```bash
|
|
@@ -151,10 +151,10 @@ culvii key revoke <fingerprint> [--env <env>]
|
|
|
151
151
|
## Rename
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
|
-
culvii rename <old-slug> <new-slug> --resource-type
|
|
154
|
+
culvii rename <old-slug> <new-slug> --resource-type agent [--workspace-slug <slug>] [--env <env>]
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
Renames
|
|
157
|
+
Renames an agent while preserving its UUID and execution history. Workflow IDs are reconciled by deploy/dev instead of renamed.
|
|
158
158
|
|
|
159
159
|
---
|
|
160
160
|
|
|
@@ -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
|
|
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
|
|
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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
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 {o,a as a$3,w,c,y,d}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 h({state:r}){let{exit:d$1}=useApp();return useEffect(()=>{if(r.type==="error"||r.type==="disconnected"){let o=setTimeout(()=>d$1(),100);return ()=>clearTimeout(o)}},[r.type,d$1]),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"dev"}),r.type==="provisioning"&&jsx(Box,{paddingLeft:2,children:jsx(a$1,{label:r.message})}),r.type==="error"&&jsx(Box,{flexDirection:"column",paddingLeft:2,children:jsx(a$2.Err,{children:r.message})}),r.type==="disconnected"&&jsx(Box,{paddingLeft:2,children:jsx(a$2.Dim,{children:"Disconnected. Draft state discarded."})}),r.type==="connected"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,gap:1,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:o,children:"You can access your dev session here:"}),jsx(Text,{color:a$3,children:r.consoleUrl})]}),jsx(a$2.Dim,{children:"Watching ./..."}),jsx(Box,{flexDirection:"column",gap:0,children:r.log.map((o$1,D)=>jsxs(Box,{flexDirection:"row",gap:1,children:[o$1.type==="synced"&&jsx(Text,{color:c,children:w}),o$1.type==="orphaned"&&jsx(Text,{color:c,children:w}),(o$1.type==="warning"||o$1.type==="error")&&jsx(Text,{color:d,children:y}),o$1.type==="info"&&jsx(Text,{color:o,children:"\xB7"}),o$1.timestamp&&jsxs(Text,{color:o,children:["[",o$1.timestamp,"]"]}),jsx(Text,{color:o$1.type==="warning"||o$1.type==="error"?d:o,children:o$1.message})]},D))})]})]})}export{h as DevView};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {a}from'./chunk-R67TA4FU.js';import {a as a$1}from'./chunk-FQVHJUX4.js';import {l,e,o,w,c,x,p,j,f,k,a as a$2,h as h$1,d,i,g}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';var h={allow:{color:c,backgroundColor:g},healthy:{color:c,backgroundColor:g},deny:{color:e,backgroundColor:i},blocked:{color:e,backgroundColor:i},warn:{color:d,backgroundColor:h$1},throttled:{color:d,backgroundColor:h$1},accent:{color:a$2,backgroundColor:k},info:{color:f,backgroundColor:j},draft:{color:o,backgroundColor:p}};function R({variant:o,children:i}){let g=h[o];return jsx(Box,{flexDirection:"row",children:jsx(Box,{paddingX:1,backgroundColor:g.backgroundColor,children:jsx(Text,{color:g.color,bold:true,children:i})})})}function A(o){return o==="prod"?"allow":o==="sandbox"?"warn":"info"}function T({env:o}){return jsx(R,{variant:A(o),children:o})}function L({envs:o$1}){return o$1.length===0?jsx(Text,{color:o,children:"none"}):jsx(Box,{flexDirection:"row",gap:1,children:o$1.map(i=>jsx(T,{env:i},i))})}function q({state:o$1}){let{exit:i}=useApp();return useEffect(()=>{let g=setTimeout(()=>i(),100);return ()=>clearTimeout(g)},[i]),jsxs(Box,{flexDirection:"column",children:[jsx(a,{command:"culvii",subcommand:"env"}),o$1.type==="show"&&jsxs(Box,{flexDirection:"column",paddingLeft:2,gap:1,children:[jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:l,children:"current"}),jsx(T,{env:o$1.current}),!o$1.accessible.includes(o$1.current)&&jsx(Text,{color:e,children:"(no access)"})]}),jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:o,children:"tenant:"}),jsx(Text,{color:l,children:o$1.tenant})]}),jsxs(Box,{flexDirection:"row",gap:1,children:[jsx(Text,{color:o,children:"available:"}),jsx(L,{envs:o$1.accessible})]}),!o$1.accessible.includes(o$1.current)&&o$1.accessible.length>0&&jsxs(a$1.Dim,{children:["To switch, run: culvii env ",o$1.accessible[0]]})]}),o$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}),jsx(Text,{color:l,bold:true,children:"Switched environment to"}),jsx(T,{env:o$1.env})]}),jsxs(a$1.Dim,{children:["tenant: ",o$1.tenant]})]}),o$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:o$1.message})]}),o$1.detail&&jsx(Box,{paddingLeft:2,children:jsx(a$1.Dim,{children:o$1.detail})})]})]})}export{q as EnvView};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {p as p$1}from'./chunk-
|
|
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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
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-
|
|
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};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
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.
|
|
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
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};
|