deepline 0.3.350 → 0.3.352

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.
Files changed (94) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +47 -22
  3. package/dist/cli/{auth-7X3G2MCE.mjs → auth-6ZAHOPUC.mjs} +4 -4
  4. package/dist/cli/auth-ZYLA55Y2.js +31 -0
  5. package/dist/cli/{billing-2J4WREAL.js → billing-FTCAIIPO.js} +73 -73
  6. package/dist/cli/{billing-DOVYL5TT.mjs → billing-KE6CAAO5.mjs} +4 -4
  7. package/dist/cli/{chunk-GMOMXQR6.js → chunk-27JIZEAJ.js} +1 -1
  8. package/dist/cli/{chunk-YCBWMF2O.js → chunk-2JXDY3LE.js} +2 -2
  9. package/dist/cli/{chunk-IHMNFNL3.js → chunk-2PQR43BD.js} +225 -225
  10. package/dist/cli/{chunk-5ZFDADDM.mjs → chunk-2ULH52Q7.mjs} +27 -3
  11. package/dist/cli/{chunk-H4MOKDCV.mjs → chunk-3EIK6KTE.mjs} +1 -1
  12. package/dist/cli/{chunk-36MFVS4Q.js → chunk-4W3B4CNE.js} +9 -9
  13. package/dist/cli/{chunk-TFGKO7XG.mjs → chunk-54IUI747.mjs} +5 -5
  14. package/dist/cli/{chunk-FUQQ3U62.js → chunk-5TQPSUU6.js} +8 -8
  15. package/dist/cli/{chunk-NZMVPYBQ.mjs → chunk-EHYJYOXF.mjs} +1 -1
  16. package/dist/cli/{chunk-WWJOE6JQ.mjs → chunk-HD2RKIVK.mjs} +2 -2
  17. package/dist/cli/{chunk-FYZFB2CS.mjs → chunk-HMN5SUFL.mjs} +1 -1
  18. package/dist/cli/{chunk-2NI75UNO.mjs → chunk-J5MZZVDK.mjs} +2 -2
  19. package/dist/cli/{chunk-Z5RG3AOP.js → chunk-L6BHFEYM.js} +45 -45
  20. package/dist/cli/{chunk-VC7D7OXL.mjs → chunk-NNMGGD5Z.mjs} +1 -1
  21. package/dist/cli/{chunk-2Z6HV7BK.mjs → chunk-OWG4Y7JK.mjs} +2 -2
  22. package/dist/cli/{chunk-LE7DZZVE.js → chunk-P6CGAEDF.js} +26 -26
  23. package/dist/cli/{chunk-ZIUELPGR.js → chunk-Q3CSXWFU.js} +4 -4
  24. package/dist/cli/{chunk-NWN23EZM.js → chunk-QOIXZWOE.js} +40 -16
  25. package/dist/cli/{chunk-2KLYUZI7.mjs → chunk-SGFPTY4H.mjs} +2 -2
  26. package/dist/cli/{chunk-UKOXXA75.js → chunk-SM4G43FY.js} +60 -60
  27. package/dist/cli/{chunk-4ODBHH6X.mjs → chunk-ULX7APDZ.mjs} +1 -1
  28. package/dist/cli/{chunk-2COBRUUH.js → chunk-V5JPRCQ2.js} +6 -6
  29. package/dist/cli/{chunk-QMMMMGAB.js → chunk-VLQPMYSU.js} +15 -15
  30. package/dist/cli/{chunk-AWJ2A2CP.js → chunk-VQFBIGMU.js} +48 -48
  31. package/dist/cli/{chunk-LDILBDLL.mjs → chunk-XK7AH232.mjs} +4 -4
  32. package/dist/cli/{chunk-CYCJBDW6.mjs → chunk-YIO2PX4J.mjs} +6 -6
  33. package/dist/cli/{client-YM7EV7JZ.mjs → client-25RBAXIY.mjs} +3 -3
  34. package/dist/cli/client-AY2RSEDD.js +20 -0
  35. package/dist/cli/{csv-IERAXUNG.mjs → csv-7BOK5ZD7.mjs} +3 -3
  36. package/dist/cli/{csv-3CE5IY4L.js → csv-7XXJZ736.js} +12 -12
  37. package/dist/cli/{db-M2ONKJRD.mjs → db-7Q7L5SKP.mjs} +4 -4
  38. package/dist/cli/{db-VYSLD53P.js → db-TFPYJCZ5.js} +29 -29
  39. package/dist/cli/{describe-W6FCAXZR.mjs → describe-JTEJNG67.mjs} +8 -8
  40. package/dist/cli/{describe-2XFXS2SX.js → describe-TQYXSFZ2.js} +15 -15
  41. package/dist/cli/{executions-OUP6IVMO.mjs → executions-33MNWCXR.mjs} +4 -4
  42. package/dist/cli/{executions-P7EK3RC7.js → executions-XYCJEW5I.js} +6 -6
  43. package/dist/cli/{feedback-UHG2PISO.js → feedback-D3RSQCQE.js} +7 -7
  44. package/dist/cli/{feedback-Q5QTIZSG.mjs → feedback-LXSEEBNL.mjs} +3 -3
  45. package/dist/cli/git-56MVO4Y5.js +23 -0
  46. package/dist/cli/{git-DMG3Z36A.mjs → git-IES2ZBYO.mjs} +4 -4
  47. package/dist/cli/index.js +79 -79
  48. package/dist/cli/index.mjs +31 -31
  49. package/dist/cli/{legacy-noops-ARAPGQUN.mjs → legacy-noops-ILCWGUAR.mjs} +4 -4
  50. package/dist/cli/{legacy-noops-DZJRLQUN.js → legacy-noops-YIOGLZXX.js} +7 -7
  51. package/dist/cli/{monitors-B7HLL45A.js → monitors-MQSSH43U.js} +85 -85
  52. package/dist/cli/{monitors-7GSSQILT.mjs → monitors-R3CZHVU2.mjs} +4 -4
  53. package/dist/cli/{org-VIY2LH6L.js → org-62P7YRHW.js} +60 -60
  54. package/dist/cli/{org-UR72VY3A.mjs → org-Z75A63SM.mjs} +4 -4
  55. package/dist/cli/{play-ATTKGZLK.mjs → play-FUUFAV34.mjs} +7 -7
  56. package/dist/cli/play-K4RS3VMC.js +153 -0
  57. package/dist/cli/{providers-ZBZED4TK.mjs → providers-OQNPHTKA.mjs} +4 -4
  58. package/dist/cli/{providers-RDOEU4FO.js → providers-Q2VZF65A.js} +7 -7
  59. package/dist/cli/{quickstart-JT5FW7EB.mjs → quickstart-7X6HUVWX.mjs} +3 -3
  60. package/dist/cli/{quickstart-Y2GPRMC7.js → quickstart-VZ7BYW4Y.js} +5 -5
  61. package/dist/cli/search-H3TNOWKP.js +26 -0
  62. package/dist/cli/{search-73OTM3ZZ.mjs → search-SJKLKSER.mjs} +5 -5
  63. package/dist/cli/{secrets-EEXG43XS.js → secrets-EKH3FPAO.js} +13 -13
  64. package/dist/cli/{secrets-AHDWUIVL.mjs → secrets-JQUKCHON.mjs} +4 -4
  65. package/dist/cli/{sessions-SHSSRPN5.js → sessions-NDLKL26C.js} +5 -5
  66. package/dist/cli/{sessions-LDZMTST4.mjs → sessions-RSFW7OYD.mjs} +4 -4
  67. package/dist/cli/{settings-JBCSG3JV.mjs → settings-DR4YKJTJ.mjs} +7 -7
  68. package/dist/cli/{settings-FMM4KYDS.js → settings-HPUE5C2G.js} +74 -74
  69. package/dist/cli/{setup-4M6GZEV6.mjs → setup-4FT6NMU6.mjs} +6 -6
  70. package/dist/cli/{setup-VF3WHT2K.js → setup-Y2HCWQ4D.js} +41 -41
  71. package/dist/cli/{skills-5GSHPGQR.mjs → skills-EQR5K67V.mjs} +4 -4
  72. package/dist/cli/skills-OGQZAKOB.js +28 -0
  73. package/dist/cli/tools-3HM7A7XQ.js +40 -0
  74. package/dist/cli/{tools-7G6TW3MO.mjs → tools-ZRCNCMOO.mjs} +6 -6
  75. package/dist/cli/{update-NY2LA7HX.mjs → update-UJNIMTRS.mjs} +6 -6
  76. package/dist/cli/update-ZB6CXLCS.js +28 -0
  77. package/dist/cli/{workflow-TZ4UU3MV.js → workflow-4M63OBSC.js} +15 -15
  78. package/dist/cli/{workflow-JPNJ5D2W.mjs → workflow-EN3TQFKU.mjs} +5 -5
  79. package/dist/index.js +6 -6
  80. package/dist/index.mjs +3 -3
  81. package/dist/install-integrity.json +74 -74
  82. package/dist/release.d.mts +1 -1
  83. package/dist/release.d.ts +1 -1
  84. package/dist/release.js +2 -2
  85. package/dist/release.mjs +1 -1
  86. package/package.json +1 -1
  87. package/dist/cli/auth-CYXUWRLU.js +0 -31
  88. package/dist/cli/client-R4VF7KSK.js +0 -20
  89. package/dist/cli/git-IQRVNMQL.js +0 -23
  90. package/dist/cli/play-FT7EUE2Y.js +0 -153
  91. package/dist/cli/search-LHD6BP42.js +0 -26
  92. package/dist/cli/skills-RKY6BV2Y.js +0 -28
  93. package/dist/cli/tools-RSVWPCZT.js +0 -40
  94. package/dist/cli/update-ZD7UN6FA.js +0 -28
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
202
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
203
- version: '0.3.350',
203
+ version: '0.3.352',
204
204
  updateSummary:
