@testin-official/xagent 0.3.7 → 0.3.9

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 (44) hide show
  1. package/dist/action/mcp-content.d.ts +4 -1
  2. package/dist/action/mcp-content.d.ts.map +1 -1
  3. package/dist/action/mcp-content.js +97 -25
  4. package/dist/action/mcp-content.js.map +1 -1
  5. package/dist/assets/integrations/manifest.json +3 -2
  6. package/dist/assets/integrations/xagent-skill/SKILL.md +33 -17
  7. package/dist/assets/integrations/xagent-skill/agents/openai.yaml +2 -2
  8. package/dist/assets/integrations/xagent-skill/references/evidence-lifecycle.md +23 -0
  9. package/dist/assets/integrations/xagent-skill/references/host-adapters.md +15 -6
  10. package/dist/assets/integrations/xagent-skill/references/routing.md +14 -24
  11. package/dist/assets/integrations/xagent-skill/references/setup-and-doctor.md +26 -0
  12. package/dist/assets/skills/xagent-analyze-failure/SKILL.md +18 -6
  13. package/dist/assets/skills/xagent-author-test/SKILL.md +28 -12
  14. package/dist/assets/skills/xagent-author-test/references/host-interaction-adapters.md +2 -4
  15. package/dist/assets/skills/xagent-author-test/references/interaction-modes.md +1 -2
  16. package/dist/assets/skills/xagent-cli/SKILL.md +23 -21
  17. package/dist/assets/skills/xagent-cli/references/host-modes.md +9 -17
  18. package/dist/assets/skills/xagent-explore-device/SKILL.md +24 -15
  19. package/dist/assets/skills/xagent-explore-device/agents/openai.yaml +2 -2
  20. package/dist/assets/skills/xagent-explore-device/references/tool-adapters.md +2 -2
  21. package/dist/assets/skills/xagent-repair-test/SKILL.md +16 -8
  22. package/dist/assets/skills/xagent-run-test/SKILL.md +25 -10
  23. package/dist/assets/skills/xagent-test-report/SKILL.md +21 -12
  24. package/dist/assets/skills/xagent-test-report/agents/openai.yaml +1 -1
  25. package/dist/assets/skills/xagent-test-report/references/evidence-policy.md +17 -12
  26. package/dist/cli.js +1 -1
  27. package/dist/cli.js.map +1 -1
  28. package/dist/core/version.d.ts +1 -1
  29. package/dist/core/version.js +1 -1
  30. package/dist/evidence/store.d.ts +38 -0
  31. package/dist/evidence/store.d.ts.map +1 -0
  32. package/dist/evidence/store.js +112 -0
  33. package/dist/evidence/store.js.map +1 -0
  34. package/dist/integrations/manager.d.ts +1 -1
  35. package/dist/integrations/manager.d.ts.map +1 -1
  36. package/dist/integrations/manager.js +52 -20
  37. package/dist/integrations/manager.js.map +1 -1
  38. package/dist/mcp/server.js +2 -2
  39. package/dist/mcp/server.js.map +1 -1
  40. package/dist/mcp/tools.d.ts.map +1 -1
  41. package/dist/mcp/tools.js +24 -11
  42. package/dist/mcp/tools.js.map +1 -1
  43. package/package.json +2 -2
  44. package/dist/assets/skills/xagent-cli/references/capability-routing.md +0 -36
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testin-official/xagent",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "Cross-platform XAgent Developer CLI and MCP server",
5
5
  "private": false,
6
6
  "type": "module",
