axon-code 2.4.0 → 2.6.1
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/auth/snapshot.d.ts +24 -0
- package/dist/auth/snapshot.d.ts.map +1 -0
- package/dist/auth/snapshot.js +144 -0
- package/dist/auth/snapshot.js.map +1 -0
- package/dist/cli.js +3 -1
- package/dist/cli.js.map +1 -1
- package/dist/config/axon-md-parser.d.ts.map +1 -1
- package/dist/config/axon-md-parser.js +21 -4
- package/dist/config/axon-md-parser.js.map +1 -1
- package/dist/config/index.d.ts +39 -21
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +14 -2
- package/dist/config/index.js.map +1 -1
- package/dist/context/enhanced.d.ts.map +1 -1
- package/dist/context/enhanced.js +5 -0
- package/dist/context/enhanced.js.map +1 -1
- package/dist/core/client.d.ts +7 -2
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +50 -18
- package/dist/core/client.js.map +1 -1
- package/dist/core/loop.d.ts +47 -8
- package/dist/core/loop.d.ts.map +1 -1
- package/dist/core/loop.js +333 -149
- package/dist/core/loop.js.map +1 -1
- package/dist/core/max-tokens.d.ts +24 -0
- package/dist/core/max-tokens.d.ts.map +1 -0
- package/dist/core/max-tokens.js +69 -0
- package/dist/core/max-tokens.js.map +1 -0
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +7 -14
- package/dist/core/session.js.map +1 -1
- package/dist/daemon/config.d.ts +6 -6
- package/dist/daemon/executor.d.ts.map +1 -1
- package/dist/daemon/executor.js +24 -30
- package/dist/daemon/executor.js.map +1 -1
- package/dist/goals/goal-store.d.ts +1 -1
- package/dist/goals/goal-store.d.ts.map +1 -1
- package/dist/goals/goal-store.js.map +1 -1
- package/dist/hooks/auto-verify.d.ts +86 -0
- package/dist/hooks/auto-verify.d.ts.map +1 -0
- package/dist/hooks/auto-verify.js +297 -0
- package/dist/hooks/auto-verify.js.map +1 -0
- package/dist/mcp/config.d.ts +16 -16
- package/dist/media/index.d.ts +2 -1
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +5 -3
- package/dist/media/index.js.map +1 -1
- package/dist/media/office-visual.d.ts +66 -0
- package/dist/media/office-visual.d.ts.map +1 -0
- package/dist/media/office-visual.js +409 -0
- package/dist/media/office-visual.js.map +1 -0
- package/dist/media/office.d.ts +17 -0
- package/dist/media/office.d.ts.map +1 -1
- package/dist/media/office.js +227 -2
- package/dist/media/office.js.map +1 -1
- package/dist/memory/long-term-store.d.ts +6 -0
- package/dist/memory/long-term-store.d.ts.map +1 -1
- package/dist/memory/long-term-store.js +66 -48
- package/dist/memory/long-term-store.js.map +1 -1
- package/dist/memory/memory-search.d.ts +9 -3
- package/dist/memory/memory-search.d.ts.map +1 -1
- package/dist/memory/memory-search.js +58 -12
- package/dist/memory/memory-search.js.map +1 -1
- package/dist/memory/memory-sync.d.ts +7 -0
- package/dist/memory/memory-sync.d.ts.map +1 -1
- package/dist/memory/memory-sync.js +92 -0
- package/dist/memory/memory-sync.js.map +1 -1
- package/dist/memory/notebook.d.ts +7 -0
- package/dist/memory/notebook.d.ts.map +1 -1
- package/dist/memory/notebook.js +624 -24
- package/dist/memory/notebook.js.map +1 -1
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/config.js +7 -4
- package/dist/models/config.js.map +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +1 -0
- package/dist/models/index.js.map +1 -1
- package/dist/models/model-limits.d.ts +13 -0
- package/dist/models/model-limits.d.ts.map +1 -0
- package/dist/models/model-limits.js +79 -0
- package/dist/models/model-limits.js.map +1 -0
- package/dist/network/discovery.d.ts +2 -0
- package/dist/network/discovery.d.ts.map +1 -1
- package/dist/network/discovery.js +10 -5
- package/dist/network/discovery.js.map +1 -1
- package/dist/network/global-proxy.d.ts +7 -0
- package/dist/network/global-proxy.d.ts.map +1 -1
- package/dist/network/global-proxy.js +67 -0
- package/dist/network/global-proxy.js.map +1 -1
- package/dist/network/index.d.ts +6 -1
- package/dist/network/index.d.ts.map +1 -1
- package/dist/network/index.js +16 -11
- package/dist/network/index.js.map +1 -1
- package/dist/network/transport.d.ts +41 -4
- package/dist/network/transport.d.ts.map +1 -1
- package/dist/network/transport.js +234 -61
- package/dist/network/transport.js.map +1 -1
- package/dist/network/types.d.ts +19 -1
- package/dist/network/types.d.ts.map +1 -1
- package/dist/network/types.js.map +1 -1
- package/dist/notifications/cmux.d.ts +115 -0
- package/dist/notifications/cmux.d.ts.map +1 -0
- package/dist/notifications/cmux.js +436 -0
- package/dist/notifications/cmux.js.map +1 -0
- package/dist/prompt/attachments.d.ts +8 -0
- package/dist/prompt/attachments.d.ts.map +1 -1
- package/dist/prompt/attachments.js +74 -2
- package/dist/prompt/attachments.js.map +1 -1
- package/dist/prompt/builder.js +1 -1
- package/dist/prompt/builder.js.map +1 -1
- package/dist/prompt/cache.d.ts +1 -6
- package/dist/prompt/cache.d.ts.map +1 -1
- package/dist/prompt/cache.js +37 -7
- package/dist/prompt/cache.js.map +1 -1
- package/dist/prompt/templates.d.ts +1 -1
- package/dist/prompt/templates.d.ts.map +1 -1
- package/dist/prompt/templates.js +4 -3
- package/dist/prompt/templates.js.map +1 -1
- package/dist/prompt/types.d.ts +3 -1
- package/dist/prompt/types.d.ts.map +1 -1
- package/dist/prompt/types.js.map +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/server.js +32 -11
- package/dist/proxy/server.js.map +1 -1
- package/dist/search/ripgrep.d.ts.map +1 -1
- package/dist/search/ripgrep.js +11 -0
- package/dist/search/ripgrep.js.map +1 -1
- package/dist/session/index.d.ts +3 -0
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +1 -0
- package/dist/session/index.js.map +1 -1
- package/dist/skills/builtin/algorithmic-art/LICENSE.txt +202 -0
- package/dist/skills/builtin/algorithmic-art/SKILL.md +405 -0
- package/dist/skills/builtin/algorithmic-art/templates/generator_template.js +223 -0
- package/dist/skills/builtin/algorithmic-art/templates/viewer.html +599 -0
- package/dist/skills/builtin/analyze-logs/SKILL.md +75 -0
- package/dist/skills/builtin/audit-official/SKILL.md +81 -0
- package/dist/skills/builtin/brand-guidelines/LICENSE.txt +202 -0
- package/dist/skills/builtin/brand-guidelines/SKILL.md +73 -0
- package/dist/skills/builtin/build-portable/SKILL.md +53 -0
- package/dist/skills/builtin/canvas-design/SKILL.md +130 -0
- package/dist/skills/builtin/changelog/SKILL.md +65 -0
- package/dist/skills/builtin/code-review/SKILL.md +75 -0
- package/dist/skills/builtin/doc-coauthoring/SKILL.md +375 -0
- package/dist/skills/builtin/doctor/SKILL.md +166 -0
- package/dist/skills/builtin/docx/LICENSE.txt +30 -0
- package/dist/skills/builtin/docx/SKILL.md +590 -0
- package/dist/skills/builtin/docx/scripts/__init__.py +1 -0
- package/dist/skills/builtin/docx/scripts/accept_changes.py +135 -0
- package/dist/skills/builtin/docx/scripts/comment.py +318 -0
- package/dist/skills/builtin/docx/scripts/office/helpers/__init__.py +0 -0
- package/dist/skills/builtin/docx/scripts/office/helpers/merge_runs.py +199 -0
- package/dist/skills/builtin/docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/dist/skills/builtin/docx/scripts/office/pack.py +159 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/dist/skills/builtin/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/dist/skills/builtin/docx/scripts/office/soffice.py +183 -0
- package/dist/skills/builtin/docx/scripts/office/unpack.py +132 -0
- package/dist/skills/builtin/docx/scripts/office/validate.py +111 -0
- package/dist/skills/builtin/docx/scripts/office/validators/__init__.py +15 -0
- package/dist/skills/builtin/docx/scripts/office/validators/base.py +847 -0
- package/dist/skills/builtin/docx/scripts/office/validators/docx.py +446 -0
- package/dist/skills/builtin/docx/scripts/office/validators/pptx.py +275 -0
- package/dist/skills/builtin/docx/scripts/office/validators/redlining.py +247 -0
- package/dist/skills/builtin/docx/scripts/templates/comments.xml +3 -0
- package/dist/skills/builtin/docx/scripts/templates/commentsExtended.xml +3 -0
- package/dist/skills/builtin/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/dist/skills/builtin/docx/scripts/templates/commentsIds.xml +3 -0
- package/dist/skills/builtin/docx/scripts/templates/people.xml +3 -0
- package/dist/skills/builtin/frontend-design/LICENSE.txt +177 -0
- package/dist/skills/builtin/frontend-design/SKILL.md +42 -0
- package/dist/skills/builtin/i18n-check/SKILL.md +56 -0
- package/dist/skills/builtin/internal-comms/LICENSE.txt +202 -0
- package/dist/skills/builtin/internal-comms/SKILL.md +32 -0
- package/dist/skills/builtin/internal-comms/examples/3p-updates.md +47 -0
- package/dist/skills/builtin/internal-comms/examples/company-newsletter.md +65 -0
- package/dist/skills/builtin/internal-comms/examples/faq-answers.md +30 -0
- package/dist/skills/builtin/internal-comms/examples/general-comms.md +16 -0
- package/dist/skills/builtin/mcp-builder/LICENSE.txt +202 -0
- package/dist/skills/builtin/mcp-builder/SKILL.md +236 -0
- package/dist/skills/builtin/mcp-builder/reference/evaluation.md +602 -0
- package/dist/skills/builtin/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/dist/skills/builtin/mcp-builder/reference/node_mcp_server.md +970 -0
- package/dist/skills/builtin/mcp-builder/reference/python_mcp_server.md +719 -0
- package/dist/skills/builtin/mcp-builder/scripts/connections.py +151 -0
- package/dist/skills/builtin/mcp-builder/scripts/evaluation.py +373 -0
- package/dist/skills/builtin/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/dist/skills/builtin/mcp-builder/scripts/requirements.txt +2 -0
- package/dist/skills/builtin/pdf/LICENSE.txt +30 -0
- package/dist/skills/builtin/pdf/SKILL.md +314 -0
- package/dist/skills/builtin/pdf/forms.md +294 -0
- package/dist/skills/builtin/pdf/reference.md +612 -0
- package/dist/skills/builtin/pdf/scripts/check_bounding_boxes.py +65 -0
- package/dist/skills/builtin/pdf/scripts/check_fillable_fields.py +11 -0
- package/dist/skills/builtin/pdf/scripts/convert_pdf_to_images.py +33 -0
- package/dist/skills/builtin/pdf/scripts/create_validation_image.py +37 -0
- package/dist/skills/builtin/pdf/scripts/extract_form_field_info.py +122 -0
- package/dist/skills/builtin/pdf/scripts/extract_form_structure.py +115 -0
- package/dist/skills/builtin/pdf/scripts/fill_fillable_fields.py +98 -0
- package/dist/skills/builtin/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/dist/skills/builtin/pptx/LICENSE.txt +30 -0
- package/dist/skills/builtin/pptx/SKILL.md +232 -0
- package/dist/skills/builtin/pptx/editing.md +205 -0
- package/dist/skills/builtin/pptx/pptxgenjs.md +420 -0
- package/dist/skills/builtin/pptx/scripts/__init__.py +0 -0
- package/dist/skills/builtin/pptx/scripts/add_slide.py +195 -0
- package/dist/skills/builtin/pptx/scripts/clean.py +286 -0
- package/dist/skills/builtin/pptx/scripts/office/helpers/__init__.py +0 -0
- package/dist/skills/builtin/pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/dist/skills/builtin/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/dist/skills/builtin/pptx/scripts/office/pack.py +159 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/dist/skills/builtin/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/dist/skills/builtin/pptx/scripts/office/soffice.py +183 -0
- package/dist/skills/builtin/pptx/scripts/office/unpack.py +132 -0
- package/dist/skills/builtin/pptx/scripts/office/validate.py +111 -0
- package/dist/skills/builtin/pptx/scripts/office/validators/__init__.py +15 -0
- package/dist/skills/builtin/pptx/scripts/office/validators/base.py +847 -0
- package/dist/skills/builtin/pptx/scripts/office/validators/docx.py +446 -0
- package/dist/skills/builtin/pptx/scripts/office/validators/pptx.py +275 -0
- package/dist/skills/builtin/pptx/scripts/office/validators/redlining.py +247 -0
- package/dist/skills/builtin/pptx/scripts/thumbnail.py +289 -0
- package/dist/skills/builtin/promo-video/SKILL.md +124 -0
- package/dist/skills/builtin/promote/SKILL.md +77 -0
- package/dist/skills/builtin/skill-creator/LICENSE.txt +202 -0
- package/dist/skills/builtin/skill-creator/SKILL.md +598 -0
- package/dist/skills/builtin/skill-creator/agents/analyzer.md +274 -0
- package/dist/skills/builtin/skill-creator/agents/comparator.md +202 -0
- package/dist/skills/builtin/skill-creator/agents/grader.md +223 -0
- package/dist/skills/builtin/skill-creator/assets/eval_review.html +146 -0
- package/dist/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -0
- package/dist/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -0
- package/dist/skills/builtin/skill-creator/references/schemas.md +430 -0
- package/dist/skills/builtin/skill-creator/scripts/__init__.py +0 -0
- package/dist/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/dist/skills/builtin/skill-creator/scripts/generate_report.py +326 -0
- package/dist/skills/builtin/skill-creator/scripts/improve_description.py +248 -0
- package/dist/skills/builtin/skill-creator/scripts/package_skill.py +136 -0
- package/dist/skills/builtin/skill-creator/scripts/quick_validate.py +103 -0
- package/dist/skills/builtin/skill-creator/scripts/run_eval.py +310 -0
- package/dist/skills/builtin/skill-creator/scripts/run_loop.py +332 -0
- package/dist/skills/builtin/skill-creator/scripts/utils.py +47 -0
- package/dist/skills/builtin/slack-gif-creator/LICENSE.txt +202 -0
- package/dist/skills/builtin/slack-gif-creator/SKILL.md +254 -0
- package/dist/skills/builtin/slack-gif-creator/core/easing.py +234 -0
- package/dist/skills/builtin/slack-gif-creator/core/frame_composer.py +176 -0
- package/dist/skills/builtin/slack-gif-creator/core/gif_builder.py +269 -0
- package/dist/skills/builtin/slack-gif-creator/core/validators.py +136 -0
- package/dist/skills/builtin/slack-gif-creator/requirements.txt +4 -0
- package/dist/skills/builtin/sync-version/SKILL.md +39 -0
- package/dist/skills/builtin/theme-factory/LICENSE.txt +202 -0
- package/dist/skills/builtin/theme-factory/SKILL.md +59 -0
- package/dist/skills/builtin/theme-factory/theme-showcase.pdf +0 -0
- package/dist/skills/builtin/theme-factory/themes/arctic-frost.md +19 -0
- package/dist/skills/builtin/theme-factory/themes/botanical-garden.md +19 -0
- package/dist/skills/builtin/theme-factory/themes/desert-rose.md +19 -0
- package/dist/skills/builtin/theme-factory/themes/forest-canopy.md +19 -0
- package/dist/skills/builtin/theme-factory/themes/golden-hour.md +19 -0
- package/dist/skills/builtin/theme-factory/themes/midnight-galaxy.md +19 -0
- package/dist/skills/builtin/theme-factory/themes/modern-minimalist.md +19 -0
- package/dist/skills/builtin/theme-factory/themes/ocean-depths.md +19 -0
- package/dist/skills/builtin/theme-factory/themes/sunset-boulevard.md +19 -0
- package/dist/skills/builtin/theme-factory/themes/tech-innovation.md +19 -0
- package/dist/skills/builtin/web-artifacts-builder/LICENSE.txt +202 -0
- package/dist/skills/builtin/web-artifacts-builder/SKILL.md +74 -0
- package/dist/skills/builtin/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/dist/skills/builtin/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/dist/skills/builtin/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/dist/skills/builtin/webapp-testing/LICENSE.txt +202 -0
- package/dist/skills/builtin/webapp-testing/SKILL.md +96 -0
- package/dist/skills/builtin/webapp-testing/examples/console_logging.py +35 -0
- package/dist/skills/builtin/webapp-testing/examples/element_discovery.py +40 -0
- package/dist/skills/builtin/webapp-testing/examples/static_html_automation.py +33 -0
- package/dist/skills/builtin/webapp-testing/scripts/with_server.py +106 -0
- package/dist/skills/builtin/xlsx/LICENSE.txt +30 -0
- package/dist/skills/builtin/xlsx/SKILL.md +292 -0
- package/dist/skills/builtin/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/dist/skills/builtin/xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/dist/skills/builtin/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/dist/skills/builtin/xlsx/scripts/office/pack.py +159 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/dist/skills/builtin/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/dist/skills/builtin/xlsx/scripts/office/soffice.py +183 -0
- package/dist/skills/builtin/xlsx/scripts/office/unpack.py +132 -0
- package/dist/skills/builtin/xlsx/scripts/office/validate.py +111 -0
- package/dist/skills/builtin/xlsx/scripts/office/validators/__init__.py +15 -0
- package/dist/skills/builtin/xlsx/scripts/office/validators/base.py +847 -0
- package/dist/skills/builtin/xlsx/scripts/office/validators/docx.py +446 -0
- package/dist/skills/builtin/xlsx/scripts/office/validators/pptx.py +275 -0
- package/dist/skills/builtin/xlsx/scripts/office/validators/redlining.py +247 -0
- package/dist/skills/builtin/xlsx/scripts/recalc.py +184 -0
- package/dist/tools/agent.d.ts +8 -0
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/agent.js +66 -2
- package/dist/tools/agent.js.map +1 -1
- package/dist/tools/base.d.ts +16 -0
- package/dist/tools/base.d.ts.map +1 -1
- package/dist/tools/base.js +32 -0
- package/dist/tools/base.js.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +8 -0
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/file.d.ts +3 -1
- package/dist/tools/file.d.ts.map +1 -1
- package/dist/tools/file.js +176 -117
- package/dist/tools/file.js.map +1 -1
- package/dist/tools/generate-design.d.ts +5 -1
- package/dist/tools/generate-design.d.ts.map +1 -1
- package/dist/tools/generate-design.js +25 -3
- package/dist/tools/generate-design.js.map +1 -1
- package/dist/tools/goal.d.ts +1 -1
- package/dist/tools/goal.d.ts.map +1 -1
- package/dist/tools/goal.js +18 -9
- package/dist/tools/goal.js.map +1 -1
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +74 -5
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/mcp.d.ts.map +1 -1
- package/dist/tools/mcp.js +5 -0
- package/dist/tools/mcp.js.map +1 -1
- package/dist/tools/memory-search.d.ts +1 -1
- package/dist/tools/memory-search.d.ts.map +1 -1
- package/dist/tools/memory-search.js +1 -1
- package/dist/tools/memory-search.js.map +1 -1
- package/dist/tools/network-agent.js +2 -1
- package/dist/tools/network-agent.js.map +1 -1
- package/dist/tools/notebook-write.d.ts.map +1 -1
- package/dist/tools/notebook-write.js +3 -1
- package/dist/tools/notebook-write.js.map +1 -1
- package/dist/tools/schedule.d.ts.map +1 -1
- package/dist/tools/schedule.js +2 -26
- package/dist/tools/schedule.js.map +1 -1
- package/dist/tools/skill.d.ts +1 -7
- package/dist/tools/skill.d.ts.map +1 -1
- package/dist/tools/skill.js +225 -61
- package/dist/tools/skill.js.map +1 -1
- package/dist/types/messages.d.ts +1 -5
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/web/server/api-manager.d.ts +9 -4
- package/dist/web/server/api-manager.d.ts.map +1 -1
- package/dist/web/server/api-manager.js +173 -63
- package/dist/web/server/api-manager.js.map +1 -1
- package/dist/web/server/app-manager.d.ts +71 -0
- package/dist/web/server/app-manager.d.ts.map +1 -0
- package/dist/web/server/app-manager.js +364 -0
- package/dist/web/server/app-manager.js.map +1 -0
- package/dist/web/server/channels/bridge.d.ts.map +1 -1
- package/dist/web/server/channels/bridge.js +2 -1
- package/dist/web/server/channels/bridge.js.map +1 -1
- package/dist/web/server/codex-auth-manager.d.ts +43 -0
- package/dist/web/server/codex-auth-manager.d.ts.map +1 -0
- package/dist/web/server/codex-auth-manager.js +429 -0
- package/dist/web/server/codex-auth-manager.js.map +1 -0
- package/dist/web/server/conversation.d.ts +34 -5
- package/dist/web/server/conversation.d.ts.map +1 -1
- package/dist/web/server/conversation.js +435 -142
- package/dist/web/server/conversation.js.map +1 -1
- package/dist/web/server/image-attachments.d.ts +23 -0
- package/dist/web/server/image-attachments.d.ts.map +1 -0
- package/dist/web/server/image-attachments.js +93 -0
- package/dist/web/server/image-attachments.js.map +1 -0
- package/dist/web/server/index.d.ts.map +1 -1
- package/dist/web/server/index.js +28 -0
- package/dist/web/server/index.js.map +1 -1
- package/dist/web/server/routes/__tests__/app-api.test.d.ts +5 -0
- package/dist/web/server/routes/__tests__/app-api.test.d.ts.map +1 -0
- package/dist/web/server/routes/__tests__/app-api.test.js +48 -0
- package/dist/web/server/routes/__tests__/app-api.test.js.map +1 -0
- package/dist/web/server/routes/__tests__/tunnel-api.test.d.ts +2 -0
- package/dist/web/server/routes/__tests__/tunnel-api.test.d.ts.map +1 -0
- package/dist/web/server/routes/__tests__/tunnel-api.test.js +96 -0
- package/dist/web/server/routes/__tests__/tunnel-api.test.js.map +1 -0
- package/dist/web/server/routes/ai-editor.d.ts.map +1 -1
- package/dist/web/server/routes/ai-editor.js +9 -45
- package/dist/web/server/routes/ai-editor.js.map +1 -1
- package/dist/web/server/routes/ai-hover.d.ts.map +1 -1
- package/dist/web/server/routes/ai-hover.js +6 -23
- package/dist/web/server/routes/ai-hover.js.map +1 -1
- package/dist/web/server/routes/api.d.ts.map +1 -1
- package/dist/web/server/routes/api.js +27 -23
- package/dist/web/server/routes/api.js.map +1 -1
- package/dist/web/server/routes/app-api.d.ts +8 -0
- package/dist/web/server/routes/app-api.d.ts.map +1 -0
- package/dist/web/server/routes/app-api.js +191 -0
- package/dist/web/server/routes/app-api.js.map +1 -0
- package/dist/web/server/routes/auth.d.ts.map +1 -1
- package/dist/web/server/routes/auth.js +306 -5
- package/dist/web/server/routes/auth.js.map +1 -1
- package/dist/web/server/routes/autocomplete-api.d.ts.map +1 -1
- package/dist/web/server/routes/autocomplete-api.js +5 -43
- package/dist/web/server/routes/autocomplete-api.js.map +1 -1
- package/dist/web/server/routes/axon-cloud.d.ts.map +1 -1
- package/dist/web/server/routes/axon-cloud.js +352 -1
- package/dist/web/server/routes/axon-cloud.js.map +1 -1
- package/dist/web/server/routes/config-api.d.ts.map +1 -1
- package/dist/web/server/routes/config-api.js +12 -20
- package/dist/web/server/routes/config-api.js.map +1 -1
- package/dist/web/server/routes/download-proxy.d.ts.map +1 -1
- package/dist/web/server/routes/download-proxy.js +234 -12
- package/dist/web/server/routes/download-proxy.js.map +1 -1
- package/dist/web/server/routes/network-api.d.ts +1 -0
- package/dist/web/server/routes/network-api.d.ts.map +1 -1
- package/dist/web/server/routes/network-api.js +36 -11
- package/dist/web/server/routes/network-api.js.map +1 -1
- package/dist/web/server/routes/port-forward.d.ts.map +1 -1
- package/dist/web/server/routes/port-forward.js +3 -2
- package/dist/web/server/routes/port-forward.js.map +1 -1
- package/dist/web/server/routes/schedule-api.d.ts.map +1 -1
- package/dist/web/server/routes/schedule-api.js +5 -1
- package/dist/web/server/routes/schedule-api.js.map +1 -1
- package/dist/web/server/routes/tunnel-api.d.ts +14 -0
- package/dist/web/server/routes/tunnel-api.d.ts.map +1 -0
- package/dist/web/server/routes/tunnel-api.js +52 -0
- package/dist/web/server/routes/tunnel-api.js.map +1 -0
- package/dist/web/server/runtime/api-connection-test.d.ts +18 -0
- package/dist/web/server/runtime/api-connection-test.d.ts.map +1 -0
- package/dist/web/server/runtime/api-connection-test.js +62 -0
- package/dist/web/server/runtime/api-connection-test.js.map +1 -0
- package/dist/web/server/runtime/codex-client.d.ts +35 -0
- package/dist/web/server/runtime/codex-client.d.ts.map +1 -0
- package/dist/web/server/runtime/codex-client.js +1202 -0
- package/dist/web/server/runtime/codex-client.js.map +1 -0
- package/dist/web/server/runtime/factory.d.ts +3 -0
- package/dist/web/server/runtime/factory.d.ts.map +1 -0
- package/dist/web/server/runtime/factory.js +16 -0
- package/dist/web/server/runtime/factory.js.map +1 -0
- package/dist/web/server/runtime/runtime-model-catalog.d.ts +10 -0
- package/dist/web/server/runtime/runtime-model-catalog.d.ts.map +1 -0
- package/dist/web/server/runtime/runtime-model-catalog.js +85 -0
- package/dist/web/server/runtime/runtime-model-catalog.js.map +1 -0
- package/dist/web/server/runtime/runtime-model-list.d.ts +24 -0
- package/dist/web/server/runtime/runtime-model-list.d.ts.map +1 -0
- package/dist/web/server/runtime/runtime-model-list.js +43 -0
- package/dist/web/server/runtime/runtime-model-list.js.map +1 -0
- package/dist/web/server/runtime/runtime-selection.d.ts +17 -0
- package/dist/web/server/runtime/runtime-selection.d.ts.map +1 -0
- package/dist/web/server/runtime/runtime-selection.js +35 -0
- package/dist/web/server/runtime/runtime-selection.js.map +1 -0
- package/dist/web/server/runtime/tool-input-normalizer.d.ts +3 -0
- package/dist/web/server/runtime/tool-input-normalizer.d.ts.map +1 -0
- package/dist/web/server/runtime/tool-input-normalizer.js +52 -0
- package/dist/web/server/runtime/tool-input-normalizer.js.map +1 -0
- package/dist/web/server/runtime/types.d.ts +102 -0
- package/dist/web/server/runtime/types.d.ts.map +1 -0
- package/dist/web/server/runtime/types.js +2 -0
- package/dist/web/server/runtime/types.js.map +1 -0
- package/dist/web/server/runtime/utility-client.d.ts +5 -0
- package/dist/web/server/runtime/utility-client.d.ts.map +1 -0
- package/dist/web/server/runtime/utility-client.js +68 -0
- package/dist/web/server/runtime/utility-client.js.map +1 -0
- package/dist/web/server/services/axon-cloud-service.d.ts +24 -0
- package/dist/web/server/services/axon-cloud-service.d.ts.map +1 -1
- package/dist/web/server/services/axon-cloud-service.js +93 -0
- package/dist/web/server/services/axon-cloud-service.js.map +1 -1
- package/dist/web/server/services/config-service.d.ts +8 -2
- package/dist/web/server/services/config-service.d.ts.map +1 -1
- package/dist/web/server/services/config-service.js +51 -0
- package/dist/web/server/services/config-service.js.map +1 -1
- package/dist/web/server/services/gemini-image-service.d.ts +20 -1
- package/dist/web/server/services/gemini-image-service.d.ts.map +1 -1
- package/dist/web/server/services/gemini-image-service.js +121 -13
- package/dist/web/server/services/gemini-image-service.js.map +1 -1
- package/dist/web/server/session-manager.d.ts +10 -0
- package/dist/web/server/session-manager.d.ts.map +1 -1
- package/dist/web/server/session-manager.js +39 -0
- package/dist/web/server/session-manager.js.map +1 -1
- package/dist/web/server/slash-commands.d.ts.map +1 -1
- package/dist/web/server/slash-commands.js +127 -25
- package/dist/web/server/slash-commands.js.map +1 -1
- package/dist/web/server/task-manager.d.ts +4 -15
- package/dist/web/server/task-manager.d.ts.map +1 -1
- package/dist/web/server/task-manager.js +11 -4
- package/dist/web/server/task-manager.js.map +1 -1
- package/dist/web/server/tunnel.d.ts +47 -0
- package/dist/web/server/tunnel.d.ts.map +1 -0
- package/dist/web/server/tunnel.js +165 -0
- package/dist/web/server/tunnel.js.map +1 -0
- package/dist/web/server/user-interaction.d.ts +10 -0
- package/dist/web/server/user-interaction.d.ts.map +1 -1
- package/dist/web/server/user-interaction.js +28 -0
- package/dist/web/server/user-interaction.js.map +1 -1
- package/dist/web/server/web-auth.d.ts +35 -3
- package/dist/web/server/web-auth.d.ts.map +1 -1
- package/dist/web/server/web-auth.js +302 -29
- package/dist/web/server/web-auth.js.map +1 -1
- package/dist/web/server/web-scheduler.d.ts.map +1 -1
- package/dist/web/server/web-scheduler.js +9 -0
- package/dist/web/server/web-scheduler.js.map +1 -1
- package/dist/web/server/websocket-git-handlers.d.ts.map +1 -1
- package/dist/web/server/websocket-git-handlers.js +5 -29
- package/dist/web/server/websocket-git-handlers.js.map +1 -1
- package/dist/web/server/websocket.d.ts.map +1 -1
- package/dist/web/server/websocket.js +246 -70
- package/dist/web/server/websocket.js.map +1 -1
- package/dist/web/shared/auth-summary.d.ts +28 -0
- package/dist/web/shared/auth-summary.d.ts.map +1 -0
- package/dist/web/shared/auth-summary.js +56 -0
- package/dist/web/shared/auth-summary.js.map +1 -0
- package/dist/web/shared/model-catalog.d.ts +31 -0
- package/dist/web/shared/model-catalog.d.ts.map +1 -0
- package/dist/web/shared/model-catalog.js +365 -0
- package/dist/web/shared/model-catalog.js.map +1 -0
- package/dist/web/shared/model-preferences.d.ts +5 -0
- package/dist/web/shared/model-preferences.d.ts.map +1 -0
- package/dist/web/shared/model-preferences.js +13 -0
- package/dist/web/shared/model-preferences.js.map +1 -0
- package/dist/web/shared/runtime-capabilities.d.ts +37 -0
- package/dist/web/shared/runtime-capabilities.d.ts.map +1 -0
- package/dist/web/shared/runtime-capabilities.js +101 -0
- package/dist/web/shared/runtime-capabilities.js.map +1 -0
- package/dist/web/shared/setup-runtime.d.ts +50 -0
- package/dist/web/shared/setup-runtime.d.ts.map +1 -0
- package/dist/web/shared/setup-runtime.js +214 -0
- package/dist/web/shared/setup-runtime.js.map +1 -0
- package/dist/web/shared/thinking-config.d.ts +20 -0
- package/dist/web/shared/thinking-config.d.ts.map +1 -0
- package/dist/web/shared/thinking-config.js +104 -0
- package/dist/web/shared/thinking-config.js.map +1 -0
- package/dist/web/shared/types.d.ts +30 -2
- package/dist/web/shared/types.d.ts.map +1 -1
- package/dist/web/shared/types.js.map +1 -1
- package/electron/main.cjs +15 -3
- package/package.json +6 -2
- package/src/web/client/dist/assets/index-B2M5Nr-5.js +736 -0
- package/src/web/client/dist/assets/index-COEqamS-.css +32 -0
- package/src/web/client/dist/icons/icon-192.png +0 -0
- package/src/web/client/dist/icons/icon-512.png +0 -0
- package/src/web/client/dist/index.html +31 -0
- package/src/web/client/dist/logo.png +0 -0
- package/src/web/client/dist/manifest.webmanifest +25 -0
- package/src/web/client/dist/sw.js +78 -0
package/dist/memory/notebook.js
CHANGED
|
@@ -30,9 +30,27 @@ const MAX_TOKENS = {
|
|
|
30
30
|
// ============================================================================
|
|
31
31
|
// 工具函数
|
|
32
32
|
// ============================================================================
|
|
33
|
-
/**
|
|
34
|
-
function
|
|
35
|
-
return
|
|
33
|
+
/** 获取用户级 .axon 目录 */
|
|
34
|
+
function getUserAxonDir() {
|
|
35
|
+
return path.join(os.homedir(), '.axon');
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 获取 notebook 存储根目录。
|
|
39
|
+
* Notebook 是长期记忆,不应因为项目级 .axon 配置目录而分叉。
|
|
40
|
+
*/
|
|
41
|
+
function getNotebookStorageDir(projectPath) {
|
|
42
|
+
const configuredDir = process.env.AXON_CONFIG_DIR;
|
|
43
|
+
if (!configuredDir) {
|
|
44
|
+
return getUserAxonDir();
|
|
45
|
+
}
|
|
46
|
+
if (projectPath) {
|
|
47
|
+
const normalizedConfigured = path.resolve(configuredDir);
|
|
48
|
+
const normalizedProjectAxonDir = path.resolve(path.join(projectPath, '.axon'));
|
|
49
|
+
if (normalizedConfigured === normalizedProjectAxonDir) {
|
|
50
|
+
return getUserAxonDir();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return configuredDir;
|
|
36
54
|
}
|
|
37
55
|
/** 将项目路径转为安全的目录名 */
|
|
38
56
|
function sanitizeProjectPath(projectPath) {
|
|
@@ -48,6 +66,547 @@ function ensureDir(dir) {
|
|
|
48
66
|
fs.mkdirSync(dir, { recursive: true });
|
|
49
67
|
}
|
|
50
68
|
}
|
|
69
|
+
const PROFILE_SECTION_DEFINITIONS = [
|
|
70
|
+
{
|
|
71
|
+
title: 'Basic Info',
|
|
72
|
+
aliases: [/^basic info$/i, /^stable facts$/i, /^identity$/i, /^background$/i, /^基本信息$/, /^个人信息$/],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: 'Stable Preferences',
|
|
76
|
+
aliases: [/^stable preferences$/i, /^preferences$/i, /^长期偏好$/i, /^偏好$/i],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: 'Communication Style',
|
|
80
|
+
aliases: [/^communication style$/i, /^communication preferences$/i, /^tone.*style$/i, /^沟通风格$/, /^表达风格$/],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
title: 'Working Style',
|
|
84
|
+
aliases: [/^working style$/i, /^working preferences$/i, /^collaboration style$/i, /^工作风格$/, /^协作方式$/],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
title: 'Decision Signals',
|
|
88
|
+
aliases: [/^decision signals$/i, /^friction signals$/i, /^triggers$/i, /^雷区$/, /^信号$/, /^决策信号$/],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'Values & Motivations',
|
|
92
|
+
aliases: [/^values\s*&\s*motivations$/i, /^long-term goals.*values$/i, /^values$/i, /^goals$/i, /^价值观与动机$/, /^长期目标与价值$/],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
title: 'Do Not Assume / Open Questions',
|
|
96
|
+
aliases: [/^do not assume\s*\/\s*open questions$/i, /^open questions$/i, /^unknowns$/i, /^uncertainties$/i, /^待确认事项$/, /^不要假设 \/ 待确认$/],
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
const PROFILE_SECTION_ORDER = PROFILE_SECTION_DEFINITIONS.map((section) => section.title);
|
|
100
|
+
const PROFILE_ADDITIONAL_NOTES = 'Additional Notes';
|
|
101
|
+
function buildDefaultProfileTemplate() {
|
|
102
|
+
return [
|
|
103
|
+
'# User Profile',
|
|
104
|
+
'',
|
|
105
|
+
'## Basic Info',
|
|
106
|
+
'- Language preference: (auto-detected)',
|
|
107
|
+
'',
|
|
108
|
+
'## Stable Preferences',
|
|
109
|
+
'',
|
|
110
|
+
'## Communication Style',
|
|
111
|
+
'',
|
|
112
|
+
'## Working Style',
|
|
113
|
+
'',
|
|
114
|
+
'## Decision Signals',
|
|
115
|
+
'',
|
|
116
|
+
'## Values & Motivations',
|
|
117
|
+
'',
|
|
118
|
+
'## Do Not Assume / Open Questions',
|
|
119
|
+
].join('\n');
|
|
120
|
+
}
|
|
121
|
+
function canonicalizeProfileSectionTitle(rawTitle) {
|
|
122
|
+
const normalizedTitle = rawTitle.trim();
|
|
123
|
+
if (!normalizedTitle)
|
|
124
|
+
return null;
|
|
125
|
+
for (const section of PROFILE_SECTION_DEFINITIONS) {
|
|
126
|
+
if (section.aliases.some((alias) => alias.test(normalizedTitle))) {
|
|
127
|
+
return section.title;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (/additional notes/i.test(normalizedTitle) || /补充说明|附加说明/.test(normalizedTitle)) {
|
|
131
|
+
return PROFILE_ADDITIONAL_NOTES;
|
|
132
|
+
}
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
function parseProfileMetadataKey(rawKey) {
|
|
136
|
+
const normalized = rawKey.trim().toLowerCase();
|
|
137
|
+
if (normalized === 'updated'
|
|
138
|
+
|| normalized === 'last updated'
|
|
139
|
+
|| normalized === 'update'
|
|
140
|
+
|| normalized === 'date'
|
|
141
|
+
|| normalized === '更新时间'
|
|
142
|
+
|| normalized === '更新'
|
|
143
|
+
|| normalized === '日期') {
|
|
144
|
+
return 'updated';
|
|
145
|
+
}
|
|
146
|
+
if (normalized === 'evidence'
|
|
147
|
+
|| normalized === 'source'
|
|
148
|
+
|| normalized === 'proof'
|
|
149
|
+
|| normalized === 'reason'
|
|
150
|
+
|| normalized === '依据'
|
|
151
|
+
|| normalized === '证据'
|
|
152
|
+
|| normalized === '来源'
|
|
153
|
+
|| normalized === '理由') {
|
|
154
|
+
return 'evidence';
|
|
155
|
+
}
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
function parseProfileMetadataLine(rawLine) {
|
|
159
|
+
const trimmed = rawLine.trim().replace(/^[-*]\s*/, '');
|
|
160
|
+
const match = trimmed.match(/^([^::]+)\s*[::]\s*(.+)$/);
|
|
161
|
+
if (!match) {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
const key = parseProfileMetadataKey(match[1]);
|
|
165
|
+
const value = match[2].trim();
|
|
166
|
+
if (!value) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
if (key) {
|
|
170
|
+
return { key, value };
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
key: 'extra',
|
|
174
|
+
value: `${match[1].trim()}: ${value}`,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function parseInlineProfileMetadata(rawText) {
|
|
178
|
+
const extras = [];
|
|
179
|
+
let updated;
|
|
180
|
+
let evidence;
|
|
181
|
+
let signal = rawText.trim();
|
|
182
|
+
const inlineMatch = signal.match(/\s+\[([^\]]+)\]\s*$/);
|
|
183
|
+
if (!inlineMatch || inlineMatch.index === undefined) {
|
|
184
|
+
return { signal, updated, evidence, extras };
|
|
185
|
+
}
|
|
186
|
+
const metadataText = inlineMatch[1].trim();
|
|
187
|
+
const parts = metadataText
|
|
188
|
+
.split(/[;;]+/)
|
|
189
|
+
.map((part) => part.trim())
|
|
190
|
+
.filter(Boolean);
|
|
191
|
+
let parsedCount = 0;
|
|
192
|
+
for (const part of parts) {
|
|
193
|
+
const parsed = parseProfileMetadataLine(part);
|
|
194
|
+
if (!parsed) {
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
parsedCount += 1;
|
|
198
|
+
if (parsed.key === 'updated') {
|
|
199
|
+
updated = parsed.value;
|
|
200
|
+
}
|
|
201
|
+
else if (parsed.key === 'evidence') {
|
|
202
|
+
evidence = parsed.value;
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
extras.push(parsed.value);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (parsedCount === 0) {
|
|
209
|
+
return { signal, updated, evidence, extras };
|
|
210
|
+
}
|
|
211
|
+
signal = signal.slice(0, inlineMatch.index).trim();
|
|
212
|
+
return { signal, updated, evidence, extras };
|
|
213
|
+
}
|
|
214
|
+
function normalizeProfileSignalForRender(signal) {
|
|
215
|
+
return signal
|
|
216
|
+
.replace(/\s+/g, ' ')
|
|
217
|
+
.replace(/[ \t]+$/g, '')
|
|
218
|
+
.trim();
|
|
219
|
+
}
|
|
220
|
+
function normalizeProfileComparisonText(signal) {
|
|
221
|
+
return signal
|
|
222
|
+
.toLowerCase()
|
|
223
|
+
.replace(/\b(the user|user|they|them)\b/g, ' ')
|
|
224
|
+
.replace(/\b(prefers?|likes?|wants?|needs?|values?|cares about|dislikes?|hates?|avoids?|gets frustrated when)\b/g, ' ')
|
|
225
|
+
.replace(/喜欢|偏好|更喜欢|希望|想要|需要|重视|在乎|讨厌|反感|避免|最烦|用户|对方/g, ' ')
|
|
226
|
+
.replace(/[^a-z0-9\u4e00-\u9fff]+/g, ' ')
|
|
227
|
+
.replace(/\s+/g, ' ')
|
|
228
|
+
.trim();
|
|
229
|
+
}
|
|
230
|
+
function dedupeProfileExtras(extras) {
|
|
231
|
+
const seen = new Set();
|
|
232
|
+
const result = [];
|
|
233
|
+
for (const extra of extras) {
|
|
234
|
+
const normalized = extra.trim();
|
|
235
|
+
if (!normalized) {
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
const key = normalized.toLowerCase();
|
|
239
|
+
if (seen.has(key)) {
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
seen.add(key);
|
|
243
|
+
result.push(normalized);
|
|
244
|
+
}
|
|
245
|
+
return result;
|
|
246
|
+
}
|
|
247
|
+
function isExplicitProfileCorrection(signal) {
|
|
248
|
+
return (/\b(no longer|instead|rather than|not .* but|wrong|corrected?|actually|do not|does not|don't|doesn't)\b/i.test(signal)
|
|
249
|
+
|| /不是|不再|而不是|别再|不要|并非|纠正|改成|其实|不是想要|不想要/.test(signal));
|
|
250
|
+
}
|
|
251
|
+
function inferProfileTopicKey(signal) {
|
|
252
|
+
const normalized = normalizeProfileComparisonText(signal);
|
|
253
|
+
if (!normalized) {
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
const fieldMatch = signal.match(/^([^::]{2,40})[::]\s*.+$/);
|
|
257
|
+
if (fieldMatch) {
|
|
258
|
+
const fieldKey = normalizeProfileComparisonText(fieldMatch[1]);
|
|
259
|
+
if (fieldKey) {
|
|
260
|
+
return `field:${fieldKey}`;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
const topicPatterns = [
|
|
264
|
+
{ key: 'language', patterns: [/\blanguage\b/i, /中文|英文|双语|语言/] },
|
|
265
|
+
{ key: 'name', patterns: [/\bname\b/i, /名字|姓名|我叫/] },
|
|
266
|
+
{ key: 'role', patterns: [/\brole\b|\btitle\b|\bjob\b|\bbackground\b/i, /角色|职位|身份|背景|工程师|产品经理|创始人/] },
|
|
267
|
+
{ key: 'timezone', patterns: [/\btimezone\b/i, /时区/] },
|
|
268
|
+
{ key: 'verbosity', patterns: [/\bconcise\b|\bbrief\b|\bshort\b|\blong-winded\b|\bverbose\b|\bdetailed\b|\blengthy\b|\bexplanations?\b/i, /简洁|简短|啰嗦|冗长|别太长|长篇|详细|展开讲/] },
|
|
269
|
+
{ key: 'tone', patterns: [/\bdirect\b|\bcorporate\b|\btone\b|\bwording\b|\bpolite\b|\bblunt\b/i, /直接|官腔|语气|措辞|表达风格|说话方式/] },
|
|
270
|
+
{ key: 'corrections', patterns: [/\bcorrection\b|\bremember\b|\bforgotten\b/i, /纠正|记住|忘记|反复纠正/] },
|
|
271
|
+
{ key: 'proactivity', patterns: [/\bproactive\b|\binitiative\b/i, /主动|前置|提前|预判/] },
|
|
272
|
+
{ key: 'testing', patterns: [/\btests?\b|\btesting\b/i, /测试|提测|回归/] },
|
|
273
|
+
{ key: 'planning', patterns: [/\bplanning?\b|\bplan\b/i, /计划|方案|先.*后.*/] },
|
|
274
|
+
{ key: 'collaboration', patterns: [/\bcollaborat/i, /协作|合作|同伴|搭子/] },
|
|
275
|
+
{ key: 'scope', patterns: [/\bportrait\b|\bappearance\b|\bpersonality\b/i, /画像|长相|性格|特点/] },
|
|
276
|
+
{ key: 'values', patterns: [/\bvalue\b|\bmotivation\b|\bgoal\b|\bprinciple\b/i, /价值|动机|目标|原则|在乎|重视/] },
|
|
277
|
+
];
|
|
278
|
+
for (const topic of topicPatterns) {
|
|
279
|
+
if (topic.patterns.some((pattern) => pattern.test(signal) || pattern.test(normalized))) {
|
|
280
|
+
return topic.key;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
function isSingleValueProfileTopic(topicKey) {
|
|
286
|
+
if (!topicKey) {
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
return topicKey.startsWith('field:')
|
|
290
|
+
|| topicKey === 'language'
|
|
291
|
+
|| topicKey === 'name'
|
|
292
|
+
|| topicKey === 'role'
|
|
293
|
+
|| topicKey === 'timezone'
|
|
294
|
+
|| topicKey === 'scope';
|
|
295
|
+
}
|
|
296
|
+
function countProfileEntryMetadata(entry) {
|
|
297
|
+
return (entry.updated ? 1 : 0) + (entry.evidence ? 1 : 0) + entry.extras.length;
|
|
298
|
+
}
|
|
299
|
+
function compareProfileDates(left, right) {
|
|
300
|
+
if (!left && !right) {
|
|
301
|
+
return 0;
|
|
302
|
+
}
|
|
303
|
+
if (!left) {
|
|
304
|
+
return -1;
|
|
305
|
+
}
|
|
306
|
+
if (!right) {
|
|
307
|
+
return 1;
|
|
308
|
+
}
|
|
309
|
+
const leftTime = Date.parse(left);
|
|
310
|
+
const rightTime = Date.parse(right);
|
|
311
|
+
if (Number.isNaN(leftTime) || Number.isNaN(rightTime)) {
|
|
312
|
+
return left.localeCompare(right);
|
|
313
|
+
}
|
|
314
|
+
if (leftTime === rightTime) {
|
|
315
|
+
return 0;
|
|
316
|
+
}
|
|
317
|
+
return leftTime > rightTime ? 1 : -1;
|
|
318
|
+
}
|
|
319
|
+
function choosePreferredProfileEntry(left, right) {
|
|
320
|
+
const dateCompare = compareProfileDates(left.updated, right.updated);
|
|
321
|
+
if (dateCompare !== 0) {
|
|
322
|
+
return dateCompare > 0 ? left : right;
|
|
323
|
+
}
|
|
324
|
+
if (left.correction !== right.correction) {
|
|
325
|
+
return left.correction ? left : right;
|
|
326
|
+
}
|
|
327
|
+
const metadataDelta = countProfileEntryMetadata(left) - countProfileEntryMetadata(right);
|
|
328
|
+
if (metadataDelta !== 0) {
|
|
329
|
+
return metadataDelta > 0 ? left : right;
|
|
330
|
+
}
|
|
331
|
+
if (left.signal.length !== right.signal.length) {
|
|
332
|
+
return left.signal.length > right.signal.length ? left : right;
|
|
333
|
+
}
|
|
334
|
+
return left.order >= right.order ? left : right;
|
|
335
|
+
}
|
|
336
|
+
function areProfileSignalsSimilar(left, right) {
|
|
337
|
+
const leftText = normalizeProfileComparisonText(left.signal);
|
|
338
|
+
const rightText = normalizeProfileComparisonText(right.signal);
|
|
339
|
+
if (!leftText || !rightText) {
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
if (leftText === rightText) {
|
|
343
|
+
return true;
|
|
344
|
+
}
|
|
345
|
+
if (leftText.length >= 6 && rightText.includes(leftText)) {
|
|
346
|
+
return true;
|
|
347
|
+
}
|
|
348
|
+
if (rightText.length >= 6 && leftText.includes(rightText)) {
|
|
349
|
+
return true;
|
|
350
|
+
}
|
|
351
|
+
if (left.topicKey && left.topicKey === right.topicKey) {
|
|
352
|
+
const leftWords = new Set(leftText.split(' ').filter(Boolean));
|
|
353
|
+
const rightWords = new Set(rightText.split(' ').filter(Boolean));
|
|
354
|
+
if (leftWords.size > 0 && rightWords.size > 0) {
|
|
355
|
+
const overlap = [...leftWords].filter((word) => rightWords.has(word)).length;
|
|
356
|
+
const ratio = overlap / Math.min(leftWords.size, rightWords.size);
|
|
357
|
+
if (ratio >= 0.6) {
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
function mergeProfileEntries(left, right) {
|
|
365
|
+
const preferred = choosePreferredProfileEntry(left, right);
|
|
366
|
+
const fallback = preferred === left ? right : left;
|
|
367
|
+
return {
|
|
368
|
+
signal: preferred.signal,
|
|
369
|
+
updated: compareProfileDates(left.updated, right.updated) >= 0 ? left.updated ?? right.updated : right.updated ?? left.updated,
|
|
370
|
+
evidence: preferred.evidence ?? fallback.evidence,
|
|
371
|
+
extras: dedupeProfileExtras([...left.extras, ...right.extras]),
|
|
372
|
+
topicKey: preferred.topicKey ?? fallback.topicKey,
|
|
373
|
+
correction: left.correction || right.correction,
|
|
374
|
+
order: Math.max(left.order, right.order),
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
function renderProfileEntry(entry) {
|
|
378
|
+
const metadataParts = [];
|
|
379
|
+
if (entry.updated) {
|
|
380
|
+
metadataParts.push(`updated: ${entry.updated}`);
|
|
381
|
+
}
|
|
382
|
+
if (entry.evidence) {
|
|
383
|
+
metadataParts.push(`evidence: ${entry.evidence}`);
|
|
384
|
+
}
|
|
385
|
+
metadataParts.push(...dedupeProfileExtras(entry.extras));
|
|
386
|
+
return metadataParts.length > 0
|
|
387
|
+
? `- ${entry.signal} [${metadataParts.join('; ')}]`
|
|
388
|
+
: `- ${entry.signal}`;
|
|
389
|
+
}
|
|
390
|
+
function parseProfileEntryBlock(blockLines, order) {
|
|
391
|
+
if (blockLines.length === 0) {
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
const [firstLine, ...restLines] = blockLines;
|
|
395
|
+
const firstText = firstLine.trim().replace(/^[-*]\s*/, '');
|
|
396
|
+
const inlineParsed = parseInlineProfileMetadata(firstText);
|
|
397
|
+
const signalParts = [inlineParsed.signal];
|
|
398
|
+
let updated = inlineParsed.updated;
|
|
399
|
+
let evidence = inlineParsed.evidence;
|
|
400
|
+
const extras = [...inlineParsed.extras];
|
|
401
|
+
for (const rawLine of restLines) {
|
|
402
|
+
const metadata = parseProfileMetadataLine(rawLine);
|
|
403
|
+
if (metadata) {
|
|
404
|
+
if (metadata.key === 'updated') {
|
|
405
|
+
updated = metadata.value;
|
|
406
|
+
}
|
|
407
|
+
else if (metadata.key === 'evidence') {
|
|
408
|
+
evidence = metadata.value;
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
extras.push(metadata.value);
|
|
412
|
+
}
|
|
413
|
+
continue;
|
|
414
|
+
}
|
|
415
|
+
const continuation = rawLine.trim();
|
|
416
|
+
if (continuation) {
|
|
417
|
+
signalParts.push(continuation);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
const signal = normalizeProfileSignalForRender(signalParts.join(' '));
|
|
421
|
+
if (!signal) {
|
|
422
|
+
return null;
|
|
423
|
+
}
|
|
424
|
+
return {
|
|
425
|
+
signal,
|
|
426
|
+
updated,
|
|
427
|
+
evidence,
|
|
428
|
+
extras: dedupeProfileExtras(extras),
|
|
429
|
+
topicKey: inferProfileTopicKey(signal),
|
|
430
|
+
correction: isExplicitProfileCorrection(signal),
|
|
431
|
+
order,
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
function parseProfileSectionEntries(lines) {
|
|
435
|
+
const entries = [];
|
|
436
|
+
let currentBlock = [];
|
|
437
|
+
let order = 0;
|
|
438
|
+
const flush = () => {
|
|
439
|
+
const entry = parseProfileEntryBlock(currentBlock, order++);
|
|
440
|
+
if (entry) {
|
|
441
|
+
entries.push(entry);
|
|
442
|
+
}
|
|
443
|
+
currentBlock = [];
|
|
444
|
+
};
|
|
445
|
+
for (const rawLine of lines) {
|
|
446
|
+
if (rawLine.trim() === '') {
|
|
447
|
+
flush();
|
|
448
|
+
continue;
|
|
449
|
+
}
|
|
450
|
+
if (/^[-*]\s+/.test(rawLine)) {
|
|
451
|
+
flush();
|
|
452
|
+
currentBlock = [rawLine];
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
if (currentBlock.length === 0) {
|
|
456
|
+
currentBlock = [`- ${rawLine.trim()}`];
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
currentBlock.push(rawLine);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
flush();
|
|
463
|
+
return entries;
|
|
464
|
+
}
|
|
465
|
+
function normalizeProfileSectionEntries(lines) {
|
|
466
|
+
const parsedEntries = parseProfileSectionEntries(lines);
|
|
467
|
+
const mergedEntries = [];
|
|
468
|
+
for (const entry of parsedEntries) {
|
|
469
|
+
const existingIndex = mergedEntries.findIndex((existing) => {
|
|
470
|
+
if (normalizeProfileComparisonText(existing.signal) === normalizeProfileComparisonText(entry.signal)) {
|
|
471
|
+
return true;
|
|
472
|
+
}
|
|
473
|
+
if (existing.topicKey && entry.topicKey && existing.topicKey === entry.topicKey) {
|
|
474
|
+
return areProfileSignalsSimilar(existing, entry)
|
|
475
|
+
|| isSingleValueProfileTopic(entry.topicKey)
|
|
476
|
+
|| existing.correction
|
|
477
|
+
|| entry.correction;
|
|
478
|
+
}
|
|
479
|
+
return false;
|
|
480
|
+
});
|
|
481
|
+
if (existingIndex >= 0) {
|
|
482
|
+
mergedEntries[existingIndex] = mergeProfileEntries(mergedEntries[existingIndex], entry);
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
mergedEntries.push(entry);
|
|
486
|
+
}
|
|
487
|
+
return mergedEntries;
|
|
488
|
+
}
|
|
489
|
+
function stripInlineProfileMetadata(line) {
|
|
490
|
+
return parseInlineProfileMetadata(line).signal;
|
|
491
|
+
}
|
|
492
|
+
function routeLooseProfileLine(line) {
|
|
493
|
+
const normalized = stripInlineProfileMetadata(line.trim().replace(/^[-*]\s*/, ''));
|
|
494
|
+
const lower = normalized.toLowerCase();
|
|
495
|
+
if (!normalized) {
|
|
496
|
+
return 'Stable Preferences';
|
|
497
|
+
}
|
|
498
|
+
if (/language|name|role|title|background|location|timezone|pronouns?|company/i.test(normalized)
|
|
499
|
+
|| /我叫|我是|身份|角色|语言|地区|时区/.test(normalized)) {
|
|
500
|
+
return 'Basic Info';
|
|
501
|
+
}
|
|
502
|
+
if (/communication|tone|wording|concise|verbosity|direct|polite|blunt|reply style/i.test(lower)
|
|
503
|
+
|| /沟通|语气|措辞|表达|官腔|简洁|直接|啰嗦|回复风格/.test(normalized)) {
|
|
504
|
+
return 'Communication Style';
|
|
505
|
+
}
|
|
506
|
+
if (/workflow|working|collaboration|review|iterate|testing|tests|commit|planning/i.test(lower)
|
|
507
|
+
|| /工作流|协作|反馈|迭代|测试|提测|先.*后.*|改动方式/.test(normalized)) {
|
|
508
|
+
return 'Working Style';
|
|
509
|
+
}
|
|
510
|
+
if (/hate|dislike|annoy|frustrat|trigger|cannot stand|avoid/i.test(lower)
|
|
511
|
+
|| /最烦|讨厌|反感|不满|踩雷|不能接受|很在意/.test(normalized)) {
|
|
512
|
+
return 'Decision Signals';
|
|
513
|
+
}
|
|
514
|
+
if (/goal|value|motivation|principle|care about|optimizing for/i.test(lower)
|
|
515
|
+
|| /目标|价值|动机|原则|在乎|重视/.test(normalized)) {
|
|
516
|
+
return 'Values & Motivations';
|
|
517
|
+
}
|
|
518
|
+
return 'Stable Preferences';
|
|
519
|
+
}
|
|
520
|
+
function tidySectionLines(lines) {
|
|
521
|
+
const trimmed = [...lines];
|
|
522
|
+
while (trimmed.length > 0 && trimmed[0].trim() === '') {
|
|
523
|
+
trimmed.shift();
|
|
524
|
+
}
|
|
525
|
+
while (trimmed.length > 0 && trimmed[trimmed.length - 1].trim() === '') {
|
|
526
|
+
trimmed.pop();
|
|
527
|
+
}
|
|
528
|
+
const result = [];
|
|
529
|
+
let previousWasBlank = false;
|
|
530
|
+
for (const line of trimmed) {
|
|
531
|
+
const sanitized = line.replace(/[ \t]+$/g, '');
|
|
532
|
+
const isBlank = sanitized.trim() === '';
|
|
533
|
+
if (isBlank && previousWasBlank) {
|
|
534
|
+
continue;
|
|
535
|
+
}
|
|
536
|
+
result.push(isBlank ? '' : sanitized);
|
|
537
|
+
previousWasBlank = isBlank;
|
|
538
|
+
}
|
|
539
|
+
return result;
|
|
540
|
+
}
|
|
541
|
+
function normalizeProfileNotebook(content) {
|
|
542
|
+
const normalizedContent = content.replace(/\r\n/g, '\n').trim();
|
|
543
|
+
if (!normalizedContent) {
|
|
544
|
+
return buildDefaultProfileTemplate();
|
|
545
|
+
}
|
|
546
|
+
const sectionMap = new Map();
|
|
547
|
+
for (const title of PROFILE_SECTION_ORDER) {
|
|
548
|
+
sectionMap.set(title, []);
|
|
549
|
+
}
|
|
550
|
+
sectionMap.set(PROFILE_ADDITIONAL_NOTES, []);
|
|
551
|
+
let currentSection = null;
|
|
552
|
+
for (const line of normalizedContent.split('\n')) {
|
|
553
|
+
const trimmedLine = line.trim();
|
|
554
|
+
if (/^#\s+/.test(trimmedLine)) {
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
557
|
+
const sectionMatch = trimmedLine.match(/^##\s+(.+)$/);
|
|
558
|
+
if (sectionMatch) {
|
|
559
|
+
currentSection = canonicalizeProfileSectionTitle(sectionMatch[1]) ?? PROFILE_ADDITIONAL_NOTES;
|
|
560
|
+
continue;
|
|
561
|
+
}
|
|
562
|
+
if (!trimmedLine && currentSection === null) {
|
|
563
|
+
continue;
|
|
564
|
+
}
|
|
565
|
+
const targetSection = currentSection ?? routeLooseProfileLine(line);
|
|
566
|
+
const bucket = sectionMap.get(targetSection) ?? [];
|
|
567
|
+
bucket.push(line);
|
|
568
|
+
sectionMap.set(targetSection, bucket);
|
|
569
|
+
}
|
|
570
|
+
const output = ['# User Profile', ''];
|
|
571
|
+
const normalizedSections = new Map();
|
|
572
|
+
for (const title of PROFILE_SECTION_ORDER) {
|
|
573
|
+
normalizedSections.set(title, normalizeProfileSectionEntries(sectionMap.get(title) ?? []));
|
|
574
|
+
}
|
|
575
|
+
const resolvedTopics = new Set();
|
|
576
|
+
for (const title of PROFILE_SECTION_ORDER) {
|
|
577
|
+
if (title === 'Do Not Assume / Open Questions') {
|
|
578
|
+
continue;
|
|
579
|
+
}
|
|
580
|
+
for (const entry of normalizedSections.get(title) ?? []) {
|
|
581
|
+
if (entry.topicKey) {
|
|
582
|
+
resolvedTopics.add(entry.topicKey);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
const openQuestions = normalizedSections.get('Do Not Assume / Open Questions') ?? [];
|
|
587
|
+
normalizedSections.set('Do Not Assume / Open Questions', openQuestions.filter((entry) => !entry.topicKey || !resolvedTopics.has(entry.topicKey)));
|
|
588
|
+
for (const title of PROFILE_SECTION_ORDER) {
|
|
589
|
+
output.push(`## ${title}`);
|
|
590
|
+
const sectionLines = (normalizedSections.get(title) ?? []).map((entry) => renderProfileEntry(entry));
|
|
591
|
+
if (sectionLines.length > 0) {
|
|
592
|
+
output.push(...sectionLines);
|
|
593
|
+
}
|
|
594
|
+
output.push('');
|
|
595
|
+
}
|
|
596
|
+
const additionalNotes = tidySectionLines(sectionMap.get(PROFILE_ADDITIONAL_NOTES) ?? []);
|
|
597
|
+
if (additionalNotes.length > 0) {
|
|
598
|
+
output.push(`## ${PROFILE_ADDITIONAL_NOTES}`);
|
|
599
|
+
output.push(...additionalNotes);
|
|
600
|
+
output.push('');
|
|
601
|
+
}
|
|
602
|
+
return output.join('\n').trim();
|
|
603
|
+
}
|
|
604
|
+
function normalizeNotebookContent(type, content) {
|
|
605
|
+
if (type === 'profile') {
|
|
606
|
+
return normalizeProfileNotebook(content);
|
|
607
|
+
}
|
|
608
|
+
return content;
|
|
609
|
+
}
|
|
51
610
|
// ============================================================================
|
|
52
611
|
// Default Templates
|
|
53
612
|
// ============================================================================
|
|
@@ -88,15 +647,8 @@ const DEFAULT_EXPERIENCE = `# Experience Notebook
|
|
|
88
647
|
- SelfEvolve restart kills all background Bash tasks
|
|
89
648
|
- Basic sensing capabilities should not be guarded by feature flags
|
|
90
649
|
`;
|
|
91
|
-
/** Default profile notebook —
|
|
92
|
-
const DEFAULT_PROFILE =
|
|
93
|
-
|
|
94
|
-
## Basic Info
|
|
95
|
-
- Language preference: (auto-detected)
|
|
96
|
-
|
|
97
|
-
## Communication Preferences
|
|
98
|
-
- (The AI will learn your preferences over time and update this notebook)
|
|
99
|
-
`;
|
|
650
|
+
/** Default profile notebook — structured user model */
|
|
651
|
+
const DEFAULT_PROFILE = buildDefaultProfileTemplate();
|
|
100
652
|
// ============================================================================
|
|
101
653
|
// NotebookManager
|
|
102
654
|
// ============================================================================
|
|
@@ -110,20 +662,53 @@ export class NotebookManager {
|
|
|
110
662
|
// --------------------------------------------------------------------------
|
|
111
663
|
/** 获取笔记本文件路径 */
|
|
112
664
|
getPath(type) {
|
|
113
|
-
const
|
|
114
|
-
const projectDir = path.join(
|
|
665
|
+
const storageDir = getNotebookStorageDir(this.projectPath);
|
|
666
|
+
const projectDir = path.join(storageDir, 'memory', 'projects', sanitizeProjectPath(this.projectPath));
|
|
115
667
|
switch (type) {
|
|
116
668
|
case 'profile':
|
|
117
|
-
return path.join(
|
|
669
|
+
return path.join(storageDir, 'memory', 'profile.md');
|
|
118
670
|
case 'experience':
|
|
119
|
-
return path.join(
|
|
671
|
+
return path.join(storageDir, 'memory', 'experience.md');
|
|
120
672
|
case 'project':
|
|
121
673
|
return path.join(projectDir, 'project.md');
|
|
122
674
|
case 'identity':
|
|
123
|
-
return path.join(
|
|
675
|
+
return path.join(storageDir, 'memory', 'identity.md');
|
|
676
|
+
case 'tools-notes':
|
|
677
|
+
return path.join(storageDir, 'memory', 'tools-notes.md');
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
/** 获取旧的项目级 .axon notebook 路径(用于迁移历史数据) */
|
|
681
|
+
getLegacyProjectLocalPath(type) {
|
|
682
|
+
const legacyRoot = path.join(this.projectPath, '.axon');
|
|
683
|
+
const legacyProjectDir = path.join(legacyRoot, 'memory', 'projects', sanitizeProjectPath(this.projectPath));
|
|
684
|
+
switch (type) {
|
|
685
|
+
case 'profile':
|
|
686
|
+
return path.join(legacyRoot, 'memory', 'profile.md');
|
|
687
|
+
case 'experience':
|
|
688
|
+
return path.join(legacyRoot, 'memory', 'experience.md');
|
|
689
|
+
case 'project':
|
|
690
|
+
return path.join(legacyProjectDir, 'project.md');
|
|
691
|
+
case 'identity':
|
|
692
|
+
return path.join(legacyRoot, 'memory', 'identity.md');
|
|
124
693
|
case 'tools-notes':
|
|
125
|
-
return path.join(
|
|
694
|
+
return path.join(legacyRoot, 'memory', 'tools-notes.md');
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* 迁移旧的项目级 .axon notebook。
|
|
699
|
+
* 仅在目标文件不存在时迁移,避免覆盖已有的用户级 notebook。
|
|
700
|
+
*/
|
|
701
|
+
migrateLegacyProjectLocalNotebook(type) {
|
|
702
|
+
const targetPath = this.getPath(type);
|
|
703
|
+
const legacyPath = this.getLegacyProjectLocalPath(type);
|
|
704
|
+
if (path.resolve(targetPath) === path.resolve(legacyPath)) {
|
|
705
|
+
return;
|
|
126
706
|
}
|
|
707
|
+
if (fs.existsSync(targetPath) || !fs.existsSync(legacyPath)) {
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
ensureDir(path.dirname(targetPath));
|
|
711
|
+
fs.copyFileSync(legacyPath, targetPath);
|
|
127
712
|
}
|
|
128
713
|
// --------------------------------------------------------------------------
|
|
129
714
|
// 读写操作
|
|
@@ -132,20 +717,33 @@ export class NotebookManager {
|
|
|
132
717
|
read(type) {
|
|
133
718
|
const filePath = this.getPath(type);
|
|
134
719
|
try {
|
|
720
|
+
this.migrateLegacyProjectLocalNotebook(type);
|
|
135
721
|
if (fs.existsSync(filePath)) {
|
|
136
|
-
|
|
722
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
723
|
+
const normalized = normalizeNotebookContent(type, content);
|
|
724
|
+
if (normalized !== content) {
|
|
725
|
+
try {
|
|
726
|
+
ensureDir(path.dirname(filePath));
|
|
727
|
+
fs.writeFileSync(filePath, normalized, 'utf-8');
|
|
728
|
+
}
|
|
729
|
+
catch {
|
|
730
|
+
// 归一化写回失败时,至少返回归一化后的内容给调用方
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
return normalized;
|
|
137
734
|
}
|
|
138
735
|
// Auto-initialize: try bundled default-memory/ first, then fallback to hardcoded template
|
|
139
736
|
const defaultContent = this.getBundledOrDefault(type);
|
|
140
737
|
if (defaultContent) {
|
|
738
|
+
const normalizedDefault = normalizeNotebookContent(type, defaultContent);
|
|
141
739
|
try {
|
|
142
740
|
ensureDir(path.dirname(filePath));
|
|
143
|
-
fs.writeFileSync(filePath,
|
|
144
|
-
return
|
|
741
|
+
fs.writeFileSync(filePath, normalizedDefault, 'utf-8');
|
|
742
|
+
return normalizedDefault;
|
|
145
743
|
}
|
|
146
744
|
catch {
|
|
147
745
|
// Non-fatal: return the template content even if file write fails
|
|
148
|
-
return
|
|
746
|
+
return normalizedDefault;
|
|
149
747
|
}
|
|
150
748
|
}
|
|
151
749
|
}
|
|
@@ -182,7 +780,9 @@ export class NotebookManager {
|
|
|
182
780
|
write(type, content) {
|
|
183
781
|
const filePath = this.getPath(type);
|
|
184
782
|
const maxTokens = MAX_TOKENS[type];
|
|
185
|
-
const
|
|
783
|
+
const normalizedContent = normalizeNotebookContent(type, content);
|
|
784
|
+
const tokens = estimateTokens(normalizedContent);
|
|
785
|
+
this.migrateLegacyProjectLocalNotebook(type);
|
|
186
786
|
if (tokens > maxTokens) {
|
|
187
787
|
return {
|
|
188
788
|
success: false,
|
|
@@ -195,7 +795,7 @@ export class NotebookManager {
|
|
|
195
795
|
ensureDir(path.dirname(filePath));
|
|
196
796
|
// 原子写入:先写临时文件再 rename,防止进程崩溃导致文件损坏
|
|
197
797
|
const tmpPath = filePath + '.tmp';
|
|
198
|
-
fs.writeFileSync(tmpPath,
|
|
798
|
+
fs.writeFileSync(tmpPath, normalizedContent, 'utf-8');
|
|
199
799
|
fs.renameSync(tmpPath, filePath);
|
|
200
800
|
return { success: true, tokens, path: filePath };
|
|
201
801
|
}
|