rhachet 1.11.0 → 1.12.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/contract/cli/invoke.js +10 -1
- package/dist/contract/cli/invoke.js.map +1 -1
- package/dist/contract/cli/invokeAsk.d.ts +3 -3
- package/dist/contract/cli/invokeBriefs.d.ts +2 -2
- package/dist/contract/cli/invokeBriefsBoot.d.ts +1 -1
- package/dist/contract/cli/invokeBriefsBoot.js +2 -2
- package/dist/contract/cli/invokeBriefsBoot.js.map +1 -1
- package/dist/contract/cli/invokeBriefsLink.d.ts +2 -2
- package/dist/contract/cli/invokeBriefsLink.js +9 -47
- package/dist/contract/cli/invokeBriefsLink.js.map +1 -1
- package/dist/contract/cli/invokeChoose.d.ts +1 -1
- package/dist/contract/cli/invokeInit.d.ts +9 -0
- package/dist/contract/cli/invokeInit.js +57 -0
- package/dist/contract/cli/invokeInit.js.map +1 -0
- package/dist/contract/cli/invokeList.d.ts +2 -2
- package/dist/contract/cli/invokeReadme.d.ts +2 -2
- package/dist/contract/cli/invokeRoles.d.ts +2 -2
- package/dist/contract/cli/invokeRolesBoot.d.ts +1 -1
- package/dist/contract/cli/invokeRolesBoot.js +2 -2
- package/dist/contract/cli/invokeRolesBoot.js.map +1 -1
- package/dist/contract/cli/invokeRolesLink.d.ts +2 -2
- package/dist/contract/cli/invokeRolesLink.js +17 -96
- package/dist/contract/cli/invokeRolesLink.js.map +1 -1
- package/dist/contract/sdk.d.ts +13 -13
- package/dist/contract/sdk.js +25 -25
- package/dist/contract/sdk.js.map +1 -1
- package/dist/domain/constants.d.ts +3 -0
- package/dist/domain/constants.js +5 -0
- package/dist/domain/constants.js.map +1 -0
- package/dist/domain/objects/InvokeHooks.d.ts +1 -1
- package/dist/domain/objects/InvokeOpts.d.ts +1 -1
- package/dist/domain/objects/Role.d.ts +2 -2
- package/dist/domain/objects/RoleContext.d.ts +1 -1
- package/dist/domain/objects/RoleSkill.d.ts +2 -2
- package/dist/domain/objects/RoleSkillArgGetter.d.ts +3 -3
- package/dist/domain/objects/RoleTrait.d.ts +2 -2
- package/dist/domain/objects/Stitch.d.ts +4 -4
- package/dist/domain/objects/Stitch.js.map +1 -1
- package/dist/domain/objects/StitchChoice.d.ts +2 -2
- package/dist/domain/objects/StitchChoice.js.map +1 -1
- package/dist/domain/objects/StitchCycle.d.ts +4 -4
- package/dist/domain/objects/StitchCycle.js.map +1 -1
- package/dist/domain/objects/StitchFanout.d.ts +4 -4
- package/dist/domain/objects/StitchFanout.js.map +1 -1
- package/dist/domain/objects/StitchRoute.d.ts +1 -1
- package/dist/domain/objects/StitchRoute.js.map +1 -1
- package/dist/domain/objects/StitchSetEvent.d.ts +3 -3
- package/dist/domain/objects/StitchStep.d.ts +3 -3
- package/dist/domain/objects/Stitcher.d.ts +9 -9
- package/dist/domain/objects/Stitcher.js.map +1 -1
- package/dist/domain/objects/Template.d.ts +2 -2
- package/dist/domain/objects/Template.js.map +1 -1
- package/dist/domain/objects/Thread.d.ts +2 -2
- package/dist/domain/objects/Threads.d.ts +2 -2
- package/dist/domain/objects/Threads.js.map +1 -1
- package/dist/domain/objects/index.d.ts +2 -2
- package/dist/domain/objects/index.js +2 -2
- package/dist/domain/objects/index.js.map +1 -1
- package/dist/logic/context/genContextStitchTrail.d.ts +1 -1
- package/dist/logic/context/genContextStitchTrail.js.map +1 -1
- package/dist/logic/init/discoverRolePackages.d.ts +8 -0
- package/dist/logic/init/discoverRolePackages.js +20 -0
- package/dist/logic/init/discoverRolePackages.js.map +1 -0
- package/dist/logic/init/generateRhachetConfig.d.ts +8 -0
- package/dist/logic/init/generateRhachetConfig.js +40 -0
- package/dist/logic/init/generateRhachetConfig.js.map +1 -0
- package/dist/logic/invoke/assureFindRole.d.ts +2 -2
- package/dist/logic/invoke/assureUniqueRoles.d.ts +1 -1
- package/dist/logic/invoke/getAgentReadmeTemplates.js +1 -1
- package/dist/logic/invoke/getInvokeHooksByOpts.d.ts +4 -3
- package/dist/logic/invoke/getInvokeHooksByOpts.js +11 -3
- package/dist/logic/invoke/getInvokeHooksByOpts.js.map +1 -1
- package/dist/logic/invoke/getRegistriesByOpts.d.ts +2 -2
- package/dist/logic/invoke/getSkillContext.d.ts +3 -3
- package/dist/logic/invoke/getSkillThreads.d.ts +4 -4
- package/dist/logic/invoke/hooks/onInvokeAskInput.d.ts +2 -2
- package/dist/logic/invoke/link/findsertFile.d.ts +9 -0
- package/dist/logic/invoke/link/findsertFile.js +29 -0
- package/dist/logic/invoke/link/findsertFile.js.map +1 -0
- package/dist/logic/invoke/link/symlinkResourceDirectories.d.ts +12 -0
- package/dist/logic/invoke/link/symlinkResourceDirectories.js +81 -0
- package/dist/logic/invoke/link/symlinkResourceDirectories.js.map +1 -0
- package/dist/logic/invoke/performInCurrentThread.d.ts +2 -2
- package/dist/logic/invoke/performInIsolatedThread.execute.d.ts +1 -1
- package/dist/logic/invoke/performInIsolatedThread.invoke.d.ts +2 -2
- package/dist/logic/invoke/performInIsolatedThread.invoke.js +3 -3
- package/dist/logic/invoke/performInIsolatedThread.invoke.js.map +1 -1
- package/dist/logic/invoke/performInIsolatedThreads.d.ts +1 -1
- package/dist/logic/role/addRoleTraits.d.ts +5 -5
- package/dist/logic/role/enrollThread.d.ts +4 -4
- package/dist/logic/role/genRoleSkill.d.ts +1 -1
- package/dist/logic/stitch/adapters/imagineViaOpenAI.d.ts +1 -1
- package/dist/logic/stitch/enstitch.d.ts +3 -3
- package/dist/logic/stitch/enstitch.js +1 -1
- package/dist/logic/stitch/enstitch.js.map +1 -1
- package/dist/logic/stitch/invokeImagineStitcher.d.ts +3 -3
- package/dist/logic/stitch/withStitchTrail.d.ts +4 -4
- package/dist/logic/stitch/withStitchTrail.js +1 -1
- package/dist/logic/stitch/withStitchTrail.js.map +1 -1
- package/dist/logic/template/genStepImagineViaTemplate.d.ts +2 -2
- package/dist/logic/template/genStepImagineViaTemplate.js.map +1 -1
- package/dist/logic/template/genTemplate.d.ts +3 -3
- package/dist/logic/template/getTemplatePathByCallerPath.d.ts +1 -1
- package/dist/logic/template/getTemplatePathByCallerPath.js +2 -2
- package/dist/logic/template/getTemplatePathByCallerPath.js.map +1 -1
- package/dist/logic/template/getTemplateValFromArtifacts.d.ts +2 -2
- package/dist/logic/template/getTemplateValFromArtifacts.js.map +1 -1
- package/dist/logic/template/getTemplateVarsFromInheritance.d.ts +1 -1
- package/dist/logic/template/useTemplate.d.ts +2 -2
- package/dist/logic/thread/getStitch.d.ts +1 -1
- package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.d.ts +3 -3
- package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.d.ts +4 -4
- package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.d.ts +6 -6
- package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.d.ts +4 -4
- package/dist/logic/weave/compose/ProcedureContextMerged.generic.d.ts +1 -1
- package/dist/logic/weave/compose/ThreadsMerged.generic.d.ts +4 -4
- package/dist/logic/weave/compose/asStitcher.d.ts +3 -3
- package/dist/logic/weave/compose/asStitcherFlat.d.ts +2 -2
- package/dist/logic/weave/compose/genStitchChoice.d.ts +3 -3
- package/dist/logic/weave/compose/genStitchCycle.d.ts +5 -5
- package/dist/logic/weave/compose/genStitchFanout.d.ts +5 -5
- package/dist/logic/weave/compose/genStitchFanout.js.map +1 -1
- package/dist/logic/weave/compose/genStitchRoute.d.ts +3 -3
- package/dist/logic/weave/compose/genStitchRoute.js.map +1 -1
- package/dist/logic/weave/enweaveOneChoice.d.ts +2 -2
- package/dist/logic/weave/enweaveOneChoice.js.map +1 -1
- package/dist/logic/weave/enweaveOneCycle.d.ts +2 -2
- package/dist/logic/weave/enweaveOneCycle.js.map +1 -1
- package/dist/logic/weave/enweaveOneFanout.d.ts +2 -2
- package/dist/logic/weave/enweaveOneFanout.js.map +1 -1
- package/dist/logic/weave/enweaveOneRoute.d.ts +2 -2
- package/dist/logic/weave/enweaveOneRoute.js.map +1 -1
- package/dist/logic/weave/enweaveOneStitcher.d.ts +2 -2
- package/dist/logic/weave/enweaveOneStitcher.js.map +1 -1
- package/license.md +21 -0
- package/package.json +36 -36
- package/dist/.test/directory.d.ts +0 -2
- package/dist/.test/directory.js +0 -6
- package/dist/.test/directory.js.map +0 -1
- package/dist/.test/example.use.repo/example.echoRegistry.d.ts +0 -2
- package/dist/.test/example.use.repo/example.echoRegistry.js +0 -108
- package/dist/.test/example.use.repo/example.echoRegistry.js.map +0 -1
- package/dist/.test/genContextLogTrail.d.ts +0 -2
- package/dist/.test/genContextLogTrail.js +0 -12
- package/dist/.test/genContextLogTrail.js.map +0 -1
- package/dist/.test/getContextOpenAI.d.ts +0 -2
- package/dist/.test/getContextOpenAI.js +0 -18
- package/dist/.test/getContextOpenAI.js.map +0 -1
- package/dist/.test/stitchers/genStitcherCodeFileRead.d.ts +0 -14
- package/dist/.test/stitchers/genStitcherCodeFileRead.js +0 -23
- package/dist/.test/stitchers/genStitcherCodeFileRead.js.map +0 -1
- package/dist/.test/stitchers/genStitcherCodeFileWrite.d.ts +0 -16
- package/dist/.test/stitchers/genStitcherCodeFileWrite.js +0 -29
- package/dist/.test/stitchers/genStitcherCodeFileWrite.js.map +0 -1
- package/dist/.test/stitchers/genStitcherCodeReviewImagine.d.ts +0 -15
- package/dist/.test/stitchers/genStitcherCodeReviewImagine.js +0 -97
- package/dist/.test/stitchers/genStitcherCodeReviewImagine.js.map +0 -1
- package/dist/.test/stitchers/stitcherCodeDiffImagine.d.ts +0 -13
- package/dist/.test/stitchers/stitcherCodeDiffImagine.js +0 -33
- package/dist/.test/stitchers/stitcherCodeDiffImagine.js.map +0 -1
- package/dist/.test/stitchers/stitcherFanoutRandomSum.d.ts +0 -13
- package/dist/.test/stitchers/stitcherFanoutRandomSum.js +0 -45
- package/dist/.test/stitchers/stitcherFanoutRandomSum.js.map +0 -1
- package/dist/.test/stitchers/stitcherFanoutSubroutes.d.ts +0 -35
- package/dist/.test/stitchers/stitcherFanoutSubroutes.js +0 -76
- package/dist/.test/stitchers/stitcherFanoutSubroutes.js.map +0 -1
- package/dist/.test/threads/codeArtist.d.ts +0 -6
- package/dist/.test/threads/codeArtist.js +0 -26
- package/dist/.test/threads/codeArtist.js.map +0 -1
- package/dist/.test/threads/codeCritic.d.ts +0 -6
- package/dist/.test/threads/codeCritic.js +0 -21
- package/dist/.test/threads/codeCritic.js.map +0 -1
- package/dist/.test/threads/director.d.ts +0 -6
- package/dist/.test/threads/director.js +0 -14
- package/dist/.test/threads/director.js.map +0 -1
- package/dist/contract/cli/invoke.integration.test.d.ts +0 -1
- package/dist/contract/cli/invoke.integration.test.js +0 -39
- package/dist/contract/cli/invoke.integration.test.js.map +0 -1
- package/dist/contract/cli/invokeAsk.integration.test.d.ts +0 -1
- package/dist/contract/cli/invokeAsk.integration.test.js +0 -69
- package/dist/contract/cli/invokeAsk.integration.test.js.map +0 -1
- package/dist/contract/cli/invokeBriefsBoot.integration.test.d.ts +0 -1
- package/dist/contract/cli/invokeBriefsBoot.integration.test.js +0 -159
- package/dist/contract/cli/invokeBriefsBoot.integration.test.js.map +0 -1
- package/dist/contract/cli/invokeBriefsLink.integration.test.d.ts +0 -1
- package/dist/contract/cli/invokeBriefsLink.integration.test.js +0 -97
- package/dist/contract/cli/invokeBriefsLink.integration.test.js.map +0 -1
- package/dist/contract/cli/invokeChoose.integration.test.d.ts +0 -1
- package/dist/contract/cli/invokeChoose.integration.test.js +0 -111
- package/dist/contract/cli/invokeChoose.integration.test.js.map +0 -1
- package/dist/contract/cli/invokeReadme.integration.test.d.ts +0 -1
- package/dist/contract/cli/invokeReadme.integration.test.js +0 -62
- package/dist/contract/cli/invokeReadme.integration.test.js.map +0 -1
- package/dist/domain/objects/InvokeOpts.test.d.ts +0 -1
- package/dist/domain/objects/InvokeOpts.test.js +0 -41
- package/dist/domain/objects/InvokeOpts.test.js.map +0 -1
- package/dist/domain/objects/Stitcher.test.d.ts +0 -1
- package/dist/domain/objects/Stitcher.test.js +0 -78
- package/dist/domain/objects/Stitcher.test.js.map +0 -1
- package/dist/domain/objects/Template.test.d.ts +0 -1
- package/dist/domain/objects/Template.test.js +0 -48
- package/dist/domain/objects/Template.test.js.map +0 -1
- package/dist/logic/invoke/addAttemptQualifierToOutputPath.test.d.ts +0 -1
- package/dist/logic/invoke/addAttemptQualifierToOutputPath.test.js +0 -130
- package/dist/logic/invoke/addAttemptQualifierToOutputPath.test.js.map +0 -1
- package/dist/logic/invoke/getPeerQualifiersOfOutputChoice.test.d.ts +0 -1
- package/dist/logic/invoke/getPeerQualifiersOfOutputChoice.test.js +0 -77
- package/dist/logic/invoke/getPeerQualifiersOfOutputChoice.test.js.map +0 -1
- package/dist/logic/invoke/getSkillContext.test.d.ts +0 -1
- package/dist/logic/invoke/getSkillContext.test.js +0 -85
- package/dist/logic/invoke/getSkillContext.test.js.map +0 -1
- package/dist/logic/invoke/getSkillThread.test.d.ts +0 -1
- package/dist/logic/invoke/getSkillThread.test.js +0 -115
- package/dist/logic/invoke/getSkillThread.test.js.map +0 -1
- package/dist/logic/invoke/performInIsolatedThread.invoke.integration.test.d.ts +0 -1
- package/dist/logic/invoke/performInIsolatedThread.invoke.integration.test.js +0 -74
- package/dist/logic/invoke/performInIsolatedThread.invoke.integration.test.js.map +0 -1
- package/dist/logic/invoke/performInIsolatedThreads.integration.test.d.ts +0 -1
- package/dist/logic/invoke/performInIsolatedThreads.integration.test.js +0 -75
- package/dist/logic/invoke/performInIsolatedThreads.integration.test.js.map +0 -1
- package/dist/logic/role/addRoleTraits.test.d.ts +0 -1
- package/dist/logic/role/addRoleTraits.test.js +0 -93
- package/dist/logic/role/addRoleTraits.test.js.map +0 -1
- package/dist/logic/role/enrollThread.integration.test.d.ts +0 -1
- package/dist/logic/role/enrollThread.integration.test.js +0 -79
- package/dist/logic/role/enrollThread.integration.test.js.map +0 -1
- package/dist/logic/role/genRoleSkill.test.d.ts +0 -1
- package/dist/logic/role/genRoleSkill.test.js +0 -79
- package/dist/logic/role/genRoleSkill.test.js.map +0 -1
- package/dist/logic/stitch/enstitch.test.d.ts +0 -1
- package/dist/logic/stitch/enstitch.test.js +0 -112
- package/dist/logic/stitch/enstitch.test.js.map +0 -1
- package/dist/logic/stitch/invokeImagineStitcher.integration.test.d.ts +0 -1
- package/dist/logic/stitch/invokeImagineStitcher.integration.test.js +0 -195
- package/dist/logic/stitch/invokeImagineStitcher.integration.test.js.map +0 -1
- package/dist/logic/template/genStepImagineViaTemplate.test.d.ts +0 -1
- package/dist/logic/template/genStepImagineViaTemplate.test.js +0 -126
- package/dist/logic/template/genStepImagineViaTemplate.test.js.map +0 -1
- package/dist/logic/template/genTemplate.test.d.ts +0 -1
- package/dist/logic/template/genTemplate.test.js +0 -118
- package/dist/logic/template/genTemplate.test.js.map +0 -1
- package/dist/logic/template/useTemplate.integration.test.d.ts +0 -1
- package/dist/logic/template/useTemplate.integration.test.js +0 -28
- package/dist/logic/template/useTemplate.integration.test.js.map +0 -1
- package/dist/logic/thread/getStitch.test.d.ts +0 -1
- package/dist/logic/thread/getStitch.test.js +0 -73
- package/dist/logic/thread/getStitch.test.js.map +0 -1
- package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.test.d.ts +0 -1
- package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.test.js +0 -67
- package/dist/logic/weave/compose/GStitcherInferredFromChoice.generic.test.js.map +0 -1
- package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.test.d.ts +0 -1
- package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.test.js +0 -132
- package/dist/logic/weave/compose/GStitcherInferredFromCycle.generic.test.js.map +0 -1
- package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.test.d.ts +0 -1
- package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.test.js +0 -74
- package/dist/logic/weave/compose/GStitcherInferredFromFanout.generic.test.js.map +0 -1
- package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.test.d.ts +0 -1
- package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.test.js +0 -190
- package/dist/logic/weave/compose/GStitcherInferredFromRoute.generic.test.js.map +0 -1
- package/dist/logic/weave/compose/ProcedureContextMerged.generic.test.d.ts +0 -1
- package/dist/logic/weave/compose/ProcedureContextMerged.generic.test.js +0 -29
- package/dist/logic/weave/compose/ProcedureContextMerged.generic.test.js.map +0 -1
- package/dist/logic/weave/compose/ThreadsMerged.generic.test.d.ts +0 -1
- package/dist/logic/weave/compose/ThreadsMerged.generic.test.js +0 -420
- package/dist/logic/weave/compose/ThreadsMerged.generic.test.js.map +0 -1
- package/dist/logic/weave/compose/asStitcher.test.d.ts +0 -1
- package/dist/logic/weave/compose/asStitcher.test.js +0 -95
- package/dist/logic/weave/compose/asStitcher.test.js.map +0 -1
- package/dist/logic/weave/compose/asStitcherFlat.test.d.ts +0 -1
- package/dist/logic/weave/compose/asStitcherFlat.test.js +0 -96
- package/dist/logic/weave/compose/asStitcherFlat.test.js.map +0 -1
- package/dist/logic/weave/compose/genStitchChoice.test.d.ts +0 -1
- package/dist/logic/weave/compose/genStitchChoice.test.js +0 -200
- package/dist/logic/weave/compose/genStitchChoice.test.js.map +0 -1
- package/dist/logic/weave/compose/genStitchCycle.test.d.ts +0 -1
- package/dist/logic/weave/compose/genStitchCycle.test.js +0 -267
- package/dist/logic/weave/compose/genStitchCycle.test.js.map +0 -1
- package/dist/logic/weave/compose/genStitchFanout.test.d.ts +0 -1
- package/dist/logic/weave/compose/genStitchFanout.test.js +0 -79
- package/dist/logic/weave/compose/genStitchFanout.test.js.map +0 -1
- package/dist/logic/weave/compose/genStitchRoute.test.d.ts +0 -1
- package/dist/logic/weave/compose/genStitchRoute.test.js +0 -120
- package/dist/logic/weave/compose/genStitchRoute.test.js.map +0 -1
- package/dist/logic/weave/enweaveOneChoice.test.d.ts +0 -1
- package/dist/logic/weave/enweaveOneChoice.test.js +0 -181
- package/dist/logic/weave/enweaveOneChoice.test.js.map +0 -1
- package/dist/logic/weave/enweaveOneCycle.test.d.ts +0 -1
- package/dist/logic/weave/enweaveOneCycle.test.js +0 -180
- package/dist/logic/weave/enweaveOneCycle.test.js.map +0 -1
- package/dist/logic/weave/enweaveOneFanout.integration.test.d.ts +0 -1
- package/dist/logic/weave/enweaveOneFanout.integration.test.js +0 -166
- package/dist/logic/weave/enweaveOneFanout.integration.test.js.map +0 -1
- package/dist/logic/weave/enweaveOneRoute.integration.test.d.ts +0 -1
- package/dist/logic/weave/enweaveOneRoute.integration.test.js +0 -159
- package/dist/logic/weave/enweaveOneRoute.integration.test.js.map +0 -1
- package/dist/logic/weave/enweaveOneStitcher.integration.test.d.ts +0 -2
- package/dist/logic/weave/enweaveOneStitcher.integration.test.js +0 -258
- package/dist/logic/weave/enweaveOneStitcher.integration.test.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PickOne } from 'type-fns';
|
|
2
|
-
import { Threads } from '../../domain/objects';
|
|
3
|
-
import { InvokeOpts } from '../../domain/objects/InvokeOpts';
|
|
4
|
-
import { RoleSkillThreadsGetter } from '../../domain/objects/RoleSkillArgGetter';
|
|
1
|
+
import type { PickOne } from 'type-fns';
|
|
2
|
+
import type { Threads } from '../../domain/objects';
|
|
3
|
+
import type { InvokeOpts } from '../../domain/objects/InvokeOpts';
|
|
4
|
+
import type { RoleSkillThreadsGetter } from '../../domain/objects/RoleSkillArgGetter';
|
|
5
5
|
/**
|
|
6
6
|
* .what = hydrates skill threads using either passin or lookup mode
|
|
7
7
|
* .why = enables flexible runtime use from CLI or direct invocation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InvokeOpts } from '../../../domain/objects';
|
|
2
|
-
import { InvokeHooks } from '../../../domain/objects/InvokeHooks';
|
|
1
|
+
import type { InvokeOpts } from '../../../domain/objects';
|
|
2
|
+
import type { InvokeHooks } from '../../../domain/objects/InvokeHooks';
|
|
3
3
|
/**
|
|
4
4
|
* .what = hooks to call onInvokeAskInput
|
|
5
5
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .what = finds or inserts a file with template content
|
|
3
|
+
* .why = ensures standard readme files exist without overwriting custom changes
|
|
4
|
+
* .how = only writes if file doesn't exist or content matches template exactly
|
|
5
|
+
*/
|
|
6
|
+
export declare const findsertFile: (options: {
|
|
7
|
+
path: string;
|
|
8
|
+
template: string;
|
|
9
|
+
}) => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findsertFile = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
/**
|
|
7
|
+
* .what = finds or inserts a file with template content
|
|
8
|
+
* .why = ensures standard readme files exist without overwriting custom changes
|
|
9
|
+
* .how = only writes if file doesn't exist or content matches template exactly
|
|
10
|
+
*/
|
|
11
|
+
const findsertFile = (options) => {
|
|
12
|
+
const { path, template } = options;
|
|
13
|
+
const relativePath = (0, node_path_1.relative)(process.cwd(), path);
|
|
14
|
+
if (!(0, node_fs_1.existsSync)(path)) {
|
|
15
|
+
console.log(` + ${relativePath} (created)`);
|
|
16
|
+
(0, node_fs_1.writeFileSync)(path, template, 'utf8');
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// File exists - check if it matches template
|
|
20
|
+
const existingContent = (0, node_fs_1.readFileSync)(path, 'utf8');
|
|
21
|
+
if (existingContent === template) {
|
|
22
|
+
console.log(` ✓ ${relativePath} (unchanged)`);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
console.log(` ↻ ${relativePath} (preserved with custom changes)`);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.findsertFile = findsertFile;
|
|
29
|
+
//# sourceMappingURL=findsertFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findsertFile.js","sourceRoot":"","sources":["../../../../src/logic/invoke/link/findsertFile.ts"],"names":[],"mappings":";;;AAAA,qCAAkE;AAClE,yCAAqC;AAErC;;;;GAIG;AACI,MAAM,YAAY,GAAG,CAAC,OAG5B,EAAQ,EAAE;IACT,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IACnC,MAAM,YAAY,GAAG,IAAA,oBAAQ,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;IAEnD,IAAI,CAAC,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,OAAO,YAAY,YAAY,CAAC,CAAC;QAC7C,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;QACjC,OAAO,CAAC,GAAG,CAAC,OAAO,YAAY,cAAc,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,OAAO,YAAY,kCAAkC,CAAC,CAAC;IACrE,CAAC;AACH,CAAC,CAAC;AApBW,QAAA,YAAY,gBAoBvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .what = creates symlinks for resource directories to a target directory
|
|
3
|
+
* .why = enables role resources (briefs, skills, etc.) to be linked from node_modules or other sources
|
|
4
|
+
* .how = creates symlinks for entire directories, returns count of leaf files
|
|
5
|
+
*/
|
|
6
|
+
export declare const symlinkResourceDirectories: (options: {
|
|
7
|
+
sourceDirs: Array<{
|
|
8
|
+
uri: string;
|
|
9
|
+
}>;
|
|
10
|
+
targetDir: string;
|
|
11
|
+
resourceName: string;
|
|
12
|
+
}) => number;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.symlinkResourceDirectories = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
/**
|
|
7
|
+
* .what = recursively counts all leaf files in a directory
|
|
8
|
+
* .why = to provide accurate file counts when linking directories
|
|
9
|
+
*/
|
|
10
|
+
const countFilesInDirectory = (dirPath) => {
|
|
11
|
+
let count = 0;
|
|
12
|
+
const entries = (0, node_fs_1.readdirSync)(dirPath);
|
|
13
|
+
for (const entry of entries) {
|
|
14
|
+
const fullPath = (0, node_path_1.resolve)(dirPath, entry);
|
|
15
|
+
const stats = (0, node_fs_1.statSync)(fullPath);
|
|
16
|
+
if (stats.isDirectory()) {
|
|
17
|
+
count += countFilesInDirectory(fullPath);
|
|
18
|
+
}
|
|
19
|
+
else if (stats.isFile()) {
|
|
20
|
+
count++;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return count;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* .what = creates symlinks for resource directories to a target directory
|
|
27
|
+
* .why = enables role resources (briefs, skills, etc.) to be linked from node_modules or other sources
|
|
28
|
+
* .how = creates symlinks for entire directories, returns count of leaf files
|
|
29
|
+
*/
|
|
30
|
+
const symlinkResourceDirectories = (options) => {
|
|
31
|
+
const { sourceDirs, targetDir, resourceName } = options;
|
|
32
|
+
if (sourceDirs.length === 0) {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
let totalFileCount = 0;
|
|
36
|
+
for (const sourceDir of sourceDirs) {
|
|
37
|
+
const sourcePath = (0, node_path_1.resolve)(process.cwd(), sourceDir.uri);
|
|
38
|
+
if (!(0, node_fs_1.existsSync)(sourcePath)) {
|
|
39
|
+
continue; // Skip if source doesn't exist
|
|
40
|
+
}
|
|
41
|
+
// Create target directory parent if needed
|
|
42
|
+
(0, node_fs_1.mkdirSync)(targetDir, { recursive: true });
|
|
43
|
+
// Create a unique target path for this source directory
|
|
44
|
+
// Use the basename of the source directory to avoid conflicts
|
|
45
|
+
const targetPath = (0, node_path_1.resolve)(targetDir, (0, node_path_1.basename)(sourcePath));
|
|
46
|
+
// Remove existing symlink/file if it exists
|
|
47
|
+
const relativeTargetPath = (0, node_path_1.relative)(process.cwd(), targetPath);
|
|
48
|
+
if ((0, node_fs_1.existsSync)(targetPath)) {
|
|
49
|
+
try {
|
|
50
|
+
(0, node_fs_1.unlinkSync)(targetPath);
|
|
51
|
+
console.log(` ↻ ${relativeTargetPath} (updated)`);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
(0, node_fs_1.rmSync)(targetPath, { recursive: true, force: true });
|
|
55
|
+
console.log(` ↻ ${relativeTargetPath} (updated)`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
console.log(` + ${relativeTargetPath}`);
|
|
60
|
+
}
|
|
61
|
+
// Create relative symlink from target directory to source directory
|
|
62
|
+
const relativeSource = (0, node_path_1.relative)(targetDir, sourcePath);
|
|
63
|
+
try {
|
|
64
|
+
(0, node_fs_1.symlinkSync)(relativeSource, targetPath, 'dir');
|
|
65
|
+
// Count the files in the source directory
|
|
66
|
+
const fileCount = countFilesInDirectory(sourcePath);
|
|
67
|
+
totalFileCount += fileCount;
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
if (error.code === 'EEXIST') {
|
|
71
|
+
console.log(` ⚠️ ${relativeTargetPath} already exists (skipped)`);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return totalFileCount;
|
|
79
|
+
};
|
|
80
|
+
exports.symlinkResourceDirectories = symlinkResourceDirectories;
|
|
81
|
+
//# sourceMappingURL=symlinkResourceDirectories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symlinkResourceDirectories.js","sourceRoot":"","sources":["../../../../src/logic/invoke/link/symlin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CAAC;gBACN,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AA3DW,QAAA,0BAA0B,8BA2DrC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RoleRegistry } from '../../domain/objects';
|
|
2
|
-
import { InvokeOpts } from '../../domain/objects/InvokeOpts';
|
|
1
|
+
import type { RoleRegistry } from '../../domain/objects';
|
|
2
|
+
import type { InvokeOpts } from '../../domain/objects/InvokeOpts';
|
|
3
3
|
/**
|
|
4
4
|
* .what = perform a skill within the current thread
|
|
5
5
|
* .why =
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UniDateTimeRange, UniDuration } from '@ehmpathy/uni-time';
|
|
2
|
-
import { InvokeOpts } from '../../domain/objects/InvokeOpts';
|
|
1
|
+
import { type UniDateTimeRange, type UniDuration } from '@ehmpathy/uni-time';
|
|
2
|
+
import type { InvokeOpts } from '../../domain/objects/InvokeOpts';
|
|
3
3
|
/**
|
|
4
4
|
* .what = perform a single skill execution in an isolated child thread (subprocess)
|
|
5
5
|
* .why =
|
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.performInIsolatedThread = exports.invokePerformInIsolatedThread = void 0;
|
|
7
|
-
const uni_time_1 = require("@ehmpathy/uni-time");
|
|
8
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
-
const helpful_errors_1 = require("helpful-errors");
|
|
10
7
|
const node_child_process_1 = require("node:child_process");
|
|
11
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
12
9
|
const node_readline_1 = __importDefault(require("node:readline"));
|
|
10
|
+
const uni_time_1 = require("@ehmpathy/uni-time");
|
|
11
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
12
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
13
13
|
const serde_fns_1 = require("serde-fns");
|
|
14
14
|
/**
|
|
15
15
|
* .what = gets the standard output prefix for this attempt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"performInIsolatedThread.invoke.js","sourceRoot":"","sources":["../../../src/logic/invoke/performInIsolatedThread.invoke.ts"],"names":[],"mappings":";;;;;;AAAA,iDAK4B;AAC5B,kDAA0B;AAC1B,mDAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"performInIsolatedThread.invoke.js","sourceRoot":"","sources":["../../../src/logic/invoke/performInIsolatedThread.invoke.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA2C;AAC3C,0DAA6B;AAC7B,kEAAqC;AACrC,iDAK4B;AAC5B,kDAA0B;AAC1B,mDAAyD;AACzD,yCAA4E;AAI5E;;;;GAIG;AACH,MAAM,sBAAsB,GAAG,CAAC,KAAyC,EAAE,EAAE;IAC3E,MAAM,OAAO,GAAG;QACd,eAAK,CAAC,IAAI;QACV,eAAK,CAAC,KAAK;QACX,eAAK,CAAC,OAAO;QACb,eAAK,CAAC,MAAM;QACZ,eAAK,CAAC,IAAI;QACV,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,eAAe;QACrC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,cAAc;QACpC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,gBAAgB;QACtC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,cAAc;QACpC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,cAAc;QACpC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,cAAc;KACrC,CAAC;IACF,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAE,CAAC;IAC7D,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IACxC,M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AAC,CAAC;AA3EW,QAAA,6BAA6B,iCA2ExC;AAGwC,kCA9E7B,qCAA6B,CA8EuB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Artifact } from 'rhachet-artifact';
|
|
2
|
-
import { GitFile } from 'rhachet-artifact-git';
|
|
3
|
-
import { PickAny } from 'type-fns';
|
|
4
|
-
import { Thread } from '../../domain/objects';
|
|
5
|
-
import { RoleContext, RoleContextTrait } from '../../domain/objects/RoleContext';
|
|
1
|
+
import type { Artifact } from 'rhachet-artifact';
|
|
2
|
+
import type { GitFile } from 'rhachet-artifact-git';
|
|
3
|
+
import type { PickAny } from 'type-fns';
|
|
4
|
+
import type { Thread } from '../../domain/objects';
|
|
5
|
+
import type { RoleContext, RoleContextTrait } from '../../domain/objects/RoleContext';
|
|
6
6
|
/**
|
|
7
7
|
* .what = injects new RoleTrait(s) into a thread's context
|
|
8
8
|
* .why = enables dynamic role adaptation from inline traits or artifact sources
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Artifact } from 'rhachet-artifact';
|
|
2
|
-
import { GitFile } from 'rhachet-artifact-git';
|
|
3
|
-
import { Thread } from '../../domain/objects';
|
|
4
|
-
import { RoleContext } from '../../domain/objects/RoleContext';
|
|
1
|
+
import type { Artifact } from 'rhachet-artifact';
|
|
2
|
+
import type { GitFile } from 'rhachet-artifact-git';
|
|
3
|
+
import type { Thread } from '../../domain/objects';
|
|
4
|
+
import type { RoleContext } from '../../domain/objects/RoleContext';
|
|
5
5
|
/**
|
|
6
6
|
* .what = creates a thread for a given role, with optional inherited traits and skills
|
|
7
7
|
* .why = eliminates boilerplate around thread setup, including `as const`, trait/skill injection, and context composition
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GStitcher,
|
|
1
|
+
import { type GStitcher, RoleSkill, type RoleSkillContextGetter, type RoleSkillThreadsGetter, type Stitcher } from '../../domain/objects';
|
|
2
2
|
/**
|
|
3
3
|
* .what = factory for role skills
|
|
4
4
|
* .why = ensures narrow type coupling between getter inputs
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { type GStitcher } from '../../domain/objects/Stitcher';
|
|
1
2
|
import { StitchSetEvent } from '../../domain/objects/StitchSetEvent';
|
|
2
|
-
import { StitchStep } from '../../domain/objects/StitchStep';
|
|
3
|
-
import { GStitcher } from '../../domain/objects/Stitcher';
|
|
3
|
+
import type { StitchStep } from '../../domain/objects/StitchStep';
|
|
4
4
|
import { Thread } from '../../domain/objects/Thread';
|
|
5
|
-
import { Threads } from '../../domain/objects/Threads';
|
|
5
|
+
import type { Threads } from '../../domain/objects/Threads';
|
|
6
6
|
/**
|
|
7
7
|
* .what = extracts the base thread to stitch into
|
|
8
8
|
* .why = handles both single and multiple thread formats
|
|
@@ -5,9 +5,9 @@ const uni_time_1 = require("@ehmpathy/uni-time");
|
|
|
5
5
|
const helpful_errors_1 = require("helpful-errors");
|
|
6
6
|
const uuid_fns_1 = require("uuid-fns");
|
|
7
7
|
const Stitch_1 = require("../../domain/objects/Stitch");
|
|
8
|
+
const Stitcher_1 = require("../../domain/objects/Stitcher");
|
|
8
9
|
const StitchSetEvent_1 = require("../../domain/objects/StitchSetEvent");
|
|
9
10
|
const StitchTrail_1 = require("../../domain/objects/StitchTrail");
|
|
10
|
-
const Stitcher_1 = require("../../domain/objects/Stitcher");
|
|
11
11
|
const Thread_1 = require("../../domain/objects/Thread");
|
|
12
12
|
const invokeImagineStitcher_1 = require("./invokeImagineStitcher");
|
|
13
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enstitch.js","sourceRoot":"","sources":["../../../src/logic/stitch/enstitch.ts"],"names":[],"mappings":";;;AAAA,iDAAmD;AACnD,mDAAyD;AACzD,uCAAmC;AAEnC,wDAAqD;AACrD,wEAAqE;AAErE,kEAG0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"enstitch.js","sourceRoot":"","sources":["../../../src/logic/stitch/enstitch.ts"],"names":[],"mappings":";;;AAAA,iDA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AAG,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,2BAA2B;KAC5E,CAAC,CAAC;IAEH,uFAAuF;IACvF,MAAM,KAAK,GAAG,+BAAc,CAAC,KAAK,CAEhC;QACA,UAAU,EAAE,IAAA,wBAAa,EAAC,IAAI,IAAI,EAAE,CAAC;QACrC,MAAM;QACN,OAAO,EAAE,IAAA,2BAAmB,EAAC;YAC3B,GAAG,KAAK,CAAC,OAAO;YAChB,CAAC,WAAW,CAAC,EAAE,aAAa;SAC7B,CAAC;KACH,CAAC,CAAC;IAEH,oDAAoD;IACpD,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM;QAAE,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAEnE,mBAAmB;IACnB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AA1FW,QAAA,QAAQ,YA0FnB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Stitch } from '../../domain/objects/Stitch';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Stitch } from '../../domain/objects/Stitch';
|
|
2
|
+
import type { GStitcher } from '../../domain/objects/Stitcher';
|
|
3
|
+
import type { StitchStepImagine } from '../../domain/objects/StitchStep';
|
|
4
4
|
/**
|
|
5
5
|
* .what = invokes the imagine stitcher by invocation of stitcher mechanisms
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Procedure } from 'as-procedure';
|
|
2
|
-
import { StitchSetEvent } from '../../domain/objects';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { Procedure } from 'as-procedure';
|
|
2
|
+
import type { StitchSetEvent } from '../../domain/objects';
|
|
3
|
+
import { type Stitcher } from '../../domain/objects/Stitcher';
|
|
4
|
+
import { type StitchTrail } from '../../domain/objects/StitchTrail';
|
|
5
5
|
export interface ContextStitchTrail {
|
|
6
6
|
stitch: {
|
|
7
7
|
/**
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.withStitchTrail = exports.isStitcher = void 0;
|
|
4
4
|
const type_fns_1 = require("type-fns");
|
|
5
5
|
const uuid_fns_1 = require("uuid-fns");
|
|
6
|
-
const StitchTrail_1 = require("../../domain/objects/StitchTrail");
|
|
7
6
|
const Stitcher_1 = require("../../domain/objects/Stitcher");
|
|
7
|
+
const StitchTrail_1 = require("../../domain/objects/StitchTrail");
|
|
8
8
|
exports.isStitcher = (0, type_fns_1.withAssure)((input) => !!input &&
|
|
9
9
|
'form' in input &&
|
|
10
10
|
'slug' in input &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withStitchTrail.js","sourceRoot":"","sources":["../../../src/logic/stitch/withStitchTrail.ts"],"names":[],"mappings":";;;AAMA,uCAAsC;AACtC,uCAAmC;AAGnC,
|
|
1
|
+
{"version":3,"file":"withStitchTrail.js","sourceRoot":"","sources":["../../../src/logic/stitch/withStitchTrail.ts"],"names":[],"mappings":";;;AAMA,uCAAsC;AACtC,uCAAmC;AAGnC,4DAAgF;AAChF,kEAG0C;AAkB7B,QAAA,UAAU,GAAG,IAAA,qBAAU,EAClC,CAAC,KAAU,EAAqB,EAAE,CAChC,CAAC,CAAC,KAAK;IACP,MAAM,IAAI,KAAK;IACf,MAAM,IAAI,KAAK;IACf,IAAA,2BAAgB,EAAC,KAAK,CAAC,IAAI,CAAC,CAC/B,CAAC;AAEF;;;;;GAKG;AACI,MAAM,eAAe,GAAG,CAC7B,KAAa,EACC,EAAE;IAChB,OAAO,CAAC,KAAK,EACX,KAAmC,EACnC,OAAuC,EACC,EAAE;QAC1C,0EAA0E;QAC1E,MAAM,QAAQ,GAAG,kBAAU,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEnD,yDAAyD;QACzD,MAAM,iBAAiB,GAAG,+BAAiB,CAAC,KAAK,CAAC;YAChD,YAAY,EAAE,QAAQ,CAAC,IAAI;YAC3B,UAAU,EAAE,IAAA,kBAAO,GAAE,EAAE,8CAA8C;SACtE,CAAC,CAAC;QACH,MAAM,qBAAqB,GAAuB;YAChD,MAAM,EAAE;gBACN,KAAK,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,iBAAiB,CAAC,EAAE,0BAA0B;gBACvF,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,wCAAwC;aACxE;SACF,CAAC;QAEF,mEAAmE;QACnE,OAAO,MAAM,KAAK,CAAC,KAAK,EAAE;YACxB,GAAG,OAAO;YACV,GAAG,qBAAqB;SACzB,CAAC,CAAC;IACL,CAAC,CAAiB,CAAC;AACrB,CAAC,CAAC;AA5BW,QAAA,eAAe,mBA4B1B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GStitcher, StitchStepImagine } from '../../domain/objects';
|
|
2
|
-
import { Template } from '../../domain/objects/Template';
|
|
1
|
+
import { type GStitcher, StitchStepImagine } from '../../domain/objects';
|
|
2
|
+
import type { Template } from '../../domain/objects/Template';
|
|
3
3
|
/**
|
|
4
4
|
* .what = creates a typed StitchStepImagine from a prompt template and AI imagine function
|
|
5
5
|
* .why = enables reusable, type-safe imagine steps with minimal boilerplate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genStepImagineViaTemplate.js","sourceRoot":"","sources":["../../../src/logic/template/genStepImagineViaTemplate.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"genStepImagineViaTemplate.js","sourceRoot":"","sources":["../../../src/logic/template/genStepImagineViaTemplate.ts"],"names":[],"mappings":";;;AAAA,kDAAyE;AAGzE;;;GAGG;AACI,MAAM,yBAAyB,GAAG,CAEvC,KAUD,EAAgC,EAAE,CACjC,IAAI,2BAAiB,CAAY;IAC/B,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,MAAM,EAAE,KAAK,CAAC,MAAM;IACpB,QAAQ,EAAE,KAAK,CAAC,QAAkB;IAClC,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC;IAChE,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CACpC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,IAAI;QAC1D,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC3B,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAyB;KACtD;CACJ,CAAC,CAAC;AAzBQ,QAAA,yBAAyB,6BAyBjC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Serializable } from 'serde-fns';
|
|
2
|
-
import { Threads } from '../../domain/objects';
|
|
3
|
-
import { Template } from '../../domain/objects/Template';
|
|
1
|
+
import type { Serializable } from 'serde-fns';
|
|
2
|
+
import type { Threads } from '../../domain/objects';
|
|
3
|
+
import type { Template } from '../../domain/objects/Template';
|
|
4
4
|
/**
|
|
5
5
|
* .what = creates a Template that hydrates from a thread context
|
|
6
6
|
* .why = enables loading + variable projection in one step
|
|
@@ -38,8 +38,8 @@ exports.getCallerFilePath = getCallerFilePath;
|
|
|
38
38
|
const getTemplatePathByCallerPath = (input) => {
|
|
39
39
|
// grab the path; support "auto" for auto detection
|
|
40
40
|
const path = input.auto === true
|
|
41
|
-
? (0, exports.getCallerFilePath)({ depth: 2 }) ??
|
|
42
|
-
helpful_errors_1.UnexpectedCodePathError.throw('should have been able to get caller file path')
|
|
41
|
+
? ((0, exports.getCallerFilePath)({ depth: 2 }) ??
|
|
42
|
+
helpful_errors_1.UnexpectedCodePathError.throw('should have been able to get caller file path'))
|
|
43
43
|
: input.path;
|
|
44
44
|
// parse dir, name, and ext separately
|
|
45
45
|
const { dir, name } = path_1.default.parse(path);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTemplatePathByCallerPath.js","sourceRoot":"","sources":["../../../src/logic/template/getTemplatePathByCallerPath.ts"],"names":[],"mappings":";;;;;;AAAA,mDAAyD;AACzD,gDAA2B;AAG3B;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,CAC/B,QAMI,EAAE,KAAK,EAAE,CAAC,EAAE,EACD,EAAE;IACjB,MAAM,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAChD,IAAI,CAAC;QACH,KAAK,CAAC,iBAAiB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC;QAC9C,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAqC,CAAC;QAExD,yDAAyD;QACzD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,2FAA2F;QAC9H,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QAC5C,OAAO,cAAc,CAAC,CAAC,CAAC,cAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACjE,CAAC;YAAS,CAAC;QACT,KAAK,CAAC,iBAAiB,GAAG,eAAe,CAAC;IAC5C,CAAC;AACH,CAAC,CAAC;AAvBW,QAAA,iBAAiB,qBAuB5B;AAEF;;;;;GAKG;AACI,MAAM,2BAA2B,GAAG,CACzC,KAUE,EACM,EAAE;IACV,mDAAmD;IACnD,MAAM,IAAI,GACR,KAAK,CAAC,IAAI,KAAK,IAAI;QACjB,CAAC,CAAC,IAAA,yBAAiB,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"getTemplatePathByCallerPath.js","sourceRoot":"","sources":["../../../src/logic/template/getTemplatePathByCallerPath.ts"],"names":[],"mappings":";;;;;;AAAA,mDAAyD;AACzD,gDAA2B;AAG3B;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,CAC/B,QAMI,EAAE,KAAK,EAAE,CAAC,EAAE,EACD,EAAE;IACjB,MAAM,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAChD,IAAI,CAAC;QACH,KAAK,CAAC,iBAAiB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC;QAC9C,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAqC,CAAC;QAExD,yDAAyD;QACzD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,2FAA2F;QAC9H,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QAC5C,OAAO,cAAc,CAAC,CAAC,CAAC,cAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACjE,CAAC;YAAS,CAAC;QACT,KAAK,CAAC,iBAAiB,GAAG,eAAe,CAAC;IAC5C,CAAC;AACH,CAAC,CAAC;AAvBW,QAAA,iBAAiB,qBAuB5B;AAEF;;;;;GAKG;AACI,MAAM,2BAA2B,GAAG,CACzC,KAUE,EACM,EAAE;IACV,mDAAmD;IACnD,MAAM,IAAI,GACR,KAAK,CAAC,IAAI,KAAK,IAAI;QACjB,CAAC,CAAC,CAAC,IAAA,yBAAiB,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YAChC,wCAAuB,CAAC,KAAK,CAC3B,+CAA+C,CAChD,CAAC;QACJ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;IAEjB,sCAAsC;IACtC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,cAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE1C,yCAAyC;IACzC,OAAO,cAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,cAAc,CAAC,CAAC;AAClD,CAAC,CAAC;AA3BW,QAAA,2BAA2B,+BA2BtC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Artifact } from 'rhachet-artifact';
|
|
2
|
-
import { GitFile } from 'rhachet-artifact-git';
|
|
1
|
+
import type { Artifact } from 'rhachet-artifact';
|
|
2
|
+
import { type GitFile } from 'rhachet-artifact-git';
|
|
3
3
|
/**
|
|
4
4
|
* .what = reads the artifacts given and returns a string for use in a template val
|
|
5
5
|
* .why = makes it easy to execute this common usecase
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTemplateValFromArtifacts.js","sourceRoot":"","sources":["../../../src/logic/template/getTemplateValFromArtifacts.ts"],"names":[],"mappings":";;;AAAA,mDAAyD;AAEzD,+
|
|
1
|
+
{"version":3,"file":"getTemplateValFromArtifacts.js","sourceRoot":"","sources":["../../../src/logic/template/getTemplateValFromArtifacts.ts"],"names":[],"mappings":";;;AAAA,mDAAyD;AAEzD,+DAAoE;AAEpE;;;GAGG;AACI,MAAM,2BAA2B,GAAG,KAAK,EAAE,KAEjD,EAAmB,EAAE;IACpB,MAAM,IAAI,GAAG,MAAM,IAAA,qCAAc,EAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAE3D,OAAO,CACL,MAAM,OAAO,CAAC,GAAG,CACf,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,OAAO,GACX,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,OAAO;YAC1B,wCAAuB,CAAC,KAAK,CAAC,yBAAyB,EAAE;gBACvD,GAAG;aACJ,CAAC,CAAC;QACL,OAAO;YACL,EAAE;YACF,WAAW;YACX,UAAU,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE;YACjD,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,qBAAqB;YAC1E,SAAS;SACV,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC,CAAC,CACH,CACF,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjB,CAAC,CAAC;AAvBW,QAAA,2BAA2B,+BAuBtC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Serializable } from 'serde-fns';
|
|
2
|
-
import { Template } from '../../domain/objects/Template';
|
|
1
|
+
import type { Serializable } from 'serde-fns';
|
|
2
|
+
import type { Template } from '../../domain/objects/Template';
|
|
3
3
|
/**
|
|
4
4
|
* .what = hydrates a template file with given variables
|
|
5
5
|
* .why = reusable interpolation engine for Template<T>.use(...)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
-
import { ProcedureContextMerged, ProcedureContextSpread } from './ProcedureContextMerged.generic';
|
|
3
|
-
import { ThreadsMerged, ThreadsSpread } from './ThreadsMerged.generic';
|
|
1
|
+
import type { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
+
import type { ProcedureContextMerged, ProcedureContextSpread } from './ProcedureContextMerged.generic';
|
|
3
|
+
import type { ThreadsMerged, ThreadsSpread } from './ThreadsMerged.generic';
|
|
4
4
|
/**
|
|
5
5
|
* .what = infers a composite GStitcher from a StitchChoice config
|
|
6
6
|
* .how =
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GStitcher, GStitcherOf, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
-
import { Threads } from '../../../domain/objects/Threads';
|
|
3
|
-
import { ProcedureContextMerged } from './ProcedureContextMerged.generic';
|
|
4
|
-
import { ThreadsMerged } from './ThreadsMerged.generic';
|
|
1
|
+
import type { GStitcher, GStitcherOf, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
+
import type { Threads } from '../../../domain/objects/Threads';
|
|
3
|
+
import type { ProcedureContextMerged } from './ProcedureContextMerged.generic';
|
|
4
|
+
import type { ThreadsMerged } from './ThreadsMerged.generic';
|
|
5
5
|
/**
|
|
6
6
|
* .what = infers a composite GStitcher from a StitchCycle config
|
|
7
7
|
* .how =
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { GStitcherInferredFromRoute } from './GStitcherInferredFromRoute.generic';
|
|
5
|
-
import { ProcedureContextMerged, ProcedureContextSpread } from './ProcedureContextMerged.generic';
|
|
6
|
-
import { ThreadsMerged } from './ThreadsMerged.generic';
|
|
1
|
+
import type { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
+
import type { ThreadsFromFanout } from '../../../domain/objects/StitchFanout';
|
|
3
|
+
import type { StitchStep } from '../../../domain/objects/StitchStep';
|
|
4
|
+
import type { GStitcherInferredFromRoute } from './GStitcherInferredFromRoute.generic';
|
|
5
|
+
import type { ProcedureContextMerged, ProcedureContextSpread } from './ProcedureContextMerged.generic';
|
|
6
|
+
import type { ThreadsMerged } from './ThreadsMerged.generic';
|
|
7
7
|
/**
|
|
8
8
|
* .what = a mech to infer a GStitcher from a StitchFanout setup
|
|
9
9
|
* - i.e., infers the composite stitcher for StitchFanout
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
-
import { Threads } from '../../../domain/objects/Threads';
|
|
3
|
-
import { ProcedureContextMerged } from './ProcedureContextMerged.generic';
|
|
4
|
-
import { ThreadsMerged } from './ThreadsMerged.generic';
|
|
1
|
+
import type { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
+
import type { Threads } from '../../../domain/objects/Threads';
|
|
3
|
+
import type { ProcedureContextMerged } from './ProcedureContextMerged.generic';
|
|
4
|
+
import type { ThreadsMerged } from './ThreadsMerged.generic';
|
|
5
5
|
type Last<T extends readonly any[]> = T extends readonly [...any[], infer L] ? L : never;
|
|
6
6
|
/**
|
|
7
7
|
* .what = a mech to infer a GStitcher from a StitchRoute.Sequence
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
1
|
+
import type { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
2
|
/**
|
|
3
3
|
* .what = transforms a union into an intersection of its members
|
|
4
4
|
* .why = needed to merge multiple object types into one composite type (e.g. { foo } | { bar } → { foo } & { bar })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Empty } from 'type-fns';
|
|
2
|
-
import { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
3
|
-
import { Thread } from '../../../domain/objects/Thread';
|
|
4
|
-
import { Threads } from '../../../domain/objects/Threads';
|
|
1
|
+
import type { Empty } from 'type-fns';
|
|
2
|
+
import type { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
3
|
+
import type { Thread } from '../../../domain/objects/Thread';
|
|
4
|
+
import type { Threads } from '../../../domain/objects/Threads';
|
|
5
5
|
/**
|
|
6
6
|
* .what = extracts the context (excluding `role`) from a Thread
|
|
7
7
|
* .why = isolates the business-relevant part of a thread's context
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Threads } from '../../../domain/objects/Threads';
|
|
1
|
+
import type { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
+
import type { Threads } from '../../../domain/objects/Threads';
|
|
3
3
|
/**
|
|
4
4
|
* .what = applies a standardized type wrapper around a stitcher to enforce single-thread compatibility
|
|
5
5
|
* .note
|
|
@@ -9,4 +9,4 @@ import { Threads } from '../../../domain/objects/Threads';
|
|
|
9
9
|
* - without this, they're not composable, due to typescript(generic invariance on classes cause)
|
|
10
10
|
* - infers the type deeply
|
|
11
11
|
*/
|
|
12
|
-
export declare const asStitcher: <T extends Stitcher<GStitcher<any, any, any>>>(input: T) => T extends Stitcher<GStitcher<infer TThreads extends Threads<any, any>, infer TContext extends import("
|
|
12
|
+
export declare const asStitcher: <T extends Stitcher<GStitcher<any, any, any>>>(input: T) => T extends Stitcher<GStitcher<infer TThreads extends Threads<any, any>, infer TContext extends import("as-procedure").ContextLogTrail & import("../../..").ContextStitchTrail, infer TOutput>> ? Stitcher<GStitcher<Threads<TThreads extends Threads<infer TContextDict extends Record<string, object>, any> ? TContextDict : never, "single">, TContext, TOutput>> : never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
-
import { Threads } from '../../../domain/objects/Threads';
|
|
1
|
+
import type { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
2
|
+
import type { Threads } from '../../../domain/objects/Threads';
|
|
3
3
|
/**
|
|
4
4
|
* .what = narrows a stitcher with deeply inferred or recursive types into a pre-flattened form
|
|
5
5
|
* .why =
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StitchChoice } from '../../../domain/objects/StitchChoice';
|
|
2
|
-
import { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
3
|
-
import { Threads } from '../../../domain/objects/Threads';
|
|
4
|
-
import { GStitcherInferredFromChoice } from './GStitcherInferredFromChoice.generic';
|
|
2
|
+
import type { GStitcher, Stitcher } from '../../../domain/objects/Stitcher';
|
|
3
|
+
import type { Threads } from '../../../domain/objects/Threads';
|
|
4
|
+
import type { GStitcherInferredFromChoice } from './GStitcherInferredFromChoice.generic';
|
|
5
5
|
/**
|
|
6
6
|
* .what = generates a stitcher that forks to multiple options and chooses one
|
|
7
7
|
* .why =
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { UniDuration } from '@ehmpathy/uni-time';
|
|
2
|
-
import { PickAny } from 'type-fns';
|
|
1
|
+
import type { UniDuration } from '@ehmpathy/uni-time';
|
|
2
|
+
import type { PickAny } from 'type-fns';
|
|
3
3
|
import { StitchCycle } from '../../../domain/objects/StitchCycle';
|
|
4
|
-
import { GStitcher, GStitcherFlat, Stitcher } from '../../../domain/objects/Stitcher';
|
|
5
|
-
import { Threads } from '../../../domain/objects/Threads';
|
|
6
|
-
import { GStitcherInferredFromCycle } from './GStitcherInferredFromCycle.generic';
|
|
4
|
+
import type { GStitcher, GStitcherFlat, Stitcher } from '../../../domain/objects/Stitcher';
|
|
5
|
+
import type { Threads } from '../../../domain/objects/Threads';
|
|
6
|
+
import type { GStitcherInferredFromCycle } from './GStitcherInferredFromCycle.generic';
|
|
7
7
|
/**
|
|
8
8
|
* .what = generates a stitcher that repeats a step until the decider returns 'release' or 'halt'
|
|
9
9
|
* .why =
|