@telora/daemon-core 0.2.49 → 0.2.50
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/mcp-resolution.d.ts
CHANGED
|
@@ -40,14 +40,20 @@ export declare function resolveMcpServerPath(callerImportMetaUrl: string): strin
|
|
|
40
40
|
* Code can spawn the MCP without npx (the cache trap that motivated this
|
|
41
41
|
* shape). Callers resolve the path from their own package context via
|
|
42
42
|
* `resolveMcpServerPath(import.meta.url)`.
|
|
43
|
+
*
|
|
44
|
+
* Workstation identity (`TELORA_URL` / `TELORA_TRACKER_ID`) is deliberately
|
|
45
|
+
* NOT an option here. A workstation has ONE identity binding with a single
|
|
46
|
+
* writer (`~/.telora/daemon.json`); the MCP server resolves it through
|
|
47
|
+
* `loadCredentials()` (env first, else that file). Persisted configs that
|
|
48
|
+
* carried their own identity copies could drift -- and which one won was
|
|
49
|
+
* positional (it depended on the CWD Claude Code launched in). Omitting them
|
|
50
|
+
* here is the single-source fix: a narrow signaling interface (path + profile)
|
|
51
|
+
* over a wide config surface. Identity cannot be reintroduced through this
|
|
52
|
+
* builder because the type no longer accepts it.
|
|
43
53
|
*/
|
|
44
54
|
export interface McpConfigOptions {
|
|
45
55
|
/** Absolute path to the MCP server entry point (`dist/index.js`). */
|
|
46
56
|
mcpServerPath: string;
|
|
47
|
-
/** Telora tracker ID. Inlined into env when present. */
|
|
48
|
-
trackerId?: string;
|
|
49
|
-
/** Telora API URL. Inlined into env when present. */
|
|
50
|
-
teloraUrl?: string;
|
|
51
57
|
/** MCP profile (e.g. 'execution' for daemon-spawned agents, 'human' for
|
|
52
58
|
* user repos). Optional; inlined into env when present. */
|
|
53
59
|
profile?: string;
|
|
@@ -58,10 +64,14 @@ export interface McpConfigOptions {
|
|
|
58
64
|
* Shape:
|
|
59
65
|
* command: "node"
|
|
60
66
|
* args: ["<abs-path-to-mcp-products/dist/index.js>"]
|
|
61
|
-
* env: {
|
|
67
|
+
* env: { [TELORA_MCP_PROFILE] }
|
|
62
68
|
*
|
|
63
|
-
* The
|
|
64
|
-
*
|
|
69
|
+
* The env carries the MCP profile ONLY -- never workstation identity (see
|
|
70
|
+
* `McpConfigOptions`). The file is per-user-machine and gitignored. The
|
|
71
|
+
* daemon refreshes it on every startup so the path stays valid across daemon
|
|
72
|
+
* self-updates; because this builder emits no identity, that refresh is also
|
|
73
|
+
* the self-heal that rewrites any stale identity-carrying config to the
|
|
74
|
+
* single-source shape.
|
|
65
75
|
*/
|
|
66
76
|
export declare function buildMcpConfig(options: McpConfigOptions): Record<string, unknown>;
|
|
67
77
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-resolution.d.ts","sourceRoot":"","sources":["../src/mcp-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAUxE;AAED
|
|
1
|
+
{"version":3,"file":"mcp-resolution.d.ts","sourceRoot":"","sources":["../src/mcp-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAUxE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAC;IACtB;gEAC4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAejF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAW/D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAInF"}
|
package/dist/mcp-resolution.js
CHANGED
|
@@ -51,17 +51,17 @@ export function resolveMcpServerPath(callerImportMetaUrl) {
|
|
|
51
51
|
* Shape:
|
|
52
52
|
* command: "node"
|
|
53
53
|
* args: ["<abs-path-to-mcp-products/dist/index.js>"]
|
|
54
|
-
* env: {
|
|
54
|
+
* env: { [TELORA_MCP_PROFILE] }
|
|
55
55
|
*
|
|
56
|
-
* The
|
|
57
|
-
*
|
|
56
|
+
* The env carries the MCP profile ONLY -- never workstation identity (see
|
|
57
|
+
* `McpConfigOptions`). The file is per-user-machine and gitignored. The
|
|
58
|
+
* daemon refreshes it on every startup so the path stays valid across daemon
|
|
59
|
+
* self-updates; because this builder emits no identity, that refresh is also
|
|
60
|
+
* the self-heal that rewrites any stale identity-carrying config to the
|
|
61
|
+
* single-source shape.
|
|
58
62
|
*/
|
|
59
63
|
export function buildMcpConfig(options) {
|
|
60
64
|
const env = {};
|
|
61
|
-
if (options.teloraUrl)
|
|
62
|
-
env.TELORA_URL = options.teloraUrl;
|
|
63
|
-
if (options.trackerId)
|
|
64
|
-
env.TELORA_TRACKER_ID = options.trackerId;
|
|
65
65
|
if (options.profile)
|
|
66
66
|
env.TELORA_MCP_PROFILE = options.profile;
|
|
67
67
|
const server = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-resolution.js","sourceRoot":"","sources":["../src/mcp-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C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