@tryarcanist/cli 0.1.200 → 0.1.201

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 CHANGED
@@ -419,12 +419,15 @@ Creates a scheduled automation for a GitHub repo. Create/delete require a write-
419
419
  ```bash
420
420
  arcanist automations create your-org/your-repo "summarize new regressions" --cron "*/15 * * * *"
421
421
  arcanist automations create your-org/your-repo "audit N+1s" --cron "0 13 * * 5" --model gpt-5.5
422
+ arcanist automations create your-org/your-repo "/audit-prod-docs https://docs.tryarcanist.com/" --cron "0 8 * * *" --slack-team-id T0123ABC --slack-channel-id C0456DEF
422
423
  printf "summarize new regressions" | arcanist automations create your-org/your-repo --prompt-stdin --cron "*/15 * * * *" --json
423
424
  arcanist automations create https://github.com/your-org/your-repo - --cron "0 14 * * 1-5" --name "Weekday summary"
424
425
  ```
425
426
 
426
427
  Use `--model <model>` to pin the model for sessions started by the automation. Backend is derived from the model; non-codex backends such as Claude or opencode are limited to Arcanist team businesses. When `--model` is omitted the codex backend default is used.
427
428
 
429
+ Use `--slack-team-id <team-id>` together with `--slack-channel-id <channel-id>` to deliver each completed automation digest into a Slack channel. Both flags are required together; the target workspace must already be connected to Arcanist and the bot must already be in the channel.
430
+
428
431
  JSON mode prints the created rule. Human-readable mode prints the rule ID, repo, normalized cron, and next fire time.
429
432
 
430
433
  ### `arcanist automations list`
package/dist/index.js CHANGED
@@ -1171,6 +1171,10 @@ var AUTOMATION_ERROR_HINTS = {
1171
1171
  repo_not_available: "Check that the token owner has GitHub access and Arcanist is installed for that repo.",
1172
1172
  duplicate_rule: "An enabled automation already exists for this repo, cron, and prompt.",
1173
1173
  invalid_skill: "Use a leading slash skill that exists in the selected repo, for example: /audit-prod-docs",
1174
+ invalid_slack_target: "Pass both --slack-team-id and --slack-channel-id to enable Slack delivery.",
1175
+ slack_workspace_not_connected: "Connect that Slack workspace to Arcanist before creating the automation.",
1176
+ slack_channel_unavailable: "Check the Slack channel ID and confirm the bot can see the channel.",
1177
+ slack_bot_not_in_channel: "Invite the Arcanist bot to the channel, then retry.",
1174
1178
  rule_cap_reached: "Delete or disable an existing automation before creating another one. The cap is 20 enabled rules.",
1175
1179
  installation_unresolved: "Reconnect or reinstall the GitHub integration for that repository, then retry.",
1176
1180
  model_not_available: "That model's backend (Claude/opencode) is limited to Arcanist team businesses; use the codex default or a codex model.",
@@ -1181,6 +1185,15 @@ var MAX_ALL_PAGES = 1e3;
1181
1185
  async function createAutomationCommand(repoUrl, promptArg, options, command) {
1182
1186
  const repo = parseAutomationRepo(repoUrl);
1183
1187
  const prompt = await resolvePromptInput(promptArg, options);
1188
+ const slackTeamId = options.slackTeamId?.trim();
1189
+ const slackChannelId = options.slackChannelId?.trim();
1190
+ const slackDeliveryRequested = options.slackTeamId !== void 0 || options.slackChannelId !== void 0;
1191
+ if (slackDeliveryRequested && (!slackTeamId || !slackChannelId)) {
1192
+ throw new CliError(
1193
+ "user",
1194
+ "Slack delivery requires both --slack-team-id and --slack-channel-id with non-empty values."
1195
+ );
1196
+ }
1184
1197
  const runtime = getRuntimeOptions(command, options);
1185
1198
  const config = requireConfig(runtime);
1186
1199
  let normalizedModel;
@@ -1200,6 +1213,10 @@ async function createAutomationCommand(repoUrl, promptArg, options, command) {
1200
1213
  };
1201
1214
  if (options.name !== void 0) body.name = options.name;
1202
1215
  if (options.model !== void 0) body.modelId = normalizedModel;
1216
+ if (slackDeliveryRequested) {
1217
+ body.slackTeamId = slackTeamId;
1218
+ body.slackChannelId = slackChannelId;
1219
+ }
1203
1220
  const payload = await automationApiFetch(config, "/api/automation/schedules", {
1204
1221
  method: "POST",
1205
1222
  body: JSON.stringify(body)
@@ -1314,6 +1331,9 @@ function printAutomationRule(rule) {
1314
1331
  console.log(`Repo: ${rule.repoOwner}/${rule.repoName}`);
1315
1332
  console.log(`Cron: ${rule.normalizedCron}`);
1316
1333
  if (rule.modelId) console.log(`Model: ${rule.modelId}`);
1334
+ if (rule.slackTeamId && rule.slackChannelId) {
1335
+ console.log(`Slack delivery: ${rule.slackTeamId}/${rule.slackChannelId}`);
1336
+ }
1317
1337
  console.log(`Next fire: ${formatTime(rule.nextFireAt)}`);
1318
1338
  }
1319
1339
  function formatTime(value) {
@@ -5739,12 +5759,16 @@ var automations = program.command("automations").description("Automation command
5739
5759
  automations.command("create").description("Create a scheduled automation").argument("<repo-url>", "Repository URL").argument("[prompt]", "Prompt to run, or '-' to read stdin").requiredOption("--cron <expr>", "Cron expression").option("--name <name>", "Automation display name").option(
5740
5760
  "--model <model>",
5741
5761
  "Model to pin for this automation's sessions (e.g. gpt-5.5, claude-opus-4-8). Defaults to the codex backend default."
5742
- ).option("--prompt-stdin", "Read prompt from stdin").addHelpText(
5762
+ ).option(
5763
+ "--slack-team-id <team-id>",
5764
+ "Slack workspace/team ID for final digest delivery (requires --slack-channel-id)"
5765
+ ).option("--slack-channel-id <channel-id>", "Slack channel ID for final digest delivery (requires --slack-team-id)").option("--prompt-stdin", "Read prompt from stdin").addHelpText(
5743
5766
  "after",
5744
5767
  `
5745
5768
  Examples:
5746
5769
  arcanist automations create tryarcanist/arcanist "summarize regressions" --cron "*/15 * * * *"
5747
5770
  arcanist automations create tryarcanist/arcanist "audit N+1s" --cron "0 13 * * 5" --model gpt-5.5
5771
+ arcanist automations create tryarcanist/arcanist "/audit-prod-docs https://docs.tryarcanist.com/" --cron "0 8 * * *" --slack-team-id T0123ABC --slack-channel-id C0456DEF
5748
5772
  printf "summarize regressions" | arcanist automations create tryarcanist/arcanist --prompt-stdin --cron "*/15 * * * *" --json
5749
5773
  `
5750
5774
  ).action((repoUrl, prompt, options, command) => createAutomationCommand(repoUrl, prompt, options, command));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryarcanist/cli",
3
- "version": "0.1.200",
3
+ "version": "0.1.201",
4
4
  "description": "CLI for Arcanist — create and manage coding agent sessions",
5
5
  "type": "module",
6
6
  "bin": {