blink 1.1.19 → 1.1.20

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 (30) hide show
  1. package/dist/cli/create-slack-app-CyVPwWsG.js +1 -0
  2. package/dist/cli/{dev-BShY-dVP.js → dev-C5PZ-A_f.js} +5 -5
  3. package/dist/cli/index.js +3 -3
  4. package/dist/cli/{init-DoMgv4kU.js → init-CFrylDAP.js} +1 -1
  5. package/dist/cli/{init-templates-MqyReSD9.js → init-templates-CB4tNZfU.js} +249 -263
  6. package/dist/cli/{run-DFYLWiOa.js → run-bKDX6K46.js} +1 -1
  7. package/dist/cli/{setup-slack-app-DQ3iSM5s.js → setup-slack-app-D_iwQuzr.js} +1 -1
  8. package/dist/cli/{util-BQ3TH_Sv.js → util-DDB5k1Go.js} +4 -4
  9. package/dist/node/agent/index.node.cjs +1 -1
  10. package/dist/node/agent/index.node.d.cts +2 -2
  11. package/dist/node/agent/index.node.d.ts +2 -2
  12. package/dist/node/agent/index.node.js +1 -1
  13. package/dist/node/build/index.cjs +1 -1
  14. package/dist/node/build/index.d.cts +1 -1
  15. package/dist/node/build/index.d.ts +1 -1
  16. package/dist/node/build/index.js +1 -1
  17. package/dist/node/{build-D_L0gFGa.js → build-DYI55eX2.js} +1 -1
  18. package/dist/node/{build-BzoNpizh.cjs → build-EgdtUZTI.cjs} +1 -1
  19. package/dist/node/{index-C28Wm0bG.d.ts → index-CnBfy-54.d.ts} +1 -1
  20. package/dist/node/{index-DlWgNLmT.d.cts → index-DYOqnOdZ.d.cts} +1 -1
  21. package/dist/node/{index.node-TFdiI8lm.js → index.node-B6JXREDl.js} +1 -1
  22. package/dist/node/{index.node-D7Cvmag9.cjs → index.node-BrLfthBj.cjs} +1 -1
  23. package/dist/node/{index.node-B6plkLLA.d.cts → index.node-CFw4ITad.d.cts} +1 -21
  24. package/dist/node/{index.node-qJt_7e9E.d.ts → index.node-Dvc-cHCZ.d.ts} +1 -21
  25. package/dist/node/react/index.node.cjs +252 -266
  26. package/dist/node/react/index.node.d.cts +2 -2
  27. package/dist/node/react/index.node.d.ts +2 -2
  28. package/dist/node/react/index.node.js +252 -266
  29. package/package.json +2 -1
  30. package/dist/cli/create-slack-app-CNDXDwfs.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blink",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "description": "Blink is a tool for building and deploying AI agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -100,6 +100,7 @@
100
100
  "ink": "^6.2.3",
101
101
  "ink-spinner": "^5.0.0",
102
102
  "ink-text-input": "^6.0.0",
103
+ "json-stable-stringify": "^1.3.0",
103
104
  "marked": "^16.2.1",
104
105
  "marked-terminal": "^7.3.0",
105
106
  "open": "^10.2.0",
