patchcord 0.6.39 → 0.6.40
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/.claude-plugin/plugin.json +1 -1
- package/bin/patchcord.mjs +46 -3
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -789,8 +789,23 @@ if (cmd === "whoami") {
|
|
|
789
789
|
// provisioned". Say explicitly that identity is fine.
|
|
790
790
|
console.log(`self-description: (not set — optional; your identity ${json.agent}@${json.namespace} is fully provisioned. Set one with: patchcord whoami --propose "<text>")`);
|
|
791
791
|
}
|
|
792
|
-
|
|
793
|
-
|
|
792
|
+
// TTY-ONLY, AND THAT IS THE WHOLE POINT.
|
|
793
|
+
//
|
|
794
|
+
// This tip is addressed to a human reading a terminal. It was printed
|
|
795
|
+
// unconditionally, which meant it also landed in the stdout an AGENT captures
|
|
796
|
+
// from a tool call — and to a model, a suggestion in a tool result is
|
|
797
|
+
// indistinguishable from an instruction. An agy session's own record shows the
|
|
798
|
+
// consequence exactly: 6 `patchcord whoami` calls, 6 `patchcord agents` calls,
|
|
799
|
+
// paired one-to-one, each `agents` immediately following the tip in the
|
|
800
|
+
// previous command's output. Nothing in any skill or config asked for it. We
|
|
801
|
+
// did, in our own stdout, every single time.
|
|
802
|
+
//
|
|
803
|
+
// A tip is help. An unrequested command is work. The difference is entirely in
|
|
804
|
+
// who is reading, and `isTTY` is the one place that difference is knowable.
|
|
805
|
+
if (process.stdout.isTTY) {
|
|
806
|
+
console.log();
|
|
807
|
+
console.log(`tip: \`patchcord agents\` returns whoami for all peers.`);
|
|
808
|
+
}
|
|
794
809
|
for (const w of warnings) {
|
|
795
810
|
// stderr, matching the global-scope warning above. The line is addressed
|
|
796
811
|
// to the AGENT and says to relay it, because the human has no reason to
|
|
@@ -1432,10 +1447,38 @@ if (cmd === "login" || cmd === "orchestrator" || cmd === "teamlead" || cmd === "
|
|
|
1432
1447
|
// Antigravity CLI: PROJECT-scoped config at .agents/mcp_config.json (one
|
|
1433
1448
|
// project = one namespace = one agent). Remote HTTP uses `serverUrl`.
|
|
1434
1449
|
const adir = join(dir, ".agents"); mkdirSync(adir, { recursive: true });
|
|
1435
|
-
|
|
1450
|
+
const agWritten = writeJson(join(adir, "mcp_config.json"), (o) => {
|
|
1436
1451
|
o.mcpServers = o.mcpServers || {};
|
|
1437
1452
|
o.mcpServers.patchcord = { serverUrl: `${baseUrl}/mcp`, headers: hdr };
|
|
1438
1453
|
});
|
|
1454
|
+
// THE SKILL IS A GUARD, NOT DOCUMENTATION, AND IT WAS MISSING HERE.
|
|
1455
|
+
//
|
|
1456
|
+
// The interactive installer copies these; this path did not, so every seat
|
|
1457
|
+
// provisioned by `patchcord provision --tool agy` — which is how a
|
|
1458
|
+
// mux-deployed Team is built — got the credential and none of the rules.
|
|
1459
|
+
// Three live agy seats were checked: one had only patchcord-wait, two had
|
|
1460
|
+
// no skills at all.
|
|
1461
|
+
//
|
|
1462
|
+
// What goes missing is specifically the line "Do not run the `patchcord`
|
|
1463
|
+
// CLI (whoami, inbox, recall, HTTP calls)". Without it, a seat whose MCP
|
|
1464
|
+
// has not loaded reaches for the CLI instead — and one that did wrote its
|
|
1465
|
+
// own send_patchcord.js and ran it eight times. The skill exists, is
|
|
1466
|
+
// correctly worded, and was installed by one provisioning path out of two,
|
|
1467
|
+
// which is the same as not having it for anyone who arrives by the other.
|
|
1468
|
+
//
|
|
1469
|
+
// Copied the same way hermes is above, which is why the pattern was
|
|
1470
|
+
// already here to notice.
|
|
1471
|
+
try {
|
|
1472
|
+
const agSkills = join(pluginRoot, "per-project-skills", "antigravity");
|
|
1473
|
+
for (const [src, dest] of [["inbox", "patchcord"], ["wait", "patchcord-wait"]]) {
|
|
1474
|
+
const from = join(agSkills, src, "SKILL.md");
|
|
1475
|
+
if (!existsSync(from)) continue;
|
|
1476
|
+
const to = join(adir, "skills", dest);
|
|
1477
|
+
mkdirSync(to, { recursive: true });
|
|
1478
|
+
cpSync(from, join(to, "SKILL.md"));
|
|
1479
|
+
}
|
|
1480
|
+
} catch {}
|
|
1481
|
+
return agWritten;
|
|
1439
1482
|
}
|
|
1440
1483
|
if (tool === "hermes") {
|
|
1441
1484
|
// Hermes reads MCP servers ONLY from its GLOBAL ~/.hermes/config.yaml
|
package/package.json
CHANGED