@keystrokehq/cli 0.0.1
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/AGENTS-blurb.md +123 -0
- package/LICENSE +42 -0
- package/README.md +177 -0
- package/THIRD_PARTY_NOTICES.md +16 -0
- package/bin/keystroke.mjs +107 -0
- package/dist/_manifest-JSRE3H8k.mjs +385 -0
- package/dist/agent-bundle-package-DWV6B_5q-BtV7Xycc.mjs +2344 -0
- package/dist/agent-manifest-CDnbkR2f.mjs +245 -0
- package/dist/agents-CZJGxVqV.mjs +228 -0
- package/dist/api-keys-D2lgguuY.mjs +40 -0
- package/dist/auth-DN2VusyU.mjs +59 -0
- package/dist/auth.handler-CT1BQUvu.mjs +340 -0
- package/dist/browser-qwFrUH82.mjs +24 -0
- package/dist/build-agents-BmM_AsSd-BGi9wtzt.mjs +514 -0
- package/dist/build-metadata-BWS7uhd_-DR8gJjTX.mjs +1422 -0
- package/dist/build-progress-DgYKb4hB.mjs +183 -0
- package/dist/build-tasks-CdihpudT-D5r5HUHe.mjs +91 -0
- package/dist/build-workflows-CfxBnIWh-CdYPv8w2.mjs +370 -0
- package/dist/build.handler-4799CjWH.mjs +36 -0
- package/dist/chunk-CH6r78ws.mjs +37 -0
- package/dist/clear-cache.handler-B9tqSoSM.mjs +11 -0
- package/dist/clear.handler-BTIXXPTJ.mjs +42 -0
- package/dist/clear.handler-BydlX-zE.mjs +11 -0
- package/dist/commander-DfTVqQ-3.mjs +133 -0
- package/dist/concurrency-gXn9Rw8x-DNl2YtrS.mjs +20 -0
- package/dist/connect-BUXkeH0F.mjs +43 -0
- package/dist/connect.handler-CYel9cy6.mjs +430 -0
- package/dist/constants-CPpPdSNg.mjs +8 -0
- package/dist/context-T7HZuB97.mjs +138 -0
- package/dist/credential-env-map-CI8yWHVy.mjs +28 -0
- package/dist/credential-schema-mismatch-BKo5PjcQ.mjs +76 -0
- package/dist/credentials-CvmjU0lK.mjs +171 -0
- package/dist/credentials-OfVHOtG3.mjs +151216 -0
- package/dist/current-deployment-workflow-poHt27i3.mjs +94 -0
- package/dist/current.handler-B8zKzfPp.mjs +21 -0
- package/dist/delete.handler-bAu1iXVQ.mjs +17 -0
- package/dist/deploy-7Jjls436.mjs +26 -0
- package/dist/deploy-BOPIpRWm.mjs +74 -0
- package/dist/deploy-progress-BmGUNFKg.mjs +70 -0
- package/dist/deploy.handler-BAzgiNhd.mjs +370 -0
- package/dist/detect-env-access-CwkOYeYM-D_BCZqV6.mjs +209 -0
- package/dist/diff-utils-NEfcjqxt.mjs +185 -0
- package/dist/diff.handler-Du7SY8K4.mjs +47 -0
- package/dist/dist-BkJUoBiG.mjs +1116 -0
- package/dist/dist-CUK7yBM0.mjs +308 -0
- package/dist/env-91KwMKov.mjs +140 -0
- package/dist/env.handler-BAzBuMzQ.mjs +277 -0
- package/dist/error-boundary-VL-JLfIa.mjs +34 -0
- package/dist/file-metadata-D1vm-XY2.mjs +191 -0
- package/dist/get-intrinsic-zLxwtrLK.mjs +658 -0
- package/dist/import-module-CV84H5fZ-B_CBCmb4.mjs +1747 -0
- package/dist/init-DpMCotSK.mjs +45 -0
- package/dist/init.handler-CPRnif52.mjs +585 -0
- package/dist/inspect.handler-DT_cD036.mjs +146 -0
- package/dist/integration-catalog-Bt-L3GjF.mjs +104 -0
- package/dist/integrations-DlatPK4W.mjs +79 -0
- package/dist/keystroke.d.mts +3 -0
- package/dist/keystroke.mjs +707 -0
- package/dist/layout-CbMtQ2tm.mjs +67 -0
- package/dist/list-enrichment-y-cwizLr.mjs +189 -0
- package/dist/list.handler-BTWvCyjA.mjs +52 -0
- package/dist/list.handler-CWF_Dj15.mjs +24 -0
- package/dist/list.handler-CZ6G2x_G.mjs +75 -0
- package/dist/list.handler-DWaQkJaR.mjs +51 -0
- package/dist/list.handler-DqbFcBW7.mjs +180 -0
- package/dist/list.handler-lq3ZGAn4.mjs +104 -0
- package/dist/logs-BEg9L5l8.mjs +28 -0
- package/dist/logs.handler-6hoMBzqw.mjs +35 -0
- package/dist/logs.handler-BD_dXiL1.mjs +231 -0
- package/dist/metadata-layout-GUYIUo0i-_aG2zjue.mjs +5877 -0
- package/dist/normalize-path-CojS-CgQ-DLCOvnD1.mjs +20 -0
- package/dist/options-CeaTcFxP.mjs +43 -0
- package/dist/org-xLzBtt2_.mjs +41 -0
- package/dist/output-DM4b7KgY.mjs +72 -0
- package/dist/oxc-B3KI3rf_-n9d1hKNq.mjs +119 -0
- package/dist/paused.handler-BMFm9Cff.mjs +94 -0
- package/dist/project-config-D1qsQlO7.mjs +107 -0
- package/dist/projects-CHkRE9rS.mjs +1574 -0
- package/dist/projects-Cjb7sovS.mjs +30 -0
- package/dist/read-credential-keys-77a91T8M-KA0Iw0Z1.mjs +9 -0
- package/dist/register.handler-BPCdor1_.mjs +86 -0
- package/dist/requirements.handler-DPXdSks3.mjs +201 -0
- package/dist/resolve-project-DDJ29sCF.mjs +35 -0
- package/dist/rolldown-runtime-twds-ZHy-BWWzu8VG.mjs +15 -0
- package/dist/run-polling-CAgFRdK3.mjs +20 -0
- package/dist/runs-D9hNLb9A.mjs +259 -0
- package/dist/schedule-BXx3uXwr.mjs +1142 -0
- package/dist/schema-17qMfNyI.mjs +18 -0
- package/dist/schema-display-CgmeKigW.mjs +130 -0
- package/dist/schemas-CDib1RhE.mjs +125 -0
- package/dist/skills-sync.handler-DIy8GR16.mjs +34 -0
- package/dist/skills.command-CrjI2dN9.mjs +35 -0
- package/dist/skills.handler-Bz8bJKql.mjs +9 -0
- package/dist/source-analysis-Cj-ADyu--BJQcFPCG.mjs +144 -0
- package/dist/spinner-progress-DMVwgqO9.mjs +173 -0
- package/dist/src-C0X6u_Mw.mjs +1340 -0
- package/dist/src-eHwu-Gfw.mjs +369 -0
- package/dist/status.handler-BO4nwvWn.mjs +101 -0
- package/dist/switch.handler-D_9213Vf.mjs +51 -0
- package/dist/sync-BL_Mo5st.mjs +39 -0
- package/dist/sync-keystroke-agent-skills-Kx_H7UTd.mjs +70 -0
- package/dist/sync.handler-BUFPdzWz.mjs +82 -0
- package/dist/task-B2sZMaZu.mjs +8 -0
- package/dist/task-target-build-CBeCKbu2.mjs +432 -0
- package/dist/task-target-deploy-C5X-USeR.mjs +4 -0
- package/dist/task-target-deploy-CA6elFpF-BEr4gkol.mjs +271 -0
- package/dist/task-target-deploy-runner.d.mts +3 -0
- package/dist/task-target-deploy-runner.mjs +202 -0
- package/dist/test-BHTgR3UA.mjs +698 -0
- package/dist/test.handler-BcPQ8b74.mjs +13 -0
- package/dist/trigger-artifacts-DQPbQNqC-B4yeeFBY.mjs +239 -0
- package/dist/trigger-manifest-CY7brZeg.mjs +30 -0
- package/dist/try-deploy.handler-DqybNhXx.mjs +490 -0
- package/dist/upload-CkU--iDC.mjs +207 -0
- package/dist/upload.handler-DCtiznQp.mjs +441 -0
- package/dist/utils-CywxCDM7.mjs +14 -0
- package/dist/validate.handler-DOcTaJL0.mjs +280 -0
- package/dist/workflow-build-DBQaBfnn.mjs +1819 -0
- package/dist/workflow-bundler-BPiqVscj-X1PFFAuP.mjs +167 -0
- package/dist/workflows-g9z87AJJ.mjs +799 -0
- package/dist/writer-BG8poUm3-BbXlU2kI.mjs +426 -0
- package/package.json +87 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-DM4b7KgY.mjs";
|
|
4
|
+
import { t as createTypedCommand } from "./commander-DfTVqQ-3.mjs";
|
|
5
|
+
import { n as CredentialScopeSchema, r as CredentialScopeValues } from "./schema-17qMfNyI.mjs";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
//#region src/commands/credentials/list/list.command.ts
|
|
8
|
+
const ListOptionsSchema = JsonOptionSchema.extend({
|
|
9
|
+
scope: CredentialScopeSchema.optional(),
|
|
10
|
+
credentialSetId: z.string().optional(),
|
|
11
|
+
projectId: z.uuid().optional(),
|
|
12
|
+
path: z.string().optional(),
|
|
13
|
+
limit: z.coerce.number().min(1).max(100).optional().default(100),
|
|
14
|
+
offset: z.coerce.number().min(0).optional().default(0)
|
|
15
|
+
});
|
|
16
|
+
const LIST_OPTIONS_CONFIG = {
|
|
17
|
+
...JSON_OPTION_CONFIG,
|
|
18
|
+
scope: {
|
|
19
|
+
flag: "--scope <scope>",
|
|
20
|
+
description: `Filter by scope: ${CredentialScopeValues.join(" | ")}`
|
|
21
|
+
},
|
|
22
|
+
credentialSetId: {
|
|
23
|
+
flag: "--credential-set-id <id>",
|
|
24
|
+
description: "Filter by credential set ID (e.g. keystroke:slack)"
|
|
25
|
+
},
|
|
26
|
+
projectId: {
|
|
27
|
+
flag: "--project-id <id>",
|
|
28
|
+
description: "Filter project-scoped credential sets to a specific project ID"
|
|
29
|
+
},
|
|
30
|
+
path: {
|
|
31
|
+
flag: "--path <dir>",
|
|
32
|
+
description: "Path to project root (for workflow manifests and .env context)"
|
|
33
|
+
},
|
|
34
|
+
limit: {
|
|
35
|
+
flag: "--limit <n>",
|
|
36
|
+
description: "Page size for server list (1–100, default: 100)"
|
|
37
|
+
},
|
|
38
|
+
offset: {
|
|
39
|
+
flag: "--offset <n>",
|
|
40
|
+
description: "Skip this many server rows before listing (pagination)"
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
function createCredentialsListCommand() {
|
|
44
|
+
return createTypedCommand({
|
|
45
|
+
name: "list",
|
|
46
|
+
description: "List credential sets on the server",
|
|
47
|
+
schema: ListOptionsSchema,
|
|
48
|
+
optionsConfig: LIST_OPTIONS_CONFIG,
|
|
49
|
+
loadHandler: async () => (await import("./list.handler-DqbFcBW7.mjs")).handleCredentialsList
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/commands/credentials/requirements/requirements.command.ts
|
|
54
|
+
const RequirementsOptionsSchema = JsonOptionSchema.extend({ path: z.string().optional() });
|
|
55
|
+
const REQUIREMENTS_OPTIONS_CONFIG = {
|
|
56
|
+
...JSON_OPTION_CONFIG,
|
|
57
|
+
path: {
|
|
58
|
+
flag: "--path <dir>",
|
|
59
|
+
description: "Path to project root"
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function createCredentialsRequirementsCommand() {
|
|
63
|
+
return createTypedCommand({
|
|
64
|
+
name: "requirements",
|
|
65
|
+
description: "Show what credentials built workflows need (keys, KEYSTROKE_* env names, workflows) — from dist manifests, no API call",
|
|
66
|
+
schema: RequirementsOptionsSchema,
|
|
67
|
+
optionsConfig: REQUIREMENTS_OPTIONS_CONFIG,
|
|
68
|
+
loadHandler: async () => (await import("./requirements.handler-DPXdSks3.mjs")).handleCredentialsRequirements
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/commands/credentials/upload/upload.command.ts
|
|
73
|
+
const UploadOptionsSchema = JsonOptionSchema.extend({
|
|
74
|
+
integration: z.string().optional(),
|
|
75
|
+
credentialSet: z.string().optional(),
|
|
76
|
+
keys: z.string().optional(),
|
|
77
|
+
name: z.string().optional(),
|
|
78
|
+
scope: CredentialScopeSchema.default("user"),
|
|
79
|
+
path: z.string().optional(),
|
|
80
|
+
dryRun: z.boolean().optional().default(false),
|
|
81
|
+
update: z.boolean().optional().default(false)
|
|
82
|
+
});
|
|
83
|
+
const UPLOAD_OPTIONS_CONFIG = {
|
|
84
|
+
...JSON_OPTION_CONFIG,
|
|
85
|
+
integration: {
|
|
86
|
+
flag: "--integration <public-id>",
|
|
87
|
+
description: "Official integration public ID (e.g. slack, github, linear). Derives the internal credential identity and keys automatically."
|
|
88
|
+
},
|
|
89
|
+
credentialSet: {
|
|
90
|
+
flag: "--credential-set <id>",
|
|
91
|
+
description: "Explicit custom credential set ID. Requires --keys."
|
|
92
|
+
},
|
|
93
|
+
keys: {
|
|
94
|
+
flag: "--keys <key1,key2>",
|
|
95
|
+
description: "Comma-separated credential keys. Required with --credential-set."
|
|
96
|
+
},
|
|
97
|
+
name: {
|
|
98
|
+
flag: "--name <name>",
|
|
99
|
+
description: "Credential set name (only with --credential-set; default: [CLI] <id>)"
|
|
100
|
+
},
|
|
101
|
+
scope: {
|
|
102
|
+
flag: "--scope <scope>",
|
|
103
|
+
description: `Scope: ${CredentialScopeValues.join(" | ")} (default: user; project resolves from keystroke.config.ts)`
|
|
104
|
+
},
|
|
105
|
+
path: {
|
|
106
|
+
flag: "--path <dir>",
|
|
107
|
+
description: "Path to project root"
|
|
108
|
+
},
|
|
109
|
+
dryRun: {
|
|
110
|
+
flag: "--dry-run",
|
|
111
|
+
description: "Show what would happen without making changes"
|
|
112
|
+
},
|
|
113
|
+
update: {
|
|
114
|
+
flag: "--update",
|
|
115
|
+
description: "Overwrite values for existing credential sets from current env vars"
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
function createCredentialsUploadCommand() {
|
|
119
|
+
return createTypedCommand({
|
|
120
|
+
name: "upload",
|
|
121
|
+
description: "Upload credentials from env vars to the server. Default: reads requirements from built workflow manifests. Use --integration for an official integration or --credential-set + --keys for a custom explicit upload.",
|
|
122
|
+
schema: UploadOptionsSchema,
|
|
123
|
+
optionsConfig: UPLOAD_OPTIONS_CONFIG,
|
|
124
|
+
loadHandler: async () => (await import("./upload.handler-DCtiznQp.mjs")).handleCredentialsUpload
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/commands/credentials/credentials.command.ts
|
|
129
|
+
const CredentialsRootSchema = JsonOptionSchema.extend({
|
|
130
|
+
path: z.string().optional(),
|
|
131
|
+
limit: z.coerce.number().min(1).max(100).optional().default(100),
|
|
132
|
+
offset: z.coerce.number().min(0).optional().default(0)
|
|
133
|
+
});
|
|
134
|
+
function createCredentialsCommand() {
|
|
135
|
+
return createTypedCommand({
|
|
136
|
+
name: "credentials",
|
|
137
|
+
description: "Manage credentials (upload, list, requirements)",
|
|
138
|
+
schema: CredentialsRootSchema,
|
|
139
|
+
optionsConfig: {
|
|
140
|
+
...JSON_OPTION_CONFIG,
|
|
141
|
+
path: {
|
|
142
|
+
flag: "--path <dir>",
|
|
143
|
+
description: "Path to project root (for workflow manifests and .env context)"
|
|
144
|
+
},
|
|
145
|
+
limit: {
|
|
146
|
+
flag: "--limit <n>",
|
|
147
|
+
description: "Page size for server list (1–100, default: 100)"
|
|
148
|
+
},
|
|
149
|
+
offset: {
|
|
150
|
+
flag: "--offset <n>",
|
|
151
|
+
description: "Skip this many server rows before listing (pagination)"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
handler: async (opts, ctx) => {
|
|
155
|
+
const { handleCredentialsList } = await import("./list.handler-DqbFcBW7.mjs");
|
|
156
|
+
await handleCredentialsList({
|
|
157
|
+
...opts,
|
|
158
|
+
scope: void 0,
|
|
159
|
+
credentialSetId: void 0,
|
|
160
|
+
projectId: void 0
|
|
161
|
+
}, ctx);
|
|
162
|
+
},
|
|
163
|
+
subcommands: [
|
|
164
|
+
createCredentialsUploadCommand(),
|
|
165
|
+
createCredentialsListCommand(),
|
|
166
|
+
createCredentialsRequirementsCommand()
|
|
167
|
+
]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
export { createCredentialsCommand };
|