clawmatrix 0.1.22 → 0.2.0
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 +4 -1
- package/package.json +4 -2
- package/src/acp-proxy.ts +2073 -0
- package/src/audit.ts +42 -0
- package/src/auth.ts +2 -3
- package/src/cli.ts +76 -2
- package/src/cluster-service.ts +243 -3
- package/src/compat.ts +84 -3
- package/src/config.ts +117 -4
- package/src/connection.ts +290 -85
- package/src/crypto.ts +179 -0
- package/src/debug.ts +15 -2
- package/src/e2e/helpers.ts +318 -0
- package/src/handoff.ts +132 -87
- package/src/identity.ts +95 -0
- package/src/index.ts +539 -45
- package/src/knowledge-sync.ts +777 -205
- package/src/local-tools.ts +9 -2
- package/src/model-proxy.ts +358 -110
- package/src/peer-approval.ts +628 -0
- package/src/peer-manager.ts +270 -38
- package/src/rate-limiter.ts +88 -0
- package/src/router.ts +32 -10
- package/src/sentinel-manager.ts +142 -0
- package/src/sentinel.ts +618 -0
- package/src/task-activity.ts +74 -0
- package/src/terminal.ts +566 -0
- package/src/tool-proxy.ts +127 -3
- package/src/tools/cluster-acp.ts +237 -0
- package/src/tools/cluster-batch.ts +76 -0
- package/src/tools/cluster-diagnostic.ts +174 -0
- package/src/tools/cluster-edit.ts +70 -0
- package/src/tools/cluster-peers.ts +59 -14
- package/src/tools/cluster-terminal.ts +232 -0
- package/src/tools/cluster-tool.ts +26 -11
- package/src/types.ts +477 -3
- package/src/web.ts +2 -2
package/src/local-tools.ts
CHANGED
|
@@ -126,13 +126,20 @@ async function executeExec(params: ExecParams): Promise<ToolResult> {
|
|
|
126
126
|
|
|
127
127
|
// ── read/write/edit: reuse pi-coding-agent factories ───────────────
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
/** Cache key includes cwd so tools are recreated if the working directory changes. */
|
|
130
|
+
let piToolCache = new Map<string, { execute: Function }>();
|
|
131
|
+
let piToolCwd = "";
|
|
130
132
|
|
|
131
133
|
function getPiTool(name: string): { execute: Function } {
|
|
134
|
+
const cwd = process.cwd();
|
|
135
|
+
if (cwd !== piToolCwd) {
|
|
136
|
+
piToolCache = new Map();
|
|
137
|
+
piToolCwd = cwd;
|
|
138
|
+
}
|
|
139
|
+
|
|
132
140
|
let tool = piToolCache.get(name);
|
|
133
141
|
if (tool) return tool;
|
|
134
142
|
|
|
135
|
-
const cwd = process.cwd();
|
|
136
143
|
switch (name) {
|
|
137
144
|
case "read":
|
|
138
145
|
tool = createReadTool(cwd);
|