rhachet-roles-bhrain 0.3.0 → 0.5.2
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/access/sdk/sdkOpenAi.d.ts +25 -0
- package/dist/access/sdk/sdkOpenAi.js +122 -0
- package/dist/access/sdk/sdkOpenAi.js.map +1 -1
- package/dist/access/sdks/anthropic/sdkAnthropic.d.ts +31 -0
- package/dist/access/sdks/anthropic/sdkAnthropic.js +151 -0
- package/dist/access/sdks/anthropic/sdkAnthropic.js.map +1 -0
- package/dist/access/sdks/qwen/sdkQwen.d.ts +31 -0
- package/dist/access/sdks/qwen/sdkQwen.js +134 -0
- package/dist/access/sdks/qwen/sdkQwen.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Actor.d.ts +67 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Actor.js +12 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Actor.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Atom.d.ts +40 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Atom.js +3 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Atom.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Context.d.ts +30 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Context.js +3 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Context.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1LoopIteration.d.ts +34 -0
- package/dist/domain.objects/BrainArch1/BrainArch1LoopIteration.js +8 -0
- package/dist/domain.objects/BrainArch1/BrainArch1LoopIteration.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1LoopIterationCompletedEvent.d.ts +23 -0
- package/dist/domain.objects/BrainArch1/BrainArch1LoopIterationCompletedEvent.js +9 -0
- package/dist/domain.objects/BrainArch1/BrainArch1LoopIterationCompletedEvent.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1LoopResult.d.ts +49 -0
- package/dist/domain.objects/BrainArch1/BrainArch1LoopResult.js +8 -0
- package/dist/domain.objects/BrainArch1/BrainArch1LoopResult.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryCompactedEvent.d.ts +31 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryCompactedEvent.js +9 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryCompactedEvent.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryCompactionResult.d.ts +27 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryCompactionResult.js +8 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryCompactionResult.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryManager.d.ts +45 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryManager.js +3 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryManager.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryTokenUsage.d.ts +29 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryTokenUsage.js +8 -0
- package/dist/domain.objects/BrainArch1/BrainArch1MemoryTokenUsage.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1PermissionDecision.d.ts +22 -0
- package/dist/domain.objects/BrainArch1/BrainArch1PermissionDecision.js +8 -0
- package/dist/domain.objects/BrainArch1/BrainArch1PermissionDecision.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1PermissionGuard.d.ts +30 -0
- package/dist/domain.objects/BrainArch1/BrainArch1PermissionGuard.js +3 -0
- package/dist/domain.objects/BrainArch1/BrainArch1PermissionGuard.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Session.d.ts +47 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Session.js +17 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Session.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1SessionMessage.d.ts +34 -0
- package/dist/domain.objects/BrainArch1/BrainArch1SessionMessage.js +12 -0
- package/dist/domain.objects/BrainArch1/BrainArch1SessionMessage.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolCall.d.ts +21 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolCall.js +8 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolCall.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolDefinition.d.ts +54 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolDefinition.js +20 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolDefinition.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolExecutionCompletedEvent.d.ts +36 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolExecutionCompletedEvent.js +9 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolExecutionCompletedEvent.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolResult.d.ts +25 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolResult.js +8 -0
- package/dist/domain.objects/BrainArch1/BrainArch1ToolResult.js.map +1 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Toolbox.d.ts +31 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Toolbox.js +3 -0
- package/dist/domain.objects/BrainArch1/BrainArch1Toolbox.js.map +1 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectManifest.d.ts +44 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectManifest.js +8 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectManifest.js.map +1 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectManifestOperation.d.ts +30 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectManifestOperation.js +35 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectManifestOperation.js.map +1 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectMetrics.d.ts +89 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectMetrics.js +8 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectMetrics.js.map +1 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectRuleProposal.d.ts +43 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectRuleProposal.js +8 -0
- package/dist/domain.objects/Reviewer/ReviewerReflectRuleProposal.js.map +1 -0
- package/dist/domain.operations/artifact/genLoopFeedback.js +1 -1
- package/dist/domain.operations/artifact/genLoopFeedback.js.map +1 -1
- package/dist/domain.operations/artifact/genStepGrabCallerFeedbackToArtifact.d.ts +1 -1
- package/dist/domain.operations/brain.replic.arch1/core/invokeBrainArch1.d.ts +13 -0
- package/dist/domain.operations/brain.replic.arch1/core/invokeBrainArch1.js +106 -0
- package/dist/domain.operations/brain.replic.arch1/core/invokeBrainArch1.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/llm/generateBrainArch1LlmResponse.d.ts +18 -0
- package/dist/domain.operations/brain.replic.arch1/llm/generateBrainArch1LlmResponse.js +16 -0
- package/dist/domain.operations/brain.replic.arch1/llm/generateBrainArch1LlmResponse.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/loop/iterateBrainArch1Loop.d.ts +30 -0
- package/dist/domain.operations/brain.replic.arch1/loop/iterateBrainArch1Loop.js +71 -0
- package/dist/domain.operations/brain.replic.arch1/loop/iterateBrainArch1Loop.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/loop/runBrainArch1Loop.d.ts +20 -0
- package/dist/domain.operations/brain.replic.arch1/loop/runBrainArch1Loop.js +90 -0
- package/dist/domain.operations/brain.replic.arch1/loop/runBrainArch1Loop.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/anthropic.d.ts +8 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/anthropic.js +31 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/anthropic.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/index.d.ts +3 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/index.js +10 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/index.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/openai.d.ts +8 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/openai.js +31 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/openai.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/qwen.d.ts +8 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/qwen.js +32 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/atoms/qwen.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/memoryManagers/slidingWindow.d.ts +6 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/memoryManagers/slidingWindow.js +80 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/memoryManagers/slidingWindow.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/permissionGuards/allowAll.d.ts +6 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/permissionGuards/allowAll.js +14 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/permissionGuards/allowAll.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/permissionGuards/promptUser.d.ts +8 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/permissionGuards/promptUser.js +52 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/permissionGuards/promptUser.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/permissionGuards/readOnly.d.ts +8 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/permissionGuards/readOnly.js +38 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/permissionGuards/readOnly.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/bash/exec.d.ts +33 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/bash/exec.js +100 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/bash/exec.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/bash/index.d.ts +6 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/bash/index.js +26 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/bash/index.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/edit.d.ts +41 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/edit.js +107 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/edit.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/glob.d.ts +33 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/glob.js +68 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/glob.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/grep.d.ts +41 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/grep.js +97 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/grep.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/index.d.ts +6 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/index.js +65 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/index.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/read.d.ts +37 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/read.js +96 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/read.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/write.d.ts +33 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/write.js +81 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/files/write.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/web/fetch.d.ts +33 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/web/fetch.js +113 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/web/fetch.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/web/index.d.ts +6 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/web/index.js +36 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/web/index.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/web/search.d.ts +36 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/web/search.js +101 -0
- package/dist/domain.operations/brain.replic.arch1/plugins/toolboxes/web/search.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/tool/executeBrainArch1ToolCall.d.ts +14 -0
- package/dist/domain.operations/brain.replic.arch1/tool/executeBrainArch1ToolCall.js +45 -0
- package/dist/domain.operations/brain.replic.arch1/tool/executeBrainArch1ToolCall.js.map +1 -0
- package/dist/domain.operations/brain.replic.arch1/tool/mergeBrainArch1Toolboxes.d.ts +19 -0
- package/dist/domain.operations/brain.replic.arch1/tool/mergeBrainArch1Toolboxes.js +35 -0
- package/dist/domain.operations/brain.replic.arch1/tool/mergeBrainArch1Toolboxes.js.map +1 -0
- package/dist/domain.operations/git/genGitHubFileUrl.d.ts +9 -0
- package/dist/domain.operations/git/genGitHubFileUrl.js +55 -0
- package/dist/domain.operations/git/genGitHubFileUrl.js.map +1 -0
- package/dist/domain.operations/git/getGitRemoteUrl.d.ts +7 -0
- package/dist/domain.operations/git/getGitRemoteUrl.js +40 -0
- package/dist/domain.operations/git/getGitRemoteUrl.js.map +1 -0
- package/dist/domain.operations/hooks/getInvokeHooks.js +1 -1
- package/dist/domain.operations/hooks/getInvokeHooks.js.map +1 -1
- package/dist/domain.operations/reflect/createDraftDirectory.d.ts +11 -0
- package/dist/domain.operations/reflect/createDraftDirectory.js +46 -0
- package/dist/domain.operations/reflect/createDraftDirectory.js.map +1 -0
- package/dist/domain.operations/reflect/enumFeedbackFiles.d.ts +7 -0
- package/dist/domain.operations/reflect/enumFeedbackFiles.js +69 -0
- package/dist/domain.operations/reflect/enumFeedbackFiles.js.map +1 -0
- package/dist/domain.operations/reflect/extractJsonFromResultText.d.ts +7 -0
- package/dist/domain.operations/reflect/extractJsonFromResultText.js +19 -0
- package/dist/domain.operations/reflect/extractJsonFromResultText.js.map +1 -0
- package/dist/domain.operations/reflect/invokeClaudeCodeForReflect.d.ts +46 -0
- package/dist/domain.operations/reflect/invokeClaudeCodeForReflect.js +120 -0
- package/dist/domain.operations/reflect/invokeClaudeCodeForReflect.js.map +1 -0
- package/dist/domain.operations/reflect/metrics/computeMetricsExpected.d.ts +12 -0
- package/dist/domain.operations/reflect/metrics/computeMetricsExpected.js +28 -0
- package/dist/domain.operations/reflect/metrics/computeMetricsExpected.js.map +1 -0
- package/dist/domain.operations/reflect/metrics/computeMetricsRealized.d.ts +26 -0
- package/dist/domain.operations/reflect/metrics/computeMetricsRealized.js +66 -0
- package/dist/domain.operations/reflect/metrics/computeMetricsRealized.js.map +1 -0
- package/dist/domain.operations/reflect/metrics/writeLogArtifact.d.ts +17 -0
- package/dist/domain.operations/reflect/metrics/writeLogArtifact.js +93 -0
- package/dist/domain.operations/reflect/metrics/writeLogArtifact.js.map +1 -0
- package/dist/domain.operations/reflect/step1/compileCitationsMarkdown.d.ts +8 -0
- package/dist/domain.operations/reflect/step1/compileCitationsMarkdown.js +28 -0
- package/dist/domain.operations/reflect/step1/compileCitationsMarkdown.js.map +1 -0
- package/dist/domain.operations/reflect/step1/compileReflectStep1Prompt.d.ts +14 -0
- package/dist/domain.operations/reflect/step1/compileReflectStep1Prompt.js +93 -0
- package/dist/domain.operations/reflect/step1/compileReflectStep1Prompt.js.map +1 -0
- package/dist/domain.operations/reflect/step2/compileReflectStep2Prompt.d.ts +18 -0
- package/dist/domain.operations/reflect/step2/compileReflectStep2Prompt.js +208 -0
- package/dist/domain.operations/reflect/step2/compileReflectStep2Prompt.js.map +1 -0
- package/dist/domain.operations/reflect/step2/executeManifestOperations.d.ts +17 -0
- package/dist/domain.operations/reflect/step2/executeManifestOperations.js +189 -0
- package/dist/domain.operations/reflect/step2/executeManifestOperations.js.map +1 -0
- package/dist/domain.operations/reflect/step2/parseManifestOperations.d.ts +8 -0
- package/dist/domain.operations/reflect/step2/parseManifestOperations.js +73 -0
- package/dist/domain.operations/reflect/step2/parseManifestOperations.js.map +1 -0
- package/dist/domain.operations/reflect/validateSourceDirectory.d.ts +9 -0
- package/dist/domain.operations/reflect/validateSourceDirectory.js +63 -0
- package/dist/domain.operations/reflect/validateSourceDirectory.js.map +1 -0
- package/dist/domain.operations/reflect/validateTargetDirectory.d.ts +10 -0
- package/dist/domain.operations/reflect/validateTargetDirectory.js +59 -0
- package/dist/domain.operations/reflect/validateTargetDirectory.js.map +1 -0
- package/dist/domain.operations/review/compileReviewPrompt.js +16 -5
- package/dist/domain.operations/review/compileReviewPrompt.js.map +1 -1
- package/dist/domain.operations/review/formatReviewOutput.d.ts +15 -6
- package/dist/domain.operations/review/formatReviewOutput.js +15 -17
- package/dist/domain.operations/review/formatReviewOutput.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/roles/architect/getArchitectRole.d.ts +6 -0
- package/dist/roles/architect/getArchitectRole.js +31 -0
- package/dist/roles/architect/getArchitectRole.js.map +1 -0
- package/dist/roles/brain/getBrainRole.d.ts +6 -0
- package/dist/roles/brain/getBrainRole.js +28 -0
- package/dist/roles/brain/getBrainRole.js.map +1 -0
- package/dist/roles/brain/skills/act/skillAct.d.ts +5 -0
- package/dist/roles/brain/skills/act/skillAct.js +147 -0
- package/dist/roles/brain/skills/act/skillAct.js.map +1 -0
- package/dist/roles/brain/skills/act/skillAct.ts +186 -0
- package/dist/roles/brain/skills/act/stepAct.d.ts +27 -0
- package/dist/roles/brain/skills/act/stepAct.js +95 -0
- package/dist/roles/brain/skills/act/stepAct.js.map +1 -0
- package/dist/roles/brain/skills/act/stepAct.ts +123 -0
- package/dist/roles/getRoleRegistry.js +5 -4
- package/dist/roles/getRoleRegistry.js.map +1 -1
- package/dist/roles/reviewer/briefs/on.rules/rules101.[article].md +41 -0
- package/dist/roles/reviewer/briefs/on.rules/rules101.citations.[article].md +88 -0
- package/dist/roles/reviewer/briefs/on.rules/rules101.collocated.[article].md +97 -0
- package/dist/roles/reviewer/briefs/on.rules/rules101.content.[article].md +228 -0
- package/dist/roles/reviewer/briefs/on.rules/rules101.content.[demo].forbid.failhide.md +87 -0
- package/dist/roles/reviewer/briefs/on.rules/rules101.content.[demo].forbid.gerunds.md +85 -0
- package/dist/roles/reviewer/briefs/on.rules/rules101.content.[demo].require.failfast.md +73 -0
- package/dist/roles/reviewer/briefs/on.rules/rules101.structure.[article].md +70 -0
- package/dist/roles/reviewer/skills/reflect/reflect.d.ts +30 -0
- package/dist/roles/reviewer/skills/reflect/reflect.js +305 -0
- package/dist/roles/reviewer/skills/reflect/reflect.js.map +1 -0
- package/dist/roles/reviewer/skills/reflect/reflect.sh +38 -0
- package/dist/roles/reviewer/skills/reflect/reflect.ts +356 -0
- package/dist/roles/reviewer/skills/review/review.js.map +1 -1
- package/dist/roles/reviewer/skills/review/review.ts +12 -3
- package/dist/roles/thinker/getThinkerBrief.d.ts +1 -1
- package/dist/roles/thinker/getThinkerRole.js +8 -8
- package/dist/roles/thinker/getThinkerRole.js.map +1 -1
- package/package.json +6 -4
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.validateTargetDirectory = void 0;
|
|
27
|
+
const fs = __importStar(require("fs/promises"));
|
|
28
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
29
|
+
/**
|
|
30
|
+
* .what = validates target directory exists or creates with --force
|
|
31
|
+
* .why = fail fast on invalid target before expensive operations
|
|
32
|
+
*/
|
|
33
|
+
const validateTargetDirectory = async (input) => {
|
|
34
|
+
// check if directory exists
|
|
35
|
+
try {
|
|
36
|
+
const stat = await fs.stat(input.target);
|
|
37
|
+
if (!stat.isDirectory())
|
|
38
|
+
throw new helpful_errors_1.BadRequestError('target path exists but is not a directory', {
|
|
39
|
+
target: input.target,
|
|
40
|
+
});
|
|
41
|
+
return { created: false };
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
// if not a BadRequestError, directory doesn't exist
|
|
45
|
+
if (error instanceof helpful_errors_1.BadRequestError)
|
|
46
|
+
throw error;
|
|
47
|
+
// directory doesn't exist - check if we should create it
|
|
48
|
+
if (!input.force)
|
|
49
|
+
throw new helpful_errors_1.BadRequestError('target directory does not exist. use --force to create it.', {
|
|
50
|
+
target: input.target,
|
|
51
|
+
hint: 'add --force flag to create the target directory',
|
|
52
|
+
});
|
|
53
|
+
// create directory with --force
|
|
54
|
+
await fs.mkdir(input.target, { recursive: true });
|
|
55
|
+
return { created: true };
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.validateTargetDirectory = validateTargetDirectory;
|
|
59
|
+
//# sourceMappingURL=validateTargetDirectory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateTargetDirectory.js","sourceRoot":"","sources":["../../../src/domain.operations/reflect/validateTargetDirectory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;AAClC,mDAAiD;AAEjD;;;GAGG;AACI,MAAM,uBAAuB,GAAG,KAAK,EAAE,KAG7C,EAEE,EAAE;IACH,4BAA4B;IAC5B,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,MAAM,IAAI,gCAAe,CAAC,2CAA2C,EAAE;gBACrE,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,CAAC,CAAC;QACL,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,oDAAoD;QACpD,IAAI,KAAK,YAAY,gCAAe;YAAE,MAAM,KAAK,CAAC;QAElD,yDAAyD;QACzD,IAAI,CAAC,KAAK,CAAC,KAAK;YACd,MAAM,IAAI,gCAAe,CACvB,4DAA4D,EAC5D;gBACE,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,IAAI,EAAE,iDAAiD;aACxD,CACF,CAAC;QAEJ,gCAAgC;QAChC,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAClD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;AACH,CAAC,CAAC;AAhCW,QAAA,uBAAuB,2BAgClC"}
|
|
@@ -46,14 +46,25 @@ ${targetSection}
|
|
|
46
46
|
|
|
47
47
|
## output format
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
IMPORTANT: output your review as text directly. do not use any tools to write files. your final response must be the JSON object below, printed as plain text.
|
|
50
50
|
|
|
51
51
|
\`\`\`json
|
|
52
52
|
{
|
|
53
|
-
"
|
|
53
|
+
"done": true,
|
|
54
|
+
"blockers": [
|
|
54
55
|
{
|
|
55
|
-
"
|
|
56
|
-
"
|
|
56
|
+
"rule": "path/to/rule.md",
|
|
57
|
+
"title": "short title for the issue",
|
|
58
|
+
"description": "detailed multiline explanation of the issue.\\ninclude context about why this violates the rule.\\nbe specific about what needs to change.",
|
|
59
|
+
"file": "path/to/file.ts",
|
|
60
|
+
"line": 42
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"nitpicks": [
|
|
64
|
+
{
|
|
65
|
+
"rule": "path/to/rule.md",
|
|
66
|
+
"title": "short title for the issue",
|
|
67
|
+
"description": "detailed multiline explanation of the issue.\\ninclude context about why this violates the rule.\\nbe specific about what needs to change.",
|
|
57
68
|
"file": "path/to/file.ts",
|
|
58
69
|
"line": 42
|
|
59
70
|
}
|
|
@@ -61,7 +72,7 @@ emit your review as a JSON object with the following structure:
|
|
|
61
72
|
}
|
|
62
73
|
\`\`\`
|
|
63
74
|
|
|
64
|
-
|
|
75
|
+
if no issues found, output: \`{"done": true, "blockers": [], "nitpicks": []}\`
|
|
65
76
|
`;
|
|
66
77
|
// estimate tokens
|
|
67
78
|
const tokenEstimate = (0, estimateTokenCount_1.estimateTokenCount)({ content: prompt });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileReviewPrompt.js","sourceRoot":"","sources":["../../../src/domain.operations/review/compileReviewPrompt.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAEjD,6DAA0D;AAE1D;;;GAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAKnC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AE,EAAE,CAAC;YAC9B,MAAM,IAAI,gCAAe,CACvB,yCAAyC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,aAAa,YAAY;gBACvG,+DAA+D,EACjE,EAAE,aAAa,EAAE,oBAAoB,EAAE,aAAa,EAAE,CACvD,CAAC;QACJ,CAAC;QAED,eAAe;QACf,IAAI,oBAAoB,GAAG,EAAE,EAAE,CAAC;YAC9B,QAAQ,CAAC,IAAI,CACX,8CAA8C,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,CACnG,CAAC;QACJ,CAAC;IACH,CAAC;IAED,qEAAqE;IACrE,6CAA6C;IAC7C,MAAM,SAAS,GAAG,CAAC,aAAa,GAAG,OAAS,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,CAAC,CAAC,aAAa,GAAG,GAAG,CAAC,GAAG,OAAS,CAAC,GAAG,EAAE,CAAC;IAC5D,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,GAAG,UAAU,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAExE,OAAO;QACL,MAAM;QACN,aAAa;QACb,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAAG,EAAE,CAAC,GAAG,EAAE;QAChE,YAAY;QACZ,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC;AAzHW,QAAA,mBAAmB,uBAyH9B"}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .what = issue shape from brain response
|
|
3
|
+
* .why = enables typed parsing of review issues
|
|
4
|
+
*/
|
|
5
|
+
interface ReviewIssue {
|
|
6
|
+
rule: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
file?: string;
|
|
10
|
+
line?: number;
|
|
11
|
+
}
|
|
1
12
|
/**
|
|
2
13
|
* .what = formats brain response into review markdown
|
|
3
14
|
* .why = ensures consistent, machine-parseable review output
|
|
4
15
|
*/
|
|
5
16
|
export declare const formatReviewOutput: (input: {
|
|
6
17
|
response: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
file?: string;
|
|
11
|
-
line?: number;
|
|
12
|
-
}>;
|
|
18
|
+
done: boolean;
|
|
19
|
+
blockers: ReviewIssue[];
|
|
20
|
+
nitpicks: ReviewIssue[];
|
|
13
21
|
};
|
|
14
22
|
}) => string;
|
|
23
|
+
export {};
|
|
@@ -6,35 +6,33 @@ exports.formatReviewOutput = void 0;
|
|
|
6
6
|
* .why = ensures consistent, machine-parseable review output
|
|
7
7
|
*/
|
|
8
8
|
const formatReviewOutput = (input) => {
|
|
9
|
-
//
|
|
10
|
-
const
|
|
11
|
-
|
|
9
|
+
// extract blockers and nitpicks from response
|
|
10
|
+
const blockers = input.response?.blockers ?? [];
|
|
11
|
+
const nitpicks = input.response?.nitpicks ?? [];
|
|
12
|
+
// handle no issues found
|
|
13
|
+
if (!blockers.length && !nitpicks.length) {
|
|
12
14
|
return '# review complete\n\nno issues found.\n';
|
|
13
15
|
}
|
|
14
|
-
// separate blockers and nitpicks
|
|
15
|
-
const blockers = issues.filter((f) => f.type === 'blocker');
|
|
16
|
-
const nitpicks = issues.filter((f) => f.type === 'nitpick');
|
|
17
16
|
// build output with blockers first (per template)
|
|
18
17
|
const sections = [];
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
const header = `#
|
|
18
|
+
// format a single issue into markdown
|
|
19
|
+
const formatIssue = (issue, type, index) => {
|
|
20
|
+
const header = `# ${type}.${index + 1}: ${issue.title}`;
|
|
21
|
+
const rule = `\n\n**rule**: ${issue.rule}`;
|
|
22
22
|
const location = issue.file
|
|
23
23
|
? issue.line
|
|
24
24
|
? `\n\n**location**: ${issue.file}:${issue.line}`
|
|
25
25
|
: `\n\n**location**: ${issue.file}`
|
|
26
26
|
: '';
|
|
27
|
-
|
|
27
|
+
return `${header}${rule}${location}\n\n${issue.description}`;
|
|
28
|
+
};
|
|
29
|
+
// emit blockers
|
|
30
|
+
blockers.forEach((issue, index) => {
|
|
31
|
+
sections.push(formatIssue(issue, 'blocker', index));
|
|
28
32
|
});
|
|
29
33
|
// emit nitpicks
|
|
30
34
|
nitpicks.forEach((issue, index) => {
|
|
31
|
-
|
|
32
|
-
const location = issue.file
|
|
33
|
-
? issue.line
|
|
34
|
-
? `\n\n**location**: ${issue.file}:${issue.line}`
|
|
35
|
-
: `\n\n**location**: ${issue.file}`
|
|
36
|
-
: '';
|
|
37
|
-
sections.push(`${header}${location}\n\n${issue.message}`);
|
|
35
|
+
sections.push(formatIssue(issue, 'nitpick', index));
|
|
38
36
|
});
|
|
39
37
|
return sections.join('\n\n---\n\n') + '\n';
|
|
40
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatReviewOutput.js","sourceRoot":"","sources":["../../../src/domain.operations/review/formatReviewOutput.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"formatReviewOutput.js","sourceRoot":"","sources":["../../../src/domain.operations/review/formatReviewOutput.ts"],"names":[],"mappings":";;;AAYA;;;GAGG;AACI,MAAM,kBAAkB,GAAG,CAAC,KAMlC,EAAU,EAAE;IACX,8CAA8C;IAC9C,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,QAAQ,IAAI,EAAE,CAAC;IAChD,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,QAAQ,IAAI,EAAE,CAAC;IAEhD,yBAAyB;IACzB,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACzC,OAAO,yCAAyC,CAAC;IACnD,CAAC;IAED,kDAAkD;IAClD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,sCAAsC;IACtC,MAAM,WAAW,GAAG,CAClB,KAAkB,EAClB,IAA2B,EAC3B,KAAa,EACL,EAAE;QACV,MAAM,MAAM,GAAG,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,KAAK,KAAK,CAAC,KAAK,EAAE,CAAC;QACxD,MAAM,IAAI,GAAG,iBAAiB,KAAK,CAAC,IAAI,EAAE,CAAC;QAC3C,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI;YACzB,CAAC,CAAC,KAAK,CAAC,IAAI;gBACV,CAAC,CAAC,qBAAqB,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE;gBACjD,CAAC,CAAC,qBAAqB,KAAK,CAAC,IAAI,EAAE;YACrC,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC,CAAC;IAEF,gBAAgB;IAChB,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QAChC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,gBAAgB;IAChB,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QAChC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;AAC7C,CAAC,CAAC;AA9CW,QAAA,kBAAkB,sBA8C7B"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ROLE_ARCHITECT = void 0;
|
|
4
|
+
const rhachet_1 = require("rhachet");
|
|
5
|
+
/**
|
|
6
|
+
* .what = role definition for the architect
|
|
7
|
+
* .why = documents and compares architectures of replic brains (LLMs behind REPLs)
|
|
8
|
+
*/
|
|
9
|
+
exports.ROLE_ARCHITECT = rhachet_1.Role.build({
|
|
10
|
+
slug: 'architect',
|
|
11
|
+
name: 'Architect',
|
|
12
|
+
purpose: 'brain architecture patterns',
|
|
13
|
+
readme: `
|
|
14
|
+
## 🏗️ Architect
|
|
15
|
+
|
|
16
|
+
- **scale**: conceptual, architectural
|
|
17
|
+
- **focus**: brain architecture patterns
|
|
18
|
+
- **maximizes**: understanding of how artificial brains are constructed
|
|
19
|
+
|
|
20
|
+
used to document and compare architectures of replic brains (LLMs behind REPLs).
|
|
21
|
+
`.trim(),
|
|
22
|
+
traits: [],
|
|
23
|
+
skills: {
|
|
24
|
+
dirs: [],
|
|
25
|
+
refs: [],
|
|
26
|
+
},
|
|
27
|
+
briefs: {
|
|
28
|
+
dirs: [{ uri: __dirname + '/briefs' }],
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=getArchitectRole.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getArchitectRole.js","sourceRoot":"","sources":["../../../src/roles/architect/getArchitectRole.ts"],"names":[],"mappings":";;;AAAA,qCAA+B;AAE/B;;;GAGG;AACU,QAAA,cAAc,GAAS,cAAI,CAAC,KAAK,CAAC;IAC7C,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,6BAA6B;IACtC,MAAM,EAAE;;;;;;;;GAQP,CAAC,IAAI,EAAE;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;QACN,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,EAAE;KACT;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;KACvC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ROLE_BRAIN = void 0;
|
|
4
|
+
const rhachet_1 = require("rhachet");
|
|
5
|
+
const skillAct_1 = require("../../roles/brain/skills/act/skillAct");
|
|
6
|
+
/**
|
|
7
|
+
* .what = role definition for the brain
|
|
8
|
+
* .why = exposes agentic capabilities as rhachet skills for tool-using llm workflows
|
|
9
|
+
*/
|
|
10
|
+
exports.ROLE_BRAIN = rhachet_1.Role.build({
|
|
11
|
+
slug: 'brain',
|
|
12
|
+
name: 'Brain',
|
|
13
|
+
purpose: 'agentic entooled brain',
|
|
14
|
+
readme: `
|
|
15
|
+
## 🧠 Brain
|
|
16
|
+
|
|
17
|
+
a brain.repl available for agentic tooluse
|
|
18
|
+
`.trim(),
|
|
19
|
+
traits: [],
|
|
20
|
+
skills: {
|
|
21
|
+
dirs: [],
|
|
22
|
+
refs: [skillAct_1.SKILL_ACT],
|
|
23
|
+
},
|
|
24
|
+
briefs: {
|
|
25
|
+
dirs: [],
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=getBrainRole.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBrainRole.js","sourceRoot":"","sources":["../../../src/roles/brain/getBrainRole.ts"],"names":[],"mappings":";;;AAAA,qCAA+B;AAE/B,mEAAiE;AAEjE;;;GAGG;AACU,QAAA,UAAU,GAAS,cAAI,CAAC,KAAK,CAAC;IACzC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,wBAAwB;IACjC,MAAM,EAAE;;;;GAIP,CAAC,IAAI,EAAE;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;QACN,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,CAAC,oBAAS,CAAC;KAClB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,EAAE;KACT;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SKILL_ACT = 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 BrainArch1Actor_1 = require("../../../../domain.objects/BrainArch1/BrainArch1Actor");
|
|
8
|
+
const anthropic_1 = require("../../../../domain.operations/brain.replic.arch1/plugins/atoms/anthropic");
|
|
9
|
+
const openai_1 = require("../../../../domain.operations/brain.replic.arch1/plugins/atoms/openai");
|
|
10
|
+
const qwen_1 = require("../../../../domain.operations/brain.replic.arch1/plugins/atoms/qwen");
|
|
11
|
+
const readOnly_1 = require("../../../../domain.operations/brain.replic.arch1/plugins/permissionGuards/readOnly");
|
|
12
|
+
const files_1 = require("../../../../domain.operations/brain.replic.arch1/plugins/toolboxes/files");
|
|
13
|
+
const stepAct_1 = require("./stepAct");
|
|
14
|
+
/**
|
|
15
|
+
* .what = skill definition for agentic task completion
|
|
16
|
+
* .why = enables rhachet roles to leverage brain capabilities for autonomous task execution
|
|
17
|
+
*/
|
|
18
|
+
exports.SKILL_ACT = (0, rhachet_1.genRoleSkill)({
|
|
19
|
+
slug: 'act',
|
|
20
|
+
route: stepAct_1.stepAct,
|
|
21
|
+
threads: {
|
|
22
|
+
lookup: {
|
|
23
|
+
target: {
|
|
24
|
+
source: 'process.argv',
|
|
25
|
+
char: 't',
|
|
26
|
+
desc: 'the target file to write the result to',
|
|
27
|
+
type: 'string',
|
|
28
|
+
},
|
|
29
|
+
provider: {
|
|
30
|
+
source: 'process.argv',
|
|
31
|
+
char: 'p',
|
|
32
|
+
desc: 'the llm provider to use (anthropic, openai, qwen)',
|
|
33
|
+
type: '?string',
|
|
34
|
+
},
|
|
35
|
+
model: {
|
|
36
|
+
source: 'process.argv',
|
|
37
|
+
char: 'm',
|
|
38
|
+
desc: 'the model to use',
|
|
39
|
+
type: '?string',
|
|
40
|
+
},
|
|
41
|
+
system: {
|
|
42
|
+
source: 'process.argv',
|
|
43
|
+
char: 's',
|
|
44
|
+
desc: 'path to system prompt file',
|
|
45
|
+
type: '?string',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
assess: (input) => typeof input.target === 'string',
|
|
49
|
+
instantiate: async (input) => {
|
|
50
|
+
const obsDir = (0, rhachet_artifact_git_1.getArtifactObsDir)({ uri: input.target });
|
|
51
|
+
// build brain actor from inputs
|
|
52
|
+
const provider = (input.provider ?? 'anthropic');
|
|
53
|
+
const model = input.model ?? 'claude-3-5-sonnet-latest';
|
|
54
|
+
// create atom based on provider
|
|
55
|
+
const atom = provider === 'anthropic'
|
|
56
|
+
? (0, anthropic_1.genAtomAnthropic)({ model })
|
|
57
|
+
: provider === 'openai'
|
|
58
|
+
? (0, openai_1.genAtomOpenai)({ model })
|
|
59
|
+
: (0, qwen_1.genAtomQwen)({ model });
|
|
60
|
+
const actor = new BrainArch1Actor_1.BrainArch1Actor({
|
|
61
|
+
atom,
|
|
62
|
+
toolboxes: [files_1.toolboxFiles],
|
|
63
|
+
memory: null,
|
|
64
|
+
permission: readOnly_1.permissionGuardReadOnly,
|
|
65
|
+
constraints: {
|
|
66
|
+
maxIterations: 100,
|
|
67
|
+
maxTokens: 8192,
|
|
68
|
+
},
|
|
69
|
+
role: {
|
|
70
|
+
systemPrompt: null,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
caller: await (0, rhachet_1.enrollThread)({
|
|
75
|
+
role: 'caller',
|
|
76
|
+
stash: {
|
|
77
|
+
ask: input.ask,
|
|
78
|
+
art: {
|
|
79
|
+
result: (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: input.target }, { versions: true }),
|
|
80
|
+
log: (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: obsDir + '.log.md' }, { versions: true }),
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
}),
|
|
84
|
+
brain: await (0, rhachet_1.enrollThread)({
|
|
85
|
+
role: 'brain',
|
|
86
|
+
stash: {
|
|
87
|
+
actor,
|
|
88
|
+
systemPromptPath: input.system ?? null,
|
|
89
|
+
},
|
|
90
|
+
}),
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
context: {
|
|
95
|
+
lookup: {
|
|
96
|
+
apiKeyAnthropic: {
|
|
97
|
+
source: 'process.env',
|
|
98
|
+
envar: 'ANTHROPIC_API_KEY',
|
|
99
|
+
desc: 'the anthropic api key',
|
|
100
|
+
type: '?string',
|
|
101
|
+
},
|
|
102
|
+
apiKeyOpenai: {
|
|
103
|
+
source: 'process.env',
|
|
104
|
+
envar: 'OPENAI_API_KEY',
|
|
105
|
+
desc: 'the openai api key',
|
|
106
|
+
type: '?string',
|
|
107
|
+
},
|
|
108
|
+
apiKeyQwen: {
|
|
109
|
+
source: 'process.env',
|
|
110
|
+
envar: 'QWEN_API_KEY',
|
|
111
|
+
desc: 'the qwen api key',
|
|
112
|
+
type: '?string',
|
|
113
|
+
},
|
|
114
|
+
apiKeyTavily: {
|
|
115
|
+
source: 'process.env',
|
|
116
|
+
envar: 'TAVILY_API_KEY',
|
|
117
|
+
desc: 'the tavily api key for web search',
|
|
118
|
+
type: '?string',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
assess: (input) => true,
|
|
122
|
+
instantiate: (input) => {
|
|
123
|
+
return {
|
|
124
|
+
creds: {
|
|
125
|
+
anthropic: { apiKey: input.apiKeyAnthropic ?? '', url: null },
|
|
126
|
+
openai: { apiKey: input.apiKeyOpenai ?? '', url: null },
|
|
127
|
+
qwen: { apiKey: input.apiKeyQwen ?? '', url: null },
|
|
128
|
+
tavily: { apiKey: input.apiKeyTavily ?? '' },
|
|
129
|
+
},
|
|
130
|
+
...(0, genContextLogTrail_1.genContextLogTrail)(),
|
|
131
|
+
...(0, rhachet_1.genContextStitchTrail)(),
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
readme: `
|
|
136
|
+
# act
|
|
137
|
+
|
|
138
|
+
invokes the agentic brain loop to complete a task
|
|
139
|
+
|
|
140
|
+
## usage
|
|
141
|
+
|
|
142
|
+
\`\`\`bash
|
|
143
|
+
npx rhachet skills run act -t ./output.md "your task here"
|
|
144
|
+
\`\`\`
|
|
145
|
+
`.trim(),
|
|
146
|
+
});
|
|
147
|
+
//# sourceMappingURL=skillAct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skillAct.js","sourceRoot":"","sources":["../../../../../src/roles/brain/skills/act/skillAct.ts"],"names":[],"mappings":";;;AAAA,qCAA4E;AAC5E,+DAA6E;AAE7E,sEAAmE;AACnE,oFAAiF;AACjF,iGAAqG;AACrG,2FAA+F;AAC/F,uFAA2F;AAC3F,0GAAsH;AACtH,6FAAiG;AAEjG,uCAAoC;AAEpC;;;GAGG;AACU,QAAA,SAAS,GAAG,IAAA,sBAAY,EAAC;IACpC,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,iBAAO;IACd,OAAO,EAAE;QACP,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,MAAM,EAAE,cAAc;gBACtB,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,wCAAwC;gBAC9C,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE;gBACR,MAAM,EAAE,cAAc;gBACtB,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,mDAAmD;gBACzD,IAAI,EAAE,SAAS;aAChB;YACD,KAAK,EAAE;gBACL,MAAM,EAAE,cAAc;gBACtB,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,kBAAkB;gBACxB,IA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Ae,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE;oBAC7D,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,YAAY,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE;oBACvD,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,UAAU,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE;oBACnD,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,YAAY,IAAI,EAAE,EAAE;iBAC7C;gBACD,GAAG,IAAA,uCAAkB,GAAE;gBACvB,GAAG,IAAA,+BAAqB,GAAE;aAC3B,CAAC;QACJ,CAAC;KACF;IACD,MAAM,EAAE;;;;;;;;;;GAUP,CAAC,IAAI,EAAE;CACT,CAAC,CAAC"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { enrollThread, genContextStitchTrail, genRoleSkill } from 'rhachet';
|
|
2
|
+
import { genArtifactGitFile, getArtifactObsDir } from 'rhachet-artifact-git';
|
|
3
|
+
|
|
4
|
+
import { genContextLogTrail } from '@src/.test/genContextLogTrail';
|
|
5
|
+
import { BrainArch1Actor } from '@src/domain.objects/BrainArch1/BrainArch1Actor';
|
|
6
|
+
import { genAtomAnthropic } from '@src/domain.operations/brain.replic.arch1/plugins/atoms/anthropic';
|
|
7
|
+
import { genAtomOpenai } from '@src/domain.operations/brain.replic.arch1/plugins/atoms/openai';
|
|
8
|
+
import { genAtomQwen } from '@src/domain.operations/brain.replic.arch1/plugins/atoms/qwen';
|
|
9
|
+
import { permissionGuardReadOnly } from '@src/domain.operations/brain.replic.arch1/plugins/permissionGuards/readOnly';
|
|
10
|
+
import { toolboxFiles } from '@src/domain.operations/brain.replic.arch1/plugins/toolboxes/files';
|
|
11
|
+
|
|
12
|
+
import { stepAct } from './stepAct';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* .what = skill definition for agentic task completion
|
|
16
|
+
* .why = enables rhachet roles to leverage brain capabilities for autonomous task execution
|
|
17
|
+
*/
|
|
18
|
+
export const SKILL_ACT = genRoleSkill({
|
|
19
|
+
slug: 'act',
|
|
20
|
+
route: stepAct,
|
|
21
|
+
threads: {
|
|
22
|
+
lookup: {
|
|
23
|
+
target: {
|
|
24
|
+
source: 'process.argv',
|
|
25
|
+
char: 't',
|
|
26
|
+
desc: 'the target file to write the result to',
|
|
27
|
+
type: 'string',
|
|
28
|
+
},
|
|
29
|
+
provider: {
|
|
30
|
+
source: 'process.argv',
|
|
31
|
+
char: 'p',
|
|
32
|
+
desc: 'the llm provider to use (anthropic, openai, qwen)',
|
|
33
|
+
type: '?string',
|
|
34
|
+
},
|
|
35
|
+
model: {
|
|
36
|
+
source: 'process.argv',
|
|
37
|
+
char: 'm',
|
|
38
|
+
desc: 'the model to use',
|
|
39
|
+
type: '?string',
|
|
40
|
+
},
|
|
41
|
+
system: {
|
|
42
|
+
source: 'process.argv',
|
|
43
|
+
char: 's',
|
|
44
|
+
desc: 'path to system prompt file',
|
|
45
|
+
type: '?string',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
assess: (
|
|
49
|
+
input,
|
|
50
|
+
): input is {
|
|
51
|
+
target: string;
|
|
52
|
+
provider: string;
|
|
53
|
+
model: string;
|
|
54
|
+
system: string;
|
|
55
|
+
ask: string;
|
|
56
|
+
} => typeof input.target === 'string',
|
|
57
|
+
instantiate: async (input: {
|
|
58
|
+
target: string;
|
|
59
|
+
provider: string;
|
|
60
|
+
model: string;
|
|
61
|
+
system: string;
|
|
62
|
+
ask: string;
|
|
63
|
+
}) => {
|
|
64
|
+
const obsDir = getArtifactObsDir({ uri: input.target });
|
|
65
|
+
|
|
66
|
+
// build brain actor from inputs
|
|
67
|
+
const provider = (input.provider ?? 'anthropic') as
|
|
68
|
+
| 'anthropic'
|
|
69
|
+
| 'openai'
|
|
70
|
+
| 'qwen';
|
|
71
|
+
const model = input.model ?? 'claude-3-5-sonnet-latest';
|
|
72
|
+
|
|
73
|
+
// create atom based on provider
|
|
74
|
+
const atom =
|
|
75
|
+
provider === 'anthropic'
|
|
76
|
+
? genAtomAnthropic({ model })
|
|
77
|
+
: provider === 'openai'
|
|
78
|
+
? genAtomOpenai({ model })
|
|
79
|
+
: genAtomQwen({ model });
|
|
80
|
+
|
|
81
|
+
const actor = new BrainArch1Actor({
|
|
82
|
+
atom,
|
|
83
|
+
toolboxes: [toolboxFiles],
|
|
84
|
+
memory: null,
|
|
85
|
+
permission: permissionGuardReadOnly,
|
|
86
|
+
constraints: {
|
|
87
|
+
maxIterations: 100,
|
|
88
|
+
maxTokens: 8192,
|
|
89
|
+
},
|
|
90
|
+
role: {
|
|
91
|
+
systemPrompt: null,
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
caller: await enrollThread({
|
|
97
|
+
role: 'caller',
|
|
98
|
+
stash: {
|
|
99
|
+
ask: input.ask,
|
|
100
|
+
art: {
|
|
101
|
+
result: genArtifactGitFile(
|
|
102
|
+
{ uri: input.target },
|
|
103
|
+
{ versions: true },
|
|
104
|
+
),
|
|
105
|
+
log: genArtifactGitFile(
|
|
106
|
+
{ uri: obsDir + '.log.md' },
|
|
107
|
+
{ versions: true },
|
|
108
|
+
),
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
brain: await enrollThread({
|
|
113
|
+
role: 'brain',
|
|
114
|
+
stash: {
|
|
115
|
+
actor,
|
|
116
|
+
systemPromptPath: input.system ?? null,
|
|
117
|
+
},
|
|
118
|
+
}),
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
context: {
|
|
123
|
+
lookup: {
|
|
124
|
+
apiKeyAnthropic: {
|
|
125
|
+
source: 'process.env',
|
|
126
|
+
envar: 'ANTHROPIC_API_KEY',
|
|
127
|
+
desc: 'the anthropic api key',
|
|
128
|
+
type: '?string',
|
|
129
|
+
},
|
|
130
|
+
apiKeyOpenai: {
|
|
131
|
+
source: 'process.env',
|
|
132
|
+
envar: 'OPENAI_API_KEY',
|
|
133
|
+
desc: 'the openai api key',
|
|
134
|
+
type: '?string',
|
|
135
|
+
},
|
|
136
|
+
apiKeyQwen: {
|
|
137
|
+
source: 'process.env',
|
|
138
|
+
envar: 'QWEN_API_KEY',
|
|
139
|
+
desc: 'the qwen api key',
|
|
140
|
+
type: '?string',
|
|
141
|
+
},
|
|
142
|
+
apiKeyTavily: {
|
|
143
|
+
source: 'process.env',
|
|
144
|
+
envar: 'TAVILY_API_KEY',
|
|
145
|
+
desc: 'the tavily api key for web search',
|
|
146
|
+
type: '?string',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
assess: (
|
|
150
|
+
input,
|
|
151
|
+
): input is {
|
|
152
|
+
apiKeyAnthropic: string;
|
|
153
|
+
apiKeyOpenai: string;
|
|
154
|
+
apiKeyQwen: string;
|
|
155
|
+
apiKeyTavily: string;
|
|
156
|
+
} => true,
|
|
157
|
+
instantiate: (input: {
|
|
158
|
+
apiKeyAnthropic: string;
|
|
159
|
+
apiKeyOpenai: string;
|
|
160
|
+
apiKeyQwen: string;
|
|
161
|
+
apiKeyTavily: string;
|
|
162
|
+
}) => {
|
|
163
|
+
return {
|
|
164
|
+
creds: {
|
|
165
|
+
anthropic: { apiKey: input.apiKeyAnthropic ?? '', url: null },
|
|
166
|
+
openai: { apiKey: input.apiKeyOpenai ?? '', url: null },
|
|
167
|
+
qwen: { apiKey: input.apiKeyQwen ?? '', url: null },
|
|
168
|
+
tavily: { apiKey: input.apiKeyTavily ?? '' },
|
|
169
|
+
},
|
|
170
|
+
...genContextLogTrail(),
|
|
171
|
+
...genContextStitchTrail(),
|
|
172
|
+
};
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
readme: `
|
|
176
|
+
# act
|
|
177
|
+
|
|
178
|
+
invokes the agentic brain loop to complete a task
|
|
179
|
+
|
|
180
|
+
## usage
|
|
181
|
+
|
|
182
|
+
\`\`\`bash
|
|
183
|
+
npx rhachet skills run act -t ./output.md "your task here"
|
|
184
|
+
\`\`\`
|
|
185
|
+
`.trim(),
|
|
186
|
+
});
|