@engramprotocol/mcp-server 0.10.4 → 0.10.5
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 +1 -1
- package/dist/cli.js +0 -0
- package/dist/tools/get.d.ts.map +1 -1
- package/dist/tools/get.js +2 -1
- package/dist/tools/get.js.map +1 -1
- package/dist/tools/list.d.ts.map +1 -1
- package/dist/tools/list.js +4 -3
- package/dist/tools/list.js.map +1 -1
- package/dist/tools/recall.d.ts.map +1 -1
- package/dist/tools/recall.js +5 -3
- package/dist/tools/recall.js.map +1 -1
- package/dist/tools/show.d.ts.map +1 -1
- package/dist/tools/show.js +5 -4
- package/dist/tools/show.js.map +1 -1
- package/package.json +8 -8
- package/templates/hooks/session_start_boot.sh +0 -0
- package/templates/hooks/user_prompt_submit_reminder.sh +26 -3
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ Two bash hooks land in `~/.eml/hooks/`:
|
|
|
57
57
|
|
|
58
58
|
Both hooks log to `~/.eml/logs/<event>-YYYY-MM-DD.log` (self-rotating per day) and carry a `# managed-by: engramprotocol-setup` marker line that lets `setup update` / `setup uninstall` identify which files they own.
|
|
59
59
|
|
|
60
|
-
## Tools (v0.10.
|
|
60
|
+
## Tools (v0.10.5)
|
|
61
61
|
|
|
62
62
|
All tools have an `eml_` prefix. Total: **17 tools**.
|
|
63
63
|
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/tools/get.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/tools/get.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/tools/get.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAmBzE"}
|
package/dist/tools/get.js
CHANGED
|
@@ -6,7 +6,8 @@ const _helpers_1 = require("./_helpers");
|
|
|
6
6
|
function registerGetTool(server, http) {
|
|
7
7
|
server.registerTool('eml_get', {
|
|
8
8
|
title: 'Get Engram',
|
|
9
|
-
description: 'Fetch one engram by ID
|
|
9
|
+
description: 'Fetch one engram by ID with its full content — the drill-down after ' +
|
|
10
|
+
'eml_recall or eml_show surfaces an id. Optionally includes relations.',
|
|
10
11
|
inputSchema: {
|
|
11
12
|
id: zod_1.z.string().describe('Engram ID (UUID).'),
|
|
12
13
|
with_relations: zod_1.z.boolean().optional().describe('Default true.'),
|
package/dist/tools/get.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../src/tools/get.ts"],"names":[],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../src/tools/get.ts"],"names":[],"mappings":";;AAKA,0CAmBC;AAxBD,6BAAuB;AAGvB,yCAAqC;AAErC,SAAgB,eAAe,CAAC,MAAiB,EAAE,IAAgB;IACjE,MAAM,CAAC,YAAY,CACjB,SAAS,EACT;QACE,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,sEAAsE;YACtE,uEAAuE;QACzE,WAAW,EAAE;YACX,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YAC5C,cAAc,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;SACjE;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE;QAC5B,MAAM,MAAM,GAAgD,EAAE,CAAA;QAC9D,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;YAAE,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAC1F,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;IAC/C,CAAC,CAAC,CACH,CAAA;AACH,CAAC"}
|
package/dist/tools/list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/tools/list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAQhD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/tools/list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAQhD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAgC1E"}
|
package/dist/tools/list.js
CHANGED
|
@@ -10,9 +10,10 @@ const ENGRAM_TYPES = [
|
|
|
10
10
|
function registerListTool(server, http) {
|
|
11
11
|
server.registerTool('eml_list', {
|
|
12
12
|
title: 'List Engrams',
|
|
13
|
-
description: 'List engrams with structured filters (type/scope/status/etc.). ' +
|
|
14
|
-
'
|
|
15
|
-
'search use
|
|
13
|
+
description: 'List engrams with structured filters (type/scope/status/etc.), e.g. ' +
|
|
14
|
+
'"all active tasks for project X". Also the way to reach non-active engrams ' +
|
|
15
|
+
'(superseded/resolved) via the status filter. For fuzzy topic search use ' +
|
|
16
|
+
'eml_recall; for a whole-scope dashboard use eml_show.',
|
|
16
17
|
inputSchema: {
|
|
17
18
|
type: zod_1.z.enum(ENGRAM_TYPES).optional(),
|
|
18
19
|
scope: zod_1.z.string().optional(),
|
package/dist/tools/list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/tools/list.ts"],"names":[],"mappings":";;AAUA,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/tools/list.ts"],"names":[],"mappings":";;AAUA,4CAgCC;AA1CD,6BAAuB;AAGvB,yCAAqC;AAErC,MAAM,YAAY,GAAG;IACnB,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS;IAClE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW;CACpE,CAAA;AAEV,SAAgB,gBAAgB,CAAC,MAAiB,EAAE,IAAgB;IAClE,MAAM,CAAC,YAAY,CACjB,UAAU,EACV;QACE,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,sEAAsE;YACtE,6EAA6E;YAC7E,0EAA0E;YAC1E,uDAAuD;QACzD,WAAW,EAAE;YACX,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;YACrC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;YACpG,YAAY,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;YACjF,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;YAC3E,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;YAClF,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;YACtD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;YACjD,aAAa,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;SACtC;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE;QAC5B,MAAM,MAAM,GAAgD,EAAE,CAAA;QAC9D,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,IAAI,CAAC,KAAK,SAAS;gBAAE,SAAQ;YAC7B,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAoB,CAAA;QACvE,CAAC;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAClC,CAAC,CAAC,CACH,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recall.d.ts","sourceRoot":"","sources":["../../src/tools/recall.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"recall.d.ts","sourceRoot":"","sources":["../../src/tools/recall.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAkB5E"}
|
package/dist/tools/recall.js
CHANGED
|
@@ -6,9 +6,11 @@ const _helpers_1 = require("./_helpers");
|
|
|
6
6
|
function registerRecallTool(server, http) {
|
|
7
7
|
server.registerTool('eml_recall', {
|
|
8
8
|
title: 'Recall Knowledge',
|
|
9
|
-
description: '
|
|
10
|
-
'
|
|
11
|
-
'
|
|
9
|
+
description: 'Fuzzy topic search — "what do I know about X?". Searches live engrams ' +
|
|
10
|
+
'(active + planned), ranked by text relevance (bm25); significance breaks ' +
|
|
11
|
+
'near-ties. Returns compact previews — use eml_get <id> for the full body. ' +
|
|
12
|
+
'For filtered enumeration by type/scope/status (incl. superseded/historical) ' +
|
|
13
|
+
'use eml_list; for a whole-scope dashboard use eml_show.',
|
|
12
14
|
inputSchema: {
|
|
13
15
|
query: zod_1.z.string().describe('Search query (plaintext, FTS5-tokenised).'),
|
|
14
16
|
limit: zod_1.z.number().int().positive().max(50).optional().describe('Default 10.'),
|
package/dist/tools/recall.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recall.js","sourceRoot":"","sources":["../../src/tools/recall.ts"],"names":[],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"recall.js","sourceRoot":"","sources":["../../src/tools/recall.ts"],"names":[],"mappings":";;AAKA,gDAkBC;AAvBD,6BAAuB;AAGvB,yCAAqC;AAErC,SAAgB,kBAAkB,CAAC,MAAiB,EAAE,IAAgB;IACpE,MAAM,CAAC,YAAY,CACjB,YAAY,EACZ;QACE,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,wEAAwE;YACxE,2EAA2E;YAC3E,4EAA4E;YAC5E,8EAA8E;YAC9E,yDAAyD;QAC3D,WAAW,EAAE;YACX,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;YACvE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;SAC9E;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAC3D,CAAA;AACH,CAAC"}
|
package/dist/tools/show.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../src/tools/show.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../src/tools/show.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAiB1E"}
|
package/dist/tools/show.js
CHANGED
|
@@ -13,10 +13,11 @@ const _helpers_1 = require("./_helpers");
|
|
|
13
13
|
function registerShowTool(server, http) {
|
|
14
14
|
server.registerTool('eml_show', {
|
|
15
15
|
title: 'Show BrainState for Scope',
|
|
16
|
-
description: 'Curated
|
|
17
|
-
'decisions/logs, relations
|
|
18
|
-
'
|
|
19
|
-
'
|
|
16
|
+
description: 'Curated dashboard for one scope: active status, open tasks, recent ' +
|
|
17
|
+
'decisions/logs, relations — "where do we stand on project X?" / "what do ' +
|
|
18
|
+
'I know about entity Y?". Works for any scope (global / project.<id> / ' +
|
|
19
|
+
'entity.<id> / agent.<id> / user.<id>). Drill into a listed engram with ' +
|
|
20
|
+
'eml_get; for fuzzy cross-scope search use eml_recall.',
|
|
20
21
|
inputSchema: {
|
|
21
22
|
scope: zod_1.z.string().describe('global | project.<id> | entity.<id> | agent.<id> | user.<id>'),
|
|
22
23
|
},
|
package/dist/tools/show.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../src/tools/show.ts"],"names":[],"mappings":";;AAYA,
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../src/tools/show.ts"],"names":[],"mappings":";;AAYA,4CAiBC;AA7BD,6BAAuB;AAGvB,yCAAqC;AAErC;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,MAAiB,EAAE,IAAgB;IAClE,MAAM,CAAC,YAAY,CACjB,UAAU,EACV;QACE,KAAK,EAAE,2BAA2B;QAClC,WAAW,EACT,qEAAqE;YACrE,2EAA2E;YAC3E,wEAAwE;YACxE,yEAAyE;YACzE,uDAAuD;QACzD,WAAW,EAAE;YACX,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8DAA8D,CAAC;SAC3F;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAChF,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@engramprotocol/mcp-server",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"description": "MCP wrapper for the EML HTTP API — exposes the Engram Protocol as MCP tools for Claude Code and other MCP clients. Includes setup-mode for one-shot install/update/uninstall.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/server.js",
|
|
@@ -18,11 +18,6 @@
|
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "tsc -b",
|
|
23
|
-
"test": "vitest run --passWithNoTests",
|
|
24
|
-
"test:watch": "vitest"
|
|
25
|
-
},
|
|
26
21
|
"dependencies": {
|
|
27
22
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
28
23
|
"zod": "^4.4.3"
|
|
@@ -31,6 +26,11 @@
|
|
|
31
26
|
"node": ">=20"
|
|
32
27
|
},
|
|
33
28
|
"devDependencies": {
|
|
34
|
-
"@engramprotocol/core": "
|
|
29
|
+
"@engramprotocol/core": "0.0.0"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc -b",
|
|
33
|
+
"test": "vitest run --passWithNoTests",
|
|
34
|
+
"test:watch": "vitest"
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
}
|
|
File without changes
|
|
@@ -17,6 +17,15 @@
|
|
|
17
17
|
#
|
|
18
18
|
# Local-only, no HTTP. Reminder content lives inline as heredoc — single source of
|
|
19
19
|
# truth, evolves with the npm-package via `setup update`.
|
|
20
|
+
#
|
|
21
|
+
# v0.10.5 option-5a TEST (brain decision 5c3246a0): on remind-turns the hook also
|
|
22
|
+
# emits a cwd-aware scope nudge — it derives the likely active project from the
|
|
23
|
+
# session cwd (naming-convention: basename(cwd)==project.id) and points the model
|
|
24
|
+
# at `eml_show project.<id>` so it loads that project's rules/status/tasks before
|
|
25
|
+
# acting. Still local-only (a nudge, NOT an HTTP content-inject). Probes whether
|
|
26
|
+
# naming the active scope changes behavior before committing to the cwd-aware boot
|
|
27
|
+
# rebuild (task bd617414). cwd is logged every turn to verify it is in the stdin
|
|
28
|
+
# envelope (high-confidence but unverified at build time).
|
|
20
29
|
|
|
21
30
|
set -eu
|
|
22
31
|
|
|
@@ -27,9 +36,13 @@ mkdir -p "$LOG_DIR" "$TURNS_DIR"
|
|
|
27
36
|
LOG_FILE="$LOG_DIR/user-prompt-submit-$(date -u +%Y-%m-%d).log"
|
|
28
37
|
TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
29
38
|
|
|
30
|
-
# --- 1. Parse stdin for session_id
|
|
39
|
+
# --- 1. Parse stdin for session_id + cwd -----------------------------------
|
|
31
40
|
STDIN=$(cat || true)
|
|
32
41
|
SESSION_ID=$(echo "$STDIN" | jq -r '.session_id // empty' 2>/dev/null || true)
|
|
42
|
+
# cwd: option-5a scope signal. stdin envelope first, $PWD fallback.
|
|
43
|
+
CWD=$(echo "$STDIN" | jq -r '.cwd // empty' 2>/dev/null || true)
|
|
44
|
+
[ -z "$CWD" ] && CWD="$PWD"
|
|
45
|
+
PROJECT_ID=$(basename "$CWD" 2>/dev/null || true)
|
|
33
46
|
|
|
34
47
|
if [ -z "$SESSION_ID" ]; then
|
|
35
48
|
echo "[$TS] no session_id in stdin, silent" >> "$LOG_FILE"
|
|
@@ -61,7 +74,7 @@ if [ "$((TURN % 5))" -eq 0 ]; then SHOULD_REMIND=1; fi
|
|
|
61
74
|
if [ "$RESUMED_AFTER_PAUSE" -eq 1 ]; then SHOULD_REMIND=1; fi
|
|
62
75
|
|
|
63
76
|
if [ "$SHOULD_REMIND" -eq 0 ]; then
|
|
64
|
-
echo "[$TS] silent turn=$TURN sid=$SESSION_ID" >> "$LOG_FILE"
|
|
77
|
+
echo "[$TS] silent turn=$TURN sid=$SESSION_ID cwd=$CWD" >> "$LOG_FILE"
|
|
65
78
|
exit 0
|
|
66
79
|
fi
|
|
67
80
|
|
|
@@ -75,4 +88,14 @@ cat <<'EOF'
|
|
|
75
88
|
- EML brain is the canonical knowledge base — check it before falling back to conversation memory.
|
|
76
89
|
EOF
|
|
77
90
|
|
|
78
|
-
|
|
91
|
+
# --- 4b. cwd-aware scope nudge (option-5a test, brain decision 5c3246a0) ----
|
|
92
|
+
# Names the likely active project from cwd so the model loads its scope before
|
|
93
|
+
# acting on it. Local-only: a nudge to call eml_show, NOT an HTTP content inject.
|
|
94
|
+
# Skip when cwd is empty or the home dir (basename would be meaningless there).
|
|
95
|
+
if [ -n "$CWD" ] && [ "$CWD" != "$HOME" ] && [ -n "$PROJECT_ID" ]; then
|
|
96
|
+
cat <<EOF
|
|
97
|
+
- Active working dir: $CWD — if \`project.$PROJECT_ID\` is a tracked project, call \`eml_show project.$PROJECT_ID\` FIRST to load its status, open tasks and project-specific rules before editing code or making decisions in it.
|
|
98
|
+
EOF
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
echo "[$TS] OK turn=$TURN sid=$SESSION_ID cwd=$CWD proj=$PROJECT_ID reminded (pause=$RESUMED_AFTER_PAUSE)" >> "$LOG_FILE"
|