deepline 0.3.583 → 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/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 +12 -3
- 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 +73 -3
- 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 +20 -6
- 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-G344SPW2.mjs → agents-AHXB7N7Y.mjs} +4 -4
- package/dist/cli/{agents-ZPDXVPEE.js → agents-KBZ7OUZS.js} +33 -33
- package/dist/cli/{auth-V66RP2A6.mjs → auth-3CACO52T.mjs} +5 -5
- package/dist/cli/auth-UOHCO5K6.js +44 -0
- package/dist/cli/{billing-ROYUQF67.js → billing-5KXPGKMO.js} +105 -105
- package/dist/cli/{billing-BTMGZJCR.mjs → billing-TSTK63NB.mjs} +9 -9
- package/dist/cli/{chunk-ROWROMXD.mjs → chunk-2GWKBQJZ.mjs} +1 -1
- package/dist/cli/{chunk-VXEZKZU4.mjs → chunk-3DJMPID5.mjs} +11 -11
- package/dist/cli/{chunk-VH45GV3T.js → chunk-3ET6NRXP.js} +7 -3
- package/dist/cli/{chunk-43MKV6E4.mjs → chunk-3MWTAM3F.mjs} +3 -3
- package/dist/cli/{chunk-U6BTY4WS.mjs → chunk-4ANDW2OT.mjs} +1 -1
- package/dist/cli/{chunk-H4BYWEV5.js → chunk-4BSCSQ6I.js} +4 -4
- package/dist/cli/{chunk-ACS6BYE5.mjs → chunk-4UEXAMDU.mjs} +2 -2
- package/dist/cli/{chunk-QPN662ZP.js → chunk-5XGLDVSD.js} +100 -100
- package/dist/cli/{chunk-MFPHCUHK.js → chunk-7XXJJVSI.js} +5 -5
- package/dist/cli/{chunk-QGOHEJVJ.js → chunk-7ZCD7OPO.js} +5 -5
- package/dist/cli/{chunk-AXKFZIXC.mjs → chunk-AJJSKKH4.mjs} +2 -2
- package/dist/cli/{chunk-KSXBLXLV.mjs → chunk-BHF5UW34.mjs} +1 -1
- package/dist/cli/{chunk-AHQDUMDM.js → chunk-BO2TXH5Y.js} +20 -20
- package/dist/cli/{chunk-W5WLWRKL.mjs → chunk-BUC2TNF2.mjs} +2 -2
- package/dist/cli/{chunk-6GYGMWQV.js → chunk-BUUAFSSN.js} +68 -50
- package/dist/cli/{chunk-WUVDJSZE.js → chunk-C45E47KC.js} +23 -23
- package/dist/cli/{chunk-BUMCOVBP.js → chunk-D4R3AL4F.js} +5 -5
- package/dist/cli/{chunk-PVDP3AZY.mjs → chunk-DAZRIAXW.mjs} +4 -4
- package/dist/cli/{chunk-W3ECB7GC.js → chunk-DNOZQGJF.js} +3 -3
- package/dist/cli/{chunk-HYT5B2NL.js → chunk-DUL6UQ2T.js} +2 -2
- package/dist/cli/{chunk-P2YNTAGL.mjs → chunk-ES3S6UXR.mjs} +2 -2
- package/dist/cli/{chunk-K6GDSCFL.mjs → chunk-FDAYUP3M.mjs} +3 -3
- package/dist/cli/{chunk-23LYXVI4.js → chunk-FEVUIT2U.js} +6 -6
- package/dist/cli/{chunk-6S3OAJCJ.mjs → chunk-FSPEUU3V.mjs} +49 -6
- package/dist/cli/{chunk-2QIVGZKS.mjs → chunk-FZZMCVOS.mjs} +5 -5
- package/dist/cli/{chunk-73IZARR5.js → chunk-GHOB72U6.js} +13 -13
- package/dist/cli/{chunk-LVJAHM2I.mjs → chunk-GLYWRTEL.mjs} +3 -3
- package/dist/cli/{chunk-AXOQ2FMS.mjs → chunk-HNTIGYRT.mjs} +1 -1
- package/dist/cli/{chunk-C7UCDL2K.js → chunk-IGPHYKEJ.js} +41 -41
- package/dist/cli/{chunk-PULU5YGX.js → chunk-ISSYN3DJ.js} +20 -20
- package/dist/cli/{chunk-ZHIJA4MW.mjs → chunk-JKQPITEE.mjs} +54 -36
- package/dist/cli/{chunk-EHV52KUV.mjs → chunk-KMLACXI2.mjs} +7 -3
- package/dist/cli/{chunk-WAZR72D5.js → chunk-KQXACHYA.js} +26 -26
- package/dist/cli/{chunk-PGUK5VPC.js → chunk-LW2GKYZW.js} +2 -2
- package/dist/cli/{chunk-J54DMFV5.mjs → chunk-O2KSPI2M.mjs} +2 -2
- package/dist/cli/{chunk-CCC3NIYB.js → chunk-O6GT6JD7.js} +9 -9
- package/dist/cli/{chunk-DNYFNOWG.mjs → chunk-OCXWUWUI.mjs} +5 -5
- package/dist/cli/{chunk-MEAWK5G7.js → chunk-QKRDAJ3T.js} +53 -53
- package/dist/cli/{chunk-N5XRUZRS.js → chunk-QQESWF6D.js} +16 -16
- package/dist/cli/{chunk-2D5YISAL.js → chunk-REX5SUYU.js} +2 -2
- package/dist/cli/{chunk-RO2LTLJA.js → chunk-RXIQWG2N.js} +48 -48
- package/dist/cli/{chunk-VXDKL434.js → chunk-S33BN7GZ.js} +3 -3
- package/dist/cli/{chunk-72MEXMSH.mjs → chunk-SGRJJLNV.mjs} +1 -1
- package/dist/cli/{chunk-HOGRT5X6.mjs → chunk-TCNYSNVU.mjs} +1 -1
- package/dist/cli/{chunk-H7F3ROT3.mjs → chunk-TFPMVSGK.mjs} +2 -2
- package/dist/cli/{chunk-GFX6CDAB.mjs → chunk-V73WDQEA.mjs} +5 -5
- package/dist/cli/{chunk-LHD3HOYN.js → chunk-VYERVFGB.js} +49 -6
- package/dist/cli/{chunk-C233ZRNX.mjs → chunk-WBRSVML3.mjs} +4 -4
- package/dist/cli/{chunk-7AFTLM74.mjs → chunk-WW52ANX4.mjs} +2 -2
- package/dist/cli/{chunk-ZFJNIZHI.js → chunk-XZS35M3Y.js} +10 -10
- package/dist/cli/{chunk-YRNWA2IL.js → chunk-YNYHYL5C.js} +15 -15
- package/dist/cli/{chunk-JQT3SHXL.mjs → chunk-ZHE5E2WJ.mjs} +1 -1
- package/dist/cli/{chunk-N5RCXI3M.mjs → chunk-ZJ2H77VV.mjs} +5 -5
- package/dist/cli/{chunk-GQHZV7EQ.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-A2Y33OQ5.mjs → concurrent-runs-help-IYELSCHB.mjs} +6 -6
- package/dist/cli/{csv-PS74WVXE.mjs → csv-ENEC3APZ.mjs} +4 -4
- package/dist/cli/{csv-TKSR2LFV.js → csv-X6CP57R4.js} +13 -13
- package/dist/cli/{db-R6GOM4VC.js → db-6HLRSE2M.js} +27 -27
- package/dist/cli/{db-EXLBRZ7K.mjs → db-YGKRFK4T.mjs} +6 -6
- package/dist/cli/{describe-JJBXFPVQ.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-474U7R3Y.js → executions-IC55YJ67.js} +8 -8
- package/dist/cli/{executions-5PEODJQG.mjs → executions-PO2IOSZ7.mjs} +6 -6
- package/dist/cli/{feedback-QUQVRDBD.mjs → feedback-6BUD5F4I.mjs} +6 -6
- package/dist/cli/{feedback-URTCAOXP.js → feedback-BCGQLZ5T.js} +14 -14
- package/dist/cli/git-5X3MLBIP.js +26 -0
- package/dist/cli/{git-AQF23KKU.mjs → git-IN4IBL2K.mjs} +5 -5
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-NMFOOSS4.js → integrations-R2Z2MDO3.js} +29 -29
- package/dist/cli/{integrations-5POBI72U.mjs → integrations-ZMGB6NQA.mjs} +7 -7
- package/dist/cli/{legacy-noops-6YVCOSFO.mjs → legacy-noops-GIC5OZKP.mjs} +6 -6
- package/dist/cli/{legacy-noops-V75T5LHV.js → legacy-noops-X4JPRPTJ.js} +9 -9
- package/dist/cli/{mcp-7WEYQ5V7.mjs → mcp-G4IRJIKK.mjs} +4 -4
- package/dist/cli/{mcp-N6GYXCUQ.js → mcp-USZKTVL2.js} +24 -24
- package/dist/cli/{monitors-TAK4M5Y4.mjs → monitors-SNFZPSCY.mjs} +7 -7
- package/dist/cli/{monitors-HW4H4PE5.js → monitors-T7LRP7OB.js} +100 -100
- package/dist/cli/{org-FULXOXNE.js → org-2L2ZZL2P.js} +121 -121
- package/dist/cli/{org-3C2RN36N.mjs → org-YTXLKW52.mjs} +6 -6
- package/dist/cli/{outcomes-4KRZL6OL.mjs → outcomes-CJWBIFTA.mjs} +6 -6
- package/dist/cli/{outcomes-O3HDQWGN.js → outcomes-O63F57JF.js} +14 -14
- package/dist/cli/{play-ZTRWUODW.mjs → play-6UWPUHC6.mjs} +331 -70
- package/dist/cli/{play-HA4RGX7T.js → play-T353SULJ.js} +930 -669
- package/dist/cli/{providers-FAKWWJE2.mjs → providers-LZABK2UW.mjs} +6 -6
- package/dist/cli/{providers-DXMKWBZN.js → providers-XORJH2VW.js} +9 -9
- package/dist/cli/{quickstart-YWGBTW77.mjs → quickstart-O4RF7J55.mjs} +4 -4
- package/dist/cli/{quickstart-MA74UPNI.js → quickstart-QBNUNPZR.js} +6 -6
- package/dist/cli/{run-4DXSGXRB.js → run-2CPMFC6W.js} +44 -44
- package/dist/cli/{run-QHCYMSBP.mjs → run-GBRPFC6P.mjs} +23 -23
- package/dist/cli/{search-N4ZOK5XX.mjs → search-G7TS7OFB.mjs} +7 -7
- package/dist/cli/search-M3AHFCKQ.js +32 -0
- package/dist/cli/{search-output-F2OYLVK2.mjs → search-output-BIIJRUCP.mjs} +4 -4
- package/dist/cli/{search-output-D5VAC52B.js → search-output-NRKLNWSD.js} +6 -6
- package/dist/cli/{secrets-LD4FVAQI.mjs → secrets-DN3XEZNH.mjs} +6 -6
- package/dist/cli/{secrets-3KETOTDS.js → secrets-FUXYSEL5.js} +15 -15
- package/dist/cli/{sessions-LPLI4Z4O.mjs → sessions-PMUTPCTT.mjs} +6 -6
- package/dist/cli/sessions-VMBMBGVJ.js +23 -0
- package/dist/cli/{settings-NCGPJG3Z.mjs → settings-N6GNS2KA.mjs} +12 -12
- package/dist/cli/{settings-NFBTCOMB.js → settings-ZDTWCQ6B.js} +85 -85
- package/dist/cli/{setup-NH6MRYXZ.mjs → setup-LJ3KWPSA.mjs} +9 -9
- package/dist/cli/{setup-ATBSUSH4.js → setup-PN5TSSJE.js} +49 -49
- package/dist/cli/{skills-ITPBPIXD.mjs → skills-7J42K6VC.mjs} +7 -7
- package/dist/cli/skills-CXDENBLF.js +37 -0
- package/dist/cli/{tools-2XZPR65V.mjs → tools-M3S6D6DA.mjs} +17 -17
- package/dist/cli/tools-WY2GMOC7.js +57 -0
- package/dist/cli/{update-VFB22FWO.mjs → update-XTVFG74E.mjs} +9 -9
- package/dist/cli/update-ZB2IBGXG.js +37 -0
- package/dist/cli/{views-WJUZOQM2.js → views-B4X2FWTF.js} +21 -21
- package/dist/cli/{views-MRN3HWTG.mjs → views-UFYRDO4X.mjs} +6 -6
- package/dist/cli/{workflow-Q4JFBTVH.js → workflow-I2RM2J2J.js} +17 -17
- package/dist/cli/{workflow-A6P7YV5W.mjs → workflow-ZLMS3PDE.mjs} +7 -7
- 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-VU6VIPVY.js +0 -44
- package/dist/cli/concurrent-runs-help-6WUNDV77.js +0 -22
- package/dist/cli/describe-CA2FL2OS.js +0 -50
- package/dist/cli/git-WJ4V2B4T.js +0 -26
- package/dist/cli/search-V765JH2H.js +0 -32
- package/dist/cli/sessions-XC65OMDS.js +0 -23
- package/dist/cli/skills-4NQBTGOL.js +0 -37
- package/dist/cli/tools-ZVOFATX2.js +0 -57
- package/dist/cli/update-QME3KPOP.js +0 -37
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleDeploymentGet,
|
|
3
3
|
handleDeploymentsList
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-O2KSPI2M.mjs";
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS,
|
|
7
7
|
MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
parsePlayRunHeaderFlag,
|
|
10
10
|
parsePlayRunOptions,
|
|
11
11
|
resolvePlayRunCliOptions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TFPMVSGK.mjs";
|
|
13
13
|
import {
|
|
14
14
|
ExecutionOutputError,
|
|
15
15
|
TABLE_EXPORT_ERROR_COLUMN,
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
underscoreKeysLast,
|
|
23
23
|
writeExecutionOutput,
|
|
24
24
|
writeRunDatasetCsv
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ZHE5E2WJ.mjs";
|
|
26
26
|
import {
|
|
27
27
|
registerDeprecatedSearchCommand
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-WBRSVML3.mjs";
|
|
29
29
|
import "./chunk-5AEDYVB6.mjs";
|
|
30
30
|
import {
|
|
31
31
|
buildPlayDashboardUrl,
|
|
@@ -51,10 +51,10 @@ import {
|
|
|
51
51
|
import {
|
|
52
52
|
pinLocalPlayImports,
|
|
53
53
|
planLocalPlayExecution
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-AJJSKKH4.mjs";
|
|
55
55
|
import {
|
|
56
56
|
DeeplineClient
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-ES3S6UXR.mjs";
|
|
58
58
|
import {
|
|
59
59
|
RUN_EVENT_SEARCH_KIND_VALUES,
|
|
60
60
|
RunEventQueryInputError,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
normalizePlayStatus,
|
|
68
68
|
normalizeRunEventOperationRequest,
|
|
69
69
|
parseLogLevel
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-JKQPITEE.mjs";
|
|
71
71
|
import "./chunk-FZHMNK6F.mjs";
|
|
72
72
|
import {
|
|
73
73
|
CSV_DATA_INPUT_KEY,
|
|
@@ -90,18 +90,18 @@ import {
|
|
|
90
90
|
import {
|
|
91
91
|
checkPlayRunCompatibility,
|
|
92
92
|
usesCliPlayAdmission
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-BUC2TNF2.mjs";
|
|
94
94
|
import {
|
|
95
95
|
isCliTraceEnabled,
|
|
96
96
|
recordCliTrace,
|
|
97
97
|
resolveCliMaintenancePolicy,
|
|
98
98
|
traceCliSpan
|
|
99
|
-
} from "./chunk-
|
|
100
|
-
import "./chunk-
|
|
99
|
+
} from "./chunk-SGRJJLNV.mjs";
|
|
100
|
+
import "./chunk-OCXWUWUI.mjs";
|
|
101
101
|
import {
|
|
102
102
|
createCliProgress,
|
|
103
103
|
getActiveCliProgress
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-2GWKBQJZ.mjs";
|
|
105
105
|
import {
|
|
106
106
|
formatNonStandardSandboxRuntimeWarning
|
|
107
107
|
} from "./chunk-7MMEW2WU.mjs";
|
|
@@ -122,14 +122,14 @@ import {
|
|
|
122
122
|
printJsonError,
|
|
123
123
|
renderCommandEnvelopeText,
|
|
124
124
|
shouldEmitJson
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-WW52ANX4.mjs";
|
|
126
126
|
import {
|
|
127
127
|
cliFeatureEnabled,
|
|
128
128
|
resolveCliDashboardOrgId
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-4ANDW2OT.mjs";
|
|
130
130
|
import {
|
|
131
131
|
fetchWithDeploymentProtection
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-HNTIGYRT.mjs";
|
|
133
133
|
import "./chunk-ASB47RXJ.mjs";
|
|
134
134
|
import "./chunk-DLIRSHV6.mjs";
|
|
135
135
|
import {
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
playRunIdLookupPrefix,
|
|
140
140
|
shortPlayRunId
|
|
141
141
|
} from "./chunk-2MGZAI54.mjs";
|
|
142
|
-
import "./chunk-
|
|
142
|
+
import "./chunk-KMLACXI2.mjs";
|
|
143
143
|
import "./chunk-WZYKRD7T.mjs";
|
|
144
144
|
import {
|
|
145
145
|
__commonJS,
|
|
@@ -4343,11 +4343,18 @@ function locateDiagramIssue(issue) {
|
|
|
4343
4343
|
)?.[1];
|
|
4344
4344
|
return node ? { ...issue, node } : issue;
|
|
4345
4345
|
}
|
|
4346
|
+
var NO_DIAGRAM_CODES = /* @__PURE__ */ new Set([
|
|
4347
|
+
"docflow_visualization_missing",
|
|
4348
|
+
"docflow_diagram_disabled",
|
|
4349
|
+
"docflow_diagram_opt_out_invalid"
|
|
4350
|
+
]);
|
|
4346
4351
|
function summarizeDiagram(docflow, issues) {
|
|
4347
4352
|
const diagramIssues = issues.filter(
|
|
4348
4353
|
(issue) => isDiagramIssue(issue) && !isOptionalDiagramNudge(issue)
|
|
4349
4354
|
);
|
|
4350
|
-
if (!docflow && diagramIssues.
|
|
4355
|
+
if (!docflow && diagramIssues.every((issue) => NO_DIAGRAM_CODES.has(issue.code))) {
|
|
4356
|
+
return void 0;
|
|
4357
|
+
}
|
|
4351
4358
|
const nodes = docflow?.nodes ?? [];
|
|
4352
4359
|
return {
|
|
4353
4360
|
drawn: Boolean(docflow),
|
|
@@ -4429,6 +4436,21 @@ function presentPlayCheckResult(result) {
|
|
|
4429
4436
|
});
|
|
4430
4437
|
}
|
|
4431
4438
|
|
|
4439
|
+
// ../plays/docflow-rule-codes.ts
|
|
4440
|
+
var PLAY_DIAGRAM_RULE_CODES = /* @__PURE__ */ new Set([
|
|
4441
|
+
"docflow_visualization_missing",
|
|
4442
|
+
"docflow_compile_error",
|
|
4443
|
+
"docflow_io_missing",
|
|
4444
|
+
"docflow_inputs_undeclared",
|
|
4445
|
+
"docflow_output_records_empty"
|
|
4446
|
+
]);
|
|
4447
|
+
var PLAY_DIAGRAM_OPT_OUT_CODE = "play_diagram_opt_out_available";
|
|
4448
|
+
var PLAY_DIAGRAM_OPT_OUT_FORM = "/** @mermaid off: <why this Play has no diagram> */";
|
|
4449
|
+
var PLAY_DIAGRAM_OPT_OUT_BLOCK = [
|
|
4450
|
+
"Can't add a diagram to this Play? Opt out by adding this line at the top of the file (not recommended \u2014 its runs will record no per-step values):",
|
|
4451
|
+
` ${PLAY_DIAGRAM_OPT_OUT_FORM}`
|
|
4452
|
+
].join("\n");
|
|
4453
|
+
|
|
4432
4454
|
// src/cli/play-check-output.ts
|
|
4433
4455
|
var record4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
4434
4456
|
var array2 = (value) => Array.isArray(value) ? value : [];
|
|
@@ -4525,14 +4547,43 @@ function renderIssueBlock(issue, subject) {
|
|
|
4525
4547
|
].join(" \xB7 ");
|
|
4526
4548
|
const lines = [head, ` ${issue.message.trim()}`];
|
|
4527
4549
|
const hint = issue.hint?.trim();
|
|
4528
|
-
|
|
4529
|
-
|
|
4550
|
+
const fix = issue.fix?.split("\n").map((line) => ` ${line}`).join("\n");
|
|
4551
|
+
if (hint && fix) lines.push(` Fix: ${hint}`, fix);
|
|
4552
|
+
else if (issue.fix && !issue.fix.includes("\n"))
|
|
4553
|
+
lines.push(` Fix: ${issue.fix}`);
|
|
4554
|
+
else if (fix) lines.push(" Fix:", fix);
|
|
4530
4555
|
else if (hint) lines.push(` Fix: ${hint}`);
|
|
4531
4556
|
return lines;
|
|
4532
4557
|
}
|
|
4533
|
-
|
|
4534
|
-
|
|
4558
|
+
function renderDiagramRequirementIssues(issues, options = {}) {
|
|
4559
|
+
const shown = issues.filter(
|
|
4560
|
+
(issue) => !isOptionalDiagramNudge(issue) && (PLAY_DIAGRAM_RULE_CODES.has(issue.code) || issue.code === "docflow_diagram_disabled" || issue.code === "docflow_diagram_opt_out_invalid")
|
|
4561
|
+
);
|
|
4562
|
+
const lines = [];
|
|
4563
|
+
const refused = shown.filter(
|
|
4564
|
+
(issue) => issue.severity === "error" && PLAY_DIAGRAM_RULE_CODES.has(issue.code)
|
|
4565
|
+
);
|
|
4566
|
+
if (refused.length > 0) {
|
|
4567
|
+
const what = refused.some(
|
|
4568
|
+
(issue) => issue.code === "docflow_visualization_missing"
|
|
4569
|
+
) ? "missing diagram" : `diagram incomplete: ${count2(refused.length, "issue")}`;
|
|
4570
|
+
lines.push(`\u2717 ${options.playName ?? "play"} \u2014 ${what} (required)`, "");
|
|
4571
|
+
}
|
|
4572
|
+
shown.forEach((issue, index) => {
|
|
4573
|
+
if (index > 0) lines.push("");
|
|
4574
|
+
lines.push(
|
|
4575
|
+
...renderIssueBlock(issue, issue.node ? String(issue.node) : "diagram")
|
|
4576
|
+
);
|
|
4577
|
+
});
|
|
4578
|
+
const offer = issues.find((issue) => issue.code === PLAY_DIAGRAM_OPT_OUT_CODE);
|
|
4579
|
+
if (offer && lines.length > 0) lines.push("", offer.message.trim());
|
|
4580
|
+
return lines;
|
|
4581
|
+
}
|
|
4582
|
+
var allPlayIssues = (play) => Array.isArray(play.issues) ? play.issues : [];
|
|
4583
|
+
var playIssues = (play) => allPlayIssues(play).filter(
|
|
4584
|
+
(issue) => !isOptionalDiagramNudge(issue) && issue.code !== PLAY_DIAGRAM_OPT_OUT_CODE
|
|
4535
4585
|
);
|
|
4586
|
+
var optOutOffer = (play) => allPlayIssues(play).find((issue) => issue.code === PLAY_DIAGRAM_OPT_OUT_CODE);
|
|
4536
4587
|
function renderPlayIssues(play, docflow) {
|
|
4537
4588
|
const issues = playIssues(play);
|
|
4538
4589
|
const lines = [];
|
|
@@ -4737,8 +4788,21 @@ function headerLine(play, multiple) {
|
|
|
4737
4788
|
].join(", ");
|
|
4738
4789
|
const exportName = String(play.exportName ?? "default");
|
|
4739
4790
|
const name = `${String(play.name ?? exportName)}${multiple && exportName !== "default" ? ` (export ${exportName})` : ""}`;
|
|
4791
|
+
const diagramRules = issues.filter(
|
|
4792
|
+
(issue) => PLAY_DIAGRAM_RULE_CODES.has(issue.code)
|
|
4793
|
+
);
|
|
4794
|
+
const diagramVerdict = diagramRules.some(
|
|
4795
|
+
(issue) => issue.code === "docflow_visualization_missing"
|
|
4796
|
+
) ? "missing diagram" : diagramRules.length ? `diagram incomplete: ${count2(diagramRules.length, "issue")}` : null;
|
|
4797
|
+
const diagramErrors = diagramRules.filter(
|
|
4798
|
+
(issue) => issue.severity === "error"
|
|
4799
|
+
).length;
|
|
4800
|
+
if (diagramVerdict && diagramErrors > 0) {
|
|
4801
|
+
const otherErrors = errors - diagramErrors;
|
|
4802
|
+
return `\u2717 ${name} \u2014 ${diagramVerdict} (required)${otherErrors > 0 ? ` \xB7 ${count2(otherErrors, "other error")}` : ""}`;
|
|
4803
|
+
}
|
|
4740
4804
|
const verdict = play.valid ? "valid" : play.stage === "bundle" ? "does not bundle" : "invalid";
|
|
4741
|
-
return `${play.valid ? "\u2713" : "\u2717"} ${name} \u2014 ${verdict}${found ? ` \xB7 ${found}` : ""}`;
|
|
4805
|
+
return `${play.valid ? "\u2713" : "\u2717"} ${name} \u2014 ${verdict}${found ? ` \xB7 ${found}` : ""}${diagramVerdict ? ` \xB7 ${diagramVerdict} (required soon)` : ""}`;
|
|
4742
4806
|
}
|
|
4743
4807
|
function renderPlay(play, docflow, options) {
|
|
4744
4808
|
const lines = [];
|
|
@@ -4859,6 +4923,8 @@ function renderPlayCheckOutput(output, docflows = /* @__PURE__ */ new Map(), opt
|
|
|
4859
4923
|
])
|
|
4860
4924
|
);
|
|
4861
4925
|
}
|
|
4926
|
+
const offer = plays.map(optOutOffer).find(Boolean);
|
|
4927
|
+
if (offer) lines.push("", offer.message.trim());
|
|
4862
4928
|
return lines.join("\n");
|
|
4863
4929
|
}
|
|
4864
4930
|
function checkedDocflows(outcomes) {
|
|
@@ -4891,10 +4957,10 @@ import {
|
|
|
4891
4957
|
} from "fs/promises";
|
|
4892
4958
|
import {
|
|
4893
4959
|
basename,
|
|
4894
|
-
dirname as
|
|
4895
|
-
isAbsolute as
|
|
4960
|
+
dirname as dirname3,
|
|
4961
|
+
isAbsolute as isAbsolute3,
|
|
4896
4962
|
join as join6,
|
|
4897
|
-
relative as
|
|
4963
|
+
relative as relative4,
|
|
4898
4964
|
resolve as resolve3
|
|
4899
4965
|
} from "path";
|
|
4900
4966
|
import { Option as Option2 } from "commander";
|
|
@@ -6203,7 +6269,7 @@ import { tmpdir } from "os";
|
|
|
6203
6269
|
import { join as join4, resolve as resolve2 } from "path";
|
|
6204
6270
|
|
|
6205
6271
|
// ../plays/deploy/run-deployment.ts
|
|
6206
|
-
import { join as join3 } from "path";
|
|
6272
|
+
import { dirname, isAbsolute, join as join3, relative as relative2 } from "path";
|
|
6207
6273
|
import { mkdir, mkdtemp, rm } from "fs/promises";
|
|
6208
6274
|
|
|
6209
6275
|
// ../plays/deployment-status.ts
|
|
@@ -6331,7 +6397,9 @@ var DeployApiClient = class {
|
|
|
6331
6397
|
return this.request({
|
|
6332
6398
|
method: "POST",
|
|
6333
6399
|
path: "/api/v2/plays/compile-manifest",
|
|
6334
|
-
|
|
6400
|
+
// A deployment registers revisions: a Play without a diagram is
|
|
6401
|
+
// refused here, with the same issue `plays check` prints.
|
|
6402
|
+
body: { ...input, purpose: "publish" }
|
|
6335
6403
|
});
|
|
6336
6404
|
}
|
|
6337
6405
|
async registerArtifacts(entries) {
|
|
@@ -7101,7 +7169,33 @@ async function runDeployment(params, hooks) {
|
|
|
7101
7169
|
),
|
|
7102
7170
|
...play.runPlayStringTargets
|
|
7103
7171
|
]);
|
|
7104
|
-
const
|
|
7172
|
+
const entryFile = play.result.artifact.entryFile;
|
|
7173
|
+
const importedFilePaths = new Map(
|
|
7174
|
+
(play.result.importedPlayDependencies ?? []).flatMap(
|
|
7175
|
+
(dependency) => (
|
|
7176
|
+
// A bundler that records no path names no call site: the import
|
|
7177
|
+
// then stays the unplaced dependency it was.
|
|
7178
|
+
dependency.filePath ? [
|
|
7179
|
+
[
|
|
7180
|
+
dependency.playName,
|
|
7181
|
+
isAbsolute(entryFile) ? dependency.filePath : join3(
|
|
7182
|
+
dirname(entryFile),
|
|
7183
|
+
relative2(
|
|
7184
|
+
dirname(play.result.filePath),
|
|
7185
|
+
dependency.filePath
|
|
7186
|
+
)
|
|
7187
|
+
).replaceAll("\\", "/")
|
|
7188
|
+
]
|
|
7189
|
+
] : []
|
|
7190
|
+
)
|
|
7191
|
+
)
|
|
7192
|
+
);
|
|
7193
|
+
const dependencies = [...dependencyNames].flatMap((dependencyName) => {
|
|
7194
|
+
const manifest2 = manifestByName.get(dependencyName);
|
|
7195
|
+
if (!manifest2) return [];
|
|
7196
|
+
const filePath = importedFilePaths.get(dependencyName);
|
|
7197
|
+
return [filePath ? { ...manifest2, filePath } : manifest2];
|
|
7198
|
+
});
|
|
7105
7199
|
try {
|
|
7106
7200
|
const compiled = await client.compileManifest({
|
|
7107
7201
|
name: play.name,
|
|
@@ -7567,12 +7661,12 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
7567
7661
|
}
|
|
7568
7662
|
|
|
7569
7663
|
// src/plays/authoring-graph-path.ts
|
|
7570
|
-
import { dirname, isAbsolute, join as join5, relative as
|
|
7664
|
+
import { dirname as dirname2, isAbsolute as isAbsolute2, join as join5, relative as relative3 } from "path";
|
|
7571
7665
|
function playAuthoringGraphPath(parent, filePath) {
|
|
7572
|
-
if (
|
|
7666
|
+
if (isAbsolute2(parent.artifact.entryFile)) return filePath;
|
|
7573
7667
|
return join5(
|
|
7574
|
-
|
|
7575
|
-
|
|
7668
|
+
dirname2(parent.artifact.entryFile),
|
|
7669
|
+
relative3(dirname2(parent.filePath), filePath)
|
|
7576
7670
|
).replaceAll("\\", "/");
|
|
7577
7671
|
}
|
|
7578
7672
|
|
|
@@ -7715,7 +7809,7 @@ async function pathExistsIncludingSymlink(path) {
|
|
|
7715
7809
|
}
|
|
7716
7810
|
function runIdFileTempPath(destination) {
|
|
7717
7811
|
return join6(
|
|
7718
|
-
|
|
7812
|
+
dirname3(destination),
|
|
7719
7813
|
`.${basename(destination)}.${process.pid}.${randomUUID2()}.tmp`
|
|
7720
7814
|
);
|
|
7721
7815
|
}
|
|
@@ -7809,7 +7903,7 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
|
|
|
7809
7903
|
}
|
|
7810
7904
|
}
|
|
7811
7905
|
if (process.platform !== "win32") {
|
|
7812
|
-
const directory = await open(
|
|
7906
|
+
const directory = await open(dirname3(destination), "r");
|
|
7813
7907
|
try {
|
|
7814
7908
|
await directory.sync();
|
|
7815
7909
|
} finally {
|
|
@@ -8147,13 +8241,13 @@ function materializeRemotePlaySource(input) {
|
|
|
8147
8241
|
let updated = 0;
|
|
8148
8242
|
for (const [logicalPath, sourceCode] of files) {
|
|
8149
8243
|
const outputPath2 = resolve3(outputDirectory, logicalPath);
|
|
8150
|
-
const outputRelativePath =
|
|
8151
|
-
if (!outputRelativePath || outputRelativePath.startsWith("..") ||
|
|
8244
|
+
const outputRelativePath = relative4(outputDirectory, outputPath2);
|
|
8245
|
+
if (!outputRelativePath || outputRelativePath.startsWith("..") || isAbsolute3(outputRelativePath)) {
|
|
8152
8246
|
throw new Error(
|
|
8153
8247
|
`Refusing to materialize unsafe Play source path ${JSON.stringify(logicalPath)}.`
|
|
8154
8248
|
);
|
|
8155
8249
|
}
|
|
8156
|
-
mkdirSync(
|
|
8250
|
+
mkdirSync(dirname3(outputPath2), { recursive: true });
|
|
8157
8251
|
if (!existsSync(outputPath2)) {
|
|
8158
8252
|
writeFileSync2(outputPath2, sourceCode, "utf-8");
|
|
8159
8253
|
created += 1;
|
|
@@ -8507,7 +8601,8 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
|
|
|
8507
8601
|
}
|
|
8508
8602
|
return { root, nodes };
|
|
8509
8603
|
}
|
|
8510
|
-
async function compileBundledPlayGraphManifests(client, graph) {
|
|
8604
|
+
async function compileBundledPlayGraphManifests(client, graph, options) {
|
|
8605
|
+
const issues = [];
|
|
8511
8606
|
const compiling = /* @__PURE__ */ new Map();
|
|
8512
8607
|
const compileNode = (node) => {
|
|
8513
8608
|
const existing = compiling.get(node.filePath);
|
|
@@ -8523,33 +8618,71 @@ async function compileBundledPlayGraphManifests(client, graph) {
|
|
|
8523
8618
|
await compileNode(child);
|
|
8524
8619
|
}
|
|
8525
8620
|
const name = node.playName ?? await extractPlayName(node.sourceCode, node.filePath);
|
|
8526
|
-
|
|
8621
|
+
const compiled = await refuseWithDiagramIssues(
|
|
8527
8622
|
name,
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
)
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
`Missing compiler manifest for imported dependency ${dependency.filePath}.`
|
|
8623
|
+
() => client.compilePlayManifestWithIssues({
|
|
8624
|
+
purpose: options.purpose,
|
|
8625
|
+
name,
|
|
8626
|
+
sourceCode: node.sourceCode,
|
|
8627
|
+
sourceFiles: node.sourceFiles,
|
|
8628
|
+
artifact: node.artifact,
|
|
8629
|
+
importedPlayDependencies: node.importedPlayDependencies.map(
|
|
8630
|
+
(dependency) => {
|
|
8631
|
+
const child = graph.nodes.get(
|
|
8632
|
+
normalizePlayPath(dependency.filePath)
|
|
8539
8633
|
);
|
|
8634
|
+
if (!child?.compilerManifest) {
|
|
8635
|
+
throw new Error(
|
|
8636
|
+
`Missing compiler manifest for imported dependency ${dependency.filePath}.`
|
|
8637
|
+
);
|
|
8638
|
+
}
|
|
8639
|
+
return {
|
|
8640
|
+
...child.compilerManifest,
|
|
8641
|
+
filePath: playAuthoringGraphPath(node, dependency.filePath)
|
|
8642
|
+
};
|
|
8540
8643
|
}
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
)
|
|
8547
|
-
});
|
|
8644
|
+
)
|
|
8645
|
+
})
|
|
8646
|
+
);
|
|
8647
|
+
node.compilerManifest = compiled.compilerManifest;
|
|
8648
|
+
issues.push(...compiled.issues);
|
|
8548
8649
|
})();
|
|
8549
8650
|
compiling.set(node.filePath, promise);
|
|
8550
8651
|
return promise;
|
|
8551
8652
|
};
|
|
8552
8653
|
await compileNode(graph.root);
|
|
8654
|
+
return issues;
|
|
8655
|
+
}
|
|
8656
|
+
function extractPlayCheckIssues(value) {
|
|
8657
|
+
if (value instanceof DeeplineError) {
|
|
8658
|
+
return extractPlayCheckIssues(value.details);
|
|
8659
|
+
}
|
|
8660
|
+
if (!isRecord2(value)) return [];
|
|
8661
|
+
if (Array.isArray(value.issues)) {
|
|
8662
|
+
return value.issues.filter(
|
|
8663
|
+
(issue) => isRecord2(issue) && typeof issue.code === "string" && typeof issue.message === "string"
|
|
8664
|
+
);
|
|
8665
|
+
}
|
|
8666
|
+
for (const key of ["response", "error", "details"]) {
|
|
8667
|
+
const nested = extractPlayCheckIssues(value[key]);
|
|
8668
|
+
if (nested.length > 0) return nested;
|
|
8669
|
+
}
|
|
8670
|
+
return [];
|
|
8671
|
+
}
|
|
8672
|
+
async function refuseWithDiagramIssues(playName, compile) {
|
|
8673
|
+
try {
|
|
8674
|
+
return await compile();
|
|
8675
|
+
} catch (error) {
|
|
8676
|
+
const lines = renderDiagramRequirementIssues(extractPlayCheckIssues(error), {
|
|
8677
|
+
playName
|
|
8678
|
+
});
|
|
8679
|
+
if (lines.length > 0) throw new Error(lines.join("\n"));
|
|
8680
|
+
throw error;
|
|
8681
|
+
}
|
|
8682
|
+
}
|
|
8683
|
+
function printDiagramRequirementIssues(issues) {
|
|
8684
|
+
const lines = renderDiagramRequirementIssues(issues);
|
|
8685
|
+
if (lines.length > 0) console.error(lines.join("\n"));
|
|
8553
8686
|
}
|
|
8554
8687
|
function requireCompilerManifest(node) {
|
|
8555
8688
|
if (!node.compilerManifest) {
|
|
@@ -13651,7 +13784,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
13651
13784
|
await traceCliSpan(
|
|
13652
13785
|
"cli.play_file_compile_manifests",
|
|
13653
13786
|
{ targetKind: "file", skipped: false },
|
|
13654
|
-
() => compileBundledPlayGraphManifests(client, graph
|
|
13787
|
+
() => compileBundledPlayGraphManifests(client, graph, {
|
|
13788
|
+
purpose: "run_file"
|
|
13789
|
+
})
|
|
13655
13790
|
);
|
|
13656
13791
|
}
|
|
13657
13792
|
progress.phase("compiled play");
|
|
@@ -14326,7 +14461,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
14326
14461
|
return 1;
|
|
14327
14462
|
}
|
|
14328
14463
|
console.error(message);
|
|
14329
|
-
const dir =
|
|
14464
|
+
const dir = dirname3(resolved);
|
|
14330
14465
|
if (existsSync(dir)) {
|
|
14331
14466
|
const base = basename(resolved);
|
|
14332
14467
|
try {
|
|
@@ -16290,6 +16425,112 @@ async function handlePlayCost(args) {
|
|
|
16290
16425
|
);
|
|
16291
16426
|
return 0;
|
|
16292
16427
|
}
|
|
16428
|
+
var PLAY_STEP_VALUES_RUNS_MAX = 50;
|
|
16429
|
+
function stepValuePreviewText(value) {
|
|
16430
|
+
if (!value || typeof value !== "object") return JSON.stringify(value);
|
|
16431
|
+
const preview = value;
|
|
16432
|
+
switch (preview.kind) {
|
|
16433
|
+
case "scalar":
|
|
16434
|
+
return typeof preview.value === "string" ? preview.value : JSON.stringify(preview.value);
|
|
16435
|
+
case "null":
|
|
16436
|
+
return "null";
|
|
16437
|
+
case "dataset":
|
|
16438
|
+
return `dataset (${String(preview.rowCount ?? "?")} rows)`;
|
|
16439
|
+
case "array":
|
|
16440
|
+
return `[${String(preview.totalItems ?? "?")} items]`;
|
|
16441
|
+
case "object":
|
|
16442
|
+
return `{${String(preview.totalFields ?? "?")} fields}`;
|
|
16443
|
+
case "unavailable":
|
|
16444
|
+
return `unavailable (${String(preview.reason ?? "unknown")})`;
|
|
16445
|
+
default:
|
|
16446
|
+
return JSON.stringify(value);
|
|
16447
|
+
}
|
|
16448
|
+
}
|
|
16449
|
+
async function handlePlayStepValues(input) {
|
|
16450
|
+
const step = input.step?.trim();
|
|
16451
|
+
if (!step) {
|
|
16452
|
+
console.error(
|
|
16453
|
+
"Usage: deepline plays step-values <play> --step <node id> (--runs <id,id,\u2026> | --last <n>) [--json]"
|
|
16454
|
+
);
|
|
16455
|
+
return 2;
|
|
16456
|
+
}
|
|
16457
|
+
if (Boolean(input.runs) === Boolean(input.last)) {
|
|
16458
|
+
console.error("Pass exactly one of --runs <id,id,\u2026> or --last <n>.");
|
|
16459
|
+
return 2;
|
|
16460
|
+
}
|
|
16461
|
+
const client = new DeeplineClient();
|
|
16462
|
+
let runIds;
|
|
16463
|
+
if (input.last) {
|
|
16464
|
+
const last = Number(input.last);
|
|
16465
|
+
if (!Number.isSafeInteger(last) || last < 1 || last > PLAY_STEP_VALUES_RUNS_MAX) {
|
|
16466
|
+
console.error(
|
|
16467
|
+
`--last must be an integer from 1 to ${PLAY_STEP_VALUES_RUNS_MAX}.`
|
|
16468
|
+
);
|
|
16469
|
+
return 2;
|
|
16470
|
+
}
|
|
16471
|
+
const page = await client.runs.listPage({ play: input.play, limit: last });
|
|
16472
|
+
runIds = page.runs.map((run) => run.workflowId);
|
|
16473
|
+
} else {
|
|
16474
|
+
runIds = [
|
|
16475
|
+
...new Set(
|
|
16476
|
+
(input.runs ?? "").split(",").map((id) => id.trim()).filter(Boolean)
|
|
16477
|
+
)
|
|
16478
|
+
];
|
|
16479
|
+
if (runIds.length > PLAY_STEP_VALUES_RUNS_MAX) {
|
|
16480
|
+
console.error(
|
|
16481
|
+
`--runs reads at most ${PLAY_STEP_VALUES_RUNS_MAX} runs per call; got ${runIds.length}.`
|
|
16482
|
+
);
|
|
16483
|
+
return 2;
|
|
16484
|
+
}
|
|
16485
|
+
}
|
|
16486
|
+
if (runIds.length === 0) {
|
|
16487
|
+
if (input.json)
|
|
16488
|
+
console.log(
|
|
16489
|
+
JSON.stringify(
|
|
16490
|
+
{ playName: input.play, nodeId: step, runs: [] },
|
|
16491
|
+
null,
|
|
16492
|
+
2
|
|
16493
|
+
)
|
|
16494
|
+
);
|
|
16495
|
+
else console.log(`${input.play}: no runs.`);
|
|
16496
|
+
return 0;
|
|
16497
|
+
}
|
|
16498
|
+
const result = await client.getPlayStepValues({
|
|
16499
|
+
playName: input.play,
|
|
16500
|
+
node: step,
|
|
16501
|
+
runIds
|
|
16502
|
+
});
|
|
16503
|
+
if (input.json) {
|
|
16504
|
+
console.log(JSON.stringify(result, null, 2));
|
|
16505
|
+
return 0;
|
|
16506
|
+
}
|
|
16507
|
+
console.log(`${result.playName} \xB7 step ${result.nodeId}`);
|
|
16508
|
+
for (const run of result.runs) {
|
|
16509
|
+
if (!run.found) {
|
|
16510
|
+
console.log(`${run.runId} not a run of this play`);
|
|
16511
|
+
continue;
|
|
16512
|
+
}
|
|
16513
|
+
if (!run.value) {
|
|
16514
|
+
console.log(
|
|
16515
|
+
`${run.runId} ${run.recorded === false ? "not recorded" : "not reached"}`
|
|
16516
|
+
);
|
|
16517
|
+
continue;
|
|
16518
|
+
}
|
|
16519
|
+
const value = run.value;
|
|
16520
|
+
console.log(`${run.runId} ${value.status} (attempt ${value.attempt})`);
|
|
16521
|
+
const fields2 = (label, record5, truncated) => {
|
|
16522
|
+
const entries = Object.entries(record5 ?? {});
|
|
16523
|
+
if (entries.length === 0) return;
|
|
16524
|
+
console.log(
|
|
16525
|
+
` ${label}: ${entries.map(([name, preview]) => `${name}=${stepValuePreviewText(preview)}`).join(", ")}${truncated ? " \u2026" : ""}`
|
|
16526
|
+
);
|
|
16527
|
+
};
|
|
16528
|
+
fields2("input", value.inputs, value.inputsTruncated);
|
|
16529
|
+
fields2("output", value.outputs, value.outputsTruncated);
|
|
16530
|
+
if (value.error) console.log(` error: ${value.error.split(/\r?\n/)[0]}`);
|
|
16531
|
+
}
|
|
16532
|
+
return 0;
|
|
16533
|
+
}
|
|
16293
16534
|
async function handlePlayList(args) {
|
|
16294
16535
|
const jsonOutput = argsWantJson(args);
|
|
16295
16536
|
const showCost = args.includes("--show-cost");
|
|
@@ -16753,10 +16994,14 @@ async function handlePlaySave(args) {
|
|
|
16753
16994
|
}
|
|
16754
16995
|
const saveClient = client ?? new DeeplineClient();
|
|
16755
16996
|
try {
|
|
16756
|
-
|
|
16757
|
-
|
|
16758
|
-
|
|
16759
|
-
|
|
16997
|
+
printDiagramRequirementIssues(
|
|
16998
|
+
await traceCliSpan(
|
|
16999
|
+
"cli.play_save_compile_manifests",
|
|
17000
|
+
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
17001
|
+
() => compileBundledPlayGraphManifests(saveClient, graph, {
|
|
17002
|
+
purpose: "publish"
|
|
17003
|
+
})
|
|
17004
|
+
)
|
|
16760
17005
|
);
|
|
16761
17006
|
const saved = await traceCliSpan(
|
|
16762
17007
|
"cli.play_save_register_draft",
|
|
@@ -16808,7 +17053,7 @@ async function handlePlaySave(args) {
|
|
|
16808
17053
|
}
|
|
16809
17054
|
}
|
|
16810
17055
|
async function enforceOutcomeGuardrail(input) {
|
|
16811
|
-
const { requireOutcomeGuardrail } = await import("./outcomes-
|
|
17056
|
+
const { requireOutcomeGuardrail } = await import("./outcomes-CJWBIFTA.mjs");
|
|
16812
17057
|
try {
|
|
16813
17058
|
const gate = await requireOutcomeGuardrail({ ...input, phase: "reserve" });
|
|
16814
17059
|
return {
|
|
@@ -16836,7 +17081,7 @@ async function enforceOutcomeGuardrail(input) {
|
|
|
16836
17081
|
}
|
|
16837
17082
|
}
|
|
16838
17083
|
async function settleOutcomeApproval(input) {
|
|
16839
|
-
const { requireOutcomeGuardrail } = await import("./outcomes-
|
|
17084
|
+
const { requireOutcomeGuardrail } = await import("./outcomes-CJWBIFTA.mjs");
|
|
16840
17085
|
const id = `${input.outcome}/${input.approval.seq}`;
|
|
16841
17086
|
try {
|
|
16842
17087
|
await requireOutcomeGuardrail({
|
|
@@ -16942,10 +17187,14 @@ async function handlePlayPublish(args) {
|
|
|
16942
17187
|
}
|
|
16943
17188
|
}
|
|
16944
17189
|
try {
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
17190
|
+
printDiagramRequirementIssues(
|
|
17191
|
+
await traceCliSpan(
|
|
17192
|
+
"cli.play_publish_compile_manifests",
|
|
17193
|
+
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
17194
|
+
() => compileBundledPlayGraphManifests(client, graph, {
|
|
17195
|
+
purpose: "publish"
|
|
17196
|
+
})
|
|
17197
|
+
)
|
|
16949
17198
|
);
|
|
16950
17199
|
await traceCliSpan(
|
|
16951
17200
|
"cli.play_publish_imports",
|
|
@@ -17707,6 +17956,17 @@ Examples:
|
|
|
17707
17956
|
...options.json ? ["--json"] : []
|
|
17708
17957
|
]);
|
|
17709
17958
|
});
|
|
17959
|
+
play.command("step-values <play>").description(
|
|
17960
|
+
"Read one diagram step's recorded input and output across runs."
|
|
17961
|
+
).requiredOption("--step <node>", "The step id as the diagram draws it").option("--runs <ids>", "Comma-separated run ids (at most 50)").option("--last <n>", "The play\u2019s newest n runs (1-50)").option("--json", "Emit the exact result as JSON").action(async (name, options) => {
|
|
17962
|
+
process.exitCode = await handlePlayStepValues({
|
|
17963
|
+
play: name,
|
|
17964
|
+
step: options.step,
|
|
17965
|
+
runs: options.runs,
|
|
17966
|
+
last: options.last,
|
|
17967
|
+
json: Boolean(options.json)
|
|
17968
|
+
});
|
|
17969
|
+
});
|
|
17710
17970
|
play.command("list").description("List saved and prebuilt plays.").addHelpText(
|
|
17711
17971
|
"after",
|
|
17712
17972
|
`
|
|
@@ -17850,7 +18110,7 @@ Examples:
|
|
|
17850
18110
|
process.exitCode = await ownView();
|
|
17851
18111
|
return;
|
|
17852
18112
|
}
|
|
17853
|
-
const { describeAnything } = await import("./describe-
|
|
18113
|
+
const { describeAnything } = await import("./describe-4SGQEX7K.mjs");
|
|
17854
18114
|
process.exitCode = await describeAnything(
|
|
17855
18115
|
name,
|
|
17856
18116
|
{
|
|
@@ -18241,7 +18501,7 @@ Examples:
|
|
|
18241
18501
|
new Option2("--log-failed", "Attach terminal-failure logs").hideHelp()
|
|
18242
18502
|
).action(async (runId, options) => {
|
|
18243
18503
|
if (TOOL_EXECUTION_ID.test(runId)) {
|
|
18244
|
-
const { getToolExecutionReceipt } = await import("./tools-
|
|
18504
|
+
const { getToolExecutionReceipt } = await import("./tools-M3S6D6DA.mjs");
|
|
18245
18505
|
process.exitCode = await getToolExecutionReceipt(runId, {
|
|
18246
18506
|
receiptJson: options.json !== void 0
|
|
18247
18507
|
});
|
|
@@ -18994,6 +19254,7 @@ export {
|
|
|
18994
19254
|
handlePlayShareStatus,
|
|
18995
19255
|
handlePlayShareUnpublish,
|
|
18996
19256
|
handlePlayShareUpdate,
|
|
19257
|
+
handlePlayStepValues,
|
|
18997
19258
|
handlePlayVersions,
|
|
18998
19259
|
handleRunEventSearch,
|
|
18999
19260
|
handleRunExport,
|