@introspection-ai/recipes 0.23.0 → 0.24.0
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 +1 -1
- package/dist/channels/config.d.ts +10 -0
- package/dist/channels/config.d.ts.map +1 -0
- package/dist/channels/config.js +13 -0
- package/dist/channels/config.js.map +1 -0
- package/dist/channels/index.d.ts +4 -2
- package/dist/channels/index.d.ts.map +1 -1
- package/dist/channels/index.js +2 -1
- package/dist/channels/index.js.map +1 -1
- package/dist/channels/module.d.ts +11 -6
- package/dist/channels/module.d.ts.map +1 -1
- package/dist/channels/module.js +22 -10
- package/dist/channels/module.js.map +1 -1
- package/dist/channels/refs.d.ts +3 -3
- package/dist/channels/refs.d.ts.map +1 -1
- package/dist/channels/refs.js +11 -8
- package/dist/channels/refs.js.map +1 -1
- package/dist/channels/tools.d.ts +15 -22
- package/dist/channels/tools.d.ts.map +1 -1
- package/dist/channels/tools.js +279 -114
- package/dist/channels/tools.js.map +1 -1
- package/dist/channels/types.d.ts +34 -29
- package/dist/channels/types.d.ts.map +1 -1
- package/dist/channels/types.js +4 -17
- package/dist/channels/types.js.map +1 -1
- package/dist/connector-tools.d.ts +2 -0
- package/dist/connector-tools.d.ts.map +1 -1
- package/dist/connector-tools.js +17 -15
- package/dist/connector-tools.js.map +1 -1
- package/dist/mcp-chunks/{chunk-JZDXKYQM.js → chunk-PLSS6TQZ.js} +6 -1
- package/dist/mcp-daemon.js +1 -1
- package/dist/mcp-run-worker.js +1 -1
- package/dist/recipe-package.d.ts +4 -2
- package/dist/recipe-package.d.ts.map +1 -1
- package/dist/recipe-package.js +31 -18
- package/dist/recipe-package.js.map +1 -1
- package/docs/channels.md +171 -58
- package/docs/pi-extension.md +1 -1
- package/docs/recipe-format.md +9 -7
- package/docs/slack.md +46 -53
- package/package.json +5 -5
package/docs/slack.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
`@introspection-ai/recipe-channel-slack` is the Slack adapter for the
|
|
4
4
|
[channel tools](channels.md). It supplies Slack Web API transport and a
|
|
5
|
-
capability descriptor
|
|
6
|
-
|
|
5
|
+
capability descriptor. The `channels` tool and its command schemas are
|
|
6
|
+
provider-neutral, so a Recipe written against it is not written against Slack.
|
|
7
7
|
|
|
8
8
|
Slack sends inbound events to the existing Events API webhook. The tools make
|
|
9
9
|
ordinary HTTP requests to the Slack Web API with the bot that received the
|
|
@@ -18,7 +18,7 @@ protocol.
|
|
|
18
18
|
"@introspection-ai/recipe-channel-slack": "^0.1.0"
|
|
19
19
|
},
|
|
20
20
|
"pi": {
|
|
21
|
-
"
|
|
21
|
+
"channels": [
|
|
22
22
|
{
|
|
23
23
|
"provider": "slack"
|
|
24
24
|
}
|
|
@@ -30,48 +30,48 @@ protocol.
|
|
|
30
30
|
Commit the package manager lockfile. The host loads the package only for a
|
|
31
31
|
Recipe that declares the connector.
|
|
32
32
|
|
|
33
|
-
The connector
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
tools are available through `tool_search`.
|
|
33
|
+
The connector registers one `channels` tool. Agents select `tools: [channels]`;
|
|
34
|
+
all supported commands are immediately visible. An optional connector `commands`
|
|
35
|
+
allowlist restricts operations for every agent using that connector.
|
|
37
36
|
|
|
38
37
|
## What Slack registers
|
|
39
38
|
|
|
40
39
|
| Tool | Slack operation |
|
|
41
40
|
| --- | --- |
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Slack restricts those installations to 15 replies and one request per minute.
|
|
60
|
-
|
|
61
|
-
`channel_attach` and `channel_post_document` are not registered: `files.uploadV2`
|
|
41
|
+
| `channels reply` | `chat.postMessage` into the origin channel and thread |
|
|
42
|
+
| `channels send` | `chat.postMessage` into an explicit channel and optional thread |
|
|
43
|
+
| `channels list` | paged `conversations.list` returning accessible channels |
|
|
44
|
+
| `channels read` | `conversations.replies` in a thread, else `conversations.history` |
|
|
45
|
+
| `channels react` | `reactions.add` or `reactions.remove` |
|
|
46
|
+
| `channels edit` | `chat.update` for a message the agent posted |
|
|
47
|
+
| `channels retract` | `chat.delete` for a message the agent posted |
|
|
48
|
+
| `channels fetch_file` | `files.info` plus a private file download |
|
|
49
|
+
|
|
50
|
+
Slack history requests at most 15 messages and makes one history request per
|
|
51
|
+
tool call. Threads start at the beginning and page forward; channel timelines
|
|
52
|
+
start with recent messages and page backward. Each page is chronological, and
|
|
53
|
+
`next_direction` describes pagination. Repeat the target with the cursor.
|
|
54
|
+
This replaces the old unbounded full-thread fetch/backward session cache.
|
|
55
|
+
Provider rate limits still apply; failures are not automatically retried.
|
|
56
|
+
|
|
57
|
+
`channels attach` and `channels post_document` are not registered: `files.uploadV2`
|
|
62
58
|
and canvases are not implemented in this package yet, and the capability
|
|
63
59
|
descriptor says so rather than registering tools that fail.
|
|
64
60
|
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
`channels list` returns all non-archived public and private channels where the
|
|
62
|
+
bot is a member. `channels send` requires an explicit `channel_id` (listing first is not required); `thread_id` is
|
|
63
|
+
optional. `channels read` accepts optional targets, defaulting to the origin. Explicit channel without
|
|
64
|
+
thread means timeline/top-level, not the origin's thread. Reply stays bound.
|
|
65
|
+
Author display names (`users.info`) and
|
|
67
66
|
permalinks (`chat.getPermalink`) are resolved inside the adapter and attached to
|
|
68
67
|
message rows and reply results, so there is no user lookup or permalink tool.
|
|
69
68
|
Edit and retract also require an opaque reference for a message posted by this
|
|
70
69
|
agent. They cannot act on another author's message.
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
Search, individual channel-info lookup, joining, and directory lookup remain deferred.
|
|
72
|
+
Tools use one existing credential session; they do not select installations or
|
|
73
|
+
enforce project/customer bindings. The optional host target-policy callback
|
|
74
|
+
constrains these tools, not direct shell/API access.
|
|
75
75
|
|
|
76
76
|
## Cloud access
|
|
77
77
|
|
|
@@ -84,11 +84,16 @@ allowed path, and adds the bot token before the request leaves for Slack.
|
|
|
84
84
|
The adapter refuses to send a task locator when the provider proxy URL is
|
|
85
85
|
missing. It never falls back to sending the locator to Slack.
|
|
86
86
|
|
|
87
|
-
After `
|
|
87
|
+
After `channels reply` succeeds in cloud, the adapter posts the `connector_posted`
|
|
88
88
|
task event to the Data Plane, which checks the agent session, current run,
|
|
89
89
|
provider, and origin channel before recording the new thread root. A later Slack
|
|
90
90
|
reply then resumes the same task.
|
|
91
91
|
|
|
92
|
+
`channels send` deliberately does not emit this origin-bound bridge event, even
|
|
93
|
+
when its explicit destination matches the origin. Its result includes the
|
|
94
|
+
actual target and `bridge_recorded: false`. Cross-channel continuation is not
|
|
95
|
+
implemented by this tools-only change.
|
|
96
|
+
|
|
92
97
|
Slack writes are attempted once. The adapter does not retry `chat.postMessage`,
|
|
93
98
|
because Slack accepts no idempotency key for it. If Slack accepts the post but
|
|
94
99
|
event recording fails, the tool returns the message reference and a
|
|
@@ -101,29 +106,17 @@ development runtime starts a cloud sandbox with the local Recipe overlay, so the
|
|
|
101
106
|
adapter uses the cloud task origin and provider proxy and needs no local Slack
|
|
102
107
|
credential. Use `introspection dev --logs` for sandbox logs.
|
|
103
108
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
credential proxy. Install dependencies, then set a bot token and a conversation:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
pnpm install --frozen-lockfile
|
|
111
|
-
export SLACK_BOT_TOKEN='xoxb-...'
|
|
112
|
-
export SLACK_CHANNEL_ID='C0123456789'
|
|
113
|
-
export SLACK_THREAD_TS='1234567890.123456' # optional
|
|
114
|
-
introspection local -p 'Summarise this thread and reply.'
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Local tools call Slack directly with `SLACK_BOT_TOKEN`. Local posts create no
|
|
118
|
-
inbound task or reply bridge, because no Data Plane task exists.
|
|
109
|
+
Standalone channel access through `introspection local` is not supported. It
|
|
110
|
+
has no webhook receiver, cloud task origin, or provider proxy. Use the same
|
|
111
|
+
`introspection dev` workflow for inbound events and outbound channel tools.
|
|
119
112
|
|
|
120
113
|
## File downloads
|
|
121
114
|
|
|
122
|
-
`
|
|
115
|
+
`channels fetch_file` writes a file under the task files directory and returns its
|
|
123
116
|
path, media type, size, and SHA-256 digest. The bytes land in the workspace and
|
|
124
|
-
not in model context. It accepts only a `file_…` handle from a `
|
|
125
|
-
attachment,
|
|
126
|
-
|
|
117
|
+
not in model context. It accepts only a `file_…` handle from a `channels read`
|
|
118
|
+
attachment, and resolves that reference's channel before the host policy check.
|
|
119
|
+
On the wire it accepts only `files.slack.com` download URLs, rejects
|
|
127
120
|
redirects, caps the body at 100 MiB, checks the declared size, and removes
|
|
128
121
|
partial files after a failure. The `video_low` variant uses Slack's smaller MP4
|
|
129
122
|
rendition when one exists.
|
|
@@ -132,4 +125,4 @@ rendition when one exists.
|
|
|
132
125
|
|
|
133
126
|
The package exports `SlackChannelAdapter`, `createSlackChannelSession` and
|
|
134
127
|
`slackChannelTarget` for custom hosts and tests, alongside the default
|
|
135
|
-
`slackRecipeConnectorModule`. A normal Recipe uses `pi.
|
|
128
|
+
`slackRecipeConnectorModule`. A normal Recipe uses `pi.channels` instead.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@introspection-ai/recipes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "The open format for vertical agents, built on Pi.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -106,10 +106,10 @@
|
|
|
106
106
|
"vitest": "^4.0.18"
|
|
107
107
|
},
|
|
108
108
|
"optionalDependencies": {
|
|
109
|
-
"@introspection-ai/mcp-client-linux-x64": "0.
|
|
110
|
-
"@introspection-ai/mcp-client-linux-arm64": "0.
|
|
111
|
-
"@introspection-ai/mcp-client-darwin-arm64": "0.
|
|
112
|
-
"@introspection-ai/mcp-client-darwin-x64": "0.
|
|
109
|
+
"@introspection-ai/mcp-client-linux-x64": "0.24.0",
|
|
110
|
+
"@introspection-ai/mcp-client-linux-arm64": "0.24.0",
|
|
111
|
+
"@introspection-ai/mcp-client-darwin-arm64": "0.24.0",
|
|
112
|
+
"@introspection-ai/mcp-client-darwin-x64": "0.24.0"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {
|
|
115
115
|
"build": "pnpm build:ts && pnpm build:native",
|