@tea-agent/loop-agent 0.33.5 → 0.33.6
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/CHANGELOG.md +33 -0
- package/dist/application/task-lifecycle/advance.js +254 -4
- package/dist/application/task-lifecycle/gates.js +50 -0
- package/dist/application/task-lifecycle/observe.js +11 -2
- package/dist/commands/init-upgrade.js +32 -1
- package/dist/commands/init.js +94 -3
- package/dist/executors/shell-write-guard.js +26 -8
- package/dist/shared/operator/capabilities.js +72 -42
- package/dist/shared/resilient-git.js +133 -0
- package/dist/task/source-prepare/artifact-meta.js +137 -0
- package/dist/task/source-prepare/index.js +2 -0
- package/dist/task/source-prepare/parse-intent.js +58 -10
- package/dist/task/source-prepare/prepare.js +180 -16
- package/dist/task/source-prepare/reference-integrity.js +18 -2
- package/dist/task/source-prepare/semantic-intake.js +404 -0
- package/dist/worker/console/app-data.js +2 -0
- package/dist/worker/console/chat/chat-event-store.js +190 -25
- package/dist/worker/console/chat/pi-console-config.js +250 -32
- package/dist/worker/console/chat/pi-runtime.js +625 -71
- package/dist/worker/console/chat/resource-loader.js +5 -4
- package/dist/worker/console/chat/routes.js +324 -146
- package/dist/worker/console/chat/runtime-context.js +48 -12
- package/dist/worker/console/chat/runtime-selection.js +59 -0
- package/dist/worker/console/chat/shortcuts.js +1 -0
- package/dist/worker/console/chat/tool-adapter.js +9 -3
- package/dist/worker/console/chat/tools.js +5 -1
- package/dist/worker/console/dag-execution-receipt.js +380 -0
- package/dist/worker/console/operator-actions.js +559 -68
- package/dist/worker/console/server.js +8 -15
- package/dist/worker/console/static/assets/index-BUOLppPr.js +28 -0
- package/dist/worker/console/static/assets/index-C1KzazY5.css +1 -0
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +45 -8
- package/dist/worker/console/static-src/operator-chat/refs.js +9 -0
- package/dist/worker/console/static-src/operator-chat/runtime-snapshot-store.js +257 -0
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +16 -0
- package/dist/worker/console/static-src/operator-chat/useChatStream.js +210 -184
- package/dist/worker/console/static-src/operator-chat/useChatThread.js +49 -5
- package/dist/worker/console/static-src/operator-chat/useComposer.js +17 -0
- package/dist/worker/console/static-src/operator-chat/useRuntimeControls.js +225 -74
- package/dist/worker/console/static-src/operator-chat/useRuntimeSnapshot.js +196 -0
- package/dist/worker/delivery/final-verification.js +13 -5
- package/dist/worker/delivery/package.js +31 -19
- package/dist/worker/delivery/verification-bundle.js +6 -4
- package/dist/worker/observe/static/operator-chrome.css +5 -2
- package/dist/worker/observe/static/operator-chrome.js +6 -1
- package/dist/worker/observe/static/styles.css +39 -9
- package/dist/workflows/dag/frontend-worktree-diff.js +12 -27
- package/dist/workflows/dag/workspace-checkpoint.js +8 -27
- package/harness.json +1 -1
- package/package.json +1 -1
- package/skills/loop-agent/references/command-reference.md +3 -1
- package/skills/loop-agent/references/source-and-plan-practice.md +13 -0
- package/skills/loop-agent/references/task-workflow.md +4 -0
- package/dist/worker/console/chat/instruction-skills.js +0 -217
- package/dist/worker/console/static/assets/index-CnUXAqxG.css +0 -1
- package/dist/worker/console/static/assets/index-CteJFFL2.js +0 -29
|
@@ -6,6 +6,7 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
import { LoopAgentClient } from "../loop-agent/loop-agent-client.js";
|
|
7
7
|
import { openConsoleAppData } from "./app-data.js";
|
|
8
8
|
import { DagConfirmationStore } from "./dag-confirmation.js";
|
|
9
|
+
import { DagExecutionReceiptStore } from "./dag-execution-receipt.js";
|
|
9
10
|
import { DraftStore } from "./draft-store.js";
|
|
10
11
|
import { AssessmentStore } from "./interview/assessment.js";
|
|
11
12
|
import { InterviewSessionStore } from "./interview/session.js";
|
|
@@ -59,6 +60,7 @@ export async function createConsoleServer(options) {
|
|
|
59
60
|
});
|
|
60
61
|
const drafts = new DraftStore(appData);
|
|
61
62
|
const confirmations = new DagConfirmationStore(appData, bootToken.confirmationToken);
|
|
63
|
+
const dagExecutionReceipts = new DagExecutionReceiptStore(appData);
|
|
62
64
|
const interviews = new InterviewSessionStore(appData);
|
|
63
65
|
const assessments = new AssessmentStore(appData);
|
|
64
66
|
const readiness = await probePiReadiness({
|
|
@@ -94,6 +96,7 @@ export async function createConsoleServer(options) {
|
|
|
94
96
|
events,
|
|
95
97
|
drafts,
|
|
96
98
|
confirmations,
|
|
99
|
+
dagExecutionReceipts,
|
|
97
100
|
humanGateSecret: bootToken.confirmationToken,
|
|
98
101
|
interviews,
|
|
99
102
|
assessments,
|
|
@@ -111,16 +114,18 @@ export async function createConsoleServer(options) {
|
|
|
111
114
|
// custom-tool execute() calls dispatch into the operator action layer (Gate 3).
|
|
112
115
|
// Chat session dir is dedicated (app-data/chat-sessions), NOT user default.
|
|
113
116
|
const chatStore = new ChatSessionStore(appData);
|
|
114
|
-
|
|
117
|
+
// M5.1: every Console boot owns a fresh event-log generation. A browser
|
|
118
|
+
// reconnecting with an old SSE cursor must reconcile from snapshot rather
|
|
119
|
+
// than silently consume a different process' event namespace.
|
|
120
|
+
const chatEventEpoch = randomBytes(12).toString("hex");
|
|
121
|
+
const chatEvents = createChatEventStore({ appData, epoch: chatEventEpoch });
|
|
115
122
|
const chatOperationLinker = createChatOperationLinker({
|
|
116
123
|
chatEvents,
|
|
117
124
|
operations,
|
|
118
125
|
operationEvents: events,
|
|
119
126
|
});
|
|
120
|
-
const skillsDir = resolveLoopAgentSkillsDir(repoRoot);
|
|
121
127
|
const chatRuntime = new ConsolePiRuntime({
|
|
122
128
|
cwd: repoRoot,
|
|
123
|
-
skillsDir,
|
|
124
129
|
sessionDir: appData.chatSessions,
|
|
125
130
|
actionContext,
|
|
126
131
|
});
|
|
@@ -137,7 +142,6 @@ export async function createConsoleServer(options) {
|
|
|
137
142
|
bootToken,
|
|
138
143
|
getConsoleOrigin,
|
|
139
144
|
allowNonLoopbackAccess: !loopbackBind,
|
|
140
|
-
skillsDir,
|
|
141
145
|
};
|
|
142
146
|
const nightAuxTicker = new NightAuxTicker({
|
|
143
147
|
repoRoot,
|
|
@@ -292,17 +296,6 @@ export async function createConsoleServer(options) {
|
|
|
292
296
|
});
|
|
293
297
|
});
|
|
294
298
|
}
|
|
295
|
-
/** Resolve the loop-agent repo skills/ directory (source repo or npm pack asset). */
|
|
296
|
-
function resolveLoopAgentSkillsDir(repoRoot) {
|
|
297
|
-
// When running from dist (npm pack), skills/ is a sibling of dist/ at the
|
|
298
|
-
// package root. When running from source (tsx), it's the repo root.
|
|
299
|
-
const fromDist = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..", "..", "skills");
|
|
300
|
-
const fromRepo = path.resolve(repoRoot, "skills");
|
|
301
|
-
// Prefer whichever exists; dist path wins if present (npm-installed runtime).
|
|
302
|
-
if (existsSync(fromDist))
|
|
303
|
-
return fromDist;
|
|
304
|
-
return fromRepo;
|
|
305
|
-
}
|
|
306
299
|
function requestSource(req) {
|
|
307
300
|
const forwarded = req.headers["x-forwarded-for"];
|
|
308
301
|
if (typeof forwarded === "string" && forwarded.trim()) {
|