@runfusion/fusion 0.73.0-beta.2 → 0.73.0-beta.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/agent-browser.mjs +8 -0
- package/dist/bin.js +7664 -11386
- package/dist/child-process-worker.js +4292 -8374
- package/dist/client/.vite/manifest.json +266 -256
- package/dist/client/assets/{AgentDetailView-CUoHZPZr.js → AgentDetailView-BBOL6AgZ.js} +3 -3
- package/dist/client/assets/{AgentPermissionPolicyEditor-DKoHJIlF.js → AgentPermissionPolicyEditor-DV7OPUhR.js} +1 -1
- package/dist/client/assets/{AgentsView-CaBo-FHV.js → AgentsView-B6xoAHyV.js} +4 -4
- package/dist/client/assets/ChatView-DwVjnxM8.js +8 -0
- package/dist/client/assets/{CommandCenter-wgiEIVuC.js → CommandCenter-DYWaoYFD.js} +9 -9
- package/dist/client/assets/DevServerView-BY5up-NA.js +1 -0
- package/dist/client/assets/{DirectoryPicker-B7YwgF53.js → DirectoryPicker-fM8MJa2r.js} +1 -1
- package/dist/client/assets/DocumentsView-D2KxsPG_.js +1 -0
- package/dist/client/assets/{EvalsView-BjyqxMS_.js → EvalsView-U8dOvTRM.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-_PMSa_gN.js → ExperimentalAgentOnboardingModal-C27y8Y-1.js} +1 -1
- package/dist/client/assets/{GoalsView-BzLA8GX9.js → GoalsView-D-2wmy-O.js} +1 -1
- package/dist/client/assets/{InsightsView-Cb_tUr1V.js → InsightsView-zLyuQL_l.js} +2 -2
- package/dist/client/assets/{MemoryView-CRxOPCQq.js → MemoryView-D-tSn48u.js} +2 -2
- package/dist/client/assets/{PiExtensionsManager-XQ5rWJT3.js → PiExtensionsManager-DvwmvGEY.js} +2 -2
- package/dist/client/assets/PluginManager-BACOwQAN.js +1 -0
- package/dist/client/assets/{PullRequestView-CX6fScVe.js → PullRequestView-DULyv21u.js} +2 -2
- package/dist/client/assets/{ReportModal-BSCk5ER1.css → ReportModal-BuhhqtXJ.css} +1 -1
- package/dist/client/assets/ReportModal-CUlKMFWa.js +21 -0
- package/dist/client/assets/{ResearchView-DgKzxRUL.js → ResearchView-DM_O3IFc.js} +2 -2
- package/dist/client/assets/{SecretsView-C83SIrjR.js → SecretsView-Bq3u_nAf.js} +1 -1
- package/dist/client/assets/SessionTerminal-D00ByR6U.js +2 -0
- package/dist/client/assets/SettingsModal-Bb3pIxiX.js +21 -0
- package/dist/client/assets/SettingsModal-CMLHZBhX.css +1 -0
- package/dist/client/assets/SettingsModal-QRaBE1ds.js +1 -0
- package/dist/client/assets/{SettingsTextareaRow-BKGsmZ7C.js → SettingsTextareaRow-CHOJ-qHz.js} +1 -1
- package/dist/client/assets/{SetupWizardModal-DIb4q-VT.js → SetupWizardModal-DriQyd81.js} +2 -2
- package/dist/client/assets/{SkillsView-D1Zxh1iX.js → SkillsView-BtDyujiZ.js} +1 -1
- package/dist/client/assets/{TodoView-CGIcE6Yr.js → TodoView-BNHUnz50.js} +2 -2
- package/dist/client/assets/{WorkflowNodeEditor-BtWrziOX.css → WorkflowNodeEditor-BNgkFJ_P.css} +1 -1
- package/dist/client/assets/WorkflowNodeEditor-BXikFpra.js +8 -0
- package/dist/client/assets/agent-import-generation-B2kYEm1O.js +1 -0
- package/dist/client/assets/app-B_HrdDXZ.js +13 -0
- package/dist/client/assets/{app-BsIXfnu-.js → app-C6yo-M_n.js} +1 -1
- package/dist/client/assets/{app-B-IdUeIu.js → app-CH8ZgPm4.js} +1 -1
- package/dist/client/assets/{app-D9ktpVhR.js → app-D4DpgDss.js} +1 -1
- package/dist/client/assets/{app-nBTNvNKK.js → app-Qv0blCyY.js} +1 -1
- package/dist/client/assets/{app-C8muVNUU.js → app-kFdtajPy.js} +1 -1
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-Dv83GkUE.js → architectureDiagram-3BPJPVTR-B-Efjj4Z.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-B_j-RJOz.js → blockDiagram-GPEHLZMM-CaOVxrlM.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-Cy3f-SD1.js → c4Diagram-AAUBKEIU-D8aYt5F1.js} +1 -1
- package/dist/client/assets/channel-5bPK6pTS.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-CPolddUJ.js → chunk-2J33WTMH-VSDT0J0r.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-BAGPgwkc.js → chunk-4BX2VUAB-Chx1wQgD.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-dzYFOH0q.js → chunk-55IACEB6-MlqjhIJg.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-ul9hGhiR.js → chunk-727SXJPM-BheQNUi8.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-C75yqe4-.js → chunk-AQP2D5EJ-C5EoJhfJ.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-BwiLAyup.js → chunk-FMBD7UC4-B8_8qP3j.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-CVv1sLhy.js → chunk-ND2GUHAM-BuglCGRx.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-D1c-k3xL.js → chunk-QZHKN3VN-B7_06dxp.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-Dv9RQDqG.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-Dv9RQDqG.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-DosMsFd6.js → cose-bilkent-S5V4N54A-Cm-ZOycx.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-9os-QBXe.js → dagre-BM42HDAG-Dj_Gwjpv.js} +1 -1
- package/dist/client/assets/{dashboard-view-CNVTxyWE.js → dashboard-view-B4CRL5Fy.js} +1 -1
- package/dist/client/assets/{dashboard-view-Bn7iL770.js → dashboard-view-noD9p0Zs.js} +1 -1
- package/dist/client/assets/{dashboard-view-iwAS1HTp.js → dashboard-view-pXXSUxG9.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-ChjuJgA6.js → diagram-2AECGRRQ-C_9BfShy.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-Cq10aB4z.js → diagram-5GNKFQAL-Cmg2qpCj.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-CKjyrzjg.js → diagram-KO2AKTUF-2FNo2HXb.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-DxCc1BsH.js → diagram-LMA3HP47-DgnVeCp-.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-DJWEkDsR.js → diagram-OG6HWLK6-iAIR50HH.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-gVkDYC92.js → erDiagram-TEJ5UH35-Da4I04eN.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-1lw1mQRQ.js → flowDiagram-I6XJVG4X-Bv9r2T0m.js} +1 -1
- package/dist/client/assets/{folder-open-Nmr7nRmN.js → folder-open-CwWtrDh6.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-Yzq4WZRo.js → ganttDiagram-6RSMTGT7-BMeO84U_.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-cFR9Gv8n.js → gitGraphDiagram-PVQCEYII-CWDh_RIb.js} +1 -1
- package/dist/client/assets/index-CB3mYxAB.css +1 -0
- package/dist/client/assets/index-CE7C_XsS.js +2661 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-BbRiTnD3.js → infoDiagram-5YYISTIA-BAE4KtCL.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-DD4i2Znk.js → ishikawaDiagram-YF4QCWOH-C_iXAuOy.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-qHPO2M-C.js → journeyDiagram-JHISSGLW-BnxSHwDo.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-EuFfgxUv.js → kanban-definition-UN3LZRKU-DYNRm3Nu.js} +1 -1
- package/dist/client/assets/{mermaid.core-Cru9Vzsy.js → mermaid.core-B3hvDDep.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-mCvtfapj.js → mindmap-definition-RKZ34NQL-s7KBEuPD.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-BSc_a5Dz.js → pieDiagram-4H26LBE5-Cy1_IPUD.js} +1 -1
- package/dist/client/assets/{puzzle-Cz66CEWW.js → puzzle-DWc6gFQ7.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-Um2SLb_d.js → quadrantDiagram-W4KKPZXB-DqgVGp41.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-B94evN7g.js → requirementDiagram-4Y6WPE33-CA5-TDeF.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-BH7NLX-K.js → sankeyDiagram-5OEKKPKP-Cuvi3RgE.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DusrBGQp.js → sequenceDiagram-3UESZ5HK-Da3GfmGP.js} +1 -1
- package/dist/client/assets/{shield-alert-CcQuaRHN.js → shield-alert-_iY63ED4.js} +1 -1
- package/dist/client/assets/{standing-instructions-template-CVnY93Xy.js → standing-instructions-template-CCd2YY9c.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-GRjL9YlX.js → stateDiagram-AJRCARHV-CZ_I9ENR.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-BBsv6ppQ.js → stateDiagram-v2-BHNVJYJU-BomoRVhY.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-DC6UeqjY.js → timeline-definition-PNZ67QCA-C3CYvIuR.js} +1 -1
- package/dist/client/assets/{upload-CjJp7lEX.js → upload-D0RrO65v.js} +1 -1
- package/dist/client/assets/{users-DgimRYHz.js → users-CGszBY2v.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-C272zK9h.js → vennDiagram-CIIHVFJN-By9fi8NW.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-KkRF-2j9.js → wardley-L42UT6IY-DErnXPkI.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-B4brtKRt.js → wardleyDiagram-YWT4CUSO-DFfXZVPk.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6--PFSKt1s.js → xychartDiagram-2RQKCTM6-9Y5oZ5mi.js} +1 -1
- package/dist/client/index.html +4 -2
- package/dist/client/version.json +1 -1
- package/dist/extension.js +4516 -8539
- package/dist/migrations/0000_initial.sql +2 -0
- package/dist/migrations/0026_bigint_counters.sql +85 -14
- package/dist/migrations/0033_fn-8505_wedge_notification.sql +5 -0
- package/dist/plugin-sdk/index.js +1 -0
- package/dist/plugins/.fusion-ce-agents/.fusion-ce-upstream-provenance.json +7 -0
- package/dist/plugins/.fusion-ce-agents/ce-adversarial-document-reviewer.md +115 -0
- package/dist/plugins/.fusion-ce-agents/ce-adversarial-reviewer.md +111 -0
- package/dist/plugins/.fusion-ce-agents/ce-agent-native-planning-strategist.md +71 -0
- package/dist/plugins/.fusion-ce-agents/ce-agent-native-reviewer.md +181 -0
- package/dist/plugins/.fusion-ce-agents/ce-ankane-readme-writer.md +50 -0
- package/dist/plugins/.fusion-ce-agents/ce-api-contract-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-architecture-strategist.md +53 -0
- package/dist/plugins/.fusion-ce-agents/ce-best-practices-researcher.md +122 -0
- package/dist/plugins/.fusion-ce-agents/ce-code-simplicity-reviewer.md +87 -0
- package/dist/plugins/.fusion-ce-agents/ce-coherence-reviewer.md +73 -0
- package/dist/plugins/.fusion-ce-agents/ce-correctness-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-data-integrity-guardian.md +75 -0
- package/dist/plugins/.fusion-ce-agents/ce-data-migration-reviewer.md +119 -0
- package/dist/plugins/.fusion-ce-agents/ce-deployment-verification-agent.md +164 -0
- package/dist/plugins/.fusion-ce-agents/ce-design-implementation-reviewer.md +94 -0
- package/dist/plugins/.fusion-ce-agents/ce-design-iterator.md +197 -0
- package/dist/plugins/.fusion-ce-agents/ce-design-lens-reviewer.md +56 -0
- package/dist/plugins/.fusion-ce-agents/ce-feasibility-reviewer.md +65 -0
- package/dist/plugins/.fusion-ce-agents/ce-figma-design-sync.md +172 -0
- package/dist/plugins/.fusion-ce-agents/ce-framework-docs-researcher.md +100 -0
- package/dist/plugins/.fusion-ce-agents/ce-git-history-analyzer.md +47 -0
- package/dist/plugins/.fusion-ce-agents/ce-issue-intelligence-analyst.md +207 -0
- package/dist/plugins/.fusion-ce-agents/ce-julik-frontend-races-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-learnings-researcher.md +254 -0
- package/dist/plugins/.fusion-ce-agents/ce-maintainability-reviewer.md +77 -0
- package/dist/plugins/.fusion-ce-agents/ce-pattern-recognition-specialist.md +62 -0
- package/dist/plugins/.fusion-ce-agents/ce-performance-oracle.md +115 -0
- package/dist/plugins/.fusion-ce-agents/ce-performance-reviewer.md +54 -0
- package/dist/plugins/.fusion-ce-agents/ce-pr-comment-resolver.md +63 -0
- package/dist/plugins/.fusion-ce-agents/ce-previous-comments-reviewer.md +68 -0
- package/dist/plugins/.fusion-ce-agents/ce-product-lens-reviewer.md +92 -0
- package/dist/plugins/.fusion-ce-agents/ce-project-standards-reviewer.md +84 -0
- package/dist/plugins/.fusion-ce-agents/ce-reliability-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-repo-research-analyst.md +263 -0
- package/dist/plugins/.fusion-ce-agents/ce-scope-guardian-reviewer.md +79 -0
- package/dist/plugins/.fusion-ce-agents/ce-security-lens-reviewer.md +48 -0
- package/dist/plugins/.fusion-ce-agents/ce-security-reviewer.md +54 -0
- package/dist/plugins/.fusion-ce-agents/ce-security-sentinel.md +98 -0
- package/dist/plugins/.fusion-ce-agents/ce-session-historian.md +89 -0
- package/dist/plugins/.fusion-ce-agents/ce-slack-researcher.md +133 -0
- package/dist/plugins/.fusion-ce-agents/ce-spec-flow-analyzer.md +87 -0
- package/dist/plugins/.fusion-ce-agents/ce-swift-ios-reviewer.md +107 -0
- package/dist/plugins/.fusion-ce-agents/ce-testing-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-web-researcher.md +127 -0
- package/dist/plugins/.fusion-ce-skills/.fusion-ce-upstream-provenance.json +7 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/SKILL.md +318 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/agents/slack-researcher.md +127 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/brainstorm-sections.md +354 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/handoff.md +172 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/html-rendering.md +662 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/markdown-rendering.md +236 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/synthesis-summary.md +271 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/universal-brainstorming.md +71 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/visual-probes.md +128 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/scripts/visual-probe-server.js +419 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/SKILL.md +821 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/action-class-rubric.md +26 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/bulk-preview.md +112 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/cross-model-review.md +63 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/diff-scope.md +41 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/findings-schema.json +137 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/persona-catalog.md +63 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/adversarial-reviewer.md +102 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/agent-native-reviewer.md +173 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/api-contract-reviewer.md +43 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/correctness-reviewer.md +43 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/data-migration-reviewer.md +111 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/deployment-verification-agent.md +157 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/julik-frontend-races-reviewer.md +44 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/learnings-researcher.md +247 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/maintainability-reviewer.md +68 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/performance-reviewer.md +45 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/previous-comments-reviewer.md +59 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/project-standards-reviewer.md +75 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/reliability-reviewer.md +43 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/security-reviewer.md +45 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/swift-ios-reviewer.md +99 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/testing-reviewer.md +43 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/review-output-template.md +170 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/subagent-template.md +199 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/tracker-defer.md +149 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/validator-template.md +89 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/walkthrough.md +249 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/scripts/cross-model-adversarial-review.sh +218 -0
- package/dist/plugins/.fusion-ce-skills/ce-commit/SKILL.md +105 -0
- package/dist/plugins/.fusion-ce-skills/ce-commit-push-pr/SKILL.md +134 -0
- package/dist/plugins/.fusion-ce-skills/ce-commit-push-pr/references/branch-creation.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-commit-push-pr/references/pr-description-writing.md +115 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/SKILL.md +712 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/assets/resolution-template.md +94 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/best-practices-researcher.md +115 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/data-integrity-guardian.md +68 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/framework-docs-researcher.md +93 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/pattern-recognition-specialist.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/performance-oracle.md +108 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/security-sentinel.md +91 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/session-historian.md +83 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/concepts-vocabulary.md +78 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/schema.yaml +231 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/yaml-schema.md +118 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/session-history/discover-sessions.sh +130 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/session-history/extract-errors.py +254 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/session-history/extract-metadata.py +456 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/session-history/extract-skeleton.py +570 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/validate-frontmatter.py +137 -0
- package/dist/plugins/.fusion-ce-skills/ce-debug/SKILL.md +257 -0
- package/dist/plugins/.fusion-ce-skills/ce-debug/references/anti-patterns.md +91 -0
- package/dist/plugins/.fusion-ce-skills/ce-debug/references/defense-in-depth.md +35 -0
- package/dist/plugins/.fusion-ce-skills/ce-debug/references/investigation-techniques.md +374 -0
- package/dist/plugins/.fusion-ce-skills/ce-doc-review/SKILL.md +70 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/SKILL.md +401 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/agents/issue-intelligence-analyst.md +200 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/agents/learnings-researcher.md +247 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/agents/slack-researcher.md +127 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/agents/web-researcher.md +121 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/divergent-ideation.md +89 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/html-rendering.md +662 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/ideation-sections.md +191 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/markdown-rendering.md +236 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/post-ideation-workflow.md +166 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/universal-ideation.md +107 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/web-research-cache.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/SKILL.md +858 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/agent-native-planning-strategist.md +62 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/architecture-strategist.md +46 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/best-practices-researcher.md +114 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/data-integrity-guardian.md +68 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/data-migration-reviewer.md +103 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/deployment-verification-agent.md +157 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/framework-docs-researcher.md +93 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/git-history-analyzer.md +40 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/learnings-researcher.md +247 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/pattern-recognition-specialist.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/performance-oracle.md +108 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/repo-research-analyst.md +256 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/security-sentinel.md +91 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/slack-researcher.md +127 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/spec-flow-analyzer.md +80 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/web-researcher.md +121 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/approach-altitude.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/deepening-workflow.md +259 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/html-rendering.md +668 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/markdown-rendering.md +236 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/plan-handoff.md +126 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/plan-sections.md +405 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/synthesis-summary.md +396 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/universal-planning.md +168 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/SKILL.md +53 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/references/agents/pr-comment-resolver.md +56 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/references/evaluation-rubric.md +106 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/references/full-mode.md +283 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/references/targeted-mode.md +45 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/scripts/get-pr-comments +159 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/scripts/get-thread-for-comment +76 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/scripts/reply-to-pr-thread +33 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/scripts/resolve-pr-thread +23 -0
- package/dist/plugins/.fusion-ce-skills/ce-strategy/SKILL.md +97 -0
- package/dist/plugins/.fusion-ce-skills/ce-strategy/references/interview.md +143 -0
- package/dist/plugins/.fusion-ce-skills/ce-strategy/references/strategy-template.md +89 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/SKILL.md +429 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/agents/figma-design-sync.md +165 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/execution-engines.md +85 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/non-code-execution.md +23 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/review-findings-followup.md +104 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/shipping-workflow.md +133 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/tracker-defer.md +149 -0
- package/dist/plugins/fusion-plugin-compound-engineering/.bundled.reload-3.js +11266 -0
- package/dist/plugins/fusion-plugin-compound-engineering/.bundled.reload-4.js +11266 -0
- package/dist/plugins/fusion-plugin-dependency-graph/.bundled.reload-1.js +8206 -0
- package/dist/plugins/fusion-plugin-grok-runtime/.bundled.reload-2.js +26623 -0
- package/package.json +6 -3
- package/skill/fusion/references/engine-tools.md +6 -2
- package/dist/client/assets/ChatView-Bv0J5p5U.js +0 -8
- package/dist/client/assets/DevServerView-Ue9XG_4H.js +0 -1
- package/dist/client/assets/DocumentsView-C1Ptwcv5.js +0 -1
- package/dist/client/assets/PluginManager-CXPSlWxs.js +0 -1
- package/dist/client/assets/ReportModal-JhZZXZlj.js +0 -21
- package/dist/client/assets/SessionTerminal-BrK3psiC.js +0 -2
- package/dist/client/assets/SettingsModal-Bby9vLGx.js +0 -21
- package/dist/client/assets/SettingsModal-DVLqY1-7.js +0 -1
- package/dist/client/assets/SettingsModal-DXArgTTx.css +0 -1
- package/dist/client/assets/WorkflowNodeEditor-BXUC0lim.js +0 -8
- package/dist/client/assets/app-DUszvars.js +0 -13
- package/dist/client/assets/channel-BuhC8kaT.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-vpRR5WOg.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-vpRR5WOg.js +0 -1
- package/dist/client/assets/index-Cg9ahVtV.js +0 -2661
- package/dist/client/assets/index-uhXHk1ek.css +0 -1
package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/session-history/extract-skeleton.py
ADDED
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Extract the conversation skeleton from a Claude Code, Codex, Cursor, or Pi JSONL session file.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
cat <session.jsonl> | python3 extract-skeleton.py
|
|
6
|
+
cat <session.jsonl> | python3 extract-skeleton.py --output PATH
|
|
7
|
+
|
|
8
|
+
Auto-detects platform (Claude Code, Codex, Cursor, or Pi) from the JSONL structure.
|
|
9
|
+
Extracts:
|
|
10
|
+
- User messages (text only, no tool results)
|
|
11
|
+
- Assistant text (no thinking/reasoning blocks)
|
|
12
|
+
- Collapsed tool call summaries (consecutive same-tool calls grouped)
|
|
13
|
+
|
|
14
|
+
Consecutive tool calls of the same type are collapsed:
|
|
15
|
+
3+ Read calls -> "[tools] 3x Read (file1, file2, +1 more) -> all ok"
|
|
16
|
+
Codex call/result pairs are deduplicated (only the result with status is kept).
|
|
17
|
+
|
|
18
|
+
When --output PATH is given, the extracted skeleton is written to PATH and
|
|
19
|
+
stdout receives only a one-line JSON status (_meta with wrote/bytes/stats).
|
|
20
|
+
This lets callers route bulk content to a scratch file without round-tripping
|
|
21
|
+
extraction bytes through orchestrator tool results.
|
|
22
|
+
|
|
23
|
+
Without --output, extracted content goes to stdout and ends with a _meta line.
|
|
24
|
+
"""
|
|
25
|
+
import argparse
|
|
26
|
+
import io
|
|
27
|
+
import os
|
|
28
|
+
import sys
|
|
29
|
+
import json
|
|
30
|
+
import re
|
|
31
|
+
|
|
32
|
+
parser = argparse.ArgumentParser(add_help=True)
|
|
33
|
+
parser.add_argument(
|
|
34
|
+
"--output",
|
|
35
|
+
metavar="PATH",
|
|
36
|
+
help="Write extracted skeleton to PATH instead of stdout. Stdout receives a one-line _meta status.",
|
|
37
|
+
)
|
|
38
|
+
args = parser.parse_args()
|
|
39
|
+
|
|
40
|
+
# Capture-and-redirect when --output is set: prints in the rest of the script
|
|
41
|
+
# go to the buffer; at the end the buffer is written to PATH and a status
|
|
42
|
+
# line is emitted to the real stdout.
|
|
43
|
+
_original_stdout = sys.stdout
|
|
44
|
+
if args.output:
|
|
45
|
+
sys.stdout = io.StringIO()
|
|
46
|
+
|
|
47
|
+
stats = {"lines": 0, "parse_errors": 0, "user": 0, "assistant": 0, "tool": 0, "summary": 0}
|
|
48
|
+
|
|
49
|
+
# Claude Code wrapper tags to strip from user message content.
|
|
50
|
+
# Strip entirely (tag + content): framework noise and raw command output.
|
|
51
|
+
# Strip tags only (keep content): command-message, command-name, command-args, user_query.
|
|
52
|
+
_STRIP_BLOCK = re.compile(
|
|
53
|
+
r"<(?:task-notification|local-command-caveat|local-command-stdout|local-command-stderr|system-reminder)[^>]*>.*?</(?:task-notification|local-command-caveat|local-command-stdout|local-command-stderr|system-reminder)>",
|
|
54
|
+
re.DOTALL,
|
|
55
|
+
)
|
|
56
|
+
_STRIP_TAG = re.compile(
|
|
57
|
+
r"</?(?:command-message|command-name|command-args|user_query)[^>]*>"
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def clean_text(text):
|
|
62
|
+
"""Strip framework wrapper tags from message text (Claude and Cursor)."""
|
|
63
|
+
text = _STRIP_BLOCK.sub("", text)
|
|
64
|
+
text = _STRIP_TAG.sub("", text)
|
|
65
|
+
text = re.sub(r"\n{3,}", "\n\n", text).strip()
|
|
66
|
+
return text
|
|
67
|
+
|
|
68
|
+
# Buffer for pending tool entries: [{"ts", "name", "target", "status"}]
|
|
69
|
+
pending_tools = []
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def flush_tools():
|
|
73
|
+
"""Print buffered tool entries, collapsing consecutive same-name groups."""
|
|
74
|
+
if not pending_tools:
|
|
75
|
+
return
|
|
76
|
+
|
|
77
|
+
# Group consecutive entries by tool name
|
|
78
|
+
groups = []
|
|
79
|
+
for entry in pending_tools:
|
|
80
|
+
if groups and groups[-1][0]["name"] == entry["name"]:
|
|
81
|
+
groups[-1].append(entry)
|
|
82
|
+
else:
|
|
83
|
+
groups.append([entry])
|
|
84
|
+
|
|
85
|
+
for group in groups:
|
|
86
|
+
name = group[0]["name"]
|
|
87
|
+
if len(group) <= 2:
|
|
88
|
+
# Print individually
|
|
89
|
+
for e in group:
|
|
90
|
+
status = f" -> {e['status']}" if e.get("status") else ""
|
|
91
|
+
ts_prefix = f"[{e['ts']}] " if e.get("ts") else ""
|
|
92
|
+
print(f"{ts_prefix}[tool] {name} {e['target']}{status}")
|
|
93
|
+
stats["tool"] += 1
|
|
94
|
+
else:
|
|
95
|
+
# Collapse
|
|
96
|
+
ts = group[0].get("ts", "")
|
|
97
|
+
targets = [e["target"] for e in group if e.get("target")]
|
|
98
|
+
ok = sum(1 for e in group if e.get("status") == "ok")
|
|
99
|
+
err = sum(1 for e in group if e.get("status") and e["status"] != "ok")
|
|
100
|
+
no_status = len(group) - ok - err
|
|
101
|
+
|
|
102
|
+
# Show first 2 targets, then "+N more"
|
|
103
|
+
if len(targets) > 2:
|
|
104
|
+
target_str = ", ".join(targets[:2]) + f", +{len(targets) - 2} more"
|
|
105
|
+
elif targets:
|
|
106
|
+
target_str = ", ".join(targets)
|
|
107
|
+
else:
|
|
108
|
+
target_str = ""
|
|
109
|
+
|
|
110
|
+
if no_status == len(group):
|
|
111
|
+
status_str = ""
|
|
112
|
+
elif err == 0:
|
|
113
|
+
status_str = " -> all ok"
|
|
114
|
+
else:
|
|
115
|
+
status_str = f" -> {ok} ok, {err} error"
|
|
116
|
+
|
|
117
|
+
ts_prefix = f"[{ts}] " if ts else ""
|
|
118
|
+
print(f"{ts_prefix}[tools] {len(group)}x {name} ({target_str}){status_str}")
|
|
119
|
+
stats["tool"] += len(group)
|
|
120
|
+
|
|
121
|
+
pending_tools.clear()
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _safe_slice(value, n):
|
|
125
|
+
"""Slice value if it is a string; otherwise return ''.
|
|
126
|
+
|
|
127
|
+
Some Claude Code / MCP tool inputs put structured data (dicts, lists) in
|
|
128
|
+
fields like `query` or `prompt`. `dict[:N]` raises TypeError, so guard
|
|
129
|
+
every slice with an isinstance check.
|
|
130
|
+
"""
|
|
131
|
+
return value[:n] if isinstance(value, str) else ""
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def summarize_claude_tool(block):
|
|
135
|
+
"""Extract name and target from a Claude Code tool_use block."""
|
|
136
|
+
name = block.get("name", "unknown")
|
|
137
|
+
inp = block.get("input", {})
|
|
138
|
+
fp = inp.get("file_path")
|
|
139
|
+
p = inp.get("path")
|
|
140
|
+
target = (
|
|
141
|
+
(fp if isinstance(fp, str) else None)
|
|
142
|
+
or (p if isinstance(p, str) else None)
|
|
143
|
+
or _safe_slice(inp.get("command"), 120)
|
|
144
|
+
or _safe_slice(inp.get("pattern"), 200)
|
|
145
|
+
or _safe_slice(inp.get("query"), 80)
|
|
146
|
+
or _safe_slice(inp.get("prompt"), 80)
|
|
147
|
+
or ""
|
|
148
|
+
)
|
|
149
|
+
if isinstance(target, str) and len(target) > 120:
|
|
150
|
+
target = target[:120]
|
|
151
|
+
return name, target
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def handle_claude(obj):
|
|
155
|
+
msg_type = obj.get("type")
|
|
156
|
+
ts = obj.get("timestamp", "")[:19]
|
|
157
|
+
|
|
158
|
+
if msg_type == "user":
|
|
159
|
+
msg = obj.get("message", {})
|
|
160
|
+
content = msg.get("content", "")
|
|
161
|
+
|
|
162
|
+
if isinstance(content, list):
|
|
163
|
+
for block in content:
|
|
164
|
+
if block.get("type") == "tool_result":
|
|
165
|
+
is_error = block.get("is_error", False)
|
|
166
|
+
status = "error" if is_error else "ok"
|
|
167
|
+
tool_use_id = block.get("tool_use_id")
|
|
168
|
+
matched = False
|
|
169
|
+
if tool_use_id:
|
|
170
|
+
for entry in pending_tools:
|
|
171
|
+
if entry.get("id") == tool_use_id:
|
|
172
|
+
entry["status"] = status
|
|
173
|
+
matched = True
|
|
174
|
+
break
|
|
175
|
+
if not matched:
|
|
176
|
+
# Fallback: assign to earliest pending entry without a status
|
|
177
|
+
for entry in pending_tools:
|
|
178
|
+
if not entry.get("status"):
|
|
179
|
+
entry["status"] = status
|
|
180
|
+
break
|
|
181
|
+
|
|
182
|
+
texts = [
|
|
183
|
+
c.get("text", "")
|
|
184
|
+
for c in content
|
|
185
|
+
if c.get("type") == "text" and len(c.get("text", "")) > 10
|
|
186
|
+
]
|
|
187
|
+
content = " ".join(texts)
|
|
188
|
+
|
|
189
|
+
if isinstance(content, str):
|
|
190
|
+
content = clean_text(content)
|
|
191
|
+
if len(content) > 15:
|
|
192
|
+
flush_tools()
|
|
193
|
+
print(f"[{ts}] [user] {content[:800]}")
|
|
194
|
+
print("---")
|
|
195
|
+
stats["user"] += 1
|
|
196
|
+
|
|
197
|
+
elif msg_type == "assistant":
|
|
198
|
+
msg = obj.get("message", {})
|
|
199
|
+
content = msg.get("content", [])
|
|
200
|
+
if isinstance(content, list):
|
|
201
|
+
has_text = False
|
|
202
|
+
for block in content:
|
|
203
|
+
if block.get("type") == "text":
|
|
204
|
+
text = clean_text(block.get("text", ""))
|
|
205
|
+
if len(text) > 20:
|
|
206
|
+
if not has_text:
|
|
207
|
+
flush_tools()
|
|
208
|
+
has_text = True
|
|
209
|
+
print(f"[{ts}] [assistant] {text[:800]}")
|
|
210
|
+
print("---")
|
|
211
|
+
stats["assistant"] += 1
|
|
212
|
+
elif block.get("type") == "tool_use":
|
|
213
|
+
name, target = summarize_claude_tool(block)
|
|
214
|
+
entry = {"ts": ts, "name": name, "target": target}
|
|
215
|
+
tool_id = block.get("id")
|
|
216
|
+
if tool_id:
|
|
217
|
+
entry["id"] = tool_id
|
|
218
|
+
pending_tools.append(entry)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def handle_codex(obj):
|
|
222
|
+
msg_type = obj.get("type")
|
|
223
|
+
ts = obj.get("timestamp", "")[:19]
|
|
224
|
+
|
|
225
|
+
if msg_type == "event_msg":
|
|
226
|
+
p = obj.get("payload", {})
|
|
227
|
+
if p.get("type") == "user_message":
|
|
228
|
+
text = p.get("message", "")
|
|
229
|
+
if isinstance(text, str) and len(text) > 15:
|
|
230
|
+
parts = text.split("</system_instruction>")
|
|
231
|
+
user_text = parts[-1].strip() if parts else text
|
|
232
|
+
if len(user_text) > 15:
|
|
233
|
+
flush_tools()
|
|
234
|
+
print(f"[{ts}] [user] {user_text[:800]}")
|
|
235
|
+
print("---")
|
|
236
|
+
stats["user"] += 1
|
|
237
|
+
|
|
238
|
+
elif p.get("type") == "exec_command_end":
|
|
239
|
+
# This is the deduplicated result — has status info
|
|
240
|
+
command = p.get("command", [])
|
|
241
|
+
cmd_str = command[-1] if command else ""
|
|
242
|
+
output = p.get("aggregated_output", "")
|
|
243
|
+
|
|
244
|
+
status = "ok"
|
|
245
|
+
if "Process exited with code " in output:
|
|
246
|
+
try:
|
|
247
|
+
code = int(output.split("Process exited with code ")[1].split("\n")[0])
|
|
248
|
+
if code != 0:
|
|
249
|
+
status = f"error(exit {code})"
|
|
250
|
+
except (IndexError, ValueError):
|
|
251
|
+
pass
|
|
252
|
+
|
|
253
|
+
if cmd_str:
|
|
254
|
+
# Shorten common patterns for readability
|
|
255
|
+
short_cmd = cmd_str[:120]
|
|
256
|
+
pending_tools.append({"ts": ts, "name": "exec", "target": short_cmd, "status": status})
|
|
257
|
+
|
|
258
|
+
elif msg_type == "response_item":
|
|
259
|
+
p = obj.get("payload", {})
|
|
260
|
+
if p.get("type") == "message" and p.get("role") == "assistant":
|
|
261
|
+
for block in p.get("content", []):
|
|
262
|
+
if block.get("type") == "output_text" and len(block.get("text", "")) > 20:
|
|
263
|
+
flush_tools()
|
|
264
|
+
print(f"[{ts}] [assistant] {block['text'][:800]}")
|
|
265
|
+
print("---")
|
|
266
|
+
stats["assistant"] += 1
|
|
267
|
+
|
|
268
|
+
# Skip function_call — exec_command_end is the deduplicated version with status
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def _pi_text_content(content):
|
|
272
|
+
if isinstance(content, str):
|
|
273
|
+
return [content]
|
|
274
|
+
if not isinstance(content, list):
|
|
275
|
+
return []
|
|
276
|
+
return [
|
|
277
|
+
block.get("text", "")
|
|
278
|
+
for block in content
|
|
279
|
+
if isinstance(block, dict) and block.get("type") == "text"
|
|
280
|
+
]
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
def _pi_active_path_objects(objects):
|
|
284
|
+
"""Return only entries on Pi's active leaf-to-root path."""
|
|
285
|
+
by_id = {
|
|
286
|
+
obj.get("id"): obj
|
|
287
|
+
for obj in objects
|
|
288
|
+
if isinstance(obj.get("id"), str) and obj.get("type") != "session"
|
|
289
|
+
}
|
|
290
|
+
leaf_id = None
|
|
291
|
+
for obj in objects:
|
|
292
|
+
if obj.get("type") != "session" and isinstance(obj.get("id"), str):
|
|
293
|
+
leaf_id = obj["id"]
|
|
294
|
+
if not leaf_id:
|
|
295
|
+
return objects
|
|
296
|
+
|
|
297
|
+
active_ids = set()
|
|
298
|
+
current = leaf_id
|
|
299
|
+
while isinstance(current, str) and current and current not in active_ids:
|
|
300
|
+
active_ids.add(current)
|
|
301
|
+
parent = by_id.get(current, {}).get("parentId")
|
|
302
|
+
current = parent if isinstance(parent, str) else None
|
|
303
|
+
return [
|
|
304
|
+
obj
|
|
305
|
+
for obj in objects
|
|
306
|
+
if obj.get("type") == "session" or obj.get("id") in active_ids
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def _pi_context_objects(objects):
|
|
311
|
+
"""Return Pi entries that participate in active LLM context."""
|
|
312
|
+
active = _pi_active_path_objects(objects)
|
|
313
|
+
compactions = [obj for obj in active if obj.get("type") == "compaction"]
|
|
314
|
+
if not compactions:
|
|
315
|
+
return active
|
|
316
|
+
|
|
317
|
+
first_kept = compactions[-1].get("firstKeptEntryId")
|
|
318
|
+
if not isinstance(first_kept, str):
|
|
319
|
+
return active
|
|
320
|
+
|
|
321
|
+
latest_compaction_id = compactions[-1].get("id")
|
|
322
|
+
started = False
|
|
323
|
+
found_first_kept = False
|
|
324
|
+
context = [obj for obj in active if obj.get("type") == "session"]
|
|
325
|
+
context.append(compactions[-1])
|
|
326
|
+
for obj in active:
|
|
327
|
+
if obj.get("type") == "session":
|
|
328
|
+
continue
|
|
329
|
+
if obj.get("id") == first_kept:
|
|
330
|
+
started = True
|
|
331
|
+
found_first_kept = True
|
|
332
|
+
if obj.get("id") == latest_compaction_id:
|
|
333
|
+
continue
|
|
334
|
+
if started:
|
|
335
|
+
context.append(obj)
|
|
336
|
+
return context if found_first_kept and len(context) > 1 else active
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
def handle_pi(obj):
|
|
340
|
+
"""Pi sessions: type='message' with message.role and content blocks."""
|
|
341
|
+
entry_type = obj.get("type")
|
|
342
|
+
ts = obj.get("timestamp", "")[:19]
|
|
343
|
+
|
|
344
|
+
if entry_type in ("compaction", "branch_summary"):
|
|
345
|
+
text = clean_text(obj.get("summary", ""))
|
|
346
|
+
if len(text) > 15:
|
|
347
|
+
flush_tools()
|
|
348
|
+
print(f"[{ts}] [summary] {text[:800]}")
|
|
349
|
+
print("---")
|
|
350
|
+
stats["summary"] += 1
|
|
351
|
+
return
|
|
352
|
+
|
|
353
|
+
if entry_type == "custom_message":
|
|
354
|
+
text = clean_text(" ".join(_pi_text_content(obj.get("content", []))))
|
|
355
|
+
if len(text) > 15:
|
|
356
|
+
flush_tools()
|
|
357
|
+
print(f"[{ts}] [summary] {text[:800]}")
|
|
358
|
+
print("---")
|
|
359
|
+
stats["summary"] += 1
|
|
360
|
+
return
|
|
361
|
+
|
|
362
|
+
if entry_type != "message":
|
|
363
|
+
return
|
|
364
|
+
|
|
365
|
+
msg = obj.get("message", {})
|
|
366
|
+
role = msg.get("role", "")
|
|
367
|
+
content = msg.get("content", [])
|
|
368
|
+
|
|
369
|
+
if role == "bashExecution":
|
|
370
|
+
exit_code = msg.get("exitCode")
|
|
371
|
+
if msg.get("cancelled"):
|
|
372
|
+
status = "cancelled"
|
|
373
|
+
elif exit_code in (None, 0):
|
|
374
|
+
status = "ok"
|
|
375
|
+
else:
|
|
376
|
+
status = f"error(exit {exit_code})"
|
|
377
|
+
command = _safe_slice(msg.get("command"), 120)
|
|
378
|
+
pending_tools.append({"ts": ts, "name": "bash", "target": command, "status": status})
|
|
379
|
+
return
|
|
380
|
+
|
|
381
|
+
if role == "custom":
|
|
382
|
+
text = clean_text(" ".join(_pi_text_content(content)))
|
|
383
|
+
if len(text) > 15:
|
|
384
|
+
flush_tools()
|
|
385
|
+
print(f"[{ts}] [summary] {text[:800]}")
|
|
386
|
+
print("---")
|
|
387
|
+
stats["summary"] += 1
|
|
388
|
+
return
|
|
389
|
+
|
|
390
|
+
if role == "user":
|
|
391
|
+
text = clean_text(" ".join(_pi_text_content(content)))
|
|
392
|
+
if len(text) > 15:
|
|
393
|
+
flush_tools()
|
|
394
|
+
print(f"[{ts}] [user] {text[:800]}")
|
|
395
|
+
print("---")
|
|
396
|
+
stats["user"] += 1
|
|
397
|
+
|
|
398
|
+
elif role == "assistant":
|
|
399
|
+
if isinstance(content, str):
|
|
400
|
+
text = clean_text(content)
|
|
401
|
+
if len(text) > 20:
|
|
402
|
+
flush_tools()
|
|
403
|
+
print(f"[{ts}] [assistant] {text[:800]}")
|
|
404
|
+
print("---")
|
|
405
|
+
stats["assistant"] += 1
|
|
406
|
+
return
|
|
407
|
+
|
|
408
|
+
has_text = False
|
|
409
|
+
for block in (content if isinstance(content, list) else []):
|
|
410
|
+
if not isinstance(block, dict):
|
|
411
|
+
continue
|
|
412
|
+
if block.get("type") == "text":
|
|
413
|
+
text = clean_text(block.get("text", ""))
|
|
414
|
+
if len(text) > 20:
|
|
415
|
+
if not has_text:
|
|
416
|
+
flush_tools()
|
|
417
|
+
has_text = True
|
|
418
|
+
print(f"[{ts}] [assistant] {text[:800]}")
|
|
419
|
+
print("---")
|
|
420
|
+
stats["assistant"] += 1
|
|
421
|
+
elif block.get("type") == "toolCall":
|
|
422
|
+
name = block.get("name", "unknown")
|
|
423
|
+
args = block.get("arguments", {})
|
|
424
|
+
if not isinstance(args, dict):
|
|
425
|
+
args = {}
|
|
426
|
+
target = (
|
|
427
|
+
_safe_slice(args.get("path"), 200)
|
|
428
|
+
or _safe_slice(args.get("file_path"), 200)
|
|
429
|
+
or _safe_slice(args.get("command"), 120)
|
|
430
|
+
or _safe_slice(args.get("pattern"), 200)
|
|
431
|
+
or _safe_slice(args.get("query"), 80)
|
|
432
|
+
or _safe_slice(args.get("prompt"), 80)
|
|
433
|
+
or ""
|
|
434
|
+
)
|
|
435
|
+
if isinstance(target, str) and len(target) > 120:
|
|
436
|
+
target = target[:120]
|
|
437
|
+
entry = {"ts": ts, "name": name, "target": target}
|
|
438
|
+
tool_id = block.get("id")
|
|
439
|
+
if tool_id:
|
|
440
|
+
entry["id"] = tool_id
|
|
441
|
+
pending_tools.append(entry)
|
|
442
|
+
|
|
443
|
+
elif role == "toolResult":
|
|
444
|
+
tool_call_id = msg.get("toolCallId")
|
|
445
|
+
is_error = bool(msg.get("isError"))
|
|
446
|
+
if isinstance(content, list):
|
|
447
|
+
is_error = is_error or any(
|
|
448
|
+
isinstance(block, dict) and block.get("type") == "toolError"
|
|
449
|
+
for block in content
|
|
450
|
+
)
|
|
451
|
+
status = "error" if is_error else "ok"
|
|
452
|
+
if tool_call_id:
|
|
453
|
+
for entry in pending_tools:
|
|
454
|
+
if entry.get("id") == tool_call_id:
|
|
455
|
+
entry["status"] = status
|
|
456
|
+
break
|
|
457
|
+
else:
|
|
458
|
+
for entry in pending_tools:
|
|
459
|
+
if not entry.get("status"):
|
|
460
|
+
entry["status"] = status
|
|
461
|
+
break
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
def handle_cursor(obj):
|
|
465
|
+
"""Cursor agent transcripts: role-based, no timestamps, same content structure as Claude."""
|
|
466
|
+
role = obj.get("role")
|
|
467
|
+
content = obj.get("message", {}).get("content", [])
|
|
468
|
+
|
|
469
|
+
if role == "user":
|
|
470
|
+
texts = []
|
|
471
|
+
for block in (content if isinstance(content, list) else []):
|
|
472
|
+
if block.get("type") == "text":
|
|
473
|
+
texts.append(block.get("text", ""))
|
|
474
|
+
text = clean_text(" ".join(texts))
|
|
475
|
+
if len(text) > 15:
|
|
476
|
+
flush_tools()
|
|
477
|
+
# No timestamps available in Cursor transcripts
|
|
478
|
+
print(f"[user] {text[:800]}")
|
|
479
|
+
print("---")
|
|
480
|
+
stats["user"] += 1
|
|
481
|
+
|
|
482
|
+
elif role == "assistant":
|
|
483
|
+
has_text = False
|
|
484
|
+
for block in (content if isinstance(content, list) else []):
|
|
485
|
+
if block.get("type") == "text":
|
|
486
|
+
text = block.get("text", "")
|
|
487
|
+
# Skip [REDACTED] placeholder blocks
|
|
488
|
+
if len(text) > 20 and text.strip() != "[REDACTED]":
|
|
489
|
+
if not has_text:
|
|
490
|
+
flush_tools()
|
|
491
|
+
has_text = True
|
|
492
|
+
print(f"[assistant] {text[:800]}")
|
|
493
|
+
print("---")
|
|
494
|
+
stats["assistant"] += 1
|
|
495
|
+
elif block.get("type") == "tool_use":
|
|
496
|
+
name = block.get("name", "unknown")
|
|
497
|
+
inp = block.get("input", {})
|
|
498
|
+
p = inp.get("path")
|
|
499
|
+
fp = inp.get("file_path")
|
|
500
|
+
target = (
|
|
501
|
+
(p if isinstance(p, str) else None)
|
|
502
|
+
or (fp if isinstance(fp, str) else None)
|
|
503
|
+
or _safe_slice(inp.get("command"), 120)
|
|
504
|
+
or _safe_slice(inp.get("pattern"), 200)
|
|
505
|
+
or _safe_slice(inp.get("glob_pattern"), 200)
|
|
506
|
+
or _safe_slice(inp.get("target_directory"), 200)
|
|
507
|
+
or ""
|
|
508
|
+
)
|
|
509
|
+
if isinstance(target, str) and len(target) > 120:
|
|
510
|
+
target = target[:120]
|
|
511
|
+
# No status info available — Cursor doesn't log tool results
|
|
512
|
+
pending_tools.append({"ts": "", "name": name, "target": target})
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
# Auto-detect platform from first few lines, then process all
|
|
516
|
+
detected = None
|
|
517
|
+
buffer = []
|
|
518
|
+
|
|
519
|
+
for line in sys.stdin:
|
|
520
|
+
line = line.strip()
|
|
521
|
+
if not line:
|
|
522
|
+
continue
|
|
523
|
+
buffer.append(line)
|
|
524
|
+
stats["lines"] += 1
|
|
525
|
+
|
|
526
|
+
if not detected and len(buffer) <= 10:
|
|
527
|
+
try:
|
|
528
|
+
obj = json.loads(line)
|
|
529
|
+
if obj.get("type") == "session" and "cwd" in obj:
|
|
530
|
+
detected = "pi"
|
|
531
|
+
elif obj.get("type") in ("user", "assistant"):
|
|
532
|
+
detected = "claude"
|
|
533
|
+
elif obj.get("type") in ("session_meta", "turn_context", "response_item", "event_msg"):
|
|
534
|
+
detected = "codex"
|
|
535
|
+
elif obj.get("role") in ("user", "assistant") and "type" not in obj:
|
|
536
|
+
detected = "cursor"
|
|
537
|
+
except (json.JSONDecodeError, KeyError):
|
|
538
|
+
pass
|
|
539
|
+
|
|
540
|
+
handlers = {"claude": handle_claude, "codex": handle_codex, "cursor": handle_cursor, "pi": handle_pi}
|
|
541
|
+
handler = handlers.get(detected, handle_codex)
|
|
542
|
+
|
|
543
|
+
objects = []
|
|
544
|
+
for line in buffer:
|
|
545
|
+
try:
|
|
546
|
+
objects.append(json.loads(line))
|
|
547
|
+
except (json.JSONDecodeError, KeyError):
|
|
548
|
+
stats["parse_errors"] += 1
|
|
549
|
+
|
|
550
|
+
if detected == "pi":
|
|
551
|
+
objects = _pi_context_objects(objects)
|
|
552
|
+
|
|
553
|
+
for obj in objects:
|
|
554
|
+
try:
|
|
555
|
+
handler(obj)
|
|
556
|
+
except KeyError:
|
|
557
|
+
stats["parse_errors"] += 1
|
|
558
|
+
|
|
559
|
+
# Flush any remaining buffered tools
|
|
560
|
+
flush_tools()
|
|
561
|
+
|
|
562
|
+
print(json.dumps({"_meta": True, **stats}))
|
|
563
|
+
|
|
564
|
+
if args.output:
|
|
565
|
+
body = sys.stdout.getvalue()
|
|
566
|
+
sys.stdout = _original_stdout
|
|
567
|
+
with open(args.output, "w") as f:
|
|
568
|
+
f.write(body)
|
|
569
|
+
bytes_written = os.path.getsize(args.output)
|
|
570
|
+
print(json.dumps({"_meta": True, "wrote": args.output, "bytes": bytes_written, **stats}))
|