Skip to content

Extension + Commands Implementation #85

@kanfil

Description

@kanfil

Goal

Create workspaces extension manifest and implement all workspace commands.

Details

1. Create extension.yml manifest

Location: .specify/extensions/workspaces/extension.yml

name: workspaces
version: 0.1.0
description: Provision and manage agent workspaces

provides:
  commands:
    - init
    - attach
    - list
    - status
    - destroy

2. Implement commands

Location: .specify/extensions/workspaces/commands/

Command Description
init.md Provisions workspace and starts opencode serve
attach.md Connects via opencode attach ws://<pod-ip>:9090
list.md Lists available workspaces
status.md Shows workspace status
destroy.md Destroys a workspace

3. Config template

Create workspaces-config.yml template for user configuration.


🔄 ENHANCED - OpenCode Attach Integration (from SPEC-005)

This issue now includes the implementation of SPEC-005 (CLI-to-Server Attach):

New Implementation Approach:

# agentworkspace attach my-project
# 1. Get pod IP from K8s API
# 2. Call: opencode attach ws://<pod-ip>:9090
# 3. Handle reconnection/auth

# For BYOC fallback:
# kubectl port-forward <pod> 9090:9090
# opencode attach ws://localhost:9090

Rationale:

  • Using OpenCode native opencode attach instead of kubeconfig
  • No kubectl dependency for standard attach workflow
  • See PDR-045 (revised) for details

Dependencies

  • SPEC-007: Base Image Layers (GitLab: tikalk/engineering/agentic-sdlc/adlc-agent-workspaces#1)
  • SPEC-008: Dockerfile Overlay System (GitLab: tikalk/engineering/agentic-sdlc/adlc-agent-workspaces#2)
  • SPEC-005: CLI-to-Server Attach - CLOSED, merged into this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensionExtension-related spec

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions