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
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkRXIQWG2Njs = require('./chunk-RXIQWG2N.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkISSYN3DJjs = require('./chunk-ISSYN3DJ.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkS33BN7GZjs = require('./chunk-S33BN7GZ.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunk4BSCSQ6Ijs = require('./chunk-4BSCSQ6I.js');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var _chunkRLX5ZFNXjs = require('./chunk-RLX5ZFNX.js');
|
|
@@ -145,7 +145,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
145
145
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
146
146
|
}
|
|
147
147
|
function resolveLocalRoot() {
|
|
148
|
-
const target =
|
|
148
|
+
const target = _chunkS33BN7GZjs.resolveProjectPinTarget.call(void 0, );
|
|
149
149
|
if (!target.ok) {
|
|
150
150
|
throw new Error(
|
|
151
151
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -156,7 +156,7 @@ function resolveLocalRoot() {
|
|
|
156
156
|
return target.dir;
|
|
157
157
|
}
|
|
158
158
|
function detectSkillsAgents(input) {
|
|
159
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
159
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunk4BSCSQ6Ijs.detectAgentRuntime.call(void 0, )));
|
|
160
160
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
161
161
|
if (knownAgent) return [knownAgent];
|
|
162
162
|
const roots = [
|
|
@@ -171,11 +171,11 @@ function detectSkillsAgents(input) {
|
|
|
171
171
|
return detected.length > 0 ? detected : ["*"];
|
|
172
172
|
}
|
|
173
173
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
174
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
174
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkS33BN7GZjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
175
175
|
}
|
|
176
176
|
function buildSkillsPlan(input) {
|
|
177
177
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
178
|
-
const legacyNames = [...
|
|
178
|
+
const legacyNames = [..._chunkRXIQWG2Njs.LEGACY_SKILL_NAMES_TO_REMOVE].sort(
|
|
179
179
|
(a, b) => a.localeCompare(b)
|
|
180
180
|
);
|
|
181
181
|
return {
|
|
@@ -189,7 +189,7 @@ function buildSkillsPlan(input) {
|
|
|
189
189
|
args: [
|
|
190
190
|
"exec",
|
|
191
191
|
"--yes",
|
|
192
|
-
`--package=${
|
|
192
|
+
`--package=${_chunkRXIQWG2Njs.SKILLS_NPX_PACKAGE}`,
|
|
193
193
|
"--",
|
|
194
194
|
"skills",
|
|
195
195
|
"remove",
|
|
@@ -205,11 +205,11 @@ function buildSkillsPlan(input) {
|
|
|
205
205
|
args: [
|
|
206
206
|
"exec",
|
|
207
207
|
"--yes",
|
|
208
|
-
`--package=${
|
|
208
|
+
`--package=${_chunkRXIQWG2Njs.SKILLS_NPX_PACKAGE}`,
|
|
209
209
|
"--",
|
|
210
210
|
"skills",
|
|
211
211
|
"add",
|
|
212
|
-
|
|
212
|
+
_chunkRXIQWG2Njs.skillsSourceUrl.call(void 0, input.baseUrl),
|
|
213
213
|
"--agent",
|
|
214
214
|
...input.agents,
|
|
215
215
|
...scopeArgs,
|
|
@@ -246,7 +246,7 @@ function readSkillsInstallState(path) {
|
|
|
246
246
|
}
|
|
247
247
|
function runProcess(command, args, cwd) {
|
|
248
248
|
return new Promise((resolve, reject) => {
|
|
249
|
-
const plan =
|
|
249
|
+
const plan = _chunkRXIQWG2Njs.resolveShellSpawn.call(void 0,
|
|
250
250
|
command,
|
|
251
251
|
args,
|
|
252
252
|
process.platform,
|
|
@@ -269,7 +269,7 @@ function runProcess(command, args, cwd) {
|
|
|
269
269
|
child.kill("SIGTERM");
|
|
270
270
|
reject(
|
|
271
271
|
new Error(
|
|
272
|
-
`${
|
|
272
|
+
`${_chunkRXIQWG2Njs.SKILLS_NPX_PACKAGE} timed out after ${SKILLS_PROCESS_TIMEOUT_MS}ms.`
|
|
273
273
|
)
|
|
274
274
|
);
|
|
275
275
|
}, SKILLS_PROCESS_TIMEOUT_MS);
|
|
@@ -280,7 +280,7 @@ function runProcess(command, args, cwd) {
|
|
|
280
280
|
child.once("close", (code) => {
|
|
281
281
|
clearTimeout(timeout);
|
|
282
282
|
if (code && stderr.trim()) {
|
|
283
|
-
process.stderr.write(`${
|
|
283
|
+
process.stderr.write(`${_chunkRXIQWG2Njs.SKILLS_NPX_PACKAGE} exited ${code}.
|
|
284
284
|
`);
|
|
285
285
|
}
|
|
286
286
|
resolve(_nullishCoalesce(code, () => ( 1)));
|
|
@@ -288,7 +288,7 @@ function runProcess(command, args, cwd) {
|
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
290
|
async function showSkills(options, name) {
|
|
291
|
-
const baseUrl =
|
|
291
|
+
const baseUrl = _chunkS33BN7GZjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
292
292
|
const url = name ? `${baseUrl}/.well-known/skills/${encodeURIComponent(name)}/SKILL.md` : `${baseUrl}/.well-known/skills/index.json`;
|
|
293
293
|
try {
|
|
294
294
|
const response = await fetch(url, {
|
|
@@ -301,7 +301,7 @@ async function showSkills(options, name) {
|
|
|
301
301
|
}
|
|
302
302
|
if (name) {
|
|
303
303
|
const markdown = await response.text();
|
|
304
|
-
|
|
304
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
305
305
|
{ ok: true, status: "completed", skill: { name, markdown } },
|
|
306
306
|
{ json: options.json, text: markdown }
|
|
307
307
|
);
|
|
@@ -311,7 +311,7 @@ async function showSkills(options, name) {
|
|
|
311
311
|
const skills = (_nullishCoalesce(index.skills, () => ( []))).filter(
|
|
312
312
|
(skill) => skill.install_surface === "v1" && skill.name
|
|
313
313
|
);
|
|
314
|
-
|
|
314
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
315
315
|
{
|
|
316
316
|
ok: true,
|
|
317
317
|
status: "completed",
|
|
@@ -328,7 +328,7 @@ Read one with: deepline skills show <name>
|
|
|
328
328
|
);
|
|
329
329
|
return 0;
|
|
330
330
|
} catch (error) {
|
|
331
|
-
|
|
331
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
332
332
|
{
|
|
333
333
|
ok: false,
|
|
334
334
|
status: "failed",
|
|
@@ -351,7 +351,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
351
351
|
scope = normalizeScope(options.scope);
|
|
352
352
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
353
353
|
} catch (error) {
|
|
354
|
-
|
|
354
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
355
355
|
{
|
|
356
356
|
ok: false,
|
|
357
357
|
status: "failed",
|
|
@@ -363,22 +363,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
363
363
|
);
|
|
364
364
|
return 2;
|
|
365
365
|
}
|
|
366
|
-
const baseUrl =
|
|
366
|
+
const baseUrl = _chunkS33BN7GZjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
367
367
|
const catalog = {
|
|
368
|
-
skillNames: [...
|
|
369
|
-
version:
|
|
368
|
+
skillNames: [..._chunkRXIQWG2Njs.DEFAULT_SDK_SKILL_NAMES],
|
|
369
|
+
version: _chunk4BSCSQ6Ijs.SDK_VERSION
|
|
370
370
|
};
|
|
371
371
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
372
372
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
373
373
|
if (options.dryRun) {
|
|
374
|
-
|
|
374
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
375
375
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
376
376
|
{ json: options.json }
|
|
377
377
|
);
|
|
378
378
|
return 0;
|
|
379
379
|
}
|
|
380
|
-
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !
|
|
381
|
-
|
|
380
|
+
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !_chunkRXIQWG2Njs.hasFailedAutomaticSkillsSync.call(void 0, baseUrl, agents)) {
|
|
381
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
382
382
|
{
|
|
383
383
|
ok: true,
|
|
384
384
|
status: "current",
|
|
@@ -410,10 +410,10 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
410
410
|
}
|
|
411
411
|
if (scope === "local" && root) {
|
|
412
412
|
const managedNames = [
|
|
413
|
-
.../* @__PURE__ */ new Set([...plan.skillNames, ...
|
|
413
|
+
.../* @__PURE__ */ new Set([...plan.skillNames, ..._chunkRXIQWG2Njs.LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
414
414
|
];
|
|
415
415
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
416
|
-
|
|
416
|
+
_chunkS33BN7GZjs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
417
417
|
".deepline/",
|
|
418
418
|
...agentRoots.flatMap(
|
|
419
419
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -422,7 +422,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
422
422
|
}
|
|
423
423
|
let lease;
|
|
424
424
|
try {
|
|
425
|
-
lease = scope === "global" ? await
|
|
425
|
+
lease = scope === "global" ? await _chunkRXIQWG2Njs.acquireSkillsInstallLease.call(void 0, baseUrl, agents, plan.version, {
|
|
426
426
|
waitMs: _nullishCoalesce(dependencies.installLeaseWaitMs, () => ( SKILLS_INSTALL_LEASE_WAIT_MS)),
|
|
427
427
|
onWait: () => process.stderr.write(
|
|
428
428
|
"Waiting for a background Deepline skills refresh to finish...\n"
|
|
@@ -430,8 +430,8 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
430
430
|
}) : { release: () => {
|
|
431
431
|
} };
|
|
432
432
|
} catch (error) {
|
|
433
|
-
if (!(error instanceof
|
|
434
|
-
|
|
433
|
+
if (!(error instanceof _chunkRXIQWG2Njs.SkillsStateUnavailableError)) throw error;
|
|
434
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
435
435
|
{
|
|
436
436
|
ok: false,
|
|
437
437
|
status: "failed",
|
|
@@ -447,7 +447,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
447
447
|
return 5;
|
|
448
448
|
}
|
|
449
449
|
if (!lease) {
|
|
450
|
-
|
|
450
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
451
451
|
{
|
|
452
452
|
ok: false,
|
|
453
453
|
status: "failed",
|
|
@@ -456,7 +456,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
456
456
|
scope,
|
|
457
457
|
agents,
|
|
458
458
|
message: "A background Deepline skills refresh is still running for these agents.",
|
|
459
|
-
next: `Retry in a moment: deepline skills install --scope ${scope}. If no refresh is running, remove ${
|
|
459
|
+
next: `Retry in a moment: deepline skills install --scope ${scope}. If no refresh is running, remove ${_chunkRXIQWG2Njs.skillsInstallLeasePath.call(void 0, baseUrl, agents)}`
|
|
460
460
|
},
|
|
461
461
|
{ json: options.json }
|
|
462
462
|
);
|
|
@@ -505,7 +505,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
} catch (error) {
|
|
508
|
-
|
|
508
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
509
509
|
{
|
|
510
510
|
ok: false,
|
|
511
511
|
status: "failed",
|
|
@@ -521,7 +521,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
521
521
|
return 5;
|
|
522
522
|
}
|
|
523
523
|
if (missing.length > 0) {
|
|
524
|
-
|
|
524
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
525
525
|
{
|
|
526
526
|
ok: false,
|
|
527
527
|
status: "failed",
|
|
@@ -561,7 +561,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
561
561
|
{
|
|
562
562
|
schemaVersion: 1,
|
|
563
563
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
564
|
-
cliVersion:
|
|
564
|
+
cliVersion: _chunk4BSCSQ6Ijs.SDK_VERSION,
|
|
565
565
|
scope,
|
|
566
566
|
agents,
|
|
567
567
|
skillsVersion: plan.version,
|
|
@@ -574,9 +574,9 @@ async function runSkillsInstallWithLease(input) {
|
|
|
574
574
|
"utf8"
|
|
575
575
|
);
|
|
576
576
|
if (scope === "global") {
|
|
577
|
-
|
|
577
|
+
_chunkRXIQWG2Njs.clearFailedAutomaticSkillsSync.call(void 0, baseUrl, agents);
|
|
578
578
|
}
|
|
579
|
-
|
|
579
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
580
580
|
{
|
|
581
581
|
ok: true,
|
|
582
582
|
status: "complete",
|
|
@@ -625,7 +625,7 @@ Examples:
|
|
|
625
625
|
"after",
|
|
626
626
|
`
|
|
627
627
|
Notes:
|
|
628
|
-
This command reinstalls current Deepline-managed skills using ${
|
|
628
|
+
This command reinstalls current Deepline-managed skills using ${_chunkRXIQWG2Njs.SKILLS_NPX_PACKAGE},
|
|
629
629
|
then removes legacy Deepline skill names. Local scope writes into the resolved
|
|
630
630
|
persistent project.
|
|
631
631
|
|
|
@@ -637,13 +637,13 @@ Examples:
|
|
|
637
637
|
).action(async (options) => {
|
|
638
638
|
process.exitCode = await runSkillsCommand(options);
|
|
639
639
|
});
|
|
640
|
-
program.command(
|
|
640
|
+
program.command(_chunkRXIQWG2Njs.SKILLS_AUTO_SYNC_COMMAND, { hidden: true }).description("Refresh Deepline agent skills in the background.").option(
|
|
641
641
|
"--claim <token>",
|
|
642
642
|
"Owner token of the leases this child was started for."
|
|
643
643
|
).action(async (options) => {
|
|
644
644
|
const claim = _optionalChain([options, 'access', _9 => _9.claim, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]);
|
|
645
645
|
if (!claim) {
|
|
646
|
-
|
|
646
|
+
_chunkISSYN3DJjs.printCommandEnvelope.call(void 0,
|
|
647
647
|
{
|
|
648
648
|
ok: false,
|
|
649
649
|
status: "failed",
|
|
@@ -656,7 +656,7 @@ Examples:
|
|
|
656
656
|
process.exitCode = 2;
|
|
657
657
|
return;
|
|
658
658
|
}
|
|
659
|
-
await
|
|
659
|
+
await _chunkRXIQWG2Njs.syncSdkSkillsIfNeeded.call(void 0, _chunkS33BN7GZjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
660
660
|
mode: "inline",
|
|
661
661
|
notices: "defer",
|
|
662
662
|
claim
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkS33BN7GZjs = require('./chunk-S33BN7GZ.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk4BSCSQ6Ijs = require('./chunk-4BSCSQ6I.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -331,7 +331,7 @@ function buildEnvironmentContext() {
|
|
|
331
331
|
node_version: process.version,
|
|
332
332
|
runtime: "Node.js",
|
|
333
333
|
hostname: _os.hostname.call(void 0, ),
|
|
334
|
-
agent_runtime:
|
|
334
|
+
agent_runtime: _chunk4BSCSQ6Ijs.detectAgentRuntime.call(void 0, )
|
|
335
335
|
};
|
|
336
336
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
337
337
|
const normalized = _optionalChain([process, 'access', _6 => _6.env, 'access', _7 => _7[key], 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]);
|
|
@@ -352,18 +352,18 @@ function buildEnvironmentContext() {
|
|
|
352
352
|
return context;
|
|
353
353
|
}
|
|
354
354
|
function failureReportHeaders(apiKey) {
|
|
355
|
-
const agentSessionId =
|
|
355
|
+
const agentSessionId = _chunk4BSCSQ6Ijs.agentSessionIdFromEnvironment.call(void 0, );
|
|
356
356
|
return {
|
|
357
|
-
...
|
|
357
|
+
..._chunk4BSCSQ6Ijs.deploymentProtectionHeaders.call(void 0, ),
|
|
358
358
|
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
|
|
359
359
|
Authorization: `Bearer ${apiKey}`,
|
|
360
360
|
"Content-Type": "application/json",
|
|
361
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
361
|
+
"User-Agent": `deepline-ts-sdk/${_chunk4BSCSQ6Ijs.SDK_VERSION}`,
|
|
362
362
|
"X-Deepline-Client-Family": "sdk",
|
|
363
363
|
"X-Deepline-CLI-Family": "sdk",
|
|
364
|
-
"X-Deepline-Agent-Runtime":
|
|
365
|
-
"X-Deepline-CLI-Version":
|
|
366
|
-
"X-Deepline-SDK-Version":
|
|
364
|
+
"X-Deepline-Agent-Runtime": _chunk4BSCSQ6Ijs.detectAgentRuntime.call(void 0, ),
|
|
365
|
+
"X-Deepline-CLI-Version": _chunk4BSCSQ6Ijs.SDK_VERSION,
|
|
366
|
+
"X-Deepline-SDK-Version": _chunk4BSCSQ6Ijs.SDK_VERSION
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
async function postFailureReport(input) {
|
|
@@ -391,7 +391,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
391
391
|
if (isFailureReportingDisabled()) return false;
|
|
392
392
|
let apiKey = "";
|
|
393
393
|
try {
|
|
394
|
-
apiKey =
|
|
394
|
+
apiKey = _chunkS33BN7GZjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
395
395
|
} catch (e2) {
|
|
396
396
|
return false;
|
|
397
397
|
}
|
|
@@ -418,7 +418,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
418
418
|
failure_code: failureCode2,
|
|
419
419
|
failure_stage: failureStage,
|
|
420
420
|
error_body: "Automatic Deepline skills installation failed.",
|
|
421
|
-
cli_version:
|
|
421
|
+
cli_version: _chunk4BSCSQ6Ijs.SDK_VERSION,
|
|
422
422
|
context: {
|
|
423
423
|
environment: buildEnvironmentContext(),
|
|
424
424
|
skills_sync: {
|
|
@@ -538,7 +538,7 @@ function buildFailureReport(input) {
|
|
|
538
538
|
failure_kind: failureKind,
|
|
539
539
|
failure_code: code,
|
|
540
540
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
541
|
-
cli_version:
|
|
541
|
+
cli_version: _chunk4BSCSQ6Ijs.SDK_VERSION,
|
|
542
542
|
context: {
|
|
543
543
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
544
544
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -558,8 +558,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
558
558
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
559
559
|
const exitCode = resolvedExitCode(input);
|
|
560
560
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
561
|
-
const baseUrl =
|
|
562
|
-
const apiKey =
|
|
561
|
+
const baseUrl = _chunkS33BN7GZjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
562
|
+
const apiKey = _chunkS33BN7GZjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
563
563
|
if (!apiKey) return false;
|
|
564
564
|
return postFailureReport({
|
|
565
565
|
baseUrl,
|
|
@@ -914,8 +914,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
914
914
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
915
915
|
var defaultBrowserCommandRunner = childProcess;
|
|
916
916
|
function getAuthedHttpClient() {
|
|
917
|
-
const config =
|
|
918
|
-
return { config, http: new (0,
|
|
917
|
+
const config = _chunkS33BN7GZjs.resolveConfig.call(void 0, );
|
|
918
|
+
return { config, http: new (0, _chunkS33BN7GZjs.HttpClient)(config) };
|
|
919
919
|
}
|
|
920
920
|
function stableOsUserId() {
|
|
921
921
|
try {
|
|
@@ -1256,7 +1256,7 @@ function collectLocalEnvInfo() {
|
|
|
1256
1256
|
os: `${process.platform} ${process.arch}`,
|
|
1257
1257
|
node_version: process.version,
|
|
1258
1258
|
home_dir: homeDir,
|
|
1259
|
-
agent_runtime:
|
|
1259
|
+
agent_runtime: _chunk4BSCSQ6Ijs.detectAgentRuntime.call(void 0, )
|
|
1260
1260
|
};
|
|
1261
1261
|
const env = process.env;
|
|
1262
1262
|
const optional = {
|
|
@@ -1503,9 +1503,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
function withAgentCommandContext(value) {
|
|
1505
1505
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
1506
|
-
return
|
|
1506
|
+
return _chunk4BSCSQ6Ijs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
1507
1507
|
...valueRecord,
|
|
1508
|
-
command_context:
|
|
1508
|
+
command_context: _chunkS33BN7GZjs.resolveCliCommandContext.call(void 0, )
|
|
1509
1509
|
} : value;
|
|
1510
1510
|
}
|
|
1511
1511
|
function printJson(value, fields, options = {}) {
|
|
@@ -1677,7 +1677,7 @@ function errorToJsonPayload(error) {
|
|
|
1677
1677
|
...upstreamResponse ? { upstreamResponse } : {},
|
|
1678
1678
|
...Object.keys(details).length > 0 ? { details } : {}
|
|
1679
1679
|
};
|
|
1680
|
-
const retry = cliRetryGuidance(payloadError,
|
|
1680
|
+
const retry = cliRetryGuidance(payloadError, _chunk4BSCSQ6Ijs.readToolFailureHint.call(void 0, error));
|
|
1681
1681
|
return {
|
|
1682
1682
|
ok: false,
|
|
1683
1683
|
status: "failed",
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
RETAINED_PIPELINE_RECEIVERS_HEADER,
|
|
38
38
|
RUNTIME_ENVIRONMENT_TOKEN_HEADER,
|
|
39
39
|
SDK_API_MAJOR
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-HNTIGYRT.mjs";
|
|
41
41
|
import {
|
|
42
42
|
CustomerDbQueryOutcomeUnknownError
|
|
43
43
|
} from "./chunk-ASB47RXJ.mjs";
|
|
@@ -2802,6 +2802,8 @@ var RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
|
|
|
2802
2802
|
var RUNTIME_SHEET_START_TARGET_RESPONSE_BYTES = 1024 * 1024;
|
|
2803
2803
|
var RUNTIME_RECEIPT_GATEWAY_BATCH_MAX_BYTES = 12 * 1024 * 1024;
|
|
2804
2804
|
var RUNTIME_RECEIPT_WRITER_TARGET_BATCH_BYTES = 8 * 1024 * 1024;
|
|
2805
|
+
var RUNTIME_RECEIPT_READ_TARGET_RESPONSE_BYTES = 4 * 1024 * 1024;
|
|
2806
|
+
var RUNTIME_RECEIPT_READ_UNKNOWN_OUTPUT_BYTES = 32 * 1024;
|
|
2805
2807
|
var RUNNER_POST_TERMINAL_DIAGNOSTIC_MAX_BYTES = 64 * 1024;
|
|
2806
2808
|
var JSON_SIZE_LIMIT_REACHED = Symbol("JSON_SIZE_LIMIT_REACHED");
|
|
2807
2809
|
var OMIT_JSON_OUTPUT_VALUE = Symbol("OMIT_JSON_OUTPUT_VALUE");
|
|
@@ -4683,6 +4685,14 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
4683
4685
|
* The compiler needs these records before it checks, registers, or runs a Play artifact.
|
|
4684
4686
|
*/
|
|
4685
4687
|
async compilePlayManifest(input) {
|
|
4688
|
+
return (await this.compilePlayManifestWithIssues(input)).compilerManifest;
|
|
4689
|
+
}
|
|
4690
|
+
/**
|
|
4691
|
+
* {@link compilePlayManifest}, plus the structured check issues the compile
|
|
4692
|
+
* produced, so a publishing client can show the same warnings `plays check`
|
|
4693
|
+
* shows. `issues` is empty from a server that does not return them.
|
|
4694
|
+
*/
|
|
4695
|
+
async compilePlayManifestWithIssues(input) {
|
|
4686
4696
|
const retryDelays = COMPILE_MANIFEST_RETRY_DELAYS_MS.slice(
|
|
4687
4697
|
0,
|
|
4688
4698
|
Math.max(0, this.config.maxRetries)
|
|
@@ -4690,7 +4700,13 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
4690
4700
|
for (let attempt = 0; ; attempt += 1) {
|
|
4691
4701
|
try {
|
|
4692
4702
|
const response = await this.http.post("/api/v2/plays/compile-manifest", input);
|
|
4693
|
-
return
|
|
4703
|
+
return {
|
|
4704
|
+
compilerManifest: requireCompileManifestResponse(
|
|
4705
|
+
response,
|
|
4706
|
+
input.name
|
|
4707
|
+
),
|
|
4708
|
+
issues: Array.isArray(response?.issues) ? response.issues : []
|
|
4709
|
+
};
|
|
4694
4710
|
} catch (error) {
|
|
4695
4711
|
const delayMs = retryDelays[attempt];
|
|
4696
4712
|
if (delayMs === void 0 || !isTransientCompileManifestError(error)) {
|
|
@@ -4725,35 +4741,25 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
4725
4741
|
return this.http.post("/api/v2/enrich/compile", input);
|
|
4726
4742
|
}
|
|
4727
4743
|
/**
|
|
4728
|
-
*
|
|
4744
|
+
* Start a run from an already-bundled play artifact, as `plays run --file`
|
|
4745
|
+
* does: the run registers the artifact; no draft revision is saved.
|
|
4729
4746
|
*
|
|
4730
4747
|
* SDK and CLI packaging wrappers use this low-level run method for file-based Plays.
|
|
4731
4748
|
* Local bundling must produce the runtime artifact first.
|
|
4732
4749
|
*/
|
|
4733
4750
|
async startPlayRunFromBundle(input) {
|
|
4734
4751
|
const compilerManifest = input.compilerManifest ?? await this.compilePlayManifest({
|
|
4752
|
+
purpose: "run_file",
|
|
4735
4753
|
name: input.name,
|
|
4736
4754
|
sourceCode: input.sourceCode,
|
|
4737
4755
|
sourceFiles: input.sourceFiles,
|
|
4738
4756
|
artifact: input.artifact
|
|
4739
4757
|
});
|
|
4740
|
-
const registeredArtifact = await this.registerPlayArtifact({
|
|
4741
|
-
name: input.name,
|
|
4742
|
-
sourceCode: input.sourceCode,
|
|
4743
|
-
sourceFiles: input.sourceFiles,
|
|
4744
|
-
description: input.description,
|
|
4745
|
-
artifact: input.artifact,
|
|
4746
|
-
compilerManifest,
|
|
4747
|
-
publish: false
|
|
4748
|
-
});
|
|
4749
|
-
if (!registeredArtifact.artifactStorageKey) {
|
|
4750
|
-
throw new Error(
|
|
4751
|
-
"registerPlayArtifact did not return an artifactStorageKey."
|
|
4752
|
-
);
|
|
4753
|
-
}
|
|
4754
4758
|
return this.startPlayRun({
|
|
4755
4759
|
name: input.name,
|
|
4756
|
-
|
|
4760
|
+
sourceCode: input.sourceCode,
|
|
4761
|
+
...input.sourceFiles ? { sourceFiles: input.sourceFiles } : {},
|
|
4762
|
+
runtimeArtifact: input.artifact,
|
|
4757
4763
|
description: input.description,
|
|
4758
4764
|
compilerManifest,
|
|
4759
4765
|
...input.input ? { input: input.input } : {},
|
|
@@ -4764,9 +4770,10 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
4764
4770
|
});
|
|
4765
4771
|
}
|
|
4766
4772
|
/**
|
|
4767
|
-
*
|
|
4773
|
+
* Start a run from a bundled play artifact, as `plays run --file` does: the
|
|
4774
|
+
* run registers the artifact; no draft revision is saved.
|
|
4768
4775
|
*
|
|
4769
|
-
* This method wraps {@link
|
|
4776
|
+
* This method wraps {@link compilePlayManifest} and {@link startPlayRun}.
|
|
4770
4777
|
* Packaging wrappers use this method for file-based Plays.
|
|
4771
4778
|
* Pass the returned ID to {@link getPlayStatus}.
|
|
4772
4779
|
* The method returns the same durable `{ result }` object that `deepline run` saves when it completes.
|
|
@@ -4801,31 +4808,17 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
4801
4808
|
throw new Error("submitPlay requires a bundled play artifact.");
|
|
4802
4809
|
}
|
|
4803
4810
|
const compilerManifest = options?.compilerManifest ?? await this.compilePlayManifest({
|
|
4811
|
+
purpose: "run_file",
|
|
4804
4812
|
name,
|
|
4805
4813
|
sourceCode,
|
|
4806
4814
|
sourceFiles: options?.sourceFiles,
|
|
4807
4815
|
artifact
|
|
4808
4816
|
});
|
|
4809
|
-
const registeredArtifact = await this.registerPlayArtifact({
|
|
4810
|
-
name,
|
|
4811
|
-
sourceCode,
|
|
4812
|
-
sourceFiles: options?.sourceFiles,
|
|
4813
|
-
description: options?.description,
|
|
4814
|
-
artifact,
|
|
4815
|
-
compilerManifest,
|
|
4816
|
-
publish: false
|
|
4817
|
-
});
|
|
4818
|
-
if (!registeredArtifact.artifactStorageKey) {
|
|
4819
|
-
throw new Error(
|
|
4820
|
-
"registerPlayArtifact did not return an artifactStorageKey."
|
|
4821
|
-
);
|
|
4822
|
-
}
|
|
4823
4817
|
return this.startPlayRun({
|
|
4824
4818
|
name,
|
|
4825
|
-
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
4826
4819
|
sourceCode,
|
|
4820
|
+
...options?.sourceFiles ? { sourceFiles: options.sourceFiles } : {},
|
|
4827
4821
|
description: options?.description,
|
|
4828
|
-
staticPipeline: registeredArtifact.staticPipeline ?? null,
|
|
4829
4822
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
4830
4823
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
4831
4824
|
runtimeArtifact: artifact,
|
|
@@ -6407,6 +6400,31 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
6407
6400
|
async getPlayCostEstimate(name) {
|
|
6408
6401
|
return this.http.get(`/api/v2/plays/${encodeURIComponent(name)}/cost`);
|
|
6409
6402
|
}
|
|
6403
|
+
/**
|
|
6404
|
+
* One diagram step's recorded values (bounded input/output previews,
|
|
6405
|
+
* status, attempt) for at most 50 named runs of a Play. Every run is
|
|
6406
|
+
* answered once, in order: `found: false` when it is not this Play's run,
|
|
6407
|
+
* `value: null` when it never settled at the step. Read-only.
|
|
6408
|
+
*/
|
|
6409
|
+
async getPlayStepValues(input) {
|
|
6410
|
+
const node = input.node.trim();
|
|
6411
|
+
if (!node) throw new Error("getPlayStepValues requires a node.");
|
|
6412
|
+
if (node.length > 300)
|
|
6413
|
+
throw new Error("getPlayStepValues node must be at most 300 characters.");
|
|
6414
|
+
const runIds = [
|
|
6415
|
+
...new Set(input.runIds.map((runId) => runId.trim()).filter(Boolean))
|
|
6416
|
+
];
|
|
6417
|
+
if (runIds.length === 0)
|
|
6418
|
+
throw new Error("getPlayStepValues requires at least one run id.");
|
|
6419
|
+
if (runIds.length > 50)
|
|
6420
|
+
throw new Error(
|
|
6421
|
+
`getPlayStepValues reads at most 50 runs per request; got ${runIds.length}.`
|
|
6422
|
+
);
|
|
6423
|
+
const params = new URLSearchParams({ node, runIds: runIds.join(",") });
|
|
6424
|
+
return this.http.get(
|
|
6425
|
+
`/api/v2/plays/${encodeURIComponent(input.playName)}/step-values?${params}`
|
|
6426
|
+
);
|
|
6427
|
+
}
|
|
6410
6428
|
/** Read one trigger inventory page without loading run histories. */
|
|
6411
6429
|
async listPlayTriggerInventory(options) {
|
|
6412
6430
|
const params = new URLSearchParams({ view: "inventory" });
|
|
@@ -49,10 +49,14 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
|
|
52
|
+
// 0.4.0 is the first CLI the server refuses a Play without a `@mermaid`
|
|
53
|
+
// diagram for (PLAY_DIAGRAM_REQUIRED_FROM_CLI_RELEASE in
|
|
54
|
+
// apps/deepline-api/src/lib/plays/diagram-requirement.ts); older CLIs are
|
|
55
|
+
// only warned.
|
|
56
|
+
version: "0.4.0",
|
|
53
57
|
updateSummary: {
|
|
54
|
-
introducedIn: "0.
|
|
55
|
-
summary: "Play
|
|
58
|
+
introducedIn: "0.4.0",
|
|
59
|
+
summary: "Publishing a Play now requires a `@mermaid` diagram that binds its steps, so every run records what each step read and produced; `deepline plays check` shows what is missing and how to add it. Local `deepline plays run --file` still runs without one."
|
|
56
60
|
},
|
|
57
61
|
packageCapabilities: {
|
|
58
62
|
updatePreferences: 1,
|