@goondocks/myco 0.19.0 → 0.19.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/{agent-run-EADUYYAS.js → agent-run-4QUP3G4V.js} +7 -7
- package/dist/{agent-tasks-GC77JXQB.js → agent-tasks-NVOWYBLB.js} +7 -7
- package/dist/{chunk-MDEUXYJG.js → chunk-3C4LT4BW.js} +11 -6
- package/dist/chunk-3C4LT4BW.js.map +1 -0
- package/dist/{chunk-LLJMDXO2.js → chunk-3J6TUJSV.js} +3 -3
- package/dist/{chunk-2LN2BBKA.js → chunk-6DDRJQ4X.js} +2 -2
- package/dist/{chunk-YPWF322W.js → chunk-6ZDJXSEO.js} +3 -3
- package/dist/{chunk-2DF4OZ2D.js → chunk-7ONVLO43.js} +11 -6
- package/dist/chunk-7ONVLO43.js.map +1 -0
- package/dist/{chunk-INWD6AIQ.js → chunk-AULBWINA.js} +2 -2
- package/dist/{chunk-UW6DGPSV.js → chunk-D5X4MMKR.js} +3 -3
- package/dist/{chunk-2CKDAFSX.js → chunk-DDOPAV5O.js} +2 -2
- package/dist/{chunk-MVBCON4D.js → chunk-DURKJTVO.js} +2 -2
- package/dist/{chunk-REN37KYI.js → chunk-FGKCE5AE.js} +7 -2
- package/dist/chunk-FGKCE5AE.js.map +1 -0
- package/dist/{chunk-W4VHC2ES.js → chunk-I54KLC6H.js} +3 -1
- package/dist/{chunk-W4VHC2ES.js.map → chunk-I54KLC6H.js.map} +1 -1
- package/dist/{chunk-OZF5EURR.js → chunk-IXVAYN3P.js} +4 -4
- package/dist/{chunk-3TPD6HEF.js → chunk-KYH4V4ML.js} +3 -3
- package/dist/{team-N6TXS2PF.js → chunk-PLYWR5D7.js} +246 -61
- package/dist/chunk-PLYWR5D7.js.map +1 -0
- package/dist/{chunk-KSXTNYXO.js → chunk-PMT2LSTQ.js} +2 -2
- package/dist/{chunk-AELJ4PS5.js → chunk-Q4QD6LJT.js} +5 -5
- package/dist/{chunk-2OO3BRFK.js → chunk-Q6OEZM3S.js} +26 -2
- package/dist/chunk-Q6OEZM3S.js.map +1 -0
- package/dist/{chunk-CYBC2HZ3.js → chunk-QMTXVFA7.js} +3 -3
- package/dist/{chunk-RXROZBSK.js → chunk-THZKOZ4M.js} +419 -410
- package/dist/chunk-THZKOZ4M.js.map +1 -0
- package/dist/{chunk-E7NUADTQ.js → chunk-UUHLLQXO.js} +2 -1
- package/dist/{chunk-E7NUADTQ.js.map → chunk-UUHLLQXO.js.map} +1 -1
- package/dist/{chunk-SCI55NKY.js → chunk-VQF5E4ZX.js} +2 -2
- package/dist/{chunk-MS6FDV45.js → chunk-WKNAKQKA.js} +2 -2
- package/dist/{chunk-N77K772N.js → chunk-XMPCB2P2.js} +5 -5
- package/dist/chunk-XMPCB2P2.js.map +1 -0
- package/dist/{cli-X7CFP4YD.js → cli-GDHPLWS7.js} +41 -41
- package/dist/{client-YA33HUFY.js → client-UCELFVZF.js} +5 -5
- package/dist/{config-RFB2DJC6.js → config-2KQ45OC5.js} +4 -4
- package/dist/{detect-providers-2OQBU4VX.js → detect-providers-2EY55EHK.js} +5 -5
- package/dist/{doctor-FAH7N66M.js → doctor-7ATZHQIY.js} +11 -11
- package/dist/{executor-ICTRRUBY.js → executor-YO4RIKJQ.js} +55 -35
- package/dist/executor-YO4RIKJQ.js.map +1 -0
- package/dist/{init-PTJEOTJV.js → init-OK5QJISX.js} +12 -12
- package/dist/{llm-7D2OGDEK.js → llm-SWDDQQWY.js} +5 -5
- package/dist/{loader-VPE4RCIF.js → loader-AAZ6VUIA.js} +4 -4
- package/dist/{loader-O2JFO2UC.js → loader-JG5OBPB6.js} +4 -4
- package/dist/{logs-TMKNLSJY.js → logs-KNKPQE5A.js} +3 -3
- package/dist/{main-EIKBLOUL.js → main-XWJGDDMZ.js} +115 -72
- package/dist/main-XWJGDDMZ.js.map +1 -0
- package/dist/{open-2JCSOLZS.js → open-5WOOLDUZ.js} +7 -7
- package/dist/{post-compact-2HPPWPBI.js → post-compact-TLIJUMKZ.js} +7 -7
- package/dist/{post-tool-use-TWBBBABS.js → post-tool-use-TMYBAFL6.js} +6 -6
- package/dist/{post-tool-use-failure-LIJYR4KL.js → post-tool-use-failure-P7YHR3EO.js} +7 -7
- package/dist/{pre-compact-II2CMNTG.js → pre-compact-7RUNVXOE.js} +7 -7
- package/dist/{provider-check-KEQNQ6LO.js → provider-check-WCM3SDTM.js} +5 -5
- package/dist/{registry-X5FDGYXT.js → registry-OCM4WAPJ.js} +5 -5
- package/dist/{remove-L5MVYBOY.js → remove-ISEIHY5H.js} +8 -8
- package/dist/{resolution-events-MVIZMONR.js → resolution-events-PYLSI6QT.js} +5 -5
- package/dist/{restart-VIT3JBD6.js → restart-AK24G2ME.js} +8 -8
- package/dist/{search-O6BB5MTO.js → search-RVRUKLEH.js} +8 -8
- package/dist/{server-O3UPJVBR.js → server-GBWW5MBT.js} +5 -5
- package/dist/{session-5JV3DQIK.js → session-L7PGGZTO.js} +9 -9
- package/dist/{session-end-PZ2OXBGG.js → session-end-YURB7CFB.js} +6 -6
- package/dist/{session-start-FDGM56BX.js → session-start-4AMHWOBP.js} +11 -11
- package/dist/{setup-llm-MQK557BB.js → setup-llm-2UOSVGAY.js} +8 -8
- package/dist/src/agent/definitions/tasks/title-summary.yaml +9 -8
- package/dist/src/cli.js +1 -1
- package/dist/src/daemon/main.js +1 -1
- package/dist/src/hooks/post-tool-use.js +1 -1
- package/dist/src/hooks/session-end.js +1 -1
- package/dist/src/hooks/session-start.js +1 -1
- package/dist/src/hooks/stop.js +1 -1
- package/dist/src/hooks/user-prompt-submit.js +1 -1
- package/dist/src/mcp/server.js +1 -1
- package/dist/{stats-2STTARTC.js → stats-5IEO4KWT.js} +9 -9
- package/dist/{stop-WNKCMCGO.js → stop-KRR3EBB2.js} +6 -6
- package/dist/{stop-failure-6GTOBVTN.js → stop-failure-6RZAWIDM.js} +7 -7
- package/dist/{subagent-start-VJF5YKVX.js → subagent-start-R62O6YPW.js} +7 -7
- package/dist/{subagent-stop-UW6HMICY.js → subagent-stop-MP2YDF6D.js} +7 -7
- package/dist/{task-completed-U4Q3XXLX.js → task-completed-KCMJYZT7.js} +7 -7
- package/dist/team-M6TC4TFC.js +22 -0
- package/dist/ui/assets/{index-CHIm98OP.js → index-CwPuGRsJ.js} +102 -102
- package/dist/ui/index.html +1 -1
- package/dist/{update-ZYCOWKMD.js → update-L5JXTKPL.js} +8 -8
- package/dist/{user-prompt-submit-SOYL4OWF.js → user-prompt-submit-L6JNZ7QY.js} +6 -6
- package/dist/{verify-P37PQ4YM.js → verify-CJHF23QH.js} +6 -6
- package/dist/{version-XAWC277D.js → version-PFOYY6HT.js} +2 -2
- package/dist/version-PFOYY6HT.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-2DF4OZ2D.js.map +0 -1
- package/dist/chunk-2OO3BRFK.js.map +0 -1
- package/dist/chunk-EM63ZFKA.js +0 -166
- package/dist/chunk-EM63ZFKA.js.map +0 -1
- package/dist/chunk-MDEUXYJG.js.map +0 -1
- package/dist/chunk-N77K772N.js.map +0 -1
- package/dist/chunk-REN37KYI.js.map +0 -1
- package/dist/chunk-RXROZBSK.js.map +0 -1
- package/dist/executor-ICTRRUBY.js.map +0 -1
- package/dist/main-EIKBLOUL.js.map +0 -1
- package/dist/team-N6TXS2PF.js.map +0 -1
- /package/dist/{agent-run-EADUYYAS.js.map → agent-run-4QUP3G4V.js.map} +0 -0
- /package/dist/{agent-tasks-GC77JXQB.js.map → agent-tasks-NVOWYBLB.js.map} +0 -0
- /package/dist/{chunk-LLJMDXO2.js.map → chunk-3J6TUJSV.js.map} +0 -0
- /package/dist/{chunk-2LN2BBKA.js.map → chunk-6DDRJQ4X.js.map} +0 -0
- /package/dist/{chunk-YPWF322W.js.map → chunk-6ZDJXSEO.js.map} +0 -0
- /package/dist/{chunk-INWD6AIQ.js.map → chunk-AULBWINA.js.map} +0 -0
- /package/dist/{chunk-UW6DGPSV.js.map → chunk-D5X4MMKR.js.map} +0 -0
- /package/dist/{chunk-2CKDAFSX.js.map → chunk-DDOPAV5O.js.map} +0 -0
- /package/dist/{chunk-MVBCON4D.js.map → chunk-DURKJTVO.js.map} +0 -0
- /package/dist/{chunk-OZF5EURR.js.map → chunk-IXVAYN3P.js.map} +0 -0
- /package/dist/{chunk-3TPD6HEF.js.map → chunk-KYH4V4ML.js.map} +0 -0
- /package/dist/{chunk-KSXTNYXO.js.map → chunk-PMT2LSTQ.js.map} +0 -0
- /package/dist/{chunk-AELJ4PS5.js.map → chunk-Q4QD6LJT.js.map} +0 -0
- /package/dist/{chunk-CYBC2HZ3.js.map → chunk-QMTXVFA7.js.map} +0 -0
- /package/dist/{chunk-SCI55NKY.js.map → chunk-VQF5E4ZX.js.map} +0 -0
- /package/dist/{chunk-MS6FDV45.js.map → chunk-WKNAKQKA.js.map} +0 -0
- /package/dist/{cli-X7CFP4YD.js.map → cli-GDHPLWS7.js.map} +0 -0
- /package/dist/{client-YA33HUFY.js.map → client-UCELFVZF.js.map} +0 -0
- /package/dist/{config-RFB2DJC6.js.map → config-2KQ45OC5.js.map} +0 -0
- /package/dist/{detect-providers-2OQBU4VX.js.map → detect-providers-2EY55EHK.js.map} +0 -0
- /package/dist/{doctor-FAH7N66M.js.map → doctor-7ATZHQIY.js.map} +0 -0
- /package/dist/{init-PTJEOTJV.js.map → init-OK5QJISX.js.map} +0 -0
- /package/dist/{llm-7D2OGDEK.js.map → llm-SWDDQQWY.js.map} +0 -0
- /package/dist/{loader-O2JFO2UC.js.map → loader-AAZ6VUIA.js.map} +0 -0
- /package/dist/{loader-VPE4RCIF.js.map → loader-JG5OBPB6.js.map} +0 -0
- /package/dist/{logs-TMKNLSJY.js.map → logs-KNKPQE5A.js.map} +0 -0
- /package/dist/{open-2JCSOLZS.js.map → open-5WOOLDUZ.js.map} +0 -0
- /package/dist/{post-compact-2HPPWPBI.js.map → post-compact-TLIJUMKZ.js.map} +0 -0
- /package/dist/{post-tool-use-TWBBBABS.js.map → post-tool-use-TMYBAFL6.js.map} +0 -0
- /package/dist/{post-tool-use-failure-LIJYR4KL.js.map → post-tool-use-failure-P7YHR3EO.js.map} +0 -0
- /package/dist/{pre-compact-II2CMNTG.js.map → pre-compact-7RUNVXOE.js.map} +0 -0
- /package/dist/{provider-check-KEQNQ6LO.js.map → provider-check-WCM3SDTM.js.map} +0 -0
- /package/dist/{registry-X5FDGYXT.js.map → registry-OCM4WAPJ.js.map} +0 -0
- /package/dist/{remove-L5MVYBOY.js.map → remove-ISEIHY5H.js.map} +0 -0
- /package/dist/{resolution-events-MVIZMONR.js.map → resolution-events-PYLSI6QT.js.map} +0 -0
- /package/dist/{restart-VIT3JBD6.js.map → restart-AK24G2ME.js.map} +0 -0
- /package/dist/{search-O6BB5MTO.js.map → search-RVRUKLEH.js.map} +0 -0
- /package/dist/{server-O3UPJVBR.js.map → server-GBWW5MBT.js.map} +0 -0
- /package/dist/{session-5JV3DQIK.js.map → session-L7PGGZTO.js.map} +0 -0
- /package/dist/{session-end-PZ2OXBGG.js.map → session-end-YURB7CFB.js.map} +0 -0
- /package/dist/{session-start-FDGM56BX.js.map → session-start-4AMHWOBP.js.map} +0 -0
- /package/dist/{setup-llm-MQK557BB.js.map → setup-llm-2UOSVGAY.js.map} +0 -0
- /package/dist/{stats-2STTARTC.js.map → stats-5IEO4KWT.js.map} +0 -0
- /package/dist/{stop-WNKCMCGO.js.map → stop-KRR3EBB2.js.map} +0 -0
- /package/dist/{stop-failure-6GTOBVTN.js.map → stop-failure-6RZAWIDM.js.map} +0 -0
- /package/dist/{subagent-start-VJF5YKVX.js.map → subagent-start-R62O6YPW.js.map} +0 -0
- /package/dist/{subagent-stop-UW6HMICY.js.map → subagent-stop-MP2YDF6D.js.map} +0 -0
- /package/dist/{task-completed-U4Q3XXLX.js.map → task-completed-KCMJYZT7.js.map} +0 -0
- /package/dist/{version-XAWC277D.js.map → team-M6TC4TFC.js.map} +0 -0
- /package/dist/{update-ZYCOWKMD.js.map → update-L5JXTKPL.js.map} +0 -0
- /package/dist/{user-prompt-submit-SOYL4OWF.js.map → user-prompt-submit-L6JNZ7QY.js.map} +0 -0
- /package/dist/{verify-P37PQ4YM.js.map → verify-CJHF23QH.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants/update.ts","../src/constants.ts"],"sourcesContent":["import path from 'node:path';\nimport os from 'node:os';\n\n/** npm registry base URL for Myco packages. */\nexport const NPM_REGISTRY_BASE_URL = 'https://registry.npmjs.org';\n\n/** Global Myco directory for machine-wide state. */\nexport const MYCO_GLOBAL_DIR = path.join(os.homedir(), '.myco');\n\n/** Path to the cached update check result. */\nexport const UPDATE_CHECK_CACHE_PATH = path.join(MYCO_GLOBAL_DIR, 'last-update-check.json');\n\n/** Path to the update configuration file (channel, interval). */\nexport const UPDATE_CONFIG_PATH = path.join(MYCO_GLOBAL_DIR, 'update.yaml');\n\n/** Path to the update error file (written by update script on failure). */\nexport const UPDATE_ERROR_PATH = path.join(MYCO_GLOBAL_DIR, 'update-error.json');\n\n/** Filename for the version stamp written by `myco update` (lives inside vault .myco/). */\nexport const UPDATE_STAMP_FILENAME = 'last-update-version';\n\n/** Filename for the restart reason signal file (lives inside vault .myco/). */\nexport const RESTART_REASON_FILENAME = 'restart-reason.json';\n\n/** Default check interval in hours. */\nexport const UPDATE_CHECK_INTERVAL_HOURS = 6;\n\n/** Milliseconds per hour. */\nexport const MS_PER_HOUR = 3_600_000;\n\n/** Primary Myco npm package name. */\nexport const NPM_PACKAGE_NAME = '@goondocks/myco';\n\n/** Optional standalone Myco Team package name. */\nexport const TEAM_PACKAGE_NAME = '@goondocks/myco-team';\n\n/** Optional standalone Myco Collective package name. */\nexport const COLLECTIVE_PACKAGE_NAME = '@goondocks/myco-collective';\n\n/** Global-package update targets shown in the Operations UI. */\nexport const UPDATE_PACKAGES = [\n { id: 'myco', packageName: NPM_PACKAGE_NAME, displayName: 'Myco' },\n { id: 'myco-team', packageName: TEAM_PACKAGE_NAME, displayName: 'Myco Team' },\n { id: 'myco-collective', packageName: COLLECTIVE_PACKAGE_NAME, displayName: 'Myco Collective' },\n] as const;\nexport type UpdatePackageId = (typeof UPDATE_PACKAGES)[number]['id'];\n\n/** Delay in seconds before update script starts (allows daemon to exit). */\nexport const UPDATE_SCRIPT_DELAY_SECONDS = 2;\n\n/** Valid release channels. */\nexport const RELEASE_CHANNELS = ['stable', 'beta'] as const;\nexport type ReleaseChannel = (typeof RELEASE_CHANNELS)[number];\n\n/** Default release channel. */\nexport const DEFAULT_RELEASE_CHANNEL: ReleaseChannel = 'stable';\n","/**\n * Shared constants for the Myco codebase.\n * Per CLAUDE.md: \"No Magic Literals — Numeric and string constants\n * MUST NOT appear inline in logic.\"\n */\n\nexport { LOG_KINDS, type LogKind, kindToComponent } from './constants/log-kinds.js';\n\n// --- Agent phase prompt composition ---\n/**\n * Maximum chars per phase summary passed to subsequent phases.\n * Set to 4000 to ensure the digest-assess phase findings pass\n * untruncated to parallel tier phases.\n */\nexport const PHASE_SUMMARY_MAX_CHARS = 4000;\n\n// --- Token estimation ---\n/** Approximate characters per token for the chars/4 heuristic. */\nexport const CHARS_PER_TOKEN = 4;\n\n/** Estimate token count from character length using the CHARS_PER_TOKEN heuristic. */\nexport function estimateTokens(text: string): number {\n return Math.ceil(text.length / CHARS_PER_TOKEN);\n}\n\n// --- Time (primitives — must precede derived constants) ---\n/** Milliseconds per second. */\nexport const MS_PER_SECOND = 1000;\n\n// --- Embedding ---\n/** Max characters of text sent to the embedding model. */\nexport const EMBEDDING_INPUT_LIMIT = 8000;\n\n/** Max rows per embedding worker cycle. */\nexport const EMBEDDING_BATCH_SIZE = 10;\n\n/** Content hash algorithm for staleness detection. */\nexport const CONTENT_HASH_ALGORITHM = 'sha256';\n\n// --- Truncation limits (display/preview) ---\n/** Max chars for a user prompt preview in event summaries. */\nexport const PROMPT_PREVIEW_CHARS = 300;\n/** Max chars for an AI response preview in event summaries. */\nexport const AI_RESPONSE_PREVIEW_CHARS = 500;\n/** Max chars for a command string preview. */\nexport const COMMAND_PREVIEW_CHARS = 80;\n/** Max chars for a content snippet in search results. */\nexport const CONTENT_SNIPPET_CHARS = 120;\n/** Max chars for a tool output preview in hooks. */\nexport const TOOL_OUTPUT_PREVIEW_CHARS = 200;\n/** Max chars for a session summary preview in MCP tools. */\nexport const SESSION_SUMMARY_PREVIEW_CHARS = 300;\n/** Max chars for a recall summary preview. */\nexport const RECALL_SUMMARY_PREVIEW_CHARS = 200;\n/** Max chars for search result and hydrated context previews. */\nexport const SEARCH_PREVIEW_CHARS = 300;\n\n// --- Log preview limits (short previews for structured log fields) ---\n/** Max chars for a user prompt preview in log entries. */\nexport const LOG_PROMPT_PREVIEW_CHARS = 50;\n/** Max chars for an assistant message preview in log entries. */\nexport const LOG_MESSAGE_PREVIEW_CHARS = 80;\n\n// --- Context injection layer budgets (chars, not tokens — used with .slice()) ---\nexport const CONTEXT_SESSION_PREVIEW_CHARS = 80;\nexport const CONTEXT_SPORE_PREVIEW_CHARS = 80;\n\n// --- Processor maxTokens budgets ---\n/** Response token budget for observation extraction. */\nexport const EXTRACTION_MAX_TOKENS = 2048;\n/** Response token budget for session summary. */\nexport const SUMMARY_MAX_TOKENS = 512;\n/** Response token budget for session title generation. */\nexport const TITLE_MAX_TOKENS = 32;\n\n// --- Timeouts ---\n/** Daemon client HTTP request timeout (ms). */\nexport const DAEMON_CLIENT_TIMEOUT_MS = 2000;\n/** Health check timeout (ms) — fail fast if daemon isn't responding. */\nexport const DAEMON_HEALTH_CHECK_TIMEOUT_MS = 500;\n/** LLM request timeout (ms). All LLM calls are background daemon work — no need to be aggressive. */\nexport const LLM_REQUEST_TIMEOUT_MS = 180_000;\n/** Embedding request timeout (ms). Embeddings run in background batch processing — generous timeout. */\nexport const EMBEDDING_REQUEST_TIMEOUT_MS = 60_000;\n/** Digest LLM request timeout (ms). Digest cycles use large context windows and may need model loading time. */\nexport const DIGEST_LLM_REQUEST_TIMEOUT_MS = 600_000;\n/** Stdin read timeout for hooks (ms). */\nexport const STDIN_TIMEOUT_MS = 100;\n/** Provider detection timeout for detect-providers CLI command (ms). */\nexport const PROVIDER_DETECT_TIMEOUT_MS = 3000;\n\n// --- Time ---\n/** Milliseconds in one day. */\nexport const MS_PER_DAY = 24 * 60 * 60 * 1000;\n\n/** Current Unix epoch in seconds. */\nexport function epochSeconds(): number {\n return Math.floor(Date.now() / MS_PER_SECOND);\n}\n\n// --- Buffer cleanup ---\n/** Max age for stale buffer files before cleanup (ms). */\nexport const STALE_BUFFER_MAX_AGE_MS = 1 * MS_PER_DAY;\n\n// --- Retry backoff ---\n/** Retry delays for daemon health check (ms). */\nexport const DAEMON_HEALTH_RETRY_DELAYS = [100, 200, 400, 800, 1500];\n\n/** Grace period after daemon.json is written before stale checks can trigger a restart (ms).\n * Prevents rapid restart loops from concurrent hooks or session reloads. */\nexport const DAEMON_STALE_GRACE_PERIOD_MS = 60_000;\n\n/** Grace period for SIGTERM before escalating to SIGKILL (ms).\n * Gives the old daemon a chance to shut down cleanly, but force-kills\n * to guarantee the configured port is reclaimed. */\nexport const DAEMON_EVICT_TIMEOUT_MS = 3000;\n/** Poll interval when waiting for an evicted daemon to die (ms). */\nexport const DAEMON_EVICT_POLL_MS = 100;\n\n// --- Slug limits ---\n/** Max length for slugified artifact IDs. */\n\n// --- Turn rendering ---\n/** Max file paths displayed per turn in session notes. */\nexport const TURN_MAX_FILES_DISPLAYED = 10;\n\n// --- Transcript mining ---\n/** Minimum content length to consider a transcript entry meaningful. */\nexport const MIN_TRANSCRIPT_CONTENT_LENGTH = 10;\n\n// --- Graph edge types (lineage — auto-created by daemon) ---\n/** Spore was extracted during this session. */\nexport const EDGE_TYPE_FROM_SESSION = 'FROM_SESSION';\n/** Spore was extracted from this prompt batch. */\nexport const EDGE_TYPE_EXTRACTED_FROM = 'EXTRACTED_FROM';\n/** Wisdom spore was derived from (consolidated) this source spore. */\nexport const EDGE_TYPE_DERIVED_FROM = 'DERIVED_FROM';\n/** Session contains this prompt batch. */\nexport const EDGE_TYPE_HAS_BATCH = 'HAS_BATCH';\n// --- Query defaults ---\n/** Default row limit for query module list operations. */\nexport const QUERY_DEFAULT_LIST_LIMIT = 100;\n/** Default LIMIT for paginated list queries. */\nexport const DEFAULT_LIST_LIMIT = 50;\n/** Default confidence score for graph edges. */\nexport const GRAPH_EDGE_DEFAULT_CONFIDENCE = 1.0;\n\n// --- Query limits ---\n/** Max recent sessions to check for lineage heuristics. */\nexport const LINEAGE_RECENT_SESSIONS_LIMIT = 5;\n/** Max related spores to query for session notes. */\nexport const RELATED_SPORES_LIMIT = 50;\n\n// --- Context injection ---\n/** Max spores to inject per prompt. */\nexport const PROMPT_CONTEXT_MAX_SPORES = 3;\n/** Minimum similarity score for prompt context injection (0-1). */\nexport const PROMPT_CONTEXT_MIN_SIMILARITY = 0.3;\n/** Max token budget for session-start context injection. */\nexport const SESSION_CONTEXT_MAX_TOKENS = 500;\n/** Max token budget for per-prompt context injection. */\nexport const PROMPT_CONTEXT_MAX_TOKENS = 300;\n/** Minimum prompt length to trigger context search. */\nexport const PROMPT_CONTEXT_MIN_LENGTH = 10;\n\n/** Over-fetch multiplier for vector search to compensate for post-filtering. */\nexport const PROMPT_VECTOR_OVER_FETCH = 2;\n\n// --- Spore status filtering ---\n/** Spore statuses excluded from search results and context injection. */\nexport const EXCLUDED_SPORE_STATUSES = new Set(['superseded', 'archived']);\n\n// --- Agent identity ---\n/** Default agent ID for the built-in intelligence agent. */\nexport const DEFAULT_AGENT_ID = 'myco-agent';\n/** Agent ID for user-initiated MCP operations. */\nexport const USER_AGENT_ID = 'user';\n/** Agent name for user-initiated MCP operations. */\nexport const USER_AGENT_NAME = 'User (MCP)';\n\n// --- MCP tool defaults ---\n/** Default result limit for myco_search. */\nexport const MCP_SEARCH_DEFAULT_LIMIT = 10;\n/** Default result limit for myco_sessions. */\nexport const MCP_SESSIONS_DEFAULT_LIMIT = 20;\n/** Default result limit for myco_logs. */\nexport const MCP_LOGS_DEFAULT_LIMIT = 50;\n/** Default result limit for myco_skills and myco_skill_candidates. */\nexport const MCP_SKILLS_DEFAULT_LIMIT = 50;\n\n// --- Feed ---\n/** Default number of entries returned by the activity feed. */\nexport const FEED_DEFAULT_LIMIT = 50;\n\n// --- Digest — Tiers ---\n/** Available token-budget tiers for digest synthesis. */\nexport const DIGEST_TIERS = [1500, 5000, 10000] as const;\nexport type DigestTier = (typeof DIGEST_TIERS)[number];\n\n// --- Digest — Context window minimums per tier ---\n/** Minimum context window (tokens) required to run a digest at a given tier. */\nexport const DIGEST_TIER_MIN_CONTEXT: Record<number, number> = {\n 1500: 6500,\n 5000: 18500,\n 10000: 30500,\n};\n\n// --- Digest — Substrate ---\n/** Default minimum substrate notes required before a digest cycle runs. */\nexport const DIGEST_MIN_NOTES_FOR_CYCLE = 10;\n\n/** Scoring weights by note type when selecting substrate for synthesis. */\nexport const DIGEST_SUBSTRATE_TYPE_WEIGHTS: Record<string, number> = {\n session: 3,\n spore: 3,\n plan: 2,\n artifact: 1,\n team: 1,\n};\n\n// --- LLM reasoning control ---\n/** Reasoning mode for all Myco LLM calls. Suppresses chain-of-thought tokens from reasoning models. */\nexport const LLM_REASONING_MODE = 'off' as const;\n\n// --- Digest — System prompt overhead estimate ---\n\n// --- Vault intelligence ---\n/** Max candidate spores after post-filtering for supersession check. */\nexport const SUPERSESSION_CANDIDATE_LIMIT = 5;\n\n/** Over-fetch from vector index before post-filtering by status/type. */\nexport const SUPERSESSION_VECTOR_FETCH_LIMIT = 20;\n\n/** Max output tokens for supersession LLM evaluation. */\nexport const SUPERSESSION_MAX_TOKENS = 256;\n\n/** Similarity threshold for clustering related spores in batch agent processing. */\nexport const AGENT_CLUSTER_SIMILARITY = 0.75;\n\n// --- Search ---\n/** Default number of results returned by vector search and fullTextSearch. */\nexport const SEARCH_RESULTS_DEFAULT_LIMIT = 20;\n/** Minimum cosine similarity score for semantic search results (0-1). */\nexport const SEARCH_SIMILARITY_THRESHOLD = 0.3;\n\n// --- Pipeline processing ---\n/** Default page size for pipeline items API listing. */\nexport const PIPELINE_ITEMS_DEFAULT_LIMIT = 50;\n\n// --- Pipeline retry ---\n/** Max retries for parse (structural) pipeline failures — fail fast. */\nexport const PIPELINE_PARSE_MAX_RETRIES = 1;\n/** Exponential backoff multiplier for successive pipeline retries. */\nexport const PIPELINE_BACKOFF_MULTIPLIER = 4;\n\n// --- Pipeline stages (ordered) ---\nexport const PIPELINE_STAGES = ['capture', 'extraction', 'embedding', 'consolidation', 'digest'] as const;\nexport type PipelineStage = typeof PIPELINE_STAGES[number];\n\n// --- Pipeline statuses ---\nexport const PIPELINE_STATUSES = ['pending', 'processing', 'succeeded', 'failed', 'blocked', 'skipped', 'poisoned'] as const;\nexport type PipelineStatus = typeof PIPELINE_STATUSES[number];\n\n// --- Provider roles for circuit breakers ---\nexport const PIPELINE_PROVIDER_ROLES = ['llm', 'embedding', 'digest-llm'] as const;\nexport type PipelineProviderRole = typeof PIPELINE_PROVIDER_ROLES[number];\n\n// --- Stage to provider role mapping ---\nexport const STAGE_PROVIDER_MAP: Record<PipelineStage, PipelineProviderRole | null> = {\n capture: null,\n extraction: 'llm',\n embedding: 'embedding',\n consolidation: 'digest-llm',\n digest: 'digest-llm',\n};\n\n/**\n * Stages processed by the pipeline tick timer.\n * Capture is handled at registration time, digest is gated by the metabolism timer.\n */\nexport const PIPELINE_TICK_STAGES: PipelineStage[] = ['extraction', 'embedding', 'consolidation'];\n\n// --- Item type to applicable stages ---\n// Sessions skip consolidation — consolidation applies to the spores\n// extracted FROM sessions, not the session work item itself.\n// Lineage detection stays outside the pipeline (fire-and-forget, non-critical).\nexport const ITEM_STAGE_MAP: Record<string, PipelineStage[]> = {\n session: ['capture', 'extraction', 'embedding', 'digest'],\n spore: ['capture', 'embedding', 'consolidation', 'digest'],\n artifact: ['capture', 'embedding', 'digest'],\n};\n\n// --- User task registry ---\n/** Subdirectory within the vault for user-created task YAML files. */\nexport const USER_TASKS_DIR = 'tasks';\n\n/** Source label for user-created tasks. */\nexport const USER_TASK_SOURCE = 'user';\n\n/** Source label for built-in tasks shipped with the package. */\nexport const BUILT_IN_SOURCE = 'built-in';\n\n/** Task name validation pattern (lowercase, hyphens, digits). */\nexport const TASK_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$/;\n\n/** Maximum length for task names. */\nexport const MAX_TASK_NAME_LENGTH = 50;\n\n// --- Automatic consolidation ---\n/** Minimum cluster size required before asking LLM to consolidate. */\nexport const CONSOLIDATION_MIN_CLUSTER_SIZE = 3;\n\n/** Over-fetch from vector index before post-filtering by status/type. */\nexport const CONSOLIDATION_VECTOR_FETCH_LIMIT = 20;\n\n/** Max output tokens for consolidation LLM synthesis.\n * Must be large enough for the full JSON response including content field. */\nexport const CONSOLIDATION_MAX_TOKENS = 2048;\n\n// --- Power management ---\n/** PowerManager states valid for task scheduling (excludes deep_sleep which halts all ticks). */\nexport const SCHEDULABLE_POWER_STATES = ['active', 'idle', 'sleep'] as const;\nexport type SchedulablePowerState = typeof SCHEDULABLE_POWER_STATES[number];\n\n/** Time without activity before transitioning to idle (ms). */\nexport const POWER_IDLE_THRESHOLD_MS = 5 * 60 * MS_PER_SECOND;\n/** Time without activity before transitioning to sleep (ms). */\nexport const POWER_SLEEP_THRESHOLD_MS = 30 * 60 * MS_PER_SECOND;\n/** Time without activity before transitioning to deep sleep (ms). */\nexport const POWER_DEEP_SLEEP_THRESHOLD_MS = 90 * 60 * MS_PER_SECOND;\n/** Job cycle interval during active/idle states (ms). */\nexport const POWER_ACTIVE_INTERVAL_MS = 60 * MS_PER_SECOND;\n/** Job cycle interval during sleep state (ms). */\nexport const POWER_SLEEP_INTERVAL_MS = 5 * 60 * MS_PER_SECOND;\n\n// --- Session maintenance ---\n/** Time without new prompts before an active session is auto-completed (ms). */\nexport const STALE_SESSION_THRESHOLD_MS = 60 * 60 * MS_PER_SECOND;\n/**\n * Max prompt count for a session to be considered dead and auto-deleted.\n *\n * Set to 0: only sessions that were registered but never received a prompt\n * are eligible for dead-session cleanup. A session with even ONE real user\n * prompt has produced captured state worth preserving — the user did work,\n * the agent likely responded, tool calls may have happened, code may have\n * changed. Deleting such a session was a real data-loss failure mode seen\n * during opencode testing where a 1-prompt session that made an actual\n * committed code change was auto-deleted within a minute of TUI exit.\n */\nexport const DEAD_SESSION_MAX_PROMPTS = 0;\n\n// --- Init wizard ---\n/** Minimum Node.js major version required by Myco. */\nexport const MIN_NODE_MAJOR_VERSION = 22;\n\n/** Recommended context window for local intelligence models. */\nexport const RECOMMENDED_LOCAL_CONTEXT_WINDOW = 8192;\n\n/** Default Ollama embedding model recommended during init. */\nexport const DEFAULT_OLLAMA_EMBEDDING_MODEL = 'bge-m3';\n\n/** Default OpenAI embedding model recommended during init. */\nexport const DEFAULT_OPENAI_EMBEDDING_MODEL = 'text-embedding-3-small';\n\n// --- Sync protocol ---\n/** Protocol version for backup and team sync wire format. */\nexport const SYNC_PROTOCOL_VERSION = 1;\n\n// --- Team sync ---\n/** Default machine ID for rows created before multi-machine support. */\nexport const DEFAULT_MACHINE_ID = 'local';\n/** Prefix for team search result source attribution. */\nexport const TEAM_SOURCE_PREFIX = 'team:';\n/** Timeout for team search requests (ms). */\nexport const TEAM_SEARCH_TIMEOUT_MS = 3000;\n/** Timeout for team health check requests (ms). */\nexport const TEAM_HEALTH_TIMEOUT_MS = 5000;\n/** Secrets key for the team API key in secrets.env. */\nexport const TEAM_API_KEY_SECRET = 'MYCO_TEAM_API_KEY';\n/** Timeout for wrangler CLI commands (ms). */\nexport const WRANGLER_COMMAND_TIMEOUT_MS = 60_000;\n\n// --- HTTP response flush ---\n/** Delay before initiating shutdown — allows the HTTP response to flush. */\nexport const RESTART_RESPONSE_FLUSH_MS = 500;\n\n// --- Self-update ---\nexport {\n NPM_REGISTRY_BASE_URL,\n MYCO_GLOBAL_DIR,\n UPDATE_CHECK_CACHE_PATH,\n UPDATE_CONFIG_PATH,\n UPDATE_ERROR_PATH,\n UPDATE_CHECK_INTERVAL_HOURS,\n MS_PER_HOUR,\n NPM_PACKAGE_NAME,\n UPDATE_SCRIPT_DELAY_SECONDS,\n RELEASE_CHANNELS,\n DEFAULT_RELEASE_CHANNEL,\n type ReleaseChannel,\n} from './constants/update.js';\n"],"mappings":"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","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/constants/update.ts","../src/constants.ts"],"sourcesContent":["import path from 'node:path';\nimport os from 'node:os';\n\n/** npm registry base URL for Myco packages. */\nexport const NPM_REGISTRY_BASE_URL = 'https://registry.npmjs.org';\n\n/** Global Myco directory for machine-wide state. */\nexport const MYCO_GLOBAL_DIR = path.join(os.homedir(), '.myco');\n\n/** Path to the cached update check result. */\nexport const UPDATE_CHECK_CACHE_PATH = path.join(MYCO_GLOBAL_DIR, 'last-update-check.json');\n\n/** Path to the update configuration file (channel, interval). */\nexport const UPDATE_CONFIG_PATH = path.join(MYCO_GLOBAL_DIR, 'update.yaml');\n\n/** Path to the update error file (written by update script on failure). */\nexport const UPDATE_ERROR_PATH = path.join(MYCO_GLOBAL_DIR, 'update-error.json');\n\n/** Filename for the version stamp written by `myco update` (lives inside vault .myco/). */\nexport const UPDATE_STAMP_FILENAME = 'last-update-version';\n\n/** Filename for the restart reason signal file (lives inside vault .myco/). */\nexport const RESTART_REASON_FILENAME = 'restart-reason.json';\n\n/** Default check interval in hours. */\nexport const UPDATE_CHECK_INTERVAL_HOURS = 6;\n\n/** Milliseconds per hour. */\nexport const MS_PER_HOUR = 3_600_000;\n\n/** Primary Myco npm package name. */\nexport const NPM_PACKAGE_NAME = '@goondocks/myco';\n\n/** Optional standalone Myco Team package name. */\nexport const TEAM_PACKAGE_NAME = '@goondocks/myco-team';\n\n/** Optional standalone Myco Collective package name. */\nexport const COLLECTIVE_PACKAGE_NAME = '@goondocks/myco-collective';\n\n/** Global-package update targets shown in the Operations UI. */\nexport const UPDATE_PACKAGES = [\n { id: 'myco', packageName: NPM_PACKAGE_NAME, displayName: 'Myco' },\n { id: 'myco-team', packageName: TEAM_PACKAGE_NAME, displayName: 'Myco Team' },\n { id: 'myco-collective', packageName: COLLECTIVE_PACKAGE_NAME, displayName: 'Myco Collective' },\n] as const;\nexport type UpdatePackageId = (typeof UPDATE_PACKAGES)[number]['id'];\n\n/** Delay in seconds before update script starts (allows daemon to exit). */\nexport const UPDATE_SCRIPT_DELAY_SECONDS = 2;\n\n/** Valid release channels. */\nexport const RELEASE_CHANNELS = ['stable', 'beta'] as const;\nexport type ReleaseChannel = (typeof RELEASE_CHANNELS)[number];\n\n/** Default release channel. */\nexport const DEFAULT_RELEASE_CHANNEL: ReleaseChannel = 'stable';\n","/**\n * Shared constants for the Myco codebase.\n * Per CLAUDE.md: \"No Magic Literals — Numeric and string constants\n * MUST NOT appear inline in logic.\"\n */\n\nexport { LOG_KINDS, type LogKind, kindToComponent } from './constants/log-kinds.js';\n\n// --- Agent phase prompt composition ---\n/**\n * Maximum chars per phase summary passed to subsequent phases.\n * Set to 4000 to ensure the digest-assess phase findings pass\n * untruncated to parallel tier phases.\n */\nexport const PHASE_SUMMARY_MAX_CHARS = 4000;\n\n// --- Token estimation ---\n/** Approximate characters per token for the chars/4 heuristic. */\nexport const CHARS_PER_TOKEN = 4;\n\n/** Estimate token count from character length using the CHARS_PER_TOKEN heuristic. */\nexport function estimateTokens(text: string): number {\n return Math.ceil(text.length / CHARS_PER_TOKEN);\n}\n\n// --- Time (primitives — must precede derived constants) ---\n/** Milliseconds per second. */\nexport const MS_PER_SECOND = 1000;\n\n// --- Embedding ---\n/** Max characters of text sent to the embedding model. */\nexport const EMBEDDING_INPUT_LIMIT = 8000;\n\n/** Max rows per embedding worker cycle. */\nexport const EMBEDDING_BATCH_SIZE = 10;\n\n/** Content hash algorithm for staleness detection. */\nexport const CONTENT_HASH_ALGORITHM = 'sha256';\n\n// --- Truncation limits (display/preview) ---\n/** Max chars for a user prompt preview in event summaries. */\nexport const PROMPT_PREVIEW_CHARS = 300;\n/** Max chars for an AI response preview in event summaries. */\nexport const AI_RESPONSE_PREVIEW_CHARS = 500;\n/** Max chars for a command string preview. */\nexport const COMMAND_PREVIEW_CHARS = 80;\n/** Max chars for a content snippet in search results. */\nexport const CONTENT_SNIPPET_CHARS = 120;\n/** Max chars for a tool output preview in hooks. */\nexport const TOOL_OUTPUT_PREVIEW_CHARS = 200;\n/** Max chars for a session summary preview in MCP tools. */\nexport const SESSION_SUMMARY_PREVIEW_CHARS = 300;\n/** Max chars for a recall summary preview. */\nexport const RECALL_SUMMARY_PREVIEW_CHARS = 200;\n/** Max chars for search result and hydrated context previews. */\nexport const SEARCH_PREVIEW_CHARS = 300;\n\n// --- Log preview limits (short previews for structured log fields) ---\n/** Max chars for a user prompt preview in log entries. */\nexport const LOG_PROMPT_PREVIEW_CHARS = 50;\n/** Max chars for an assistant message preview in log entries. */\nexport const LOG_MESSAGE_PREVIEW_CHARS = 80;\n\n// --- Context injection layer budgets (chars, not tokens — used with .slice()) ---\nexport const CONTEXT_SESSION_PREVIEW_CHARS = 80;\nexport const CONTEXT_SPORE_PREVIEW_CHARS = 80;\n\n// --- Processor maxTokens budgets ---\n/** Response token budget for observation extraction. */\nexport const EXTRACTION_MAX_TOKENS = 2048;\n/** Response token budget for session summary. */\nexport const SUMMARY_MAX_TOKENS = 512;\n/** Response token budget for session title generation. */\nexport const TITLE_MAX_TOKENS = 32;\n\n// --- Timeouts ---\n/** Daemon client HTTP request timeout (ms). */\nexport const DAEMON_CLIENT_TIMEOUT_MS = 2000;\n/** Health check timeout (ms) — fail fast if daemon isn't responding. */\nexport const DAEMON_HEALTH_CHECK_TIMEOUT_MS = 500;\n/** LLM request timeout (ms). All LLM calls are background daemon work — no need to be aggressive. */\nexport const LLM_REQUEST_TIMEOUT_MS = 180_000;\n/** Embedding request timeout (ms). Embeddings run in background batch processing — generous timeout. */\nexport const EMBEDDING_REQUEST_TIMEOUT_MS = 60_000;\n/** Digest LLM request timeout (ms). Digest cycles use large context windows and may need model loading time. */\nexport const DIGEST_LLM_REQUEST_TIMEOUT_MS = 600_000;\n/** Stdin read timeout for hooks (ms). */\nexport const STDIN_TIMEOUT_MS = 100;\n/** Provider detection timeout for detect-providers CLI command (ms). */\nexport const PROVIDER_DETECT_TIMEOUT_MS = 3000;\n\n// --- Time ---\n/** Milliseconds in one day. */\nexport const MS_PER_DAY = 24 * 60 * 60 * 1000;\n\n/** Current Unix epoch in seconds. */\nexport function epochSeconds(): number {\n return Math.floor(Date.now() / MS_PER_SECOND);\n}\n\n// --- Buffer cleanup ---\n/** Max age for stale buffer files before cleanup (ms). */\nexport const STALE_BUFFER_MAX_AGE_MS = 1 * MS_PER_DAY;\n\n// --- Retry backoff ---\n/** Retry delays for daemon health check (ms). */\nexport const DAEMON_HEALTH_RETRY_DELAYS = [100, 200, 400, 800, 1500];\n\n/** Grace period after daemon.json is written before stale checks can trigger a restart (ms).\n * Prevents rapid restart loops from concurrent hooks or session reloads. */\nexport const DAEMON_STALE_GRACE_PERIOD_MS = 60_000;\n\n/** Grace period for SIGTERM before escalating to SIGKILL (ms).\n * Gives the old daemon a chance to shut down cleanly, but force-kills\n * to guarantee the configured port is reclaimed. */\nexport const DAEMON_EVICT_TIMEOUT_MS = 3000;\n/** Poll interval when waiting for an evicted daemon to die (ms). */\nexport const DAEMON_EVICT_POLL_MS = 100;\n\n// --- Slug limits ---\n/** Max length for slugified artifact IDs. */\n\n// --- Turn rendering ---\n/** Max file paths displayed per turn in session notes. */\nexport const TURN_MAX_FILES_DISPLAYED = 10;\n\n// --- Transcript mining ---\n/** Minimum content length to consider a transcript entry meaningful. */\nexport const MIN_TRANSCRIPT_CONTENT_LENGTH = 10;\n\n// --- Graph edge types (lineage — auto-created by daemon) ---\n/** Spore was extracted during this session. */\nexport const EDGE_TYPE_FROM_SESSION = 'FROM_SESSION';\n/** Spore was extracted from this prompt batch. */\nexport const EDGE_TYPE_EXTRACTED_FROM = 'EXTRACTED_FROM';\n/** Wisdom spore was derived from (consolidated) this source spore. */\nexport const EDGE_TYPE_DERIVED_FROM = 'DERIVED_FROM';\n/** Session contains this prompt batch. */\nexport const EDGE_TYPE_HAS_BATCH = 'HAS_BATCH';\n// --- Query defaults ---\n/** Default row limit for query module list operations. */\nexport const QUERY_DEFAULT_LIST_LIMIT = 100;\n/** Default LIMIT for paginated list queries. */\nexport const DEFAULT_LIST_LIMIT = 50;\n/** Default confidence score for graph edges. */\nexport const GRAPH_EDGE_DEFAULT_CONFIDENCE = 1.0;\n\n// --- Query limits ---\n/** Max recent sessions to check for lineage heuristics. */\nexport const LINEAGE_RECENT_SESSIONS_LIMIT = 5;\n/** Max related spores to query for session notes. */\nexport const RELATED_SPORES_LIMIT = 50;\n\n// --- Context injection ---\n/** Max spores to inject per prompt. */\nexport const PROMPT_CONTEXT_MAX_SPORES = 3;\n/** Minimum similarity score for prompt context injection (0-1). */\nexport const PROMPT_CONTEXT_MIN_SIMILARITY = 0.3;\n/** Max token budget for session-start context injection. */\nexport const SESSION_CONTEXT_MAX_TOKENS = 500;\n/** Max token budget for per-prompt context injection. */\nexport const PROMPT_CONTEXT_MAX_TOKENS = 300;\n/** Minimum prompt length to trigger context search. */\nexport const PROMPT_CONTEXT_MIN_LENGTH = 10;\n\n/** Over-fetch multiplier for vector search to compensate for post-filtering. */\nexport const PROMPT_VECTOR_OVER_FETCH = 2;\n\n// --- Spore status filtering ---\n/** Spore statuses excluded from search results and context injection. */\nexport const EXCLUDED_SPORE_STATUSES = new Set(['superseded', 'archived']);\n\n// --- Agent identity ---\n/** Default agent ID for the built-in intelligence agent. */\nexport const DEFAULT_AGENT_ID = 'myco-agent';\n/** Agent ID for user-initiated MCP operations. */\nexport const USER_AGENT_ID = 'user';\n/** Agent name for user-initiated MCP operations. */\nexport const USER_AGENT_NAME = 'User (MCP)';\n\n// --- MCP tool defaults ---\n/** Default result limit for myco_search. */\nexport const MCP_SEARCH_DEFAULT_LIMIT = 10;\n/** Default result limit for myco_sessions. */\nexport const MCP_SESSIONS_DEFAULT_LIMIT = 20;\n/** Default result limit for myco_logs. */\nexport const MCP_LOGS_DEFAULT_LIMIT = 50;\n/** Default result limit for myco_skills and myco_skill_candidates. */\nexport const MCP_SKILLS_DEFAULT_LIMIT = 50;\n\n// --- Feed ---\n/** Default number of entries returned by the activity feed. */\nexport const FEED_DEFAULT_LIMIT = 50;\n\n// --- Digest — Tiers ---\n/** Available token-budget tiers for digest synthesis. */\nexport const DIGEST_TIERS = [1500, 5000, 10000] as const;\nexport type DigestTier = (typeof DIGEST_TIERS)[number];\n\n// --- Digest — Context window minimums per tier ---\n/** Minimum context window (tokens) required to run a digest at a given tier. */\nexport const DIGEST_TIER_MIN_CONTEXT: Record<number, number> = {\n 1500: 6500,\n 5000: 18500,\n 10000: 30500,\n};\n\n// --- Digest — Substrate ---\n/** Default minimum substrate notes required before a digest cycle runs. */\nexport const DIGEST_MIN_NOTES_FOR_CYCLE = 10;\n\n/** Scoring weights by note type when selecting substrate for synthesis. */\nexport const DIGEST_SUBSTRATE_TYPE_WEIGHTS: Record<string, number> = {\n session: 3,\n spore: 3,\n plan: 2,\n artifact: 1,\n team: 1,\n};\n\n// --- LLM reasoning control ---\n/** Reasoning mode for all Myco LLM calls. Suppresses chain-of-thought tokens from reasoning models. */\nexport const LLM_REASONING_MODE = 'off' as const;\n\n// --- Digest — System prompt overhead estimate ---\n\n// --- Vault intelligence ---\n/** Max candidate spores after post-filtering for supersession check. */\nexport const SUPERSESSION_CANDIDATE_LIMIT = 5;\n\n/** Over-fetch from vector index before post-filtering by status/type. */\nexport const SUPERSESSION_VECTOR_FETCH_LIMIT = 20;\n\n/** Max output tokens for supersession LLM evaluation. */\nexport const SUPERSESSION_MAX_TOKENS = 256;\n\n/** Similarity threshold for clustering related spores in batch agent processing. */\nexport const AGENT_CLUSTER_SIMILARITY = 0.75;\n\n// --- Search ---\n/** Default number of results returned by vector search and fullTextSearch. */\nexport const SEARCH_RESULTS_DEFAULT_LIMIT = 20;\n/** Minimum cosine similarity score for semantic search results (0-1). */\nexport const SEARCH_SIMILARITY_THRESHOLD = 0.3;\n\n// --- Pipeline processing ---\n/** Default page size for pipeline items API listing. */\nexport const PIPELINE_ITEMS_DEFAULT_LIMIT = 50;\n\n// --- Pipeline retry ---\n/** Max retries for parse (structural) pipeline failures — fail fast. */\nexport const PIPELINE_PARSE_MAX_RETRIES = 1;\n/** Exponential backoff multiplier for successive pipeline retries. */\nexport const PIPELINE_BACKOFF_MULTIPLIER = 4;\n\n// --- Pipeline stages (ordered) ---\nexport const PIPELINE_STAGES = ['capture', 'extraction', 'embedding', 'consolidation', 'digest'] as const;\nexport type PipelineStage = typeof PIPELINE_STAGES[number];\n\n// --- Pipeline statuses ---\nexport const PIPELINE_STATUSES = ['pending', 'processing', 'succeeded', 'failed', 'blocked', 'skipped', 'poisoned'] as const;\nexport type PipelineStatus = typeof PIPELINE_STATUSES[number];\n\n// --- Provider roles for circuit breakers ---\nexport const PIPELINE_PROVIDER_ROLES = ['llm', 'embedding', 'digest-llm'] as const;\nexport type PipelineProviderRole = typeof PIPELINE_PROVIDER_ROLES[number];\n\n// --- Stage to provider role mapping ---\nexport const STAGE_PROVIDER_MAP: Record<PipelineStage, PipelineProviderRole | null> = {\n capture: null,\n extraction: 'llm',\n embedding: 'embedding',\n consolidation: 'digest-llm',\n digest: 'digest-llm',\n};\n\n/**\n * Stages processed by the pipeline tick timer.\n * Capture is handled at registration time, digest is gated by the metabolism timer.\n */\nexport const PIPELINE_TICK_STAGES: PipelineStage[] = ['extraction', 'embedding', 'consolidation'];\n\n// --- Item type to applicable stages ---\n// Sessions skip consolidation — consolidation applies to the spores\n// extracted FROM sessions, not the session work item itself.\n// Lineage detection stays outside the pipeline (fire-and-forget, non-critical).\nexport const ITEM_STAGE_MAP: Record<string, PipelineStage[]> = {\n session: ['capture', 'extraction', 'embedding', 'digest'],\n spore: ['capture', 'embedding', 'consolidation', 'digest'],\n artifact: ['capture', 'embedding', 'digest'],\n};\n\n// --- User task registry ---\n/** Subdirectory within the vault for user-created task YAML files. */\nexport const USER_TASKS_DIR = 'tasks';\n\n/** Source label for user-created tasks. */\nexport const USER_TASK_SOURCE = 'user';\n\n/** Source label for built-in tasks shipped with the package. */\nexport const BUILT_IN_SOURCE = 'built-in';\n\n/** Task name validation pattern (lowercase, hyphens, digits). */\nexport const TASK_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$/;\n\n/** Maximum length for task names. */\nexport const MAX_TASK_NAME_LENGTH = 50;\n\n// --- Automatic consolidation ---\n/** Minimum cluster size required before asking LLM to consolidate. */\nexport const CONSOLIDATION_MIN_CLUSTER_SIZE = 3;\n\n/** Over-fetch from vector index before post-filtering by status/type. */\nexport const CONSOLIDATION_VECTOR_FETCH_LIMIT = 20;\n\n/** Max output tokens for consolidation LLM synthesis.\n * Must be large enough for the full JSON response including content field. */\nexport const CONSOLIDATION_MAX_TOKENS = 2048;\n\n// --- Power management ---\n/** PowerManager states valid for task scheduling (excludes deep_sleep which halts all ticks). */\nexport const SCHEDULABLE_POWER_STATES = ['active', 'idle', 'sleep'] as const;\nexport type SchedulablePowerState = typeof SCHEDULABLE_POWER_STATES[number];\n\n/** Time without activity before transitioning to idle (ms). */\nexport const POWER_IDLE_THRESHOLD_MS = 5 * 60 * MS_PER_SECOND;\n/** Time without activity before transitioning to sleep (ms). */\nexport const POWER_SLEEP_THRESHOLD_MS = 30 * 60 * MS_PER_SECOND;\n/** Time without activity before transitioning to deep sleep (ms). */\nexport const POWER_DEEP_SLEEP_THRESHOLD_MS = 90 * 60 * MS_PER_SECOND;\n/** Job cycle interval during active/idle states (ms). */\nexport const POWER_ACTIVE_INTERVAL_MS = 60 * MS_PER_SECOND;\n/** Job cycle interval during sleep state (ms). */\nexport const POWER_SLEEP_INTERVAL_MS = 5 * 60 * MS_PER_SECOND;\n\n// --- Session maintenance ---\n/** Time without new prompts before an active session is auto-completed (ms). */\nexport const STALE_SESSION_THRESHOLD_MS = 60 * 60 * MS_PER_SECOND;\n/**\n * Max prompt count for a session to be considered dead and auto-deleted.\n *\n * Set to 0: only sessions that were registered but never received a prompt\n * are eligible for dead-session cleanup. A session with even ONE real user\n * prompt has produced captured state worth preserving — the user did work,\n * the agent likely responded, tool calls may have happened, code may have\n * changed. Deleting such a session was a real data-loss failure mode seen\n * during opencode testing where a 1-prompt session that made an actual\n * committed code change was auto-deleted within a minute of TUI exit.\n */\nexport const DEAD_SESSION_MAX_PROMPTS = 0;\n\n// --- Init wizard ---\n/** Minimum Node.js major version required by Myco. */\nexport const MIN_NODE_MAJOR_VERSION = 22;\n\n/** Recommended context window for local intelligence models. */\nexport const RECOMMENDED_LOCAL_CONTEXT_WINDOW = 8192;\n\n/** Default Ollama embedding model recommended during init. */\nexport const DEFAULT_OLLAMA_EMBEDDING_MODEL = 'bge-m3';\n\n/** Default OpenAI embedding model recommended during init. */\nexport const DEFAULT_OPENAI_EMBEDDING_MODEL = 'text-embedding-3-small';\n\n// --- Sync protocol ---\n/** Protocol version for backup and team sync wire format. */\nexport const SYNC_PROTOCOL_VERSION = 1;\n\n// --- Team sync ---\n/** Default machine ID for rows created before multi-machine support. */\nexport const DEFAULT_MACHINE_ID = 'local';\n/** Prefix for team search result source attribution. */\nexport const TEAM_SOURCE_PREFIX = 'team:';\n/** Timeout for team search requests (ms). */\nexport const TEAM_SEARCH_TIMEOUT_MS = 3000;\n/** Timeout for team health check requests (ms). */\nexport const TEAM_HEALTH_TIMEOUT_MS = 5000;\n/** Secrets key for the team API key in secrets.env. */\nexport const TEAM_API_KEY_SECRET = 'MYCO_TEAM_API_KEY';\n/** Secrets key for the team MCP token in secrets.env. */\nexport const TEAM_MCP_TOKEN_SECRET = 'MYCO_TEAM_MCP_TOKEN';\n/** Secrets key for the Collective admin token in secrets.env. */\nexport const COLLECTIVE_ADMIN_TOKEN_SECRET = 'MYCO_COLLECTIVE_ADMIN_TOKEN';\n/** Secrets key for the Collective MCP token in secrets.env. */\nexport const COLLECTIVE_MCP_TOKEN_SECRET = 'MYCO_COLLECTIVE_MCP_TOKEN';\n/** Timeout for wrangler CLI commands (ms). */\nexport const WRANGLER_COMMAND_TIMEOUT_MS = 60_000;\n\n// --- HTTP response flush ---\n/** Delay before initiating shutdown — allows the HTTP response to flush. */\nexport const RESTART_RESPONSE_FLUSH_MS = 500;\n\n// --- Self-update ---\nexport {\n NPM_REGISTRY_BASE_URL,\n MYCO_GLOBAL_DIR,\n UPDATE_CHECK_CACHE_PATH,\n UPDATE_CONFIG_PATH,\n UPDATE_ERROR_PATH,\n UPDATE_CHECK_INTERVAL_HOURS,\n MS_PER_HOUR,\n NPM_PACKAGE_NAME,\n UPDATE_SCRIPT_DELAY_SECONDS,\n RELEASE_CHANNELS,\n DEFAULT_RELEASE_CHANNEL,\n type ReleaseChannel,\n} from './constants/update.js';\n"],"mappings":"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","names":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
isProcessAlive
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XMPCB2P2.js";
|
|
5
5
|
import {
|
|
6
6
|
loadConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3C4LT4BW.js";
|
|
8
8
|
import {
|
|
9
9
|
getDatabase
|
|
10
10
|
} from "./chunk-MYX5NCRH.js";
|
|
11
11
|
import {
|
|
12
12
|
DIGEST_TIERS
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-I54KLC6H.js";
|
|
14
14
|
|
|
15
15
|
// src/db/queries/embeddings.ts
|
|
16
16
|
var EMBEDDABLE_TABLES = ["sessions", "spores", "plans", "artifacts", "skill_records"];
|
|
@@ -187,4 +187,4 @@ export {
|
|
|
187
187
|
getEmbeddingQueueDepth,
|
|
188
188
|
gatherStats
|
|
189
189
|
};
|
|
190
|
-
//# sourceMappingURL=chunk-
|
|
190
|
+
//# sourceMappingURL=chunk-IXVAYN3P.js.map
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
AgentTaskSchema,
|
|
4
4
|
loadAgentTasks,
|
|
5
5
|
taskFromParsed
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Q4QD6LJT.js";
|
|
7
7
|
import {
|
|
8
8
|
BUILT_IN_SOURCE,
|
|
9
9
|
MAX_TASK_NAME_LENGTH,
|
|
10
10
|
TASK_NAME_PATTERN,
|
|
11
11
|
USER_TASKS_DIR,
|
|
12
12
|
USER_TASK_SOURCE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-I54KLC6H.js";
|
|
14
14
|
import {
|
|
15
15
|
require_dist
|
|
16
16
|
} from "./chunk-6LQIMRTC.js";
|
|
@@ -100,4 +100,4 @@ export {
|
|
|
100
100
|
deleteUserTask,
|
|
101
101
|
copyTaskToUser
|
|
102
102
|
};
|
|
103
|
-
//# sourceMappingURL=chunk-
|
|
103
|
+
//# sourceMappingURL=chunk-KYH4V4ML.js.map
|
|
@@ -1,48 +1,191 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
extractJsonArray,
|
|
4
|
-
parseD1Id,
|
|
5
|
-
parseKvNamespaceId,
|
|
6
|
-
parseWorkerUrl,
|
|
7
|
-
readJsonConfig,
|
|
8
|
-
readSecrets,
|
|
9
|
-
resolveHomeConfigPath,
|
|
10
|
-
runWrangler,
|
|
11
|
-
stageDeploymentDir,
|
|
12
|
-
writeJsonConfig,
|
|
13
|
-
writeSecret
|
|
14
|
-
} from "./chunk-EM63ZFKA.js";
|
|
15
2
|
import {
|
|
16
3
|
SCHEMA_VERSION
|
|
17
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6DDRJQ4X.js";
|
|
18
5
|
import {
|
|
19
6
|
loadConfig,
|
|
20
7
|
updateTeamConfig
|
|
21
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3C4LT4BW.js";
|
|
22
9
|
import {
|
|
23
10
|
TEAM_API_KEY_SECRET,
|
|
11
|
+
TEAM_MCP_TOKEN_SECRET,
|
|
24
12
|
WRANGLER_COMMAND_TIMEOUT_MS
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-E7NUADTQ.js";
|
|
27
|
-
import "./chunk-6LQIMRTC.js";
|
|
28
|
-
import "./chunk-ODXLRR4U.js";
|
|
29
|
-
import "./chunk-U6PF3YII.js";
|
|
30
|
-
import "./chunk-PZUWP5VK.js";
|
|
13
|
+
} from "./chunk-I54KLC6H.js";
|
|
31
14
|
|
|
32
15
|
// ../myco-team/src/cli.ts
|
|
33
|
-
import
|
|
16
|
+
import crypto2 from "crypto";
|
|
17
|
+
import fs4 from "fs";
|
|
18
|
+
import path4 from "path";
|
|
19
|
+
import { fileURLToPath } from "url";
|
|
20
|
+
|
|
21
|
+
// src/config/secrets.ts
|
|
34
22
|
import fs from "fs";
|
|
35
23
|
import path from "path";
|
|
36
|
-
|
|
24
|
+
var SECRETS_FILE = "secrets.env";
|
|
25
|
+
function readSecrets(vaultDir) {
|
|
26
|
+
const secretsPath = path.join(vaultDir, SECRETS_FILE);
|
|
27
|
+
if (!fs.existsSync(secretsPath)) return {};
|
|
28
|
+
const secrets = {};
|
|
29
|
+
for (const line of fs.readFileSync(secretsPath, "utf-8").split("\n")) {
|
|
30
|
+
const match = line.match(/^\s*([^#=]+?)\s*=\s*(.*?)\s*$/);
|
|
31
|
+
if (match) {
|
|
32
|
+
secrets[match[1]] = match[2];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return secrets;
|
|
36
|
+
}
|
|
37
|
+
function writeSecret(vaultDir, key, value) {
|
|
38
|
+
const secretsPath = path.join(vaultDir, SECRETS_FILE);
|
|
39
|
+
const existing = readSecrets(vaultDir);
|
|
40
|
+
existing[key] = value;
|
|
41
|
+
const content = Object.entries(existing).map(([k, v]) => `${k}=${v}`).join("\n") + "\n";
|
|
42
|
+
fs.writeFileSync(secretsPath, content, "utf-8");
|
|
43
|
+
}
|
|
44
|
+
function loadSecrets(vaultDir) {
|
|
45
|
+
const secrets = readSecrets(vaultDir);
|
|
46
|
+
for (const [key, value] of Object.entries(secrets)) {
|
|
47
|
+
if (!process.env[key]) {
|
|
48
|
+
process.env[key] = value;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ../myco-deploy/src/cloudflare.ts
|
|
54
|
+
import { execFileSync } from "child_process";
|
|
55
|
+
import fs2 from "fs";
|
|
56
|
+
import path2 from "path";
|
|
57
|
+
var WORKER_URL_REGEX = /(https:\/\/[^\s]+\.workers\.dev)/;
|
|
58
|
+
var D1_ID_JSON_REGEX = /"database_id"\s*:\s*"([0-9a-f-]{36})"/i;
|
|
59
|
+
var D1_ID_TEXT_REGEX = /id:\s*([0-9a-f-]{36})/i;
|
|
60
|
+
var KV_ID_REGEX = /"id":\s*"([0-9a-f]+)"/i;
|
|
61
|
+
function buildCommandEnv() {
|
|
62
|
+
const nodeBinDir = path2.dirname(process.execPath);
|
|
63
|
+
const pathValue = process.env.PATH ? `${nodeBinDir}${path2.delimiter}${process.env.PATH}` : nodeBinDir;
|
|
64
|
+
return { ...process.env, PATH: pathValue };
|
|
65
|
+
}
|
|
66
|
+
function runWrangler(args, options) {
|
|
67
|
+
try {
|
|
68
|
+
return execFileSync("wrangler", args, {
|
|
69
|
+
cwd: options.cwd,
|
|
70
|
+
env: buildCommandEnv(),
|
|
71
|
+
input: options.input,
|
|
72
|
+
encoding: "utf-8",
|
|
73
|
+
timeout: options.timeoutMs,
|
|
74
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
75
|
+
});
|
|
76
|
+
} catch (error) {
|
|
77
|
+
const execError = error;
|
|
78
|
+
const stderr = execError.stderr?.toString() ?? "";
|
|
79
|
+
const stdout = execError.stdout?.toString() ?? "";
|
|
80
|
+
const detail = [stderr, stdout].filter(Boolean).join("\n").trim();
|
|
81
|
+
throw new Error(detail || execError.message);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function installDeploymentDeps(deployDir, timeoutMs) {
|
|
85
|
+
const packageJsonPath = path2.join(deployDir, "package.json");
|
|
86
|
+
if (!fs2.existsSync(packageJsonPath)) return;
|
|
87
|
+
execFileSync("npm", ["install", "--silent", "--no-audit", "--no-fund"], {
|
|
88
|
+
cwd: deployDir,
|
|
89
|
+
env: buildCommandEnv(),
|
|
90
|
+
encoding: "utf-8",
|
|
91
|
+
timeout: timeoutMs,
|
|
92
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function parseWorkerUrl(output) {
|
|
96
|
+
const workerUrl = output.match(WORKER_URL_REGEX)?.[1];
|
|
97
|
+
if (!workerUrl) {
|
|
98
|
+
throw new Error(`Could not parse worker URL from deploy output:
|
|
99
|
+
${output}`);
|
|
100
|
+
}
|
|
101
|
+
return workerUrl;
|
|
102
|
+
}
|
|
103
|
+
function parseD1Id(output) {
|
|
104
|
+
const jsonMatch = output.match(D1_ID_JSON_REGEX);
|
|
105
|
+
if (jsonMatch) return jsonMatch[1];
|
|
106
|
+
const textMatch = output.match(D1_ID_TEXT_REGEX);
|
|
107
|
+
if (textMatch) return textMatch[1];
|
|
108
|
+
throw new Error(`Could not parse D1 database ID from wrangler output:
|
|
109
|
+
${output}`);
|
|
110
|
+
}
|
|
111
|
+
function parseKvNamespaceId(output) {
|
|
112
|
+
const kvId = output.match(KV_ID_REGEX)?.[1];
|
|
113
|
+
if (!kvId) {
|
|
114
|
+
throw new Error(`Could not parse KV namespace ID from wrangler output:
|
|
115
|
+
${output}`);
|
|
116
|
+
}
|
|
117
|
+
return kvId;
|
|
118
|
+
}
|
|
119
|
+
function extractJsonArray(output) {
|
|
120
|
+
const start = output.indexOf("[");
|
|
121
|
+
const end = output.lastIndexOf("]");
|
|
122
|
+
if (start === -1 || end === -1 || end < start) {
|
|
123
|
+
throw new Error(`No JSON array found in output:
|
|
124
|
+
${output}`);
|
|
125
|
+
}
|
|
126
|
+
return JSON.parse(output.slice(start, end + 1));
|
|
127
|
+
}
|
|
128
|
+
function stageDeploymentDir(options) {
|
|
129
|
+
if (options.reset) {
|
|
130
|
+
fs2.rmSync(options.deployDir, { recursive: true, force: true });
|
|
131
|
+
}
|
|
132
|
+
fs2.mkdirSync(options.deployDir, { recursive: true });
|
|
133
|
+
fs2.cpSync(options.sourceDir, options.deployDir, { recursive: true });
|
|
134
|
+
for (const copy of options.extraCopies ?? []) {
|
|
135
|
+
fs2.cpSync(copy.sourceDir, path2.join(options.deployDir, copy.destinationSubdir), { recursive: true });
|
|
136
|
+
}
|
|
137
|
+
for (const patch of options.textPatches ?? []) {
|
|
138
|
+
const absolutePath = path2.join(options.deployDir, patch.filePath);
|
|
139
|
+
let nextText = fs2.readFileSync(absolutePath, "utf-8");
|
|
140
|
+
for (const transform of patch.transforms) {
|
|
141
|
+
nextText = transform(nextText);
|
|
142
|
+
}
|
|
143
|
+
fs2.writeFileSync(absolutePath, nextText, "utf-8");
|
|
144
|
+
}
|
|
145
|
+
if (options.installDepsTimeoutMs) {
|
|
146
|
+
installDeploymentDeps(options.deployDir, options.installDepsTimeoutMs);
|
|
147
|
+
}
|
|
148
|
+
return options.deployDir;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// ../myco-deploy/src/local-config.ts
|
|
152
|
+
import crypto from "crypto";
|
|
153
|
+
import fs3 from "fs";
|
|
154
|
+
import os from "os";
|
|
155
|
+
import path3 from "path";
|
|
156
|
+
var MYCO_HOME_OVERRIDE_ENV = "MYCO_HOME_OVERRIDE";
|
|
157
|
+
function resolveHomeDir() {
|
|
158
|
+
return process.env[MYCO_HOME_OVERRIDE_ENV]?.trim() || os.homedir();
|
|
159
|
+
}
|
|
160
|
+
function resolveHomeConfigPath(configDir, fileName) {
|
|
161
|
+
return path3.join(resolveHomeDir(), configDir, fileName);
|
|
162
|
+
}
|
|
163
|
+
function resolveVaultConfigPath(vaultDir, configDir, fileName) {
|
|
164
|
+
return path3.join(vaultDir, configDir, fileName);
|
|
165
|
+
}
|
|
166
|
+
function readJsonConfig(configPath) {
|
|
167
|
+
if (!fs3.existsSync(configPath)) return null;
|
|
168
|
+
return JSON.parse(fs3.readFileSync(configPath, "utf-8"));
|
|
169
|
+
}
|
|
170
|
+
function writeJsonConfig(configPath, value) {
|
|
171
|
+
fs3.mkdirSync(path3.dirname(configPath), { recursive: true });
|
|
172
|
+
fs3.writeFileSync(configPath, `${JSON.stringify(value, null, 2)}
|
|
173
|
+
`, { encoding: "utf-8", mode: 384 });
|
|
174
|
+
fs3.chmodSync(configPath, 384);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// ../myco-team/src/cli.ts
|
|
37
178
|
var API_KEY_BYTES = 32;
|
|
38
179
|
var VECTORIZE_DIMENSIONS = "1024";
|
|
39
180
|
var VECTORIZE_METRIC = "cosine";
|
|
40
181
|
var TEAM_RESOURCE_PREFIX = "myco-team";
|
|
41
182
|
var PROJECT_HASH_LENGTH = 8;
|
|
42
183
|
var WORKER_SOURCE_DIR = "worker";
|
|
43
|
-
var
|
|
44
|
-
var
|
|
184
|
+
var TEAM_STATE_DIR = "team";
|
|
185
|
+
var TEAM_DEPLOY_DIR = "worker";
|
|
45
186
|
var TEAM_CONFIG_FILE = "config.json";
|
|
187
|
+
var LEGACY_TEAM_CONFIG_DIR = ".myco-team";
|
|
188
|
+
var LEGACY_TEAM_DEPLOY_DIR = ".team-worker";
|
|
46
189
|
var TEAM_CONFIG_VERSION = 1;
|
|
47
190
|
var TOML_NAME_REGEX = /^name\s*=\s*"[^"]*"/m;
|
|
48
191
|
var TOML_D1_PLACEHOLDER_REGEX = /<YOUR_D1_DATABASE_ID>/g;
|
|
@@ -54,7 +197,7 @@ var TOML_DB_ID_REGEX = /database_id\s*=\s*"([^"]+)"/;
|
|
|
54
197
|
var TOML_KV_PLACEHOLDER_REGEX = /<YOUR_KV_NAMESPACE_ID>/g;
|
|
55
198
|
var TOML_KV_ID_REGEX = /\[\[kv_namespaces\]\][\s\S]*?id\s*=\s*"([0-9a-f]+)"/;
|
|
56
199
|
function projectHash(vaultDir) {
|
|
57
|
-
const hash =
|
|
200
|
+
const hash = crypto2.createHash("sha256").update(vaultDir).digest("hex");
|
|
58
201
|
return hash.slice(0, PROJECT_HASH_LENGTH);
|
|
59
202
|
}
|
|
60
203
|
function resourceName(vaultDir) {
|
|
@@ -63,17 +206,20 @@ function resourceName(vaultDir) {
|
|
|
63
206
|
function resolvePackageRoot() {
|
|
64
207
|
const override = process.env.MYCO_TEAM_PACKAGE_ROOT?.trim();
|
|
65
208
|
if (override) return override;
|
|
66
|
-
return
|
|
209
|
+
return path4.resolve(path4.dirname(fileURLToPath(import.meta.url)), "..");
|
|
67
210
|
}
|
|
68
211
|
function getTeamPackageVersion() {
|
|
212
|
+
if (true) {
|
|
213
|
+
return "0.1.2";
|
|
214
|
+
}
|
|
69
215
|
const packageRoot = resolvePackageRoot();
|
|
70
216
|
const candidatePaths = [
|
|
71
|
-
|
|
72
|
-
|
|
217
|
+
path4.join(packageRoot, "package.json"),
|
|
218
|
+
path4.join(path4.resolve(path4.dirname(fileURLToPath(import.meta.url)), ".."), "package.json")
|
|
73
219
|
];
|
|
74
220
|
for (const candidatePath of candidatePaths) {
|
|
75
|
-
if (!
|
|
76
|
-
const packageJson = JSON.parse(
|
|
221
|
+
if (!fs4.existsSync(candidatePath)) continue;
|
|
222
|
+
const packageJson = JSON.parse(fs4.readFileSync(candidatePath, "utf-8"));
|
|
77
223
|
if (packageJson.version) return packageJson.version;
|
|
78
224
|
}
|
|
79
225
|
return "0.1.0";
|
|
@@ -81,29 +227,65 @@ function getTeamPackageVersion() {
|
|
|
81
227
|
function getMycoSchemaVersion() {
|
|
82
228
|
return String(SCHEMA_VERSION);
|
|
83
229
|
}
|
|
84
|
-
function resolveLocalConfigPath() {
|
|
85
|
-
return
|
|
230
|
+
function resolveLocalConfigPath(vaultDir) {
|
|
231
|
+
return resolveVaultConfigPath(vaultDir, TEAM_STATE_DIR, TEAM_CONFIG_FILE);
|
|
232
|
+
}
|
|
233
|
+
function resolveLegacyLocalConfigPath() {
|
|
234
|
+
return resolveHomeConfigPath(LEGACY_TEAM_CONFIG_DIR, TEAM_CONFIG_FILE);
|
|
235
|
+
}
|
|
236
|
+
function resolveDeployDir(vaultDir) {
|
|
237
|
+
return path4.join(vaultDir, TEAM_STATE_DIR, TEAM_DEPLOY_DIR);
|
|
238
|
+
}
|
|
239
|
+
function resolveLegacyDeployDir(vaultDir) {
|
|
240
|
+
return path4.join(vaultDir, LEGACY_TEAM_DEPLOY_DIR);
|
|
86
241
|
}
|
|
87
|
-
function
|
|
88
|
-
|
|
242
|
+
function writeLocalConfig(vaultDir, config) {
|
|
243
|
+
writeJsonConfig(resolveLocalConfigPath(vaultDir), config);
|
|
89
244
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
245
|
+
function migrateLegacyDeployDir(vaultDir) {
|
|
246
|
+
const legacyDeployDir = resolveLegacyDeployDir(vaultDir);
|
|
247
|
+
const nextDeployDir = resolveDeployDir(vaultDir);
|
|
248
|
+
if (!fs4.existsSync(legacyDeployDir) || fs4.existsSync(nextDeployDir)) return;
|
|
249
|
+
fs4.mkdirSync(path4.dirname(nextDeployDir), { recursive: true });
|
|
250
|
+
fs4.renameSync(legacyDeployDir, nextDeployDir);
|
|
251
|
+
}
|
|
252
|
+
function readLocalConfig(vaultDir) {
|
|
253
|
+
const config = readJsonConfig(resolveLocalConfigPath(vaultDir));
|
|
254
|
+
if (config) {
|
|
255
|
+
migrateLegacyDeployDir(vaultDir);
|
|
256
|
+
return config;
|
|
257
|
+
}
|
|
258
|
+
const legacyConfig = readJsonConfig(resolveLegacyLocalConfigPath());
|
|
259
|
+
if (!legacyConfig) return null;
|
|
260
|
+
if (legacyConfig.vault_dir && legacyConfig.vault_dir !== vaultDir) return null;
|
|
261
|
+
const migrated = {
|
|
262
|
+
worker_name: legacyConfig.worker_name,
|
|
263
|
+
worker_url: legacyConfig.worker_url,
|
|
264
|
+
package_version: legacyConfig.package_version,
|
|
265
|
+
created_at: legacyConfig.created_at,
|
|
266
|
+
last_upgraded: legacyConfig.last_upgraded,
|
|
267
|
+
config_version: legacyConfig.config_version ?? TEAM_CONFIG_VERSION
|
|
268
|
+
};
|
|
269
|
+
writeLocalConfig(vaultDir, migrated);
|
|
270
|
+
if (legacyConfig.api_key) writeSecret(vaultDir, TEAM_API_KEY_SECRET, legacyConfig.api_key);
|
|
271
|
+
if (legacyConfig.mcp_token) writeSecret(vaultDir, TEAM_MCP_TOKEN_SECRET, legacyConfig.mcp_token);
|
|
272
|
+
migrateLegacyDeployDir(vaultDir);
|
|
273
|
+
return migrated;
|
|
92
274
|
}
|
|
93
275
|
function wrangler(args, options) {
|
|
94
276
|
return runWrangler(args, { cwd: options?.cwd, timeoutMs: WRANGLER_COMMAND_TIMEOUT_MS });
|
|
95
277
|
}
|
|
96
278
|
function locateWorkerSource() {
|
|
97
279
|
const root = resolvePackageRoot();
|
|
98
|
-
const distPath =
|
|
99
|
-
if (
|
|
100
|
-
const srcPath =
|
|
101
|
-
if (
|
|
280
|
+
const distPath = path4.join(root, "dist", WORKER_SOURCE_DIR);
|
|
281
|
+
if (fs4.existsSync(distPath)) return distPath;
|
|
282
|
+
const srcPath = path4.join(root, WORKER_SOURCE_DIR);
|
|
283
|
+
if (fs4.existsSync(srcPath)) return srcPath;
|
|
102
284
|
throw new Error(`Cannot find ${WORKER_SOURCE_DIR} \u2014 are you running from the myco-team package?`);
|
|
103
285
|
}
|
|
104
286
|
function prepareDeployDir(vaultDir, d1Id, kvId) {
|
|
105
287
|
const srcDir = locateWorkerSource();
|
|
106
|
-
const deployDir =
|
|
288
|
+
const deployDir = resolveDeployDir(vaultDir);
|
|
107
289
|
const name = resourceName(vaultDir);
|
|
108
290
|
return stageDeploymentDir({
|
|
109
291
|
sourceDir: srcDir,
|
|
@@ -231,7 +413,7 @@ async function teamInit(vaultDir) {
|
|
|
231
413
|
console.error(`Failed to create KV namespace: ${err.message}`);
|
|
232
414
|
process.exit(1);
|
|
233
415
|
}
|
|
234
|
-
const apiKey =
|
|
416
|
+
const apiKey = crypto2.randomBytes(API_KEY_BYTES).toString("hex");
|
|
235
417
|
console.log("Preparing worker deployment...");
|
|
236
418
|
const deployDir = prepareDeployDir(vaultDir, d1Id, kvId);
|
|
237
419
|
console.log("Setting API key secret...");
|
|
@@ -283,17 +465,14 @@ async function teamInit(vaultDir) {
|
|
|
283
465
|
}
|
|
284
466
|
updateTeamConfig(vaultDir, {
|
|
285
467
|
enabled: true,
|
|
286
|
-
worker_url: workerUrl
|
|
287
|
-
deployed_worker_version: getTeamPackageVersion()
|
|
468
|
+
worker_url: workerUrl
|
|
288
469
|
});
|
|
289
470
|
writeSecret(vaultDir, TEAM_API_KEY_SECRET, apiKey);
|
|
290
|
-
|
|
471
|
+
if (mcpToken) writeSecret(vaultDir, TEAM_MCP_TOKEN_SECRET, mcpToken);
|
|
472
|
+
writeLocalConfig(vaultDir, {
|
|
291
473
|
worker_name: name,
|
|
292
474
|
worker_url: workerUrl,
|
|
293
|
-
api_key: apiKey,
|
|
294
|
-
mcp_token: mcpToken,
|
|
295
475
|
package_version: getTeamPackageVersion(),
|
|
296
|
-
vault_dir: vaultDir,
|
|
297
476
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
298
477
|
last_upgraded: (/* @__PURE__ */ new Date()).toISOString(),
|
|
299
478
|
config_version: TEAM_CONFIG_VERSION
|
|
@@ -311,12 +490,13 @@ function upgradeWorker(vaultDir) {
|
|
|
311
490
|
if (!config.team.worker_url) {
|
|
312
491
|
return { success: false, error: "No team sync configured. Run: myco team init" };
|
|
313
492
|
}
|
|
314
|
-
|
|
315
|
-
const
|
|
316
|
-
|
|
493
|
+
migrateLegacyDeployDir(vaultDir);
|
|
494
|
+
const deployDir = resolveDeployDir(vaultDir);
|
|
495
|
+
const tomlPath = path4.join(deployDir, "wrangler.toml");
|
|
496
|
+
if (!fs4.existsSync(tomlPath)) {
|
|
317
497
|
return { success: false, error: "No deployment directory found. Run: myco team init" };
|
|
318
498
|
}
|
|
319
|
-
const existingToml =
|
|
499
|
+
const existingToml = fs4.readFileSync(tomlPath, "utf-8");
|
|
320
500
|
const d1Match = existingToml.match(TOML_DB_ID_REGEX);
|
|
321
501
|
if (!d1Match || d1Match[1] === "<YOUR_D1_DATABASE_ID>") {
|
|
322
502
|
return { success: false, error: "Cannot determine D1 database ID from existing deployment. Run: myco team init" };
|
|
@@ -375,17 +555,15 @@ function upgradeWorker(vaultDir) {
|
|
|
375
555
|
const workerUrl = parseWorkerUrl(deployOutput);
|
|
376
556
|
const version = getTeamPackageVersion();
|
|
377
557
|
updateTeamConfig(vaultDir, {
|
|
378
|
-
worker_url: workerUrl
|
|
379
|
-
deployed_worker_version: version
|
|
558
|
+
worker_url: workerUrl
|
|
380
559
|
});
|
|
381
|
-
const localConfig = readLocalConfig();
|
|
560
|
+
const localConfig = readLocalConfig(vaultDir);
|
|
382
561
|
if (localConfig) {
|
|
383
|
-
writeLocalConfig({
|
|
562
|
+
writeLocalConfig(vaultDir, {
|
|
384
563
|
...localConfig,
|
|
385
564
|
worker_name: workerName,
|
|
386
565
|
worker_url: workerUrl,
|
|
387
566
|
package_version: version,
|
|
388
|
-
vault_dir: vaultDir,
|
|
389
567
|
last_upgraded: (/* @__PURE__ */ new Date()).toISOString()
|
|
390
568
|
});
|
|
391
569
|
}
|
|
@@ -405,9 +583,16 @@ async function teamUpgrade(vaultDir) {
|
|
|
405
583
|
console.log(`Version: ${result.version}`);
|
|
406
584
|
console.log("\nUpgrade complete.");
|
|
407
585
|
}
|
|
586
|
+
|
|
408
587
|
export {
|
|
588
|
+
readSecrets,
|
|
589
|
+
writeSecret,
|
|
590
|
+
loadSecrets,
|
|
591
|
+
resolveVaultConfigPath,
|
|
592
|
+
readJsonConfig,
|
|
593
|
+
getTeamPackageVersion,
|
|
409
594
|
teamInit,
|
|
410
|
-
|
|
411
|
-
|
|
595
|
+
upgradeWorker,
|
|
596
|
+
teamUpgrade
|
|
412
597
|
};
|
|
413
|
-
//# sourceMappingURL=
|
|
598
|
+
//# sourceMappingURL=chunk-PLYWR5D7.js.map
|