deepline 0.3.543 → 0.3.545
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 +11 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +3 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/errors.ts +5 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +5 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +142 -3
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +13 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +1 -1
- package/dist/cli/auth-455MB4K6.js +43 -0
- package/dist/cli/{auth-ITAELTOA.mjs → auth-VZAMAMFW.mjs} +5 -5
- package/dist/cli/{billing-33XVFDUJ.js → billing-ASZJDFH2.js} +92 -92
- package/dist/cli/{billing-WZ7RVZW4.mjs → billing-DADQUQEZ.mjs} +8 -8
- package/dist/cli/{chunk-NR3O56FT.mjs → chunk-2CBX43LP.mjs} +5 -5
- package/dist/cli/{chunk-F6VSQ5LN.js → chunk-2FF3O2Y2.js} +12 -12
- package/dist/cli/{chunk-52YK3EII.mjs → chunk-2HFSYH7V.mjs} +2 -2
- package/dist/cli/{chunk-EHUG6EUT.js → chunk-34UKDHRL.js} +26 -26
- package/dist/cli/{chunk-JXG7HWBA.mjs → chunk-3M2QH3KA.mjs} +1 -1
- package/dist/cli/{chunk-2NCJQEZH.js → chunk-3NG43NXB.js} +53 -53
- package/dist/cli/{chunk-4SKDSSPU.mjs → chunk-3TCHX7YK.mjs} +2 -2
- package/dist/cli/{chunk-5VIPTLRX.mjs → chunk-4NZ3OZNO.mjs} +1 -1
- package/dist/cli/{chunk-ZRT2PNYY.mjs → chunk-52C6W7FG.mjs} +1 -1
- package/dist/cli/{chunk-STXG2LFC.js → chunk-5YYWZ43J.js} +2 -2
- package/dist/cli/{chunk-274WKLSY.mjs → chunk-7JZ27AFH.mjs} +2 -2
- package/dist/cli/{chunk-R57UCXQG.mjs → chunk-7MFATEUC.mjs} +1 -1
- package/dist/cli/{chunk-MCBUWK5K.js → chunk-7MHBJU73.js} +22 -22
- package/dist/cli/{chunk-XFPVFWZR.mjs → chunk-7P72EGLK.mjs} +1 -1
- package/dist/cli/{chunk-TBCNL2T5.js → chunk-C6XYSTBW.js} +1 -1
- package/dist/cli/{chunk-QFRMVI4S.js → chunk-CJ7DBYEQ.js} +3 -3
- package/dist/cli/{chunk-YE3T73BV.js → chunk-CXETRZ3G.js} +10 -10
- package/dist/cli/{chunk-BGAUADV4.js → chunk-D3SXB2NX.js} +41 -41
- package/dist/cli/{chunk-UJ6GOV7K.js → chunk-DGKDCZGC.js} +13 -13
- package/dist/cli/{chunk-46BEBZ3M.js → chunk-DZTVDL2X.js} +29 -28
- package/dist/cli/{chunk-2KTGZKRE.js → chunk-EK5C2R7S.js} +15 -15
- package/dist/cli/{chunk-YJYKZ2U3.js → chunk-ERLW6RPA.js} +2 -2
- package/dist/cli/{chunk-VSJEOSYL.mjs → chunk-EWA3M54M.mjs} +1 -1
- package/dist/cli/{chunk-2LNTKICO.js → chunk-FB7UPZ6M.js} +3 -3
- package/dist/cli/{chunk-PX7XAVUC.js → chunk-G5TV6WLV.js} +19 -19
- package/dist/cli/{chunk-NHKP2NSU.js → chunk-GFRJU2KB.js} +2 -2
- package/dist/cli/{chunk-D6YAU3CF.mjs → chunk-GWDPNOA7.mjs} +2 -1
- package/dist/cli/{chunk-ZSPBJB7I.mjs → chunk-HLUNTJBO.mjs} +4 -4
- package/dist/cli/{chunk-OELJKQOL.mjs → chunk-HPX7LLAM.mjs} +2 -2
- package/dist/cli/{chunk-DI3GL3T6.js → chunk-HR5BT42R.js} +99 -99
- package/dist/cli/{chunk-3JZXU5OB.js → chunk-IYJO3RWR.js} +5 -5
- package/dist/cli/{chunk-DH43ECTN.mjs → chunk-JL5JU3LD.mjs} +2 -2
- package/dist/cli/{chunk-OAFKUHN5.mjs → chunk-KRW727W6.mjs} +4 -4
- package/dist/cli/{chunk-SYOPHFKB.mjs → chunk-KYO2FICL.mjs} +5 -5
- package/dist/cli/{chunk-FNW2SGPD.mjs → chunk-LTCEZWPZ.mjs} +2 -2
- package/dist/cli/{chunk-XBM3KABD.mjs → chunk-LWPFMYSO.mjs} +2 -2
- package/dist/cli/{chunk-NLENABRU.js → chunk-N4LADLCO.js} +6 -6
- package/dist/cli/{chunk-XSN6BAZT.mjs → chunk-NAN3A4IF.mjs} +5 -5
- package/dist/cli/{chunk-23D224GI.js → chunk-NCX2JH2F.js} +9 -9
- package/dist/cli/{chunk-DUGTPVT7.js → chunk-NZDZGK35.js} +7 -7
- package/dist/cli/{chunk-C35NLLSA.js → chunk-OGQYAJSO.js} +5 -5
- package/dist/cli/{chunk-J2F6F5GL.js → chunk-QI57XUGA.js} +5 -5
- package/dist/cli/{chunk-O2KLWUNI.js → chunk-QM7PHHYZ.js} +44 -44
- package/dist/cli/{chunk-5MN3BKNB.js → chunk-TQKHXMV3.js} +16 -16
- package/dist/cli/{chunk-SU4K4SUU.mjs → chunk-WP36UBRY.mjs} +1 -1
- package/dist/cli/{chunk-AACKPOGA.mjs → chunk-XBYQZEUE.mjs} +1 -1
- package/dist/cli/{chunk-7AUQTNLB.mjs → chunk-XGEUPU3L.mjs} +2 -2
- package/dist/cli/{chunk-HKJ26NRN.mjs → chunk-XMUPZINS.mjs} +5 -5
- package/dist/cli/{chunk-GRCFX2EG.js → chunk-YRQKRQDU.js} +4 -4
- package/dist/cli/{chunk-6SJZMMD5.mjs → chunk-YWTRCKGD.mjs} +11 -11
- package/dist/cli/{chunk-SZNJENGT.mjs → chunk-Z4Y4BLW7.mjs} +3 -3
- package/dist/cli/{chunk-W2OPPSAZ.mjs → chunk-Z7QM244Q.mjs} +3 -3
- package/dist/cli/concurrent-runs-help-GFWXOKF5.js +21 -0
- package/dist/cli/{concurrent-runs-help-Z6ODNL4E.mjs → concurrent-runs-help-YP7ALTDB.mjs} +6 -6
- package/dist/cli/{csv-SSOFTXHU.js → csv-67WT5EGR.js} +13 -13
- package/dist/cli/{csv-5QW2HPHT.mjs → csv-D5ITFSYI.mjs} +4 -4
- package/dist/cli/{db-4LK5AJNO.js → db-GZS76X7R.js} +27 -27
- package/dist/cli/{db-K2JMR6EM.mjs → db-SZYBRFYG.mjs} +6 -6
- package/dist/cli/{describe-AXHQZHTT.mjs → describe-YJ7ZLLLI.mjs} +18 -18
- package/dist/cli/describe-ZRGYAEBT.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-FY2XTX2W.mjs → executions-HMYGR32E.mjs} +6 -6
- package/dist/cli/{executions-AATJQQAQ.js → executions-O5USTYGL.js} +8 -8
- package/dist/cli/{feedback-QPVJER75.js → feedback-RHLFDCRS.js} +14 -14
- package/dist/cli/{feedback-MKBPRGS6.mjs → feedback-Z3NXWYUO.mjs} +6 -6
- package/dist/cli/{git-AGRFZR3K.mjs → git-CLFKXELB.mjs} +5 -5
- package/dist/cli/git-RC4XDATD.js +25 -0
- package/dist/cli/index.js +142 -142
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{integrations-OUQ6U33M.mjs → integrations-FOACOBQB.mjs} +7 -7
- package/dist/cli/{integrations-R6OUFZXI.js → integrations-TZ4QEQGV.js} +15 -15
- package/dist/cli/{legacy-noops-DVL2RRKL.mjs → legacy-noops-6F6Y3BV7.mjs} +6 -6
- package/dist/cli/{legacy-noops-H7INM2QN.js → legacy-noops-QRDOS33V.js} +9 -9
- package/dist/cli/{mcp-33F7D7WI.js → mcp-ETMMDDGB.js} +24 -24
- package/dist/cli/{mcp-2Z2YVOLK.mjs → mcp-UXRCWOZU.mjs} +4 -4
- package/dist/cli/{monitors-NZD2WIKK.mjs → monitors-6XEWR46R.mjs} +86 -13
- package/dist/cli/{monitors-KDUJHAKJ.js → monitors-DITT7QTV.js} +179 -106
- package/dist/cli/{org-4PQGHLEB.js → org-4DE37X3L.js} +88 -88
- package/dist/cli/{org-EJW45RUA.mjs → org-CVSSH73G.mjs} +6 -6
- package/dist/cli/{play-MLHMQL4G.js → play-RH6P45CI.js} +317 -317
- package/dist/cli/{play-3CM5RT5J.mjs → play-Y5NCHOKK.mjs} +17 -17
- package/dist/cli/{providers-YBJG7277.js → providers-DU42DLOL.js} +9 -9
- package/dist/cli/{providers-BHYBJI4R.mjs → providers-VHUHC4IZ.mjs} +6 -6
- package/dist/cli/{quickstart-LL3MR562.mjs → quickstart-HJY5YYE5.mjs} +4 -4
- package/dist/cli/{quickstart-O7L2NNGJ.js → quickstart-XJ43JLEC.js} +6 -6
- package/dist/cli/{run-OK545H5Q.mjs → run-JAIXHVH7.mjs} +23 -23
- package/dist/cli/{run-HJ2AR6CM.js → run-JXUS7QFI.js} +43 -43
- package/dist/cli/search-O5VVMXII.js +32 -0
- package/dist/cli/{search-Z5ZKMRTX.mjs → search-RDMNM2AX.mjs} +7 -7
- package/dist/cli/{search-output-SVW4DETG.js → search-output-RKAM2HBH.js} +6 -6
- package/dist/cli/{search-output-Q5VHNUWG.mjs → search-output-ZKTR3WTJ.mjs} +4 -4
- package/dist/cli/{secrets-ENQWMCB5.js → secrets-TKFVMAYX.js} +15 -15
- package/dist/cli/{secrets-QIKIEFWB.mjs → secrets-WSW3FTF6.mjs} +6 -6
- package/dist/cli/sessions-3PWFWCHO.js +22 -0
- package/dist/cli/{sessions-AETO22RF.mjs → sessions-724BK6VP.mjs} +6 -6
- package/dist/cli/{settings-OFLIFTMZ.js → settings-5LJZDAZU.js} +85 -85
- package/dist/cli/{settings-G5RGRPFV.mjs → settings-YRC7J75G.mjs} +12 -12
- package/dist/cli/{setup-QW7Y62XD.js → setup-2F3DBSOS.js} +49 -49
- package/dist/cli/{setup-G4N3X6KG.mjs → setup-STNPX5MK.mjs} +9 -9
- package/dist/cli/{skills-QRFQGHNA.mjs → skills-D5PK56FO.mjs} +7 -7
- package/dist/cli/skills-RFOMVXIT.js +36 -0
- package/dist/cli/tools-CAO6EVUW.js +57 -0
- package/dist/cli/{tools-52BH7UTF.mjs → tools-WOGWMBA3.mjs} +17 -17
- package/dist/cli/update-L4DQZY3G.js +34 -0
- package/dist/cli/{update-SDGZLAGL.mjs → update-PC6XSWMI.mjs} +9 -9
- package/dist/cli/{views-5QKAWYPI.js → views-HLCLAPWN.js} +21 -21
- package/dist/cli/{views-3BIJFJMQ.mjs → views-IIHT4RYQ.mjs} +6 -6
- package/dist/cli/{workflow-G67RPWVY.js → workflow-CCZ2A7DI.js} +17 -17
- package/dist/cli/{workflow-QAK773FR.mjs → workflow-HK4MZ7LK.mjs} +7 -7
- package/dist/{client-D1ga52xq.d.ts → client-BQ6yuSjM.d.ts} +1 -1
- package/dist/{client-bd4QQIXo.d.mts → client-DfdUc_MY.d.mts} +1 -1
- package/dist/{client-core-B6eMVx8h.d.ts → client-core-3GQ8WMuk.d.ts} +14 -0
- package/dist/{client-core-CqfWNf2Q.d.mts → client-core-ClsNRytk.d.mts} +14 -0
- 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 +114 -114
- 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 +1 -1
- package/dist/release.d.ts +1 -1
- 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-S6B5WUU5.js +0 -43
- package/dist/cli/concurrent-runs-help-E4OYD3DS.js +0 -21
- package/dist/cli/describe-AC6PLEFP.js +0 -50
- package/dist/cli/git-RUYFQEJX.js +0 -25
- package/dist/cli/search-UUNS6BCC.js +0 -32
- package/dist/cli/sessions-FNSUDERA.js +0 -22
- package/dist/cli/skills-3IXIY2IV.js +0 -36
- package/dist/cli/tools-MYBUMPKH.js +0 -57
- package/dist/cli/update-GT7574UU.js +0 -34
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./chunk-EXMLR72R.mjs";
|
|
2
2
|
import {
|
|
3
3
|
DeeplineClient
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-3TCHX7YK.mjs";
|
|
5
|
+
import "./chunk-GWDPNOA7.mjs";
|
|
6
6
|
import "./chunk-HXIR3VQL.mjs";
|
|
7
7
|
import "./chunk-LX35AXTN.mjs";
|
|
8
8
|
import "./chunk-PSX3WHIH.mjs";
|
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
} from "./chunk-ZG7BOECV.mjs";
|
|
19
19
|
import {
|
|
20
20
|
createCliProgress
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EWA3M54M.mjs";
|
|
22
22
|
import {
|
|
23
23
|
errorToJsonPayload,
|
|
24
24
|
printCommandEnvelope,
|
|
25
25
|
printJson,
|
|
26
26
|
shouldEmitJson
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-JL5JU3LD.mjs";
|
|
28
|
+
import "./chunk-7MFATEUC.mjs";
|
|
29
|
+
import "./chunk-3M2QH3KA.mjs";
|
|
30
30
|
import {
|
|
31
31
|
AuthError
|
|
32
32
|
} from "./chunk-CQBIO6HW.mjs";
|
|
@@ -34,7 +34,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
34
34
|
import {
|
|
35
35
|
DeeplineError
|
|
36
36
|
} from "./chunk-JL2OTMSG.mjs";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-52C6W7FG.mjs";
|
|
38
38
|
import "./chunk-WZYKRD7T.mjs";
|
|
39
39
|
import "./chunk-KRD6H754.mjs";
|
|
40
40
|
|
|
@@ -1460,10 +1460,13 @@ function fleetPlanLine(payload) {
|
|
|
1460
1460
|
}).sort(([left], [right]) => left.localeCompare(right));
|
|
1461
1461
|
const blockedTotal = entries.reduce((sum, [, count]) => sum + count, 0);
|
|
1462
1462
|
const detail = entries.length === 0 ? "" : entries.length === 1 ? ` (${entries[0][0]})` : ` (${entries.map(([id, count]) => `${id}: ${count}`).join(", ")})`;
|
|
1463
|
+
const renames = asFiniteNumber(plan.renames) ?? 0;
|
|
1464
|
+
const adopts = (asFiniteNumber(plan.adopts) ?? 0) + (asFiniteNumber(plan.adoptsWithUpdate) ?? 0);
|
|
1463
1465
|
return [
|
|
1464
1466
|
`creates ${asFiniteNumber(plan.creates) ?? 0}`,
|
|
1465
|
-
`updates ${asFiniteNumber(plan.updates) ?? 0}`,
|
|
1467
|
+
`updates ${asFiniteNumber(plan.updates) ?? 0}${renames > 0 ? ` (${renames} name only)` : ""}`,
|
|
1466
1468
|
`removes ${asFiniteNumber(plan.removes) ?? 0}`,
|
|
1469
|
+
...adopts > 0 ? [`adopts ${adopts}`] : [],
|
|
1467
1470
|
`blocked ${blockedTotal}${detail}`
|
|
1468
1471
|
].join(" \xB7 ");
|
|
1469
1472
|
}
|
|
@@ -1524,6 +1527,11 @@ function renderFleetGet(payload) {
|
|
|
1524
1527
|
return `${lines.join("\n")}
|
|
1525
1528
|
`;
|
|
1526
1529
|
}
|
|
1530
|
+
function fleetDriftPriority(convergence) {
|
|
1531
|
+
const order = ["failed", "blocked", "rate_limited", "submitting", "pending"];
|
|
1532
|
+
const index = order.indexOf(convergence);
|
|
1533
|
+
return index === -1 ? order.length : index;
|
|
1534
|
+
}
|
|
1527
1535
|
function renderFleetDriftRows(payload) {
|
|
1528
1536
|
const drift = Array.isArray(payload.drift) ? payload.drift : void 0;
|
|
1529
1537
|
if (!drift) return [];
|
|
@@ -1537,17 +1545,18 @@ function renderFleetDriftRows(payload) {
|
|
|
1537
1545
|
since: asString(row.since) ?? "-",
|
|
1538
1546
|
detail: asString(row.error) ?? (asString(row.blocked_by) ? `blocked_by ${asString(row.blocked_by)}` : asString(row.next_attempt_at) ? `next_attempt_at ${asString(row.next_attempt_at)}` : "")
|
|
1539
1547
|
})).sort(
|
|
1540
|
-
(left, right) => left.monitorKey.localeCompare(right.monitorKey) || left.entityKey.localeCompare(right.entityKey)
|
|
1548
|
+
(left, right) => fleetDriftPriority(left.convergence) - fleetDriftPriority(right.convergence) || left.monitorKey.localeCompare(right.monitorKey) || left.entityKey.localeCompare(right.entityKey)
|
|
1541
1549
|
);
|
|
1542
1550
|
if (rows.length === 0) {
|
|
1543
1551
|
return [` drift none${payload.truncated === true ? " (truncated)" : ""}`];
|
|
1544
1552
|
}
|
|
1553
|
+
const outstanding = fleetOutstandingCount(payload);
|
|
1545
1554
|
const width = (values) => values.reduce((max, value) => Math.max(max, value.length), 0);
|
|
1546
1555
|
const monitorWidth = width(rows.map((row) => row.monitorKey));
|
|
1547
1556
|
const entityWidth = width(rows.map((row) => row.entityKey));
|
|
1548
1557
|
const convergenceWidth = width(rows.map((row) => row.convergence));
|
|
1549
1558
|
const lines = [
|
|
1550
|
-
` drift (${rows.length}${
|
|
1559
|
+
payload.truncated === true ? ` drift (${rows.length}${outstanding === void 0 ? "" : ` of ${outstanding}`}, truncated; failed and blocked first)` : ` drift (${rows.length})`
|
|
1551
1560
|
];
|
|
1552
1561
|
for (const row of rows) {
|
|
1553
1562
|
lines.push(
|
|
@@ -1774,6 +1783,7 @@ function fleetSyncCommandLine(target, options) {
|
|
|
1774
1783
|
if (options.file) parts.push(`--file ${fleetShellArg(options.file)}`);
|
|
1775
1784
|
else if (target) parts.push(fleetShellArg(target));
|
|
1776
1785
|
if (options.dryRun) parts.push("--dry-run");
|
|
1786
|
+
if (options.adoptExisting) parts.push("--adopt-existing");
|
|
1777
1787
|
if (options.wait) parts.push("--wait");
|
|
1778
1788
|
if (options.timeout)
|
|
1779
1789
|
parts.push(`--timeout ${fleetShellArg(options.timeout)}`);
|
|
@@ -1817,6 +1827,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1817
1827
|
definition ?? fleetId,
|
|
1818
1828
|
{
|
|
1819
1829
|
...options.dryRun ? { dryRun: true } : {},
|
|
1830
|
+
...options.adoptExisting ? { adoptExisting: true } : {},
|
|
1820
1831
|
...options.expectedGeneration !== void 0 ? {
|
|
1821
1832
|
expectedGeneration: fleetIntegerOption(
|
|
1822
1833
|
options.expectedGeneration,
|
|
@@ -1893,6 +1904,22 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1893
1904
|
{ json: options.json, text: summary }
|
|
1894
1905
|
);
|
|
1895
1906
|
}
|
|
1907
|
+
var FLEET_DRIFT_MAX_LIMIT = 200;
|
|
1908
|
+
function fleetOutstandingCount(payload) {
|
|
1909
|
+
const counts = asRecord(payload.counts);
|
|
1910
|
+
if (!counts) return void 0;
|
|
1911
|
+
let total = 0;
|
|
1912
|
+
for (const state of [
|
|
1913
|
+
"pending",
|
|
1914
|
+
"submitting",
|
|
1915
|
+
"rate_limited",
|
|
1916
|
+
"blocked",
|
|
1917
|
+
"failed"
|
|
1918
|
+
]) {
|
|
1919
|
+
total += asFiniteNumber(counts[state]) ?? 0;
|
|
1920
|
+
}
|
|
1921
|
+
return total;
|
|
1922
|
+
}
|
|
1896
1923
|
async function handleMonitorFleetsGet(fleetId, options) {
|
|
1897
1924
|
if (options.drift && !fleetId) {
|
|
1898
1925
|
throw new MonitorsUsageError(
|
|
@@ -1900,6 +1927,12 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1900
1927
|
);
|
|
1901
1928
|
}
|
|
1902
1929
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1930
|
+
if (options.drift && limit !== void 0 && limit > FLEET_DRIFT_MAX_LIMIT) {
|
|
1931
|
+
process.stderr.write(
|
|
1932
|
+
`--limit ${limit} is over the drift maximum; showing at most ${FLEET_DRIFT_MAX_LIMIT}. Run deepline monitors fleets issues ${fleetShellArg(fleetId)} for every failed or blocked member.
|
|
1933
|
+
`
|
|
1934
|
+
);
|
|
1935
|
+
}
|
|
1903
1936
|
const client = new DeeplineClient();
|
|
1904
1937
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1905
1938
|
...options.drift ? { drift: true } : {},
|
|
@@ -2688,8 +2721,19 @@ function monitorHealthText(health) {
|
|
|
2688
2721
|
lines.push(
|
|
2689
2722
|
` ${operation.kind} ${operation.run_id} \xB7 ${operation.state}${retry}`
|
|
2690
2723
|
);
|
|
2724
|
+
lines.push(
|
|
2725
|
+
` inspect: deepline monitors batch get ${operation.run_id}`
|
|
2726
|
+
);
|
|
2691
2727
|
}
|
|
2692
2728
|
}
|
|
2729
|
+
const fleetMembers = health.fleet_members;
|
|
2730
|
+
if (fleetMembers && fleetMembers.failed + fleetMembers.blocked > 0) {
|
|
2731
|
+
lines.push("");
|
|
2732
|
+
lines.push(
|
|
2733
|
+
`fleet members not live: ${fleetMembers.failed} failed, ${fleetMembers.blocked} blocked`
|
|
2734
|
+
);
|
|
2735
|
+
if (fleetMembers.next) lines.push(` next: ${fleetMembers.next}`);
|
|
2736
|
+
}
|
|
2693
2737
|
if (health.deactivation_reasons.length > 0) {
|
|
2694
2738
|
lines.push("");
|
|
2695
2739
|
lines.push("deactivated by Deepline:");
|
|
@@ -3631,7 +3675,10 @@ ${MONITOR_FLEET_HELP_EPILOG}`
|
|
|
3631
3675
|
withJsonOption(
|
|
3632
3676
|
fleets.command("deploy [fleet-id]").description(
|
|
3633
3677
|
"Apply a table-backed Fleet definition; sync remains an exact alias."
|
|
3634
|
-
).option("-f, --file <path>", "Fleet JSON file, or - for stdin").option("--dry-run", "Show the table-backed convergence plan").option(
|
|
3678
|
+
).option("-f, --file <path>", "Fleet JSON file, or - for stdin").option("--dry-run", "Show the table-backed convergence plan").option(
|
|
3679
|
+
"--adopt-existing",
|
|
3680
|
+
"Take over live monitors no Fleet owns whose key a row renders"
|
|
3681
|
+
).option("--wait", "Wait for the current Fleet generation to converge").option("--timeout <duration>", "How long --wait may poll (default 10m)").option(
|
|
3635
3682
|
"--expected-generation <generation>",
|
|
3636
3683
|
"Optimistic generation fence"
|
|
3637
3684
|
).option("--idempotency-key <key>", "Stable retry key")
|
|
@@ -3649,6 +3696,17 @@ ${MONITOR_FLEET_HELP_EPILOG}`
|
|
|
3649
3696
|
withJsonOption(
|
|
3650
3697
|
fleets.command("lint").description(
|
|
3651
3698
|
"Validate and normalize Fleet JSON without network or provider work."
|
|
3699
|
+
).addHelpText(
|
|
3700
|
+
"after",
|
|
3701
|
+
`
|
|
3702
|
+
Notes:
|
|
3703
|
+
lint checks the Fleet file's own structure. It does not know each monitor
|
|
3704
|
+
tool's payload rules (for example, contact_job_changes needs a domain), and
|
|
3705
|
+
it never reads source rows. \`fleets sync --file <fleet.json> --dry-run\`
|
|
3706
|
+
checks every rendered member against its tool's rules before anything is
|
|
3707
|
+
sent: a template that is wrong for every row exits 7 naming the field, and
|
|
3708
|
+
individual bad rows are planned as blocked (monitor.invalid_payload).
|
|
3709
|
+
`
|
|
3652
3710
|
).requiredOption("--file <path>", "Fleet JSON file, or - for stdin")
|
|
3653
3711
|
).action(monitorsAction(handleMonitorFleetLint));
|
|
3654
3712
|
withJsonOption(
|
|
@@ -3695,13 +3753,22 @@ Notes:
|
|
|
3695
3753
|
BEFORE any network call: a definition that fails the contract exits 2 and
|
|
3696
3754
|
never becomes a request. A bare <fleet-id> re-plans the stored definition.
|
|
3697
3755
|
The plan always shows blocked members; they are never hidden.
|
|
3756
|
+
Every rendered member is checked against its monitor tool's payload rules,
|
|
3757
|
+
dry run included. A template that breaks them for every row exits 7 and
|
|
3758
|
+
names the field; individual bad rows are planned blocked as
|
|
3759
|
+
monitor.invalid_payload, listed by field under invalid_payloads, and the
|
|
3760
|
+
rest of the fleet syncs. Fix the rows, then sync again.
|
|
3698
3761
|
--wait polls until Deepline reports a terminal status: converged exits 0,
|
|
3699
3762
|
degraded or billing_suspended exits 6 at once, and a timeout exits 6
|
|
3700
3763
|
without implying anything broke.
|
|
3701
3764
|
Progress goes to stderr, so stdout stays exactly one JSON object.
|
|
3765
|
+
A live monitor a named Batch deployed is taken over with its radar kept
|
|
3766
|
+
("adopts" in the plan). Any other live monitor no Fleet owns is refused
|
|
3767
|
+
unless --adopt-existing is passed; preview it with --dry-run first.
|
|
3702
3768
|
|
|
3703
3769
|
Examples:
|
|
3704
3770
|
deepline monitors fleets sync --file fleet.json --dry-run
|
|
3771
|
+
deepline monitors fleets sync --file fleet.json --adopt-existing --dry-run
|
|
3705
3772
|
deepline monitors fleets sync --file fleet.json --wait --timeout 20m
|
|
3706
3773
|
deepline monitors fleets sync account-job-openings --wait
|
|
3707
3774
|
cat fleet.json | deepline monitors fleets sync --file - --dry-run
|
|
@@ -3712,6 +3779,9 @@ Examples:
|
|
|
3712
3779
|
).option(
|
|
3713
3780
|
"--dry-run",
|
|
3714
3781
|
"Show the plan and the credits due without changing state"
|
|
3782
|
+
).option(
|
|
3783
|
+
"--adopt-existing",
|
|
3784
|
+
"Take over live monitors no Fleet owns whose key a source row renders, keeping their radar (refused without it)"
|
|
3715
3785
|
).option("--wait", "Poll until the fleet reaches a terminal status").option(
|
|
3716
3786
|
"--timeout <duration>",
|
|
3717
3787
|
"How long --wait may poll: 500ms, 90s, 10m, 1h (default 10m)"
|
|
@@ -3747,7 +3817,10 @@ Examples:
|
|
|
3747
3817
|
Notes:
|
|
3748
3818
|
Status is the server's verdict. --check turns it into an exit code so a
|
|
3749
3819
|
script can branch without parsing output: 0 converged, 6 anything else.
|
|
3750
|
-
--drift lists the members that have not settled and why
|
|
3820
|
+
--drift lists the members that have not settled and why: failed first, then
|
|
3821
|
+
blocked, then those still in progress. --limit is at most 200; the reply says
|
|
3822
|
+
when more remain. \`fleets issues <fleet-id>\` lists every failed or blocked
|
|
3823
|
+
member by cause with its message, paginated. The detail also
|
|
3751
3824
|
shows the current Plays that observe this Fleet's output; those bindings are
|
|
3752
3825
|
read-only here and are defined by each Play's sqlListeners.
|
|
3753
3826
|
|
|
@@ -3757,7 +3830,7 @@ Examples:
|
|
|
3757
3830
|
deepline monitors fleets get account-job-openings --drift --limit 50
|
|
3758
3831
|
deepline monitors fleets get account-job-openings --check
|
|
3759
3832
|
`
|
|
3760
|
-
).option("--drift", "Include the members that have not settled, and why").option("--limit <n>", "Maximum drift rows to return").option(
|
|
3833
|
+
).option("--drift", "Include the members that have not settled, and why").option("--limit <n>", "Maximum drift rows to return (at most 200)").option(
|
|
3761
3834
|
"--check",
|
|
3762
3835
|
"Exit 0 when converged and 6 otherwise, for scripts and agents"
|
|
3763
3836
|
)
|