205
205
  'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
206
206
  packageCapabilities: {
@@ -18182,6 +18182,33 @@ function runLedgerOrderSql(alias: string): string {
18182
18182
  return `CASE ${alias}.event_type WHEN ${RUN_EVENT_KIND_SQL_LITERAL.runCreated} THEN 0 WHEN ${RUN_EVENT_KIND_SQL_LITERAL.runStarted} THEN 1 ELSE 2 END, ${alias}.created_at, ${alias}.event_id`;
18183
18183
  }
18184
18184
 
18185
+ /** Enumerate pending runs by index seeks, skipping each run's entire fact tail. */
18186
+ function runLedgerPendingRunsSql(
18187
+ options?: Pick<PostgresSchedulerOptions, 'schema'>,
18188
+ searchOnly?: boolean,
18189
+ ): string {
18190
+ const lane =
18191
+ searchOnly === undefined
18192
+ ? ''
18193
+ : `AND ${searchLaneSql('pending')} = ${String(searchOnly)}`;
18194
+ return `pending_runs AS (
18195
+ (SELECT pending.run_id
18196
+ FROM ${tableName('outbox', options)} AS pending
18197
+ WHERE pending.delivered_at IS NULL ${lane}
18198
+ ORDER BY pending.run_id LIMIT 1)
18199
+ UNION ALL
18200
+ SELECT next_run.run_id
18201
+ FROM pending_runs AS previous_run
18202
+ CROSS JOIN LATERAL (
18203
+ SELECT pending.run_id
18204
+ FROM ${tableName('outbox', options)} AS pending
18205
+ WHERE pending.delivered_at IS NULL ${lane}
18206
+ AND pending.run_id > previous_run.run_id
18207
+ ORDER BY pending.run_id LIMIT 1
18208
+ ) AS next_run
18209
+ )`;
18210
+ }
18211
+
18185
18212
  /** Prioritize a terminal's causal head without skipping its predecessors. */
18186
18213
  function runLedgerTerminalPendingSql(
18187
18214
  alias: string,
@@ -18712,14 +18739,8 @@ export async function readPostgresSchedulerOutboxNextDueAt(
18712
18739
  ): Promise<Date | null> {
18713
18740
  const result = await client.query<{ due_at: Date | string | null }>(
18714
18741
  `
18715
- -- Discover only run identities before seeking each lane's causal head.
18716
- -- Proving that every pending fact has no predecessor can be quadratic for
18717
- -- a large receipt backlog, even while another replica drains that run.
18718
- WITH pending_runs AS MATERIALIZED (
18719
- SELECT DISTINCT pending.run_id
18720
- FROM ${tableName('outbox', options)} AS pending
18721
- WHERE pending.delivered_at IS NULL
18722
- ), heads AS MATERIALIZED (
18742
+ -- Seek distinct run identities without reading their pending fact tails.
18743
+ WITH RECURSIVE ${runLedgerPendingRunsSql(options)}, heads AS MATERIALIZED (
18723
18744
  SELECT pending_run.run_id, false AS search_only, head.*
18724
18745
  FROM pending_runs AS pending_run
18725
18746
  CROSS JOIN LATERAL (
@@ -20332,7 +20353,7 @@ async function dispatchRunLedgerOutboxBatchWithScope(
20332
20353
  // run-scoped outbox prefix: combining it with global recovery through a
20333
20354
  // nullable predicate made PostgreSQL materialize every pending run head
20334
20355
  // for each lifecycle transition. Only the two dedicated projectors may
20335
- // perform the global distinct-head scan below.
20356
+ // perform the global indexed head discovery below.
20336
20357
  const selected =
20337
20358
  (input.headEventId ? null : lockedRun) ??
20338
20359
  (targetRunId
@@ -20379,19 +20400,23 @@ async function dispatchRunLedgerOutboxBatchWithScope(
20379
20400
  run_id: string;
20380
20401
  dispatch_launch_json: unknown;
20381
20402
  }>(`
20382
- WITH heads AS MATERIALIZED (
20383
- SELECT DISTINCT ON (pending.run_id)
20384
- pending.run_id,
20385
- pending.event_id,
20386
- pending.event_type,
20387
- ${needsLaunch ? 'pending.payload_json,' : ''}
20388
- pending.created_at,
20389
- pending.next_attempt_at,
20390
- pending.failed_at
20391
- FROM ${tableName('outbox', options)} AS pending
20392
- WHERE pending.delivered_at IS NULL
20393
- AND ${searchLaneSql('pending')} = ${input.searchOnly === true ? 'true' : 'false'}
20394
- ORDER BY pending.run_id, ${runLedgerOrderSql('pending')}
20403
+ WITH RECURSIVE ${runLedgerPendingRunsSql(options, input.searchOnly === true)}, heads AS MATERIALIZED (
20404
+ SELECT pending_run.run_id, head.*
20405
+ FROM pending_runs AS pending_run
20406
+ CROSS JOIN LATERAL (
20407
+ SELECT pending.event_id,
20408
+ pending.event_type,
20409
+ ${needsLaunch ? 'pending.payload_json,' : ''}
20410
+ pending.created_at,
20411
+ pending.next_attempt_at,
20412
+ pending.failed_at
20413
+ FROM ${tableName('outbox', options)} AS pending
20414
+ WHERE pending.run_id = pending_run.run_id
20415
+ AND pending.delivered_at IS NULL
20416
+ AND ${searchLaneSql('pending')} = ${input.searchOnly === true ? 'true' : 'false'}
20417
+ ORDER BY ${runLedgerOrderSql('pending')}
20418
+ LIMIT 1
20419
+ ) AS head
20395
20420
  )
20396
20421
  SELECT runs.run_id, ${launchSelection} AS dispatch_launch_json
20397
20422
  FROM heads AS head
@@ -9,11 +9,11 @@ import {
9
9
  registerAuthCommands,
10
10
  reportSetupCompleted,
11
11
  resolvePendingAuthClaimForResume
12
- } from "./chunk-2KLYUZI7.mjs";
13
- import "./chunk-4ODBHH6X.mjs";
14
- import "./chunk-H4MOKDCV.mjs";
12
+ } from "./chunk-SGFPTY4H.mjs";
13
+ import "./chunk-ULX7APDZ.mjs";
14
+ import "./chunk-3EIK6KTE.mjs";
15
15
  import "./chunk-DLIRSHV6.mjs";
16
- import "./chunk-NZMVPYBQ.mjs";
16
+ import "./chunk-EHYJYOXF.mjs";
17
17
  import "./chunk-NXGCO4JB.mjs";
18
18
  import "./chunk-WZYKRD7T.mjs";
19
19
  import "./chunk-KRD6H754.mjs";
@@ -0,0 +1,31 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+ var _chunkVQFBIGMUjs = require('./chunk-VQFBIGMU.js');
13
+ require('./chunk-V5JPRCQ2.js');
14
+ require('./chunk-Q3CSXWFU.js');
15
+ require('./chunk-XNYIZMNQ.js');
16
+ require('./chunk-27JIZEAJ.js');
17
+ require('./chunk-7P5AA3SN.js');
18
+ require('./chunk-OG64RBAC.js');
19
+ require('./chunk-COGTRVWW.js');
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+ exports.EXIT_WORKSPACE_MISMATCH = _chunkVQFBIGMUjs.EXIT_WORKSPACE_MISMATCH; exports.clearPendingClaim = _chunkVQFBIGMUjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkVQFBIGMUjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkVQFBIGMUjs.handleRegister; exports.handleStatus = _chunkVQFBIGMUjs.handleStatus; exports.handleWait = _chunkVQFBIGMUjs.handleWait; exports.readPendingAuthClaim = _chunkVQFBIGMUjs.readPendingAuthClaim; exports.registerAuthCommands = _chunkVQFBIGMUjs.registerAuthCommands; exports.reportSetupCompleted = _chunkVQFBIGMUjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkVQFBIGMUjs.resolvePendingAuthClaimForResume;