deepline 0.3.271 → 0.3.273
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/README.md +9 -0
- package/dist/bundling-sources/sdk/src/client.ts +49 -17
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/receipts.ts +18 -2
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +11 -9
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-event-catalog.ts +610 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-event-transport.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-diagnostics.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +80 -67
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +19 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +103 -78
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +125 -81
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +3 -2
- package/dist/cli/index.js +662 -39
- package/dist/cli/index.mjs +662 -39
- package/dist/{client-BbKtvT9Q.d.ts → client-5xpuGpRn.d.ts} +64 -19
- package/dist/{client-C1Xm7eBH.d.mts → client-D9annc6K.d.mts} +64 -19
- package/dist/{compiler-manifest-CUuh8C3b.d.mts → compiler-manifest-C1bKB9bY.d.mts} +3 -2
- package/dist/{compiler-manifest-CUuh8C3b.d.ts → compiler-manifest-C1bKB9bY.d.ts} +3 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +423 -4
- package/dist/index.mjs +423 -4
- package/dist/install-integrity.json +5 -4
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +1 -1
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -3507,7 +3507,7 @@ var SDK_RELEASE = {
|
|
|
3507
3507
|
// getters keep their established compatibility behavior.
|
|
3508
3508
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3509
3509
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3510
|
-
version: "0.3.
|
|
3510
|
+
version: "0.3.273",
|
|
3511
3511
|
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.",
|
|
3512
3512
|
packageCapabilities: {
|
|
3513
3513
|
updatePreferences: 1
|
|
@@ -5221,6 +5221,425 @@ var ledgerIngressRedactor = createSecretRedactionContext();
|
|
|
5221
5221
|
var utf8Encoder = new TextEncoder();
|
|
5222
5222
|
var PLAY_DATASET_BRAND = Symbol.for("deepline.play.dataset");
|
|
5223
5223
|
|
|
5224
|
+
// ../play-runtime/run-event-catalog.ts
|
|
5225
|
+
var RUN_EVENT_KIND = {
|
|
5226
|
+
runCreated: "run.created",
|
|
5227
|
+
runStarted: "run.started",
|
|
5228
|
+
runWaiting: "run.waiting",
|
|
5229
|
+
runResumed: "run.resumed",
|
|
5230
|
+
runCompleted: "run.completed",
|
|
5231
|
+
runFailed: "run.failed",
|
|
5232
|
+
runCancelled: "run.cancelled",
|
|
5233
|
+
stepStarted: "step.started",
|
|
5234
|
+
stepProgress: "step.progress",
|
|
5235
|
+
stepCompleted: "step.completed",
|
|
5236
|
+
stepFailed: "step.failed",
|
|
5237
|
+
stepSkipped: "step.skipped",
|
|
5238
|
+
logAppended: "log.appended",
|
|
5239
|
+
datasetLifecycle: "dataset.lifecycle",
|
|
5240
|
+
activityObserved: "activity.observed",
|
|
5241
|
+
workCounters: "work.counters"
|
|
5242
|
+
};
|
|
5243
|
+
var SEARCHABLE_EVENT_FIELDS = [
|
|
5244
|
+
"kind",
|
|
5245
|
+
"runId",
|
|
5246
|
+
"playName",
|
|
5247
|
+
"source",
|
|
5248
|
+
"occurredAt"
|
|
5249
|
+
];
|
|
5250
|
+
var RUN_SNAPSHOT_DESTINATION = {
|
|
5251
|
+
searchIndex: "planet_scale_runtime_event_index",
|
|
5252
|
+
markedRunStore: "planet_scale",
|
|
5253
|
+
planetScaleContent: "event_payload",
|
|
5254
|
+
convexProjection: "run_snapshot",
|
|
5255
|
+
convexRetainedFacts: ["saved_play_rollup_if_eligible"],
|
|
5256
|
+
legacyConvexDestination: "run_ledger_history",
|
|
5257
|
+
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."
|
|
5258
|
+
};
|
|
5259
|
+
var RUN_CREATED_DESTINATION = {
|
|
5260
|
+
...RUN_SNAPSHOT_DESTINATION,
|
|
5261
|
+
convexRetainedFacts: ["admission_fence", "saved_play_rollup_if_eligible"],
|
|
5262
|
+
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."
|
|
5263
|
+
};
|
|
5264
|
+
var RUN_LOG_DESTINATION = {
|
|
5265
|
+
searchIndex: "planet_scale_runtime_event_index",
|
|
5266
|
+
markedRunStore: "planet_scale",
|
|
5267
|
+
planetScaleContent: "log_body",
|
|
5268
|
+
convexProjection: null,
|
|
5269
|
+
convexRetainedFacts: [],
|
|
5270
|
+
legacyConvexDestination: "run_log_stream",
|
|
5271
|
+
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."
|
|
5272
|
+
};
|
|
5273
|
+
var RUN_EVENT_KIND_CATALOG = {
|
|
5274
|
+
[RUN_EVENT_KIND.runCreated]: {
|
|
5275
|
+
description: "The run was admitted and received its run ID.",
|
|
5276
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5277
|
+
outboxCarriers: ["run.created"],
|
|
5278
|
+
destination: RUN_CREATED_DESTINATION,
|
|
5279
|
+
example: {
|
|
5280
|
+
runId: "play/enrich/run/abc123",
|
|
5281
|
+
type: RUN_EVENT_KIND.runCreated,
|
|
5282
|
+
seq: 1
|
|
5283
|
+
}
|
|
5284
|
+
},
|
|
5285
|
+
[RUN_EVENT_KIND.runStarted]: {
|
|
5286
|
+
description: "The run began execution.",
|
|
5287
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5288
|
+
outboxCarriers: ["run.started"],
|
|
5289
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5290
|
+
example: {
|
|
5291
|
+
runId: "play/enrich/run/abc123",
|
|
5292
|
+
type: RUN_EVENT_KIND.runStarted,
|
|
5293
|
+
seq: 2
|
|
5294
|
+
}
|
|
5295
|
+
},
|
|
5296
|
+
[RUN_EVENT_KIND.runWaiting]: {
|
|
5297
|
+
description: "The run entered a durable wait.",
|
|
5298
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5299
|
+
outboxCarriers: ["run.waiting"],
|
|
5300
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5301
|
+
example: {
|
|
5302
|
+
runId: "play/enrich/run/abc123",
|
|
5303
|
+
type: RUN_EVENT_KIND.runWaiting,
|
|
5304
|
+
waitKind: "sleep"
|
|
5305
|
+
}
|
|
5306
|
+
},
|
|
5307
|
+
[RUN_EVENT_KIND.runResumed]: {
|
|
5308
|
+
description: "The run resumed after a durable wait.",
|
|
5309
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5310
|
+
outboxCarriers: ["run.resumed"],
|
|
5311
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5312
|
+
example: {
|
|
5313
|
+
runId: "play/enrich/run/abc123",
|
|
5314
|
+
type: RUN_EVENT_KIND.runResumed
|
|
5315
|
+
}
|
|
5316
|
+
},
|
|
5317
|
+
[RUN_EVENT_KIND.runCompleted]: {
|
|
5318
|
+
description: "The run completed successfully.",
|
|
5319
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5320
|
+
outboxCarriers: ["run.completed", "runner.logs"],
|
|
5321
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5322
|
+
example: {
|
|
5323
|
+
runId: "play/enrich/run/abc123",
|
|
5324
|
+
type: RUN_EVENT_KIND.runCompleted
|
|
5325
|
+
}
|
|
5326
|
+
},
|
|
5327
|
+
[RUN_EVENT_KIND.runFailed]: {
|
|
5328
|
+
description: "The run ended with a failure.",
|
|
5329
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5330
|
+
outboxCarriers: ["run.failed", "runner.logs"],
|
|
5331
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5332
|
+
example: {
|
|
5333
|
+
runId: "play/enrich/run/abc123",
|
|
5334
|
+
type: RUN_EVENT_KIND.runFailed,
|
|
5335
|
+
error: "Request timed out"
|
|
5336
|
+
}
|
|
5337
|
+
},
|
|
5338
|
+
[RUN_EVENT_KIND.runCancelled]: {
|
|
5339
|
+
description: "The run was cancelled.",
|
|
5340
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5341
|
+
outboxCarriers: ["run.cancelled"],
|
|
5342
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5343
|
+
example: {
|
|
5344
|
+
runId: "play/enrich/run/abc123",
|
|
5345
|
+
type: RUN_EVENT_KIND.runCancelled
|
|
5346
|
+
}
|
|
5347
|
+
},
|
|
5348
|
+
[RUN_EVENT_KIND.stepStarted]: {
|
|
5349
|
+
description: "A named step began execution.",
|
|
5350
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5351
|
+
outboxCarriers: [
|
|
5352
|
+
"run.events",
|
|
5353
|
+
"run.completed",
|
|
5354
|
+
"run.failed",
|
|
5355
|
+
"runner.logs"
|
|
5356
|
+
],
|
|
5357
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5358
|
+
example: {
|
|
5359
|
+
runId: "play/enrich/run/abc123",
|
|
5360
|
+
type: RUN_EVENT_KIND.stepStarted,
|
|
5361
|
+
stepId: "lookup"
|
|
5362
|
+
}
|
|
5363
|
+
},
|
|
5364
|
+
[RUN_EVENT_KIND.stepProgress]: {
|
|
5365
|
+
description: "A named step reported progress.",
|
|
5366
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5367
|
+
outboxCarriers: [
|
|
5368
|
+
"run.events",
|
|
5369
|
+
"run.completed",
|
|
5370
|
+
"run.failed",
|
|
5371
|
+
"runner.logs"
|
|
5372
|
+
],
|
|
5373
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5374
|
+
example: {
|
|
5375
|
+
runId: "play/enrich/run/abc123",
|
|
5376
|
+
type: RUN_EVENT_KIND.stepProgress,
|
|
5377
|
+
stepId: "lookup"
|
|
5378
|
+
}
|
|
5379
|
+
},
|
|
5380
|
+
[RUN_EVENT_KIND.stepCompleted]: {
|
|
5381
|
+
description: "A named step completed.",
|
|
5382
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5383
|
+
outboxCarriers: [
|
|
5384
|
+
"run.events",
|
|
5385
|
+
"run.completed",
|
|
5386
|
+
"run.failed",
|
|
5387
|
+
"runner.logs"
|
|
5388
|
+
],
|
|
5389
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5390
|
+
example: {
|
|
5391
|
+
runId: "play/enrich/run/abc123",
|
|
5392
|
+
type: RUN_EVENT_KIND.stepCompleted,
|
|
5393
|
+
stepId: "lookup"
|
|
5394
|
+
}
|
|
5395
|
+
},
|
|
5396
|
+
[RUN_EVENT_KIND.stepFailed]: {
|
|
5397
|
+
description: "A named step failed.",
|
|
5398
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5399
|
+
outboxCarriers: [
|
|
5400
|
+
"run.events",
|
|
5401
|
+
"run.completed",
|
|
5402
|
+
"run.failed",
|
|
5403
|
+
"runner.logs"
|
|
5404
|
+
],
|
|
5405
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5406
|
+
example: {
|
|
5407
|
+
runId: "play/enrich/run/abc123",
|
|
5408
|
+
type: RUN_EVENT_KIND.stepFailed,
|
|
5409
|
+
stepId: "lookup"
|
|
5410
|
+
}
|
|
5411
|
+
},
|
|
5412
|
+
[RUN_EVENT_KIND.stepSkipped]: {
|
|
5413
|
+
description: "A named step was skipped.",
|
|
5414
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5415
|
+
outboxCarriers: [
|
|
5416
|
+
"run.events",
|
|
5417
|
+
"run.completed",
|
|
5418
|
+
"run.failed",
|
|
5419
|
+
"runner.logs"
|
|
5420
|
+
],
|
|
5421
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5422
|
+
example: {
|
|
5423
|
+
runId: "play/enrich/run/abc123",
|
|
5424
|
+
type: RUN_EVENT_KIND.stepSkipped,
|
|
5425
|
+
stepId: "lookup"
|
|
5426
|
+
}
|
|
5427
|
+
},
|
|
5428
|
+
[RUN_EVENT_KIND.logAppended]: {
|
|
5429
|
+
description: "A text log line was appended to the unified run history and log view.",
|
|
5430
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5431
|
+
outboxCarriers: [
|
|
5432
|
+
"run.events",
|
|
5433
|
+
"run.waiting",
|
|
5434
|
+
"run.resumed",
|
|
5435
|
+
"run.completed",
|
|
5436
|
+
"run.failed",
|
|
5437
|
+
"runner.logs",
|
|
5438
|
+
"run.wait_timeout"
|
|
5439
|
+
],
|
|
5440
|
+
destination: RUN_LOG_DESTINATION,
|
|
5441
|
+
example: {
|
|
5442
|
+
runId: "play/enrich/run/abc123",
|
|
5443
|
+
type: RUN_EVENT_KIND.logAppended,
|
|
5444
|
+
lines: ["Waiting for integration_event:contact.updated."]
|
|
5445
|
+
}
|
|
5446
|
+
},
|
|
5447
|
+
[RUN_EVENT_KIND.datasetLifecycle]: {
|
|
5448
|
+
description: "A run dataset was registered, made available, or failed.",
|
|
5449
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5450
|
+
outboxCarriers: [
|
|
5451
|
+
"run.events",
|
|
5452
|
+
"run.completed",
|
|
5453
|
+
"run.failed",
|
|
5454
|
+
"runner.logs"
|
|
5455
|
+
],
|
|
5456
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5457
|
+
example: {
|
|
5458
|
+
runId: "play/enrich/run/abc123",
|
|
5459
|
+
type: RUN_EVENT_KIND.datasetLifecycle,
|
|
5460
|
+
phase: "available"
|
|
5461
|
+
}
|
|
5462
|
+
},
|
|
5463
|
+
[RUN_EVENT_KIND.activityObserved]: {
|
|
5464
|
+
description: "The runtime recorded an activity observation.",
|
|
5465
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5466
|
+
outboxCarriers: [
|
|
5467
|
+
"run.events",
|
|
5468
|
+
"run.completed",
|
|
5469
|
+
"run.failed",
|
|
5470
|
+
"runner.logs"
|
|
5471
|
+
],
|
|
5472
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5473
|
+
example: {
|
|
5474
|
+
runId: "play/enrich/run/abc123",
|
|
5475
|
+
type: RUN_EVENT_KIND.activityObserved
|
|
5476
|
+
}
|
|
5477
|
+
},
|
|
5478
|
+
[RUN_EVENT_KIND.workCounters]: {
|
|
5479
|
+
description: "A work segment reported logical call, provider request, and rate-limit counters.",
|
|
5480
|
+
searchableFields: SEARCHABLE_EVENT_FIELDS,
|
|
5481
|
+
outboxCarriers: [
|
|
5482
|
+
"run.events",
|
|
5483
|
+
"run.completed",
|
|
5484
|
+
"run.failed",
|
|
5485
|
+
"runner.logs"
|
|
5486
|
+
],
|
|
5487
|
+
destination: RUN_SNAPSHOT_DESTINATION,
|
|
5488
|
+
example: {
|
|
5489
|
+
runId: "play/enrich/run/abc123",
|
|
5490
|
+
type: RUN_EVENT_KIND.workCounters,
|
|
5491
|
+
attempt: 1,
|
|
5492
|
+
logicalCalls: 4,
|
|
5493
|
+
providerRequests: 4,
|
|
5494
|
+
provider429s: 0,
|
|
5495
|
+
final: true
|
|
5496
|
+
}
|
|
5497
|
+
}
|
|
5498
|
+
};
|
|
5499
|
+
var RUN_EVENT_KINDS = Object.freeze(
|
|
5500
|
+
Object.keys(RUN_EVENT_KIND_CATALOG)
|
|
5501
|
+
);
|
|
5502
|
+
var RUN_SCHEDULER_OUTBOX_EVENT_TYPE = {
|
|
5503
|
+
runCreated: RUN_EVENT_KIND.runCreated,
|
|
5504
|
+
runStarted: RUN_EVENT_KIND.runStarted,
|
|
5505
|
+
runWaiting: RUN_EVENT_KIND.runWaiting,
|
|
5506
|
+
runResumed: RUN_EVENT_KIND.runResumed,
|
|
5507
|
+
runCompleted: RUN_EVENT_KIND.runCompleted,
|
|
5508
|
+
runFailed: RUN_EVENT_KIND.runFailed,
|
|
5509
|
+
runCancelled: RUN_EVENT_KIND.runCancelled,
|
|
5510
|
+
runEvents: "run.events",
|
|
5511
|
+
runnerLogs: "runner.logs",
|
|
5512
|
+
runWaitTimeout: "run.wait_timeout"
|
|
5513
|
+
};
|
|
5514
|
+
var RUN_SCHEDULER_OUTBOX_EVENT_TYPES = Object.freeze(
|
|
5515
|
+
Object.values(RUN_SCHEDULER_OUTBOX_EVENT_TYPE)
|
|
5516
|
+
);
|
|
5517
|
+
var RUN_SCHEDULER_OUTBOX_START_EVENT_TYPES = [
|
|
5518
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCreated,
|
|
5519
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runStarted
|
|
5520
|
+
];
|
|
5521
|
+
var RUN_SCHEDULER_OUTBOX_PREFIX_STOP_EVENT_TYPES = [
|
|
5522
|
+
...RUN_SCHEDULER_OUTBOX_START_EVENT_TYPES,
|
|
5523
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runEvents
|
|
5524
|
+
];
|
|
5525
|
+
var RUN_SCHEDULER_OUTBOX_TERMINAL_EVENT_TYPES = [
|
|
5526
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCompleted,
|
|
5527
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runFailed,
|
|
5528
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCancelled
|
|
5529
|
+
];
|
|
5530
|
+
var RUN_EVENT_CONVEX_INTERNAL_KIND = {
|
|
5531
|
+
rollupMembershipAdded: "rollup.membership.added",
|
|
5532
|
+
rollupMembershipRemoved: "rollup.membership.removed"
|
|
5533
|
+
};
|
|
5534
|
+
var RUN_RECEIPT_SEARCH_KIND = {
|
|
5535
|
+
completed: "receipt.completed",
|
|
5536
|
+
failed: "receipt.failed",
|
|
5537
|
+
skipped: "receipt.skipped"
|
|
5538
|
+
};
|
|
5539
|
+
var RUN_RECEIPT_SEARCH_KIND_CATALOG = {
|
|
5540
|
+
[RUN_RECEIPT_SEARCH_KIND.completed]: {
|
|
5541
|
+
description: "A durable work receipt completed.",
|
|
5542
|
+
searchIndex: "planet_scale_runtime_event_index",
|
|
5543
|
+
payloadStore: "authoritative_work_receipt"
|
|
5544
|
+
},
|
|
5545
|
+
[RUN_RECEIPT_SEARCH_KIND.failed]: {
|
|
5546
|
+
description: "A durable work receipt failed.",
|
|
5547
|
+
searchIndex: "planet_scale_runtime_event_index",
|
|
5548
|
+
payloadStore: "authoritative_work_receipt"
|
|
5549
|
+
},
|
|
5550
|
+
[RUN_RECEIPT_SEARCH_KIND.skipped]: {
|
|
5551
|
+
description: "A durable work receipt was skipped.",
|
|
5552
|
+
searchIndex: "planet_scale_runtime_event_index",
|
|
5553
|
+
payloadStore: "authoritative_work_receipt"
|
|
5554
|
+
}
|
|
5555
|
+
};
|
|
5556
|
+
var RUN_EVENT_SEARCH_FALLBACK_KIND = "runtime.event";
|
|
5557
|
+
var RUN_EVENT_SEARCH_KIND_VALUES = Object.freeze([
|
|
5558
|
+
...RUN_EVENT_KINDS,
|
|
5559
|
+
...Object.keys(RUN_RECEIPT_SEARCH_KIND_CATALOG),
|
|
5560
|
+
RUN_EVENT_SEARCH_FALLBACK_KIND
|
|
5561
|
+
]);
|
|
5562
|
+
var RUN_EVENT_TERMINAL_KIND_VALUES = [
|
|
5563
|
+
RUN_EVENT_KIND.runCompleted,
|
|
5564
|
+
RUN_EVENT_KIND.runFailed,
|
|
5565
|
+
RUN_EVENT_KIND.runCancelled
|
|
5566
|
+
];
|
|
5567
|
+
var RUN_LOG_RETENTION_MAX_BYTES = 5 * 1024 * 1024;
|
|
5568
|
+
function sqlStringLiteral(value) {
|
|
5569
|
+
return "'" + value.replaceAll("'", "''") + "'";
|
|
5570
|
+
}
|
|
5571
|
+
var RUN_EVENT_KNOWN_KIND_SQL_LIST = RUN_EVENT_KINDS.map(sqlStringLiteral).join(", ");
|
|
5572
|
+
var RUN_EVENT_LIFECYCLE_KIND_SQL_LIST = [
|
|
5573
|
+
RUN_EVENT_KIND.runCreated,
|
|
5574
|
+
RUN_EVENT_KIND.runStarted,
|
|
5575
|
+
RUN_EVENT_KIND.runWaiting,
|
|
5576
|
+
RUN_EVENT_KIND.runResumed,
|
|
5577
|
+
RUN_EVENT_KIND.runCompleted,
|
|
5578
|
+
RUN_EVENT_KIND.runFailed,
|
|
5579
|
+
RUN_EVENT_KIND.runCancelled
|
|
5580
|
+
].map(sqlStringLiteral).join(", ");
|
|
5581
|
+
var RUN_EVENT_SNAPSHOT_KIND_SQL_LIST = RUN_EVENT_KINDS.filter(
|
|
5582
|
+
(kind) => kind !== RUN_EVENT_KIND.logAppended
|
|
5583
|
+
).map(sqlStringLiteral).join(", ");
|
|
5584
|
+
var RUN_EVENT_KIND_SQL_LITERAL = {
|
|
5585
|
+
runCreated: sqlStringLiteral(RUN_EVENT_KIND.runCreated),
|
|
5586
|
+
runStarted: sqlStringLiteral(RUN_EVENT_KIND.runStarted),
|
|
5587
|
+
runWaiting: sqlStringLiteral(RUN_EVENT_KIND.runWaiting),
|
|
5588
|
+
runResumed: sqlStringLiteral(RUN_EVENT_KIND.runResumed),
|
|
5589
|
+
runCompleted: sqlStringLiteral(RUN_EVENT_KIND.runCompleted),
|
|
5590
|
+
runFailed: sqlStringLiteral(RUN_EVENT_KIND.runFailed),
|
|
5591
|
+
runCancelled: sqlStringLiteral(RUN_EVENT_KIND.runCancelled),
|
|
5592
|
+
stepStarted: sqlStringLiteral(RUN_EVENT_KIND.stepStarted),
|
|
5593
|
+
stepProgress: sqlStringLiteral(RUN_EVENT_KIND.stepProgress),
|
|
5594
|
+
stepCompleted: sqlStringLiteral(RUN_EVENT_KIND.stepCompleted),
|
|
5595
|
+
stepFailed: sqlStringLiteral(RUN_EVENT_KIND.stepFailed),
|
|
5596
|
+
stepSkipped: sqlStringLiteral(RUN_EVENT_KIND.stepSkipped),
|
|
5597
|
+
logAppended: sqlStringLiteral(RUN_EVENT_KIND.logAppended),
|
|
5598
|
+
datasetLifecycle: sqlStringLiteral(RUN_EVENT_KIND.datasetLifecycle),
|
|
5599
|
+
activityObserved: sqlStringLiteral(RUN_EVENT_KIND.activityObserved),
|
|
5600
|
+
workCounters: sqlStringLiteral(RUN_EVENT_KIND.workCounters)
|
|
5601
|
+
};
|
|
5602
|
+
var RUN_SCHEDULER_OUTBOX_EVENT_TYPE_SQL_LITERAL = {
|
|
5603
|
+
runCreated: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCreated),
|
|
5604
|
+
runStarted: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runStarted),
|
|
5605
|
+
runWaiting: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runWaiting),
|
|
5606
|
+
runResumed: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runResumed),
|
|
5607
|
+
runCompleted: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCompleted),
|
|
5608
|
+
runFailed: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runFailed),
|
|
5609
|
+
runCancelled: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCancelled),
|
|
5610
|
+
runEvents: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runEvents),
|
|
5611
|
+
runnerLogs: sqlStringLiteral(RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runnerLogs),
|
|
5612
|
+
runWaitTimeout: sqlStringLiteral(
|
|
5613
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runWaitTimeout
|
|
5614
|
+
)
|
|
5615
|
+
};
|
|
5616
|
+
var RUN_EVENT_CONVEX_INTERNAL_KIND_SQL_LITERAL = {
|
|
5617
|
+
rollupMembershipAdded: sqlStringLiteral(
|
|
5618
|
+
RUN_EVENT_CONVEX_INTERNAL_KIND.rollupMembershipAdded
|
|
5619
|
+
),
|
|
5620
|
+
rollupMembershipRemoved: sqlStringLiteral(
|
|
5621
|
+
RUN_EVENT_CONVEX_INTERNAL_KIND.rollupMembershipRemoved
|
|
5622
|
+
)
|
|
5623
|
+
};
|
|
5624
|
+
var RUN_EVENT_TERMINAL_LOG_CARRIER_SQL_LIST = [
|
|
5625
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runCompleted,
|
|
5626
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runFailed,
|
|
5627
|
+
RUN_SCHEDULER_OUTBOX_EVENT_TYPE.runnerLogs
|
|
5628
|
+
].map(sqlStringLiteral).join(", ");
|
|
5629
|
+
var RUN_SCHEDULER_OUTBOX_TERMINAL_EVENT_TYPE_SQL_LIST = [
|
|
5630
|
+
...RUN_SCHEDULER_OUTBOX_TERMINAL_EVENT_TYPES
|
|
5631
|
+
].map(sqlStringLiteral).join(", ");
|
|
5632
|
+
var RUN_EVENT_SEARCH_FALLBACK_KIND_SQL_LITERAL = sqlStringLiteral(
|
|
5633
|
+
RUN_EVENT_SEARCH_FALLBACK_KIND
|
|
5634
|
+
);
|
|
5635
|
+
|
|
5636
|
+
// ../play-runtime/run-ledger.ts
|
|
5637
|
+
var TERMINAL_STATUS_BY_EVENT_TYPE = {
|
|
5638
|
+
[RUN_EVENT_KIND.runCompleted]: "completed",
|
|
5639
|
+
[RUN_EVENT_KIND.runFailed]: "failed",
|
|
5640
|
+
[RUN_EVENT_KIND.runCancelled]: "cancelled"
|
|
5641
|
+
};
|
|
5642
|
+
|
|
5224
5643
|
// ../play-runtime/run-lifecycle-policy.ts
|
|
5225
5644
|
var TERMINAL_PLAY_RUN_STATUSES = /* @__PURE__ */ new Set([
|
|
5226
5645
|
"completed",
|
|
@@ -7944,7 +8363,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
7944
8363
|
);
|
|
7945
8364
|
return { ...response, runs: response.runs ?? [] };
|
|
7946
8365
|
}
|
|
7947
|
-
/** Read
|
|
8366
|
+
/** Read retained tool results without executing tools, preserving supplied key order and batching 100 keys per request. Obtain keys from exported evidence or execution metadata; each key must be nonempty, at most 2,048 characters and contain no CR, LF or NUL. Missing/expired results have an explicit per-key error. */
|
|
7948
8367
|
async getRunReceipts(runId, options) {
|
|
7949
8368
|
if (!options.keys.length || options.keys.some(
|
|
7950
8369
|
(key) => typeof key !== "string" || !key.trim() || key.length > 2048 || /[\r\n\0]/.test(key)
|
|
@@ -8000,7 +8419,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
8000
8419
|
);
|
|
8001
8420
|
}
|
|
8002
8421
|
/**
|
|
8003
|
-
*
|
|
8422
|
+
* Read a run's retained text tail (default 200), full retained stream (`all`), or terminal failure window (`failed`, at most 20). These are existing reads; sampling and retention loss cannot be recovered. See [run logs and events](run-events.md) for structured search and payload retrieval.
|
|
8004
8423
|
*
|
|
8005
8424
|
* This is the SDK equivalent of:
|
|
8006
8425
|
*
|
|
@@ -8079,7 +8498,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
8079
8498
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
8080
8499
|
};
|
|
8081
8500
|
}
|
|
8082
|
-
/**
|
|
8501
|
+
/** Read structured history across the active organization without requiring a run ID. Defaults to the last hour, newest first; use the returned cursor and exact time bounds to continue. See [run logs and events](run-events.md) for all kinds, indexed fields, payloads and SDK/API response types. */
|
|
8083
8502
|
async searchRunEvents(options = {}) {
|
|
8084
8503
|
const now = Date.now();
|
|
8085
8504
|
const params = new URLSearchParams({
|
|
@@ -15270,6 +15689,233 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
15270
15689
|
// src/cli/commands/play.ts
|
|
15271
15690
|
import { createHash as createHash4, randomUUID as randomUUID4 } from "crypto";
|
|
15272
15691
|
|
|
15692
|
+
// src/cli/run-logs-help.ts
|
|
15693
|
+
var EVENT_DETAILS = {
|
|
15694
|
+
"run.created": {
|
|
15695
|
+
emittedBy: "Run admission",
|
|
15696
|
+
payloadFields: ["status", "playName", "runtimeBackend"]
|
|
15697
|
+
},
|
|
15698
|
+
"run.started": {
|
|
15699
|
+
emittedBy: "Execution coordinator",
|
|
15700
|
+
payloadFields: ["playName", "runtimeBackend"]
|
|
15701
|
+
},
|
|
15702
|
+
"run.waiting": {
|
|
15703
|
+
emittedBy: "Durable wait handling",
|
|
15704
|
+
payloadFields: ["waitKind", "waitUntil"]
|
|
15705
|
+
},
|
|
15706
|
+
"run.resumed": { emittedBy: "Durable wait handling", payloadFields: [] },
|
|
15707
|
+
"run.completed": {
|
|
15708
|
+
emittedBy: "Run finalization",
|
|
15709
|
+
payloadFields: ["result", "resultSummary", "terminalWorkCounterSegment"]
|
|
15710
|
+
},
|
|
15711
|
+
"run.failed": {
|
|
15712
|
+
emittedBy: "Run finalization",
|
|
15713
|
+
payloadFields: [
|
|
15714
|
+
"error",
|
|
15715
|
+
"result",
|
|
15716
|
+
"resultSummary",
|
|
15717
|
+
"terminalWorkCounterSegment"
|
|
15718
|
+
]
|
|
15719
|
+
},
|
|
15720
|
+
"run.cancelled": {
|
|
15721
|
+
emittedBy: "Run cancellation",
|
|
15722
|
+
payloadFields: ["error", "result"]
|
|
15723
|
+
},
|
|
15724
|
+
"step.started": {
|
|
15725
|
+
emittedBy: "Managed step execution",
|
|
15726
|
+
payloadFields: ["stepId", "label", "kind", "artifactTableNamespace"]
|
|
15727
|
+
},
|
|
15728
|
+
"step.progress": {
|
|
15729
|
+
emittedBy: "Managed step execution",
|
|
15730
|
+
payloadFields: ["stepId", "label", "kind", "status", "progress"]
|
|
15731
|
+
},
|
|
15732
|
+
"step.completed": {
|
|
15733
|
+
emittedBy: "Managed step execution",
|
|
15734
|
+
payloadFields: ["stepId", "label", "kind", "artifactTableNamespace"]
|
|
15735
|
+
},
|
|
15736
|
+
"step.failed": {
|
|
15737
|
+
emittedBy: "Managed step execution",
|
|
15738
|
+
payloadFields: [
|
|
15739
|
+
"stepId",
|
|
15740
|
+
"label",
|
|
15741
|
+
"kind",
|
|
15742
|
+
"error",
|
|
15743
|
+
"artifactTableNamespace"
|
|
15744
|
+
]
|
|
15745
|
+
},
|
|
15746
|
+
"step.skipped": {
|
|
15747
|
+
emittedBy: "Managed step execution",
|
|
15748
|
+
payloadFields: ["stepId", "label", "kind", "artifactTableNamespace"]
|
|
15749
|
+
},
|
|
15750
|
+
"log.appended": {
|
|
15751
|
+
emittedBy: "ctx.log and runtime/coordinator messages",
|
|
15752
|
+
payloadFields: [
|
|
15753
|
+
"lines",
|
|
15754
|
+
"lineContexts",
|
|
15755
|
+
"producerAttempt",
|
|
15756
|
+
"channelOffset",
|
|
15757
|
+
"logsTruncated"
|
|
15758
|
+
]
|
|
15759
|
+
},
|
|
15760
|
+
"dataset.lifecycle": {
|
|
15761
|
+
emittedBy: "Managed dataset storage",
|
|
15762
|
+
payloadFields: [
|
|
15763
|
+
"datasetId",
|
|
15764
|
+
"path",
|
|
15765
|
+
"tableNamespace",
|
|
15766
|
+
"phase",
|
|
15767
|
+
"persistedRows",
|
|
15768
|
+
"succeededRows",
|
|
15769
|
+
"failedRows",
|
|
15770
|
+
"complete",
|
|
15771
|
+
"bornFrom"
|
|
15772
|
+
]
|
|
15773
|
+
},
|
|
15774
|
+
"activity.observed": {
|
|
15775
|
+
emittedBy: "Managed provider/dataset/runner activity",
|
|
15776
|
+
payloadFields: ["observation"]
|
|
15777
|
+
},
|
|
15778
|
+
"work.counters": {
|
|
15779
|
+
emittedBy: "Runtime work accounting",
|
|
15780
|
+
payloadFields: [
|
|
15781
|
+
"attempt",
|
|
15782
|
+
"invocationSeq",
|
|
15783
|
+
"segmentId",
|
|
15784
|
+
"logicalCalls",
|
|
15785
|
+
"providerRequests",
|
|
15786
|
+
"provider429s",
|
|
15787
|
+
"final"
|
|
15788
|
+
]
|
|
15789
|
+
}
|
|
15790
|
+
};
|
|
15791
|
+
var RUN_LOGS_KIND_HELP = [
|
|
15792
|
+
...Object.entries(RUN_EVENT_KIND_CATALOG).map(([kind, descriptor]) => ({
|
|
15793
|
+
kind,
|
|
15794
|
+
description: descriptor.description,
|
|
15795
|
+
...EVENT_DETAILS[kind]
|
|
15796
|
+
})),
|
|
15797
|
+
...Object.entries(RUN_RECEIPT_SEARCH_KIND_CATALOG).map(
|
|
15798
|
+
([kind, descriptor]) => ({
|
|
15799
|
+
kind,
|
|
15800
|
+
description: descriptor.description,
|
|
15801
|
+
emittedBy: "Durable work receipt settlement",
|
|
15802
|
+
payloadFields: ["status", "output", "error", "errorPayload"]
|
|
15803
|
+
})
|
|
15804
|
+
),
|
|
15805
|
+
{
|
|
15806
|
+
kind: RUN_EVENT_SEARCH_FALLBACK_KIND,
|
|
15807
|
+
description: "Fallback for an observation without a recognized event type.",
|
|
15808
|
+
emittedBy: "Event indexing",
|
|
15809
|
+
payloadFields: []
|
|
15810
|
+
}
|
|
15811
|
+
];
|
|
15812
|
+
var SECTIONS = [
|
|
15813
|
+
{
|
|
15814
|
+
title: "Choose the read",
|
|
15815
|
+
paragraphs: [
|
|
15816
|
+
"These commands read existing evidence; they do not start a run or execute a provider. Replace <run-id>, <play-name> and other angle-bracket values with identifiers returned by the CLI.",
|
|
15817
|
+
"Text logs: runs logs <run-id> returns the last 200 retained lines by default. --out writes the full retained stream to a local file. --log-level filters text severity; debug includes all retained levels. --failed reads only a terminal-failed run\u2019s last 20 retained lines and reports retention limitations.",
|
|
15818
|
+
"Event search: omit the run ID, or add any of --since, --until, --play, --kind, --where, --payloads, --cursor, --runtime-namespace or --runtime-backend. A supplied run ID then narrows the search. --limit and --json alone do not switch a run\u2019s text logs to event search. Text-only flags --out, --failed, --log-level, --logs and --debug cannot be combined with event search.",
|
|
15819
|
+
"Current status and returned output selectors: runs get <run-id> --json. Live observation: runs watch <run-id>. Dataset rows: runs export <run-id> --dataset <returned-selector> --out rows.csv. A referenced tool response: runs receipt <run-id> --key <returned-receipt-key> --json. Read each command\u2019s --help for its options."
|
|
15820
|
+
],
|
|
15821
|
+
commands: [
|
|
15822
|
+
"deepline runs logs <run-id> --json",
|
|
15823
|
+
"deepline runs logs <run-id> --out run.log --json",
|
|
15824
|
+
"deepline runs logs --kind run.failed --json",
|
|
15825
|
+
"deepline runs logs --kind step.failed --payloads --json",
|
|
15826
|
+
"deepline runs logs --kind receipt.failed --payloads --json"
|
|
15827
|
+
]
|
|
15828
|
+
},
|
|
15829
|
+
{
|
|
15830
|
+
title: "Search window and pagination",
|
|
15831
|
+
paragraphs: [
|
|
15832
|
+
"Search defaults to the last hour, newest first. Use explicit ISO UTC --since and --until values for reproducible queries; the maximum lookback is seven days. Default page size is 100 events; --limit accepts 1\u2013200. With --payloads, default and maximum are 10 events, with 16 MiB total payload data.",
|
|
15833
|
+
"JSON returns events[], returnedCount, since, until, nextCursor and next.logs. Run the returned next.logs command to continue with the same filters and UTC window; nextCursor is opaque. A bounded page or an empty result does not establish whole-run coverage or application health."
|
|
15834
|
+
],
|
|
15835
|
+
commands: [
|
|
15836
|
+
"deepline runs logs <run-id> --kind log.appended --json",
|
|
15837
|
+
"deepline runs logs --play <play-name> --since <UTC-start> --until <UTC-end> --json"
|
|
15838
|
+
]
|
|
15839
|
+
},
|
|
15840
|
+
{
|
|
15841
|
+
title: "Fields you can filter with --where",
|
|
15842
|
+
paragraphs: [
|
|
15843
|
+
"Identity strings: orgId, runId, playName, runtimeScope. These come from authenticated execution state; filters only narrow your authorized organization/runtime. Preview reads require the existing runtime credential and an authorized --runtime-namespace; --runtime-backend selects daytona or modal.",
|
|
15844
|
+
"Event string: kind. Optional strings: source, stepId, stepKind, status, datasetId, phase, provider, operation. Optional positive integer: producerAttempt. These fields exist only when recorded; inspect a returned event before filtering on an optional field.",
|
|
15845
|
+
'stepId/stepKind describe recorded step work; datasetId/phase describe dataset lifecycle (registered, available, failed). provider/operation appear on typed provider activity.observed events, not every receipt or provider call. status is the recorded status or activity state when present: run.completed and step.completed do not imply status == "completed". Select lifecycle outcomes with --kind.',
|
|
15846
|
+
"context.<key> matches an authored flat scalar log field: string, number or boolean. Context cannot override event identity. Missing fields do not match. --where supports only $.field == literal predicates joined with &&, at most eight predicates and 512 bytes. No OR, ranges, wildcards, nested payload paths or text search. Time uses --since/--until; level and message are not --where fields."
|
|
15847
|
+
],
|
|
15848
|
+
commands: [
|
|
15849
|
+
`deepline runs logs --kind receipt.failed --where '$.status == "failed"' --payloads --json`,
|
|
15850
|
+
`deepline runs logs <run-id> --where '$.source == "worker" && $.producerAttempt == 1' --json`,
|
|
15851
|
+
`deepline runs logs --kind activity.observed --where '$.provider == "<returned-provider>" && $.operation == "<returned-operation>"' --json`,
|
|
15852
|
+
`deepline runs logs --kind log.appended --where '$.context.<authored-key> == "<recorded-value>"' --json`
|
|
15853
|
+
]
|
|
15854
|
+
},
|
|
15855
|
+
{
|
|
15856
|
+
title: "What you get back",
|
|
15857
|
+
paragraphs: [
|
|
15858
|
+
"Search events include eventId, occurredAt, ingestedAt, kind, runId, playName, level and message. The CLI puts indexed fields directly on each events[] entry; SDK/API responses keep them under searchDoc. Log search message is a preview (up to 2,048 characters); use text logs or --out for full retained lines.",
|
|
15859
|
+
"--payloads adds eventPayload for stored canonical events: lifecycle, step details/errors, activity observations, dataset transitions and work counters. Receipt matches instead hydrate payload with status, output, error and errorPayload. An event without a receipt does not promise a tool response; retained payloads may be unavailable. Neither --where nor event search indexes request/response bodies.",
|
|
15860
|
+
"Search does not expose a receipt key or storage reference. To retrieve a specific retained tool response with runs receipt, use the receipt key returned in the run\u2019s exported evidence or tool execution metadata. For full row data, follow runs get output/export actions; dataset.lifecycle contains metadata, not all dataset rows.",
|
|
15861
|
+
"The catalog lists known searchable kinds, including receipt outcomes and the runtime.event fallback. Use the exact dotted name with --kind. Future stored kinds can also be queried; this list is not a CLI validation allowlist. Events are observations, not a count of billed provider calls.",
|
|
15862
|
+
"Catalog payload fields are possible producer fields, not required fields or --where paths. Canonical eventPayload uses type for the dotted event kind; its kind field, when present on a step, becomes indexed stepKind. Indexed log entries describe individual lines rather than reproducing the original lines batch.",
|
|
15863
|
+
"Canonical event envelopes carry runId, type, occurredAt (producer milliseconds), source, optional seq and optional producer-owned payload. Search occurredAt/ingestedAt are UTC timestamp strings. source identifies the recorded producer; producerAttempt is present only when known.",
|
|
15864
|
+
"activity.observed stores observation with activityId, stepId, target, state and observedAt. Targets describe provider, dataset, lease, runner, step or capacity work. State kinds are active, queued, waiting, retrying, scheduled, completed or failed; retry/wait detail stays in the payload. work.counters contains aggregate logicalCalls, providerRequests and provider429s, not per-call responses."
|
|
15865
|
+
],
|
|
15866
|
+
commands: []
|
|
15867
|
+
}
|
|
15868
|
+
];
|
|
15869
|
+
var RETENTION = [
|
|
15870
|
+
"Event/log/receipt search shares the PlanetScale index. New runs marked runEventStore=planet_scale retain accepted event/log history in PlanetScale; Convex keeps current run/control state and eligible saved-Play rollup facts. Older unmarked runs retain their existing readers. No backfill is implied.",
|
|
15871
|
+
"Search retention is seven days; receipt payload retention is independent. Logs reflect accepted, retained lines: runtime sampling and truncation can omit original console output. Read returned retention/sampling warnings; an export contains the full retained stream, not suppressed lines."
|
|
15872
|
+
];
|
|
15873
|
+
function wrapParagraph(text, indent2 = 2) {
|
|
15874
|
+
const lines = [];
|
|
15875
|
+
const padding = " ".repeat(indent2);
|
|
15876
|
+
let line = padding;
|
|
15877
|
+
for (const word of text.split(" ")) {
|
|
15878
|
+
if (line.length + word.length > 80 && line.trim()) {
|
|
15879
|
+
lines.push(line.trimEnd());
|
|
15880
|
+
line = padding;
|
|
15881
|
+
}
|
|
15882
|
+
line += `${word} `;
|
|
15883
|
+
}
|
|
15884
|
+
lines.push(line.trimEnd());
|
|
15885
|
+
return lines.join("\n");
|
|
15886
|
+
}
|
|
15887
|
+
function renderRunLogsHelp() {
|
|
15888
|
+
const section = ({
|
|
15889
|
+
title,
|
|
15890
|
+
paragraphs,
|
|
15891
|
+
commands
|
|
15892
|
+
}) => [
|
|
15893
|
+
`${title}:`,
|
|
15894
|
+
...paragraphs.flatMap((paragraph) => [wrapParagraph(paragraph), ""]),
|
|
15895
|
+
...commands.length ? [" Common commands:", ...commands.map((command) => ` ${command}`)] : [],
|
|
15896
|
+
""
|
|
15897
|
+
];
|
|
15898
|
+
return [
|
|
15899
|
+
"",
|
|
15900
|
+
...section(SECTIONS[0]),
|
|
15901
|
+
"Known --kind values (complete catalog):",
|
|
15902
|
+
...RUN_LOGS_KIND_HELP.flatMap(
|
|
15903
|
+
({ kind, description, emittedBy, payloadFields }) => [
|
|
15904
|
+
` ${kind}`,
|
|
15905
|
+
wrapParagraph(description, 4),
|
|
15906
|
+
wrapParagraph(
|
|
15907
|
+
`Recorded by: ${emittedBy}. Payload fields: ${kind === RUN_EVENT_SEARCH_FALLBACK_KIND ? "producer-specific fields; inspect the returned payload" : payloadFields.join(", ") || "event envelope only"}.`,
|
|
15908
|
+
4
|
|
15909
|
+
)
|
|
15910
|
+
]
|
|
15911
|
+
),
|
|
15912
|
+
"",
|
|
15913
|
+
...SECTIONS.slice(1).flatMap(section),
|
|
15914
|
+
"Storage and retention:",
|
|
15915
|
+
...RETENTION.flatMap((paragraph) => [wrapParagraph(paragraph), ""])
|
|
15916
|
+
].join("\n");
|
|
15917
|
+
}
|
|
15918
|
+
|
|
15273
15919
|
// ../play-runtime/run-execution-state.ts
|
|
15274
15920
|
function assertNeverState(value, what) {
|
|
15275
15921
|
throw new Error(`Unhandled ${what}: ${JSON.stringify(value)}`);
|
|
@@ -36448,44 +37094,21 @@ Examples:
|
|
|
36448
37094
|
});
|
|
36449
37095
|
runs.command("logs [runId]").description(
|
|
36450
37096
|
"Fetch one run\u2019s logs or search recent runtime events across runs."
|
|
36451
|
-
).addHelpText(
|
|
36452
|
-
"
|
|
36453
|
-
|
|
36454
|
-
|
|
36455
|
-
Prints a bounded recent log preview by default. Use --out to write the full
|
|
36456
|
-
retained stream to a local file. Use --log-level to filter by severity;
|
|
36457
|
-
default debug preserves the complete historical stream.
|
|
36458
|
-
|
|
36459
|
-
Search flags read the org-scoped event index (last hour by default, at most
|
|
36460
|
-
seven days). Org, run, Play, runtime scope and known attempt identity are
|
|
36461
|
-
attached automatically. --where accepts equality joined with && for orgId,
|
|
36462
|
-
runId, playName, runtimeScope, producerAttempt, kind, status, source, stepId,
|
|
36463
|
-
stepKind, datasetId, phase, provider, operation, and scalar context.<key>.
|
|
36464
|
-
Filters only narrow the authenticated org/runtime scope. Provider and
|
|
36465
|
-
operation come from typed provider activity observations; this does not
|
|
36466
|
-
index request/response bodies or promise one event per provider call. --payloads
|
|
36467
|
-
includes full result data in this command, capped at ten events and 16 MiB.
|
|
36468
|
-
|
|
36469
|
-
Examples:
|
|
36470
|
-
deepline runs logs play/my-play/run/20260501t000000-000
|
|
36471
|
-
deepline runs logs play/my-play/run/20260501t000000-000 --limit 500
|
|
36472
|
-
deepline runs logs play/my-play/run/20260501t000000-000 --failed --json
|
|
36473
|
-
deepline runs logs play/my-play/run/20260501t000000-000 --log-level error
|
|
36474
|
-
deepline runs logs play/my-play/run/20260501t000000-000 --out run.log --log-level debug --json
|
|
36475
|
-
deepline runs logs --since 2026-09-29T00:00:00Z --kind step.failed --json
|
|
36476
|
-
deepline runs logs --kind activity.observed --where '$.provider == "apollo" && $.operation == "company_lookup"' --json
|
|
36477
|
-
deepline runs logs --play my-play --where '$.context.companyId == "acme_123"' --json
|
|
36478
|
-
deepline runs logs --where '$.status == "failed"' --payloads --play my-play --json
|
|
36479
|
-
`
|
|
36480
|
-
).option("--limit <count>", "Maximum log lines or search events to print").option("--out <path>", "Write the full retained log stream to a file").option("--failed", "Show the bounded terminal-failure log window").option(
|
|
37097
|
+
).addHelpText("after", renderRunLogsHelp()).option(
|
|
37098
|
+
"--limit <count>",
|
|
37099
|
+
"Text tail: default 200; search: default 100, max 200 (10 with --payloads)"
|
|
37100
|
+
).option("--out <path>", "Write the full retained log stream to a file").option("--failed", "Show the bounded terminal-failure log window").option(
|
|
36481
37101
|
"--log-level <level>",
|
|
36482
37102
|
"Minimum severity: debug (default), info, warn, or error"
|
|
36483
|
-
).option("--logs", "Compatibility alias for --log-level debug").option("--debug", "Compatibility alias for --log-level debug").option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--since <timestamp>", "Search events since this UTC timestamp").option("--until <timestamp>", "Search events before this UTC timestamp").option("--play <name>", "Filter events by Play name").option(
|
|
37103
|
+
).option("--logs", "Compatibility alias for --log-level debug").option("--debug", "Compatibility alias for --log-level debug").option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--since <timestamp>", "Search events since this UTC timestamp").option("--until <timestamp>", "Search events before this UTC timestamp").option("--play <name>", "Filter events by Play name").option(
|
|
37104
|
+
"--kind <kind>",
|
|
37105
|
+
"Search one exact event kind; complete catalog below"
|
|
37106
|
+
).option(
|
|
36484
37107
|
"--where <jsonpath>",
|
|
36485
|
-
|
|
37108
|
+
"Search indexed fields with == and &&; field types and availability below"
|
|
36486
37109
|
).option(
|
|
36487
37110
|
"--payloads",
|
|
36488
|
-
"
|
|
37111
|
+
"Search with canonical eventPayload or receipt payload; max 10 events, 16 MiB"
|
|
36489
37112
|
).option("--cursor <token>", "Continue a bounded event search").option(
|
|
36490
37113
|
"--runtime-namespace <name>",
|
|
36491
37114
|
"Search an explicitly authorized Preview namespace"
|
|
@@ -39515,7 +40138,7 @@ function enrichReportJson(report) {
|
|
|
39515
40138
|
} : {}
|
|
39516
40139
|
};
|
|
39517
40140
|
}
|
|
39518
|
-
function
|
|
40141
|
+
function sqlStringLiteral2(value) {
|
|
39519
40142
|
return `'${value.replace(/'/g, "''")}'`;
|
|
39520
40143
|
}
|
|
39521
40144
|
function failureAliasFromCellMeta(cellMeta) {
|
|
@@ -39610,7 +40233,7 @@ async function collectCustomerDbFailureJobs(input2) {
|
|
|
39610
40233
|
const aliasIndexByName = new Map(
|
|
39611
40234
|
fallbackAliases.map((spec, index) => [normalizeAlias2(spec.alias), index])
|
|
39612
40235
|
);
|
|
39613
|
-
const sql = `select _input_index, _status, _error, _cell_meta from ${customerDb.sqlQualifiedTableName} where _run_id = ${
|
|
40236
|
+
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`;
|
|
39614
40237
|
const retryDelays = enrichCustomerDbFailureLookupRetryDelaysMs();
|
|
39615
40238
|
let lastError = null;
|
|
39616
40239
|
let attempts = 0;
|