@aitne/daemon 0.1.3 → 0.1.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.
- package/dist/adapters/whatsapp-adapter.d.ts.map +1 -1
- package/dist/adapters/whatsapp-adapter.js +0 -1
- package/dist/adapters/whatsapp-adapter.js.map +1 -1
- package/dist/api/integration-route-gate.d.ts +15 -11
- package/dist/api/integration-route-gate.d.ts.map +1 -1
- package/dist/api/integration-route-gate.js +60 -23
- package/dist/api/integration-route-gate.js.map +1 -1
- package/dist/api/json-body.d.ts +22 -7
- package/dist/api/json-body.d.ts.map +1 -1
- package/dist/api/json-body.js +27 -8
- package/dist/api/json-body.js.map +1 -1
- package/dist/api/routes/agent.d.ts.map +1 -1
- package/dist/api/routes/agent.js +18 -0
- package/dist/api/routes/agent.js.map +1 -1
- package/dist/api/routes/backends.d.ts.map +1 -1
- package/dist/api/routes/backends.js +96 -1
- package/dist/api/routes/backends.js.map +1 -1
- package/dist/api/routes/books.js +1 -1
- package/dist/api/routes/books.js.map +1 -1
- package/dist/api/routes/context.d.ts.map +1 -1
- package/dist/api/routes/context.js +13 -1
- package/dist/api/routes/context.js.map +1 -1
- package/dist/api/routes/dashboard.d.ts.map +1 -1
- package/dist/api/routes/dashboard.js +75 -5
- package/dist/api/routes/dashboard.js.map +1 -1
- package/dist/api/routes/github.d.ts.map +1 -1
- package/dist/api/routes/github.js +38 -5
- package/dist/api/routes/github.js.map +1 -1
- package/dist/api/routes/integrations.d.ts +35 -6
- package/dist/api/routes/integrations.d.ts.map +1 -1
- package/dist/api/routes/integrations.js +191 -16
- package/dist/api/routes/integrations.js.map +1 -1
- package/dist/api/routes/mail.d.ts.map +1 -1
- package/dist/api/routes/mail.js +112 -46
- package/dist/api/routes/mail.js.map +1 -1
- package/dist/api/routes/observations.d.ts.map +1 -1
- package/dist/api/routes/observations.js +161 -8
- package/dist/api/routes/observations.js.map +1 -1
- package/dist/api/routes/setup-migrate.d.ts +9 -1
- package/dist/api/routes/setup-migrate.d.ts.map +1 -1
- package/dist/api/routes/setup-migrate.js +4 -2
- package/dist/api/routes/setup-migrate.js.map +1 -1
- package/dist/api/routes/skills.d.ts.map +1 -1
- package/dist/api/routes/skills.js +39 -1
- package/dist/api/routes/skills.js.map +1 -1
- package/dist/api/routes/voice.d.ts.map +1 -1
- package/dist/api/routes/voice.js +62 -4
- package/dist/api/routes/voice.js.map +1 -1
- package/dist/bootstrap/adapters.d.ts +109 -0
- package/dist/bootstrap/adapters.d.ts.map +1 -0
- package/dist/bootstrap/adapters.js +237 -0
- package/dist/bootstrap/adapters.js.map +1 -0
- package/dist/bootstrap/catchup.d.ts +23 -0
- package/dist/bootstrap/catchup.d.ts.map +1 -0
- package/dist/bootstrap/catchup.js +124 -0
- package/dist/bootstrap/catchup.js.map +1 -0
- package/dist/bootstrap/schedule-helpers.d.ts +18 -0
- package/dist/bootstrap/schedule-helpers.d.ts.map +1 -0
- package/dist/bootstrap/schedule-helpers.js +96 -0
- package/dist/bootstrap/schedule-helpers.js.map +1 -0
- package/dist/bootstrap/services.d.ts +60 -0
- package/dist/bootstrap/services.d.ts.map +1 -0
- package/dist/bootstrap/services.js +209 -0
- package/dist/bootstrap/services.js.map +1 -0
- package/dist/core/backends/backend-router.d.ts +23 -0
- package/dist/core/backends/backend-router.d.ts.map +1 -1
- package/dist/core/backends/backend-router.js +48 -3
- package/dist/core/backends/backend-router.js.map +1 -1
- package/dist/core/backends/claude-auth.d.ts +70 -0
- package/dist/core/backends/claude-auth.d.ts.map +1 -0
- package/dist/core/backends/claude-auth.js +198 -0
- package/dist/core/backends/claude-auth.js.map +1 -0
- package/dist/core/backends/claude-code-core.d.ts +47 -119
- package/dist/core/backends/claude-code-core.d.ts.map +1 -1
- package/dist/core/backends/claude-code-core.js +112 -1565
- package/dist/core/backends/claude-code-core.js.map +1 -1
- package/dist/core/backends/claude-delegated.d.ts +86 -0
- package/dist/core/backends/claude-delegated.d.ts.map +1 -0
- package/dist/core/backends/claude-delegated.js +801 -0
- package/dist/core/backends/claude-delegated.js.map +1 -0
- package/dist/core/backends/claude-errors.d.ts +39 -0
- package/dist/core/backends/claude-errors.d.ts.map +1 -0
- package/dist/core/backends/claude-errors.js +71 -0
- package/dist/core/backends/claude-errors.js.map +1 -0
- package/dist/core/backends/claude-probe.d.ts +103 -0
- package/dist/core/backends/claude-probe.d.ts.map +1 -0
- package/dist/core/backends/claude-probe.js +336 -0
- package/dist/core/backends/claude-probe.js.map +1 -0
- package/dist/core/backends/claude-tool-collection.d.ts +135 -0
- package/dist/core/backends/claude-tool-collection.d.ts.map +1 -0
- package/dist/core/backends/claude-tool-collection.js +831 -0
- package/dist/core/backends/claude-tool-collection.js.map +1 -0
- package/dist/core/backends/gemini-cli-core.d.ts +21 -0
- package/dist/core/backends/gemini-cli-core.d.ts.map +1 -1
- package/dist/core/backends/gemini-cli-core.js +84 -6
- package/dist/core/backends/gemini-cli-core.js.map +1 -1
- package/dist/core/backends/prompt-utils.d.ts +1 -0
- package/dist/core/backends/prompt-utils.d.ts.map +1 -1
- package/dist/core/backends/prompt-utils.js +60 -3
- package/dist/core/backends/prompt-utils.js.map +1 -1
- package/dist/core/context-builder.d.ts +36 -12
- package/dist/core/context-builder.d.ts.map +1 -1
- package/dist/core/context-builder.js +179 -89
- package/dist/core/context-builder.js.map +1 -1
- package/dist/core/dispatcher-date-utils.d.ts +49 -0
- package/dist/core/dispatcher-date-utils.d.ts.map +1 -0
- package/dist/core/dispatcher-date-utils.js +132 -0
- package/dist/core/dispatcher-date-utils.js.map +1 -0
- package/dist/core/dispatcher-error-handling.d.ts +159 -0
- package/dist/core/dispatcher-error-handling.d.ts.map +1 -0
- package/dist/core/dispatcher-error-handling.js +393 -0
- package/dist/core/dispatcher-error-handling.js.map +1 -0
- package/dist/core/dispatcher-hourly-check.d.ts +150 -0
- package/dist/core/dispatcher-hourly-check.d.ts.map +1 -0
- package/dist/core/dispatcher-hourly-check.js +665 -0
- package/dist/core/dispatcher-hourly-check.js.map +1 -0
- package/dist/core/dispatcher-message-handler.d.ts +170 -0
- package/dist/core/dispatcher-message-handler.d.ts.map +1 -0
- package/dist/core/dispatcher-message-handler.js +1054 -0
- package/dist/core/dispatcher-message-handler.js.map +1 -0
- package/dist/core/dispatcher-morning-routine.d.ts +169 -0
- package/dist/core/dispatcher-morning-routine.d.ts.map +1 -0
- package/dist/core/dispatcher-morning-routine.js +434 -0
- package/dist/core/dispatcher-morning-routine.js.map +1 -0
- package/dist/core/dispatcher-prompt.d.ts +107 -0
- package/dist/core/dispatcher-prompt.d.ts.map +1 -0
- package/dist/core/dispatcher-prompt.js +227 -0
- package/dist/core/dispatcher-prompt.js.map +1 -0
- package/dist/core/dispatcher-repository-helpers.d.ts +39 -0
- package/dist/core/dispatcher-repository-helpers.d.ts.map +1 -0
- package/dist/core/dispatcher-repository-helpers.js +86 -0
- package/dist/core/dispatcher-repository-helpers.js.map +1 -0
- package/dist/core/dispatcher-result-processor.d.ts +145 -0
- package/dist/core/dispatcher-result-processor.d.ts.map +1 -0
- package/dist/core/dispatcher-result-processor.js +414 -0
- package/dist/core/dispatcher-result-processor.js.map +1 -0
- package/dist/core/dispatcher-scheduled-tasks.d.ts +406 -0
- package/dist/core/dispatcher-scheduled-tasks.d.ts.map +1 -0
- package/dist/core/dispatcher-scheduled-tasks.js +998 -0
- package/dist/core/dispatcher-scheduled-tasks.js.map +1 -0
- package/dist/core/dispatcher-types.d.ts +296 -0
- package/dist/core/dispatcher-types.d.ts.map +1 -0
- package/dist/core/dispatcher-types.js +106 -0
- package/dist/core/dispatcher-types.js.map +1 -0
- package/dist/core/dispatcher.d.ts +86 -610
- package/dist/core/dispatcher.d.ts.map +1 -1
- package/dist/core/dispatcher.js +293 -3542
- package/dist/core/dispatcher.js.map +1 -1
- package/dist/core/integration-health.d.ts +18 -10
- package/dist/core/integration-health.d.ts.map +1 -1
- package/dist/core/integration-health.js +31 -1
- package/dist/core/integration-health.js.map +1 -1
- package/dist/core/integration-lifecycle.d.ts +65 -0
- package/dist/core/integration-lifecycle.d.ts.map +1 -1
- package/dist/core/integration-lifecycle.js +167 -16
- package/dist/core/integration-lifecycle.js.map +1 -1
- package/dist/core/integration-main-backend.d.ts +40 -0
- package/dist/core/integration-main-backend.d.ts.map +1 -1
- package/dist/core/integration-main-backend.js +89 -2
- package/dist/core/integration-main-backend.js.map +1 -1
- package/dist/core/management-md.d.ts +51 -17
- package/dist/core/management-md.d.ts.map +1 -1
- package/dist/core/management-md.js +233 -56
- package/dist/core/management-md.js.map +1 -1
- package/dist/core/output-language-policy.d.ts +74 -0
- package/dist/core/output-language-policy.d.ts.map +1 -0
- package/dist/core/output-language-policy.js +194 -0
- package/dist/core/output-language-policy.js.map +1 -0
- package/dist/core/prompts.d.ts +1 -0
- package/dist/core/prompts.d.ts.map +1 -1
- package/dist/core/prompts.js +121 -3
- package/dist/core/prompts.js.map +1 -1
- package/dist/core/repository-management-docs.d.ts +24 -0
- package/dist/core/repository-management-docs.d.ts.map +1 -1
- package/dist/core/repository-management-docs.js +210 -26
- package/dist/core/repository-management-docs.js.map +1 -1
- package/dist/core/routine-acquisition-plan.d.ts +131 -0
- package/dist/core/routine-acquisition-plan.d.ts.map +1 -0
- package/dist/core/routine-acquisition-plan.js +268 -0
- package/dist/core/routine-acquisition-plan.js.map +1 -0
- package/dist/core/routine-fetch-window-runner.d.ts +201 -0
- package/dist/core/routine-fetch-window-runner.d.ts.map +1 -0
- package/dist/core/routine-fetch-window-runner.js +661 -0
- package/dist/core/routine-fetch-window-runner.js.map +1 -0
- package/dist/core/routine-windows.d.ts +156 -0
- package/dist/core/routine-windows.d.ts.map +1 -0
- package/dist/core/routine-windows.js +330 -0
- package/dist/core/routine-windows.js.map +1 -0
- package/dist/core/skills-compiler.d.ts +11 -0
- package/dist/core/skills-compiler.d.ts.map +1 -1
- package/dist/core/skills-compiler.js +102 -13
- package/dist/core/skills-compiler.js.map +1 -1
- package/dist/core/skills-manifest.d.ts.map +1 -1
- package/dist/core/skills-manifest.js +26 -0
- package/dist/core/skills-manifest.js.map +1 -1
- package/dist/core/system-reset.d.ts.map +1 -1
- package/dist/core/system-reset.js +25 -2
- package/dist/core/system-reset.js.map +1 -1
- package/dist/db/observations.d.ts +45 -2
- package/dist/db/observations.d.ts.map +1 -1
- package/dist/db/observations.js +112 -14
- package/dist/db/observations.js.map +1 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +13 -25
- package/dist/db/schema.js.map +1 -1
- package/dist/index.js +83 -610
- package/dist/index.js.map +1 -1
- package/dist/observers/delegated-sync-worker.d.ts +45 -2
- package/dist/observers/delegated-sync-worker.d.ts.map +1 -1
- package/dist/observers/delegated-sync-worker.js +71 -21
- package/dist/observers/delegated-sync-worker.js.map +1 -1
- package/dist/observers/mail-poller.d.ts +12 -5
- package/dist/observers/mail-poller.d.ts.map +1 -1
- package/dist/observers/mail-poller.js +36 -14
- package/dist/observers/mail-poller.js.map +1 -1
- package/dist/observers/manager.d.ts +37 -5
- package/dist/observers/manager.d.ts.map +1 -1
- package/dist/observers/manager.js +28 -10
- package/dist/observers/manager.js.map +1 -1
- package/dist/services/delegated-backend-invoker.d.ts +1 -51
- package/dist/services/delegated-backend-invoker.d.ts.map +1 -1
- package/dist/services/delegated-backend-invoker.js +41 -480
- package/dist/services/delegated-backend-invoker.js.map +1 -1
- package/dist/services/delegated-invoker-audit.d.ts +94 -0
- package/dist/services/delegated-invoker-audit.d.ts.map +1 -0
- package/dist/services/delegated-invoker-audit.js +238 -0
- package/dist/services/delegated-invoker-audit.js.map +1 -0
- package/dist/services/delegated-invoker-cache-hits.d.ts +34 -0
- package/dist/services/delegated-invoker-cache-hits.d.ts.map +1 -0
- package/dist/services/delegated-invoker-cache-hits.js +104 -0
- package/dist/services/delegated-invoker-cache-hits.js.map +1 -0
- package/dist/services/delegated-invoker-janitors.d.ts +28 -0
- package/dist/services/delegated-invoker-janitors.d.ts.map +1 -0
- package/dist/services/delegated-invoker-janitors.js +104 -0
- package/dist/services/delegated-invoker-janitors.js.map +1 -0
- package/dist/services/delegated-invoker-utils.d.ts +42 -0
- package/dist/services/delegated-invoker-utils.d.ts.map +1 -0
- package/dist/services/delegated-invoker-utils.js +100 -0
- package/dist/services/delegated-invoker-utils.js.map +1 -0
- package/dist/services/delegated-task-runtime.d.ts +1 -1
- package/dist/services/delegated-task-runtime.js +1 -1
- package/dist/services/integrations/snapshot-partitions.d.ts +5 -0
- package/dist/services/integrations/snapshot-partitions.d.ts.map +1 -1
- package/dist/services/integrations/snapshot-partitions.js +12 -0
- package/dist/services/integrations/snapshot-partitions.js.map +1 -1
- package/dist/services/voice/transcriber-impl.d.ts.map +1 -1
- package/dist/services/voice/transcriber-impl.js +7 -8
- package/dist/services/voice/transcriber-impl.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ScheduledTaskRunner` — owns every non-message dispatch path that
|
|
3
|
+
* routes through the dispatcher's main `dispatch` switch:
|
|
4
|
+
* - `scheduled.task` (generic + repository run + git project doc +
|
|
5
|
+
* today_refresh + morning-routine retry);
|
|
6
|
+
* - `routine.morning_routine` retries (the wake-task fast path);
|
|
7
|
+
* - `routine.roadmap_refresh` (with the cross-request roadmap write
|
|
8
|
+
* lock + skip-on-conflict semantics);
|
|
9
|
+
* - `routine.skill_curation` (P22 §3.4 — optimizer workdir
|
|
10
|
+
* materialization + hard-clamped tool envelope);
|
|
11
|
+
* - the catch-all `executeDefault` for every routine that doesn't
|
|
12
|
+
* have its own dedicated runner method (today_refresh,
|
|
13
|
+
* evening_review, weekly_review, …).
|
|
14
|
+
*
|
|
15
|
+
* Plus the today.md utilities the morning-routine path consults
|
|
16
|
+
* through callbacks: `rotateDayFiles`, `diagnoseTodayMdState`,
|
|
17
|
+
* `hasCurrentAgentDayTodayMd`.
|
|
18
|
+
*
|
|
19
|
+
* Extracted from `core/dispatcher.ts` as part of phase D-2 of
|
|
20
|
+
* `docs/design/appendices/file-split-plan.md`. Pattern B (stateful
|
|
21
|
+
* coordinator): the runner has no mutable state of its own; it
|
|
22
|
+
* borrows lazy accessors for the dispatcher's optimizer hooks
|
|
23
|
+
* (set by `setSkillCurationHooks` after construction) and bridges
|
|
24
|
+
* back into `MorningRoutineRunner.executeMorningRoutine` when a
|
|
25
|
+
* morning-routine retry wake-task fires.
|
|
26
|
+
*
|
|
27
|
+
* Dispatcher entry points served:
|
|
28
|
+
* - `EventDispatcher.dispatch` switches on event type; each non-
|
|
29
|
+
* message branch now calls into a `runner.X()` method here
|
|
30
|
+
* (`executeScheduledTask`, `executeRoadmapRefresh`,
|
|
31
|
+
* `executeSkillCurationRoutine`, `executeDefault`);
|
|
32
|
+
* - `MorningRoutineRunner` uses `rotateDayFiles` /
|
|
33
|
+
* `diagnoseTodayMdState` via the dep callbacks the dispatcher
|
|
34
|
+
* wires at construction time.
|
|
35
|
+
*
|
|
36
|
+
* Shared-state references held:
|
|
37
|
+
* - `getMaterializeOptimizerWorkdir` / `getTeardownOptimizerWorkdir`
|
|
38
|
+
* — lazy accessors; the optimizer hooks are wired by
|
|
39
|
+
* `setSkillCurationHooks` after the dispatcher is constructed.
|
|
40
|
+
* Reading through the closures means the runner sees the current
|
|
41
|
+
* value at call time.
|
|
42
|
+
* - `roadmapWriteLock` — read-only reference to the dispatcher's
|
|
43
|
+
* write-lock manager. The runner calls `acquire` / `release` but
|
|
44
|
+
* does not own the manager's lifecycle.
|
|
45
|
+
*/
|
|
46
|
+
import type Database from "better-sqlite3";
|
|
47
|
+
import type { AgentTaskEvent, BackendId, Event } from "@aitne/shared";
|
|
48
|
+
import type { AgentConfig } from "../config.js";
|
|
49
|
+
import type { IAgentRouter } from "./backends/backend-router.js";
|
|
50
|
+
import type { RoadmapWriteLockManager } from "./roadmap-write-lock.js";
|
|
51
|
+
import type { AgentWriteTracker } from "../safety/agent-write-tracker.js";
|
|
52
|
+
import type { MailAccount } from "../services/mail/provider.js";
|
|
53
|
+
import type { IContextBuilder } from "./dispatcher-types.js";
|
|
54
|
+
import type { PromptAssembler } from "./dispatcher-prompt.js";
|
|
55
|
+
import type { DispatcherErrorRouter } from "./dispatcher-error-handling.js";
|
|
56
|
+
import type { ResultProcessor } from "./dispatcher-result-processor.js";
|
|
57
|
+
import type { MorningRoutineRunner } from "./dispatcher-morning-routine.js";
|
|
58
|
+
import type { RoutineFetchWindowRunner } from "./routine-fetch-window-runner.js";
|
|
59
|
+
import { type RepositoryRunTaskContext } from "./dispatcher-repository-helpers.js";
|
|
60
|
+
/**
|
|
61
|
+
* Mirror of the `MorningRoutineRunner.diagnoseTodayMdState` return
|
|
62
|
+
* shape. Re-declared here because this runner owns the underlying
|
|
63
|
+
* implementation; the morning-routine runner consumes it via the
|
|
64
|
+
* dep callback the dispatcher wires at construction time.
|
|
65
|
+
*/
|
|
66
|
+
export type TodayMdState = {
|
|
67
|
+
kind: "fresh";
|
|
68
|
+
} | {
|
|
69
|
+
kind: "missing";
|
|
70
|
+
} | {
|
|
71
|
+
kind: "no_h1_date";
|
|
72
|
+
} | {
|
|
73
|
+
kind: "wrong_date";
|
|
74
|
+
writtenDate: string;
|
|
75
|
+
expectedAgentDay: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* P22 §3.4 step 4 — the optimizer-only allowedTools envelope. Every
|
|
79
|
+
* `routine.skill_curation` event runs the agent with exactly these tools
|
|
80
|
+
* and nothing else. The curl glob is anchored on the daemon's loopback URL
|
|
81
|
+
* so a hook-bypassed request still hits the curation API's chokepoint
|
|
82
|
+
* (Zod, run-token, smoke test); `Read` is required for the agent to
|
|
83
|
+
* consume the inlined data dump under the workdir's `data/` subtree.
|
|
84
|
+
*
|
|
85
|
+
* Kept narrow on purpose: adding any other tool here widens the optimizer's
|
|
86
|
+
* blast radius. If a future signal source needs the agent to write to a
|
|
87
|
+
* different surface, add a new curation API endpoint and let the curl glob
|
|
88
|
+
* cover it — do NOT add `Bash(*)` or `Write` here.
|
|
89
|
+
*/
|
|
90
|
+
export declare const SKILL_CURATION_OPTIMIZER_ALLOWED_TOOLS: readonly ["Read", "Bash(curl http://localhost:8321/api/skill-curation/*)"];
|
|
91
|
+
/**
|
|
92
|
+
* Read-only tool envelope for `git.project.refresh_architecture`. This agent
|
|
93
|
+
* walks the user's local git worktree at `<task_context.localPath>` to compose
|
|
94
|
+
* the `## Architecture` section of `git/<slug>/overview.md`, and lands the
|
|
95
|
+
* result through `PUT /api/repositories/:id/architecture-section` — the one
|
|
96
|
+
* daemon-side chokepoint. Without this clamp the session would inherit
|
|
97
|
+
* `CLAUDE_DEFAULT_ALLOWED_TOOLS` (Write/Edit/`Bash(git *)`/`Bash(curl *)`),
|
|
98
|
+
* which would let a prompt-injected README or a misbehaving turn mutate the
|
|
99
|
+
* user's repository (e.g. `git reset --hard`, `git push --force`, arbitrary
|
|
100
|
+
* `Write` to source files) OR exfiltrate via other Autonomous daemon APIs
|
|
101
|
+
* (`POST /api/notify` to DM the owner with attacker content, `POST
|
|
102
|
+
* /api/observations` to inject fake observations, `PUT /api/obsidian/notes`
|
|
103
|
+
* to overwrite vault notes, etc.). The Architecture analysis itself only
|
|
104
|
+
* needs to *read* the worktree.
|
|
105
|
+
*
|
|
106
|
+
* What is INCLUDED and why:
|
|
107
|
+
* - `Read` / `Glob` / `Grep` — the task-flow's only durable need (README,
|
|
108
|
+
* manifests, source files, design docs). `Glob` covers the literal
|
|
109
|
+
* `ls <localPath>` step without giving the agent shell access.
|
|
110
|
+
* - `Bash(curl http://localhost:8321/api/repositories/*\/architecture-section*)`
|
|
111
|
+
* — endpoint-pinned write path. The SDK's prefix-glob layer forbids the
|
|
112
|
+
* command from reaching ANY other host, port, or daemon-API namespace.
|
|
113
|
+
* The curl PreToolUse hook adds defense-in-depth (rechecks host/port,
|
|
114
|
+
* denies connection-override flags); the API risk classifier supplies
|
|
115
|
+
* the floor (only `PUT .../architecture-section` is Autonomous under
|
|
116
|
+
* `/api/repositories/`; everything else inherits Approve and 401s a
|
|
117
|
+
* tokenless agent curl). Port is hardcoded to the daemon's default
|
|
118
|
+
* `8321` matching the optimizer-clamp convention; operators who change
|
|
119
|
+
* `PA_API_PORT` accept the gap consciously (the same constraint applies
|
|
120
|
+
* to `SKILL_CURATION_OPTIMIZER_ALLOWED_TOOLS`).
|
|
121
|
+
* - `Bash(jq *)` — body construction. The PUT body is
|
|
122
|
+
* `{"markdown":"..."}` and the markdown contains arbitrary characters
|
|
123
|
+
* that must be JSON-escaped; `jq -n --arg md "$body" '{markdown:$md}'`
|
|
124
|
+
* is the only robust escape path under a no-`Write` envelope. The jq
|
|
125
|
+
* hook denies `--slurpfile` / `--rawfile` / `-L` / `env`-filter
|
|
126
|
+
* exfiltration.
|
|
127
|
+
*
|
|
128
|
+
* What is INTENTIONALLY EXCLUDED:
|
|
129
|
+
* - `Write` / `Edit` — would let the agent write anywhere, including the
|
|
130
|
+
* user's checked-out worktree. The chokepoint is the daemon API.
|
|
131
|
+
* - `Bash(git *)` — even read-only verbs let the agent chain into
|
|
132
|
+
* `git push --force`, `git reset --hard`, `git checkout --`, etc. via
|
|
133
|
+
* shell separators; the `always-disallowed.ts` classifier hook catches
|
|
134
|
+
* `rm -rf` / `sudo` / pipe-to-shell but does NOT classify mutating git
|
|
135
|
+
* subcommands. The Architecture analysis doesn't need git CLI:
|
|
136
|
+
* filesystem reads via `Read` / `Glob` suffice for module / data-flow /
|
|
137
|
+
* build / test-surface description.
|
|
138
|
+
* - `Bash(ls *)` — `Glob` covers directory enumeration without shell
|
|
139
|
+
* access.
|
|
140
|
+
* - `Skill` / `WebSearch` — not referenced by the task-flow; smaller
|
|
141
|
+
* surface is better.
|
|
142
|
+
*
|
|
143
|
+
* Defense-in-depth layering:
|
|
144
|
+
* - SDK `allowedTools` (this list) — first gate. Prefix glob forces the
|
|
145
|
+
* curl command to literally begin with the architecture-section URL.
|
|
146
|
+
* - SDK `disallowedTools` — `ALWAYS_DISALLOWED_TOOLS` +
|
|
147
|
+
* `config.disallowedTools` still merge on top.
|
|
148
|
+
* - PreToolUse hooks — curl localhost-only + jq exfil bans + Write/Edit
|
|
149
|
+
* context-dir chokepoint stay armed. `claude-code-core.ts` forces
|
|
150
|
+
* strict hook mode (curl + jq hooks re-enabled) whenever any
|
|
151
|
+
* `allowedToolsOverride` is active, so Allow-mode operators do not
|
|
152
|
+
* inadvertently widen this surface — see the `optimizerClampActive`
|
|
153
|
+
* branch.
|
|
154
|
+
* - Allow mode bypass — `claude-code-core.ts` detects the non-empty
|
|
155
|
+
* `allowedToolsOverride` and forces `permissionMode: "dontAsk"` for
|
|
156
|
+
* this run, stripping `bypassPermissions` even if the operator has
|
|
157
|
+
* Allow mode globally enabled.
|
|
158
|
+
* - API risk classifier — `PUT /api/repositories/:id/architecture-section`
|
|
159
|
+
* is RiskTier.Autonomous (agent-callable, no Bearer required) but
|
|
160
|
+
* enforces marker-bracketed body validation and 64KB size cap
|
|
161
|
+
* server-side. All sibling routes under `/api/repositories/` inherit
|
|
162
|
+
* the blanket Approve tier and 401 a tokenless agent curl.
|
|
163
|
+
*
|
|
164
|
+
* Multi-request defenses (closed in `claude-tool-collection.ts:bashCurlHook`,
|
|
165
|
+
* benefit every clamped session inheriting the curl hook):
|
|
166
|
+
* 1. **Shell-chained second curl** — `curl ARCH_URL ; curl
|
|
167
|
+
* http://localhost:8321/api/notify -d @evil` and the `&&` / `||` /
|
|
168
|
+
* `|` / newline / backtick / `$(…)` variants. The hook counts
|
|
169
|
+
* `curl` tokens anchored at command-start positions (mirroring the
|
|
170
|
+
* `cmdStart` regex in `safety/always-disallowed.ts`) and blocks any
|
|
171
|
+
* command with more than one anchored `curl`. A single
|
|
172
|
+
* `jq -n '{markdown:$md}' | curl URL -d @-` pipeline still counts
|
|
173
|
+
* as ONE curl token and is allowed.
|
|
174
|
+
* 2. **`--next` / `-:` URL multiplexing** — curl's same-process URL
|
|
175
|
+
* separator that resets option state per transaction. Hook-blocked
|
|
176
|
+
* via flag regex (covers `--next`, `--next=URL`, and the `-:`
|
|
177
|
+
* short form).
|
|
178
|
+
* 3. **Multi-positional URLs** — `curl URL1 URL2 -X PUT -d @body`
|
|
179
|
+
* sends identical options to both URLs sequentially. The hook
|
|
180
|
+
* tokenizes the command at the top level (outside paired single /
|
|
181
|
+
* double quotes) and blocks when more than one URL appears as a
|
|
182
|
+
* top-level token. URLs that legitimately appear inside `-d '…'`
|
|
183
|
+
* / `-H "…"` strings — e.g. external links inside the architecture
|
|
184
|
+
* markdown body — are not counted and not host-checked, so the
|
|
185
|
+
* agent can reference external code in its analysis.
|
|
186
|
+
*
|
|
187
|
+
* Per-backend support:
|
|
188
|
+
* - Claude (`ClaudeCodeCore`) — consumes this list verbatim.
|
|
189
|
+
* - Codex / Gemini — no per-execute allowedTools surface today (mirrors
|
|
190
|
+
* `AgentExecuteParams.allowedToolsOverride` JSDoc). The default
|
|
191
|
+
* `process_backend_config` seed binds `git.project.refresh_architecture`
|
|
192
|
+
* to the medium tier (Sonnet), so the realistic risk surface today is
|
|
193
|
+
* Claude-only. An operator who reroutes this process key to a
|
|
194
|
+
* non-Claude backend via `/settings/models` accepts the gap
|
|
195
|
+
* consciously.
|
|
196
|
+
*/
|
|
197
|
+
export declare const REFRESH_ARCHITECTURE_ALLOWED_TOOLS: readonly ["Read", "Glob", "Grep", "Bash(curl http://localhost:8321/api/repositories/*/architecture-section*)", "Bash(jq *)"];
|
|
198
|
+
/**
|
|
199
|
+
* Backends that honor the per-execute `allowedToolsOverride` clamp end-to-
|
|
200
|
+
* end. Claude consumes the list verbatim through the SDK's `dontAsk` +
|
|
201
|
+
* `allowedTools` posture and the dispatcher swaps Allow mode back to
|
|
202
|
+
* strict for the run. Codex / Gemini have no per-execute allowedTools
|
|
203
|
+
* surface today (see `AgentExecuteParams.allowedToolsOverride` JSDoc),
|
|
204
|
+
* so the clamp would silently drop and the read-only contract would
|
|
205
|
+
* become a no-op. We refuse-at-execute rather than silently widen the
|
|
206
|
+
* envelope; the operator sees an `agent_actions` row of action_type
|
|
207
|
+
* `scheduled_task_clamp_unsupported` and a clear log line.
|
|
208
|
+
*
|
|
209
|
+
* Add a backend here only after verifying its core threads
|
|
210
|
+
* `allowedToolsOverride` through to its concrete deny enforcement layer
|
|
211
|
+
* — NOT just into the CLI flag set.
|
|
212
|
+
*/
|
|
213
|
+
export declare const TOOL_CLAMP_SUPPORTING_BACKENDS: ReadonlySet<BackendId>;
|
|
214
|
+
export interface ScheduledTaskRunnerDeps {
|
|
215
|
+
db: Database.Database;
|
|
216
|
+
config: AgentConfig;
|
|
217
|
+
contextBuilder: IContextBuilder;
|
|
218
|
+
agentRouter: IAgentRouter;
|
|
219
|
+
prompt: PromptAssembler;
|
|
220
|
+
errorRouter: DispatcherErrorRouter;
|
|
221
|
+
resultProcessor: ResultProcessor;
|
|
222
|
+
morningRoutine: MorningRoutineRunner;
|
|
223
|
+
/**
|
|
224
|
+
* ROUTINE_DATA_ACQUISITION_DESIGN.md Phase 4 / D4 — pre-pass runner
|
|
225
|
+
* spawned by `executeDefault` for routine events whose ProcessKey is
|
|
226
|
+
* in `ROUTINE_WINDOWS` (today_refresh / evening_review / weekly_review;
|
|
227
|
+
* monthly_review is registered but has zero rows so the runner
|
|
228
|
+
* short-circuits without dispatching a session). Idempotent against
|
|
229
|
+
* the morning_routine + hourly_check paths: when the upstream
|
|
230
|
+
* dispatcher already attached a `fetchReportBlock`, `executeDefault`
|
|
231
|
+
* skips re-running the pre-pass.
|
|
232
|
+
*/
|
|
233
|
+
fetchWindowRunner: RoutineFetchWindowRunner;
|
|
234
|
+
roadmapWriteLock: RoadmapWriteLockManager | undefined;
|
|
235
|
+
writeTracker: AgentWriteTracker | undefined;
|
|
236
|
+
/**
|
|
237
|
+
* Returns the dispatcher's currently-configured "services" the
|
|
238
|
+
* agent's prompt should disclose. Read at call time so the hand-
|
|
239
|
+
* off through index.ts's lazy ServiceRegistry stays correct.
|
|
240
|
+
*/
|
|
241
|
+
getConfiguredServices: () => ReadonlySet<string>;
|
|
242
|
+
/**
|
|
243
|
+
* Returns the live mail-account list the workdir materializer
|
|
244
|
+
* should bake into the session.
|
|
245
|
+
*/
|
|
246
|
+
getActiveMailAccounts: () => readonly MailAccount[];
|
|
247
|
+
/**
|
|
248
|
+
* Lazy accessor for the optimizer materializer hook. Returns null
|
|
249
|
+
* until `EventDispatcher.setSkillCurationHooks` has been called.
|
|
250
|
+
*/
|
|
251
|
+
getMaterializeOptimizerWorkdir: () => ((opts?: {
|
|
252
|
+
manual?: boolean;
|
|
253
|
+
targetSkillsOverride?: string[];
|
|
254
|
+
}) => Promise<{
|
|
255
|
+
runId: string;
|
|
256
|
+
runToken: string;
|
|
257
|
+
workdirPath: string;
|
|
258
|
+
targetSkills: string[];
|
|
259
|
+
}>) | null;
|
|
260
|
+
/** Lazy accessor for the optimizer teardown hook. */
|
|
261
|
+
getTeardownOptimizerWorkdir: () => ((workdirPath: string) => void) | null;
|
|
262
|
+
}
|
|
263
|
+
export declare class ScheduledTaskRunner {
|
|
264
|
+
private readonly db;
|
|
265
|
+
private readonly config;
|
|
266
|
+
private readonly contextBuilder;
|
|
267
|
+
private readonly agentRouter;
|
|
268
|
+
private readonly prompt;
|
|
269
|
+
private readonly errorRouter;
|
|
270
|
+
private readonly resultProcessor;
|
|
271
|
+
private readonly morningRoutine;
|
|
272
|
+
private readonly fetchWindowRunner;
|
|
273
|
+
private readonly roadmapWriteLock;
|
|
274
|
+
private readonly writeTracker;
|
|
275
|
+
private readonly getConfiguredServices;
|
|
276
|
+
private readonly getActiveMailAccounts;
|
|
277
|
+
private readonly getMaterializeOptimizerWorkdir;
|
|
278
|
+
private readonly getTeardownOptimizerWorkdir;
|
|
279
|
+
constructor(deps: ScheduledTaskRunnerDeps);
|
|
280
|
+
buildRepositoryRunPrompt(ctx: RepositoryRunTaskContext): string;
|
|
281
|
+
prepareRepositoryRunSessionDir(ctx: RepositoryRunTaskContext, backendId: BackendId): {
|
|
282
|
+
sessionDir: string;
|
|
283
|
+
cleanup: boolean;
|
|
284
|
+
};
|
|
285
|
+
executeRepositoryRunTask(event: AgentTaskEvent, ctx: RepositoryRunTaskContext): Promise<void>;
|
|
286
|
+
/**
|
|
287
|
+
* Execute a scheduled task with the model specified when the task was
|
|
288
|
+
* registered via POST /api/schedule.
|
|
289
|
+
*
|
|
290
|
+
* Morning-routine retry tasks take a dedicated fast path: they skip
|
|
291
|
+
* the generic scheduled.task prompt and run the *real* morning routine
|
|
292
|
+
* flow via executeMorningRoutine, so the retry carries the same rotateDayFiles
|
|
293
|
+
* / prompt selection / roadmap-refresh chain as the cron-fired path.
|
|
294
|
+
*/
|
|
295
|
+
executeScheduledTask(event: AgentTaskEvent): Promise<void>;
|
|
296
|
+
/**
|
|
297
|
+
* Legacy git project documentation tasks used to run as autonomous Claude
|
|
298
|
+
* task-flows. That made file creation probabilistic: the backend could
|
|
299
|
+
* finish "successfully" without calling the daemon context API, or fail
|
|
300
|
+
* before receiving the `<task_context>` block. The daemon now owns these
|
|
301
|
+
* writes directly, matching the manual Daily git management buttons and
|
|
302
|
+
* the repository-management cron.
|
|
303
|
+
*/
|
|
304
|
+
private executeGitProjectDocTaskIfApplicable;
|
|
305
|
+
private resolveGitProjectDocProcessKey;
|
|
306
|
+
private resolveRepositoryForGitProjectDocTask;
|
|
307
|
+
private markScheduledTaskCompleted;
|
|
308
|
+
/**
|
|
309
|
+
* Defense-in-depth gate for per-execute tool clamps. When the
|
|
310
|
+
* dispatcher pins an `allowedToolsOverride` for a known-safe envelope
|
|
311
|
+
* (refresh_architecture, skill_curation) the clamp MUST hold; if the
|
|
312
|
+
* router resolves to a backend that ignores per-execute clamps the
|
|
313
|
+
* call would silently widen back to the default tool surface and the
|
|
314
|
+
* read-only contract documented in the clamp's JSDoc would dissolve.
|
|
315
|
+
*
|
|
316
|
+
* Returns `true` when the resolved main backend honors clamps (the
|
|
317
|
+
* caller should pass the override through to `execute`). Returns
|
|
318
|
+
* `false` when the operator has rebound the process key to a backend
|
|
319
|
+
* we cannot trust — the caller bails out of the execute, an
|
|
320
|
+
* `agent_actions` row records the refusal for the audit log, and an
|
|
321
|
+
* error-level log line surfaces the misconfiguration immediately.
|
|
322
|
+
*
|
|
323
|
+
* Implementation note: the audit row uses `result = 'failed'` to
|
|
324
|
+
* match the `blocked_absolute` precedent — the `agent_actions.result`
|
|
325
|
+
* CHECK constraint only permits the canonical settle states
|
|
326
|
+
* (success / failed / partial / skipped / in_progress); a literal
|
|
327
|
+
* `"blocked"` here would silently violate the constraint and the
|
|
328
|
+
* try/catch would swallow the audit. The `action_type` is the
|
|
329
|
+
* discriminator that lets dashboards / queries distinguish a "blocked
|
|
330
|
+
* by clamp" row from a real agent failure.
|
|
331
|
+
*/
|
|
332
|
+
private clampSupportedByBackend;
|
|
333
|
+
private executeScheduledRoutine;
|
|
334
|
+
/**
|
|
335
|
+
* Handle a morning-routine retry wake task.
|
|
336
|
+
*
|
|
337
|
+
* Steps:
|
|
338
|
+
* 1. Early skip: if today.md already exists (e.g., the cron-fired
|
|
339
|
+
* morning routine raced us to it), mark this wake task completed
|
|
340
|
+
* without running the agent — saves one Opus session.
|
|
341
|
+
* 2. Synthesize a RoutineEvent with `event.data.retryCount` carrying
|
|
342
|
+
* the current attempt number, so that the recursive
|
|
343
|
+
* scheduleMorningRetry call from executeMorningRoutine can increment the
|
|
344
|
+
* retry chain naturally via the event.data code path.
|
|
345
|
+
* 3. Invoke executeMorningRoutine — this reuses the full morning-routine flow
|
|
346
|
+
* (rotateDayFiles, prompt selection, agent execute, post-result
|
|
347
|
+
* today.md check, roadmap_refresh emission).
|
|
348
|
+
* 4. Mark the wake task row completed. processResult inside the
|
|
349
|
+
* executeMorningRoutine call operates on the synthetic RoutineEvent, which
|
|
350
|
+
* is not an AgentTaskEvent, so it does not touch scheduleId — we
|
|
351
|
+
* must do it ourselves.
|
|
352
|
+
*/
|
|
353
|
+
private handleMorningRoutineRetry;
|
|
354
|
+
hasCurrentAgentDayTodayMd(): boolean;
|
|
355
|
+
/**
|
|
356
|
+
* Inspect today.md and report its state relative to the current agent-day.
|
|
357
|
+
* Used by the post-routine retry gate so the log can distinguish between
|
|
358
|
+
* "file is missing" and "file has stale H1 date", which are different
|
|
359
|
+
* failure modes (process crash vs. format-confusion bug).
|
|
360
|
+
*/
|
|
361
|
+
diagnoseTodayMdState(): TodayMdState;
|
|
362
|
+
/**
|
|
363
|
+
* Rotate day files before Morning Routine:
|
|
364
|
+
* 1. today.md → schedule/YYYY-MM-DD.md (archive)
|
|
365
|
+
* 2. today.md → yesterday.md (rename for context injection)
|
|
366
|
+
*
|
|
367
|
+
* After this, ContextBuilder will read yesterday.md as <yesterday>
|
|
368
|
+
* and today.md will not exist (agent generates it fresh).
|
|
369
|
+
*/
|
|
370
|
+
rotateDayFiles(): void;
|
|
371
|
+
/**
|
|
372
|
+
* Roadmap-refresh execution with an exclusive cross-request write
|
|
373
|
+
* lock. The lockId is surfaced to the session context as
|
|
374
|
+
* `<roadmap_write_lock_id>` so the task-flow PUT / PATCH calls can
|
|
375
|
+
* pass `X-Lock-Id` and other concurrent flows (DM handler, evening
|
|
376
|
+
* sweeper) that attempt to write `/api/context/roadmap` during the
|
|
377
|
+
* refresh receive a 409.
|
|
378
|
+
*
|
|
379
|
+
* If the lock cannot be acquired (another session is mid-write), the
|
|
380
|
+
* refresh is skipped — `emitRoadmapRefresh` will retry on the next
|
|
381
|
+
* qualifying signal (dedup window permitting). This is the correct
|
|
382
|
+
* behaviour: the holder is already producing a fresher roadmap than
|
|
383
|
+
* anything we would emit right now.
|
|
384
|
+
*/
|
|
385
|
+
executeRoadmapRefresh(event: Event): Promise<void>;
|
|
386
|
+
/**
|
|
387
|
+
* P22 §3.4 — skill curation routine. Provisions an isolated optimizer
|
|
388
|
+
* workdir, hands the runId + runToken into the agent's task context via
|
|
389
|
+
* `event.data`, and tears the workdir down regardless of success/failure.
|
|
390
|
+
*
|
|
391
|
+
* The standard `executeDefault` path produces the agent session itself —
|
|
392
|
+
* the only differences from a normal routine are: (a) the workdir is the
|
|
393
|
+
* pre-built optimizer dir (built by `materializeOptimizerWorkdir`), and
|
|
394
|
+
* (b) `executeDefault` recognises `routine.skill_curation` events and
|
|
395
|
+
* pins `allowedToolsOverride` to `SKILL_CURATION_OPTIMIZER_ALLOWED_TOOLS`,
|
|
396
|
+
* which the Claude SDK consumes verbatim and which suspends Allow-mode
|
|
397
|
+
* `bypassPermissions`. The curation API's run-token + Zod chokepoint
|
|
398
|
+
* remains the safety floor for the rare case the override is bypassed
|
|
399
|
+
* (e.g. a future backend that doesn't read `allowedTools`).
|
|
400
|
+
*/
|
|
401
|
+
executeSkillCurationRoutine(event: Event): Promise<void>;
|
|
402
|
+
executeDefault(event: Event): Promise<void>;
|
|
403
|
+
/** Bridge for `MorningRoutineRunner`'s `formatSqliteDatetime` use. */
|
|
404
|
+
static formatScheduledFor(date: Date): string;
|
|
405
|
+
}
|
|
406
|
+
//# sourceMappingURL=dispatcher-scheduled-tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatcher-scheduled-tasks.d.ts","sourceRoot":"","sources":["../../src/core/dispatcher-scheduled-tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,KAAK,EAGN,MAAM,eAAe,CAAC;AAoBvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAmBhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA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