@botlearn-course/daemon 0.0.19 → 0.0.20-beta.2
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/agent-service-sandbox.d.ts +9 -1
- package/dist/agent-service-sandbox.js +490 -16
- package/dist/agent-service-ws-protocol.d.ts +3 -3
- package/dist/agent-service-ws-protocol.js +6 -2
- package/dist/cli.js +19 -1
- package/dist/file-candidates.d.ts +28 -1
- package/dist/file-candidates.js +57 -11
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/run-dispatcher.d.ts +3 -2
- package/dist/run-dispatcher.js +62 -5
- package/dist/runtime-env.js +4 -4
- package/dist/runtime-quiescence.d.ts +16 -0
- package/dist/runtime-quiescence.js +42 -0
- package/dist/runtimes/engine.js +1 -1
- package/dist/tool-observation.d.ts +7 -4
- package/dist/tool-observation.js +40 -18
- package/dist/trace-projection.d.ts +21 -0
- package/dist/trace-projection.js +56 -0
- package/dist/types.d.ts +1 -1
- package/dist/workspace-entry-set.d.ts +31 -0
- package/dist/workspace-entry-set.js +164 -0
- package/dist/workspace-materialization.d.ts +16 -0
- package/dist/workspace-materialization.js +136 -0
- package/dist/workspace-quota.d.ts +4 -0
- package/dist/workspace-quota.js +42 -0
- package/dist/workspace-restore.d.ts +42 -0
- package/dist/workspace-restore.js +347 -0
- package/dist/workspace-snapshot-control.d.ts +29 -0
- package/dist/workspace-snapshot-control.js +169 -0
- package/dist/workspace-snapshot-policy.d.ts +24 -0
- package/dist/workspace-snapshot-policy.js +45 -0
- package/dist/workspace-snapshot-staging.d.ts +27 -0
- package/dist/workspace-snapshot-staging.js +275 -0
- package/dist/workspace.d.ts +56 -0
- package/dist/workspace.js +553 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Logger } from "./log.js";
|
|
2
|
+
import type { WorkspaceScanMeasurement } from "./file-candidates.js";
|
|
2
3
|
import { type RuntimeSkillProviderFactory } from "./runtime-skills.js";
|
|
3
4
|
import { type PersistentSessionExecution, type PreparedPersistentTurn, type RunReportingClient } from "./run-dispatcher.js";
|
|
4
5
|
import type { CourseRuntime, CourseRuntimeProfile, RunEvent, RunEventReceipt, RunFileCandidate, RunFileRecord, RunStartPayload } from "./types.js";
|
|
@@ -32,12 +33,15 @@ export declare class AgentServiceSandboxClient implements RunReportingClient, Pe
|
|
|
32
33
|
private readonly dispatcher;
|
|
33
34
|
/** agent_run_id → TURN scope(session/attempt/activation),事件与文件帧路由用。 */
|
|
34
35
|
private readonly turnScopes;
|
|
36
|
+
private readonly turnWorkspaceCheckpoints;
|
|
37
|
+
private readonly completedWorkspaceCheckpoints;
|
|
35
38
|
/** 每 run 内嵌 profile(turn payload 自带时优先)。 */
|
|
36
39
|
private readonly runProfiles;
|
|
37
40
|
/** activate 时装配的 per-session profile,turn.start 复用。 */
|
|
38
41
|
private readonly sessionProfiles;
|
|
39
42
|
/** activation-scoped 模型短凭据;只保存在内存中,绝不进入 state.json。 */
|
|
40
43
|
private readonly activationContexts;
|
|
44
|
+
private readonly activationCleanupTasks;
|
|
41
45
|
private readonly pendingAcks;
|
|
42
46
|
private readonly pendingFileReports;
|
|
43
47
|
private readonly inflightCommands;
|
|
@@ -69,13 +73,16 @@ export declare class AgentServiceSandboxClient implements RunReportingClient, Pe
|
|
|
69
73
|
constructor(options: AgentServiceSandboxOptions);
|
|
70
74
|
prepareTurn(payload: RunStartPayload): PreparedPersistentTurn;
|
|
71
75
|
persistNativeSession(nativeSessionId: string): void;
|
|
72
|
-
finishTurn(payload: RunStartPayload): void
|
|
76
|
+
finishTurn(payload: RunStartPayload): Promise<void>;
|
|
73
77
|
private completePendingActivationCleanup;
|
|
78
|
+
private runPendingActivationCleanup;
|
|
74
79
|
private recoverPendingActivationCleanups;
|
|
75
80
|
run(): Promise<void>;
|
|
76
81
|
stop(): void;
|
|
82
|
+
stopGracefully(): Promise<void>;
|
|
77
83
|
postEvent(agentRunId: string, event: RunEvent): Promise<RunEventReceipt>;
|
|
78
84
|
postFile(agentRunId: string, file: RunFileCandidate): Promise<RunFileRecord>;
|
|
85
|
+
recordWorkspaceScanMeasurement(agentRunId: string, measurement: WorkspaceScanMeasurement): Promise<void>;
|
|
79
86
|
getRunRuntimeProfile(agentRunId: string): Promise<CourseRuntimeProfile>;
|
|
80
87
|
private connectOnce;
|
|
81
88
|
private handleHello;
|
|
@@ -86,6 +93,7 @@ export declare class AgentServiceSandboxClient implements RunReportingClient, Pe
|
|
|
86
93
|
/** sandbox.sync 只做对账:重放 spool、关闭待关 session、应用 drain/shutdown。 */
|
|
87
94
|
private applySync;
|
|
88
95
|
private handleSessionOpen;
|
|
96
|
+
private handleWorkspaceCheckpoint;
|
|
89
97
|
private handleSessionActivate;
|
|
90
98
|
private handleTurnStart;
|
|
91
99
|
private handleTurnCancel;
|