@kontextmind/kxm 0.7.15 → 0.7.17

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.
Files changed (50) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/docs/README.md +1 -1
  3. package/docs/browser-automation.md +24 -1
  4. package/docs/configuration.md +1 -2
  5. package/docs/operator-pi-packages.md +5 -2
  6. package/docs/prompts/browser-annotate-feedback.md +17 -0
  7. package/docs/prompts/browser-diagnose-recover.md +17 -0
  8. package/docs/prompts/browser-explore.md +17 -0
  9. package/docs/prompts/browser-repro-fix.md +17 -0
  10. package/docs/prompts/browser-start.md +17 -0
  11. package/docs/prompts/browser-takeover.md +17 -0
  12. package/docs/templates/README.md +1 -1
  13. package/package.json +1 -1
  14. package/plugins/kxm/.claude-plugin/plugin.json +1 -1
  15. package/plugins/kxm/dist/cli.js +4 -0
  16. package/plugins/kxm/dist/core.js +4 -0
  17. package/plugins/kxm/dist/extension.js +3066 -2
  18. package/plugins/kxm/dist/mcp-server.js +1 -1
  19. package/plugins/kxm/dist/runtime.js +4 -0
  20. package/plugins/kxm/dist/server.js +4 -0
  21. package/plugins/kxm/package.json +1 -1
  22. package/plugins/kxm/src/extension.ts +9 -0
  23. package/plugins/kxm/src/mcp-server.ts +1 -1
  24. package/plugins/kxm/src/providers/antigravity/LICENSE +21 -0
  25. package/plugins/kxm/src/providers/antigravity/README.md +19 -0
  26. package/plugins/kxm/src/providers/antigravity/auth/index.ts +17 -0
  27. package/plugins/kxm/src/providers/antigravity/auth/oauth.ts +449 -0
  28. package/plugins/kxm/src/providers/antigravity/client/client.ts +562 -0
  29. package/plugins/kxm/src/providers/antigravity/client/index.ts +1 -0
  30. package/plugins/kxm/src/providers/antigravity/diagnostics/diagnostics.ts +97 -0
  31. package/plugins/kxm/src/providers/antigravity/diagnostics/index.ts +1 -0
  32. package/plugins/kxm/src/providers/antigravity/index.ts +24 -0
  33. package/plugins/kxm/src/providers/antigravity/models/discovery.ts +155 -0
  34. package/plugins/kxm/src/providers/antigravity/models/grouping.ts +425 -0
  35. package/plugins/kxm/src/providers/antigravity/models/index.ts +3 -0
  36. package/plugins/kxm/src/providers/antigravity/models/models.ts +501 -0
  37. package/plugins/kxm/src/providers/antigravity/pi-compat.ts +279 -0
  38. package/plugins/kxm/src/providers/antigravity/register.ts +123 -0
  39. package/plugins/kxm/src/providers/antigravity/stream/index.ts +1 -0
  40. package/plugins/kxm/src/providers/antigravity/stream/stream.ts +1461 -0
  41. package/plugins/kxm/src/providers/antigravity/types/enums.ts +50 -0
  42. package/plugins/kxm/src/providers/antigravity/types/index.ts +2 -0
  43. package/plugins/kxm/src/providers/antigravity/types/types.ts +293 -0
  44. package/plugins/kxm/src/providers/antigravity/usage/index.ts +1 -0
  45. package/plugins/kxm/src/providers/antigravity/usage/usage.ts +361 -0
  46. package/plugins/kxm/src/providers/antigravity/utils/http.ts +32 -0
  47. package/plugins/kxm/src/providers/antigravity/utils/index.ts +3 -0
  48. package/plugins/kxm/src/providers/antigravity/utils/security.ts +75 -0
  49. package/plugins/kxm/src/providers/antigravity/utils/util.ts +133 -0
  50. package/plugins/kxm/src/redact.ts +4 -0
@@ -11,7 +11,7 @@
11
11
  "name": "kxm",
