@iowarp/clio-coder 0.5.1 → 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/.claude-plugin/marketplace.json +4 -4
- package/CHANGELOG.md +24 -0
- package/CONTRIBUTING.md +9 -0
- package/README.md +3 -3
- package/ROADMAP.md +30 -5
- package/dist/{acp-X3N7JDGS.js → acp-F6PGOFZ4.js} +2 -2
- package/dist/{agents-UYGSMAWR.js → agents-ZHP4R6EX.js} +22 -21
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-CEDCO6O6.js → auth-N75U2H3Z.js} +4 -4
- package/dist/{chunk-DGMY2DWE.js → chunk-23UIXH6Z.js} +3 -3
- package/dist/{chunk-QTYRMBW6.js → chunk-36XVK5P5.js} +5 -5
- package/dist/{chunk-BIQLF3NZ.js → chunk-3DZ4LPLS.js} +6 -6
- package/dist/{chunk-7VNLPEUG.js → chunk-3GSPCWFX.js} +12 -12
- package/dist/{chunk-CRHPCPZP.js → chunk-4KC4CHKJ.js} +2 -2
- package/dist/{chunk-M5FPIZQW.js → chunk-4WJBWKMI.js} +2 -2
- package/dist/{chunk-KBUTSJSR.js → chunk-4XBYHXGK.js} +2 -2
- package/dist/{chunk-6W75D37F.js → chunk-53P775GE.js} +6 -3
- package/dist/{chunk-XZWSP67B.js → chunk-5APYAXCB.js} +2 -2
- package/dist/{chunk-A7G7OUND.js → chunk-67HPYNTJ.js} +2 -2
- package/dist/{chunk-5JQR5B4D.js → chunk-6KV4KCQZ.js} +4 -4
- package/dist/{chunk-V4XJWDHR.js → chunk-6UKFRTXI.js} +2 -1
- package/dist/{chunk-NDPF2N2L.js → chunk-7DW7CJW2.js} +2 -2
- package/dist/{chunk-5KQEUIWM.js → chunk-7LUEQODV.js} +4 -4
- package/dist/{chunk-LNOXCGN2.js → chunk-7UFDIOBT.js} +3 -3
- package/dist/{chunk-DXSETN72.js → chunk-7WUGNN43.js} +2 -2
- package/dist/{chunk-GW2KVAVI.js → chunk-AA3GRZWS.js} +2 -2
- package/dist/{chunk-6B76U65H.js → chunk-ADO3OQIC.js} +3 -3
- package/dist/{chunk-UX2L5CUD.js → chunk-AI36V3ON.js} +3 -3
- package/dist/{chunk-B7GY6QER.js → chunk-B26OUMJW.js} +2 -2
- package/dist/{chunk-LAR7DX5E.js → chunk-B5TASTCK.js} +153 -62
- package/dist/{chunk-TGWZXJ7L.js → chunk-BEMQK5Q7.js} +92 -84
- package/dist/{chunk-RNDCROSG.js → chunk-CNXU7TR2.js} +3 -3
- package/dist/{chunk-AKQ3N3L4.js → chunk-CVMUXT64.js} +35 -66
- package/dist/{chunk-733ZBT5P.js → chunk-E74MJF6G.js} +4 -4
- package/dist/{chunk-T2MDZES3.js → chunk-EBMTBE76.js} +3 -3
- package/dist/{chunk-OZ76TLGU.js → chunk-EEITU7S6.js} +2 -2
- package/dist/{chunk-7KI4ZSEB.js → chunk-ELDJWJKM.js} +97 -14
- package/dist/{chunk-GCQFN7YI.js → chunk-EMYEQLWO.js} +2 -2
- package/dist/{chunk-7FHSA7VB.js → chunk-EQPFEDFV.js} +222 -127
- package/dist/{chunk-TDGYTWM6.js → chunk-F4I3H56H.js} +2 -2
- package/dist/chunk-F6KCJO3U.js +523 -0
- package/dist/{chunk-FGSQHUCK.js → chunk-F6VKWTTY.js} +5 -5
- package/dist/{chunk-UJD5MPP6.js → chunk-FLNXQQ5B.js} +2 -2
- package/dist/{chunk-GGEEG7CD.js → chunk-FOSRJ2VZ.js} +4 -4
- package/dist/{chunk-ZARZ4POR.js → chunk-G5ZDQQE3.js} +3 -3
- package/dist/{chunk-QM7HFPQQ.js → chunk-G62JBPXN.js} +7 -7
- package/dist/{chunk-ZJPORZTC.js → chunk-GIAI7A2K.js} +2 -2
- package/dist/chunk-GPTR6OTU.js +2551 -0
- package/dist/{chunk-EZD2BXGP.js → chunk-GUFQPTQK.js} +2 -2
- package/dist/{chunk-OPD7GL6F.js → chunk-H6FQVNZC.js} +8 -7
- package/dist/chunk-H7REJ7L5.js +80 -0
- package/dist/{chunk-EYTLV3W3.js → chunk-HTWTORF7.js} +2 -2
- package/dist/{chunk-DF6PI6GN.js → chunk-I6UKQPGS.js} +3 -3
- package/dist/{chunk-ISHUS7HC.js → chunk-JRW236JT.js} +3 -3
- package/dist/{chunk-DE2LU267.js → chunk-KKAJGT3B.js} +3 -2
- package/dist/{chunk-OV62D6KO.js → chunk-KQMYL5GR.js} +3 -3
- package/dist/{chunk-WAISUJNQ.js → chunk-KWMFC7FN.js} +3 -3
- package/dist/{chunk-4D7QM7S5.js → chunk-LXYHCCIZ.js} +9 -9
- package/dist/{chunk-NFSK2VNU.js → chunk-LZMTVVN4.js} +2 -2
- package/dist/{chunk-ZNTGRDFA.js → chunk-M5PMRZSR.js} +123 -37
- package/dist/chunk-MMZMM6SW.js +131 -0
- package/dist/{chunk-FFYTC2KQ.js → chunk-MNABNEBX.js} +2 -2
- package/dist/{chunk-XMDBTYCH.js → chunk-N3CWOGVF.js} +3 -3
- package/dist/{chunk-VYRQHORQ.js → chunk-NMQSO6Z6.js} +4 -3
- package/dist/{chunk-4SYHGVDE.js → chunk-OQNCLZI4.js} +4 -4
- package/dist/{chunk-EG4ARXPC.js → chunk-OX6QTA4N.js} +3 -3
- package/dist/{chunk-P4GNZPXO.js → chunk-OYUS3UZP.js} +2 -2
- package/dist/{chunk-VWKR2NN5.js → chunk-PF36KOGI.js} +290 -111
- package/dist/{chunk-LFYA3HYH.js → chunk-PIU6BXXW.js} +2 -2
- package/dist/{chunk-EKV4UBCM.js → chunk-PZBQUJ2F.js} +2 -2
- package/dist/{chunk-7RET77VB.js → chunk-Q2HKY32Y.js} +2 -2
- package/dist/{chunk-VMTCZ2GR.js → chunk-Q4RMNWMZ.js} +4 -4
- package/dist/chunk-Q6FRR3AQ.js +48 -0
- package/dist/{chunk-6RJMYYIE.js → chunk-QJSIAJBY.js} +3 -3
- package/dist/{chunk-DOUISWEE.js → chunk-QOJ4ERMU.js} +5 -5
- package/dist/{chunk-IFPDAD7R.js → chunk-RWSRKXLT.js} +3 -3
- package/dist/{chunk-T33IYTZM.js → chunk-SAASVMIY.js} +3 -3
- package/dist/{chunk-2DTIWSAW.js → chunk-SEQDH6JC.js} +3 -3
- package/dist/{chunk-BRCOSE7O.js → chunk-SZUO5BSE.js} +2 -2
- package/dist/{chunk-HOEDA42N.js → chunk-T7HZ7KJF.js} +2 -2
- package/dist/{chunk-UCINIRHW.js → chunk-TPCZXWLT.js} +3 -3
- package/dist/{chunk-ZUKUCZYZ.js → chunk-TQ2KTH4A.js} +2 -2
- package/dist/{chunk-4WOOTKFD.js → chunk-U3FETNQB.js} +341 -20
- package/dist/{chunk-5B3RTYAK.js → chunk-UGDSB4AN.js} +2 -2
- package/dist/{chunk-VKHLUZNO.js → chunk-UZ7YBL43.js} +3 -3
- package/dist/{chunk-OXWRE2QJ.js → chunk-VKMSEO7Y.js} +4 -4
- package/dist/{chunk-FBXTHPNZ.js → chunk-VLX5VZ35.js} +5 -5
- package/dist/{chunk-KIAUZGKF.js → chunk-WAGBMMNX.js} +5 -5
- package/dist/{chunk-BFOSV5EZ.js → chunk-WX2YCH7F.js} +2 -2
- package/dist/{chunk-SAL2SBP4.js → chunk-XBIGUILU.js} +25 -10
- package/dist/{chunk-XOH3SD7H.js → chunk-XKYBFRWR.js} +5 -5
- package/dist/{chunk-U5QU5ZOD.js → chunk-XYPWFSU5.js} +3 -3
- package/dist/{chunk-YBUECLAF.js → chunk-YEJQDODA.js} +2 -2
- package/dist/{chunk-YQ6XEFVK.js → chunk-Z74OGONW.js} +39 -7
- package/dist/{chunk-I4ELN5BX.js → chunk-ZTNOEJRI.js} +2 -2
- package/dist/cli/index.js +25 -25
- package/dist/{clio-Z3JTEL2I.js → clio-4IKFE25F.js} +2 -2
- package/dist/{clio-context-tools-GR4OHFSO.js → clio-context-tools-OHJXYX4R.js} +25 -23
- package/dist/{code-nav-4X3OI6DK.js → code-nav-XPM3MY5I.js} +7 -7
- package/dist/{config-QYIRZHI7.js → config-343YS25T.js} +42 -40
- package/dist/{config-graph-TS3SGGQW.js → config-graph-WI263KDX.js} +42 -40
- package/dist/{configure-OX7KVJTQ.js → configure-GZDG4HER.js} +21 -21
- package/dist/{context-2BNF6HTP.js → context-4OFO7N7Y.js} +12 -12
- package/dist/{context-GTMUGAR4.js → context-JLK2RLOG.js} +41 -39
- package/dist/{context-NNLBES2Y.js → context-O6DIWCF6.js} +23 -21
- package/dist/{context-clear-FVJQBBL7.js → context-clear-MR7KOGQI.js} +41 -39
- package/dist/{context-working-set-MOE72SD6.js → context-working-set-YZAD3KWO.js} +14 -13
- package/dist/{data-tool-JJPBGMQJ.js → data-tool-EKD7DFHG.js} +7 -7
- package/dist/{detail-QZM3QAAU.js → detail-YZPHFEVJ.js} +42 -40
- package/dist/{dispatch-runner-2KSQO5FU.js → dispatch-runner-VKVXVTWJ.js} +43 -41
- package/dist/{doctor-2U6YR5NH.js → doctor-53AVQXAO.js} +16 -15
- package/dist/{doctor-deep-2EJQSHIZ.js → doctor-deep-BLRB2NCG.js} +5 -5
- package/dist/{eval-ZKK77JWZ.js → eval-P3BQSLQE.js} +21 -20
- package/dist/{evidence-POSEQW4Q.js → evidence-6LLI6SZH.js} +43 -41
- package/dist/{evidence-FMP7KZZ2.js → evidence-HTN3JLUO.js} +41 -39
- package/dist/{evidence-PJTOE7JA.js → evidence-NJRE3R5H.js} +41 -39
- package/dist/{evolve-JT6PAMZE.js → evolve-WWZHJVJP.js} +41 -39
- package/dist/{fleet-4XR2ZEOF.js → fleet-GGZ4BVJE.js} +63 -61
- package/dist/{fleet-6JJKNIMV.js → fleet-QG3IIWWM.js} +43 -41
- package/dist/{fleet-commands-L6WFT7KZ.js → fleet-commands-J2ZIKISQ.js} +7 -7
- package/dist/{fleet-decisions-BTQMWU5A.js → fleet-decisions-Y2Q7375Q.js} +8 -8
- package/dist/{fleet-graph-553DZ67Q.js → fleet-graph-TCBCCCBP.js} +11 -11
- package/dist/{fleet-inspect-SWJMFVDP.js → fleet-inspect-KOLKBC56.js} +43 -41
- package/dist/{fleet-preflight-KSIHWQAU.js → fleet-preflight-44UNCC4Y.js} +26 -24
- package/dist/{fleet-validate-7NLAE26R.js → fleet-validate-K2FXRZVA.js} +13 -13
- package/dist/{fleet-verify-QM6XU2KL.js → fleet-verify-AS444WDW.js} +41 -39
- package/dist/{fleet-view-RLKFHFCM.js → fleet-view-X4JU4J6O.js} +42 -40
- package/dist/gui/ops-worker.js +9 -9
- package/dist/gui/reads-worker.js +9 -8
- package/dist/{init-VBUPHABR.js → init-VSOWFHVL.js} +53 -51
- package/dist/{interactive-JCVBPVYT.js → interactive-JRCBENLZ.js} +154 -92
- package/dist/{interop-J7UOBOSF.js → interop-JR6BCY7R.js} +10 -10
- package/dist/{inventory-54G7FSVY.js → inventory-3JUGLVJI.js} +42 -40
- package/dist/{library-ROZAMUIL.js → library-7BOH3Y7N.js} +15 -15
- package/dist/{library-B3UPGY4V.js → library-7PFONXUI.js} +9 -9
- package/dist/{library-MXQA5DLT.js → library-TUYZMFIA.js} +7 -7
- package/dist/{library-import-2LTWOVBD.js → library-import-TJVXKLDK.js} +10 -10
- package/dist/{library-inventory-LJ3XHLWO.js → library-inventory-MD3AYTP4.js} +9 -9
- package/dist/{library-validation-DARHHUNW.js → library-validation-ZDLITEA3.js} +7 -7
- package/dist/{memory-5BPQSSOP.js → memory-Q2YVOKK5.js} +41 -39
- package/dist/{models-R6HILX6X.js → models-M7BOCW7F.js} +17 -16
- package/dist/{monitor-HVRKSFEQ.js → monitor-2HD3MC67.js} +46 -44
- package/dist/{orchestrator-OR7V4YWK.js → orchestrator-OUW3ZN6Y.js} +1890 -222
- package/dist/{panes-A743ONZ5.js → panes-TTPPSYCL.js} +3 -3
- package/dist/{preload-KLXFOX2F.js → preload-A47C2NUF.js} +41 -39
- package/dist/{providers-CMETPZNS.js → providers-T43W7EL4.js} +4 -4
- package/dist/{resources-FY6XYFN2.js → resources-TP6X2V6W.js} +20 -11
- package/dist/{run-UIDRUYAY.js → run-LDSBPMCS.js} +60 -58
- package/dist/{share-CAFMMQLM.js → share-URHKKMHR.js} +9 -9
- package/dist/{skills-ERKQUC7L.js → skills-E477MOOO.js} +13 -11
- package/dist/{skills-eval-JDAXOPWC.js → skills-eval-AIBR2L7H.js} +582 -92
- package/dist/{skills-inventory-TVUYJDVN.js → skills-inventory-HLMKY3R5.js} +13 -11
- package/dist/{slash-commands-MNKQ5QP3.js → slash-commands-LIIZKA5Y.js} +26 -24
- package/dist/{startup-background-PJMWTKVO.js → startup-background-JR2KDK6R.js} +42 -40
- package/dist/{steer-KKYXJSH4.js → steer-D7RTAPCM.js} +3 -3
- package/dist/{system-IVVZRKGI.js → system-X2P5N4IY.js} +14 -13
- package/dist/{targets-RFRUMCQ5.js → targets-VFFAKUFM.js} +25 -24
- package/dist/{tasks-6L2JJRC5.js → tasks-ERAWZA22.js} +6 -6
- package/dist/{trace-LA5MVR4Y.js → trace-MA5BT7XY.js} +3 -3
- package/dist/{usage-LA33SG3R.js → usage-WYFY2L6M.js} +49 -47
- package/dist/{verifiers-ECA5GIHL.js → verifiers-TYIW2XKF.js} +7 -7
- package/dist/{verify-R6QQCCEB.js → verify-242UFYTP.js} +6 -6
- package/dist/{web-fetch-PVZNMBOB.js → web-fetch-LRAGYU6Y.js} +3 -3
- package/dist/{wiki-generate-HL73TICA.js → wiki-generate-OFKOX2T6.js} +52 -50
- package/dist/worker/entry.js +30 -28
- package/docs/architecture/context-engine.md +2 -0
- package/docs/guide/context-continuity.md +49 -0
- package/docs/guide/proactive-memory.md +3 -0
- package/library/registry.yaml +292 -32
- package/library/skills/README.md +27 -2
- package/library/skills/context/context-handoff/SKILL.md +10 -4
- package/library/skills/meta/clio-coder-dev/SKILL.md +92 -88
- package/library/skills/meta/clio-coder-dev/evals.md +51 -46
- package/library/skills/meta/clio-coder-dev/plugin.json +2 -2
- package/library/skills/meta/clio-coder-dev/references/change-map.md +49 -0
- package/library/skills/meta/clio-coder-test/SKILL.md +89 -142
- package/library/skills/meta/clio-coder-test/evals.md +58 -62
- package/library/skills/meta/clio-coder-test/plugin.json +2 -2
- package/library/skills/meta/clio-coder-test/references/harness.md +3 -3
- package/library/skills/meta/clio-coder-test/references/lifecycle-validation.md +30 -0
- package/library/skills/meta/clio-coder-test/references/test-map.md +60 -89
- package/library/skills/registry.yaml +5 -5
- package/library/skills/skill-marketplace.json +12 -14
- package/package.json +1 -1
- package/src/cli/skills-eval.ts +1064 -54
- package/src/core/clio-repo.ts +3 -0
- package/src/core/tool-names.ts +1 -0
- package/src/domains/context/budget/inspection.ts +9 -0
- package/src/domains/context/budget/live-view.ts +418 -0
- package/src/domains/context/budget/pressure.ts +393 -0
- package/src/domains/context/budget/request-fit.ts +15 -0
- package/src/domains/evidence/build.ts +24 -0
- package/src/domains/memory/commit-state.ts +160 -0
- package/src/domains/memory/operations.ts +18 -10
- package/src/domains/memory/prompt-cache.ts +95 -0
- package/src/domains/memory/prompt-section.ts +50 -7
- package/src/domains/memory/relevance.ts +93 -0
- package/src/domains/memory/restoration.ts +78 -0
- package/src/domains/memory/store.ts +39 -1
- package/src/domains/middleware/memory-intervention.ts +116 -24
- package/src/domains/prompts/compiler.ts +1 -1
- package/src/domains/prompts/extension.ts +38 -1
- package/src/domains/resources/index.ts +11 -0
- package/src/domains/resources/skills/catalog-view.ts +571 -0
- package/src/domains/resources/skills/lexical-match.ts +136 -0
- package/src/domains/resources/skills/loader.ts +38 -0
- package/src/domains/resources/skills/promotion.ts +1 -55
- package/src/domains/resources/skills/provenance-pin.ts +50 -20
- package/src/domains/safety/action-classifier.ts +1 -0
- package/src/domains/session/compaction/branch-summary.ts +4 -1
- package/src/domains/session/compaction/compact.ts +18 -2
- package/src/domains/session/compaction/cut-point.ts +20 -1
- package/src/domains/session/compaction/tokens.ts +48 -3
- package/src/domains/session/context-accounting.ts +8 -1
- package/src/domains/session/continuity/carry.ts +59 -0
- package/src/domains/session/continuity/contract.ts +592 -0
- package/src/domains/session/continuity/evidence.ts +290 -0
- package/src/domains/session/continuity/fold.ts +1075 -0
- package/src/domains/session/continuity/note.ts +79 -0
- package/src/domains/session/continuity/operator-request.ts +104 -0
- package/src/domains/session/continuity/persistence.ts +408 -0
- package/src/domains/session/continuity/ports.ts +231 -0
- package/src/domains/session/continuity/projection.ts +538 -0
- package/src/domains/session/continuity/validate.ts +352 -0
- package/src/domains/session/entries.ts +50 -3
- package/src/domains/session/index.ts +48 -0
- package/src/domains/session/migrations/index.ts +7 -3
- package/src/domains/session/tree/fork.ts +15 -1
- package/src/engine/agent.ts +133 -9
- package/src/engine/session.ts +13 -6
- package/src/entry/orchestrator.ts +114 -31
- package/src/interactive/chat-loop.ts +216 -60
- package/src/interactive/chat-renderer.ts +99 -8
- package/src/interactive/context-overlay.ts +24 -3
- package/src/interactive/continuity-controller.ts +526 -0
- package/src/interactive/footer/dashboard.ts +12 -1
- package/src/interactive/footer/pages.ts +15 -7
- package/src/interactive/footer/widgets.ts +32 -7
- package/src/interactive/interactive-application.ts +2 -0
- package/src/interactive/interactive-slash-runtime.ts +43 -6
- package/src/interactive/model-session-replay.ts +130 -3
- package/src/interactive/output-reserve.ts +35 -0
- package/src/interactive/overlay-session-lifecycle.ts +18 -11
- package/src/interactive/session-transcript.ts +2 -1
- package/src/interactive/slash-commands.ts +20 -1
- package/src/interactive/turn-context.ts +685 -62
- package/src/interactive/turn-middleware.ts +39 -6
- package/src/interactive/turn-persistence.ts +15 -2
- package/src/interactive/turn-runtime.ts +48 -5
- package/src/tools/agent-tools.ts +3 -1
- package/src/tools/bootstrap.ts +6 -0
- package/src/tools/builtin-tool-catalog.ts +9 -0
- package/src/tools/context/index.ts +148 -113
- package/src/tools/context/surface.ts +11 -7
- package/src/tools/core-bootstrap.ts +4 -0
- package/src/tools/observation.ts +8 -2
- package/src/tools/policy.ts +3 -0
- package/src/tools/self-compact.ts +31 -0
- package/src/tools/surface.ts +1 -0
- package/src/tools/tasks.ts +1 -1
- package/dist/chunk-3OODBJ45.js +0 -1325
- package/dist/chunk-CTFPFW3H.js +0 -44
- package/dist/chunk-I4Y4WKZR.js +0 -386
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
isAgentProduct,
|
|
32
32
|
isAgentProjectContextTier,
|
|
33
33
|
parseResultContract
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-7UFDIOBT.js";
|
|
35
35
|
import {
|
|
36
36
|
extensionContentDigest,
|
|
37
37
|
isSemanticVersion
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
} from "./chunk-5EQO5NWP.js";
|
|
43
43
|
import {
|
|
44
44
|
ToolNames
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-6UKFRTXI.js";
|
|
46
46
|
import {
|
|
47
47
|
readSettings,
|
|
48
48
|
updateSettings
|
|
@@ -648,15 +648,77 @@ async function syncLibrary(direction, runner = runCommandVector) {
|
|
|
648
648
|
|
|
649
649
|
// src/domains/resources/skills/marketplace.ts
|
|
650
650
|
init_esm_shims();
|
|
651
|
-
import { existsSync as
|
|
652
|
-
import
|
|
651
|
+
import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync5 } from "node:fs";
|
|
652
|
+
import path6 from "node:path";
|
|
653
653
|
|
|
654
654
|
// src/domains/resources/skills/loader.ts
|
|
655
655
|
init_esm_shims();
|
|
656
656
|
import { createHash } from "node:crypto";
|
|
657
|
-
import { existsSync as
|
|
657
|
+
import { existsSync as existsSync4, readdirSync, readFileSync as readFileSync4, realpathSync as realpathSync2 } from "node:fs";
|
|
658
658
|
import { homedir as homedir2 } from "node:os";
|
|
659
|
+
import path5 from "node:path";
|
|
660
|
+
|
|
661
|
+
// src/core/clio-repo.ts
|
|
662
|
+
init_esm_shims();
|
|
663
|
+
import { existsSync as existsSync3, readFileSync as readFileSync3, statSync as statSync2 } from "node:fs";
|
|
659
664
|
import path4 from "node:path";
|
|
665
|
+
var CLIO_PACKAGE_NAME = "@iowarp/clio-coder";
|
|
666
|
+
var CLIO_SELF_DEVELOPMENT_SKILLS = ["clio-coder-dev", "clio-coder-test"];
|
|
667
|
+
var SOURCE_MARKERS = [
|
|
668
|
+
"src/entry/orchestrator.ts",
|
|
669
|
+
"src/worker/entry.ts",
|
|
670
|
+
"src/domains/prompts/fragments/identity/clio.md"
|
|
671
|
+
];
|
|
672
|
+
function isFile(filePath) {
|
|
673
|
+
try {
|
|
674
|
+
return statSync2(filePath).isFile();
|
|
675
|
+
} catch {
|
|
676
|
+
return false;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
function readPackageJson(root) {
|
|
680
|
+
try {
|
|
681
|
+
const raw = readFileSync3(path4.join(root, "package.json"), "utf8");
|
|
682
|
+
const parsed = JSON.parse(raw);
|
|
683
|
+
return parsed && typeof parsed === "object" ? parsed : null;
|
|
684
|
+
} catch {
|
|
685
|
+
return null;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
function repositoryMatches(value) {
|
|
689
|
+
if (typeof value === "string") return value.includes("iowarp/clio-coder");
|
|
690
|
+
if (!value || typeof value !== "object") return false;
|
|
691
|
+
const url = value.url;
|
|
692
|
+
return typeof url === "string" && url.includes("iowarp/clio-coder");
|
|
693
|
+
}
|
|
694
|
+
function hasGitMarker(root) {
|
|
695
|
+
return existsSync3(path4.join(root, ".git"));
|
|
696
|
+
}
|
|
697
|
+
function hasSourceMarkers(root) {
|
|
698
|
+
return SOURCE_MARKERS.every((marker) => isFile(path4.join(root, marker)));
|
|
699
|
+
}
|
|
700
|
+
function isClioCoderRepoRoot(root) {
|
|
701
|
+
const pkg = readPackageJson(root);
|
|
702
|
+
if (pkg?.name !== CLIO_PACKAGE_NAME) return false;
|
|
703
|
+
if (!repositoryMatches(pkg.repository)) return false;
|
|
704
|
+
if (!hasGitMarker(root)) return false;
|
|
705
|
+
return hasSourceMarkers(root);
|
|
706
|
+
}
|
|
707
|
+
function detectClioCoderRepo(cwd = process.cwd()) {
|
|
708
|
+
let current = path4.resolve(cwd);
|
|
709
|
+
for (; ; ) {
|
|
710
|
+
if (isClioCoderRepoRoot(current)) {
|
|
711
|
+
return { isClioCoderRepo: true, repoRoot: current };
|
|
712
|
+
}
|
|
713
|
+
if (hasGitMarker(current)) break;
|
|
714
|
+
const parent = path4.dirname(current);
|
|
715
|
+
if (parent === current) break;
|
|
716
|
+
current = parent;
|
|
717
|
+
}
|
|
718
|
+
return { isClioCoderRepo: false, repoRoot: null };
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
// src/domains/resources/skills/loader.ts
|
|
660
722
|
var MAX_NAME_LENGTH = 64;
|
|
661
723
|
var MAX_DESCRIPTION_LENGTH = 1024;
|
|
662
724
|
var MAX_SKILL_BYTES = 1024 * 1024;
|
|
@@ -700,6 +762,33 @@ function defaultSkillRoots(input = {}) {
|
|
|
700
762
|
const configDir = input.configDir ?? clioConfigDirSafe();
|
|
701
763
|
const trustProject = projectCompatTrusted(input.trustProjectCompatRoots);
|
|
702
764
|
const roots = [];
|
|
765
|
+
const selfRepo = detectClioCoderRepo(cwd).repoRoot;
|
|
766
|
+
if (selfRepo) {
|
|
767
|
+
const ownedNames = installedSkillNames([], cwd);
|
|
768
|
+
if (path5.resolve(cwd) !== selfRepo) {
|
|
769
|
+
for (const name of installedSkillNames([], selfRepo)) ownedNames.add(name);
|
|
770
|
+
const rootOverrides = loadSkillRoot(
|
|
771
|
+
{ path: path5.join(selfRepo, ".clio-coder", "skills"), scope: "project", containment: selfRepo },
|
|
772
|
+
[]
|
|
773
|
+
);
|
|
774
|
+
for (const candidate of rootOverrides) ownedNames.add(candidate.skill.name);
|
|
775
|
+
}
|
|
776
|
+
for (const name of CLIO_SELF_DEVELOPMENT_SKILLS) {
|
|
777
|
+
if (ownedNames.has(name)) continue;
|
|
778
|
+
const skillPath = path5.join(selfRepo, "library", "skills", "meta", name);
|
|
779
|
+
if (!existsSync4(path5.join(skillPath, "SKILL.md"))) continue;
|
|
780
|
+
roots.push({
|
|
781
|
+
path: skillPath,
|
|
782
|
+
scope: "project",
|
|
783
|
+
source: "clio-coder",
|
|
784
|
+
origin: "self-development",
|
|
785
|
+
precedence: SKILL_PRECEDENCE.package - 1,
|
|
786
|
+
trusted: true,
|
|
787
|
+
containment: selfRepo,
|
|
788
|
+
strictContainment: true
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
}
|
|
703
792
|
for (const root of enabledPluginResourceRoots("skills", cwd)) {
|
|
704
793
|
roots.push({
|
|
705
794
|
path: root.path,
|
|
@@ -716,7 +805,7 @@ function defaultSkillRoots(input = {}) {
|
|
|
716
805
|
for (const kind of INTEROP_AGENT_KINDS) {
|
|
717
806
|
if (kind.userSkillRoot === void 0 || kind.skillSource === void 0) continue;
|
|
718
807
|
roots.push({
|
|
719
|
-
path:
|
|
808
|
+
path: path5.join(home, kind.userSkillRoot),
|
|
720
809
|
scope: "user",
|
|
721
810
|
source: kind.skillSource,
|
|
722
811
|
origin: `${kind.skillSource}-user`,
|
|
@@ -727,7 +816,7 @@ function defaultSkillRoots(input = {}) {
|
|
|
727
816
|
}
|
|
728
817
|
if (configDir) {
|
|
729
818
|
roots.push({
|
|
730
|
-
path:
|
|
819
|
+
path: path5.join(configDir, "skills"),
|
|
731
820
|
scope: "user",
|
|
732
821
|
source: "clio-coder",
|
|
733
822
|
origin: "config",
|
|
@@ -739,7 +828,7 @@ function defaultSkillRoots(input = {}) {
|
|
|
739
828
|
for (const kind of INTEROP_AGENT_KINDS) {
|
|
740
829
|
if (kind.projectSkillRoot === void 0 || kind.skillSource === void 0) continue;
|
|
741
830
|
roots.push({
|
|
742
|
-
path:
|
|
831
|
+
path: path5.join(cwd, kind.projectSkillRoot),
|
|
743
832
|
scope: "project",
|
|
744
833
|
source: kind.skillSource,
|
|
745
834
|
origin: `${kind.skillSource}-project`,
|
|
@@ -749,7 +838,7 @@ function defaultSkillRoots(input = {}) {
|
|
|
749
838
|
});
|
|
750
839
|
}
|
|
751
840
|
roots.push({
|
|
752
|
-
path:
|
|
841
|
+
path: path5.join(cwd, ".clio-coder", "skills"),
|
|
753
842
|
scope: "project",
|
|
754
843
|
source: "clio-coder",
|
|
755
844
|
origin: "project",
|
|
@@ -823,7 +912,7 @@ function declaredToolSurface(frontmatter, key, filePath, diagnostics) {
|
|
|
823
912
|
return tools.length > 0 ? tools : void 0;
|
|
824
913
|
}
|
|
825
914
|
function validationSubject(filePath) {
|
|
826
|
-
return
|
|
915
|
+
return path5.basename(filePath) === "SKILL.md" ? path5.basename(path5.dirname(filePath)) : path5.basename(filePath, ".md");
|
|
827
916
|
}
|
|
828
917
|
function validateNameFormat(name) {
|
|
829
918
|
const errors = [];
|
|
@@ -908,15 +997,16 @@ function canonicalizePath(filePath) {
|
|
|
908
997
|
try {
|
|
909
998
|
return realpathSync2.native(filePath);
|
|
910
999
|
} catch {
|
|
911
|
-
return
|
|
1000
|
+
return path5.resolve(filePath);
|
|
912
1001
|
}
|
|
913
1002
|
}
|
|
914
1003
|
function pathIsInside(candidate, anchor) {
|
|
915
|
-
return candidate === anchor || candidate.startsWith(anchor +
|
|
1004
|
+
return candidate === anchor || candidate.startsWith(anchor + path5.sep);
|
|
916
1005
|
}
|
|
917
1006
|
function containmentAnchor(root) {
|
|
918
1007
|
if (root.containment === void 0) return null;
|
|
919
1008
|
const anchor = canonicalizePath(root.containment);
|
|
1009
|
+
if (root.strictContainment) return anchor;
|
|
920
1010
|
const rootReal = canonicalizePath(root.path);
|
|
921
1011
|
return pathIsInside(rootReal, anchor) ? anchor : rootReal;
|
|
922
1012
|
}
|
|
@@ -935,7 +1025,7 @@ function loadSkillFile(filePath, root) {
|
|
|
935
1025
|
const diagnostics = [];
|
|
936
1026
|
let bytes;
|
|
937
1027
|
try {
|
|
938
|
-
bytes =
|
|
1028
|
+
bytes = readFileSync4(filePath);
|
|
939
1029
|
} catch (err) {
|
|
940
1030
|
const reason = err instanceof Error ? err.message : String(err);
|
|
941
1031
|
return {
|
|
@@ -998,7 +1088,7 @@ function loadSkillFile(filePath, root) {
|
|
|
998
1088
|
}
|
|
999
1089
|
for (const message of validateNameFormat(name)) diagnostics.push({ type: "warning", message, path: filePath });
|
|
1000
1090
|
if (!description) return { candidate: null, diagnostics };
|
|
1001
|
-
const baseDir =
|
|
1091
|
+
const baseDir = path5.dirname(filePath);
|
|
1002
1092
|
const scope = root.scope;
|
|
1003
1093
|
const sourceInfo = {
|
|
1004
1094
|
path: filePath,
|
|
@@ -1042,7 +1132,7 @@ function isSkillMarkdownFile(entryName) {
|
|
|
1042
1132
|
return entryName === "SKILL.md" || entryName.endsWith(".md");
|
|
1043
1133
|
}
|
|
1044
1134
|
function collectSkills(root, dir, diagnostics, includeRootFiles, anchor = containmentAnchor(root)) {
|
|
1045
|
-
if (!
|
|
1135
|
+
if (!existsSync4(dir)) return [];
|
|
1046
1136
|
if (escapesContainment(dir, anchor, diagnostics)) return [];
|
|
1047
1137
|
let entries;
|
|
1048
1138
|
try {
|
|
@@ -1054,7 +1144,7 @@ function collectSkills(root, dir, diagnostics, includeRootFiles, anchor = contai
|
|
|
1054
1144
|
}
|
|
1055
1145
|
const skillEntry = entries.find((entry) => entry.name === "SKILL.md" && entry.isFile());
|
|
1056
1146
|
if (skillEntry) {
|
|
1057
|
-
const skillPath =
|
|
1147
|
+
const skillPath = path5.join(dir, skillEntry.name);
|
|
1058
1148
|
if (escapesContainment(skillPath, anchor, diagnostics)) return [];
|
|
1059
1149
|
const loaded = loadSkillFile(skillPath, root);
|
|
1060
1150
|
diagnostics.push(...loaded.diagnostics);
|
|
@@ -1063,8 +1153,8 @@ function collectSkills(root, dir, diagnostics, includeRootFiles, anchor = contai
|
|
|
1063
1153
|
const candidates = [];
|
|
1064
1154
|
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
1065
1155
|
if (entry.name.startsWith(".") || entry.name === "node_modules") continue;
|
|
1066
|
-
const fullPath =
|
|
1067
|
-
if (entry.isDirectory() || entry.isSymbolicLink() &&
|
|
1156
|
+
const fullPath = path5.join(dir, entry.name);
|
|
1157
|
+
if (entry.isDirectory() || entry.isSymbolicLink() && existsSync4(path5.join(fullPath, "SKILL.md"))) {
|
|
1068
1158
|
candidates.push(...collectSkills(root, fullPath, diagnostics, false, anchor));
|
|
1069
1159
|
continue;
|
|
1070
1160
|
}
|
|
@@ -1092,15 +1182,15 @@ function explicitSkillRoot(filePath) {
|
|
|
1092
1182
|
};
|
|
1093
1183
|
}
|
|
1094
1184
|
function loadExplicitSkillPath(inputPath, diagnostics, packageRoots, cwd) {
|
|
1095
|
-
const resolved =
|
|
1185
|
+
const resolved = path5.resolve(inputPath);
|
|
1096
1186
|
const identity = canonicalizePath(resolved);
|
|
1097
1187
|
const owner = packageRoots.find((candidate) => {
|
|
1098
|
-
const relative =
|
|
1099
|
-
return relative !== ".." && !relative.startsWith(`..${
|
|
1188
|
+
const relative = path5.relative(canonicalizePath(candidate.path), identity);
|
|
1189
|
+
return relative !== ".." && !relative.startsWith(`..${path5.sep}`) && !path5.isAbsolute(relative);
|
|
1100
1190
|
});
|
|
1101
1191
|
if (!owner && ["user", "project"].some((scope) => {
|
|
1102
|
-
const relative =
|
|
1103
|
-
return relative !== ".." && !relative.startsWith(`..${
|
|
1192
|
+
const relative = path5.relative(canonicalizePath(pluginBaseDir(scope, cwd)), identity);
|
|
1193
|
+
return relative !== ".." && !relative.startsWith(`..${path5.sep}`) && !path5.isAbsolute(relative);
|
|
1104
1194
|
})) {
|
|
1105
1195
|
diagnostics.push({
|
|
1106
1196
|
type: "warning",
|
|
@@ -1117,12 +1207,12 @@ function loadExplicitSkillPath(inputPath, diagnostics, packageRoots, cwd) {
|
|
|
1117
1207
|
trusted: owner.trusted
|
|
1118
1208
|
} : {}
|
|
1119
1209
|
};
|
|
1120
|
-
if (!
|
|
1210
|
+
if (!existsSync4(resolved)) {
|
|
1121
1211
|
diagnostics.push({ type: "warning", message: `explicit skill path does not exist: ${resolved}`, path: resolved });
|
|
1122
1212
|
return [];
|
|
1123
1213
|
}
|
|
1124
|
-
const skillFile =
|
|
1125
|
-
if (!
|
|
1214
|
+
const skillFile = path5.basename(resolved) === "SKILL.md" || resolved.endsWith(".md") ? resolved : path5.join(resolved, "SKILL.md");
|
|
1215
|
+
if (!existsSync4(skillFile)) {
|
|
1126
1216
|
const packages = collectSkills(root, resolved, diagnostics, false);
|
|
1127
1217
|
if (packages.length > 0) return packages;
|
|
1128
1218
|
diagnostics.push({
|
|
@@ -1348,26 +1438,26 @@ function parsePendingSkillRequests(input, skills, options = {}) {
|
|
|
1348
1438
|
var MARKETPLACE_UNCONFIGURED = "no local skill marketplace catalog or index configured";
|
|
1349
1439
|
function packageCatalogDir() {
|
|
1350
1440
|
try {
|
|
1351
|
-
return
|
|
1441
|
+
return path6.join(resolvePackageRoot(), "library", "skills");
|
|
1352
1442
|
} catch {
|
|
1353
1443
|
return null;
|
|
1354
1444
|
}
|
|
1355
1445
|
}
|
|
1356
1446
|
function packageIndexPath() {
|
|
1357
1447
|
try {
|
|
1358
|
-
return
|
|
1448
|
+
return path6.join(resolvePackageRoot(), "library", "skills", "skill-marketplace.json");
|
|
1359
1449
|
} catch {
|
|
1360
1450
|
return null;
|
|
1361
1451
|
}
|
|
1362
1452
|
}
|
|
1363
1453
|
function defaultIndexPath() {
|
|
1364
1454
|
try {
|
|
1365
|
-
const configured =
|
|
1366
|
-
if (
|
|
1455
|
+
const configured = path6.join(clioConfigDir(), "skill-marketplace.json");
|
|
1456
|
+
if (existsSync5(configured)) return configured;
|
|
1367
1457
|
} catch {
|
|
1368
1458
|
}
|
|
1369
1459
|
const bundled = packageIndexPath();
|
|
1370
|
-
return bundled &&
|
|
1460
|
+
return bundled && existsSync5(bundled) ? bundled : null;
|
|
1371
1461
|
}
|
|
1372
1462
|
function isIndexSkill(value) {
|
|
1373
1463
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
@@ -1387,7 +1477,7 @@ function indexAudit(value) {
|
|
|
1387
1477
|
}
|
|
1388
1478
|
function parseMarketplaceIndex(indexPath, diagnostics = []) {
|
|
1389
1479
|
try {
|
|
1390
|
-
const parsed = JSON.parse(
|
|
1480
|
+
const parsed = JSON.parse(readFileSync5(indexPath, "utf8"));
|
|
1391
1481
|
const rawSkills = Array.isArray(parsed) ? parsed : parsed && typeof parsed === "object" && Array.isArray(parsed.skills) ? parsed.skills : [];
|
|
1392
1482
|
return rawSkills.filter(isIndexSkill).flatMap((skill) => {
|
|
1393
1483
|
const record = skill;
|
|
@@ -1406,7 +1496,7 @@ function parseMarketplaceIndex(indexPath, diagnostics = []) {
|
|
|
1406
1496
|
const kind = record.kind === "agent" || record.kind === "prompt" || record.kind === "fleet" ? record.kind : "skill";
|
|
1407
1497
|
const requires = Array.isArray(record.requires) ? record.requires.filter((entry) => typeof entry === "string") : void 0;
|
|
1408
1498
|
const overlay = optionalString(record.overlay);
|
|
1409
|
-
if (overlay && (
|
|
1499
|
+
if (overlay && (path6.isAbsolute(overlay) || overlay.split("/").includes(".."))) {
|
|
1410
1500
|
diagnostics.push(`skill marketplace index entry has an overlay outside the package: ${skill.name}`);
|
|
1411
1501
|
return [];
|
|
1412
1502
|
}
|
|
@@ -1434,15 +1524,15 @@ function parseMarketplaceIndex(indexPath, diagnostics = []) {
|
|
|
1434
1524
|
}
|
|
1435
1525
|
}
|
|
1436
1526
|
function looksLikeSkillCatalog(dir) {
|
|
1437
|
-
if (!
|
|
1527
|
+
if (!existsSync5(dir)) return false;
|
|
1438
1528
|
try {
|
|
1439
1529
|
return readdirSync2(dir, { withFileTypes: true }).some((entry) => {
|
|
1440
1530
|
if (!entry.isDirectory()) return false;
|
|
1441
|
-
const child =
|
|
1442
|
-
if (
|
|
1531
|
+
const child = path6.join(dir, entry.name);
|
|
1532
|
+
if (existsSync5(path6.join(child, "SKILL.md"))) return true;
|
|
1443
1533
|
try {
|
|
1444
1534
|
return readdirSync2(child, { withFileTypes: true }).some(
|
|
1445
|
-
(inner) => inner.isDirectory() &&
|
|
1535
|
+
(inner) => inner.isDirectory() && existsSync5(path6.join(child, inner.name, "SKILL.md"))
|
|
1446
1536
|
);
|
|
1447
1537
|
} catch {
|
|
1448
1538
|
return false;
|
|
@@ -1454,19 +1544,19 @@ function looksLikeSkillCatalog(dir) {
|
|
|
1454
1544
|
}
|
|
1455
1545
|
function resolveCatalogDir(options) {
|
|
1456
1546
|
if (options.catalogDir === null) return null;
|
|
1457
|
-
if (options.catalogDir) return
|
|
1547
|
+
if (options.catalogDir) return path6.resolve(options.catalogDir);
|
|
1458
1548
|
const fromEnv = process.env.CLIO_CODER_SKILL_CATALOG_DIR;
|
|
1459
|
-
if (fromEnv && fromEnv.trim().length > 0) return
|
|
1460
|
-
const repoLibraryCatalog =
|
|
1549
|
+
if (fromEnv && fromEnv.trim().length > 0) return path6.resolve(fromEnv.trim());
|
|
1550
|
+
const repoLibraryCatalog = path6.join(options.cwd ?? process.cwd(), "library", "skills");
|
|
1461
1551
|
if (looksLikeSkillCatalog(repoLibraryCatalog)) return repoLibraryCatalog;
|
|
1462
|
-
const repoCatalog =
|
|
1552
|
+
const repoCatalog = path6.join(options.cwd ?? process.cwd(), "skills");
|
|
1463
1553
|
if (looksLikeSkillCatalog(repoCatalog)) return repoCatalog;
|
|
1464
1554
|
const bundled = packageCatalogDir();
|
|
1465
1555
|
return bundled && looksLikeSkillCatalog(bundled) ? bundled : null;
|
|
1466
1556
|
}
|
|
1467
1557
|
function catalogCategory(catalogDir, baseDir) {
|
|
1468
|
-
const rel =
|
|
1469
|
-
const category =
|
|
1558
|
+
const rel = path6.relative(catalogDir, baseDir);
|
|
1559
|
+
const category = path6.dirname(rel);
|
|
1470
1560
|
if (rel.length === 0 || rel.startsWith("..") || category === "." || category.startsWith("..")) return void 0;
|
|
1471
1561
|
return category;
|
|
1472
1562
|
}
|
|
@@ -1504,7 +1594,7 @@ function discoverMarketplaceSkills(options = {}) {
|
|
|
1504
1594
|
const seen = /* @__PURE__ */ new Set();
|
|
1505
1595
|
const indexPath = options.indexPath === null ? null : options.indexPath ?? process.env.CLIO_CODER_SKILL_MARKETPLACE_INDEX ?? null;
|
|
1506
1596
|
const resolvedIndexPath = indexPath ?? defaultIndexPath();
|
|
1507
|
-
const indexSkills = options.indexPath !== null && resolvedIndexPath &&
|
|
1597
|
+
const indexSkills = options.indexPath !== null && resolvedIndexPath && existsSync5(resolvedIndexPath) ? parseMarketplaceIndex(resolvedIndexPath, diagnostics) : [];
|
|
1508
1598
|
const overlayNames = new Set(indexSkills.filter((skill) => skill.overlay).map((skill) => skill.name));
|
|
1509
1599
|
const catalogDir = resolveCatalogDir(options);
|
|
1510
1600
|
if (catalogDir) {
|
|
@@ -1529,7 +1619,7 @@ function getMarketplaceSkills(options = {}) {
|
|
|
1529
1619
|
}
|
|
1530
1620
|
function marketplaceInstallShaping(skill) {
|
|
1531
1621
|
const shaping = {};
|
|
1532
|
-
if (skill.overlay) shaping.overlay =
|
|
1622
|
+
if (skill.overlay) shaping.overlay = path6.join(resolvePackageRoot(), skill.overlay);
|
|
1533
1623
|
if (skill.exclude && skill.exclude.length > 0) shaping.exclude = [...skill.exclude];
|
|
1534
1624
|
return shaping;
|
|
1535
1625
|
}
|
|
@@ -1572,7 +1662,7 @@ function installSkill(input) {
|
|
|
1572
1662
|
|
|
1573
1663
|
// src/domains/agents/recipe.ts
|
|
1574
1664
|
init_esm_shims();
|
|
1575
|
-
import
|
|
1665
|
+
import path7 from "node:path";
|
|
1576
1666
|
var AGENT_BUDGET_KEYS = ["toolCalls", "readReserve", "synthesis", "maximum"];
|
|
1577
1667
|
function parseAgentBudgetPhase(value, prefix, relationTarget) {
|
|
1578
1668
|
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -1632,19 +1722,19 @@ function parseAgentBudget(value, sourcePath) {
|
|
|
1632
1722
|
return { ...phase, synthesis, ...maximum === void 0 ? {} : { maximum } };
|
|
1633
1723
|
}
|
|
1634
1724
|
function recipeIdFromPath(absPath, rootDir) {
|
|
1635
|
-
const resolvedRoot =
|
|
1636
|
-
const resolvedPath =
|
|
1637
|
-
const relPath =
|
|
1638
|
-
if (relPath === "" || relPath.startsWith("..") ||
|
|
1725
|
+
const resolvedRoot = path7.resolve(rootDir);
|
|
1726
|
+
const resolvedPath = path7.resolve(absPath);
|
|
1727
|
+
const relPath = path7.relative(resolvedRoot, resolvedPath);
|
|
1728
|
+
if (relPath === "" || relPath.startsWith("..") || path7.isAbsolute(relPath)) {
|
|
1639
1729
|
throw new Error(`recipe: path must live under rootDir (${resolvedPath} not under ${resolvedRoot})`);
|
|
1640
1730
|
}
|
|
1641
|
-
if (
|
|
1731
|
+
if (path7.dirname(relPath) !== ".") {
|
|
1642
1732
|
throw new Error(`recipe: recipes must live directly under rootDir (${resolvedPath})`);
|
|
1643
1733
|
}
|
|
1644
|
-
if (
|
|
1734
|
+
if (path7.extname(relPath) !== ".md") {
|
|
1645
1735
|
throw new Error(`recipe: recipe files must end in .md (${resolvedPath})`);
|
|
1646
1736
|
}
|
|
1647
|
-
const id =
|
|
1737
|
+
const id = path7.basename(relPath, ".md");
|
|
1648
1738
|
if (id === "") {
|
|
1649
1739
|
throw new Error(`recipe: recipe filename must not be empty (${resolvedPath})`);
|
|
1650
1740
|
}
|
|
@@ -1670,19 +1760,19 @@ var RECIPE_KEYS = [
|
|
|
1670
1760
|
];
|
|
1671
1761
|
var OPTIONAL_RECIPE_KEYS = ["product"];
|
|
1672
1762
|
var ALL_RECIPE_KEYS = [...RECIPE_KEYS, ...OPTIONAL_RECIPE_KEYS];
|
|
1673
|
-
function requiredString(value,
|
|
1763
|
+
function requiredString(value, path8) {
|
|
1674
1764
|
if (typeof value !== "string" || value.trim().length === 0)
|
|
1675
|
-
throw new Error(`agent recipe: ${
|
|
1765
|
+
throw new Error(`agent recipe: ${path8} must be a non-empty string`);
|
|
1676
1766
|
return value;
|
|
1677
1767
|
}
|
|
1678
|
-
function requiredStringArray(value,
|
|
1679
|
-
if (!Array.isArray(value)) throw new Error(`agent recipe: ${
|
|
1680
|
-
const entries = value.map((entry, index) => requiredString(entry, `${
|
|
1681
|
-
if (new Set(entries).size !== entries.length) throw new Error(`agent recipe: ${
|
|
1768
|
+
function requiredStringArray(value, path8) {
|
|
1769
|
+
if (!Array.isArray(value)) throw new Error(`agent recipe: ${path8} must be an array of strings`);
|
|
1770
|
+
const entries = value.map((entry, index) => requiredString(entry, `${path8}[${index}]`));
|
|
1771
|
+
if (new Set(entries).size !== entries.length) throw new Error(`agent recipe: ${path8} must not contain duplicates`);
|
|
1682
1772
|
return entries;
|
|
1683
1773
|
}
|
|
1684
|
-
function enumValue(value,
|
|
1685
|
-
if (!predicate(value)) throw new Error(`agent recipe: ${
|
|
1774
|
+
function enumValue(value, path8, predicate) {
|
|
1775
|
+
if (!predicate(value)) throw new Error(`agent recipe: ${path8} has an unsupported value`);
|
|
1686
1776
|
return value;
|
|
1687
1777
|
}
|
|
1688
1778
|
function parseAudience(value, source, filepath) {
|
|
@@ -1792,6 +1882,7 @@ function parseAgentRecipeSchema(input) {
|
|
|
1792
1882
|
}
|
|
1793
1883
|
|
|
1794
1884
|
export {
|
|
1885
|
+
detectClioCoderRepo,
|
|
1795
1886
|
installedSkillPackages,
|
|
1796
1887
|
installedSkillNames,
|
|
1797
1888
|
parsePluginGithubSource,
|
|
@@ -1837,4 +1928,4 @@ export {
|
|
|
1837
1928
|
recipeIdFromPath,
|
|
1838
1929
|
parseAgentRecipeSchema
|
|
1839
1930
|
};
|
|
1840
|
-
//# sourceMappingURL=chunk-
|
|
1931
|
+
//# sourceMappingURL=chunk-B5TASTCK.js.map
|