deepline 0.3.319 → 0.3.321

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 (97) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +41 -7
  3. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +2 -0
  4. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
  5. package/dist/bundling-sources/shared_libs/security/receipt-admission-token.ts +32 -0
  6. package/dist/cli/auth-AF2MEC7K.js +31 -0
  7. package/dist/cli/{auth-DAXPANFX.mjs → auth-OXD3QIJW.mjs} +4 -4
  8. package/dist/cli/{billing-EEPRLMGV.js → billing-6YZHF6FJ.js} +70 -70
  9. package/dist/cli/{billing-R3MPWLJT.mjs → billing-XT3T2V6Z.mjs} +4 -4
  10. package/dist/cli/{chunk-G4PESSZS.js → chunk-23LWIJU5.js} +1 -1
  11. package/dist/cli/{chunk-B6AIO62Y.mjs → chunk-4QF3GTLM.mjs} +3 -3
  12. package/dist/cli/{chunk-HARNQFSB.js → chunk-57VCSLVP.js} +6 -6
  13. package/dist/cli/{chunk-XJCZCXMB.mjs → chunk-7V6BVNXM.mjs} +1 -1
  14. package/dist/cli/{chunk-GNEIU5HS.js → chunk-FBJSFMZM.js} +4 -4
  15. package/dist/cli/{chunk-JZOCKNSF.mjs → chunk-GCKI434X.mjs} +4 -4
  16. package/dist/cli/{chunk-YBZ77S4N.js → chunk-GNXG6BQI.js} +50 -50
  17. package/dist/cli/{chunk-O7RGAVX3.js → chunk-KLY2SA5G.js} +60 -60
  18. package/dist/cli/{chunk-BF4RMLQD.js → chunk-KN5AMK2N.js} +48 -48
  19. package/dist/cli/{chunk-QAZ6GRKW.js → chunk-KZ4S6URN.js} +6 -6
  20. package/dist/cli/{chunk-LDIBDH67.mjs → chunk-LXVHOTPH.mjs} +5 -5
  21. package/dist/cli/{chunk-A37XFZMW.mjs → chunk-MMIICHOJ.mjs} +2 -2
  22. package/dist/cli/{chunk-CWKGUF7W.js → chunk-N7FB2EYO.js} +220 -220
  23. package/dist/cli/{chunk-XR4IGFZS.mjs → chunk-P5BBV56E.mjs} +1 -1
  24. package/dist/cli/{chunk-R4HA6Q7R.js → chunk-PVHEPQR6.js} +6 -6
  25. package/dist/cli/{chunk-FVJIHKHA.js → chunk-PVSES2RR.js} +15 -15
  26. package/dist/cli/{chunk-VQ4CSOCL.mjs → chunk-Q7I47LE7.mjs} +1 -1
  27. package/dist/cli/{chunk-TZ4TLTXI.mjs → chunk-QVH4OR5R.mjs} +1 -1
  28. package/dist/cli/{chunk-QSLX346S.mjs → chunk-SIU6LJAM.mjs} +2 -2
  29. package/dist/cli/{chunk-PUWF6FLJ.mjs → chunk-SLAJLTYQ.mjs} +2 -2
  30. package/dist/cli/{chunk-REBQVNAE.mjs → chunk-T6BFDDO7.mjs} +1 -1
  31. package/dist/cli/{chunk-NW4C5QZY.mjs → chunk-TFNUR4VK.mjs} +6 -6
  32. package/dist/cli/{chunk-EPDVATKK.js → chunk-VF3SOXGE.js} +26 -26
  33. package/dist/cli/{chunk-6Q3N7AMW.js → chunk-WRS3ZBVF.js} +2 -2
  34. package/dist/cli/{chunk-3KALOZ6K.mjs → chunk-Y2O2LTUU.mjs} +1 -1
  35. package/dist/cli/{chunk-B7JKUSDG.js → chunk-ZEO3FTS5.js} +6 -6
  36. package/dist/cli/{client-ZF6KUU5J.mjs → client-GEADN6HT.mjs} +3 -3
  37. package/dist/cli/client-LXTQ44XR.js +20 -0
  38. package/dist/cli/{csv-QUQHUPBG.mjs → csv-47ALCDUF.mjs} +3 -3
  39. package/dist/cli/{csv-3F6L56U4.js → csv-72X7YZWZ.js} +12 -12
  40. package/dist/cli/{db-DJZT2A4C.js → db-22ZO4JUX.js} +20 -20
  41. package/dist/cli/{db-UXCGG6SL.mjs → db-LOC34Z5E.mjs} +4 -4
  42. package/dist/cli/{describe-5BHD6L6K.mjs → describe-4W6RA7DZ.mjs} +8 -8
  43. package/dist/cli/{describe-FLFD7PSD.js → describe-TWBIOBVP.js} +15 -15
  44. package/dist/cli/{executions-VRYP6EM6.js → executions-7RGT2PNM.js} +6 -6
  45. package/dist/cli/{executions-OEXULKBB.mjs → executions-MVY4577L.mjs} +4 -4
  46. package/dist/cli/{feedback-X7GEE3JW.mjs → feedback-IFQH4TNG.mjs} +3 -3
  47. package/dist/cli/{feedback-O5GD3QSA.js → feedback-TQMC2VPS.js} +6 -6
  48. package/dist/cli/git-ADCE7DM6.js +23 -0
  49. package/dist/cli/{git-CMAG4XFC.mjs → git-F7G4NWNH.mjs} +4 -4
  50. package/dist/cli/index.js +75 -75
  51. package/dist/cli/index.mjs +31 -31
  52. package/dist/cli/{legacy-noops-QOCRK2ZT.mjs → legacy-noops-DNGJQ2LB.mjs} +4 -4
  53. package/dist/cli/{legacy-noops-NYO4KJPN.js → legacy-noops-T6TPBUI7.js} +7 -7
  54. package/dist/cli/{monitors-QJYHRBJX.mjs → monitors-6LOEYFPU.mjs} +4 -4
  55. package/dist/cli/{monitors-VJ64XLPE.js → monitors-7ZCIBU3A.js} +85 -85
  56. package/dist/cli/{org-Y2YRV66G.js → org-IY5J5UV2.js} +60 -60
  57. package/dist/cli/{org-TAK5OFAJ.mjs → org-QNOMTNYG.mjs} +4 -4
  58. package/dist/cli/{play-KWFMK3A5.mjs → play-DYYJFFCL.mjs} +7 -7
  59. package/dist/cli/play-EMBNMGQ6.js +152 -0
  60. package/dist/cli/{providers-XJWA7Y3S.js → providers-MLRLAH37.js} +7 -7
  61. package/dist/cli/{providers-R52D4WC2.mjs → providers-Y54CW33F.mjs} +4 -4
  62. package/dist/cli/{quickstart-KTVMCJVD.js → quickstart-EIWX6I5X.js} +5 -5
  63. package/dist/cli/{quickstart-2PSABJCL.mjs → quickstart-K2FFBJEQ.mjs} +3 -3
  64. package/dist/cli/{search-KNI4NANW.mjs → search-2YJQBUPV.mjs} +5 -5
  65. package/dist/cli/search-7EADPPFV.js +26 -0
  66. package/dist/cli/{secrets-FZRHJ6MM.js → secrets-5MY6G5EO.js} +13 -13
  67. package/dist/cli/{secrets-IFV4FAN7.mjs → secrets-BBPVDWHE.mjs} +4 -4
  68. package/dist/cli/{sessions-JQCMJ6XX.js → sessions-LYULGDRK.js} +5 -5
  69. package/dist/cli/{sessions-SIOU2FAG.mjs → sessions-SKSMKVXC.mjs} +4 -4
  70. package/dist/cli/{settings-V7W6E55G.mjs → settings-CIV5JY2A.mjs} +7 -7
  71. package/dist/cli/{settings-73MDOLSF.js → settings-HTAZHDQ3.js} +74 -74
  72. package/dist/cli/{setup-ZAKWB3JW.js → setup-EWRGRIO2.js} +41 -41
  73. package/dist/cli/{setup-AXRRMTPA.mjs → setup-UJDC3MCT.mjs} +6 -6
  74. package/dist/cli/skills-6BXDE3J6.js +28 -0
  75. package/dist/cli/{skills-5BR2I6AT.mjs → skills-C7YBNTJW.mjs} +4 -4
  76. package/dist/cli/{tools-OZ2ROO42.mjs → tools-LHIQZLYY.mjs} +6 -6
  77. package/dist/cli/tools-VYQ34FFN.js +38 -0
  78. package/dist/cli/update-4RZHBEJL.js +28 -0
  79. package/dist/cli/{update-P6CBGYFP.mjs → update-G5SWXA67.mjs} +6 -6
  80. package/dist/cli/{workflow-OYQYIL55.js → workflow-7HKDO6QM.js} +15 -15
  81. package/dist/cli/{workflow-5CELCAYU.mjs → workflow-TJOJJJT5.mjs} +5 -5
  82. package/dist/index.js +6 -6
  83. package/dist/index.mjs +3 -3
  84. package/dist/install-integrity.json +74 -74
  85. package/dist/release.d.mts +1 -1
  86. package/dist/release.d.ts +1 -1
  87. package/dist/release.js +2 -2
  88. package/dist/release.mjs +1 -1
  89. package/package.json +1 -1
  90. package/dist/cli/auth-KRKIND3M.js +0 -31
  91. package/dist/cli/client-CEGEJIFN.js +0 -20
  92. package/dist/cli/git-6AFGD2F5.js +0 -23
  93. package/dist/cli/play-PD4QODBD.js +0 -152
  94. package/dist/cli/search-F7LZMQRK.js +0 -26
  95. package/dist/cli/skills-3GTM6L22.js +0 -28
  96. package/dist/cli/tools-ILAARRZ4.js +0 -38
  97. package/dist/cli/update-JFKRFOIL.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.319',
