gsd-pi 2.20.0 → 2.22.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/README.md +12 -0
- package/dist/cli.js +21 -18
- package/dist/help-text.d.ts +2 -0
- package/dist/help-text.js +47 -0
- package/dist/loader.js +2 -16
- package/dist/mcp-server.d.ts +18 -0
- package/dist/mcp-server.js +53 -0
- package/dist/onboarding.d.ts +0 -6
- package/dist/onboarding.js +0 -28
- package/dist/resources/agents/javascript-pro.md +280 -0
- package/dist/resources/agents/typescript-pro.md +255 -0
- package/dist/resources/extensions/bg-shell/index.ts +14 -2
- package/dist/resources/extensions/bg-shell/utilities.ts +14 -0
- package/dist/resources/extensions/browser-tools/{core.js → core.ts} +329 -190
- package/dist/resources/extensions/gsd/auto-dashboard.ts +2 -1
- package/dist/resources/extensions/gsd/auto-prompts.ts +42 -1
- package/dist/resources/extensions/gsd/auto-worktree.ts +35 -2
- package/dist/resources/extensions/gsd/auto.ts +116 -10
- package/dist/resources/extensions/gsd/claude-import.ts +656 -0
- package/dist/resources/extensions/gsd/collision-diagnostics.ts +332 -0
- package/dist/resources/extensions/gsd/commands.ts +60 -7
- package/dist/resources/extensions/gsd/diff-context.ts +220 -0
- package/dist/resources/extensions/gsd/docs/claude-marketplace-import.md +214 -0
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +2 -1
- package/dist/resources/extensions/gsd/doctor.ts +12 -4
- package/dist/resources/extensions/gsd/file-watcher.ts +97 -0
- package/dist/resources/extensions/gsd/files.ts +1 -1
- package/dist/resources/extensions/gsd/forensics.ts +596 -0
- package/dist/resources/extensions/gsd/git-service.ts +2 -1
- package/dist/resources/extensions/gsd/github-client.ts +235 -0
- package/dist/resources/extensions/gsd/gitignore.ts +1 -0
- package/dist/resources/extensions/gsd/marketplace-discovery.ts +507 -0
- package/dist/resources/extensions/gsd/mcp-server.ts +87 -0
- package/dist/resources/extensions/gsd/namespaced-registry.ts +467 -0
- package/dist/resources/extensions/gsd/namespaced-resolver.ts +307 -0
- package/dist/resources/extensions/gsd/plugin-importer.ts +410 -0
- package/dist/resources/extensions/gsd/preferences.ts +14 -3
- package/dist/resources/extensions/gsd/prompts/execute-task.md +1 -1
- package/dist/resources/extensions/gsd/prompts/forensics.md +71 -0
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/research-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/system.md +12 -3
- package/dist/resources/extensions/gsd/roadmap-slices.ts +1 -1
- package/dist/resources/extensions/gsd/session-forensics.ts +5 -5
- package/dist/resources/extensions/gsd/tests/claude-import-tui.test.ts +351 -0
- package/dist/resources/extensions/gsd/tests/collision-diagnostics.test.ts +705 -0
- package/dist/resources/extensions/gsd/tests/context-compression.test.ts +13 -0
- package/dist/resources/extensions/gsd/tests/diff-context.test.ts +136 -0
- package/dist/resources/extensions/gsd/tests/doctor-git.test.ts +118 -0
- package/dist/resources/extensions/gsd/tests/marketplace-discovery.test.ts +202 -0
- package/dist/resources/extensions/gsd/tests/marketplace-test-fixtures.ts +91 -0
- package/dist/resources/extensions/gsd/tests/namespaced-registry.test.ts +1027 -0
- package/dist/resources/extensions/gsd/tests/namespaced-resolver.test.ts +671 -0
- package/dist/resources/extensions/gsd/tests/none-mode-gates.test.ts +105 -0
- package/dist/resources/extensions/gsd/tests/plugin-importer-live.test.ts +481 -0
- package/dist/resources/extensions/gsd/tests/plugin-importer.test.ts +1383 -0
- package/dist/resources/extensions/gsd/tests/preferences-git.test.ts +21 -2
- package/dist/resources/extensions/gsd/tests/preferences-schema-validation.test.ts +8 -1
- package/dist/resources/extensions/gsd/tests/visualizer-data.test.ts +11 -0
- package/dist/resources/extensions/gsd/tests/worktree-bugfix.test.ts +120 -0
- package/dist/resources/extensions/gsd/token-counter.ts +45 -0
- package/dist/resources/extensions/gsd/visualizer-data.ts +2 -2
- package/dist/resources/extensions/gsd/worktree-manager.ts +29 -1
- package/dist/resources/extensions/gsd/worktree.ts +3 -0
- package/dist/resources/extensions/mcporter/index.ts +90 -7
- package/dist/resources/extensions/search-the-web/native-search.ts +2 -0
- package/dist/resources/extensions/search-the-web/tool-fetch-page.ts +9 -1
- package/dist/resources/extensions/search-the-web/url-utils.ts +35 -1
- package/dist/resources/extensions/shared/terminal.ts +1 -1
- package/dist/resources/extensions/universal-config/discovery.ts +4 -0
- package/dist/resources/extensions/universal-config/format.ts +35 -4
- package/dist/resources/extensions/universal-config/index.ts +5 -3
- package/dist/resources/extensions/universal-config/scanners.ts +65 -2
- package/dist/resources/extensions/universal-config/tests/discovery.test.ts +9 -1
- package/dist/resources/extensions/universal-config/tests/format.test.ts +22 -6
- package/dist/resources/extensions/universal-config/tests/scanners.test.ts +18 -0
- package/dist/resources/extensions/universal-config/types.ts +20 -1
- package/dist/resources/skills/lint/SKILL.md +141 -0
- package/dist/resources/skills/review/SKILL.md +214 -0
- package/dist/resources/skills/test/SKILL.md +201 -0
- package/dist/tool-bootstrap.js +2 -1
- package/dist/wizard.js +2 -0
- package/package.json +12 -7
- package/packages/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/azure-openai-responses.js +12 -1
- package/packages/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses.js +12 -1
- package/packages/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-cjs/index.js +762 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +9 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +230 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +87 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +169 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +21 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +88 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +23 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +8 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +41 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +21 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +46 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +24 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +12 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +63 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +13 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +12 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +5 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +6 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +13 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +8 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +10 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +46 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +24 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +12 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +63 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +13 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +12 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +6 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +2 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +5 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +6 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +13 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +8 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/package.json +68 -0
- package/packages/pi-ai/package.json +3 -0
- package/packages/pi-ai/pnpm-lock.yaml +2022 -0
- package/packages/pi-ai/src/providers/azure-openai-responses.ts +12 -1
- package/packages/pi-ai/src/providers/openai-responses.ts +12 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +12 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.js +113 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/project-trust.d.ts +4 -0
- package/packages/pi-coding-agent/dist/core/extensions/project-trust.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/project-trust.js +42 -0
- package/packages/pi-coding-agent/dist/core/extensions/project-trust.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/resolve-config-value.js +18 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.js +114 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +8 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts +2 -0
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.js +23 -9
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.js +67 -0
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.js.map +1 -0
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/pnpm-lock.yaml +454 -0
- package/packages/pi-coding-agent/scripts/copy-assets.cjs +24 -0
- package/packages/pi-coding-agent/src/core/extensions/index.ts +3 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.test.ts +141 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +14 -1
- package/packages/pi-coding-agent/src/core/extensions/project-trust.ts +51 -0
- package/packages/pi-coding-agent/src/core/resolve-config-value.test.ts +132 -0
- package/packages/pi-coding-agent/src/core/resolve-config-value.ts +20 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts +7 -2
- package/packages/pi-coding-agent/src/resources/extensions/memory/storage.test.ts +98 -0
- package/packages/pi-coding-agent/src/resources/extensions/memory/storage.ts +24 -9
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +2 -2
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/package.json +3 -1
- package/packages/pi-tui/src/tui.ts +2 -2
- package/src/resources/agents/javascript-pro.md +280 -0
- package/src/resources/agents/typescript-pro.md +255 -0
- package/src/resources/extensions/bg-shell/index.ts +14 -2
- package/src/resources/extensions/bg-shell/utilities.ts +14 -0
- package/src/resources/extensions/browser-tools/{core.js → core.ts} +329 -190
- package/src/resources/extensions/gsd/auto-dashboard.ts +2 -1
- package/src/resources/extensions/gsd/auto-prompts.ts +42 -1
- package/src/resources/extensions/gsd/auto-worktree.ts +35 -2
- package/src/resources/extensions/gsd/auto.ts +116 -10
- package/src/resources/extensions/gsd/claude-import.ts +656 -0
- package/src/resources/extensions/gsd/collision-diagnostics.ts +332 -0
- package/src/resources/extensions/gsd/commands.ts +60 -7
- package/src/resources/extensions/gsd/diff-context.ts +220 -0
- package/src/resources/extensions/gsd/docs/claude-marketplace-import.md +214 -0
- package/src/resources/extensions/gsd/docs/preferences-reference.md +2 -1
- package/src/resources/extensions/gsd/doctor.ts +12 -4
- package/src/resources/extensions/gsd/file-watcher.ts +97 -0
- package/src/resources/extensions/gsd/files.ts +1 -1
- package/src/resources/extensions/gsd/forensics.ts +596 -0
- package/src/resources/extensions/gsd/git-service.ts +2 -1
- package/src/resources/extensions/gsd/github-client.ts +235 -0
- package/src/resources/extensions/gsd/gitignore.ts +1 -0
- package/src/resources/extensions/gsd/marketplace-discovery.ts +507 -0
- package/src/resources/extensions/gsd/mcp-server.ts +87 -0
- package/src/resources/extensions/gsd/namespaced-registry.ts +467 -0
- package/src/resources/extensions/gsd/namespaced-resolver.ts +307 -0
- package/src/resources/extensions/gsd/plugin-importer.ts +410 -0
- package/src/resources/extensions/gsd/preferences.ts +14 -3
- package/src/resources/extensions/gsd/prompts/execute-task.md +1 -1
- package/src/resources/extensions/gsd/prompts/forensics.md +71 -0
- package/src/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/research-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/system.md +12 -3
- package/src/resources/extensions/gsd/roadmap-slices.ts +1 -1
- package/src/resources/extensions/gsd/session-forensics.ts +5 -5
- package/src/resources/extensions/gsd/tests/claude-import-tui.test.ts +351 -0
- package/src/resources/extensions/gsd/tests/collision-diagnostics.test.ts +705 -0
- package/src/resources/extensions/gsd/tests/context-compression.test.ts +13 -0
- package/src/resources/extensions/gsd/tests/diff-context.test.ts +136 -0
- package/src/resources/extensions/gsd/tests/doctor-git.test.ts +118 -0
- package/src/resources/extensions/gsd/tests/marketplace-discovery.test.ts +202 -0
- package/src/resources/extensions/gsd/tests/marketplace-test-fixtures.ts +91 -0
- package/src/resources/extensions/gsd/tests/namespaced-registry.test.ts +1027 -0
- package/src/resources/extensions/gsd/tests/namespaced-resolver.test.ts +671 -0
- package/src/resources/extensions/gsd/tests/none-mode-gates.test.ts +105 -0
- package/src/resources/extensions/gsd/tests/plugin-importer-live.test.ts +481 -0
- package/src/resources/extensions/gsd/tests/plugin-importer.test.ts +1383 -0
- package/src/resources/extensions/gsd/tests/preferences-git.test.ts +21 -2
- package/src/resources/extensions/gsd/tests/preferences-schema-validation.test.ts +8 -1
- package/src/resources/extensions/gsd/tests/visualizer-data.test.ts +11 -0
- package/src/resources/extensions/gsd/tests/worktree-bugfix.test.ts +120 -0
- package/src/resources/extensions/gsd/token-counter.ts +45 -0
- package/src/resources/extensions/gsd/visualizer-data.ts +2 -2
- package/src/resources/extensions/gsd/worktree-manager.ts +29 -1
- package/src/resources/extensions/gsd/worktree.ts +3 -0
- package/src/resources/extensions/mcporter/index.ts +90 -7
- package/src/resources/extensions/search-the-web/native-search.ts +2 -0
- package/src/resources/extensions/search-the-web/tool-fetch-page.ts +9 -1
- package/src/resources/extensions/search-the-web/url-utils.ts +35 -1
- package/src/resources/extensions/shared/terminal.ts +1 -1
- package/src/resources/extensions/universal-config/discovery.ts +4 -0
- package/src/resources/extensions/universal-config/format.ts +35 -4
- package/src/resources/extensions/universal-config/index.ts +5 -3
- package/src/resources/extensions/universal-config/scanners.ts +65 -2
- package/src/resources/extensions/universal-config/tests/discovery.test.ts +9 -1
- package/src/resources/extensions/universal-config/tests/format.test.ts +22 -6
- package/src/resources/extensions/universal-config/tests/scanners.test.ts +18 -0
- package/src/resources/extensions/universal-config/types.ts +20 -1
- package/src/resources/skills/lint/SKILL.md +141 -0
- package/src/resources/skills/review/SKILL.md +214 -0
- package/src/resources/skills/test/SKILL.md +201 -0
- package/dist/resources/extensions/browser-tools/core.d.ts +0 -205
- package/src/resources/extensions/browser-tools/core.d.ts +0 -205
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test
|
|
3
|
+
description: Generate or run tests. Auto-detects test framework, generates comprehensive tests for source files, or runs existing test suites with failure analysis.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Generate or run tests for the current project. This skill auto-detects the test framework in use, generates comprehensive tests for source files, or runs existing test suites and analyzes failures.
|
|
8
|
+
|
|
9
|
+
Accepts optional arguments:
|
|
10
|
+
- A file path: generate tests for that source file
|
|
11
|
+
- `run`: run the existing test suite and analyze results
|
|
12
|
+
- No arguments: suggest what to test based on recent changes
|
|
13
|
+
</objective>
|
|
14
|
+
|
|
15
|
+
<context>
|
|
16
|
+
This skill handles test generation and execution across multiple languages and frameworks. It adapts to whatever testing conventions the project already uses rather than imposing new ones.
|
|
17
|
+
</context>
|
|
18
|
+
|
|
19
|
+
<quick_start>
|
|
20
|
+
|
|
21
|
+
<step_1_detect_framework>
|
|
22
|
+
|
|
23
|
+
**Detect the test framework and conventions before doing anything else.**
|
|
24
|
+
|
|
25
|
+
Check these sources in order:
|
|
26
|
+
|
|
27
|
+
1. **package.json** (Node/JS/TS projects):
|
|
28
|
+
- `scripts.test` for the test command
|
|
29
|
+
- `devDependencies` for jest, vitest, mocha, ava, tap, node:test, playwright, cypress
|
|
30
|
+
- `jest` or `vitest` config keys
|
|
31
|
+
|
|
32
|
+
2. **Config files**:
|
|
33
|
+
- `jest.config.*`, `vitest.config.*`, `.mocharc.*`, `ava.config.*`
|
|
34
|
+
- `pytest.ini`, `pyproject.toml` (look for `[tool.pytest]`), `setup.cfg`
|
|
35
|
+
- `go.mod` (Go projects use `go test` by default)
|
|
36
|
+
- `Cargo.toml` (Rust projects use `cargo test`)
|
|
37
|
+
|
|
38
|
+
3. **Existing test files**:
|
|
39
|
+
- Scan for `*.test.*`, `*.spec.*`, `*_test.*`, `test_*.*` files
|
|
40
|
+
- Read 1-2 existing test files to understand patterns, imports, assertion style, and structure
|
|
41
|
+
- Note the directory structure (co-located tests vs `__tests__/` vs `tests/` vs `test/`)
|
|
42
|
+
|
|
43
|
+
4. **Record your findings**:
|
|
44
|
+
- Framework name and version
|
|
45
|
+
- Test file naming convention
|
|
46
|
+
- Test file location convention
|
|
47
|
+
- Import/require style
|
|
48
|
+
- Assertion style (expect, assert, chai, etc.)
|
|
49
|
+
- Any custom utilities, fixtures, or helpers used
|
|
50
|
+
|
|
51
|
+
</step_1_detect_framework>
|
|
52
|
+
|
|
53
|
+
<step_2_handle_arguments>
|
|
54
|
+
|
|
55
|
+
**Route based on the argument provided.**
|
|
56
|
+
|
|
57
|
+
- **File path given** -> Go to `generate_tests`
|
|
58
|
+
- **"run" given** -> Go to `run_tests`
|
|
59
|
+
- **No arguments** -> Go to `suggest_tests`
|
|
60
|
+
|
|
61
|
+
</step_2_handle_arguments>
|
|
62
|
+
|
|
63
|
+
<generate_tests>
|
|
64
|
+
|
|
65
|
+
**Generate tests for the specified source file.**
|
|
66
|
+
|
|
67
|
+
**A. Read and analyze the source file:**
|
|
68
|
+
- Identify all exported/public functions, classes, methods, and types
|
|
69
|
+
- Understand each function's parameters, return types, and side effects
|
|
70
|
+
- Note error handling patterns (throws, returns null, returns Result, etc.)
|
|
71
|
+
- Identify dependencies that will need mocking
|
|
72
|
+
|
|
73
|
+
**B. Read existing test files in the project (1-2 files minimum):**
|
|
74
|
+
- Match their import style exactly
|
|
75
|
+
- Match their describe/it or test block structure
|
|
76
|
+
- Match their assertion patterns
|
|
77
|
+
- Match their mock/stub approach
|
|
78
|
+
- Use the same test utilities and helpers
|
|
79
|
+
|
|
80
|
+
**C. Generate tests covering:**
|
|
81
|
+
|
|
82
|
+
1. **Happy paths**: Normal expected inputs produce correct outputs
|
|
83
|
+
2. **Edge cases**:
|
|
84
|
+
- Empty inputs (empty string, empty array, null, undefined, zero)
|
|
85
|
+
- Boundary values (min/max integers, very long strings)
|
|
86
|
+
- Single element collections
|
|
87
|
+
3. **Error handling**:
|
|
88
|
+
- Invalid inputs that should throw or return errors
|
|
89
|
+
- Missing required parameters
|
|
90
|
+
- Type mismatches (if applicable)
|
|
91
|
+
4. **Async behavior** (if the function is async):
|
|
92
|
+
- Successful resolution
|
|
93
|
+
- Rejection/error cases
|
|
94
|
+
- Timeout scenarios (if relevant)
|
|
95
|
+
5. **Dependencies**:
|
|
96
|
+
- Mock external dependencies (APIs, databases, file system)
|
|
97
|
+
- Verify correct interaction with dependencies (called with right args)
|
|
98
|
+
|
|
99
|
+
**D. Place the test file correctly:**
|
|
100
|
+
- Follow the project's existing convention for test file location
|
|
101
|
+
- Use the project's naming convention (`.test.ts`, `.spec.js`, `_test.go`, `test_*.py`, etc.)
|
|
102
|
+
|
|
103
|
+
**E. Run the generated tests immediately to verify they pass.**
|
|
104
|
+
- If tests fail, read the error output carefully
|
|
105
|
+
- Fix the test code (not the source code)
|
|
106
|
+
- Re-run until all tests pass
|
|
107
|
+
|
|
108
|
+
</generate_tests>
|
|
109
|
+
|
|
110
|
+
<run_tests>
|
|
111
|
+
|
|
112
|
+
**Run the existing test suite and analyze results.**
|
|
113
|
+
|
|
114
|
+
**A. Determine the test command:**
|
|
115
|
+
- Check `package.json` `scripts.test` for Node projects
|
|
116
|
+
- Use `pytest` for Python projects
|
|
117
|
+
- Use `go test ./...` for Go projects
|
|
118
|
+
- Use `cargo test` for Rust projects
|
|
119
|
+
- Fall back to the detected framework's CLI
|
|
120
|
+
|
|
121
|
+
**B. Run the tests:**
|
|
122
|
+
- Execute the test command
|
|
123
|
+
- Capture full output including failures and errors
|
|
124
|
+
|
|
125
|
+
**C. Analyze results:**
|
|
126
|
+
- Report total passed, failed, skipped counts
|
|
127
|
+
- For each failure:
|
|
128
|
+
- Identify the failing test name and file
|
|
129
|
+
- Show the assertion that failed (expected vs actual)
|
|
130
|
+
- Read the relevant source code if needed
|
|
131
|
+
- Provide a specific diagnosis of why it failed
|
|
132
|
+
- Suggest a concrete fix (is it a test bug or a source bug?)
|
|
133
|
+
|
|
134
|
+
**D. Present a summary:**
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Test Results: X passed, Y failed, Z skipped
|
|
138
|
+
|
|
139
|
+
Failures:
|
|
140
|
+
1. [test name] - [brief diagnosis]
|
|
141
|
+
Fix: [specific suggestion]
|
|
142
|
+
|
|
143
|
+
2. [test name] - [brief diagnosis]
|
|
144
|
+
Fix: [specific suggestion]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
</run_tests>
|
|
148
|
+
|
|
149
|
+
<suggest_tests>
|
|
150
|
+
|
|
151
|
+
**Suggest what to test when no arguments are given.**
|
|
152
|
+
|
|
153
|
+
**A. Check recent changes:**
|
|
154
|
+
- Run `git diff --name-only HEAD~5` to find recently changed files
|
|
155
|
+
- Run `git diff --name-only --cached` for staged files
|
|
156
|
+
- Filter to source files (exclude configs, docs, lockfiles)
|
|
157
|
+
|
|
158
|
+
**B. Check test coverage gaps:**
|
|
159
|
+
- Find source files that have no corresponding test file
|
|
160
|
+
- Prioritize files that were recently modified
|
|
161
|
+
|
|
162
|
+
**C. Present suggestions:**
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
Suggested files to test (based on recent changes and coverage gaps):
|
|
166
|
+
|
|
167
|
+
1. [file path] - modified recently, no test file exists
|
|
168
|
+
2. [file path] - modified recently, tests exist but may need updating
|
|
169
|
+
3. [file path] - no test coverage found
|
|
170
|
+
|
|
171
|
+
Run `/test <file path>` to generate tests for any of these.
|
|
172
|
+
Run `/test run` to run the existing test suite.
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
</suggest_tests>
|
|
176
|
+
|
|
177
|
+
</quick_start>
|
|
178
|
+
|
|
179
|
+
<critical_rules>
|
|
180
|
+
|
|
181
|
+
1. **MATCH EXISTING PATTERNS**: Never impose a new test style. Always mirror what the project already does.
|
|
182
|
+
2. **READ BEFORE WRITING**: Always read existing test files before generating new ones.
|
|
183
|
+
3. **VERIFY GENERATED TESTS**: Always run generated tests. Untested test code is unreliable.
|
|
184
|
+
4. **DON'T MODIFY SOURCE CODE**: If generated tests fail, fix the tests, not the source. If the source has a real bug, report it to the user.
|
|
185
|
+
5. **MOCK EXTERNAL DEPENDENCIES**: Never let tests hit real APIs, databases, or file systems unless the project explicitly uses integration tests that way.
|
|
186
|
+
6. **ONE FILE AT A TIME**: Generate tests for one source file per invocation. Keep scope manageable.
|
|
187
|
+
7. **USE PROJECT DEPENDENCIES**: Only use test libraries already installed in the project. Do not add new dependencies without asking.
|
|
188
|
+
|
|
189
|
+
</critical_rules>
|
|
190
|
+
|
|
191
|
+
<success_criteria>
|
|
192
|
+
|
|
193
|
+
Before completing:
|
|
194
|
+
- [ ] Test framework and conventions were detected correctly
|
|
195
|
+
- [ ] Generated tests match the project's existing test style
|
|
196
|
+
- [ ] All generated tests pass when run
|
|
197
|
+
- [ ] Tests cover happy paths, edge cases, and error handling
|
|
198
|
+
- [ ] Test file is placed in the correct location with the correct naming convention
|
|
199
|
+
- [ ] No source code was modified
|
|
200
|
+
|
|
201
|
+
</success_criteria>
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type declarations for core.js — runtime-neutral helper logic for browser-tools.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export interface ActionTimeline {
|
|
6
|
-
limit: number;
|
|
7
|
-
nextId: number;
|
|
8
|
-
entries: ActionEntry[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface ActionEntry {
|
|
12
|
-
id: number;
|
|
13
|
-
tool: string;
|
|
14
|
-
paramsSummary: string;
|
|
15
|
-
startedAt: number;
|
|
16
|
-
finishedAt: number | null;
|
|
17
|
-
status: string;
|
|
18
|
-
beforeUrl: string;
|
|
19
|
-
afterUrl: string;
|
|
20
|
-
verificationSummary?: string;
|
|
21
|
-
warningSummary?: string;
|
|
22
|
-
diffSummary?: string;
|
|
23
|
-
changed?: boolean;
|
|
24
|
-
error?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface ActionPartial {
|
|
28
|
-
tool: string;
|
|
29
|
-
paramsSummary?: string;
|
|
30
|
-
startedAt?: number;
|
|
31
|
-
beforeUrl?: string;
|
|
32
|
-
afterUrl?: string;
|
|
33
|
-
verificationSummary?: string;
|
|
34
|
-
warningSummary?: string;
|
|
35
|
-
diffSummary?: string;
|
|
36
|
-
changed?: boolean;
|
|
37
|
-
error?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface ActionUpdates {
|
|
41
|
-
finishedAt?: number;
|
|
42
|
-
status?: string;
|
|
43
|
-
afterUrl?: string;
|
|
44
|
-
verificationSummary?: string;
|
|
45
|
-
warningSummary?: string;
|
|
46
|
-
diffSummary?: string;
|
|
47
|
-
changed?: boolean;
|
|
48
|
-
error?: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface DiffResult {
|
|
52
|
-
changed: boolean;
|
|
53
|
-
changes: Array<{ type: string; before: unknown; after: unknown }>;
|
|
54
|
-
summary: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface Threshold {
|
|
58
|
-
op: string;
|
|
59
|
-
n: number;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface PageRegistry {
|
|
63
|
-
pages: PageEntry[];
|
|
64
|
-
activePageId: number | null;
|
|
65
|
-
nextId: number;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface PageEntry {
|
|
69
|
-
id: number;
|
|
70
|
-
page: any;
|
|
71
|
-
title: string;
|
|
72
|
-
url: string;
|
|
73
|
-
opener: number | null;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface PageListEntry {
|
|
77
|
-
id: number;
|
|
78
|
-
title: string;
|
|
79
|
-
url: string;
|
|
80
|
-
opener: number | null;
|
|
81
|
-
isActive: boolean;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface SnapshotModeConfig {
|
|
85
|
-
tags: string[];
|
|
86
|
-
roles: string[];
|
|
87
|
-
selectors: string[];
|
|
88
|
-
ariaAttributes: string[];
|
|
89
|
-
useInteractiveFilter: boolean;
|
|
90
|
-
visibleOnly?: boolean;
|
|
91
|
-
containerExpand?: boolean;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface AssertionCheckResult {
|
|
95
|
-
name: string;
|
|
96
|
-
passed: boolean;
|
|
97
|
-
actual: unknown;
|
|
98
|
-
expected: unknown;
|
|
99
|
-
selector?: string;
|
|
100
|
-
text?: string;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface AssertionEvaluation {
|
|
104
|
-
verified: boolean;
|
|
105
|
-
checks: AssertionCheckResult[];
|
|
106
|
-
summary: string;
|
|
107
|
-
agentHint: string;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface WaitValidationError {
|
|
111
|
-
error: string;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface BatchStepResult {
|
|
115
|
-
ok: boolean;
|
|
116
|
-
stopReason: string | null;
|
|
117
|
-
failedStepIndex: number | null;
|
|
118
|
-
stepResults: unknown[];
|
|
119
|
-
summary: string;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface FormattedTimeline {
|
|
123
|
-
entries: Array<{
|
|
124
|
-
id: number | null;
|
|
125
|
-
tool: string;
|
|
126
|
-
status: string;
|
|
127
|
-
durationMs: number | null;
|
|
128
|
-
beforeUrl: string;
|
|
129
|
-
afterUrl: string;
|
|
130
|
-
line: string;
|
|
131
|
-
}>;
|
|
132
|
-
retained: number;
|
|
133
|
-
totalRecorded: number;
|
|
134
|
-
bounded: boolean;
|
|
135
|
-
summary: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export interface FailureHypothesis {
|
|
139
|
-
hasFailures: boolean;
|
|
140
|
-
categories: string[];
|
|
141
|
-
summary: string;
|
|
142
|
-
signals: Array<{ category: string; source: string; detail: string }>;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface SessionSummary {
|
|
146
|
-
counts: {
|
|
147
|
-
pages: number;
|
|
148
|
-
actions: { total: number; retained: number; success: number; error: number; running: number };
|
|
149
|
-
waits: { total: number; success: number; error: number; running: number };
|
|
150
|
-
assertions: { total: number; passed: number; failed: number; running: number };
|
|
151
|
-
consoleErrors: number;
|
|
152
|
-
failedRequests: number;
|
|
153
|
-
dialogs: number;
|
|
154
|
-
};
|
|
155
|
-
activePage: { id: number | null; title: string; url: string } | null;
|
|
156
|
-
caveats: string[];
|
|
157
|
-
failureHypothesis: FailureHypothesis;
|
|
158
|
-
summary: string;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export function createActionTimeline(limit?: number): ActionTimeline;
|
|
162
|
-
export function beginAction(timeline: ActionTimeline, partial: ActionPartial): ActionEntry;
|
|
163
|
-
export function finishAction(timeline: ActionTimeline, actionId: number, updates?: ActionUpdates): ActionEntry | null;
|
|
164
|
-
export function findAction(timeline: ActionTimeline, actionId: number): ActionEntry | null;
|
|
165
|
-
export function toActionParamsSummary(params: unknown): string;
|
|
166
|
-
export function diffCompactStates(before: unknown, after: unknown): DiffResult;
|
|
167
|
-
export function includesNeedle(haystack: string, needle: string): boolean;
|
|
168
|
-
export function parseThreshold(value: string | null | undefined): Threshold | null;
|
|
169
|
-
export function meetsThreshold(count: number, threshold: Threshold): boolean;
|
|
170
|
-
export function getEntriesSince(
|
|
171
|
-
entries: Array<{ timestamp?: number }>,
|
|
172
|
-
sinceActionId: number | undefined,
|
|
173
|
-
timeline: ActionTimeline,
|
|
174
|
-
): unknown[];
|
|
175
|
-
export function evaluateAssertionChecks(args: { checks: unknown[]; state: unknown }): AssertionEvaluation;
|
|
176
|
-
export function validateWaitParams(params: { condition: string; value?: string; threshold?: string }): WaitValidationError | null;
|
|
177
|
-
export function createRegionStableScript(selector: string): string;
|
|
178
|
-
export function createPageRegistry(): PageRegistry;
|
|
179
|
-
export function registryAddPage(
|
|
180
|
-
registry: PageRegistry,
|
|
181
|
-
info: { page: unknown; title?: string; url?: string; opener?: number | null },
|
|
182
|
-
): PageEntry;
|
|
183
|
-
export function registryRemovePage(registry: PageRegistry, pageId: number): { removed: PageEntry; newActiveId: number | null };
|
|
184
|
-
export function registrySetActive(registry: PageRegistry, pageId: number): void;
|
|
185
|
-
export function registryGetActive(registry: PageRegistry): PageEntry;
|
|
186
|
-
export function registryGetPage(registry: PageRegistry, pageId: number): PageEntry | null;
|
|
187
|
-
export function registryListPages(registry: PageRegistry): PageListEntry[];
|
|
188
|
-
export function createBoundedLogPusher(maxSize: number): (array: unknown[], entry: unknown) => void;
|
|
189
|
-
export function runBatchSteps(args: {
|
|
190
|
-
steps: unknown[];
|
|
191
|
-
executeStep: (step: unknown, index: number) => Promise<{ ok: boolean; [key: string]: unknown }>;
|
|
192
|
-
stopOnFailure?: boolean;
|
|
193
|
-
}): Promise<BatchStepResult>;
|
|
194
|
-
|
|
195
|
-
export declare const SNAPSHOT_MODES: Record<string, SnapshotModeConfig>;
|
|
196
|
-
export function getSnapshotModeConfig(mode: string): SnapshotModeConfig | null;
|
|
197
|
-
export function computeContentHash(text: string): string;
|
|
198
|
-
export function computeStructuralSignature(tag: string, role: string, childTags: string[]): string;
|
|
199
|
-
export function matchFingerprint(
|
|
200
|
-
stored: { contentHash?: string; structuralSignature?: string },
|
|
201
|
-
candidate: { contentHash?: string; structuralSignature?: string },
|
|
202
|
-
): boolean;
|
|
203
|
-
export function formatTimelineEntries(entries?: unknown[], options?: Record<string, unknown>): FormattedTimeline;
|
|
204
|
-
export function buildFailureHypothesis(session?: Record<string, unknown>): FailureHypothesis;
|
|
205
|
-
export function summarizeBrowserSession(session?: Record<string, unknown>): SessionSummary;
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type declarations for core.js — runtime-neutral helper logic for browser-tools.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export interface ActionTimeline {
|
|
6
|
-
limit: number;
|
|
7
|
-
nextId: number;
|
|
8
|
-
entries: ActionEntry[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface ActionEntry {
|
|
12
|
-
id: number;
|
|
13
|
-
tool: string;
|
|
14
|
-
paramsSummary: string;
|
|
15
|
-
startedAt: number;
|
|
16
|
-
finishedAt: number | null;
|
|
17
|
-
status: string;
|
|
18
|
-
beforeUrl: string;
|
|
19
|
-
afterUrl: string;
|
|
20
|
-
verificationSummary?: string;
|
|
21
|
-
warningSummary?: string;
|
|
22
|
-
diffSummary?: string;
|
|
23
|
-
changed?: boolean;
|
|
24
|
-
error?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface ActionPartial {
|
|
28
|
-
tool: string;
|
|
29
|
-
paramsSummary?: string;
|
|
30
|
-
startedAt?: number;
|
|
31
|
-
beforeUrl?: string;
|
|
32
|
-
afterUrl?: string;
|
|
33
|
-
verificationSummary?: string;
|
|
34
|
-
warningSummary?: string;
|
|
35
|
-
diffSummary?: string;
|
|
36
|
-
changed?: boolean;
|
|
37
|
-
error?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface ActionUpdates {
|
|
41
|
-
finishedAt?: number;
|
|
42
|
-
status?: string;
|
|
43
|
-
afterUrl?: string;
|
|
44
|
-
verificationSummary?: string;
|
|
45
|
-
warningSummary?: string;
|
|
46
|
-
diffSummary?: string;
|
|
47
|
-
changed?: boolean;
|
|
48
|
-
error?: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface DiffResult {
|
|
52
|
-
changed: boolean;
|
|
53
|
-
changes: Array<{ type: string; before: unknown; after: unknown }>;
|
|
54
|
-
summary: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface Threshold {
|
|
58
|
-
op: string;
|
|
59
|
-
n: number;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface PageRegistry {
|
|
63
|
-
pages: PageEntry[];
|
|
64
|
-
activePageId: number | null;
|
|
65
|
-
nextId: number;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface PageEntry {
|
|
69
|
-
id: number;
|
|
70
|
-
page: any;
|
|
71
|
-
title: string;
|
|
72
|
-
url: string;
|
|
73
|
-
opener: number | null;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface PageListEntry {
|
|
77
|
-
id: number;
|
|
78
|
-
title: string;
|
|
79
|
-
url: string;
|
|
80
|
-
opener: number | null;
|
|
81
|
-
isActive: boolean;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface SnapshotModeConfig {
|
|
85
|
-
tags: string[];
|
|
86
|
-
roles: string[];
|
|
87
|
-
selectors: string[];
|
|
88
|
-
ariaAttributes: string[];
|
|
89
|
-
useInteractiveFilter: boolean;
|
|
90
|
-
visibleOnly?: boolean;
|
|
91
|
-
containerExpand?: boolean;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface AssertionCheckResult {
|
|
95
|
-
name: string;
|
|
96
|
-
passed: boolean;
|
|
97
|
-
actual: unknown;
|
|
98
|
-
expected: unknown;
|
|
99
|
-
selector?: string;
|
|
100
|
-
text?: string;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface AssertionEvaluation {
|
|
104
|
-
verified: boolean;
|
|
105
|
-
checks: AssertionCheckResult[];
|
|
106
|
-
summary: string;
|
|
107
|
-
agentHint: string;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface WaitValidationError {
|
|
111
|
-
error: string;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface BatchStepResult {
|
|
115
|
-
ok: boolean;
|
|
116
|
-
stopReason: string | null;
|
|
117
|
-
failedStepIndex: number | null;
|
|
118
|
-
stepResults: unknown[];
|
|
119
|
-
summary: string;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface FormattedTimeline {
|
|
123
|
-
entries: Array<{
|
|
124
|
-
id: number | null;
|
|
125
|
-
tool: string;
|
|
126
|
-
status: string;
|
|
127
|
-
durationMs: number | null;
|
|
128
|
-
beforeUrl: string;
|
|
129
|
-
afterUrl: string;
|
|
130
|
-
line: string;
|
|
131
|
-
}>;
|
|
132
|
-
retained: number;
|
|
133
|
-
totalRecorded: number;
|
|
134
|
-
bounded: boolean;
|
|
135
|
-
summary: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export interface FailureHypothesis {
|
|
139
|
-
hasFailures: boolean;
|
|
140
|
-
categories: string[];
|
|
141
|
-
summary: string;
|
|
142
|
-
signals: Array<{ category: string; source: string; detail: string }>;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface SessionSummary {
|
|
146
|
-
counts: {
|
|
147
|
-
pages: number;
|
|
148
|
-
actions: { total: number; retained: number; success: number; error: number; running: number };
|
|
149
|
-
waits: { total: number; success: number; error: number; running: number };
|
|
150
|
-
assertions: { total: number; passed: number; failed: number; running: number };
|
|
151
|
-
consoleErrors: number;
|
|
152
|
-
failedRequests: number;
|
|
153
|
-
dialogs: number;
|
|
154
|
-
};
|
|
155
|
-
activePage: { id: number | null; title: string; url: string } | null;
|
|
156
|
-
caveats: string[];
|
|
157
|
-
failureHypothesis: FailureHypothesis;
|
|
158
|
-
summary: string;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export function createActionTimeline(limit?: number): ActionTimeline;
|
|
162
|
-
export function beginAction(timeline: ActionTimeline, partial: ActionPartial): ActionEntry;
|
|
163
|
-
export function finishAction(timeline: ActionTimeline, actionId: number, updates?: ActionUpdates): ActionEntry | null;
|
|
164
|
-
export function findAction(timeline: ActionTimeline, actionId: number): ActionEntry | null;
|
|
165
|
-
export function toActionParamsSummary(params: unknown): string;
|
|
166
|
-
export function diffCompactStates(before: unknown, after: unknown): DiffResult;
|
|
167
|
-
export function includesNeedle(haystack: string, needle: string): boolean;
|
|
168
|
-
export function parseThreshold(value: string | null | undefined): Threshold | null;
|
|
169
|
-
export function meetsThreshold(count: number, threshold: Threshold): boolean;
|
|
170
|
-
export function getEntriesSince(
|
|
171
|
-
entries: Array<{ timestamp?: number }>,
|
|
172
|
-
sinceActionId: number | undefined,
|
|
173
|
-
timeline: ActionTimeline,
|
|
174
|
-
): unknown[];
|
|
175
|
-
export function evaluateAssertionChecks(args: { checks: unknown[]; state: unknown }): AssertionEvaluation;
|
|
176
|
-
export function validateWaitParams(params: { condition: string; value?: string; threshold?: string }): WaitValidationError | null;
|
|
177
|
-
export function createRegionStableScript(selector: string): string;
|
|
178
|
-
export function createPageRegistry(): PageRegistry;
|
|
179
|
-
export function registryAddPage(
|
|
180
|
-
registry: PageRegistry,
|
|
181
|
-
info: { page: unknown; title?: string; url?: string; opener?: number | null },
|
|
182
|
-
): PageEntry;
|
|
183
|
-
export function registryRemovePage(registry: PageRegistry, pageId: number): { removed: PageEntry; newActiveId: number | null };
|
|
184
|
-
export function registrySetActive(registry: PageRegistry, pageId: number): void;
|
|
185
|
-
export function registryGetActive(registry: PageRegistry): PageEntry;
|
|
186
|
-
export function registryGetPage(registry: PageRegistry, pageId: number): PageEntry | null;
|
|
187
|
-
export function registryListPages(registry: PageRegistry): PageListEntry[];
|
|
188
|
-
export function createBoundedLogPusher(maxSize: number): (array: unknown[], entry: unknown) => void;
|
|
189
|
-
export function runBatchSteps(args: {
|
|
190
|
-
steps: unknown[];
|
|
191
|
-
executeStep: (step: unknown, index: number) => Promise<{ ok: boolean; [key: string]: unknown }>;
|
|
192
|
-
stopOnFailure?: boolean;
|
|
193
|
-
}): Promise<BatchStepResult>;
|
|
194
|
-
|
|
195
|
-
export declare const SNAPSHOT_MODES: Record<string, SnapshotModeConfig>;
|
|
196
|
-
export function getSnapshotModeConfig(mode: string): SnapshotModeConfig | null;
|
|
197
|
-
export function computeContentHash(text: string): string;
|
|
198
|
-
export function computeStructuralSignature(tag: string, role: string, childTags: string[]): string;
|
|
199
|
-
export function matchFingerprint(
|
|
200
|
-
stored: { contentHash?: string; structuralSignature?: string },
|
|
201
|
-
candidate: { contentHash?: string; structuralSignature?: string },
|
|
202
|
-
): boolean;
|
|
203
|
-
export function formatTimelineEntries(entries?: unknown[], options?: Record<string, unknown>): FormattedTimeline;
|
|
204
|
-
export function buildFailureHypothesis(session?: Record<string, unknown>): FailureHypothesis;
|
|
205
|
-
export function summarizeBrowserSession(session?: Record<string, unknown>): SessionSummary;
|