rhachet 1.10.1 → 1.11.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.
Files changed (39) hide show
  1. package/dist/.test/example.use.repo/example.echoRegistry.js +5 -2
  2. package/dist/.test/example.use.repo/example.echoRegistry.js.map +1 -1
  3. package/dist/contract/cli/invoke.js +2 -0
  4. package/dist/contract/cli/invoke.js.map +1 -1
  5. package/dist/contract/cli/invokeAsk.js +4 -2
  6. package/dist/contract/cli/invokeAsk.js.map +1 -1
  7. package/dist/contract/cli/invokeBriefsBoot.d.ts +1 -1
  8. package/dist/contract/cli/invokeBriefsBoot.integration.test.js +46 -36
  9. package/dist/contract/cli/invokeBriefsBoot.integration.test.js.map +1 -1
  10. package/dist/contract/cli/invokeBriefsBoot.js +9 -5
  11. package/dist/contract/cli/invokeBriefsBoot.js.map +1 -1
  12. package/dist/contract/cli/invokeBriefsLink.d.ts +1 -1
  13. package/dist/contract/cli/invokeBriefsLink.integration.test.js +28 -16
  14. package/dist/contract/cli/invokeBriefsLink.integration.test.js.map +1 -1
  15. package/dist/contract/cli/invokeBriefsLink.js +46 -40
  16. package/dist/contract/cli/invokeBriefsLink.js.map +1 -1
  17. package/dist/contract/cli/invokeList.js +1 -1
  18. package/dist/contract/cli/invokeList.js.map +1 -1
  19. package/dist/contract/cli/invokeReadme.integration.test.js +1 -1
  20. package/dist/contract/cli/invokeReadme.integration.test.js.map +1 -1
  21. package/dist/contract/cli/invokeReadme.js +2 -2
  22. package/dist/contract/cli/invokeReadme.js.map +1 -1
  23. package/dist/contract/cli/invokeRoles.d.ts +11 -0
  24. package/dist/contract/cli/invokeRoles.js +19 -0
  25. package/dist/contract/cli/invokeRoles.js.map +1 -0
  26. package/dist/contract/cli/invokeRolesBoot.d.ts +9 -0
  27. package/dist/contract/cli/invokeRolesBoot.js +205 -0
  28. package/dist/contract/cli/invokeRolesBoot.js.map +1 -0
  29. package/dist/contract/cli/invokeRolesLink.d.ts +11 -0
  30. package/dist/contract/cli/invokeRolesLink.js +157 -0
  31. package/dist/contract/cli/invokeRolesLink.js.map +1 -0
  32. package/dist/domain/objects/Role.d.ts +13 -3
  33. package/dist/domain/objects/Role.js.map +1 -1
  34. package/dist/logic/invoke/getAgentReadmeTemplates.d.ts +6 -0
  35. package/dist/logic/invoke/getAgentReadmeTemplates.js +42 -0
  36. package/dist/logic/invoke/getAgentReadmeTemplates.js.map +1 -0
  37. package/dist/logic/invoke/performInCurrentThread.js +1 -1
  38. package/dist/logic/invoke/performInCurrentThread.js.map +1 -1
  39. package/package.json +1 -1
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.invokeRolesLink = void 0;
4
+ const helpful_errors_1 = require("helpful-errors");
5
+ const node_fs_1 = require("node:fs");
6
+ const node_path_1 = require("node:path");
7
+ const assureFindRole_1 = require("../../logic/invoke/assureFindRole");
8
+ const getAgentReadmeTemplates_1 = require("../../logic/invoke/getAgentReadmeTemplates");
9
+ /**
10
+ * .what = finds or inserts a file with template content
11
+ * .why = ensures standard readme files exist without overwriting custom changes
12
+ * .how = only writes if file doesn't exist or content matches template exactly
13
+ */
14
+ const findsertFile = (options) => {
15
+ const { path, template } = options;
16
+ if (!(0, node_fs_1.existsSync)(path)) {
17
+ console.log(` + ${(0, node_path_1.basename)(path)} (created)`);
18
+ (0, node_fs_1.writeFileSync)(path, template, 'utf8');
19
+ return;
20
+ }
21
+ // File exists - check if it matches template
22
+ const existingContent = (0, node_fs_1.readFileSync)(path, 'utf8');
23
+ if (existingContent === template) {
24
+ console.log(` ✓ ${(0, node_path_1.basename)(path)} (unchanged)`);
25
+ }
26
+ else {
27
+ console.log(` ↻ ${(0, node_path_1.basename)(path)} (preserved with custom changes)`);
28
+ }
29
+ };
30
+ /**
31
+ * .what = creates symlinks for all files in a source directory to a target directory
32
+ * .why = enables role resources to be linked from node_modules or other sources
33
+ */
34
+ const symlinkDirectory = (options) => {
35
+ const { sourceDir, targetDir, label } = options;
36
+ if (!(0, node_fs_1.existsSync)(sourceDir)) {
37
+ return 0; // No source directory, skip silently
38
+ }
39
+ const files = (0, node_fs_1.readdirSync)(sourceDir);
40
+ if (files.length === 0) {
41
+ return 0;
42
+ }
43
+ (0, node_fs_1.mkdirSync)(targetDir, { recursive: true });
44
+ for (const file of files) {
45
+ const sourcePath = (0, node_path_1.resolve)(sourceDir, file);
46
+ const targetPath = (0, node_path_1.resolve)(targetDir, (0, node_path_1.basename)(file));
47
+ // Remove existing symlink/file if it exists
48
+ if ((0, node_fs_1.existsSync)(targetPath)) {
49
+ try {
50
+ (0, node_fs_1.unlinkSync)(targetPath);
51
+ console.log(` ↻ ${label}/${file} (updating)`);
52
+ }
53
+ catch {
54
+ (0, node_fs_1.rmSync)(targetPath, { recursive: true, force: true });
55
+ console.log(` ↻ ${label}/${file} (updating)`);
56
+ }
57
+ }
58
+ else {
59
+ console.log(` + ${label}/${file}`);
60
+ }
61
+ // Create relative symlink from target directory to source file
62
+ const relativeSource = (0, node_path_1.relative)(targetDir, sourcePath);
63
+ try {
64
+ (0, node_fs_1.symlinkSync)(relativeSource, targetPath);
65
+ }
66
+ catch (error) {
67
+ if (error.code === 'EEXIST') {
68
+ console.log(` ⚠️ ${label}/${file} already exists (skipping)`);
69
+ }
70
+ else {
71
+ throw error;
72
+ }
73
+ }
74
+ }
75
+ return files.length;
76
+ };
77
+ /**
78
+ * .what = adds the "roles link" subcommand to the CLI
79
+ * .why = creates .agent/ directory structure and links role resources
80
+ * .how = findserts standard readmes and symlinks briefs and skills
81
+ */
82
+ const invokeRolesLink = ({ command, registries, }) => {
83
+ command
84
+ .command('link')
85
+ .description('link role resources into .agent/ directory structure')
86
+ .option('--repo <slug>', 'the repository slug for the role')
87
+ .option('--role <slug>', 'the role to link resources for')
88
+ .action((opts) => {
89
+ if (!opts.repo)
90
+ helpful_errors_1.BadRequestError.throw('--repo is required (e.g., --repo ehmpathy)');
91
+ if (!opts.role)
92
+ helpful_errors_1.BadRequestError.throw('--role is required (e.g., --role mechanic)');
93
+ const repoSlug = opts.repo;
94
+ const role = (0, assureFindRole_1.assureFindRole)({ registries, slug: opts.role });
95
+ console.log(``);
96
+ console.log(`🔗 Linking role "${role.slug}" from repo "${repoSlug}"...`);
97
+ console.log(``);
98
+ // Create .agent directory structure
99
+ const agentDir = (0, node_path_1.resolve)(process.cwd(), '.agent');
100
+ const repoThisDir = (0, node_path_1.resolve)(agentDir, 'repo=.this');
101
+ const repoRoleDir = (0, node_path_1.resolve)(agentDir, `repo=${repoSlug}`, `role=${role.slug}`);
102
+ (0, node_fs_1.mkdirSync)(agentDir, { recursive: true });
103
+ (0, node_fs_1.mkdirSync)(repoThisDir, { recursive: true });
104
+ (0, node_fs_1.mkdirSync)(repoRoleDir, { recursive: true });
105
+ // Findsert .agent/readme.md
106
+ findsertFile({
107
+ path: (0, node_path_1.resolve)(agentDir, 'readme.md'),
108
+ template: (0, getAgentReadmeTemplates_1.getAgentRootReadmeTemplate)(),
109
+ });
110
+ // Findsert .agent/repo=.this/readme.md
111
+ findsertFile({
112
+ path: (0, node_path_1.resolve)(repoThisDir, 'readme.md'),
113
+ template: (0, getAgentReadmeTemplates_1.getAgentRepoThisReadmeTemplate)(),
114
+ });
115
+ // Upsert .agent/repo=$repo/role=$role/readme.md
116
+ if (role.readme) {
117
+ const roleReadmePath = (0, node_path_1.resolve)(repoRoleDir, 'readme.md');
118
+ (0, node_fs_1.writeFileSync)(roleReadmePath, role.readme, 'utf8');
119
+ console.log(` + role=${role.slug}/readme.md (upserted)`);
120
+ }
121
+ // Link briefs if configured
122
+ let briefsCount = 0;
123
+ if (role.briefs.dirs.length > 0) {
124
+ for (const briefDir of role.briefs.dirs) {
125
+ const sourceDir = (0, node_path_1.resolve)(process.cwd(), briefDir.uri);
126
+ const targetDir = (0, node_path_1.resolve)(repoRoleDir, 'briefs');
127
+ briefsCount += symlinkDirectory({
128
+ sourceDir,
129
+ targetDir,
130
+ label: 'briefs',
131
+ });
132
+ }
133
+ }
134
+ // Link skills if configured
135
+ let skillsCount = 0;
136
+ if (role.skills.dirs.length > 0) {
137
+ for (const skillDir of role.skills.dirs) {
138
+ const sourceDir = (0, node_path_1.resolve)(process.cwd(), skillDir.uri);
139
+ const targetDir = (0, node_path_1.resolve)(repoRoleDir, 'skills');
140
+ skillsCount += symlinkDirectory({
141
+ sourceDir,
142
+ targetDir,
143
+ label: 'skills',
144
+ });
145
+ }
146
+ }
147
+ console.log(``);
148
+ console.log(`🔗 Linked role "${role.slug}" from repo "${repoSlug}"`);
149
+ if (briefsCount > 0)
150
+ console.log(` - ${briefsCount} brief(s) linked`);
151
+ if (skillsCount > 0)
152
+ console.log(` - ${skillsCount} skill(s) linked`);
153
+ console.log(``);
154
+ });
155
+ };
156
+ exports.invokeRolesLink = invokeRolesLink;
157
+ //# sourceMappingURL=invokeRolesLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invokeRolesLink.js","sourceRoot":"","sources":["../../../src/contract/cli/invokeRolesLink.ts"],"names":[],"mappings":";;;AACA,mDAAiD;AACjD,qCASiB;AACjB,yCAAwD;AAExD,sEAAmE;AACnE,wFAGoD;AAGpD;;;;GAIG;AACH,MAAM,YAAY,GAAG,CAAC,OAA2C,EAAQ,EAAE;IACzE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAEnC,IAAI,CAAC,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,OAAO,IAAA,oBAAQ,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/C,IAAA,uBAAa,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QACtC,OAAO;IACT,CAAC;IAED,6CAA6C;IAC7C,MAAM,eAAe,GAAG,IAAA,sBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnD,IAAI,eAAe,KAAK,QAAQ,EAAE,CAAC;QACj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AAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,IAAI,gBAAgB,QAAQ,GAAG,CAAC,CAAC;QACrE,IAAI,WAAW,GAAG,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,OAAO,WAAW,kBAAkB,CAAC,CAAC;QACvE,IAAI,WAAW,GAAG,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,OAAO,WAAW,kBAAkB,CAAC,CAAC;QACvE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AA3FW,QAAA,eAAe,mBA2F1B"}
@@ -39,15 +39,25 @@ export interface Role {
39
39
  /**
40
40
  * .what = the skills known by the role
41
41
  * .why = declares what the role can do
42
+ * .how =
43
+ * - dirs: directory-based skills (e.g., .sh scripts) for linking/booting
44
+ * - refs: programmatic RoleSkill references for execution
42
45
  */
43
- skills: RoleSkill<any>[];
46
+ skills: {
47
+ dirs: {
48
+ uri: string;
49
+ }[];
50
+ refs: RoleSkill<any>[];
51
+ };
44
52
  /**
45
53
  * .what = the briefs curated for this role
46
54
  * .why = declares the library of knowledge this role can and should leverage
47
55
  * - enables reuse of the briefs, independent from the skills
48
56
  */
49
- briefs: null | {
50
- dir: string;
57
+ briefs: {
58
+ dirs: {
59
+ uri: string;
60
+ }[];
51
61
  };
52
62
  }
53
63
  export declare class Role extends DomainEntity<Role> implements Role {
@@ -1 +1 @@
1
- {"version":3,"file":"Role.js","sourceRoot":"","sources":["../../../src/domain/objects/Role.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AA0D9C,MAAa,IAAK,SAAQ,6BAAkB;;AAA5C,oBAEC;AADe,WAAM,GAAG,CAAC,MAAM,CAAU,CAAC"}
1
+ {"version":3,"file":"Role.js","sourceRoot":"","sources":["../../../src/domain/objects/Role.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAgE9C,MAAa,IAAK,SAAQ,6BAAkB;;AAA5C,oBAEC;AADe,WAAM,GAAG,CAAC,MAAM,CAAU,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * .what = provides template content for .agent/ directory readme files
3
+ * .why = standardizes the documentation structure for agent roles
4
+ */
5
+ export declare const getAgentRootReadmeTemplate: () => string;
6
+ export declare const getAgentRepoThisReadmeTemplate: () => string;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /**
3
+ * .what = provides template content for .agent/ directory readme files
4
+ * .why = standardizes the documentation structure for agent roles
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.getAgentRepoThisReadmeTemplate = exports.getAgentRootReadmeTemplate = void 0;
8
+ const getAgentRootReadmeTemplate = () => {
9
+ return `this dir hosts the .skills and .briefs useful to any agent, human or robot, when at work in this repo
10
+
11
+ repo=.this specifies the docs that are scoped to this specific @gitroot repo
12
+
13
+ repo=$repo specifies the docs that are scoped to any rhachet repo
14
+
15
+ ---
16
+
17
+ glossary
18
+
19
+ agents = actors w/ delegated authority
20
+ actors = roles w/ repl
21
+ roles = coherent collections of skills and briefs
22
+ skills = mechanisms that can be executed to produce curated effects
23
+ briefs = resources that externalize knowledge of curated concepts
24
+ brain = a human or robot imagination machine
25
+ - e.g., robot:llama:openai.o4
26
+ - e.g., robot:agent:claude.sonnet.v4_5
27
+ - e.g., human:agent:you
28
+
29
+ ---
30
+
31
+ written by rhachet
32
+ `;
33
+ };
34
+ exports.getAgentRootReadmeTemplate = getAgentRootReadmeTemplate;
35
+ const getAgentRepoThisReadmeTemplate = () => {
36
+ return `this directory contains the .skills and .briefs scoped to this specific @gitroot repository
37
+
38
+ these are resources that are specific to the current project and may not be reusable across other repositories
39
+ `;
40
+ };
41
+ exports.getAgentRepoThisReadmeTemplate = getAgentRepoThisReadmeTemplate;
42
+ //# sourceMappingURL=getAgentReadmeTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAgentReadmeTemplates.js","sourceRoot":"","sources":["../../../src/logic/invoke/getAgentReadmeTemplates.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEI,MAAM,0BAA0B,GAAG,GAAW,EAAE;IACrD,OAAO;;;;;;;;;;;;;;;;;;;;;;;CAuBR,CAAC;AACF,CAAC,CAAC;AAzBW,QAAA,0BAA0B,8BAyBrC;AAEK,MAAM,8BAA8B,GAAG,GAAW,EAAE;IACzD,OAAO;;;CAGR,CAAC;AACF,CAAC,CAAC;AALW,QAAA,8BAA8B,kCAKzC"}
@@ -24,7 +24,7 @@ const performInCurrentThread = async (input) => {
24
24
  if (!role)
25
25
  helpful_errors_1.BadRequestError.throw(`unknown role "${input.opts.role}"`);
26
26
  // lookup the skill
27
- const skill = role.skills.find((s) => s.slug === input.opts.skill);
27
+ const skill = role.skills.refs.find((s) => s.slug === input.opts.skill);
28
28
  if (!skill)
29
29
  helpful_errors_1.BadRequestError.throw(`unknown skill "${input.opts.skill}" under role "${input.opts.role}"`);
30
30
  // instantiate the threads
@@ -1 +1 @@
1
- {"version":3,"file":"performInCurrentThread.js","sourceRoot":"","sources":["../../../src/logic/invoke/performInCurrentThread.ts"],"names":[],"mappings":";;;AAAA,mDAA0E;AAI1E,oEAAiE;AACjE,qDAAkD;AAClD,uDAAoD;AACpD,uDAAoD;AAEpD;;;;;GAKG;AACI,MAAM,sBAAsB,GAAG,KAAK,EAAE,KAO5C,EAAiB,EAAE;IAClB,kBAAkB;IAClB,MAAM,IAAI,GAAG,IAAA,+BAAc,EAAC;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,IAAI,EACF,KAAK,CAAC,IAAI,CAAC,IAAI;YACf,wCAAuB,CAAC,KAAK,CAAC,sCAAsC,EAAE;gBACpE,IAAI,EAAE,KAAK,CAAC,IAAI;aACjB,CAAC;KACL,CAAC,CAAC;IACH,IAAI,CAAC,IAAI;QAAE,gCAAe,CAAC,KAAK,CAAC,iBAAiB,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,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,EAAE,KAAK,CAAC,KAAK;QACrB,OAAO;KACR,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAvDW,QAAA,sBAAsB,0BAuDjC"}
1
+ {"version":3,"file":"performInCurrentThread.js","sourceRoot":"","sources":["../../../src/logic/invoke/performInCurrentThread.ts"],"names":[],"mappings":";;;AAAA,mDAA0E;AAI1E,oEAAiE;AACjE,qDAAkD;AAClD,uDAAoD;AACpD,uDAAoD;AAEpD;;;;;GAKG;AACI,MAAM,sBAAsB,GAAG,KAAK,EAAE,KAO5C,EAAiB,EAAE;IAClB,kBAAkB;IAClB,MAAM,IAAI,GAAG,IAAA,+BAAc,EAAC;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,IAAI,EACF,KAAK,CAAC,IAAI,CAAC,IAAI;YACf,wCAAuB,CAAC,KAAK,CAAC,sCAAsC,EAAE;gBACpE,IAAI,EAAE,KAAK,CAAC,IAAI;aACjB,CAAC;KACL,CAAC,CAAC;IACH,IAAI,CAAC,IAAI;QAAE,gCAAe,CAAC,KAAK,CAAC,iBAAiB,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAEtE,mBAAmB;IACnB,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxE,IAAI,CAAC,KAAK;QACR,gCAAe,CAAC,KAAK,CACnB,kBAAkB,KAAK,CAAC,IAAI,CAAC,KAAK,iBAAiB,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CACtE,CAAC;IAEJ,0BAA0B;IAC1B,MAAM,OAAO,GAAG,MAAM,IAAA,iCAAe,EAAC;QACpC,MAAM,EAAE,KAAK,CAAC,OAAO;QACrB,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE;KACvC,CAAC,CAAC;IAEH,0BAA0B;IAC1B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAyC,CAAC;IAC9D,MAAM,OAAO,GAAG,MAAM,IAAA,iCAAe,EAAC;QACpC,MAAM,EAAE,KAAK,CAAC,OAAO;QACrB,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE;KAC1B,CAAC,CAAC;IAEH,oBAAoB;IACpB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,IAAA,uCAAkB,EACtB;QACE,QAAQ,EAAE,KAAK,CAAC,KAAK;QACrB,OAAO;KACR,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAvDW,QAAA,sBAAsB,0BAuDjC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "rhachet",
3
3
  "author": "ehmpathy",
4
4
  "description": "A framework for reliable, thorough thought. Weave threads of thought via stitches.",
5
- "version": "1.10.1",
5
+ "version": "1.11.0",
6
6
  "repository": "ehmpathy/rhachet",
7
7
  "homepage": "https://github.com/ehmpathy/rhachet",
8
8
  "keywords": [