@agent-native/core 0.78.4 → 0.78.5
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/corpus/core/CHANGELOG.md +6 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/production-agent.ts +18 -3
- package/corpus/core/src/agent/run-store.ts +26 -5
- package/corpus/core/src/server/agent-chat-plugin.ts +10 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +15 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-store.d.ts +1 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +24 -5
- package/dist/agent/run-store.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +10 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +2 -2
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import { resolveEngine, createAnthropicEngine, getStoredModelForEngine, normaliz
|
|
|
12
12
|
import { createProductionAgentHandler, actionsToEngineTools, getActiveRunForThreadAsync, abortRun, subscribeToRun, } from "../agent/production-agent.js";
|
|
13
13
|
import { runAgentLoopDirectWithSoftTimeout } from "../agent/run-loop-with-resume.js";
|
|
14
14
|
import { callerOwnsRun, callerOwnsThread } from "../agent/run-ownership.js";
|
|
15
|
+
import { readBackgroundRunClaim } from "../agent/run-store.js";
|
|
15
16
|
import { buildRuntimeContextPrompt } from "../agent/runtime-context.js";
|
|
16
17
|
import { buildAssistantMessage, buildUserMessage, extractThreadMeta, foldAssistantTurn, mergeThreadDataForClientSave, normalizeThreadRepository, upsertUserMessage, } from "../agent/thread-data-builder.js";
|
|
17
18
|
import { attachToolSearch } from "../agent/tool-search.js";
|
|
@@ -5563,6 +5564,14 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
|
|
|
5563
5564
|
lastProgressAt: null,
|
|
5564
5565
|
};
|
|
5565
5566
|
}
|
|
5567
|
+
// The durable worker writes its pre-claim progression to a separate
|
|
5568
|
+
// `worker_stage` column that the foreground inline-recovery's
|
|
5569
|
+
// `setup_timings` write never overwrites — so the worker's last
|
|
5570
|
+
// reached stage (where it stalled before claiming) survives even
|
|
5571
|
+
// after the foreground takes over `diag_stage`. Best-effort.
|
|
5572
|
+
const workerClaim = run.runId
|
|
5573
|
+
? await readBackgroundRunClaim(run.runId).catch(() => null)
|
|
5574
|
+
: null;
|
|
5566
5575
|
return {
|
|
5567
5576
|
active: true,
|
|
5568
5577
|
runId: run.runId,
|
|
@@ -5579,6 +5588,7 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
|
|
|
5579
5588
|
// `/runs/active?threadId=...` and inspect `diagStage`.
|
|
5580
5589
|
dispatchMode: run.dispatchMode ?? null,
|
|
5581
5590
|
diagStage: run.diagStage ?? null,
|
|
5591
|
+
workerStage: workerClaim?.workerStage ?? null,
|
|
5582
5592
|
// Server clock so the client computes "stuck" elapsed time
|
|
5583
5593
|
// server-relative, immune to client clock skew.
|
|
5584
5594
|
serverNow: Date.now(),
|