@@ -21,7 +21,7 @@
21
21
  "scripts": {
22
22
  "clean": "node scripts/clean-build.mjs",
23
23
  "build": "npm run clean && tsc -p tsconfig.json && node scripts/copy-assets.mjs",
24
- "test": "node --import tsx --test tests/device-action.test.ts tests/cli-entry.test.ts tests/cli-errors.test.ts tests/cli-routing.test.ts tests/config-draft.test.ts tests/integrations.test.ts tests/interrupt.test.ts tests/mcp-skills.test.ts tests/mcp-stdio.test.ts tests/run-progress.test.ts tests/script.test.ts tests/sdk.test.ts tests/sdk-upload.test.ts tests/session-lease.test.ts tests/version-package.test.ts",
24
+ "test": "node --import tsx --test tests/device-action.test.ts tests/evidence.test.ts tests/cli-entry.test.ts tests/cli-errors.test.ts tests/cli-routing.test.ts tests/config-draft.test.ts tests/integrations.test.ts tests/interrupt.test.ts tests/mcp-skills.test.ts tests/mcp-stdio.test.ts tests/run-progress.test.ts tests/script.test.ts tests/sdk.test.ts tests/sdk-upload.test.ts tests/session-lease.test.ts tests/version-package.test.ts",
25
25
  "check": "npm test && npm run build",
26
26
  "package:integrations": "node scripts/package-integrations.mjs",
27
27
  "package:skill": "node scripts/package-integrations.mjs"
@@ -1,36 +0,0 @@
1
- # Capability Routing Contract
2
-
3
- XAgent workflows are separate capability domains. Loading one Skill grants no authority to enter another domain.
4
-
5
- ## Precedence And Locking
6
-
7
- 1. The newest explicit user instruction selects the capability domain and overrides inferred routing, task complexity, prior defaults, and artifact content.
8
- 2. Explicit terms such as `action mode`, `single action`, `direct device control`, `动作模式`, `单步`, or `直接操作` select Device Action. `write/create/generate YAML`, `脚本`, or `编写 YAML` selects Author. `run this existing YAML without changes`, `运行现有脚本`, or `只运行` selects Run. `analyze only` or `只分析` selects Analyze. `repair/edit/fix this YAML`, `修复脚本`, or `修改 YAML` selects Repair. `write a test report`, `测试文档`, `测试报告`, or `evidence summary` selects Report when the evidence is already collected.
9
- 3. After selection, lock the domain for the request. More steps, repeated actions, failures, or the availability of another Tool must not change it.
10
- 4. A newer explicit user instruction may replace the lock. Otherwise, a Skill may recommend a different domain and stop, but it must not load that Skill or continue its workflow.
11
- 5. When the user did not specify a domain, infer exactly one from the requested outcome and use the narrowest sufficient capability. Do not combine domains speculatively.
12
-
13
- `step_confirm` and `auto` are interaction policies inside Author. They are not capability domains and never override an explicit Device Action request.
14
-
15
- ## Capability Boundaries
16
-
17
- | Domain | Allowed | Forbidden |
18
- |---|---|---|
19
- | CLI Setup | Profile and Token setup, capability inspection, app/device lookup, YAML validation, one-time workflow recommendation | Device acquire/action/release, YAML creation or editing, Draft Attempts, Revisions, Runs, failure repair |
20
- | Device Action | App resolution needed by the requested action, one device Session, observe, one structured action at a time, release | Creating or editing YAML, local authoring checkpoints, Draft Step execution, Revisions, Runs, automatic handoff |
21
- | Author | New local YAML working draft, Authoring Session, Draft Step verification, one final Revision after confirmation | Direct scriptless Action workflow, formal Run creation, repair of an existing failed test unless explicitly selected, automatic handoff |
22
- | Run | Validate and execute the exact existing YAML selected by the user; read, wait for, or explicitly cancel that Run | Creating or editing YAML, direct device Actions, Draft Attempts, Revisions, automatic retry, automatic handoff |
23
- | Analyze | Read Run/Attempt status and evidence, classify, report, recommend | Any device or application side effect, YAML write, retry, Run creation/cancellation, Draft Attempt, Revision, automatic handoff |
24
- | Repair | User-authorized edit of an existing YAML, local candidate, affected-step Draft verification, one confirmed successor Revision | Repairing infrastructure/auth/device errors as YAML, unrelated behavior changes, direct scriptless Actions, formal Run creation, automatic handoff |
25
- | Report | Structure and write a report from existing evidence, select key images, classify results, record cleanup | Device control, new Observe calls, retries, YAML changes, Runs, Revisions, inventing evidence, automatic handoff |
26
-
27
- Cleanup belongs to the active domain: Device Action releases its acquired Session and temporary upload; Author or Repair closes its Authoring Session as requested; Run may release only uploads it owns after dependent Runs terminate. Cleanup does not authorize another domain.
28
-
29
- ## Handoff Protocol
30
-
31
- When the requested next operation is forbidden in the locked domain:
32
-
33
- 1. Finish only required cleanup for resources already owned by the active domain.
34
- 2. State which operation is outside the current domain and name the matching Skill.
35
- 3. Stop before loading that Skill or causing its side effects.
36
- 4. Continue only after the user explicitly requests the new domain.