Skip to content

feat(labs): adapt Lab agent tools to AI tools (0194 Phase 2) - #150

Merged
crs48 merged 1 commit into
mainfrom
feat/labs-ai-tools-0194
Jun 17, 2026
Merged

feat(labs): adapt Lab agent tools to AI tools (0194 Phase 2)#150
crs48 merged 1 commit into
mainfrom
feat/labs-ai-tools-0194

Conversation

@crs48

@crs48 crs48 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

What

Completes the remaining clean Phase 2 item of exploration 0194: labAgentToolsToAiTools() adapts the (already MCP-shaped) LabAgentTools — lab_run/lab_list/lab_create/lab_get/lab_run_saved — to the AiCallableTool shape @xnetjs/plugins exposes, so the workspace AI can discover, run, and author Labs alongside the workspace tools. This is the AI→Lab→Plugin loop's first hop.

  • Execution tools (lab_run/lab_create/lab_run_saved) → high risk so the agent/consent layer can gate them; reads (lab_get/lab_list) → low.
  • LabToolPropertySchema is structurally a subset of AiJsonSchema, so input schemas pass straight through (no conversion).
  • Lives in @xnetjs/labs (which already depends on @xnetjs/plugins), avoiding the plugins→labs cycle.

Gates

  • 4 new tests; full @xnetjs/labs suite 50 green; tsc clean; eslint + prettier clean; fallow audit (with coverage) reports no issues in 3 changed files.

Remaining

The app/electron registration of the adapted tools with the MCP server + in-app agent runtime is the remaining (app-side) wiring — this PR ships the type bridge it consumes.

🤖 Generated with Claude Code

`labAgentToolsToAiTools()` adapts the (already MCP-shaped) LabAgentTools
(lab_run/lab_list/lab_create/lab_get/lab_run_saved) to the AiCallableTool shape
@xnetjs/plugins uses, so the workspace AI can discover, run, and author Labs —
the AI→Lab→Plugin loop's first hop. Execution tools are flagged `high` risk,
reads `low`; LabToolPropertySchema is a subset of AiJsonSchema so input schemas
pass straight through. Lives in labs (which already depends on plugins, avoiding
the cycle).

4 new tests; labs suite 50 green; typecheck/eslint/prettier/fallow clean.
The app/electron MCP-server registration of the result remains.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@crs48
crs48 temporarily deployed to pr-150 June 17, 2026 20:00 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #150.

github-actions Bot added a commit that referenced this pull request Jun 17, 2026
@crs48
crs48 merged commit 7bbb04a into main Jun 17, 2026
9 checks passed
github-actions Bot added a commit that referenced this pull request Jun 17, 2026
crs48 added a commit that referenced this pull request Jun 18, 2026
…193/0194) (#201)

The `changelog-section` required check was only added in #164, so the
0192/0193/0194 feature batch merged before it never got changelog
entries. This backfills the 12 user-facing features that were missing,
each dated to its merge day with its PR number and contributors:

| PR | Entry |
|----|-------|
| #138 | A safer foundation for plugins |
| #145 | One trust model across plugins and Labs |
| #146 | Reliability you can see for managed hubs |
| #148 | Drive your own coding agent from xNet |
| #149 | AI that can act on your workspace |
| #150 | Your Labs become AI tools |
| #152 | Your agent can use your workspace |
| #154 | AI edits, right inside the editor |
| #155 | An agentic dev loop in your terminal |
| #158 | Review AI edits before they apply |
| #159 | Kick off agentic code tasks from xNet |
| #162 | Plugins run on the Labs runtime |

Skipped: PRs already covered by umbrella entries (#142 plugin ecosystem,
#144 extensibility fabric, #147 automated changelog, #163 agent panel,
#180 changelog gallery), internal-only changes (#139 schema authz — zero
user-facing effect), and meta/test/docs PRs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant