@dashclaw/mcp-server 1.0.1 → 1.0.2

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/lib/server.js CHANGED
@@ -54,7 +54,7 @@ export function createServer(config = {}) {
54
54
  const server = new McpServer(
55
55
  {
56
56
  name: '@dashclaw/mcp-server',
57
- version: '1.0.1',
57
+ version: '1.0.2',
58
58
  },
59
59
  {
60
60
  capabilities: {
package/lib/tools.js CHANGED
@@ -397,7 +397,15 @@ export const TOOL_DEFINITIONS = [
397
397
  * @returns {Object<string, function>}
398
398
  */
399
399
  export function createToolHandlers(client) {
400
- const agentId = (input) => input.agent_id || client.agentId;
400
+ // Priority: server-configured agent_id (DASHCLAW_AGENT_ID / --agent-id /
401
+ // auto-derived from MCP clientInfo) wins over anything the LLM passes in the
402
+ // tool call. This is deliberate: agent identity is a governance primitive,
403
+ // and letting the LLM pick its own agent_id based on prompt context (e.g.
404
+ // it sees "smoke test" and picks "claude-mcp-smoketest") breaks attribution
405
+ // and lets a single misbehaving prompt impersonate a different agent. The
406
+ // input.agent_id field is preserved only as a last-resort fallback for
407
+ // configurations that intentionally run without a server-level default.
408
+ const agentId = (input) => client.agentId || input.agent_id;
401
409
 
402
410
  return {
403
411
  async dashclaw_optimal_files_preview(input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashclaw/mcp-server",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "MCP server for DashClaw governance — guard, record, invoke, and discover capabilities.",
5
5
  "type": "module",
6
6
  "bin": {