@fleetagent/pi-coding-agent 0.0.9 → 0.0.10
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/CHANGELOG.md +23 -0
- package/README.md +9 -0
- package/dist/cli/args.d.ts +3 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +18 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-session.d.ts +12 -3
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +27 -6
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bash-executor.d.ts +3 -3
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +3 -2
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/pi-agent.d.ts +2 -0
- package/dist/core/pi-agent.d.ts.map +1 -1
- package/dist/core/pi-agent.js +2 -0
- package/dist/core/pi-agent.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/bash.d.ts +6 -29
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +23 -97
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +3 -2
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +6 -8
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -16
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +7 -13
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +3 -17
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +11 -23
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +3 -14
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +93 -41
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +17 -15
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +53 -52
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +3 -20
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +9 -20
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/operations.d.ts +145 -0
- package/dist/core/tools/operations.d.ts.map +1 -0
- package/dist/core/tools/operations.js +418 -0
- package/dist/core/tools/operations.js.map +1 -0
- package/dist/core/tools/read.d.ts +3 -16
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +6 -13
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/write.d.ts +3 -14
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +6 -10
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +33 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +2 -2
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +52 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +9 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +14 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +9 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +22 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/extensions.md +1 -2
- package/examples/extensions/README.md +0 -1
- package/examples/extensions/bash-spawn-hook.ts +2 -2
- package/examples/extensions/built-in-tool-renderer.ts +12 -5
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +9 -7
- package/examples/extensions/sandbox/index.ts +55 -56
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
- package/examples/extensions/ssh.ts +0 -220
|
@@ -1211,6 +1211,7 @@ export class InteractiveMode {
|
|
|
1211
1211
|
});
|
|
1212
1212
|
setRegisteredThemes(this.session.resourceLoader.getThemes().themes);
|
|
1213
1213
|
this.setupAutocompleteProvider();
|
|
1214
|
+
this.updateToolBackendStatus();
|
|
1214
1215
|
const extensionRunner = this.session.extensionRunner;
|
|
1215
1216
|
this.setupExtensionShortcuts(extensionRunner);
|
|
1216
1217
|
this.showLoadedResources({ force: false, showDiagnosticsWhenQuiet: true });
|
|
@@ -1325,6 +1326,18 @@ export class InteractiveMode {
|
|
|
1325
1326
|
this.footerDataProvider.setExtensionStatus(key, text);
|
|
1326
1327
|
this.ui.requestRender();
|
|
1327
1328
|
}
|
|
1329
|
+
formatToolBackendStatus(info) {
|
|
1330
|
+
if (info.type === "local") {
|
|
1331
|
+
return theme.fg("dim", `tools: local ${info.cwd}`);
|
|
1332
|
+
}
|
|
1333
|
+
if (info.configured) {
|
|
1334
|
+
return theme.fg("accent", `tools: ssh ${info.remote}:${info.cwd}`);
|
|
1335
|
+
}
|
|
1336
|
+
return theme.fg("warning", `tools: ssh not configured ${info.cwd}`);
|
|
1337
|
+
}
|
|
1338
|
+
updateToolBackendStatus() {
|
|
1339
|
+
this.setExtensionStatus("toolBackend", this.formatToolBackendStatus(this.session.getToolBackendInfo()));
|
|
1340
|
+
}
|
|
1328
1341
|
getWorkingLoaderMessage() {
|
|
1329
1342
|
return this.workingMessage ?? this.defaultWorkingMessage;
|
|
1330
1343
|
}
|
|
@@ -2038,6 +2051,11 @@ export class InteractiveMode {
|
|
|
2038
2051
|
this.editor.setText("");
|
|
2039
2052
|
return;
|
|
2040
2053
|
}
|
|
2054
|
+
if (text === "/ssh-sandbox" || text.startsWith("/ssh-sandbox ")) {
|
|
2055
|
+
this.editor.setText("");
|
|
2056
|
+
await this.handleSshSandboxCommand(text);
|
|
2057
|
+
return;
|
|
2058
|
+
}
|
|
2041
2059
|
if (text === "/changelog") {
|
|
2042
2060
|
this.handleChangelogCommand();
|
|
2043
2061
|
this.editor.setText("");
|
|
@@ -4365,6 +4383,40 @@ export class InteractiveMode {
|
|
|
4365
4383
|
this.chatContainer.addChild(new Text(theme.fg("dim", `Session name set: ${name}`), 1, 0));
|
|
4366
4384
|
this.ui.requestRender();
|
|
4367
4385
|
}
|
|
4386
|
+
async handleSshSandboxCommand(text) {
|
|
4387
|
+
const args = text.replace(/^\/ssh-sandbox\s*/, "").trim();
|
|
4388
|
+
if (!args || args === "status") {
|
|
4389
|
+
this.showStatus(this.formatToolBackendStatus(this.session.getToolBackendInfo()));
|
|
4390
|
+
return;
|
|
4391
|
+
}
|
|
4392
|
+
if (args === "clear") {
|
|
4393
|
+
try {
|
|
4394
|
+
this.session.clearSshSandbox();
|
|
4395
|
+
this.updateToolBackendStatus();
|
|
4396
|
+
this.showStatus("SSH sandbox cleared");
|
|
4397
|
+
}
|
|
4398
|
+
catch (error) {
|
|
4399
|
+
this.showError(error instanceof Error ? error.message : String(error));
|
|
4400
|
+
}
|
|
4401
|
+
return;
|
|
4402
|
+
}
|
|
4403
|
+
const [targetArg, cwdArg] = args.split(/\s+/, 2);
|
|
4404
|
+
if (!targetArg) {
|
|
4405
|
+
this.showWarning("Usage: /ssh-sandbox <user@host[:/path]> [path]");
|
|
4406
|
+
return;
|
|
4407
|
+
}
|
|
4408
|
+
const separatorIndex = targetArg.indexOf(":");
|
|
4409
|
+
const remote = separatorIndex === -1 ? targetArg : targetArg.slice(0, separatorIndex);
|
|
4410
|
+
const cwd = cwdArg ?? (separatorIndex === -1 ? undefined : targetArg.slice(separatorIndex + 1));
|
|
4411
|
+
try {
|
|
4412
|
+
const info = await this.session.configureSshSandbox({ remote, cwd });
|
|
4413
|
+
this.updateToolBackendStatus();
|
|
4414
|
+
this.showStatus(this.formatToolBackendStatus(info));
|
|
4415
|
+
}
|
|
4416
|
+
catch (error) {
|
|
4417
|
+
this.showError(`Failed to configure SSH sandbox: ${error instanceof Error ? error.message : String(error)}`);
|
|
4418
|
+
}
|
|
4419
|
+
}
|
|
4368
4420
|
handleSessionCommand() {
|
|
4369
4421
|
const stats = this.session.getSessionStats();
|
|
4370
4422
|
const sessionName = this.activeSession.getSessionName();
|