@telora/daemon 0.14.23 → 0.14.25

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.
@@ -14,5 +14,5 @@
14
14
  * `claude` as a positional first-message arg without re-resolving the
15
15
  * package install path.
16
16
  */
17
- export declare const STARTER_PROMPT = "# Welcome to Telora.\n\nYou are inside a freshly connected Telora session. The Telora daemon is\nrunning, the MCP server is loaded, and a product is bound to this repo.\nThis message is the user's first turn -- treat it as your operating script\nfor the session.\n\nThere are two phases. Run them in order, no chat in between.\n\n## Phase 1 \u2014 Silent green-light validation\n\nValidate the chain end-to-end. Be terse. Do not explain what you are\ndoing while you do it.\n\n1. Read `daemon.json` from the daemon state dir. The state dir is\n `$TELORA_STATE_DIR` if set, otherwise `~/.telora`. Extract\n `teloraUrl`, `organizationId`, and the single product entry's\n `id` and `repoPath`. (The connect flow always writes a single-product\n config.)\n2. Call `telora_product_get` with the product id. Confirm it returns a\n product with a name. Capture the name -- you'll surface it in step 5.\n3. Confirm the daemon is running by checking that\n `<state-dir>/daemon.meta.json` exists. The state dir is\n `$TELORA_STATE_DIR` if set, otherwise `~/.telora`. (Use the Bash\n tool to test the path; do not call any heartbeat tool -- the file's\n presence is the canonical liveness signal.)\n4. Call `telora_product_strategy_list` with the product id. An empty\n list is fine. The point is to confirm an MCP write-class tool is\n reachable.\n5. Print exactly ONE line, in this shape:\n\n Connected to <Product Name> \u00B7 daemon running \u00B7 MCP tools loaded.\n\n No bullet points. No diagnostic dump. If every check passed, that\n one line is the entire output of phase 1.\n\nIf any check fails, do NOT print the green-light line. Print the\nspecific failure with a remediation hint, then stop. Do not enter\nphase 2 with a broken chain. Examples:\n\n- If `daemon.json` is missing from the state dir: \"No\n `daemon.json` in `$TELORA_STATE_DIR` (or `~/.telora`) -- re-run\n the connect one-liner from Telora.\"\n- If `telora_product_get` returns nothing: \"Product <id> is not\n reachable -- the token may have been bound to a deleted product.\"\n- If `daemon.meta.json` is missing: \"Daemon is not running -- start\n it with `npx telora-daemon start`.\"\n- If MCP tools aren't callable: \"MCP server didn't load -- restart\n this Claude Code session.\"\n\n## Phase 2 \u2014 Opinionated guided flow\n\nAfter printing the green-light line, ask the user exactly ONE\nquestion, then act on the answer:\n\n> What capability do you want to build first?\n\nWait for the user's answer. Do not ask follow-ups about their tech\nstack, files in the repo, team size, or anything operational. Telora\nis an intent-shaped control plane: the user steers; the machine\ndecomposes.\n\nWhen the user answers:\n\n1. Create a strategy via `telora_product_strategy_create` for the\n bound product. Use the user's stated intent to write a clear name\n (3-7 words) and a 1-2 sentence description that captures the\n capability the user is going after -- not the implementation.\n2. Decompose the strategy into 2-4 phase-shaped deliveries via\n `telora_product_delivery_create`, in priority order. Each\n delivery represents a phase of *one* capability, not a task list.\n Good shapes: foundation/skeleton, primary feature, polish/extension.\n Bad shapes: a single delivery per technical layer (\"API\",\n \"UI\", \"tests\") -- that is a task split, not a phase split.\n3. Do NOT create issues under the deliveries. The team-lead agent\n that runs when the user fires execution will scope tasks. Your\n job is the planning skeleton.\n4. Surface the play button. Tell the user, in two short lines:\n\n - The strategy + deliveries are in Telora at\n `<teloraUrl-friendly>/products/<product_id>` -- use the\n `teloraUrl` from the state-dir `daemon.json` (strip the trailing\n `functions/v1/...`-style path if present; the user-facing app\n lives at the same domain).\n - To start execution, open the strategy and assign an agent role\n -- that is the single high-leverage signal that puts the\n decomposition into motion.\n\nEnd there. Do not explain Telora's architecture. Do not propose what\nthe user should do next. The Play button is the next move.\n\n## Constraints (read these before you start)\n\n- Stay at the intent layer. If the user's answer is operational\n (\"set up TypeScript with strict mode\"), gently re-cast it into a\n capability shape (\"a TypeScript project skeleton with strict\n type-checking on every commit\") before decomposing.\n- Be brief. This is a script, not a conversation. Phase 1 is one\n line of output. Phase 2 is one question, then a few MCP calls and\n a two-line hand-off. No headings. No bullet lists in the user-\n facing output. No \"As an AI assistant...\".\n- Don't propose tasks. Deliveries only. The downstream team agent\n scopes tasks when execution starts.\n- If you can't proceed at any point, surface the specific failure\n and stop -- do not improvise around a broken chain.\n";
17
+ export declare const STARTER_PROMPT = "# Welcome to Telora.\n\nYou are inside a freshly connected Telora session. The Telora daemon is\nrunning, the MCP server is loaded, and a product is bound to this repo.\nThis message is the user's first turn -- treat it as your operating script\nfor the session.\n\nThere are two phases. Run them in order, no chat in between.\n\n## Phase 1 \u2014 Silent green-light validation\n\nValidate the chain end-to-end. Be terse. Do not explain what you are\ndoing while you do it.\n\n1. Read `daemon.json` from the daemon state dir. The state dir is\n `$TELORA_STATE_DIR` if set, otherwise `~/.telora`. Extract\n `teloraUrl`, `organizationId`, and the single product entry's\n `id` and `repoPath`. (The connect flow always writes a single-product\n config.)\n2. Call `telora_product_get` with the product id. Confirm it returns a\n product with a name. Capture the name -- you'll surface it in step 5.\n3. Confirm the daemon is running by checking that\n `<state-dir>/daemon.meta.json` exists. The state dir is\n `$TELORA_STATE_DIR` if set, otherwise `~/.telora`. (Use the Bash\n tool to test the path; do not call any heartbeat tool -- the file's\n presence is the canonical liveness signal.)\n4. Call `telora_product_strategy_list` with the product id. An empty\n list is fine. The point is to confirm an MCP write-class tool is\n reachable.\n5. Print exactly ONE line, in this shape:\n\n Connected to <Product Name> \u00B7 daemon running \u00B7 MCP tools loaded.\n\n No bullet points. No diagnostic dump. If every check passed, that\n one line is the entire output of phase 1.\n\nIf any check fails, do NOT print the green-light line. Print the\nspecific failure with a remediation hint, then stop. Do not enter\nphase 2 with a broken chain. Examples:\n\n- If `daemon.json` is missing from the state dir: \"No\n `daemon.json` in `$TELORA_STATE_DIR` (or `~/.telora`) -- re-run\n the connect one-liner from Telora.\"\n- If `telora_product_get` returns nothing: \"Product <id> is not\n reachable -- the token may have been bound to a deleted product.\"\n- If `daemon.meta.json` is missing: \"Daemon is not running -- start\n it with `npx telora-daemon start`.\"\n- If MCP tools aren't callable: \"MCP server didn't load -- restart\n this Claude Code session.\"\n\n## Phase 1.5 \u2014 Bootstrap rename offer (only if marker is present)\n\nBefore phase 2, check whether `<state-dir>/<repo>/.telora/.product-bootstrapped`\nexists in this repo. (Same state-dir resolution as phase 1: `$TELORA_STATE_DIR`\noverrides; otherwise the file lives at `<repo>/.telora/.product-bootstrapped`.)\nThe connect flow drops it when the redeem step created the bound product\non the fly using your repo's directory name.\n\nIf the marker exists:\n\n1. Tell the user, in one short line:\n\n Your product is named `<name>` from your repo's directory. Want a\n different name? (yes/no, or type one)\n\n2. Wait for the user's answer.\n - \"no\" / blank / \"keep\" \u2192 leave it.\n - Anything else \u2192 call `telora_product_update` with the bound\n product id and the new name.\n3. Delete `<repo>/.telora/.product-bootstrapped` (Bash `rm`) so this\n offer is one-shot. Do not loop on it.\n\nIf the marker is absent (the bound-token path), skip phase 1.5\nentirely and go straight to phase 2.\n\n## Phase 2 \u2014 Opinionated guided flow\n\nAfter phase 1.5 (or after phase 1 if no marker), ask the user exactly\nONE question, then act on the answer:\n\n> What capability do you want to build first?\n\nWait for the user's answer. Do not ask follow-ups about their tech\nstack, files in the repo, team size, or anything operational. Telora\nis an intent-shaped control plane: the user steers; the machine\ndecomposes.\n\nWhen the user answers:\n\n1. Create a strategy via `telora_product_strategy_create` for the\n bound product. Use the user's stated intent to write a clear name\n (3-7 words) and a 1-2 sentence description that captures the\n capability the user is going after -- not the implementation.\n2. Decompose the strategy into 2-4 phase-shaped deliveries via\n `telora_product_delivery_create`, in priority order. Each\n delivery represents a phase of *one* capability, not a task list.\n Good shapes: foundation/skeleton, primary feature, polish/extension.\n Bad shapes: a single delivery per technical layer (\"API\",\n \"UI\", \"tests\") -- that is a task split, not a phase split.\n3. Do NOT create issues under the deliveries. The team-lead agent\n that runs when the user fires execution will scope tasks. Your\n job is the planning skeleton.\n4. Surface the play button. Tell the user, in two short lines:\n\n - The strategy + deliveries are in Telora at\n `<teloraUrl-friendly>/products/<product_id>` -- use the\n `teloraUrl` from the state-dir `daemon.json` (strip the trailing\n `functions/v1/...`-style path if present; the user-facing app\n lives at the same domain).\n - To start execution, open the strategy and assign an agent role\n -- that is the single high-leverage signal that puts the\n decomposition into motion.\n\nEnd there. Do not explain Telora's architecture. Do not propose what\nthe user should do next. The Play button is the next move.\n\n## Constraints (read these before you start)\n\n- Stay at the intent layer. If the user's answer is operational\n (\"set up TypeScript with strict mode\"), gently re-cast it into a\n capability shape (\"a TypeScript project skeleton with strict\n type-checking on every commit\") before decomposing.\n- Be brief. This is a script, not a conversation. Phase 1 is one\n line of output. Phase 2 is one question, then a few MCP calls and\n a two-line hand-off. No headings. No bullet lists in the user-\n facing output. No \"As an AI assistant...\".\n- Don't propose tasks. Deliveries only. The downstream team agent\n scopes tasks when execution starts.\n- If you can't proceed at any point, surface the specific failure\n and stop -- do not improvise around a broken chain.\n";
18
18
  //# sourceMappingURL=starter-prompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"starter-prompt.d.ts","sourceRoot":"","sources":["../../src/prompts/starter-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,cAAc,s4JAyG1B,CAAC"}
