@herbertgao/pi-extensions 2026.9.17 → 2026.9.19
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 +31 -33
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/node_modules/@herbertgao/pi-bark/package.json +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +4 -1
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +4 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/working-message.ts +21 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/index.ts +15 -4
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/index.ts +43 -7
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +7 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +75 -75
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/package.json +7 -7
- package/node_modules/@herbertgao/resume-from/package.json +4 -2
- package/node_modules/@herbertgao/sol-pi/package.json +6 -6
- package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +99 -99
- package/node_modules/@pi-plugins/fast-mode/package.json +1 -1
- package/node_modules/@tifan/pi-handoff/package.json +1 -1
- package/node_modules/@tifan/pi-handoff/src/index.ts +56 -26
- package/node_modules/@tifan/pi-mermaid-open/package.json +1 -1
- package/node_modules/@tifan/pi-preferred-thinking/package.json +1 -1
- package/node_modules/@tifan/pi-recap/package.json +1 -1
- package/node_modules/@tifan/pi-rename/package.json +1 -1
- package/node_modules/pi-antigravity/README.md +29 -6
- package/node_modules/pi-antigravity/package.json +14 -9
- package/node_modules/pi-antigravity/src/auth/accounts.ts +327 -0
- package/node_modules/pi-antigravity/src/auth/index.ts +9 -0
- package/node_modules/pi-antigravity/src/client/client.ts +1 -1
- package/node_modules/pi-antigravity/src/image/image.ts +4 -4
- package/node_modules/pi-antigravity/src/index.ts +203 -13
- package/node_modules/pi-antigravity/src/search/index.ts +1 -0
- package/node_modules/pi-antigravity/src/search/search.ts +325 -0
- package/node_modules/pi-antigravity/src/stream/stream.ts +191 -14
- package/node_modules/pi-antigravity/src/types/enums.ts +45 -36
- package/node_modules/pi-antigravity/src/types/types.ts +5 -12
- package/node_modules/pi-antigravity/src/utils/http.ts +7 -2
- package/node_modules/pi-antigravity/src/utils/util.ts +31 -3
- package/node_modules/pi-lens/package.json +158 -158
- package/node_modules/pi-multi-account/package.json +2 -2
- package/node_modules/pi-typesafe/README.md +3 -1
- package/node_modules/pi-typesafe/dist/auth.d.ts +9 -5
- package/node_modules/pi-typesafe/dist/auth.js +7 -3
- package/node_modules/pi-typesafe/dist/backends.d.ts +33 -3
- package/node_modules/pi-typesafe/dist/backends.js +95 -1
- package/node_modules/pi-typesafe/dist/client.d.ts +5 -5
- package/node_modules/pi-typesafe/dist/client.js +12 -9
- package/node_modules/pi-typesafe/dist/credentials.d.ts +14 -8
- package/node_modules/pi-typesafe/dist/credentials.js +10 -7
- package/node_modules/pi-typesafe/dist/errors.d.ts +2 -2
- package/node_modules/pi-typesafe/dist/index.d.ts +2 -2
- package/node_modules/pi-typesafe/dist/index.js +1 -1
- package/node_modules/pi-typesafe/dist/login.d.ts +2 -2
- package/node_modules/pi-typesafe/dist/login.js +2 -2
- package/node_modules/pi-typesafe/package.json +6 -5
- package/node_modules/pi-web-access/CHANGELOG.md +72 -0
- package/node_modules/pi-web-access/README.md +34 -13
- package/node_modules/pi-web-access/chrome-cookies.ts +79 -25
- package/node_modules/pi-web-access/curator-page.ts +5 -1
- package/node_modules/pi-web-access/curator-server.ts +2 -0
- package/node_modules/pi-web-access/dist/index.js +1337 -1009
- package/node_modules/pi-web-access/exa.ts +20 -52
- package/node_modules/pi-web-access/extract.ts +41 -4
- package/node_modules/pi-web-access/gemini-search.ts +12 -4
- package/node_modules/pi-web-access/index.ts +29 -37
- package/node_modules/pi-web-access/openai-search.ts +35 -7
- package/node_modules/pi-web-access/package.json +8 -7
- package/node_modules/pi-web-access/page-query.ts +2 -2
- package/node_modules/pi-web-access/query-rewrite.ts +2 -3
- package/node_modules/pi-web-access/ssrf-protection.ts +27 -10
- package/node_modules/pi-web-access/storage.ts +48 -77
- package/node_modules/pi-web-access/summary-model-scope.ts +6 -77
- package/node_modules/pi-web-access/summary-review.ts +3 -4
- package/node_modules/pi-web-access/tavily.ts +67 -20
- package/node_modules/pi-web-access/tool-activation.ts +53 -33
- package/node_modules/pi-web-access/utils.ts +1 -1
- package/node_modules/pi-web-access/you.ts +164 -0
- package/node_modules/pi-web-access/zai.ts +161 -0
- package/node_modules/remote-pi/package.json +5 -1
- package/package.json +19 -31
- package/node_modules/pi-mcp-adapter/CHANGELOG.md +0 -1013
- package/node_modules/pi-mcp-adapter/LICENSE +0 -21
- package/node_modules/pi-mcp-adapter/OAUTH.md +0 -369
- package/node_modules/pi-mcp-adapter/README.md +0 -1021
- package/node_modules/pi-mcp-adapter/abort.ts +0 -34
- package/node_modules/pi-mcp-adapter/agent-dir.ts +0 -68
- package/node_modules/pi-mcp-adapter/agent-plugin-loader.ts +0 -416
- package/node_modules/pi-mcp-adapter/agent-plugin-provenance.ts +0 -36
- package/node_modules/pi-mcp-adapter/app-bridge.bundle.js +0 -67
- package/node_modules/pi-mcp-adapter/banner.png +0 -0
- package/node_modules/pi-mcp-adapter/bearer-command-resolver.ts +0 -193
- package/node_modules/pi-mcp-adapter/claude-plugin-loader.ts +0 -365
- package/node_modules/pi-mcp-adapter/cli.js +0 -454
- package/node_modules/pi-mcp-adapter/commands.ts +0 -861
- package/node_modules/pi-mcp-adapter/config.ts +0 -1565
- package/node_modules/pi-mcp-adapter/consent-manager.ts +0 -95
- package/node_modules/pi-mcp-adapter/direct-tool-surface.ts +0 -244
- package/node_modules/pi-mcp-adapter/direct-tools.ts +0 -428
- package/node_modules/pi-mcp-adapter/dist/abort.d.ts +0 -2
- package/node_modules/pi-mcp-adapter/dist/abort.js +0 -36
- package/node_modules/pi-mcp-adapter/dist/abort.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/agent-dir.d.ts +0 -10
- package/node_modules/pi-mcp-adapter/dist/agent-dir.js +0 -63
- package/node_modules/pi-mcp-adapter/dist/agent-dir.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.d.ts +0 -8
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.js +0 -398
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.d.ts +0 -1
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.js +0 -31
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/bearer-command-resolver.d.ts +0 -6
- package/node_modules/pi-mcp-adapter/dist/bearer-command-resolver.js +0 -194
- package/node_modules/pi-mcp-adapter/dist/bearer-command-resolver.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.d.ts +0 -9
- package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.js +0 -362
- package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/config.d.ts +0 -134
- package/node_modules/pi-mcp-adapter/dist/config.js +0 -1361
- package/node_modules/pi-mcp-adapter/dist/config.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/consent-manager.d.ts +0 -18
- package/node_modules/pi-mcp-adapter/dist/consent-manager.js +0 -88
- package/node_modules/pi-mcp-adapter/dist/consent-manager.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/elicitation-handler.d.ts +0 -17
- package/node_modules/pi-mcp-adapter/dist/elicitation-handler.js +0 -316
- package/node_modules/pi-mcp-adapter/dist/elicitation-handler.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/errors.d.ts +0 -131
- package/node_modules/pi-mcp-adapter/dist/errors.js +0 -278
- package/node_modules/pi-mcp-adapter/dist/errors.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/http-ca.d.ts +0 -8
- package/node_modules/pi-mcp-adapter/dist/http-ca.js +0 -88
- package/node_modules/pi-mcp-adapter/dist/http-ca.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/jev-client.d.ts +0 -14
- package/node_modules/pi-mcp-adapter/dist/jev-client.js +0 -367
- package/node_modules/pi-mcp-adapter/dist/jev-client.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/jev-contracts.d.ts +0 -77
- package/node_modules/pi-mcp-adapter/dist/jev-contracts.js +0 -2
- package/node_modules/pi-mcp-adapter/dist/jev-contracts.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/jev-key-store.d.ts +0 -51
- package/node_modules/pi-mcp-adapter/dist/jev-key-store.js +0 -205
- package/node_modules/pi-mcp-adapter/dist/jev-key-store.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/json-schema-validator.d.ts +0 -2
- package/node_modules/pi-mcp-adapter/dist/json-schema-validator.js +0 -68
- package/node_modules/pi-mcp-adapter/dist/json-schema-validator.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/lifecycle.d.ts +0 -56
- package/node_modules/pi-mcp-adapter/dist/lifecycle.js +0 -410
- package/node_modules/pi-mcp-adapter/dist/lifecycle.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/logger.d.ts +0 -51
- package/node_modules/pi-mcp-adapter/dist/logger.js +0 -131
- package/node_modules/pi-mcp-adapter/dist/logger.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-fetch.d.ts +0 -26
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-fetch.js +0 -103
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-fetch.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-flow.d.ts +0 -118
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-flow.js +0 -1097
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-flow.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-auth.d.ts +0 -170
- package/node_modules/pi-mcp-adapter/dist/mcp-auth.js +0 -1142
- package/node_modules/pi-mcp-adapter/dist/mcp-auth.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-bearer-store.d.ts +0 -24
- package/node_modules/pi-mcp-adapter/dist/mcp-bearer-store.js +0 -203
- package/node_modules/pi-mcp-adapter/dist/mcp-bearer-store.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-callback-server.d.ts +0 -53
- package/node_modules/pi-mcp-adapter/dist/mcp-callback-server.js +0 -441
- package/node_modules/pi-mcp-adapter/dist/mcp-callback-server.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-oauth-provider.d.ts +0 -148
- package/node_modules/pi-mcp-adapter/dist/mcp-oauth-provider.js +0 -689
- package/node_modules/pi-mcp-adapter/dist/mcp-oauth-provider.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-probe.d.ts +0 -6
- package/node_modules/pi-mcp-adapter/dist/mcp-probe.js +0 -166
- package/node_modules/pi-mcp-adapter/dist/mcp-probe.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-tasks.d.ts +0 -102
- package/node_modules/pi-mcp-adapter/dist/mcp-tasks.js +0 -369
- package/node_modules/pi-mcp-adapter/dist/mcp-tasks.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-trace.d.ts +0 -95
- package/node_modules/pi-mcp-adapter/dist/mcp-trace.js +0 -242
- package/node_modules/pi-mcp-adapter/dist/mcp-trace.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/metadata-cache.d.ts +0 -19
- package/node_modules/pi-mcp-adapter/dist/metadata-cache.js +0 -301
- package/node_modules/pi-mcp-adapter/dist/metadata-cache.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/npx-resolver.d.ts +0 -6
- package/node_modules/pi-mcp-adapter/dist/npx-resolver.js +0 -505
- package/node_modules/pi-mcp-adapter/dist/npx-resolver.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.d.ts +0 -2
- package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.js +0 -144
- package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/request-headers-command.d.ts +0 -10
- package/node_modules/pi-mcp-adapter/dist/request-headers-command.js +0 -312
- package/node_modules/pi-mcp-adapter/dist/request-headers-command.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/resource-tools.d.ts +0 -1
- package/node_modules/pi-mcp-adapter/dist/resource-tools.js +0 -15
- package/node_modules/pi-mcp-adapter/dist/resource-tools.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/runtime-owner.d.ts +0 -13
- package/node_modules/pi-mcp-adapter/dist/runtime-owner.js +0 -97
- package/node_modules/pi-mcp-adapter/dist/runtime-owner.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/sampling-handler.d.ts +0 -17
- package/node_modules/pi-mcp-adapter/dist/sampling-handler.js +0 -203
- package/node_modules/pi-mcp-adapter/dist/sampling-handler.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/secure-keyring.d.ts +0 -11
- package/node_modules/pi-mcp-adapter/dist/secure-keyring.js +0 -172
- package/node_modules/pi-mcp-adapter/dist/secure-keyring.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/server-manager.d.ts +0 -157
- package/node_modules/pi-mcp-adapter/dist/server-manager.js +0 -1745
- package/node_modules/pi-mcp-adapter/dist/server-manager.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/session-approvals.d.ts +0 -34
- package/node_modules/pi-mcp-adapter/dist/session-approvals.js +0 -140
- package/node_modules/pi-mcp-adapter/dist/session-approvals.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/session-recovery.d.ts +0 -26
- package/node_modules/pi-mcp-adapter/dist/session-recovery.js +0 -142
- package/node_modules/pi-mcp-adapter/dist/session-recovery.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/state.d.ts +0 -73
- package/node_modules/pi-mcp-adapter/dist/state.js +0 -2
- package/node_modules/pi-mcp-adapter/dist/state.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/types.d.ts +0 -642
- package/node_modules/pi-mcp-adapter/dist/types.js +0 -331
- package/node_modules/pi-mcp-adapter/dist/types.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/ui-app-bridge-helpers.d.ts +0 -6
- package/node_modules/pi-mcp-adapter/dist/ui-app-bridge-helpers.js +0 -37
- package/node_modules/pi-mcp-adapter/dist/ui-app-bridge-helpers.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/ui-resource-handler.d.ts +0 -17
- package/node_modules/pi-mcp-adapter/dist/ui-resource-handler.js +0 -219
- package/node_modules/pi-mcp-adapter/dist/ui-resource-handler.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/ui-stream-types.d.ts +0 -104
- package/node_modules/pi-mcp-adapter/dist/ui-stream-types.js +0 -59
- package/node_modules/pi-mcp-adapter/dist/ui-stream-types.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/ui-tool-visibility.d.ts +0 -4
- package/node_modules/pi-mcp-adapter/dist/ui-tool-visibility.js +0 -27
- package/node_modules/pi-mcp-adapter/dist/ui-tool-visibility.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/unix-socket-transport.d.ts +0 -15
- package/node_modules/pi-mcp-adapter/dist/unix-socket-transport.js +0 -85
- package/node_modules/pi-mcp-adapter/dist/unix-socket-transport.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/utils.d.ts +0 -41
- package/node_modules/pi-mcp-adapter/dist/utils.js +0 -417
- package/node_modules/pi-mcp-adapter/dist/utils.js.map +0 -1
- package/node_modules/pi-mcp-adapter/elicitation-handler.ts +0 -358
- package/node_modules/pi-mcp-adapter/error-signal.ts +0 -32
- package/node_modules/pi-mcp-adapter/errors.ts +0 -364
- package/node_modules/pi-mcp-adapter/examples/jev-accessibility-loop.mjs +0 -85
- package/node_modules/pi-mcp-adapter/examples/jev-semantic-filter.mjs +0 -34
- package/node_modules/pi-mcp-adapter/failure-backoff.ts +0 -23
- package/node_modules/pi-mcp-adapter/glimpse-ui.ts +0 -80
- package/node_modules/pi-mcp-adapter/host-html-template.ts +0 -515
- package/node_modules/pi-mcp-adapter/http-ca.ts +0 -84
- package/node_modules/pi-mcp-adapter/index.ts +0 -2106
- package/node_modules/pi-mcp-adapter/init.ts +0 -721
- package/node_modules/pi-mcp-adapter/jev-client.ts +0 -300
- package/node_modules/pi-mcp-adapter/jev-contracts.ts +0 -53
- package/node_modules/pi-mcp-adapter/jev-key-store.ts +0 -192
- package/node_modules/pi-mcp-adapter/json-schema-validator.ts +0 -83
- package/node_modules/pi-mcp-adapter/lazy-loader.ts +0 -7
- package/node_modules/pi-mcp-adapter/lifecycle.ts +0 -457
- package/node_modules/pi-mcp-adapter/logger.ts +0 -169
- package/node_modules/pi-mcp-adapter/mcp-auth-fetch.ts +0 -113
- package/node_modules/pi-mcp-adapter/mcp-auth-flow.ts +0 -1296
- package/node_modules/pi-mcp-adapter/mcp-auth.ts +0 -1287
- package/node_modules/pi-mcp-adapter/mcp-bearer-store.ts +0 -250
- package/node_modules/pi-mcp-adapter/mcp-callback-server.ts +0 -534
- package/node_modules/pi-mcp-adapter/mcp-code.ts +0 -495
- package/node_modules/pi-mcp-adapter/mcp-install.ts +0 -60
- package/node_modules/pi-mcp-adapter/mcp-keyring-helper.cjs +0 -89
- package/node_modules/pi-mcp-adapter/mcp-oauth-provider.ts +0 -819
- package/node_modules/pi-mcp-adapter/mcp-output-guard.ts +0 -511
- package/node_modules/pi-mcp-adapter/mcp-panel-theme.ts +0 -104
- package/node_modules/pi-mcp-adapter/mcp-panel.ts +0 -1099
- package/node_modules/pi-mcp-adapter/mcp-probe.ts +0 -201
- package/node_modules/pi-mcp-adapter/mcp-references.ts +0 -373
- package/node_modules/pi-mcp-adapter/mcp-script-worker.mjs +0 -137
- package/node_modules/pi-mcp-adapter/mcp-setup-panel.ts +0 -747
- package/node_modules/pi-mcp-adapter/mcp-status.ts +0 -105
- package/node_modules/pi-mcp-adapter/mcp-tasks.ts +0 -467
- package/node_modules/pi-mcp-adapter/mcp-trace.ts +0 -306
- package/node_modules/pi-mcp-adapter/metadata-cache.ts +0 -362
- package/node_modules/pi-mcp-adapter/namespace-tools.ts +0 -334
- package/node_modules/pi-mcp-adapter/npx-resolver.ts +0 -543
- package/node_modules/pi-mcp-adapter/oauth-handler.ts +0 -30
- package/node_modules/pi-mcp-adapter/oauth.ts +0 -52
- package/node_modules/pi-mcp-adapter/onboarding-state.ts +0 -76
- package/node_modules/pi-mcp-adapter/package-mcp-loader.ts +0 -156
- package/node_modules/pi-mcp-adapter/package.json +0 -219
- package/node_modules/pi-mcp-adapter/panel-keys.ts +0 -53
- package/node_modules/pi-mcp-adapter/prompts.ts +0 -385
- package/node_modules/pi-mcp-adapter/proxy-modes.ts +0 -1735
- package/node_modules/pi-mcp-adapter/request-headers-command.ts +0 -333
- package/node_modules/pi-mcp-adapter/resource-tools.ts +0 -17
- package/node_modules/pi-mcp-adapter/runtime-owner.ts +0 -106
- package/node_modules/pi-mcp-adapter/sampling-handler.ts +0 -261
- package/node_modules/pi-mcp-adapter/sandbox-proxy-template.ts +0 -144
- package/node_modules/pi-mcp-adapter/search-ranking.ts +0 -309
- package/node_modules/pi-mcp-adapter/secure-keyring.ts +0 -170
- package/node_modules/pi-mcp-adapter/semantic-search.ts +0 -186
- package/node_modules/pi-mcp-adapter/server-manager.ts +0 -2088
- package/node_modules/pi-mcp-adapter/session-approvals.ts +0 -201
- package/node_modules/pi-mcp-adapter/session-recovery.ts +0 -158
- package/node_modules/pi-mcp-adapter/skills/mcp-scripting/SKILL.md +0 -49
- package/node_modules/pi-mcp-adapter/state.ts +0 -71
- package/node_modules/pi-mcp-adapter/tool-approval.ts +0 -205
- package/node_modules/pi-mcp-adapter/tool-metadata.ts +0 -302
- package/node_modules/pi-mcp-adapter/tool-registrar.ts +0 -255
- package/node_modules/pi-mcp-adapter/tool-result-renderer.ts +0 -573
- package/node_modules/pi-mcp-adapter/ts-shape.ts +0 -149
- package/node_modules/pi-mcp-adapter/types.ts +0 -1120
- package/node_modules/pi-mcp-adapter/ui-app-bridge-helpers.ts +0 -40
- package/node_modules/pi-mcp-adapter/ui-resource-handler.ts +0 -266
- package/node_modules/pi-mcp-adapter/ui-server.ts +0 -993
- package/node_modules/pi-mcp-adapter/ui-session.ts +0 -624
- package/node_modules/pi-mcp-adapter/ui-stream-types.ts +0 -89
- package/node_modules/pi-mcp-adapter/ui-tool-visibility.ts +0 -25
- package/node_modules/pi-mcp-adapter/unix-socket-transport.ts +0 -85
- package/node_modules/pi-mcp-adapter/utils.ts +0 -464
|
@@ -1,42 +1,51 @@
|
|
|
1
|
-
export
|
|
2
|
-
Off
|
|
3
|
-
Minimal
|
|
4
|
-
Low
|
|
5
|
-
Medium
|
|
6
|
-
High
|
|
7
|
-
Xhigh
|
|
8
|
-
}
|
|
1
|
+
export const ThinkingEffort = {
|
|
2
|
+
Off: "off",
|
|
3
|
+
Minimal: "minimal",
|
|
4
|
+
Low: "low",
|
|
5
|
+
Medium: "medium",
|
|
6
|
+
High: "high",
|
|
7
|
+
Xhigh: "xhigh",
|
|
8
|
+
} as const;
|
|
9
|
+
export type ThinkingEffort = (typeof ThinkingEffort)[keyof typeof ThinkingEffort];
|
|
9
10
|
|
|
10
|
-
export
|
|
11
|
-
Auto
|
|
12
|
-
None
|
|
13
|
-
Any
|
|
14
|
-
Required
|
|
15
|
-
}
|
|
11
|
+
export const ToolChoice = {
|
|
12
|
+
Auto: "auto",
|
|
13
|
+
None: "none",
|
|
14
|
+
Any: "any",
|
|
15
|
+
Required: "required",
|
|
16
|
+
} as const;
|
|
17
|
+
export type ToolChoice = (typeof ToolChoice)[keyof typeof ToolChoice];
|
|
16
18
|
|
|
17
|
-
export
|
|
18
|
-
None
|
|
19
|
-
Any
|
|
20
|
-
Auto
|
|
21
|
-
Validated
|
|
22
|
-
}
|
|
19
|
+
export const GeminiToolCallingMode = {
|
|
20
|
+
None: "NONE",
|
|
21
|
+
Any: "ANY",
|
|
22
|
+
Auto: "AUTO",
|
|
23
|
+
Validated: "VALIDATED",
|
|
24
|
+
} as const;
|
|
25
|
+
export type GeminiToolCallingMode =
|
|
26
|
+
(typeof GeminiToolCallingMode)[keyof typeof GeminiToolCallingMode];
|
|
23
27
|
|
|
24
|
-
export
|
|
25
|
-
User
|
|
26
|
-
Model
|
|
27
|
-
}
|
|
28
|
+
export const GeminiRole = {
|
|
29
|
+
User: "user",
|
|
30
|
+
Model: "model",
|
|
31
|
+
} as const;
|
|
32
|
+
export type GeminiRole = (typeof GeminiRole)[keyof typeof GeminiRole];
|
|
28
33
|
|
|
29
|
-
export
|
|
30
|
-
Agent
|
|
31
|
-
}
|
|
34
|
+
export const AntigravityRequestType = {
|
|
35
|
+
Agent: "agent",
|
|
36
|
+
} as const;
|
|
37
|
+
export type AntigravityRequestType =
|
|
38
|
+
(typeof AntigravityRequestType)[keyof typeof AntigravityRequestType];
|
|
32
39
|
|
|
33
|
-
export
|
|
34
|
-
Antigravity
|
|
35
|
-
}
|
|
40
|
+
export const AntigravityUserAgent = {
|
|
41
|
+
Antigravity: "antigravity",
|
|
42
|
+
} as const;
|
|
43
|
+
export type AntigravityUserAgent = (typeof AntigravityUserAgent)[keyof typeof AntigravityUserAgent];
|
|
36
44
|
|
|
37
|
-
export
|
|
38
|
-
Stop
|
|
39
|
-
Length
|
|
40
|
-
ToolUse
|
|
41
|
-
Error
|
|
42
|
-
}
|
|
45
|
+
export const StopReason = {
|
|
46
|
+
Stop: "stop",
|
|
47
|
+
Length: "length",
|
|
48
|
+
ToolUse: "toolUse",
|
|
49
|
+
Error: "error",
|
|
50
|
+
} as const;
|
|
51
|
+
export type StopReason = (typeof StopReason)[keyof typeof StopReason];
|
|
@@ -6,14 +6,7 @@ import type {
|
|
|
6
6
|
ThinkingContent,
|
|
7
7
|
ToolCall,
|
|
8
8
|
} from "@earendil-works/pi-ai";
|
|
9
|
-
import type {
|
|
10
|
-
AntigravityRequestType,
|
|
11
|
-
AntigravityUserAgent,
|
|
12
|
-
GeminiRole,
|
|
13
|
-
GeminiToolCallingMode,
|
|
14
|
-
ThinkingEffort,
|
|
15
|
-
ToolChoice,
|
|
16
|
-
} from "./enums.js";
|
|
9
|
+
import type { GeminiRole, GeminiToolCallingMode, ThinkingEffort, ToolChoice } from "./enums.js";
|
|
17
10
|
|
|
18
11
|
// OAuth & Auth Types
|
|
19
12
|
export type AntigravityOAuthCredentials = OAuthCredentials & {
|
|
@@ -52,7 +45,7 @@ export const ANTIGRAVITY_API = "antigravity-api" as const;
|
|
|
52
45
|
export type AntigravityApi = typeof ANTIGRAVITY_API;
|
|
53
46
|
|
|
54
47
|
export type AntigravityStreamOptions = Omit<SimpleStreamOptions, "toolChoice"> & {
|
|
55
|
-
toolChoice?: ToolChoice
|
|
48
|
+
toolChoice?: ToolChoice;
|
|
56
49
|
};
|
|
57
50
|
|
|
58
51
|
export type GeminiTextPart = { text: string; thoughtSignature?: string };
|
|
@@ -116,7 +109,7 @@ export type GeminiGenerationConfig = {
|
|
|
116
109
|
export type GeminiRequestBody = {
|
|
117
110
|
contents: GeminiContent[];
|
|
118
111
|
systemInstruction: {
|
|
119
|
-
role:
|
|
112
|
+
role: "user";
|
|
120
113
|
parts: GeminiTextPart[];
|
|
121
114
|
};
|
|
122
115
|
generationConfig?: GeminiGenerationConfig;
|
|
@@ -130,8 +123,8 @@ export type AntigravityGenerateRequest = {
|
|
|
130
123
|
project: string;
|
|
131
124
|
model: string;
|
|
132
125
|
request: GeminiRequestBody;
|
|
133
|
-
requestType:
|
|
134
|
-
userAgent:
|
|
126
|
+
requestType: "agent";
|
|
127
|
+
userAgent: "antigravity";
|
|
135
128
|
requestId: string;
|
|
136
129
|
};
|
|
137
130
|
|
|
@@ -23,6 +23,7 @@ const PREWARM_TIMEOUT_MS = 5_000;
|
|
|
23
23
|
type DispatcherInit = RequestInit & { dispatcher?: unknown };
|
|
24
24
|
|
|
25
25
|
let dispatcherPromise: Promise<unknown> | undefined;
|
|
26
|
+
let prewarmStarted = false;
|
|
26
27
|
|
|
27
28
|
function hasProxyConfiguration(): boolean {
|
|
28
29
|
return ["HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY", "http_proxy", "https_proxy", "all_proxy"].some(
|
|
@@ -71,11 +72,15 @@ export async function antigravityFetch(
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
/**
|
|
74
|
-
* Open the TLS connection
|
|
75
|
-
*
|
|
75
|
+
* Open the TLS connection on the first Antigravity request so that turn does not
|
|
76
|
+
* pay the handshake. Not called at extension load: an unauthenticated HEAD to the
|
|
77
|
+
* endpoint can stall Node's event loop until connect timeout and freeze Pi startup.
|
|
78
|
+
* Best-effort: failures are ignored. Subsequent calls are no-ops.
|
|
76
79
|
*/
|
|
77
80
|
export function prewarmConnection(url: string): void {
|
|
78
81
|
if (antigravityEnv("NO_PREWARM") === "1") return;
|
|
82
|
+
if (prewarmStarted) return;
|
|
83
|
+
prewarmStarted = true;
|
|
79
84
|
void (async () => {
|
|
80
85
|
try {
|
|
81
86
|
const res = await antigravityFetch(url, {
|
|
@@ -52,14 +52,35 @@ export type AntigravityEnvelopeOptions = {
|
|
|
52
52
|
userTurnIndex?: number;
|
|
53
53
|
trajectoryId?: string;
|
|
54
54
|
conversationId?: string;
|
|
55
|
+
lastExecutionId?: string;
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
const sessionTrajectoryMap = new Map<string, { conversationId: string; trajectoryId: string }>();
|
|
58
59
|
|
|
59
60
|
/** Stable conversationId and trajectoryId within a multi-turn conversation session. */
|
|
60
|
-
export function resolveSessionTrajectory(
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
export function resolveSessionTrajectory(
|
|
62
|
+
context?: {
|
|
63
|
+
messages?: Array<{ role?: string; timestamp?: number; content?: unknown }>;
|
|
64
|
+
},
|
|
65
|
+
sessionId?: string,
|
|
66
|
+
): { conversationId: string; trajectoryId: string } {
|
|
67
|
+
if (sessionId?.trim()) {
|
|
68
|
+
const seed = `session:${sessionId.trim()}`;
|
|
69
|
+
let entry = sessionTrajectoryMap.get(seed);
|
|
70
|
+
if (!entry) {
|
|
71
|
+
entry = {
|
|
72
|
+
conversationId: stableUuid(`antigravity:conv:${seed}`),
|
|
73
|
+
trajectoryId: stableUuid(`antigravity:traj:${seed}`),
|
|
74
|
+
};
|
|
75
|
+
sessionTrajectoryMap.set(seed, entry);
|
|
76
|
+
if (sessionTrajectoryMap.size > 64) {
|
|
77
|
+
const oldestKey = sessionTrajectoryMap.keys().next().value;
|
|
78
|
+
if (oldestKey !== undefined) sessionTrajectoryMap.delete(oldestKey);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return entry;
|
|
82
|
+
}
|
|
83
|
+
|
|
63
84
|
const firstMsg = context?.messages?.[0];
|
|
64
85
|
if (!firstMsg) {
|
|
65
86
|
return { conversationId: crypto.randomUUID(), trajectoryId: crypto.randomUUID() };
|
|
@@ -124,6 +145,13 @@ export function antigravityRequestEnvelope(
|
|
|
124
145
|
labels.model_enum = modelEnum;
|
|
125
146
|
}
|
|
126
147
|
|
|
148
|
+
// Pure agy CLI wire alignment: last_execution_id is the execution ID of the previous turn.
|
|
149
|
+
// It is only present on subsequent turns (step > 1), never on the initial turn (step <= 1).
|
|
150
|
+
if (step > 1) {
|
|
151
|
+
labels.last_execution_id =
|
|
152
|
+
options.lastExecutionId || stableUuid(`antigravity:exec:${trajectoryId}:${step - 1}`);
|
|
153
|
+
}
|
|
154
|
+
|
|
127
155
|
return {
|
|
128
156
|
requestId: `agent/${agentId}/${Date.now()}/${trajectoryId}/${step}`,
|
|
129
157
|
sessionId,
|
|
@@ -1,160 +1,160 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
2
|
+
"name": "pi-lens",
|
|
3
|
+
"version": "4.3.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Real-time code feedback for pi — LSP, linters, formatters, type-checking, structural analysis & booboo",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/apmantza/pi-lens.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"bin": {
|
|
12
|
+
"pi-lens": "dist/mcp/cli.js",
|
|
13
|
+
"pi-lens-mcp": "dist/mcp/server.js",
|
|
14
|
+
"pi-lens-analyze": "dist/mcp/analyze-cli.js"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc --project tsconfig.build.json",
|
|
18
|
+
"build:dist": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && node scripts/build-dist-tsc.mjs tsconfig.dist.json && npm run bundle:dist",
|
|
19
|
+
"bundle:dist": "node scripts/bundle-dist.mjs",
|
|
20
|
+
"prepare": "npm run build:dist && node scripts/download-grammars.js --core --dest grammars && node scripts/setup-git-hooks.mjs && node scripts/warm-loader-cache.mjs",
|
|
21
|
+
"prepack": "node scripts/strip-dev-deps-for-pack.mjs --strip",
|
|
22
|
+
"postpack": "node scripts/strip-dev-deps-for-pack.mjs --restore",
|
|
23
|
+
"lint": "tsc --project tsconfig.json && npm run lint:js && npm run lint:js:tests",
|
|
24
|
+
"lint:js": "oxlint --deny-warnings --import-plugin --promise-plugin -D block-scoped-var -D import/default -D import/namespace -D import/no-absolute-path -D import/no-empty-named-blocks -D import/no-named-as-default -D import/no-self-import -D no-extend-native -D no-extra-bind -D no-implied-eval -D no-new -D no-unexpected-multiline -D no-useless-constructor -D oxc/approx-constant -D oxc/misrefactored-assign-op -D oxc/no-accumulating-spread -D oxc/no-async-endpoint-handlers -D oxc/no-this-in-exported-function -D promise/no-callback-in-promise -D promise/no-multiple-resolved -D promise/no-new-statics -D promise/valid-params -D typescript/no-confusing-non-null-assertion -D typescript/no-extraneous-class -D typescript/no-unnecessary-type-constraint -D typescript/no-unsafe-enum-comparison -D unicorn/no-accessor-recursion -D unicorn/no-array-fill-with-reference-type -D unicorn/no-confusing-array-with -D unicorn/no-instanceof-builtins -D unicorn/prefer-array-flat-map -D unicorn/require-module-specifiers --ignore-pattern \"tests/**/*.ts\" --ignore-pattern \"tests/**/*.tsx\" --ignore-pattern \"**/*.d.mts\" --ignore-pattern \"tests/fixtures/autofix-smoke/**\" --ignore-pattern \"tests/fixtures/format-smoke/**\" --ignore-pattern \"tests/fixtures/tool-smoke/**\" --ignore-pattern \"tests/fixtures/call-graph/javascript/**\" --ignore-pattern \"tests/fixtures/function-facts/javascript-parameter.js\" .",
|
|
25
|
+
"lint:js:advisory": "node scripts/lint-js-advisory.mjs --deny-warnings --format unix -D correctness -D suspicious -D perf --import-plugin --promise-plugin --type-aware -A no-underscore-dangle -A no-await-in-loop -A unicorn/no-array-sort -A unicorn/consistent-function-scoping -A promise/no-promise-in-callback -A no-useless-call -A import/no-unassigned-import -A no-unmodified-loop-condition --ignore-pattern \"**/*.d.mts\" --ignore-pattern \"tests/fixtures/autofix-smoke/**\" --ignore-pattern \"tests/fixtures/format-smoke/**\" --ignore-pattern \"tests/fixtures/tool-smoke/**\" --ignore-pattern \"tests/fixtures/call-graph/javascript/**\" --ignore-pattern \"tests/fixtures/function-facts/javascript-parameter.js\" .",
|
|
26
|
+
"lint:js:tests": "node scripts/lint-js-advisory.mjs --deny-warnings --format unix --type-aware -A correctness -A suspicious -A perf --ignore-pattern \"tests/fixtures/**\" tests",
|
|
27
|
+
"depcruise:check": "depcruise --validate --config .dependency-cruiser.cjs --ignore-known .dependency-cruiser-known-violations.json --output-type err index.ts \"clients/**/*.ts\"",
|
|
28
|
+
"fmt": "oxfmt",
|
|
29
|
+
"fmt:check": "oxfmt --check",
|
|
30
|
+
"taplo": "taplo check $(git ls-files '*.toml' ':!tests/fixtures/**') && taplo fmt --check $(git ls-files '*.toml' ':!tests/fixtures/**' ':!config/ruff/core.toml') # taplo 0.7.0 panics on this file's comments; lint it above",
|
|
31
|
+
"watch": "tsc --watch",
|
|
32
|
+
"test": "node scripts/with-test-lock.mjs -- vitest run",
|
|
33
|
+
"test:unit": "node scripts/with-test-lock.mjs -- vitest run",
|
|
34
|
+
"test:integration": "node scripts/with-test-lock.mjs -- vitest run tests/index-integration.test.ts tests/clients/lsp/integration.test.ts",
|
|
35
|
+
"test:targeted": "node scripts/with-test-lock.mjs --shared -- vitest run",
|
|
36
|
+
"test:watch": "vitest",
|
|
37
|
+
"test:real-harness": "node scripts/with-test-lock.mjs --shared -- vitest run",
|
|
38
|
+
"mutation:diff": "node scripts/stryker-diff.mjs --base origin/master --max-files 6",
|
|
39
|
+
"hygiene": "node scripts/prune-agent-worktrees.mjs",
|
|
40
|
+
"check": "node scripts/check-extensions.mjs",
|
|
41
|
+
"selftest:install": "node scripts/install-selftest.mjs",
|
|
42
|
+
"check:lockfile": "node scripts/check-lockfile-sync.mjs",
|
|
43
|
+
"preflight": "node scripts/pr-preflight.mjs",
|
|
44
|
+
"knip": "node scripts/run-knip.mjs",
|
|
45
|
+
"check:grammars": "node scripts/check-grammar-provenance.mjs",
|
|
46
|
+
"check:grammar-load": "node scripts/check-grammar-load.mjs",
|
|
47
|
+
"audit:tree-sitter": "node scripts/audit-tree-sitter-rules.mjs",
|
|
48
|
+
"audit:rule-catalog": "node scripts/validate-rule-catalog.mjs",
|
|
49
|
+
"audit:astgrep-rule-pairs": "node scripts/audit-astgrep-rule-pairs.mjs",
|
|
50
|
+
"astgrep:self-scan": "node scripts/run-astgrep-pi-lens.mjs",
|
|
51
|
+
"astgrep:self-scan:update-baseline": "node scripts/run-astgrep-pi-lens.mjs --update-baseline",
|
|
52
|
+
"audit:playground": "node scripts/playground-verify-rule.mjs",
|
|
53
|
+
"bench:cascade-budget": "node scripts/bench-cascade-budget.mjs",
|
|
54
|
+
"bench:word-index-replacement": "node scripts/bench-word-index-replacement.mjs",
|
|
55
|
+
"logs:smells": "node scripts/analyze-pi-lens-logs.mjs",
|
|
56
|
+
"complexity": "node scripts/complexity-report.mjs",
|
|
57
|
+
"changelog:check": "node scripts/rollup-changelog.mjs --check",
|
|
58
|
+
"test:regen": "node scripts/regen-test-baseline.mjs",
|
|
59
|
+
"changelog:release": "node scripts/changelog-release.mjs",
|
|
60
|
+
"changelog:extract": "node scripts/changelog-extract.mjs",
|
|
61
|
+
"release:backfill-notes": "node scripts/backfill-github-releases.mjs",
|
|
62
|
+
"release:backfill-thanks": "node scripts/backfill-release-thanks.mjs",
|
|
63
|
+
"docs:rule-catalogs": "node scripts/gen-rule-catalogs.mjs",
|
|
64
|
+
"banner": "npx -y sharp-cli --input banner.svg --output banner.png resize 2200 620",
|
|
65
|
+
"download-grammars": "node scripts/download-grammars.js",
|
|
66
|
+
"harness:poc": "node scripts/run-harness.mjs cases/ts/pipeline-dispatch-poc",
|
|
67
|
+
"harness:python-poc": "node scripts/run-harness.mjs cases/python/pipeline-dispatch-poc",
|
|
68
|
+
"harness:ts-format-poc": "node scripts/run-harness.mjs cases/ts/format-default-poc",
|
|
69
|
+
"harness:python-autofix-poc": "node scripts/run-harness.mjs cases/python/autofix-default-poc",
|
|
70
|
+
"harness:go-poc": "node scripts/run-harness.mjs cases/go/pipeline-dispatch-poc"
|
|
71
|
+
},
|
|
72
|
+
"keywords": [
|
|
73
|
+
"pi",
|
|
74
|
+
"pi-extension",
|
|
75
|
+
"pi-package",
|
|
76
|
+
"linter",
|
|
77
|
+
"biome",
|
|
78
|
+
"ast-grep",
|
|
79
|
+
"ruff",
|
|
80
|
+
"typescript",
|
|
81
|
+
"code-quality",
|
|
82
|
+
"feedback",
|
|
83
|
+
"type-coverage",
|
|
84
|
+
"jscpd",
|
|
85
|
+
"knip"
|
|
86
|
+
],
|
|
87
|
+
"author": "Apostolos Mantzaris",
|
|
88
|
+
"license": "MIT",
|
|
89
|
+
"engines": {
|
|
90
|
+
"node": ">=22.19.0"
|
|
91
|
+
},
|
|
92
|
+
"packageManager": "npm@11.18.0",
|
|
93
|
+
"files": [
|
|
94
|
+
"dist/",
|
|
95
|
+
"docs/",
|
|
96
|
+
"grammars/",
|
|
97
|
+
"vendor/grammars/",
|
|
98
|
+
"config/",
|
|
99
|
+
"rules/",
|
|
100
|
+
"skills/",
|
|
101
|
+
"scripts/download-grammars.js",
|
|
102
|
+
"scripts/grammars.lock.json",
|
|
103
|
+
"scripts/analyze-pi-lens-logs.mjs",
|
|
104
|
+
"scripts/install-selftest.mjs",
|
|
105
|
+
"scripts/lib/host-provided-deps.mjs",
|
|
106
|
+
"scripts/lib/skills-predicate.mjs",
|
|
107
|
+
"scripts/lib/web-tree-sitter-dir.mjs",
|
|
108
|
+
"scripts/lib/warm-loader-cache.mjs",
|
|
109
|
+
"scripts/warm-loader-cache.mjs",
|
|
110
|
+
"scripts/rpc-load-check.mjs",
|
|
111
|
+
"README.md",
|
|
112
|
+
"CHANGELOG.md",
|
|
113
|
+
"banner.svg",
|
|
114
|
+
"banner.png"
|
|
115
|
+
],
|
|
116
|
+
"dependencies": {
|
|
117
|
+
"@ast-grep/cli": "^0.45.0",
|
|
118
|
+
"@ast-grep/napi": "^0.45.0",
|
|
119
|
+
"js-yaml": "^5.2.2",
|
|
120
|
+
"minimatch": "^10.2.6",
|
|
121
|
+
"pidusage": "^4.0.1",
|
|
122
|
+
"vscode-jsonrpc": "^9.0.0"
|
|
123
|
+
},
|
|
124
|
+
"peerDependencies": {
|
|
125
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
126
|
+
"@earendil-works/pi-tui": "*",
|
|
127
|
+
"typebox": "*"
|
|
128
|
+
},
|
|
129
|
+
"peerDependenciesMeta": {
|
|
130
|
+
"@earendil-works/pi-coding-agent": {
|
|
131
|
+
"optional": true
|
|
132
|
+
},
|
|
133
|
+
"@earendil-works/pi-tui": {
|
|
134
|
+
"optional": true
|
|
135
|
+
},
|
|
136
|
+
"typebox": {
|
|
137
|
+
"optional": true
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"optionalDependencies": {
|
|
141
|
+
"jiti": "^2.7.0",
|
|
142
|
+
"web-tree-sitter": "0.25.10"
|
|
143
|
+
},
|
|
144
|
+
"pi": {
|
|
145
|
+
"extensions": [
|
|
146
|
+
"./dist/index.js"
|
|
147
|
+
],
|
|
148
|
+
"skills": [
|
|
149
|
+
"./skills"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"allowScripts": {
|
|
153
|
+
"@ast-grep/cli@0.45.3": true,
|
|
154
|
+
"@google/genai@1.52.0": true,
|
|
155
|
+
"protobufjs@7.6.5": true
|
|
156
|
+
},
|
|
157
|
+
"overrides": {
|
|
158
|
+
"qs": "^6.15.4"
|
|
159
|
+
}
|
|
160
160
|
}
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@earendil-works/pi-coding-agent": "
|
|
81
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
82
|
+
"@earendil-works/pi-ai": "*"
|
|
82
83
|
},
|
|
83
84
|
"devDependencies": {
|
|
84
85
|
"@earendil-works/pi-coding-agent": "0.85.1",
|
|
@@ -93,7 +94,6 @@
|
|
|
93
94
|
},
|
|
94
95
|
"dependencies": {
|
|
95
96
|
"@bufbuild/protobuf": "^2.14.0",
|
|
96
|
-
"@earendil-works/pi-ai": ">=0.85.1 <0.88.0",
|
|
97
97
|
"proper-lockfile": "4.1.2"
|
|
98
98
|
},
|
|
99
99
|
"overrides": {
|
|
@@ -123,6 +123,8 @@ Per request: 32 questions and 64 KiB of JSON. Per session: 20 attempts, 15-secon
|
|
|
123
123
|
|
|
124
124
|
Import the library from your own extension. It has no dependency on Pi and is safe in tests.
|
|
125
125
|
|
|
126
|
+
TypeBox is a required wildcard peer: Pi supplies it for managed extension installs; ordinary npm installs resolve it automatically. If your package manager does not install peers, install `typebox` alongside `pi-typesafe` for standalone use.
|
|
127
|
+
|
|
126
128
|
```ts
|
|
127
129
|
import { ask, createTypeSafe, choice, noul, score } from "pi-typesafe";
|
|
128
130
|
|
|
@@ -140,7 +142,7 @@ if (!answer.ok) return { skipped: answer.errorCode === "budget" }; // never thr
|
|
|
140
142
|
|
|
141
143
|
Your extension owns its own user consent and budget; `/typesafe enable` applies only to this package's tool. Check `authState()` rather than your own consent flag before you report that judgments are on.
|
|
142
144
|
|
|
143
|
-
Judgments can also go through OpenRouter: `createTypeSafe({ backend: "openrouter" })` sends them to `openrouter.ai` with the key from `OPENROUTER_API_KEY`.
|
|
145
|
+
Judgments can also go through OpenRouter: `createTypeSafe({ backend: "openrouter" })` sends them to `openrouter.ai` with the key from `OPENROUTER_API_KEY`. Command Code serves the same protocol: `createTypeSafe({ backend: "commandcode" })` sends them to `api.commandcode.ai` with the key from `COMMANDCODE_API_KEY` and the model `typesafe/jev`. Or pass a `BackendEndpoint` object as `backend` to name any host that serves the protocol: it brings its own key variable, never reads `TYPESAFE_API_KEY`, and `backendHost()` reports its destination host for your consent text. These backends have no login store, so `/typesafe login` does not apply to them. Pass the same `backend` to `authState`, `keySituation`, and `ensureApiKey`, or the status you report describes the TypeSafe key while the requests use another one. The `/typesafe` commands and the `typesafe_evaluate` tool always use the TypeSafe backend. Every export — the client, `ask`, batching, the usage ledger, auth state, and the `pi-typesafe/calibrate` and `pi-typesafe/ui` entry points — is in [docs/api.md](docs/api.md).
|
|
144
146
|
|
|
145
147
|
## Development
|
|
146
148
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BackendSpec } from "./backends.js";
|
|
2
2
|
import type { KeySource } from "./credentials.js";
|
|
3
3
|
import { TypeSafeIntegrationError } from "./errors.js";
|
|
4
4
|
import type { IntegrationErrorCode } from "./errors.js";
|
|
@@ -15,8 +15,8 @@ export interface AuthFailure {
|
|
|
15
15
|
* that judgments will happen — an enabled extension with no key used to look identical to a working one.
|
|
16
16
|
*/
|
|
17
17
|
export interface AuthState {
|
|
18
|
-
/** The judgment backend this state describes; each backend has its own key. */
|
|
19
|
-
readonly backend:
|
|
18
|
+
/** The judgment backend this state describes; each backend has its own key. Holds the value the caller passed. */
|
|
19
|
+
readonly backend: BackendSpec;
|
|
20
20
|
/** Same kinds as KeySituation: where the key in effect comes from. */
|
|
21
21
|
readonly kind: "environment" | "stored" | "missing" | "unusable";
|
|
22
22
|
readonly source?: KeySource;
|
|
@@ -39,10 +39,14 @@ export interface AuthState {
|
|
|
39
39
|
}
|
|
40
40
|
/** The auth-state file: one small, owner-only record that outlives the process that wrote it. */
|
|
41
41
|
export declare function authStatePath(): string;
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* What the key situation, the last outcome, and the clock add up to for a valid backend; it never throws for one. An
|
|
44
|
+
* invalid backend throws the same `configuration` error as resolveBackend(), so validate a user-supplied endpoint
|
|
45
|
+
* with resolveBackend() first.
|
|
46
|
+
*/
|
|
43
47
|
export declare function authState(options?: {
|
|
44
48
|
path?: string;
|
|
45
|
-
backend?:
|
|
49
|
+
backend?: BackendSpec;
|
|
46
50
|
}): AuthState;
|
|
47
51
|
/** Record that the key was accepted: login verification, or any successful request. Clears the last failure. */
|
|
48
52
|
export declare function recordAuthVerified(at?: Date): void;
|