@telora/daemon 0.17.78 → 0.17.86
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 +9 -5
- package/build-info.json +9 -3
- package/dist/audit-hooks.d.ts +24 -0
- package/dist/audit-hooks.d.ts.map +1 -1
- package/dist/audit-hooks.js +52 -1
- package/dist/audit-hooks.js.map +1 -1
- package/dist/audit-phase.d.ts +30 -6
- package/dist/audit-phase.d.ts.map +1 -1
- package/dist/audit-phase.js +46 -18
- package/dist/audit-phase.js.map +1 -1
- package/dist/auto-update.d.ts +8 -4
- package/dist/auto-update.d.ts.map +1 -1
- package/dist/auto-update.js +9 -5
- package/dist/auto-update.js.map +1 -1
- package/dist/cli/backfill-frt-prose.d.ts +34 -0
- package/dist/cli/backfill-frt-prose.d.ts.map +1 -1
- package/dist/cli/backfill-frt-prose.js +53 -4
- package/dist/cli/backfill-frt-prose.js.map +1 -1
- package/dist/cli/codex-provision.d.ts +28 -0
- package/dist/cli/codex-provision.d.ts.map +1 -1
- package/dist/cli/codex-provision.js +35 -1
- package/dist/cli/codex-provision.js.map +1 -1
- package/dist/cli/connect.d.ts +25 -15
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +76 -20
- package/dist/cli/connect.js.map +1 -1
- package/dist/completion/read-only-pristine.d.ts +63 -0
- package/dist/completion/read-only-pristine.d.ts.map +1 -0
- package/dist/completion/read-only-pristine.js +87 -0
- package/dist/completion/read-only-pristine.js.map +1 -0
- package/dist/completion/team-completion.d.ts.map +1 -1
- package/dist/completion/team-completion.js +20 -1
- package/dist/completion/team-completion.js.map +1 -1
- package/dist/condition-evaluators.d.ts.map +1 -1
- package/dist/condition-evaluators.js +36 -0
- package/dist/condition-evaluators.js.map +1 -1
- package/dist/focus-executor.d.ts +47 -1
- package/dist/focus-executor.d.ts.map +1 -1
- package/dist/focus-executor.js +95 -8
- package/dist/focus-executor.js.map +1 -1
- package/dist/focus-lifecycle.js +7 -7
- package/dist/focus-lifecycle.js.map +1 -1
- package/dist/focus-merge.d.ts +40 -0
- package/dist/focus-merge.d.ts.map +1 -1
- package/dist/focus-merge.js +84 -0
- package/dist/focus-merge.js.map +1 -1
- package/dist/focus-provisioning.js +7 -7
- package/dist/focus-provisioning.js.map +1 -1
- package/dist/focus-stage-lifecycle.d.ts +64 -1
- package/dist/focus-stage-lifecycle.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle.js +140 -2
- package/dist/focus-stage-lifecycle.js.map +1 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/listener.d.ts.map +1 -1
- package/dist/listener.js +2 -1
- package/dist/listener.js.map +1 -1
- package/dist/loop-engine.d.ts.map +1 -1
- package/dist/loop-engine.js +12 -3
- package/dist/loop-engine.js.map +1 -1
- package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
- package/dist/prompt-sections/execution-sections.js +19 -1
- package/dist/prompt-sections/execution-sections.js.map +1 -1
- package/dist/prompt-sections/role-sections.d.ts +8 -0
- package/dist/prompt-sections/role-sections.d.ts.map +1 -1
- package/dist/prompt-sections/role-sections.js +46 -11
- package/dist/prompt-sections/role-sections.js.map +1 -1
- package/dist/prompts/starter-prompt.d.ts +1 -1
- package/dist/prompts/starter-prompt.d.ts.map +1 -1
- package/dist/prompts/starter-prompt.js +1 -1
- package/dist/queries/deliveries.d.ts +17 -0
- package/dist/queries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries.js +3 -0
- package/dist/queries/deliveries.js.map +1 -1
- package/dist/queries/focuses.d.ts +48 -0
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +101 -0
- package/dist/queries/focuses.js.map +1 -1
- package/dist/queries/index.d.ts +2 -2
- package/dist/queries/index.d.ts.map +1 -1
- package/dist/queries/index.js +1 -1
- package/dist/queries/index.js.map +1 -1
- package/dist/queries/local-models.d.ts +26 -0
- package/dist/queries/local-models.d.ts.map +1 -0
- package/dist/queries/local-models.js +31 -0
- package/dist/queries/local-models.js.map +1 -0
- package/dist/queries/schemas.d.ts +28 -0
- package/dist/queries/schemas.d.ts.map +1 -1
- package/dist/queries/schemas.js +31 -0
- package/dist/queries/schemas.js.map +1 -1
- package/dist/retire-aware-restatement.d.ts +26 -0
- package/dist/retire-aware-restatement.d.ts.map +1 -1
- package/dist/retire-aware-restatement.js +98 -17
- package/dist/retire-aware-restatement.js.map +1 -1
- package/dist/self-update.d.ts +21 -0
- package/dist/self-update.d.ts.map +1 -1
- package/dist/self-update.js +56 -4
- package/dist/self-update.js.map +1 -1
- package/dist/spawner/lifecycle.d.ts.map +1 -1
- package/dist/spawner/lifecycle.js +9 -6
- package/dist/spawner/lifecycle.js.map +1 -1
- package/dist/templates/claude-settings.d.ts +36 -1
- package/dist/templates/claude-settings.d.ts.map +1 -1
- package/dist/templates/claude-settings.js +63 -12
- package/dist/templates/claude-settings.js.map +1 -1
- package/dist/unified-init.d.ts.map +1 -1
- package/dist/unified-init.js +40 -1
- package/dist/unified-init.js.map +1 -1
- package/dist/unified-shell.d.ts.map +1 -1
- package/dist/unified-shell.js +11 -1
- package/dist/unified-shell.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ For long-running daemon hosts, install globally so `telora-daemon update` and th
|
|
|
21
21
|
npm install -g @telora/daemon
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
`npx
|
|
24
|
+
`npx` is supported only for one-shot bootstrap commands (`init`, `connect`, `check-update`). The long-running daemon (`run`/`start`) **refuses** to run from an npx cache and exits with the global-install instruction: the cache makes the running binary effectively immutable -- `npm install -g` writes to the global prefix while the process keeps loading the cached copy, so a daemon launched via npx could never self-update. Install on disk (`npm install -g @telora/daemon`) and start `telora-daemon run`. (The refusal is overridable for false positives via `TELORA_ALLOW_NPX_RUN=1`, but a non-updating daemon is not recommended.)
|
|
25
25
|
|
|
26
26
|
> **Note:** The `.mcp.json` file for Claude Code integration is auto-generated by `telora-daemon init`.
|
|
27
27
|
|
|
@@ -77,11 +77,15 @@ telora-daemon run
|
|
|
77
77
|
### Option 3: One-shot via npx
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
|
-
npx -p @telora/daemon telora-daemon init # interactive setup
|
|
81
|
-
|
|
80
|
+
npx -p @telora/daemon telora-daemon init # interactive setup (one-shot)
|
|
81
|
+
npm install -g @telora/daemon # then install on disk
|
|
82
|
+
telora-daemon run # start the daemon
|
|
82
83
|
```
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
npx is fine for the one-shot `init`, but the long-running daemon refuses to run
|
|
86
|
+
from an npx cache -- it can't update itself there. Install globally with
|
|
87
|
+
`npm install -g @telora/daemon` and start `telora-daemon run` for any host you
|
|
88
|
+
expect to leave running.
|
|
85
89
|
|
|
86
90
|
## Updating
|
|
87
91
|
|
|
@@ -92,7 +96,7 @@ telora-daemon update # stop, install latest, apply migrations, restart
|
|
|
92
96
|
|
|
93
97
|
When installed globally or from a git checkout, the daemon also self-updates on a periodic timer (configurable via `autoUpdate.intervalMs` in `.telora/daemon.json`, or disable with `--no-auto-update`).
|
|
94
98
|
|
|
95
|
-
|
|
99
|
+
The long-running daemon refuses to run from an npx cache, so there is no auto-updating npx mode. If you reach an npx-cache daemon via the `TELORA_ALLOW_NPX_RUN` override, `telora-daemon update` cannot restart it in place (the running process loads from a cache it just cleared); install on disk instead -- `npm install -g @telora/daemon`, then `telora-daemon run`.
|
|
96
100
|
|
|
97
101
|
## Configuration
|
|
98
102
|
|
package/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commitSha": "
|
|
3
|
-
"builtAt": "2026-06-
|
|
2
|
+
"commitSha": "2807cfea",
|
|
3
|
+
"builtAt": "2026-06-16T02:36:21.911Z",
|
|
4
4
|
"expectedMigrations": [
|
|
5
5
|
"20250829113330_create_org_nodes_table.sql",
|
|
6
6
|
"20250829113402_fix_function_security_search_path.sql",
|
|
@@ -633,6 +633,12 @@
|
|
|
633
633
|
"20260614222838_product_focuses_answer_rearm.sql",
|
|
634
634
|
"20260614231203_product_requests_reopen_audit.sql",
|
|
635
635
|
"20260615103408_add_frt_statement_drafted.sql",
|
|
636
|
-
"20260615105344_add_verify_classification.sql"
|
|
636
|
+
"20260615105344_add_verify_classification.sql",
|
|
637
|
+
"20260615132122_add_work_facing_to_org_nodes.sql",
|
|
638
|
+
"20260615222011_audit_playbooks_tree_authoring_discipline.sql",
|
|
639
|
+
"20260615225446_add_focus_ratification_signal.sql",
|
|
640
|
+
"20260615235758_local_models_registry.sql",
|
|
641
|
+
"20260616000657_focus_local_model_overrides.sql",
|
|
642
|
+
"20260616005744_harden_local_model_rpc_auth.sql"
|
|
637
643
|
]
|
|
638
644
|
}
|
package/dist/audit-hooks.d.ts
CHANGED
|
@@ -9,4 +9,28 @@
|
|
|
9
9
|
* Used for read-only audit sessions.
|
|
10
10
|
*/
|
|
11
11
|
export declare function installAuditPreCommitHook(worktreePath: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Write (or merge into) the worktree's `.claude/settings.json` a write-deny
|
|
14
|
+
* overlay so a read-only audit team physically cannot Write/Edit or run
|
|
15
|
+
* write-shaped Bash.
|
|
16
|
+
*
|
|
17
|
+
* The daemon spawns agents with `--dangerously-skip-permissions
|
|
18
|
+
* --setting-sources project,local`, which (a) reads the worktree's
|
|
19
|
+
* `.claude/settings.json` (project source) and (b) still HARD-ENFORCES explicit
|
|
20
|
+
* `permissions.deny` entries (the bypass only auto-approves the *ask* tier).
|
|
21
|
+
* So a deny overlay here is the tool-layer enforcement of read-only mode --
|
|
22
|
+
* the pre-commit hook (installAuditPreCommitHook) is retained as
|
|
23
|
+
* defense-in-depth on top of it.
|
|
24
|
+
*
|
|
25
|
+
* Idempotent: re-running merges the deny list, deduplicated, producing no diff.
|
|
26
|
+
* MUST only be called for read-only focuses -- a writable focus's settings
|
|
27
|
+
* must never carry a `deny` key.
|
|
28
|
+
*/
|
|
29
|
+
export declare function writeReadOnlyDenyOverlay(worktreePath: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Install all read-only audit enforcement in a worktree: the commit-blocking
|
|
32
|
+
* pre-commit hook AND the write-deny settings overlay. Single entry point so
|
|
33
|
+
* every read-only worktree-setup site gets identical coverage.
|
|
34
|
+
*/
|
|
35
|
+
export declare function installReadOnlyAuditGuards(worktreePath: string): void;
|
|
12
36
|
//# sourceMappingURL=audit-hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-hooks.d.ts","sourceRoot":"","sources":["../src/audit-hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"audit-hooks.d.ts","sourceRoot":"","sources":["../src/audit-hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAiCpE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CA0BnE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAGrE"}
|
package/dist/audit-hooks.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* Installs a git pre-commit hook in a worktree that blocks all commits,
|
|
5
5
|
* providing an informative message about the read-only audit mode.
|
|
6
6
|
*/
|
|
7
|
-
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
7
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
8
8
|
import { join } from 'node:path';
|
|
9
9
|
import { runGitSync } from './git-types.js';
|
|
10
|
+
import { buildClaudeSettings, mergeClaudeSettings } from './templates/claude-settings.js';
|
|
10
11
|
/**
|
|
11
12
|
* Install a pre-commit hook in a worktree that blocks all commits.
|
|
12
13
|
* Used for read-only audit sessions.
|
|
@@ -42,4 +43,54 @@ export function installAuditPreCommitHook(worktreePath) {
|
|
|
42
43
|
// Point this worktree's git config at the custom hooks directory
|
|
43
44
|
runGitSync(['config', 'core.hooksPath', hooksDir], worktreePath);
|
|
44
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Write (or merge into) the worktree's `.claude/settings.json` a write-deny
|
|
48
|
+
* overlay so a read-only audit team physically cannot Write/Edit or run
|
|
49
|
+
* write-shaped Bash.
|
|
50
|
+
*
|
|
51
|
+
* The daemon spawns agents with `--dangerously-skip-permissions
|
|
52
|
+
* --setting-sources project,local`, which (a) reads the worktree's
|
|
53
|
+
* `.claude/settings.json` (project source) and (b) still HARD-ENFORCES explicit
|
|
54
|
+
* `permissions.deny` entries (the bypass only auto-approves the *ask* tier).
|
|
55
|
+
* So a deny overlay here is the tool-layer enforcement of read-only mode --
|
|
56
|
+
* the pre-commit hook (installAuditPreCommitHook) is retained as
|
|
57
|
+
* defense-in-depth on top of it.
|
|
58
|
+
*
|
|
59
|
+
* Idempotent: re-running merges the deny list, deduplicated, producing no diff.
|
|
60
|
+
* MUST only be called for read-only focuses -- a writable focus's settings
|
|
61
|
+
* must never carry a `deny` key.
|
|
62
|
+
*/
|
|
63
|
+
export function writeReadOnlyDenyOverlay(worktreePath) {
|
|
64
|
+
const dir = join(worktreePath, '.claude');
|
|
65
|
+
if (!existsSync(dir)) {
|
|
66
|
+
mkdirSync(dir, { recursive: true });
|
|
67
|
+
}
|
|
68
|
+
const settingsPath = join(dir, 'settings.json');
|
|
69
|
+
let existing = null;
|
|
70
|
+
if (existsSync(settingsPath)) {
|
|
71
|
+
try {
|
|
72
|
+
const parsed = JSON.parse(readFileSync(settingsPath, 'utf-8'));
|
|
73
|
+
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
74
|
+
existing = parsed;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
// Corrupt settings file -- log and overwrite with the deny overlay rather
|
|
79
|
+
// than leave a read-only worktree without enforcement.
|
|
80
|
+
console.warn(`[audit-hooks] Existing ${settingsPath} is not valid JSON, overwriting with read-only overlay: ` +
|
|
81
|
+
`${err instanceof Error ? err.message : String(err)}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const merged = mergeClaudeSettings(existing, buildClaudeSettings({ readOnly: true }));
|
|
85
|
+
writeFileSync(settingsPath, JSON.stringify(merged, null, 2) + '\n');
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Install all read-only audit enforcement in a worktree: the commit-blocking
|
|
89
|
+
* pre-commit hook AND the write-deny settings overlay. Single entry point so
|
|
90
|
+
* every read-only worktree-setup site gets identical coverage.
|
|
91
|
+
*/
|
|
92
|
+
export function installReadOnlyAuditGuards(worktreePath) {
|
|
93
|
+
installAuditPreCommitHook(worktreePath);
|
|
94
|
+
writeReadOnlyDenyOverlay(worktreePath);
|
|
95
|
+
}
|
|
45
96
|
//# sourceMappingURL=audit-hooks.js.map
|
package/dist/audit-hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-hooks.js","sourceRoot":"","sources":["../src/audit-hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"audit-hooks.js","sourceRoot":"","sources":["../src/audit-hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1F;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,YAAoB;IAC5D,sDAAsD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,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;YAC/D,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBACnE,QAAQ,GAAG,MAAiC,CAAC;YAC/C,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,0EAA0E;YAC1E,uDAAuD;YACvD,OAAO,CAAC,IAAI,CACV,0BAA0B,YAAY,0DAA0D;gBAC9F,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACxD,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACtF,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AACtE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,YAAoB;IAC7D,yBAAyB,CAAC,YAAY,CAAC,CAAC;IACxC,wBAAwB,CAAC,YAAY,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/audit-phase.d.ts
CHANGED
|
@@ -22,10 +22,25 @@ import type { DaemonConfig } from './types.js';
|
|
|
22
22
|
* code-level diff, then the live graph it must reconcile.
|
|
23
23
|
*/
|
|
24
24
|
export declare const AUDIT_ASSEMBLY_RECIPE: readonly string[];
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* MCP tool names the assessor session is permitted to call.
|
|
27
|
+
*
|
|
28
|
+
* The audit is READ-ONLY w.r.t. code but AUTHORS intent structure: a CRT
|
|
29
|
+
* (entities + UDEs) plus an FRT of injections, self-validated via
|
|
30
|
+
* telora_reality_tree action=derive_frt (read-only, carried on the
|
|
31
|
+
* telora_reality_tree tool), then anchored to planning deliveries via
|
|
32
|
+
* telora_product_delivery create (injectionNodeId + executionStatus). It must
|
|
33
|
+
* NOT touch workflow state otherwise, and must NOT file remediation issues.
|
|
34
|
+
*/
|
|
26
35
|
export declare const AUDIT_MCP_TOOLS: readonly string[];
|
|
27
|
-
/**
|
|
28
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Default Claude model for the audit assessor. Override via deps.
|
|
38
|
+
* Opus: the audit authors a navigable causal tree + injection plan a human
|
|
39
|
+
* reviews before any fix runs -- the reasoning depth (root-cause attribution,
|
|
40
|
+
* FRT self-validation) warrants the stronger model. Matched as a substring by
|
|
41
|
+
* the telemetry pricing table (see spawner/lifecycle AUDIT_CAPTURE_MODEL).
|
|
42
|
+
*/
|
|
43
|
+
export declare const AUDIT_DEFAULT_MODEL = "opus";
|
|
29
44
|
/** Default timeout for the assessor session (15 minutes). */
|
|
30
45
|
export declare const AUDIT_DEFAULT_TIMEOUT_MS: number;
|
|
31
46
|
/**
|
|
@@ -35,9 +50,18 @@ export declare const AUDIT_DEFAULT_TIMEOUT_MS: number;
|
|
|
35
50
|
*/
|
|
36
51
|
export declare const AUDIT_LINEAGE = "audit";
|
|
37
52
|
/**
|
|
38
|
-
* Audit prompt
|
|
39
|
-
*
|
|
40
|
-
*
|
|
53
|
+
* Audit prompt: the tree-authoring discipline for the read-only audit
|
|
54
|
+
* assessor. The assessor authors a CRT + an FRT of injections and anchors a
|
|
55
|
+
* navigable plan a human reviews BEFORE any fix runs -- it never emits a flat
|
|
56
|
+
* remediation task checklist.
|
|
57
|
+
*
|
|
58
|
+
* CANONICAL SOURCE OF TRUTH for this guidance is the MCP-package constant
|
|
59
|
+
* AUDIT_TREE_AUTHORING_GUIDE in
|
|
60
|
+
* mcp/telora-products/src/handlers/auditTreeAuthoringGuide.ts (surfaced inline
|
|
61
|
+
* by telora_discover when the reality-tree domain loads). The daemon cannot
|
|
62
|
+
* runtime-import the MCP package (no cross-package runtime import), so the
|
|
63
|
+
* prose is duplicated here; keep the two in sync. The audit-summary tail block
|
|
64
|
+
* is daemon-specific (parsed by parseAuditSummary) and lives only here.
|
|
41
65
|
*/
|
|
42
66
|
export declare const AUDIT_PROMPT: string;
|
|
43
67
|
export interface AuditPhaseResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-phase.d.ts","sourceRoot":"","sources":["../src/audit-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAkC,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3F,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAQlD,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"audit-phase.d.ts","sourceRoot":"","sources":["../src/audit-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAkC,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3F,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAQlD,CAAC;AAEF;;;;;;;;;GASG;AACH,eA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;IAC9I,qBAAqB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5D,eAAe,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACxE,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,CAAC;IACrD,SAAS,EAAE,MAAM,YAAY,CAAC;IAC9B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClF,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3F;AAMD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CA4C9D;AA+BD,eAAO,MAAM,gBAAgB,EAAE,cAkB9B,CAAC;AAMF;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,cAAiC,GACtC,OAAO,CAAC,gBAAgB,CAAC,CA2H3B"}
|
package/dist/audit-phase.js
CHANGED
|
@@ -37,15 +37,31 @@ export const AUDIT_ASSEMBLY_RECIPE = [
|
|
|
37
37
|
'agent_escalations',
|
|
38
38
|
'reality_tree.snapshot',
|
|
39
39
|
];
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* MCP tool names the assessor session is permitted to call.
|
|
42
|
+
*
|
|
43
|
+
* The audit is READ-ONLY w.r.t. code but AUTHORS intent structure: a CRT
|
|
44
|
+
* (entities + UDEs) plus an FRT of injections, self-validated via
|
|
45
|
+
* telora_reality_tree action=derive_frt (read-only, carried on the
|
|
46
|
+
* telora_reality_tree tool), then anchored to planning deliveries via
|
|
47
|
+
* telora_product_delivery create (injectionNodeId + executionStatus). It must
|
|
48
|
+
* NOT touch workflow state otherwise, and must NOT file remediation issues.
|
|
49
|
+
*/
|
|
41
50
|
export const AUDIT_MCP_TOOLS = [
|
|
42
51
|
'mcp__telora-products__telora_reality_tree',
|
|
43
52
|
'mcp__telora-products__telora_reality_tree_node',
|
|
44
53
|
'mcp__telora-products__telora_reality_tree_edge',
|
|
45
54
|
'mcp__telora-products__telora_reality_tree_link',
|
|
55
|
+
'mcp__telora-products__telora_product_delivery',
|
|
46
56
|
];
|
|
47
|
-
/**
|
|
48
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Default Claude model for the audit assessor. Override via deps.
|
|
59
|
+
* Opus: the audit authors a navigable causal tree + injection plan a human
|
|
60
|
+
* reviews before any fix runs -- the reasoning depth (root-cause attribution,
|
|
61
|
+
* FRT self-validation) warrants the stronger model. Matched as a substring by
|
|
62
|
+
* the telemetry pricing table (see spawner/lifecycle AUDIT_CAPTURE_MODEL).
|
|
63
|
+
*/
|
|
64
|
+
export const AUDIT_DEFAULT_MODEL = 'opus';
|
|
49
65
|
/** Default timeout for the assessor session (15 minutes). */
|
|
50
66
|
export const AUDIT_DEFAULT_TIMEOUT_MS = 15 * 60 * 1000;
|
|
51
67
|
/**
|
|
@@ -55,25 +71,37 @@ export const AUDIT_DEFAULT_TIMEOUT_MS = 15 * 60 * 1000;
|
|
|
55
71
|
*/
|
|
56
72
|
export const AUDIT_LINEAGE = 'audit';
|
|
57
73
|
/**
|
|
58
|
-
* Audit prompt
|
|
59
|
-
*
|
|
60
|
-
*
|
|
74
|
+
* Audit prompt: the tree-authoring discipline for the read-only audit
|
|
75
|
+
* assessor. The assessor authors a CRT + an FRT of injections and anchors a
|
|
76
|
+
* navigable plan a human reviews BEFORE any fix runs -- it never emits a flat
|
|
77
|
+
* remediation task checklist.
|
|
78
|
+
*
|
|
79
|
+
* CANONICAL SOURCE OF TRUTH for this guidance is the MCP-package constant
|
|
80
|
+
* AUDIT_TREE_AUTHORING_GUIDE in
|
|
81
|
+
* mcp/telora-products/src/handlers/auditTreeAuthoringGuide.ts (surfaced inline
|
|
82
|
+
* by telora_discover when the reality-tree domain loads). The daemon cannot
|
|
83
|
+
* runtime-import the MCP package (no cross-package runtime import), so the
|
|
84
|
+
* prose is duplicated here; keep the two in sync. The audit-summary tail block
|
|
85
|
+
* is daemon-specific (parsed by parseAuditSummary) and lives only here.
|
|
61
86
|
*/
|
|
62
87
|
export const AUDIT_PROMPT = [
|
|
63
|
-
'You are the
|
|
88
|
+
'You are the read-only reality-tree audit assessor for a Telora focus.',
|
|
89
|
+
'',
|
|
90
|
+
'A safe audit emits a TREE and a PLAN, never a task checklist. You are READ-ONLY with respect to code: discovery only. You author the intent structure -- the current reality, its root causes, and the leverage points -- and you anchor a plan a human reviews BEFORE any fix runs. You do NOT fix anything, and you do NOT file remediation Task or Bug issues. Remediation is scoped LATER, one root cause at a time, from the injections you anchor here -- so there is no flat checklist to complete with completion-vigor and churn stays bounded to the real defects.',
|
|
91
|
+
'',
|
|
92
|
+
'Work in rounds:',
|
|
93
|
+
'',
|
|
94
|
+
'1. Facts -> CRT. Author the current reality. Create the focus reality tree if none exists (telora_reality_tree action=create), then add an entity node per real component/observation and an undesired_effect (UDE) node per observed problem (telora_reality_tree_node action=create). State what IS, in evidence terms -- not a fix.',
|
|
95
|
+
'',
|
|
96
|
+
'2. Relationships -> causal edges. Wire cause -> effect with telora_reality_tree_edge action=create (cause node -> effect node). This is the load-bearing round: edges turn a list of symptoms into a causal structure, so a single deep cause feeding many surface UDEs across different audit areas becomes visible as ONE root in ONE tree -- which stops "one delivery per area" sprawl.',
|
|
64
97
|
'',
|
|
65
|
-
'
|
|
98
|
+
'3. Leverage -> injections. Propose injection nodes at the LOWEST / root causes (the nodes with the most downstream UDEs), not at the symptoms. One injection at a root can clear a whole subtree of UDEs.',
|
|
66
99
|
'',
|
|
67
|
-
'
|
|
100
|
+
'4. Self-validate -> derive_frt. Call telora_reality_tree action=derive_frt with the treeId. This is read-only: it returns the cleared/flipped UDE sets the injections produce. Confirm each injection flips the UDEs you targeted. If a UDE is left unresolved by your injection set, REPORT it in the summary -- do not hide it and do not lower the bar to make the tree look clean.',
|
|
68
101
|
'',
|
|
69
|
-
'
|
|
70
|
-
'- Add or refresh evidence on an entity node when the diff shows a related change.',
|
|
71
|
-
'- Retire an injection node (set status=verified, run reality_tree_node verify) when the FRT overlay is observably true.',
|
|
72
|
-
'- Add a new entity node for an observation the tree does not yet capture.',
|
|
73
|
-
'- Flip a UDE to a desired_effect via the verify mutation when the targeted injection has retired and reality has shifted.',
|
|
74
|
-
'- Adjust an edge when a dependency appears or dissolves.',
|
|
102
|
+
'5. Anchor the plan -> injection-anchored deliveries. For each injection, create a remediation delivery with telora_product_delivery action=create, passing injectionNodeId=<the injection node> and executionStatus="planning". Set its acceptance to the FRT desired effect -- the future-state the injection produces (what becomes true once the root cause is cleared), NOT a list of edits. This is the navigable plan the human reviews before anything executes.',
|
|
75
103
|
'',
|
|
76
|
-
'Do NOT
|
|
104
|
+
'Explicitly: your output is the tree + the anchored planning deliveries ONLY. Do NOT create remediation Task or Bug issues during the audit. Do NOT create one delivery per audit area -- unify the audit into ONE focus tree and let each injection (each root cause) anchor exactly one planning delivery. Do NOT mutate workflow state beyond creating those planning deliveries, and do NOT attempt fixes.',
|
|
77
105
|
'',
|
|
78
106
|
'When you are done, emit ONE fenced markdown block as the very last thing in your output, exactly in this shape (do not skip any field):',
|
|
79
107
|
'',
|
|
@@ -81,10 +109,10 @@ export const AUDIT_PROMPT = [
|
|
|
81
109
|
'nodes_touched: <integer>',
|
|
82
110
|
'edges_touched: <integer>',
|
|
83
111
|
'summary: |',
|
|
84
|
-
' <markdown narrative -- one bullet per
|
|
112
|
+
' <markdown narrative -- one bullet per UDE/injection/anchored delivery, with seq numbers; call out any UDE left unresolved by derive_frt>',
|
|
85
113
|
'```',
|
|
86
114
|
'',
|
|
87
|
-
'If you
|
|
115
|
+
'If you author nothing (the tree already reflects reality and needs no new injections), still emit the block with nodes_touched: 0 / edges_touched: 0 and a one-line summary explaining why.',
|
|
88
116
|
].join('\n');
|
|
89
117
|
// ---------------------------------------------------------------------------
|
|
90
118
|
// Summary parser
|
package/dist/audit-phase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-phase.js","sourceRoot":"","sources":["../src/audit-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,qBAAqB,EAAwB,MAAM,sBAAsB,CAAC;AACnF,oEAAoE;AACpE,OAAO,yBAAyB,CAAC;AACjC,OAAO,EACL,6BAA6B,GAE9B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAoB,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EACL,eAAe,IAAI,sBAAsB,GAG1C,MAAM,oBAAoB,CAAC;AAG5B,8EAA8E;AAC9E,0CAA0C;AAC1C,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,eAAe;IACf,oBAAoB;IACpB,+CAA+C;IAC/C,uBAAuB;IACvB,yBAAyB;IACzB,mBAAmB;IACnB,uBAAuB;CACxB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"audit-phase.js","sourceRoot":"","sources":["../src/audit-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,qBAAqB,EAAwB,MAAM,sBAAsB,CAAC;AACnF,oEAAoE;AACpE,OAAO,yBAAyB,CAAC;AACjC,OAAO,EACL,6BAA6B,GAE9B,MAAM,sCAAsC,CAAC;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BAAuB,CAAC,CAAC;IACvC,CAAC;IACD,QAAQ,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAC7C,QAAQ,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAE7C,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,cAAc,CAAC;gBACxB,UAAU;gBACV,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,YAAY,EAAE,OAAO,CAAC,YAAY;aACnC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC,qBAAsB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QACzB,OAAO;YACL,OAAO,EAAE,UAAU;YACnB,SAAS,EAAE,eAAe,WAAW,mBAAmB,MAAM,CAAC,MAAM,WAAW;YAChF,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,eAAe,WAAW,OAAO,OAAO,CAAC,YAAY,mBAAmB,OAAO,CAAC,YAAY,gBAAgB;QACvH,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
package/dist/auto-update.d.ts
CHANGED
|
@@ -96,11 +96,15 @@ export declare function createUpdateController(deps: AutoUpdateDeps): UpdateCont
|
|
|
96
96
|
/**
|
|
97
97
|
* Start the safe-seam auto-update loop.
|
|
98
98
|
*
|
|
99
|
-
* Disabled entirely when running from an ephemeral npx cache: `npm install -g`
|
|
100
|
-
* writes to the global prefix, but the running process keeps loading from
|
|
101
|
-
* `~/.npm/_npx/<hash>/`, so a "successful" install would not take effect.
|
|
102
|
-
*
|
|
103
99
|
* Returns a cleanup function that stops the timer.
|
|
100
|
+
*
|
|
101
|
+
* NOTE: the npx-cache branch below is now a DEAD PATH for the normal run/start
|
|
102
|
+
* flow. The runtime refusal guard (`isNpxRunMode` in unified-shell.ts /
|
|
103
|
+
* index.ts) exits the process before any engine -- or this loop -- starts, so a
|
|
104
|
+
* daemon that reaches `startAutoUpdateLoop` is already on a stable on-disk
|
|
105
|
+
* install. The check is retained as cheap defense-in-depth (e.g. if the guard
|
|
106
|
+
* is overridden via TELORA_ALLOW_NPX_RUN, auto-update still correctly disables
|
|
107
|
+
* itself rather than spinning an install that can never take effect).
|
|
104
108
|
*/
|
|
105
109
|
export declare function startAutoUpdateLoop(opts: AutoUpdateOptions): () => void;
|
|
106
110
|
//# sourceMappingURL=auto-update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-update.d.ts","sourceRoot":"","sources":["../src/auto-update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB;;;;OAIG;IACH,yBAAyB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC/C,8EAA8E;IAC9E,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,sFAAsF;IACtF,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1D,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kFA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mC;IACnC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC;CAC1B;AAED,mFAAmF;AACnF,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,sFAAsF;IACtF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAmBvE;AAED,sFAAsF;AACtF,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,cAAc,GAAG,gBAAgB,CA4G7E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,IAAI,CA4BvE"}
|
package/dist/auto-update.js
CHANGED
|
@@ -147,16 +147,20 @@ export function createUpdateController(deps) {
|
|
|
147
147
|
/**
|
|
148
148
|
* Start the safe-seam auto-update loop.
|
|
149
149
|
*
|
|
150
|
-
* Disabled entirely when running from an ephemeral npx cache: `npm install -g`
|
|
151
|
-
* writes to the global prefix, but the running process keeps loading from
|
|
152
|
-
* `~/.npm/_npx/<hash>/`, so a "successful" install would not take effect.
|
|
153
|
-
*
|
|
154
150
|
* Returns a cleanup function that stops the timer.
|
|
151
|
+
*
|
|
152
|
+
* NOTE: the npx-cache branch below is now a DEAD PATH for the normal run/start
|
|
153
|
+
* flow. The runtime refusal guard (`isNpxRunMode` in unified-shell.ts /
|
|
154
|
+
* index.ts) exits the process before any engine -- or this loop -- starts, so a
|
|
155
|
+
* daemon that reaches `startAutoUpdateLoop` is already on a stable on-disk
|
|
156
|
+
* install. The check is retained as cheap defense-in-depth (e.g. if the guard
|
|
157
|
+
* is overridden via TELORA_ALLOW_NPX_RUN, auto-update still correctly disables
|
|
158
|
+
* itself rather than spinning an install that can never take effect).
|
|
155
159
|
*/
|
|
156
160
|
export function startAutoUpdateLoop(opts) {
|
|
157
161
|
const { intervalMs = DEFAULT_SAMPLE_INTERVAL_MS } = opts;
|
|
158
162
|
if (detectInstallMode() === 'npx') {
|
|
159
|
-
console.log('[auto-update] Disabled: running from npx cache.
|
|
163
|
+
console.log('[auto-update] Disabled: running from npx cache. Install globally with `npm install -g @telora/daemon` and start `telora-daemon run` to enable auto-update.');
|
|
160
164
|
return () => { };
|
|
161
165
|
}
|
|
162
166
|
let stopped = false;
|
package/dist/auto-update.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-update.js","sourceRoot":"","sources":["../src/auto-update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAoDjD;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACnD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAG,GAAG,WAAW,SAAS,CAAC;QACv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O,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACtF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,CAAC;AAClB,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAuB;IACzD,MAAM,EAAE,UAAU,GAAG,0BAA0B,EAAE,GAAG,IAAI,CAAC;IAEzD,IAAI,iBAAiB,EAAE,KAAK,KAAK,EAAE,CAAC;QAClC,OAAO,CAAC,GAAG,CACT,4JAA4J,CAC7J,CAAC;QACF,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,UAAU,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAEhD,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,IAAI,OAAO;YAAE,OAAO;QACpB,KAAK,UAAU,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC,EAAE,UAAU,CAAC,CAAC;IACf,2BAA2B;IAC3B,KAAK,CAAC,KAAK,EAAE,CAAC;IAEd,OAAO,CAAC,GAAG,CACT,oDAAoD,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CACtF,CAAC;IAEF,OAAO,GAAG,EAAE;QACV,OAAO,GAAG,IAAI,CAAC;QACf,aAAa,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -28,6 +28,19 @@
|
|
|
28
28
|
* injection's flipped UDEs from durable `reality_tree_node_history` (the
|
|
29
29
|
* `targets` edges are deleted at verify) and authors any missing `frt_statement`.
|
|
30
30
|
*
|
|
31
|
+
* PROVENANCE-FREE HISTORICAL TAIL. Some flipped DEs pre-date instrumentation:
|
|
32
|
+
* they have NEITHER a `reality_tree_node_history` row NOR surviving `targets`
|
|
33
|
+
* edges, so the precise per-node history path above finds no provenance and
|
|
34
|
+
* drops them -- their `frt_statement` stays blank forever (present-tense UDE
|
|
35
|
+
* text in the Ship Log / FRT canvas). This command enables the helper's opt-in
|
|
36
|
+
* PROVENANCE-FREE FALLBACK (`includeProvenanceFreeFallback: true`) on BOTH the
|
|
37
|
+
* dry-run and write paths so those blank flipped DEs are also authored,
|
|
38
|
+
* conditioned on the TREE's verified/retired injection statements (the same
|
|
39
|
+
* list for every fallback node on the tree). The fallback is OFF by default
|
|
40
|
+
* everywhere else (the active eager loop + departed-focus catch-up never set
|
|
41
|
+
* it), so it can never interfere with going-forward per-injection authoring;
|
|
42
|
+
* the precise per-node history path still wins whenever provenance exists.
|
|
43
|
+
*
|
|
31
44
|
* Idempotent: the helper authors only nodes whose `frt_statement` is still blank
|
|
32
45
|
* and whose base statement is still the raw pre-flip UDE text. Re-runs are safe
|
|
33
46
|
* and converge to a no-op.
|
|
@@ -61,6 +74,27 @@
|
|
|
61
74
|
* that its node was in the resolved cascade (flipped or `resolved===true`) for
|
|
62
75
|
* that tree -- surviving UDEs are intentionally left untouched.
|
|
63
76
|
*
|
|
77
|
+
* PROVENANCE-FREE TAIL -- POST-DEPLOY OPERATOR VERIFICATION (NOT an automated
|
|
78
|
+
* check; the test suite cannot reach prod data). After this change deploys,
|
|
79
|
+
* an OPERATOR performs the following against PROD by hand:
|
|
80
|
+
*
|
|
81
|
+
* 1. Run `telora-daemon backfill-frt-prose --dry-run` against the prod config.
|
|
82
|
+
* With the provenance-free fallback now enabled, the dry-run should
|
|
83
|
+
* enumerate the historical-tail flipped DEs that the per-node history path
|
|
84
|
+
* previously skipped -- expect the count of blank cascade DEs across
|
|
85
|
+
* completed focuses (~66 at time of writing) to be the bulk of what is
|
|
86
|
+
* now reported as `[would author]`, trending toward 0 once authored.
|
|
87
|
+
* 2. Once the preview looks right, run the real write:
|
|
88
|
+
* `telora-daemon backfill-frt-prose`.
|
|
89
|
+
* 3. Spot-check ONE repaired completed focus: open its Ship Log AND its FRT
|
|
90
|
+
* canvas and confirm the previously present-tense flipped UDE entries now
|
|
91
|
+
* read as future-state desired-effect prose. Re-run `--dry-run` to confirm
|
|
92
|
+
* it converges to ~0 remaining candidates (idempotent no-op on re-run).
|
|
93
|
+
*
|
|
94
|
+
* This is a one-time post-deploy operator observation step, deliberately NOT
|
|
95
|
+
* wired into CI -- it depends on live prod completed-focus data that the local
|
|
96
|
+
* DB does not carry.
|
|
97
|
+
*
|
|
64
98
|
* @module cli/backfill-frt-prose
|
|
65
99
|
*/
|
|
66
100
|
import { loadConfig } from '../config.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backfill-frt-prose.d.ts","sourceRoot":"","sources":["../../src/cli/backfill-frt-prose.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"backfill-frt-prose.d.ts","sourceRoot":"","sources":["../../src/cli/backfill-frt-prose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkGG;AAEH,OAAO,EAAE,UAAU,EAAoB,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,YAAY,EAA6B,MAAM,sBAAsB,CAAC;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,kCAAkC,IAAI,yCAAyC,EAC/E,yCAAyC,IAAI,gDAAgD,EAC9F,MAAM,gCAAgC,CAAC;AAYxC,MAAM,WAAW,0BAA0B;IACzC,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,6FAA6F;IAC7F,kCAAkC,CAAC,EAAE,OAAO,yCAAyC,CAAC;IACtF,iGAAiG;IACj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