opencode-copilot-delegate 0.5.0 → 0.6.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # opencode-copilot-delegate
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e0480fe: Surface per-parameter descriptions to host LLMs and drop the unused `@opencode-ai/sdk` peer dependency.
8
+
9
+ OpenCode's tool-list endpoint serializes plugin schemas with Zod's `toJSONSchema(..., { io: 'input' })` mode, which unwraps `.optional()` wrappers and drops any `.describe()` text attached to the wrapper. The 5 optional parameters across `copilot_delegate` and `copilot_output` chained `.optional().describe(...)` and lost their descriptions in the rendered tool catalog. Reordering to `.describe(...).optional()` places the description on the leaf type so it survives the unwrap.
10
+
11
+ Also drops `@opencode-ai/sdk` from `peerDependencies` and the build externals — the package was never imported from any source file, so the peer requirement was dead config that forced consumers to install an unused dependency.
12
+
3
13
  ## 0.5.0
4
14
 
5
15
  ### Minor Changes
package/dist/index.js CHANGED
@@ -10077,11 +10077,11 @@ function createDelegateTool(options) {
10077
10077
  description: `${TOOL_DESCRIPTION2}${options.description}`,
10078
10078
  args: {
10079
10079
  prompt: tool2.schema.string().min(1).describe("The instruction Copilot should execute. The prompt body is the entire user-visible task; Copilot owns the planning, tool selection, and execution. Required and must be non-empty. Visible in `ps` output (upstream limitation) \u2014 never include secrets, tokens, or PII."),
10080
- agent: tool2.schema.string().optional().describe("Agent name (without .md extension) to use for this task. Must match a discovered agent file in `~/.copilot/agents` or `.github/agents`. The list of currently discovered agents appears at the bottom of this tool description; an empty list means no agents are discoverable and `agent` must be omitted. Omit to use the Copilot CLI default."),
10081
- model: tool2.schema.string().optional().describe("Override the default model for this task. Accepts any model string Copilot CLI recognizes \u2014 for example `claude-opus-4.7`, `claude-sonnet-4.7`, or `gpt-5`. Omit to use the user's configured default."),
10082
- add_dir: tool2.schema.string().array().optional().describe('Additional repository paths to grant Copilot access to (multi-repo workflows). Each entry becomes a `--add-dir <path>` flag. Use absolute paths. Examples: `["/Users/me/repo-a", "/Users/me/repo-b"]`.'),
10083
- allow_tool: tool2.schema.string().array().optional().describe('Copilot tool patterns to allow during this task. Each entry becomes an `--allow-tool <pattern>` flag. Examples: `"shell(*)"`, `"edit"`, `"fetch"`. See the Copilot CLI docs for the full pattern syntax. Layered with `deny_tool` when both are present.'),
10084
- deny_tool: tool2.schema.string().array().optional().describe('Copilot tool patterns to deny during this task. Each entry becomes a `--deny-tool <pattern>` flag. Examples: `"shell(rm)"`, `"shell(curl)"`. Use to harden a task by blocking dangerous operations even if `allow_tool` would permit them.')
10080
+ agent: tool2.schema.string().describe("Agent name (without .md extension) to use for this task. Must match a discovered agent file in `~/.copilot/agents` or `.github/agents`. The list of currently discovered agents appears at the bottom of this tool description; an empty list means no agents are discoverable and `agent` must be omitted. Omit to use the Copilot CLI default.").optional(),
10081
+ model: tool2.schema.string().describe("Override the default model for this task. Accepts any model string Copilot CLI recognizes \u2014 for example `claude-opus-4.7`, `claude-sonnet-4.7`, or `gpt-5`. Omit to use the user's configured default.").optional(),
10082
+ add_dir: tool2.schema.string().array().describe('Additional repository paths to grant Copilot access to (multi-repo workflows). Each entry becomes a `--add-dir <path>` flag. Use absolute paths. Examples: `["/Users/me/repo-a", "/Users/me/repo-b"]`.').optional(),
10083
+ allow_tool: tool2.schema.string().array().describe('Copilot tool patterns to allow during this task. Each entry becomes an `--allow-tool <pattern>` flag. Examples: `"shell(*)"`, `"edit"`, `"fetch"`. See the Copilot CLI docs for the full pattern syntax. Layered with `deny_tool` when both are present.').optional(),
10084
+ deny_tool: tool2.schema.string().array().describe('Copilot tool patterns to deny during this task. Each entry becomes a `--deny-tool <pattern>` flag. Examples: `"shell(rm)"`, `"shell(curl)"`. Use to harden a task by blocking dangerous operations even if `allow_tool` would permit them.').optional()
10085
10085
  },
10086
10086
  async execute(args, ctx) {
10087
10087
  const runningCount = getAllTasks().filter((task2) => task2.status === "running").length;
@@ -10282,8 +10282,8 @@ function createOutputTool() {
10282
10282
  description: TOOL_DESCRIPTION3,
10283
10283
  args: {
10284
10284
  task_id: tool3.schema.string().describe("The task ID returned by `copilot_delegate(...)`. Format: `cpl_<...>`. Required."),
10285
- block: tool3.schema.boolean().optional().describe("If the task is still running, wait for completion up to `timeout_ms` before returning. Default `false` \u2014 returns immediately with the current state. Set to `true` only when the agent has nothing else to do but wait."),
10286
- timeout_ms: tool3.schema.number().int().min(0).max(MAX_TIMEOUT_MS).optional().describe("Maximum wait in milliseconds when `block` is `true`. Default 30000. Range 0\u2013120000 (the upper cap protects the OpenCode session from a single hung delegation). For long research tasks, prefer multiple non-blocking calls over a long block.")
10285
+ block: tool3.schema.boolean().describe("If the task is still running, wait for completion up to `timeout_ms` before returning. Default `false` \u2014 returns immediately with the current state. Set to `true` only when the agent has nothing else to do but wait.").optional(),
10286
+ timeout_ms: tool3.schema.number().int().min(0).max(MAX_TIMEOUT_MS).describe("Maximum wait in milliseconds when `block` is `true`. Default 30000. Range 0\u2013120000 (the upper cap protects the OpenCode session from a single hung delegation). For long research tasks, prefer multiple non-blocking calls over a long block.").optional()
10287
10287
  },
10288
10288
  async execute(args) {
10289
10289
  if (!isValidTaskId(args.task_id)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-copilot-delegate",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "OpenCode plugin that delegates tasks to GitHub Copilot CLI as background subprocesses",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,14 +33,12 @@
33
33
  "node": ">=24"
34
34
  },
35
35
  "peerDependencies": {
36
- "@opencode-ai/plugin": ">=1.14.0",
37
- "@opencode-ai/sdk": ">=1.14.0"
36
+ "@opencode-ai/plugin": ">=1.14.0"
38
37
  },
39
38
  "devDependencies": {
40
39
  "@biomejs/biome": "^2.4.13",
41
40
  "@changesets/cli": "^2.31.0",
42
- "@opencode-ai/plugin": "^1.14.19",
43
- "@opencode-ai/sdk": "^1.14.19",
41
+ "@opencode-ai/plugin": "^1.14.29",
44
42
  "@types/bun": "^1.2.0",
45
43
  "@types/node": "^24.0.0",
46
44
  "rimraf": "^6.0.1",
@@ -48,7 +46,7 @@
48
46
  },
49
47
  "scripts": {
50
48
  "clean": "rimraf dist",
51
- "build": "bun run clean && bun build src/index.ts --outdir dist --target bun --external @opencode-ai/plugin --external @opencode-ai/sdk && tsc --emitDeclarationOnly --noEmit false",
49
+ "build": "bun run clean && bun build src/index.ts --outdir dist --target bun --external @opencode-ai/plugin && tsc --emitDeclarationOnly --noEmit false",
52
50
  "typecheck": "tsc --noEmit",
53
51
  "test": "bun test",
54
52
  "test:unit": "bun test tests/*.test.ts",