1
+ {"version":3,"file":"starter-prompt.d.ts","sourceRoot":"","sources":["../../src/prompts/starter-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,cAAc,k5LAkI1B,CAAC"}
@@ -64,10 +64,35 @@ phase 2 with a broken chain. Examples:
64
64
  - If MCP tools aren't callable: "MCP server didn't load -- restart
65
65
  this Claude Code session."
66
66
 
67
+ ## Phase 1.5 — Bootstrap rename offer (only if marker is present)
68
+
69
+ Before phase 2, check whether \`<state-dir>/<repo>/.telora/.product-bootstrapped\`
70
+ exists in this repo. (Same state-dir resolution as phase 1: \`$TELORA_STATE_DIR\`
71
+ overrides; otherwise the file lives at \`<repo>/.telora/.product-bootstrapped\`.)
72
+ The connect flow drops it when the redeem step created the bound product
73
+ on the fly using your repo's directory name.
74
+
75
+ If the marker exists:
76
+
77
+ 1. Tell the user, in one short line:
78
+
79
+ Your product is named \`<name>\` from your repo's directory. Want a
80
+ different name? (yes/no, or type one)
81
+
82
+ 2. Wait for the user's answer.
83
+ - "no" / blank / "keep" → leave it.
84
+ - Anything else → call \`telora_product_update\` with the bound
85
+ product id and the new name.
86
+ 3. Delete \`<repo>/.telora/.product-bootstrapped\` (Bash \`rm\`) so this
87
+ offer is one-shot. Do not loop on it.
88
+
89
+ If the marker is absent (the bound-token path), skip phase 1.5
90
+ entirely and go straight to phase 2.
91
+
67
92
  ## Phase 2 — Opinionated guided flow
68
93
 
69
- After printing the green-light line, ask the user exactly ONE
70
- question, then act on the answer:
94
+ After phase 1.5 (or after phase 1 if no marker), ask the user exactly
95
+ ONE question, then act on the answer:
71
96
 
72
97
  > What capability do you want to build first?
73
98
 
@@ -1 +1 @@
1
- {"version":3,"file":"starter-prompt.js","sourceRoot":"","sources":["../../src/prompts/starter-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyG7B,CAAC"}
1
+ {"version":3,"file":"starter-prompt.js","sourceRoot":"","sources":["../../src/prompts/starter-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkI7B,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Seeded `CLAUDE.md` template written to the user's repo at connect time.
3
+ *
4
+ * Goal: when an agent walks into the repo for the first time, it already
5
+ * knows how Telora frames work (planning hierarchy, issue workflow, MCP
6
+ * tool surface, asks-vs-acts boundaries) without having to re-derive any
7
+ * of it from scratch. Reference-shaped, not narrative.
8
+ *
9
+ * The connect flow either creates this file fresh (no existing CLAUDE.md)
10
+ * or appends a delimited Telora section to an existing one. The delimiters
11
+ * are stable strings used by the merge logic to detect / replace the
12
+ * Telora block on re-runs.
13
+ */
14
+ export declare const TELORA_CLAUDE_MD_BEGIN = "<!-- BEGIN TELORA SEED -->";
15
+ export declare const TELORA_CLAUDE_MD_END = "<!-- END TELORA SEED -->";
16
+ /**
17
+ * Render a fresh-repo CLAUDE.md.
18
+ *
19
+ * @param productName Optional product name. If supplied, surfaced at the
20
+ * top of the file so the agent immediately knows what they're bound to.
21
+ * Pass null for unbound seed (rare; only first-cycle).
22
+ */
23
+ export declare function renderClaudeMd(productName: string | null): string;
24
+ //# sourceMappingURL=claude-md.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../src/templates/claude-md.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,oBAAoB,6BAA6B,CAAC;AA8F/D;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CASjE"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Seeded `CLAUDE.md` template written to the user's repo at connect time.
3
+ *
4
+ * Goal: when an agent walks into the repo for the first time, it already
5
+ * knows how Telora frames work (planning hierarchy, issue workflow, MCP
6
+ * tool surface, asks-vs-acts boundaries) without having to re-derive any
7
+ * of it from scratch. Reference-shaped, not narrative.
8
+ *
9
+ * The connect flow either creates this file fresh (no existing CLAUDE.md)
10
+ * or appends a delimited Telora section to an existing one. The delimiters
11
+ * are stable strings used by the merge logic to detect / replace the
12
+ * Telora block on re-runs.
13
+ */
14
+ export const TELORA_CLAUDE_MD_BEGIN = '<!-- BEGIN TELORA SEED -->';
15
+ export const TELORA_CLAUDE_MD_END = '<!-- END TELORA SEED -->';
16
+ const SEED_BODY = `# Telora workstation context
17
+
18
+ This repo is connected to Telora -- a differential control plane for
19
+ software delivery. Intent and reality are paired signals; the meaningful
20
+ work happens at the difference.
21
+
22
+ ## Planning hierarchy
23
+
24
+ - **Strategy** = one capability. All phases of building one thing belong
25
+ in one strategy. Strategies are not phases; if a strategy looks like a
26
+ phase, consolidate it.
27
+ - **Delivery** = a shippable phase or major component of a capability.
28
+ - **Context Group** = optional grouping of related issues that share
29
+ meaningful context (relevant files, architectural notes). A CG earns its
30
+ existence by carrying context, not by being a folder.
31
+ - **Task** = one discrete implementable unit. Bounded files, focused
32
+ session. Multiple "and" clauses across different concerns means split.
33
+
34
+ Scope by purpose, not count. The right number of deliveries is however
35
+ many phases the work naturally has.
36
+
37
+ ## Issue workflow
38
+
39
+ \`To Do\` -> \`In Progress\` -> \`In Review\` / \`Blocked\` -> \`Done\`.
40
+
41
+ Issue types: **Context Group**, **Task**, **Bug**.
42
+
43
+ Movement rules:
44
+
45
+ - An issue MUST be set to \`In Progress\` before any work begins on it.
46
+ - Never skip \`In Progress\`. Never move directly from \`To Do\` to \`Done\`.
47
+ - Set status with \`telora_product_issue\` action=update.
48
+
49
+ Delivery and strategy stages advance automatically based on issue
50
+ activity. Agents never set delivery executionStatus directly.
51
+
52
+ ## MCP tool surface (what's available in this session)
53
+
54
+ The Telora MCP server is registered in \`.mcp.json\`. Core tool families:
55
+
56
+ - \`telora_product\` -- list/get/create/update products
57
+ - \`telora_product_strategy\` -- strategies under a product
58
+ - \`telora_product_delivery\` -- deliveries under a strategy
59
+ - \`telora_product_issue\` -- issues (Context Groups, Tasks, Bugs) under a delivery
60
+ - \`telora_objective\` / \`telora_key_result\` -- OKRs
61
+ - \`telora_agent\` -- agent roles, escalation requests
62
+ - \`telora_factory_*\` -- factory blueprints, specs, instances, work units
63
+ - \`telora_loop_*\` -- loop documents, questions, answers
64
+ - \`telora_save_point\` -- session save points
65
+ - \`telora_discover\` -- on-demand registration of deferred tool domains
66
+
67
+ Resolve the live tool list at runtime via \`telora_discover\` rather than
68
+ hard-coding a list that drifts.
69
+
70
+ ## Human-vs-agent boundaries
71
+
72
+ - Humans own **intent** and **completion**.
73
+ - Intent: what capability matters, what changes when. Pre-handoff.
74
+ - Completion: closing the loop on whether a strategy is done. Post-handoff.
75
+ - Agents own **scoping** and **execution**.
76
+ - Scoping: decomposing a strategy into deliveries, deliveries into
77
+ issues, restructuring mid-flight as the agent learns more.
78
+ - Execution: writing code, running tests, committing, reporting.
79
+
80
+ Do not ask humans for operational details they expect the agent to figure
81
+ out. Do not silently complete a strategy on the human's behalf. Escalate
82
+ when stuck via \`telora_agent\` action=escalate.
83
+
84
+ ## Differential signaling
85
+
86
+ Telora is asymmetric: it moves reality toward intent, never the reverse.
87
+ Agents do not lower the bar to make signals look better -- they escalate.
88
+ Every artifact (commit, work summary, gate result) is signal toward the
89
+ declared intent; raw activity without intent reduction is noise.
90
+
91
+ A short corrective comment from the user is high-signal -- treat brief
92
+ pushback as the most important input in the session.
93
+
94
+ ## Workflows and policies
95
+
96
+ - **Workflow**: stage directives shape agent behavior at discrete
97
+ transitions. What context the agent sees (assembly recipes), what tools
98
+ it can use, how it thinks (prompt + model). Live in Telora's
99
+ \`workflow_stages.agent_directive\` JSONB.
100
+ - **Policy** (organizational, deferred): cross-cutting constraints that
101
+ feed into stage directives.
102
+
103
+ When you cross a stage transition, the daemon may inject context or spawn
104
+ a fresh sub-agent per the directive. Don't override that flow without a
105
+ clear reason.
106
+ `;
107
+ /**
108
+ * Render a fresh-repo CLAUDE.md.
109
+ *
110
+ * @param productName Optional product name. If supplied, surfaced at the
111
+ * top of the file so the agent immediately knows what they're bound to.
112
+ * Pass null for unbound seed (rare; only first-cycle).
113
+ */
114
+ export function renderClaudeMd(productName) {
115
+ const productLine = productName
116
+ ? `Connected to Telora product: **${productName}**.\n\n`
117
+ : '';
118
+ const block = `${TELORA_CLAUDE_MD_BEGIN}\n` +
119
+ `${productLine}${SEED_BODY}` +
120
+ `${TELORA_CLAUDE_MD_END}\n`;
121
+ return block;
122
+ }
123
+ //# sourceMappingURL=claude-md.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../src/templates/claude-md.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AACnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AAE/D,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FjB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,WAA0B;IACvD,MAAM,WAAW,GAAG,WAAW;QAC7B,CAAC,CAAC,kCAAkC,WAAW,SAAS;QACxD,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,KAAK,GACT,GAAG,sBAAsB,IAAI;QAC7B,GAAG,WAAW,GAAG,SAAS,EAAE;QAC5B,GAAG,oBAAoB,IAAI,CAAC;IAC9B,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Seeded `.claude/settings.json` template written to the user's repo at
3
+ * connect time. Provides a permissions allowlist so a fresh agent doing
4
+ * routine Telora work doesn't trigger a permission prompt on every MCP
5
+ * tool call.
6
+ *
7
+ * Rule of thumb for what goes in here: any read or routine write the agent
8
+ * is *expected* to make as part of a normal product/strategy/delivery/issue
9
+ * cycle. Operations that warrant human awareness (deletes, escalations,
10
+ * arbitrary shell, network calls outside Telora) stay un-allowlisted so
11
+ * the user is prompted.
12
+ *
13
+ * Format mirrors `~/.claude/settings.json` (Claude Code's user-level
14
+ * settings schema): `permissions.allow` is a list of tool patterns. MCP
15
+ * tool patterns follow the form `mcp__<server-name>__<tool-name>`.
16
+ */
17
+ export interface TeloraSettingsTemplate {
18
+ permissions: {
19
+ allow: string[];
20
+ };
21
+ }
22
+ export declare function buildClaudeSettings(): TeloraSettingsTemplate;
23
+ /**
24
+ * Deep-merge a Telora-seeded settings object into an existing parsed
25
+ * settings.json. The shape returned here is JSON-stringifiable.
26
+ *
27
+ * Merge semantics:
28
+ * - `permissions.allow`: union, deduplicated, preserving the user's order
29
+ * first then appending any of our entries that aren't already present.
30
+ * Re-running connect produces no diff.
31
+ * - All other top-level keys: untouched. We only own the permissions list.
32
+ */
33
+ export declare function mergeClaudeSettings(existing: Record<string, unknown> | null, seed: TeloraSettingsTemplate): Record<string, unknown>;
34
+ //# sourceMappingURL=claude-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-settings.d.ts","sourceRoot":"","sources":["../../src/templates/claude-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE;QACX,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;CACH;AAiCD,wBAAgB,mBAAmB,IAAI,sBAAsB,CAM5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACxC,IAAI,EAAE,sBAAsB,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyBzB"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Seeded `.claude/settings.json` template written to the user's repo at
3
+ * connect time. Provides a permissions allowlist so a fresh agent doing
4
+ * routine Telora work doesn't trigger a permission prompt on every MCP
5
+ * tool call.
6
+ *
7
+ * Rule of thumb for what goes in here: any read or routine write the agent
8
+ * is *expected* to make as part of a normal product/strategy/delivery/issue
9
+ * cycle. Operations that warrant human awareness (deletes, escalations,
10
+ * arbitrary shell, network calls outside Telora) stay un-allowlisted so
11
+ * the user is prompted.
12
+ *
13
+ * Format mirrors `~/.claude/settings.json` (Claude Code's user-level
14
+ * settings schema): `permissions.allow` is a list of tool patterns. MCP
15
+ * tool patterns follow the form `mcp__<server-name>__<tool-name>`.
16
+ */
17
+ /**
18
+ * Routine MCP tool calls expected during a normal Telora session.
19
+ *
20
+ * Listed individually rather than wildcarded -- Claude Code's matcher
21
+ * doesn't support glob within tool names, and an explicit list reads as
22
+ * documentation for what we consider routine. Add new tools here as the
23
+ * surface grows; do not auto-allow whole MCP servers.
24
+ */
25
+ const TELORA_MCP_ALLOWLIST = [
26
+ // Products
27
+ 'mcp__telora-products__telora_product',
28
+ 'mcp__telora-products__telora_product_context',
29
+ 'mcp__telora-products__telora_product_strategy',
30
+ 'mcp__telora-products__telora_product_delivery',
31
+ 'mcp__telora-products__telora_product_issue',
32
+ // Loops & reality trees
33
+ 'mcp__telora-products__telora_loop_document',
34
+ 'mcp__telora-products__telora_loop_question',
35
+ 'mcp__telora-products__telora_loop_answer',
36
+ 'mcp__telora-products__telora_loop_persona',
37
+ // OKRs
38
+ 'mcp__telora-products__telora_objective',
39
+ 'mcp__telora-products__telora_key_result',
40
+ // Agents (escalations, role discovery)
41
+ 'mcp__telora-products__telora_agent',
42
+ // Save points
43
+ 'mcp__telora-products__telora_save_point',
44
+ // Discovery (deferred-domain registration)
45
+ 'mcp__telora-products__telora_discover',
46
+ ];
47
+ export function buildClaudeSettings() {
48
+ return {
49
+ permissions: {
50
+ allow: [...TELORA_MCP_ALLOWLIST],
51
+ },
52
+ };
53
+ }
54
+ /**
55
+ * Deep-merge a Telora-seeded settings object into an existing parsed
56
+ * settings.json. The shape returned here is JSON-stringifiable.
57
+ *
58
+ * Merge semantics:
59
+ * - `permissions.allow`: union, deduplicated, preserving the user's order
60
+ * first then appending any of our entries that aren't already present.
61
+ * Re-running connect produces no diff.
62
+ * - All other top-level keys: untouched. We only own the permissions list.
63
+ */
64
+ export function mergeClaudeSettings(existing, seed) {
65
+ const out = existing && typeof existing === 'object' ? { ...existing } : {};
66
+ const existingPermissions = out.permissions ?? {};
67
+ const existingAllow = Array.isArray(existingPermissions.allow)
68
+ ? existingPermissions.allow.filter((v) => typeof v === 'string')
69
+ : [];
70
+ const seen = new Set(existingAllow);
71
+ const merged = [...existingAllow];
72
+ for (const entry of seed.permissions.allow) {
73
+ if (!seen.has(entry)) {
74
+ merged.push(entry);
75
+ seen.add(entry);
76
+ }
77
+ }
78
+ out.permissions = {
79
+ ...(typeof existingPermissions === 'object' ? existingPermissions : {}),
80
+ allow: merged,
81
+ };
82
+ return out;
83
+ }
84
+ //# sourceMappingURL=claude-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-settings.js","sourceRoot":"","sources":["../../src/templates/claude-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAQH;;;;;;;GAOG;AACH,MAAM,oBAAoB,GAAG;IAC3B,WAAW;IACX,sCAAsC;IACtC,8CAA8C;IAC9C,+CAA+C;IAC/C,+CAA+C;IAC/C,4CAA4C;IAC5C,wBAAwB;IACxB,4CAA4C;IAC5C,4CAA4C;IAC5C,0CAA0C;IAC1C,2CAA2C;IAC3C,OAAO;IACP,wCAAwC;IACxC,yCAAyC;IACzC,uCAAuC;IACvC,oCAAoC;IACpC,cAAc;IACd,yCAAyC;IACzC,2CAA2C;IAC3C,uCAAuC;CACxC,CAAC;AAEF,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,WAAW,EAAE;YACX,KAAK,EAAE,CAAC,GAAG,oBAAoB,CAAC;SACjC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAAwC,EACxC,IAA4B;IAE5B,MAAM,GAAG,GACP,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAElE,MAAM,mBAAmB,GACtB,GAAG,CAAC,WAA+C,IAAI,EAAE,CAAC;IAC7D,MAAM,aAAa,GAAa,KAAK,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC;QACtE,CAAC,CAAE,mBAAmB,CAAC,KAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;QAC5F,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC;IAClC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QAC3C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAED,GAAG,CAAC,WAAW,GAAG;QAChB,GAAG,CAAC,OAAO,mBAAmB,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,KAAK,EAAE,MAAM;KACd,CAAC;IAEF,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"unified-init.d.ts","sourceRoot":"","sources":["../src/unified-init.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6DH;;;;;;GAMG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAqMpD"}
1
+ {"version":3,"file":"unified-init.d.ts","sourceRoot":"","sources":["../src/unified-init.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6DH;;;;;;GAMG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAwLpD"}
@@ -9,7 +9,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
9
9
  import { createInterface } from 'node:readline';
10
10
  import { resolve } from 'node:path';
11
11
  import { homedir } from 'node:os';
12
- import { resolveMcpServerPath, writeMcpConfigFile } from './mcp-resolution.js';
12
+ import { writeMcpConfigFile } from './mcp-resolution.js';
13
13
  /**
14
14
  * Prompt for user input with an optional default value.
15
15
  */
@@ -156,35 +156,22 @@ export async function runUnifiedInit() {
156
156
  const configPath = resolve(teloraDir, 'daemon.json');
157
157
  writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n', { mode: 0o600 });
158
158
  console.log(`Created ${configPath}`);
159
- // -- Generate .mcp.json in each product repo --
160
- let mcpServerPath = null;
161
- try {
162
- mcpServerPath = resolveMcpServerPath();
163
- }
164
- catch (err) {
165
- console.warn(`\nWarning: Could not resolve MCP server path: ${err instanceof Error ? err.message : String(err)}`);
166
- console.warn(' .mcp.json will not be generated. Agents will not have MCP tools available.');
167
- console.warn(' Install @telora/mcp-products as a dependency of @telora/daemon to fix this.\n');
168
- }
169
- if (mcpServerPath) {
170
- for (const product of products) {
171
- try {
172
- writeMcpConfigFile(product.repoPath, {
173
- mcpServerPath,
174
- trackerId,
175
- teloraUrl,
176
- });
177
- console.log(`Generated ${product.repoPath}/.mcp.json`);
178
- }
179
- catch (err) {
180
- console.warn(`Warning: Could not write .mcp.json in ${product.repoPath}: ${err instanceof Error ? err.message : String(err)}`);
181
- }
159
+ // -- Generate .mcp.json in each product repo (committable npx shape) -----
160
+ // The MCP server reads tracker_id + telora_url from ~/.telora/daemon.json
161
+ // at startup, so the file written here carries no per-user secrets.
162
+ for (const product of products) {
163
+ try {
164
+ writeMcpConfigFile(product.repoPath, { teloraUrl });
165
+ console.log(`Generated ${product.repoPath}/.mcp.json`);
166
+ }
167
+ catch (err) {
168
+ console.warn(`Warning: Could not write .mcp.json in ${product.repoPath}: ${err instanceof Error ? err.message : String(err)}`);
182
169
  }
183
170
  }
184
171
  // -- Ensure .mcp.json and .telora/ are in .gitignore for each product repo --
185
172
  for (const product of products) {
186
173
  const gitignorePath = resolve(product.repoPath, '.gitignore');
187
- const entriesToAdd = ['.telora/', '.mcp.json'];
174
+ const entriesToAdd = ['.telora/'];
188
175
  const missingEntries = [];
189
176
  if (existsSync(gitignorePath)) {
190
177
  const content = readFileSync(gitignorePath, 'utf-8');
@@ -1 +1 @@
1
- {"version":3,"file":"unified-init.js","sourceRoot":"","sources":["../src/unified-init.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE/E;;GAEG;AACH,KAAK,UAAU,MAAM,CAAC,QAAgB,EAAE,YAAqB;IAC3D,MAAM,EAAE,GAAG,eAAe,CAAC;QACzB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,YAAY,CAAC,CAAC,CAAC,KAAK,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAEhE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,EAAE,CAAC,QAAQ,CAAC,GAAG,QAAQ,GAAG,cAAc,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE;YACvD,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,YAAY,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,WAAW,CAAC,QAAgB,EAAE,aAAsB,IAAI;IACrE,MAAM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O,CAAC,GAAG,CAAC,+BAA+B,SAAS,EAAE,CAAC,CAAC;IACxD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,mEAAmE,CAAC,CAAC;QACjF,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,SAAS,OAAO,CAAC,QAAQ,uBAAuB,iBAAiB,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,sFAAsF,CAAC,CAAC;QACpG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telora/daemon",
3
- "version": "0.14.23",
3
+ "version": "0.14.25",
4
4
  "description": "Agent orchestration daemon for Telora - spawns and manages Claude Code instances",
5
5
  "type": "module",
6
6
  "bin": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "//testRunner": "Uses Node.js built-in test runner (node:test) via tsx for TypeScript support. The root package uses Vitest; this is a deliberate choice for the daemon package to avoid framework dependencies. See src/__tests__/ for test files.",
37
37
  "dependencies": {
38
- "@telora/daemon-core": "^0.2.10",
38
+ "@telora/daemon-core": "^0.2.15",
39
39
  "@telora/factory": "^0.4.6",
40
40
  "@telora/mcp-products": "^0.21.12",
41
41
  "commander": "^14.0.3",