@keystrokehq/cli 0.0.19 → 0.0.21
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/dist/{accept.handler-BVmNNAgL.mjs → accept.handler-C6KBLKmW.mjs} +1 -1
- package/dist/{admin-DQlHFuXn.mjs → admin-D2CQoZAN.mjs} +9 -9
- package/dist/{agents-Dd7UeQCw.mjs → agents-Bn0g5o0o.mjs} +7 -7
- package/dist/{api-nR61stdq.mjs → api-J9UL8pqZ.mjs} +1 -1
- package/dist/{api-keys-BsMBFiD_.mjs → api-keys-BixCnZJW.mjs} +5 -5
- package/dist/{auth-ZTuuEoD6.mjs → auth-yCNMT8sJ.mjs} +14 -7
- package/dist/{auth.handler-C1dZBdaG.mjs → auth.handler-BedGpKh1.mjs} +7 -12
- package/dist/{build-agents-DseUtzd4-CthuIecx.mjs → build-agents-DseUtzd4-DFh2e5Cn.mjs} +5 -5
- package/dist/{build-metadata-C8Ra_Gi--L3l8w0rh.mjs → build-metadata-BB_L45ZS-BtGGjHIV.mjs} +9 -9
- package/dist/{build-progress-AR8xow4_.mjs → build-progress-nYa14iBP.mjs} +1 -1
- package/dist/{build-tasks-GVuMLS0h-BaPhhGXO.mjs → build-tasks-C09SdfjC-B0F7BZZG.mjs} +4 -4
- package/dist/{build-workflows-CV4tBo6S-szwrAGWT.mjs → build-workflows-BZ_m97Pr-DKANy85L.mjs} +9 -9
- package/dist/{build.handler-DJrEMCBw.mjs → build.handler-CyDc8jiZ.mjs} +5 -5
- package/dist/{clear-cache.handler-CTLQ1PIN.mjs → clear-cache.handler-FmJPHdWG.mjs} +1 -1
- package/dist/{clear.handler-BgeAg2de.mjs → clear.handler-Cvb9chs4.mjs} +27 -13
- package/dist/{commander-C5qcOo8m.mjs → commander-9Kro0Dl3.mjs} +4 -7
- package/dist/{connect-BtBKoXpi.mjs → connect-DzVxjeYr.mjs} +2 -2
- package/dist/{connect.handler-E8CmLRSF.mjs → connect.handler-DFQdxkWZ.mjs} +3 -3
- package/dist/{context-BydAGTiB.mjs → context-B2cQ-Nt3.mjs} +29 -3
- package/dist/{create.handler-CBxIPC3r.mjs → create.handler-v9B0Z9Yf.mjs} +1 -1
- package/dist/{credential-env-map-BA4LNI7x.mjs → credential-env-map-Dvp00a4M.mjs} +1 -1
- package/dist/credential-requirements-D0mavK8j-CFMf0Xwu.mjs +619 -0
- package/dist/{credentials-jRiXEr6P.mjs → credentials-DQW8xxof.mjs} +1 -1
- package/dist/{credentials-BGaRMclS.mjs → credentials-Dr5lD7Hm.mjs} +6 -6
- package/dist/{current-deployment-workflow-BVliROAz.mjs → current-deployment-workflow-qMfOrRIu.mjs} +4 -4
- package/dist/{current.handler-DBl9S67d.mjs → current.handler-Cm_-JLyZ.mjs} +1 -1
- package/dist/{delete.handler-Buu7Ip0D.mjs → delete.handler-DtP_zUaq.mjs} +1 -1
- package/dist/{deploy-BPDUTKZD.mjs → deploy-BURTx92e.mjs} +1 -1
- package/dist/{deploy-CzTlgAFj.mjs → deploy-CB6pfCuB.mjs} +2 -2
- package/dist/{deploy-progress-DK87VKJ-.mjs → deploy-progress-Dlp9aBDW.mjs} +1 -1
- package/dist/{deploy.handler-CCcJ7y3A.mjs → deploy.handler-Bg0dpSTj.mjs} +28 -16
- package/dist/{detect-env-access-CwkOYeYM-CNTyUzme.mjs → detect-env-access-CwkOYeYM-D4aTZv4R.mjs} +1 -1
- package/dist/{diff.handler-DUVFixeG.mjs → diff.handler-CJPrszL1.mjs} +4 -4
- package/dist/{dist-Cx0RV8s7.mjs → dist-Br4m3sFZ.mjs} +30 -33
- package/dist/{dist-CIInPRGh.mjs → dist-DuJjDZIf.mjs} +25 -2
- package/dist/{env.handler-C8kNFz2U.mjs → env.handler-6TrLd3fo.mjs} +7 -7
- package/dist/{error-boundary-B8cmSwJH.mjs → error-boundary-DVZipk-A.mjs} +1 -1
- package/dist/{file-metadata-lrX05iRt.mjs → file-metadata-DQVDjr7M.mjs} +2 -7
- package/dist/{import-module--8x5SLum-DjPUZr4i.mjs → import-module-y0glInUe-DxX0-BRO.mjs} +74 -620
- package/dist/{init-DeeOVc9m.mjs → init-DBMtY3eO.mjs} +3 -3
- package/dist/{init.handler-BMdhpusQ.mjs → init.handler-BoYbE-6H.mjs} +3 -3
- package/dist/{inspect.handler-QyTo8rWO.mjs → inspect.handler-Juu2vGbB.mjs} +4 -4
- package/dist/{integration-catalog-CmvYPvI6.mjs → integration-catalog-cYlTmOSb.mjs} +1 -1
- package/dist/{integrations-tXZM-84g.mjs → integrations-cwRfplNG.mjs} +5 -5
- package/dist/{invites-ClyAatBW.mjs → invites-DHyHZOY_.mjs} +4 -4
- package/dist/{invites.list.handler-CPkK_tPM.mjs → invites.list.handler-C-QpsG2J.mjs} +1 -1
- package/dist/{invites.resend.handler-DIRI7tS2.mjs → invites.resend.handler-KFKbSPzR.mjs} +1 -1
- package/dist/{invites.revoke.handler-CcXcDBlU.mjs → invites.revoke.handler-Cuz7jrGC.mjs} +1 -1
- package/dist/keystroke.mjs +21 -21
- package/dist/{list-enrichment-B9238wom.mjs → list-enrichment-CCRHYslm.mjs} +1 -1
- package/dist/{list.handler-Xl_F89kq.mjs → list.handler-6x3GVumu.mjs} +1 -1
- package/dist/{list.handler-tnsRn-Rj.mjs → list.handler-BWsl4iYw.mjs} +4 -4
- package/dist/{list.handler-DdFGHkqt.mjs → list.handler-CLGQDuo5.mjs} +5 -5
- package/dist/{list.handler-BLkQKiV1.mjs → list.handler-Cc-V1TNz.mjs} +1 -1
- package/dist/{list.handler-ClPAPSWm.mjs → list.handler-DRe38pAj.mjs} +2 -2
- package/dist/{list.handler-BB-Dcm5B.mjs → list.handler-Do2tVOnu.mjs} +1 -1
- package/dist/{list.handler-Cbc9rlBx.mjs → list.handler-RtHhrTZ3.mjs} +1 -1
- package/dist/{listen-ksMVpdNa.mjs → listen-DZdSevsB.mjs} +2 -2
- package/dist/{listen.handler-DEJSBg8y.mjs → listen.handler-BccHe1jh.mjs} +2 -2
- package/dist/{logs-C-JxXsgc.mjs → logs-Bh_PBnu6.mjs} +3 -3
- package/dist/{logs.handler-BIegqc2p.mjs → logs.handler-DItDS1zw.mjs} +2 -2
- package/dist/{members.add.handler-D4ggN2Xi.mjs → members.add.handler-D3nQ_Ln6.mjs} +1 -1
- package/dist/{members.invite.handler-BYIt6Oib.mjs → members.invite.handler-rKhg5n_C.mjs} +1 -1
- package/dist/{members.list.handler-CvpeYKC4.mjs → members.list.handler-C9Yh469k.mjs} +1 -1
- package/dist/{members.remove.handler-C4GBUVYE.mjs → members.remove.handler-Dnrck-E6.mjs} +1 -1
- package/dist/{members.update.handler-TpM1oi0L.mjs → members.update.handler-qo5r6arJ.mjs} +1 -1
- package/dist/{normalize-path-CojS-CgQ-D4wSBHgG.mjs → normalize-path-CojS-CgQ-aOM0agxS.mjs} +1 -1
- package/dist/{org-DIGyb7XZ.mjs → org-DnES84sS.mjs} +15 -15
- package/dist/{orgs.create.handler-RIYhse_Q.mjs → orgs.create.handler-DF4eEL-2.mjs} +1 -1
- package/dist/{orgs.get.handler-BfOpbSom.mjs → orgs.get.handler-BmJnseQa.mjs} +1 -1
- package/dist/{orgs.list.handler-BMgj9yTD.mjs → orgs.list.handler-DDVvSbsT.mjs} +1 -1
- package/dist/{paused.handler-DAZ1EaLN.mjs → paused.handler-BLUchSMD.mjs} +1 -1
- package/dist/{projects-Cy6CH3fI.mjs → projects-Cv14bBGy.mjs} +4 -4
- package/dist/{projects-BndElPAx.mjs → projects-ZNcKwds2.mjs} +1 -1
- package/dist/{requirements.handler-C5vobjdJ.mjs → requirements.handler-BKFocUof.mjs} +5 -5
- package/dist/{resolve-cli-credentials-DytxgMwn.mjs → resolve-cli-credentials-DaMDaamj.mjs} +1 -1
- package/dist/{resolve-project-CNQtOWE4.mjs → resolve-project-Cj3MFnU0.mjs} +1 -1
- package/dist/{run-polling-BhOdFyh3.mjs → run-polling-3XOGl4hh.mjs} +3 -3
- package/dist/{run.handler-BpLmwF_a.mjs → run.handler-DZuUx0fi.mjs} +5 -5
- package/dist/{runs-DaSd4eXn.mjs → runs-BOo3j297.mjs} +2 -2
- package/dist/{cron-parser-Dw_cWzFu.mjs → schemas-D2zfmyC-.mjs} +279 -1
- package/dist/{skills-sync.handler-DOxudKmV.mjs → skills-sync.handler-09mDbx5q.mjs} +1 -1
- package/dist/{skills.command-DQc_qGAF.mjs → skills.command-B-MhRN3J.mjs} +4 -4
- package/dist/{source-analysis-BBg2E_6G-Ut7kYHOz.mjs → source-analysis-BBg2E_6G-wPP9mjQx.mjs} +3 -3
- package/dist/{src-0XVwHXNp.mjs → src-DNhUmpSl.mjs} +1 -1
- package/dist/{switch.handler-CCjMrRZN.mjs → switch.handler-BFGvj5c6.mjs} +2 -2
- package/dist/{sync-BdTQDZjP.mjs → sync-CZ3iUPTA.mjs} +2 -2
- package/dist/{sync.handler-DjY8nqbB.mjs → sync.handler-B1L8I9lF.mjs} +7 -7
- package/dist/{task-BRmL2lmw.mjs → task-BWuIKWh4.mjs} +103 -34
- package/dist/{task-target-build-DCV0UDaz.mjs → task-target-build-CTgl4L42.mjs} +42 -56
- package/dist/task-target-deploy-DeUyfi9H.mjs +4 -0
- package/dist/{task-target-deploy-CZBGNC0H-I-tvkGCC.mjs → task-target-deploy-dQYnMO8n-d2vdeqXH.mjs} +14 -16
- package/dist/task-target-deploy-runner.mjs +6 -6
- package/dist/{test-TTQXrhHm.mjs → test-Byq4hG3C.mjs} +2 -2
- package/dist/{test.handler-B7Ahe9ta.mjs → test.handler-BsrMMj5O.mjs} +9 -9
- package/dist/{test.handler-CkkplyX6.mjs → test.handler-CAsVgOpT.mjs} +1 -1
- package/dist/{tool.handler-DMfFZCRg.mjs → tool.handler-BHS5Z4J_.mjs} +8 -8
- package/dist/{trigger-artifacts-RizI57RC-DjhOsdOm.mjs → trigger-artifacts-BcRScRSp-C-JBJ6y8.mjs} +53 -119
- package/dist/trigger-manifest-C07EM-b2.mjs +43 -0
- package/dist/{upgrade-Cx-bUWUc.mjs → upgrade-bZVjVXnu.mjs} +2 -2
- package/dist/{upload.handler-_d2WZwxd.mjs → upload.handler-DXVx2u3A.mjs} +7 -7
- package/dist/{users.get.handler-DIooG7Wy.mjs → users.get.handler-DqD2ELK2.mjs} +1 -1
- package/dist/{users.list.handler-DdGW-DSg.mjs → users.list.handler-DZSPvpGF.mjs} +1 -1
- package/dist/{users.set-role.handler-Ek-kntLp.mjs → users.set-role.handler-73smNUVF.mjs} +1 -1
- package/dist/{utils-BMUWnz1P.mjs → utils-BaxDlCsW.mjs} +1 -1
- package/dist/{validate.handler-Cq2uJjXY.mjs → validate.handler-CmfcMX0t.mjs} +5 -5
- package/dist/{workflow-build-C8AiYxqp.mjs → workflow-build-Bi1Aacc5.mjs} +22 -22
- package/dist/{workflow-build-manifest-BKKW9D05.mjs → workflow-build-manifest-1sC52TIG.mjs} +4 -4
- package/dist/{workflow-bundler-BzHk73PM-WI31RJjH.mjs → workflow-bundler-BzHk73PM-xQwAF08W.mjs} +2 -2
- package/dist/{workflows-K6zetcqI.mjs → workflows-C_C13Zr0.mjs} +19 -19
- package/dist/{writer-B-SpZ0G2-CLh7sXRd.mjs → writer-byNNUjRm-B-on1n6c.mjs} +23 -32
- package/package.json +12 -12
- package/dist/credential-requirements-Ob-7H-0F.mjs +0 -250
- package/dist/schemas-BxFPUGWT.mjs +0 -281
- package/dist/task-target-deploy-DmpCWE3u.mjs +0 -4
- package/dist/trigger-manifest-DxdCjGz_.mjs +0 -29
- /package/dist/{agent-bundle-package-DWV6B_5q-FPT0bJaA.mjs → agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs} +0 -0
- /package/dist/{agent-manifest-tIsqF2OP.mjs → agent-manifest-Pg0aURo7.mjs} +0 -0
- /package/dist/{browser-BpJ8ut9z.mjs → browser-Dvv5OQrt.mjs} +0 -0
- /package/dist/{clear.handler-C_pXAeBG.mjs → clear.handler-BdR56Cok.mjs} +0 -0
- /package/dist/{concurrency-gXn9Rw8x-BTlfau8D.mjs → concurrency-gXn9Rw8x-CnBnF2cg.mjs} +0 -0
- /package/dist/{credential-schema-mismatch-z74ud-YZ.mjs → credential-schema-mismatch-kfGeiSB1.mjs} +0 -0
- /package/dist/{declared-credential-requirements-D6KT-r-e.mjs → declared-credential-requirements-B6h4WRv4.mjs} +0 -0
- /package/dist/{diff-utils-B0ED-Igv.mjs → diff-utils-CXKNQUXO.mjs} +0 -0
- /package/dist/{layout-P1v-Gssz.mjs → layout-B95Tku8F.mjs} +0 -0
- /package/dist/{logs.handler-DyRoevtO.mjs → logs.handler-Bs1DVMaO.mjs} +0 -0
- /package/dist/{metadata-layout-Bv-B0nHj-B1c5giJ7.mjs → metadata-layout-Bv-B0nHj-CO8mjjSl.mjs} +0 -0
- /package/dist/{oxc-B3KI3rf_-Cvx4Z-4H.mjs → oxc-B3KI3rf_-B9omBIuN.mjs} +0 -0
- /package/dist/{read-credential-keys-77a91T8M-B0eiobOd.mjs → read-credential-keys-77a91T8M-aLuQvlIq.mjs} +0 -0
- /package/dist/{register.handler-BXeh5mdb.mjs → register.handler-C_NqMLir.mjs} +0 -0
- /package/dist/{rolldown-runtime-twds-ZHy-8uqgIurC.mjs → rolldown-runtime-twds-ZHy-RuJszab7.mjs} +0 -0
- /package/dist/{run-polling-DARidqo-.mjs → run-polling-DKWPGLyF.mjs} +0 -0
- /package/dist/{schema-BjH_e4Fo.mjs → schema-DFJiNWyd.mjs} +0 -0
- /package/dist/{schema-display-NVEl_DFY.mjs → schema-display-XrRCdFL0.mjs} +0 -0
- /package/dist/{skill-installer-BBgN2tzW.mjs → skill-installer-Cm9hF6OB.mjs} +0 -0
- /package/dist/{skills.handler-Do9I3dQS.mjs → skills.handler-KEUkV5NH.mjs} +0 -0
- /package/dist/{source-analysis-Cs0CTBQk.mjs → source-analysis-z2RSZw6X.mjs} +0 -0
- /package/dist/{spinner-progress-Bx-fYItP.mjs → spinner-progress-BtEIJRX4.mjs} +0 -0
- /package/dist/{status.handler-BsVtDW_V.mjs → status.handler-CW-EFhy3.mjs} +0 -0
- /package/dist/{types-BMBuhHhW.mjs → types-D1cVpE7_.mjs} +0 -0
- /package/dist/{upgrade.handler-5qSzPC7D.mjs → upgrade.handler-C7KvNL0x.mjs} +0 -0
- /package/dist/{upload-BbcMkyVl.mjs → upload-CE4H5R1h.mjs} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
|
|
4
|
-
import { t as createTypedCommand } from "./commander-
|
|
4
|
+
import { t as createTypedCommand } from "./commander-9Kro0Dl3.mjs";
|
|
5
5
|
import { n as SHA256HashSchema, t as JsonSchemaSchema } from "./common-AK0q0Oz0.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-
|
|
6
|
+
import { u as TriggerUploadDataSchema } from "./credential-requirements-D0mavK8j-CFMf0Xwu.mjs";
|
|
7
|
+
import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-1sC52TIG.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
const GitProviderSchema = z.enum(["codestorage", "github"]);
|
|
10
10
|
const GitTreeEntryTypeSchema = z.enum(["file", "directory"]);
|
|
@@ -108,8 +108,8 @@ const activationSharedFields = {
|
|
|
108
108
|
logicalTriggerKey: z.string(),
|
|
109
109
|
status: ActivationStatusSchema,
|
|
110
110
|
/**
|
|
111
|
-
* Per-
|
|
112
|
-
* Key: "
|
|
111
|
+
* Per-poll-export trigger credential bindings.
|
|
112
|
+
* Key: "poll:<credentialDefinitionId>" (e.g. "poll:slack").
|
|
113
113
|
* Value: credential set ID or "<scope>.default".
|
|
114
114
|
*/
|
|
115
115
|
triggerCredentialBindings: z.record(z.string(), z.string()).optional(),
|
|
@@ -320,7 +320,7 @@ function createWorkflowsBuildCommand() {
|
|
|
320
320
|
description: "Build workflows locally",
|
|
321
321
|
schema: WorkflowsBuildOptionsSchema,
|
|
322
322
|
optionsConfig: BUILD_OPTIONS_CONFIG,
|
|
323
|
-
loadHandler: async () => (await import("./build.handler-
|
|
323
|
+
loadHandler: async () => (await import("./build.handler-CyDc8jiZ.mjs")).handleWorkflowsBuild
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
326
|
//#endregion
|
|
@@ -347,7 +347,7 @@ function createWorkflowsDiffCommand() {
|
|
|
347
347
|
description: "Authored workflow id (preferred) or workflow name",
|
|
348
348
|
key: "workflow"
|
|
349
349
|
},
|
|
350
|
-
loadHandler: async () => (await import("./diff.handler-
|
|
350
|
+
loadHandler: async () => (await import("./diff.handler-CJPrszL1.mjs")).handleWorkflowsDiff
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
353
|
//#endregion
|
|
@@ -380,7 +380,7 @@ function createWorkflowsEnvCommand() {
|
|
|
380
380
|
key: "workflow",
|
|
381
381
|
required: false
|
|
382
382
|
},
|
|
383
|
-
loadHandler: async () => (await import("./env.handler-
|
|
383
|
+
loadHandler: async () => (await import("./env.handler-6TrLd3fo.mjs")).handleWorkflowsEnv
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
386
|
//#endregion
|
|
@@ -412,7 +412,7 @@ function createWorkflowsInspectCommand() {
|
|
|
412
412
|
description: "Authored workflow id (preferred) or workflow name",
|
|
413
413
|
key: "workflow"
|
|
414
414
|
},
|
|
415
|
-
loadHandler: async () => (await import("./inspect.handler-
|
|
415
|
+
loadHandler: async () => (await import("./inspect.handler-Juu2vGbB.mjs")).handleWorkflowsInspect
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
418
|
//#endregion
|
|
@@ -508,15 +508,15 @@ function createWorkflowsLogsCommand() {
|
|
|
508
508
|
key: "workflow",
|
|
509
509
|
required: false
|
|
510
510
|
},
|
|
511
|
-
loadHandler: async () => (await import("./logs.handler-
|
|
511
|
+
loadHandler: async () => (await import("./logs.handler-DItDS1zw.mjs")).handleWorkflowsLogs
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region ../../packages/shared-types/src/workflows/api/request.ts
|
|
516
516
|
/** Key format: <stepNodeId>:<credentialDefinitionId> (e.g. step_1:slack). */
|
|
517
517
|
const WORKFLOW_CREDENTIAL_BINDING_KEY_REGEX = /^[a-zA-Z0-9_]+:[a-zA-Z0-9.:_-]+$/;
|
|
518
|
-
/** Key format:
|
|
519
|
-
const TRIGGER_CREDENTIAL_BINDING_KEY_REGEX = /^
|
|
518
|
+
/** Key format: poll:<credentialDefinitionId> (e.g. poll:slack). */
|
|
519
|
+
const TRIGGER_CREDENTIAL_BINDING_KEY_REGEX = /^poll:[a-zA-Z0-9.:_-]+$/;
|
|
520
520
|
/** Value: credential set ID (cset_ + ULID) or <scope>.default */
|
|
521
521
|
const CREDENTIAL_BINDING_VALUE_CREDSET = /^cset_[A-Za-z0-9]{26}$/;
|
|
522
522
|
const CREDENTIAL_BINDING_VALUE_SCOPE_DEFAULT = /^(organization|user|project)\.default$/;
|
|
@@ -533,7 +533,7 @@ const TriggerCredentialBindingsRecordSchema = z.record(z.string(), z.string()).r
|
|
|
533
533
|
if (!CREDENTIAL_BINDING_VALUE_CREDSET.test(value) && !CREDENTIAL_BINDING_VALUE_SCOPE_DEFAULT.test(value)) return false;
|
|
534
534
|
}
|
|
535
535
|
return true;
|
|
536
|
-
}, { message: "triggerCredentialBindings keys must be \"
|
|
536
|
+
}, { message: "triggerCredentialBindings keys must be \"poll:<credentialDefinitionId>\"; values must be credential set ID (cset_...) or \"<scope>.default\"" }).optional();
|
|
537
537
|
z.object({
|
|
538
538
|
workflowName: z.string().min(1),
|
|
539
539
|
args: z.array(z.unknown()).optional().default([]),
|
|
@@ -698,7 +698,7 @@ function createWorkflowsPausedCommand() {
|
|
|
698
698
|
key: "workflow",
|
|
699
699
|
required: false
|
|
700
700
|
},
|
|
701
|
-
loadHandler: async () => (await import("./paused.handler-
|
|
701
|
+
loadHandler: async () => (await import("./paused.handler-BLUchSMD.mjs")).handleWorkflowsPaused
|
|
702
702
|
});
|
|
703
703
|
}
|
|
704
704
|
//#endregion
|
|
@@ -792,7 +792,7 @@ function createWorkflowsRunCommand() {
|
|
|
792
792
|
key: "payload",
|
|
793
793
|
required: false
|
|
794
794
|
}],
|
|
795
|
-
loadHandler: async () => (await import("./run.handler-
|
|
795
|
+
loadHandler: async () => (await import("./run.handler-DZuUx0fi.mjs")).handleWorkflowsRun
|
|
796
796
|
});
|
|
797
797
|
}
|
|
798
798
|
//#endregion
|
|
@@ -847,7 +847,7 @@ function createWorkflowsTestCommand() {
|
|
|
847
847
|
description: "Authored workflow id (preferred) or workflow name. Multiple workflows with the same name run sequentially.",
|
|
848
848
|
key: "workflow"
|
|
849
849
|
},
|
|
850
|
-
loadHandler: async () => (await import("./test.handler-
|
|
850
|
+
loadHandler: async () => (await import("./test.handler-BsrMMj5O.mjs")).handleWorkflowsTest
|
|
851
851
|
});
|
|
852
852
|
}
|
|
853
853
|
//#endregion
|
|
@@ -885,7 +885,7 @@ function createWorkflowsValidateCommand() {
|
|
|
885
885
|
key: "workflow",
|
|
886
886
|
required: false
|
|
887
887
|
},
|
|
888
|
-
loadHandler: async () => (await import("./validate.handler-
|
|
888
|
+
loadHandler: async () => (await import("./validate.handler-CmfcMX0t.mjs")).handleWorkflowsValidate
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
891
|
//#endregion
|
|
@@ -904,14 +904,14 @@ function createWorkflowsCommand() {
|
|
|
904
904
|
description: "Manage, run, inspect, and debug workflows",
|
|
905
905
|
schema: WorkflowsOptionsSchema,
|
|
906
906
|
optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
|
|
907
|
-
loadHandler: async () => (await import("./list.handler-
|
|
907
|
+
loadHandler: async () => (await import("./list.handler-BWsl4iYw.mjs")).handleWorkflowsList,
|
|
908
908
|
subcommands: [
|
|
909
909
|
createTypedCommand({
|
|
910
910
|
name: "list",
|
|
911
911
|
description: "List all workflows in the project",
|
|
912
912
|
schema: WorkflowsOptionsSchema,
|
|
913
913
|
optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
|
|
914
|
-
loadHandler: async () => (await import("./list.handler-
|
|
914
|
+
loadHandler: async () => (await import("./list.handler-BWsl4iYw.mjs")).handleWorkflowsList
|
|
915
915
|
}),
|
|
916
916
|
createWorkflowsBuildCommand(),
|
|
917
917
|
createWorkflowsTestCommand(),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
|
-
import { f as getTriggersDir, n as BUILD_OUTPUT_DIR_NAME, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-
|
|
5
|
-
import { t as TriggerBuildManifestSchema } from "./trigger-manifest-
|
|
6
|
-
import { t as __exportAll$1 } from "./rolldown-runtime-twds-ZHy-
|
|
7
|
-
import { s as sha256String } from "./metadata-layout-Bv-B0nHj-
|
|
8
|
-
import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-
|
|
4
|
+
import { f as getTriggersDir, n as BUILD_OUTPUT_DIR_NAME, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-B95Tku8F.mjs";
|
|
5
|
+
import { t as TriggerBuildManifestSchema } from "./trigger-manifest-C07EM-b2.mjs";
|
|
6
|
+
import { t as __exportAll$1 } from "./rolldown-runtime-twds-ZHy-RuJszab7.mjs";
|
|
7
|
+
import { s as sha256String } from "./metadata-layout-Bv-B0nHj-CO8mjjSl.mjs";
|
|
8
|
+
import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-CnBnF2cg.mjs";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { access, mkdir, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
|
-
//#region ../../packages/workflow-builder/dist/writer-
|
|
13
|
-
var
|
|
12
|
+
//#region ../../packages/workflow-builder/dist/writer-byNNUjRm.mjs
|
|
13
|
+
var writer_byNNUjRm_exports = /* @__PURE__ */ __exportAll({
|
|
14
14
|
a: () => getAgentArtifactPaths,
|
|
15
15
|
d: () => allOutputFilesExist,
|
|
16
16
|
f: () => hashAgentManifestForDisk,
|
|
@@ -34,10 +34,10 @@ function releaseBundleCode(bundle) {
|
|
|
34
34
|
if ("sourceMap" in bundle) bundle.sourceMap = null;
|
|
35
35
|
bundle.released = true;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function markPollBundleDiskBacked(bundle, outputPath) {
|
|
38
38
|
bundle.outputPath = outputPath;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function releasePollBundleCode(bundle) {
|
|
41
41
|
bundle.code = "";
|
|
42
42
|
bundle.released = true;
|
|
43
43
|
}
|
|
@@ -352,8 +352,7 @@ function toTriggerWriteArtifact(trigger, triggerDir) {
|
|
|
352
352
|
triggerId: trigger.triggerId,
|
|
353
353
|
triggerDir,
|
|
354
354
|
manifestPath: path.join(triggerDir, "manifest.json"),
|
|
355
|
-
...trigger.
|
|
356
|
-
...trigger.transformCallbackBundle ? { transformCallbackBundlePath: path.join(triggerDir, "transform.js") } : {}
|
|
355
|
+
...trigger.pollBundle ? { pollBundlePath: path.join(triggerDir, "poll-bundle.js") } : {}
|
|
357
356
|
};
|
|
358
357
|
}
|
|
359
358
|
async function writeTriggerArtifacts(triggers, buildDir, options) {
|
|
@@ -370,36 +369,28 @@ async function writeTriggerArtifacts(triggers, buildDir, options) {
|
|
|
370
369
|
await mkdir(triggerDir, { recursive: true });
|
|
371
370
|
const triggerManifest = TriggerBuildManifestSchema.parse({
|
|
372
371
|
id: trigger.triggerId,
|
|
372
|
+
authoredTriggerId: trigger.authoredTriggerId,
|
|
373
373
|
type: trigger.triggerType,
|
|
374
374
|
...trigger.triggerSource ? { triggerSource: trigger.triggerSource } : {},
|
|
375
|
+
...trigger.webhookAuthGroupKey ? { webhookAuthGroupKey: trigger.webhookAuthGroupKey } : {},
|
|
375
376
|
enabled: trigger.enabled,
|
|
376
377
|
...trigger.schedule ? { schedule: trigger.schedule } : {},
|
|
377
378
|
...trigger.timezone ? { timezone: trigger.timezone } : {},
|
|
378
|
-
...trigger.path ? { path: trigger.path } : {},
|
|
379
|
-
...trigger.method ? { method: trigger.method } : {},
|
|
380
379
|
config: trigger.config ?? (trigger.staticPayload !== void 0 ? { payload: trigger.staticPayload } : {}),
|
|
381
|
-
...trigger.requiredCredentials ? { requiredCredentials: trigger.requiredCredentials } : {}
|
|
380
|
+
...trigger.requiredCredentials ? { requiredCredentials: trigger.requiredCredentials } : {},
|
|
381
|
+
...trigger.filterSchema ? { filterSchema: trigger.filterSchema } : {},
|
|
382
|
+
...trigger.idempotencyConfig ? { idempotencyConfig: trigger.idempotencyConfig } : {}
|
|
382
383
|
});
|
|
383
|
-
if (trigger.
|
|
384
|
-
js: "
|
|
385
|
-
export: exportName
|
|
386
|
-
}]));
|
|
387
|
-
if (trigger.transformCallbackExports && trigger.transformCallbackBundle) triggerManifest.attachmentFunctions = Object.fromEntries(Object.entries(trigger.transformCallbackExports).map(([key, exportName]) => [key, {
|
|
388
|
-
js: "transform.js",
|
|
384
|
+
if (trigger.pollExports && trigger.pollBundle) triggerManifest.functions = Object.fromEntries(Object.entries(trigger.pollExports).map(([key, exportName]) => [key, {
|
|
385
|
+
js: "poll-bundle.js",
|
|
389
386
|
export: exportName
|
|
390
387
|
}]));
|
|
391
388
|
await writeFile(path.join(triggerDir, "manifest.json"), `${JSON.stringify(triggerManifest, null, 2)}\n`, "utf-8");
|
|
392
|
-
if (trigger.
|
|
393
|
-
const
|
|
394
|
-
await writeFile(
|
|
395
|
-
|
|
396
|
-
if (options?.releaseBundleMemory)
|
|
397
|
-
}
|
|
398
|
-
if (trigger.transformCallbackBundle) {
|
|
399
|
-
const transformBundlePath = path.join(triggerDir, "transform.js");
|
|
400
|
-
await writeFile(transformBundlePath, trigger.transformCallbackBundle.code, "utf-8");
|
|
401
|
-
markCallbackBundleDiskBacked(trigger.transformCallbackBundle, transformBundlePath);
|
|
402
|
-
if (options?.releaseBundleMemory) releaseCallbackBundleCode(trigger.transformCallbackBundle);
|
|
389
|
+
if (trigger.pollBundle) {
|
|
390
|
+
const pollBundlePath = path.join(triggerDir, "poll-bundle.js");
|
|
391
|
+
await writeFile(pollBundlePath, trigger.pollBundle.code, "utf-8");
|
|
392
|
+
markPollBundleDiskBacked(trigger.pollBundle, pollBundlePath);
|
|
393
|
+
if (options?.releaseBundleMemory) releasePollBundleCode(trigger.pollBundle);
|
|
403
394
|
}
|
|
404
395
|
results.push(toTriggerWriteArtifact(trigger, triggerDir));
|
|
405
396
|
}
|
|
@@ -423,4 +414,4 @@ var writer_exports = /* @__PURE__ */ __exportAll$1({
|
|
|
423
414
|
writeTargetedBuildOutput: () => writeTargetedBuildOutput
|
|
424
415
|
});
|
|
425
416
|
//#endregion
|
|
426
|
-
export { getAgentArtifactPaths as a, hashWorkflowManifestForDisk as c, resolveOutputDir as d,
|
|
417
|
+
export { getAgentArtifactPaths as a, hashWorkflowManifestForDisk as c, resolveOutputDir as d, writer_byNNUjRm_exports as f, createAgentOutputFiles as i, removeAgentArtifacts as l, BUILD_CACHE_FILE_NAME as n, hashAgentManifestForDisk as o, allOutputFilesExist as r, hashWorkflowFlowForDisk as s, AGENT_ARTIFACT_DIR_PREFIX as t, removeWorkflowArtifacts as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Command-line interface for creating, managing, and deploying Keystroke automations.",
|
|
6
6
|
"type": "module",
|
|
@@ -33,25 +33,25 @@
|
|
|
33
33
|
"rolldown": "1.0.0",
|
|
34
34
|
"tsx": "^4.21.0",
|
|
35
35
|
"zod": "^4.3.6",
|
|
36
|
-
"@keystrokehq/skills": "0.0.
|
|
36
|
+
"@keystrokehq/skills": "0.0.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"tsdown": "0.21.10",
|
|
40
40
|
"typescript": "^5.9.3",
|
|
41
41
|
"vitest": "^4.1.5",
|
|
42
|
-
"@keystroke/env-utils": "0.0.0",
|
|
43
|
-
"@keystroke/local-memory": "0.0.0",
|
|
44
42
|
"@keystrokehq/config": "0.0.2",
|
|
45
|
-
"@keystroke/shared-types": "0.0.
|
|
46
|
-
"@keystroke/
|
|
43
|
+
"@keystroke/shared-types": "0.0.4",
|
|
44
|
+
"@keystroke/local-memory": "0.0.1",
|
|
45
|
+
"@keystroke/env-utils": "0.0.0",
|
|
47
46
|
"@keystroke/typescript-config": "0.0.0",
|
|
47
|
+
"@keystroke/test-utils": "0.0.3",
|
|
48
48
|
"@keystroke/utils": "0.0.0",
|
|
49
|
-
"@keystroke/workflow-builder": "0.0.
|
|
50
|
-
"@keystrokehq/
|
|
51
|
-
"@keystrokehq/
|
|
52
|
-
"@keystroke/workflow-
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
49
|
+
"@keystroke/workflow-builder": "0.0.6",
|
|
50
|
+
"@keystrokehq/testing": "0.2.2",
|
|
51
|
+
"@keystrokehq/core": "0.0.7",
|
|
52
|
+
"@keystroke/workflow-deploy": "0.0.5",
|
|
53
|
+
"@keystrokehq/workflow-build-contracts": "0.0.3",
|
|
54
|
+
"@keystroke/workflow-sdk": "0.0.3"
|
|
55
55
|
},
|
|
56
56
|
"keywords": [
|
|
57
57
|
"automation",
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { t as JsonSchemaSchema } from "./common-AK0q0Oz0.mjs";
|
|
4
|
-
import { n as credentialSetProxyConfigSchema } from "./schemas-BxFPUGWT.mjs";
|
|
5
|
-
import { a as SourceLocationSchema, i as ImportSourceSchema, t as CallKindSchema } from "./source-analysis-Cs0CTBQk.mjs";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
const IntegrationScopeSchema = z.enum([
|
|
8
|
-
"organization",
|
|
9
|
-
"project",
|
|
10
|
-
"user_provided_credential"
|
|
11
|
-
]);
|
|
12
|
-
const IntegrationCredentialRefSchema = z.discriminatedUnion("type", [z.object({
|
|
13
|
-
type: z.literal("id"),
|
|
14
|
-
id: z.string().startsWith("cset_")
|
|
15
|
-
}), z.object({
|
|
16
|
-
type: z.literal("name"),
|
|
17
|
-
name: z.string().trim().min(1)
|
|
18
|
-
})]);
|
|
19
|
-
function hasProjectOrOrganizationScope(scope) {
|
|
20
|
-
return scope === "organization" || scope === "project";
|
|
21
|
-
}
|
|
22
|
-
const CredentialRefTokenKeyNameSchema = z.string().regex(/^[A-Za-z0-9_]+$/, "Credential key must contain only letters, digits, and underscores (required for ref-token proxying)");
|
|
23
|
-
/** Shared enum for top-level credential-set `onCredentialRevoked` policy. */
|
|
24
|
-
const OnCredentialRevokedSchema = z.enum(["fail", "retry-once"]);
|
|
25
|
-
/** A credential set after resolution in a built manifest. Contains definition id, scope, alias, and credential keys.*/
|
|
26
|
-
const ResolvedCredentialSetSchema = z.object({
|
|
27
|
-
resolvedId: z.string(),
|
|
28
|
-
scope: IntegrationScopeSchema.optional(),
|
|
29
|
-
alias: z.string().optional(),
|
|
30
|
-
credentialRef: IntegrationCredentialRefSchema.optional(),
|
|
31
|
-
/** Auth-shape keys expected post-resolve. */
|
|
32
|
-
credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
|
|
33
|
-
/** Subset of `credentialKeys` that are optional in the auth shape. */
|
|
34
|
-
optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
35
|
-
/** Stored-shape keys required for vault reads and upload flows. */
|
|
36
|
-
storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
37
|
-
/** Subset of `storedCredentialKeys` that may be absent from the vault without
|
|
38
|
-
* failing resolution. Derived from the credential set's `stored` schema:
|
|
39
|
-
* a Zod field wrapped in `.optional()` / `.default()` or a JSON Schema
|
|
40
|
-
* property not listed in `required` is considered optional. */
|
|
41
|
-
optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
42
|
-
proxy: credentialSetProxyConfigSchema.optional(),
|
|
43
|
-
/** When true, resolved values are passed raw (no ref-token proxy) for this set. */
|
|
44
|
-
needsRawSecret: z.boolean().optional(),
|
|
45
|
-
/** When true, this requirement uses a registered dynamic resolver phase. */
|
|
46
|
-
needsDynamicResolution: z.boolean().optional(),
|
|
47
|
-
/** Cache TTL in milliseconds for registered dynamic resolver output.
|
|
48
|
-
* `0` or absence means no cache hint. */
|
|
49
|
-
dynamicResolutionCacheMs: z.number().int().nonnegative().optional(),
|
|
50
|
-
/** Policy when a step throws `CredentialRevokedError` against this credential set. */
|
|
51
|
-
onCredentialRevoked: OnCredentialRevokedSchema.optional(),
|
|
52
|
-
/** Persistence-layer schema fingerprint stamped at build time. The
|
|
53
|
-
* resolver's phase 2 compares this against the vault row's stored
|
|
54
|
-
* fingerprint and raises `CredentialSchemaMismatchError` on drift.
|
|
55
|
-
* Optional here so pre-fingerprint artifacts still parse; the
|
|
56
|
-
* workflow builder populates it for every authored credential set
|
|
57
|
-
* that has a resolvable fingerprint. */
|
|
58
|
-
schemaFingerprint: z.string().optional()
|
|
59
|
-
}).superRefine((value, ctx) => {
|
|
60
|
-
if (value.credentialRef && !hasProjectOrOrganizationScope(value.scope)) ctx.addIssue({
|
|
61
|
-
code: z.ZodIssueCode.custom,
|
|
62
|
-
path: ["credentialRef"],
|
|
63
|
-
message: "credentialRef requires scope to be \"project\" or \"organization\""
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
const DeclaredCredentialRequirementSchema = z.object({
|
|
67
|
-
credentialSetId: z.string(),
|
|
68
|
-
/** Auth-shape keys expected post-resolve. */
|
|
69
|
-
credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
|
|
70
|
-
/** Optional subset of the auth-shape keys. */
|
|
71
|
-
optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
72
|
-
/** Stored-shape keys required for vault reads. */
|
|
73
|
-
storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
74
|
-
/** Optional subset of the stored-shape keys. */
|
|
75
|
-
optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
76
|
-
schemaFingerprint: z.string().optional(),
|
|
77
|
-
needsDynamicResolution: z.boolean().optional(),
|
|
78
|
-
/** Cache TTL in milliseconds for registered dynamic resolver output.
|
|
79
|
-
* `0` or absence means no cache hint. */
|
|
80
|
-
dynamicResolutionCacheMs: z.number().int().nonnegative().optional(),
|
|
81
|
-
/** Policy when a step throws `CredentialRevokedError` against this credential set. */
|
|
82
|
-
onCredentialRevoked: OnCredentialRevokedSchema.optional(),
|
|
83
|
-
proxy: credentialSetProxyConfigSchema.optional(),
|
|
84
|
-
needsRawSecret: z.boolean().optional(),
|
|
85
|
-
requiredOAuthScopes: z.array(z.string()).optional()
|
|
86
|
-
});
|
|
87
|
-
const CredentialRequirementEntrySchema = z.object({
|
|
88
|
-
credentialSetId: z.string(),
|
|
89
|
-
scope: IntegrationScopeSchema.optional(),
|
|
90
|
-
alias: z.string().optional(),
|
|
91
|
-
credentialRef: IntegrationCredentialRefSchema.optional(),
|
|
92
|
-
/** Auth-shape keys expected post-resolve. */
|
|
93
|
-
credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
|
|
94
|
-
/** Optional subset of the auth-shape keys. */
|
|
95
|
-
optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
96
|
-
/** Stored-shape keys required for vault reads. */
|
|
97
|
-
storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
98
|
-
/** Optional subset of the stored-shape keys. */
|
|
99
|
-
optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
100
|
-
schemaFingerprint: z.string().optional(),
|
|
101
|
-
proxy: credentialSetProxyConfigSchema.optional(),
|
|
102
|
-
needsRawSecret: z.boolean().optional(),
|
|
103
|
-
/** When true, this requirement uses a registered dynamic resolver phase. */
|
|
104
|
-
needsDynamicResolution: z.boolean().optional(),
|
|
105
|
-
/** Cache TTL in milliseconds for registered dynamic resolver output.
|
|
106
|
-
* `0` or absence means no cache hint. */
|
|
107
|
-
dynamicResolutionCacheMs: z.number().int().nonnegative().optional(),
|
|
108
|
-
/** Policy when a step throws `CredentialRevokedError` against this credential set. */
|
|
109
|
-
onCredentialRevoked: OnCredentialRevokedSchema.optional(),
|
|
110
|
-
requiredOAuthScopes: z.array(z.string()).optional()
|
|
111
|
-
}).superRefine((value, ctx) => {
|
|
112
|
-
if (value.credentialRef && !hasProjectOrOrganizationScope(value.scope)) ctx.addIssue({
|
|
113
|
-
code: z.ZodIssueCode.custom,
|
|
114
|
-
path: ["credentialRef"],
|
|
115
|
-
message: "credentialRef requires scope to be \"project\" or \"organization\""
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
const CredentialRequirementsSchema = z.object({
|
|
119
|
-
required: z.array(z.string()),
|
|
120
|
-
byStep: z.record(z.string(), z.array(CredentialRequirementEntrySchema))
|
|
121
|
-
});
|
|
122
|
-
const TriggerCallbackNameSchema = z.enum([
|
|
123
|
-
"filter",
|
|
124
|
-
"idempotencyKey",
|
|
125
|
-
"verify",
|
|
126
|
-
"callback"
|
|
127
|
-
]);
|
|
128
|
-
const TriggerCredentialRequirementEntrySchema = CredentialRequirementEntrySchema;
|
|
129
|
-
const TriggerCredentialRequirementsSchema = z.object({
|
|
130
|
-
required: z.array(z.string()),
|
|
131
|
-
byCallback: z.partialRecord(TriggerCallbackNameSchema, z.array(TriggerCredentialRequirementEntrySchema))
|
|
132
|
-
});
|
|
133
|
-
function buildCredentialRequirementEntryKey(entry) {
|
|
134
|
-
const credentialRefKey = entry.credentialRef ? entry.credentialRef.type === "id" ? `id:${entry.credentialRef.id}` : `name:${entry.credentialRef.name}` : "";
|
|
135
|
-
return [
|
|
136
|
-
entry.credentialSetId,
|
|
137
|
-
entry.scope ?? "",
|
|
138
|
-
entry.alias ?? "",
|
|
139
|
-
credentialRefKey,
|
|
140
|
-
entry.schemaFingerprint ?? "",
|
|
141
|
-
[...entry.credentialKeys].sort().join(","),
|
|
142
|
-
[...entry.optionalCredentialKeys ?? []].sort().join(","),
|
|
143
|
-
[...entry.storedCredentialKeys ?? []].sort().join(","),
|
|
144
|
-
[...entry.optionalStoredCredentialKeys ?? []].sort().join(","),
|
|
145
|
-
entry.needsRawSecret === true ? "1" : "0",
|
|
146
|
-
entry.needsDynamicResolution === true ? "1" : "0",
|
|
147
|
-
typeof entry.dynamicResolutionCacheMs === "number" ? String(entry.dynamicResolutionCacheMs) : "",
|
|
148
|
-
entry.onCredentialRevoked ?? "",
|
|
149
|
-
entry.proxy ? JSON.stringify(entry.proxy) : ""
|
|
150
|
-
].join("|");
|
|
151
|
-
}
|
|
152
|
-
function deduplicateCredentialRequirementEntries(entries) {
|
|
153
|
-
const deduped = /* @__PURE__ */ new Map();
|
|
154
|
-
for (const entry of entries) {
|
|
155
|
-
const key = buildCredentialRequirementEntryKey(entry);
|
|
156
|
-
const existing = deduped.get(key);
|
|
157
|
-
if (!existing) deduped.set(key, {
|
|
158
|
-
...entry,
|
|
159
|
-
credentialKeys: [...entry.credentialKeys].sort(),
|
|
160
|
-
...entry.optionalCredentialKeys ? { optionalCredentialKeys: [...entry.optionalCredentialKeys].sort() } : {},
|
|
161
|
-
...entry.storedCredentialKeys ? { storedCredentialKeys: [...entry.storedCredentialKeys].sort() } : {},
|
|
162
|
-
...entry.optionalStoredCredentialKeys ? { optionalStoredCredentialKeys: [...entry.optionalStoredCredentialKeys].sort() } : {}
|
|
163
|
-
});
|
|
164
|
-
else if (entry.requiredOAuthScopes?.length) {
|
|
165
|
-
const merged = new Set([...existing.requiredOAuthScopes ?? [], ...entry.requiredOAuthScopes]);
|
|
166
|
-
deduped.set(key, {
|
|
167
|
-
...existing,
|
|
168
|
-
requiredOAuthScopes: [...merged].sort()
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
return [...deduped.values()];
|
|
173
|
-
}
|
|
174
|
-
function collectCredentialRequirementEntries(credentialRequirements) {
|
|
175
|
-
if (!credentialRequirements) return [];
|
|
176
|
-
return deduplicateCredentialRequirementEntries(Object.values(credentialRequirements.byStep ?? {}).flat());
|
|
177
|
-
}
|
|
178
|
-
z.object({ subjectMode: z.enum(["never", "requiredWhenUserProvidedCredential"]) });
|
|
179
|
-
/** A step's entry within a WorkflowManifest. Describes how a step is used in a workflow, not what the step itself is. */
|
|
180
|
-
const WorkflowStepEntrySchema = z.object({
|
|
181
|
-
nodeId: z.string().min(1),
|
|
182
|
-
stepName: z.string().min(1),
|
|
183
|
-
label: z.string().min(1),
|
|
184
|
-
callKind: CallKindSchema,
|
|
185
|
-
stepId: z.string().min(1).optional(),
|
|
186
|
-
source: SourceLocationSchema.optional(),
|
|
187
|
-
astKind: z.string().min(1).optional(),
|
|
188
|
-
importSource: ImportSourceSchema.optional(),
|
|
189
|
-
outputBinding: z.string().min(1).optional(),
|
|
190
|
-
scopeOverride: IntegrationScopeSchema.optional(),
|
|
191
|
-
description: z.string().optional(),
|
|
192
|
-
sourceCode: z.string().optional(),
|
|
193
|
-
exportName: z.string().optional(),
|
|
194
|
-
inputSchema: JsonSchemaSchema.optional(),
|
|
195
|
-
outputSchema: JsonSchemaSchema.optional(),
|
|
196
|
-
credentialSets: z.array(ResolvedCredentialSetSchema).optional()
|
|
197
|
-
});
|
|
198
|
-
const TriggerTypeSchema = z.enum([
|
|
199
|
-
"webhook",
|
|
200
|
-
"cron",
|
|
201
|
-
"polling"
|
|
202
|
-
]);
|
|
203
|
-
/**
|
|
204
|
-
* Persisted on `deployment_triggers.trigger_source`. Mirrors the
|
|
205
|
-
* `webhookTrigger({ source: { type } })` discriminator so the server
|
|
206
|
-
* can index-filter app-source rows during provider-webhook fanout.
|
|
207
|
-
*/
|
|
208
|
-
const TriggerSourceSchema = z.enum(["custom", "app"]);
|
|
209
|
-
const WebhookMethodSchema = z.enum([
|
|
210
|
-
"GET",
|
|
211
|
-
"POST",
|
|
212
|
-
"PUT",
|
|
213
|
-
"PATCH"
|
|
214
|
-
]);
|
|
215
|
-
const TriggerCallbackBundleUploadSchema = z.object({
|
|
216
|
-
code: z.string(),
|
|
217
|
-
hash: z.string(),
|
|
218
|
-
size: z.number()
|
|
219
|
-
});
|
|
220
|
-
const TriggerCallbackExportsSchema = z.object({
|
|
221
|
-
verify: z.string().min(1).optional(),
|
|
222
|
-
filter: z.string().min(1).optional(),
|
|
223
|
-
idempotencyKey: z.string().min(1).optional(),
|
|
224
|
-
callback: z.string().min(1).optional()
|
|
225
|
-
});
|
|
226
|
-
const TransformCallbackExportsSchema = z.object({ transform: z.string().min(1).optional() });
|
|
227
|
-
const TriggerUploadDataSchema = z.object({
|
|
228
|
-
id: z.string(),
|
|
229
|
-
type: TriggerTypeSchema,
|
|
230
|
-
/**
|
|
231
|
-
* Source-of-truth discriminator for webhook triggers. `'custom'` means
|
|
232
|
-
* the trigger owns its own HTTP path; `'app'` means it is fanned out by
|
|
233
|
-
* a Keystroke-managed provider app. Undefined for non-webhook triggers.
|
|
234
|
-
*/
|
|
235
|
-
triggerSource: TriggerSourceSchema.optional(),
|
|
236
|
-
enabled: z.boolean(),
|
|
237
|
-
path: z.string().optional(),
|
|
238
|
-
method: WebhookMethodSchema.optional(),
|
|
239
|
-
schedule: z.string().optional(),
|
|
240
|
-
timezone: z.string().optional(),
|
|
241
|
-
config: z.record(z.string(), z.unknown()).optional(),
|
|
242
|
-
requiredCredentials: TriggerCredentialRequirementsSchema.optional(),
|
|
243
|
-
storagePath: z.string().min(1).optional(),
|
|
244
|
-
callbackBundle: TriggerCallbackBundleUploadSchema.optional(),
|
|
245
|
-
callbackExports: TriggerCallbackExportsSchema.optional(),
|
|
246
|
-
transformCallbackBundle: TriggerCallbackBundleUploadSchema.optional(),
|
|
247
|
-
transformCallbackExports: TransformCallbackExportsSchema.optional()
|
|
248
|
-
});
|
|
249
|
-
//#endregion
|
|
250
|
-
export { TriggerCredentialRequirementsSchema as a, TriggerUploadDataSchema as c, collectCredentialRequirementEntries as d, deduplicateCredentialRequirementEntries as f, ResolvedCredentialSetSchema as i, WebhookMethodSchema as l, DeclaredCredentialRequirementSchema as n, TriggerSourceSchema as o, IntegrationScopeSchema as r, TriggerTypeSchema as s, CredentialRequirementsSchema as t, WorkflowStepEntrySchema as u };
|