@a-company/paradigm 5.38.0 → 6.0.4
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/{accept-orchestration-OATWIRHP.js → accept-orchestration-TIXUQQGR.js} +1 -1
- package/dist/add-UOR4INIV.js +8 -0
- package/dist/agent-MB3H5EZA.js +33 -0
- package/dist/{agent-loader-RIVI6QPP.js → agent-loader-VGBPL3TH.js} +1 -1
- package/dist/{agent-loader-RJRVO5GQ.js → agent-loader-W3RQJVW7.js} +1 -1
- package/dist/{agents-suggest-HYTFMQD3.js → agents-suggest-IKY6VD2R.js} +1 -1
- package/dist/{ambient-WTLYUAQM.js → ambient-AI42BOM5.js} +12 -12
- package/dist/{ambient-76YMUA5Q.js → ambient-FNNFB4AP.js} +1 -1
- package/dist/{assess-UFPYEJKP.js → assess-63WXHWJV.js} +1 -1
- package/dist/authority-FA3HLEOA.js +2 -0
- package/dist/{calibration-OLJYB5HN.js → calibration-BDHGYJOK.js} +1 -1
- package/dist/chunk-23T6UG73.js +605 -0
- package/dist/{chunk-4L7665QV.js → chunk-2AU5L333.js} +1 -1
- package/dist/{chunk-BOYQAMGC.js → chunk-4N56FRNE.js} +1 -1
- package/dist/{chunk-5QOCKWK5.js → chunk-4PSD5R7N.js} +2 -2
- package/dist/{chunk-MQIG6SMF.js → chunk-6QXBXZF6.js} +1 -1
- package/dist/{chunk-ORDKEGII.js → chunk-AMLD7IYC.js} +1 -1
- package/dist/{chunk-3DZK54RU.js → chunk-DBEWOKD6.js} +32 -7
- package/dist/{chunk-AGFPVSX5.js → chunk-F6E3HW45.js} +1 -1
- package/dist/{chunk-X3U3IGYT.js → chunk-GD4F2HC6.js} +2 -2
- package/dist/chunk-GRZQIKST.js +2 -0
- package/dist/{chunk-HOBHJPTL.js → chunk-IOVHF4SR.js} +1 -1
- package/dist/{chunk-RLCH7DXQ.js → chunk-K7X3Z3GL.js} +1 -1
- package/dist/{chunk-74SGKSRQ.js → chunk-KAFQA7HV.js} +2 -2
- package/dist/{chunk-NEJ4ZLCY.js → chunk-LAYBUKMB.js} +1 -1
- package/dist/{chunk-4VKSEOXZ.js → chunk-LPBCQM5Y.js} +3 -3
- package/dist/chunk-Q527BPUF.js +2 -0
- package/dist/{chunk-AO7ZSRME.js → chunk-TQOT2LBO.js} +2 -2
- package/dist/{chunk-3XGNXXCT.js → chunk-UZ5H7K6Q.js} +1 -1
- package/dist/chunk-VIG5LSGZ.js +2 -0
- package/dist/chunk-VNIX5KBT.js +3 -0
- package/dist/chunk-WXF5VFB4.js +111 -0
- package/dist/chunk-XQLO5URP.js +11 -0
- package/dist/{chunk-DOCDDDTD.js → chunk-YNDPSWOE.js} +5 -5
- package/dist/chunk-Z5QW6USC.js +2 -0
- package/dist/{compliance-D7GD6ZYC.js → compliance-J3VOV445.js} +1 -1
- package/dist/config-schema-FLHRVZMI.js +2 -0
- package/dist/{context-audit-XRPT3OU2.js → context-audit-JVCA6GSV.js} +1 -1
- package/dist/{cursorrules-U5O4G5T4.js → cursorrules-ZXPXPZ3P.js} +1 -1
- package/dist/decision-loader-HELL2AMX.js +2 -0
- package/dist/{delete-P5VULXR4.js → delete-2C6ALLYY.js} +1 -1
- package/dist/{diff-YGHBIJY5.js → diff-75MABOSL.js} +1 -1
- package/dist/{dist-KGRCLBJP-2QAPFYNF.js → dist-GQ42YS5N-4HIJZVBB.js} +10 -10
- package/dist/{docs-USDAF26F.js → docs-TSAAS4W3.js} +1 -1
- package/dist/doctor-L5XZENCF.js +2 -0
- package/dist/{edit-GUU3HBVW.js → edit-P3MDAZLU.js} +1 -1
- package/dist/{flow-FVZR3YJ4.js → flow-BGXOVE2V.js} +1 -1
- package/dist/{hooks-TFMMMB2H.js → hooks-KUEE5KMM.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/init-M44SO65G.js +2 -0
- package/dist/{init-XYB62Q3X.js → init-V4KSEKPK.js} +1 -1
- package/dist/{list-YKIQNKGB.js → list-2XIWUEMA.js} +1 -1
- package/dist/list-CFHINXIS.js +12 -0
- package/dist/lore-loader-D2ISOASW.js +2 -0
- package/dist/lore-loader-PXFKMKAN.js +2 -0
- package/dist/mcp.js +4 -4
- package/dist/metrics-UESGUHTA.js +2 -0
- package/dist/{migrate-Z5UQN57G.js → migrate-ZPNYDNM4.js} +1 -1
- package/dist/migrate-assessments-YSITX7KM.js +4 -0
- package/dist/migrate-decisions-NPLQOEEH.js +6 -0
- package/dist/migrate-plsat-EM2ACIQ3.js +6 -0
- package/dist/migration-notices-BHLEYC4T.js +4 -0
- package/dist/{nomination-engine-EALA5MGI.js → nomination-engine-NCLTGMAK.js} +1 -1
- package/dist/{notebook-loader-PXNRBBXD.js → notebook-loader-3J2OFMS3.js} +1 -1
- package/dist/{orchestrate-M5PBZBJQ.js → orchestrate-K4KBTBYK.js} +1 -1
- package/dist/{platform-server-DNAMH4YI.js → platform-server-ANOALDPL.js} +1 -1
- package/dist/{portal-check-ZMLVBIGW.js → portal-check-DV2VSJ5E.js} +1 -1
- package/dist/portal-compliance-JONQ4SOP.js +2 -0
- package/dist/{probe-3FTG6LYO.js → probe-5HAXULAD.js} +1 -1
- package/dist/{providers-AWA7WLLM.js → providers-TBPOE4DI.js} +1 -1
- package/dist/quiz-WYIZJG5K.js +10 -0
- package/dist/{record-YXPB34MY.js → record-N3VNYYKJ.js} +1 -1
- package/dist/registry-OUTA3DXW.js +20 -0
- package/dist/reindex-IZCD2JGD.js +2 -0
- package/dist/{retag-N5XF3KXP.js → retag-72R2OSZV.js} +1 -1
- package/dist/{review-77QI6VOC.js → review-2INNWLTW.js} +1 -1
- package/dist/{sentinel-HYAZ3CO5.js → sentinel-EFPEX246.js} +1 -1
- package/dist/{sentinel-bridge-VR357PKL.js → sentinel-bridge-UR2MKARY.js} +1 -1
- package/dist/{serve-U47GULB6.js → serve-3FMUWW5K.js} +1 -1
- package/dist/serve-OQYUO7CR.js +12 -0
- package/dist/{server-4YNUIK4W.js → server-4D77LCST.js} +1 -1
- package/dist/server-FGUL2FWQ.js +7 -0
- package/dist/session-tracker-HHNY6J4I.js +2 -0
- package/dist/{session-work-log-ZP45TREI.js → session-work-log-MEJ33TYD.js} +1 -1
- package/dist/{session-work-log-PAKXOFGL.js → session-work-log-ZVVJGO7X.js} +1 -1
- package/dist/{setup-FEWSYS3Y.js → setup-ZSEC72BS.js} +1 -1
- package/dist/shift-WGMZGWOC.js +60 -0
- package/dist/{show-PJ5LFLIL.js → show-JH7LJ5MT.js} +1 -1
- package/dist/show-WVHAL4VU.js +7 -0
- package/dist/{spawn-M5BAV252.js → spawn-KKDDR6UR.js} +1 -1
- package/dist/status-S7Z5FVIE.js +6 -0
- package/dist/{summary-PYTEIJ4U.js → summary-WLI3NF4G.js} +2 -2
- package/dist/{sweep-HU74OPVW.js → sweep-7TZFN5NS.js} +1 -1
- package/dist/sync-55U6QPIA.js +2 -0
- package/dist/{sync-llms-7CAI74QL.js → sync-llms-GF7DDQDI.js} +1 -1
- package/dist/{team-PDK64JXI.js → team-2LGZQRP4.js} +1 -1
- package/dist/{timeline-K3ZFKJ3R.js → timeline-RK7O2SCM.js} +1 -1
- package/dist/tools-4RRFTU5H.js +2 -0
- package/dist/university-content/notes/N-para-001-build-something.md +126 -0
- package/dist/university-content/notes/N-para-001-meet-the-team.md +85 -0
- package/dist/university-content/notes/N-para-001-shift-setup.md +74 -0
- package/dist/university-content/notes/N-para-101-component-types.md +99 -0
- package/dist/university-content/notes/N-para-101-first-steps.md +134 -0
- package/dist/university-content/notes/N-para-101-five-symbols.md +128 -0
- package/dist/university-content/notes/N-para-101-paradigm-logger.md +89 -0
- package/dist/university-content/notes/N-para-101-portal-yaml.md +112 -0
- package/dist/university-content/notes/N-para-101-project-structure.md +143 -0
- package/dist/university-content/notes/N-para-101-purpose-files.md +121 -0
- package/dist/university-content/notes/N-para-101-tags-and-classification.md +93 -0
- package/dist/university-content/notes/N-para-101-welcome.md +51 -0
- package/dist/university-content/notes/N-para-201-architecture-review.md +175 -0
- package/dist/university-content/notes/N-para-201-aspect-graph.md +79 -0
- package/dist/university-content/notes/N-para-201-aspects-and-anchors.md +112 -0
- package/dist/university-content/notes/N-para-201-component-patterns.md +138 -0
- package/dist/university-content/notes/N-para-201-cross-cutting-concerns.md +145 -0
- package/dist/university-content/notes/N-para-201-disciplines.md +187 -0
- package/dist/university-content/notes/N-para-201-flows-deep-dive.md +119 -0
- package/dist/university-content/notes/N-para-201-gates-deep-dive.md +165 -0
- package/dist/university-content/notes/N-para-201-portal-protocol.md +133 -0
- package/dist/university-content/notes/N-para-201-signal-patterns.md +159 -0
- package/dist/university-content/notes/N-para-201-symbol-naming.md +149 -0
- package/dist/university-content/notes/N-para-301-context-management.md +53 -0
- package/dist/university-content/notes/N-para-301-decisions.md +99 -0
- package/dist/university-content/notes/N-para-301-doctor-and-validation.md +70 -0
- package/dist/university-content/notes/N-para-301-enforcement-levels.md +102 -0
- package/dist/university-content/notes/N-para-301-fragility-tracking.md +50 -0
- package/dist/university-content/notes/N-para-301-history-system.md +42 -0
- package/dist/university-content/notes/N-para-301-navigation-system.md +55 -0
- package/dist/university-content/notes/N-para-301-operations-review.md +55 -0
- package/dist/university-content/notes/N-para-301-paradigm-shift.md +93 -0
- package/dist/university-content/notes/N-para-301-protocols.md +113 -0
- package/dist/university-content/notes/N-para-301-ripple-analysis.md +53 -0
- package/dist/university-content/notes/N-para-301-sentinel-observability.md +87 -0
- package/dist/university-content/notes/N-para-301-sync-and-maintenance.md +57 -0
- package/dist/university-content/notes/N-para-301-wisdom-system.md +89 -0
- package/dist/university-content/notes/N-para-401-agent-identity.md +99 -0
- package/dist/university-content/notes/N-para-401-agent-interop.md +87 -0
- package/dist/university-content/notes/N-para-401-agent-roles.md +107 -0
- package/dist/university-content/notes/N-para-401-commit-conventions.md +82 -0
- package/dist/university-content/notes/N-para-401-mastery-review.md +71 -0
- package/dist/university-content/notes/N-para-401-mcp-tools-overview.md +102 -0
- package/dist/university-content/notes/N-para-401-multi-agent-coordination.md +80 -0
- package/dist/university-content/notes/N-para-401-notebooks-permissions.md +66 -0
- package/dist/university-content/notes/N-para-401-orchestration-workflow.md +101 -0
- package/dist/university-content/notes/N-para-401-pm-governance.md +71 -0
- package/dist/university-content/notes/N-para-401-provider-cascade.md +75 -0
- package/dist/university-content/notes/N-para-401-quick-check.md +95 -0
- package/dist/university-content/notes/N-para-451-agent-routing.md +117 -0
- package/dist/university-content/notes/N-para-451-archetypes-vs-instances.md +82 -0
- package/dist/university-content/notes/N-para-451-identity-layers.md +76 -0
- package/dist/university-content/notes/N-para-451-orchestration-modes.md +85 -0
- package/dist/university-content/notes/N-para-451-paradigm-shift.md +95 -0
- package/dist/university-content/notes/N-para-451-partners-primitive.md +107 -0
- package/dist/university-content/notes/N-para-451-roster-management.md +132 -0
- package/dist/university-content/notes/N-para-451-roster-reference.md +106 -0
- package/dist/university-content/notes/N-para-451-the-team-pattern.md +87 -0
- package/dist/university-content/notes/N-para-451-tiers.md +81 -0
- package/dist/university-content/notes/N-para-451-welcome.md +55 -0
- package/dist/university-content/notes/N-para-451-what-is-an-agent.md +73 -0
- package/dist/university-content/notes/N-para-501-advanced-workflows.md +122 -0
- package/dist/university-content/notes/N-para-501-aspect-graph-advanced.md +195 -0
- package/dist/university-content/notes/N-para-501-aspect-graph-internals.md +97 -0
- package/dist/university-content/notes/N-para-501-assessment-loops.md +116 -0
- package/dist/university-content/notes/N-para-501-conductor-workspace.md +77 -0
- package/dist/university-content/notes/N-para-501-habits-practice.md +164 -0
- package/dist/university-content/notes/N-para-501-hook-enforcement.md +100 -0
- package/dist/university-content/notes/N-para-501-lore-system.md +155 -0
- package/dist/university-content/notes/N-para-501-platform-agent-ui.md +108 -0
- package/dist/university-content/notes/N-para-501-review-compliance.md +72 -0
- package/dist/university-content/notes/N-para-501-sentinel-deep-dive.md +173 -0
- package/dist/university-content/notes/N-para-501-session-intelligence.md +104 -0
- package/dist/university-content/notes/N-para-501-symphony-a-mail.md +120 -0
- package/dist/university-content/notes/N-para-501-symphony-networking.md +119 -0
- package/dist/university-content/notes/N-para-501-task-management.md +100 -0
- package/dist/university-content/notes/N-para-601-agent-renaissance.md +121 -0
- package/dist/university-content/notes/N-para-601-attention-scoring.md +129 -0
- package/dist/university-content/notes/N-para-601-context-composition.md +146 -0
- package/dist/university-content/notes/N-para-601-data-sovereignty.md +140 -0
- package/dist/university-content/notes/N-para-601-event-stream.md +126 -0
- package/dist/university-content/notes/N-para-601-knowledge-streams.md +144 -0
- package/dist/university-content/notes/N-para-601-learning-loop.md +68 -0
- package/dist/university-content/notes/N-para-601-maestro-team-collab.md +136 -0
- package/dist/university-content/notes/N-para-601-nominations-debates.md +115 -0
- package/dist/university-content/notes/N-para-701-agent-notebooks.md +131 -0
- package/dist/university-content/notes/N-para-701-agent-pods-nevrland.md +182 -0
- package/dist/university-content/notes/N-para-701-agent-profiles.md +197 -0
- package/dist/university-content/notes/N-para-701-agent-roster.md +82 -0
- package/dist/university-content/notes/N-para-701-agent-state.md +180 -0
- package/dist/university-content/notes/N-para-701-learning-feedback-loop.md +188 -0
- package/dist/university-content/notes/N-para-701-model-tier-resolution.md +204 -0
- package/dist/university-content/notes/N-para-701-orchestration-enforcement.md +169 -0
- package/dist/university-content/notes/N-para-701-per-project-rosters.md +198 -0
- package/dist/university-content/notes/N-para-701-symphony-visibility.md +142 -0
- package/dist/university-content/paths/LP-para-001.yaml +29 -0
- package/dist/university-content/paths/LP-para-101.yaml +59 -0
- package/dist/university-content/paths/LP-para-201.yaml +69 -0
- package/dist/university-content/paths/LP-para-301.yaml +84 -0
- package/dist/university-content/paths/LP-para-401.yaml +74 -0
- package/dist/university-content/paths/LP-para-451.yaml +69 -0
- package/dist/university-content/paths/LP-para-501.yaml +89 -0
- package/dist/university-content/paths/LP-para-601.yaml +59 -0
- package/dist/university-content/paths/LP-para-701.yaml +64 -0
- package/dist/university-content/quizzes/Q-para-001-build-something.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-001-meet-the-team.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-001-shift-setup.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-101-component-types.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-101-first-steps.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-101-five-symbols.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-101-paradigm-logger.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-101-portal-yaml.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-101-project-structure.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-101-purpose-files.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-101-tags-and-classification.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-101-welcome.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-201-architecture-review.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-201-aspect-graph.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-201-aspects-and-anchors.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-201-component-patterns.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-201-cross-cutting-concerns.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-201-disciplines.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-201-flows-deep-dive.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-201-gates-deep-dive.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-201-portal-protocol.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-201-signal-patterns.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-201-symbol-naming.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-301-context-management.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-301-decisions.yaml +76 -0
- package/dist/university-content/quizzes/Q-para-301-doctor-and-validation.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-301-enforcement-levels.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-301-fragility-tracking.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-301-history-system.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-301-navigation-system.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-301-operations-review.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-301-paradigm-shift.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-301-protocols.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-301-ripple-analysis.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-301-sentinel-observability.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-301-sync-and-maintenance.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-301-wisdom-system.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-401-agent-identity.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-401-agent-interop.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-401-agent-roles.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-401-commit-conventions.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-401-mastery-review.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-401-mcp-tools-overview.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-401-multi-agent-coordination.yaml +76 -0
- package/dist/university-content/quizzes/Q-para-401-notebooks-permissions.yaml +61 -0
- package/dist/university-content/quizzes/Q-para-401-orchestration-workflow.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-401-pm-governance.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-401-provider-cascade.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-401-quick-check.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-451-foundations.yaml +154 -0
- package/dist/university-content/quizzes/Q-para-451-when-to-invoke.yaml +182 -0
- package/dist/university-content/quizzes/Q-para-501-advanced-workflows.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-501-aspect-graph-advanced.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-501-aspect-graph-internals.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-501-assessment-loops.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-501-conductor-workspace.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-501-habits-practice.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-501-hook-enforcement.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-501-lore-system.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-501-platform-agent-ui.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-501-review-compliance.yaml +61 -0
- package/dist/university-content/quizzes/Q-para-501-sentinel-deep-dive.yaml +86 -0
- package/dist/university-content/quizzes/Q-para-501-session-intelligence.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-501-symphony-a-mail.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-501-symphony-networking.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-501-task-management.yaml +46 -0
- package/dist/university-content/quizzes/Q-para-601-agent-renaissance.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-601-attention-scoring.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-601-context-composition.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-601-data-sovereignty.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-601-event-stream.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-601-knowledge-streams.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-601-learning-loop.yaml +56 -0
- package/dist/university-content/quizzes/Q-para-601-maestro-team-collab.yaml +86 -0
- package/dist/university-content/quizzes/Q-para-601-nominations-debates.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-agent-notebooks.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-agent-pods-nevrland.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-agent-profiles.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-agent-roster.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-agent-state.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-learning-feedback-loop.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-model-tier-resolution.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-orchestration-enforcement.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-per-project-rosters.yaml +66 -0
- package/dist/university-content/quizzes/Q-para-701-symphony-visibility.yaml +66 -0
- package/dist/university-content/quizzes/Q-plsat-v2.yaml +904 -0
- package/dist/university-content/quizzes/Q-plsat-v3.yaml +2909 -0
- package/dist/university-content/reference.json +2 -2
- package/dist/university-ui/assets/{index-CecQrfSn.js → index-nNgzO1il.js} +2 -2
- package/dist/university-ui/assets/{index-CecQrfSn.js.map → index-nNgzO1il.js.map} +1 -1
- package/dist/university-ui/index.html +1 -1
- package/dist/{upgrade-GX56QE3C.js → upgrade-NKN63VTY.js} +2 -2
- package/dist/validate-XUQZTF3H.js +9 -0
- package/dist/{watch-YCODNIET.js → watch-25GJHQYT.js} +1 -1
- package/lore-ui/dist/assets/{index-Bk-K0qgN.js → index-DKhNxgtW.js} +10 -10
- package/lore-ui/dist/index.html +1 -1
- package/package.json +2 -2
- package/platform-ui/dist/assets/{AmbientSection-BYjt75R1.js → AmbientSection-CwatqcBD.js} +1 -1
- package/platform-ui/dist/assets/{CanvasSection-rKvA_vZj.js → CanvasSection-dFAthehN.js} +1 -1
- package/platform-ui/dist/assets/{DocsSection-CI9K73M-.js → DocsSection-BZ2SFJBZ.js} +1 -1
- package/platform-ui/dist/assets/{GitSection-DSGj_c6S.js → GitSection-MNNYU1tO.js} +1 -1
- package/platform-ui/dist/assets/{GraphSection-CawN7pC5.js → GraphSection-COYjb4Pt.js} +1 -1
- package/platform-ui/dist/assets/LoreSection-B0hUbfsJ.js +1 -0
- package/platform-ui/dist/assets/{SentinelSection-DNgoYMH0.js → SentinelSection-BCxW1DCp.js} +1 -1
- package/platform-ui/dist/assets/{SymphonySection-C0zfcqv3.js → SymphonySection-BsucZRqy.js} +1 -1
- package/platform-ui/dist/assets/{TeamSection-Bzd3Dt9Q.js → TeamSection-C0QNTudW.js} +1 -1
- package/platform-ui/dist/assets/{UniversitySection-tBr62R0S.js → UniversitySection-DN1-g9pw.js} +1 -1
- package/platform-ui/dist/assets/{index-BaOmyn11.js → index-DwUT8pju.js} +2 -2
- package/platform-ui/dist/index.html +1 -1
- package/dist/add-P76GEMGF.js +0 -8
- package/dist/agent-X6I2YWOB.js +0 -33
- package/dist/chunk-JQKKVAAN.js +0 -2
- package/dist/chunk-NQ47TA6C.js +0 -111
- package/dist/chunk-ODVKPZZ4.js +0 -2
- package/dist/chunk-Q2J542ST.js +0 -2
- package/dist/chunk-RBLK34IA.js +0 -11
- package/dist/chunk-RN4VE6P3.js +0 -521
- package/dist/chunk-WS2N27RX.js +0 -3
- package/dist/config-schema-GUQY2QN7.js +0 -2
- package/dist/decision-loader-2XPZE4EZ.js +0 -2
- package/dist/doctor-WMVULMQD.js +0 -2
- package/dist/list-5IUGP3ZB.js +0 -7
- package/dist/lore-loader-RVQI5GXL.js +0 -2
- package/dist/lore-loader-XY5MZRR2.js +0 -2
- package/dist/migrate-assessments-GEI5WMI2.js +0 -4
- package/dist/portal-compliance-6YR27IQU.js +0 -2
- package/dist/quiz-FE5UGAY2.js +0 -10
- package/dist/registry-KOOKFUWD.js +0 -20
- package/dist/reindex-I6LPAKCC.js +0 -2
- package/dist/serve-OY6XYL7F.js +0 -12
- package/dist/server-2MNROHF6.js +0 -7
- package/dist/session-tracker-MWJAJA6Z.js +0 -2
- package/dist/shift-PC6C7NUX.js +0 -60
- package/dist/show-BOAVWZPZ.js +0 -7
- package/dist/status-A37ECYNJ.js +0 -6
- package/dist/sync-DLUBV5HQ.js +0 -2
- package/dist/tools-5ITPEPSV.js +0 -2
- package/dist/university-content/courses/.purpose +0 -492
- package/dist/university-content/courses/para-001.json +0 -166
- package/dist/university-content/courses/para-101.json +0 -615
- package/dist/university-content/courses/para-201.json +0 -794
- package/dist/university-content/courses/para-301.json +0 -830
- package/dist/university-content/courses/para-401.json +0 -868
- package/dist/university-content/courses/para-501.json +0 -1166
- package/dist/university-content/courses/para-601.json +0 -719
- package/dist/university-content/courses/para-701.json +0 -807
- package/dist/university-content/plsat/.purpose +0 -162
- package/dist/university-content/plsat/v2.0.json +0 -760
- package/dist/university-content/plsat/v3.0.json +0 -3453
- package/dist/validate-C6SMKGYD.js +0 -9
- package/platform-ui/dist/assets/LoreSection-oO5dCe6O.js +0 -1
- /package/dist/{chunk-BV5PRPLB.js → chunk-HXGYVS2N.js} +0 -0
- /package/templates/paradigm/specs/{scan.md → probe.md} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {b}from'./chunk-
|
|
2
|
+
import {b}from'./chunk-IOVHF4SR.js';import'./chunk-TYWB5IQJ.js';import'./chunk-AMLD7IYC.js';import'./chunk-FYDRENK7.js';import'./chunk-HXGYVS2N.js';import'./chunk-TQOT2LBO.js';import'./chunk-EKZDFEJW.js';import'./chunk-LPBCQM5Y.js';import'./chunk-LWAIVOSF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import'./chunk-5TAVYPOV.js';import*as g from'path';import e from'chalk';async function u(n,s,r){let a=s?g.resolve(s):process.cwd();if(!n){r.json?console.log(JSON.stringify({error:"Orchestration ID required"})):(console.log(e.red(`
|
|
3
3
|
Orchestration ID required.`)),console.log(e.gray(`Usage: paradigm team accept <orchestration-id>
|
|
4
4
|
`)));return}let l=new b(a),o=l.getOrchestration(n);if(!o){r.json?console.log(JSON.stringify({error:"Orchestration not found",id:n})):console.log(e.red(`
|
|
5
5
|
Orchestration not found: ${n}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {g as g$1,i,f}from'./chunk-D34YFK4M.js';import {b}from'./chunk-Z5QW6USC.js';import'./chunk-5TAVYPOV.js';import s from'chalk';import {execSync}from'child_process';import*as g from'os';function h(){try{return execSync("git config user.name",{encoding:"utf-8",timeout:3e3}).trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").slice(0,20)||"unknown"}catch{try{return g.userInfo().username}catch{return "unknown"}}}async function C(i$1,e){let r=process.cwd(),p=e.pack||e.project||e.discipline?e:{...e,project:true};b(r,p);e.title||(console.error(s.red(`
|
|
3
|
+
Error: --title is required
|
|
4
|
+
`)),process.exit(1));let l=h(),n=new Date().toISOString().slice(0,10),a=e.title.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,40),d=e.tags?e.tags.split(",").map(t=>t.trim()):[],u=e.symbols?e.symbols.split(",").map(t=>t.trim()):[];if(i$1==="quiz"){let t=`Q-${a}`,x={id:t,title:e.title,description:e.body||"",author:l,created:n,updated:n,tags:d,symbols:u,difficulty:e.difficulty||"beginner",passThreshold:.7,questions:[]};g$1(r,x),i(r),console.log(s.green(`
|
|
5
|
+
Created quiz: ${t}`)),console.log(s.gray(` Add questions by editing the YAML file
|
|
6
|
+
`));return}let o=`${i$1==="policy"?"P":"N"}-${a}`,b$1={id:o,title:e.title,type:i$1,author:l,created:n,updated:n,tags:d,symbols:u,difficulty:e.difficulty||"beginner",estimatedMinutes:e.minutes?parseInt(e.minutes,10):void 0,prerequisites:[]};f(r,b$1,e.body||""),i(r),console.log(s.green(`
|
|
7
|
+
Created ${i$1}: ${o}`)),console.log(s.gray(` Edit at .paradigm/university/content/${i$1==="policy"?"policies":"notes"}/${o}.md
|
|
8
|
+
`));}export{C as universityAddCommand};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {a as a$1}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as a from'fs';import*as p from'path';import*as R from'os';import n from'chalk';import*as m from'js-yaml';var h=p.join(R.homedir(),".paradigm","agents"),x=".paradigm/agents",$=".agent",k=".paradigm/roster.yaml";function A(e){let s=p.join(e,k);if(!a.existsSync(s))return null;try{return m.load(a.readFileSync(s,"utf8"))?.active??null}catch{return null}}function F(e,s){let c=p.join(e,k),o=p.dirname(c);a.existsSync(o)||a.mkdirSync(o,{recursive:true});let t={version:"1.0",active:s.sort()};a.writeFileSync(c,m.dump(t,{lineWidth:-1,noRefs:true}),"utf8");}function C(){if(!a.existsSync(h))return [];try{return a.readdirSync(h).filter(e=>e.endsWith($)).map(e=>e.replace($,""))}catch{return []}}var E={architect:{style:"deliberate",risk:"conservative",verbosity:"detailed"},builder:{style:"rapid",risk:"balanced",verbosity:"concise"},tester:{style:"methodical",risk:"conservative",verbosity:"concise"},reviewer:{style:"deliberate",risk:"conservative",verbosity:"detailed"},security:{style:"methodical",risk:"conservative",verbosity:"detailed"}};async function D(e={}){let s=process.cwd(),c=a$1.command("agent-list").start("Listing agent profiles",{cwd:s}),o=[];if(!e.project&&a.existsSync(h))try{let f=a.readdirSync(h).filter(r=>r.endsWith($));for(let r of f)try{let d=a.readFileSync(p.join(h,r),"utf-8"),i=m.load(d);i?.id&&o.push(i);}catch{}}catch{}let t=p.join(s,x);if(!e.global&&a.existsSync(t))try{let f=a.readdirSync(t).filter(r=>r.endsWith($));for(let r of f)try{let d=a.readFileSync(p.join(t,r),"utf-8"),i=m.load(d);if(i?.id){let g=o.findIndex(u=>u.id===i.id);g>=0?o[g]=i:o.push(i);}}catch{}}catch{}if(e.json){console.log(JSON.stringify({count:o.length,agents:o.map(T)},null,2)),c.success(`Found ${o.length} agents`);return}if(console.log(n.blue(`
|
|
3
|
+
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510`)),console.log(n.blue("\u2502")+n.white.bold(" paradigm agent list ")+n.blue("\u2502")),console.log(n.blue("\u2502")+n.gray(" Persistent agent identity profiles ")+n.blue("\u2502")),console.log(n.blue(`\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
4
|
+
`)),o.length===0){console.log(n.yellow(" No .agent profiles found.")),console.log(n.gray(` Create one: paradigm agent create <id> --global
|
|
5
|
+
`)),c.success("No agents found");return}let l=new Set(o.map(f=>f.id)),y=false;for(let f of o){let d=(f.expertise||[]).sort((i,g)=>g.confidence-i.confidence).slice(0,3).map(i=>`${i.symbol} (${(i.confidence*100).toFixed(0)}%)`).join(", ")||n.gray("none yet");if(console.log(` ${n.white.bold(f.id)} \u2014 ${n.gray(f.role)}`),console.log(` Style: ${f.personality?.style||"?"} | Risk: ${f.personality?.risk||"?"} | Verbosity: ${f.personality?.verbosity||"?"}`),console.log(` Top expertise: ${d}`),f.partners&&f.partners.length>0){let i=f.partners.map(g=>l.has(g.id)?g.id:(y=true,`${g.id}${n.yellow("*")}`));console.log(` Partners: ${i.join(", ")}`);}console.log(` Projects: ${Object.keys(f.contexts||{}).join(", ")||n.gray("none")}`),console.log("");}y&&(console.log(n.dim(" * not installed \u2014 run: paradigm agent install <id>")),console.log("")),c.success(`Listed ${o.length} agents`);}async function L(e,s={}){let c=process.cwd(),o=a$1.command("agent-show").start(`Showing agent ${e}`,{cwd:c}),t=j(c,e);if(!t){s.json?console.log(JSON.stringify({error:`Agent "${e}" not found`})):(console.log(n.red(`
|
|
6
|
+
Agent "${e}" not found.`)),console.log(n.gray(` Create: paradigm agent create ${e} --global
|
|
7
|
+
`))),o.error(`Agent ${e} not found`);return}if(s.json){console.log(JSON.stringify(t,null,2)),o.success(`Showed agent ${e}`);return}if(console.log(n.blue(`
|
|
8
|
+
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510`)),console.log(n.blue("\u2502")+n.white.bold(` Agent: ${e}`.padEnd(50))+n.blue("\u2502")),console.log(n.blue(`\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
9
|
+
`)),console.log(` ${n.white.bold("Role:")} ${t.role}`),console.log(` ${n.white.bold("Description:")} ${t.description}`),console.log(` ${n.white.bold("Version:")} ${t.version}`),console.log(` ${n.white.bold("Created:")} ${t.created}`),console.log(` ${n.white.bold("Updated:")} ${t.updated}`),console.log(""),t.personality){let d=t.personality;console.log(` ${n.white.bold("Personality")}`),console.log(` Style: ${d.style} | Risk: ${d.risk} | Verbosity: ${d.verbosity}`),console.log("");}if(t.partners&&t.partners.length>0){let d=O(c),i=new Set(d.map(g=>g.id));console.log(` ${n.white.bold("Partners")} (${t.partners.length})`);for(let g of t.partners){if(!i.has(g.id)){console.log(` ${g.id} ${n.yellow("(not installed)")} ${n.dim("\u2014 paradigm agent install "+g.id)}`);continue}let b=d.find(w=>w.id===g.id)?.partners?.some(w=>w.id===t.id)??false;console.log(b?` ${g.id} ${n.green("\u2713 reciprocal")}${g.relation?n.dim(` \u2014 ${g.relation}`):""}`:` ${g.id} ${n.yellow("\u26A0 pending")} ${n.dim(`(${g.id} does not list ${t.id})`)}`);}console.log("");}let l=(t.expertise||[]).sort((d,i)=>i.confidence-d.confidence);if(l.length>0){console.log(` ${n.white.bold("Expertise")} (${l.length} symbols)`),console.log(` ${"Symbol".padEnd(30)} ${"Confidence".padEnd(12)} ${"Sessions".padEnd(10)} Last Touch`),console.log(` ${"-".repeat(70)}`);for(let d of l.slice(0,20)){let i=`${(d.confidence*100).toFixed(0)}%`.padEnd(12),g=String(d.sessions).padEnd(10),u=d.lastTouch?d.lastTouch.split("T")[0]:"\u2014";console.log(` ${d.symbol.padEnd(30)} ${i} ${g} ${u}`);}l.length>20&&console.log(n.gray(` ... and ${l.length-20} more`)),console.log("");}else console.log(n.gray(" No expertise recorded. Run `paradigm agent sync` to bootstrap from lore.\n"));let y=t.transferable||[];if(y.length>0){console.log(` ${n.white.bold("Transferable Patterns")} (${y.length})`);for(let d of y)console.log(` ${d.id}: ${(d.successRate*100).toFixed(0)}% success \u2014 ${d.description}`),console.log(n.gray(` Learned in: ${d.learnedIn} | Applied in: ${d.appliedIn.join(", ")||"none"}`));console.log("");}let f=Object.entries(t.contexts||{});if(f.length>0){console.log(` ${n.white.bold("Project Contexts")} (${f.length})`);for(let[d,i]of f)console.log(` ${n.white(d)}: ${i.sessionsInProject||0} sessions, last active ${i.lastActive?.split("T")[0]||"\u2014"}`),i.defaultModel&&console.log(` Model: ${i.defaultModel}`),i.focus?.length&&console.log(` Focus: ${i.focus.join(", ")}`);console.log("");}let r=t.permissions;r&&(console.log(` ${n.white.bold("Permissions")}`),r.paths?.read?.length&&console.log(` Read: ${r.paths.read.join(", ")}`),r.paths?.write?.length&&console.log(` Write: ${r.paths.write.join(", ")}`),r.paths?.deny?.length&&console.log(` Deny: ${n.red(r.paths.deny.join(", "))}`),r.tools?.allow?.length&&console.log(` Tools allow: ${r.tools.allow.join(", ")}`),r.tools?.deny?.length&&console.log(` Tools deny: ${n.red(r.tools.deny.join(", "))}`),r.dangerous_actions?.length&&console.log(` Requires approval: ${r.dangerous_actions.join(", ")}`),console.log("")),o.success(`Showed agent ${e}`);}async function W(e,s={}){let c=process.cwd(),o=s.global?"global":"project",t=a$1.command("agent-create").start(`Creating agent ${e} (${o})`,{cwd:c}),l=o==="global"?h:p.join(c,x);a.existsSync(l)||a.mkdirSync(l,{recursive:true});let y=p.join(l,`${e}${$}`);if(a.existsSync(y)){console.log(n.yellow(`
|
|
10
|
+
Agent "${e}" already exists at ${y}`)),console.log(n.gray(" Use `paradigm agent show` to view.\n")),t.error("Agent already exists");return}let f=new Date().toISOString(),r=E[e]||{style:"deliberate",risk:"balanced",verbosity:"concise"},d={id:e,role:s.role||`${e.charAt(0).toUpperCase()+e.slice(1)} agent`,description:s.description||`Persistent identity for the ${e} agent role`,version:"1.0.0",personality:r,expertise:[],transferable:[],contexts:{},created:f,updated:f};if(s.denyPaths){let g=s.denyPaths.split(",").map(u=>u.trim());d.permissions={paths:{deny:g}};}let i=m.dump(d,{lineWidth:120,noRefs:true,sortKeys:false});a.writeFileSync(y,i,"utf-8"),console.log(n.green(`
|
|
11
|
+
\u2713 Created agent "${e}" at ${y}`)),console.log(n.gray(" Run `paradigm agent sync` to bootstrap expertise from lore.\n")),t.success(`Created agent ${e}`);}async function M(e,s={}){let c=process.cwd(),o=a$1.command("agent-sync").start(`Syncing expertise for ${e}`,{cwd:c}),t=p.join(c,".paradigm","lore","entries");if(!a.existsSync(t)){console.log(n.yellow(`
|
|
12
|
+
No lore directory found. Nothing to sync from.
|
|
13
|
+
`)),o.error("No lore found");return}let l=j(c,e);if(!l){if(s.dryRun){console.log(n.yellow(`
|
|
14
|
+
Agent "${e}" not found. Would create with --no-dry-run.
|
|
15
|
+
`)),o.success("Dry run \u2014 would create");return}let g=(a.existsSync(p.join(h,`${e}${$}`))?"global":"project")==="global"?h:p.join(c,x);a.existsSync(g)||a.mkdirSync(g,{recursive:true});let u=new Date().toISOString(),b=E[e]||{style:"deliberate",risk:"balanced",verbosity:"concise"};l={id:e,role:`${e.charAt(0).toUpperCase()+e.slice(1)} agent`,description:`Persistent identity for the ${e} agent role`,version:"1.0.0",personality:b,expertise:[],transferable:[],contexts:{},created:u,updated:u};}let y=l.expertise||[],f=0,r=new Set,d=I(t);for(let i of d)if(!(!i.symbols_touched||i.symbols_touched.length===0)){f++;for(let g of i.symbols_touched){r.add(g);let u=y.find(b=>b.symbol===g);u?(u.sessions++,u.lastTouch=i.timestamp||u.lastTouch,i.confidence!=null&&(u.confidence=.7*u.confidence+.3*i.confidence)):y.push({symbol:g,confidence:i.confidence??.5,sessions:1,lastTouch:i.timestamp||new Date().toISOString()});}}if(l.expertise=y,s.json)console.log(JSON.stringify({agentId:e,entriesProcessed:f,symbolsUpdated:r.size,dryRun:!!s.dryRun,topExpertise:y.sort((i,g)=>g.confidence-i.confidence).slice(0,10)},null,2));else if(console.log(n.blue(`
|
|
16
|
+
Syncing expertise for "${e}" from ${f} lore entries...`)),console.log(` ${n.green("\u2713")} ${r.size} symbols updated`),console.log(` ${n.green("\u2713")} ${f} entries processed`),y.length>0){console.log(`
|
|
17
|
+
Top expertise:`);for(let i of y.sort((g,u)=>u.confidence-g.confidence).slice(0,5))console.log(` ${i.symbol}: ${(i.confidence*100).toFixed(0)}% (${i.sessions} sessions)`);}if(s.dryRun)s.json||console.log(n.yellow(`
|
|
18
|
+
Dry run \u2014 no changes written.
|
|
19
|
+
`));else {l.updated=new Date().toISOString();let i=p.join(c,x,`${e}${$}`),g=p.join(h,`${e}${$}`),u=a.existsSync(i)?"project":"global",b=u==="global"?h:p.join(c,x);a.existsSync(b)||a.mkdirSync(b,{recursive:true});let w=u==="global"?g:i;a.writeFileSync(w,m.dump(l,{lineWidth:120,noRefs:true,sortKeys:false}),"utf-8"),s.json||console.log(n.green(`
|
|
20
|
+
\u2713 Saved to ${w}
|
|
21
|
+
`));}o.success(`Synced ${r.size} symbols from ${f} entries`);}async function U(e={}){let s=process.cwd(),c=a$1.command("agent-roster").start("Agent roster",{cwd:s}),o=[];if(a.existsSync(h))for(let r of a.readdirSync(h).filter(d=>d.endsWith($)))try{let d=m.load(a.readFileSync(p.join(h,r),"utf-8"));d?.id&&o.push(d);}catch{}let t=p.join(s,x);if(a.existsSync(t))for(let r of a.readdirSync(t).filter(d=>d.endsWith($)))try{let d=m.load(a.readFileSync(p.join(t,r),"utf-8"));if(d?.id){let i=o.findIndex(g=>g.id===d.id);i>=0?o[i]=d:o.push(d);}}catch{}let l=A(s),y=l?o.filter(r=>l.includes(r.id)):o,f=l?o.filter(r=>!l.includes(r.id)):[];if(e.json){console.log(JSON.stringify({active:y.map(r=>v(r,false)),benched:f.map(r=>v(r,true))},null,2)),c.success(`${y.length} active, ${f.length} benched`);return}if(console.log(n.blue(`
|
|
22
|
+
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510`)),console.log(n.blue("\u2502")+n.white.bold(" Agent Roster ")+n.blue("\u2502")),console.log(n.blue(`\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
23
|
+
`)),y.length>0){console.log(n.green.bold(" Active"));for(let r of y)P(r);}if(f.length>0){console.log(n.gray.bold(`
|
|
24
|
+
Benched`));for(let r of f)P(r,true);}o.length===0?console.log(n.yellow(` No agents found.
|
|
25
|
+
`)):console.log(""),c.success(`${y.length} active, ${f.length} benched`);}function P(e,s=false){let c=(e.expertise||[]).sort((r,d)=>d.confidence-r.confidence),o=c[0]?`${c[0].symbol} (${(c[0].confidence*100).toFixed(0)}%)`:n.gray("\u2014"),t=s?n.gray:n.white,l=e.nickname?` (${e.nickname})`:"",y=e.attention?.threshold,f=y!=null?` | thr: ${y.toFixed(2)}`:"";console.log(` ${t.bold(e.id)}${n.gray(l)} \u2014 ${n.gray(e.role)}`),console.log(` Top: ${o} | ${c.length} symbols${f}`);}function v(e,s=false){let c=(e.expertise||[]).sort((o,t)=>t.confidence-o.confidence);return {id:e.id,role:e.role,nickname:e.nickname,benched:s,expertiseCount:c.length,topExpertise:c.slice(0,3).map(o=>({symbol:o.symbol,confidence:parseFloat(o.confidence.toFixed(2))})),threshold:e.attention?.threshold}}async function J(e){let s=process.cwd(),c=a$1.command("agent-bench").start(`Benching agent ${e}`,{cwd:s}),o=j(s,e);if(!o){console.log(n.red(`
|
|
26
|
+
Agent "${e}" not found.
|
|
27
|
+
`)),c.error("Not found");return}let t=A(s);t?t=t.filter(l=>l!==o.id):t=C().filter(l=>l!==o.id),F(s,t),console.log(n.yellow(`
|
|
28
|
+
Agent "${o.id}" removed from this project's roster.`)),console.log(n.gray(` Maestro will skip this agent during orchestration. Still available globally.
|
|
29
|
+
`)),c.success(`Benched ${o.id} (roster: ${t.length} active)`);}async function z(e){let s=process.cwd(),c=a$1.command("agent-activate").start(`Activating agent ${e}`,{cwd:s}),o=j(s,e);if(!o){console.log(n.red(`
|
|
30
|
+
Agent "${e}" not found.
|
|
31
|
+
`)),c.error("Not found");return}let t=A(s);if(t)t.includes(o.id)||t.push(o.id);else {let l=C();t=l.includes(o.id)?l:[...l,o.id];}F(s,t),console.log(n.green(`
|
|
32
|
+
\u25B6 Agent "${o.id}" added to this project's roster.`)),console.log(n.gray(` Maestro will include this agent in orchestration. Roster is per-project.
|
|
33
|
+
`)),c.success(`Activated ${o.id} (roster: ${t.length} active)`);}function j(e,s){let c=p.join(e,x,`${s}${$}`);if(a.existsSync(c))try{return m.load(a.readFileSync(c,"utf-8"))}catch{}let o=p.join(h,`${s}${$}`);if(a.existsSync(o))try{return m.load(a.readFileSync(o,"utf-8"))}catch{}return null}function O(e){let s=[],c=new Set;if(a.existsSync(h))try{for(let t of a.readdirSync(h).filter(l=>l.endsWith($)))try{let l=m.load(a.readFileSync(p.join(h,t),"utf-8"));l?.id&&!c.has(l.id)&&(s.push(l),c.add(l.id));}catch{}}catch{}let o=p.join(e,x);if(a.existsSync(o))try{for(let t of a.readdirSync(o).filter(l=>l.endsWith($)))try{let l=m.load(a.readFileSync(p.join(o,t),"utf-8"));if(l?.id){let y=s.findIndex(f=>f.id===l.id);y>=0?s[y]=l:(s.push(l),c.add(l.id));}}catch{}}catch{}return s}function T(e){return {id:e.id,role:e.role,personality:e.personality,expertiseCount:(e.expertise||[]).length,topExpertise:(e.expertise||[]).sort((s,c)=>c.confidence-s.confidence).slice(0,3).map(s=>({symbol:s.symbol,confidence:parseFloat(s.confidence.toFixed(2))})),projectContexts:Object.keys(e.contexts||{}),transferableCount:(e.transferable||[]).length}}function I(e){let s=[];try{let c=a.readdirSync(e,{withFileTypes:!0});for(let o of c){if(!o.isDirectory())continue;let t=p.join(e,o.name);try{let l=a.readdirSync(t).filter(y=>y.endsWith(".yaml")||y.endsWith(".yml"));for(let y of l)try{let f=a.readFileSync(p.join(t,y),"utf-8"),r=m.load(f);r?.symbols_touched&&Array.isArray(r.symbols_touched)&&s.push({symbols_touched:r.symbols_touched,confidence:typeof r.confidence=="number"?r.confidence:void 0,timestamp:r.timestamp||o.name});}catch{}}catch{}}}catch{}return s}export{z as agentActivateCommand,J as agentBenchCommand,W as agentCreateCommand,D as agentListCommand,U as agentRosterCommand,L as agentShowCommand,M as agentSyncCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export{p as buildProfileEnrichment,t as checkPathPermission,u as checkToolPermission,x as computeIntegrityHash,k as createAgentProfile,a as decayedConfidence,s as determineIntegrityStatus,w as enforcePermissions,g as findAgentsByNickname,v as getPermissionConstraints,c as isAgentActive,e as listAllGlobalAgentIds,f as loadAgentProfile,i as loadAllAgentProfiles,b as loadProjectRoster,o as mergeAgentProfileWithManifest,l as queryExpertise,h as resolveAgent,r as sanitizeForPrompt,j as saveAgentProfile,d as saveProjectRoster,q as syncExpertiseFromLore,n as updateExpertiseFromAssessment,m as updateExpertiseFromLore,y as verifyIntegrity}from'./chunk-
|
|
2
|
+
export{p as buildProfileEnrichment,t as checkPathPermission,u as checkToolPermission,x as computeIntegrityHash,k as createAgentProfile,a as decayedConfidence,s as determineIntegrityStatus,w as enforcePermissions,g as findAgentsByNickname,v as getPermissionConstraints,c as isAgentActive,e as listAllGlobalAgentIds,f as loadAgentProfile,i as loadAllAgentProfiles,b as loadProjectRoster,o as mergeAgentProfileWithManifest,l as queryExpertise,h as resolveAgent,r as sanitizeForPrompt,j as saveAgentProfile,d as saveProjectRoster,q as syncExpertiseFromLore,n as updateExpertiseFromAssessment,m as updateExpertiseFromLore,y as verifyIntegrity}from'./chunk-GD4F2HC6.js';import'./chunk-MBPLJKE5.js';import'./chunk-5TAVYPOV.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {z}from'./chunk-
|
|
2
|
+
import {z}from'./chunk-KAFQA7HV.js';export{p as buildProfileEnrichment,t as checkPathPermission,u as checkToolPermission,x as computeIntegrityHash,k as createAgentProfile,a as decayedConfidence,s as determineIntegrityStatus,w as enforcePermissions,g as findAgentsByNickname,v as getPermissionConstraints,c as isAgentActive,e as listAllGlobalAgentIds,f as loadAgentProfile,i as loadAllAgentProfiles,b as loadProjectRoster,o as mergeAgentProfileWithManifest,l as queryExpertise,h as resolveAgent,r as sanitizeForPrompt,j as saveAgentProfile,d as saveProjectRoster,q as syncExpertiseFromLore,n as updateExpertiseFromAssessment,m as updateExpertiseFromLore,y as verifyIntegrity}from'./chunk-KAFQA7HV.js';import'./chunk-EK4ZRIFJ.js';import'./chunk-5TAVYPOV.js';z();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {a}from'./chunk-TYWB5IQJ.js';import {e}from'./chunk-
|
|
2
|
+
import {a}from'./chunk-TYWB5IQJ.js';import {e}from'./chunk-TQOT2LBO.js';import'./chunk-5TAVYPOV.js';import o from'chalk';async function y(s,g){let r=process.cwd(),t=e(r);t||(g.json?console.log(JSON.stringify({error:"No agents.yaml found"})):console.log(o.red("\nNo agents.yaml found. Run `paradigm team init` first.\n")),process.exit(1));let e$1=a(s,t.agents);if(g.json){console.log(JSON.stringify({task:s,suggestions:e$1},null,2));return}if(console.log(o.cyan(`
|
|
3
3
|
Suggested agents for this task:
|
|
4
4
|
`)),console.log(o.gray(` Task: "${s}"
|
|
5
5
|
`)),e$1.length===0){console.log(o.yellow(` No agents matched. Consider using architect \u2192 builder flow.
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {f,p as p$1,i,c as c$1,j}from'./chunk-
|
|
2
|
+
import {f,p as p$1,i,c as c$1,j}from'./chunk-GD4F2HC6.js';import {e,b as b$2,f as f$1}from'./chunk-F6E3HW45.js';import {b as b$3}from'./chunk-7SWEOPWF.js';import'./chunk-MBPLJKE5.js';import {c,b as b$1,d,a}from'./chunk-5TAVYPOV.js';import*as p from'fs';import*as b from'path';import*as T from'js-yaml';import*as Z from'os';var kt={};c(kt,{getJournalStats:()=>se,loadAllJournalEntries:()=>re,loadJournalEntries:()=>O,loadJournalEntry:()=>ie,recordJournalEntry:()=>V});function G(e){let t=process.env.HOME||process.env.USERPROFILE||"";return b.join(t,".paradigm","agents",e,"journal")}function oe(){let e=new Date,t=e.toISOString().slice(0,10),n=e.toISOString().slice(11,19).replace(/:/g,""),o=String(Math.floor(Math.random()*999)+1).padStart(3,"0");return `LJ-${t}-${n}-${o}`}function V(e,t){let n=new Date,o=oe(),r={id:o,agent:e,timestamp:n.toISOString(),...t},i=G(e);p.mkdirSync(i,{recursive:true});let s=b.join(i,`${o}.yaml`);return p.writeFileSync(s,T.dump(r,{lineWidth:120,noRefs:true}),"utf8"),r}function O(e,t){let n=G(e);if(!p.existsSync(n))return [];let o=[],r=p.readdirSync(n).filter(s=>s.endsWith(".yaml"));for(let s of r)try{let a=p.readFileSync(b.join(n,s),"utf8"),c=T.load(a);c&&c.id&&o.push(c);}catch{}let i=o;return t?.trigger&&(i=i.filter(s=>s.trigger===t.trigger)),t?.project&&(i=i.filter(s=>s.project===t.project)),t?.transferable!==void 0&&(i=i.filter(s=>s.transferable===t.transferable)),t?.tag&&(i=i.filter(s=>s.tags?.some(a=>a.startsWith(t.tag)))),t?.dateFrom&&(i=i.filter(s=>s.timestamp>=t.dateFrom)),t?.dateTo&&(i=i.filter(s=>s.timestamp<=t.dateTo)),i.sort((s,a)=>a.timestamp.localeCompare(s.timestamp)),t?.limit&&(i=i.slice(0,t.limit)),i}function ie(e,t){let n=G(e),o=b.join(n,`${t}.yaml`);if(!p.existsSync(o))return null;let r=p.readFileSync(o,"utf8");return T.load(r)}function re(e){let t=process.env.HOME||process.env.USERPROFILE||"",n=b.join(t,".paradigm","agents");if(!p.existsSync(n))return [];let o=[],r=p.readdirSync(n,{withFileTypes:true}).filter(i=>i.isDirectory());for(let i of r){if(e?.agent&&i.name!==e.agent)continue;let s=O(i.name,e);o.push(...s);}return o.sort((i,s)=>s.timestamp.localeCompare(i.timestamp)),e?.limit?o.slice(0,e.limit):o}function se(e){let t=O(e),n={},o={},r=0;for(let i of t)n[i.trigger]=(n[i.trigger]||0)+1,o[i.project]=(o[i.project]||0)+1,i.transferable&&r++;return {total:t.length,byTrigger:n,byProject:o,transferableCount:r,recentInsights:t.slice(0,5).map(i=>({id:i.id,trigger:i.trigger,insight:i.insight.slice(0,200),timestamp:i.timestamp}))}}var K=b$1(()=>{});var Tt={};c(Tt,{addNotebookEntry:()=>Rt,classifyNotebookScope:()=>$t,incrementApplied:()=>de,loadNotebookEntries:()=>Nt,promoteFromLore:()=>le,searchNotebooks:()=>ce});function Nt(e,t,n){let o=new Map,r=b.join(X,e);xt(r,o);let i=b.join(t,Y,e);xt(i,o);let s=Array.from(o.values());if(n?.concepts&&n.concepts.length>0){let a=new Set(n.concepts.map(c=>c.toLowerCase()));s=s.filter(c=>c.concepts.some(u=>a.has(u.toLowerCase())));}if(n?.tags&&n.tags.length>0){let a=new Set(n.tags.map(c=>c.toLowerCase()));s=s.filter(c=>c.tags.some(u=>a.has(u.toLowerCase())));}return s.sort((a,c)=>c.appliedCount-a.appliedCount)}function xt(e,t){if(p.existsSync(e))try{let n=p.readdirSync(e).filter(o=>o.startsWith(ae)&&o.endsWith(Q));for(let o of n)try{let r=p.readFileSync(b.join(e,o),"utf-8"),i=T.load(r);i?.id&&t.set(i.id,i);}catch{}}catch{}}function ce(e,t,n){let o=Nt(e,n),r=t.toLowerCase();return o.filter(i=>i.context.toLowerCase().includes(r)||i.snippet.toLowerCase().includes(r)||i.concepts.some(s=>s.toLowerCase().includes(r))||i.tags.some(s=>s.toLowerCase().includes(r)))}function $t(e){let t=[e.context,e.snippet,...e.concepts,...e.tags].join(" ").toLowerCase();return ["paradigm","mcp_","mcp tool",".paradigm/","lore entry","lore record","aspect","^gate","portal.yaml",".purpose","sentinel","symphony","ambient nomination","paradigm_"," pan ","agent notebook","concept anchor","symbol system","work log","knowledge stream","nevr.land","neverland"].some(o=>t.includes(o))?"platform-specific":/[#$^!~][a-z][a-z0-9-]{2,}/.test(t)||/\/[a-z0-9_-]{2,}\/[a-z0-9_-]/.test(t)?"project-specific":"generalizable"}function Rt(e,t,n,o){let r=new Date().toISOString(),i=(t.concepts[0]||t.context.split(" ").slice(0,4).join(" ")||"entry").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,40),a=`nb-${e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}-${i}`,c=t.scope??$t({context:t.context,snippet:t.snippet,concepts:t.concepts,tags:t.tags}),u={...t,id:a,scope:c,publishable:t.publishable??true,appliedCount:0,created:r,updated:r},d=n==="global"?b.join(X,e):b.join(o||process.cwd(),Y,e);p.existsSync(d)||p.mkdirSync(d,{recursive:true});let l=`${a}${Q}`,m=b.join(d,l),g=T.dump(u,{lineWidth:120,noRefs:true,sortKeys:false});return p.writeFileSync(m,g,"utf-8"),{entry:u,filePath:m}}async function le(e,t,n,o="global"){let{loadLoreEntry:r}=await import('./lore-loader-D2ISOASW.js'),i=await r(n,t);if(!i)return null;let s=[];if(i.symbols_touched)for(let u of i.symbols_touched){let d=u.replace(/^[#$^!~]/,"").toLowerCase();s.push(d);}let a=i.summary||"";i.body&&(a+=`
|
|
3
3
|
|
|
4
|
-
`+i.body);let c={source:"lore",loreEntryId:t,originProject:b.basename(n),createdBy:e};return
|
|
4
|
+
`+i.body);let c={source:"lore",loreEntryId:t,originProject:b.basename(n),createdBy:e};return Rt(e,{context:i.title||`Promoted from ${t}`,snippet:a,provenance:c,confidence:i.confidence??.7,concepts:s,tags:i.tags||[]},o,n)}function de(e,t,n){let o=b.join(n,Y,e),r=b.join(X,e);for(let i of [o,r]){let s=b.join(i,`${t}${Q}`);if(p.existsSync(s))try{let a=p.readFileSync(s,"utf-8"),c=T.load(a);if(c)return c.appliedCount=(c.appliedCount||0)+1,c.updated=new Date().toISOString(),p.writeFileSync(s,T.dump(c,{lineWidth:120,noRefs:!0,sortKeys:!1}),"utf-8"),!0}catch{}}return false}var X,Y,ae,Q,Pt=b$1(()=>{X=b.join(Z.homedir(),".paradigm","notebooks"),Y=".paradigm/notebooks",ae="nb-",Q=".yaml";});var ht=".paradigm/events",Yt="stream.jsonl",J=1e3,$=[];function bt(e){return b.join(e,ht,Yt)}function Qt(){let e=Date.now(),t=Math.floor(Math.random()*9999).toString().padStart(4,"0");return `ev-${e}-${t}`}function M(e,t){let n={id:Qt(),timestamp:new Date().toISOString(),...t};$.push(n),$.length>J&&($=$.slice(-J));try{let o=b.join(e,ht);p.mkdirSync(o,{recursive:!0});let r=bt(e);p.appendFileSync(r,JSON.stringify(n)+`
|
|
5
5
|
`,"utf8"),Zt(r);}catch{}return n}function Zt(e){try{if(p.statSync(e).size>512*1024){let o=p.readFileSync(e,"utf8").trim().split(`
|
|
6
6
|
`);if(o.length>J){let r=o.slice(-J);p.writeFileSync(e,r.join(`
|
|
7
7
|
`)+`
|
|
8
8
|
`,"utf8");}}}catch{}}function St(e,t){let n=te(e);return t?.type&&(n=n.filter(o=>o.type===t.type)),t?.source&&(n=n.filter(o=>o.source===t.source)),t?.symbol&&(n=n.filter(o=>o.symbols?.includes(t.symbol))),t?.agent&&(n=n.filter(o=>o.agent===t.agent)),t?.since&&(n=n.filter(o=>o.timestamp>=t.since)),n.sort((o,r)=>r.timestamp.localeCompare(o.timestamp)),t?.limit&&(n=n.slice(0,t.limit)),n}function te(e){let t=bt(e);if(!p.existsSync(t))return [...$];try{return p.readFileSync(t,"utf8").trim().split(`
|
|
9
|
-
`).filter(r=>r.trim()).map(r=>{try{return JSON.parse(r)}catch{return null}}).filter(r=>r!==null)}catch{return [...$]}}function wt(e,t,n){let o=0,r=0,i=0,s=0;if(n.symbols?.length&&e.symbols?.length)for(let d of n.symbols)for(let l of e.symbols)yt(d,l)&&(o=Math.max(o,1));if(n.paths?.length&&e.path){for(let d of n.paths)if(yt(d,e.path)){r=1;break}}if(n.concepts?.length){let d=[e.context||"",...e.keywords||[],e.type||""].join(" ").toLowerCase(),l=0;for(let m of n.concepts)m&&d.includes(m.toLowerCase())&&l++;n.concepts.length>0&&(i=l/n.concepts.length);}if(n.signals?.length){for(let d of n.signals)if(d.type===e.type){s=1;break}}let a=[o,r,i,s].sort((d,l)=>l-d),c=a[0]*.5+a[1]*.2+a[2]*.15+a[3]*.15,u=n.threshold??.6;return {agentId:t,score:c,breakdown:{symbolMatch:o,pathMatch:r,conceptMatch:i,signalMatch:s},shouldNominate:c>=u,quietReason:c<u?"below-threshold":void 0}}function yt(e,t){if(e===t)return true;let n=e.replace(/\*\*/g,"\xA7\xA7").replace(/\*/g,"[^/]*").replace(/§§/g,".*");try{return new RegExp(`^${n}$`).test(t)}catch{return false}}var ee=".paradigm/data-policy.yaml";function jt(e){let t=b.join(e,ee);if(!p.existsSync(t))return {...b$3};try{let n=p.readFileSync(t,"utf8"),o=
|
|
9
|
+
`).filter(r=>r.trim()).map(r=>{try{return JSON.parse(r)}catch{return null}}).filter(r=>r!==null)}catch{return [...$]}}function wt(e,t,n){let o=0,r=0,i=0,s=0;if(n.symbols?.length&&e.symbols?.length)for(let d of n.symbols)for(let l of e.symbols)yt(d,l)&&(o=Math.max(o,1));if(n.paths?.length&&e.path){for(let d of n.paths)if(yt(d,e.path)){r=1;break}}if(n.concepts?.length){let d=[e.context||"",...e.keywords||[],e.type||""].join(" ").toLowerCase(),l=0;for(let m of n.concepts)m&&d.includes(m.toLowerCase())&&l++;n.concepts.length>0&&(i=l/n.concepts.length);}if(n.signals?.length){for(let d of n.signals)if(d.type===e.type){s=1;break}}let a=[o,r,i,s].sort((d,l)=>l-d),c=a[0]*.5+a[1]*.2+a[2]*.15+a[3]*.15,u=n.threshold??.6;return {agentId:t,score:c,breakdown:{symbolMatch:o,pathMatch:r,conceptMatch:i,signalMatch:s},shouldNominate:c>=u,quietReason:c<u?"below-threshold":void 0}}function yt(e,t){if(e===t)return true;let n=e.replace(/\*\*/g,"\xA7\xA7").replace(/\*/g,"[^/]*").replace(/§§/g,".*");try{return new RegExp(`^${n}$`).test(t)}catch{return false}}var ee=".paradigm/data-policy.yaml";function jt(e){let t=b.join(e,ee);if(!p.existsSync(t))return {...b$3};try{let n=p.readFileSync(t,"utf8"),o=T.load(n);return ne(b$3,o)}catch{return {...b$3}}}function ne(e,t){let n={...e};if(t.version&&(n.version=t.version),t.default_ring&&(n.default_ring=t.default_ring),t.observation&&(n.observation={allow:t.observation.allow||e.observation?.allow,deny:[...e.observation?.deny||[],...t.observation.deny||[]].filter((o,r,i)=>i.indexOf(o)===r)}),t.streams){n.streams={...e.streams};for(let o of ["work_log","learning_journal","team_decisions"])t.streams[o]&&(n.streams[o]={...e.streams?.[o],...t.streams[o],deny_content:[...e.streams?.[o]?.deny_content||[],...t.streams[o]?.deny_content||[]].filter((r,i,s)=>s.indexOf(r)===i)});}return t.upstream&&(n.upstream={...e.upstream,...t.upstream}),t.network&&(n.network={...e.network,...t.network}),t.agent_overrides&&(n.agent_overrides={...e.agent_overrides,...t.agent_overrides}),t.deployment&&(n.deployment={...e.deployment,...t.deployment}),n}function Et(e,t,n){return n&&e.agent_overrides?.[n]?.observation&&e.agent_overrides[n].observation.deny?.some(r=>z(r,t))||e.observation?.deny?.some(o=>z(o,t))?false:e.observation?.allow?.length?e.observation.allow.some(o=>z(o,t)):true}function z(e,t){if(e===t)return true;let n=e.replace(/\*\*/g,"\xA7\xA7").replace(/\*/g,"[^/]*").replace(/§§/g,".*");try{return new RegExp(`^${n}$`).test(t)}catch{return false}}var N=".paradigm/events",ue="nominations.jsonl",me="debates.jsonl",fe=500,pe=200,ge=7,ye=14,he=100;function be(){let e=Date.now(),t=Math.floor(Math.random()*9999).toString().padStart(4,"0");return `nom-${e}-${t}`}function Se(){let e=Date.now(),t=Math.floor(Math.random()*9999).toString().padStart(4,"0");return `dbt-${e}-${t}`}function we(e,t){let n=i(e),o=jt(e),r=[];for(let u of n){if(!u.attention||!c$1(u.id,e)||t.path&&!Et(o,t.path,u.id))continue;let d=wt(t,u.id,u.attention);d.shouldNominate&&r.push({profile:u,score:d});}if(r.length===0)return {nominations:[],debates:[]};let i$1=E(e,{since:new Date(Date.now()-3e4).toISOString()}),s=r.filter(({profile:u})=>!i$1.find(l=>l.agent===u.id&&l.brief===Ot(u,t,{...r.find(m=>m.profile.id===u.id).score})));if(s.length===0)return {nominations:[],debates:[]};let a=s.map(({profile:u,score:d})=>{let l=_e(t,d),m=ve(u,t);return {id:be(),agent:u.id,relevance:d.score,urgency:l,type:m,brief:Ot(u,t,d),triggered_by:[t.id],timestamp:new Date().toISOString(),surfaced:false}});Ee(e,a);let c=je(e,a);return c.length>0&&ke(e,c),{nominations:a,debates:c}}function _e(e,t){return e.severity==="critical"?"critical":e.severity==="error"||e.type==="compliance-violation"||e.type==="error-encountered"?"high":e.type==="gate-added"||e.type==="route-created"||t.score>=.9?"medium":"low"}function ve(e,t){let n=e.collaboration?.stance;return t.type==="compliance-violation"||t.type==="error-encountered"?"warning":t.type==="gate-added"||t.type==="route-created"?"observation":n==="advisory"||n==="lead"?"suggestion":"observation"}function Ot(e,t,n){let o=e.role||e.id;switch(t.type){case "gate-checked":return `${o}: Gate check on ${t.symbols?.join(", ")||"route"} \u2014 verify gate coverage is complete`;case "file-modified":return `${o}: ${t.path||"File"} modified \u2014 review for ${e.id==="security"?"security implications":e.id==="tester"?"test coverage":e.id==="reviewer"?"code quality":"consistency"}`;case "compliance-violation":return `${o}: Compliance violation detected \u2014 ${t.context||"check .purpose and portal.yaml coverage"}`;case "route-created":return `${o}: New route ${t.symbols?.join(", ")||""} \u2014 ${e.id==="security"?"needs gate assignment in portal.yaml":"review route structure"}`;case "gate-added":return `${o}: Gate ${t.symbols?.join(", ")||""} added \u2014 ${e.id==="security"?"verify enforcement points":"check downstream impact"}`;case "decision-made":return `${o}: Decision recorded \u2014 ${t.context?.slice(0,80)||"review for alignment with project patterns"}`;case "work-completed":return `${o}: Work completed on ${t.symbols?.join(", ")||t.context?.slice(0,40)||"task"} \u2014 review outcome`;case "error-encountered":return `${o}: Error detected \u2014 ${t.context?.slice(0,80)||"investigate root cause"}`;default:{let r=n.breakdown.symbolMatch>0?`symbol match on ${t.symbols?.join(", ")||"unknown"}`:n.breakdown.pathMatch>0?`path ${t.path||"unknown"}`:t.context?.slice(0,60)||t.type;return `${o}: ${r}`}}}function je(e,t){if(t.length<2)return [];let n=[],o=new Map;for(let r of t)for(let i of r.triggered_by){let s=o.get(i)||[];s.push(r),o.set(i,s);}for(let[r,i]of o){if(i.length<2||new Set(i.map(u=>u.agent)).size<2)continue;let a=new Set(i.map(u=>u.type)),c=a.size>1&&a.has("warning")&&a.has("suggestion");n.push({id:Se(),topic:`Multiple agents responded to event ${r}`,nominations:i.map(u=>u.id),type:c?"conflicting":"complementary",overlap_events:[r]});}return n}function tt(e){return b.join(e,N,ue)}function et(e){return b.join(e,N,me)}function Ee(e,t){try{let n=b.join(e,N);p.mkdirSync(n,{recursive:!0});let o=tt(e),r=t.map(s=>JSON.stringify(s)).join(`
|
|
10
10
|
`)+`
|
|
11
|
-
`;p.appendFileSync(o,r,"utf8"),
|
|
11
|
+
`;p.appendFileSync(o,r,"utf8"),At(o,fe);let{nominationTtlDays:i}=U(e);Ft(o,i*24*60*60*1e3);}catch{}}function ke(e,t){try{let n=b.join(e,N);p.mkdirSync(n,{recursive:!0});let o=et(e),r=t.map(s=>JSON.stringify(s)).join(`
|
|
12
12
|
`)+`
|
|
13
|
-
`;p.appendFileSync(o,r,"utf8"),
|
|
13
|
+
`;p.appendFileSync(o,r,"utf8"),At(o,pe);let{debateTtlDays:i}=U(e);Ft(o,i*24*60*60*1e3);}catch{}}function At(e,t){try{let o=p.readFileSync(e,"utf8").trim().split(`
|
|
14
14
|
`).filter(r=>r.trim());if(o.length>t){let r=o.slice(-t);p.writeFileSync(e,r.join(`
|
|
15
15
|
`)+`
|
|
16
|
-
`,"utf8");}}catch{}}function
|
|
16
|
+
`,"utf8");}}catch{}}function U(e){let t={nominationTtlDays:ge,debateTtlDays:ye};try{let n=b.join(e,".paradigm","config.yaml");if(!p.existsSync(n))return t;let o=a("js-yaml"),r=p.readFileSync(n,"utf8"),s=o.load(r)?.ambient;return s?{nominationTtlDays:typeof s["nomination-ttl-days"]=="number"?s["nomination-ttl-days"]:t.nominationTtlDays,debateTtlDays:typeof s["debate-ttl-days"]=="number"?s["debate-ttl-days"]:t.debateTtlDays}:t}catch{return t}}function Ft(e,t){try{if(!p.existsSync(e))return;let o=p.readFileSync(e,"utf8").trim().split(`
|
|
17
17
|
`).filter(s=>s.trim());if(o.length<=he)return;let r=Date.now()-t,i=o.filter(s=>{try{let a=JSON.parse(s);return (a.timestamp?new Date(a.timestamp).getTime():Date.now())>=r}catch{return !0}});i.length<o.length&&p.writeFileSync(e,i.join(`
|
|
18
18
|
`)+`
|
|
19
19
|
`,"utf8");}catch{}}function E(e,t){let n=tt(e);if(!p.existsSync(n))return [];try{let r=p.readFileSync(n,"utf8").trim().split(`
|
|
20
|
-
`).filter(i=>i.trim()).map(i=>{try{return JSON.parse(i)}catch{return null}}).filter(i=>i!==null);return t?.agent&&(r=r.filter(i=>i.agent===t.agent)),t?.urgency&&(r=r.filter(i=>i.urgency===t.urgency)),t?.surfaced!==void 0&&(r=r.filter(i=>i.surfaced===t.surfaced)),t?.pending_only&&(r=r.filter(i=>!i.engaged)),t?.since&&(r=r.filter(i=>i.timestamp>=t.since)),r.sort((i,s)=>s.timestamp.localeCompare(i.timestamp)),t?.limit&&(r=r.slice(0,t.limit)),r}catch{return []}}function
|
|
21
|
-
`).filter(o=>o.trim()).map(o=>{try{return JSON.parse(o)}catch{return null}}).filter(o=>o!==null)}catch{return []}}function
|
|
20
|
+
`).filter(i=>i.trim()).map(i=>{try{return JSON.parse(i)}catch{return null}}).filter(i=>i!==null);return t?.agent&&(r=r.filter(i=>i.agent===t.agent)),t?.urgency&&(r=r.filter(i=>i.urgency===t.urgency)),t?.surfaced!==void 0&&(r=r.filter(i=>i.surfaced===t.surfaced)),t?.pending_only&&(r=r.filter(i=>!i.engaged)),t?.since&&(r=r.filter(i=>i.timestamp>=t.since)),r.sort((i,s)=>s.timestamp.localeCompare(i.timestamp)),t?.limit&&(r=r.slice(0,t.limit)),r}catch{return []}}function It(e){let t=et(e);if(!p.existsSync(t))return [];try{return p.readFileSync(t,"utf8").trim().split(`
|
|
21
|
+
`).filter(o=>o.trim()).map(o=>{try{return JSON.parse(o)}catch{return null}}).filter(o=>o!==null)}catch{return []}}function Ct(e,t,n,o){let r=tt(e);if(!p.existsSync(r))return false;try{let s=p.readFileSync(r,"utf8").trim().split(`
|
|
22
22
|
`),a=!1,c=s.map(u=>{try{let d=JSON.parse(u);return d.id===t?(d.engaged=!0,d.response=n,o&&(d.reason=o),a=!0,JSON.stringify(d)):u}catch{return u}});if(a&&(p.writeFileSync(r,c.join(`
|
|
23
23
|
`)+`
|
|
24
24
|
`,"utf8"),n==="accepted"||n==="dismissed")){let u=JSON.parse(s.find(l=>{try{return JSON.parse(l).id===t}catch{return !1}}));i(e).find(l=>l.id===u.agent)?.learning?.intrinsic?.feedback?.after_recommendation&&M(e,{type:"work-completed",source:"agent-action",agent:u.agent,context:`Nomination ${t} ${n} \u2014 feedback for learning`,data:{nomination_id:t,response:n}});}return a}catch{return false}}function Jt(e,t,n,o){let r=et(e);if(!p.existsSync(r))return false;try{let s=p.readFileSync(r,"utf8").trim().split(`
|
|
25
25
|
`),a=!1,c=s.map(u=>{try{let d=JSON.parse(u);if(d.id===t){d.resolution={chosen:n,reason:o,resolved_by:"human",resolved_at:new Date().toISOString()},a=!0;let l=d.nominations.filter(m=>m!==n);for(let m of l){let g=E(e).find(f=>f.id===m);g&&M(e,{type:"work-completed",source:"agent-action",agent:g.agent,context:`Debate ${t} resolved \u2014 nomination ${m} not chosen`,data:{debate_id:t,chosen:n,reason:o}});}return JSON.stringify(d)}return u}catch{return u}});return a&&p.writeFileSync(r,c.join(`
|
|
26
26
|
`)+`
|
|
27
27
|
`,"utf8"),a}catch{return false}}function Mt(e){let t=b.join(e,N,".last-processed"),n="";try{p.existsSync(t)&&(n=p.readFileSync(t,"utf8").trim());}catch{}let o=b.join(e,N,"stream.jsonl");if(!p.existsSync(o))return {processed:0,nominations:[]};let r=[];try{r=p.readFileSync(o,"utf8").trim().split(`
|
|
28
|
-
`).filter(l=>l.trim()).map(l=>{try{return JSON.parse(l)}catch{return null}}).filter(l=>l!==null);}catch{return {processed:0,nominations:[]}}let i=0;if(n){let d=r.findIndex(l=>l.id===n);d>=0&&(i=d+1);}let s=r.slice(i);if(s.length===0)return {processed:0,nominations:[]};let a=[],c=s.slice(0,50);for(let d of c){let{nominations:l}=we(e,d);a.push(...l);}let u=c[c.length-1];try{p.mkdirSync(b.join(e,N),{recursive:!0}),p.writeFileSync(t,u.id,"utf8");}catch{}return {processed:c.length,nominations:a}}function Lt(e,t){let n=f(e,t);if(!n?.attention)return {adjusted:false,oldThreshold:.6,newThreshold:.6,reason:"No attention config"};let o=n.attention.threshold??.6,{nominationTtlDays:r}=
|
|
28
|
+
`).filter(l=>l.trim()).map(l=>{try{return JSON.parse(l)}catch{return null}}).filter(l=>l!==null);}catch{return {processed:0,nominations:[]}}let i=0;if(n){let d=r.findIndex(l=>l.id===n);d>=0&&(i=d+1);}let s=r.slice(i);if(s.length===0)return {processed:0,nominations:[]};let a=[],c=s.slice(0,50);for(let d of c){let{nominations:l}=we(e,d);a.push(...l);}let u=c[c.length-1];try{p.mkdirSync(b.join(e,N),{recursive:!0}),p.writeFileSync(t,u.id,"utf8");}catch{}return {processed:c.length,nominations:a}}function Lt(e,t){let n=f(e,t);if(!n?.attention)return {adjusted:false,oldThreshold:.6,newThreshold:.6,reason:"No attention config"};let o=n.attention.threshold??.6,{nominationTtlDays:r}=U(e),i=r*24*60*60*1e3,c=E(e,{agent:t}).filter(j=>j.engaged||Date.now()-new Date(j.timestamp).getTime()<i).filter(j=>j.engaged);if(c.length<5)return {adjusted:false,oldThreshold:o,newThreshold:o,reason:`Insufficient data (${c.length}/5 engaged nominations)`};let u=c.filter(j=>j.response==="accepted").length,d=c.filter(j=>j.response==="dismissed").length,l=u/c.length,m=d/c.length,g=o,f$1="No adjustment needed";if(m>.6?(g=Math.min(.95,o+.05),f$1=`High dismiss rate (${(m*100).toFixed(0)}%) \u2014 raising threshold to reduce noise`):l>.8&&(g=Math.max(.2,o-.05),f$1=`High accept rate (${(l*100).toFixed(0)}%) \u2014 lowering threshold to contribute more`),g===o)return {adjusted:false,oldThreshold:o,newThreshold:g,reason:f$1};n.attention.threshold=g;let y=b.join(e,".paradigm/agents",`${t}.agent`),D=p.existsSync(y)?"project":"global";return j(t,n,D,e),M(e,{type:"work-completed",source:"agent-action",agent:t,context:`Attention threshold adjusted: ${o.toFixed(2)} \u2192 ${g.toFixed(2)} (${f$1})`,data:{old_threshold:o,new_threshold:g,accept_rate:l,dismiss_rate:m}}),{adjusted:true,oldThreshold:o,newThreshold:g,reason:f$1}}function nt(e,t){let{nominationTtlDays:n}=U(e),o=n*24*60*60*1e3,i=E(e,{agent:t}).filter(l=>l.engaged||Date.now()-new Date(l.timestamp).getTime()<o),s=i.filter(l=>l.response==="accepted").length,a=i.filter(l=>l.response==="dismissed").length,c=i.filter(l=>l.response==="deferred").length,u=i.filter(l=>!l.engaged).length,d=s+a+c;return {total:i.length,accepted:s,dismissed:a,deferred:c,pending:u,acceptRate:d>0?s/d:0}}function Ut(e){let n=i(e).filter(l=>c$1(l.id,e)).map(l=>{let m=nt(e,l.id),g=0;try{let f=b.join(Z.homedir(),".paradigm","notebooks",l.id);p.existsSync(f)&&(g=p.readdirSync(f).filter(y=>y.endsWith(".yaml")).length);}catch{}return {id:l.id,acceptRate:m.acceptRate,threshold:l.attention?.threshold??.5,expertiseCount:(l.expertise||[]).length,notebookCount:g,transferableCount:(l.transferable||[]).length,totalNominations:m.total}}),o=n.length||1,r=n.reduce((l,m)=>l+m.acceptRate,0)/o,i$1=n.reduce((l,m)=>l+m.threshold,0)/o,s=n.reduce((l,m)=>l+m.expertiseCount,0),a=n.reduce((l,m)=>l+m.notebookCount,0),c=n.reduce((l,m)=>l+m.transferableCount,0),u=n.reduce((l,m)=>l+m.totalNominations,0),d;return u<10?d="cold-start":r<.5?d="accumulating":r<.7?d="calibrating":d="mature",{agents:n,aggregate:{avgAcceptRate:r,avgThreshold:i$1,totalExpertise:s,totalNotebooks:a,totalTransferable:c},healthStatus:d}}function ot(e,t){let n,o;try{let c=(K(),d(kt)),u=(Pt(),d(Tt));n=c.loadJournalEntries,o=u.addNotebookEntry;}catch{return {promoted:0,entries:[]}}let r=n(t,{trigger:"pattern_discovered",limit:100}),i=n(t,{trigger:"human_feedback",limit:100}),s=[...r,...i],a=[];for(let c of s)if(!c.promoted_to_notebook&&!((c.confidence_after??0)<.8))try{let{entry:u}=o(t,{context:c.pattern?.applies_when||c.insight.slice(0,80),snippet:c.pattern?.correct_approach||c.insight,concepts:c.tags||[c.pattern?.id||"learned-pattern"],provenance:{source:"lore",loreEntryId:c.id,createdBy:t}},"global",e);a.push({journalId:c.id,notebookId:u.id});try{let d=b.join(Z.homedir(),".paradigm","agents",t,"journal");if(p.existsSync(d)){let l=p.readdirSync(d).filter(m=>m.endsWith(".yaml"));for(let m of l){let g=b.join(d,m),f=p.readFileSync(g,"utf8");if(f.includes(c.id)){let y=f.replace(/promoted_to_notebook:.*$/m,`promoted_to_notebook: "${u.id}"`);if(y===f){let D=f.trimEnd().split(`
|
|
29
29
|
`);D.push(`promoted_to_notebook: "${u.id}"`),p.writeFileSync(g,D.join(`
|
|
30
30
|
`)+`
|
|
31
|
-
`,"utf8");}else p.writeFileSync(g,y,"utf8");break}}}}catch{}}catch{}return {promoted:a.length,entries:a}}var xe=".paradigm/surfacing.yaml";function
|
|
31
|
+
`,"utf8");}else p.writeFileSync(g,y,"utf8");break}}}}catch{}}catch{}return {promoted:a.length,entries:a}}var xe=".paradigm/surfacing.yaml";function Ht(e){let t=b.join(e,xe),n={default_min_urgency:"low",enable_debates:true};if(!p.existsSync(t))return n;try{let o=a("js-yaml"),r=p.readFileSync(t,"utf8"),i=o.load(r);return {...n,...i}}catch{return n}}function Bt(e,t){let n={critical:0,high:1,medium:2,low:3},o=n[t.default_min_urgency||"low"]??3;return e.filter(r=>{let i=n[r.urgency]??3;if(t.preferences){let s=t.preferences.find(a=>a.agent===r.agent);if(s){if(s.always_show)return true;if(s.mute_unless?.length&&!s.mute_unless.some(c=>r.urgency===c||r.type===c))return false;if(s.min_urgency){let a=n[s.min_urgency]??3;return i<=a}}}return i<=o})}var De=".paradigm/decisions";function Wt(e,t){let n=b.join(e,De);if(!p.existsSync(n))return [];let o=[],r=p.readdirSync(n).filter(s=>s.endsWith(".yaml"));for(let s of r)try{let a=p.readFileSync(b.join(n,s),"utf8"),c=T.load(a);c&&c.id&&o.push(c);}catch{}let i=o;return (i=i.filter(s=>s.status===t.status)),t?.participant&&(i=i.filter(s=>s.participants.some(a=>a.id===t.participant))),t?.symbol&&(i=i.filter(s=>s.symbols_affected?.includes(t.symbol))),t?.tag&&(i=i.filter(s=>s.tags?.some(a=>a.startsWith(t.tag)))),t?.dateFrom&&(i=i.filter(s=>s.timestamp>=t.dateFrom)),t?.dateTo&&(i=i.filter(s=>s.timestamp<=t.dateTo)),i.sort((s,a)=>a.timestamp.localeCompare(s.timestamp)),t?.limit&&(i=i.slice(0,t.limit)),i}K();function Ye(){return [{name:"paradigm_ambient_nominations",description:"Get pending agent nominations \u2014 agents that self-nominated contributions based on recent events. Filters by urgency, agent, pending status. Marks returned nominations as surfaced. ~200 tokens.",inputSchema:{type:"object",properties:{urgency:{type:"string",enum:["critical","high","medium","low"],description:"Filter by urgency level"},agent:{type:"string",description:"Filter by agent ID"},pending_only:{type:"boolean",description:"Only show un-engaged nominations (default: true)"},include_debates:{type:"boolean",description:"Include debate groupings (default: false)"},limit:{type:"number",description:"Max nominations to return (default: 20)"}}},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_ambient_events",description:"Query the ambient event stream \u2014 recent tool calls, file edits, gate checks, and other project activity. Filters by type, source, symbol, agent, time window. ~200 tokens.",inputSchema:{type:"object",properties:{type:{type:"string",description:'Event type filter (e.g., "file-modified", "gate-checked", "decision-made")'},source:{type:"string",description:'Event source filter (e.g., "mcp-tool-call", "post-write-hook")'},symbol:{type:"string",description:"Filter events referencing this symbol"},agent:{type:"string",description:"Filter events from this agent"},since:{type:"string",description:'Relative time filter (e.g., "1h", "30m", "2d") or ISO timestamp'},limit:{type:"number",description:"Max events to return (default: 50)"}}},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_ambient_engage",description:"Accept, dismiss, or defer a nomination. Optionally resolves a debate by choosing this nomination over others. ~50 tokens.",inputSchema:{type:"object",properties:{nomination_id:{type:"string",description:"Nomination ID to engage with"},response:{type:"string",enum:["accepted","dismissed","deferred"],description:"How to respond"},resolve_debate:{type:"string",description:"Optional debate ID to resolve by choosing this nomination"},reason:{type:"string",description:"Reason for response \u2014 stored on nomination for learning feedback. Especially valuable for dismissals."}},required:["nomination_id","response"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_context_compose",description:"Compose full agent session context: profile enrichment + recent decisions + transferable journal entries + pending nominations. Returns a markdown context block for prompt injection. ~300 tokens.",inputSchema:{type:"object",properties:{agent:{type:"string",description:"Agent ID to compose context for"},symbols:{type:"array",items:{type:"string"},description:"Relevant symbols for expertise filtering"},include_nominations:{type:"boolean",description:"Include pending nominations (default: true)"},include_decisions:{type:"boolean",description:"Include recent team decisions (default: true)"},include_journal:{type:"boolean",description:"Include transferable journal entries (default: true)"},max_decisions:{type:"number",description:"Max decisions to include (default: 5)"},max_journal:{type:"number",description:"Max journal entries to include (default: 5)"}},required:["agent"]},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_ambient_promote",description:"Auto-promote high-confidence pattern discoveries from an agent's learning journal to its notebook. Promotes entries with trigger=pattern_discovered and confidence_after >= 0.8. ~100 tokens.",inputSchema:{type:"object",properties:{agent:{type:"string",description:"Agent ID whose journal to scan"}},required:["agent"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_ambient_learn",description:"Analyze an agent's nomination acceptance/dismissal history and adjust its attention threshold. If >60% dismissed \u2192 raise threshold (less noise). If >80% accepted \u2192 lower threshold (contribute more). Also returns engagement stats. ~100 tokens.",inputSchema:{type:"object",properties:{agent:{type:"string",description:"Agent ID to analyze and adjust"},dry_run:{type:"boolean",description:"If true, return stats without adjusting (default: false)"}},required:["agent"]},annotations:{readOnlyHint:false,destructiveHint:false}},{name:"paradigm_ambient_health",description:"Agent learning health metrics \u2014 aggregate learning quality across all agents: nomination acceptance rates, threshold drift, notebook counts, expertise growth, and overall health status (cold-start \u2192 accumulating \u2192 calibrating \u2192 mature).",inputSchema:{type:"object",properties:{}},annotations:{readOnlyHint:true,destructiveHint:false}},{name:"paradigm_ambient_learn_postflight",description:"Postflight learning pass \u2014 converts session work log verdicts into agent journal entries. Reads accepted/dismissed/revised verdicts from the session log, creates journal entries for each agent, then auto-promotes high-confidence entries to notebooks. Typically called at session end by the stop hook. ~200 tokens.",inputSchema:{type:"object",properties:{session_id:{type:"string",description:"Session ID (default: current session)"},dry_run:{type:"boolean",description:"If true, show what would be written without writing (default: false)"}}},annotations:{readOnlyHint:false,destructiveHint:false}}]}function Ne(e){let t=Date.now(),n=e.match(/^(\d+)(m|h|d)$/);if(n){let o=parseInt(n[1],10),r=n[2],i=r==="m"?o*6e4:r==="h"?o*36e5:o*864e5;return new Date(t-i).toISOString()}return e}async function Qe(e,t,n){let o=r=>JSON.stringify(r,null,2);switch(e){case "paradigm_ambient_nominations":{Mt(n.rootDir);let i=t.pending_only!==false,s=t.limit||20,a=E(n.rootDir,{agent:t.agent,urgency:t.urgency,pending_only:i,limit:s+20}),c=Ht(n.rootDir);a=Bt(a,c).slice(0,s);let u=b.join(n.rootDir,".paradigm/events/nominations.jsonl");if(p.existsSync(u))try{let l=p.readFileSync(u,"utf8"),m=new Set(a.map(f=>f.id)),g=l.trim().split(`
|
|
32
32
|
`).map(f=>{try{let y=JSON.parse(f);return m.has(y.id)?(y.surfaced=!0,JSON.stringify(y)):f}catch{return f}});p.writeFileSync(u,g.join(`
|
|
33
33
|
`)+`
|
|
34
|
-
`,"utf8");}catch{}let d={count:a.length,nominations:a.map(l=>({id:l.id,agent:l.agent,urgency:l.urgency,type:l.type,brief:l.brief,relevance:l.relevance,timestamp:l.timestamp,engaged:l.engaged,response:l.response}))};if(t.include_debates){let m=
|
|
35
|
-
`),sections_included:{profile:true,decisions:a,journal:c,nominations:s}}),handled:true}}case "paradigm_ambient_promote":{let r=t.agent,i=ot(n.rootDir,r);return {text:o({agent:r,promoted:i.promoted,entries:i.entries}),handled:true}}case "paradigm_ambient_learn":{let r=t.agent,i=t.dry_run===true,s=nt(n.rootDir,r);if(i)return {text:o({agent:r,dry_run:true,stats:s,note:s.total<5?"Insufficient data for threshold adjustment (need 5+ engaged nominations)":`Accept rate: ${(s.acceptRate*100).toFixed(0)}% \u2014 ${s.acceptRate>.8?"would lower threshold":s.acceptRate<.4?"would raise threshold":"no adjustment needed"}`}),handled:true};let a=Lt(n.rootDir,r);return {text:o({agent:r,...a,stats:s}),handled:true}}case "paradigm_ambient_health":case "paradigm_ambient_neverland":{let r=
|
|
34
|
+
`,"utf8");}catch{}let d={count:a.length,nominations:a.map(l=>({id:l.id,agent:l.agent,urgency:l.urgency,type:l.type,brief:l.brief,relevance:l.relevance,timestamp:l.timestamp,engaged:l.engaged,response:l.response}))};if(t.include_debates){let m=It(n.rootDir).filter(g=>!g.resolution);d.debates=m.map(g=>({id:g.id,topic:g.topic,type:g.type,nominations:g.nominations})),d.debate_count=m.length;}return {text:o(d),handled:true}}case "paradigm_ambient_events":{let r=t.since?Ne(t.since):void 0,i=t.limit||50,s=St(n.rootDir,{type:t.type,source:t.source,symbol:t.symbol,agent:t.agent,since:r,limit:i});return {text:o({count:s.length,events:s.map(a=>({id:a.id,type:a.type,source:a.source,timestamp:a.timestamp,path:a.path,symbols:a.symbols,context:a.context,agent:a.agent,tool:a.tool,severity:a.severity}))}),handled:true}}case "paradigm_ambient_engage":{let r=t.nomination_id,i=t.response,s=t.reason,a=Ct(n.rootDir,r,i,s);if(a)try{let{appendSessionWorkEntry:u,appendVerdictEntry:d}=await import('./session-work-log-ZVVJGO7X.js'),m=E(n.rootDir,{limit:500}).find(f=>f.id===r),g={timestamp:new Date().toISOString(),type:"user-verdict",agent:m?.agent,nominationId:r,verdict:i,reason:s};u(n.rootDir,g),d(n.rootDir,g);}catch{}let c=false;return t.resolve_debate&&a&&(c=Jt(n.rootDir,t.resolve_debate,r,t.reason)),{text:o({engaged:a,nomination_id:r,response:i,debate_resolved:c||void 0}),handled:true}}case "paradigm_context_compose":{let r=t.agent,i=t.symbols||[],s=t.include_nominations!==false,a=t.include_decisions!==false,c=t.include_journal!==false,u=t.max_decisions||5,d=t.max_journal||5,l=f(n.rootDir,r);if(!l)return {text:o({error:`Agent profile not found: ${r}`}),handled:true};let m=[],g=p$1(l,i);if(g.trim()&&m.push(g),a){let f=Wt(n.rootDir,{status:"active",limit:u});if(f.length>0){m.push("## Recent Team Decisions");for(let y of f)m.push(`- **${y.title}**: ${y.decision.slice(0,150)}${y.decision.length>150?"...":""}`);m.push("");}}if(c){let f=O(r,{transferable:true,limit:d});if(f.length>0){m.push("## Transferable Insights");for(let y of f)m.push(`- [${y.trigger}] ${y.insight.slice(0,150)}${y.insight.length>150?"...":""}`);m.push("");}}if(s){let f=E(n.rootDir,{pending_only:true,limit:10});if(f.length>0){m.push("## Pending Nominations");for(let y of f)m.push(`- [${y.urgency}] ${y.brief}`);m.push("");}}return {text:o({agent:r,context:m.join(`
|
|
35
|
+
`),sections_included:{profile:true,decisions:a,journal:c,nominations:s}}),handled:true}}case "paradigm_ambient_promote":{let r=t.agent,i=ot(n.rootDir,r);return {text:o({agent:r,promoted:i.promoted,entries:i.entries}),handled:true}}case "paradigm_ambient_learn":{let r=t.agent,i=t.dry_run===true,s=nt(n.rootDir,r);if(i)return {text:o({agent:r,dry_run:true,stats:s,note:s.total<5?"Insufficient data for threshold adjustment (need 5+ engaged nominations)":`Accept rate: ${(s.acceptRate*100).toFixed(0)}% \u2014 ${s.acceptRate>.8?"would lower threshold":s.acceptRate<.4?"would raise threshold":"no adjustment needed"}`}),handled:true};let a=Lt(n.rootDir,r);return {text:o({agent:r,...a,stats:s}),handled:true}}case "paradigm_ambient_health":case "paradigm_ambient_neverland":{let r=Ut(n.rootDir);return {text:o(r),handled:true}}case "paradigm_ambient_learn_postflight":return {text:o(await Te(n.rootDir,t)),handled:true};default:return {text:`Unknown ambient tool: ${e}`,handled:false}}}var $e={accepted:"human_feedback",dismissed:"confidence_miss",revised:"correction_received"};function Re(e){try{let t=b.join(e,".paradigm","config.yaml");if(p.existsSync(t)){let o=p.readFileSync(t,"utf8").match(/project:\s*["']?([^"'\n]+)["']?/);if(o)return o[1].trim()}}catch{}return b.basename(e)}async function Te(e$1,t={}){let n=t.dry_run===true,o=Re(e$1),r=e(e$1).filter(f=>f.verdict&&f.agent),i=b$2(e$1);if(r.length===0)return {sessionEntries:i.length,agentsProcessed:[],journalsWritten:0,journalsByAgent:{},promoted:0,promotedByAgent:{},dryRun:n,details:[]};let s=new Map;for(let f of r){let y=f.agent;s.has(y)||s.set(y,[]),s.get(y).push(f);}let a=i.filter(f=>f.type==="agent-contribution"),c=new Map;for(let f of a)f.agent&&(c.has(f.agent)||c.set(f.agent,[]),c.get(f.agent).push(f));let u=[],d={},l=0;for(let[f,y]of s){d[f]=0;let D=y.filter(h=>h.verdict==="accepted").length;y.filter(h=>h.verdict==="dismissed").length;y.filter(h=>h.verdict==="revised").length;let H=y.length,zt=H>0?D/H:0;for(let h of y){let B=$e[h.verdict];if(!B)continue;let Gt=c.get(f)?.shift(),st=Pe(h,Gt,{acceptRate:zt,total:H,accepted:D}),Vt=h.verdict==="accepted"?.85:h.verdict==="revised"?.6:.4,Kt={agent:f,verdict:h.verdict,trigger:B,insight:st,symbols:h.symbols};if(u.push(Kt),n)d[f]++,l++;else try{V(f,{trigger:B,insight:st,confidence_before:h.verdict==="accepted"?.7:.8,confidence_after:Vt,project:o,transferable:h.verdict==="dismissed",tags:["postflight",`verdict:${h.verdict}`,...(h.symbols||[]).map(Xt=>`symbol:${Xt}`)]}),d[f]++,l++;}catch{}}}let m={},g=0;if(!n)for(let f of s.keys())try{let y=ot(e$1,f);y.promoted>0&&(m[f]=y.promoted,g+=y.promoted);}catch{}return !n&&r.length>0&&f$1(e$1,r.map(f=>f.nominationId).filter(Boolean)),{sessionEntries:i.length,agentsProcessed:Array.from(s.keys()),journalsWritten:l,journalsByAgent:d,promoted:g,promotedByAgent:m,dryRun:n,details:u}}function Pe(e,t,n){let o=e.symbols?.length?` (symbols: ${e.symbols.join(", ")})`:"",r=e.reason?` Reason: ${e.reason}.`:"";switch(e.verdict){case "accepted":return `Contribution accepted by user${o}.${r}`+(t?.contribution?` Original: "${t.contribution.slice(0,120)}".`:"")+` Session accept rate: ${(n.acceptRate*100).toFixed(0)}% (${n.accepted}/${n.total}).`;case "dismissed":return `Contribution dismissed by user${o}.${r}`+(t?.contribution?` Rejected contribution: "${t.contribution.slice(0,120)}".`:"")+` Learn from this dismissal to improve future nominations. Session accept rate: ${(n.acceptRate*100).toFixed(0)}% (${n.accepted}/${n.total}).`;case "revised":return `Contribution revised by user${o}.${r}`+(e.revisionDelta?` Delta: "${e.revisionDelta.slice(0,120)}".`:"")+(t?.contribution?` Original: "${t.contribution.slice(0,120)}".`:"")+` Partial credit \u2014 close but not accurate enough. Session accept rate: ${(n.acceptRate*100).toFixed(0)}% (${n.accepted}/${n.total}).`;default:return `Unknown verdict "${e.verdict}"${o}.${r}`}}export{Ye as getAmbientToolsList,Qe as handleAmbientTool,Te as runPostflightLearning};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import'./chunk-5TAVYPOV.js';import*as s from'path';import t from'chalk';async function g(n){let e=n.project?s.resolve(n.project):process.cwd(),r=n.dryRun===true,{readPendingVerdicts:a}=await import('./session-work-log-
|
|
2
|
+
import'./chunk-5TAVYPOV.js';import*as s from'path';import t from'chalk';async function g(n){let e=n.project?s.resolve(n.project):process.cwd(),r=n.dryRun===true,{readPendingVerdicts:a}=await import('./session-work-log-ZVVJGO7X.js'),i=a(e);if(i.length===0){console.log(t.dim("[paradigm] No pending verdicts \u2014 postflight skipped."));return}console.log(t.cyan(`[paradigm] Running postflight \u2014 ${i.length} pending verdict(s)${r?" (dry run)":""}...`));let{runPostflightLearning:l}=await import('./ambient-AI42BOM5.js'),o=await l(e,{dry_run:r});if(o.journalsWritten===0&&o.promoted===0){console.log(t.dim("[paradigm] Postflight complete \u2014 no new journals written."));return}console.log(t.green("[paradigm] Postflight complete:")),o.journalsWritten>0&&console.log(` ${t.bold(o.journalsWritten)} journal entries written across ${o.agentsProcessed.length} agent(s)`),o.promoted>0&&console.log(` ${t.bold(o.promoted)} entries auto-promoted to notebooks`);}export{g as ambientPostflightCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {g,f}from'./chunk-
|
|
2
|
+
import {g,f}from'./chunk-VNIX5KBT.js';import'./chunk-5TAVYPOV.js';import e from'chalk';async function $(r,o,t){let c=process.cwd();["correct","partial","incorrect"].includes(o)||(console.error(e.red(`
|
|
3
3
|
Invalid verdict: "${o}". Must be one of: correct, partial, incorrect
|
|
4
4
|
`)),process.exit(1));let n=await g(c,r);if(n||(console.error(e.red(`
|
|
5
5
|
Entry not found: ${r}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import'./chunk-5TAVYPOV.js';import*as t from'fs/promises';import*as i from'path';import*as s from'js-yaml';var n=i.join(".paradigm","authority.yaml");async function l(c,e){let a=i.join(c,n);try{await t.access(a);return}catch{}await t.mkdir(i.dirname(a),{recursive:true});let r=new Date().toISOString(),o=s.dump({version:"1.0",schema:"v0-experimental",claims:{"aspect-coverage":{claimant:"compliance",severity:"advise",since:r,source:e},"aspect-drift":{claimant:"compliance",severity:"advise",since:r,source:e},"anchor-staleness":{claimant:"compliance",severity:"advise",since:r,source:e}}},{lineWidth:100,sortKeys:false});await t.writeFile(a,o,"utf8");}export{l as writeArchetypeDefaults};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {d}from'./chunk-
|
|
2
|
+
import {d}from'./chunk-VNIX5KBT.js';import'./chunk-5TAVYPOV.js';import o from'chalk';async function L(r){let A=process.cwd(),u=await d(A,{symbol:r.symbol,tag:r.tag,author:r.author,hasAssessment:true});if(u.length===0){r.json?console.log(JSON.stringify({totalAssessed:0,message:"No assessed entries found"},null,2)):(console.log(o.gray(`
|
|
3
3
|
No assessed lore entries found.
|
|
4
4
|
`)),console.log(o.gray(" Use `paradigm lore assess <id> <correct|partial|incorrect>` to assess entries.\n")));return}let F=u.filter(e=>e.confidence!=null),c=u.length,f=F.length,l={correct:0,partial:0,incorrect:0},h=0,$=0,b=0;for(let e of u){let n=e.assessment.verdict;l[n]++;let t=n==="correct"?1:n==="partial"?.5:0;h+=t,e.confidence!=null&&($+=e.confidence,b+=Math.abs(t-e.confidence));}let y=h/c,m=f>0?$/f:null,s=f>0?1-b/f:null,i;if(r.groupBy&&c>0){let e=new Map;for(let n of u){let t=[];r.groupBy==="symbol"?t=n.symbols_touched||[]:r.groupBy==="tag"?t=n.tags||[]:r.groupBy==="type"&&(t=[n.type||"agent-session"]);for(let a of t)e.has(a)||e.set(a,[]),e.get(a).push(n);}i=Array.from(e.entries()).map(([n,t])=>{let a=t.filter(d=>d.confidence!=null),v={correct:0,partial:0,incorrect:0},C=0,B=0,S=0;for(let d of t){let p=d.assessment.verdict;v[p]++;let k=p==="correct"?1:p==="partial"?.5:0;C+=k,d.confidence!=null&&(B+=d.confidence,S+=Math.abs(k-d.confidence));}return {key:n,total:t.length,accuracyRate:C/t.length,avgConfidence:a.length>0?B/a.length:null,calibrationScore:a.length>0?1-S/a.length:null,verdictBreakdown:v}}).sort((n,t)=>t.total-n.total);}if(r.json){console.log(JSON.stringify({totalAssessed:c,totalWithConfidence:f,accuracyRate:Math.round(y*1e3)/1e3,avgConfidence:m!=null?Math.round(m*1e3)/1e3:null,calibrationScore:s!=null?Math.round(s*1e3)/1e3:null,verdictBreakdown:l,...i?{groups:i}:{}},null,2));return}let w=c<5?o.gray(` (Low sample: N=${c}. Stats may not be representative.)`):c<15?o.gray(` (Moderate sample: N=${c}. Trends are directional.)`):"";console.log(o.magenta(`
|
|
5
5
|
Calibration Report (${c} assessed entries)
|