@kodizm/acp 0.6.8 → 0.7.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.
Files changed (2) hide show
  1. package/dist/index.js +32 -14
  2. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -5723,6 +5723,9 @@ function translateFeaturesToClaude(features, permissionMode) {
5723
5723
  out.strictMcpConfig = true;
5724
5724
  return out;
5725
5725
  }
5726
+ if (features.tools !== undefined) {
5727
+ out.tools = [...features.tools];
5728
+ }
5726
5729
  for (const [family, tools] of Object.entries(FAMILY_TOOLS)) {
5727
5730
  if (features[family] !== false) {
5728
5731
  continue;
@@ -6426,6 +6429,7 @@ class ClaudeDriver {
6426
6429
  }
6427
6430
  buildBaseSdkOptions(params) {
6428
6431
  const additional = "additionalDirectories" in params && params.additionalDirectories !== undefined ? { additionalDirectories: [...params.additionalDirectories] } : {};
6432
+ const plugins = "plugins" in params && params.plugins !== undefined && params.plugins.length > 0 ? { plugins: params.plugins.map((path) => ({ type: "local", path })) } : {};
6429
6433
  const skills = "skills" in params && params.skills !== undefined && params.skills.length > 0 ? { skills: [...params.skills] } : {};
6430
6434
  const policyTranslation = "toolPolicy" in params && params.toolPolicy !== undefined ? translateToolPolicyToClaude(params.toolPolicy) : {};
6431
6435
  const permissionMode = policyTranslation.permissionMode ?? "bypassPermissions";
@@ -6460,6 +6464,7 @@ class ClaudeDriver {
6460
6464
  cwd: params.cwd,
6461
6465
  mcpServers: translateMcpServers(params.mcpServers),
6462
6466
  ...additional,
6467
+ ...plugins,
6463
6468
  ...skills,
6464
6469
  ...policyOptions,
6465
6470
  ...envOpt,
@@ -51717,7 +51722,7 @@ class OpencodeDriver {
51717
51722
  }
51718
51723
  async newSession(params) {
51719
51724
  const sessionId = randomUUID4();
51720
- const env = this.buildAuthEnv(params);
51725
+ const env = this.buildSessionEnv(params);
51721
51726
  const bridge = this.bridgeFactory();
51722
51727
  const handle = await bridge.start({ env });
51723
51728
  const ruleset = buildOpencodeRuleset(params.toolPolicy);
@@ -51966,7 +51971,7 @@ class OpencodeDriver {
51966
51971
  throw new MethodNotSupportedError("session/load", this.supportedMethodNames());
51967
51972
  }
51968
51973
  const bridge = this.bridgeFactory();
51969
- const handle = await bridge.start({});
51974
+ const handle = await bridge.start({ env: this.buildSessionEnv(params) });
51970
51975
  const sessionApi = handle.sdk.session;
51971
51976
  if (typeof sessionApi.get === "function") {
51972
51977
  try {
@@ -52033,6 +52038,14 @@ class OpencodeDriver {
52033
52038
  return;
52034
52039
  })));
52035
52040
  }
52041
+ buildSessionEnv(params) {
52042
+ const sources = params.features?.simple === true ? [] : params.settingSources;
52043
+ const untrusted = sources !== undefined && !sources.includes("project");
52044
+ return {
52045
+ ...this.buildAuthEnv(params),
52046
+ ...untrusted ? { OPENCODE_DISABLE_PROJECT_CONFIG: "1" } : {}
52047
+ };
52048
+ }
52036
52049
  buildAuthEnv(params) {
52037
52050
  const meta = params._meta ?? {};
52038
52051
  if (meta.opencodeAuth === undefined) {
@@ -52123,8 +52136,8 @@ var init_driver2 = __esm(() => {
52123
52136
  // package.json
52124
52137
  var package_default = {
52125
52138
  name: "@kodizm/acp",
52126
- version: "0.6.8",
52127
- description: "Custom ACP server bridging Claude Code, codex, and opencode CLIs through a single Kodizm-flavored protocol surface.",
52139
+ version: "0.7.0",
52140
+ description: "Custom ACP server bridging Claude Code and opencode CLIs through a single Kodizm-flavored protocol surface.",
52128
52141
  type: "module",
52129
52142
  bin: {
52130
52143
  "kodizm-acp": "./dist/index.js"
@@ -52156,17 +52169,18 @@ var package_default = {
52156
52169
  publishConfig: {
52157
52170
  access: "public"
52158
52171
  },
52159
- dependencies: {
52160
- "@anthropic-ai/claude-agent-sdk": "^0.3.280",
52161
- "@anthropic-ai/sdk": ">=0.93.0",
52162
- "@modelcontextprotocol/sdk": "^1.29.0",
52163
- "@opencode-ai/sdk": "^1.18.32",
52164
- zod: "^4.0.0"
52172
+ config: {
52173
+ claudeAgentSdk: "0.3.280"
52165
52174
  },
52166
52175
  devDependencies: {
52176
+ "@anthropic-ai/claude-agent-sdk": "0.3.280",
52177
+ "@anthropic-ai/sdk": ">=0.93.0",
52167
52178
  "@biomejs/biome": "^1.9.0",
52179
+ "@modelcontextprotocol/sdk": "^1.29.0",
52180
+ "@opencode-ai/sdk": "^1.18.32",
52168
52181
  "@types/bun": "latest",
52169
- typescript: "^5.6.0"
52182
+ typescript: "^5.6.0",
52183
+ zod: "^4.0.0"
52170
52184
  },
52171
52185
  license: "Apache-2.0",
52172
52186
  homepage: "https://github.com/kodizm/acp",
@@ -52178,7 +52192,6 @@ var package_default = {
52178
52192
  "acp",
52179
52193
  "agent-client-protocol",
52180
52194
  "claude",
52181
- "codex",
52182
52195
  "opencode",
52183
52196
  "ai",
52184
52197
  "bridge",
@@ -52204,6 +52217,8 @@ function ensureCapability(caps, required, method) {
52204
52217
  // src/wire/schemas.ts
52205
52218
  init_zod();
52206
52219
  var AbsolutePathSchema = string2().regex(/^\//, 'path must be absolute (start with "/")');
52220
+ var PLUGIN_ROOT = "/opt/kodizm/plugins/";
52221
+ var PluginPathSchema = AbsolutePathSchema.refine((path) => path.length > PLUGIN_ROOT.length && path.startsWith(PLUGIN_ROOT) && !path.split("/").includes(".."), { message: `plugin path must live under ${PLUGIN_ROOT} with no ".." segment` });
52207
52222
  var McpServerSchema = object({
52208
52223
  type: literal("http"),
52209
52224
  name: string2().min(1),
@@ -52240,7 +52255,8 @@ var CANONICAL_FIELDS_BANNED_IN_META = [
52240
52255
  "heartbeatIntervalMs",
52241
52256
  "inactivityThresholdMs",
52242
52257
  "settingSources",
52243
- "features"
52258
+ "features",
52259
+ "plugins"
52244
52260
  ];
52245
52261
  var SettingSourcesSchema = array(_enum(["user", "project", "local"]));
52246
52262
  var PermissionModeSchema = _enum(["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions"]);
@@ -52261,7 +52277,8 @@ var FeaturesSchema = object({
52261
52277
  clientTools: boolean2().optional(),
52262
52278
  autoMemory: boolean2().optional(),
52263
52279
  bundledSkills: boolean2().optional(),
52264
- simple: boolean2().optional()
52280
+ simple: boolean2().optional(),
52281
+ tools: array(string2().min(1)).optional()
52265
52282
  });
52266
52283
  function metaCarriesNoCanonicalFields(data) {
52267
52284
  if (data._meta === undefined) {
@@ -52282,6 +52299,7 @@ var InitializeRequestSchema = object({
52282
52299
  });
52283
52300
  var SessionOptionFields = {
52284
52301
  additionalDirectories: array(AbsolutePathSchema).optional(),
52302
+ plugins: array(PluginPathSchema).optional(),
52285
52303
  systemPrompt: SystemPromptSchema.optional(),
52286
52304
  model: string2().optional(),
52287
52305
  skills: array(string2()).optional(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kodizm/acp",
3
- "version": "0.6.8",
4
- "description": "Custom ACP server bridging Claude Code, codex, and opencode CLIs through a single Kodizm-flavored protocol surface.",
3
+ "version": "0.7.0",
4
+ "description": "Custom ACP server bridging Claude Code and opencode CLIs through a single Kodizm-flavored protocol surface.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "kodizm-acp": "./dist/index.js"
@@ -33,17 +33,18 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "dependencies": {
37
- "@anthropic-ai/claude-agent-sdk": "^0.3.280",
38
- "@anthropic-ai/sdk": ">=0.93.0",
39
- "@modelcontextprotocol/sdk": "^1.29.0",
40
- "@opencode-ai/sdk": "^1.18.32",
41
- "zod": "^4.0.0"
36
+ "config": {
37
+ "claudeAgentSdk": "0.3.280"
42
38
  },
43
39
  "devDependencies": {
40
+ "@anthropic-ai/claude-agent-sdk": "0.3.280",
41
+ "@anthropic-ai/sdk": ">=0.93.0",
44
42
  "@biomejs/biome": "^1.9.0",
43
+ "@modelcontextprotocol/sdk": "^1.29.0",
44
+ "@opencode-ai/sdk": "^1.18.32",
45
45
  "@types/bun": "latest",
46
- "typescript": "^5.6.0"
46
+ "typescript": "^5.6.0",
47
+ "zod": "^4.0.0"
47
48
  },
48
49
  "license": "Apache-2.0",
49
50
  "homepage": "https://github.com/kodizm/acp",
@@ -55,7 +56,6 @@
55
56
  "acp",
56
57
  "agent-client-protocol",
57
58
  "claude",
58
- "codex",
59
59
  "opencode",
60
60
  "ai",
61
61
  "bridge",