Skip to content

feat(cli): add workspace management and MCP operations - #704

Merged
pcfreak30 merged 2 commits into
developfrom
feat/workspace-support
Sep 13, 2026
Merged

pcfreak30 merged 2 commits into
developfrom
feat/workspace-support

Conversation

@pcfreak30

@pcfreak30 pcfreak30 commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Adds workspace lifecycle commands backed by the upstream pinner workspace catalog.

Exposes workspace list, create, get, attach, suspend, resume, access, and delete operations through the CLI and MCP surfaces.

Uses pinner tip 17000af806af499c104f3c0bcaed00c3bc927d4e and removes the local module replacement.


This pull request adds a comprehensive new workspaces domain to both the CLI and MCP surfaces, enabling management of isolated workspaces (runtimes with their own portal API key and proxy endpoint, distinct from the website domain-to-CID mapping).

Key changes

New CLI command tree (workspaces)

  • Adds a top-level workspaces command with eight catalog-driven subcommands: list (with ls alias), create, get, attach, suspend, resume, access, and delete.
  • The command tree is compiled from a canonical operation registry (internal/catalogops) via the existing shape/compile pipeline, keeping shape and behavior declarations consistent with other domains.
  • The workspaces delete operation is marked destructive, so the shared pipeline requires --force/--confirm before proceeding.
  • The workspaces access operation (which returns sensitive proxy Basic Auth credentials) is human-only — it is discoverable but never executed by agent/model actors, and its output is rendered as labeled fields rather than table rows.

MCP surface integration

  • Registers all workspace lifecycle operations in AssembleCatalogOps so they are exposed as MCP tools.
  • Adds a Workspaces flag to DomainScope, enabled for both full and hosted surfaces, with a corresponding WorkspacesOn() accessor.
  • Hosted and flat listing strategies now exclude the workspaces_access op (kept behind the needs_human gate), matching the full-surface behavior.

Wiring and rendering

  • Introduces catalog_workspaces_wiring.go to adapt catalog operations to urfave CLI actions, instantiate workspace services, and enforce the destructive gate and auth-token overrides.
  • Provides human and JSON renderers for workspace responses, access credentials, and delete results.

Tests

  • Verifies the workspaces command tree exists with the expected subcommands, the ls alias, that resolve is intentionally absent, and that delete exposes force flags.
  • Verifies workspaces_access is gated human-only at the catalog layer.
  • Verifies the MCP surface registers all eight workspace ops, excludes runtime resolve, and keeps the credential op gated.
  • Updates existing command-registration tests and materialization tests to account for the new domain and the human-only gating.

Overall, this PR delivers a complete, safe, user-facing workspace management capability across CLI and MCP, with careful handling of destructive actions and sensitive credentials.

@kody-ai

This comment has been minimized.

Adds workspace lifecycle commands backed by the upstream pinner workspace
catalog.

Exposes workspace list, create, get, attach, suspend, resume, access, and
delete operations through the CLI and MCP surfaces.

Uses pinner tip 17000af806af499c104f3c0bcaed00c3bc927d4e and removes the
local module replacement.
Comment thread internal/mcp/catalogassembly.go
@pcfreak30
pcfreak30 force-pushed the feat/workspace-support branch from 1b1d71c to c858adf Compare September 13, 2026 16:20
@kody-ai

This comment has been minimized.

Comment thread internal/mcp/catalogassembly.go

@kody-ai kody-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildCatalogOpsDeps populated every catalogops domain except Workspaces,
leaving deps.Workspaces as a zero WorkspacesDeps{} (all-nil service
functions). The MCP assembly threads deps.Workspaces and the workspaces
domain is enabled on the surface, so every workspaces_* operation was
advertised yet failed at invocation with a service-unavailable error.

Mirror the Websites line by wiring catalogWorkspacesDeps into the bundle.
Add a regression test pinning that the workspaces domain assembles into
the production MCP surface built from buildCatalogOpsDeps.
@kody-ai

kody-ai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@github-actions

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Code Coverage Report

Total Coverage: 55.2%

Generated from commit: 39158a1
Repository: LumeWeb/pinner-cli

@pcfreak30
pcfreak30 marked this pull request as ready for review September 13, 2026 16:25
@pcfreak30
pcfreak30 merged commit 9146b33 into develop Sep 13, 2026
11 checks passed
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