myrmidocs 0.4.4 → 0.4.5
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.js +55 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7841,16 +7841,33 @@ Ground first with \`myr search <query>\`, \`myr read <page>\`, and
|
|
|
7841
7841
|
Provenance is always on: every write lands attributed to the configured
|
|
7842
7842
|
agent id, and proposals wait for a human to accept. Do not edit workspace
|
|
7843
7843
|
files directly; the daemon owns the pages.
|
|
7844
|
+
|
|
7845
|
+
## Working an assignment
|
|
7846
|
+
|
|
7847
|
+
A page whose frontmatter has \`owner: ai:<your-name>\` is assigned to you.
|
|
7848
|
+
That is a work request you discover on your own heartbeat, not a push.
|
|
7849
|
+
Your default job on an assigned page:
|
|
7850
|
+
|
|
7851
|
+
- Read the page, its open comments, and its recent diffs (\`myr read\`) before acting.
|
|
7852
|
+
- Look one level up (the containing folder or project) for context first.
|
|
7853
|
+
- Act within your granted scope: \`myr propose\` for suggestions, \`myr write\` where you have write scope.
|
|
7854
|
+
- If a task card or the page names a SKILL, use that skill; otherwise do the obvious next step the page describes.
|
|
7855
|
+
- Scheduling stays yours: you act on your own heartbeat and the workspace never triggers you.
|
|
7844
7856
|
`;
|
|
7845
7857
|
function candidateSkillsDirs() {
|
|
7846
7858
|
const home = import_os8.default.homedir();
|
|
7847
7859
|
return [
|
|
7848
7860
|
import_path14.default.join(home, ".claude", "skills"),
|
|
7849
|
-
|
|
7861
|
+
// Claude Code
|
|
7862
|
+
import_path14.default.join(home, ".codex", "skills"),
|
|
7863
|
+
// OpenAI Codex CLI
|
|
7864
|
+
import_path14.default.join(home, ".hermes", "skills")
|
|
7865
|
+
// Hermes agent (safe default; dir created on first Hermes run)
|
|
7850
7866
|
];
|
|
7851
7867
|
}
|
|
7852
7868
|
function installSkill() {
|
|
7853
7869
|
const dirs = candidateSkillsDirs();
|
|
7870
|
+
const written = [];
|
|
7854
7871
|
for (const dir of dirs) {
|
|
7855
7872
|
let stat;
|
|
7856
7873
|
try {
|
|
@@ -7863,12 +7880,13 @@ function installSkill() {
|
|
|
7863
7880
|
import_fs14.default.mkdirSync(skillDir, { recursive: true });
|
|
7864
7881
|
const skillPath = import_path14.default.join(skillDir, "SKILL.md");
|
|
7865
7882
|
import_fs14.default.writeFileSync(skillPath, SKILL_MD, "utf8");
|
|
7866
|
-
|
|
7883
|
+
written.push(skillPath);
|
|
7867
7884
|
}
|
|
7868
|
-
|
|
7869
|
-
installed:
|
|
7870
|
-
|
|
7871
|
-
|
|
7885
|
+
if (written.length > 0) {
|
|
7886
|
+
return { installed: true, paths: written, path: written[0] };
|
|
7887
|
+
}
|
|
7888
|
+
const fallback = import_path14.default.join(dirs[0], SKILL_DIR_NAME, "SKILL.md");
|
|
7889
|
+
return { installed: false, paths: [fallback], path: fallback };
|
|
7872
7890
|
}
|
|
7873
7891
|
|
|
7874
7892
|
// src/commands/connect.ts
|
|
@@ -7902,7 +7920,9 @@ async function runConnect(workspaceUrl, opts, fetcher = fetch) {
|
|
|
7902
7920
|
try {
|
|
7903
7921
|
const result = installSkill();
|
|
7904
7922
|
if (result.installed) {
|
|
7905
|
-
|
|
7923
|
+
for (const p of result.paths) {
|
|
7924
|
+
console.log(`skill installed: ${p}`);
|
|
7925
|
+
}
|
|
7906
7926
|
} else {
|
|
7907
7927
|
console.log(`no agent skills dir found; copy the skill to: ${result.path}`);
|
|
7908
7928
|
}
|
|
@@ -7966,6 +7986,33 @@ function registerWhoami(program3) {
|
|
|
7966
7986
|
});
|
|
7967
7987
|
}
|
|
7968
7988
|
|
|
7989
|
+
// src/commands/identity.ts
|
|
7990
|
+
async function runIdentitySet(opts) {
|
|
7991
|
+
const by = resolveAgentId(opts.as);
|
|
7992
|
+
const payload = { by };
|
|
7993
|
+
if (opts.color) payload.color = opts.color;
|
|
7994
|
+
if (opts.emoji) payload.emoji = opts.emoji;
|
|
7995
|
+
if (opts.role) payload.role = opts.role;
|
|
7996
|
+
if (opts.name) payload.name = opts.name;
|
|
7997
|
+
if (Object.keys(payload).length === 1) {
|
|
7998
|
+
return fail("Provide at least one of --color, --emoji, --role, --name");
|
|
7999
|
+
}
|
|
8000
|
+
const { body } = await daemonPost("/api/daemon/identity", payload);
|
|
8001
|
+
const bits = [
|
|
8002
|
+
body.name ? `name: ${body.name}` : null,
|
|
8003
|
+
body.role ? `role: ${body.role}` : null,
|
|
8004
|
+
body.color ? `color: ${body.color}` : null,
|
|
8005
|
+
body.emoji ? `emoji: ${body.emoji}` : null
|
|
8006
|
+
].filter(Boolean).join(", ");
|
|
8007
|
+
console.log(`identity set for ${body.agentId}${bits ? ` (${bits})` : ""}`);
|
|
8008
|
+
}
|
|
8009
|
+
function registerIdentity(program3) {
|
|
8010
|
+
const identity = program3.command("identity").description("Manage your agent identity in the workspace (color, emoji, role)");
|
|
8011
|
+
identity.command("set").description("Set your own display identity: color, emoji, role, name").option("--color <hex>", "hex color like #10b981 (your provenance + dot color)").option("--emoji <emoji>", "an emoji avatar").option("--role <text>", "a short role or title, e.g. 'Research agent'").option("--name <text>", "display name (defaults to your agent id)").option("--as <id>", "agent id to act as (defaults to your binding)").action(async (opts) => {
|
|
8012
|
+
await runIdentitySet(opts);
|
|
8013
|
+
});
|
|
8014
|
+
}
|
|
8015
|
+
|
|
7969
8016
|
// src/commands/uninstall.ts
|
|
7970
8017
|
var import_fs15 = __toESM(require("fs"));
|
|
7971
8018
|
var import_path15 = __toESM(require("path"));
|
|
@@ -8117,6 +8164,7 @@ registerPropose(program2);
|
|
|
8117
8164
|
registerNew(program2);
|
|
8118
8165
|
registerConnect(program2);
|
|
8119
8166
|
registerWhoami(program2);
|
|
8167
|
+
registerIdentity(program2);
|
|
8120
8168
|
registerUninstall(program2);
|
|
8121
8169
|
registerResetConfig(program2);
|
|
8122
8170
|
program2.parseAsync().catch((err) => {
|