@weavecode/weave 0.1.0 → 0.1.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/node_modules/@weavecode/cli/dist/cli.js +4 -4
- package/node_modules/@weavecode/cli/dist/commands/chpass.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/daemon-auth.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/daemon.js +2 -2
- package/node_modules/@weavecode/cli/dist/commands/dashboard.d.ts +0 -2
- package/node_modules/@weavecode/cli/dist/commands/dashboard.js +2 -1
- package/node_modules/@weavecode/cli/dist/commands/doctor.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/init.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/msg.js +2 -2
- package/node_modules/@weavecode/cli/dist/commands/scan.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/status.js +2 -2
- package/node_modules/@weavecode/cli/dist/commands/uninstall.js +1 -1
- package/node_modules/@weavecode/cli/dist/i18n/dict/en.js +5 -3
- package/node_modules/@weavecode/cli/dist/i18n/dict/zh.d.ts +44 -1
- package/node_modules/@weavecode/cli/dist/i18n/dict/zh.js +6 -4
- package/node_modules/@weavecode/cli/dist/i18n/index.js +1 -1
- package/node_modules/@weavecode/cli/dist/i18n/t.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/claudemd-gen.js +4 -4
- package/node_modules/@weavecode/cli/dist/init/executor.js +3 -3
- package/node_modules/@weavecode/cli/dist/init/git-commit.js +2 -2
- package/node_modules/@weavecode/cli/dist/init/harnesses/claude.js +7 -7
- package/node_modules/@weavecode/cli/dist/init/harnesses/codex.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/helpers-gen.d.ts +4 -0
- package/node_modules/@weavecode/cli/dist/init/helpers-gen.js +1 -20
- package/node_modules/@weavecode/cli/dist/init/instruction-link.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/mcp-gen.d.ts +3 -20
- package/node_modules/@weavecode/cli/dist/init/mcp-gen.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/plugin-templates.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/prompt.js +4 -4
- package/node_modules/@weavecode/cli/dist/init/settings-gen.d.ts +3 -30
- package/node_modules/@weavecode/cli/dist/init/settings-gen.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/uninstall.js +6 -6
- package/node_modules/@weavecode/cli/dist/init/wiring.js +1 -1
- package/node_modules/@weavecode/cli/dist/parser.js +1 -1
- package/node_modules/@weavecode/cli/dist/statusline/ansi.js +1 -1
- package/node_modules/@weavecode/cli/dist/statusline/mock-input.js +1 -1
- package/node_modules/@weavecode/cli/dist/statusline/preview.js +2 -2
- package/node_modules/@weavecode/cli/package.json +5 -5
- package/node_modules/@weavecode/core/dist/harness-checks.js +1 -1
- package/node_modules/@weavecode/core/dist/harness.d.ts +45 -2
- package/node_modules/@weavecode/core/dist/harness.js +1 -1
- package/node_modules/@weavecode/core/dist/index.d.ts +1 -1
- package/node_modules/@weavecode/core/dist/index.js +1 -1
- package/node_modules/@weavecode/core/dist/platform.js +1 -1
- package/node_modules/@weavecode/core/dist/terminal.d.ts +28 -4
- package/node_modules/@weavecode/core/dist/terminal.js +1 -1
- package/node_modules/@weavecode/core/dist/types.d.ts +188 -11
- package/node_modules/@weavecode/core/dist/types.js +1 -1
- package/node_modules/@weavecode/core/dist/utils/fs.js +1 -1
- package/node_modules/@weavecode/core/dist/utils/logger.js +1 -1
- package/node_modules/@weavecode/core/package.json +1 -1
- package/node_modules/@weavecode/harness/dist/claude/assets.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/capture.d.ts +11 -1
- package/node_modules/@weavecode/harness/dist/claude/capture.js +5 -5
- package/node_modules/@weavecode/harness/dist/claude/detect.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/event-source.d.ts +1 -1
- package/node_modules/@weavecode/harness/dist/claude/event-source.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/helpers-gen.d.ts +5 -0
- package/node_modules/@weavecode/harness/dist/claude/helpers-gen.js +20 -0
- package/node_modules/@weavecode/harness/dist/claude/index.d.ts +5 -1
- package/node_modules/@weavecode/harness/dist/claude/index.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/mcp-gen.d.ts +22 -0
- package/node_modules/@weavecode/harness/dist/claude/mcp-gen.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/messaging.d.ts +11 -2
- package/node_modules/@weavecode/harness/dist/claude/messaging.js +4 -1
- package/node_modules/@weavecode/harness/dist/claude/model-aliases.d.ts +25 -0
- package/node_modules/@weavecode/harness/dist/claude/model-aliases.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/peers.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/plugins.js +4 -4
- package/node_modules/@weavecode/harness/dist/claude/prompt-inbox.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/prompt.js +3 -3
- package/node_modules/@weavecode/harness/dist/claude/questions.js +2 -1
- package/node_modules/@weavecode/harness/dist/claude/settings-gen.d.ts +32 -0
- package/node_modules/@weavecode/harness/dist/claude/settings-gen.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/transcript.d.ts +16 -0
- package/node_modules/@weavecode/harness/dist/claude/transcript.js +4 -2
- package/node_modules/@weavecode/harness/dist/codex/assets.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/detect.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/messaging.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/plugin-state.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/toml.js +9 -9
- package/node_modules/@weavecode/harness/dist/driver.d.ts +58 -1
- package/node_modules/@weavecode/harness/dist/driver.js +1 -1
- package/node_modules/@weavecode/harness/dist/index.d.ts +1 -0
- package/node_modules/@weavecode/harness/dist/index.js +1 -1
- package/node_modules/@weavecode/harness/dist/init/generated.d.ts +37 -0
- package/node_modules/@weavecode/harness/dist/init/generated.js +2 -0
- package/node_modules/@weavecode/harness/dist/init/pipeline.js +1 -1
- package/node_modules/@weavecode/harness/dist/registry-wiring.d.ts +3 -1
- package/node_modules/@weavecode/harness/dist/registry-wiring.js +1 -1
- package/node_modules/@weavecode/harness/dist/shared/install-link.js +1 -1
- package/node_modules/@weavecode/harness/package.json +2 -2
- package/node_modules/@weavecode/server/dist/daemon/ai-config.js +2 -2
- package/node_modules/@weavecode/server/dist/daemon/ai-context.js +6 -6
- package/node_modules/@weavecode/server/dist/daemon/ai-routes.js +4 -4
- package/node_modules/@weavecode/server/dist/daemon/api-log.d.ts +48 -0
- package/node_modules/@weavecode/server/dist/daemon/api-log.js +3 -0
- package/node_modules/@weavecode/server/dist/daemon/auth-routes.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/auto-start.js +6 -6
- package/node_modules/@weavecode/server/dist/daemon/capture-routes.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/claude-liveness.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/dashboard-auth.js +2 -2
- package/node_modules/@weavecode/server/dist/daemon/data-bus.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/dev-entry.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/fs-browser.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.d.ts +6 -1
- package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/hooks-routes.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/http.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/opener.d.ts +102 -19
- package/node_modules/@weavecode/server/dist/daemon/opener.js +97 -7
- package/node_modules/@weavecode/server/dist/daemon/port.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/project-harnesses.js +2 -2
- package/node_modules/@weavecode/server/dist/daemon/project-updates-refresher.d.ts +4 -3
- package/node_modules/@weavecode/server/dist/daemon/project-updates-refresher.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/server.d.ts +8 -0
- package/node_modules/@weavecode/server/dist/daemon/server.js +6 -6
- package/node_modules/@weavecode/server/dist/daemon/session-probe.d.ts +59 -2
- package/node_modules/@weavecode/server/dist/daemon/session-probe.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/settings.d.ts +10 -0
- package/node_modules/@weavecode/server/dist/daemon/settings.js +2 -2
- package/node_modules/@weavecode/server/dist/daemon/start.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/state.js +2 -2
- package/node_modules/@weavecode/server/dist/daemon/static.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/terminal-topology-refresher.d.ts +4 -1
- package/node_modules/@weavecode/server/dist/daemon/tls.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/toolkit-routes.js +1 -1
- package/node_modules/@weavecode/server/dist/db/db.js +20 -2
- package/node_modules/@weavecode/server/dist/db/paths.d.ts +4 -0
- package/node_modules/@weavecode/server/dist/db/paths.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/answer-keys.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/bus.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/dispatcher.js +6 -6
- package/node_modules/@weavecode/server/dist/hooks/handlers/webhook.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/headless-runner.js +2 -2
- package/node_modules/@weavecode/server/dist/hooks/inbox-socket.d.ts +17 -4
- package/node_modules/@weavecode/server/dist/hooks/inbox-socket.js +2 -1
- package/node_modules/@weavecode/server/dist/hooks/inbox-worker.d.ts +20 -6
- package/node_modules/@weavecode/server/dist/hooks/inbox-worker.js +3 -3
- package/node_modules/@weavecode/server/dist/hooks/match.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/message-deliverer.d.ts +171 -13
- package/node_modules/@weavecode/server/dist/hooks/message-deliverer.js +3 -2
- package/node_modules/@weavecode/server/dist/hooks/mirror.js +4 -4
- package/node_modules/@weavecode/server/dist/hooks/plugin-installer.js +3 -3
- package/node_modules/@weavecode/server/dist/hooks/plugin-loader.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/plugin-project-state.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/prompt-flusher.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/promptbox.d.ts +13 -0
- package/node_modules/@weavecode/server/dist/hooks/promptbox.js +8 -8
- package/node_modules/@weavecode/server/dist/hooks/push-notify.js +2 -2
- package/node_modules/@weavecode/server/dist/hooks/question-tracker.d.ts +6 -4
- package/node_modules/@weavecode/server/dist/hooks/question-tracker.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/registry.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/resume-runner.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/sequence-engine.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/session-purge.d.ts +4 -0
- package/node_modules/@weavecode/server/dist/hooks/session-purge.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/session-sweeper.d.ts +5 -8
- package/node_modules/@weavecode/server/dist/hooks/session-sweeper.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/toolkit-scan.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/toolkit.d.ts +8 -0
- package/node_modules/@weavecode/server/dist/hooks/toolkit.js +5 -5
- package/node_modules/@weavecode/server/dist/hooks/watch-engine.d.ts +7 -0
- package/node_modules/@weavecode/server/dist/hooks/watch-engine.js +1 -1
- package/node_modules/@weavecode/server/dist/index.d.ts +1 -1
- package/node_modules/@weavecode/server/dist/install/apply-update.d.ts +1 -1
- package/node_modules/@weavecode/server/dist/install/apply-update.js +1 -1
- package/node_modules/@weavecode/server/dist/install/capabilities.js +1 -1
- package/node_modules/@weavecode/server/dist/install/codex-toml.js +1 -1
- package/node_modules/@weavecode/server/dist/install/file-assets.js +1 -1
- package/node_modules/@weavecode/server/dist/install/fingerprint.d.ts +5 -1
- package/node_modules/@weavecode/server/dist/install/fingerprint.js +1 -1
- package/node_modules/@weavecode/server/dist/install/git-classify.d.ts +30 -0
- package/node_modules/@weavecode/server/dist/install/git-classify.js +1 -0
- package/node_modules/@weavecode/server/dist/install/global-config.js +2 -2
- package/node_modules/@weavecode/server/dist/install/global-file-assets.js +1 -1
- package/node_modules/@weavecode/server/dist/install/init-files.d.ts +46 -0
- package/node_modules/@weavecode/server/dist/install/init-files.js +2 -0
- package/node_modules/@weavecode/server/dist/install/install-ledger.js +1 -1
- package/node_modules/@weavecode/server/dist/install/installer.js +3 -3
- package/node_modules/@weavecode/server/dist/install/library-index.js +1 -1
- package/node_modules/@weavecode/server/dist/install/mcp-rows.js +1 -1
- package/node_modules/@weavecode/server/dist/install/plugin-install.js +1 -1
- package/node_modules/@weavecode/server/dist/install/plugin-rows.js +1 -1
- package/node_modules/@weavecode/server/dist/install/plugin-templates.js +1 -1
- package/node_modules/@weavecode/server/dist/install/project-config.d.ts +0 -2
- package/node_modules/@weavecode/server/dist/install/project-config.js +2 -2
- package/node_modules/@weavecode/server/dist/install/reader.js +1 -1
- package/node_modules/@weavecode/server/dist/install/scan-cache.js +1 -1
- package/node_modules/@weavecode/server/dist/install/scanner.js +1 -1
- package/node_modules/@weavecode/server/dist/install/settings-mcp.js +2 -2
- package/node_modules/@weavecode/server/dist/install/updates.d.ts +17 -5
- package/node_modules/@weavecode/server/dist/install/updates.js +1 -1
- package/node_modules/@weavecode/server/dist/market/builtin.js +1 -1
- package/node_modules/@weavecode/server/dist/market/identity.js +1 -1
- package/node_modules/@weavecode/server/dist/market/import.js +2 -2
- package/node_modules/@weavecode/server/dist/market/refresh.js +1 -1
- package/node_modules/@weavecode/server/dist/market/resolve.js +1 -1
- package/node_modules/@weavecode/server/dist/market/updates.js +1 -1
- package/node_modules/@weavecode/server/dist/registry.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/hook-dispatches.js +5 -5
- package/node_modules/@weavecode/server/dist/repositories/hook-events.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/hook-rules.js +4 -4
- package/node_modules/@weavecode/server/dist/repositories/libraries.js +1 -1
- package/node_modules/@weavecode/server/dist/repositories/plugin-states.js +1 -1
- package/node_modules/@weavecode/server/dist/repositories/projects.d.ts +7 -0
- package/node_modules/@weavecode/server/dist/repositories/projects.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/push-subscriptions.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/session-watches.js +4 -4
- package/node_modules/@weavecode/server/dist/repositories/sessions.d.ts +17 -4
- package/node_modules/@weavecode/server/dist/repositories/sessions.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/uploads.d.ts +66 -0
- package/node_modules/@weavecode/server/dist/repositories/uploads.js +7 -0
- package/node_modules/@weavecode/server/dist/statusline/cache-sweeper.js +1 -1
- package/node_modules/@weavecode/server/dist/statusline/generator.js +81 -40
- package/node_modules/@weavecode/server/dist/statusline/manager.d.ts +2 -0
- package/node_modules/@weavecode/server/dist/statusline/manager.js +4 -4
- package/node_modules/@weavecode/server/dist/surfaces.js +1 -1
- package/node_modules/@weavecode/server/dist/watch/cache.js +1 -1
- package/node_modules/@weavecode/server/dist/watch/classifier.js +1 -1
- package/node_modules/@weavecode/server/dist/watch/plugin-mods.js +1 -1
- package/node_modules/@weavecode/server/dist/watch/sync-scheduler.d.ts +8 -4
- package/node_modules/@weavecode/server/dist/watch/sync-scheduler.js +1 -1
- package/node_modules/@weavecode/server/dist/watch/watch-service.js +1 -1
- package/node_modules/@weavecode/server/package.json +4 -4
- package/node_modules/@weavecode/server/web/dist/assets/index-D5WFh77i.css +11 -0
- package/node_modules/@weavecode/server/web/dist/assets/index-DJibaGnJ.js +585 -0
- package/node_modules/@weavecode/server/web/dist/index.html +14 -2
- package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-plugin-creator/skills/weave-plugin-creator/SKILL.md +2 -2
- package/node_modules/@weavecode/templates/package.json +2 -2
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/README.md +50 -32
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/build/index.d.ts +86 -40
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/build/index.es.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/build/index.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/package.json +20 -17
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/README.md +50 -32
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/build/index.d.ts +86 -40
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/build/index.es.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/build/index.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/package.json +20 -17
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/README.md +50 -32
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/build/index.d.ts +86 -40
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/build/index.es.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/build/index.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/package.json +20 -17
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/README.md +50 -32
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/build/index.d.ts +86 -40
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/build/index.es.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/build/index.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/package.json +20 -17
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/README.md +50 -32
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/build/index.d.ts +86 -40
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/build/index.es.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/build/index.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/package.json +20 -17
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/README.md +50 -32
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/build/index.d.ts +86 -40
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/build/index.es.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/build/index.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/package.json +20 -17
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/README.md +50 -32
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/build/index.d.ts +86 -40
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/build/index.es.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/build/index.js +860 -353
- package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/package.json +20 -17
- package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/README.md +50 -32
- package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/build/index.d.ts +86 -40
- package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/build/index.es.js +860 -353
- package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/build/index.js +860 -353
- package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/package.json +20 -17
- package/package.json +6 -6
- package/node_modules/@weavecode/server/web/dist/assets/index-BOzaRlQE.js +0 -560
- package/node_modules/@weavecode/server/web/dist/assets/index-ChX8G8cT.css +0 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import c from"node:path";import{CONTEXT_STYLE_FORMAT as d,POWERLINE_DEFAULT_GLYPHS as e,SEGMENT_DEFAULT_FORMAT as p,SEGMENT_ORDER as f}from"./config.js";import{getDataDir as h}from"../db/paths.js";import{WEAVE_VERSION as g}from"../version.js";export function statuslineCacheDir(){return c.join(h(),"statusline")}const m={gray:"90",red:"31",green:"32",yellow:"33",blue:"34",magenta:"35",cyan:"36"},v={gray:"100",red:"41",green:"42",yellow:"43",blue:"44",magenta:"45",cyan:"46"},
|
|
1
|
+
import c from"node:path";import{CONTEXT_STYLE_FORMAT as d,POWERLINE_DEFAULT_GLYPHS as e,SEGMENT_DEFAULT_FORMAT as p,SEGMENT_ORDER as f}from"./config.js";import{getDataDir as h}from"../db/paths.js";import{WEAVE_VERSION as g}from"../version.js";export function statuslineCacheDir(){return c.join(h(),"statusline")}const m={gray:"90",red:"31",green:"32",yellow:"33",blue:"34",magenta:"35",cyan:"36"},v={gray:"100",red:"41",green:"42",yellow:"43",blue:"44",magenta:"45",cyan:"46"},b="\u2588",y="\u2591",w=10,_=8*1024*1024,t=5e3,C=3600,k=60,T=60,I=5;export function generateStatuslineScript(r,n={}){const s=JSON.stringify(r),i=JSON.stringify(n.cacheDir??statuslineCacheDir()),a=JSON.stringify(m),o=JSON.stringify(v),l=JSON.stringify(p),u=JSON.stringify(d);return`#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* weave statusline \u2014 generated by the weave dashboard.
|
|
4
4
|
* Reads Claude Code's statusline JSON from stdin and prints a summary.
|
|
@@ -10,14 +10,15 @@ import c from"node:path";import{CONTEXT_STYLE_FORMAT as d,POWERLINE_DEFAULT_GLYP
|
|
|
10
10
|
const CONFIG = ${s};
|
|
11
11
|
const ANSI = ${a};
|
|
12
12
|
const BG = ${o};
|
|
13
|
-
const SEGMENT_FORMAT = ${
|
|
14
|
-
const CONTEXT_FORMAT = ${
|
|
15
|
-
const BAR_FILL = '${
|
|
16
|
-
const BAR_EMPTY = '${
|
|
13
|
+
const SEGMENT_FORMAT = ${l};
|
|
14
|
+
const CONTEXT_FORMAT = ${u};
|
|
15
|
+
const BAR_FILL = '${b}';
|
|
16
|
+
const BAR_EMPTY = '${y}';
|
|
17
17
|
const BAR_CELLS = ${w};
|
|
18
|
-
const GIT_IDENTITY_TTL = ${
|
|
19
|
-
const GIT_CHANGES_TTL = ${
|
|
20
|
-
const
|
|
18
|
+
const GIT_IDENTITY_TTL = ${C};
|
|
19
|
+
const GIT_CHANGES_TTL = ${k};
|
|
20
|
+
const GIT_BRANCH_TTL = ${T};
|
|
21
|
+
const GIT_RETRY_TTL = ${I};
|
|
21
22
|
const CACHE_DIR = ${i};
|
|
22
23
|
// Stamped into the row-0 logo so the running version is always visible.
|
|
23
24
|
const WEAVE_VERSION = ${JSON.stringify(g)};
|
|
@@ -87,11 +88,10 @@ function dim(text) {
|
|
|
87
88
|
|
|
88
89
|
// --- render cache -----------------------------------------------------------
|
|
89
90
|
// Every render is a fresh process, so the file \u2014 not the process \u2014 is what
|
|
90
|
-
// carries the
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
// and files of sessions that stopped rendering.
|
|
91
|
+
// carries the transcript scan across renders. One file per session under
|
|
92
|
+
// CACHE_DIR; the git segments do NOT live here (see GIT_FILE below) because
|
|
93
|
+
// they describe the worktree rather than the session. The daemon's sweeper
|
|
94
|
+
// drops expired entries and files of sessions that stopped rendering.
|
|
95
95
|
//
|
|
96
96
|
// Top level on purpose: flush() below writes it after main() returns, so a
|
|
97
97
|
// render that throws half-way still keeps what it had already scanned.
|
|
@@ -100,6 +100,15 @@ var CACHE = null;
|
|
|
100
100
|
// \u53EA\u5728\u771F\u6709\u6761\u76EE\u843D\u5B9A\u65F6\u624D\u56DE\u5199\uFF1A\u7EAF\u547D\u4E2D\u7684\u6E32\u67D3\u96F6\u5199\u76D8\uFF08\u65E7\u5B9E\u73B0\u540C\u6837\u53EA\u5728\u672A\u547D\u4E2D\u65F6\u5199\uFF09\u3002
|
|
101
101
|
var CACHE_DIRTY = false;
|
|
102
102
|
|
|
103
|
+
// Git \u6BB5\u63CF\u8FF0\u7684\u662F\u5DE5\u4F5C\u533A\uFF0C\u4E0D\u662F\u4F1A\u8BDD\uFF1A\u540C\u4E00\u9879\u76EE\u7684\u6BCF\u4E2A\u4F1A\u8BDD\u90FD\u5728\u95EE\u540C\u4E00\u4E2A\u95EE\u9898\u3002\u6240\u4EE5
|
|
104
|
+
// \u5B83\u53E6\u5B58\u4E00\u4EFD\u6309\u76EE\u5F55\u5206\u7247\u7684\u6587\u4EF6\uFF08git-<cwd \u6458\u8981>.json\uFF09\uFF0C\u5404\u4F1A\u8BDD\u5171\u4EAB\u2014\u2014\u4E00\u4E2A TTL \u5185
|
|
105
|
+
// \u6574\u4E2A\u9879\u76EE\u53EA\u4ED8\u4E00\u6B21 git \u5B50\u8FDB\u7A0B\uFF0C\u6709\u591A\u5C11\u4F1A\u8BDD\u5728\u6E32\u67D3\u90FD\u4E00\u6837\u3002\u6761\u76EE\u952E\u56E0\u6B64\u53EA\u662F
|
|
106
|
+
// branch / git_user / changes \u4E09\u6837\uFF0C\u4E0D\u5E26\u76EE\u5F55\uFF08\u76EE\u5F55\u5DF2\u7ECF\u662F\u6587\u4EF6\u540D\u4E86\uFF09\u3002\u5E76\u53D1\u5199\u7528\u540C\u4E00\u5957
|
|
107
|
+
// tmp+rename\uFF0C\u540E\u5199\u7684\u6574\u4EFD\u8986\u76D6\u5148\u5199\u7684\uFF08\u4E22\u4E00\u6761\u8FC7\u671F\u6761\u76EE\u53EA\u4F1A\u8BA9\u4E0B\u6B21\u91CD\u63A2\u4E00\u6B21\uFF09\u3002
|
|
108
|
+
var GIT_FILE = null;
|
|
109
|
+
var GIT_CACHE = null;
|
|
110
|
+
var GIT_DIRTY = false;
|
|
111
|
+
|
|
103
112
|
// Session key: Claude Code's session id, then the transcript basename, then a
|
|
104
113
|
// cwd digest for hosts that send neither.
|
|
105
114
|
function cacheKeyOf(input) {
|
|
@@ -116,7 +125,14 @@ function cacheKeyOf(input) {
|
|
|
116
125
|
|
|
117
126
|
function initCache(input) {
|
|
118
127
|
var path = require('path');
|
|
128
|
+
var crypto = require('crypto');
|
|
119
129
|
CACHE_FILE = path.join(CACHE_DIR, cacheKeyOf(input) + '.json');
|
|
130
|
+
var cwd = (input.workspace && input.workspace.current_dir) || process.cwd();
|
|
131
|
+
// \u4E00\u4E2A\u76EE\u5F55\u4E00\u4E2A\u6587\u4EF6\uFF1A\u5927\u5C0F\u5199\u4E0D\u654F\u611F\uFF08Windows\uFF09\uFF0C\u5206\u9694\u7B26\u4E0E\u5C3E\u659C\u6760\u7684\u4E0D\u540C\u5199\u6CD5\u4E5F\u7B97\u540C\u4E00\u4E2A
|
|
132
|
+
var dirKey = crypto.createHash('sha1')
|
|
133
|
+
.update(String(cwd).toLowerCase().replace(/\\\\/g, '/').replace(/\\/+$/, ''))
|
|
134
|
+
.digest('hex').slice(0, 16);
|
|
135
|
+
GIT_FILE = path.join(CACHE_DIR, 'git-' + dirKey + '.json');
|
|
120
136
|
}
|
|
121
137
|
|
|
122
138
|
// Lazily read once per render: a render that touches no cached segment must not
|
|
@@ -128,28 +144,49 @@ function cache() {
|
|
|
128
144
|
try { loaded = JSON.parse(fs.readFileSync(CACHE_FILE, 'utf8')); } catch (e) {}
|
|
129
145
|
CACHE = loaded && typeof loaded === 'object' ? loaded : {};
|
|
130
146
|
CACHE.v = 1;
|
|
131
|
-
if (!CACHE.git || typeof CACHE.git !== 'object') CACHE.git = {};
|
|
132
147
|
if (!CACHE.tokens || typeof CACHE.tokens !== 'object') CACHE.tokens = {};
|
|
133
148
|
return CACHE;
|
|
134
149
|
}
|
|
135
150
|
|
|
136
|
-
|
|
137
|
-
|
|
151
|
+
// \u5F62\u72B6\u4E0E sweeper \u7684\u5224\u636E\u4E00\u81F4\uFF08git \u6761\u76EE + tokens\uFF09\uFF0C\u5171\u4EAB\u6587\u4EF6\u56E0\u6B64\u4E0D\u5FC5\u53E6\u7ACB\u56DE\u6536\u89C4\u5219\uFF1A
|
|
152
|
+
// \u6761\u76EE\u5168\u90E8\u8FC7\u671F\u65F6\u5B83\u6309\u300C\u4E24\u680F\u90FD\u7A7A\u300D\u628A\u6587\u4EF6\u5220\u6389\u3002
|
|
153
|
+
function gitCache() {
|
|
154
|
+
if (GIT_CACHE) return GIT_CACHE;
|
|
155
|
+
var fs = require('fs');
|
|
156
|
+
var loaded = null;
|
|
157
|
+
try { loaded = JSON.parse(fs.readFileSync(GIT_FILE, 'utf8')); } catch (e) {}
|
|
158
|
+
GIT_CACHE = loaded && typeof loaded === 'object' ? loaded : {};
|
|
159
|
+
GIT_CACHE.v = 1;
|
|
160
|
+
if (!GIT_CACHE.git || typeof GIT_CACHE.git !== 'object') GIT_CACHE.git = {};
|
|
161
|
+
return GIT_CACHE;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function writeCacheFile(file, data) {
|
|
138
165
|
var fs = require('fs');
|
|
139
166
|
var path = require('path');
|
|
140
|
-
|
|
141
|
-
var tmp =
|
|
142
|
-
var payload = JSON.stringify(
|
|
167
|
+
data.updatedAt = Date.now();
|
|
168
|
+
var tmp = file + '.' + process.pid + '.tmp';
|
|
169
|
+
var payload = JSON.stringify(data);
|
|
143
170
|
// atomic replace: renders overlap while Claude Code re-runs on a debounce
|
|
144
|
-
function put() { fs.writeFileSync(tmp, payload); fs.renameSync(tmp,
|
|
171
|
+
function put() { fs.writeFileSync(tmp, payload); fs.renameSync(tmp, file); }
|
|
145
172
|
try {
|
|
146
173
|
put();
|
|
147
174
|
} catch (e) {
|
|
148
175
|
// steady state the directory is already there \u2014 pay mkdir only when it is not
|
|
149
|
-
try { fs.mkdirSync(path.dirname(
|
|
176
|
+
try { fs.mkdirSync(path.dirname(file), { recursive: true }); put(); } catch (e2) {}
|
|
150
177
|
}
|
|
151
178
|
}
|
|
152
179
|
|
|
180
|
+
function flushCache() {
|
|
181
|
+
if (!CACHE || !CACHE_FILE || !CACHE_DIRTY) return;
|
|
182
|
+
writeCacheFile(CACHE_FILE, CACHE);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function flushGitCache() {
|
|
186
|
+
if (!GIT_CACHE || !GIT_FILE || !GIT_DIRTY) return;
|
|
187
|
+
writeCacheFile(GIT_FILE, GIT_CACHE);
|
|
188
|
+
}
|
|
189
|
+
|
|
153
190
|
// Git-derived segments cost a subprocess each, and Claude Code re-invokes us far
|
|
154
191
|
// more often than the value changes. A failed lookup \u2014 not a repo, git missing
|
|
155
192
|
// from PATH \u2014 is cached too, so a directory that never has git stops being
|
|
@@ -157,13 +194,13 @@ function flushCache() {
|
|
|
157
194
|
// a failure for an identity's full TTL would hide the segment for an hour.
|
|
158
195
|
function cachedGit(key, ttlSec, produce) {
|
|
159
196
|
var now = Date.now();
|
|
160
|
-
var store =
|
|
197
|
+
var store = gitCache();
|
|
161
198
|
var hit = store.git[key];
|
|
162
199
|
if (hit && hit.expires > now) return hit.value;
|
|
163
200
|
var value = produce();
|
|
164
201
|
var ttl = value == null ? Math.min(ttlSec, GIT_RETRY_TTL) : ttlSec;
|
|
165
202
|
store.git[key] = { expires: now + ttl * 1000, value: value };
|
|
166
|
-
|
|
203
|
+
GIT_DIRTY = true;
|
|
167
204
|
return value;
|
|
168
205
|
}
|
|
169
206
|
|
|
@@ -365,30 +402,33 @@ function segmentTokens(key, seg) {
|
|
|
365
402
|
var name = path.basename(cwd);
|
|
366
403
|
return cwd ? { name: name, path: cwd } : null;
|
|
367
404
|
}
|
|
368
|
-
case 'git':
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
405
|
+
case 'git': {
|
|
406
|
+
var branch = cachedGit('branch', GIT_BRANCH_TTL, function () {
|
|
407
|
+
try {
|
|
408
|
+
return require('child_process').execFileSync(
|
|
409
|
+
'git', ['rev-parse', '--abbrev-ref', 'HEAD'],
|
|
410
|
+
{ cwd: cwd, stdio: ['ignore', 'pipe', 'ignore'], timeout: 3000, windowsHide: true }
|
|
411
|
+
).toString().trim() || null;
|
|
412
|
+
} catch (e) { return null; }
|
|
413
|
+
});
|
|
414
|
+
if (!branch) return null;
|
|
415
|
+
// workspace.repo is optional (parsed from the git remote) \u2014 the token
|
|
416
|
+
// stays empty when absent so the default {branch} format is unaffected.
|
|
417
|
+
var repoInfo = input.workspace && input.workspace.repo;
|
|
418
|
+
return {
|
|
419
|
+
branch: branch,
|
|
420
|
+
repo: repoInfo && repoInfo.owner ? repoInfo.owner + '/' + repoInfo.name : ''
|
|
421
|
+
};
|
|
422
|
+
}
|
|
383
423
|
case 'git_user':
|
|
384
|
-
return cachedGit('git_user
|
|
424
|
+
return cachedGit('git_user', GIT_IDENTITY_TTL, function () {
|
|
385
425
|
// Both fields must be set \u2014 a partial identity would render 'name <>'
|
|
386
426
|
var gitUser = gitConfigValue(cwd, 'user.name');
|
|
387
427
|
var gitEmail = gitConfigValue(cwd, 'user.email');
|
|
388
428
|
return gitUser && gitEmail ? { user: gitUser, email: gitEmail } : null;
|
|
389
429
|
});
|
|
390
430
|
case 'changes':
|
|
391
|
-
return cachedGit('changes
|
|
431
|
+
return cachedGit('changes', GIT_CHANGES_TTL, function () {
|
|
392
432
|
var diff = gitNumstat(cwd);
|
|
393
433
|
return diff ? { added: diff.added, deleted: diff.deleted, files: diff.files } : null;
|
|
394
434
|
});
|
|
@@ -665,6 +705,7 @@ function flush() {
|
|
|
665
705
|
try { main(raw); } catch (e) {}
|
|
666
706
|
// \u7F13\u5B58\u56DE\u5199\u5728\u6E32\u67D3\u4E4B\u540E\uFF1A\u4E3B\u6D41\u7A0B\u4E2D\u9014\u629B\u9519\u4E5F\u4FDD\u4F4F\u8FD9\u4E00\u8F6E\u626B\u5230\u7684\u589E\u91CF
|
|
667
707
|
try { flushCache(); } catch (e) {}
|
|
708
|
+
try { flushGitCache(); } catch (e) {}
|
|
668
709
|
process.exit(0);
|
|
669
710
|
}
|
|
670
711
|
process.stdin.setEncoding('utf8');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type StatuslineConfig } from './config.js';
|
|
2
|
+
/** 生成脚本的项目根相对落点(posix)——init 文件漂移检测的比对面。 */
|
|
3
|
+
export declare function statuslineScriptRelPath(): string;
|
|
2
4
|
/** Point the global template directory elsewhere (tests use a temp dir). */
|
|
3
5
|
export declare function setGlobalStatuslineDir(dir: string): void;
|
|
4
6
|
/** Read the user's global statusline template; falls back to the default. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{readFile as u,writeFile as f,mkdir as
|
|
2
|
-
`,"utf-8")}export async function readStatuslineConfig(
|
|
3
|
-
`,"utf-8")}export async function writeStatuslineScript(
|
|
4
|
-
`,"utf-8")}export async function applyStatuslineConfig(
|
|
1
|
+
import{readFile as u,writeFile as f,mkdir as g,access as E}from"node:fs/promises";import{homedir as I}from"node:os";import l from"node:path";import{DEFAULT_STATUSLINE_CONFIG as s,LEGACY_IDENTITY_LINE as C,LEGACY_METRICS_LINE as L,NAMED_COLORS as N,SEGMENT_ORDER as w}from"./config.js";import{generateStatuslineScript as x}from"./generator.js";const y=".weave",b="statusline.json",m=".claude/helpers",d="statusline.cjs",T=".claude/settings.json",h="statusline.json";export function statuslineScriptRelPath(){return`${m}/${d}`}let p=l.join(I(),".weave");export function setGlobalStatuslineDir(t){p=t}async function _(t){try{return await E(t),!0}catch{return!1}}export async function readGlobalStatuslineConfig(){try{const t=await u(l.join(p,h),"utf-8");return{...a(JSON.parse(t)),source:"global"}}catch{return s}}export async function writeGlobalStatuslineConfig(t){await g(p,{recursive:!0});const n={...a(t),source:"global"};await f(l.join(p,h),`${JSON.stringify(n,null,2)}
|
|
2
|
+
`,"utf-8")}export async function readStatuslineConfig(t){const n=await readGlobalStatuslineConfig();try{const e=await u(l.join(t,y,b),"utf-8"),r=JSON.parse(e);return r.source==="custom"?a(r):n}catch{return n}}export async function writeStatuslineConfig(t,n){const e=l.join(t,y);await g(e,{recursive:!0});const o=(n.source??"global")==="global"?{source:"global"}:a(n);await f(l.join(e,b),`${JSON.stringify(o,null,2)}
|
|
3
|
+
`,"utf-8")}export async function writeStatuslineScript(t,n){const e=l.join(t,m);await g(e,{recursive:!0});const r=l.join(e,d);return await f(r,n,"utf-8"),r}export async function readStatuslineScript(t){try{return await u(l.join(t,m,d),"utf-8")}catch{return""}}export async function ensureSettingsStatusLine(t,n=30){const e=l.join(t,T),r=process.platform==="win32";let o={};if(await _(e))try{o=JSON.parse(await u(e,"utf-8"))}catch{o={}}const i=l.join(t,m,d),c=r?`node "${i}"`:`node ${i}`;o.statusLine={type:"command",command:c,padding:0,refreshInterval:Math.max(1,Math.round(n))},await g(l.dirname(e),{recursive:!0}),await f(e,`${JSON.stringify(o,null,2)}
|
|
4
|
+
`,"utf-8")}export async function applyStatuslineConfig(t,n){await writeStatuslineConfig(t,n);const e=(n.source??"global")==="global"?await readGlobalStatuslineConfig():a(n),r=x(e);await writeStatuslineScript(t,r),await ensureSettingsStatusLine(t,e.refreshInterval)}function $(t){let n,e=!1;if(t.lines?.length)n=t.lines.map(o=>[...o]);else if(t.order?.length){e=!0;const o=t.order;t.layout==="multi"?n=[C.filter(i=>o.includes(i)),L.filter(i=>o.includes(i))].filter(i=>i.length>0):n=[o]}else e=!0,n=s.lines.map(o=>[...o]);const r=new Set;if(n=n.map(o=>o.filter(i=>!w.includes(i)||r.has(i)?!1:(r.add(i),!0))),n.length===0&&(n=[[]]),e){const o=w.filter(i=>{if(r.has(i))return!1;const c=t.segments?.[i];return typeof c?.enabled=="boolean"?c.enabled:s.segments[i].enabled});o.length&&(n[0]=[...n[0],...o])}return n}const j=/^#[0-9a-fA-F]{6}$/,v=/^#([0-9a-fA-F]{3})$/,A=/^ansi256:(\d{1,3})$/;function S(t,n){if(typeof t!="string")return n;if(N.includes(t))return t;const e=A.exec(t);if(e){const o=Number(e[1]);return o>=0&&o<=255?`ansi256:${o}`:n}if(j.test(t))return t.toLowerCase();const r=v.exec(t);if(r){const[,o]=r;return`#${o[0]}${o[0]}${o[1]}${o[1]}${o[2]}${o[2]}`.toLowerCase()}return n}function O(t,n){if(!t||typeof t!="object")return{...n};const e=t,r={...n,...e,color:S(e.color,n.color),backgroundColor:e.backgroundColor==null?null:S(e.backgroundColor,n.backgroundColor??"gray")};return(typeof e.label!="string"||e.label==="")&&delete r.label,(typeof e.format!="string"||e.format==="")&&delete r.format,e.metric!=="session"&&e.metric!=="context"&&delete r.metric,e.window!=="five_hour"&&e.window!=="seven_day"&&e.window!=="spend"&&delete r.window,r}function F(t){const n=s.bar;if(!t||typeof t!="object")return{...n};const e=t,r=Math.round(Number(e.cells));return{cells:Number.isFinite(r)?Math.max(1,Math.min(40,r)):n.cells,fill:typeof e.fill=="string"&&e.fill!==""?e.fill:n.fill,empty:typeof e.empty=="string"&&e.empty!==""?e.empty:n.empty}}function a(t){const n={...s.segments};for(const r of Object.keys(n))n[r]=O(t.segments?.[r],n[r]);const e=t.refreshInterval;return{separator:t.separator??s.separator,align:t.align??s.align,logoText:s.logoText,logoColor:S(t.logoColor,s.logoColor),powerline:{...t.powerline,enabled:t.powerline?.enabled??s.powerline.enabled},lines:$(t),refreshInterval:e!=null&&e>=1?e:s.refreshInterval,source:t.source??s.source,bar:F(t.bar),divider:typeof t.divider=="string"?t.divider:s.divider,labelSeparator:typeof t.labelSeparator=="string"?t.labelSeparator:s.labelSeparator,segments:n}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRuntimeRegistry as n}from"@weavecode/harness";const t=n();export function assetSurfaceFor(
|
|
1
|
+
import{createRuntimeRegistry as n}from"@weavecode/harness";const t=n();export function assetSurfaceFor(e){const r=t.get(e)?.assets;if(!r)throw new Error(`no asset surface registered for harness: ${e}`);return r}export function assetSurfaces(){return t.all().map(e=>e.assets).filter(e=>e!==void 0)}export function pluginSurfaceFor(e){const r=t.get(e)?.plugins;if(!r)throw new Error(`no plugin surface registered for harness: ${e}`);return r}export function pluginSurfaces(){return t.all().filter(e=>e.plugins!==void 0).map(e=>({harness:e.id,surface:e.plugins}))}export function pluginStateFor(e){const r=t.get(e)?.pluginState;if(!r)throw new Error(`no plugin state surface registered for harness: ${e}`);return r}export function pluginStateSurfaces(){return t.all().filter(e=>e.pluginState!==void 0).map(e=>({harness:e.id,state:e.pluginState}))}export function messagingSurfaceFor(e){const r=t.get(e)?.messaging;if(!r)throw new Error(`no messaging surface registered for harness: ${e}`);return r}export function messagingSurfaces(){return t.all().filter(e=>e.messaging!==void 0).map(e=>({harness:e.id,surface:e.messaging}))}export function captureSurfaces(){return t.all().filter(e=>e.capture!==void 0).map(e=>({harness:e.id,surface:e.capture}))}export function blockingPromptFor(e){return t.get(e)?.questions??null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export class WatchCache{byProject=new Map;upsert(e,t){let r=this.byProject.get(e);r||(r=new Map,this.byProject.set(e,r)),r.set(t.relPath,t)}remove(e,t){this.byProject.get(e)?.delete(t)}list(e){const t=this.byProject.get(e);return t?[...t.values()].sort((r,
|
|
1
|
+
export class WatchCache{byProject=new Map;upsert(e,t){let r=this.byProject.get(e);r||(r=new Map,this.byProject.set(e,r)),r.set(t.relPath,t)}remove(e,t){this.byProject.get(e)?.delete(t)}list(e){const t=this.byProject.get(e);return t?[...t.values()].sort((r,c)=>r.relPath.localeCompare(c.relPath)):[]}clear(e){this.byProject.delete(e)}clearAll(){this.byProject.clear()}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assetSurfaces as
|
|
1
|
+
import{assetSurfaces as i}from"../surfaces.js";export function classifyAsset(s){const t=normalizeRelPath(s);if(t===".mcp.json")return"mcp";if(t.startsWith(".claude/skills/")||t.startsWith(".codex/skills/"))return"skill";if(t===".claude/settings.json"||t===".claude/settings.local.json"||t===".codex/config.toml")return"settings";if(t.startsWith(".claude/commands/")||t.startsWith(".codex/prompts/"))return"command";if(t.startsWith(".claude/agents/"))return"agent";if(t.startsWith(".claude/helpers/"))return"helper";if(t.startsWith(".claude/workflows/"))return"workflow";if(t.startsWith(".claude/rules/"))return"rule";if(t.startsWith(".claude/output-styles/"))return"output-style";if(t.startsWith(".claude/plugins/")||t.startsWith(".weave/plugins/"))return"plugin";const e=t.slice(t.lastIndexOf("/")+1);return e==="CLAUDE.md"||e==="AGENTS.md"?"instructions":"other"}export function classifyAgent(s){const t=normalizeRelPath(s);return i().find(r=>r.classify(t))?.harness??"claude"}export function normalizeRelPath(s){let t=s.replace(/\\/g,"/");for(;t.startsWith("./");)t=t.slice(2);for(;t.startsWith("/");)t=t.slice(1);return t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFileSync as
|
|
1
|
+
import{readFileSync as f,statSync as u,existsSync as o}from"node:fs";import n from"node:path";const l=8;export class PluginModsSniffer{cache=new Map;verdicts=new Map;revalidate;constructor(e={}){this.revalidate=e.revalidate??!0}refine(e,t,s){return e!=="plugin"?e:this.sniff(n.dirname(s))?"mods":"plugin"}sniff(e){if(!this.revalidate){const s=this.verdicts.get(e);if(s!==void 0)return s}const t=this.walkUp(e);return this.revalidate||this.verdicts.set(e,t),t}walkUp(e){let t=e;for(let s=0;s<l;s++){if(c(t))return!1;if(this.hooksMods(t))return!0;if(o(n.join(t,".claude-plugin","plugin.json")))return!1;const i=n.dirname(t);if(i===t)return!1;t=i}return!1}hooksMods(e){const t=n.join(e,"hooks","hooks.json"),s=this.cache.get(e);let i=-1;if(o(t))try{i=u(t).mtimeMs}catch{}if(i===-1)return s?.hooksMtimeMs!==-1&&this.cache.set(e,{mods:!1,hooksMtimeMs:-1}),!1;if(s&&s.hooksMtimeMs===i)return s.mods;const a=h(t);return this.cache.set(e,{mods:a,hooksMtimeMs:i}),a}}function c(r){if(n.basename(r)!=="plugins")return!1;const e=n.basename(n.dirname(r));return e===".claude"||e===".weave"}export function hasNonEmptyModules(r){if(!r||typeof r!="object"||Array.isArray(r))return!1;const e=r.modules;return Array.isArray(e)&&e.length>0}function h(r){try{return hasNonEmptyModules(JSON.parse(f(r,"utf8")))}catch{return!1}}
|
|
@@ -3,8 +3,12 @@ import type { LibraryRepository } from '../repositories/libraries.js';
|
|
|
3
3
|
import type { PluginManager } from '../hooks/plugin-loader.js';
|
|
4
4
|
import { FingerprintCache } from '../install/fingerprint.js';
|
|
5
5
|
/**
|
|
6
|
-
* SyncScheduler — periodically applies outdated updates to
|
|
7
|
-
*
|
|
6
|
+
* SyncScheduler — periodically applies outdated updates to every project.
|
|
7
|
+
*
|
|
8
|
+
* **自动/手动由 git 分类单点决定,不再是 per-project 开关**(用户裁决):不进 git
|
|
9
|
+
* 的 init 生成物与资产由这里自动刷新;会进 git 的一律只报不写,dashboard 提醒
|
|
10
|
+
* 用户跑 `weave init`。所以 tick 无条件扫全部项目,落盘范围由 `syncAll` 内部按
|
|
11
|
+
* git 归类分流。
|
|
8
12
|
*
|
|
9
13
|
* This is decoupled from the WatchService's 5s reconcile: sync runs on a longer
|
|
10
14
|
* cadence (default 60s) because it rehashes source directories and writes
|
|
@@ -21,7 +25,7 @@ export interface SyncSchedulerOptions {
|
|
|
21
25
|
/**
|
|
22
26
|
* 一轮同步落地后的对账面(项目角标刷新器)。资产写盘会经 watch → SSE 回流,
|
|
23
27
|
* 但项目插件模板的物化落点(`.claude/` 副本)不带 plugin.reloaded——角标只能
|
|
24
|
-
*
|
|
28
|
+
* 靠这一下对账,否则自动同步清掉漂移后角标会一直亮着。
|
|
25
29
|
*/
|
|
26
30
|
onSynced?: () => void;
|
|
27
31
|
}
|
|
@@ -37,6 +41,6 @@ export declare class SyncScheduler {
|
|
|
37
41
|
constructor(projects: ProjectRepository, libraries: LibraryRepository, options?: SyncSchedulerOptions);
|
|
38
42
|
start(): void;
|
|
39
43
|
stop(): void;
|
|
40
|
-
/** One sync sweep across all projects
|
|
44
|
+
/** One sync sweep across all projects. */
|
|
41
45
|
tick(): Promise<void>;
|
|
42
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FingerprintCache as
|
|
1
|
+
import{FingerprintCache as e}from"../install/fingerprint.js";import{buildLibraryIndex as n}from"../install/library-index.js";import{detectUpdates as a}from"../install/updates.js";import{syncAll as c}from"../install/apply-update.js";import{markSynced as h}from"../install/project-config.js";import{syncPlugins as o}from"../hooks/plugin-project-state.js";export class SyncScheduler{projects;libraries;timer;intervalMs;cache;plugins;onSynced;running=!1;constructor(r,s,t={}){this.projects=r,this.libraries=s,this.intervalMs=t.intervalMs??6e4,this.cache=t.cache??new e,this.plugins=t.plugins,this.onSynced=t.onSynced}start(){this.timer||(this.timer=setInterval(()=>{this.tick()},this.intervalMs))}stop(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}async tick(){if(!this.running&&this.libraries){this.running=!0;try{const r=this.libraries.list(),s=await n(r),t=this.plugins?.list().map(i=>i.id);for(const i of this.projects.list()){if(t)try{o(i,t,{projects:this.projects})}catch{}(await a(i.path,r,this.cache,s)).available!==0&&(await c(i.path,r,this.cache,s),await h(i.path,new Date().toISOString()),this.onSynced?.())}}finally{this.running=!1}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EventEmitter as
|
|
1
|
+
import{EventEmitter as w}from"node:events";import{existsSync as g,lstatSync as y,readdirSync as p,realpathSync as S,statSync as b,watch as d}from"node:fs";import h from"node:path";import{watch as v}from"chokidar";import{WatchCache as R}from"./cache.js";import{classifyAgent as T,classifyAsset as M,normalizeRelPath as f}from"./classifier.js";import{PluginModsSniffer as G}from"./plugin-mods.js";import{globalPersonalSkillRootsOwned as k}from"../install/global-config.js";import{assetSurfaces as I}from"../surfaces.js";const E="<global>",W=new G;export function shouldIgnore(c){return c===""||c==="."||c===".weave"||c.startsWith(".weave/")?!1:I().every(e=>e.ignore(c))}export class WatchService{projects;emitter=new w;watchers=new Map;cache=new R;debounceMs;reconcileMs;isIgnored;globalRootSource;timers=new Map;pending=new Map;reconcileTimer;globalRoots=new Map;globalPending=new Map;globalTimer;constructor(e,t={}){this.projects=e,this.debounceMs=t.debounceMs??300,this.reconcileMs=t.reconcileMs??5e3,this.isIgnored=t.isIgnored??shouldIgnore,this.globalRootSource=t.globalRootSource??k}start(){this.reconcile(),this.reconcileTimer=setInterval(()=>this.reconcile(),this.reconcileMs)}stop(){for(const e of this.watchers.values())e.close();this.watchers.clear();for(const e of[...this.globalRoots.keys()])this.unwatchGlobalRoot(e);for(const e of this.timers.values())clearTimeout(e);this.timers.clear(),this.pending.clear(),this.globalPending.clear(),this.globalTimer&&(clearTimeout(this.globalTimer),this.globalTimer=void 0),this.cache.clearAll(),this.reconcileTimer&&(clearInterval(this.reconcileTimer),this.reconcileTimer=void 0)}reconcile(){const e=new Set(this.projects.list().map(t=>t.path));for(const t of e)this.watchers.has(t)||(this.watchProject(t),this.watchers.has(t)&&this.emitter.emit("project",{action:"added",projectPath:t}));for(const t of[...this.watchers.keys()])e.has(t)||(this.unwatchProject(t),this.emitter.emit("project",{action:"removed",projectPath:t}));this.reconcileGlobalRoots()}reconcileGlobalRoots(){const e=this.globalRootSource(),t=new Set(e.map(s=>s.root));for(const{harness:s,root:o}of e){if(this.globalRoots.has(o)){this.syncGlobalEntries(o);continue}g(o)&&this.watchGlobalRoot(o,s)}for(const s of[...this.globalRoots.keys()])(!t.has(s)||!g(s))&&this.unwatchGlobalRoot(s)}getAssets(e){return this.cache.list(e)}subscribe(e){return this.emitter.on("change",e),()=>this.emitter.off("change",e)}subscribeProjects(e){return this.emitter.on("project",e),()=>this.emitter.off("project",e)}watchProject(e){if(!g(e))return;const s=this.projects.getByPath(e)?.name??h.basename(e),o=v(".",{cwd:e,ignored:i=>this.isIgnored(f(h.relative(e,i))),ignoreInitial:!1,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});this.watchers.set(e,o),o.on("add",i=>this.onFile(e,s,i,"add")),o.on("change",i=>this.onFile(e,s,i,"change")),o.on("unlink",i=>this.onFile(e,s,i,"unlink")),o.on("error",i=>this.emitter.emit("watch-error",i))}unwatchProject(e){const t=this.watchers.get(e);t&&(t.close(),this.watchers.delete(e));const s=this.timers.get(e);s&&(clearTimeout(s),this.timers.delete(e)),this.pending.delete(e),this.cache.clear(e)}watchGlobalRoot(e,t){const s=d(e,(o,i)=>{this.syncGlobalEntries(e),i&&this.emitGlobalPath(e,f(String(i)))});s.on("error",o=>this.emitter.emit("watch-error",o)),this.globalRoots.set(e,{harness:t,root:s,entries:new Map}),this.syncGlobalEntries(e)}syncGlobalEntries(e){const t=this.globalRoots.get(e);if(!t)return;let s;try{s=p(e)}catch{return}const o=new Set;for(const i of s){if(i.startsWith("."))continue;const n=h.join(e,i);let r;try{if(!b(n).isDirectory())continue;r=S(n)}catch{continue}o.add(i);const a=t.entries.get(i);if(a?.real===r)continue;a&&(a.watcher.close(),t.entries.delete(i));const l=d(r,{recursive:!0},(u,m)=>{m&&this.emitGlobalPath(e,f(h.join(i,String(m))))});l.on("error",()=>{l.close(),t.entries.delete(i)}),t.entries.set(i,{real:r,watcher:l})}for(const[i,n]of t.entries)o.has(i)||(n.watcher.close(),t.entries.delete(i))}unwatchGlobalRoot(e){const t=this.globalRoots.get(e);if(t){t.root.close();for(const s of t.entries.values())s.watcher.close();this.globalRoots.delete(e)}}emitGlobalPath(e,t){if(!t||t.split("/").some(i=>i.startsWith(".")))return;const s=h.join(e,t);let o="unlink";try{if(!b(s).isFile())return;o="change"}catch{}this.enqueueGlobal({projectPath:E,projectName:"global",category:"skill",agent:this.globalRoots.get(e)?.harness??"claude",relPath:t,absPath:s,kind:o})}enqueueGlobal(e){this.globalPending.set(e.absPath,e),this.globalTimer&&clearTimeout(this.globalTimer),this.globalTimer=setTimeout(()=>this.flushGlobal(),this.debounceMs)}flushGlobal(){this.globalTimer=void 0;for(const e of this.globalPending.values())this.emitter.emit("change",e);this.globalPending.clear()}onFile(e,t,s,o){const i=f(s),n=h.join(e,i);let r=M(i);o!=="unlink"&&r==="plugin"&&(r=W.refine(r,i,n));const a=T(i);let l;if(o==="unlink")this.cache.remove(e,i);else try{const u=y(n);l=u.isSymbolicLink()||void 0;const m=l?b(n).mtimeMs:u.mtimeMs;this.cache.upsert(e,{absPath:n,relPath:i,category:r,agent:a,mtimeMs:m,...l?{isSymlink:!0}:{}})}catch{this.cache.remove(e,i)}this.enqueue(e,{projectPath:e,projectName:t,category:r,agent:a,relPath:i,absPath:n,kind:o,...l?{isSymlink:!0}:{}})}enqueue(e,t){let s=this.pending.get(e);s||(s=new Map,this.pending.set(e,s)),s.set(t.relPath,t);const o=this.timers.get(e);o&&clearTimeout(o),this.timers.set(e,setTimeout(()=>this.flush(e),this.debounceMs))}flush(e){this.timers.delete(e);const t=this.pending.get(e);if(this.pending.delete(e),!!t)for(const s of t.values())this.emitter.emit("change",s)}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weavecode/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Weave daemon — HTTP server, SQLite data layer, and hook ingestion",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"node": ">=22.5.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@weavecode/core": "^0.1.
|
|
24
|
-
"@weavecode/harness": "^0.1.
|
|
25
|
-
"@weavecode/templates": "^0.1.
|
|
23
|
+
"@weavecode/core": "^0.1.1",
|
|
24
|
+
"@weavecode/harness": "^0.1.1",
|
|
25
|
+
"@weavecode/templates": "^0.1.1",
|
|
26
26
|
"chokidar": "^4.0.0",
|
|
27
27
|
"selfsigned": "^5.5.0",
|
|
28
28
|
"smol-toml": "^1.3.0",
|