clementine-agent 1.0.51 → 1.0.52

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.
@@ -1616,6 +1616,11 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
1616
1616
  env: {
1617
1617
  CLEMENTINE_HOME: BASE_DIR,
1618
1618
  CLEMENTINE_TEAM_AGENT: profile?.slug ?? 'clementine',
1619
+ // Propagate interaction-source so the MCP subprocess can gate
1620
+ // owner-only tools. Without this, getInteractionSource() inside
1621
+ // the subprocess returns the module-default 'autonomous' and
1622
+ // every owner-DM-gated tool (env_set, allow_tool, etc.) refuses.
1623
+ CLEMENTINE_INTERACTION_SOURCE: sourceOverride ?? inferInteractionSource(sessionKey),
1619
1624
  },
1620
1625
  },
1621
1626
  ...externalMcpServers,
@@ -3068,6 +3073,8 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
3068
3073
  env: {
3069
3074
  CLEMENTINE_HOME: BASE_DIR,
3070
3075
  CLEMENTINE_TEAM_AGENT: profile?.slug ?? 'clementine',
3076
+ // Auto-memory extractor runs autonomously.
3077
+ CLEMENTINE_INTERACTION_SOURCE: 'autonomous',
3071
3078
  },
3072
3079
  },
3073
3080
  },
@@ -65,11 +65,15 @@ function maskSecret(value) {
65
65
  return value.slice(0, 4) + '…' + value.slice(-4);
66
66
  }
67
67
  function requireOwnerDm() {
68
- const source = getInteractionSource();
68
+ // The MCP server runs as a subprocess, so getInteractionSource() reads the
69
+ // subprocess's own module state — always the 'autonomous' default. The
70
+ // parent daemon propagates the real source via CLEMENTINE_INTERACTION_SOURCE.
71
+ // Fall back to the in-module state only if env isn't set (tool-runner tests).
72
+ const source = process.env.CLEMENTINE_INTERACTION_SOURCE ?? getInteractionSource();
69
73
  if (source !== 'owner-dm') {
70
74
  return {
71
75
  ok: false,
72
- message: `Env writes are restricted to direct owner conversations. Current interaction source: ${source}. Ask the owner to message directly if they want to change credentials.`,
76
+ message: `This tool is restricted to direct owner conversations. Current interaction source: ${source}. Ask the owner to message directly if they want to run this.`,
73
77
  };
74
78
  }
75
79
  return { ok: true };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.0.51",
3
+ "version": "1.0.52",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",