rhachet-roles-ehmpathy 1.4.0 → 1.7.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.
- package/dist/contract/sdk/index.d.ts +1 -0
- package/dist/contract/sdk/index.js +3 -1
- package/dist/contract/sdk/index.js.map +1 -1
- package/dist/logic/hooks/decodeDocOutputPath.d.ts +21 -0
- package/dist/logic/hooks/decodeDocOutputPath.js +57 -0
- package/dist/logic/hooks/decodeDocOutputPath.js.map +1 -0
- package/dist/logic/hooks/decodeDocOutputPath.test.d.ts +1 -0
- package/dist/logic/hooks/decodeDocOutputPath.test.js +146 -0
- package/dist/logic/hooks/decodeDocOutputPath.test.js.map +1 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.d.ts +20 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.js +80 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.js.map +1 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.test.d.ts +1 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.test.js +528 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.test.js.map +1 -0
- package/dist/logic/hooks/getInvokeHooks.d.ts +2 -0
- package/dist/logic/hooks/getInvokeHooks.js +15 -0
- package/dist/logic/hooks/getInvokeHooks.js.map +1 -0
- package/dist/logic/hooks/relateDocOutputPath.d.ts +11 -0
- package/dist/logic/hooks/relateDocOutputPath.js +58 -0
- package/dist/logic/hooks/relateDocOutputPath.js.map +1 -0
- package/dist/logic/hooks/relateDocOutputPath.test.d.ts +1 -0
- package/dist/logic/hooks/relateDocOutputPath.test.js +111 -0
- package/dist/logic/hooks/relateDocOutputPath.test.js.map +1 -0
- package/dist/logic/roles/bhrain/.briefs/trait.chillnature.md +14 -0
- package/dist/logic/roles/bhrain/getBhrainRole.js +1 -0
- package/dist/logic/roles/bhrain/getBhrainRole.js.map +1 -1
- package/dist/logic/roles/bhrain/khue.instantiate/stepInstantiate.skill.js +1 -4
- package/dist/logic/roles/bhrain/khue.instantiate/stepInstantiate.skill.js.map +1 -1
- package/dist/logic/roles/ecologist/getEcologistRole.js +1 -0
- package/dist/logic/roles/ecologist/getEcologistRole.js.map +1 -1
- package/dist/logic/roles/getRoleRegistry.js +2 -0
- package/dist/logic/roles/getRoleRegistry.js.map +1 -1
- package/dist/logic/roles/mechanic/.briefs/terms/badpractice/script.md +9 -0
- package/dist/logic/roles/mechanic/getMechanicRole.js +1 -0
- package/dist/logic/roles/mechanic/getMechanicRole.js.map +1 -1
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.d.ts +42 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.integration.test.d.ts +1 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.integration.test.js +76 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.integration.test.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.js +126 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.skill.d.ts +12 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.skill.js +69 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.skill.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.d.ts +54 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.integration.test.d.ts +1 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.integration.test.js +97 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.integration.test.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.js +68 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.skill.d.ts +28 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.skill.js +124 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.skill.js.map +1 -0
- package/dist/logic/roles/terminal.commander/getCommanderRole.d.ts +2 -0
- package/dist/logic/roles/terminal.commander/getCommanderRole.js +36 -0
- package/dist/logic/roles/terminal.commander/getCommanderRole.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SKILL_COMMAND_EXEC = void 0;
|
|
4
|
+
const rhachet_1 = require("rhachet");
|
|
5
|
+
const rhachet_artifact_git_1 = require("rhachet-artifact-git");
|
|
6
|
+
const genContextLogTrail_1 = require("../../../../.test/genContextLogTrail");
|
|
7
|
+
const setSkillOutputSrc_1 = require("../../../artifact/setSkillOutputSrc");
|
|
8
|
+
const genStitchStreamToDisk_1 = require("../../../context/genStitchStreamToDisk");
|
|
9
|
+
const stepExecCommand_1 = require("./stepExecCommand");
|
|
10
|
+
exports.SKILL_COMMAND_EXEC = (0, rhachet_1.genRoleSkill)({
|
|
11
|
+
slug: 'exec',
|
|
12
|
+
route: stepExecCommand_1.stepCommandExec,
|
|
13
|
+
threads: {
|
|
14
|
+
lookup: {
|
|
15
|
+
input: {
|
|
16
|
+
source: 'process.argv',
|
|
17
|
+
char: 'i',
|
|
18
|
+
desc: 'path to the input artifact containing the command text',
|
|
19
|
+
type: 'string',
|
|
20
|
+
},
|
|
21
|
+
output: {
|
|
22
|
+
source: 'process.argv',
|
|
23
|
+
char: 'o',
|
|
24
|
+
desc: 'path to the output artifact (markdown report)',
|
|
25
|
+
type: 'string',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
assess: (input) => typeof input.input === 'string' &&
|
|
29
|
+
typeof input.output === 'string',
|
|
30
|
+
instantiate: async (input) => {
|
|
31
|
+
// declare where all the artifacts will be found
|
|
32
|
+
// const obsDir = getArtifactObsDir({ uri: input.output });
|
|
33
|
+
const artifacts = {
|
|
34
|
+
input: (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: input.input }, { access: 'readonly' }),
|
|
35
|
+
output: (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: input.output }, { versions: true }),
|
|
36
|
+
};
|
|
37
|
+
// add an src file for historic record
|
|
38
|
+
await (0, setSkillOutputSrc_1.setSkillOutputSrc)({
|
|
39
|
+
skillUri: 'commander.exec',
|
|
40
|
+
opts: input,
|
|
41
|
+
}).catch(() => { });
|
|
42
|
+
// enroll the threads
|
|
43
|
+
return {
|
|
44
|
+
commander: await (0, rhachet_1.enrollThread)({
|
|
45
|
+
role: 'commander',
|
|
46
|
+
stash: {
|
|
47
|
+
art: {
|
|
48
|
+
input: artifacts.input,
|
|
49
|
+
output: artifacts.output,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
// no OpenAI needed for pure command execution
|
|
57
|
+
context: {
|
|
58
|
+
lookup: {},
|
|
59
|
+
assess: (_) => true,
|
|
60
|
+
instantiate: () => ({
|
|
61
|
+
...(0, genContextLogTrail_1.genContextLogTrail)(),
|
|
62
|
+
...(0, rhachet_1.genContextStitchTrail)({
|
|
63
|
+
stream: (0, genStitchStreamToDisk_1.genStitchStreamToDisk)({ dir: process.cwd() }), // stream events to disk
|
|
64
|
+
}),
|
|
65
|
+
}),
|
|
66
|
+
},
|
|
67
|
+
readme: '',
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=stepExecCommand.skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepExecCommand.skill.js","sourceRoot":"","sources":["../../../../../src/logic/roles/terminal.commander/command.exec/stepExecCommand.skill.ts"],"names":[],"mappings":";;;AAAA,qCAA4E;AAC5E,+DAA0D;AAE1D,6EAA0E;AAC1E,2EAAwE;AACxE,kFAA+E;AAC/E,uDAAoD;AAEvC,QAAA,kBAAkB,GAAG,IAAA,sBAAY,EAAC;IAC7C,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;QACJ,CAAC;KACF;IAED,8CAA8C;IAC9C,OAAO,EAAE;QACP,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,CAAC,CAAC,EAA8B,EAAE,CAAC,IAAI;QAC/C,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC;YAClB,GAAG,IAAA,uCAAkB,GAAE;YACvB,GAAG,IAAA,+BAAqB,EAAC;gBACvB,MAAM,EAAE,IAAA,6CAAqB,EAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,wBAAwB;aAChF,CAAC;SACH,CAAC;KACH;IACD,MAAM,EAAE,EAAE;CACX,CAAC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { GStitcher, RoleContext, Threads } from 'rhachet';
|
|
2
|
+
import { Artifact } from 'rhachet-artifact';
|
|
3
|
+
import { GitFile } from 'rhachet-artifact-git';
|
|
4
|
+
import { Focus } from '../../../../_topublish/rhachet-roles-bhrain/src/domain/objects/Focus';
|
|
5
|
+
import { ContextOpenAI } from '../../../../data/sdk/sdkOpenAi';
|
|
6
|
+
type StitcherDesired = GStitcher<Threads<{
|
|
7
|
+
caller: RoleContext<'caller', {
|
|
8
|
+
art: {
|
|
9
|
+
feedback: Artifact<typeof GitFile>;
|
|
10
|
+
'foci.goal.concept': Focus['concept'];
|
|
11
|
+
'foci.goal.context': Focus['context'];
|
|
12
|
+
};
|
|
13
|
+
refs: Artifact<typeof GitFile>[];
|
|
14
|
+
}>;
|
|
15
|
+
thinker: RoleContext<'thinker', {
|
|
16
|
+
art: {
|
|
17
|
+
'focus.concept': Focus['concept'];
|
|
18
|
+
'focus.context': Focus['context'];
|
|
19
|
+
};
|
|
20
|
+
briefs: Artifact<typeof GitFile>[];
|
|
21
|
+
}>;
|
|
22
|
+
}>, ContextOpenAI & GStitcher['context'], {
|
|
23
|
+
content: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const stepCommandPlan: import("rhachet").Stitcher<StitcherDesired>;
|
|
26
|
+
export declare const loopCommandPlan: import("rhachet").Stitcher<GStitcher<Threads<{
|
|
27
|
+
caller: RoleContext<"caller", {
|
|
28
|
+
art: {
|
|
29
|
+
feedback: Artifact<typeof GitFile>;
|
|
30
|
+
'foci.goal.concept': Focus['concept'];
|
|
31
|
+
'foci.goal.context': Focus['context'];
|
|
32
|
+
};
|
|
33
|
+
refs: Artifact<typeof GitFile>[];
|
|
34
|
+
} & {
|
|
35
|
+
ask: string;
|
|
36
|
+
art: {
|
|
37
|
+
feedback: Artifact<typeof GitFile, string>;
|
|
38
|
+
};
|
|
39
|
+
}>;
|
|
40
|
+
thinker: RoleContext<"thinker", {
|
|
41
|
+
art: {
|
|
42
|
+
'focus.concept': Focus['concept'];
|
|
43
|
+
'focus.context': Focus['context'];
|
|
44
|
+
};
|
|
45
|
+
briefs: Artifact<typeof GitFile>[];
|
|
46
|
+
} & {
|
|
47
|
+
art: {
|
|
48
|
+
"focus.concept": Artifact<typeof GitFile, string>;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
}>, ContextOpenAI & import("simple-log-methods").ContextLogTrail & import("rhachet").ContextStitchTrail, {
|
|
52
|
+
feedback: GitFile | null;
|
|
53
|
+
}>>;
|
|
54
|
+
export {};
|
package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.integration.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const uni_time_1 = require("@ehmpathy/uni-time");
|
|
4
|
+
const rhachet_1 = require("rhachet");
|
|
5
|
+
const rhachet_artifact_git_1 = require("rhachet-artifact-git");
|
|
6
|
+
const test_fns_1 = require("test-fns");
|
|
7
|
+
const genContextLogTrail_1 = require("../../../../.test/genContextLogTrail");
|
|
8
|
+
const genContextStitchTrail_1 = require("../../../../.test/genContextStitchTrail");
|
|
9
|
+
const getContextOpenAI_1 = require("../../../../.test/getContextOpenAI");
|
|
10
|
+
const stepPlanCommand_1 = require("./stepPlanCommand");
|
|
11
|
+
jest.setTimeout((0, uni_time_1.toMilliseconds)({ minutes: 5 }));
|
|
12
|
+
const artifacts = {
|
|
13
|
+
caller: {
|
|
14
|
+
feedback: (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: __dirname + '/.temp/stepCommandPlan/caller.feedback.md' }, { versions: true }),
|
|
15
|
+
'foci.goal.concept': (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
16
|
+
uri: __dirname + '/.temp/stepCommandPlan/caller.foci.goal.concept.md',
|
|
17
|
+
}, { versions: true }),
|
|
18
|
+
'foci.goal.context': (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
19
|
+
uri: __dirname + '/.temp/stepCommandPlan/caller.foci.goal.context.md',
|
|
20
|
+
}, { versions: true }),
|
|
21
|
+
},
|
|
22
|
+
thinker: {
|
|
23
|
+
'focus.concept': (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: __dirname + '/.temp/stepCommandPlan/thinker.focus.concept.md' }, { versions: true }),
|
|
24
|
+
'focus.context': (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: __dirname + '/.temp/stepCommandPlan/thinker.focus.context.md' }, { versions: true }),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const enthread = () => (0, test_fns_1.usePrep)(async () => ({
|
|
28
|
+
caller: await (0, rhachet_1.enrollThread)({
|
|
29
|
+
role: 'caller',
|
|
30
|
+
stash: {
|
|
31
|
+
art: {
|
|
32
|
+
'foci.goal.concept': artifacts.caller['foci.goal.concept'],
|
|
33
|
+
'foci.goal.context': artifacts.caller['foci.goal.context'],
|
|
34
|
+
feedback: artifacts.caller.feedback,
|
|
35
|
+
},
|
|
36
|
+
refs: [],
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
thinker: await (0, rhachet_1.enrollThread)({
|
|
40
|
+
role: 'thinker',
|
|
41
|
+
stash: {
|
|
42
|
+
art: {
|
|
43
|
+
'focus.context': artifacts.thinker['focus.context'],
|
|
44
|
+
'focus.concept': artifacts.thinker['focus.concept'],
|
|
45
|
+
},
|
|
46
|
+
briefs: [],
|
|
47
|
+
},
|
|
48
|
+
inherit: {},
|
|
49
|
+
}),
|
|
50
|
+
}));
|
|
51
|
+
describe('stepCommandPlan', () => {
|
|
52
|
+
const context = {
|
|
53
|
+
...(0, genContextLogTrail_1.genContextLogTrail)(),
|
|
54
|
+
...(0, genContextStitchTrail_1.genContextStitchTrail)(),
|
|
55
|
+
...(0, getContextOpenAI_1.getContextOpenAI)(),
|
|
56
|
+
};
|
|
57
|
+
const route = stepPlanCommand_1.stepCommandPlan;
|
|
58
|
+
(0, test_fns_1.given)('we want to commandPlan a file move', () => {
|
|
59
|
+
const ask = `
|
|
60
|
+
given
|
|
61
|
+
|
|
62
|
+
➜ tree src/logic/roles/terminal.commander
|
|
63
|
+
src/logic/roles/terminal.commander
|
|
64
|
+
└── commandPlan
|
|
65
|
+
├── stepCommandPlan.integration.test.ts
|
|
66
|
+
├── stepCommandPlan.skill.ts
|
|
67
|
+
└── stepCommandPlan.ts
|
|
68
|
+
|
|
69
|
+
rename from stepCommandPlan to just stepPlan.ts
|
|
70
|
+
`;
|
|
71
|
+
beforeEach(async () => {
|
|
72
|
+
await artifacts.caller.feedback.set({ content: '' });
|
|
73
|
+
await artifacts.thinker['focus.context'].set({
|
|
74
|
+
content: [].join('\n'),
|
|
75
|
+
});
|
|
76
|
+
await artifacts.thinker['focus.concept'].set({
|
|
77
|
+
content: [].join('\n'),
|
|
78
|
+
});
|
|
79
|
+
await artifacts.caller['foci.goal.concept'].set({
|
|
80
|
+
content: ask,
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
(0, test_fns_1.when)('invoked', () => {
|
|
84
|
+
const goalThreads = enthread();
|
|
85
|
+
(0, test_fns_1.then)('outputs an instance', async () => {
|
|
86
|
+
const result = await (0, rhachet_1.enweaveOneStitcher)({ stitcher: route, threads: goalThreads }, context);
|
|
87
|
+
console.log(JSON.stringify(result.stitch, null, 2));
|
|
88
|
+
console.log(artifacts.thinker['focus.concept']);
|
|
89
|
+
const { content } = await artifacts.thinker['focus.concept']
|
|
90
|
+
.get()
|
|
91
|
+
.expect('isPresent');
|
|
92
|
+
expect(content.toLowerCase()).toMatch(/pun|knock/i);
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=stepPlanCommand.integration.test.js.map
|
package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.integration.test.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepPlanCommand.integration.test.js","sourceRoot":"","sources":["../../../../../src/logic/roles/terminal.commander/command.plan/stepPlanCommand.integration.test.ts"],"names":[],"mappings":";;AAAA,iDAAoD;AACpD,qCAA2D;AAC3D,+DAA0D;AAC1D,uCAAsD;AAEtD,6EAA0E;AAC1E,mFAAgF;AAChF,yEAAsE;AACtE,uDAAoD;AAEpD,IAAI,CAAC,UAAU,CAAC,IAAA,yBAAc,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAEhD,MAAM,SAAS,GAAG;IAChB,MAAM,EAAE;QACN,QAAQ,EAAE,IAAA,yCAAkB,EAC1B,EAAE,GAAG,EAAE,SAAS,GAAG,2CAA2C,EAAE,EAChE,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB;QACD,mBAAmB,EAAE,IAAA,yCAAkB,EACrC;YACE,GAAG,EAAE,SAAS,GAAG,oDAAoD;SACtE,EACD,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB;QACD,mBAAmB,EAAE,IAAA,yCAAkB,EACrC;YACE,GAAG,EAAE,SAAS,GAAG,oDAAoD;SACtE,EACD,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB;KACF;IACD,OAAO,EAAE;QACP,eAAe,EAAE,IAA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AAO,CAAC,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loopCommandPlan = exports.stepCommandPlan = void 0;
|
|
4
|
+
const rhachet_1 = require("rhachet");
|
|
5
|
+
const genLoopFeedback_1 = require("../../../artifact/genLoopFeedback");
|
|
6
|
+
const stepInstantiate_1 = require("../../bhrain/khue.instantiate/stepInstantiate");
|
|
7
|
+
const BRIEFS_FOR_CLIPLAN = [];
|
|
8
|
+
const stepAddBriefs = new rhachet_1.StitchStepCompute({
|
|
9
|
+
slug: '@[thinker]<getBriefs>',
|
|
10
|
+
readme: "adds a set of briefs to the @[thinker]'s context",
|
|
11
|
+
form: 'COMPUTE',
|
|
12
|
+
stitchee: 'thinker',
|
|
13
|
+
invoke: async ({ threads }) => {
|
|
14
|
+
// identify the prior briefs
|
|
15
|
+
const briefsBeforeUnsanitized = threads.thinker.context.stash.briefs;
|
|
16
|
+
// drop the briefs if they were already included (we'll put them at the end again, so they're the last thought)
|
|
17
|
+
const briefsBefore = briefsBeforeUnsanitized.filter((b) => !BRIEFS_FOR_CLIPLAN.includes(b));
|
|
18
|
+
// append these briefs
|
|
19
|
+
const briefsAfter = [...briefsBefore, ...BRIEFS_FOR_CLIPLAN];
|
|
20
|
+
// add the briefs to the thinker's context
|
|
21
|
+
threads.thinker.context.stash.briefs = briefsAfter;
|
|
22
|
+
// extend the focus context to explicitly know to use these briefs; // todo: put this into its own step for observability in stitch trail
|
|
23
|
+
const focusContextBefore = (await threads.thinker.context.stash.art['focus.context'].get())?.content;
|
|
24
|
+
const focusContextToAdd = `
|
|
25
|
+
instantiate a shell terminal command which will achieve the ask
|
|
26
|
+
|
|
27
|
+
objectives
|
|
28
|
+
- maximize readability
|
|
29
|
+
- maximize maintainability
|
|
30
|
+
|
|
31
|
+
tactics
|
|
32
|
+
- comments and newlines -> maximize readability
|
|
33
|
+
- simplify => maximize maintainability
|
|
34
|
+
- yagni => maximize maintainability
|
|
35
|
+
`.trim();
|
|
36
|
+
const focusContextAfter = [
|
|
37
|
+
focusContextBefore,
|
|
38
|
+
'',
|
|
39
|
+
'---',
|
|
40
|
+
'',
|
|
41
|
+
focusContextToAdd,
|
|
42
|
+
].join('\n');
|
|
43
|
+
await threads.thinker.context.stash.art['focus.context'].set({
|
|
44
|
+
content: focusContextAfter,
|
|
45
|
+
});
|
|
46
|
+
// and then report that we did so
|
|
47
|
+
return {
|
|
48
|
+
input: null,
|
|
49
|
+
output: {
|
|
50
|
+
briefs: {
|
|
51
|
+
before: briefsBefore.map((artifact) => artifact.ref.uri),
|
|
52
|
+
after: briefsAfter.map((artifact) => artifact.ref.uri),
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
exports.stepCommandPlan = (0, rhachet_1.asStitcherFlat)((0, rhachet_1.genStitchRoute)({
|
|
59
|
+
slug: '@[thinker]<commandPlan>',
|
|
60
|
+
readme: '@[thinker]<getBriefs> -> @[thinker]<instantiate>[command][plan] -> [instance][command][plan]',
|
|
61
|
+
sequence: [stepAddBriefs, stepInstantiate_1.stepInstantiate],
|
|
62
|
+
}));
|
|
63
|
+
exports.loopCommandPlan = (0, genLoopFeedback_1.genLoopFeedback)({
|
|
64
|
+
stitchee: 'thinker',
|
|
65
|
+
artee: 'focus.concept',
|
|
66
|
+
repeatee: exports.stepCommandPlan,
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=stepPlanCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepPlanCommand.js","sourceRoot":"","sources":["../../../../../src/logic/roles/terminal.commander/command.plan/stepPlanCommand.ts"],"names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EAAE,iBAAiB;SAC3B,CAAC,CAAC;QAEH,iCAAiC;QACjC,OAAO;YACL,KAAK,EAAE,IAAI;YACX,MAAM,EAAE;gBACN,MAAM,EAAE;oBACN,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;oBACxD,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;iBACvD;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,IAAA,wBAAc,EAC3C,IAAA,wBAAc,EAAC;IACb,IAAI,EAAE,yBAAyB;IAC/B,MAAM,EACJ,8FAA8F;IAChG,QAAQ,EAAE,CAAC,aAAa,EAAE,iCAAe,CAAC;CAC3C,CAAC,CACH,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,iCAAe,EAAC;IAC7C,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,eAAe;IACtB,QAAQ,EAAE,uBAAe;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const SKILL_COMMAND_PLAN: import("rhachet").RoleSkill<import("rhachet").GStitcher<import("rhachet").Threads<{
|
|
2
|
+
caller: import("rhachet").RoleContext<"caller", {
|
|
3
|
+
art: {
|
|
4
|
+
feedback: import("rhachet-artifact").Artifact<typeof import("rhachet-artifact-git").GitFile, string>;
|
|
5
|
+
'foci.goal.concept': import("rhachet-artifact").Artifact<typeof import("rhachet-artifact-git").GitFile, string>;
|
|
6
|
+
'foci.goal.context': import("rhachet-artifact").Artifact<typeof import("rhachet-artifact-git").GitFile, string>;
|
|
7
|
+
};
|
|
8
|
+
refs: import("rhachet-artifact").Artifact<typeof import("rhachet-artifact-git").GitFile, string>[];
|
|
9
|
+
} & {
|
|
10
|
+
ask: string;
|
|
11
|
+
art: {
|
|
12
|
+
feedback: import("rhachet-artifact").Artifact<typeof import("rhachet-artifact-git").GitFile, string>;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
thinker: import("rhachet").RoleContext<"thinker", {
|
|
16
|
+
art: {
|
|
17
|
+
'focus.concept': import("rhachet-artifact").Artifact<typeof import("rhachet-artifact-git").GitFile, string>;
|
|
18
|
+
'focus.context': import("rhachet-artifact").Artifact<typeof import("rhachet-artifact-git").GitFile, string>;
|
|
19
|
+
};
|
|
20
|
+
briefs: import("rhachet-artifact").Artifact<typeof import("rhachet-artifact-git").GitFile, string>[];
|
|
21
|
+
} & {
|
|
22
|
+
art: {
|
|
23
|
+
"focus.concept": import("rhachet-artifact").Artifact<typeof import("rhachet-artifact-git").GitFile, string>;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
}>, import("../../../../data/sdk/sdkOpenAi").ContextOpenAI & import("simple-log-methods").ContextLogTrail & import("rhachet").ContextStitchTrail, {
|
|
27
|
+
feedback: import("rhachet-artifact-git").GitFile | null;
|
|
28
|
+
}>>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SKILL_COMMAND_PLAN = void 0;
|
|
4
|
+
const fast_glob_1 = require("fast-glob");
|
|
5
|
+
const rhachet_1 = require("rhachet");
|
|
6
|
+
const rhachet_artifact_git_1 = require("rhachet-artifact-git");
|
|
7
|
+
const genContextLogTrail_1 = require("../../../../.test/genContextLogTrail");
|
|
8
|
+
const getContextOpenAI_1 = require("../../../../.test/getContextOpenAI");
|
|
9
|
+
const setSkillOutputSrc_1 = require("../../../artifact/setSkillOutputSrc");
|
|
10
|
+
const genStitchStreamToDisk_1 = require("../../../context/genStitchStreamToDisk");
|
|
11
|
+
const stepPlanCommand_1 = require("./stepPlanCommand");
|
|
12
|
+
exports.SKILL_COMMAND_PLAN = (0, rhachet_1.genRoleSkill)({
|
|
13
|
+
slug: 'plan',
|
|
14
|
+
route: stepPlanCommand_1.loopCommandPlan,
|
|
15
|
+
threads: {
|
|
16
|
+
lookup: {
|
|
17
|
+
output: {
|
|
18
|
+
source: 'process.argv',
|
|
19
|
+
char: 'o',
|
|
20
|
+
desc: 'the output file to write against',
|
|
21
|
+
type: 'string',
|
|
22
|
+
},
|
|
23
|
+
goal: {
|
|
24
|
+
source: 'process.argv',
|
|
25
|
+
char: 'g',
|
|
26
|
+
desc: 'the goal of the request',
|
|
27
|
+
type: '?string',
|
|
28
|
+
},
|
|
29
|
+
references: {
|
|
30
|
+
source: 'process.argv',
|
|
31
|
+
char: 'f',
|
|
32
|
+
desc: 'reference files to use, if any; delimit with commas',
|
|
33
|
+
type: '?string',
|
|
34
|
+
},
|
|
35
|
+
briefs: {
|
|
36
|
+
source: 'process.argv',
|
|
37
|
+
char: 'b',
|
|
38
|
+
desc: 'brief files to use, if any; delimit with commas',
|
|
39
|
+
type: '?string',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
assess: (input) => typeof input.output === 'string',
|
|
43
|
+
instantiate: async (input) => {
|
|
44
|
+
// declare where all the artifacts will be found
|
|
45
|
+
const obsDir = (0, rhachet_artifact_git_1.getArtifactObsDir)({ uri: input.output });
|
|
46
|
+
const artifacts = {
|
|
47
|
+
goal: {
|
|
48
|
+
concept: (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: obsDir + '.goal.concept.md' }, { versions: true }),
|
|
49
|
+
context: (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: obsDir + '.goal.context.md' }, { versions: true }),
|
|
50
|
+
},
|
|
51
|
+
feedback: (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: obsDir + '.feedback.md' }, { versions: true }),
|
|
52
|
+
'focus.context': (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: obsDir + '.focus.context.md' }, { versions: true }),
|
|
53
|
+
'focus.concept': (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: input.output }, { versions: true }),
|
|
54
|
+
references: (await Promise.all(input.references
|
|
55
|
+
?.split(',')
|
|
56
|
+
.filter((uri) => !!uri)
|
|
57
|
+
.map(async (pattern) => await (0, fast_glob_1.glob)(pattern)) ?? []))
|
|
58
|
+
.flat()
|
|
59
|
+
.map((reference) => (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: reference }, { access: 'readonly' })),
|
|
60
|
+
briefs: input.briefs
|
|
61
|
+
?.split(',')
|
|
62
|
+
.filter((uri) => !!uri)
|
|
63
|
+
.map((brief) => (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: brief }, { access: 'readonly' })) ?? [],
|
|
64
|
+
};
|
|
65
|
+
// detect the goal of the caller
|
|
66
|
+
const goalConcept = await (async () => {
|
|
67
|
+
// if goal explicitly defined, use it
|
|
68
|
+
if (input.goal)
|
|
69
|
+
return ((await (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: input.goal }, { access: 'readonly' }).get())?.content ?? input.ask);
|
|
70
|
+
// otherwise, assume it's the ask
|
|
71
|
+
return input.ask;
|
|
72
|
+
})();
|
|
73
|
+
await artifacts.goal.concept.set({ content: goalConcept });
|
|
74
|
+
// add an src file for historic record
|
|
75
|
+
await (0, setSkillOutputSrc_1.setSkillOutputSrc)({ skillUri: 'bhrain.commandPlan', opts: input }); // todo: get skillUri from context
|
|
76
|
+
return {
|
|
77
|
+
caller: await (0, rhachet_1.enrollThread)({
|
|
78
|
+
role: 'caller',
|
|
79
|
+
stash: {
|
|
80
|
+
ask: '',
|
|
81
|
+
art: {
|
|
82
|
+
'foci.goal.concept': artifacts.goal.concept,
|
|
83
|
+
'foci.goal.context': artifacts.goal.context,
|
|
84
|
+
feedback: artifacts.feedback,
|
|
85
|
+
},
|
|
86
|
+
refs: artifacts.references,
|
|
87
|
+
},
|
|
88
|
+
}),
|
|
89
|
+
thinker: await (0, rhachet_1.enrollThread)({
|
|
90
|
+
role: 'thinker',
|
|
91
|
+
stash: {
|
|
92
|
+
art: {
|
|
93
|
+
'focus.context': artifacts['focus.context'],
|
|
94
|
+
'focus.concept': artifacts['focus.concept'],
|
|
95
|
+
},
|
|
96
|
+
briefs: artifacts.briefs,
|
|
97
|
+
},
|
|
98
|
+
}),
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
context: {
|
|
103
|
+
lookup: {
|
|
104
|
+
apiKeyOpenai: {
|
|
105
|
+
source: 'process.env',
|
|
106
|
+
envar: 'PREP_OPENAI_KEY',
|
|
107
|
+
desc: 'the openai key to use',
|
|
108
|
+
type: 'string',
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
assess: (input) => typeof input.apiKeyOpenai === 'string',
|
|
112
|
+
instantiate: () => {
|
|
113
|
+
return {
|
|
114
|
+
...(0, getContextOpenAI_1.getContextOpenAI)(),
|
|
115
|
+
...(0, genContextLogTrail_1.genContextLogTrail)(),
|
|
116
|
+
...(0, rhachet_1.genContextStitchTrail)({
|
|
117
|
+
stream: (0, genStitchStreamToDisk_1.genStitchStreamToDisk)({ dir: process.cwd() }), // stream events to disk
|
|
118
|
+
}),
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
readme: '',
|
|
123
|
+
});
|
|
124
|
+
//# sourceMappingURL=stepPlanCommand.skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepPlanCommand.skill.js","sourceRoot":"","sources":["../../../../../src/logic/roles/terminal.commander/command.plan/stepPlanCommand.skill.ts"],"names":[],"mappings":";;;AAAA,yCAAiC;AACjC,qCAA4E;AAC5E,+DAA6E;AAE7E,6EAA0E;AAC1E,yEAAsE;AACtE,2EAAwE;AACxE,kFAA+E;AAC/E,uDAAoD;AAEvC,QAAA,kBAAkB,GAAG,IAAA,sBAAY,EAAC;IAC7C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,iCAAe;IACtB,OAAO,EAAE;QACP,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,MAA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AY,KAAK,QAAQ;QACxC,WAAW,EAAE,GAAG,EAAE;YAChB,OAAO;gBACL,GAAG,IAAA,mCAAgB,GAAE;gBACrB,GAAG,IAAA,uCAAkB,GAAE;gBACvB,GAAG,IAAA,+BAAqB,EAAC;oBACvB,MAAM,EAAE,IAAA,6CAAqB,EAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,wBAAwB;iBAChF,CAAC;aACH,CAAC;QACJ,CAAC;KACF;IACD,MAAM,EAAE,EAAE;CACX,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ROLE_COMMANDER = void 0;
|
|
4
|
+
const rhachet_1 = require("rhachet");
|
|
5
|
+
const getBhrainBrief_1 = require("../bhrain/getBhrainBrief");
|
|
6
|
+
const getMechanicBrief_1 = require("../mechanic/getMechanicBrief");
|
|
7
|
+
const stepExecCommand_skill_1 = require("./command.exec/stepExecCommand.skill");
|
|
8
|
+
const stepPlanCommand_skill_1 = require("./command.plan/stepPlanCommand.skill");
|
|
9
|
+
exports.ROLE_COMMANDER = rhachet_1.Role.build({
|
|
10
|
+
slug: 'commander',
|
|
11
|
+
name: 'Commander',
|
|
12
|
+
purpose: 'command the terminal',
|
|
13
|
+
readme: `
|
|
14
|
+
## 🐧 Commander
|
|
15
|
+
|
|
16
|
+
a helpful terminal commander, at your service
|
|
17
|
+
- plan shell commands to achieve your goals
|
|
18
|
+
- exec shell commands on your behalf
|
|
19
|
+
- achive to plan and exec, in one operation
|
|
20
|
+
`.trim(),
|
|
21
|
+
traits: [
|
|
22
|
+
rhachet_1.RoleTrait.build({
|
|
23
|
+
slug: 'ocd',
|
|
24
|
+
readme: 'obsesses over structure, precision, and clarity',
|
|
25
|
+
brief: (0, getBhrainBrief_1.getBhrainBrief)('trait.ocd.md'),
|
|
26
|
+
}),
|
|
27
|
+
rhachet_1.RoleTrait.build({
|
|
28
|
+
slug: 'vibes',
|
|
29
|
+
readme: 'careful about the aesthetics of their output',
|
|
30
|
+
brief: (0, getMechanicBrief_1.getMechanicBrief)('style.words.lowercase.md'),
|
|
31
|
+
}),
|
|
32
|
+
],
|
|
33
|
+
skills: [stepPlanCommand_skill_1.SKILL_COMMAND_PLAN, stepExecCommand_skill_1.SKILL_COMMAND_EXEC],
|
|
34
|
+
briefs: { dir: __dirname + '/.briefs' },
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=getCommanderRole.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCommanderRole.js","sourceRoot":"","sources":["../../../../src/logic/roles/terminal.commander/getCommanderRole.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAE1C,6DAA0D;AAC1D,mEAAgE;AAChE,gFAA0E;AAC1E,gFAA0E;AAE7D,QAAA,cAAc,GAAG,cAAI,CAAC,KAAK,CAAC;IACvC,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,sBAAsB;IAC/B,MAAM,EAAE;;;;;;;GAOP,CAAC,IAAI,EAAE;IACR,MAAM,EAAE;QACN,mBAAS,CAAC,KAAK,CAAC;YACd,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,iDAAiD;YACzD,KAAK,EAAE,IAAA,+BAAc,EAAC,cAAc,CAAC;SACtC,CAAC;QACF,mBAAS,CAAC,KAAK,CAAC;YACd,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,8CAA8C;YACtD,KAAK,EAAE,IAAA,mCAAgB,EAAC,0BAA0B,CAAC;SACpD,CAAC;KACH;IACD,MAAM,EAAE,CAAC,0CAAkB,EAAE,0CAAkB,CAAC;IAChD,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,GAAG,UAAU,EAAE;CACxC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "rhachet-roles-ehmpathy",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "empathetic software construction roles and skills, via rhachet",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.7.0",
|
|
6
6
|
"repository": "ehmpathy/rhachet-roles-ehmpathy",
|
|
7
7
|
"homepage": "https://github.com/ehmpathy/rhachet-roles-ehmpathy",
|
|
8
8
|
"keywords": [
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"helpful-errors": "1.3.8",
|
|
58
58
|
"inquirer": "12.7.0",
|
|
59
59
|
"openai": "5.8.2",
|
|
60
|
-
"rhachet": "1.
|
|
60
|
+
"rhachet": "1.10.0",
|
|
61
61
|
"rhachet-artifact": "1.0.0",
|
|
62
62
|
"rhachet-artifact-git": "1.1.0",
|
|
63
63
|
"serde-fns": "1.2.0",
|