203
+ version: '0.3.321',
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: {
@@ -125,6 +125,24 @@
125
125
  "failureAlert": "github_workflow_run",
126
126
  "domainReportRequired": true
127
127
  },
128
+ {
129
+ "id": "github.convex-preview-usage-limit-reset",
130
+ "name": "Apply Convex Preview usage limits",
131
+ "scheduler": "github_actions",
132
+ "cadence": "5 0 * * *",
133
+ "timezone": "UTC",
134
+ "source": ".github/workflows/apply-preview-convex-usage-limits.yml",
135
+ "locator": "schedule:",
136
+ "owner": "platform",
137
+ "criticality": "operational",
138
+ "purpose": "Reapply strict per-deployment daily hard stops and daily/monthly warnings to current-project Convex Previews after UTC daily counters reset.",
139
+ "successDefinition": "Every current-project Preview has six active daily hard stops and warnings plus monthly warnings; monthly hard stops are inactive. Thresholds above baseline are retained only when already-consumed usage requires it and tightened after that window resets. Only explicitly retired inventory entries are skipped.",
140
+ "failureDefinition": "Preview inventory is unavailable, a deployment cannot be addressed, or any usage threshold cannot be set and verified.",
141
+ "startGraceMs": 900000,
142
+ "runTimeoutMs": 2700000,
143
+ "failureAlert": "github_workflow_run",
144
+ "domainReportRequired": true
145
+ },
128
146
  {
129
147
  "id": "github.daily-slack-report",
130
148
  "name": "Daily Slack report",
@@ -308,9 +326,7 @@
308
326
  {
309
327
  "id": "github.runtime-lifecycle",
310
328
  "name": "On-Demand Runtime Lifecycle Load Check",
311
- "legacyNames": [
312
- "Scheduled Runtime Lifecycle Load Monitor"
313
- ],
329
+ "legacyNames": ["Scheduled Runtime Lifecycle Load Monitor"],
314
330
  "scheduler": "github_actions",
315
331
  "cadence": "runAfter explicit workflow dispatch or PR label",
316
332
  "timezone": "UTC",
@@ -802,11 +818,11 @@
802
818
  {
803
819
  "id": "inngest.play-cron-tick",
804
820
  "name": "Play cron tick",
805
- "scheduler": "inngest",
821
+ "scheduler": "convex_cron",
806
822
  "cadence": "* * * * *",
807
823
  "timezone": "UTC",
808
- "source": "apps/deepline-api/src/lib/workflows/inngest/functions.ts",
809
- "locator": "play_cron_tick_v1",
824
+ "source": "packages/convex/crons.ts",
825
+ "locator": "play cron tick",
810
826
  "owner": "runtime",
811
827
  "criticality": "critical",
812
828
  "purpose": "Find due Play schedules and enqueue their next Play executions.",
@@ -814,7 +830,7 @@
814
830
  "failureDefinition": "Scan/enqueue fails or a due Play lacks a durable disposition.",
815
831
  "startGraceMs": 120000,
816
832
  "runTimeoutMs": 1800000,
817
- "failureAlert": "inngest_on_failure",
833
+ "failureAlert": "convex_action_wrapper",
818
834
  "domainReportRequired": true
819
835
  },
820
836
  {
@@ -1302,5 +1318,23 @@
1302
1318
  "runTimeoutMs": 600000,
1303
1319
  "failureAlert": "github_workflow_run",
1304
1320
  "domainReportRequired": true
1321
+ },
1322
+ {
1323
+ "id": "convex.sql-listener-dispatch-retry",
1324
+ "name": "SQL-listener dispatch retry",
1325
+ "scheduler": "convex_scheduled_action",
1326
+ "cadence": "runAfter inline SQL-listener dispatch failure or partial result",
1327
+ "timezone": "UTC",
1328
+ "source": "packages/convex/scheduledJobsNode.ts",
1329
+ "locator": "dispatchSqlListenerRetry",
1330
+ "owner": "runtime",
1331
+ "criticality": "critical",
1332
+ "purpose": "Run one org-scoped pass over an already durable SQL-listener outbox through Convex Workpool.",
1333
+ "successDefinition": "The signed Vercel callback confirms matching request identity and scalar row dispositions without starting a polling loop.",
1334
+ "failureDefinition": "The callback fails, returns an ambiguous or mismatched result, or reports rows needing another inbound event or operator dispatch.",
1335
+ "startGraceMs": 120000,
1336
+ "runTimeoutMs": 120000,
1337
+ "failureAlert": "convex_action_wrapper",
1338
+ "domainReportRequired": true
1305
1339
  }
1306
1340
  ]
@@ -8,6 +8,8 @@
8
8
  * key impersonate GitHub, Vercel, or Inngest).
