deepline 0.3.270 → 0.3.272

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 (29) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +3 -2
  3. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +11 -9
  4. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +5 -4
  5. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +2 -1
  6. package/dist/bundling-sources/shared_libs/play-runtime/run-event-catalog.ts +610 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-event-transport.ts +3 -1
  8. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-diagnostics.ts +3 -2
  9. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +80 -67
  10. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +5 -4
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +59 -20
  12. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +3 -2
  13. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +19 -9
  14. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +205 -107
  15. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +125 -81
  16. package/dist/cli/getting-started.d.mts +13 -9
  17. package/dist/cli/getting-started.d.ts +13 -9
  18. package/dist/cli/getting-started.js +15 -3
  19. package/dist/cli/getting-started.mjs +13 -3
  20. package/dist/cli/index.js +447 -11
  21. package/dist/cli/index.mjs +447 -11
  22. package/dist/index.js +420 -1
  23. package/dist/index.mjs +420 -1
  24. package/dist/install-integrity.json +1 -0
  25. package/dist/release.d.mts +1 -1
  26. package/dist/release.d.ts +1 -1
  27. package/dist/release.js +1 -1
  28. package/dist/release.mjs +1 -1
  29. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -3512,7 +3512,7 @@ var SDK_RELEASE = {
3512
3512
  // getters keep their established compatibility behavior.
3513
3513
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3514
3514
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3515
- version: "0.3.270",
3515
+ version: "0.3.272",
3516
3516
  updateSummary: "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.",
3517
3517
  packageCapabilities: {
3518
3518
  updatePreferences: 1
@@ -5226,6 +5226,425 @@ var ledgerIngressRedactor = createSecretRedactionContext();
5226
5226
  var utf8Encoder = new TextEncoder();
5227
5227
  var PLAY_DATASET_BRAND = Symbol.for("deepline.play.dataset");
5228
5228
 
5229
+ // ../play-runtime/run-event-catalog.ts
5230
+ var RUN_EVENT_KIND = {
5231
+ runCreated: "run.created",
5232
+ runStarted: "run.started",
5233
+ runWaiting: "run.waiting",
5234
+ runResumed: "run.resumed",
5235
+ runCompleted: "run.completed",
5236
+ runFailed: "run.failed",
5237
+ runCancelled: "run.cancelled",
5238
+ stepStarted: "step.started",
5239
+ stepProgress: "step.progress",
5240
+ stepCompleted: "step.completed",
5241
+ stepFailed: "step.failed",
5242
+ stepSkipped: "step.skipped",
5243
+ logAppended: "log.appended",
5244
+ datasetLifecycle: "dataset.lifecycle",
5245
+ activityObserved: "activity.observed",
5246
+ workCounters: "work.counters"
5247
+ };
5248
+ var SEARCHABLE_EVENT_FIELDS = [
5249
+ "kind",
5250
+ "runId",
5251
+ "playName",
5252
+ "source",
5253
+ "occurredAt"
5254
+ ];
5255
+ var RUN_SNAPSHOT_DESTINATION = {
5256
+ searchIndex: "planet_scale_runtime_event_index",
5257
+ markedRunStore: "planet_scale",
5258
+ planetScaleContent: "event_payload",
5259
+ convexProjection: "run_snapshot",
5260
+ convexRetainedFacts: ["saved_play_rollup_if_eligible"],
5261
+ legacyConvexDestination: "run_ledger_history",
5262
+ explanation: "PlanetScale retains the complete event. Convex reduces it into bounded current run state and keeps only selected saved-Play rollup facts when eligible; unmarked legacy runs retain Convex event history."
5263
+ };
5264
+ var RUN_CREATED_DESTINATION = {
5265
+ ...RUN_SNAPSHOT_DESTINATION,
5266
+ convexRetainedFacts: ["admission_fence", "saved_play_rollup_if_eligible"],
5267
+ explanation: "PlanetScale retains the complete event. Convex uses it for the live run snapshot, retains the admission fence, and may retain a saved-Play rollup fact; unmarked legacy runs retain Convex event history."
5268
+ };
5269
+ var RUN_LOG_DESTINATION = {
5270
+ searchIndex: "planet_scale_runtime_event_index",
5271
+ markedRunStore: "planet_scale",
5272
+ planetScaleContent: "log_body",
5273
+ convexProjection: null,
5274
+ convexRetainedFacts: [],
5275
+ legacyConvexDestination: "run_log_stream",
5276
+ explanation: "PlanetScale retains the canonical log line and its search metadata. Marked-run log bodies are not copied into Convex; unmarked legacy runs continue to use the Convex Run Log Stream."
5277
+ };
5278
+ var RUN_EVENT_KIND_CATALOG = {
5279
+ [RUN_EVENT_KIND.runCreated]: {
5280
+ description: "The run was admitted and received its run ID.",
5281
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5282
+ outboxCarriers: ["run.created"],
5283
+ destination: RUN_CREATED_DESTINATION,
5284
+ example: {
5285
+ runId: "play/enrich/run/abc123",
5286
+ type: RUN_EVENT_KIND.runCreated,
5287
+ seq: 1
5288
+ }
5289
+ },
5290
+ [RUN_EVENT_KIND.runStarted]: {
5291
+ description: "The run began execution.",
5292
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5293
+ outboxCarriers: ["run.started"],
5294
+ destination: RUN_SNAPSHOT_DESTINATION,
5295
+ example: {
5296
+ runId: "play/enrich/run/abc123",
5297
+ type: RUN_EVENT_KIND.runStarted,
5298
+ seq: 2
5299
+ }
5300
+ },
5301
+ [RUN_EVENT_KIND.runWaiting]: {
5302
+ description: "The run entered a durable wait.",
5303
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5304
+ outboxCarriers: ["run.waiting"],
5305
+ destination: RUN_SNAPSHOT_DESTINATION,
5306
+ example: {
5307
+ runId: "play/enrich/run/abc123",
5308
+ type: RUN_EVENT_KIND.runWaiting,
5309
+ waitKind: "sleep"
5310
+ }
5311
+ },
5312
+ [RUN_EVENT_KIND.runResumed]: {
5313
+ description: "The run resumed after a durable wait.",
5314
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5315
+ outboxCarriers: ["run.resumed"],
5316
+ destination: RUN_SNAPSHOT_DESTINATION,
5317
+ example: {
5318
+ runId: "play/enrich/run/abc123",
5319
+ type: RUN_EVENT_KIND.runResumed
5320
+ }
5321
+ },
5322
+ [RUN_EVENT_KIND.runCompleted]: {
5323
+ description: "The run completed successfully.",
5324
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5325
+ outboxCarriers: ["run.completed", "runner.logs"],
5326
+ destination: RUN_SNAPSHOT_DESTINATION,
5327
+ example: {
5328
+ runId: "play/enrich/run/abc123",
5329
+ type: RUN_EVENT_KIND.runCompleted
5330
+ }
5331
+ },
5332
+ [RUN_EVENT_KIND.runFailed]: {
5333
+ description: "The run ended with a failure.",
5334
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5335
+ outboxCarriers: ["run.failed", "runner.logs"],
5336
+ destination: RUN_SNAPSHOT_DESTINATION,
5337
+ example: {
5338
+ runId: "play/enrich/run/abc123",
5339
+ type: RUN_EVENT_KIND.runFailed,
5340
+ error: "Request timed out"
5341
+ }
5342
+ },
5343
+ [RUN_EVENT_KIND.runCancelled]: {
5344
+ description: "The run was cancelled.",
5345
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5346
+ outboxCarriers: ["run.cancelled"],
5347
+ destination: RUN_SNAPSHOT_DESTINATION,
5348
+ example: {
5349
+ runId: "play/enrich/run/abc123",
5350
+ type: RUN_EVENT_KIND.runCancelled
5351
+ }
5352
+ },
5353
+ [RUN_EVENT_KIND.stepStarted]: {
5354
+ description: "A named step began execution.",
5355
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5356
+ outboxCarriers: [
5357
+ "run.events",
5358
+ "run.completed",
5359
+ "run.failed",
5360
+ "runner.logs"
5361
+ ],
5362
+ destination: RUN_SNAPSHOT_DESTINATION,
5363
+ example: {
5364
+ runId: "play/enrich/run/abc123",
5365
+ type: RUN_EVENT_KIND.stepStarted,
5366
+ stepId: "lookup"
5367
+ }
5368
+ },
5369
+ [RUN_EVENT_KIND.stepProgress]: {
5370
+ description: "A named step reported progress.",
5371
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5372
+ outboxCarriers: [
5373
+ "run.events",
5374
+ "run.completed",
5375
+ "run.failed",
5376
+ "runner.logs"
5377
+ ],
5378
+ destination: RUN_SNAPSHOT_DESTINATION,
5379
+ example: {
5380
+ runId: "play/enrich/run/abc123",
5381
+ type: RUN_EVENT_KIND.stepProgress,
5382
+ stepId: "lookup"
5383
+ }
5384
+ },
5385
+ [RUN_EVENT_KIND.stepCompleted]: {
5386
+ description: "A named step completed.",
5387
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5388
+ outboxCarriers: [
5389
+ "run.events",
5390
+ "run.completed",
5391
+ "run.failed",
5392
+ "runner.logs"
5393
+ ],
5394
+ destination: RUN_SNAPSHOT_DESTINATION,
5395
+ example: {
5396
+ runId: "play/enrich/run/abc123",
5397
+ type: RUN_EVENT_KIND.stepCompleted,
5398
+ stepId: "lookup"
5399
+ }
5400
+ },
5401
+ [RUN_EVENT_KIND.stepFailed]: {
5402
+ description: "A named step failed.",
5403
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5404
+ outboxCarriers: [
5405
+ "run.events",
5406
+ "run.completed",
5407
+ "run.failed",
5408
+ "runner.logs"
5409
+ ],
5410
+ destination: RUN_SNAPSHOT_DESTINATION,
5411
+ example: {
5412
+ runId: "play/enrich/run/abc123",
5413
+ type: RUN_EVENT_KIND.stepFailed,
5414
+ stepId: "lookup"
5415
+ }
5416
+ },
5417
+ [RUN_EVENT_KIND.stepSkipped]: {
5418
+ description: "A named step was skipped.",
5419
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5420
+ outboxCarriers: [
5421
+ "run.events",
5422
+ "run.completed",
5423
+ "run.failed",
5424
+ "runner.logs"
5425
+ ],
5426
+ destination: RUN_SNAPSHOT_DESTINATION,
5427
+ example: {
5428
+ runId: "play/enrich/run/abc123",
5429
+ type: RUN_EVENT_KIND.stepSkipped,
5430
+ stepId: "lookup"
5431
+ }
5432
+ },
5433
+ [RUN_EVENT_KIND.logAppended]: {
5434
+ description: "A text log line was appended to the unified run history and log view.",
5435
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5436
+ outboxCarriers: [
5437
+ "run.events",
5438
+ "run.waiting",
5439
+ "run.resumed",
5440
+ "run.completed",
5441
+ "run.failed",
5442
+ "runner.logs",
5443
+ "run.wait_timeout"
5444
+ ],
5445
+ destination: RUN_LOG_DESTINATION,
5446
+ example: {
5447
+ runId: "play/enrich/run/abc123",
5448
+ type: RUN_EVENT_KIND.logAppended,
5449
+ lines: ["Waiting for integration_event:contact.updated."]
5450
+ }
5451
+ },
5452
+ [RUN_EVENT_KIND.datasetLifecycle]: {
5453
+ description: "A run dataset was registered, made available, or failed.",
5454
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5455
+ outboxCarriers: [
5456
+ "run.events",
5457
+ "run.completed",
5458
+ "run.failed",
5459
+ "runner.logs"
5460
+ ],
5461
+ destination: RUN_SNAPSHOT_DESTINATION,
5462
+ example: {
5463
+ runId: "play/enrich/run/abc123",
5464
+ type: RUN_EVENT_KIND.datasetLifecycle,
5465
+ phase: "available"
5466
+ }
5467
+ },
5468
+ [RUN_EVENT_KIND.activityObserved]: {
5469
+ description: "The runtime recorded an activity observation.",
5470
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5471
+ outboxCarriers: [
5472
+ "run.events",
5473
+ "run.completed",
5474
+ "run.failed",
5475
+ "runner.logs"
5476
+ ],
5477
+ destination: RUN_SNAPSHOT_DESTINATION,
5478
+ example: {
5479
+ runId: "play/enrich/run/abc123",
5480
+ type: RUN_EVENT_KIND.activityObserved
5481
+ }
5482
+ },
5483
+ [RUN_EVENT_KIND.workCounters]: {
5484
+ description: "A work segment reported logical call, provider request, and rate-limit counters.",
5485
+ searchableFields: SEARCHABLE_EVENT_FIELDS,
5486
+ outboxCarriers: [
5487
+ "run.events",
5488
+ "run.completed",
5489
+ "run.failed",
5490
+ "runner.logs"
5491
+ ],
5492
+ destination: RUN_SNAPSHOT_DESTINATION,
5493
+ example: {
5494
+ runId: "play/enrich/run/abc123",
5495
+ type: RUN_EVENT_KIND.workCounters,
5496
+ attempt: 1,
5497
+ logicalCalls: 4,
5498
+ providerRequests: 4,
5499
+ provider429s: 0,
5500
+ final: true
5501
+ }
5502
+ }
5503
+ };
5504
+ var RUN_EVENT_KINDS = Object.freeze(
5505
+ Object.keys(RUN_EVENT_KIND_CATALOG)
5506
+ );
5507
+ var RUN_SCHEDULER_OUTBOX_EVENT_TYPE = {
5508
+ runCreated: RUN_EVENT_KIND.runCreated,
5509
+ runStarted: RUN_EVENT_KIND.runStarted,
5510
+ runWaiting: RUN_EVENT_KIND.runWaiting,
5511
+ runResumed: RUN_EVENT_KIND.runResumed,
5512
+ runCompleted: RUN_EVENT_KIND.runCompleted,
5513
+ runFailed: RUN_EVENT_KIND.runFailed,
5514
+ runCancelled: RUN_EVENT_KIND.runCancelled,
5515
+ runEvents: "run.events",
5516
+ runnerLogs: "runner.logs",
5517
+ runWaitTimeout: "run.wait_timeout"
5518
+ };
5519
+ var RUN_SCHEDULER_OUTBOX_EVENT_TYPES = Object.freeze(
5520
+ Object.values(RUN_SCHEDULER_OUTBOX_EVENT_TYPE)
5521
+ );
5522
+ var RUN_SCHEDULER_OUTBOX_START_EVENT_TYPES = [
5523
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCreated,
5524
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runStarted
5525
+ ];
5526
+ var RUN_SCHEDULER_OUTBOX_PREFIX_STOP_EVENT_TYPES = [
5527
+ ...RUN_SCHEDULER_OUTBOX_START_EVENT_TYPES,
5528
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runEvents
5529
+ ];
5530
+ var RUN_SCHEDULER_OUTBOX_TERMINAL_EVENT_TYPES = [
5531
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCompleted,
5532
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runFailed,
5533
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCancelled
5534
+ ];
5535
+ var RUN_EVENT_CONVEX_INTERNAL_KIND = {
5536
+ rollupMembershipAdded: "rollup.membership.added",
5537
+ rollupMembershipRemoved: "rollup.membership.removed"
5538
+ };
5539
+ var RUN_RECEIPT_SEARCH_KIND = {
5540
+ completed: "receipt.completed",
5541
+ failed: "receipt.failed",
5542
+ skipped: "receipt.skipped"
5543
+ };
5544
+ var RUN_RECEIPT_SEARCH_KIND_CATALOG = {
5545
+ [RUN_RECEIPT_SEARCH_KIND.completed]: {
5546
+ description: "A durable work receipt completed.",
5547
+ searchIndex: "planet_scale_runtime_event_index",
5548
+ payloadStore: "authoritative_work_receipt"
5549
+ },
5550
+ [RUN_RECEIPT_SEARCH_KIND.failed]: {
5551
+ description: "A durable work receipt failed.",
5552
+ searchIndex: "planet_scale_runtime_event_index",
5553
+ payloadStore: "authoritative_work_receipt"
5554
+ },
5555
+ [RUN_RECEIPT_SEARCH_KIND.skipped]: {
5556
+ description: "A durable work receipt was skipped.",
5557
+ searchIndex: "planet_scale_runtime_event_index",
5558
+ payloadStore: "authoritative_work_receipt"
5559
+ }
5560
+ };
5561
+ var RUN_EVENT_SEARCH_FALLBACK_KIND = "runtime.event";
5562
+ var RUN_EVENT_SEARCH_KIND_VALUES = Object.freeze([
5563
+ ...RUN_EVENT_KINDS,
5564
+ ...Object.keys(RUN_RECEIPT_SEARCH_KIND_CATALOG),
5565
+ RUN_EVENT_SEARCH_FALLBACK_KIND
5566
+ ]);
5567
+ var RUN_EVENT_TERMINAL_KIND_VALUES = [
5568
+ RUN_EVENT_KIND.runCompleted,
5569
+ RUN_EVENT_KIND.runFailed,
5570
+ RUN_EVENT_KIND.runCancelled
5571
+ ];
5572
+ var RUN_LOG_RETENTION_MAX_BYTES = 5 * 1024 * 1024;
5573
+ function sqlStringLiteral(value) {
5574
+ return "'" + value.replaceAll("'", "''") + "'";
5575
+ }
5576
+ var RUN_EVENT_KNOWN_KIND_SQL_LIST = RUN_EVENT_KINDS.map(sqlStringLiteral).join(", ");
5577
+ var RUN_EVENT_LIFECYCLE_KIND_SQL_LIST = [
5578
+ RUN_EVENT_KIND.runCreated,
5579
+ RUN_EVENT_KIND.runStarted,
5580
+ RUN_EVENT_KIND.runWaiting,
5581
+ RUN_EVENT_KIND.runResumed,
5582
+ RUN_EVENT_KIND.runCompleted,
5583
+ RUN_EVENT_KIND.runFailed,
5584
+ RUN_EVENT_KIND.runCancelled
5585
+ ].map(sqlStringLiteral).join(", ");
5586
+ var RUN_EVENT_SNAPSHOT_KIND_SQL_LIST = RUN_EVENT_KINDS.filter(
5587
+ (kind) => kind !== RUN_EVENT_KIND.logAppended
5588
+ ).map(sqlStringLiteral).join(", ");
5589
+ var RUN_EVENT_KIND_SQL_LITERAL = {
5590
+ runCreated: sqlStringLiteral(RUN_EVENT_KIND.runCreated),
5591
+ runStarted: sqlStringLiteral(RUN_EVENT_KIND.runStarted),
5592
+ runWaiting: sqlStringLiteral(RUN_EVENT_KIND.runWaiting),
5593
+ runResumed: sqlStringLiteral(RUN_EVENT_KIND.runResumed),
5594
+ runCompleted: sqlStringLiteral(RUN_EVENT_KIND.runCompleted),
5595
+ runFailed: sqlStringLiteral(RUN_EVENT_KIND.runFailed),
5596
+ runCancelled: sqlStringLiteral(RUN_EVENT_KIND.runCancelled),
5597
+ stepStarted: sqlStringLiteral(RUN_EVENT_KIND.stepStarted),
5598
+ stepProgress: sqlStringLiteral(RUN_EVENT_KIND.stepProgress),
5599
+ stepCompleted: sqlStringLiteral(RUN_EVENT_KIND.stepCompleted),
5600
+ stepFailed: sqlStringLiteral(RUN_EVENT_KIND.stepFailed),
5601
+ stepSkipped: sqlStringLiteral(RUN_EVENT_KIND.stepSkipped),
5602
+ logAppended: sqlStringLiteral(RUN_EVENT_KIND.logAppended),
5603
+ datasetLifecycle: sqlStringLiteral(RUN_EVENT_KIND.datasetLifecycle),
5604
+ activityObserved: sqlStringLiteral(RUN_EVENT_KIND.activityObserved),
5605
+ workCounters: sqlStringLiteral(RUN_EVENT_KIND.workCounters)
5606
+ };
5607
+ var RUN_SCHEDULER_OUTBOX_EVENT_TYPE_SQL_LITERAL = {
5608
+ runCreated: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCreated),
5609
+ runStarted: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runStarted),
5610
+ runWaiting: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runWaiting),
5611
+ runResumed: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runResumed),
5612
+ runCompleted: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCompleted),
5613
+ runFailed: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runFailed),
5614
+ runCancelled: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCancelled),
5615
+ runEvents: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runEvents),
5616
+ runnerLogs: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runnerLogs),
5617
+ runWaitTimeout: sqlStringLiteral(
5618
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runWaitTimeout
5619
+ )
5620
+ };
5621
+ var RUN_EVENT_CONVEX_INTERNAL_KIND_SQL_LITERAL = {
5622
+ rollupMembershipAdded: sqlStringLiteral(
5623
+ RUN_EVENT_CONVEX_INTERNAL_KIND.rollupMembershipAdded
5624
+ ),
5625
+ rollupMembershipRemoved: sqlStringLiteral(
5626
+ RUN_EVENT_CONVEX_INTERNAL_KIND.rollupMembershipRemoved
5627
+ )
5628
+ };
5629
+ var RUN_EVENT_TERMINAL_LOG_CARRIER_SQL_LIST = [
5630
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCompleted,
5631
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runFailed,
5632
+ RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runnerLogs
5633
+ ].map(sqlStringLiteral).join(", ");
5634
+ var RUN_SCHEDULER_OUTBOX_TERMINAL_EVENT_TYPE_SQL_LIST = [
5635
+ ...RUN_SCHEDULER_OUTBOX_TERMINAL_EVENT_TYPES
5636
+ ].map(sqlStringLiteral).join(", ");
5637
+ var RUN_EVENT_SEARCH_FALLBACK_KIND_SQL_LITERAL = sqlStringLiteral(
5638
+ RUN_EVENT_SEARCH_FALLBACK_KIND
5639
+ );
5640
+
5641
+ // ../play-runtime/run-ledger.ts
5642
+ var TERMINAL_STATUS_BY_EVENT_TYPE = {
5643
+ [RUN_EVENT_KIND.runCompleted]: "completed",
5644
+ [RUN_EVENT_KIND.runFailed]: "failed",
5645
+ [RUN_EVENT_KIND.runCancelled]: "cancelled"
5646
+ };
5647
+
5229
5648
  // ../play-runtime/run-lifecycle-policy.ts
