deepline 0.1.109 → 0.1.110
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/cli/index.js +2226 -1271
- package/dist/cli/index.mjs +2303 -1355
- package/dist/index.d.mts +21 -14
- package/dist/index.d.ts +21 -14
- package/dist/index.js +97 -23
- package/dist/index.mjs +97 -23
- package/dist/repo/apps/play-runner-workers/src/coordinator-entry.ts +42 -20
- package/dist/repo/apps/play-runner-workers/src/entry.ts +135 -45
- package/dist/repo/apps/play-runner-workers/src/runtime/receipts.ts +18 -27
- package/dist/repo/apps/play-runner-workers/src/workflow-instance-create.ts +44 -0
- package/dist/repo/apps/play-runner-workers/src/workflow-retry.ts +7 -11
- package/dist/repo/sdk/src/client.ts +35 -12
- package/dist/repo/sdk/src/errors.ts +2 -2
- package/dist/repo/sdk/src/http.ts +87 -7
- package/dist/repo/sdk/src/play.ts +1 -1
- package/dist/repo/sdk/src/plays/bundle-play-file.ts +5 -1
- package/dist/repo/sdk/src/release.ts +13 -10
- package/dist/repo/sdk/src/tool-output.ts +2 -2
- package/dist/repo/sdk/src/types.ts +9 -6
- package/dist/repo/shared_libs/play-runtime/fullenrich-batching.ts +229 -0
- package/dist/repo/shared_libs/play-runtime/governor/policy.ts +1 -1
- package/dist/repo/shared_libs/play-runtime/play-runtime-batching-registry.ts +20 -0
- package/dist/repo/shared_libs/play-runtime/run-failure.ts +20 -12
- package/dist/repo/shared_libs/play-runtime/run-ledger.ts +107 -56
- package/dist/repo/shared_libs/play-runtime/scheduler-backend.ts +4 -2
- package/dist/repo/shared_libs/play-runtime/secret-redaction.ts +15 -0
- package/dist/repo/shared_libs/play-runtime/work-receipts.ts +1 -0
- package/dist/repo/shared_libs/plays/bundling/index.ts +69 -11
- package/dist/repo/shared_libs/plays/static-pipeline.ts +1 -3
- package/dist/repo/shared_libs/security/outbound-url-policy.ts +238 -0
- package/dist/repo/shared_libs/security/safe-fetch.ts +118 -0
- package/dist/viewer/viewer.css +617 -0
- package/dist/viewer/viewer.js +1496 -0
- package/package.json +5 -1
package/dist/index.mjs
CHANGED
|
@@ -196,10 +196,10 @@ var SDK_RELEASE = {
|
|
|
196
196
|
// skill on the sdk sync surface, and the people-search-to-email prebuilt.
|
|
197
197
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
198
198
|
// the SDK enrich generator's one-second stale policy.
|
|
199
|
-
version: "0.1.
|
|
199
|
+
version: "0.1.110",
|
|
200
200
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
201
201
|
supportPolicy: {
|
|
202
|
-
latest: "0.1.
|
|
202
|
+
latest: "0.1.110",
|
|
203
203
|
minimumSupported: "0.1.53",
|
|
204
204
|
deprecatedBelow: "0.1.53",
|
|
205
205
|
commandMinimumSupported: [
|
|
@@ -226,6 +226,7 @@ var SYNTHETIC_RUN_HEADER = "x-deepline-synthetic-run";
|
|
|
226
226
|
|
|
227
227
|
// src/http.ts
|
|
228
228
|
var MAX_DIAGNOSTIC_HEADER_LENGTH = 120;
|
|
229
|
+
var COWORK_NETWORK_HINT = "Claude Cowork appears to be running Deepline in a network-restricted sandbox. In Claude Desktop, open Settings > Capabilities, turn on Allow network egress, and set Domain allowlist to All domains for the Cowork session.";
|
|
229
230
|
var HttpClient = class {
|
|
230
231
|
constructor(config) {
|
|
231
232
|
this.config = config;
|
|
@@ -261,6 +262,7 @@ var HttpClient = class {
|
|
|
261
262
|
"User-Agent": `deepline-ts-sdk/${SDK_VERSION}`,
|
|
262
263
|
"X-Deepline-Client-Family": "sdk",
|
|
263
264
|
"X-Deepline-CLI-Family": "sdk",
|
|
265
|
+
"X-Deepline-Agent-Runtime": detectAgentRuntime(),
|
|
264
266
|
"X-Deepline-CLI-Version": SDK_VERSION,
|
|
265
267
|
"X-Deepline-SDK-Version": SDK_VERSION,
|
|
266
268
|
"X-Deepline-API-Contract": SDK_API_CONTRACT,
|
|
@@ -363,12 +365,13 @@ var HttpClient = class {
|
|
|
363
365
|
parsed = body;
|
|
364
366
|
}
|
|
365
367
|
if (!response.ok) {
|
|
368
|
+
const retryableApiError = options?.retryApiErrors === true && isRetryableApiErrorResponse(response.status);
|
|
366
369
|
const htmlError = detectHtmlErrorBody(
|
|
367
370
|
body,
|
|
368
371
|
response.headers.get("content-type")
|
|
369
372
|
);
|
|
370
373
|
if (htmlError) {
|
|
371
|
-
|
|
374
|
+
lastError = new DeeplineError(
|
|
372
375
|
htmlError.message(response.status),
|
|
373
376
|
response.status,
|
|
374
377
|
"API_ERROR",
|
|
@@ -378,12 +381,23 @@ var HttpClient = class {
|
|
|
378
381
|
...htmlError.workerThrewException ? { workerThrewException: true } : {}
|
|
379
382
|
}
|
|
380
383
|
);
|
|
384
|
+
if (retryableApiError && attempt < this.config.maxRetries) {
|
|
385
|
+
retryAfterDelayMs = parseOptionalRetryAfter(response);
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
throw lastError;
|
|
381
389
|
}
|
|
382
390
|
const errorValue = typeof parsed === "object" && parsed && "error" in parsed ? parsed.error : void 0;
|
|
383
391
|
const msg = typeof errorValue === "string" ? errorValue : errorValue && typeof errorValue === "object" && "message" in errorValue && typeof errorValue.message === "string" ? errorValue.message : typeof parsed === "object" && parsed && "message" in parsed && typeof parsed.message === "string" ? parsed.message : `HTTP ${response.status}`;
|
|
384
|
-
|
|
392
|
+
const apiErrorCode = errorValue && typeof errorValue === "object" && typeof errorValue.code === "string" ? errorValue.code : "API_ERROR";
|
|
393
|
+
lastError = new DeeplineError(msg, response.status, apiErrorCode, {
|
|
385
394
|
response: parsed
|
|
386
395
|
});
|
|
396
|
+
if (retryableApiError && attempt < this.config.maxRetries) {
|
|
397
|
+
retryAfterDelayMs = parseOptionalRetryAfter(response);
|
|
398
|
+
break;
|
|
399
|
+
}
|
|
400
|
+
throw lastError;
|
|
387
401
|
}
|
|
388
402
|
return parsed;
|
|
389
403
|
} catch (error) {
|
|
@@ -404,7 +418,7 @@ var HttpClient = class {
|
|
|
404
418
|
throw lastError;
|
|
405
419
|
}
|
|
406
420
|
const errorMessage = lastError?.message ? `Unable to connect to ${baseUrl}. ${lastError.message}` : `Unable to connect to ${baseUrl}. Is the computer able to access the url?`;
|
|
407
|
-
throw new DeeplineError(errorMessage);
|
|
421
|
+
throw new DeeplineError(withCoworkNetworkHint(errorMessage));
|
|
408
422
|
}
|
|
409
423
|
/**
|
|
410
424
|
* Send a GET request.
|
|
@@ -476,7 +490,9 @@ var HttpClient = class {
|
|
|
476
490
|
}
|
|
477
491
|
}
|
|
478
492
|
throw new DeeplineError(
|
|
479
|
-
|
|
493
|
+
withCoworkNetworkHint(
|
|
494
|
+
lastError?.message ? `Unable to stream from ${this.config.baseUrl}. ${lastError.message}` : `Unable to stream from ${this.config.baseUrl}.`
|
|
495
|
+
)
|
|
480
496
|
);
|
|
481
497
|
}
|
|
482
498
|
/**
|
|
@@ -486,11 +502,12 @@ var HttpClient = class {
|
|
|
486
502
|
* @param path - API path
|
|
487
503
|
* @param body - Request body (will be JSON-serialized)
|
|
488
504
|
*/
|
|
489
|
-
async post(path, body, headers) {
|
|
505
|
+
async post(path, body, headers, options) {
|
|
490
506
|
return this.request(path, {
|
|
491
507
|
method: "POST",
|
|
492
508
|
body,
|
|
493
|
-
headers
|
|
509
|
+
headers,
|
|
510
|
+
...options
|
|
494
511
|
});
|
|
495
512
|
}
|
|
496
513
|
async postFormData(path, formData, headers) {
|
|
@@ -531,6 +548,9 @@ function parseResponseBody(body) {
|
|
|
531
548
|
return body;
|
|
532
549
|
}
|
|
533
550
|
}
|
|
551
|
+
function isRetryableApiErrorResponse(status) {
|
|
552
|
+
return status === 408 || status === 425 || status >= 500 && status < 600;
|
|
553
|
+
}
|
|
534
554
|
function detectHtmlErrorBody(body, contentType) {
|
|
535
555
|
const trimmed = body.trim();
|
|
536
556
|
const lower = trimmed.toLowerCase();
|
|
@@ -570,6 +590,9 @@ function apiErrorMessage(parsed, status) {
|
|
|
570
590
|
return `HTTP ${status}`;
|
|
571
591
|
}
|
|
572
592
|
function parseRetryAfter(response) {
|
|
593
|
+
return parseOptionalRetryAfter(response) ?? 5e3;
|
|
594
|
+
}
|
|
595
|
+
function parseOptionalRetryAfter(response) {
|
|
573
596
|
const header = response.headers.get("retry-after");
|
|
574
597
|
if (header) {
|
|
575
598
|
const seconds = Number(header);
|
|
@@ -577,7 +600,7 @@ function parseRetryAfter(response) {
|
|
|
577
600
|
return seconds * 1e3;
|
|
578
601
|
}
|
|
579
602
|
}
|
|
580
|
-
return
|
|
603
|
+
return null;
|
|
581
604
|
}
|
|
582
605
|
function buildCandidateUrls(url) {
|
|
583
606
|
try {
|
|
@@ -634,6 +657,39 @@ function decodeSseFrame(frame) {
|
|
|
634
657
|
function sleep(ms) {
|
|
635
658
|
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
636
659
|
}
|
|
660
|
+
function isTruthyEnv(name) {
|
|
661
|
+
const normalized = process.env[name]?.trim().toLowerCase();
|
|
662
|
+
return ["1", "true", "yes", "on"].includes(normalized ?? "");
|
|
663
|
+
}
|
|
664
|
+
function isCoworkLikeSandbox() {
|
|
665
|
+
const pluginMode = isTruthyEnv("DEEPLINE_PLUGIN_MODE");
|
|
666
|
+
const claudeRemote = isTruthyEnv("CLAUDE_CODE_REMOTE");
|
|
667
|
+
const projectDir = Boolean(process.env.CLAUDE_PROJECT_DIR?.trim());
|
|
668
|
+
const pluginRoot = Boolean(process.env.DEEPLINE_PLUGIN_ROOT?.trim());
|
|
669
|
+
const home = process.env.HOME?.trim() ?? "";
|
|
670
|
+
const sessionHome = home.startsWith("/sessions/");
|
|
671
|
+
return (pluginMode || pluginRoot) && (claudeRemote || projectDir || sessionHome);
|
|
672
|
+
}
|
|
673
|
+
function detectAgentRuntime() {
|
|
674
|
+
if (process.env.CODEX_THREAD_ID?.trim()) return "codex";
|
|
675
|
+
if (isCoworkLikeSandbox()) return "claude_cowork";
|
|
676
|
+
if (process.env.CLAUDECODE?.trim() === "1") return "claude_code";
|
|
677
|
+
if (process.env.CLINE_ACTIVE?.trim().toLowerCase() === "true") return "cline";
|
|
678
|
+
if (process.env.CURSOR_TRACE_ID?.trim() || process.env.CURSOR_AGENT?.trim()) {
|
|
679
|
+
return "cursor";
|
|
680
|
+
}
|
|
681
|
+
if (process.env.WINDSURF?.trim() || process.env.CASCADE?.trim()) {
|
|
682
|
+
return "windsurf";
|
|
683
|
+
}
|
|
684
|
+
return "unknown";
|
|
685
|
+
}
|
|
686
|
+
function withCoworkNetworkHint(message) {
|
|
687
|
+
if (!isCoworkLikeSandbox() || message.includes(COWORK_NETWORK_HINT)) {
|
|
688
|
+
return message;
|
|
689
|
+
}
|
|
690
|
+
return `${message}
|
|
691
|
+
${COWORK_NETWORK_HINT}`;
|
|
692
|
+
}
|
|
637
693
|
|
|
638
694
|
// src/stream-reconnect.ts
|
|
639
695
|
var STREAM_RECONNECT_BASE_DELAY_MS = 500;
|
|
@@ -1910,12 +1966,12 @@ var DeeplineClient = class {
|
|
|
1910
1966
|
* Returns everything from {@link ToolDefinition} plus pricing info, sample
|
|
1911
1967
|
* inputs/outputs, failure modes, and cost estimates.
|
|
1912
1968
|
*
|
|
1913
|
-
* @param toolId - Tool identifier (e.g. `"
|
|
1969
|
+
* @param toolId - Tool identifier (e.g. `"dropleads_search_people"`)
|
|
1914
1970
|
* @returns Full tool metadata
|
|
1915
1971
|
*
|
|
1916
1972
|
* @example
|
|
1917
1973
|
* ```typescript
|
|
1918
|
-
* const meta = await client.getTool('
|
|
1974
|
+
* const meta = await client.getTool('dropleads_search_people');
|
|
1919
1975
|
* console.log(`Cost: ${meta.estimatedCreditsRange} credits`);
|
|
1920
1976
|
* console.log(`Input schema:`, meta.inputSchema);
|
|
1921
1977
|
* ```
|
|
@@ -1947,7 +2003,8 @@ var DeeplineClient = class {
|
|
|
1947
2003
|
return this.http.post(
|
|
1948
2004
|
`/api/v2/integrations/${encodeURIComponent(toolId)}/execute`,
|
|
1949
2005
|
{ payload: input },
|
|
1950
|
-
headers
|
|
2006
|
+
headers,
|
|
2007
|
+
{ forbiddenAsApiError: true }
|
|
1951
2008
|
);
|
|
1952
2009
|
}
|
|
1953
2010
|
/**
|
|
@@ -2029,7 +2086,7 @@ var DeeplineClient = class {
|
|
|
2029
2086
|
...request.force ? { force: true } : {},
|
|
2030
2087
|
...typeof request.waitForCompletionMs === "number" ? { waitForCompletionMs: request.waitForCompletionMs } : {},
|
|
2031
2088
|
// Profile selection is the API's job, not the CLI's. The server
|
|
2032
|
-
//
|
|
2089
|
+
// defaults to workers_edge; tests and runtime probes that want a
|
|
2033
2090
|
// different profile pass `request.profile` explicitly.
|
|
2034
2091
|
...request.profile ? { profile: request.profile } : {}
|
|
2035
2092
|
}
|
|
@@ -2094,10 +2151,15 @@ var DeeplineClient = class {
|
|
|
2094
2151
|
sourceFiles: input.sourceFiles,
|
|
2095
2152
|
artifact: input.artifact
|
|
2096
2153
|
});
|
|
2097
|
-
return this.http.post(
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2154
|
+
return this.http.post(
|
|
2155
|
+
"/api/v2/plays/artifacts",
|
|
2156
|
+
{
|
|
2157
|
+
...input,
|
|
2158
|
+
compilerManifest
|
|
2159
|
+
},
|
|
2160
|
+
void 0,
|
|
2161
|
+
{ forbiddenAsApiError: true, retryApiErrors: true }
|
|
2162
|
+
);
|
|
2101
2163
|
}
|
|
2102
2164
|
/**
|
|
2103
2165
|
* Register multiple bundled play artifacts in one request.
|
|
@@ -2107,7 +2169,12 @@ var DeeplineClient = class {
|
|
|
2107
2169
|
*/
|
|
2108
2170
|
async registerPlayArtifacts(artifacts) {
|
|
2109
2171
|
if (artifacts.length === 0) {
|
|
2110
|
-
return this.http.post(
|
|
2172
|
+
return this.http.post(
|
|
2173
|
+
"/api/v2/plays/artifacts",
|
|
2174
|
+
{ artifacts },
|
|
2175
|
+
void 0,
|
|
2176
|
+
{ forbiddenAsApiError: true, retryApiErrors: true }
|
|
2177
|
+
);
|
|
2111
2178
|
}
|
|
2112
2179
|
const compiledArtifacts = await mapWithConcurrency(
|
|
2113
2180
|
artifacts,
|
|
@@ -2125,9 +2192,14 @@ var DeeplineClient = class {
|
|
|
2125
2192
|
const responses = [];
|
|
2126
2193
|
for (const chunk of chunkRegisterPlayArtifacts(compiledArtifacts)) {
|
|
2127
2194
|
responses.push(
|
|
2128
|
-
await this.http.post(
|
|
2129
|
-
artifacts
|
|
2130
|
-
|
|
2195
|
+
await this.http.post(
|
|
2196
|
+
"/api/v2/plays/artifacts",
|
|
2197
|
+
{
|
|
2198
|
+
artifacts: chunk
|
|
2199
|
+
},
|
|
2200
|
+
void 0,
|
|
2201
|
+
{ forbiddenAsApiError: true, retryApiErrors: true }
|
|
2202
|
+
)
|
|
2131
2203
|
);
|
|
2132
2204
|
}
|
|
2133
2205
|
return {
|
|
@@ -2932,7 +3004,9 @@ var DeeplineClient = class {
|
|
|
2932
3004
|
const encodedName = encodeURIComponent(name);
|
|
2933
3005
|
return this.http.post(
|
|
2934
3006
|
`/api/v2/plays/${encodedName}/live`,
|
|
2935
|
-
request
|
|
3007
|
+
request,
|
|
3008
|
+
void 0,
|
|
3009
|
+
{ forbiddenAsApiError: true }
|
|
2936
3010
|
);
|
|
2937
3011
|
}
|
|
2938
3012
|
/**
|
|
@@ -4174,7 +4248,7 @@ var DeeplineContext = class {
|
|
|
4174
4248
|
* @example
|
|
4175
4249
|
* ```typescript
|
|
4176
4250
|
* const tools = await deepline.tools.list();
|
|
4177
|
-
* const meta = await deepline.tools.get('
|
|
4251
|
+
* const meta = await deepline.tools.get('dropleads_search_people');
|
|
4178
4252
|
* const companyLookup = await deepline.tools.execute('test_company_search', { domain: 'stripe.com' });
|
|
4179
4253
|
* const company = companyLookup.toolResponse.raw;
|
|
4180
4254
|
* ```
|
|
@@ -44,6 +44,7 @@ import type {
|
|
|
44
44
|
PlayRuntimeManifest,
|
|
45
45
|
PlayRuntimeManifestMap,
|
|
46
46
|
} from '../../../shared_libs/plays/compiler-manifest';
|
|
47
|
+
import { normalizePlayRunFailure } from '../../../shared_libs/play-runtime/run-failure';
|
|
47
48
|
import type { PlayRunLedgerEvent } from '../../../shared_libs/play-runtime/run-ledger';
|
|
48
49
|
import {
|
|
49
50
|
COORDINATOR_INTERNAL_TOKEN_HEADER,
|
|
@@ -61,6 +62,7 @@ import {
|
|
|
61
62
|
workflowRetryParamsStorageKey,
|
|
62
63
|
type WorkflowRetryParamsRef,
|
|
63
64
|
} from './workflow-retry-state';
|
|
65
|
+
import { createOrAttachWorkflowInstance } from './workflow-instance-create';
|
|
64
66
|
import { sanitizeLiveLogLines } from './runtime/live-progress';
|
|
65
67
|
|
|
66
68
|
export { DynamicWorkflowBinding };
|
|
@@ -2964,17 +2966,33 @@ export class DynamicWorkflow extends WorkflowEntrypoint<
|
|
|
2964
2966
|
}
|
|
2965
2967
|
).run(innerEvent, innerStep);
|
|
2966
2968
|
const output = isRecord(result) ? result : null;
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2969
|
+
try {
|
|
2970
|
+
await writeCoordinatorTerminalState(env, {
|
|
2971
|
+
runId: runIdForTrace,
|
|
2972
|
+
status: 'completed',
|
|
2973
|
+
result: output?.result ?? result,
|
|
2974
|
+
totalRows: output?.totalRows ?? output?.outputRows ?? null,
|
|
2975
|
+
durationMs: output?.durationMs ?? null,
|
|
2976
|
+
playName:
|
|
2977
|
+
typeof output?.playName === 'string'
|
|
2978
|
+
? output.playName
|
|
2979
|
+
: null,
|
|
2980
|
+
liveLogs: sanitizeLiveLogLines(output?.liveLogs),
|
|
2981
|
+
liveNodeProgress: output?.liveNodeProgress ?? null,
|
|
2982
|
+
});
|
|
2983
|
+
} catch (terminalError) {
|
|
2984
|
+
console.warn(
|
|
2985
|
+
'[coordinator] completed terminal cache write failed; preserving completed run',
|
|
2986
|
+
{
|
|
2987
|
+
graphHash,
|
|
2988
|
+
runId: runIdForTrace,
|
|
2989
|
+
message:
|
|
2990
|
+
terminalError instanceof Error
|
|
2991
|
+
? terminalError.message
|
|
2992
|
+
: String(terminalError),
|
|
2993
|
+
},
|
|
2994
|
+
);
|
|
2995
|
+
}
|
|
2978
2996
|
trace({
|
|
2979
2997
|
runId: runIdForTrace,
|
|
2980
2998
|
phase: 'coordinator.runner_run',
|
|
@@ -2983,6 +3001,7 @@ export class DynamicWorkflow extends WorkflowEntrypoint<
|
|
|
2983
3001
|
});
|
|
2984
3002
|
return result;
|
|
2985
3003
|
} catch (innerError) {
|
|
3004
|
+
const failure = normalizePlayRunFailure(innerError);
|
|
2986
3005
|
console.error('[coordinator] DynamicWorkflow runner.run threw', {
|
|
2987
3006
|
graphHash,
|
|
2988
3007
|
message:
|
|
@@ -3015,10 +3034,7 @@ export class DynamicWorkflow extends WorkflowEntrypoint<
|
|
|
3015
3034
|
await writeCoordinatorTerminalState(env, {
|
|
3016
3035
|
runId: runIdForTrace,
|
|
3017
3036
|
status: 'failed',
|
|
3018
|
-
error:
|
|
3019
|
-
innerError instanceof Error
|
|
3020
|
-
? innerError.message
|
|
3021
|
-
: String(innerError),
|
|
3037
|
+
error: failure.message,
|
|
3022
3038
|
}).catch(() => undefined);
|
|
3023
3039
|
throw innerError;
|
|
3024
3040
|
}
|
|
@@ -3539,17 +3555,22 @@ async function handleWorkflowRoute(input: {
|
|
|
3539
3555
|
try {
|
|
3540
3556
|
const dispatchStartedAt = Date.now();
|
|
3541
3557
|
const createStartedAt = Date.now();
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3558
|
+
const createResult = await createOrAttachWorkflowInstance({
|
|
3559
|
+
create: () =>
|
|
3560
|
+
createDynamicWorkflowInstance({
|
|
3561
|
+
env,
|
|
3562
|
+
id: defaultInstanceId,
|
|
3563
|
+
params: workflowParams,
|
|
3564
|
+
}),
|
|
3565
|
+
getExisting: () => env.PLAY_WORKFLOW.get(defaultInstanceId),
|
|
3546
3566
|
});
|
|
3567
|
+
instance = createResult.instance;
|
|
3547
3568
|
const workflowCreatedAt = Date.now();
|
|
3548
3569
|
recordSubmitTiming({
|
|
3549
3570
|
phase: 'coordinator.workflow_create',
|
|
3550
3571
|
ms: workflowCreatedAt - createStartedAt,
|
|
3551
3572
|
graphHash: params.graphHash ?? null,
|
|
3552
|
-
extra: { instanceId: instance.id },
|
|
3573
|
+
extra: { instanceId: instance.id, startMode: createResult.startMode },
|
|
3553
3574
|
});
|
|
3554
3575
|
const instanceIdRecord = recordWorkflowInstanceId({
|
|
3555
3576
|
env,
|
|
@@ -3569,6 +3590,7 @@ async function handleWorkflowRoute(input: {
|
|
|
3569
3590
|
graphHash: params.graphHash ?? null,
|
|
3570
3591
|
extra: {
|
|
3571
3592
|
startMode: 'direct_workflow_create',
|
|
3593
|
+
workflowCreateMode: createResult.startMode,
|
|
3572
3594
|
instanceIdRecord: 'waitUntil',
|
|
3573
3595
|
},
|
|
3574
3596
|
});
|