@botlearn-course/daemon 0.0.20-beta.1 → 0.0.20-beta.11
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/README.md +7 -0
- package/dist/agent-service-sandbox.d.ts +7 -1
- package/dist/agent-service-sandbox.js +417 -39
- package/dist/agent-service-ws-protocol.d.ts +3 -3
- package/dist/agent-service-ws-protocol.js +5 -2
- package/dist/cli.js +19 -1
- package/dist/file-candidates.js +46 -39
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/run-dispatcher.d.ts +1 -1
- package/dist/run-dispatcher.js +10 -7
- package/dist/runtime-env.js +4 -4
- package/dist/runtime-quiescence.d.ts +19 -0
- package/dist/runtime-quiescence.js +130 -0
- package/dist/runtimes/deepseek-tui.js +11 -0
- package/dist/tool-observation.d.ts +6 -5
- package/dist/tool-observation.js +8 -5
- package/dist/trace-projection.d.ts +1 -1
- package/dist/trace-projection.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/workspace-filesystem.d.ts +20 -0
- package/dist/workspace-filesystem.js +120 -0
- package/dist/workspace-quota.d.ts +4 -0
- package/dist/workspace-quota.js +42 -0
- package/dist/workspace-restore.d.ts +9 -1
- package/dist/workspace-restore.js +30 -16
- 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 +2 -9
- package/dist/workspace-snapshot-staging.js +59 -25
- package/dist/workspace.d.ts +4 -4
- package/dist/workspace.js +26 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,6 +47,13 @@ daemon,由 root-owned 固定 launcher 清空附加组后直接降权为 `user`
|
|
|
47
47
|
`agent-service session --bootstrap-stdin` 同样属于受 supervisor 保护的内部协议,不应直接暴露给
|
|
48
48
|
课程任务或 workspace shell。
|
|
49
49
|
|
|
50
|
+
veFaaS Origin 的托管 workspace 使用用户级 NAS backing image。root bootstrap 完成 NFS、marker、
|
|
51
|
+
ext4、loop mount 和固定 3 GiB 校验后,daemon 才发送 `sandbox.ready`。RuntimeSession 使用稳定路径
|
|
52
|
+
`/workspace/sessions/{runtime_session_id}/workspace`,Sandbox generation 只参与写入隔离。磁盘写满
|
|
53
|
+
统一上报 `workspace_user_quota_exceeded`。pause 和 cleanup 进入 drain 后,daemon 先停止 runtime
|
|
54
|
+
writer,再通过 root launcher 执行 ext4 sync、loop unmount、backing image 和 NFS parent fsync;完成后
|
|
55
|
+
才发送 `sandbox.drained` 并退出。
|
|
56
|
+
|
|
50
57
|
## 支持的 runtime
|
|
51
58
|
|
|
52
59
|
run 的 `runtime.id` 决定用哪个 adapter 执行;未指定时默认 `codex`。runtime 不可用时 run 会
|
|
@@ -39,6 +39,7 @@ export declare class AgentServiceSandboxClient implements RunReportingClient, Pe
|
|
|
39
39
|
private readonly sessionProfiles;
|
|
40
40
|
/** activation-scoped 模型短凭据;只保存在内存中,绝不进入 state.json。 */
|
|
41
41
|
private readonly activationContexts;
|
|
42
|
+
private readonly activationCleanupTasks;
|
|
42
43
|
private readonly pendingAcks;
|
|
43
44
|
private readonly pendingFileReports;
|
|
44
45
|
private readonly inflightCommands;
|
|
@@ -70,11 +71,14 @@ export declare class AgentServiceSandboxClient implements RunReportingClient, Pe
|
|
|
70
71
|
constructor(options: AgentServiceSandboxOptions);
|
|
71
72
|
prepareTurn(payload: RunStartPayload): PreparedPersistentTurn;
|
|
72
73
|
persistNativeSession(nativeSessionId: string): void;
|
|
73
|
-
finishTurn(payload: RunStartPayload): void
|
|
74
|
+
finishTurn(payload: RunStartPayload): Promise<void>;
|
|
74
75
|
private completePendingActivationCleanup;
|
|
76
|
+
private runPendingActivationCleanup;
|
|
75
77
|
private recoverPendingActivationCleanups;
|
|
76
78
|
run(): Promise<void>;
|
|
77
79
|
stop(): void;
|
|
80
|
+
stopGracefully(): Promise<void>;
|
|
81
|
+
private drainWorkspace;
|
|
78
82
|
postEvent(agentRunId: string, event: RunEvent): Promise<RunEventReceipt>;
|
|
79
83
|
postFile(agentRunId: string, file: RunFileCandidate): Promise<RunFileRecord>;
|
|
80
84
|
recordWorkspaceScanMeasurement(agentRunId: string, measurement: WorkspaceScanMeasurement): Promise<void>;
|
|
@@ -88,6 +92,7 @@ export declare class AgentServiceSandboxClient implements RunReportingClient, Pe
|
|
|
88
92
|
/** sandbox.sync 只做对账:重放 spool、关闭待关 session、应用 drain/shutdown。 */
|
|
89
93
|
private applySync;
|
|
90
94
|
private handleSessionOpen;
|
|
95
|
+
private handleWorkspaceCheckpoint;
|
|
91
96
|
private handleSessionActivate;
|
|
92
97
|
private handleTurnStart;
|
|
93
98
|
private handleTurnCancel;
|
|
@@ -105,6 +110,7 @@ export declare class AgentServiceSandboxClient implements RunReportingClient, Pe
|
|
|
105
110
|
private isCurrentLifecycleFence;
|
|
106
111
|
private runIdsForSession;
|
|
107
112
|
private deactivateSession;
|
|
113
|
+
private terminateSessionWriters;
|
|
108
114
|
private sameTurnScope;
|
|
109
115
|
private matchesTurnScope;
|
|
110
116
|
private assertTurnScope;
|