mouaif 0.3.0
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/LICENSE +21 -0
- package/README.md +140 -0
- package/bin/mouaif.js +281 -0
- package/frontend/dist/assets/AgentFilePicker-CcKLJorU.js +1 -0
- package/frontend/dist/assets/CliModal-Hs5phmNZ.js +7 -0
- package/frontend/dist/assets/DictationPage-BI23lp42.js +2 -0
- package/frontend/dist/assets/FileEditor-DDl31c6d.js +2 -0
- package/frontend/dist/assets/GitModal-3EC_gpJ5.js +2 -0
- package/frontend/dist/assets/Inspector-Ba3R1w04.js +73 -0
- package/frontend/dist/assets/SettingsAbout-bvZGDEDw.js +1 -0
- package/frontend/dist/assets/SettingsActions-Dk6WX9jv.js +1 -0
- package/frontend/dist/assets/SettingsAgents-BNV0MgDB.js +1 -0
- package/frontend/dist/assets/SettingsDefaults-DbMmQbzc.js +1 -0
- package/frontend/dist/assets/SettingsHiddenContent-BZ2sloH1.js +1 -0
- package/frontend/dist/assets/SettingsMcp-DOrfbQd1.js +1 -0
- package/frontend/dist/assets/SettingsMcpEdit-BGMQ2CWC.js +3 -0
- package/frontend/dist/assets/SettingsMcpRegistry-BywXee_A.js +1 -0
- package/frontend/dist/assets/SettingsNotifications-B0LEs11a.js +1 -0
- package/frontend/dist/assets/SettingsPricing-BAg33iVF.js +1 -0
- package/frontend/dist/assets/SettingsProject-DNrKhCcZ.js +14 -0
- package/frontend/dist/assets/SettingsProjects-IqkBfDcm.js +1 -0
- package/frontend/dist/assets/SettingsPrompts-BgeiASuk.js +1 -0
- package/frontend/dist/assets/SettingsProviders-k0xJN0IK.js +1 -0
- package/frontend/dist/assets/SettingsTags-B5kjFdQi.js +1 -0
- package/frontend/dist/assets/agentNavigation-BiiCpFz5.js +1 -0
- package/frontend/dist/assets/codemirror-Bp6CUUFk.js +30 -0
- package/frontend/dist/assets/index-BGvI4n0T.js +61 -0
- package/frontend/dist/assets/index-Bgg1gnDf.css +1 -0
- package/frontend/dist/assets/index-C1sQFIC-.css +1 -0
- package/frontend/dist/assets/index-CANPYzQg.css +1 -0
- package/frontend/dist/assets/index-Crn1LdzK.css +1 -0
- package/frontend/dist/assets/index-FbCWDPiB.css +1 -0
- package/frontend/dist/assets/projectQS-D1cSZ7Gr.js +1 -0
- package/frontend/dist/assets/virtual-list-6H9b4K51.js +1 -0
- package/frontend/dist/icons/favicon-32.png +0 -0
- package/frontend/dist/icons/icon-180-apple.png +0 -0
- package/frontend/dist/icons/icon-192.png +0 -0
- package/frontend/dist/icons/icon-512.png +0 -0
- package/frontend/dist/icons/icon-maskable-512.png +0 -0
- package/frontend/dist/index.html +83 -0
- package/frontend/dist/manifest.webmanifest +33 -0
- package/frontend/dist/sw.js +482 -0
- package/package.json +98 -0
- package/scripts/patch-zimmerframe.js +58 -0
- package/src/access-auth.js +515 -0
- package/src/agentFeatures.js +294 -0
- package/src/agentFiles.js +164 -0
- package/src/agentSkills.js +147 -0
- package/src/agents.js +230 -0
- package/src/ai-chat.js +21 -0
- package/src/ai-endpoints.js +1880 -0
- package/src/ai-stream.js +2048 -0
- package/src/ai.js +68 -0
- package/src/auth.js +391 -0
- package/src/chatdb.js +816 -0
- package/src/chats.js +275 -0
- package/src/custom-actions.js +65 -0
- package/src/files.js +431 -0
- package/src/hideFileContent.js +327 -0
- package/src/http-server.js +535 -0
- package/src/index.js +15 -0
- package/src/inspector.js +731 -0
- package/src/inspectorProfiles.js +503 -0
- package/src/live-chat.js +107 -0
- package/src/mcp.js +1517 -0
- package/src/messages.js +238 -0
- package/src/modelList.js +137 -0
- package/src/notifications.js +52 -0
- package/src/oauth-anthropic.js +280 -0
- package/src/oauth-github-copilot.js +417 -0
- package/src/oauth-mcp.js +216 -0
- package/src/oauth-openrouter.js +285 -0
- package/src/package-version.js +20 -0
- package/src/projects.js +285 -0
- package/src/promptProfiles.js +256 -0
- package/src/prompts.js +384 -0
- package/src/providerShapes.js +44 -0
- package/src/providers/base.js +41 -0
- package/src/providers/index.js +25 -0
- package/src/push.js +315 -0
- package/src/qr.js +192 -0
- package/src/restart.js +47 -0
- package/src/server-handlers-access.js +306 -0
- package/src/server-handlers-actions.js +100 -0
- package/src/server-handlers-ai.js +248 -0
- package/src/server-handlers-auth.js +273 -0
- package/src/server-handlers-chats.js +1436 -0
- package/src/server-handlers-git.js +467 -0
- package/src/server-handlers-mcp-oauth.js +56 -0
- package/src/server-handlers-misc.js +783 -0
- package/src/server-handlers-projects.js +289 -0
- package/src/server-handlers-prompts.js +259 -0
- package/src/server-handlers-push.js +102 -0
- package/src/server-handlers-settings.js +406 -0
- package/src/server-handlers-tools.js +654 -0
- package/src/server-handlers-transcribe.js +399 -0
- package/src/server-shared.js +780 -0
- package/src/server-web-static.js +191 -0
- package/src/settings.js +898 -0
- package/src/statusBar.js +541 -0
- package/src/tags.js +414 -0
- package/src/toolFeedback.js +225 -0
- package/src/tools/ask.js +154 -0
- package/src/tools/authorization.js +932 -0
- package/src/tools/files.js +1150 -0
- package/src/tools/progress.js +71 -0
- package/src/tools/restart.js +32 -0
- package/src/tools/searchEngine.js +957 -0
- package/src/tools/shell.js +341 -0
- package/src/tools/subagent.js +47 -0
- package/src/tools/task.js +234 -0
- package/src/tools/webpreview.js +448 -0
- package/src/trace.js +103 -0
- package/src/transcribe.js +683 -0
- package/src/usage.js +389 -0
- package/src/util.js +151 -0
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mouaif",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "CLI tool with integrated HTTP server — REST API + Server-Sent Events",
|
|
5
|
+
"author": "Antoine Gjeloshaj <gjeloshaj.antoine@gmail.com>",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/GjeloshajAntoine/mouaif.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/GjeloshajAntoine/mouaif#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/GjeloshajAntoine/mouaif/issues"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public",
|
|
16
|
+
"registry": "https://registry.npmjs.org/"
|
|
17
|
+
},
|
|
18
|
+
"main": "src/index.js",
|
|
19
|
+
"bin": {
|
|
20
|
+
"mouaif": "./bin/mouaif.js"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"bin/",
|
|
24
|
+
"src/",
|
|
25
|
+
"frontend/dist",
|
|
26
|
+
"scripts/patch-zimmerframe.js",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"start": "node bin/mouaif.js",
|
|
32
|
+
"dev": "node bin/mouaif.js serve --watch",
|
|
33
|
+
"dev:web": "vite --config frontend/vite.config.js",
|
|
34
|
+
"build:web": "vite build --config frontend/vite.config.js",
|
|
35
|
+
"test:chat-view": "node scripts/test-chat-send-preparation.js && node scripts/test-chat-cost-summary.js && node scripts/test-chat-scroll-performance.js && node scripts/test-chat-draft-performance.js && node scripts/test-message-copy.js",
|
|
36
|
+
"docs:build": "node scripts/build-docs.js",
|
|
37
|
+
"docs:build:internal": "node scripts/build-docs.js --with-internal",
|
|
38
|
+
"docs:publish": "node scripts/publish-docs.js",
|
|
39
|
+
"docs:shots": "node scripts/capture-landing-shots.js",
|
|
40
|
+
"test:dictation": "node scripts/test-dictation.js && node scripts/test-dictation-http.mjs && node scripts/test-dictation-page.mjs && node scripts/test-dictation-catalog-live.mjs && node scripts/test-dictation-chat.cjs && node --check scripts/test-dictation-ui.mjs",
|
|
41
|
+
"test:ask-user": "node scripts/test-ask-user.js && node scripts/test-ask-card-dedupe.js && node scripts/test-ask-card-summary.mjs",
|
|
42
|
+
"fixture:ask-ui": "node scripts/ask-ui-fixture.mjs --write /tmp/mouaif-ask-ui",
|
|
43
|
+
"test:hide-file-slices": "node scripts/test-hide-file-slices.js",
|
|
44
|
+
"test:hide-file-char-spans": "node scripts/test-hide-file-char-spans.js",
|
|
45
|
+
"test:hidden-content": "node scripts/test-project-settings-render.mjs && node scripts/test-project-settings-payload.js && node scripts/test-hide-file-slices.js && node scripts/test-hide-file-char-spans.js && node scripts/test-hidden-content-editor.mjs && node scripts/test-hidden-content-list.mjs && node scripts/test-hidden-content-http.mjs",
|
|
46
|
+
"test:docker": "docker compose -f compose.test.yaml up --build --abort-on-container-exit --exit-code-from test",
|
|
47
|
+
"postinstall": "node scripts/patch-zimmerframe.js",
|
|
48
|
+
"prepare": "node scripts/prepare-web.js",
|
|
49
|
+
"prepack": "npm run build:web",
|
|
50
|
+
"test:inspector": "node scripts/test-inspector-preview-quality.js && node scripts/test-inspector-preview-tap.js && node scripts/test-inspector-preview-zoom.js && node scripts/test-inspector-status-tone.js && node scripts/test-inspector-styles.js && node scripts/test-inspector-live-shot.js && node scripts/test-inspector-capture-queue.js && node scripts/test-inspector-matched-rules.js && node scripts/test-inspector-computed-filter.js && node scripts/test-inspector-styles-order.js && node scripts/test-inspector-declaration.js && node scripts/test-inspector-feature-inventory.js && node scripts/test-inspector-js-console-mobile.js && node scripts/test-inspector-fullscreen.js && node scripts/test-inspector-pick-mode.js && node scripts/test-inspector-target-bar.js && node scripts/test-inspector-value-kinds.js && node scripts/test-inspector-value-index.js && node scripts/test-inspector-snapping.js && node scripts/test-inspector-contrast.js && node scripts/test-inspector-value-rail.js && node scripts/test-inspector-value-shapes.js && node scripts/test-inspector-shorthand.js && node scripts/test-inspector-intent.js && node scripts/test-inspector-scope.js && node scripts/test-inspector-touch-controls.js && node scripts/test-inspector-pinned-stack.js && node scripts/test-inspector-profiles.js && node scripts/test-inspector-logs-errors.js && node scripts/test-inspector-add-to-chat.js",
|
|
51
|
+
"lint": "node -c src/oauth-mcp.js && node -c src/server-handlers-mcp-oauth.js && node -c scripts/test-mcp-oauth.js && node --check scripts/test-mcp-arguments.mjs && node -c bin/mouaif.js && node -c src/index.js && node -c src/access-auth.js && node -c src/qr.js && node -c src/messages.js && node -c src/toolFeedback.js && node -c src/trace.js && node -c src/oauth-anthropic.js && node -c src/chats.js && node -c src/projects.js && node -c src/settings.js && node -c src/ai.js && node -c src/auth.js && node -c src/inspector.js && node -c src/inspectorProfiles.js && node -c scripts/test-inspector-profiles.js && node -c src/mcp.js && node -c src/usage.js && node -c scripts/test-model-pricing-coverage.js && node -c src/prompts.js && node -c src/promptProfiles.js && node -c src/tags.js && node -c src/agents.js && node -c src/agentFiles.js && node -c src/agentSkills.js && node -c scripts/test-agent-skills.js && node -c src/agentFeatures.js && node -c src/files.js && node -c src/chatdb.js && node -c src/push.js && node -c src/notifications.js && node -c src/server-handlers-access.js && node -c scripts/test-login-notifications.js && node -c scripts/test-access-disable.js && node -c scripts/test-status-bar-sizing.js && node -c src/statusBar.js && node -c src/live-chat.js && node -c src/transcribe.js && node -c src/providerShapes.js && node -c scripts/test-provider-shapes.js && node -c src/modelList.js && node -c src/server-handlers-transcribe.js && node -c scripts/test-dictation.js && node --check scripts/test-dictation-http.mjs && node --check scripts/test-dictation-page.mjs && node -c scripts/test-dictation-chat.cjs && node --check scripts/test-dictation-ui.mjs && node --check scripts/test-dictation-catalog-live.mjs && node --check scripts/test-model-lists-live-route.mjs && node --check scripts/dictation-ui-fixture-router.js && node -c src/tools/shell.js && node -c src/tools/subagent.js && node -c src/tools/ask.js && node -c src/tools/authorization.js && node -c src/tools/files.js && node -c src/tools/searchEngine.js && node -c scripts/test-search-engine.js && node -c src/hideFileContent.js && node -c scripts/test-hide-file-slices.js && node -c scripts/test-file-preview-safety.js && node -c scripts/test-web-csp.js && node -c scripts/test-routes.js && node -c scripts/test-modal-hook.js && node -c scripts/inspector-css.js && node -c frontend/src/hooks/useModal.js && node -c frontend/src/hooks/modalStack.js && node -c scripts/test-hide-file-char-spans.js && node --check scripts/test-hidden-content-editor.mjs && node --check scripts/test-hidden-content-list.mjs && node --check scripts/test-hidden-content-http.mjs && node --check scripts/test-hidden-content-ui.mjs && node --check scripts/test-project-settings-render.mjs && node --check frontend/src/components/settings/hiddenRanges.js && node -c src/tools/webpreview.js && node -c src/server-handlers-tools.js && node -c src/oauth-github-copilot.js && node -c src/oauth-openrouter.js && node -c frontend/vite.config.js && node -c frontend/src/routes.js && node -c frontend/src/router.js && node -c frontend/build/generate-icons.js && node -c frontend/build/sw-src.js && node -c frontend/build/check-icons.js && node -c scripts/build-docs.js && node -c scripts/publish-docs.js && node -c scripts/capture-landing-shots.js && node -c scripts/lib/landing-fixture.js && node -c scripts/test-prompts.js && node -c scripts/test-tool-feedback.js && node -c scripts/test-file-tool-off-advertisement.js && node -c scripts/test-agents.js && node --check scripts/test-agent-page-flow.mjs && node --check frontend/src/components/settings/agentAutosave.js && node --check frontend/src/components/settings/agentNavigation.js && node -c scripts/test-agents-http.js && node -c scripts/test-agent-files.js && node -c scripts/test-mcp-http-transport.js && node -c scripts/test-usage-accumulation.js && node -c scripts/test-round-cost-doublecount.js && node -c scripts/test-restart-supervisor.js && node -c scripts/test-messages-since.js && node -c scripts/test-messages-window.js && node -c scripts/test-chat-pagination.js && node -c scripts/test-chat-pagination-drain.js && node -c scripts/test-chat-switcher-pagination.js && node -c scripts/test-chat-list-cost-scope.js && node -c scripts/test-chat-list-message-count.js && node -c scripts/test-chat-list-draft-payload.js && node -c scripts/test-subagent-progress-notify.js && node -c scripts/test-subagent-cost-total.js && node -c scripts/test-subagent-live-cost.js && node -c scripts/test-live-chat.js && node -c scripts/test-msg-merge.js && node -c scripts/test-chat-auto-retry-once.js && node -c scripts/test-agent-command-card.js && node -c scripts/test-at-mention-caret.js && node -c scripts/test-auth-shortcut-scope.js && node -c scripts/test-image-lightbox-teardown.js && node -c scripts/test-msg-seq-e2e.js && node -c scripts/test-project-db-backed.js && node -c scripts/test-project-canonical-dirs.js && node -c scripts/test-settings-resolution.js && node -c scripts/test-project-json-atomic-write.js && node -c scripts/test-app-settings-corruption.js && node -c scripts/test-project-settings-payload.js && node -c scripts/test-webpreview-viewport.js && node -c scripts/test-webpreview-endpoint.js && node -c scripts/test-custom-actions.js && node --check scripts/test-custom-action-schema.mjs && node -c src/custom-actions.js && node -c src/server-handlers-actions.js && node -c frontend/src/components/chat/gitCount.js && node --check scripts/test-git-count-format.mjs && node -c frontend/src/components/chat/msgMerge.js && node -c frontend/src/components/chat/retry.js && node -c frontend/src/components/chat/annotation.js && node -c frontend/src/components/chat/utils.js && node -c scripts/test-retry-restoration.js && node -c scripts/test-composer-annotations.js && node -c scripts/test-inspector-styles.js && node -c frontend/src/components/inspector/liveShot.js && node -c scripts/test-inspector-live-shot.js && node -c scripts/test-inspector-preview-zoom.js && node -c scripts/test-inspector-status-tone.js && node -c scripts/test-inspector-capture-queue.js && node --check scripts/test-inspector-matched-rules.js && node --check scripts/test-inspector-computed-filter.js && node --check scripts/test-inspector-styles-order.js && node --check frontend/src/components/inspector/stylesOrder.js && node --check frontend/src/components/inspector/matchedRules.js && node --check frontend/src/components/inspector/computedFilter.js && node -c scripts/docker-smoke-test.js && node -c scripts/test-cli-session-newline.js && node -c scripts/test-cli-pty-interactive.js && node -c scripts/test-cli-strip-ansi.js && node --check scripts/test-file-orb.mjs && node -c frontend/src/components/chat/fileOrb.js && node --check scripts/test-composer-tools.mjs && node -c frontend/src/components/chat/atMention.js && node -c scripts/test-at-mention-priority.js && node --check scripts/test-at-invocations.mjs && node --check scripts/test-composer-actions.mjs && node -c scripts/test-url-decode-safety.js && node --check scripts/test-markdown-safety.mjs && node -c scripts/test-project-model-safety.js && node -c scripts/test-authorization-clear-grants.js && node -c scripts/test-chat-tool-authorization.js && node --check frontend/src/components/settings/toolAuth.js && node -c scripts/test-shell-timeout-clamp.js && node -c scripts/test-virtual-list-range.js && node -c scripts/test-virtual-list-scroll.js && node -c scripts/test-inspector-event-buffers.js && node -c scripts/test-inspector-logs-errors.js && node -c scripts/test-inspector-add-to-chat.js && node -c frontend/src/components/inspector/entryText.js && node -c scripts/test-chat-stream-abort.js && node -c scripts/test-provider-request-shape.js && node -c scripts/test-web-static-containment.js && node -c scripts/test-inspector-overview-poll.js && node -c scripts/test-sse-frame-splitting.js && node -c scripts/test-data-endpoint-hardening.js && node -c scripts/test-transcript-append-keeps-backfill.js && node -c frontend/src/components/chat/headerCards.js && node -c scripts/test-transcript-header-order.js && node -c scripts/test-tool-call-id-matching.js && node -c scripts/test-ask-card-dedupe.js && node --check scripts/test-ask-card-summary.mjs && node --check scripts/ask-ui-fixture.mjs && node -c scripts/test-shell-card-command.js && node -c scripts/test-write-file-preview.js && node -c scripts/test-read-image-preview.js && node -c scripts/test-subagent-transcript-parity.js && node -c scripts/test-subagent-agent-label.js && node -c scripts/test-subagent-expand-state.js && node -c scripts/test-inspector-feature-inventory.js && node -c scripts/test-inspector-js-console-mobile.js && node -c scripts/test-inspector-fullscreen.js && node -c scripts/test-inspector-pick-mode.js && node -c scripts/test-inspector-target-bar.js && node --check frontend/src/components/inspector/pickMode.js && node --check frontend/src/components/inspector/targetBar.js && node --check frontend/src/components/inspector/valueKinds.js && node --check frontend/src/components/inspector/valueIndex.js && node -c frontend/src/components/inspector/snapping.js && node -c frontend/src/components/inspector/contrast.js && node -c scripts/test-inspector-snapping.js && node -c scripts/test-inspector-contrast.js && node -c frontend/src/components/inspector/valueRail.js && node -c scripts/test-inspector-value-rail.js && node -c frontend/src/components/inspector/valueShapes.js && node -c scripts/test-inspector-value-shapes.js && node -c frontend/src/components/inspector/shorthand.js && node -c scripts/test-inspector-shorthand.js && node -c frontend/src/components/inspector/intent.js && node -c scripts/test-inspector-intent.js && node --check frontend/src/components/inspector/scope.js && node -c frontend/src/components/inspector/styleControls.js && node -c scripts/test-inspector-touch-controls.js && node -c frontend/src/components/inspector/pinnedStack.js && node -c scripts/test-inspector-pinned-stack.js && node -c scripts/test-inspector-declaration.js && node --check frontend/src/components/inspector/declaration.js && node -c frontend/src/sw-controller-reload.js && node -c frontend/src/sw-registration.js && node --check scripts/test-web-install.mjs && node -c scripts/prepare-web.js && node --check scripts/test-sw-controller-reload.mjs && node --check scripts/test-index-first-paint.mjs",
|
|
52
|
+
"test": "node scripts/test-mcp-arguments.mjs && node scripts/test-mcp-oauth.js && npm run test:dictation && npm run test:inspector && npm run test:chat-view && node scripts/test-access-auth.js && node scripts/test-access-disable.js && node scripts/test-security-boundary.js && node scripts/test-tool-authorization.js && node scripts/test-mcp-authorization-gate.js && node scripts/test-file-tool-off-advertisement.js && node scripts/test-chat-trace.js && node scripts/test-tool-feedback.js && node scripts/test-shell-tool.js && node scripts/test-shell-stream.js && node scripts/test-live-model-resolution.js && node scripts/test-model-lists.js && node scripts/test-model-lists-live-route.mjs && node scripts/test-provider-cache-usage.js && node scripts/test-model-pricing-coverage.js && node scripts/test-prompt-cache-key.js && node scripts/test-oauth-callback.js && node scripts/test-openrouter.js && node scripts/test-anthropic-tools.js && node scripts/test-prompt-profiles.js && node scripts/test-prompts.js && node scripts/test-tags.js && node scripts/test-agents.js && node scripts/test-agent-page-flow.mjs && node scripts/test-agents-http.js && node scripts/test-agent-files.js && node scripts/test-agent-skills.js && node scripts/test-file-editor.js && node scripts/test-file-editor-http.js && node scripts/test-file-preview-safety.js && node scripts/test-web-csp.js && node scripts/test-routes.js && node scripts/test-modal-hook.js && node scripts/test-file-tools.js && node scripts/test-search-engine.js && node scripts/test-hide-file-content.js && npm run test:hidden-content && node scripts/test-mcp.js && node scripts/test-mcp-http-transport.js && node scripts/test-mcp-scope.js && node scripts/test-mcp-scope-http.js && node scripts/test-pwa.js && node scripts/test-index-first-paint.mjs && node scripts/test-push-notifications.js && node scripts/test-status-bar-sizing.js && node scripts/test-login-notifications.js && node scripts/test-subagent-progress-notify.js && node scripts/test-subagent-cost-total.js && node scripts/test-subagent-live-cost.js && node scripts/test-tools-toggle.js && node scripts/test-tools-list.js && node scripts/test-ask-user.js && node scripts/test-usage-accumulation.js && node scripts/test-round-cost-doublecount.js && node scripts/test-restart-supervisor.js && node scripts/test-messages-since.js && node scripts/test-messages-window.js && node scripts/test-chat-pagination.js && node scripts/test-chat-pagination-drain.js && node scripts/test-chat-switcher-pagination.js && node scripts/test-chat-list-cost-scope.js && node scripts/test-chat-list-message-count.js && node scripts/test-chat-list-draft-payload.js && node scripts/test-msg-merge.js && node scripts/test-chat-auto-retry-once.js && node scripts/test-agent-command-card.js && node scripts/test-at-mention-caret.js && node scripts/test-auth-shortcut-scope.js && node scripts/test-image-lightbox-teardown.js && node scripts/test-git-count-format.mjs && node scripts/test-file-orb.mjs && node scripts/test-composer-tools.mjs && node scripts/test-msg-seq-e2e.js && node scripts/test-retry-restoration.js && node scripts/test-composer-annotations.js && node scripts/test-live-chat.js && node scripts/test-project-db-backed.js && node scripts/test-project-canonical-dirs.js && node scripts/test-settings-resolution.js && node scripts/test-project-json-atomic-write.js && node scripts/test-app-settings-corruption.js && node scripts/test-project-settings-payload.js && node scripts/test-webpreview-viewport.js && node scripts/test-webpreview-endpoint.js && node scripts/test-custom-actions.js && node scripts/test-custom-action-schema.mjs && node scripts/test-cli-session-newline.js && node scripts/test-cli-pty-interactive.js && node scripts/test-cli-strip-ansi.js && node scripts/test-at-mention-priority.js && node scripts/test-at-invocations.mjs && node scripts/test-composer-actions.mjs && node scripts/test-url-decode-safety.js && node scripts/test-markdown-safety.mjs && node scripts/test-project-model-safety.js && node scripts/test-authorization-clear-grants.js && node scripts/test-shell-timeout-clamp.js && node scripts/test-virtual-list-range.js && node scripts/test-virtual-list-scroll.js && node scripts/test-inspector-event-buffers.js && node scripts/test-chat-stream-abort.js && node scripts/test-provider-request-shape.js && node scripts/test-web-static-containment.js && node scripts/test-inspector-overview-poll.js && node scripts/test-sse-frame-splitting.js && node scripts/test-sw-controller-reload.mjs && node scripts/test-data-endpoint-hardening.js && node scripts/test-transcript-append-keeps-backfill.js && node scripts/test-transcript-header-order.js && node scripts/test-tool-call-id-matching.js && node scripts/test-ask-card-dedupe.js && node scripts/test-ask-card-summary.mjs && node scripts/test-shell-card-command.js && node scripts/test-write-file-preview.js && node scripts/test-read-image-preview.js && node scripts/test-subagent-transcript-parity.js && node scripts/test-subagent-agent-label.js && node scripts/test-subagent-expand-state.js && node scripts/test-provider-shapes.js && node scripts/test-web-install.mjs",
|
|
53
|
+
"prepublishOnly": "npm run lint && npm run build:web && npm run docs:build && node scripts/check-npm-name.js",
|
|
54
|
+
"docs:publish:check": "node scripts/publish-docs.js --check",
|
|
55
|
+
"test:cli": "node scripts/test-cli-session-newline.js && node scripts/test-cli-strip-ansi.js && node scripts/test-cli-pty-interactive.js"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"cli",
|
|
59
|
+
"server",
|
|
60
|
+
"sse",
|
|
61
|
+
"rest",
|
|
62
|
+
"http"
|
|
63
|
+
],
|
|
64
|
+
"license": "MIT",
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@codemirror/commands": "^6.10.4",
|
|
67
|
+
"@codemirror/lang-css": "^6.3.1",
|
|
68
|
+
"@codemirror/lang-html": "^6.4.11",
|
|
69
|
+
"@codemirror/lang-javascript": "^6.2.5",
|
|
70
|
+
"@codemirror/lang-json": "^6.0.2",
|
|
71
|
+
"@codemirror/lang-markdown": "^6.5.1",
|
|
72
|
+
"@codemirror/lang-python": "^6.2.1",
|
|
73
|
+
"@codemirror/language": "^6.12.4",
|
|
74
|
+
"@codemirror/search": "^6.7.1",
|
|
75
|
+
"@codemirror/state": "^6.7.1",
|
|
76
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
77
|
+
"@codemirror/view": "^6.43.6",
|
|
78
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
79
|
+
"@napi-rs/keyring": "^1.3.0",
|
|
80
|
+
"@preact/signals": "^1.3.4",
|
|
81
|
+
"better-sqlite3": "^11.10.0",
|
|
82
|
+
"codemirror": "^6.0.2",
|
|
83
|
+
"commander": "^12.0.0",
|
|
84
|
+
"node-pty": "^1.1.0",
|
|
85
|
+
"preact": "^10.29.7",
|
|
86
|
+
"web-push": "^3.6.7",
|
|
87
|
+
"ws": "^8.21.0"
|
|
88
|
+
},
|
|
89
|
+
"engines": {
|
|
90
|
+
"node": ">=18.0.0"
|
|
91
|
+
},
|
|
92
|
+
"devDependencies": {
|
|
93
|
+
"@preact/preset-vite": "^2.10.5",
|
|
94
|
+
"cssnano": "^8.0.2",
|
|
95
|
+
"postcss": "^8.5.22",
|
|
96
|
+
"vite": "^5.4.21"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// postinstall patch: zimmerframe is ESM-only with no `require` export
|
|
2
|
+
// condition, but `@preact/preset-vite`'s `transform-hook-names` plugin
|
|
3
|
+
// loads it via `require('zimmerframe')` from a CJS file. On Node 22
|
|
4
|
+
// this throws `No "exports" main defined` and the dev server is
|
|
5
|
+
// unusable for any JSX file that uses hooks.
|
|
6
|
+
//
|
|
7
|
+
// We rewrite zimmerframe's `package.json` to expose `./src/walk.js`
|
|
8
|
+
// as the CJS entry too. The package is one file (~3 KB) that re-exports
|
|
9
|
+
// the same symbols as the ESM entry, so a thin CJS wrapper is enough.
|
|
10
|
+
//
|
|
11
|
+
// This is a no-op if zimmerframe isn't installed, if it already has
|
|
12
|
+
// a `require` field, or if the file is read-only.
|
|
13
|
+
|
|
14
|
+
'use strict';
|
|
15
|
+
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const path = require('path');
|
|
18
|
+
|
|
19
|
+
const target = path.join(__dirname, '..', 'node_modules', 'zimmerframe', 'package.json');
|
|
20
|
+
if (!fs.existsSync(target)) {
|
|
21
|
+
// No zimmerframe installed (project doesn't use @preact/preset-vite
|
|
22
|
+
// with this Node version, or a peer dep was skipped). Nothing to do.
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
let pkg;
|
|
27
|
+
try { pkg = JSON.parse(fs.readFileSync(target, 'utf8')); }
|
|
28
|
+
catch (e) {
|
|
29
|
+
console.error('patch-zimmerframe: could not read', target, e.message);
|
|
30
|
+
process.exit(0);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Idempotency: if we already added a `require` field, leave the file
|
|
34
|
+
// alone. We use a marker in the description to detect re-runs.
|
|
35
|
+
if (pkg.exports && pkg.exports['.'] && pkg.exports['.']['require']) {
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Add the `require` condition. The `import` condition keeps working
|
|
40
|
+
// exactly as before; CJS users now resolve to the same ESM source
|
|
41
|
+
// file, which Node 22 can load as CJS via `require(esm)`.
|
|
42
|
+
pkg.exports = pkg.exports || {};
|
|
43
|
+
pkg.exports['.'] = Object.assign({}, pkg.exports['.'] || {}, {
|
|
44
|
+
require: './src/walk.js',
|
|
45
|
+
import: pkg.exports['.'] && pkg.exports['.'].import ? pkg.exports['.'].import : './src/walk.js'
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// Marker so re-runs of the script don't double-apply. The description
|
|
49
|
+
// is human-readable only; the require field is the real signal.
|
|
50
|
+
pkg.description = (pkg.description || '') + ' [patched for CJS interop]';
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
fs.writeFileSync(target, JSON.stringify(pkg, null, 2) + '\n', 'utf8');
|
|
54
|
+
console.log('patch-zimmerframe: added `require` condition to zimmerframe/package.json');
|
|
55
|
+
} catch (e) {
|
|
56
|
+
// Read-only filesystems (CI sandboxes, locked deps) are non-fatal.
|
|
57
|
+
console.error('patch-zimmerframe: could not write', target, e.message);
|
|
58
|
+
}
|