@kodizm/acp 0.5.5 → 0.5.6

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/README.md CHANGED
@@ -108,6 +108,7 @@ type NewSessionRequest = {
108
108
  debugCaptureRpc?: boolean
109
109
  heartbeatIntervalMs?: number
110
110
  inactivityThresholdMs?: number
111
+ settingSources?: ('user' | 'project' | 'local')[] // claude only; opt-out
111
112
  _meta?: Record<string, unknown> // passthrough; canonical fields rejected
112
113
  }
113
114
  ```
@@ -115,6 +116,9 @@ type NewSessionRequest = {
115
116
  > [!WARNING]
116
117
  > `permissionTimeoutMs` and `permissionDeferTimeoutMs` are mutually exclusive. Pick hard-deny on timeout OR soft-defer on timeout, not both. The schema rejects the conflict with a clear error.
117
118
 
119
+ > [!NOTE]
120
+ > `settingSources` is the claude-only opt-out for filesystem config layering. When omitted the SDK's own default fires, matching the standalone Claude Code CLI: project `CLAUDE.md` + `.claude/CLAUDE.md` + `.claude/rules/*.md` load from `cwd` walking up; user `~/.claude/CLAUDE.md` + `~/.claude/rules/*.md` and `CLAUDE.local.md` load too. Pass `[]` to disable every fs scope; pass a selective subset like `['project']` to load only project-tracked files. Codex (`AGENTS.md` from `cwd`) and opencode (`AGENTS.md` / `CLAUDE.md` / `CONTEXT.md` from session `directory`) have no parallel field and ignore this option.
121
+
118
122
  ### Tool policy
119
123
 
120
124
  ```ts
package/dist/index.js CHANGED
@@ -5491,13 +5491,15 @@ class ClaudeDriver {
5491
5491
  DISABLE_AUTO_COMPACT: "1"
5492
5492
  }
5493
5493
  } : {};
5494
+ const settingSourcesOpt = "settingSources" in params && params.settingSources !== undefined ? { settingSources: [...params.settingSources] } : {};
5494
5495
  return {
5495
5496
  cwd: params.cwd,
5496
5497
  mcpServers: translateMcpServers(params.mcpServers),
5497
5498
  ...additional,
5498
5499
  ...skills,
5499
5500
  ...policyOptions,
5500
- ...compactEnv
5501
+ ...compactEnv,
5502
+ ...settingSourcesOpt
5501
5503
  };
5502
5504
  }
5503
5505
  buildSystemPrompt(input) {
@@ -36456,7 +36458,7 @@ class OpencodeDriver {
36456
36458
  const bridge = this.bridgeFactory();
36457
36459
  const handle = await bridge.start({ env });
36458
36460
  const ruleset = buildOpencodeRuleset(params.toolPolicy);
36459
- const createParams = {};
36461
+ const createParams = { directory: params.cwd };
36460
36462
  if (ruleset.length > 0) {
36461
36463
  createParams.permission = ruleset;
36462
36464
  }
@@ -36691,7 +36693,7 @@ class OpencodeDriver {
36691
36693
  const sessionApi = handle.sdk.session;
36692
36694
  if (typeof sessionApi.get === "function") {
36693
36695
  try {
36694
- await sessionApi.get({ sessionID: meta.opencodeSessionId });
36696
+ await sessionApi.get({ sessionID: meta.opencodeSessionId, directory: params.cwd });
36695
36697
  } catch (err) {
36696
36698
  await bridge.stop().catch(() => {
36697
36699
  return;
@@ -36719,7 +36721,10 @@ class OpencodeDriver {
36719
36721
  if (typeof sessionApi.fork !== "function") {
36720
36722
  throw new MethodNotSupportedError("session/fork", this.supportedMethodNames());
36721
36723
  }
36722
- const forkResult = await sessionApi.fork({ sessionID: source.opencodeSessionId });
36724
+ const forkResult = await sessionApi.fork({
36725
+ sessionID: source.opencodeSessionId,
36726
+ directory: params.cwd
36727
+ });
36723
36728
  const forkedOpencodeId = this.extractSessionId(forkResult);
36724
36729
  this.sessions.set(newSessionId, {
36725
36730
  sessionId: newSessionId,
@@ -36888,8 +36893,10 @@ var CANONICAL_FIELDS_BANNED_IN_META = [
36888
36893
  "debugCaptureRawSdk",
36889
36894
  "debugCaptureRpc",
36890
36895
  "heartbeatIntervalMs",
36891
- "inactivityThresholdMs"
36896
+ "inactivityThresholdMs",
36897
+ "settingSources"
36892
36898
  ];
36899
+ var SettingSourcesSchema = exports_external.array(exports_external.enum(["user", "project", "local"]));
36893
36900
  var PermissionModeSchema = exports_external.enum(["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions"]);
36894
36901
  var ToolPolicySchema = exports_external.object({
36895
36902
  allow: exports_external.array(exports_external.string()).optional(),
@@ -36930,6 +36937,7 @@ var NewSessionRequestSchema = exports_external.object({
36930
36937
  debugCaptureRpc: exports_external.boolean().optional(),
36931
36938
  heartbeatIntervalMs: exports_external.number().int().positive().optional(),
36932
36939
  inactivityThresholdMs: exports_external.number().int().positive().optional(),
36940
+ settingSources: SettingSourcesSchema.optional(),
36933
36941
  _meta: MetaSchema.optional()
36934
36942
  }).refine(metaCarriesNoCanonicalFields, { message: META_SMUGGLE_MESSAGE, path: ["_meta"] }).refine((data) => !(data.permissionTimeoutMs !== undefined && data.permissionDeferTimeoutMs !== undefined), {
36935
36943
  message: "permissionTimeoutMs and permissionDeferTimeoutMs are mutually exclusive (pick hard-deny on timeout OR soft-defer on timeout)",
@@ -36948,6 +36956,7 @@ var LoadSessionRequestSchema = exports_external.object({
36948
36956
  sessionId: exports_external.string().min(1),
36949
36957
  cwd: AbsolutePathSchema,
36950
36958
  mcpServers: exports_external.array(McpServerSchema),
36959
+ settingSources: SettingSourcesSchema.optional(),
36951
36960
  _meta: MetaSchema.optional()
36952
36961
  }).refine(metaCarriesNoCanonicalFields, { message: META_SMUGGLE_MESSAGE, path: ["_meta"] });
36953
36962
  var CompactSessionRequestSchema = exports_external.object({
@@ -36960,6 +36969,7 @@ var ForkSessionRequestSchema = exports_external.object({
36960
36969
  systemPrompt: SystemPromptSchema.optional(),
36961
36970
  model: exports_external.string().optional(),
36962
36971
  additionalDirectories: exports_external.array(AbsolutePathSchema).optional(),
36972
+ settingSources: SettingSourcesSchema.optional(),
36963
36973
  _meta: MetaSchema.optional()
36964
36974
  }).refine(metaCarriesNoCanonicalFields, { message: META_SMUGGLE_MESSAGE, path: ["_meta"] });
36965
36975
 
@@ -37383,7 +37393,7 @@ async function buildClaudeBackend() {
37383
37393
  const claudePath = process.env.CLAUDE_CODE_PATH ?? "/usr/local/bin/claude";
37384
37394
  const driver = new ClaudeDriver2({
37385
37395
  credentials: pickClaudeCredentials(process.env),
37386
- agentInfo: { version: "0.5.5" },
37396
+ agentInfo: { version: "0.5.6" },
37387
37397
  sdk: {
37388
37398
  async* query(args) {
37389
37399
  const optsIn = args.options;
@@ -37391,7 +37401,6 @@ async function buildClaudeBackend() {
37391
37401
  prompt: args.prompt,
37392
37402
  options: {
37393
37403
  ...optsIn ?? {},
37394
- settingSources: [],
37395
37404
  pathToClaudeCodeExecutable: claudePath
37396
37405
  }
37397
37406
  };
@@ -37422,7 +37431,7 @@ async function bootBackend(kind) {
37422
37431
  async function buildCodexBackend() {
37423
37432
  const { CodexDriver: CodexDriver2 } = await Promise.resolve().then(() => (init_driver2(), exports_driver2));
37424
37433
  const driver = new CodexDriver2({
37425
- agentInfo: { version: "0.5.5" },
37434
+ agentInfo: { version: "0.5.6" },
37426
37435
  ...process.env.CODEX_HOME === undefined ? {} : { codexHome: process.env.CODEX_HOME }
37427
37436
  });
37428
37437
  return { driver };
@@ -37430,7 +37439,7 @@ async function buildCodexBackend() {
37430
37439
  async function buildOpencodeBackend() {
37431
37440
  const { OpencodeDriver: OpencodeDriver2 } = await Promise.resolve().then(() => (init_driver3(), exports_driver3));
37432
37441
  const driver = new OpencodeDriver2({
37433
- agentInfo: { version: "0.5.5" }
37442
+ agentInfo: { version: "0.5.6" }
37434
37443
  });
37435
37444
  return { driver };
37436
37445
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kodizm/acp",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Custom ACP server bridging Claude Code, codex, and opencode CLIs through a single Kodizm-flavored protocol surface.",
5
5
  "type": "module",
6
6
  "bin": {