@keystrokehq/cli 0.0.31 → 0.0.37
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/README.md +25 -4
- package/dist/{accept.handler-DNfIXPSP.mjs → accept.handler-DCsud1s5.mjs} +4 -4
- package/dist/{admin-CJp8XksD.mjs → admin-BaOtHeZ2.mjs} +10 -10
- package/dist/{agent-manifest-De5TCxZq.mjs → agent-manifest-DfWD5tvv.mjs} +17 -27
- package/dist/{agents-G37PM35Z.mjs → agents-BVAVfMR_.mjs} +9 -9
- package/dist/{api-keys-4igNHJ_W.mjs → api-keys-BhEEsHUh.mjs} +6 -6
- package/dist/{api-BK3EhPvs.mjs → api-sWkB_Wta.mjs} +1 -1
- package/dist/{auth-CIOmmV4x.mjs → auth-BnsitjzT.mjs} +6 -6
- package/dist/{auth.handler-CznN_vfz.mjs → auth.handler-W_xk14TL.mjs} +3 -3
- package/dist/authored-workflow-ref-fkHEEVnd.mjs +113 -0
- package/dist/{build-agents-DseUtzd4-CSGpNXur.mjs → build-agents-CUzBnlAG-3ePFZiJ6.mjs} +12 -11
- package/dist/{build-progress-DLM1Bt4T.mjs → build-progress-CM-b6Bby.mjs} +2 -2
- package/dist/{build-tasks-C09SdfjC-BmAVLTtQ.mjs → build-tasks-5eOvI19S-tbN6CRx9.mjs} +4 -4
- package/dist/{build-workflows-BZ_m97Pr-BiyptCrn.mjs → build-workflows-C-gQM3l5-_zcBHE3M.mjs} +14 -9
- package/dist/{build.handler-zHimoO7c.mjs → build.handler-CpAsAsBc.mjs} +12 -9
- package/dist/{clear-cache.handler-BP0K1-uN.mjs → clear-cache.handler-gJpwslkK.mjs} +2 -2
- package/dist/{clear.handler-T27GpgSu.mjs → clear.handler-CDyG6-dk.mjs} +1 -1
- package/dist/{clear.handler-PsA5QKHx.mjs → clear.handler-_sR33Hp8.mjs} +2 -2
- package/dist/{commander-BlrSdFcu.mjs → commander-C6SSTQJ2.mjs} +22 -3
- package/dist/{connect-BbLJhlIA.mjs → connect-27EgnljZ.mjs} +3 -3
- package/dist/{connect.handler-BthE-7Wg.mjs → connect.handler-COM1LnNg.mjs} +5 -5
- package/dist/{context-sgKhRc5v.mjs → context-ebZssGCY.mjs} +4 -4
- package/dist/{create.handler-BovbO_g0.mjs → create.handler-CAWJAGzQ.mjs} +3 -3
- package/dist/{credential-env-map-CRs0llf0.mjs → credential-env-map-5a41jLwM.mjs} +1 -1
- package/dist/{credential-requirements-D0mavK8j-CFMf0Xwu.mjs → credential-requirements-B5Alhu1v-DanlSKnT.mjs} +3 -3
- package/dist/{credential-schema-mismatch-ClQgEVtO.mjs → credential-schema-mismatch-c17ktoNU.mjs} +1 -1
- package/dist/{credentials-CsncZ52a.mjs → credentials-C0ssbMlp.mjs} +10 -10
- package/dist/{credentials-DKrSaaLw.mjs → credentials-DtwLbee6.mjs} +1 -1
- package/dist/current-deployment-workflow-C6x65imE.mjs +20 -0
- package/dist/current.handler-DP1L_hm3.mjs +19 -0
- package/dist/{delete.handler-DkAK396w.mjs → delete.handler-C-5XFkgN.mjs} +2 -2
- package/dist/{deploy-DvPfR9fC.mjs → deploy-BcVQJza8.mjs} +2 -2
- package/dist/{deploy-progress-BsUH7fGE.mjs → deploy-progress-Bt86Yc1r.mjs} +2 -2
- package/dist/{deploy.handler-BW3f2N2G.mjs → deploy.handler-GPS9lxGk.mjs} +16 -16
- package/dist/{diff-utils-Bs--xmoV.mjs → diff-utils-YEUYtSRs.mjs} +1 -1
- package/dist/{diff.handler-BwhsoAg0.mjs → diff.handler-DkM5dhaN.mjs} +15 -9
- package/dist/{dist-Dw7gCE7y.mjs → dist-B5jy238v.mjs} +37 -11
- package/dist/{dist-CTEtWDW4.mjs → dist-BmbFJq8U.mjs} +8 -27
- package/dist/{env.handler-Dks6ZQh-.mjs → env.handler-V_isbSi2.mjs} +52 -29
- package/dist/{error-boundary-0veZ_RDS.mjs → error-boundary-BRxUsPi7.mjs} +3 -3
- package/dist/{iam-command-utils-CSZj4XlH.mjs → iam-command-utils-DNDN0wT6.mjs} +3 -13
- package/dist/{import-module-y0glInUe-DV_3dsU0.mjs → import-module-y0glInUe-EuAWaw9g.mjs} +506 -128
- package/dist/{init-DX08T87c.mjs → init-D1OmmclX.mjs} +8 -3
- package/dist/{init.handler-CzlmkNXi.mjs → init.handler-CUbYlUgP.mjs} +57 -14
- package/dist/{inspect.handler-v9snxDLi.mjs → inspect.handler-BE6coOuW.mjs} +24 -13
- package/dist/{integration-catalog-CiZ62hb_.mjs → integration-catalog-pSmWHFLQ.mjs} +3 -3
- package/dist/{integrations-MEExmqcg.mjs → integrations-DZD5t8n2.mjs} +7 -7
- package/dist/{invites-BuatfJmN.mjs → invites-BuR1H-tA.mjs} +5 -5
- package/dist/{invites.list.handler-CK6mL10z.mjs → invites.list.handler-Dj4a6XOg.mjs} +6 -5
- package/dist/{invites.resend.handler-CKZouK1Z.mjs → invites.resend.handler-DEGF4vlB.mjs} +6 -5
- package/dist/{invites.revoke.handler-H0VI-3sp.mjs → invites.revoke.handler-Dg4ZvlFS.mjs} +6 -5
- package/dist/keystroke.mjs +122 -77
- package/dist/{list-enrichment-DP1wEyBZ.mjs → list-enrichment-dqbkXJzy.mjs} +2 -2
- package/dist/{list.handler-LxZInip2.mjs → list.handler-2g1CZAvB.mjs} +4 -4
- package/dist/{list.handler-BKfGLkFu.mjs → list.handler-7MkJfkak.mjs} +5 -5
- package/dist/list.handler-BTYVIn6z.mjs +39 -0
- package/dist/{list.handler-BiY5NFWd.mjs → list.handler-Bchcr3-e.mjs} +3 -3
- package/dist/list.handler-Choc4SZz.mjs +64 -0
- package/dist/{list.handler-Jk_vK66s.mjs → list.handler-D47C1z3m.mjs} +4 -4
- package/dist/{list.handler-DVnFrlis.mjs → list.handler-DYE48apa.mjs} +7 -7
- package/dist/{list.handler-DIMWZx78.mjs → list.handler-KcCaG3PZ.mjs} +4 -4
- package/dist/list2.handler-BIaIyrQf.mjs +99 -0
- package/dist/{listen-C_7Rgwkb.mjs → listen-CVY-_F29.mjs} +3 -3
- package/dist/{listen.handler-dJgorIzr.mjs → listen.handler-D_nEvXRn.mjs} +4 -4
- package/dist/{logs-B9YMhUGt.mjs → logs-CZ2qnsSH.mjs} +3 -3
- package/dist/{logs.handler-BfjCsAyq.mjs → logs.handler-BRUzZC9Z.mjs} +26 -29
- package/dist/{logs.handler-DGGVPMOX.mjs → logs.handler-Wk6mYyAZ.mjs} +1 -1
- package/dist/{members.add.handler-DSRCRxsI.mjs → members.add.handler-BJ0wr6rP.mjs} +6 -5
- package/dist/{members.invite.handler-BNpHn1dY.mjs → members.invite.handler-DyveDMuq.mjs} +6 -5
- package/dist/{members.list.handler-Bn9LJEPG.mjs → members.list.handler-CyQxH_zS.mjs} +6 -5
- package/dist/{members.remove.handler-Dkr2t_tX.mjs → members.remove.handler-Dtv9PooY.mjs} +6 -5
- package/dist/{members.update.handler-DBtUYuAY.mjs → members.update.handler-CeK-tCjT.mjs} +6 -5
- package/dist/{operations-AWMLs6mE.mjs → operations-CxQlt0S0.mjs} +5 -5
- package/dist/{org-DOH7YHk2.mjs → org-B8MPHJJu.mjs} +35 -28
- package/dist/org-context-BI9OSpbb.mjs +112 -0
- package/dist/org-output-DffU7DKn.mjs +64 -0
- package/dist/{orgs.create.handler-BO70zIdp.mjs → orgs.create.handler-BKvSmkU3.mjs} +4 -4
- package/dist/{orgs.get.handler-BuGg5bc9.mjs → orgs.get.handler-BA-CexIY.mjs} +4 -4
- package/dist/{orgs.list.handler--5HutMkl.mjs → orgs.list.handler-eCEg5kC1.mjs} +4 -4
- package/dist/{output-BWcVRt-T.mjs → output-DnIFEmi5.mjs} +1 -1
- package/dist/package-manager-BP3-q8hh.mjs +162 -0
- package/dist/{paused.handler-DHvxz-cC.mjs → paused.handler-4wKMTKZ-.mjs} +20 -33
- package/dist/{projects-C5GZ5Jrf.mjs → projects-Wu_2fB_x.mjs} +11 -9
- package/dist/{register.handler-CePNU3sP.mjs → register.handler-BvAkXCwE.mjs} +2 -2
- package/dist/{render-credential-Bn15FEUC.mjs → render-credential-D-H1ECDt.mjs} +1 -1
- package/dist/{render-operation-Bc7Wu1sP.mjs → render-operation-VdEPhoII.mjs} +2 -2
- package/dist/{requirements.handler-B5rqCjMu.mjs → requirements.handler-Bab4kBtw.mjs} +7 -7
- package/dist/{resolve-cli-credentials-CAOSVMJP.mjs → resolve-cli-credentials-GVOOedoQ.mjs} +1 -1
- package/dist/{resolve-project-E9mrh_el.mjs → resolve-project-DLKlAy0z.mjs} +24 -8
- package/dist/{run-polling-DawiBus-.mjs → run-polling-C5fI7xTp.mjs} +97 -14
- package/dist/{run.handler-BG7xitEK.mjs → run.handler-BKD5Xu0A.mjs} +42 -30
- package/dist/{runs-swYYBT6C.mjs → runs-CT31dczt.mjs} +4 -4
- package/dist/{schema-display-FvI8QjOQ.mjs → schema-display-sZ6ConJd.mjs} +33 -26
- package/dist/schemas-ClAIoIrX.mjs +281 -0
- package/dist/{search-BEfy2fG9.mjs → search-BeQW_pf4.mjs} +3 -3
- package/dist/{search.handler-V7ObLGjN.mjs → search.handler-BJ-ZlDL4.mjs} +6 -6
- package/dist/{show.handler-C_VDYU91.mjs → show.handler-BrIHUH28.mjs} +4 -4
- package/dist/{show.handler-CsidInW8.mjs → show.handler-Cqe_hCqU.mjs} +5 -5
- package/dist/{show.handler-Wmv0tkxx.mjs → show.handler-DB8xl5FU.mjs} +6 -6
- package/dist/{skill-installer-D6j9IA3Z.mjs → skill-installer-DuMhavmM.mjs} +3 -1
- package/dist/{skills-sync.handler-BAATdT6N.mjs → skills-sync.handler-BGs-_YD9.mjs} +13 -7
- package/dist/{skills.command-0-E8mcYE.mjs → skills.command-DUWn6FbL.mjs} +5 -5
- package/dist/skills.handler-DqLXJepA.mjs +9 -0
- package/dist/{spinner-progress-lrKDs4YF.mjs → spinner-progress-BYxlr3lY.mjs} +1 -1
- package/dist/status.handler-DAId4bVU.mjs +72 -0
- package/dist/{switch.handler-BwYndsP-.mjs → switch.handler-Cd4Yg2n8.mjs} +17 -4
- package/dist/{sync-6fZkIUtn.mjs → sync-DgC4lcxh.mjs} +2 -2
- package/dist/{sync.handler-Ctr-cN9X.mjs → sync.handler-Cm_WtGmH.mjs} +8 -8
- package/dist/{task-BWuIKWh4.mjs → task-DTvLzUkA.mjs} +2 -88
- package/dist/{task-target-build-QllcCfoN.mjs → task-target-build-CtvRyVjH.mjs} +5 -5
- package/dist/task-target-deploy-runner.mjs +6 -6
- package/dist/{test-C8VIZe9V.mjs → test-4V7nh67i.mjs} +5 -5
- package/dist/{test.handler-BCW0YBPd.mjs → test.handler-BdCYcwR4.mjs} +2 -2
- package/dist/{test.handler-DLaxrJ9V.mjs → test.handler-Bo4YTs2Z.mjs} +19 -16
- package/dist/{tool.handler-8qNmgdRe.mjs → tool.handler-CPCrSDq2.mjs} +12 -12
- package/dist/{trigger-artifacts-BcRScRSp-BiD2h6do.mjs → trigger-artifacts-BcRScRSp-BRpU-He5.mjs} +2 -2
- package/dist/{trigger-manifest-C07EM-b2.mjs → trigger-manifest-BVqjDhxU.mjs} +1 -1
- package/dist/{upgrade-DgOcc8IT.mjs → upgrade-2qUOcjxb.mjs} +4 -8
- package/dist/upgrade.handler-PqlKSuUE.mjs +99 -0
- package/dist/{upload.handler-B7xle1oX.mjs → upload.handler-CS-vLpzC.mjs} +9 -9
- package/dist/{users.get.handler-C4t1vXwi.mjs → users.get.handler-CH1c6Lnj.mjs} +4 -4
- package/dist/{users.list.handler-Dvl90grq.mjs → users.list.handler-CxbZFgjO.mjs} +4 -4
- package/dist/{users.set-role.handler-Djw1_VGf.mjs → users.set-role.handler-CBRE-Ws6.mjs} +4 -4
- package/dist/{validate.handler-Drf_lssw.mjs → validate.handler-1d-UmtXB.mjs} +171 -26
- package/dist/{workflow-build-Begvjfq8.mjs → workflow-build-Bm8JoVv4.mjs} +234 -32
- package/dist/{workflow-build-manifest-1sC52TIG.mjs → workflow-build-manifest-CV6bBmDO.mjs} +1 -1
- package/dist/{workflow-bundler-BzHk73PM-muPv1yGG.mjs → workflow-bundler-Bs3zQNQv-Dy7lXxy3.mjs} +15 -4
- package/dist/{workflows-DjMlxuBX.mjs → workflows-ny7rOdeH.mjs} +34 -37
- package/dist/{writer-byNNUjRm-B-on1n6c.mjs → writer-BLg0RuZa-Y6ExdYH9.mjs} +6 -4
- package/package.json +11 -11
- package/dist/current-deployment-workflow-B1VQCYC-.mjs +0 -94
- package/dist/current.handler-BaGaCLzB.mjs +0 -21
- package/dist/list.handler-BEMj3FyH.mjs +0 -76
- package/dist/list.handler-Cq_oQY5B.mjs +0 -52
- package/dist/list.handler-htR9TeiS.mjs +0 -24
- package/dist/package-manager-DT1EhOkS.mjs +0 -61
- package/dist/schemas-D2zfmyC-.mjs +0 -671
- package/dist/skills.handler-DYIQK0Vu.mjs +0 -9
- package/dist/status.handler-Ch_DtyBp.mjs +0 -109
- package/dist/upgrade.handler-DSZuw7-9.mjs +0 -80
- /package/dist/{build-metadata-BB_L45ZS-DSJL7dTy.mjs → build-metadata-BB_L45ZS-DRQsV6JK.mjs} +0 -0
- /package/dist/{deploy-DhCbYFc7.mjs → deploy-BiKBH25R.mjs} +0 -0
- /package/dist/{detect-env-access-CwkOYeYM-COq4U-4Y.mjs → detect-env-access-CwkOYeYM-r4aynBU0.mjs} +0 -0
- /package/dist/{read-credential-keys-77a91T8M-DGK5XTQp.mjs → read-credential-keys-77a91T8M-I07NYwfH.mjs} +0 -0
- /package/dist/{run-polling-fBouPjJ2.mjs → run-polling-1c0ckC1A.mjs} +0 -0
- /package/dist/{schemas-4Mq_bxob.mjs → schemas-8nhXlXWh.mjs} +0 -0
- /package/dist/{task-target-deploy-B_3HPSo2.mjs → task-target-deploy-m9LfE488.mjs} +0 -0
- /package/dist/{types-AlA-ifK9.mjs → types-Cb0eWmUU.mjs} +0 -0
package/README.md
CHANGED
|
@@ -100,8 +100,27 @@ keystroke --api-key sk_... --server-url https://api.example.com workflows list
|
|
|
100
100
|
| `keystroke skills sync` | Sync bundled Keystroke agent skills into selected agent skill folders. |
|
|
101
101
|
| `keystroke upgrade` | Upgrade the installed Keystroke CLI package. |
|
|
102
102
|
|
|
103
|
+
Upgrade examples:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
keystroke upgrade --dry-run
|
|
107
|
+
keystroke upgrade --package-manager pnpm --to latest --dry-run
|
|
108
|
+
keystroke upgrade --to 1.2.3 --dry-run
|
|
109
|
+
keystroke upgrade --package-manager npm
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`--package-manager yarn` requires Yarn Classic (v1). Yarn 2+ does not support global installs; use `npm` or `pnpm` instead.
|
|
113
|
+
|
|
103
114
|
Run `keystroke <command> --help` for exact arguments and flags.
|
|
104
115
|
|
|
116
|
+
List locally tracked projects or reset the cache:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
keystroke projects list
|
|
120
|
+
keystroke projects list --json
|
|
121
|
+
keystroke projects clear-cache
|
|
122
|
+
```
|
|
123
|
+
|
|
105
124
|
Capture one incoming webhook or API request body:
|
|
106
125
|
|
|
107
126
|
```bash
|
|
@@ -126,7 +145,9 @@ Skill install methods:
|
|
|
126
145
|
- `--method symlink` links selected agent skill folders back to the canonical `.agents/skills` copy.
|
|
127
146
|
- `--method copy` writes independent copies for selected agent folders.
|
|
128
147
|
|
|
129
|
-
Run `keystroke skills sync` with the same `--agent` and `--method` flags to refresh skills in an existing project.
|
|
148
|
+
Run `keystroke skills sync` with the same `--agent` and `--method` flags to refresh skills in an existing project. Cursor and other universal agents read skills from `.agents/skills` (not `.cursor/skills`); agent-specific folders such as `.claude/skills` are created only for adapters that use a separate path.
|
|
149
|
+
|
|
150
|
+
When stdout is not a TTY (piped or captured), `skills sync` emits JSON automatically; pass `--json` explicitly in interactive terminals.
|
|
130
151
|
|
|
131
152
|
Build locally:
|
|
132
153
|
|
|
@@ -138,8 +159,8 @@ Inspect what will be deployed:
|
|
|
138
159
|
|
|
139
160
|
```bash
|
|
140
161
|
keystroke workflows list --path ./my-automation
|
|
141
|
-
keystroke workflows inspect <workflow-id
|
|
142
|
-
keystroke workflows diff <workflow-id
|
|
162
|
+
keystroke workflows inspect <workflow-id> --path ./my-automation
|
|
163
|
+
keystroke workflows diff <workflow-id> --path ./my-automation
|
|
143
164
|
```
|
|
144
165
|
|
|
145
166
|
Deploy:
|
|
@@ -153,7 +174,7 @@ keystroke deploy --diff --path ./my-automation
|
|
|
153
174
|
Test a workflow or agent tool:
|
|
154
175
|
|
|
155
176
|
```bash
|
|
156
|
-
keystroke workflows test <workflow-id
|
|
177
|
+
keystroke workflows test <workflow-id> --input '{"example":true}'
|
|
157
178
|
keystroke test tool <tool-name> --agent <agent-id-or-name> --input-file ./input.json
|
|
158
179
|
```
|
|
159
180
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as writeJson } from "./output-
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
6
|
-
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-
|
|
3
|
+
import { p as ui } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson } from "./output-DnIFEmi5.mjs";
|
|
5
|
+
import { i as requireClient } from "./context-ebZssGCY.mjs";
|
|
6
|
+
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-DNDN0wT6.mjs";
|
|
7
7
|
//#region src/commands/invites/accept.handler.ts
|
|
8
8
|
async function handleInvitesAccept(options, ctx) {
|
|
9
9
|
const client = requireClient(ctx);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-
|
|
4
|
-
import { t as createTypedCommand } from "./commander-
|
|
3
|
+
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-DnIFEmi5.mjs";
|
|
4
|
+
import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
|
|
5
5
|
import { t as OrgRoleSchema } from "./schema-Lbp5lGJu.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/commands/admin/orgs.command.ts
|
|
@@ -28,21 +28,21 @@ function createAdminOrgsCommand() {
|
|
|
28
28
|
description: "Manage organizations as a platform admin",
|
|
29
29
|
schema: AdminOrgsListOptionsSchema,
|
|
30
30
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
31
|
-
loadHandler: async () => (await import("./orgs.list.handler
|
|
31
|
+
loadHandler: async () => (await import("./orgs.list.handler-eCEg5kC1.mjs")).handleAdminOrgsList,
|
|
32
32
|
subcommands: [
|
|
33
33
|
createTypedCommand({
|
|
34
34
|
name: "create",
|
|
35
35
|
description: "Create an organization (requires system.create_org)",
|
|
36
36
|
schema: AdminOrgsCreateOptionsSchema,
|
|
37
37
|
optionsConfig: CREATE_OPTIONS_CONFIG,
|
|
38
|
-
loadHandler: async () => (await import("./orgs.create.handler-
|
|
38
|
+
loadHandler: async () => (await import("./orgs.create.handler-BKvSmkU3.mjs")).handleAdminOrgsCreate
|
|
39
39
|
}),
|
|
40
40
|
createTypedCommand({
|
|
41
41
|
name: "list",
|
|
42
42
|
description: "List organizations (requires system.view_orgs)",
|
|
43
43
|
schema: AdminOrgsListOptionsSchema,
|
|
44
44
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
45
|
-
loadHandler: async () => (await import("./orgs.list.handler
|
|
45
|
+
loadHandler: async () => (await import("./orgs.list.handler-eCEg5kC1.mjs")).handleAdminOrgsList
|
|
46
46
|
}),
|
|
47
47
|
createTypedCommand({
|
|
48
48
|
name: "get",
|
|
@@ -54,7 +54,7 @@ function createAdminOrgsCommand() {
|
|
|
54
54
|
description: "Organization ID",
|
|
55
55
|
key: "orgId"
|
|
56
56
|
},
|
|
57
|
-
loadHandler: async () => (await import("./orgs.get.handler-
|
|
57
|
+
loadHandler: async () => (await import("./orgs.get.handler-BA-CexIY.mjs")).handleAdminOrgsGet
|
|
58
58
|
})
|
|
59
59
|
]
|
|
60
60
|
});
|
|
@@ -157,14 +157,14 @@ function createAdminUsersCommand() {
|
|
|
157
157
|
description: "Manage platform users",
|
|
158
158
|
schema: AdminUsersListOptionsSchema,
|
|
159
159
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
160
|
-
loadHandler: async () => (await import("./users.list.handler-
|
|
160
|
+
loadHandler: async () => (await import("./users.list.handler-CxbZFgjO.mjs")).handleAdminUsersList,
|
|
161
161
|
subcommands: [
|
|
162
162
|
createTypedCommand({
|
|
163
163
|
name: "list",
|
|
164
164
|
description: "List platform users",
|
|
165
165
|
schema: AdminUsersListOptionsSchema,
|
|
166
166
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
167
|
-
loadHandler: async () => (await import("./users.list.handler-
|
|
167
|
+
loadHandler: async () => (await import("./users.list.handler-CxbZFgjO.mjs")).handleAdminUsersList
|
|
168
168
|
}),
|
|
169
169
|
createTypedCommand({
|
|
170
170
|
name: "get",
|
|
@@ -176,7 +176,7 @@ function createAdminUsersCommand() {
|
|
|
176
176
|
description: "User ID",
|
|
177
177
|
key: "userId"
|
|
178
178
|
},
|
|
179
|
-
loadHandler: async () => (await import("./users.get.handler-
|
|
179
|
+
loadHandler: async () => (await import("./users.get.handler-CH1c6Lnj.mjs")).handleAdminUsersGet
|
|
180
180
|
}),
|
|
181
181
|
createTypedCommand({
|
|
182
182
|
name: "set-role",
|
|
@@ -188,7 +188,7 @@ function createAdminUsersCommand() {
|
|
|
188
188
|
description: "User ID",
|
|
189
189
|
key: "userId"
|
|
190
190
|
},
|
|
191
|
-
loadHandler: async () => (await import("./users.set-role.handler-
|
|
191
|
+
loadHandler: async () => (await import("./users.set-role.handler-CBRE-Ws6.mjs")).handleAdminUsersSetRole
|
|
192
192
|
})
|
|
193
193
|
]
|
|
194
194
|
});
|
|
@@ -100,48 +100,38 @@ const AgentRuntimeSchema = z.object({
|
|
|
100
100
|
mode: AgentRuntimeModeSchema,
|
|
101
101
|
placement: AgentRuntimePlacementSchema
|
|
102
102
|
});
|
|
103
|
+
const AgentSandboxManifestValueSchema = z.discriminatedUnion("kind", [z.object({
|
|
104
|
+
kind: z.literal("literal"),
|
|
105
|
+
value: z.string()
|
|
106
|
+
}), z.object({
|
|
107
|
+
kind: z.literal("credential"),
|
|
108
|
+
credentialSetId: z.string().min(1),
|
|
109
|
+
key: z.string().min(1)
|
|
110
|
+
})]);
|
|
103
111
|
/**
|
|
104
112
|
* Mirrors `SandboxFileSourceSchema` from `@keystrokehq/core` so this
|
|
105
113
|
* package stays free of a runtime dependency on core. Keep in sync
|
|
106
114
|
* with `packages/core/src/sandbox/schemas.ts`.
|
|
107
115
|
*/
|
|
108
|
-
const AgentSandboxFileSourceSchema = z.
|
|
109
|
-
type: z.literal("git"),
|
|
110
|
-
url: z.string().trim().min(1),
|
|
111
|
-
branch: z.string().optional(),
|
|
112
|
-
/** Workdir-relative or absolute (under `/workspace`) clone destination. */
|
|
113
|
-
target: z.string().optional()
|
|
114
|
-
}), z.object({
|
|
115
|
-
type: z.literal("local"),
|
|
116
|
-
/** Host source path (resolved against project root at deploy time). */
|
|
116
|
+
const AgentSandboxFileSourceSchema = z.object({
|
|
117
117
|
path: z.string().trim().min(1),
|
|
118
|
-
/** Workdir-relative or absolute (under `/workspace`) destination in the VM. */
|
|
119
118
|
target: z.string().optional()
|
|
120
|
-
})
|
|
119
|
+
});
|
|
121
120
|
/**
|
|
122
121
|
* `workdir` here mirrors the core constraint: must be `/workspace`
|
|
123
122
|
* or a subdirectory so it lands inside the persistent bind mount.
|
|
124
123
|
*/
|
|
125
124
|
const AgentSandboxWorkdirSchema = z.string().trim().min(1).refine((value) => value === "/workspace" || value.startsWith("/workspace/"), { error: "workdir must be \"/workspace\" or a subdirectory of \"/workspace\"" });
|
|
126
125
|
const AgentSandboxSchema = z.object({
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
* etc. Each command runs with `cwd = workdir`.
|
|
133
|
-
*/
|
|
134
|
-
runCommands: z.array(z.string()).default([]),
|
|
135
|
-
env: z.record(z.string(), z.string()).default({}),
|
|
136
|
-
workdir: AgentSandboxWorkdirSchema.optional()
|
|
137
|
-
}).optional(),
|
|
138
|
-
/**
|
|
139
|
-
* Bootstrap-phase commands. Marker-gated; future snapshot warm-boots skip
|
|
140
|
-
* these entirely. Use for one-time, cacheable setup (e.g. `npm install -g`).
|
|
141
|
-
*/
|
|
126
|
+
id: z.string().optional(),
|
|
127
|
+
name: z.string().optional(),
|
|
128
|
+
description: z.string().optional(),
|
|
129
|
+
workdir: AgentSandboxWorkdirSchema.optional(),
|
|
130
|
+
runCommands: z.array(z.string()).optional(),
|
|
142
131
|
setupCommands: z.array(z.string()).optional(),
|
|
143
|
-
|
|
132
|
+
env: z.record(z.string(), AgentSandboxManifestValueSchema).optional(),
|
|
144
133
|
fileSources: z.array(AgentSandboxFileSourceSchema).optional(),
|
|
134
|
+
snapshotId: z.string().optional(),
|
|
145
135
|
bootstrapArtifacts: z.array(SandboxBootstrapArtifactSchema).optional(),
|
|
146
136
|
sandboxBundleStoragePath: z.string().optional()
|
|
147
137
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as projects } from "./dist-
|
|
5
|
-
import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-
|
|
6
|
-
import { t as createTypedCommand } from "./commander-
|
|
7
|
-
import { i as readAgentManifestsFromOutDir } from "./dist-
|
|
8
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
9
|
-
import { t as createSpinnerProgress } from "./spinner-progress-
|
|
10
|
-
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-
|
|
11
|
-
import {
|
|
3
|
+
import { N as throwReportedCliExit, n as style, p as ui, t as ANSI, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-B5jy238v.mjs";
|
|
5
|
+
import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-DnIFEmi5.mjs";
|
|
6
|
+
import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
|
|
7
|
+
import { i as readAgentManifestsFromOutDir } from "./dist-BmbFJq8U.mjs";
|
|
8
|
+
import { t as requireWorkflowsDir } from "./resolve-project-DLKlAy0z.mjs";
|
|
9
|
+
import { t as createSpinnerProgress } from "./spinner-progress-BYxlr3lY.mjs";
|
|
10
|
+
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Bm8JoVv4.mjs";
|
|
11
|
+
import { s as resolveTypeHint } from "./schema-display-sZ6ConJd.mjs";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
//#region src/commands/agents/inspect-display.ts
|
|
14
14
|
function renderAgentManifestInspect(manifest, options = {}) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-
|
|
4
|
-
import { t as createTypedCommand } from "./commander-
|
|
3
|
+
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-DnIFEmi5.mjs";
|
|
4
|
+
import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/commands/api-keys/api-keys.command.ts
|
|
7
7
|
const ApiKeysCreateOptionsSchema = JsonOptionSchema.extend({ name: z.string().optional() });
|
|
@@ -23,21 +23,21 @@ function createApiKeysCommand() {
|
|
|
23
23
|
description: "Manage API keys for your organization",
|
|
24
24
|
schema: JsonOptionSchema,
|
|
25
25
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
26
|
-
loadHandler: async () => (await import("./list.handler-
|
|
26
|
+
loadHandler: async () => (await import("./list.handler-Bchcr3-e.mjs")).handleApiKeysList,
|
|
27
27
|
subcommands: [
|
|
28
28
|
createTypedCommand({
|
|
29
29
|
name: "list",
|
|
30
30
|
description: "List all API keys for your organization",
|
|
31
31
|
schema: JsonOptionSchema,
|
|
32
32
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
33
|
-
loadHandler: async () => (await import("./list.handler-
|
|
33
|
+
loadHandler: async () => (await import("./list.handler-Bchcr3-e.mjs")).handleApiKeysList
|
|
34
34
|
}),
|
|
35
35
|
createTypedCommand({
|
|
36
36
|
name: "create",
|
|
37
37
|
description: "Create a new API key (raw key shown once)",
|
|
38
38
|
schema: ApiKeysCreateOptionsSchema,
|
|
39
39
|
optionsConfig: CREATE_OPTIONS_CONFIG,
|
|
40
|
-
loadHandler: async () => (await import("./create.handler-
|
|
40
|
+
loadHandler: async () => (await import("./create.handler-CAWJAGzQ.mjs")).handleApiKeysCreate
|
|
41
41
|
}),
|
|
42
42
|
createTypedCommand({
|
|
43
43
|
name: "delete",
|
|
@@ -49,7 +49,7 @@ function createApiKeysCommand() {
|
|
|
49
49
|
description: "API key ID to delete",
|
|
50
50
|
key: "apiKeyId"
|
|
51
51
|
},
|
|
52
|
-
loadHandler: async () => (await import("./delete.handler-
|
|
52
|
+
loadHandler: async () => (await import("./delete.handler-C-5XFkgN.mjs")).handleApiKeysDelete
|
|
53
53
|
})
|
|
54
54
|
]
|
|
55
55
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as CredentialConnectionIdSchema, r as CredentialScopeSchema, t as ConnectionStatusSchema } from "./schema-DFJiNWyd.mjs";
|
|
4
|
-
import { t as CatalogDefinitionSourceSchema } from "./schemas-
|
|
4
|
+
import { t as CatalogDefinitionSourceSchema } from "./schemas-8nhXlXWh.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region ../../packages/shared-types/src/operations/operations.ts
|
|
7
7
|
const JsonRecordSchema = z.record(z.string(), z.unknown());
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as DEFAULT_CLI_WEB_URL } from "./default-urls-BoSm4s9C.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { t as createTypedCommand } from "./commander-
|
|
4
|
+
import { S as AUTH_TIMEOUT_SECONDS } from "./keystroke.mjs";
|
|
5
|
+
import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/commands/auth/auth.command.ts
|
|
8
8
|
const AuthOptionsSchema = z.object({
|
|
@@ -31,7 +31,7 @@ function createAuthCommand() {
|
|
|
31
31
|
schema: AuthOptionsSchema,
|
|
32
32
|
optionsConfig: AUTH_OPTIONS_CONFIG,
|
|
33
33
|
contextMode: "auth-metadata",
|
|
34
|
-
loadHandler: async () => (await import("./auth.handler-
|
|
34
|
+
loadHandler: async () => (await import("./auth.handler-W_xk14TL.mjs")).handleAuth,
|
|
35
35
|
subcommands: [
|
|
36
36
|
createTypedCommand({
|
|
37
37
|
name: "clear",
|
|
@@ -39,21 +39,21 @@ function createAuthCommand() {
|
|
|
39
39
|
schema: AuthClearOptionsSchema,
|
|
40
40
|
optionsConfig: AUTH_CLEAR_OPTIONS_CONFIG,
|
|
41
41
|
contextMode: "auth-metadata",
|
|
42
|
-
loadHandler: async () => (await import("./clear.handler-
|
|
42
|
+
loadHandler: async () => (await import("./clear.handler-_sR33Hp8.mjs")).handleAuthClear
|
|
43
43
|
}),
|
|
44
44
|
createTypedCommand({
|
|
45
45
|
name: "test",
|
|
46
46
|
description: "Verify that the saved API key is valid",
|
|
47
47
|
schema: z.object({}),
|
|
48
48
|
optionsConfig: {},
|
|
49
|
-
loadHandler: async () => (await import("./test.handler-
|
|
49
|
+
loadHandler: async () => (await import("./test.handler-BdCYcwR4.mjs")).handleAuthTest
|
|
50
50
|
}),
|
|
51
51
|
createTypedCommand({
|
|
52
52
|
name: "status",
|
|
53
53
|
description: "Show the current signed-in identity and organization context",
|
|
54
54
|
schema: z.object({}),
|
|
55
55
|
optionsConfig: {},
|
|
56
|
-
loadHandler: async () => (await import("./status.handler-
|
|
56
|
+
loadHandler: async () => (await import("./status.handler-DAId4bVU.mjs")).handleAuthStatus
|
|
57
57
|
})
|
|
58
58
|
]
|
|
59
59
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as DEFAULT_CLI_WEB_URL, t as DEFAULT_CLI_SERVER_URL } from "./default-urls-BoSm4s9C.mjs";
|
|
4
|
-
import { C as
|
|
5
|
-
import { n as credentials } from "./dist-
|
|
4
|
+
import { C as AUTH_URL_PATH, D as CLI_AUTH_COMMAND, E as CALLBACK_PATH, I as logger, T as CALLBACK_LOOPBACK_ORIGIN, d as resolveCliWebUrl, k as CliExitError, p as ui, u as resolveCliServerUrl, w as CALLBACK_LOOPBACK_HOST, x as toErrorMessage } from "./keystroke.mjs";
|
|
5
|
+
import { n as credentials } from "./dist-B5jy238v.mjs";
|
|
6
6
|
import { t as openBrowser } from "./browser-Dvv5OQrt.mjs";
|
|
7
7
|
import { hostname } from "node:os";
|
|
8
|
-
import { z } from "zod";
|
|
9
8
|
import { confirm, isCancel } from "@clack/prompts";
|
|
9
|
+
import { z } from "zod";
|
|
10
10
|
import { randomBytes } from "node:crypto";
|
|
11
11
|
import { createServer } from "node:http";
|
|
12
12
|
//#region src/commands/auth/device-auth.ts
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { M as WorkflowResolutionError, N as throwReportedCliExit, p as ui } from "./keystroke.mjs";
|
|
4
|
+
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
5
|
+
import { a as readManifestsFromOutDir } from "./dist-BmbFJq8U.mjs";
|
|
6
|
+
import { t as requireWorkflowsDir } from "./resolve-project-DLKlAy0z.mjs";
|
|
7
|
+
import { t as createSpinnerProgress } from "./spinner-progress-BYxlr3lY.mjs";
|
|
8
|
+
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Bm8JoVv4.mjs";
|
|
9
|
+
import { i as formatWorkflowInputFlag } from "./schema-display-sZ6ConJd.mjs";
|
|
10
|
+
//#region src/commands/workflows/_shared/authored-workflow-ref.ts
|
|
11
|
+
function workflowIdCommand(label, example) {
|
|
12
|
+
return {
|
|
13
|
+
label,
|
|
14
|
+
example
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** Command-specific hints when a display name is passed instead of an authored workflow id. */
|
|
18
|
+
const WORKFLOW_ID_COMMANDS = {
|
|
19
|
+
run: workflowIdCommand("keystroke workflows run", (id, inputSchema) => `$ keystroke workflows run ${id} ${formatWorkflowInputFlag(inputSchema)}`),
|
|
20
|
+
test: workflowIdCommand("keystroke workflows test", (id, inputSchema) => `$ keystroke workflows test ${id} ${formatWorkflowInputFlag(inputSchema)}`),
|
|
21
|
+
diff: workflowIdCommand("keystroke workflows diff", (id) => `$ keystroke workflows diff ${id}`),
|
|
22
|
+
inspect: workflowIdCommand("keystroke workflows inspect", (id) => `$ keystroke workflows inspect ${id}`),
|
|
23
|
+
inspectDeployed: workflowIdCommand("keystroke workflows inspect --deployed", (id) => `$ keystroke workflows inspect ${id} --deployed`),
|
|
24
|
+
validate: workflowIdCommand("keystroke workflows validate", (id) => `$ keystroke workflows validate ${id}`),
|
|
25
|
+
build: workflowIdCommand("keystroke workflows build", (id) => `$ keystroke workflows build --id ${id}`),
|
|
26
|
+
env: workflowIdCommand("keystroke workflows env", (id) => `$ keystroke workflows env ${id}`),
|
|
27
|
+
logs: workflowIdCommand("keystroke workflows logs", (id) => `$ keystroke workflows logs ${id}`),
|
|
28
|
+
paused: workflowIdCommand("keystroke workflows paused", (id) => `$ keystroke workflows paused ${id}`)
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Rejects refs that match a local manifest display name but not an authored workflow id.
|
|
32
|
+
*/
|
|
33
|
+
async function assertAuthoredWorkflowId(workflowRef, workflowsDir, command, options = {}) {
|
|
34
|
+
let manifests = await readManifestsFromOutDir(workflowsDir);
|
|
35
|
+
if (isAuthoredWorkflowId(workflowRef, manifests)) return;
|
|
36
|
+
rejectDisplayNameRefIfFound(workflowRef, manifests, command);
|
|
37
|
+
if (!options.refreshManifests) return;
|
|
38
|
+
try {
|
|
39
|
+
await runWorkflowBuild({
|
|
40
|
+
workflowsDir,
|
|
41
|
+
verbose: false,
|
|
42
|
+
force: false
|
|
43
|
+
});
|
|
44
|
+
} catch {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
manifests = await readManifestsFromOutDir(workflowsDir);
|
|
48
|
+
if (isAuthoredWorkflowId(workflowRef, manifests)) return;
|
|
49
|
+
rejectDisplayNameRefIfFound(workflowRef, manifests, command);
|
|
50
|
+
}
|
|
51
|
+
function rejectDisplayNameRefIfFound(workflowRef, manifests, command) {
|
|
52
|
+
const match = findUniqueDisplayNameMatch(workflowRef, manifests);
|
|
53
|
+
if (!match) return;
|
|
54
|
+
const authoredWorkflowId = match.manifest.id;
|
|
55
|
+
const inputSchema = match.manifest.workflowSchemas?.input;
|
|
56
|
+
ui.error(`\`${command.label}\` expects the workflow id "${authoredWorkflowId}", not display name "${workflowRef}".`);
|
|
57
|
+
ui.hint(command.example(authoredWorkflowId, inputSchema));
|
|
58
|
+
throwReportedCliExit(`\`${command.label}\` expects the workflow id "${authoredWorkflowId}", not display name "${workflowRef}".`);
|
|
59
|
+
}
|
|
60
|
+
function isAuthoredWorkflowId(workflowRef, manifests) {
|
|
61
|
+
return manifests.some(({ manifest }) => manifest.id === workflowRef);
|
|
62
|
+
}
|
|
63
|
+
function findUniqueDisplayNameMatch(workflowRef, manifests) {
|
|
64
|
+
const nameMatches = manifests.filter(({ manifest }) => manifest.name === workflowRef);
|
|
65
|
+
if (nameMatches.length !== 1) return null;
|
|
66
|
+
return nameMatches[0] ?? null;
|
|
67
|
+
}
|
|
68
|
+
async function requireLocalWorkflowManifest(options) {
|
|
69
|
+
const workflowsDir = await requireWorkflowsDir(options.path);
|
|
70
|
+
await assertAuthoredWorkflowId(options.authoredWorkflowId, workflowsDir, options.command);
|
|
71
|
+
return resolveLocalWorkflowManifest(options.authoredWorkflowId, workflowsDir, { jsonMode: options.jsonMode });
|
|
72
|
+
}
|
|
73
|
+
async function resolveLocalWorkflowManifest(authoredWorkflowId, workflowsDir, options) {
|
|
74
|
+
let results = await readManifestsFromOutDir(workflowsDir, authoredWorkflowId);
|
|
75
|
+
if (results.length === 0) {
|
|
76
|
+
const spinner = !options?.jsonMode ? createSpinnerProgress("[resolve]") : void 0;
|
|
77
|
+
spinner?.start(`Building "${authoredWorkflowId}" to resolve manifest...`);
|
|
78
|
+
try {
|
|
79
|
+
await runWorkflowBuild({
|
|
80
|
+
workflowsDir,
|
|
81
|
+
workflowRef: authoredWorkflowId,
|
|
82
|
+
verbose: false,
|
|
83
|
+
force: false
|
|
84
|
+
});
|
|
85
|
+
spinner?.stop();
|
|
86
|
+
} catch (error) {
|
|
87
|
+
spinner?.stop();
|
|
88
|
+
renderBuildFailure(error);
|
|
89
|
+
throw new WorkflowResolutionError(`Build failed for "${authoredWorkflowId}"`);
|
|
90
|
+
}
|
|
91
|
+
results = await readManifestsFromOutDir(workflowsDir, authoredWorkflowId);
|
|
92
|
+
}
|
|
93
|
+
const found = results[0];
|
|
94
|
+
if (!found) {
|
|
95
|
+
ui.error(`Workflow "${authoredWorkflowId}" not found.`);
|
|
96
|
+
throw new WorkflowResolutionError(`Workflow "${authoredWorkflowId}" not found.`);
|
|
97
|
+
}
|
|
98
|
+
const manifestId = typeof found.manifest.id === "string" && found.manifest.id.length > 0 ? found.manifest.id : null;
|
|
99
|
+
if (!manifestId) {
|
|
100
|
+
ui.error(`Workflow "${authoredWorkflowId}" is missing an authored workflow ID.`);
|
|
101
|
+
throw new WorkflowResolutionError(`Workflow "${authoredWorkflowId}" is missing an authored workflow ID.`);
|
|
102
|
+
}
|
|
103
|
+
const projectConfig = await assertWorkflowProjectRoot(workflowsDir);
|
|
104
|
+
return {
|
|
105
|
+
workflowsDir,
|
|
106
|
+
organizationId: projectConfig.organizationId,
|
|
107
|
+
projectId: projectConfig.projectId,
|
|
108
|
+
authoredWorkflowId: manifestId,
|
|
109
|
+
manifest: found.manifest
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
export { assertAuthoredWorkflowId as n, requireLocalWorkflowManifest as r, WORKFLOW_ID_COMMANDS as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as readOptionalJsonSchemaKeys, t as manifestToDeclaredCredentialRequirement } from "./declared-credential-requirements-B6h4WRv4.mjs";
|
|
4
|
-
import { t as AgentVersionManifestSchema } from "./agent-manifest-
|
|
4
|
+
import { t as AgentVersionManifestSchema } from "./agent-manifest-DfWD5tvv.mjs";
|
|
5
5
|
import { i as createAgentSandboxPackage, n as AGENT_VM_PI_SKILLS_ROOT, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH, t as AGENT_VM_HOST_CALL_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs";
|
|
6
|
-
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-
|
|
7
|
-
import { t as bundleSandboxAgentTarget } from "./workflow-bundler-
|
|
6
|
+
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-I07NYwfH.mjs";
|
|
7
|
+
import { t as bundleSandboxAgentTarget } from "./workflow-bundler-Bs3zQNQv-Dy7lXxy3.mjs";
|
|
8
8
|
import { builtinModules } from "node:module";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { lstat, readFile, readdir, realpath } from "node:fs/promises";
|
|
@@ -166,7 +166,7 @@ const HOST_CALL_STUB_SOURCE = [
|
|
|
166
166
|
"}"
|
|
167
167
|
].join("\n");
|
|
168
168
|
//#endregion
|
|
169
|
-
//#region ../../packages/workflow-builder/dist/build-agents-
|
|
169
|
+
//#region ../../packages/workflow-builder/dist/build-agents-CUzBnlAG.mjs
|
|
170
170
|
const STAGED_LOCAL_SOURCES_PREFIX = ".keystroke/staged-local-sources";
|
|
171
171
|
function normalizeRelativeSandboxPath(targetPath) {
|
|
172
172
|
const normalized = path.posix.normalize(targetPath);
|
|
@@ -258,11 +258,10 @@ function resolveSkillSourceTarget(absolutePath) {
|
|
|
258
258
|
return normalizeRelativeSandboxPath(path.posix.join(relativeSkillsRoot, skillDirName));
|
|
259
259
|
}
|
|
260
260
|
async function collectSandboxSourceFiles(projectRoot, source) {
|
|
261
|
-
|
|
261
|
+
return collectBootstrapFilesFromPath({
|
|
262
262
|
absolutePath: resolveLocalFilesystemPath(projectRoot, source.path),
|
|
263
263
|
targetPath: resolveLocalSourceTarget(source.path)
|
|
264
264
|
});
|
|
265
|
-
return [];
|
|
266
265
|
}
|
|
267
266
|
async function collectSkillSourceFiles(projectRoot, skill) {
|
|
268
267
|
const absolutePath = await resolveSkillSourceDirectory(projectRoot, skill.path);
|
|
@@ -320,14 +319,16 @@ function createSandboxBlock(agentManifest) {
|
|
|
320
319
|
const sandbox = agentManifest.sandbox;
|
|
321
320
|
if (!sandbox) return void 0;
|
|
322
321
|
const setupCommands = sandbox.setupCommands ? [...sandbox.setupCommands] : [];
|
|
322
|
+
const runCommands = sandbox.runCommands ? [...sandbox.runCommands] : [];
|
|
323
323
|
const fileSources = sandbox.fileSources ? [...sandbox.fileSources] : [];
|
|
324
324
|
return {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
} } : {},
|
|
325
|
+
id: sandbox.id,
|
|
326
|
+
name: sandbox.name,
|
|
327
|
+
...sandbox.description ? { description: sandbox.description } : {},
|
|
328
|
+
...sandbox.workdir ? { workdir: sandbox.workdir } : {},
|
|
330
329
|
...setupCommands.length > 0 ? { setupCommands } : {},
|
|
330
|
+
...runCommands.length > 0 ? { runCommands } : {},
|
|
331
|
+
...sandbox.env ? { env: sandbox.env } : {},
|
|
331
332
|
...fileSources.length > 0 ? { fileSources } : {}
|
|
332
333
|
};
|
|
333
334
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { n as formatProgressDuration, t as createSpinnerProgress } from "./spinner-progress-
|
|
3
|
+
import { I as logger } from "./keystroke.mjs";
|
|
4
|
+
import { n as formatProgressDuration, t as createSpinnerProgress } from "./spinner-progress-BYxlr3lY.mjs";
|
|
5
5
|
//#region src/lib/build-progress.ts
|
|
6
6
|
const NEW_STAGE_LABELS = {
|
|
7
7
|
start: "Starting build",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as TaskBuildManifestSchema } from "./task-
|
|
4
|
-
import { n as bundleWorkflowTarget } from "./workflow-bundler-
|
|
5
|
-
import { t as buildTriggerArtifacts } from "./trigger-artifacts-BcRScRSp-
|
|
3
|
+
import { n as TaskBuildManifestSchema } from "./task-DTvLzUkA.mjs";
|
|
4
|
+
import { n as bundleWorkflowTarget } from "./workflow-bundler-Bs3zQNQv-Dy7lXxy3.mjs";
|
|
5
|
+
import { t as buildTriggerArtifacts } from "./trigger-artifacts-BcRScRSp-BRpU-He5.mjs";
|
|
6
6
|
import { performance } from "node:perf_hooks";
|
|
7
|
-
//#region ../../packages/workflow-builder/dist/build-tasks-
|
|
7
|
+
//#region ../../packages/workflow-builder/dist/build-tasks-5eOvI19S.mjs
|
|
8
8
|
async function buildTaskArtifact(options) {
|
|
9
9
|
const { discoveredWorkflow, taskMetadata, projectRoot } = options;
|
|
10
10
|
const totalStartedAt = performance.now();
|
package/dist/{build-workflows-BZ_m97Pr-BiyptCrn.mjs → build-workflows-C-gQM3l5-_zcBHE3M.mjs}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { p as deduplicateCredentialRequirementEntries } from "./credential-requirements-
|
|
4
|
-
import { r as WorkflowBuildManifestSchema, t as WORKFLOW_MANIFEST_GENERATOR } from "./workflow-build-manifest-
|
|
3
|
+
import { p as deduplicateCredentialRequirementEntries } from "./credential-requirements-B5Alhu1v-DanlSKnT.mjs";
|
|
4
|
+
import { r as WorkflowBuildManifestSchema, t as WORKFLOW_MANIFEST_GENERATOR } from "./workflow-build-manifest-CV6bBmDO.mjs";
|
|
5
5
|
import { a as MANIFEST_FILE_NAME, i as FLOW_FILE_NAME, r as BUNDLE_FILE_NAME, s as SOURCE_MAP_FILE_NAME, t as BUILD_DIR_NAME } from "./layout-B95Tku8F.mjs";
|
|
6
6
|
import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-CnBnF2cg.mjs";
|
|
7
|
-
import { n as WorkflowLoaderProtocolError, r as WorkflowMetadataLoadError, s as createLoaderProtocolFailure } from "./import-module-y0glInUe-
|
|
7
|
+
import { n as WorkflowLoaderProtocolError, r as WorkflowMetadataLoadError, s as createLoaderProtocolFailure } from "./import-module-y0glInUe-EuAWaw9g.mjs";
|
|
8
8
|
import { r as toRelativeFilePath } from "./normalize-path-CojS-CgQ-aOM0agxS.mjs";
|
|
9
|
-
import { n as bundleWorkflowTarget } from "./workflow-bundler-
|
|
10
|
-
import { t as buildTriggerArtifacts } from "./trigger-artifacts-BcRScRSp-
|
|
9
|
+
import { n as bundleWorkflowTarget } from "./workflow-bundler-Bs3zQNQv-Dy7lXxy3.mjs";
|
|
10
|
+
import { t as buildTriggerArtifacts } from "./trigger-artifacts-BcRScRSp-BRpU-He5.mjs";
|
|
11
11
|
import * as path$1 from "node:path";
|
|
12
12
|
import { readFile } from "node:fs/promises";
|
|
13
13
|
import { realpathSync } from "node:fs";
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
15
15
|
import { performance } from "node:perf_hooks";
|
|
16
|
-
//#region ../../packages/workflow-builder/dist/build-workflows-
|
|
16
|
+
//#region ../../packages/workflow-builder/dist/build-workflows-C-gQM3l5.mjs
|
|
17
17
|
/**
|
|
18
18
|
* Resolves and categorizes all dependencies for a workflow manifest.
|
|
19
19
|
* - Local files: relative paths with SHA256 content hashes
|
|
@@ -136,13 +136,18 @@ async function buildWorkflowArtifacts(options) {
|
|
|
136
136
|
workflowCount: options.workflowCount,
|
|
137
137
|
elapsedMs: 0
|
|
138
138
|
});
|
|
139
|
+
let workflowWithId = discoveredWorkflow;
|
|
139
140
|
try {
|
|
140
141
|
const { manifest: loadedManifest, flowGraph, triggers: sameFileTriggers, credentialsByCallsiteFingerprint, credentialAttributionWarnings, timing } = metadata;
|
|
142
|
+
workflowWithId = {
|
|
143
|
+
...discoveredWorkflow,
|
|
144
|
+
workflowId: loadedManifest.id
|
|
145
|
+
};
|
|
141
146
|
const nestingErrors = flowGraph.diagnostics?.filter((d) => d.startsWith("[nesting-error]"));
|
|
142
147
|
if (nestingErrors && nestingErrors.length > 0) {
|
|
143
148
|
for (const nestingError of nestingErrors) failures.push({
|
|
144
149
|
kind: "workflow",
|
|
145
|
-
workflow:
|
|
150
|
+
workflow: workflowWithId,
|
|
146
151
|
phase: "flow-graph",
|
|
147
152
|
error: nestingError.replace("[nesting-error] ", "")
|
|
148
153
|
});
|
|
@@ -204,7 +209,7 @@ async function buildWorkflowArtifacts(options) {
|
|
|
204
209
|
} catch (error) {
|
|
205
210
|
const failure = {
|
|
206
211
|
kind: "workflow",
|
|
207
|
-
workflow:
|
|
212
|
+
workflow: workflowWithId,
|
|
208
213
|
phase: "bundle",
|
|
209
214
|
error: error instanceof Error ? error.message : String(error)
|
|
210
215
|
};
|
|
@@ -212,7 +217,7 @@ async function buildWorkflowArtifacts(options) {
|
|
|
212
217
|
options.onProgressEvent?.({
|
|
213
218
|
phase: "workflow-stage",
|
|
214
219
|
stage: "failure",
|
|
215
|
-
workflow:
|
|
220
|
+
workflow: workflowWithId,
|
|
216
221
|
workflowIndex,
|
|
217
222
|
workflowCount: options.workflowCount,
|
|
218
223
|
elapsedMs: 0,
|