@nowcrew/daemon 0.6.87-beta.3 → 0.6.87-beta.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/README.md +22 -0
- package/dist/cloud-report-uploader.js +27 -25
- package/dist/execution-runner.js +6 -3
- package/dist/external-output.js +154 -68
- package/dist/local-execution-prompt.js +19 -25
- package/dist/local-executor.js +16 -44
- package/dist/local-memory/prompt.js +37 -0
- package/dist/local-memory/read-cli.js +232 -0
- package/dist/local-memory-diagnostics.js +79 -12
- package/dist/main.js +6 -2
- package/dist/prompt.js +24 -9
- package/dist/serve.js +17 -11
- package/dist/storage-identity.js +4 -1
- package/dist/storage-ownership.js +93 -5
- package/dist/storage-runtime-controller.js +40 -20
- package/dist/storage-runtime.js +38 -2
- package/dist/storage-serve-adapter.js +22 -5
- package/dist/workspace.js +15 -0
- package/package.json +1 -1
- package/dist/project-skills/capability.js +0 -109
- package/dist/project-skills/controller-convergence.js +0 -57
- package/dist/project-skills/projection-set-switch.js +0 -419
- package/dist/project-skills/projection-state-domain.js +0 -170
- package/dist/project-skills/projection-state-store.js +0 -842
- package/dist/project-skills/projection-state-transaction.js +0 -322
- package/dist/project-skills/projection-state.js +0 -3
- package/dist/project-skills/runtime-root-bootstrap.js +0 -47
- package/dist/project-skills/runtime-root-domain.js +0 -268
- package/dist/project-skills/runtime-root-gc.js +0 -293
- package/dist/project-skills/runtime-root-lease-artifact.js +0 -46
- package/dist/project-skills/runtime-root-leases.js +0 -487
- package/dist/project-skills/runtime-root-source-identity.js +0 -60
- package/dist/project-skills/runtime-root-startup.js +0 -49
- package/dist/project-skills/runtime-root-state-artifact-domain.js +0 -143
- package/dist/project-skills/runtime-root-state-index.js +0 -356
- package/dist/project-skills/runtime-root-store.js +0 -722
- package/dist/project-skills/serve-capability.js +0 -28
- package/dist/project-skills/serve-startup.js +0 -37
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { WebSocket } from "ws";
|
|
2
|
-
import { daemonCapabilityBindings, } from "../machine-info.js";
|
|
3
|
-
import { prepareProjectSkillConnectionCapabilities, } from "./capability.js";
|
|
4
|
-
export function createProjectSkillConnectionCapabilityProvider(input) {
|
|
5
|
-
return async () => daemonCapabilityBindings(input.platform, await prepareProjectSkillConnectionCapabilities(input));
|
|
6
|
-
}
|
|
7
|
-
export function createProjectSkillMachineHelloPublisher(input) {
|
|
8
|
-
let latest = null;
|
|
9
|
-
let latestSocket = null;
|
|
10
|
-
const republish = () => {
|
|
11
|
-
if (latest === null || latestSocket?.readyState !== WebSocket.OPEN)
|
|
12
|
-
return;
|
|
13
|
-
const hello = input.effective(latest, input.status());
|
|
14
|
-
try {
|
|
15
|
-
latestSocket.send(JSON.stringify(hello));
|
|
16
|
-
input.onSent(hello);
|
|
17
|
-
}
|
|
18
|
-
catch { /* 非 OPEN,忽略 */ }
|
|
19
|
-
};
|
|
20
|
-
return Object.freeze({
|
|
21
|
-
publish: (hello, socket) => {
|
|
22
|
-
latest = hello;
|
|
23
|
-
latestSocket = socket;
|
|
24
|
-
republish();
|
|
25
|
-
},
|
|
26
|
-
republish,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { createExecutionJournal } from "../execution-journal.js";
|
|
2
|
-
import { reconcileExecutionJournal } from "../execution-recovery.js";
|
|
3
|
-
import { dslog, flushSlog } from "../slog.js";
|
|
4
|
-
export async function initializeProjectSkillProtectedExecutionJournal(input) {
|
|
5
|
-
return input.startup.initializeAfterLeaseProtection(input.config.agentsRoot, async (snapshot) => {
|
|
6
|
-
input.protectedExecutionIds.clear();
|
|
7
|
-
for (const executionId of snapshot)
|
|
8
|
-
input.protectedExecutionIds.add(executionId);
|
|
9
|
-
const journal = input.injectedJournal ?? createExecutionJournal(input.config.agentsRoot, {
|
|
10
|
-
protectedExecutionIds: () => input.protectedExecutionIds,
|
|
11
|
-
onOperationTiming: (event) => {
|
|
12
|
-
if (event.operation !== "mark_runtime_ready"
|
|
13
|
-
&& event.queueWaitMs < 250
|
|
14
|
-
&& event.operationMs < 250)
|
|
15
|
-
return;
|
|
16
|
-
dslog("execution.journal_operation", "execution journal 操作完成", {
|
|
17
|
-
level: event.outcome === "succeeded" ? "INFO" : "ERROR",
|
|
18
|
-
execution_id: event.executionId,
|
|
19
|
-
operation: event.operation,
|
|
20
|
-
outcome: event.outcome,
|
|
21
|
-
queue_wait_ms: event.queueWaitMs,
|
|
22
|
-
operation_ms: event.operationMs,
|
|
23
|
-
total_ms: event.queueWaitMs + event.operationMs,
|
|
24
|
-
});
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
await reconcileExecutionJournal(journal, {
|
|
28
|
-
agentsRoot: input.config.agentsRoot,
|
|
29
|
-
serverUrl: input.config.serverUrl,
|
|
30
|
-
...(input.profileName === undefined ? {} : { profileName: input.profileName }),
|
|
31
|
-
log: dslog,
|
|
32
|
-
flush: flushSlog,
|
|
33
|
-
writeStderr: (line) => process.stderr.write(line),
|
|
34
|
-
});
|
|
35
|
-
return journal;
|
|
36
|
-
});
|
|
37
|
-
}
|