mixdog 0.9.25 → 0.9.26
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/package.json +1 -1
- package/scripts/steering-fold-provenance-test.mjs +71 -0
- package/scripts/webhook-smoke.mjs +46 -53
- package/src/defaults/skills/setup/SKILL.md +6 -1
- package/src/rules/shared/01-tool.md +8 -4
- package/src/runtime/agent/orchestrator/agent-trace-io.mjs +17 -0
- package/src/runtime/agent/orchestrator/mcp/child-tree.mjs +2 -2
- package/src/runtime/agent/orchestrator/mcp/client.mjs +28 -10
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth.mjs +8 -1
- package/src/runtime/agent/orchestrator/providers/anthropic.mjs +14 -1
- package/src/runtime/agent/orchestrator/providers/oauth-usage.mjs +51 -15
- package/src/runtime/agent/orchestrator/session/agent-loop.mjs +5 -1
- package/src/runtime/agent/orchestrator/session/loop/steering-ladder.mjs +164 -9
- package/src/runtime/agent/orchestrator/session/loop/stored-tool-args.mjs +45 -0
- package/src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs +4 -0
- package/src/runtime/agent/orchestrator/session/tool-batch.mjs +12 -1
- package/src/runtime/agent/orchestrator/tools/builtin/shell-jobs.mjs +2 -2
- package/src/runtime/agent/orchestrator/tools/shell-state.mjs +7 -3
- package/src/runtime/channels/lib/config.mjs +13 -11
- package/src/runtime/channels/lib/memory-client.mjs +22 -2
- package/src/runtime/channels/lib/owned-runtime.mjs +1 -1
- package/src/runtime/channels/lib/scheduler.mjs +226 -208
- package/src/runtime/channels/lib/status-snapshot.mjs +16 -0
- package/src/runtime/channels/lib/webhook/deliveries.mjs +7 -318
- package/src/runtime/channels/lib/webhook.mjs +98 -150
- package/src/runtime/channels/lib/worker-main.mjs +1 -1
- package/src/runtime/memory/index.mjs +50 -25
- package/src/runtime/memory/lib/cycle-scheduler.mjs +3 -1
- package/src/runtime/memory/lib/memory-config-flags.mjs +13 -1
- package/src/runtime/memory/lib/pg/adapter.mjs +6 -1
- package/src/runtime/memory/lib/pg/process.mjs +19 -1
- package/src/runtime/memory/lib/pg/supervisor.mjs +125 -14
- package/src/runtime/memory/lib/query-handlers.mjs +102 -0
- package/src/runtime/memory/lib/recall-format.mjs +60 -22
- package/src/runtime/memory/lib/session-ingest-runtime.mjs +20 -6
- package/src/runtime/memory/tool-defs.mjs +1 -1
- package/src/runtime/shared/child-guardian.mjs +2 -2
- package/src/runtime/shared/open-url.mjs +2 -1
- package/src/runtime/shared/schedules-db.mjs +350 -0
- package/src/runtime/shared/service-discovery.mjs +169 -0
- package/src/runtime/shared/spawn-flags.mjs +27 -0
- package/src/runtime/shared/tool-primitives.mjs +3 -1
- package/src/runtime/shared/tool-surface.mjs +19 -3
- package/src/runtime/shared/update-checker.mjs +54 -10
- package/src/runtime/shared/webhooks-db.mjs +405 -0
- package/src/session-runtime/channel-config-api.mjs +13 -13
- package/src/session-runtime/lifecycle-api.mjs +14 -0
- package/src/session-runtime/runtime-core.mjs +39 -20
- package/src/standalone/agent-tool.mjs +42 -11
- package/src/standalone/channel-admin.mjs +173 -121
- package/src/standalone/channel-worker.mjs +2 -2
- package/src/standalone/memory-runtime-proxy.mjs +10 -5
- package/src/tui/App.jsx +32 -10
- package/src/tui/app/channel-pickers.mjs +9 -9
- package/src/tui/app/clipboard.mjs +14 -0
- package/src/tui/app/doctor.mjs +1 -1
- package/src/tui/app/maintenance-pickers.mjs +17 -7
- package/src/tui/app/settings-picker.mjs +2 -2
- package/src/tui/app/transcript-window.mjs +37 -1
- package/src/tui/app/use-mouse-input.mjs +19 -6
- package/src/tui/components/ToolExecution.jsx +12 -4
- package/src/tui/display-width.mjs +10 -4
- package/src/tui/dist/index.mjs +129 -55
- package/src/tui/engine/session-api-ext.mjs +12 -12
- package/src/tui/index.jsx +12 -2
- package/src/ui/statusline-segments.mjs +12 -1
- package/vendor/ink/build/display-width.js +5 -4
- package/src/runtime/shared/schedules-store.mjs +0 -82
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canonical reader for registered schedules.
|
|
3
|
-
*
|
|
4
|
-
* `<Mixdog data dir>/schedules/<name>/` is the single source of truth.
|
|
5
|
-
* Each schedule directory contains a single `SCHEDULE.md` — YAML-ish
|
|
6
|
-
* frontmatter (name/description lead per the SKILL.md convention, then
|
|
7
|
-
* metadata: time/timezone/days/channel/model/enabled) plus a markdown
|
|
8
|
-
* body (the prompt). Both the setup UI (POST /schedules) and the
|
|
9
|
-
* `schedule-add` skill write the same one file; every reader —
|
|
10
|
-
* setup-server (GET /schedules), channels/lib/config.mjs (loadConfig),
|
|
11
|
-
* status/aggregator.mjs — must go through listSchedules() so a single
|
|
12
|
-
* entry shape is presented everywhere.
|
|
13
|
-
*
|
|
14
|
-
* The legacy `mixdog-config.json` `channels.schedules.items` /
|
|
15
|
-
* `channels.nonInteractive` / `channels.interactive` arrays are no longer
|
|
16
|
-
* consulted. Clean cut: the old `config.json` + `instructions.md` pair is
|
|
17
|
-
* no longer read — no in-code fallback.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import { readFileSync, readdirSync } from 'fs';
|
|
21
|
-
import { join } from 'path';
|
|
22
|
-
import { resolvePluginData } from './plugin-paths.mjs';
|
|
23
|
-
import { readMarkdownDocument } from './markdown-frontmatter.mjs';
|
|
24
|
-
|
|
25
|
-
function schedulesDir() {
|
|
26
|
-
return join(resolvePluginData(), 'schedules');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function readTextFile(path) {
|
|
30
|
-
try { return readFileSync(path, 'utf8'); }
|
|
31
|
-
catch { return ''; }
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* List every registered schedule.
|
|
36
|
-
*
|
|
37
|
-
* Return shape per entry: `{ name, ...frontmatter, prompt }`.
|
|
38
|
-
* - `name` is the directory name (slug).
|
|
39
|
-
* - `description` from frontmatter (display-only; defaults to '').
|
|
40
|
-
* - Spread of `SCHEDULE.md` frontmatter keys (time/timezone/days/channel/
|
|
41
|
-
* model/enabled). All frontmatter values arrive as strings; `enabled` is
|
|
42
|
-
* cast to a boolean here so downstream `s.enabled !== false` filters work.
|
|
43
|
-
* Frontmatter `name` is display-only and never overrides the dir slug used
|
|
44
|
-
* for identity/routing.
|
|
45
|
-
* - `prompt` carries the `SCHEDULE.md` body (empty string when the file is
|
|
46
|
-
* missing — caller decides whether that is a hard error).
|
|
47
|
-
*
|
|
48
|
-
* Returns an empty array when the directory does not exist (fresh
|
|
49
|
-
* install with no schedules registered yet).
|
|
50
|
-
*/
|
|
51
|
-
export function listSchedules() {
|
|
52
|
-
const dir = schedulesDir();
|
|
53
|
-
const out = [];
|
|
54
|
-
let entries;
|
|
55
|
-
try {
|
|
56
|
-
entries = readdirSync(dir, { withFileTypes: true });
|
|
57
|
-
} catch {
|
|
58
|
-
// ENOENT (fresh install, no schedules/ yet) / EACCES -> empty list.
|
|
59
|
-
// Replaces the previous existsSync check, which was racy: the dir
|
|
60
|
-
// could disappear between existsSync and readdirSync.
|
|
61
|
-
return out;
|
|
62
|
-
}
|
|
63
|
-
for (const ent of entries) {
|
|
64
|
-
if (!ent.isDirectory()) continue;
|
|
65
|
-
const name = ent.name;
|
|
66
|
-
const { frontmatter, body } = readMarkdownDocument(readTextFile(join(dir, name, 'SCHEDULE.md')));
|
|
67
|
-
const cfg = { ...frontmatter };
|
|
68
|
-
// Frontmatter is all-strings; cast enabled so `s.enabled !== false`
|
|
69
|
-
// filters (config.mjs, scheduler.mjs) treat `enabled: false` correctly.
|
|
70
|
-
if (Object.prototype.hasOwnProperty.call(cfg, 'enabled')) {
|
|
71
|
-
cfg.enabled = cfg.enabled !== 'false' && cfg.enabled !== false;
|
|
72
|
-
}
|
|
73
|
-
// Dir name is canonical identity; frontmatter `name` is display-only and
|
|
74
|
-
// must not override the slug. `description` defaults to '' (backward compat
|
|
75
|
-
// for old files with no such key).
|
|
76
|
-
const description = String(cfg.description || '');
|
|
77
|
-
delete cfg.name;
|
|
78
|
-
delete cfg.description;
|
|
79
|
-
out.push({ name, description, ...cfg, prompt: body });
|
|
80
|
-
}
|
|
81
|
-
return out;
|
|
82
|
-
}
|