@xynogen/pix-ssh 0.6.3 → 0.6.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +2 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-ssh",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Pi tool \u2014 ssh_run: run remote commands over SSH with password/key auth and remote sudo",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/index.ts CHANGED
@@ -266,12 +266,12 @@ function approvalTitle({ action, direction, reason }: SshOperation): string {
266
266
  }
267
267
 
268
268
  function approvalBody(operation: SshOperation, host: string, port?: number): string[] {
269
- const { action, command, destination, direction, reason, recursive, source, sudo } = operation;
269
+ const { action, destination, direction, reason, recursive, source } = operation;
270
270
  return [
271
271
  ...(reason?.trim() ? [] : ["No reason provided by AI"]),
272
272
  `Host: ${host}${port ? ` (port ${port})` : ""}`,
273
273
  ...(action === "command"
274
- ? [`Command: ${sudo ? "sudo " : ""}${command}`]
274
+ ? ["Review the command in the tool card below."]
275
275
  : [
276
276
  `Direction: ${direction === "download" ? "Download" : "Upload"}`,
277
277
  `From: ${source}`,
@@ -799,7 +799,6 @@ export default function (pi: ExtensionAPI): void {
799
799
  const overlayResult = await runOverlay();
800
800
  if (overlayResult.passwordAttemptsExhausted) {
801
801
  const text = `SSH authentication failed after ${MAX_PASSWORD_ATTEMPTS} attempts — wrong password.`;
802
- ctx.ui.notify(`🔐 ${text}`, "error");
803
802
  return {
804
803
  content: [{ type: "text", text }],
805
804
  details: makeDetails(command, host, sudo, reason, {
@@ -814,7 +813,6 @@ export default function (pi: ExtensionAPI): void {
814
813
  ((needLogin && !collected.login) || (needSudo && !collected.sudo));
815
814
  if (overlayResult.action !== "approved" || missing) {
816
815
  const r = cancelResult(command, host, sudo, reason, overlayResult.action);
817
- ctx.ui.notify(`🔐 ${r.content[0]?.text}`, "warning");
818
816
  return r;
819
817
  }
820
818
 
@@ -909,7 +907,6 @@ export default function (pi: ExtensionAPI): void {
909
907
  // next call re-prompts.
910
908
  if (detectSshFailure(result.code, result.stderr)) {
911
909
  credCache.delete(key);
912
- ctx.ui.notify("🔐 SSH authentication failed", "error");
913
910
  return {
914
911
  content: [{ type: "text", text: `SSH authentication failed:\n${result.stderr}` }],
915
912
  details: makeDetails(command, host, sudo, reason, {
@@ -926,7 +923,6 @@ export default function (pi: ExtensionAPI): void {
926
923
  // Remote sudo password failure → drop the bad sudo password.
927
924
  if (sudo && detectSudoFailure(result.stderr)) {
928
925
  credCache.set(key, loginPassword ? { loginPassword } : {});
929
- ctx.ui.notify("🔐 Remote sudo authentication failed", "error");
930
926
  return {
931
927
  content: [{ type: "text", text: `Remote sudo authentication failed:\n${result.stderr}` }],
932
928
  details: makeDetails(command, host, sudo, reason, {