@kodizm/acp 0.9.2 → 0.9.3

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 +37 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -51,7 +51,7 @@ var package_default;
51
51
  var init_package = __esm(() => {
52
52
  package_default = {
53
53
  name: "@kodizm/acp",
54
- version: "0.9.2",
54
+ version: "0.9.3",
55
55
  description: "Custom ACP server bridging Claude Code and opencode CLIs through a single Kodizm-flavored protocol surface.",
56
56
  type: "module",
57
57
  bin: {
@@ -5073,7 +5073,7 @@ var AbsolutePathSchema, PLUGIN_ROOT = "/opt/kodizm/plugins/", PluginPathSchema,
5073
5073
  var init_schemas3 = __esm(() => {
5074
5074
  init_zod();
5075
5075
  AbsolutePathSchema = string2().regex(/^\//, 'path must be absolute (start with "/")');
5076
- 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` });
5076
+ PluginPathSchema = AbsolutePathSchema.refine((path) => path.length > PLUGIN_ROOT.length && path.startsWith(PLUGIN_ROOT) && !path.slice(PLUGIN_ROOT.length).split("/").some((segment) => segment === "" || segment === "." || segment === ".."), { message: `plugin path must live under ${PLUGIN_ROOT} with no ".", ".." or empty segment` });
5077
5077
  McpServerSchema = object({
5078
5078
  type: literal("http"),
5079
5079
  name: string2().min(1),
@@ -44933,7 +44933,16 @@ function paneEnv(options) {
44933
44933
  };
44934
44934
  }
44935
44935
  function launchArgv(options) {
44936
- const argv = [options.claudeBin ?? "claude", "--settings", options.settingsPath, "--setting-sources", ""];
44936
+ const argv = [
44937
+ options.claudeBin ?? "claude",
44938
+ "--settings",
44939
+ options.settingsPath,
44940
+ "--setting-sources",
44941
+ options.settingSources ?? ""
44942
+ ];
44943
+ if (options.pluginDir !== undefined) {
44944
+ argv.push("--plugin-dir", options.pluginDir);
44945
+ }
44937
44946
  if (options.permissionMode !== undefined) {
44938
44947
  argv.push("--permission-mode", options.permissionMode);
44939
44948
  }
@@ -45334,16 +45343,32 @@ function parseStartExtras(args) {
45334
45343
  const oneShot = parseOneShot(args["one-shot"]);
45335
45344
  const deadlineSeconds = parseSeconds(args["deadline-seconds"], 1);
45336
45345
  const retainFailedSeconds = parseSeconds(args["retain-failed-seconds"], 0);
45337
- if (permissionMode === null || oneShot === null || deadlineSeconds === null || retainFailedSeconds === null) {
45346
+ const pluginDir = parsePluginDir(args["plugin-dir"]);
45347
+ const settingSources = parseSettingSources(args["setting-sources"]);
45348
+ if (permissionMode === null || oneShot === null || deadlineSeconds === null || retainFailedSeconds === null || pluginDir === null || settingSources === null) {
45338
45349
  return null;
45339
45350
  }
45340
45351
  return {
45341
45352
  permissionMode,
45342
45353
  oneShot,
45343
45354
  deadlineSeconds,
45344
- retainFailedSeconds: retainFailedSeconds ?? 0
45355
+ retainFailedSeconds: retainFailedSeconds ?? 0,
45356
+ pluginDir,
45357
+ settingSources
45345
45358
  };
45346
45359
  }
45360
+ function parsePluginDir(value) {
45361
+ if (value === undefined) {
45362
+ return;
45363
+ }
45364
+ return PluginPathSchema.safeParse(value).success ? value : null;
45365
+ }
45366
+ function parseSettingSources(value) {
45367
+ if (value === undefined) {
45368
+ return;
45369
+ }
45370
+ return value === "project" ? value : null;
45371
+ }
45347
45372
  function parsePermissionMode(value) {
45348
45373
  if (value === undefined) {
45349
45374
  return;
@@ -45384,7 +45409,9 @@ var init_start_flags = __esm(() => {
45384
45409
  "permission-mode",
45385
45410
  "one-shot",
45386
45411
  "deadline-seconds",
45387
- "retain-failed-seconds"
45412
+ "retain-failed-seconds",
45413
+ "plugin-dir",
45414
+ "setting-sources"
45388
45415
  ]);
45389
45416
  START_FILE_FLAGS = [
45390
45417
  "env-file",
@@ -46663,6 +46690,8 @@ class LiveDaemon {
46663
46690
  tools: features?.tools,
46664
46691
  disallowedTools: features?.disallowedTools,
46665
46692
  permissionMode: extras.permissionMode,
46693
+ pluginDir: extras.pluginDir,
46694
+ settingSources: extras.settingSources,
46666
46695
  claudeBin: this.options.claudeBin,
46667
46696
  socket: pane.socket,
46668
46697
  confirmStarted: (timeoutMs) => live.started.wait(timeoutMs)
@@ -47481,7 +47510,8 @@ Commands:
47481
47510
  ctl <verb> [flags] Drive a Live pane through the daemon; prints one JSON line.
47482
47511
  Verbs: start, prompt, command, cancel, stop, rotate-token, status.
47483
47512
  start also takes --permission-mode default|dontAsk, --one-shot 0|1,
47484
- --deadline-seconds N, --retain-failed-seconds N and
47513
+ --deadline-seconds N, --retain-failed-seconds N,
47514
+ --plugin-dir /opt/kodizm/plugins/DIR, --setting-sources project and
47485
47515
  --mcp-config/--tool-policy/--system-prompt-file/--features PATH.
47486
47516
  hook <Event> --pane <id> --socket <path> Hook helper the pane settings run; reads the payload on stdin.
47487
47517
  daemon Run the daemon in the foreground; ctl start spawns it detached.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kodizm/acp",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
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": {