Skip to content

[Feature] Support custom tools in V2 bundle manifest #2

@sven1103-agent

Description

@sven1103-agent

Background

OpenCode supports custom tools defined in .opencode/tools/ (see Custom Tools Docs). Tools are TypeScript/JavaScript definitions that can invoke scripts in any language.

Goal

Extend the V2 bundle manifest to optionally declare custom tools that should be installed alongside a preset.

Contract Ownership

This feature requires changes to the bundle contract defined in sven1103-agent/opencode-agents. See docs/bundle-contract.md for the current contract specification.

Proposed Manifest Extension

Add optional tools field to opencode-bundle.manifest.json:

{
  "manifest_version": 1,
  "bundle_name": "qbic-opencode-config-bundle",
  "bundle_version": "v1.1.0",
  "presets": [...],
  "tools": [
    {
      "name": "database",
      "entrypoint": ".opencode/tools/database.ts",
      "description": "Query the project database"
    }
  ]
}

Implementation Steps

  1. Update CLI manifest schema validation to accept optional tools field (in opencode-agents)
  2. Update bundle apply to copy tool definitions to .opencode/tools/ in target project (in opencode-agents)
  3. Update bundle manifest to v1.1.0 when tools are added (in opencode-config-bundle)

Dependencies

  • CLI changes in sven1103-agent/opencode-agents
  • Bundle manifest v1.1.0 (forward-compatible with v1.0.0 CLIs)

Labels

  • enhancement
  • v1.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions