@nowcrew/daemon 0.6.80-beta.3 → 0.6.80-beta.4

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.
Files changed (28) hide show
  1. package/dist/automatic-daemon-installer.js +22 -6
  2. package/dist/computer-service.js +12 -1
  3. package/dist/daemon-migration-controller.js +4 -3
  4. package/dist/storage-config.js +26 -0
  5. package/dist/storage-migration-controller.js +0 -1
  6. package/dist/storage-runtime-readiness.js +50 -16
  7. package/dist/storage-worker-executor.js +29 -11
  8. package/dist/storage-worker-operation.js +6 -0
  9. package/package.json +1 -1
  10. package/dist/project-skills/capability.js +0 -109
  11. package/dist/project-skills/controller-convergence.js +0 -57
  12. package/dist/project-skills/projection-set-switch.js +0 -419
  13. package/dist/project-skills/projection-state-domain.js +0 -170
  14. package/dist/project-skills/projection-state-store.js +0 -842
  15. package/dist/project-skills/projection-state-transaction.js +0 -322
  16. package/dist/project-skills/projection-state.js +0 -3
  17. package/dist/project-skills/runtime-root-bootstrap.js +0 -47
  18. package/dist/project-skills/runtime-root-domain.js +0 -268
  19. package/dist/project-skills/runtime-root-gc.js +0 -293
  20. package/dist/project-skills/runtime-root-lease-artifact.js +0 -46
  21. package/dist/project-skills/runtime-root-leases.js +0 -487
  22. package/dist/project-skills/runtime-root-source-identity.js +0 -60
  23. package/dist/project-skills/runtime-root-startup.js +0 -49
  24. package/dist/project-skills/runtime-root-state-artifact-domain.js +0 -143
  25. package/dist/project-skills/runtime-root-state-index.js +0 -356
  26. package/dist/project-skills/runtime-root-store.js +0 -722
  27. package/dist/project-skills/serve-capability.js +0 -28
  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
- }