shraga 0.1.2 → 0.1.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.
@@ -67,7 +67,7 @@ summary: |
67
67
  tools_used:
68
68
  - stripe.get_disputes
69
69
  - stripe.get_charges_by_id
70
- - mcp-slack.post_slack_message
70
+ - mcp-slack-use.post_slack_message
71
71
  tool_call_count: 15
72
72
  tool_failures:
73
73
  - tool: stripe.get_disputes
@@ -19,7 +19,7 @@ if (argv[0] === '--uid') {
19
19
  }
20
20
  const prompt =
21
21
  argv.join(' ').trim() ||
22
- 'Call mcp-slack tool get_slack_channels with limit=2 only. Output the JSON ok field and first channel name, nothing else.';
22
+ 'Call mcp-slack-use tool get_slack_channels with limit=2 only. Output the JSON ok field and first channel name, nothing else.';
23
23
 
24
24
  if (!process.env.ANTHROPIC_API_KEY?.trim()) {
25
25
  console.error('Missing ANTHROPIC_API_KEY — cannot run Claude Agent SDK.');
@@ -12,7 +12,7 @@ Dedup applies only when **you** decide to reach out (not when fulfilling a user
12
12
 
13
13
  1. **Read the comms log** — `Read data/comms-log.jsonl` (tail last 50-100 lines if large). If the file exceeds 500 lines, only read the last 100.
14
14
  2. **Check for recent similar outreach** — same recipient + similar topic within the last 24h = skip or significantly alter the message
15
- 3. **For Slack** — the mcp-slack skill already requires reading channel history before posting (rule #6). That check + this log together cover both same-session and cross-session duplicates.
15
+ 3. **For Slack** — the mcp-slack-use skill already requires reading channel history before posting (rule #6). That check + this log together cover both same-session and cross-session duplicates.
16
16
 
17
17
  ### What counts as a duplicate (proactive only)
18
18
 
@@ -83,7 +83,7 @@ Print a summary table:
83
83
 
84
84
  ```
85
85
  MCP Sync Results:
86
- mcp-slack up to date
86
+ mcp-slack-use up to date
87
87
  mcp-firebase pulled 3 commits
88
88
  mcp-pdf cloned (NEW)
89
89
  mcp-cursor pushed 1, pulled 2
@@ -92,7 +92,7 @@ Missing env vars (add to .env):
92
92
  mcp-stripe STRIPE_SECRET_KEY
93
93
  mcp-gmail GOOGLE_SERVICE_ACCOUNT, GMAIL_USER_EMAIL
94
94
 
95
- All configured: mcp-slack, mcp-firebase, mcp-google-drive
95
+ All configured: mcp-slack-use, mcp-firebase, mcp-google-drive
96
96
  ```
97
97
 
98
98
  ## Rules
@@ -85,7 +85,7 @@ List checkpoints with `git -C "$APP_DIR" log --oneline`; reset to any of them.
85
85
  - `src/server/mcp.ts` — MCP server injection and config
86
86
  - `src/server/skills.ts` — skill loading and injection
87
87
  - `defaults/` — canonical source for runtime-seeded dirs (see Architecture skill § "Defaults → Runtime Seeding Pattern")
88
- - `vendor/` — vendored MCP servers (mcp-firebase, mcp-github, mcp-slack, etc.)
88
+ - `vendor/` — vendored MCP servers (mcp-firebase, mcp-github, mcp-slack-use, etc.)
89
89
  - `data/` — runtime data, git-tracked behavioral config via data-sync (skills, mcps, workspace, schedules, contacts, agent-config, whitelist)
90
90
 
91
91
  ## Where one-off / custom code goes (NOT main `src/`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shraga",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "The teammate you delegate coding to — a self-hostable, multi-user AI coding agent web UI (Claude Code, with a pluggable engine seam).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -63,7 +63,7 @@
63
63
  "express": "^4.21.1",
64
64
  "firebase": "^11.0.0",
65
65
  "lucide-react": "^0.468.0",
66
- "mcp-slack-use": "github:Livshitz/mcp-slack-use#0c877d3397f7",
66
+ "mcp-slack-use": "github:Livshitz/mcp-slack-use#1dde291",
67
67
  "react": "^19.0.0",
68
68
  "react-dom": "^19.0.0",
69
69
  "react-markdown": "^9.0.0",
@@ -457,7 +457,7 @@ export class ClaudeCodeEngine implements AgentEngine {
457
457
  }
458
458
 
459
459
  const pending = pendingToolUses.get(String(block.tool_use_id));
460
- if (pending?.tool === 'mcp__mcp-slack__post_slack_message') {
460
+ if (pending?.tool === 'mcp__mcp-slack-use__post_slack_message') {
461
461
  try {
462
462
  const parsed = typeof output === 'string' ? JSON.parse(output) : output;
463
463
  const ts = parsed?.ts || parsed?.preview?.ts;
@@ -470,7 +470,7 @@ export class ClaudeCodeEngine implements AgentEngine {
470
470
  }
471
471
  } catch (err) { console.warn('[claude] Failed to track proactive message:', (err as Error).message); }
472
472
  }
473
- if (pending?.tool === 'mcp__mcp-slack__post_slack_poll') {
473
+ if (pending?.tool === 'mcp__mcp-slack-use__post_slack_poll') {
474
474
  try {
475
475
  const parsed = typeof output === 'string' ? JSON.parse(output) : output;
476
476
  const body = ((pending.input as any)?.body ?? {}) as Record<string, any>;
@@ -62,7 +62,7 @@ const SLACK_MENTION_FIELDS: Record<string, string[]> = {
62
62
  const resolveSlackMentions: HookCallback = async (input) => {
63
63
  if (input.hook_event_name !== 'PreToolUse') return {};
64
64
  const { tool_name, tool_input } = input as PreToolUseHookInput;
65
- const m = /^mcp__mcp-slack__(post_slack_\w+)$/.exec(tool_name);
65
+ const m = /^mcp__mcp-slack-use__(post_slack_\w+)$/.exec(tool_name);
66
66
  if (!m) return {};
67
67
  const fields = SLACK_MENTION_FIELDS[m[1]];
68
68
  if (!fields) return {};
@@ -135,7 +135,7 @@ export function buildHooks(): Partial<Record<HookEvent, HookCallbackMatcher[]>>
135
135
  return {
136
136
  PreToolUse: [
137
137
  { matcher: 'Bash', hooks: [forceBackgroundForScripts] },
138
- { matcher: 'mcp__mcp-slack__post_slack_.*', hooks: [resolveSlackMentions] },
138
+ { matcher: 'mcp__mcp-slack-use__post_slack_.*', hooks: [resolveSlackMentions] },
139
139
  { matcher: 'mcp__mcp-firebase-(?:prod|lab)__get_db.*', hooks: [guardFirebaseReads] },
140
140
  ],
141
141
  };
@@ -189,7 +189,7 @@ export async function* runAgentTurn(msg: IngressMessage): AsyncGenerator<AgentEv
189
189
  : `#${channelName || 'channel'} context`;
190
190
  appendMessage(sessionId, {
191
191
  id: crypto.randomUUID(), role: 'user',
192
- blocks: [{ type: 'context', label, text: `${channelCtx}\n\n[Use mcp-slack tools (get_slack_history_by_channel, post_slack_message) for further context or replies. Always read channel history before posting.]` }],
192
+ blocks: [{ type: 'context', label, text: `${channelCtx}\n\n[Use mcp-slack-use tools (get_slack_history_by_channel, post_slack_message) for further context or replies. Always read channel history before posting.]` }],
193
193
  });
194
194
  }
195
195
  }
@@ -1,4 +1,4 @@
1
- // slackFeature — the ServerFeature that mounts Slack in this app. It wires the mcp-slack package
1
+ // slackFeature — the ServerFeature that mounts Slack in this app. It wires the mcp-slack-use package
2
2
  // `ingress` (protocol) to the agent-glue (bot.ts) and subscribes the data-sync deploy notifier
3
3
  // (event bus → owner DMs). Slack ships in this app, so index.ts registers this directly.
4
4
  import type { ServerFeature, FeatureContext } from '../features.ts';
@@ -27,6 +27,13 @@ export function registerTurnContext(name: string, contribute: TurnContextContrib
27
27
  contributors.set(name, contribute);
28
28
  }
29
29
 
30
+ /** Clear all registered contributors. For tests: the registry is a process-global, so a test that
31
+ * asserts the empty-registry (no-contributor) behavior must reset it first or it inherits whatever
32
+ * another test file registered — bun's cross-file order is not stable across platforms. */
33
+ export function clearTurnContext(): void {
34
+ contributors.clear();
35
+ }
36
+
30
37
  /**
31
38
  * Collect every contributor's block for this turn, joined by a blank line. Empty when none is
32
39
  * registered — which is the core's own state, so the core's prompt is byte-identical to before.