12
12
  "source": "./plugins/kxm",
13
13
  "description": "Durable workflows, peer agents, and kxm tui",
14
- "version": "0.7.15",
14
+ "version": "0.7.17",
15
15
  "category": "development",
16
16
  "tags": ["kxm", "multi-agent", "workflows", "mcp"]
17
17
  }
package/docs/README.md CHANGED
@@ -9,7 +9,7 @@ This documentation is organized by task. Start with the guide that matches what
9
9
  | [Configuration](configuration.md) | Users and operators | Understand every supported setting and default |
10
10
  | [Architecture](architecture.md) | Maintainers and integrators | Learn the component boundaries and message lifecycle |
11
11
  | [Agent Skills](agent-skills.md) | Users and integrators | Comprehensive skill suite covering all KXM commands with progressive disclosure |
12
- | [Browser automation](browser-automation.md) | Developers and operators | Self-hosted Steel on DOKS, agent-browser, Playwright, pass-cli, and human takeover |
12
+ | [Browser automation](browser-automation.md) | Developers and operators | Self-hosted Steel on DOKS, agent-browser, Playwright, pass-cli, and human takeover. See the [knowledge base](browser-automation.md#knowledge-base) and [prompt templates](browser-automation.md#prompt-templates) |
13
13
  | [Skills](skills.md) | Operators and skill authors | Governed candidate lifecycle; also the [repository work delivery](skills/repo-work-delivery.md) skill |
14
14
  | [Operations](operations.md) | Hub operators | Run, monitor, secure, and recover the service |
15
15
  | [Troubleshooting](troubleshooting.md) | Everyone | Diagnose common installation and delivery failures |
@@ -7,7 +7,7 @@ project: "kxm"
7
7
  status: "accepted"
8
8
  owner: "@operator"
9
9
  created: "2026-09-14"
10
- updated: "2026-09-14"
10
+ updated: "2026-09-15"
11
11
  authority: "instruction"
12
12
  confidence: "verified"
13
13
  summary: "Comprehensive guide to browser automation in KXM using self-hosted Steel on DOKS, agent-browser, Playwright, pass-cli, and human takeover."
@@ -114,3 +114,26 @@ When authentication challenges (MFA, CAPTCHA, SSO) are encountered:
114
114
  - **Session Timeouts**: Default 300s (5m), max 1800s (30m). Sessions terminate automatically on expiry.
115
115
  - **Orphan Sweeping**: Periodically sweep untracked sessions via `GET /v1/sessions` and release idle processes.
116
116
  - **Memory Protection**: Kubernetes mounts a 2Gi `emptyDir` memory volume at `/dev/shm` to prevent Chromium tab crashes without exhausting node memory.
117
+
118
+ ---
119
+
120
+ ## Knowledge base
121
+
122
+ - [How are credentials retrieved without exposing them to the model?](kb/how-credentials-retrieved-safely.md)
123
+ - [How do I capture a UI section and annotate changes for an agent?](kb/how-to-capture-and-annotate-section.md)
124
+ - [How do I connect Playwright to the existing Steel session?](kb/how-to-connect-playwright-to-steel.md)
125
+ - [How do I recover an expired session or remove an orphaned browser?](kb/how-to-recover-expired-session-or-orphan.md)
126
+ - [How does an agent resume after MFA?](kb/how-to-resume-after-mfa.md)
127
+ - [How do I take over a browser session to log in?](kb/how-to-take-over-session.md)
128
+ - [Why did authentication disappear?](kb/why-authentication-disappeared.md)
129
+ - [Why did automation open a different browser?](kb/why-automation-opened-different-browser.md)
130
+ - [Why can I view a session but not control it?](kb/why-session-viewer-cannot-control.md)
131
+
132
+ ## Prompt templates
133
+
134
+ - [Starting browser work](prompts/browser-start.md)
135
+ - [Exploring an application](prompts/browser-explore.md)
136
+ - [Requesting human takeover](prompts/browser-takeover.md)
137
+ - [Diagnosing and recovering a failed session](prompts/browser-diagnose-recover.md)
138
+ - [Reproducing a UI bug and writing a Playwright test](prompts/browser-repro-fix.md)
139
+ - [Capturing UI section annotations](prompts/browser-annotate-feedback.md)
@@ -199,13 +199,12 @@ When a Pi peer produces more than 32,000 characters, the extension returns a bou
199
199
 
200
200
  `KXM_AGENT_NAME` and `KXM_PROJECT` are required by `kxm agent worker`. Session isolation is opt-in for upgrade compatibility: pass `--session-isolation workflow` or set the environment variable to `workflow` after reviewing the fresh scoped-session behavior. Both the CLI and direct `scripts/kxm-worker.mjs` default to `off`, so existing shared `--continue` histories are not silently abandoned. The remaining agent settings are inherited by the spawned Pi RPC process. The worker resolves `.kxm` and explicit package paths inside `KXM_WORKDIR`, creates the standard directories, and passes absolute paths to Pi. When either resource-path variable is set, the worker disables discovery for that resource category and loads only the listed files or directories; setting just one category leaves discovery unchanged for the other. Missing paths and extension directories fail before the restart loop. A skill may be a `SKILL.md` file or a directory Pi scans for skills. Restart the worker after changing any resource or path.
201
201
 
202
- Use exact paths for release verification or an uninstalled worktree. Include every provider extension the selected models require because extension discovery is isolated:
202
+ Use exact paths for release verification or an uninstalled worktree. The antigravity provider is bundled inside `plugins/kxm` (vendored from pi-antigravity, MIT) — do NOT also load a standalone pi-antigravity extension; the bundled registration warns fail-loud on the duplicate. Include every other provider extension the selected models require because extension discovery is isolated:
203
203
 
204
204
  ```powershell
205
205
  $separator = [IO.Path]::PathSeparator
206
206
  $env:KXM_WORKER_EXTENSION_PATHS = @(
207
207
  "plugins/kxm/src/extension.ts"
208
- "$env:USERPROFILE/.pi/agent/npm/node_modules/pi-antigravity/src/index.ts"
209
208
  ) -join $separator
210
209
  $env:KXM_WORKER_SKILL_PATHS = "plugins/kxm/skills/kxm"
211
210
  $coordinatorTools = @(
@@ -40,8 +40,11 @@ commands for RTK independently of `rtk.ts`.
40
40
 
41
41
  ## Notes
42
42
 
43
- - `pi-antigravity` and `@tian.zuo/pi-antigravity` are different Pi providers.
44
- They do not replace the native `agy` harness used by the assignment runner.
43
+ - The antigravity provider is bundled inside `plugins/kxm` (vendored from
44
+ pi-antigravity, MIT); remove any standalone pi-antigravity Pi extension to
45
+ avoid the double-registration warning. `pi-antigravity` and
46
+ `@tian.zuo/pi-antigravity` are different Pi providers. They do not replace
47
+ the native `agy` harness used by the assignment runner.
45
48
  - For KXM development loads, prefer the working tree:
46
49
  `pi --no-extensions -e ./plugins/kxm/src/extension.ts`. Add every required
47
50
  provider extension with another `-e`; otherwise Pi discovery is disabled.
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "PROMPT-BROWSER-006"
4
+ type: "prompt"
5
+ title: "Capturing UI Section Annotations and Sending Changes to Agent"
6
+ project: "kxm"
7
+ status: "accepted"
8
+ owner: "@operator"
9
+ created: "2026-09-14"
10
+ updated: "2026-09-15"
11
+ authority: "instruction"
12
+ confidence: "verified"
13
+ summary: "Turn annotated Steel UI-section feedback into source changes and recapture verified proof."
14
+ tags: ["browser", "annotation", "feedback", "prompt"]
15
+ related: ["docs/browser-automation.md", "docs/kb/how-to-capture-and-annotate-section.md"]
16
+ ---
17
+
1
18
  # Task Template: Capturing UI Section Annotations and Sending Changes to Agent
2
19
 
3
20
  ## Purpose
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "PROMPT-BROWSER-004"
4
+ type: "prompt"
5
+ title: "Diagnosing and Recovering a Failed Browser Session"
6
+ project: "kxm"
7
+ status: "accepted"
8
+ owner: "@operator"
9
+ created: "2026-09-14"
10
+ updated: "2026-09-15"
11
+ authority: "instruction"
12
+ confidence: "verified"
13
+ summary: "Troubleshoot unresponsive Steel sessions, CDP attachment errors, auth loops, and orphaned browser containers."
14
+ tags: ["browser", "diagnostics", "recovery", "prompt"]
15
+ related: ["docs/browser-automation.md", "docs/kb/how-to-recover-expired-session-or-orphan.md"]
16
+ ---
17
+
1
18
  # Task Template: Diagnosing and Recovering a Failed Browser Session
2
19
 
3
20
  ## Purpose
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "PROMPT-BROWSER-002"
4
+ type: "prompt"
5
+ title: "Exploring an Application with an Authenticated Session"
6
+ project: "kxm"
7
+ status: "accepted"
8
+ owner: "@operator"
9
+ created: "2026-09-14"
10
+ updated: "2026-09-15"
11
+ authority: "instruction"
12
+ confidence: "verified"
13
+ summary: "Exploratory discovery, DOM mapping, and journey inspection via agent-browser attached to a remote Steel session."
14
+ tags: ["browser", "explore", "agent-browser", "prompt"]
15
+ related: ["docs/browser-automation.md", "docs/kb/how-to-connect-playwright-to-steel.md"]
16
+ ---
17
+
1
18
  # Task Template: Exploring an Application with an Authenticated Session
2
19
 
3
20
  ## Purpose
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "PROMPT-BROWSER-005"
4
+ type: "prompt"
5
+ title: "Reproducing a UI Bug and Producing a Playwright Regression Test"
6
+ project: "kxm"
7
+ status: "accepted"
8
+ owner: "@operator"
9
+ created: "2026-09-14"
10
+ updated: "2026-09-15"
11
+ authority: "instruction"
12
+ confidence: "verified"
13
+ summary: "Reproduce a UI defect on Steel, collect evidence, write a Playwright regression, and prove RED then GREEN."
14
+ tags: ["browser", "playwright", "repro", "prompt"]
15
+ related: ["docs/browser-automation.md", "docs/kb/how-to-connect-playwright-to-steel.md"]
16
+ ---
17
+
1
18
  # Task Template: Reproducing a UI Bug and Producing a Playwright Regression Test
2
19
 
3
20
  ## Purpose
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "PROMPT-BROWSER-001"
4
+ type: "prompt"
5
+ title: "Starting Browser Work in a KXM Project"
6
+ project: "kxm"
7
+ status: "accepted"
8
+ owner: "@operator"
9
+ created: "2026-09-14"
10
+ updated: "2026-09-15"
11
+ authority: "instruction"
12
+ confidence: "verified"
13
+ summary: "Initialize a remote Steel browser session for a project task, verifying credentials, connectivity, and attachment endpoints before automation."
14
+ tags: ["browser", "steel", "session", "prompt"]
15
+ related: ["docs/browser-automation.md", "docs/kb/how-credentials-retrieved-safely.md"]
16
+ ---
17
+
1
18
  # Task Template: Starting Browser Work in a KXM Project
2
19
 
3
20
  ## Purpose
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "PROMPT-BROWSER-003"
4
+ type: "prompt"
5
+ title: "Requesting Human Authentication and Resuming Afterward"
6
+ project: "kxm"
7
+ status: "accepted"
8
+ owner: "@operator"
9
+ created: "2026-09-14"
10
+ updated: "2026-09-15"
11
+ authority: "instruction"
12
+ confidence: "verified"
13
+ summary: "Pause automation for MFA, OAuth, or CAPTCHA takeover, then resume after verified human success."
14
+ tags: ["browser", "takeover", "mfa", "prompt"]
15
+ related: ["docs/browser-automation.md", "docs/kb/how-to-take-over-session.md", "docs/kb/how-to-resume-after-mfa.md"]
16
+ ---
17
+
1
18
  # Task Template: Requesting Human Authentication and Resuming Afterward
2
19
 
3
20
  ## Purpose
@@ -40,7 +40,7 @@ This directory contains standardized Markdown documentation templates adapted fo
40
40
 
41
41
  ## Workflow Guide Integration Matrix
42
42
 
43
- The 12 templates map directly across the 7 Areas and 22 Workflows in [`docs/workflow-guide.md`](../workflow-guide.md):
43
+ The 11 templates map directly across the 7 Areas and 22 Workflows in [`docs/workflow-guide.md`](../workflow-guide.md):
44
44
 
45
45
  ```mermaid
46
46
  flowchart TD
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontextmind/kxm",
3
- "version": "0.7.15",
3
+ "version": "0.7.17",
4
4
  "description": "KXM local-first multi-agent orchestration and operator dashboard",
5
5
  "type": "module",
6
6
  "author": "KontextMind",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "kxm",
4
4
  "displayName": "KXM",
5
- "version": "0.7.15",
5
+ "version": "0.7.17",
6
6
  "description": "Headless multi-agent orchestration, durable workflows, and a live operator dashboard for Pi and Claude Code",
7
7
  "author": {
8
8
  "name": "KontextMind",
@@ -25694,6 +25694,10 @@ var SECRET_PATTERNS = [
25694
25694
  /\bgithub_pat_[A-Za-z0-9_]{20,}\b/g,
25695
25695
  /\bxox[baprs]-[A-Za-z0-9-]{10,}\b/gi,
25696
25696
  /\bBearer\s+[A-Za-z0-9._~+/=-]+\b/gi,
25697
+ /\bya29\.[A-Za-z0-9._~+/-]+=*/g,
25698
+ /\b1\/\/[A-Za-z0-9_-]+/g,
25699
+ /\b1\/[A-Za-z0-9_-]{20,}/g,
25700
+ /("?(?:access_token|refresh_token|id_token)"?\s*[:=]\s*")[^"]*(")/gi,
25697
25701
  /\bKXM_[A-Z0-9_]*(TOKEN|SECRET|KEY)[A-Z0-9_]*=\S+/gi,
25698
25702
  /\b(GITHUB_TOKEN|GH_TOKEN|KXM_AUTH_TOKEN|KXM_WORKFLOW_SIGNAL_SECRET)=\S+/gi,
25699
25703
  /\b[A-Fa-f0-9]{64}\b/g
@@ -832,6 +832,10 @@ var SECRET_PATTERNS = [
832
832
  /\bgithub_pat_[A-Za-z0-9_]{20,}\b/g,
833
833
  /\bxox[baprs]-[A-Za-z0-9-]{10,}\b/gi,
834
834
  /\bBearer\s+[A-Za-z0-9._~+/=-]+\b/gi,
835
+ /\bya29\.[A-Za-z0-9._~+/-]+=*/g,
836
+ /\b1\/\/[A-Za-z0-9_-]+/g,
837
+ /\b1\/[A-Za-z0-9_-]{20,}/g,
838
+ /("?(?:access_token|refresh_token|id_token)"?\s*[:=]\s*")[^"]*(")/gi,
835
839
  /\bKXM_[A-Z0-9_]*(TOKEN|SECRET|KEY)[A-Z0-9_]*=\S+/gi,
836
840
  /\b(GITHUB_TOKEN|GH_TOKEN|KXM_AUTH_TOKEN|KXM_WORKFLOW_SIGNAL_SECRET)=\S+/gi,
837
841
  /\b[A-Fa-f0-9]{64}\b/g