@sweny-ai/core 0.1.186 → 0.1.188

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/skills/slack.js +11 -4
  2. package/package.json +11 -11
@@ -25,12 +25,15 @@ export const slack = {
25
25
  {
26
26
  name: "slack_send_message",
27
27
  access: "write",
28
- description: "Send a message to a Slack channel via webhook or API",
28
+ description: "Send a message to Slack. Posts to the webhook's own channel, or to a named channel via the bot token API. Naming a channel requires SLACK_BOT_TOKEN; with only a webhook the call fails rather than post elsewhere.",
29
29
  input_schema: {
30
30
  type: "object",
31
31
  properties: {
32
32
  text: { type: "string", description: "Message text (Slack mrkdwn supported)" },
33
- channel: { type: "string", description: "Channel ID or name (required for API, ignored for webhook)" },
33
+ channel: {
34
+ type: "string",
35
+ description: "Channel ID or name. Requires SLACK_BOT_TOKEN; with only a webhook configured, setting this is an error. Omit to post to the webhook's channel.",
36
+ },
34
37
  blocks: {
35
38
  type: "array",
36
39
  description: "Optional Block Kit blocks for rich formatting",
@@ -40,7 +43,8 @@ export const slack = {
40
43
  required: ["text"],
41
44
  },
42
45
  handler: async (input, ctx) => {
43
- // Prefer bot token API for channel targeting; fall back to webhook
46
+ // A requested channel is only honored via the bot token API. A webhook is bound to its own
47
+ // channel, so never fall back to it when another channel was asked for.
44
48
  if (ctx.config.SLACK_BOT_TOKEN && input.channel) {
45
49
  const res = await fetch("https://slack.com/api/chat.postMessage", {
46
50
  method: "POST",
@@ -62,7 +66,10 @@ export const slack = {
62
66
  throw new Error(`[Slack] send_message failed: ${data.error ?? "unknown error"}`);
63
67
  return data;
64
68
  }
65
- if (ctx.config.SLACK_WEBHOOK_URL) {
69
+ if (input.channel && !ctx.config.SLACK_BOT_TOKEN && ctx.config.SLACK_WEBHOOK_URL) {
70
+ throw new Error(`[Slack] cannot post to ${input.channel}: only SLACK_WEBHOOK_URL is configured, and a webhook posts to its own channel. Set SLACK_BOT_TOKEN to target a channel, or omit channel.`);
71
+ }
72
+ if (!input.channel && ctx.config.SLACK_WEBHOOK_URL) {
66
73
  const res = await fetch(ctx.config.SLACK_WEBHOOK_URL, {
67
74
  method: "POST",
68
75
  headers: { "Content-Type": "application/json" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sweny-ai/core",
3
- "version": "0.1.186",
3
+ "version": "0.1.188",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "sweny": "./dist/cli/main.js"
@@ -62,23 +62,23 @@
62
62
  "mutation": "stryker run"
63
63
  },
64
64
  "dependencies": {
65
- "@anthropic-ai/claude-agent-sdk": "^0.3.220",
66
- "@clack/prompts": "^1.7.0",
67
- "@modelcontextprotocol/sdk": "^1.29.0",
65
+ "@anthropic-ai/claude-agent-sdk": "^0.3.314",
66
+ "@clack/prompts": "^1.8.1",
67
+ "@modelcontextprotocol/sdk": "^1.32.2",
68
68
  "chalk": "^5",
69
69
  "commander": "^13",
70
- "yaml": "^2.9.0",
70
+ "yaml": "^2.9.1",
71
71
  "zod": "^4.0.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@anthropic-ai/claude-code": "^2.1.220",
75
- "@stryker-mutator/core": "^10.0.0",
76
- "@stryker-mutator/vitest-runner": "^10.0.0",
74
+ "@anthropic-ai/claude-code": "^2.1.314",
75
+ "@stryker-mutator/core": "^10.1.1",
76
+ "@stryker-mutator/vitest-runner": "^10.1.1",
77
77
  "ajv": "^8.20.0",
78
- "esbuild": "^0.28.1",
78
+ "esbuild": "^0.28.2",
79
79
  "fast-check": "^3.23.2",
80
- "prettier": "^3.9.6",
81
- "vitest": "^4.1.11"
80
+ "prettier": "^3.9.10",
81
+ "vitest": "^4.1.12"
82
82
  },
83
83
  "publishConfig": {
84
84
  "access": "public"