@cortexkit/pi-magic-context 0.33.1 → 0.34.1
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/{index-e3kftg52.js → index-ekzg3w5y.js} +846 -194
- package/dist/{rpc-notifications-td0amw6w.js → index-hw34xmzk.js} +2 -10
- package/dist/index.js +1720 -903
- package/dist/rpc-notifications-s2rw51c6.js +17 -0
- package/dist/subagent-entry.js +8 -4
- package/package.json +69 -69
- /package/dist/{index-v7fmc1s2.js → index-3pnd4qh9.js} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__resetNotificationStateForTests,
|
|
3
|
+
acknowledgeNotifications,
|
|
4
|
+
drainNotifications,
|
|
5
|
+
isTuiConnected,
|
|
6
|
+
pushNotification,
|
|
7
|
+
registerNotificationSink
|
|
8
|
+
} from "./index-hw34xmzk.js";
|
|
9
|
+
import"./index-wckvcay0.js";
|
|
10
|
+
export {
|
|
11
|
+
registerNotificationSink,
|
|
12
|
+
pushNotification,
|
|
13
|
+
isTuiConnected,
|
|
14
|
+
drainNotifications,
|
|
15
|
+
acknowledgeNotifications,
|
|
16
|
+
__resetNotificationStateForTests
|
|
17
|
+
};
|
package/dist/subagent-entry.js
CHANGED
|
@@ -2,8 +2,10 @@ import {
|
|
|
2
2
|
ensureProjectRegisteredFromPiDirectory,
|
|
3
3
|
loadPiConfig,
|
|
4
4
|
openDatabase,
|
|
5
|
-
registerMagicContextTools
|
|
6
|
-
|
|
5
|
+
registerMagicContextTools,
|
|
6
|
+
resolveProjectIdentityForSession,
|
|
7
|
+
setStoragePrivatePermissionEnforcement
|
|
8
|
+
} from "./index-ekzg3w5y.js";
|
|
7
9
|
import {
|
|
8
10
|
log,
|
|
9
11
|
setHarness
|
|
@@ -22,18 +24,20 @@ function magicContextSubagentExtension(pi) {
|
|
|
22
24
|
});
|
|
23
25
|
pi.on("session_start", async () => {
|
|
24
26
|
try {
|
|
27
|
+
const directory = process.cwd();
|
|
28
|
+
const { config: cfg } = loadPiConfig({ cwd: directory });
|
|
29
|
+
setStoragePrivatePermissionEnforcement(cfg.storage.enforce_private_permissions);
|
|
25
30
|
const db = openDatabase();
|
|
26
31
|
if (!db) {
|
|
27
32
|
throw new Error("storage open failed; refusing to start without Magic Context tools");
|
|
28
33
|
}
|
|
29
34
|
openedDb = db;
|
|
30
|
-
const directory = process.cwd();
|
|
31
|
-
const { config: cfg } = loadPiConfig({ cwd: directory });
|
|
32
35
|
await ensureProjectRegisteredFromPiDirectory(directory, db);
|
|
33
36
|
const dreamerActionsEnabled = pi.getFlag(SUBAGENT_DREAMER_ACTIONS_FLAG) === true;
|
|
34
37
|
registerMagicContextTools(pi, {
|
|
35
38
|
db,
|
|
36
39
|
ensureProjectRegistered: ensureProjectRegisteredFromPiDirectory,
|
|
40
|
+
resolveProjectIdentity: (ctx) => resolveProjectIdentityForSession(ctx.cwd, cfg.allow_home_project),
|
|
37
41
|
memoryToolEnabled: dreamerActionsEnabled,
|
|
38
42
|
allowDreamerActions: dreamerActionsEnabled,
|
|
39
43
|
sessionScopedToolsDisabled: true,
|
package/package.json
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
2
|
+
"name": "@cortexkit/pi-magic-context",
|
|
3
|
+
"version": "0.34.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Pi coding agent extension for Magic Context — cross-session memory and context management",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "ualtinok",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"pi",
|
|
11
|
+
"pi-coding-agent",
|
|
12
|
+
"extension",
|
|
13
|
+
"context",
|
|
14
|
+
"memory",
|
|
15
|
+
"magic-context",
|
|
16
|
+
"ai",
|
|
17
|
+
"llm"
|
|
18
|
+
],
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/cortexkit/magic-context",
|
|
22
|
+
"directory": "packages/pi-plugin"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "rm -f dist/index.js dist/subagent-entry.js dist/*-*.js && bun build src/index.ts src/subagent-entry.ts --outdir dist --target node --format esm --splitting --external @earendil-works/pi-coding-agent --external @earendil-works/pi-tui --external @huggingface/transformers --external node:sqlite",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"test": "bun test",
|
|
32
|
+
"lint": "biome check src",
|
|
33
|
+
"lint:fix": "biome check --write src",
|
|
34
|
+
"format": "biome format --write src",
|
|
35
|
+
"format:check": "biome format src",
|
|
36
|
+
"clean": "rm -rf dist",
|
|
37
|
+
"prepublishOnly": "bun run build"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@huggingface/transformers": "^4.1.0",
|
|
41
|
+
"@jitl/quickjs-singlefile-cjs-release-asyncify": "0.32.0",
|
|
42
|
+
"ai-tokenizer": "^1.0.6",
|
|
43
|
+
"comment-json": "^5.0.0",
|
|
44
|
+
"quickjs-emscripten": "^0.32.0",
|
|
45
|
+
"typebox": "^1.3.1",
|
|
46
|
+
"zod": "^4.1.8"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@biomejs/biome": "^2.5.1",
|
|
50
|
+
"@earendil-works/pi-coding-agent": "^0.80.2",
|
|
51
|
+
"@earendil-works/pi-tui": "^0.80.2",
|
|
52
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
53
|
+
"@types/bun": "^1.3.10",
|
|
54
|
+
"@types/node": "^22.20.0",
|
|
55
|
+
"typescript": "^5.8.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@earendil-works/pi-coding-agent": "^0.80.2",
|
|
59
|
+
"@earendil-works/pi-tui": "^0.80.2"
|
|
60
|
+
},
|
|
61
|
+
"exports": {
|
|
62
|
+
".": {
|
|
63
|
+
"import": "./dist/index.js"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"pi": {
|
|
67
|
+
"extensions": [
|
|
68
|
+
"./dist/index.js"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
71
|
}
|
|
File without changes
|