@@ -1 +0,0 @@
1
- import{dirname as e,join as t}from"path";import{existsSync as n,mkdirSync as r,readFileSync as i,unlinkSync as a,writeFileSync as o}from"fs";import{z as s}from"zod";function c(e){return t(e,`data`,`devhook.txt`)}function l(e){return n(c(e))}function u(e){let t=c(e);if(n(t))return i(t,`utf-8`).trim()}function d(t){let a=c(t);if(r(e(a),{recursive:!0}),n(a))return i(a,`utf-8`);let s=crypto.randomUUID();return o(a,s),s}function f(e){let t=c(e);n(t)&&a(t)}function p(e){return`https://api.slack.com/apps?new_app=1&manifest_json=${encodeURIComponent(JSON.stringify(e))}`}const m=s.union([s.literal(`app_mention`).describe(`Bot is @mentioned in a channel or conversation. Requires scope: app_mentions:read`),s.literal(`app_home_opened`).describe(`User opened the app's Home tab. No additional scope required beyond bot token`),s.literal(`app_installed`).describe(`App was installed to a workspace. No additional scope required beyond bot token`),s.literal(`app_uninstalled`).describe(`App was uninstalled from a workspace. No additional scope required beyond bot token`),s.literal(`assistant_thread_context_changed`).describe(`Context changed in an assistant thread. Requires scope: assistant:write`),s.literal(`assistant_thread_started`).describe(`New assistant thread was started. Requires scope: assistant:write`),s.literal(`channel_archive`).describe(`Public channel was archived. Requires scope: channels:read`),s.literal(`channel_created`).describe(`Public channel was created. Requires scope: channels:read`),s.literal(`channel_deleted`).describe(`Public channel was deleted. Requires scope: channels:read`),s.literal(`channel_rename`).describe(`Public channel was renamed. Requires scope: channels:read`),s.literal(`channel_unarchive`).describe(`Public channel was unarchived. Requires scope: channels:read`),s.literal(`dnd_updated_user`).describe(`User's Do Not Disturb settings changed. Requires scope: dnd:read`),s.literal(`email_domain_changed`).describe(`Workspace's email domain changed. Requires scope: team:read`),s.literal(`emoji_changed`).describe(`Custom emoji was added or changed. Requires scope: emoji:read`),s.literal(`file_change`).describe(`File was changed. Requires scope: files:read`),s.literal(`file_created`).describe(`File was created. Requires scope: files:read`),s.literal(`file_deleted`).describe(`File was deleted. Requires scope: files:read`),s.literal(`file_public`).describe(`File was made public. Requires scope: files:read`),s.literal(`file_shared`).describe(`File was shared. Requires scope: files:read`),s.literal(`file_unshared`).describe(`File was unshared. Requires scope: files:read`),s.literal(`group_archive`).describe(`Private channel was archived. Requires scope: groups:read`),s.literal(`group_deleted`).describe(`Private channel was deleted. Requires scope: groups:read`),s.literal(`group_rename`).describe(`Private channel was renamed. Requires scope: groups:read`),s.literal(`group_unarchive`).describe(`Private channel was unarchived. Requires scope: groups:read`),s.literal(`link_shared`).describe(`Link from a registered domain was shared. Requires scope: links:read`),s.literal(`member_joined_channel`).describe(`User joined a public or private channel. Requires scope: channels:read (public) or groups:read (private)`),s.literal(`member_left_channel`).describe(`User left a public or private channel. Requires scope: channels:read (public) or groups:read (private)`),s.literal(`message.channels`).describe(`Message was posted in a public channel. Requires scope: channels:history`),s.literal(`message.groups`).describe(`Message was posted in a private channel. Requires scope: groups:history`),s.literal(`message.im`).describe(`Message was posted in a direct message. Requires scope: im:history`),s.literal(`message.mpim`).describe(`Message was posted in a multi-party direct message. Requires scope: mpim:history`),s.literal(`pin_added`).describe(`Item was pinned in a channel. Requires scope: pins:read`),s.literal(`pin_removed`).describe(`Item was unpinned from a channel. Requires scope: pins:read`),s.literal(`reaction_added`).describe(`Reaction was added to a message. Requires scope: reactions:read`),s.literal(`reaction_removed`).describe(`Reaction was removed from a message. Requires scope: reactions:read`),s.literal(`team_join`).describe(`New user joined the workspace. Requires scope: users:read`),s.literal(`user_change`).describe(`User's profile or settings changed. Requires scope: users:read`)]),h=s.union([s.literal(`app_mentions:read`).describe(`Read messages that directly mention the bot. Required for: app_mention event`),s.literal(`assistant:write`).describe(`Update bot status and write assistant messages. This should *always* be included for Slack bots. It improves the UX dramatically for users. Required for: assistant_thread_context_changed, assistant_thread_started events`),s.literal(`channels:history`).describe(`Read message history in public channels the bot has access to. Required for: message.channels event`),s.literal(`channels:join`).describe(`Join public channels`),s.literal(`channels:manage`).describe(`Manage public channels (archive, rename, etc.)`),s.literal(`channels:read`).describe(`View basic information about public channels. Required for: channel_archive, channel_created, channel_deleted, channel_rename, channel_unarchive, member_joined_channel, member_left_channel events`),s.literal(`chat:write`).describe(`Send messages as the bot`),s.literal(`chat:write.customize`).describe(`Send messages with a customized username and avatar`),s.literal(`chat:write.public`).describe(`Send messages to public channels without joining`),s.literal(`commands`).describe(`Add and use slash commands`),s.literal(`dnd:read`).describe(`View Do Not Disturb settings for users. Required for: dnd_updated_user event`),s.literal(`emoji:read`).describe(`View custom emoji in the workspace. Required for: emoji_changed event`),s.literal(`files:read`).describe(`View files shared in channels and conversations. Required for: file_change, file_created, file_deleted, file_public, file_shared, file_unshared events`),s.literal(`files:write`).describe(`Upload, edit, and delete files`),s.literal(`groups:history`).describe(`Read message history in private channels the bot has access to. Required for: message.groups event`),s.literal(`groups:read`).describe(`View basic information about private channels. Required for: group_archive, group_deleted, group_rename, group_unarchive, member_joined_channel, member_left_channel events`),s.literal(`groups:write`).describe(`Manage private channels (archive, rename, create, etc.)`),s.literal(`im:history`).describe(`Read message history in direct messages with the bot. Required for: message.im event`),s.literal(`im:read`).describe(`View basic information about direct messages with the bot`),s.literal(`im:write`).describe(`Start and manage direct messages with users`),s.literal(`links:read`).describe(`View URLs in messages. Required for: link_shared event`),s.literal(`links:write`).describe(`Show previews of URLs (unfurling)`),s.literal(`metadata.message:read`).describe(`Read message metadata`),s.literal(`mpim:history`).describe(`Read message history in multi-party direct messages. Required for: message.mpim event`),s.literal(`mpim:read`).describe(`View basic information about multi-party direct messages`),s.literal(`mpim:write`).describe(`Start and manage multi-party direct messages`),s.literal(`pins:read`).describe(`View pinned items in channels and conversations. Required for: pin_added, pin_removed events`),s.literal(`pins:write`).describe(`Pin and unpin items in channels and conversations`),s.literal(`reactions:read`).describe(`View emoji reactions on messages. Required for: reaction_added, reaction_removed events`),s.literal(`reactions:write`).describe(`Add and remove emoji reactions to messages`),s.literal(`reminders:read`).describe(`View reminders created by the bot`),s.literal(`reminders:write`).describe(`Create, update, and delete reminders`),s.literal(`team:read`).describe(`View workspace name, domain, and other basic information. Required for: email_domain_changed event`),s.literal(`usergroups:read`).describe(`View user groups and their members`),s.literal(`usergroups:write`).describe(`Create, update, and archive user groups`),s.literal(`users.profile:read`).describe(`View profile information about users`),s.literal(`users:read`).describe(`View users in the workspace. Required for: team_join, user_change events`),s.literal(`users:read.email`).describe(`View email addresses of users in the workspace`),s.literal(`users:write`).describe(`Set presence and status for the bot user`)]),g=s.union([s.literal(`channels:history`).describe(`Read message history in public channels on behalf of the user`),s.literal(`channels:read`).describe(`View basic information about public channels on behalf of the user`),s.literal(`channels:write`).describe(`Manage public channels on behalf of the user`),s.literal(`chat:write`).describe(`Send messages on behalf of the user`),s.literal(`emoji:read`).describe(`View custom emoji on behalf of the user`),s.literal(`files:read`).describe(`View files on behalf of the user`),s.literal(`files:write`).describe(`Upload, edit, and delete files on behalf of the user`),s.literal(`groups:history`).describe(`Read message history in private channels on behalf of the user`),s.literal(`groups:read`).describe(`View basic information about private channels on behalf of the user`),s.literal(`groups:write`).describe(`Manage private channels on behalf of the user`),s.literal(`im:history`).describe(`Read direct message history on behalf of the user`),s.literal(`im:read`).describe(`View basic information about direct messages on behalf of the user`),s.literal(`im:write`).describe(`Manage direct messages on behalf of the user`),s.literal(`links:read`).describe(`View URLs in messages on behalf of the user`),s.literal(`links:write`).describe(`Show URL previews on behalf of the user`),s.literal(`mpim:history`).describe(`Read multi-party direct message history on behalf of the user`),s.literal(`mpim:read`).describe(`View basic information about multi-party direct messages on behalf of the user`),s.literal(`mpim:write`).describe(`Manage multi-party direct messages on behalf of the user`),s.literal(`pins:read`).describe(`View pinned items on behalf of the user`),s.literal(`pins:write`).describe(`Pin and unpin items on behalf of the user`),s.literal(`reactions:read`).describe(`View emoji reactions on behalf of the user`),s.literal(`reactions:write`).describe(`Add and remove emoji reactions on behalf of the user`),s.literal(`reminders:read`).describe(`View reminders on behalf of the user`),s.literal(`reminders:write`).describe(`Create, update, and delete reminders on behalf of the user`),s.literal(`search:read`).describe(`Search messages and files on behalf of the user`),s.literal(`stars:read`).describe(`View starred items on behalf of the user`),s.literal(`stars:write`).describe(`Star and unstar items on behalf of the user`),s.literal(`team:read`).describe(`View workspace information on behalf of the user`),s.literal(`usergroups:read`).describe(`View user groups on behalf of the user`),s.literal(`usergroups:write`).describe(`Manage user groups on behalf of the user`),s.literal(`users.profile:read`).describe(`View user profile information on behalf of the user`),s.literal(`users.profile:write`).describe(`Edit the user's profile information`),s.literal(`users:read`).describe(`View users in the workspace on behalf of the user`),s.literal(`users:read.email`).describe(`View email addresses on behalf of the user`),s.literal(`users:write`).describe(`Set presence for the user`)]),_=s.object({display_information:s.object({name:s.string().describe(`The name of the Slack app.`),description:s.string().optional().describe(`A short description of the app.`),background_color:s.string().regex(/^#[0-9A-Fa-f]{6}$/).optional().describe(`Background color for the app in hex format (e.g., #4A154B).`),long_description:s.string().optional().describe(`A longer description of the app.`)}).describe(`Display information for the Slack app.`),features:s.object({bot_user:s.object({display_name:s.string().describe(`The display name for the bot user.`),always_online:s.boolean().optional().default(!0).describe(`Whether the bot always appears online.`)}).optional().describe(`Configuration for the bot user.`),app_home:s.object({home_tab_enabled:s.boolean().optional().describe(`Enable the Home tab.`),messages_tab_enabled:s.boolean().optional().describe(`Enable the Messages tab.`),messages_tab_read_only_enabled:s.boolean().optional().describe(`Make the Messages tab read-only.`)}).optional().describe(`Configuration for the App Home. If specified, the "bot" scope is *REQUIRED*.`),assistant_view:s.object({assistant_description:s.string().optional().describe(`Description for the assistant view.`)}).optional().describe(`Configuration for the assistant view.`),slash_commands:s.array(s.object({command:s.string().regex(/^\//).describe(`The command (must start with /).`),description:s.string().describe(`Description of the command.`),usage_hint:s.string().optional().describe(`Usage hint for the command.`),should_escape:s.boolean().optional().describe(`Whether to escape special characters.`)})).optional().describe(`Slash commands for the app.`),unfurl_domains:s.array(s.string()).optional().describe(`Domains for link unfurling.`)}).optional().describe(`Features configuration for the Slack app.`),oauth_config:s.object({redirect_urls:s.array(s.url()).optional().describe(`OAuth redirect URLs.`),scopes:s.object({bot:s.array(s.union([h,s.string()])).optional().describe(`Bot scopes required by the app. Each scope defines specific permissions for what the bot can do.`),user:s.array(s.union([g,s.string()])).optional().describe(`User scopes required by the app. Each scope defines specific permissions for actions performed on behalf of users.`)}).describe(`OAuth scopes for bot and user tokens.`)}).describe(`OAuth configuration for the Slack app.`),settings:s.object({event_subscriptions:s.object({request_url:s.string().url().describe(`The webhook URL for event subscriptions.`),bot_events:s.array(s.union([m,s.string()])).optional().describe(`Bot events to subscribe to. Each event notifies your app when specific actions occur in the workspace.`)}).optional().describe(`Event subscriptions configuration.`),interactivity:s.object({is_enabled:s.boolean().describe(`Enable interactivity.`),request_url:s.string().url().describe(`The webhook URL for interactive components.`),message_menu_options_url:s.string().url().optional().describe(`URL for message menu options.`)}).optional().describe(`Interactivity configuration.`),org_deploy_enabled:s.boolean().optional().default(!1).describe(`Enable organization-wide deployment.`),socket_mode_enabled:s.boolean().optional().default(!1).describe(`Enable Socket Mode.`),token_rotation_enabled:s.boolean().optional().default(!1).describe(`Enable automatic token rotation.`)}).optional().describe(`Settings for the Slack app.`)});export{d as createDevhookID,p as createSlackApp,_ as createSlackAppSchema,u as getDevhookID,l as hasDevhook,f as resetDevhookID};