@creatoria/miniapp-mcp 0.1.3 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -66
- package/dist/app/cli/index.d.ts +6 -0
- package/dist/app/cli/index.d.ts.map +1 -0
- package/dist/app/cli/index.js +6 -0
- package/dist/app/cli/index.js.map +1 -0
- package/dist/app/index.d.ts +6 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/index.js +6 -0
- package/dist/app/index.js.map +1 -0
- package/dist/app/server/index.d.ts +7 -0
- package/dist/app/server/index.d.ts.map +1 -0
- package/dist/app/server/index.js +6 -0
- package/dist/app/server/index.js.map +1 -0
- package/dist/capabilities/assert/handlers/assert-handlers.d.ts +98 -0
- package/dist/capabilities/assert/handlers/assert-handlers.d.ts.map +1 -0
- package/dist/capabilities/assert/handlers/assert-handlers.js +179 -0
- package/dist/capabilities/assert/handlers/assert-handlers.js.map +1 -0
- package/dist/capabilities/assert/handlers/index.d.ts +7 -0
- package/dist/capabilities/assert/handlers/index.d.ts.map +1 -0
- package/dist/capabilities/assert/handlers/index.js +7 -0
- package/dist/capabilities/assert/handlers/index.js.map +1 -0
- package/dist/capabilities/assert/index.d.ts +15 -0
- package/dist/capabilities/assert/index.d.ts.map +1 -0
- package/dist/capabilities/assert/index.js +90 -0
- package/dist/capabilities/assert/index.js.map +1 -0
- package/dist/capabilities/assert/schemas/index.d.ts +101 -0
- package/dist/capabilities/assert/schemas/index.d.ts.map +1 -0
- package/dist/capabilities/assert/schemas/index.js +62 -0
- package/dist/capabilities/assert/schemas/index.js.map +1 -0
- package/dist/capabilities/automator/handlers/close.d.ts +18 -0
- package/dist/capabilities/automator/handlers/close.d.ts.map +1 -0
- package/dist/capabilities/automator/handlers/close.js +45 -0
- package/dist/capabilities/automator/handlers/close.js.map +1 -0
- package/dist/capabilities/automator/handlers/connect.d.ts +24 -0
- package/dist/capabilities/automator/handlers/connect.d.ts.map +1 -0
- package/dist/capabilities/automator/handlers/connect.js +51 -0
- package/dist/capabilities/automator/handlers/connect.js.map +1 -0
- package/dist/capabilities/automator/handlers/disconnect.d.ts +16 -0
- package/dist/capabilities/automator/handlers/disconnect.d.ts.map +1 -0
- package/dist/capabilities/automator/handlers/disconnect.js +44 -0
- package/dist/capabilities/automator/handlers/disconnect.js.map +1 -0
- package/dist/capabilities/automator/handlers/index.d.ts +8 -0
- package/dist/capabilities/automator/handlers/index.d.ts.map +1 -0
- package/dist/capabilities/automator/handlers/index.js +8 -0
- package/dist/capabilities/automator/handlers/index.js.map +1 -0
- package/dist/capabilities/automator/handlers/launch.d.ts +25 -0
- package/dist/capabilities/automator/handlers/launch.d.ts.map +1 -0
- package/dist/capabilities/automator/handlers/launch.js +61 -0
- package/dist/capabilities/automator/handlers/launch.js.map +1 -0
- package/dist/capabilities/automator/index.d.ts +15 -0
- package/dist/capabilities/automator/index.d.ts.map +1 -0
- package/dist/capabilities/automator/index.js +55 -0
- package/dist/capabilities/automator/index.js.map +1 -0
- package/dist/capabilities/automator/schemas/close.d.ts +5 -0
- package/dist/capabilities/automator/schemas/close.d.ts.map +1 -0
- package/dist/capabilities/automator/schemas/close.js +11 -0
- package/dist/capabilities/automator/schemas/close.js.map +1 -0
- package/dist/capabilities/automator/schemas/connect.d.ts +11 -0
- package/dist/capabilities/automator/schemas/connect.d.ts.map +1 -0
- package/dist/capabilities/automator/schemas/connect.js +19 -0
- package/dist/capabilities/automator/schemas/connect.js.map +1 -0
- package/dist/capabilities/automator/schemas/disconnect.d.ts +5 -0
- package/dist/capabilities/automator/schemas/disconnect.d.ts.map +1 -0
- package/dist/capabilities/automator/schemas/disconnect.js +11 -0
- package/dist/capabilities/automator/schemas/disconnect.js.map +1 -0
- package/dist/capabilities/automator/schemas/index.d.ts +9 -0
- package/dist/capabilities/automator/schemas/index.d.ts.map +1 -0
- package/dist/capabilities/automator/schemas/index.js +14 -0
- package/dist/capabilities/automator/schemas/index.js.map +1 -0
- package/dist/capabilities/automator/schemas/launch.d.ts +17 -0
- package/dist/capabilities/automator/schemas/launch.d.ts.map +1 -0
- package/dist/capabilities/automator/schemas/launch.js +26 -0
- package/dist/capabilities/automator/schemas/launch.js.map +1 -0
- package/dist/capabilities/element/handlers/element-handlers.d.ts +212 -0
- package/dist/capabilities/element/handlers/element-handlers.d.ts.map +1 -0
- package/dist/capabilities/element/handlers/element-handlers.js +383 -0
- package/dist/capabilities/element/handlers/element-handlers.js.map +1 -0
- package/dist/capabilities/element/handlers/index.d.ts +7 -0
- package/dist/capabilities/element/handlers/index.d.ts.map +1 -0
- package/dist/capabilities/element/handlers/index.js +27 -0
- package/dist/capabilities/element/handlers/index.js.map +1 -0
- package/dist/capabilities/element/index.d.ts +20 -0
- package/dist/capabilities/element/index.d.ts.map +1 -0
- package/dist/capabilities/element/index.js +199 -0
- package/dist/capabilities/element/index.js.map +1 -0
- package/dist/capabilities/element/schemas/index.d.ts +325 -0
- package/dist/capabilities/element/schemas/index.d.ts.map +1 -0
- package/dist/capabilities/element/schemas/index.js +168 -0
- package/dist/capabilities/element/schemas/index.js.map +1 -0
- package/dist/capabilities/index.d.ts +34 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +40 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/loader.d.ts +61 -0
- package/dist/capabilities/loader.d.ts.map +1 -0
- package/dist/capabilities/loader.js +164 -0
- package/dist/capabilities/loader.js.map +1 -0
- package/dist/capabilities/miniprogram/handlers/call-wx.d.ts +24 -0
- package/dist/capabilities/miniprogram/handlers/call-wx.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/handlers/call-wx.js +37 -0
- package/dist/capabilities/miniprogram/handlers/call-wx.js.map +1 -0
- package/dist/capabilities/miniprogram/handlers/evaluate.d.ts +32 -0
- package/dist/capabilities/miniprogram/handlers/evaluate.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/handlers/evaluate.js +51 -0
- package/dist/capabilities/miniprogram/handlers/evaluate.js.map +1 -0
- package/dist/capabilities/miniprogram/handlers/index.d.ts +12 -0
- package/dist/capabilities/miniprogram/handlers/index.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/handlers/index.js +12 -0
- package/dist/capabilities/miniprogram/handlers/index.js.map +1 -0
- package/dist/capabilities/miniprogram/handlers/navigate.d.ts +26 -0
- package/dist/capabilities/miniprogram/handlers/navigate.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/handlers/navigate.js +56 -0
- package/dist/capabilities/miniprogram/handlers/navigate.js.map +1 -0
- package/dist/capabilities/miniprogram/handlers/page-stack.d.ts +20 -0
- package/dist/capabilities/miniprogram/handlers/page-stack.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/handlers/page-stack.js +37 -0
- package/dist/capabilities/miniprogram/handlers/page-stack.js.map +1 -0
- package/dist/capabilities/miniprogram/handlers/screenshot.d.ts +33 -0
- package/dist/capabilities/miniprogram/handlers/screenshot.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/handlers/screenshot.js +132 -0
- package/dist/capabilities/miniprogram/handlers/screenshot.js.map +1 -0
- package/dist/capabilities/miniprogram/handlers/system-info.d.ts +17 -0
- package/dist/capabilities/miniprogram/handlers/system-info.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/handlers/system-info.js +31 -0
- package/dist/capabilities/miniprogram/handlers/system-info.js.map +1 -0
- package/dist/capabilities/miniprogram/index.d.ts +15 -0
- package/dist/capabilities/miniprogram/index.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/index.js +69 -0
- package/dist/capabilities/miniprogram/index.js.map +1 -0
- package/dist/capabilities/miniprogram/schemas/call-wx.d.ts +15 -0
- package/dist/capabilities/miniprogram/schemas/call-wx.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/schemas/call-wx.js +11 -0
- package/dist/capabilities/miniprogram/schemas/call-wx.js.map +1 -0
- package/dist/capabilities/miniprogram/schemas/evaluate.d.ts +15 -0
- package/dist/capabilities/miniprogram/schemas/evaluate.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/schemas/evaluate.js +11 -0
- package/dist/capabilities/miniprogram/schemas/evaluate.js.map +1 -0
- package/dist/capabilities/miniprogram/schemas/index.d.ts +10 -0
- package/dist/capabilities/miniprogram/schemas/index.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/schemas/index.js +10 -0
- package/dist/capabilities/miniprogram/schemas/index.js.map +1 -0
- package/dist/capabilities/miniprogram/schemas/navigate.d.ts +18 -0
- package/dist/capabilities/miniprogram/schemas/navigate.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/schemas/navigate.js +22 -0
- package/dist/capabilities/miniprogram/schemas/navigate.js.map +1 -0
- package/dist/capabilities/miniprogram/schemas/page-stack.d.ts +6 -0
- package/dist/capabilities/miniprogram/schemas/page-stack.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/schemas/page-stack.js +6 -0
- package/dist/capabilities/miniprogram/schemas/page-stack.js.map +1 -0
- package/dist/capabilities/miniprogram/schemas/screenshot.d.ts +18 -0
- package/dist/capabilities/miniprogram/schemas/screenshot.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/schemas/screenshot.js +21 -0
- package/dist/capabilities/miniprogram/schemas/screenshot.js.map +1 -0
- package/dist/capabilities/miniprogram/schemas/system-info.d.ts +6 -0
- package/dist/capabilities/miniprogram/schemas/system-info.d.ts.map +1 -0
- package/dist/capabilities/miniprogram/schemas/system-info.js +6 -0
- package/dist/capabilities/miniprogram/schemas/system-info.js.map +1 -0
- package/dist/capabilities/network/handlers/index.d.ts +7 -0
- package/dist/capabilities/network/handlers/index.d.ts.map +1 -0
- package/dist/capabilities/network/handlers/index.js +7 -0
- package/dist/capabilities/network/handlers/index.js.map +1 -0
- package/dist/capabilities/network/handlers/network-handlers.d.ts +53 -0
- package/dist/capabilities/network/handlers/network-handlers.d.ts.map +1 -0
- package/dist/capabilities/network/handlers/network-handlers.js +127 -0
- package/dist/capabilities/network/handlers/network-handlers.js.map +1 -0
- package/dist/capabilities/network/index.d.ts +15 -0
- package/dist/capabilities/network/index.d.ts.map +1 -0
- package/dist/capabilities/network/index.js +69 -0
- package/dist/capabilities/network/index.js.map +1 -0
- package/dist/capabilities/network/schemas/index.d.ts +53 -0
- package/dist/capabilities/network/schemas/index.d.ts.map +1 -0
- package/dist/capabilities/network/schemas/index.js +33 -0
- package/dist/capabilities/network/schemas/index.js.map +1 -0
- package/dist/capabilities/page/handlers/index.d.ts +7 -0
- package/dist/capabilities/page/handlers/index.d.ts.map +1 -0
- package/dist/capabilities/page/handlers/index.js +7 -0
- package/dist/capabilities/page/handlers/index.js.map +1 -0
- package/dist/capabilities/page/handlers/page-handlers.d.ts +165 -0
- package/dist/capabilities/page/handlers/page-handlers.d.ts.map +1 -0
- package/dist/capabilities/page/handlers/page-handlers.js +258 -0
- package/dist/capabilities/page/handlers/page-handlers.js.map +1 -0
- package/dist/capabilities/page/index.d.ts +15 -0
- package/dist/capabilities/page/index.d.ts.map +1 -0
- package/dist/capabilities/page/index.js +83 -0
- package/dist/capabilities/page/index.js.map +1 -0
- package/dist/capabilities/page/schemas/index.d.ts +91 -0
- package/dist/capabilities/page/schemas/index.d.ts.map +1 -0
- package/dist/capabilities/page/schemas/index.js +55 -0
- package/dist/capabilities/page/schemas/index.js.map +1 -0
- package/dist/capabilities/record/handlers/index.d.ts +7 -0
- package/dist/capabilities/record/handlers/index.d.ts.map +1 -0
- package/dist/capabilities/record/handlers/index.js +7 -0
- package/dist/capabilities/record/handlers/index.js.map +1 -0
- package/dist/capabilities/record/handlers/record-handlers.d.ts +76 -0
- package/dist/capabilities/record/handlers/record-handlers.d.ts.map +1 -0
- package/dist/capabilities/record/handlers/record-handlers.js +255 -0
- package/dist/capabilities/record/handlers/record-handlers.js.map +1 -0
- package/dist/capabilities/record/index.d.ts +15 -0
- package/dist/capabilities/record/index.d.ts.map +1 -0
- package/dist/capabilities/record/index.js +69 -0
- package/dist/capabilities/record/index.js.map +1 -0
- package/dist/capabilities/record/schemas/index.d.ts +47 -0
- package/dist/capabilities/record/schemas/index.d.ts.map +1 -0
- package/dist/capabilities/record/schemas/index.js +33 -0
- package/dist/capabilities/record/schemas/index.js.map +1 -0
- package/dist/capabilities/registry.d.ts +138 -0
- package/dist/capabilities/registry.d.ts.map +1 -0
- package/dist/capabilities/registry.js +261 -0
- package/dist/capabilities/registry.js.map +1 -0
- package/dist/capabilities/schema-registry.d.ts +4 -0
- package/dist/capabilities/schema-registry.d.ts.map +1 -0
- package/dist/capabilities/schema-registry.js +18 -0
- package/dist/capabilities/schema-registry.js.map +1 -0
- package/dist/capabilities/schema-types.d.ts +22 -0
- package/dist/capabilities/schema-types.d.ts.map +1 -0
- package/dist/capabilities/schema-types.js +2 -0
- package/dist/capabilities/schema-types.js.map +1 -0
- package/dist/capabilities/snapshot/handlers/index.d.ts +7 -0
- package/dist/capabilities/snapshot/handlers/index.d.ts.map +1 -0
- package/dist/capabilities/snapshot/handlers/index.js +7 -0
- package/dist/capabilities/snapshot/handlers/index.js.map +1 -0
- package/dist/capabilities/snapshot/handlers/snapshot-handlers.d.ts +75 -0
- package/dist/capabilities/snapshot/handlers/snapshot-handlers.d.ts.map +1 -0
- package/dist/capabilities/snapshot/handlers/snapshot-handlers.js +201 -0
- package/dist/capabilities/snapshot/handlers/snapshot-handlers.js.map +1 -0
- package/dist/capabilities/snapshot/index.d.ts +15 -0
- package/dist/capabilities/snapshot/index.d.ts.map +1 -0
- package/dist/capabilities/snapshot/index.js +48 -0
- package/dist/capabilities/snapshot/index.js.map +1 -0
- package/dist/capabilities/snapshot/schemas/index.d.ts +47 -0
- package/dist/capabilities/snapshot/schemas/index.d.ts.map +1 -0
- package/dist/capabilities/snapshot/schemas/index.js +28 -0
- package/dist/capabilities/snapshot/schemas/index.js.map +1 -0
- package/dist/config/loader.js +1 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/core/element-ref.d.ts +1 -43
- package/dist/core/element-ref.d.ts.map +1 -1
- package/dist/core/element-ref.js +1 -212
- package/dist/core/element-ref.js.map +1 -1
- package/dist/core/logger.d.ts +1 -54
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +1 -377
- package/dist/core/logger.js.map +1 -1
- package/dist/core/output.d.ts +1 -20
- package/dist/core/output.d.ts.map +1 -1
- package/dist/core/output.js +1 -55
- package/dist/core/output.js.map +1 -1
- package/dist/core/report-generator.d.ts +1 -23
- package/dist/core/report-generator.d.ts.map +1 -1
- package/dist/core/report-generator.js +1 -211
- package/dist/core/report-generator.js.map +1 -1
- package/dist/core/session.d.ts +2 -82
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +2 -305
- package/dist/core/session.js.map +1 -1
- package/dist/core/timeout.d.ts +1 -48
- package/dist/core/timeout.d.ts.map +1 -1
- package/dist/core/timeout.js +1 -66
- package/dist/core/timeout.js.map +1 -1
- package/dist/core/tool-logger.d.ts +1 -82
- package/dist/core/tool-logger.d.ts.map +1 -1
- package/dist/core/tool-logger.js +1 -452
- package/dist/core/tool-logger.js.map +1 -1
- package/dist/core/validation.d.ts +1 -38
- package/dist/core/validation.d.ts.map +1 -1
- package/dist/core/validation.js +1 -92
- package/dist/core/validation.js.map +1 -1
- package/dist/runtime/element/element-ref.d.ts +44 -0
- package/dist/runtime/element/element-ref.d.ts.map +1 -0
- package/dist/runtime/element/element-ref.js +214 -0
- package/dist/runtime/element/element-ref.js.map +1 -0
- package/dist/runtime/element/index.d.ts +2 -0
- package/dist/runtime/element/index.d.ts.map +1 -0
- package/dist/runtime/element/index.js +2 -0
- package/dist/runtime/element/index.js.map +1 -0
- package/dist/runtime/index.d.ts +11 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +11 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/logging/index.d.ts +3 -0
- package/dist/runtime/logging/index.d.ts.map +1 -0
- package/dist/runtime/logging/index.js +3 -0
- package/dist/runtime/logging/index.js.map +1 -0
- package/dist/runtime/logging/logger.d.ts +55 -0
- package/dist/runtime/logging/logger.d.ts.map +1 -0
- package/dist/runtime/logging/logger.js +379 -0
- package/dist/runtime/logging/logger.js.map +1 -0
- package/dist/runtime/logging/tool-logger.d.ts +83 -0
- package/dist/runtime/logging/tool-logger.d.ts.map +1 -0
- package/dist/runtime/logging/tool-logger.js +454 -0
- package/dist/runtime/logging/tool-logger.js.map +1 -0
- package/dist/runtime/outputs/index.d.ts +3 -0
- package/dist/runtime/outputs/index.d.ts.map +1 -0
- package/dist/runtime/outputs/index.js +3 -0
- package/dist/runtime/outputs/index.js.map +1 -0
- package/dist/runtime/outputs/output-manager.d.ts +12 -0
- package/dist/runtime/outputs/output-manager.d.ts.map +1 -0
- package/dist/runtime/outputs/output-manager.js +39 -0
- package/dist/runtime/outputs/output-manager.js.map +1 -0
- package/dist/runtime/outputs/report-generator.d.ts +5 -0
- package/dist/runtime/outputs/report-generator.d.ts.map +1 -0
- package/dist/runtime/outputs/report-generator.js +175 -0
- package/dist/runtime/outputs/report-generator.js.map +1 -0
- package/dist/runtime/retry/index.d.ts +5 -0
- package/dist/runtime/retry/index.d.ts.map +1 -0
- package/dist/runtime/retry/index.js +5 -0
- package/dist/runtime/retry/index.js.map +1 -0
- package/dist/runtime/retry/retry.d.ts +61 -0
- package/dist/runtime/retry/retry.d.ts.map +1 -0
- package/dist/runtime/retry/retry.js +90 -0
- package/dist/runtime/retry/retry.js.map +1 -0
- package/dist/runtime/session/index.d.ts +3 -0
- package/dist/runtime/session/index.d.ts.map +1 -0
- package/dist/runtime/session/index.js +3 -0
- package/dist/runtime/session/index.js.map +1 -0
- package/dist/runtime/session/store.d.ts +28 -0
- package/dist/runtime/session/store.d.ts.map +1 -0
- package/dist/runtime/session/store.js +154 -0
- package/dist/runtime/session/store.js.map +1 -0
- package/dist/runtime/session/utils/cleanup.d.ts +3 -0
- package/dist/runtime/session/utils/cleanup.d.ts.map +1 -0
- package/dist/runtime/session/utils/cleanup.js +78 -0
- package/dist/runtime/session/utils/cleanup.js.map +1 -0
- package/dist/runtime/timeout/index.d.ts +2 -0
- package/dist/runtime/timeout/index.d.ts.map +1 -0
- package/dist/runtime/timeout/index.js +2 -0
- package/dist/runtime/timeout/index.js.map +1 -0
- package/dist/runtime/timeout/timeout.d.ts +59 -0
- package/dist/runtime/timeout/timeout.d.ts.map +1 -0
- package/dist/runtime/timeout/timeout.js +77 -0
- package/dist/runtime/timeout/timeout.js.map +1 -0
- package/dist/runtime/validation/index.d.ts +2 -0
- package/dist/runtime/validation/index.d.ts.map +1 -0
- package/dist/runtime/validation/index.js +2 -0
- package/dist/runtime/validation/index.js.map +1 -0
- package/dist/runtime/validation/validation.d.ts +39 -0
- package/dist/runtime/validation/validation.d.ts.map +1 -0
- package/dist/runtime/validation/validation.js +93 -0
- package/dist/runtime/validation/validation.js.map +1 -0
- package/dist/schemas/automator/miniprogram_close.json +12 -0
- package/dist/schemas/automator/miniprogram_connect.json +19 -0
- package/dist/schemas/automator/miniprogram_disconnect.json +12 -0
- package/dist/schemas/automator/miniprogram_launch.json +30 -0
- package/dist/server.js +5 -5
- package/dist/server.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +8 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/miniprogram.d.ts +11 -2
- package/dist/tools/miniprogram.d.ts.map +1 -1
- package/dist/tools/miniprogram.js +111 -41
- package/dist/tools/miniprogram.js.map +1 -1
- package/dist/tools/page.js +2 -2
- package/dist/tools/page.js.map +1 -1
- package/docs/current/01-architecture-migration.md +337 -0
- package/docs/current/02-screenshot-timeout-fix.md +589 -0
- package/docs/current/README.md +226 -0
- package/docs/directory-structure-and-code-style-best-practices.md +91 -0
- package/docs/migration/README.md +34 -0
- package/docs/migration/TC-ALIGN-01-notes.md +35 -0
- package/docs/migration/runtime-skeleton.md +50 -0
- package/docs/migration/tool-schema-strategy.md +75 -0
- package/docs//345/256/214/346/225/264/345/256/236/347/216/260/346/226/271/346/241/210.md +14 -14
- package/docs//347/254/254/344/270/200/347/211/210/346/234/254/346/226/271/346/241/210.md +7 -7
- package/package.json +4 -2
- package/docs/SIMPLE_USAGE.md +0 -210
- package/docs/architecture.E-Docs.md +0 -1359
- package/docs/architecture.F1.md +0 -720
- package/docs/architecture.F2.md +0 -871
- package/docs/architecture.F3.md +0 -905
- package/docs/architecture.md +0 -90
- package/docs/charter.A1.align.yaml +0 -170
- package/docs/charter.A2.align.yaml +0 -199
- package/docs/charter.A3.align.yaml +0 -242
- package/docs/charter.A4.align.yaml +0 -227
- package/docs/charter.B1.align.yaml +0 -179
- package/docs/charter.B2.align.yaml +0 -200
- package/docs/charter.B3.align.yaml +0 -200
- package/docs/charter.B4.align.yaml +0 -188
- package/docs/charter.C1.align.yaml +0 -190
- package/docs/charter.C2.align.yaml +0 -202
- package/docs/charter.C3.align.yaml +0 -211
- package/docs/charter.C4.align.yaml +0 -263
- package/docs/charter.C5.align.yaml +0 -220
- package/docs/charter.D1.align.yaml +0 -190
- package/docs/charter.D2.align.yaml +0 -234
- package/docs/charter.D3.align.yaml +0 -206
- package/docs/charter.E-Docs.align.yaml +0 -294
- package/docs/charter.F1.align.yaml +0 -193
- package/docs/charter.F2.align.yaml +0 -248
- package/docs/charter.F3.align.yaml +0 -287
- package/docs/charter.G.align.yaml +0 -174
- package/docs/charter.align.yaml +0 -111
- package/docs/maintenance.md +0 -682
- package/docs/playwright-mcp/350/260/203/347/240/224.md +0 -53
- package/docs/setup-guide.md +0 -775
- package/docs/tasks.A1.atomize.md +0 -296
- package/docs/tasks.A2.atomize.md +0 -408
- package/docs/tasks.A3.atomize.md +0 -564
- package/docs/tasks.A4.atomize.md +0 -496
- package/docs/tasks.B1.atomize.md +0 -352
- package/docs/tasks.B2.atomize.md +0 -561
- package/docs/tasks.B3.atomize.md +0 -508
- package/docs/tasks.B4.atomize.md +0 -504
- package/docs/tasks.C1.atomize.md +0 -540
- package/docs/tasks.C2.atomize.md +0 -665
- package/docs/tasks.C3.atomize.md +0 -745
- package/docs/tasks.C4.atomize.md +0 -908
- package/docs/tasks.C5.atomize.md +0 -755
- package/docs/tasks.D1.atomize.md +0 -547
- package/docs/tasks.D2.atomize.md +0 -619
- package/docs/tasks.D3.atomize.md +0 -790
- package/docs/tasks.E-Docs.atomize.md +0 -1204
- package/docs/tasks.atomize.md +0 -189
package/docs/tasks.A3.atomize.md
DELETED
|
@@ -1,564 +0,0 @@
|
|
|
1
|
-
# Task Cards: A3 - 建立基础目录结构与 TypeScript 工程
|
|
2
|
-
# Parent Task: TASK-2025-001-A3
|
|
3
|
-
# Stage: Atomize (原子化阶段)
|
|
4
|
-
# Status: RETROSPECTIVE (追溯补齐)
|
|
5
|
-
# Created: 2025-10-02 (追溯)
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Overview (概览)
|
|
10
|
-
|
|
11
|
-
本文档包含 A3 任务的原子化拆解,将"建立基础目录结构与 TypeScript 工程"拆分为 4 个可独立执行的子任务。每个任务估算时间为 10-20 分钟,总计约 60 分钟,符合 Atomize 原则(1-3 小时颗粒度)。
|
|
12
|
-
|
|
13
|
-
**注**: 本文档为追溯性创建,基于已完成的实际产物(目录结构 + 配置文件)进行反推。
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Task Card 1: 创建目录结构
|
|
18
|
-
|
|
19
|
-
### Metadata (元数据)
|
|
20
|
-
|
|
21
|
-
```yaml
|
|
22
|
-
TaskID: TASK-2025-001-A3-1
|
|
23
|
-
Title: 创建 src/, docs/, tests/, examples/ 目录结构
|
|
24
|
-
Priority: HIGH
|
|
25
|
-
Status: ✅ COMPLETED (Retrospective)
|
|
26
|
-
Owner: ClaudeCode
|
|
27
|
-
Estimate: 15 分钟
|
|
28
|
-
Actual: ~15 分钟
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Context (上下文)
|
|
32
|
-
|
|
33
|
-
**Why (为什么)**:
|
|
34
|
-
- 清晰的目录结构是项目组织的基础
|
|
35
|
-
- 分离源代码、测试、文档、示例便于维护和协作
|
|
36
|
-
- 符合 TypeScript 项目最佳实践
|
|
37
|
-
|
|
38
|
-
**Input (输入)**:
|
|
39
|
-
- 项目根目录
|
|
40
|
-
- TypeScript 项目标准结构规范
|
|
41
|
-
- MCP Server 项目特定需求(工具、核心模块等)
|
|
42
|
-
|
|
43
|
-
**Output (输出)**:
|
|
44
|
-
- `src/` 目录及子目录(tools/, core/, config/)
|
|
45
|
-
- `docs/` 目录
|
|
46
|
-
- `tests/` 目录及子目录(unit/, integration/)
|
|
47
|
-
- `examples/` 目录及子目录(scripts/, config/)
|
|
48
|
-
|
|
49
|
-
### Implementation (实施)
|
|
50
|
-
|
|
51
|
-
**Steps (步骤)**:
|
|
52
|
-
1. 创建 `src/` 源代码目录
|
|
53
|
-
- 创建 `src/tools/` - MCP 工具实现
|
|
54
|
-
- 创建 `src/core/` - 核心功能模块
|
|
55
|
-
- 创建 `src/config/` - 配置管理
|
|
56
|
-
2. 创建 `docs/` 文档目录
|
|
57
|
-
- 用于存放任务卡、指南、API 文档等
|
|
58
|
-
3. 创建 `tests/` 测试目录
|
|
59
|
-
- 创建 `tests/unit/` - 单元测试
|
|
60
|
-
- 创建 `tests/integration/` - 集成测试
|
|
61
|
-
4. 创建 `examples/` 示例目录
|
|
62
|
-
- 创建 `examples/scripts/` - 示例脚本
|
|
63
|
-
- 创建 `examples/config/` - 示例配置
|
|
64
|
-
|
|
65
|
-
**Actual Implementation (实际实现)**:
|
|
66
|
-
```bash
|
|
67
|
-
mkdir -p src/{tools,core,config}
|
|
68
|
-
mkdir -p docs
|
|
69
|
-
mkdir -p tests/{unit,integration}
|
|
70
|
-
mkdir -p examples/{scripts,config}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**Directory Structure**:
|
|
74
|
-
```
|
|
75
|
-
.
|
|
76
|
-
├── src/
|
|
77
|
-
│ ├── tools/ # MCP 工具实现
|
|
78
|
-
│ ├── core/ # 核心模块(logger, session, etc.)
|
|
79
|
-
│ └── config/ # 配置管理
|
|
80
|
-
├── docs/ # 文档(任务卡、指南等)
|
|
81
|
-
├── tests/
|
|
82
|
-
│ ├── unit/ # 单元测试
|
|
83
|
-
│ └── integration/ # 集成测试
|
|
84
|
-
└── examples/
|
|
85
|
-
├── scripts/ # 示例脚本
|
|
86
|
-
└── config/ # 示例配置
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Acceptance Criteria (验收标准 / DoD)
|
|
90
|
-
|
|
91
|
-
- [x] `src/` 目录存在
|
|
92
|
-
- [x] `src/tools/` 子目录存在
|
|
93
|
-
- [x] `src/core/` 子目录存在
|
|
94
|
-
- [x] `src/config/` 子目录存在
|
|
95
|
-
- [x] `docs/` 目录存在
|
|
96
|
-
- [x] `tests/` 目录存在
|
|
97
|
-
- [x] `tests/unit/` 子目录存在
|
|
98
|
-
- [x] `tests/integration/` 子目录存在
|
|
99
|
-
- [x] `examples/` 目录存在
|
|
100
|
-
- [x] `examples/scripts/` 子目录存在
|
|
101
|
-
- [x] `examples/config/` 子目录存在
|
|
102
|
-
|
|
103
|
-
### Risks (风险)
|
|
104
|
-
|
|
105
|
-
- ⚠️ **目录结构调整成本**
|
|
106
|
-
- 缓解: 遵循标准 TypeScript 项目结构,减少后期调整
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## Task Card 2: 配置 TypeScript 工程
|
|
111
|
-
|
|
112
|
-
### Metadata (元数据)
|
|
113
|
-
|
|
114
|
-
```yaml
|
|
115
|
-
TaskID: TASK-2025-001-A3-2
|
|
116
|
-
Title: 配置 tsconfig.json 和 package.json TypeScript 依赖
|
|
117
|
-
Priority: HIGH
|
|
118
|
-
Status: ✅ COMPLETED (Retrospective)
|
|
119
|
-
Owner: ClaudeCode
|
|
120
|
-
Estimate: 20 分钟
|
|
121
|
-
Actual: ~20 分钟
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Context (上下文)
|
|
125
|
-
|
|
126
|
-
**Why (为什么)**:
|
|
127
|
-
- TypeScript 提供类型安全,减少运行时错误
|
|
128
|
-
- 声明文件生成支持其他项目引用
|
|
129
|
-
- 严格模式和 ESNext 特性提高代码质量
|
|
130
|
-
|
|
131
|
-
**Input (输入)**:
|
|
132
|
-
- TypeScript 编译器版本要求(5.5.2)
|
|
133
|
-
- Node.js 版本要求(18.0.0+,支持 ESNext)
|
|
134
|
-
- MCP SDK 模块系统要求(ESM)
|
|
135
|
-
- 类型定义需求(@types/node, @types/jest)
|
|
136
|
-
|
|
137
|
-
**Output (输出)**:
|
|
138
|
-
- `tsconfig.json` (27 行)
|
|
139
|
-
- `package.json` 更新(TypeScript 依赖和脚本)
|
|
140
|
-
|
|
141
|
-
### Implementation (实施)
|
|
142
|
-
|
|
143
|
-
**Steps (步骤)**:
|
|
144
|
-
|
|
145
|
-
1. 创建 `tsconfig.json` 配置文件
|
|
146
|
-
- 设置 target: "ESNext"(Node.js 18+ 支持)
|
|
147
|
-
- 设置 module: "ESNext"(ES Modules)
|
|
148
|
-
- 启用严格模式(strict: true)
|
|
149
|
-
- 配置输入输出目录(rootDir: "./src", outDir: "./dist")
|
|
150
|
-
- 启用声明文件生成(declaration: true, declarationMap: true)
|
|
151
|
-
- 启用 Source Map(sourceMap: true)
|
|
152
|
-
- 配置 Path 别名(@/* → src/*)
|
|
153
|
-
- 排除测试目录(exclude: ["tests"])
|
|
154
|
-
|
|
155
|
-
2. 更新 `package.json`
|
|
156
|
-
- 添加 TypeScript 依赖(devDependencies)
|
|
157
|
-
- 添加类型定义依赖(@types/node, @types/jest)
|
|
158
|
-
- 添加构建脚本(build, dev, typecheck)
|
|
159
|
-
- 设置模块类型(type: "module")
|
|
160
|
-
- 设置入口文件(main: "dist/index.js")
|
|
161
|
-
|
|
162
|
-
**Actual Implementation (实际实现)**:
|
|
163
|
-
|
|
164
|
-
**tsconfig.json**:
|
|
165
|
-
```json
|
|
166
|
-
{
|
|
167
|
-
"compilerOptions": {
|
|
168
|
-
"target": "ESNext",
|
|
169
|
-
"module": "ESNext",
|
|
170
|
-
"lib": ["ESNext"],
|
|
171
|
-
"moduleResolution": "node",
|
|
172
|
-
"rootDir": "./src",
|
|
173
|
-
"outDir": "./dist",
|
|
174
|
-
"declaration": true,
|
|
175
|
-
"declarationMap": true,
|
|
176
|
-
"sourceMap": true,
|
|
177
|
-
"strict": true,
|
|
178
|
-
"esModuleInterop": true,
|
|
179
|
-
"skipLibCheck": true,
|
|
180
|
-
"forceConsistentCasingInFileNames": true,
|
|
181
|
-
"resolveJsonModule": true,
|
|
182
|
-
"allowSyntheticDefaultImports": true,
|
|
183
|
-
"types": ["node", "jest"],
|
|
184
|
-
"baseUrl": ".",
|
|
185
|
-
"paths": {
|
|
186
|
-
"@/*": ["src/*"]
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
"include": ["src/**/*"],
|
|
190
|
-
"exclude": ["node_modules", "dist", "tests"]
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
**package.json** (relevant sections):
|
|
195
|
-
```json
|
|
196
|
-
{
|
|
197
|
-
"type": "module",
|
|
198
|
-
"main": "dist/index.js",
|
|
199
|
-
"bin": {
|
|
200
|
-
"miniprogram-mcp": "dist/cli.js"
|
|
201
|
-
},
|
|
202
|
-
"scripts": {
|
|
203
|
-
"build": "tsc",
|
|
204
|
-
"dev": "tsc --watch",
|
|
205
|
-
"typecheck": "tsc --noEmit"
|
|
206
|
-
},
|
|
207
|
-
"devDependencies": {
|
|
208
|
-
"@types/node": "^20.14.9",
|
|
209
|
-
"@types/jest": "^30.0.0",
|
|
210
|
-
"typescript": "^5.5.2",
|
|
211
|
-
"ts-jest": "^29.1.5",
|
|
212
|
-
"ts-node": "^10.9.2"
|
|
213
|
-
},
|
|
214
|
-
"engines": {
|
|
215
|
-
"node": ">=18.0.0"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
### Acceptance Criteria (验收标准 / DoD)
|
|
221
|
-
|
|
222
|
-
- [x] `tsconfig.json` 文件存在
|
|
223
|
-
- [x] compilerOptions.target 设置为 "ESNext"
|
|
224
|
-
- [x] compilerOptions.module 设置为 "ESNext"
|
|
225
|
-
- [x] compilerOptions.strict 设置为 true
|
|
226
|
-
- [x] compilerOptions.declaration 设置为 true
|
|
227
|
-
- [x] compilerOptions.sourceMap 设置为 true
|
|
228
|
-
- [x] compilerOptions.rootDir 设置为 "./src"
|
|
229
|
-
- [x] compilerOptions.outDir 设置为 "./dist"
|
|
230
|
-
- [x] paths 配置 "@/*": ["src/*"]
|
|
231
|
-
- [x] exclude 包含 "tests"
|
|
232
|
-
- [x] package.json 包含 TypeScript 依赖
|
|
233
|
-
- [x] package.json 包含 @types/node 和 @types/jest
|
|
234
|
-
- [x] package.json.scripts 包含 build, dev, typecheck
|
|
235
|
-
- [x] package.json.type 设置为 "module"
|
|
236
|
-
- [x] `pnpm build` 成功编译
|
|
237
|
-
- [x] `pnpm typecheck` 通过类型检查
|
|
238
|
-
|
|
239
|
-
### Risks (风险)
|
|
240
|
-
|
|
241
|
-
- ⚠️ **ESM 模块兼容性**
|
|
242
|
-
- 缓解: 优先选择支持 ESM 的依赖
|
|
243
|
-
|
|
244
|
-
- ⚠️ **Path 别名在不同工具中的支持**
|
|
245
|
-
- 缓解: 配置 jest.config.js 的 moduleNameMapper
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Task Card 3: 配置 Jest 测试框架
|
|
250
|
-
|
|
251
|
-
### Metadata (元数据)
|
|
252
|
-
|
|
253
|
-
```yaml
|
|
254
|
-
TaskID: TASK-2025-001-A3-3
|
|
255
|
-
Title: 配置 jest.config.js 和测试环境
|
|
256
|
-
Priority: HIGH
|
|
257
|
-
Status: ✅ COMPLETED (Retrospective)
|
|
258
|
-
Owner: ClaudeCode
|
|
259
|
-
Estimate: 15 分钟
|
|
260
|
-
Actual: ~15 分钟
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
### Context (上下文)
|
|
264
|
-
|
|
265
|
-
**Why (为什么)**:
|
|
266
|
-
- Jest 是 TypeScript 项目的标准测试框架
|
|
267
|
-
- ts-jest 提供 TypeScript 支持
|
|
268
|
-
- 需要配置 ESM 和 Path 别名支持
|
|
269
|
-
|
|
270
|
-
**Input (输入)**:
|
|
271
|
-
- TypeScript 配置(tsconfig.json)
|
|
272
|
-
- ESM 模块系统要求
|
|
273
|
-
- Path 别名配置(@/*)
|
|
274
|
-
- 测试目录结构(tests/unit/, tests/integration/)
|
|
275
|
-
|
|
276
|
-
**Output (输出)**:
|
|
277
|
-
- `jest.config.js` (25 行)
|
|
278
|
-
- package.json 测试脚本
|
|
279
|
-
|
|
280
|
-
### Implementation (实施)
|
|
281
|
-
|
|
282
|
-
**Steps (步骤)**:
|
|
283
|
-
|
|
284
|
-
1. 创建 `jest.config.js` 配置文件
|
|
285
|
-
- 设置 preset: 'ts-jest/presets/default-esm'(ESM 支持)
|
|
286
|
-
- 设置 testEnvironment: 'node'
|
|
287
|
-
- 配置 extensionsToTreatAsEsm: ['.ts']
|
|
288
|
-
- 配置 moduleNameMapper(支持 .js 扩展名和 @/* 别名)
|
|
289
|
-
- 配置 transform(ts-jest + useESM)
|
|
290
|
-
- 设置 testMatch: ['**/tests/**/*.test.ts']
|
|
291
|
-
- 配置 coverage(collectCoverageFrom, coverageDirectory)
|
|
292
|
-
|
|
293
|
-
2. 更新 `package.json`
|
|
294
|
-
- 添加 Jest 依赖(jest, ts-jest, @types/jest)
|
|
295
|
-
- 添加测试脚本(test, test:watch)
|
|
296
|
-
|
|
297
|
-
**Actual Implementation (实际实现)**:
|
|
298
|
-
|
|
299
|
-
**jest.config.js**:
|
|
300
|
-
```javascript
|
|
301
|
-
export default {
|
|
302
|
-
preset: 'ts-jest/presets/default-esm',
|
|
303
|
-
testEnvironment: 'node',
|
|
304
|
-
extensionsToTreatAsEsm: ['.ts'],
|
|
305
|
-
moduleNameMapper: {
|
|
306
|
-
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
307
|
-
'^@/(.*)$': '<rootDir>/src/$1',
|
|
308
|
-
},
|
|
309
|
-
transform: {
|
|
310
|
-
'^.+\\.tsx?$': [
|
|
311
|
-
'ts-jest',
|
|
312
|
-
{
|
|
313
|
-
useESM: true,
|
|
314
|
-
tsconfig: {
|
|
315
|
-
types: ['node', 'jest'],
|
|
316
|
-
},
|
|
317
|
-
},
|
|
318
|
-
],
|
|
319
|
-
},
|
|
320
|
-
testMatch: ['**/tests/**/*.test.ts'],
|
|
321
|
-
collectCoverageFrom: ['src/**/*.ts', '!src/**/*.d.ts'],
|
|
322
|
-
coverageDirectory: 'coverage',
|
|
323
|
-
coverageReporters: ['text', 'lcov', 'html'],
|
|
324
|
-
}
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
**package.json** (relevant sections):
|
|
328
|
-
```json
|
|
329
|
-
{
|
|
330
|
-
"scripts": {
|
|
331
|
-
"test": "jest",
|
|
332
|
-
"test:watch": "jest --watch"
|
|
333
|
-
},
|
|
334
|
-
"devDependencies": {
|
|
335
|
-
"jest": "^29.7.0",
|
|
336
|
-
"ts-jest": "^29.1.5",
|
|
337
|
-
"@types/jest": "^30.0.0"
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
### Acceptance Criteria (验收标准 / DoD)
|
|
343
|
-
|
|
344
|
-
- [x] `jest.config.js` 文件存在
|
|
345
|
-
- [x] preset 设置为 'ts-jest/presets/default-esm'
|
|
346
|
-
- [x] testEnvironment 设置为 'node'
|
|
347
|
-
- [x] extensionsToTreatAsEsm 包含 '.ts'
|
|
348
|
-
- [x] moduleNameMapper 支持 .js 扩展名转换
|
|
349
|
-
- [x] moduleNameMapper 支持 @/* 别名
|
|
350
|
-
- [x] transform 配置 ts-jest + useESM
|
|
351
|
-
- [x] testMatch 设置为 ['**/tests/**/*.test.ts']
|
|
352
|
-
- [x] collectCoverageFrom 包含 src/**/*.ts
|
|
353
|
-
- [x] package.json 包含 Jest 依赖
|
|
354
|
-
- [x] package.json.scripts 包含 test, test:watch
|
|
355
|
-
- [x] `pnpm test` 可以运行测试(即使没有测试文件)
|
|
356
|
-
|
|
357
|
-
### Risks (风险)
|
|
358
|
-
|
|
359
|
-
- ⚠️ **ESM + TypeScript + Jest 配置复杂**
|
|
360
|
-
- 缓解: 使用 ts-jest/presets/default-esm 预设
|
|
361
|
-
|
|
362
|
-
- ⚠️ **Path 别名在 Jest 中不生效**
|
|
363
|
-
- 缓解: moduleNameMapper 映射 @/* 到 <rootDir>/src/$1
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
## Task Card 4: 配置 Git 版本控制
|
|
368
|
-
|
|
369
|
-
### Metadata (元数据)
|
|
370
|
-
|
|
371
|
-
```yaml
|
|
372
|
-
TaskID: TASK-2025-001-A3-4
|
|
373
|
-
Title: 配置 .gitignore 排除规则
|
|
374
|
-
Priority: MEDIUM
|
|
375
|
-
Status: ✅ COMPLETED (Retrospective)
|
|
376
|
-
Owner: ClaudeCode
|
|
377
|
-
Estimate: 10 分钟
|
|
378
|
-
Actual: ~10 分钟
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
### Context (上下文)
|
|
382
|
-
|
|
383
|
-
**Why (为什么)**:
|
|
384
|
-
- Git 版本控制是项目协作的基础
|
|
385
|
-
- .gitignore 排除不应提交的文件(编译产物、依赖、日志等)
|
|
386
|
-
- 保持仓库干净,减小仓库体积
|
|
387
|
-
|
|
388
|
-
**Input (输入)**:
|
|
389
|
-
- TypeScript 项目编译产物(dist/)
|
|
390
|
-
- Node.js 依赖(node_modules/)
|
|
391
|
-
- 测试覆盖率报告(coverage/)
|
|
392
|
-
- 日志文件(*.log)
|
|
393
|
-
- 环境变量文件(.env)
|
|
394
|
-
- IDE 配置文件(.vscode/, .idea/)
|
|
395
|
-
- MCP 特定文件(memory.json, .mcp.json)
|
|
396
|
-
|
|
397
|
-
**Output (输出)**:
|
|
398
|
-
- `.gitignore` (58 行)
|
|
399
|
-
|
|
400
|
-
### Implementation (实施)
|
|
401
|
-
|
|
402
|
-
**Steps (步骤)**:
|
|
403
|
-
|
|
404
|
-
1. 创建 `.gitignore` 文件
|
|
405
|
-
2. 添加 Node.js 标准排除规则
|
|
406
|
-
- node_modules/, package-lock.json, yarn.lock
|
|
407
|
-
3. 添加 TypeScript 编译产物排除
|
|
408
|
-
- dist/, build/, *.tsbuildinfo
|
|
409
|
-
4. 添加日志文件排除
|
|
410
|
-
- logs/, *.log, npm-debug.log*
|
|
411
|
-
5. 添加测试覆盖率排除
|
|
412
|
-
- coverage/, .nyc_output/
|
|
413
|
-
6. 添加 IDE 配置文件排除
|
|
414
|
-
- .vscode/, .idea/, *.swp, .DS_Store
|
|
415
|
-
7. 添加环境变量文件排除
|
|
416
|
-
- .env, .env.local, .env.*.local
|
|
417
|
-
8. 添加 MCP 特定文件排除
|
|
418
|
-
- .mcp-artifacts/, memory.json, .mcp.json
|
|
419
|
-
9. 添加临时文件排除
|
|
420
|
-
- tmp/, temp/, .cache/
|
|
421
|
-
|
|
422
|
-
**Actual Implementation (实际实现)**:
|
|
423
|
-
|
|
424
|
-
**.gitignore** (58 lines):
|
|
425
|
-
```gitignore
|
|
426
|
-
# Dependencies
|
|
427
|
-
node_modules/
|
|
428
|
-
package-lock.json
|
|
429
|
-
yarn.lock
|
|
430
|
-
|
|
431
|
-
# Build output
|
|
432
|
-
dist/
|
|
433
|
-
build/
|
|
434
|
-
*.tsbuildinfo
|
|
435
|
-
|
|
436
|
-
# Logs
|
|
437
|
-
logs/
|
|
438
|
-
*.log
|
|
439
|
-
npm-debug.log*
|
|
440
|
-
yarn-debug.log*
|
|
441
|
-
yarn-error.log*
|
|
442
|
-
|
|
443
|
-
# Testing
|
|
444
|
-
coverage/
|
|
445
|
-
.nyc_output/
|
|
446
|
-
|
|
447
|
-
# IDE
|
|
448
|
-
.vscode/
|
|
449
|
-
.idea/
|
|
450
|
-
*.swp
|
|
451
|
-
*.swo
|
|
452
|
-
*~
|
|
453
|
-
.DS_Store
|
|
454
|
-
|
|
455
|
-
# Environment
|
|
456
|
-
.env
|
|
457
|
-
.env.local
|
|
458
|
-
.env.*.local
|
|
459
|
-
|
|
460
|
-
# Artifacts
|
|
461
|
-
artifacts/
|
|
462
|
-
.mcp-artifacts/
|
|
463
|
-
.test-output/
|
|
464
|
-
*.screenshot.png
|
|
465
|
-
*.snapshot.json
|
|
466
|
-
|
|
467
|
-
# Temporary
|
|
468
|
-
tmp/
|
|
469
|
-
temp/
|
|
470
|
-
.cache/
|
|
471
|
-
|
|
472
|
-
# MCP
|
|
473
|
-
memory.json
|
|
474
|
-
.mcp.json
|
|
475
|
-
.claude/
|
|
476
|
-
|
|
477
|
-
# Session logs
|
|
478
|
-
.llm/session_log/
|
|
479
|
-
.llm/handoff/
|
|
480
|
-
|
|
481
|
-
# OS
|
|
482
|
-
Thumbs.db
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
### Acceptance Criteria (验收标准 / DoD)
|
|
486
|
-
|
|
487
|
-
- [x] `.gitignore` 文件存在
|
|
488
|
-
- [x] 排除 node_modules/
|
|
489
|
-
- [x] 排除 dist/ 和 build/
|
|
490
|
-
- [x] 排除 *.log
|
|
491
|
-
- [x] 排除 coverage/
|
|
492
|
-
- [x] 排除 .vscode/ 和 .idea/
|
|
493
|
-
- [x] 排除 .env 文件
|
|
494
|
-
- [x] 排除 .DS_Store
|
|
495
|
-
- [x] 排除 MCP 特定文件(memory.json, .mcp.json)
|
|
496
|
-
- [x] 排除临时文件(tmp/, temp/)
|
|
497
|
-
|
|
498
|
-
### Risks (风险)
|
|
499
|
-
|
|
500
|
-
- ⚠️ **过度排除可能导致必需文件未提交**
|
|
501
|
-
- 缓解: 遵循标准规则,仅排除编译产物和临时文件
|
|
502
|
-
|
|
503
|
-
---
|
|
504
|
-
|
|
505
|
-
## Summary (总结)
|
|
506
|
-
|
|
507
|
-
### Completed Tasks (已完成任务)
|
|
508
|
-
|
|
509
|
-
| TaskID | Title | Estimate | Actual | Status |
|
|
510
|
-
|--------|-------|----------|--------|--------|
|
|
511
|
-
| A3-1 | 创建目录结构 | 15 min | ~15 min | ✅ COMPLETED |
|
|
512
|
-
| A3-2 | 配置 TypeScript | 20 min | ~20 min | ✅ COMPLETED |
|
|
513
|
-
| A3-3 | 配置 Jest 测试 | 15 min | ~15 min | ✅ COMPLETED |
|
|
514
|
-
| A3-4 | 配置 Git | 10 min | ~10 min | ✅ COMPLETED |
|
|
515
|
-
| **Total** | | **60 min** | **~60 min** | **✅ COMPLETED** |
|
|
516
|
-
|
|
517
|
-
### Deliverables (交付物)
|
|
518
|
-
|
|
519
|
-
1. ✅ **目录结构**
|
|
520
|
-
- src/ (tools/, core/, config/ 子目录)
|
|
521
|
-
- docs/
|
|
522
|
-
- tests/ (unit/, integration/ 子目录)
|
|
523
|
-
- examples/ (scripts/, config/ 子目录)
|
|
524
|
-
|
|
525
|
-
2. ✅ **TypeScript 配置**
|
|
526
|
-
- tsconfig.json (27 行)
|
|
527
|
-
- package.json (TypeScript 依赖和脚本)
|
|
528
|
-
|
|
529
|
-
3. ✅ **Jest 测试配置**
|
|
530
|
-
- jest.config.js (25 行)
|
|
531
|
-
- package.json (Jest 依赖和脚本)
|
|
532
|
-
|
|
533
|
-
4. ✅ **Git 配置**
|
|
534
|
-
- .gitignore (58 行)
|
|
535
|
-
|
|
536
|
-
### Quality Metrics (质量指标)
|
|
537
|
-
|
|
538
|
-
- **估算准确性**: 60 分钟估算 vs ~60 分钟实际(100% 准确)
|
|
539
|
-
- **配置完整性**: TypeScript, Jest, Git 配置全覆盖
|
|
540
|
-
- **构建验证**: `pnpm build` ✓, `pnpm typecheck` ✓
|
|
541
|
-
- **可维护性**: 配置清晰,注释完善
|
|
542
|
-
|
|
543
|
-
---
|
|
544
|
-
|
|
545
|
-
## Retrospective Notes (追溯说明)
|
|
546
|
-
|
|
547
|
-
**Process Violation (流程违规)**:
|
|
548
|
-
- ❌ 实际开发中跳过了 Align/Atomize/Approve 阶段
|
|
549
|
-
- ❌ 直接进入 Automate 阶段开始创建目录和配置文件
|
|
550
|
-
- ✅ 通过追溯补齐任务卡进行补救
|
|
551
|
-
|
|
552
|
-
**Lessons Learned (经验教训)**:
|
|
553
|
-
1. 项目初始化也应遵循 6A 工作法
|
|
554
|
-
2. TypeScript + ESM + Jest 配置复杂度较高,应在 Atomize 阶段预估充足时间
|
|
555
|
-
3. Path 别名配置需要在多个地方同步(tsconfig, jest.config)
|
|
556
|
-
4. 追溯补齐虽然能补救,但不如正常流程高效
|
|
557
|
-
|
|
558
|
-
**Approval Required (需要批准)**:
|
|
559
|
-
- ⏳ 等待用户批准本追溯性任务卡
|
|
560
|
-
- ⏳ 用户批准后才能继续 A4 任务的 Review
|
|
561
|
-
|
|
562
|
-
---
|
|
563
|
-
|
|
564
|
-
**注**: 本文档为追溯性创建,基于已完成的技术实现(目录结构 + 配置文件)反推任务拆解。所有任务已实际完成,现等待用户批准追溯补齐的合理性。
|