5230
5649
  var TERMINAL_PLAY_RUN_STATUSES = /* @__PURE__ */ new Set([
5231
5650
  "completed",
@@ -36393,6 +36812,13 @@ Notes:
36393
36812
  index request/response bodies or promise one event per provider call. --payloads
36394
36813
  includes full result data in this command, capped at ten events and 16 MiB.
36395
36814
 
36815
+ Event, log, and receipt search share one PlanetScale index. For runs marked
36816
+ runEventStore=planet_scale, PlanetScale owns full event/log history; Convex
36817
+ keeps the live run snapshot, admission fence, and eligible saved-Play rollup
36818
+ facts. Marked-run log bodies are not copied into Convex. Unmarked legacy runs
36819
+ keep their existing Convex event history and Run Log Stream.
36820
+ Known --kind values: ${RUN_EVENT_SEARCH_KIND_VALUES.join(", ")}.
36821
+
36396
36822
  Examples:
36397
36823
  deepline runs logs play/my-play/run/20260501t000000-000
36398
36824
  deepline runs logs play/my-play/run/20260501t000000-000 --limit 500
@@ -39442,7 +39868,7 @@ function enrichReportJson(report) {
39442
39868
  } : {}
39443
39869
  };
39444
39870
  }
39445
- function sqlStringLiteral(value) {
39871
+ function sqlStringLiteral2(value) {
39446
39872
  return `'${value.replace(/'/g, "''")}'`;
39447
39873
  }
39448
39874
  function failureAliasFromCellMeta(cellMeta) {
@@ -39537,7 +39963,7 @@ async function collectCustomerDbFailureJobs(input2) {
39537
39963
  const aliasIndexByName = new Map(
39538
39964
  fallbackAliases.map((spec, index) => [normalizeAlias2(spec.alias), index])
39539
39965
  );
39540
- const sql = `select _input_index, _status, _error, _cell_meta from ${customerDb.sqlQualifiedTableName} where _run_id = ${sqlStringLiteral(customerDb.runId)} and (_error is not null or lower(coalesce(_status, '')) in ('failed', 'error')) order by _input_index limit 1000`;
39966
+ const sql = `select _input_index, _status, _error, _cell_meta from ${customerDb.sqlQualifiedTableName} where _run_id = ${sqlStringLiteral2(customerDb.runId)} and (_error is not null or lower(coalesce(_status, '')) in ('failed', 'error')) order by _input_index limit 1000`;
39541
39967
  const retryDelays = enrichCustomerDbFailureLookupRetryDelaysMs();
39542
39968
  let lastError = null;
39543
39969
  let attempts = 0;
@@ -42374,10 +42800,11 @@ function parseSessionAgent(value) {
42374
42800
  function parseSessionRating(value) {
42375
42801
  if (value === void 0) return void 0;
42376
42802
  const normalized = value.trim().toLowerCase();
42803
+ if (normalized === "poor") return "bad";
42377
42804
  if (normalized === "good" || normalized === "bad" || normalized === "neutral") {
42378
42805
  return normalized;
42379
42806
  }
42380
- throw new Error("Invalid --rating value. Expected good, bad, or neutral.");
42807
+ throw new Error("Invalid --rating value. Expected good, poor, or neutral.");
42381
42808
  }
42382
42809
  function findSessionFile(sessionId, agent) {
42383
42810
  if (!UUID_RE.test(sessionId)) {
@@ -42877,7 +43304,7 @@ Examples:
42877
43304
  deepline ${familyName} send --current-session --json
42878
43305
  deepline ${familyName} send --agent codex --current-session --json
42879
43306
  deepline ${familyName} send --session-id 5a3bfb97-a2d9-49d9-82c6-52ccc03dadca --label "pilot run"
42880
- deepline ${familyName} send --current-session --rating bad --json # tag the session as one that went badly
43307
+ deepline ${familyName} send --current-session --rating poor --json # tag the session as one that went poorly
42881
43308
  deepline ${familyName} send --file ./debug.log --json
42882
43309
  `
42883
43310
  ).option(
@@ -42895,8 +43322,8 @@ Examples:
42895
43322
  "Limit transcript discovery to one agent runtime",
42896
43323
  "auto"
42897
43324
  ).option("--current-session", "Use the newest local agent session JSONL").option("--file <path>", "Upload a raw local file instead of a session").option(
42898
- "--rating <good|bad|neutral>",
42899
- "Tag the upload by outcome, not tone, so Deepline can filter sessions: good = the user's goal was met without product problems; bad = the goal was missed, or a product failure, bug, or avoidable friction (including a substantial workaround) got in the way; neutral = partly met or unclear."
43325
+ "--rating <good|poor|neutral>",
43326
+ "Tag the upload by outcome, not tone, so Deepline can filter sessions: good = the user's goal was met without product problems; poor = the goal was missed, or a product failure, bug, or avoidable friction (including a substantial workaround) got in the way; neutral = partly met or unclear."
42900
43327
  ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleSessionsSend);
42901
43328
  parent.command("render").description("Render local session transcript(s) to an HTML viewer.").addHelpText(
42902
43329
  "after",
@@ -47803,18 +48230,26 @@ var DEEPLINE_GTM_STARTER_PROMPTS = [
47803
48230
  prompt: "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses."
47804
48231
  },
47805
48232
  {
48233
+ // Historical ID retained for SDK payload compatibility; the current
48234
+ // starter copy is the fintech hiring-and-growth workflow below.
47806
48235
  id: "decision-maker-discovery",
47807
- title: "Decision-maker discovery",
47808
- prompt: "/deepline-gtm Find the best people to contact at these companies and verify their email addresses."
48236
+ title: "Fintech hiring and growth",
48237
+ prompt: "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both."
47809
48238
  }
47810
48239
  ];
47811
48240
  var DEEPLINE_GTM_PRIMARY_STARTER_PROMPT = DEEPLINE_GTM_STARTER_PROMPTS[0].prompt;
47812
- var DEEPLINE_GTM_HANDOFF_QUESTION = "Would you like to try one of these examples, or tell me your own business problem?";
48241
+ var DEEPLINE_GTM_HANDOFF_QUESTION = "What would you like to do with Deepline?";
48242
+ var DEEPLINE_GTM_CUSTOM_OPTION = "Tell me what you want to accomplish and I'll help you build it";
48243
+ var DEEPLINE_GTM_STARTER_OPTIONS = [
48244
+ ...DEEPLINE_GTM_STARTER_PROMPTS.map(({ prompt }) => prompt),
48245
+ DEEPLINE_GTM_CUSTOM_OPTION
48246
+ ];
47813
48247
  function deeplineGtmGettingStartedPayload() {
47814
48248
  return {
47815
48249
  skill: DEEPLINE_GTM_SKILL,
47816
48250
  examples: DEEPLINE_GTM_STARTER_PROMPTS,
47817
48251
  question: DEEPLINE_GTM_HANDOFF_QUESTION,
48252
+ customOption: DEEPLINE_GTM_CUSTOM_OPTION,
47818
48253
  customProblemBehavior: "Turn the business problem into one exact /deepline-gtm prompt, show that reusable prompt, then execute it without asking the user to paste it again."
47819
48254
  };
47820
48255
  }
@@ -51342,10 +51777,11 @@ async function runSetupCommand(options) {
51342
51777
  workspaceName ? `Deepline is installed and connected to ${workspaceName}.` : "Deepline is installed and connected.",
51343
51778
  ...workspaceName ? ["To link a different workspace, run: deepline auth register"] : [],
51344
51779
  `Use ${DEEPLINE_GTM_SKILL} in your agent.`,
51780
+ gettingStarted.question,
51345
51781
  ...DEEPLINE_GTM_STARTER_PROMPTS.map(
51346
51782
  (example, index) => `${index + 1}. ${example.title}: ${example.prompt}`
51347
51783
  ),
51348
- gettingStarted.question
51784
+ `4. ${gettingStarted.customOption}`
51349
51785
  ]
51350
51786
  }
51351
51787
  ]