deepline 0.3.582 → 0.4.0
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/bundling-sources/sdk/src/client-core.ts +79 -36
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/release.ts +7 -3
- package/dist/bundling-sources/sdk/src/types.ts +37 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +22 -3
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +94 -5
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +66 -12
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-tuple-recovery.ts +9 -3
- package/dist/bundling-sources/shared_libs/play-runtime/docflow-node-io.ts +86 -20
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +17 -6
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +22 -6
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +54 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/postgres-adapter.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/row-failure-summary.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +62 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +197 -19
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-writer.ts +25 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +140 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-wake-policy.ts +419 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +47 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +24 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +36 -19
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +380 -51
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +21 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +32 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +6 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -1
- package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +34 -4
- package/dist/bundling-sources/shared_libs/plays/docflow-recording-lint.ts +512 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-requirement.ts +346 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-rule-codes.ts +38 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-unreached-reason.ts +42 -2
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +223 -32
- package/dist/bundling-sources/shared_libs/plays/play-check-compact.ts +14 -1
- package/dist/bundling-sources/shared_libs/plays/run-result.ts +35 -0
- package/dist/cli/{agents-UAXDG4FS.mjs → agents-AHXB7N7Y.mjs} +68 -4
- package/dist/cli/{agents-2L73CJHH.js → agents-KBZ7OUZS.js} +95 -31
- package/dist/cli/{auth-3B2QB4UH.mjs → auth-3CACO52T.mjs} +5 -5
- package/dist/cli/auth-UOHCO5K6.js +44 -0
- package/dist/cli/{billing-E7FO622G.js → billing-5KXPGKMO.js} +105 -105
- package/dist/cli/{billing-CPBRWG3M.mjs → billing-TSTK63NB.mjs} +9 -9
- package/dist/cli/{chunk-3DVWSTAI.mjs → chunk-2GWKBQJZ.mjs} +1 -1
- package/dist/cli/{chunk-PNQVB4UD.mjs → chunk-3DJMPID5.mjs} +11 -11
- package/dist/cli/{chunk-FBSPHBAF.js → chunk-3ET6NRXP.js} +7 -3
- package/dist/cli/{chunk-NZR5PBNP.mjs → chunk-3MWTAM3F.mjs} +3 -3
- package/dist/cli/{chunk-ROUNT4NX.mjs → chunk-4ANDW2OT.mjs} +1 -1
- package/dist/cli/{chunk-ZH23XGJO.js → chunk-4BSCSQ6I.js} +4 -4
- package/dist/cli/{chunk-7QX5PCHP.mjs → chunk-4UEXAMDU.mjs} +2 -2
- package/dist/cli/{chunk-3EOET5UB.js → chunk-5XGLDVSD.js} +100 -100
- package/dist/cli/{chunk-MRSYC74T.js → chunk-7XXJJVSI.js} +5 -5
- package/dist/cli/{chunk-NJGXYYHN.js → chunk-7ZCD7OPO.js} +5 -5
- package/dist/cli/{chunk-JF4DUC2F.mjs → chunk-AJJSKKH4.mjs} +2 -2
- package/dist/cli/{chunk-XYQMOXP4.mjs → chunk-BHF5UW34.mjs} +1 -1
- package/dist/cli/{chunk-POYADK77.js → chunk-BO2TXH5Y.js} +20 -20
- package/dist/cli/{chunk-RNZXMOA6.mjs → chunk-BUC2TNF2.mjs} +2 -2
- package/dist/cli/{chunk-EGH4JNJP.js → chunk-BUUAFSSN.js} +68 -50
- package/dist/cli/{chunk-GZBXN56A.js → chunk-C45E47KC.js} +23 -23
- package/dist/cli/{chunk-HP6A3JCX.js → chunk-D4R3AL4F.js} +5 -5
- package/dist/cli/{chunk-ABJZQHON.mjs → chunk-DAZRIAXW.mjs} +4 -4
- package/dist/cli/{chunk-SKKRESFB.js → chunk-DNOZQGJF.js} +3 -3
- package/dist/cli/{chunk-DPLYQITT.js → chunk-DUL6UQ2T.js} +2 -2
- package/dist/cli/{chunk-U2QQQNWW.mjs → chunk-ES3S6UXR.mjs} +2 -2
- package/dist/cli/{chunk-4TTEAUZV.mjs → chunk-FDAYUP3M.mjs} +3 -3
- package/dist/cli/{chunk-V54YQHPV.js → chunk-FEVUIT2U.js} +6 -6
- package/dist/cli/{chunk-KDITCSPN.mjs → chunk-FSPEUU3V.mjs} +68 -6
- package/dist/cli/{chunk-OUFOJTEJ.mjs → chunk-FZZMCVOS.mjs} +5 -5
- package/dist/cli/{chunk-ISN4F6AY.js → chunk-GHOB72U6.js} +13 -13
- package/dist/cli/{chunk-LHA45DNY.mjs → chunk-GLYWRTEL.mjs} +3 -3
- package/dist/cli/{chunk-LDMCTV2Z.mjs → chunk-HNTIGYRT.mjs} +1 -1
- package/dist/cli/{chunk-EB2YLLZJ.js → chunk-IGPHYKEJ.js} +41 -41
- package/dist/cli/{chunk-VA35T3AF.js → chunk-ISSYN3DJ.js} +20 -20
- package/dist/cli/{chunk-DSHIB2XQ.mjs → chunk-JKQPITEE.mjs} +54 -36
- package/dist/cli/{chunk-ZARGHLZZ.mjs → chunk-KMLACXI2.mjs} +7 -3
- package/dist/cli/{chunk-DI5MULNX.js → chunk-KQXACHYA.js} +26 -26
- package/dist/cli/{chunk-CPZL6Z7D.js → chunk-LW2GKYZW.js} +2 -2
- package/dist/cli/{chunk-G5YU6RJ4.mjs → chunk-O2KSPI2M.mjs} +2 -2
- package/dist/cli/{chunk-H3KVMALU.js → chunk-O6GT6JD7.js} +9 -9
- package/dist/cli/{chunk-4ZAWRCB6.mjs → chunk-OCXWUWUI.mjs} +5 -5
- package/dist/cli/{chunk-YPP436NM.js → chunk-QKRDAJ3T.js} +53 -53
- package/dist/cli/{chunk-KQEW3EAU.js → chunk-QQESWF6D.js} +16 -16
- package/dist/cli/{chunk-CYZSHD66.js → chunk-REX5SUYU.js} +2 -2
- package/dist/cli/{chunk-Z3IAEHID.js → chunk-RXIQWG2N.js} +48 -48
- package/dist/cli/{chunk-5436ZJPH.js → chunk-S33BN7GZ.js} +3 -3
- package/dist/cli/{chunk-JD7P73ZW.mjs → chunk-SGRJJLNV.mjs} +1 -1
- package/dist/cli/{chunk-2K6EIL2D.mjs → chunk-TCNYSNVU.mjs} +1 -1
- package/dist/cli/{chunk-I5J6HGVR.mjs → chunk-TFPMVSGK.mjs} +2 -2
- package/dist/cli/{chunk-6NEMTKTA.mjs → chunk-V73WDQEA.mjs} +5 -5
- package/dist/cli/{chunk-Y36SQMSN.js → chunk-VYERVFGB.js} +68 -6
- package/dist/cli/{chunk-SYWLWTWM.mjs → chunk-WBRSVML3.mjs} +4 -4
- package/dist/cli/{chunk-NVHICORD.mjs → chunk-WW52ANX4.mjs} +2 -2
- package/dist/cli/{chunk-3HIJNXRB.js → chunk-XZS35M3Y.js} +10 -10
- package/dist/cli/{chunk-ZL3O7F5J.js → chunk-YNYHYL5C.js} +15 -15
- package/dist/cli/{chunk-FWB3QR7W.mjs → chunk-ZHE5E2WJ.mjs} +1 -1
- package/dist/cli/{chunk-D7J33HTK.mjs → chunk-ZJ2H77VV.mjs} +5 -5
- package/dist/cli/{chunk-JUZIMW4S.js → chunk-ZX6UVPGZ.js} +7 -7
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-H5SZUA5J.js +22 -0
- package/dist/cli/{concurrent-runs-help-UFNYQYU2.mjs → concurrent-runs-help-IYELSCHB.mjs} +6 -6
- package/dist/cli/{csv-QSDRGLQH.mjs → csv-ENEC3APZ.mjs} +4 -4
- package/dist/cli/{csv-ZI5LYFHF.js → csv-X6CP57R4.js} +13 -13
- package/dist/cli/{db-ZDL6Q53U.js → db-6HLRSE2M.js} +27 -27
- package/dist/cli/{db-WVWXNNMO.mjs → db-YGKRFK4T.mjs} +6 -6
- package/dist/cli/{describe-UUQBKUVL.mjs → describe-4SGQEX7K.mjs} +18 -18
- package/dist/cli/describe-Q2OYHDVZ.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-SCGHTWTC.js → executions-IC55YJ67.js} +8 -8
- package/dist/cli/{executions-QN3OYJKT.mjs → executions-PO2IOSZ7.mjs} +6 -6
- package/dist/cli/{feedback-7QPHLXGU.mjs → feedback-6BUD5F4I.mjs} +6 -6
- package/dist/cli/{feedback-6QQ7ONLW.js → feedback-BCGQLZ5T.js} +14 -14
- package/dist/cli/git-5X3MLBIP.js +26 -0
- package/dist/cli/{git-HFPJX573.mjs → git-IN4IBL2K.mjs} +5 -5
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-ND2HULSH.js → integrations-R2Z2MDO3.js} +29 -29
- package/dist/cli/{integrations-4SZ5O24P.mjs → integrations-ZMGB6NQA.mjs} +7 -7
- package/dist/cli/{legacy-noops-WUP3TBR2.mjs → legacy-noops-GIC5OZKP.mjs} +6 -6
- package/dist/cli/{legacy-noops-GQF6AYP5.js → legacy-noops-X4JPRPTJ.js} +9 -9
- package/dist/cli/{mcp-3GUFYGCQ.mjs → mcp-G4IRJIKK.mjs} +4 -4
- package/dist/cli/{mcp-L3YYVEU6.js → mcp-USZKTVL2.js} +24 -24
- package/dist/cli/{monitors-OFCVJSH5.mjs → monitors-SNFZPSCY.mjs} +7 -7
- package/dist/cli/{monitors-CVZZN5WG.js → monitors-T7LRP7OB.js} +100 -100
- package/dist/cli/{org-MQ5AUN7I.js → org-2L2ZZL2P.js} +121 -121
- package/dist/cli/{org-3DTAYA52.mjs → org-YTXLKW52.mjs} +6 -6
- package/dist/cli/{outcomes-42W24EXG.mjs → outcomes-CJWBIFTA.mjs} +6 -6
- package/dist/cli/{outcomes-MGDUYHUD.js → outcomes-O63F57JF.js} +14 -14
- package/dist/cli/{play-PD45RNYZ.mjs → play-6UWPUHC6.mjs} +331 -70
- package/dist/cli/{play-IMAD7QTV.js → play-T353SULJ.js} +930 -669
- package/dist/cli/{providers-DYKHG7NV.mjs → providers-LZABK2UW.mjs} +6 -6
- package/dist/cli/{providers-WONHPTRG.js → providers-XORJH2VW.js} +9 -9
- package/dist/cli/{quickstart-5QPGHLEX.mjs → quickstart-O4RF7J55.mjs} +4 -4
- package/dist/cli/{quickstart-6AAFULGC.js → quickstart-QBNUNPZR.js} +6 -6
- package/dist/cli/{run-WOW7QO3W.js → run-2CPMFC6W.js} +44 -44
- package/dist/cli/{run-4K6ZU7H7.mjs → run-GBRPFC6P.mjs} +23 -23
- package/dist/cli/{search-CKVFWVXQ.mjs → search-G7TS7OFB.mjs} +7 -7
- package/dist/cli/search-M3AHFCKQ.js +32 -0
- package/dist/cli/{search-output-WWB25JWA.mjs → search-output-BIIJRUCP.mjs} +4 -4
- package/dist/cli/{search-output-B5QE7ZNK.js → search-output-NRKLNWSD.js} +6 -6
- package/dist/cli/{secrets-SVZB6TSW.mjs → secrets-DN3XEZNH.mjs} +6 -6
- package/dist/cli/{secrets-WKIMR346.js → secrets-FUXYSEL5.js} +15 -15
- package/dist/cli/{sessions-P3QENG6T.mjs → sessions-PMUTPCTT.mjs} +6 -6
- package/dist/cli/sessions-VMBMBGVJ.js +23 -0
- package/dist/cli/{settings-V5ABL6D2.mjs → settings-N6GNS2KA.mjs} +12 -12
- package/dist/cli/{settings-UIFRGJW3.js → settings-ZDTWCQ6B.js} +85 -85
- package/dist/cli/{setup-E67NJTEF.mjs → setup-LJ3KWPSA.mjs} +9 -9
- package/dist/cli/{setup-A5MIJU3S.js → setup-PN5TSSJE.js} +49 -49
- package/dist/cli/{skills-WLHOQ4DO.mjs → skills-7J42K6VC.mjs} +7 -7
- package/dist/cli/skills-CXDENBLF.js +37 -0
- package/dist/cli/{tools-EG4KL3BB.mjs → tools-M3S6D6DA.mjs} +17 -17
- package/dist/cli/tools-WY2GMOC7.js +57 -0
- package/dist/cli/{update-IPFBE6SA.mjs → update-XTVFG74E.mjs} +9 -9
- package/dist/cli/update-ZB2IBGXG.js +37 -0
- package/dist/cli/{views-ZIBY2RVB.js → views-B4X2FWTF.js} +21 -21
- package/dist/cli/{views-XDN6SEWY.mjs → views-UFYRDO4X.mjs} +6 -6
- package/dist/cli/{workflow-BLKPBRBT.js → workflow-I2RM2J2J.js} +53 -29
- package/dist/cli/{workflow-O2XPMOVL.mjs → workflow-ZLMS3PDE.mjs} +42 -18
- package/dist/{client-QznpkWrk.d.ts → client-2QWMJInp.d.ts} +1 -1
- package/dist/{client-CmG8MT0x.d.mts → client-7H8TXmLa.d.mts} +1 -1
- package/dist/{client-core-CY0jNW0e.d.mts → client-core-BraEuxbg.d.mts} +67 -4
- package/dist/{client-core-CXDqfeiB.d.ts → client-core-DRglY5xa.d.ts} +67 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +125 -120
- package/dist/plays/bundle-play-file.mjs +5 -0
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +3 -3
- package/dist/release.d.ts +3 -3
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-ALBG5LF4.js +0 -44
- package/dist/cli/concurrent-runs-help-E3YMAO5Q.js +0 -22
- package/dist/cli/describe-QB5T47B3.js +0 -50
- package/dist/cli/git-4FXTWHXT.js +0 -26
- package/dist/cli/search-YZIJS7QU.js +0 -32
- package/dist/cli/sessions-VQPGPXMU.js +0 -23
- package/dist/cli/skills-GTBK33MV.js +0 -37
- package/dist/cli/tools-GPAIPRPQ.js +0 -57
- package/dist/cli/update-QLWS32WR.js +0 -37
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk7XXJJVSIjs = require('./chunk-7XXJJVSI.js');
|
|
4
|
+
require('./chunk-BUUAFSSN.js');
|
|
5
5
|
require('./chunk-4WAM6TLD.js');
|
|
6
6
|
require('./chunk-MJTVX4QK.js');
|
|
7
7
|
require('./chunk-PMH4GLMD.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkISSYN3DJjs = require('./chunk-ISSYN3DJ.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
13
|
+
var _chunkS33BN7GZjs = require('./chunk-S33BN7GZ.js');
|
|
14
|
+
require('./chunk-4BSCSQ6I.js');
|
|
15
15
|
require('./chunk-6VLFQZK6.js');
|
|
16
16
|
require('./chunk-XNYIZMNQ.js');
|
|
17
17
|
require('./chunk-LFQJW4S2.js');
|
|
18
18
|
require('./chunk-CFJFUVX2.js');
|
|
19
|
-
require('./chunk-
|
|
19
|
+
require('./chunk-3ET6NRXP.js');
|
|
20
20
|
require('./chunk-OG64RBAC.js');
|
|
21
21
|
require('./chunk-COGTRVWW.js');
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ require('./chunk-COGTRVWW.js');
|
|
|
24
24
|
var _promises = require('fs/promises');
|
|
25
25
|
var VIEWS_FEATURE = "views";
|
|
26
26
|
function print(command, json, data, lines) {
|
|
27
|
-
|
|
27
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
28
28
|
{ command, ...data, render: { sections: [{ title: command, lines }] } },
|
|
29
29
|
{ json: Boolean(json), text: `${lines.join("\n")}
|
|
30
30
|
` }
|
|
@@ -69,7 +69,7 @@ function viewLines(view) {
|
|
|
69
69
|
];
|
|
70
70
|
}
|
|
71
71
|
function registerViewsCommands(program) {
|
|
72
|
-
const views = program.command("views", { hidden: !
|
|
72
|
+
const views = program.command("views", { hidden: !_chunkS33BN7GZjs.cliFeatureEnabled.call(void 0, VIEWS_FEATURE) }).description(
|
|
73
73
|
"Show what a Play returns at a fixed URL on views.deepline.com."
|
|
74
74
|
).addHelpText(
|
|
75
75
|
"after",
|
|
@@ -82,7 +82,7 @@ Examples:
|
|
|
82
82
|
);
|
|
83
83
|
views.command("list").description("List this org's views.").option("--cursor <cursor>", "Continue from a previous page of results").option("--limit <n>", "Results per request, up to 100", Number).option("--json", "Emit raw JSON response").action(
|
|
84
84
|
async (options) => run(async () => {
|
|
85
|
-
const result = await new (0,
|
|
85
|
+
const result = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().listViews({
|
|
86
86
|
cursor: options.cursor,
|
|
87
87
|
limit: options.limit
|
|
88
88
|
});
|
|
@@ -97,7 +97,7 @@ Examples:
|
|
|
97
97
|
);
|
|
98
98
|
views.command("get <id>").description("Show one view and what you may do with it.").option("--json", "Emit raw JSON response").action(
|
|
99
99
|
async (id, options) => run(async () => {
|
|
100
|
-
const view = await new (0,
|
|
100
|
+
const view = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().getView(id);
|
|
101
101
|
print("views get", options.json, view, [
|
|
102
102
|
...viewLines(view),
|
|
103
103
|
` saved input ${JSON.stringify(view.input)}`
|
|
@@ -116,7 +116,7 @@ Examples:
|
|
|
116
116
|
`
|
|
117
117
|
).action(
|
|
118
118
|
async (options) => run(async () => {
|
|
119
|
-
const view = await new (0,
|
|
119
|
+
const view = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().createView({
|
|
120
120
|
name: options.name,
|
|
121
121
|
play: options.play,
|
|
122
122
|
...options.input !== void 0 ? {
|
|
@@ -152,13 +152,13 @@ Examples:
|
|
|
152
152
|
if (Object.keys(fields).length === 0) {
|
|
153
153
|
throw new Error("Nothing to change. See: deepline views edit --help");
|
|
154
154
|
}
|
|
155
|
-
const view = await new (0,
|
|
155
|
+
const view = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().updateView(id, fields);
|
|
156
156
|
print("views edit", options.json, view, viewLines(view));
|
|
157
157
|
})
|
|
158
158
|
);
|
|
159
159
|
views.command("runs <id>").description("List runs of the view's Play, newest first.").option("--limit <n>", "Runs to list, up to 100", Number).option("--json", "Emit raw JSON response").action(
|
|
160
160
|
async (id, options) => run(async () => {
|
|
161
|
-
const result = await new (0,
|
|
161
|
+
const result = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().listViewRuns(id, {
|
|
162
162
|
limit: options.limit
|
|
163
163
|
});
|
|
164
164
|
print("views runs", options.json, result, [
|
|
@@ -177,7 +177,7 @@ Examples:
|
|
|
177
177
|
).option("--json", "Emit raw JSON response").action(
|
|
178
178
|
async (id, options) => run(async () => {
|
|
179
179
|
const input = options.input !== void 0 ? await readJsonOption(options.input, "--input") : void 0;
|
|
180
|
-
const started = await new (0,
|
|
180
|
+
const started = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().refreshView(id, input);
|
|
181
181
|
print("views refresh", options.json, started, [
|
|
182
182
|
`Started run ${started.workflowId}.`,
|
|
183
183
|
`Watch it: deepline runs get ${started.workflowId}`
|
|
@@ -196,7 +196,7 @@ Examples:
|
|
|
196
196
|
"Use either --embed-origin or --clear-embed-origins."
|
|
197
197
|
);
|
|
198
198
|
}
|
|
199
|
-
const view = await new (0,
|
|
199
|
+
const view = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().setViewAccess(
|
|
200
200
|
id,
|
|
201
201
|
parseViewAccess(access),
|
|
202
202
|
{
|
|
@@ -218,7 +218,7 @@ Examples:
|
|
|
218
218
|
"List a view's share links. Their URLs are shown only once, when created."
|
|
219
219
|
).option("--json", "Emit raw JSON response").action(
|
|
220
220
|
async (id, options) => run(async () => {
|
|
221
|
-
const result = await new (0,
|
|
221
|
+
const result = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().listViewShareLinks(id);
|
|
222
222
|
print(
|
|
223
223
|
"views links list",
|
|
224
224
|
options.json,
|
|
@@ -238,7 +238,7 @@ Examples:
|
|
|
238
238
|
).option("--json", "Emit raw JSON response").action(
|
|
239
239
|
async (id, options) => run(async () => {
|
|
240
240
|
const emails = options.email ? String(options.email).split(",").map((email) => email.trim()).filter(Boolean) : void 0;
|
|
241
|
-
const link = await new (0,
|
|
241
|
+
const link = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().createViewShareLink(id, {
|
|
242
242
|
expires: options.expires,
|
|
243
243
|
...options.label ? { label: options.label } : {},
|
|
244
244
|
...emails ? { emails } : {}
|
|
@@ -254,13 +254,13 @@ Examples:
|
|
|
254
254
|
);
|
|
255
255
|
links.command("revoke <id> <linkId>").description("Revoke a share link. It stops opening the view at once.").option("--json", "Emit raw JSON response").action(
|
|
256
256
|
async (id, linkId, options) => run(async () => {
|
|
257
|
-
const link = await new (0,
|
|
257
|
+
const link = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().revokeViewShareLink(id, linkId);
|
|
258
258
|
print("views links revoke", options.json, link, [linkLine(link)]);
|
|
259
259
|
})
|
|
260
260
|
);
|
|
261
261
|
views.command("delete <id>").description("Delete a view. Its Play and runs are not touched.").option("--json", "Emit raw JSON response").action(
|
|
262
262
|
async (id, options) => run(async () => {
|
|
263
|
-
const result = await new (0,
|
|
263
|
+
const result = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().deleteView(id);
|
|
264
264
|
print("views delete", options.json, result, [`Deleted view ${id}.`]);
|
|
265
265
|
})
|
|
266
266
|
);
|
|
@@ -269,7 +269,7 @@ Examples:
|
|
|
269
269
|
);
|
|
270
270
|
permissions.command("get", { isDefault: true }).description("Show the org's view rules and what you may do.").option("--json", "Emit raw JSON response").action(
|
|
271
271
|
async (options) => run(async () => {
|
|
272
|
-
const result = await new (0,
|
|
272
|
+
const result = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().getViewPermissions();
|
|
273
273
|
print("views permissions", options.json, result, [
|
|
274
274
|
...Object.entries(result.rules).map(
|
|
275
275
|
([verb, level]) => `${verb}: ${level}`
|
|
@@ -308,7 +308,7 @@ Examples:
|
|
|
308
308
|
"Pass at least one rule. See: deepline views permissions set --help"
|
|
309
309
|
);
|
|
310
310
|
}
|
|
311
|
-
const result = await new (0,
|
|
311
|
+
const result = await new (0, _chunk7XXJJVSIjs.DeeplineClient)().setViewPermissions(rules);
|
|
312
312
|
print(
|
|
313
313
|
"views permissions set",
|
|
314
314
|
options.json,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ES3S6UXR.mjs";
|
|
4
|
+
import "./chunk-JKQPITEE.mjs";
|
|
5
5
|
import "./chunk-FZHMNK6F.mjs";
|
|
6
6
|
import "./chunk-5TYLSS4Q.mjs";
|
|
7
7
|
import "./chunk-PSX3WHIH.mjs";
|
|
8
8
|
import {
|
|
9
9
|
printCommandEnvelope
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WW52ANX4.mjs";
|
|
11
11
|
import {
|
|
12
12
|
cliFeatureEnabled
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-4ANDW2OT.mjs";
|
|
14
|
+
import "./chunk-HNTIGYRT.mjs";
|
|
15
15
|
import "./chunk-ASB47RXJ.mjs";
|
|
16
16
|
import "./chunk-DLIRSHV6.mjs";
|
|
17
17
|
import "./chunk-Z3A2S3QM.mjs";
|
|
18
18
|
import "./chunk-2MGZAI54.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-KMLACXI2.mjs";
|
|
20
20
|
import "./chunk-WZYKRD7T.mjs";
|
|
21
21
|
import "./chunk-KRD6H754.mjs";
|
|
22
22
|
|
|
@@ -6,8 +6,8 @@ var _chunk3XX5TEA4js = require('./chunk-3XX5TEA4.js');
|
|
|
6
6
|
var _chunk3KC45UVFjs = require('./chunk-3KC45UVF.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('./chunk-
|
|
9
|
+
var _chunk7XXJJVSIjs = require('./chunk-7XXJJVSI.js');
|
|
10
|
+
require('./chunk-BUUAFSSN.js');
|
|
11
11
|
require('./chunk-4WAM6TLD.js');
|
|
12
12
|
require('./chunk-MJTVX4QK.js');
|
|
13
13
|
require('./chunk-PMH4GLMD.js');
|
|
@@ -16,14 +16,14 @@ require('./chunk-PMH4GLMD.js');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
require('./chunk-
|
|
21
|
-
require('./chunk-
|
|
19
|
+
var _chunkISSYN3DJjs = require('./chunk-ISSYN3DJ.js');
|
|
20
|
+
require('./chunk-S33BN7GZ.js');
|
|
21
|
+
require('./chunk-4BSCSQ6I.js');
|
|
22
22
|
require('./chunk-6VLFQZK6.js');
|
|
23
23
|
require('./chunk-XNYIZMNQ.js');
|
|
24
24
|
require('./chunk-LFQJW4S2.js');
|
|
25
25
|
require('./chunk-CFJFUVX2.js');
|
|
26
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-3ET6NRXP.js');
|
|
27
27
|
require('./chunk-OG64RBAC.js');
|
|
28
28
|
require('./chunk-COGTRVWW.js');
|
|
29
29
|
|
|
@@ -1596,6 +1596,20 @@ var PLAY_EQUIVALENT = {
|
|
|
1596
1596
|
delete: "deepline plays delete <name>"
|
|
1597
1597
|
};
|
|
1598
1598
|
var MIGRATE_HINT = "deepline workflows transform <id>";
|
|
1599
|
+
var RETIREMENT_FALLBACK_NOTICE = "Legacy workflows are being retired: new workflows cannot be created, and existing workflows stop running at the announced retirement date. Definitions and run history stay readable. Move to plays now.";
|
|
1600
|
+
function readServerDeprecationWarning(payload) {
|
|
1601
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
|
|
1602
|
+
return null;
|
|
1603
|
+
}
|
|
1604
|
+
const warning = payload.deprecation_warning;
|
|
1605
|
+
if (!warning || typeof warning !== "object") return null;
|
|
1606
|
+
const { message, sunset_at } = warning;
|
|
1607
|
+
if (typeof message !== "string" || message.length === 0) return null;
|
|
1608
|
+
return {
|
|
1609
|
+
message,
|
|
1610
|
+
sunset_at: typeof sunset_at === "string" ? sunset_at : null
|
|
1611
|
+
};
|
|
1612
|
+
}
|
|
1599
1613
|
var TRIGGER_REDIRECT = "Looking to trigger a play automatically? Use a trigger binding in `export const config = { ... }` \u2014 `cron`/`webhook`, or `sqlListeners` to run on a monitor\u2019s output (see `deepline describe <id>` for a monitor\u2019s streams and the deepline-monitors skill). `workflows` only manages prebuilt plays and is deprecated in favor of `plays`.";
|
|
1600
1614
|
var JSON_OPTION_DESCRIPTION = "Emit JSON output";
|
|
1601
1615
|
function withJsonOption(command) {
|
|
@@ -1617,30 +1631,31 @@ function migrationDeprecation(command) {
|
|
|
1617
1631
|
if (!use) return null;
|
|
1618
1632
|
return { use, migrate: MIGRATE_HINT };
|
|
1619
1633
|
}
|
|
1620
|
-
function noticeToStderr(command) {
|
|
1634
|
+
function noticeToStderr(command, payload) {
|
|
1635
|
+
const retirement = _nullishCoalesce(_optionalChain([readServerDeprecationWarning, 'call', _27 => _27(payload), 'optionalAccess', _28 => _28.message]), () => ( RETIREMENT_FALLBACK_NOTICE));
|
|
1621
1636
|
const deprecation = migrationDeprecation(command);
|
|
1622
|
-
if (!deprecation) return;
|
|
1623
1637
|
process.stderr.write(
|
|
1624
|
-
`
|
|
1625
|
-
equivalent: \`${deprecation.use}\`
|
|
1638
|
+
`warning: ${retirement}
|
|
1639
|
+
` + (deprecation ? ` equivalent: \`${deprecation.use}\`
|
|
1626
1640
|
migrate this workflow: \`${MIGRATE_HINT}\`
|
|
1627
1641
|
${TRIGGER_REDIRECT}
|
|
1628
|
-
`
|
|
1642
|
+
` : ` migrate this workflow: \`${MIGRATE_HINT}\`
|
|
1643
|
+
`)
|
|
1629
1644
|
);
|
|
1630
1645
|
}
|
|
1631
1646
|
function emitPassThrough(command, payload, options) {
|
|
1632
|
-
const json =
|
|
1647
|
+
const json = _chunkISSYN3DJjs.shouldEmitJson.call(void 0, options.json);
|
|
1633
1648
|
const deprecation = migrationDeprecation(command);
|
|
1634
1649
|
if (json) {
|
|
1635
1650
|
const enriched = payload && typeof payload === "object" && !Array.isArray(payload) ? { ...payload, deprecation } : { result: payload, deprecation };
|
|
1636
|
-
|
|
1651
|
+
_chunkISSYN3DJjs.printJson.call(void 0, enriched);
|
|
1637
1652
|
return;
|
|
1638
1653
|
}
|
|
1639
|
-
|
|
1640
|
-
noticeToStderr(command);
|
|
1654
|
+
_chunkISSYN3DJjs.printJson.call(void 0, payload);
|
|
1655
|
+
if (!options.suppressNotice) noticeToStderr(command, payload);
|
|
1641
1656
|
}
|
|
1642
1657
|
function client() {
|
|
1643
|
-
return new (0,
|
|
1658
|
+
return new (0, _chunk7XXJJVSIjs.DeeplineClient)();
|
|
1644
1659
|
}
|
|
1645
1660
|
function clientWithTimeout(timeoutSeconds) {
|
|
1646
1661
|
if (!timeoutSeconds) return client();
|
|
@@ -1648,7 +1663,7 @@ function clientWithTimeout(timeoutSeconds) {
|
|
|
1648
1663
|
if (!Number.isFinite(seconds) || seconds <= 0) {
|
|
1649
1664
|
throw new Error("--timeout must be a positive number of seconds.");
|
|
1650
1665
|
}
|
|
1651
|
-
return new (0,
|
|
1666
|
+
return new (0, _chunk7XXJJVSIjs.DeeplineClient)({ timeout: seconds * 1e3 });
|
|
1652
1667
|
}
|
|
1653
1668
|
function readStatus(payload) {
|
|
1654
1669
|
if (!payload || typeof payload !== "object") return null;
|
|
@@ -1702,7 +1717,7 @@ async function transformOne(api, workflowId, outDir, publish) {
|
|
|
1702
1717
|
await _promises.writeFile.call(void 0, file, compiled.sourceCode, "utf8");
|
|
1703
1718
|
let published = false;
|
|
1704
1719
|
if (publish) {
|
|
1705
|
-
const { handlePlayPublish } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-
|
|
1720
|
+
const { handlePlayPublish } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-T353SULJ.js")));
|
|
1706
1721
|
const code = await handlePlayPublish([file]);
|
|
1707
1722
|
if (code !== 0) {
|
|
1708
1723
|
return {
|
|
@@ -1777,10 +1792,10 @@ async function handleTransform(id, options) {
|
|
|
1777
1792
|
for (const workflowId of ids) {
|
|
1778
1793
|
outcomes.push(await transformOne(api, workflowId, outDir, publish));
|
|
1779
1794
|
}
|
|
1780
|
-
|
|
1795
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
1781
1796
|
{ outcomes, deprecation: null },
|
|
1782
1797
|
{
|
|
1783
|
-
json:
|
|
1798
|
+
json: _chunkISSYN3DJjs.shouldEmitJson.call(void 0, options.json),
|
|
1784
1799
|
text: renderTransformReport(outcomes)
|
|
1785
1800
|
}
|
|
1786
1801
|
);
|
|
@@ -1801,11 +1816,11 @@ async function handleDelete(id, options) {
|
|
|
1801
1816
|
}
|
|
1802
1817
|
async function handleDisable(id, options) {
|
|
1803
1818
|
const result = await client().disableWorkflow(id);
|
|
1804
|
-
|
|
1819
|
+
_chunkISSYN3DJjs.printJson.call(void 0, result);
|
|
1805
1820
|
}
|
|
1806
1821
|
async function handleEnable(id, options) {
|
|
1807
1822
|
const result = await client().enableWorkflow(id);
|
|
1808
|
-
|
|
1823
|
+
_chunkISSYN3DJjs.printJson.call(void 0, result);
|
|
1809
1824
|
}
|
|
1810
1825
|
async function handleApply(options) {
|
|
1811
1826
|
const body = await readJsonOption(options.payload, options.file);
|
|
@@ -1863,24 +1878,30 @@ async function handleTail(id, runId, options) {
|
|
|
1863
1878
|
const api = client();
|
|
1864
1879
|
const intervalMs = Math.max(500, Number(_nullishCoalesce(options.intervalMs, () => ( 2e3))) || 2e3);
|
|
1865
1880
|
const deadline = Date.now() + 10 * 6e4;
|
|
1881
|
+
let firstPoll = true;
|
|
1866
1882
|
for (; ; ) {
|
|
1867
1883
|
const run = await api.getWorkflowRun(id, runId);
|
|
1868
|
-
emitPassThrough("tail", run, options);
|
|
1884
|
+
emitPassThrough("tail", run, { ...options, suppressNotice: !firstPoll });
|
|
1885
|
+
firstPoll = false;
|
|
1869
1886
|
const status = readStatus(run);
|
|
1870
1887
|
if (status && TERMINAL_RUN_STATUSES.has(status) || Date.now() > deadline) {
|
|
1871
1888
|
return;
|
|
1872
1889
|
}
|
|
1873
|
-
await
|
|
1890
|
+
await _chunkISSYN3DJjs.sleep.call(void 0, intervalMs);
|
|
1874
1891
|
}
|
|
1875
1892
|
}
|
|
1876
1893
|
function registerWorkflowCommands(program) {
|
|
1877
1894
|
const workflows = program.command("workflows", { hidden: true }).description(
|
|
1878
|
-
"Legacy cloud workflows (
|
|
1895
|
+
"Legacy cloud workflows (retiring; use plays). New workflows cannot be created; existing ones stop running at the announced retirement date. Use `workflows transform` to migrate one to a play. " + TRIGGER_REDIRECT
|
|
1879
1896
|
).addHelpText(
|
|
1880
1897
|
"after",
|
|
1881
1898
|
`
|
|
1882
|
-
Workflows are
|
|
1883
|
-
|
|
1899
|
+
Workflows are retiring. Creating a new workflow is refused
|
|
1900
|
+
(LEGACY_WORKFLOW_CREATION_DISABLED). Existing workflows keep running, and
|
|
1901
|
+
can still be applied, until the retirement date that every workflow response
|
|
1902
|
+
carries (deprecation_warning.sunset_at and the Sunset header). From then on
|
|
1903
|
+
no trigger starts a run (LEGACY_WORKFLOWS_RETIRED); definitions and run
|
|
1904
|
+
history stay readable. Migrate a workflow with:
|
|
1884
1905
|
|
|
1885
1906
|
deepline workflows transform <id> # write a reviewable .play.ts
|
|
1886
1907
|
deepline workflows transform --all --publish # migrate + publish them all
|
|
@@ -1928,7 +1949,9 @@ Notes:
|
|
|
1928
1949
|
workflows.command("delete <id>").description("Delete a workflow and its revisions/runs.")
|
|
1929
1950
|
).action(handleDelete);
|
|
1930
1951
|
withJsonOption(
|
|
1931
|
-
workflows.command("apply").description(
|
|
1952
|
+
workflows.command("apply").description(
|
|
1953
|
+
"Update an existing workflow from config (creating new workflows is disabled)."
|
|
1954
|
+
).option("--payload <json>", "Inline config JSON").option("--file <path>", "Path to a config JSON file").option("--timeout <seconds>", "API read timeout in seconds.")
|
|
1932
1955
|
).action(handleApply);
|
|
1933
1956
|
withJsonOption(
|
|
1934
1957
|
workflows.command("lint").description("Validate a workflow config without saving.").option("--payload <json>", "Inline config JSON").option("--file <path>", "Path to a config JSON file")
|
|
@@ -1962,4 +1985,5 @@ Notes:
|
|
|
1962
1985
|
|
|
1963
1986
|
|
|
1964
1987
|
|
|
1965
|
-
|
|
1988
|
+
|
|
1989
|
+
exports.emitPassThrough = emitPassThrough; exports.migrationDeprecation = migrationDeprecation; exports.noticeToStderr = noticeToStderr; exports.readServerDeprecationWarning = readServerDeprecationWarning; exports.registerWorkflowCommands = registerWorkflowCommands; exports.renderTransformReport = renderTransformReport; exports.transformOne = transformOne;
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-H7HIDGZ7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
DeeplineClient
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-ES3S6UXR.mjs";
|
|
10
|
+
import "./chunk-JKQPITEE.mjs";
|
|
11
11
|
import "./chunk-FZHMNK6F.mjs";
|
|
12
12
|
import "./chunk-5TYLSS4Q.mjs";
|
|
13
13
|
import "./chunk-PSX3WHIH.mjs";
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
printJson,
|
|
17
17
|
shouldEmitJson,
|
|
18
18
|
sleep
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-WW52ANX4.mjs";
|
|
20
|
+
import "./chunk-4ANDW2OT.mjs";
|
|
21
|
+
import "./chunk-HNTIGYRT.mjs";
|
|
22
22
|
import "./chunk-ASB47RXJ.mjs";
|
|
23
23
|
import "./chunk-DLIRSHV6.mjs";
|
|
24
24
|
import "./chunk-Z3A2S3QM.mjs";
|
|
25
25
|
import "./chunk-2MGZAI54.mjs";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-KMLACXI2.mjs";
|
|
27
27
|
import "./chunk-WZYKRD7T.mjs";
|
|
28
28
|
import "./chunk-KRD6H754.mjs";
|
|
29
29
|
|
|
@@ -1596,6 +1596,20 @@ var PLAY_EQUIVALENT = {
|
|
|
1596
1596
|
delete: "deepline plays delete <name>"
|
|
1597
1597
|
};
|
|
1598
1598
|
var MIGRATE_HINT = "deepline workflows transform <id>";
|
|
1599
|
+
var RETIREMENT_FALLBACK_NOTICE = "Legacy workflows are being retired: new workflows cannot be created, and existing workflows stop running at the announced retirement date. Definitions and run history stay readable. Move to plays now.";
|
|
1600
|
+
function readServerDeprecationWarning(payload) {
|
|
1601
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
|
|
1602
|
+
return null;
|
|
1603
|
+
}
|
|
1604
|
+
const warning = payload.deprecation_warning;
|
|
1605
|
+
if (!warning || typeof warning !== "object") return null;
|
|
1606
|
+
const { message, sunset_at } = warning;
|
|
1607
|
+
if (typeof message !== "string" || message.length === 0) return null;
|
|
1608
|
+
return {
|
|
1609
|
+
message,
|
|
1610
|
+
sunset_at: typeof sunset_at === "string" ? sunset_at : null
|
|
1611
|
+
};
|
|
1612
|
+
}
|
|
1599
1613
|
var TRIGGER_REDIRECT = "Looking to trigger a play automatically? Use a trigger binding in `export const config = { ... }` \u2014 `cron`/`webhook`, or `sqlListeners` to run on a monitor\u2019s output (see `deepline describe <id>` for a monitor\u2019s streams and the deepline-monitors skill). `workflows` only manages prebuilt plays and is deprecated in favor of `plays`.";
|
|
1600
1614
|
var JSON_OPTION_DESCRIPTION = "Emit JSON output";
|
|
1601
1615
|
function withJsonOption(command) {
|
|
@@ -1617,15 +1631,16 @@ function migrationDeprecation(command) {
|
|
|
1617
1631
|
if (!use) return null;
|
|
1618
1632
|
return { use, migrate: MIGRATE_HINT };
|
|
1619
1633
|
}
|
|
1620
|
-
function noticeToStderr(command) {
|
|
1634
|
+
function noticeToStderr(command, payload) {
|
|
1635
|
+
const retirement = readServerDeprecationWarning(payload)?.message ?? RETIREMENT_FALLBACK_NOTICE;
|
|
1621
1636
|
const deprecation = migrationDeprecation(command);
|
|
1622
|
-
if (!deprecation) return;
|
|
1623
1637
|
process.stderr.write(
|
|
1624
|
-
`
|
|
1625
|
-
equivalent: \`${deprecation.use}\`
|
|
1638
|
+
`warning: ${retirement}
|
|
1639
|
+
` + (deprecation ? ` equivalent: \`${deprecation.use}\`
|
|
1626
1640
|
migrate this workflow: \`${MIGRATE_HINT}\`
|
|
1627
1641
|
${TRIGGER_REDIRECT}
|
|
1628
|
-
`
|
|
1642
|
+
` : ` migrate this workflow: \`${MIGRATE_HINT}\`
|
|
1643
|
+
`)
|
|
1629
1644
|
);
|
|
1630
1645
|
}
|
|
1631
1646
|
function emitPassThrough(command, payload, options) {
|
|
@@ -1637,7 +1652,7 @@ function emitPassThrough(command, payload, options) {
|
|
|
1637
1652
|
return;
|
|
1638
1653
|
}
|
|
1639
1654
|
printJson(payload);
|
|
1640
|
-
noticeToStderr(command);
|
|
1655
|
+
if (!options.suppressNotice) noticeToStderr(command, payload);
|
|
1641
1656
|
}
|
|
1642
1657
|
function client() {
|
|
1643
1658
|
return new DeeplineClient();
|
|
@@ -1702,7 +1717,7 @@ async function transformOne(api, workflowId, outDir, publish) {
|
|
|
1702
1717
|
await writeFile(file, compiled.sourceCode, "utf8");
|
|
1703
1718
|
let published = false;
|
|
1704
1719
|
if (publish) {
|
|
1705
|
-
const { handlePlayPublish } = await import("./play-
|
|
1720
|
+
const { handlePlayPublish } = await import("./play-6UWPUHC6.mjs");
|
|
1706
1721
|
const code = await handlePlayPublish([file]);
|
|
1707
1722
|
if (code !== 0) {
|
|
1708
1723
|
return {
|
|
@@ -1863,9 +1878,11 @@ async function handleTail(id, runId, options) {
|
|
|
1863
1878
|
const api = client();
|
|
1864
1879
|
const intervalMs = Math.max(500, Number(options.intervalMs ?? 2e3) || 2e3);
|
|
1865
1880
|
const deadline = Date.now() + 10 * 6e4;
|
|
1881
|
+
let firstPoll = true;
|
|
1866
1882
|
for (; ; ) {
|
|
1867
1883
|
const run = await api.getWorkflowRun(id, runId);
|
|
1868
|
-
emitPassThrough("tail", run, options);
|
|
1884
|
+
emitPassThrough("tail", run, { ...options, suppressNotice: !firstPoll });
|
|
1885
|
+
firstPoll = false;
|
|
1869
1886
|
const status = readStatus(run);
|
|
1870
1887
|
if (status && TERMINAL_RUN_STATUSES.has(status) || Date.now() > deadline) {
|
|
1871
1888
|
return;
|
|
@@ -1875,12 +1892,16 @@ async function handleTail(id, runId, options) {
|
|
|
1875
1892
|
}
|
|
1876
1893
|
function registerWorkflowCommands(program) {
|
|
1877
1894
|
const workflows = program.command("workflows", { hidden: true }).description(
|
|
1878
|
-
"Legacy cloud workflows (
|
|
1895
|
+
"Legacy cloud workflows (retiring; use plays). New workflows cannot be created; existing ones stop running at the announced retirement date. Use `workflows transform` to migrate one to a play. " + TRIGGER_REDIRECT
|
|
1879
1896
|
).addHelpText(
|
|
1880
1897
|
"after",
|
|
1881
1898
|
`
|
|
1882
|
-
Workflows are
|
|
1883
|
-
|
|
1899
|
+
Workflows are retiring. Creating a new workflow is refused
|
|
1900
|
+
(LEGACY_WORKFLOW_CREATION_DISABLED). Existing workflows keep running, and
|
|
1901
|
+
can still be applied, until the retirement date that every workflow response
|
|
1902
|
+
carries (deprecation_warning.sunset_at and the Sunset header). From then on
|
|
1903
|
+
no trigger starts a run (LEGACY_WORKFLOWS_RETIRED); definitions and run
|
|
1904
|
+
history stay readable. Migrate a workflow with:
|
|
1884
1905
|
|
|
1885
1906
|
deepline workflows transform <id> # write a reviewable .play.ts
|
|
1886
1907
|
deepline workflows transform --all --publish # migrate + publish them all
|
|
@@ -1928,7 +1949,9 @@ Notes:
|
|
|
1928
1949
|
workflows.command("delete <id>").description("Delete a workflow and its revisions/runs.")
|
|
1929
1950
|
).action(handleDelete);
|
|
1930
1951
|
withJsonOption(
|
|
1931
|
-
workflows.command("apply").description(
|
|
1952
|
+
workflows.command("apply").description(
|
|
1953
|
+
"Update an existing workflow from config (creating new workflows is disabled)."
|
|
1954
|
+
).option("--payload <json>", "Inline config JSON").option("--file <path>", "Path to a config JSON file").option("--timeout <seconds>", "API read timeout in seconds.")
|
|
1932
1955
|
).action(handleApply);
|
|
1933
1956
|
withJsonOption(
|
|
1934
1957
|
workflows.command("lint").description("Validate a workflow config without saving.").option("--payload <json>", "Inline config JSON").option("--file <path>", "Path to a config JSON file")
|
|
@@ -1959,6 +1982,7 @@ export {
|
|
|
1959
1982
|
emitPassThrough,
|
|
1960
1983
|
migrationDeprecation,
|
|
1961
1984
|
noticeToStderr,
|
|
1985
|
+
readServerDeprecationWarning,
|
|
1962
1986
|
registerWorkflowCommands,
|
|
1963
1987
|
renderTransformReport,
|
|
1964
1988
|
transformOne
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference path="./text-imports.d.ts" />
|
|
2
|
-
import { D as DeeplineClient$1, a as DeeplineClientOptions } from './client-core-
|
|
2
|
+
import { D as DeeplineClient$1, a as DeeplineClientOptions } from './client-core-DRglY5xa.js';
|
|
3
3
|
|
|
4
4
|
/** Deepline SDK client with environment and local credential discovery. */
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference path="./text-imports.d.ts" />
|
|
2
|
-
import { D as DeeplineClient$1, a as DeeplineClientOptions } from './client-core-
|
|
2
|
+
import { D as DeeplineClient$1, a as DeeplineClientOptions } from './client-core-BraEuxbg.mjs';
|
|
3
3
|
|
|
4
4
|
/** Deepline SDK client with environment and local credential discovery. */
|
|
5
5
|
|