9
9
  */
10
10
  export const MANUALLY_RUNNABLE_CONVEX_CRON_JOB_IDS = [
11
+ // These persisted operations ids predate the move of their clocks to Convex.
12
+ 'inngest.play-cron-tick',
11
13
  'convex.fold-usage-rollups',
12
14
  'convex.cleanup-expired-org-day-usage-shards',
13
15
  'convex.record-neon-managed-project-usage',
@@ -16,6 +16,7 @@ import {
16
16
  mintPlayWebhookReceiptBatchAdmissionToken as mintPlayWebhookReceiptBatchAdmissionTokenShared,
17
17
  mintPlayWebhookReceiptAdmissionToken as mintPlayWebhookReceiptAdmissionTokenShared,
18
18
  mintSignalRadarInboundReceiptToken as mintSignalRadarInboundReceiptTokenShared,
19
+ mintSqlListenerDispatchRetryToken as mintSqlListenerDispatchRetryTokenShared,
19
20
  } from '../security/receipt-admission-token';
20
21
  import { SignJWT, exportJWK, importJWK, jwtVerify, type JWK } from 'jose';
21
22
  import {
@@ -1335,6 +1336,67 @@ export async function mintSignalRadarInboundReceiptToken(input: {
1335
1336
  return await mintSignalRadarInboundReceiptTokenShared(input);
1336
1337
  }
1337
1338
 
1339
+ export const mintSqlListenerDispatchRetryToken =
1340
+ mintSqlListenerDispatchRetryTokenShared;
1341
+
1342
+ export type SqlListenerDispatchRetryTokenClaims = {
1343
+ org_id: string;
1344
+ event_id: string;
1345
+ subject?: string;
1346
+ limit?: number;
1347
+ claim_lease_ms?: number;
1348
+ max_attempts?: number;
1349
+ };
1350
+
1351
+ export async function verifySqlListenerDispatchRetryToken(
1352
+ token: string,
1353
+ nowMs = Date.now(),
1354
+ ): Promise<SqlListenerDispatchRetryTokenClaims> {
1355
+ const segments = token.split('.');
1356
+ if (segments.length !== 3)
1357
+ throw new Error('Invalid SQL-listener retry token.');
1358
+ const [headerPart, claimsPart, signature] = segments;
1359
+ const header = decodeJson<Record<string, unknown>>(headerPart);
1360
+ const expected = await signTokenMaterial(`${headerPart}.${claimsPart}`);
1361
+ if (
1362
+ header.alg !== 'HS256' ||
1363
+ header.typ !== 'JWT' ||
1364
+ !timingSafeEqual(fromBase64Url(signature), fromBase64Url(expected))
1365
+ )
1366
+ throw new Error('Invalid SQL-listener retry token.');
1367
+ const claims = decodeJson<Record<string, unknown>>(claimsPart);
1368
+ if (
1369
+ claims.v !== INTERNAL_BOOTSTRAP_TOKEN_VERSION ||
1370
+ claims.iss !== INTERNAL_BOOTSTRAP_TOKEN_ISSUER ||
1371
+ claims.aud !== 'deepline.sql_listener.dispatch_retry' ||
1372
+ claims.purpose !== 'sql_listener_dispatch_retry' ||
1373
+ claims.sub !== 'sql_listener_retry_dispatcher' ||
1374
+ typeof claims.org_id !== 'string' ||
1375
+ !claims.org_id.trim() ||
1376
+ typeof claims.event_id !== 'string' ||
1377
+ !claims.event_id.trim() ||
1378
+ typeof claims.iat !== 'number' ||
1379
+ !Number.isFinite(claims.iat) ||
1380
+ typeof claims.exp !== 'number' ||
1381
+ !Number.isFinite(claims.exp) ||
1382
+ (claims.subject !== undefined &&
1383
+ (typeof claims.subject !== 'string' || !claims.subject.trim())) ||
1384
+ ['limit', 'claim_lease_ms', 'max_attempts'].some(
1385
+ (key) =>
1386
+ claims[key] !== undefined &&
1387
+ (typeof claims[key] !== 'number' ||
1388
+ !Number.isSafeInteger(claims[key]) ||
1389
+ Number(claims[key]) <= 0),
1390
+ )
1391
+ )
1392
+ throw new Error('Invalid SQL-listener retry token.');
1393
+ const nowSeconds = Math.floor(nowMs / 1000);
1394
+ if (claims.exp <= nowSeconds || claims.iat > nowSeconds + 30) {
1395
+ throw new Error('SQL-listener retry token expired.');
1396
+ }
1397
+ return claims as SqlListenerDispatchRetryTokenClaims;
1398
+ }
1399
+
1338
1400
  export async function verifySignalRadarInboundReceiptToken(
1339
1401
  token: string,
1340
1402
  nowMs = Date.now(),
@@ -222,3 +222,35 @@ export async function mintSignalRadarInboundReceiptToken(input: {
222
222
  exp: issuedAt + TOKEN_TTL_SECONDS,
223
223
  });
224
224
  }
225
+
226
+ /** A single, org-scoped pass over an already durable SQL-listener outbox. */
227
+ export async function mintSqlListenerDispatchRetryToken(input: {
228
+ orgId: string;
229
+ eventId: string;
230
+ subject?: string;
231
+ limit?: number;
232
+ claimLeaseMs?: number;
233
+ maxAttempts?: number;
234
+ nowMs?: number;
235
+ }): Promise<string> {
236
+ const issuedAt = Math.floor((input.nowMs ?? Date.now()) / 1000);
237
+ return await mint({
238
+ v: TOKEN_VERSION,
239
+ iss: TOKEN_ISSUER,
240
+ aud: 'deepline.sql_listener.dispatch_retry',
241
+ purpose: 'sql_listener_dispatch_retry',
242
+ sub: 'sql_listener_retry_dispatcher',
243
+ org_id: input.orgId,
244
+ event_id: input.eventId,
245
+ ...(input.subject === undefined ? {} : { subject: input.subject }),
246
+ ...(input.limit === undefined ? {} : { limit: input.limit }),
247
+ ...(input.claimLeaseMs === undefined
248
+ ? {}
249
+ : { claim_lease_ms: input.claimLeaseMs }),
250
+ ...(input.maxAttempts === undefined
251
+ ? {}
252
+ : { max_attempts: input.maxAttempts }),
253
+ iat: issuedAt,
254
+ exp: issuedAt + TOKEN_TTL_SECONDS,
255
+ });
256
+ }
@@ -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 _chunkKN5AMK2Njs = require('./chunk-KN5AMK2N.js');
13
+ require('./chunk-57VCSLVP.js');
14
+ require('./chunk-FBJSFMZM.js');
15
+ require('./chunk-XNYIZMNQ.js');
16
+ require('./chunk-23LWIJU5.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 = _chunkKN5AMK2Njs.EXIT_WORKSPACE_MISMATCH; exports.clearPendingClaim = _chunkKN5AMK2Njs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkKN5AMK2Njs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkKN5AMK2Njs.handleRegister; exports.handleStatus = _chunkKN5AMK2Njs.handleStatus; exports.handleWait = _chunkKN5AMK2Njs.handleWait; exports.readPendingAuthClaim = _chunkKN5AMK2Njs.readPendingAuthClaim; exports.registerAuthCommands = _chunkKN5AMK2Njs.registerAuthCommands; exports.reportSetupCompleted = _chunkKN5AMK2Njs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkKN5AMK2Njs.resolvePendingAuthClaimForResume;
@@ -9,11 +9,11 @@ import {
9
9
  registerAuthCommands,
10
10
  reportSetupCompleted,
11
11
  resolvePendingAuthClaimForResume
12
- } from "./chunk-PUWF6FLJ.mjs";
13
- import "./chunk-XR4IGFZS.mjs";
14
- import "./chunk-REBQVNAE.mjs";
12
+ } from "./chunk-SLAJLTYQ.mjs";
13
+ import "./chunk-P5BBV56E.mjs";
14
+ import "./chunk-T6BFDDO7.mjs";
15
15
  import "./chunk-DLIRSHV6.mjs";
16
- import "./chunk-TZ4TLTXI.mjs";
16
+ import "./chunk-QVH4OR5R.mjs";
17
17
  import "./chunk-NXGCO4JB.mjs";
18
18
  import "./chunk-WZYKRD7T.mjs";
19
19
  import "./chunk-KRD6H754.mjs";