deepline 0.1.153 → 0.1.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/apps/play-runner-workers/src/coordinator-entry.ts +15 -0
- package/dist/bundling-sources/apps/play-runner-workers/src/entry.ts +1180 -825
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/batching.ts +34 -18
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/harness-receipt-store.ts +41 -0
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/receipts.ts +143 -8
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/tool-receipts.ts +104 -0
- package/dist/bundling-sources/sdk/src/index.ts +0 -1
- package/dist/bundling-sources/sdk/src/play.ts +3 -48
- package/dist/bundling-sources/sdk/src/plays/harness-stub.ts +27 -2
- package/dist/bundling-sources/sdk/src/release.ts +2 -2
- package/dist/bundling-sources/sdk/src/worker-play-entry.ts +0 -10
- package/dist/bundling-sources/shared_libs/play-data-plane/index.ts +0 -1
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +87 -0
- package/dist/bundling-sources/shared_libs/play-runtime/batch-runtime.ts +0 -59
- package/dist/bundling-sources/shared_libs/play-runtime/cell-staleness.ts +0 -253
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +805 -1570
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +47 -74
- package/dist/bundling-sources/shared_libs/play-runtime/default-batch-strategies.ts +36 -14
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +145 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +284 -0
- package/dist/bundling-sources/shared_libs/play-runtime/postgres-json.ts +12 -5
- package/dist/bundling-sources/shared_libs/play-runtime/run-lifecycle-policy.ts +78 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +10 -45
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-actions.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +923 -535
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver-neon-serverless.ts +45 -76
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/step-program-dataset-builder.ts +1 -14
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execution-outcome.ts +159 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result-types.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipts.ts +32 -0
- package/dist/bundling-sources/shared_libs/plays/definition.ts +4 -2
- package/dist/bundling-sources/shared_libs/plays/runtime-validation.ts +3 -14
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +1 -43
- package/dist/cli/index.js +1301 -399
- package/dist/cli/index.mjs +1269 -361
- package/dist/{compiler-manifest-BjoRENv9.d.ts → compiler-manifest-DW1flrHk.d.mts} +0 -9
- package/dist/{compiler-manifest-BjoRENv9.d.mts → compiler-manifest-DW1flrHk.d.ts} +0 -9
- package/dist/index.d.mts +9 -38
- package/dist/index.d.ts +9 -38
- package/dist/index.js +22 -11
- package/dist/index.mjs +22 -11
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/package.json +1 -1
- package/dist/bundling-sources/shared_libs/play-data-plane/cell-policy.ts +0 -76
- package/dist/bundling-sources/shared_libs/play-runtime/progress-emitter.ts +0 -197
- package/dist/bundling-sources/shared_libs/play-runtime/waterfall-replay.ts +0 -79
|
@@ -1498,6 +1498,7 @@ async function restartWorkflowAfterPlatformReset(input: {
|
|
|
1498
1498
|
|
|
1499
1499
|
async function mintChildWorkflowExecutorToken(input: {
|
|
1500
1500
|
env: CoordinatorEnv;
|
|
1501
|
+
baseUrl: string;
|
|
1501
1502
|
parentExecutorToken: string;
|
|
1502
1503
|
parentRunId: string;
|
|
1503
1504
|
parentPlayName: string;
|
|
@@ -1507,6 +1508,7 @@ async function mintChildWorkflowExecutorToken(input: {
|
|
|
1507
1508
|
}): Promise<string> {
|
|
1508
1509
|
const response = await input.env.HARNESS.runtimeApiCall({
|
|
1509
1510
|
executorToken: input.parentExecutorToken,
|
|
1511
|
+
baseUrl: input.baseUrl,
|
|
1510
1512
|
path: '/api/v2/plays/internal/child-executor-token',
|
|
1511
1513
|
headers: { 'x-deepline-request-id': crypto.randomUUID() },
|
|
1512
1514
|
timeoutMs: 15_000,
|
|
@@ -1608,6 +1610,7 @@ async function reencryptChildDbSessionForExecutor(input: {
|
|
|
1608
1610
|
|
|
1609
1611
|
async function createChildRuntimeDbSession(input: {
|
|
1610
1612
|
env: CoordinatorEnv;
|
|
1613
|
+
baseUrl: string;
|
|
1611
1614
|
childExecutorToken: string;
|
|
1612
1615
|
childPlayName: string;
|
|
1613
1616
|
requirement: RuntimeDbSessionRequirement;
|
|
@@ -1617,6 +1620,7 @@ async function createChildRuntimeDbSession(input: {
|
|
|
1617
1620
|
const decryptionKey = await generateDbSessionPostgresUrlDecryptionKey();
|
|
1618
1621
|
const response = await input.env.HARNESS.runtimeApiCall({
|
|
1619
1622
|
executorToken: input.childExecutorToken,
|
|
1623
|
+
baseUrl: input.baseUrl,
|
|
1620
1624
|
path: '/api/v2/plays/internal/runtime',
|
|
1621
1625
|
headers: { 'x-deepline-request-id': crypto.randomUUID() },
|
|
1622
1626
|
timeoutMs: 15_000,
|
|
@@ -1672,6 +1676,7 @@ async function createChildRuntimeDbSession(input: {
|
|
|
1672
1676
|
|
|
1673
1677
|
async function preloadChildRuntimeDbSessions(input: {
|
|
1674
1678
|
env: CoordinatorEnv;
|
|
1679
|
+
baseUrl: string;
|
|
1675
1680
|
childExecutorToken: string;
|
|
1676
1681
|
childRunId: string;
|
|
1677
1682
|
childPlayName: string;
|
|
@@ -1691,6 +1696,7 @@ async function preloadChildRuntimeDbSessions(input: {
|
|
|
1691
1696
|
...(requirement.limits ? { limits: requirement.limits } : {}),
|
|
1692
1697
|
session: await createChildRuntimeDbSession({
|
|
1693
1698
|
env: input.env,
|
|
1699
|
+
baseUrl: input.baseUrl,
|
|
1694
1700
|
childExecutorToken: input.childExecutorToken,
|
|
1695
1701
|
childPlayName: input.childPlayName,
|
|
1696
1702
|
requirement,
|
|
@@ -1711,6 +1717,7 @@ async function preloadChildRuntimeDbSessions(input: {
|
|
|
1711
1717
|
|
|
1712
1718
|
async function registerInlineChildRunWithRuntime(input: {
|
|
1713
1719
|
env: CoordinatorEnv;
|
|
1720
|
+
baseUrl: string;
|
|
1714
1721
|
childExecutorToken: string;
|
|
1715
1722
|
childRunId: string;
|
|
1716
1723
|
childPlayName: string;
|
|
@@ -1719,6 +1726,7 @@ async function registerInlineChildRunWithRuntime(input: {
|
|
|
1719
1726
|
}): Promise<void> {
|
|
1720
1727
|
const response = await input.env.HARNESS.runtimeApiCall({
|
|
1721
1728
|
executorToken: input.childExecutorToken,
|
|
1729
|
+
baseUrl: input.baseUrl,
|
|
1722
1730
|
path: '/api/v2/plays/internal/runtime',
|
|
1723
1731
|
headers: { 'x-deepline-request-id': crypto.randomUUID() },
|
|
1724
1732
|
timeoutMs: 15_000,
|
|
@@ -1761,6 +1769,7 @@ type CoordinatorRuntimeApiTiming = {
|
|
|
1761
1769
|
|
|
1762
1770
|
async function callRuntimeApiFromCoordinator(input: {
|
|
1763
1771
|
env: CoordinatorEnv;
|
|
1772
|
+
baseUrl: string;
|
|
1764
1773
|
executorToken: string;
|
|
1765
1774
|
body: unknown;
|
|
1766
1775
|
}): Promise<{
|
|
@@ -1792,6 +1801,7 @@ async function callRuntimeApiFromCoordinator(input: {
|
|
|
1792
1801
|
const fetchStartedAt = Date.now();
|
|
1793
1802
|
const response = await input.env.HARNESS.runtimeApiCall({
|
|
1794
1803
|
executorToken: input.executorToken,
|
|
1804
|
+
baseUrl: input.baseUrl,
|
|
1795
1805
|
path: '/api/v2/plays/internal/runtime',
|
|
1796
1806
|
body,
|
|
1797
1807
|
headers: {
|
|
@@ -1815,6 +1825,7 @@ async function callRuntimeApiFromCoordinator(input: {
|
|
|
1815
1825
|
|
|
1816
1826
|
async function prepareInlineChildRunWithRuntime(input: {
|
|
1817
1827
|
env: CoordinatorEnv;
|
|
1828
|
+
baseUrl: string;
|
|
1818
1829
|
parentExecutorToken: string;
|
|
1819
1830
|
parentRunId: string;
|
|
1820
1831
|
parentPlayName: string;
|
|
@@ -1831,6 +1842,7 @@ async function prepareInlineChildRunWithRuntime(input: {
|
|
|
1831
1842
|
}> {
|
|
1832
1843
|
const response = await callRuntimeApiFromCoordinator({
|
|
1833
1844
|
env: input.env,
|
|
1845
|
+
baseUrl: input.baseUrl,
|
|
1834
1846
|
executorToken: input.parentExecutorToken,
|
|
1835
1847
|
body: {
|
|
1836
1848
|
action: 'prepare_inline_child_run',
|
|
@@ -2295,6 +2307,7 @@ async function executeChildInline(input: {
|
|
|
2295
2307
|
const { childToken, preloadedDbSessions, prepareTimings, transportTimings } =
|
|
2296
2308
|
await prepareInlineChildRunWithRuntime({
|
|
2297
2309
|
env: input.env,
|
|
2310
|
+
baseUrl: resolveRuntimeBaseUrl(input.env, input.body),
|
|
2298
2311
|
parentExecutorToken,
|
|
2299
2312
|
parentRunId: input.parentRunId,
|
|
2300
2313
|
parentPlayName,
|
|
@@ -2564,6 +2577,7 @@ async function submitChildWorkflowThroughCoordinator(input: {
|
|
|
2564
2577
|
const tokenStartedAt = Date.now();
|
|
2565
2578
|
const childToken = await mintChildWorkflowExecutorToken({
|
|
2566
2579
|
env: input.env,
|
|
2580
|
+
baseUrl,
|
|
2567
2581
|
parentExecutorToken,
|
|
2568
2582
|
parentRunId: input.parentRunId,
|
|
2569
2583
|
parentPlayName:
|
|
@@ -2583,6 +2597,7 @@ async function submitChildWorkflowThroughCoordinator(input: {
|
|
|
2583
2597
|
const dbSessionStartedAt = Date.now();
|
|
2584
2598
|
const preloadedDbSessions = await preloadChildRuntimeDbSessions({
|
|
2585
2599
|
env: input.env,
|
|
2600
|
+
baseUrl,
|
|
2586
2601
|
childExecutorToken: childToken,
|
|
2587
2602
|
childRunId,
|
|
2588
2603
|
childPlayName,
|