@nowcrew/daemon 0.6.87-beta.4 → 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.
Files changed (30) hide show
  1. package/README.md +22 -0
  2. package/dist/execution-runner.js +6 -3
  3. package/dist/local-execution-prompt.js +19 -25
  4. package/dist/local-executor.js +10 -42
  5. package/dist/local-memory/prompt.js +37 -0
  6. package/dist/local-memory/read-cli.js +232 -0
  7. package/dist/local-memory-diagnostics.js +79 -12
  8. package/dist/main.js +0 -0
  9. package/dist/prompt.js +24 -9
  10. package/dist/workspace.js +15 -0
  11. package/package.json +10 -9
  12. package/dist/project-skills/capability.js +0 -109
  13. package/dist/project-skills/controller-convergence.js +0 -57
  14. package/dist/project-skills/projection-set-switch.js +0 -419
  15. package/dist/project-skills/projection-state-domain.js +0 -170
  16. package/dist/project-skills/projection-state-store.js +0 -842
  17. package/dist/project-skills/projection-state-transaction.js +0 -322
  18. package/dist/project-skills/projection-state.js +0 -3
  19. package/dist/project-skills/runtime-root-bootstrap.js +0 -47
  20. package/dist/project-skills/runtime-root-domain.js +0 -268
  21. package/dist/project-skills/runtime-root-gc.js +0 -293
  22. package/dist/project-skills/runtime-root-lease-artifact.js +0 -46
  23. package/dist/project-skills/runtime-root-leases.js +0 -487
  24. package/dist/project-skills/runtime-root-source-identity.js +0 -60
  25. package/dist/project-skills/runtime-root-startup.js +0 -49
  26. package/dist/project-skills/runtime-root-state-artifact-domain.js +0 -143
  27. package/dist/project-skills/runtime-root-state-index.js +0 -356
  28. package/dist/project-skills/runtime-root-store.js +0 -722
  29. package/dist/project-skills/serve-capability.js +0 -28
  30. 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
- }