@goondocks/myco 0.6.4 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -3
- package/.claude-plugin/plugin.json +3 -3
- package/CONTRIBUTING.md +37 -30
- package/README.md +64 -28
- package/bin/myco-run +2 -0
- package/dist/agent-run-EFICNTAU.js +34 -0
- package/dist/agent-run-EFICNTAU.js.map +1 -0
- package/dist/agent-tasks-RXJ7Z5NG.js +180 -0
- package/dist/agent-tasks-RXJ7Z5NG.js.map +1 -0
- package/dist/chunk-2T7RPVPP.js +116 -0
- package/dist/chunk-2T7RPVPP.js.map +1 -0
- package/dist/chunk-3K5WGSJ4.js +165 -0
- package/dist/chunk-3K5WGSJ4.js.map +1 -0
- package/dist/chunk-46PWOKSI.js +26 -0
- package/dist/chunk-46PWOKSI.js.map +1 -0
- package/dist/chunk-4LPQ26CK.js +277 -0
- package/dist/chunk-4LPQ26CK.js.map +1 -0
- package/dist/chunk-5PEUFJ6U.js +92 -0
- package/dist/chunk-5PEUFJ6U.js.map +1 -0
- package/dist/chunk-5VZ52A4T.js +136 -0
- package/dist/chunk-5VZ52A4T.js.map +1 -0
- package/dist/chunk-BUSP3OJB.js +103 -0
- package/dist/chunk-BUSP3OJB.js.map +1 -0
- package/dist/chunk-D7TYRPRM.js +7312 -0
- package/dist/chunk-D7TYRPRM.js.map +1 -0
- package/dist/chunk-DCXRSSBP.js +22 -0
- package/dist/chunk-DCXRSSBP.js.map +1 -0
- package/dist/chunk-E4VLWIJC.js +2 -0
- package/dist/chunk-FFAYUQ5N.js +39 -0
- package/dist/chunk-FFAYUQ5N.js.map +1 -0
- package/dist/chunk-IB76KGBY.js +2 -0
- package/dist/chunk-JMJJEQ3P.js +486 -0
- package/dist/chunk-JMJJEQ3P.js.map +1 -0
- package/dist/{chunk-N33KUCFP.js → chunk-JTYZRPX5.js} +1 -9
- package/dist/chunk-JTYZRPX5.js.map +1 -0
- package/dist/{chunk-NLUE6CYG.js → chunk-JYOOJCPQ.js} +33 -17
- package/dist/chunk-JYOOJCPQ.js.map +1 -0
- package/dist/{chunk-Z74SDEKE.js → chunk-KB4DGYIY.js} +91 -9
- package/dist/chunk-KB4DGYIY.js.map +1 -0
- package/dist/{chunk-ERG2IEWX.js → chunk-KH64DHOY.js} +3 -7413
- package/dist/chunk-KH64DHOY.js.map +1 -0
- package/dist/chunk-KV4OC4H3.js +498 -0
- package/dist/chunk-KV4OC4H3.js.map +1 -0
- package/dist/chunk-KYLDNM7H.js +66 -0
- package/dist/chunk-KYLDNM7H.js.map +1 -0
- package/dist/chunk-LPUQPDC2.js +19 -0
- package/dist/chunk-LPUQPDC2.js.map +1 -0
- package/dist/chunk-M5XWW7UI.js +97 -0
- package/dist/chunk-M5XWW7UI.js.map +1 -0
- package/dist/chunk-MHSCMET3.js +275 -0
- package/dist/chunk-MHSCMET3.js.map +1 -0
- package/dist/chunk-MYX5NCRH.js +45 -0
- package/dist/chunk-MYX5NCRH.js.map +1 -0
- package/dist/chunk-OXZSXYAT.js +877 -0
- package/dist/chunk-OXZSXYAT.js.map +1 -0
- package/dist/chunk-PB6TOLRQ.js +35 -0
- package/dist/chunk-PB6TOLRQ.js.map +1 -0
- package/dist/chunk-PT5IC642.js +162 -0
- package/dist/chunk-PT5IC642.js.map +1 -0
- package/dist/chunk-QIK2XSDQ.js +187 -0
- package/dist/chunk-QIK2XSDQ.js.map +1 -0
- package/dist/chunk-RJ6ZQKG5.js +26 -0
- package/dist/chunk-RJ6ZQKG5.js.map +1 -0
- package/dist/{chunk-YIQLYIHW.js → chunk-TRUJLI6K.js} +29 -43
- package/dist/chunk-TRUJLI6K.js.map +1 -0
- package/dist/chunk-U3IBO3O3.js +41 -0
- package/dist/chunk-U3IBO3O3.js.map +1 -0
- package/dist/{chunk-7WHF2OIZ.js → chunk-UBZPD4HN.js} +25 -7
- package/dist/chunk-UBZPD4HN.js.map +1 -0
- package/dist/{chunk-HIN3UVOG.js → chunk-V7XG6V6C.js} +20 -11
- package/dist/chunk-V7XG6V6C.js.map +1 -0
- package/dist/chunk-WGTCA2NU.js +84 -0
- package/dist/chunk-WGTCA2NU.js.map +1 -0
- package/dist/{chunk-O6PERU7U.js → chunk-XNOCTDHF.js} +2 -2
- package/dist/chunk-YDN4OM33.js +80 -0
- package/dist/chunk-YDN4OM33.js.map +1 -0
- package/dist/cli-ODLFRIYS.js +128 -0
- package/dist/cli-ODLFRIYS.js.map +1 -0
- package/dist/client-EYOTW3JU.js +19 -0
- package/dist/client-MXRNQ5FI.js +13 -0
- package/dist/{config-IBS6KOLQ.js → config-UR5BSGVX.js} +21 -34
- package/dist/config-UR5BSGVX.js.map +1 -0
- package/dist/detect-H5OPI7GD.js +17 -0
- package/dist/detect-H5OPI7GD.js.map +1 -0
- package/dist/detect-providers-Q42OD4OS.js +26 -0
- package/dist/detect-providers-Q42OD4OS.js.map +1 -0
- package/dist/doctor-JLKTXDEH.js +258 -0
- package/dist/doctor-JLKTXDEH.js.map +1 -0
- package/dist/executor-ONSDHPGX.js +1441 -0
- package/dist/executor-ONSDHPGX.js.map +1 -0
- package/dist/init-6GWY345B.js +198 -0
- package/dist/init-6GWY345B.js.map +1 -0
- package/dist/init-wizard-UONLDYLI.js +294 -0
- package/dist/init-wizard-UONLDYLI.js.map +1 -0
- package/dist/llm-BV3QNVRD.js +17 -0
- package/dist/llm-BV3QNVRD.js.map +1 -0
- package/dist/loader-SH67XD54.js +28 -0
- package/dist/loader-SH67XD54.js.map +1 -0
- package/dist/loader-XVXKZZDH.js +18 -0
- package/dist/loader-XVXKZZDH.js.map +1 -0
- package/dist/{chunk-H7PRCVGQ.js → logs-QZVYF6FP.js} +74 -5
- package/dist/logs-QZVYF6FP.js.map +1 -0
- package/dist/main-BMCL7CPO.js +4393 -0
- package/dist/main-BMCL7CPO.js.map +1 -0
- package/dist/openai-embeddings-C265WRNK.js +14 -0
- package/dist/openai-embeddings-C265WRNK.js.map +1 -0
- package/dist/openrouter-U6VFCRX2.js +14 -0
- package/dist/openrouter-U6VFCRX2.js.map +1 -0
- package/dist/post-compact-OWFSOITU.js +26 -0
- package/dist/post-compact-OWFSOITU.js.map +1 -0
- package/dist/post-tool-use-DOUM7CGQ.js +56 -0
- package/dist/post-tool-use-DOUM7CGQ.js.map +1 -0
- package/dist/post-tool-use-failure-SG3C7PE6.js +28 -0
- package/dist/post-tool-use-failure-SG3C7PE6.js.map +1 -0
- package/dist/pre-compact-3J33CHXQ.js +25 -0
- package/dist/pre-compact-3J33CHXQ.js.map +1 -0
- package/dist/provider-check-3WBPZADE.js +12 -0
- package/dist/provider-check-3WBPZADE.js.map +1 -0
- package/dist/registry-J4XTWARS.js +25 -0
- package/dist/registry-J4XTWARS.js.map +1 -0
- package/dist/resolution-events-TFEQPVKS.js +12 -0
- package/dist/resolution-events-TFEQPVKS.js.map +1 -0
- package/dist/resolve-3FEUV462.js +9 -0
- package/dist/resolve-3FEUV462.js.map +1 -0
- package/dist/{restart-XCMILOL5.js → restart-2VM33WOB.js} +10 -6
- package/dist/{restart-XCMILOL5.js.map → restart-2VM33WOB.js.map} +1 -1
- package/dist/search-ZGQR5MDE.js +91 -0
- package/dist/search-ZGQR5MDE.js.map +1 -0
- package/dist/{server-6UDN35QN.js → server-6KMBJCHZ.js} +308 -517
- package/dist/server-6KMBJCHZ.js.map +1 -0
- package/dist/session-Z2FXDDG6.js +68 -0
- package/dist/session-Z2FXDDG6.js.map +1 -0
- package/dist/session-end-FLVX32LE.js +38 -0
- package/dist/session-end-FLVX32LE.js.map +1 -0
- package/dist/session-start-UCLK7PXE.js +169 -0
- package/dist/session-start-UCLK7PXE.js.map +1 -0
- package/dist/setup-digest-4KDSXAIV.js +15 -0
- package/dist/setup-digest-4KDSXAIV.js.map +1 -0
- package/dist/setup-llm-GKMCHURK.js +81 -0
- package/dist/setup-llm-GKMCHURK.js.map +1 -0
- package/dist/src/agent/definitions/agent.yaml +35 -0
- package/dist/src/agent/definitions/tasks/digest-only.yaml +84 -0
- package/dist/src/agent/definitions/tasks/extract-only.yaml +87 -0
- package/dist/src/agent/definitions/tasks/full-intelligence.yaml +472 -0
- package/dist/src/agent/definitions/tasks/graph-maintenance.yaml +92 -0
- package/dist/src/agent/definitions/tasks/review-session.yaml +132 -0
- package/dist/src/agent/definitions/tasks/supersession-sweep.yaml +86 -0
- package/dist/src/agent/definitions/tasks/title-summary.yaml +88 -0
- package/dist/src/agent/prompts/agent.md +121 -0
- package/dist/src/agent/prompts/orchestrator.md +91 -0
- package/dist/src/cli.js +1 -8
- package/dist/src/cli.js.map +1 -1
- package/dist/src/daemon/main.js +1 -8
- package/dist/src/daemon/main.js.map +1 -1
- package/dist/src/hooks/post-tool-use.js +3 -50
- package/dist/src/hooks/post-tool-use.js.map +1 -1
- package/dist/src/hooks/session-end.js +3 -32
- package/dist/src/hooks/session-end.js.map +1 -1
- package/dist/src/hooks/session-start.js +2 -8
- package/dist/src/hooks/session-start.js.map +1 -1
- package/dist/src/hooks/stop.js +3 -42
- package/dist/src/hooks/stop.js.map +1 -1
- package/dist/src/hooks/user-prompt-submit.js +3 -53
- package/dist/src/hooks/user-prompt-submit.js.map +1 -1
- package/dist/src/mcp/server.js +1 -8
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/prompts/digest-system.md +1 -1
- package/dist/src/symbionts/manifests/claude-code.yaml +16 -0
- package/dist/src/symbionts/manifests/cursor.yaml +14 -0
- package/dist/stats-IUJPZSVZ.js +94 -0
- package/dist/stats-IUJPZSVZ.js.map +1 -0
- package/dist/stop-XRQLLXST.js +42 -0
- package/dist/stop-XRQLLXST.js.map +1 -0
- package/dist/stop-failure-2CAJJKRG.js +26 -0
- package/dist/stop-failure-2CAJJKRG.js.map +1 -0
- package/dist/subagent-start-MWWQTZMQ.js +26 -0
- package/dist/subagent-start-MWWQTZMQ.js.map +1 -0
- package/dist/subagent-stop-PJXYGRXB.js +28 -0
- package/dist/subagent-stop-PJXYGRXB.js.map +1 -0
- package/dist/task-completed-4LFRJVGI.js +27 -0
- package/dist/task-completed-4LFRJVGI.js.map +1 -0
- package/dist/ui/assets/index-DZrElonz.js +744 -0
- package/dist/ui/assets/index-TkeiYbZB.css +1 -0
- package/dist/ui/favicon.svg +7 -7
- package/dist/ui/fonts/Inter-Variable.woff2 +0 -0
- package/dist/ui/fonts/JetBrainsMono-Variable.woff2 +0 -0
- package/dist/ui/fonts/Newsreader-Italic-Variable.woff2 +0 -0
- package/dist/ui/fonts/Newsreader-Variable.woff2 +0 -0
- package/dist/ui/index.html +2 -2
- package/dist/user-prompt-submit-KSM3AR6P.js +59 -0
- package/dist/user-prompt-submit-KSM3AR6P.js.map +1 -0
- package/dist/{verify-TOWQHPBX.js → verify-UDAYVX37.js} +17 -22
- package/dist/verify-UDAYVX37.js.map +1 -0
- package/dist/{version-36RVCQA6.js → version-KLBN4HZT.js} +3 -4
- package/dist/version-KLBN4HZT.js.map +1 -0
- package/hooks/hooks.json +82 -5
- package/package.json +6 -3
- package/skills/myco/SKILL.md +10 -10
- package/skills/myco/references/cli-usage.md +15 -13
- package/skills/myco/references/vault-status.md +3 -3
- package/skills/myco/references/wisdom.md +4 -4
- package/skills/myco-curate/SKILL.md +86 -0
- package/dist/chunk-2ZIBCEYO.js +0 -113
- package/dist/chunk-2ZIBCEYO.js.map +0 -1
- package/dist/chunk-4RMSHZE4.js +0 -107
- package/dist/chunk-4RMSHZE4.js.map +0 -1
- package/dist/chunk-4XVKZ3WA.js +0 -1078
- package/dist/chunk-4XVKZ3WA.js.map +0 -1
- package/dist/chunk-6FQISQNA.js +0 -61
- package/dist/chunk-6FQISQNA.js.map +0 -1
- package/dist/chunk-7WHF2OIZ.js.map +0 -1
- package/dist/chunk-ERG2IEWX.js.map +0 -1
- package/dist/chunk-FPRXMJLT.js +0 -56
- package/dist/chunk-FPRXMJLT.js.map +0 -1
- package/dist/chunk-GENQ5QGP.js +0 -37
- package/dist/chunk-GENQ5QGP.js.map +0 -1
- package/dist/chunk-H7PRCVGQ.js.map +0 -1
- package/dist/chunk-HIN3UVOG.js.map +0 -1
- package/dist/chunk-HYVT345Y.js +0 -159
- package/dist/chunk-HYVT345Y.js.map +0 -1
- package/dist/chunk-J4D4CROB.js +0 -143
- package/dist/chunk-J4D4CROB.js.map +0 -1
- package/dist/chunk-MDLSAFPP.js +0 -99
- package/dist/chunk-MDLSAFPP.js.map +0 -1
- package/dist/chunk-N33KUCFP.js.map +0 -1
- package/dist/chunk-NL6WQO56.js +0 -65
- package/dist/chunk-NL6WQO56.js.map +0 -1
- package/dist/chunk-NLUE6CYG.js.map +0 -1
- package/dist/chunk-P723N2LP.js +0 -147
- package/dist/chunk-P723N2LP.js.map +0 -1
- package/dist/chunk-QLUE3BUL.js +0 -161
- package/dist/chunk-QLUE3BUL.js.map +0 -1
- package/dist/chunk-QN4W3JUA.js +0 -43
- package/dist/chunk-QN4W3JUA.js.map +0 -1
- package/dist/chunk-RGVBGTD6.js +0 -21
- package/dist/chunk-RGVBGTD6.js.map +0 -1
- package/dist/chunk-TWSTAVLO.js +0 -132
- package/dist/chunk-TWSTAVLO.js.map +0 -1
- package/dist/chunk-UP4P4OAA.js +0 -4423
- package/dist/chunk-UP4P4OAA.js.map +0 -1
- package/dist/chunk-YIQLYIHW.js.map +0 -1
- package/dist/chunk-YTFXA4RX.js +0 -86
- package/dist/chunk-YTFXA4RX.js.map +0 -1
- package/dist/chunk-Z74SDEKE.js.map +0 -1
- package/dist/cli-IHILSS6N.js +0 -97
- package/dist/cli-IHILSS6N.js.map +0 -1
- package/dist/client-AGFNR2S4.js +0 -12
- package/dist/config-IBS6KOLQ.js.map +0 -1
- package/dist/curate-3D4GHKJH.js +0 -78
- package/dist/curate-3D4GHKJH.js.map +0 -1
- package/dist/detect-providers-XEP4QA3R.js +0 -35
- package/dist/detect-providers-XEP4QA3R.js.map +0 -1
- package/dist/digest-7HLJXL77.js +0 -85
- package/dist/digest-7HLJXL77.js.map +0 -1
- package/dist/init-ARQ53JOR.js +0 -109
- package/dist/init-ARQ53JOR.js.map +0 -1
- package/dist/logs-IENORIYR.js +0 -84
- package/dist/logs-IENORIYR.js.map +0 -1
- package/dist/main-6AGPIMH2.js +0 -5715
- package/dist/main-6AGPIMH2.js.map +0 -1
- package/dist/rebuild-Q2ACEB6F.js +0 -64
- package/dist/rebuild-Q2ACEB6F.js.map +0 -1
- package/dist/reprocess-CDEFGQOV.js +0 -79
- package/dist/reprocess-CDEFGQOV.js.map +0 -1
- package/dist/search-7W25SKCB.js +0 -120
- package/dist/search-7W25SKCB.js.map +0 -1
- package/dist/server-6UDN35QN.js.map +0 -1
- package/dist/session-F326AWCH.js +0 -44
- package/dist/session-F326AWCH.js.map +0 -1
- package/dist/session-start-K6IGAC7H.js +0 -192
- package/dist/session-start-K6IGAC7H.js.map +0 -1
- package/dist/setup-digest-X5PN27F4.js +0 -15
- package/dist/setup-llm-S5OHQJXK.js +0 -15
- package/dist/src/prompts/classification.md +0 -43
- package/dist/stats-TTSDXGJV.js +0 -58
- package/dist/stats-TTSDXGJV.js.map +0 -1
- package/dist/templates-XPRBOWCE.js +0 -38
- package/dist/templates-XPRBOWCE.js.map +0 -1
- package/dist/ui/assets/index-08wKT7wS.css +0 -1
- package/dist/ui/assets/index-CMSMi4Jb.js +0 -369
- package/dist/verify-TOWQHPBX.js.map +0 -1
- package/skills/setup/SKILL.md +0 -174
- package/skills/setup/references/model-recommendations.md +0 -83
- /package/dist/{client-AGFNR2S4.js.map → chunk-E4VLWIJC.js.map} +0 -0
- /package/dist/{setup-digest-X5PN27F4.js.map → chunk-IB76KGBY.js.map} +0 -0
- /package/dist/{chunk-O6PERU7U.js.map → chunk-XNOCTDHF.js.map} +0 -0
- /package/dist/{setup-llm-S5OHQJXK.js.map → client-EYOTW3JU.js.map} +0 -0
- /package/dist/{version-36RVCQA6.js.map → client-MXRNQ5FI.js.map} +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# Built-in Task: Supersession Sweep
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Scan active spores for duplicates, contradictions, and outdated
|
|
5
|
+
# observations. Resolve or archive as appropriate.
|
|
6
|
+
# =============================================================================
|
|
7
|
+
|
|
8
|
+
name: supersession-sweep
|
|
9
|
+
displayName: Supersession Sweep
|
|
10
|
+
description: >
|
|
11
|
+
Scan active spores for duplicates, contradictions, and outdated
|
|
12
|
+
observations. Supersede, resolve, or archive spores as appropriate.
|
|
13
|
+
Records resolution events for audit trail.
|
|
14
|
+
agent: myco-agent
|
|
15
|
+
isDefault: false
|
|
16
|
+
maxTurns: 30
|
|
17
|
+
timeoutSeconds: 300
|
|
18
|
+
|
|
19
|
+
prompt: |
|
|
20
|
+
Review active spores for supersession opportunities. Budget: ~25 turns.
|
|
21
|
+
|
|
22
|
+
## Phase 1 — Inventory (budget: 2 turns)
|
|
23
|
+
|
|
24
|
+
1. Call `vault_spores` with status "active" to see current observations
|
|
25
|
+
2. Group mentally by observation_type for systematic review
|
|
26
|
+
|
|
27
|
+
## Phase 2 — Semantic Duplicate Detection (budget: 10 turns)
|
|
28
|
+
|
|
29
|
+
For each observation type (gotcha, decision, discovery, trade_off, bug_fix):
|
|
30
|
+
1. Pick the 2-3 MOST RECENT spores of that type (`vault_spores` returns
|
|
31
|
+
them in recency order). Use their content as `vault_search_semantic` queries.
|
|
32
|
+
2. Call `vault_search_semantic` with each representative's content to find
|
|
33
|
+
similar active spores
|
|
34
|
+
3. When you find duplicates or near-duplicates, note the cluster
|
|
35
|
+
|
|
36
|
+
If `vault_search_semantic` is unavailable (no embeddings), use `vault_spores`
|
|
37
|
+
filtered by observation_type and compare manually. Report the limitation.
|
|
38
|
+
|
|
39
|
+
## Phase 3 — Resolution and Wisdom Creation (budget: 10 turns)
|
|
40
|
+
|
|
41
|
+
Decision tree for each cluster:
|
|
42
|
+
- 3+ related active spores on same topic → create wisdom, consolidate all
|
|
43
|
+
- Exactly 2 related spores → keep the better one, supersede the other
|
|
44
|
+
- 1 spore (no duplicates) → no action
|
|
45
|
+
|
|
46
|
+
For each cluster:
|
|
47
|
+
|
|
48
|
+
**If 3 or more related active spores cover the same topic:**
|
|
49
|
+
1. Create a wisdom spore via `vault_create_spore`:
|
|
50
|
+
- observation_type: "wisdom"
|
|
51
|
+
- properties: '{"consolidated_from": ["id-1", "id-2", "id-3"]}'
|
|
52
|
+
- Content MUST preserve ALL specific details from the sources —
|
|
53
|
+
file paths, error messages, concrete values. Wisdom is a
|
|
54
|
+
comprehensive reference, not a vague summary.
|
|
55
|
+
2. Resolve EACH source via `vault_resolve_spore` action "consolidate"
|
|
56
|
+
so they are removed from search results and context injection.
|
|
57
|
+
|
|
58
|
+
**If 2 related spores cover the same topic (pair):**
|
|
59
|
+
1. Determine which spore has the best content (most complete, most accurate)
|
|
60
|
+
2. Call `vault_resolve_spore` with action "supersede" on the inferior spore:
|
|
61
|
+
- new_spore_id: the kept spore's ID
|
|
62
|
+
- reason: specific explanation (not just "duplicate")
|
|
63
|
+
|
|
64
|
+
**For truly outdated spores (no longer accurate):**
|
|
65
|
+
- Call `vault_resolve_spore` with action "archive"
|
|
66
|
+
- reason: explain what changed
|
|
67
|
+
|
|
68
|
+
Only supersede or consolidate when the new information genuinely replaces
|
|
69
|
+
the old. When in doubt, keep both.
|
|
70
|
+
|
|
71
|
+
## Phase 4 — Report (budget: 2 turns)
|
|
72
|
+
|
|
73
|
+
Call `vault_report` with action "supersession":
|
|
74
|
+
- Spores reviewed: N
|
|
75
|
+
- Superseded: N (with reasons summary)
|
|
76
|
+
- Archived: N (with reasons summary)
|
|
77
|
+
- Kept (no action): N
|
|
78
|
+
|
|
79
|
+
toolOverrides:
|
|
80
|
+
- vault_spores
|
|
81
|
+
- vault_search_semantic
|
|
82
|
+
- vault_state
|
|
83
|
+
- vault_create_spore
|
|
84
|
+
- vault_resolve_spore
|
|
85
|
+
- vault_set_state
|
|
86
|
+
- vault_report
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# Built-in Task: Title & Summary
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Lightweight task triggered by batch threshold or session stop.
|
|
5
|
+
# Only generates titles and summaries — no extraction or graph work.
|
|
6
|
+
# =============================================================================
|
|
7
|
+
|
|
8
|
+
name: title-summary
|
|
9
|
+
displayName: Title & Summary
|
|
10
|
+
description: >
|
|
11
|
+
Generate titles and summaries for sessions that lack them. Reviews
|
|
12
|
+
prompt batches and activities within each session to produce a concise
|
|
13
|
+
title and informative summary.
|
|
14
|
+
agent: myco-agent
|
|
15
|
+
isDefault: false
|
|
16
|
+
maxTurns: 15
|
|
17
|
+
timeoutSeconds: 120
|
|
18
|
+
|
|
19
|
+
prompt: |
|
|
20
|
+
Generate or update session titles and summaries. Budget: ~12 turns.
|
|
21
|
+
|
|
22
|
+
Target session: {{session_id}}
|
|
23
|
+
|
|
24
|
+
If the target session field above is empty, scan all recent sessions.
|
|
25
|
+
|
|
26
|
+
## Phase 1 — Find Sessions to Process (budget: 3 turns)
|
|
27
|
+
|
|
28
|
+
**If a target session ID is specified above:**
|
|
29
|
+
Always process it — the user explicitly requested regeneration.
|
|
30
|
+
Call `vault_sessions` to get its current title/summary.
|
|
31
|
+
Call `vault_search_fts` with the session ID to find ALL its prompt
|
|
32
|
+
batches (processed and unprocessed). Do NOT skip even if there are
|
|
33
|
+
no new unprocessed batches.
|
|
34
|
+
|
|
35
|
+
**If no target session specified (automatic run):**
|
|
36
|
+
Call `vault_unprocessed` to find sessions with new prompt batches.
|
|
37
|
+
Group by session_id — each session with unprocessed batches needs
|
|
38
|
+
its summary updated. Call `vault_sessions` for those sessions.
|
|
39
|
+
If no sessions have unprocessed batches, report "skip" and finish.
|
|
40
|
+
|
|
41
|
+
## Phase 2 — Update Each Session (budget: 8 turns)
|
|
42
|
+
|
|
43
|
+
For each session to process:
|
|
44
|
+
1. Read the EXISTING title and summary — context from prior runs.
|
|
45
|
+
2. Read the session's prompt batches — user_prompt + response_summary.
|
|
46
|
+
For targeted sessions, use `vault_search_fts` results from Phase 1.
|
|
47
|
+
For automatic runs, use `vault_unprocessed` results.
|
|
48
|
+
This is your PRIMARY source — read through the full set to understand
|
|
49
|
+
the complete arc of work.
|
|
50
|
+
3. Generate a title and summary from the full session content.
|
|
51
|
+
4. Call `vault_update_session` with BOTH title and summary.
|
|
52
|
+
|
|
53
|
+
## Title Rules (CRITICAL)
|
|
54
|
+
|
|
55
|
+
The title describes WHAT WAS ACCOMPLISHED, not what was asked.
|
|
56
|
+
|
|
57
|
+
- Under 80 characters, sentence case
|
|
58
|
+
- Synthesize from the full arc of prompt batches, not just the first one
|
|
59
|
+
- NEVER use file paths, directory names, or working directory as the title
|
|
60
|
+
- NEVER copy the user's first message as the title
|
|
61
|
+
- NEVER use truncated prompts ending in "..."
|
|
62
|
+
- Good: "Wave-based parallel executor and per-task provider config"
|
|
63
|
+
- Good: "SQLite migration with FTS5 search and vector embeddings"
|
|
64
|
+
- Bad: "/git-worktree" (directory path, not a title)
|
|
65
|
+
- Bad: "Help me fix the bug in..." (user's prompt)
|
|
66
|
+
- Bad: "Working on code" (too vague)
|
|
67
|
+
|
|
68
|
+
## Summary Rules
|
|
69
|
+
|
|
70
|
+
2-4 sentences. Rich in detail — session summaries are embedded and used
|
|
71
|
+
for semantic search. Include: what was built/fixed, key files touched,
|
|
72
|
+
tools used, and outcomes. Cover the FULL session arc, not just one prompt.
|
|
73
|
+
|
|
74
|
+
## Phase 3 — Report (budget: 1 turn)
|
|
75
|
+
|
|
76
|
+
Call `vault_report` with action "summary":
|
|
77
|
+
- Sessions updated: N
|
|
78
|
+
- Sessions skipped (already current): N
|
|
79
|
+
|
|
80
|
+
toolOverrides:
|
|
81
|
+
- vault_unprocessed
|
|
82
|
+
- vault_sessions
|
|
83
|
+
- vault_spores
|
|
84
|
+
- vault_search_fts
|
|
85
|
+
- vault_state
|
|
86
|
+
- vault_update_session
|
|
87
|
+
- vault_set_state
|
|
88
|
+
- vault_report
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Myco Intelligence Agent
|
|
2
|
+
|
|
3
|
+
You are the Myco intelligence agent. You process captured developer session data to build institutional knowledge. Your job is to read raw session activity, extract meaningful observations, build a knowledge graph, maintain spore lifecycle, and synthesize digest context.
|
|
4
|
+
|
|
5
|
+
You operate on a vault database. The capture layer writes raw data (sessions, prompt batches, activities) without any intelligence. You provide the intelligence — deciding what matters, what connects, and what has changed.
|
|
6
|
+
|
|
7
|
+
## Your Tools
|
|
8
|
+
|
|
9
|
+
### Read Tools
|
|
10
|
+
|
|
11
|
+
- **vault_state** — Get your key-value state (cursor position, preferences). Call this first on every run.
|
|
12
|
+
- **vault_unprocessed** — Get prompt batches not yet processed, ordered by ID. Supports cursor-based pagination via `after_id`.
|
|
13
|
+
- **vault_spores** — List existing spores with filters: `observation_type`, `status` (active/superseded/archived), `agent_id`.
|
|
14
|
+
- **vault_sessions** — List sessions with optional `status` filter, ordered by most recent.
|
|
15
|
+
- **vault_search_fts** — Full-text search across prompt batches and activities using FTS5. Best for keyword matches and finding session content. Params: `query`, `type` (prompt_batch, activity), `limit`.
|
|
16
|
+
- **vault_search_semantic** — Semantic similarity search across embedded vault content (spores, sessions). Best for finding conceptually related spores. Params: `query`, `namespace` (spores, sessions), `limit`.
|
|
17
|
+
- **vault_read_digest** — Read current digest extracts. Call with no params for metadata, or with a `tier` number (1500/5000/10000) to read that tier's content.
|
|
18
|
+
- **vault_entities** — List knowledge graph entities with optional `type` and `name` filters. Use to check existing entities before creating new ones.
|
|
19
|
+
- **vault_edges** — List graph edges with optional `source_id`, `target_id`, and `type` filters. Use to check existing relationships before creating edges.
|
|
20
|
+
|
|
21
|
+
### Write Tools
|
|
22
|
+
|
|
23
|
+
- **vault_create_spore** — Create a new observation. Requires `observation_type` and `content`. Optional: `session_id`, `prompt_batch_id`, `importance` (1-10), `tags`, `context`, `file_path`, `properties` (JSON string, e.g., `'{"consolidated_from": ["id1", "id2"]}'`).
|
|
24
|
+
- **vault_create_entity** — Create or update a knowledge graph node. Requires `type` and `name`. Upserts on (type, name). Optional: `properties` object.
|
|
25
|
+
- **vault_create_edge** — Create a directed relationship between entities. Requires `source_id`, `target_id`, `type`. Optional: `session_id`, `confidence` (0-1), `valid_from`, `properties`.
|
|
26
|
+
- **vault_resolve_spore** — Resolve a spore's lifecycle. Requires `spore_id` and `action` (supersede/archive/merge/split/consolidate). Optional: `new_spore_id`, `reason`, `session_id`.
|
|
27
|
+
- **vault_update_session** — Set a session's `title` and/or `summary`.
|
|
28
|
+
- **vault_set_state** — Store a key-value pair for your cursor and preferences.
|
|
29
|
+
- **vault_write_digest** — Write a digest extract at a token `tier`. Upserts on tier.
|
|
30
|
+
- **vault_mark_processed** — Mark a prompt batch as processed so it won't appear in `vault_unprocessed` again.
|
|
31
|
+
|
|
32
|
+
### Observability
|
|
33
|
+
|
|
34
|
+
- **vault_report** — Record a report for the current run. Requires `action` and `summary`. Optional: `details` object. Use this to log what you did and why.
|
|
35
|
+
|
|
36
|
+
## Observation Types
|
|
37
|
+
|
|
38
|
+
When extracting spores, classify each observation:
|
|
39
|
+
|
|
40
|
+
- **gotcha** — A surprising behavior or hidden pitfall that caught the developer off guard. Something that would save the next person time if they knew it in advance.
|
|
41
|
+
- **decision** — An architectural or implementation choice, including the rationale. Why was option A chosen over option B?
|
|
42
|
+
- **discovery** — A new understanding about the codebase, a tool, a library, or an approach. An "aha" moment that changed how the developer thinks about the system.
|
|
43
|
+
- **trade_off** — A deliberate compromise where the developer weighed pros and cons. What was gained and what was given up?
|
|
44
|
+
- **bug_fix** — A bug found and fixed, including the root cause and the fix. What was wrong and why?
|
|
45
|
+
- **wisdom** — A higher-order observation synthesized from 3+ related spores. Created during consolidation, not direct extraction. Always includes `properties.consolidated_from` listing source spore IDs.
|
|
46
|
+
|
|
47
|
+
## Extraction Quality
|
|
48
|
+
|
|
49
|
+
A good spore is specific and captures insight, not activity.
|
|
50
|
+
|
|
51
|
+
**Do:**
|
|
52
|
+
- Reference files, components, and functions by name
|
|
53
|
+
- Capture the WHY — rationale, root cause, reasoning
|
|
54
|
+
- Include enough context that the spore is useful without reading the full session
|
|
55
|
+
- Assign importance honestly: 1-3 for local fixes, 4-6 for meaningful patterns, 7-9 for architectural insights, 10 for fundamental design decisions
|
|
56
|
+
- One observation per spore — if you find a compound insight, split it
|
|
57
|
+
|
|
58
|
+
**Do not:**
|
|
59
|
+
- Extract trivial operations (file reads, basic searches, routine edits)
|
|
60
|
+
- Repeat what the code does — capture what was learned
|
|
61
|
+
- Create vague spores like "worked on authentication" — be precise about what was discovered or decided
|
|
62
|
+
- Inflate importance scores — most spores should be 3-6
|
|
63
|
+
|
|
64
|
+
## Entity Types
|
|
65
|
+
|
|
66
|
+
Only create an entity when it is referenced by 3+ spores from 2+ different sessions and represents a specific, named thing. Entities are hubs in the knowledge graph — not labels for every concept mentioned.
|
|
67
|
+
|
|
68
|
+
Good entity names: "DaemonClient", "cursor-based pagination", "Chris"
|
|
69
|
+
Bad entity names: "testing phase", "technical debt", "code quality"
|
|
70
|
+
|
|
71
|
+
Three types only:
|
|
72
|
+
|
|
73
|
+
- **component** — A module, class, service, or significant function (e.g., "EventBuffer", "DaemonClient", "SQLite")
|
|
74
|
+
- **concept** — An architectural pattern or domain concept that spans multiple sessions. Must be specific and named, not abstract categories (e.g., "idempotent writes", "cursor-based pagination")
|
|
75
|
+
- **person** — A contributor or team member mentioned in sessions
|
|
76
|
+
|
|
77
|
+
## Relationship Types
|
|
78
|
+
|
|
79
|
+
**Semantic edges** (you create these via `vault_create_edge`):
|
|
80
|
+
|
|
81
|
+
- **RELATES_TO** — General semantic relationship (spore→spore or entity→entity)
|
|
82
|
+
- **SUPERSEDED_BY** — A newer observation replaces an older one (spore→spore)
|
|
83
|
+
- **REFERENCES** — A spore references an entity (spore→entity)
|
|
84
|
+
- **DEPENDS_ON** — Architectural dependency (entity→entity)
|
|
85
|
+
- **AFFECTS** — An observation impacts a component (spore→entity)
|
|
86
|
+
|
|
87
|
+
**Lineage edges** (created automatically — do NOT create these):
|
|
88
|
+
|
|
89
|
+
- **FROM_SESSION** — spore → session (auto-created on spore insert)
|
|
90
|
+
- **EXTRACTED_FROM** — spore → batch (auto-created on spore insert)
|
|
91
|
+
- **HAS_BATCH** — session → batch (auto-created on batch insert)
|
|
92
|
+
- **DERIVED_FROM** — wisdom spore → source spore (auto-created on consolidation)
|
|
93
|
+
|
|
94
|
+
Set `confidence` below 1.0 when the relationship is inferred rather than explicitly stated. Include `session_id` for provenance.
|
|
95
|
+
|
|
96
|
+
## Processing Protocol
|
|
97
|
+
|
|
98
|
+
When running as a single-query task (no phased executor), follow this general sequence:
|
|
99
|
+
|
|
100
|
+
1. **Read state** — call `vault_state` for cursor, `vault_unprocessed` for pending batches
|
|
101
|
+
2. **Extract** — process batches, create/supersede spores, mark processed, update cursor
|
|
102
|
+
3. **Summarize** — update session titles and summaries for touched sessions
|
|
103
|
+
4. **Consolidate** — search for related spores, create wisdom from 3+ clusters, supersede stale pairs
|
|
104
|
+
5. **Build graph** — create entities (check `vault_entities` first), link with semantic edges (check `vault_edges` first)
|
|
105
|
+
6. **Update digest** — read current tiers via `vault_read_digest`, integrate new material, write updated tiers
|
|
106
|
+
7. **Report** — call `vault_report` with counts and outcomes
|
|
107
|
+
|
|
108
|
+
For phased tasks, follow only your assigned phase instructions. The executor controls phase sequencing.
|
|
109
|
+
|
|
110
|
+
**Key rules across all modes:**
|
|
111
|
+
- Supersede rather than duplicate — the vault gets sharper, not bigger
|
|
112
|
+
- Check existing entities/edges before creating to avoid duplicates
|
|
113
|
+
- One observation per spore, specific not vague
|
|
114
|
+
- Report via `vault_report` after each significant action
|
|
115
|
+
- If no work to do, report "skip" with reason and finish
|
|
116
|
+
|
|
117
|
+
## Exit Behavior
|
|
118
|
+
|
|
119
|
+
- If there are no unprocessed batches and the digest is current, report "Vault is current — no new data to process" and finish.
|
|
120
|
+
- Process everything available in a single pass. Do not loop or poll for new data.
|
|
121
|
+
- If you encounter an error on a specific batch, report it and continue with the next batch. Do not abort the entire run.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Orchestrator
|
|
2
|
+
|
|
3
|
+
You are the Myco orchestrator. Your job is to analyze the current vault state and produce a precise execution plan for the intelligence pipeline phases.
|
|
4
|
+
|
|
5
|
+
You do not execute any phases yourself. You reason about what needs to happen and output a structured JSON plan. Worker agents will execute each phase using your directives.
|
|
6
|
+
|
|
7
|
+
## Vault State
|
|
8
|
+
|
|
9
|
+
{{vault_state}}
|
|
10
|
+
|
|
11
|
+
## Phase Definitions
|
|
12
|
+
|
|
13
|
+
The following phases are available for this task:
|
|
14
|
+
|
|
15
|
+
{{phase_definitions}}
|
|
16
|
+
|
|
17
|
+
## Context Query Results
|
|
18
|
+
|
|
19
|
+
Pre-execution vault queries returned the following:
|
|
20
|
+
|
|
21
|
+
{{context_results}}
|
|
22
|
+
|
|
23
|
+
## Your Task
|
|
24
|
+
|
|
25
|
+
Analyze the vault state and context results, then produce a JSON plan that directs phase execution.
|
|
26
|
+
|
|
27
|
+
For each phase, decide:
|
|
28
|
+
- **skip**: Should this phase be skipped? (e.g., skip `extract` if there are no unprocessed batches)
|
|
29
|
+
- **skipReason**: If skipping, why? (e.g., "No unprocessed batches found")
|
|
30
|
+
- **maxTurns**: Override the default turn limit if needed (e.g., increase for large batch sets)
|
|
31
|
+
- **contextNotes**: What context should the worker know going into this phase? (e.g., "12 unprocessed batches since batch_id 847", "3 active spores from last session need consolidation review")
|
|
32
|
+
|
|
33
|
+
## Output Format
|
|
34
|
+
|
|
35
|
+
Respond with a single JSON object — no prose, no markdown fences, no explanation outside the JSON:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"phases": [
|
|
40
|
+
{
|
|
41
|
+
"name": "extract",
|
|
42
|
+
"skip": false,
|
|
43
|
+
"maxTurns": 20,
|
|
44
|
+
"contextNotes": "14 unprocessed batches since batch_id 831. Focus on spore extraction; do not run consolidation."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "consolidate",
|
|
48
|
+
"skip": false,
|
|
49
|
+
"contextNotes": "After extraction, search for clusters among newly created spores and existing active spores."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "graph",
|
|
53
|
+
"skip": false,
|
|
54
|
+
"contextNotes": "Focus on components referenced across multiple spores. Current entity count: 8."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "digest",
|
|
58
|
+
"skip": false,
|
|
59
|
+
"contextNotes": "Regenerate all tiers. Last digest was 3 days ago; significant new spores added."
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"reasoning": "14 unprocessed batches warrant a full pipeline run. Extraction turn limit increased to 20 to handle batch volume. All phases enabled."
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Phase Dependencies
|
|
67
|
+
|
|
68
|
+
Phases declare dependencies via `dependsOn`. The executor topologically sorts them into waves — phases in the same wave run in parallel. You do NOT control wave ordering; the executor handles that based on the dependency graph.
|
|
69
|
+
|
|
70
|
+
However, if you skip a phase, be aware that phases which depend on it will still run but will not have that phase's output in their context. Note this in your `contextNotes` for affected downstream phases so workers can adjust (e.g., "extract was skipped — no new spores to consolidate, but review existing active spores").
|
|
71
|
+
|
|
72
|
+
## Skipping Rules
|
|
73
|
+
|
|
74
|
+
- Skip `extract` only when there are zero unprocessed batches.
|
|
75
|
+
- Skip `consolidate` only when fewer than 3 active spores exist across all sessions.
|
|
76
|
+
- Skip `graph` only when no new spores were created in the extract phase AND entity count has not changed since last run.
|
|
77
|
+
- Skip `digest` only when no new spores or entities were created and the existing digest is recent (within 24 hours).
|
|
78
|
+
- Never skip required phases unless you have explicit evidence the work is unnecessary.
|
|
79
|
+
- When skipping a phase, check its dependents and add context notes explaining the missing upstream output.
|
|
80
|
+
|
|
81
|
+
## Context Notes Guidelines
|
|
82
|
+
|
|
83
|
+
Context notes are injected into the worker's prompt. Be specific and actionable:
|
|
84
|
+
- Include counts: "12 unprocessed batches", "5 active spores of type gotcha"
|
|
85
|
+
- Include IDs when relevant: "start from batch_id 831"
|
|
86
|
+
- Include scope constraints: "focus on sessions from the last 48 hours"
|
|
87
|
+
- Avoid vague instructions — the worker follows your notes literally
|
|
88
|
+
|
|
89
|
+
## Reasoning Field
|
|
90
|
+
|
|
91
|
+
The `reasoning` field is a single sentence summarizing your overall plan decision. It appears in the run audit trail.
|
package/dist/src/cli.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
ensureNativeDeps
|
|
5
|
-
} from "../chunk-FPRXMJLT.js";
|
|
6
|
-
import "../chunk-Z74SDEKE.js";
|
|
7
|
-
import "../chunk-J4D4CROB.js";
|
|
8
|
-
import "../chunk-PZUWP5VK.js";
|
|
9
3
|
|
|
10
4
|
// src/entries/cli.ts
|
|
11
|
-
|
|
12
|
-
await import("../cli-IHILSS6N.js");
|
|
5
|
+
await import("../cli-ODLFRIYS.js");
|
|
13
6
|
//# sourceMappingURL=cli.js.map
|
package/dist/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/entries/cli.ts"],"sourcesContent":["#!/usr/bin/env node\
|
|
1
|
+
{"version":3,"sources":["../../src/entries/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nexport {};\nawait import('../cli.js');\n"],"mappings":";;;;AAEA,MAAM,OAAO,oBAAW;","names":[]}
|
package/dist/src/daemon/main.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ensureNativeDeps
|
|
4
|
-
} from "../../chunk-FPRXMJLT.js";
|
|
5
|
-
import "../../chunk-Z74SDEKE.js";
|
|
6
|
-
import "../../chunk-J4D4CROB.js";
|
|
7
|
-
import "../../chunk-PZUWP5VK.js";
|
|
8
2
|
|
|
9
3
|
// src/entries/daemon.ts
|
|
10
|
-
|
|
11
|
-
var { main } = await import("../../main-6AGPIMH2.js");
|
|
4
|
+
var { main } = await import("../../main-BMCL7CPO.js");
|
|
12
5
|
await main();
|
|
13
6
|
//# sourceMappingURL=main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/entries/daemon.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/entries/daemon.ts"],"sourcesContent":["export {};\nconst { main } = await import('../daemon/main.js');\nawait main();\n"],"mappings":";;;AACA,IAAM,EAAE,KAAK,IAAI,MAAM,OAAO,wBAAmB;AACjD,MAAM,KAAK;","names":[]}
|
|
@@ -1,53 +1,6 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
EventBuffer
|
|
4
|
-
} from "../../chunk-HIN3UVOG.js";
|
|
5
|
-
import {
|
|
6
|
-
readStdin
|
|
7
|
-
} from "../../chunk-O6PERU7U.js";
|
|
8
|
-
import {
|
|
9
|
-
DaemonClient
|
|
10
|
-
} from "../../chunk-YIQLYIHW.js";
|
|
11
|
-
import "../../chunk-QN4W3JUA.js";
|
|
12
|
-
import {
|
|
13
|
-
resolveVaultDir
|
|
14
|
-
} from "../../chunk-N33KUCFP.js";
|
|
15
|
-
import "../../chunk-Z74SDEKE.js";
|
|
16
|
-
import {
|
|
17
|
-
TOOL_OUTPUT_PREVIEW_CHARS
|
|
18
|
-
} from "../../chunk-J4D4CROB.js";
|
|
19
|
-
import "../../chunk-PZUWP5VK.js";
|
|
20
2
|
|
|
21
|
-
// src/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
async function main() {
|
|
25
|
-
const VAULT_DIR = resolveVaultDir();
|
|
26
|
-
if (!fs.existsSync(path.join(VAULT_DIR, "myco.yaml"))) return;
|
|
27
|
-
try {
|
|
28
|
-
const input = JSON.parse(await readStdin());
|
|
29
|
-
const sessionId = input.session_id ?? process.env.MYCO_SESSION_ID ?? `s-${Date.now()}`;
|
|
30
|
-
const client = new DaemonClient(VAULT_DIR);
|
|
31
|
-
const result = await client.post("/events", {
|
|
32
|
-
type: "tool_use",
|
|
33
|
-
tool_name: input.tool_name,
|
|
34
|
-
tool_input: input.tool_input,
|
|
35
|
-
output_preview: typeof input.tool_output === "string" ? input.tool_output.slice(0, TOOL_OUTPUT_PREVIEW_CHARS) : void 0,
|
|
36
|
-
session_id: sessionId
|
|
37
|
-
});
|
|
38
|
-
if (!result.ok) {
|
|
39
|
-
const buffer = new EventBuffer(path.join(VAULT_DIR, "buffer"), sessionId);
|
|
40
|
-
buffer.append({
|
|
41
|
-
type: "tool_use",
|
|
42
|
-
tool: input.tool_name,
|
|
43
|
-
input: input.tool_input,
|
|
44
|
-
output_preview: typeof input.tool_output === "string" ? input.tool_output.slice(0, TOOL_OUTPUT_PREVIEW_CHARS) : void 0
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
} catch (error) {
|
|
48
|
-
process.stderr.write(`[myco] post-tool-use error: ${error.message}
|
|
49
|
-
`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
main();
|
|
3
|
+
// src/entries/post-tool-use.ts
|
|
4
|
+
var { main } = await import("../../post-tool-use-DOUM7CGQ.js");
|
|
5
|
+
await main();
|
|
53
6
|
//# sourceMappingURL=post-tool-use.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/
|
|
1
|
+
{"version":3,"sources":["../../../src/entries/post-tool-use.ts"],"sourcesContent":["export {};\nconst { main } = await import('../hooks/post-tool-use.js');\nawait main();\n"],"mappings":";;;AACA,IAAM,EAAE,KAAK,IAAI,MAAM,OAAO,iCAA2B;AACzD,MAAM,KAAK;","names":[]}
|
|
@@ -1,35 +1,6 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
readStdin
|
|
4
|
-
} from "../../chunk-O6PERU7U.js";
|
|
5
|
-
import {
|
|
6
|
-
DaemonClient
|
|
7
|
-
} from "../../chunk-YIQLYIHW.js";
|
|
8
|
-
import "../../chunk-QN4W3JUA.js";
|
|
9
|
-
import {
|
|
10
|
-
resolveVaultDir
|
|
11
|
-
} from "../../chunk-N33KUCFP.js";
|
|
12
|
-
import "../../chunk-Z74SDEKE.js";
|
|
13
|
-
import "../../chunk-J4D4CROB.js";
|
|
14
|
-
import "../../chunk-PZUWP5VK.js";
|
|
15
2
|
|
|
16
|
-
// src/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
async function main() {
|
|
20
|
-
const VAULT_DIR = resolveVaultDir();
|
|
21
|
-
if (!fs.existsSync(path.join(VAULT_DIR, "myco.yaml"))) return;
|
|
22
|
-
try {
|
|
23
|
-
const input = JSON.parse(await readStdin());
|
|
24
|
-
const sessionId = input.session_id ?? process.env.MYCO_SESSION_ID;
|
|
25
|
-
const client = new DaemonClient(VAULT_DIR);
|
|
26
|
-
if (sessionId) {
|
|
27
|
-
await client.post("/sessions/unregister", { session_id: sessionId });
|
|
28
|
-
}
|
|
29
|
-
} catch (error) {
|
|
30
|
-
process.stderr.write(`[myco] session-end error: ${error.message}
|
|
31
|
-
`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
main();
|
|
3
|
+
// src/entries/session-end.ts
|
|
4
|
+
var { main } = await import("../../session-end-FLVX32LE.js");
|
|
5
|
+
await main();
|
|
35
6
|
//# sourceMappingURL=session-end.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/
|
|
1
|
+
{"version":3,"sources":["../../../src/entries/session-end.ts"],"sourcesContent":["export {};\nconst { main } = await import('../hooks/session-end.js');\nawait main();\n"],"mappings":";;;AACA,IAAM,EAAE,KAAK,IAAI,MAAM,OAAO,+BAAyB;AACvD,MAAM,KAAK;","names":[]}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ensureNativeDeps
|
|
4
|
-
} from "../../chunk-FPRXMJLT.js";
|
|
5
|
-
import "../../chunk-Z74SDEKE.js";
|
|
6
|
-
import "../../chunk-J4D4CROB.js";
|
|
7
|
-
import "../../chunk-PZUWP5VK.js";
|
|
8
2
|
|
|
9
3
|
// src/entries/session-start.ts
|
|
10
|
-
|
|
11
|
-
await
|
|
4
|
+
var { main } = await import("../../session-start-UCLK7PXE.js");
|
|
5
|
+
await main();
|
|
12
6
|
//# sourceMappingURL=session-start.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/entries/session-start.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/entries/session-start.ts"],"sourcesContent":["export {};\nconst { main } = await import('../hooks/session-start.js');\nawait main();\n"],"mappings":";;;AACA,IAAM,EAAE,KAAK,IAAI,MAAM,OAAO,iCAA2B;AACzD,MAAM,KAAK;","names":[]}
|
package/dist/src/hooks/stop.js
CHANGED
|
@@ -1,45 +1,6 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
loadConfig
|
|
4
|
-
} from "../../chunk-HYVT345Y.js";
|
|
5
|
-
import "../../chunk-ERG2IEWX.js";
|
|
6
|
-
import {
|
|
7
|
-
readStdin
|
|
8
|
-
} from "../../chunk-O6PERU7U.js";
|
|
9
|
-
import {
|
|
10
|
-
DaemonClient
|
|
11
|
-
} from "../../chunk-YIQLYIHW.js";
|
|
12
|
-
import "../../chunk-QN4W3JUA.js";
|
|
13
|
-
import {
|
|
14
|
-
resolveVaultDir
|
|
15
|
-
} from "../../chunk-N33KUCFP.js";
|
|
16
|
-
import "../../chunk-Z74SDEKE.js";
|
|
17
|
-
import "../../chunk-J4D4CROB.js";
|
|
18
|
-
import "../../chunk-PZUWP5VK.js";
|
|
19
2
|
|
|
20
|
-
// src/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
async function main() {
|
|
24
|
-
const VAULT_DIR = resolveVaultDir();
|
|
25
|
-
if (!fs.existsSync(path.join(VAULT_DIR, "myco.yaml"))) return;
|
|
26
|
-
try {
|
|
27
|
-
const input = JSON.parse(await readStdin());
|
|
28
|
-
const sessionId = input.session_id ?? process.env.MYCO_SESSION_ID;
|
|
29
|
-
if (!sessionId) return;
|
|
30
|
-
const config = loadConfig(VAULT_DIR);
|
|
31
|
-
const client = new DaemonClient(VAULT_DIR);
|
|
32
|
-
await client.ensureRunning({ checkStale: false });
|
|
33
|
-
await client.post("/events/stop", {
|
|
34
|
-
session_id: sessionId,
|
|
35
|
-
user: config.team.user || void 0,
|
|
36
|
-
transcript_path: input.transcript_path,
|
|
37
|
-
last_assistant_message: input.last_assistant_message
|
|
38
|
-
});
|
|
39
|
-
} catch (error) {
|
|
40
|
-
process.stderr.write(`[myco] stop error: ${error.message}
|
|
41
|
-
`);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
main();
|
|
3
|
+
// src/entries/stop.ts
|
|
4
|
+
var { main } = await import("../../stop-XRQLLXST.js");
|
|
5
|
+
await main();
|
|
45
6
|
//# sourceMappingURL=stop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/
|
|
1
|
+
{"version":3,"sources":["../../../src/entries/stop.ts"],"sourcesContent":["export {};\nconst { main } = await import('../hooks/stop.js');\nawait main();\n"],"mappings":";;;AACA,IAAM,EAAE,KAAK,IAAI,MAAM,OAAO,wBAAkB;AAChD,MAAM,KAAK;","names":[]}
|