@fastagent-sh/fastagent 0.21.0 → 0.21.1

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.
@@ -33,17 +33,14 @@ export async function runAddChannel(channelKind, dirArg, opts) {
33
33
  const inAgent = (p) => (agentFromCwd === undefined ? p : join(agentFromCwd, p));
34
34
  const envPath = dotEnvPath(target);
35
35
  const envLabel = isUnderDir(envPath, target) ? inAgent(relative(target, envPath)) : envPath;
36
- // Preconditions before the write, so a refusal is side-effect-free. slack/feishu/lark are exceptions:
37
- // their add is scaffold + ONBOARD THE APP, so an existing scaffold skips the write and continues (a
38
- // failed/cancelled app or OAuth flow must be re-runnable without hand-deleting authored glue).
36
+ // An existing channel file is authored glue: kept, never rewritten. The add continues past it — the
37
+ // companion tools below are refreshed, and slack/feishu/lark resume a failed/cancelled app or OAuth
38
+ // flow so re-running `add <kind>` never requires hand-deleting the glue.
39
39
  const file = join(target, "channels", `${channelKind}.ts`);
40
40
  const existsAlready = await channelExists(target, channelKind).catch(failStartup);
41
41
  const ingress = await resolveIngress(channelKind, file, existsAlready, opts.ingress);
42
42
  const groupBehavior = await resolveGroupBehavior(channelKind, opts.groupBehavior);
43
43
  if (existsAlready) {
44
- if (channelKind !== "slack" && channelKind !== "feishu" && channelKind !== "lark") {
45
- failStartup(new Error(`${relative(target, file)} already exists — edit it, or remove it to re-scaffold`));
46
- }
47
44
  console.error(`[fastagent] ${relative(target, file)} already exists — keeping it`);
48
45
  }
49
46
  else {
@@ -52,7 +49,7 @@ export async function runAddChannel(channelKind, dirArg, opts) {
52
49
  console.error(`[fastagent] created ${relative(target, file)}`);
53
50
  }
54
51
  // Companion tools are the package's, not authored glue: written on every add, so an upgraded
55
- // package reaches an existing agent by re-running `add <kind>` (`--no-onboard` skips the prompts).
52
+ // package reaches an existing agent by re-running `add <kind>` (slack: `--no-onboard` skips the prompts).
56
53
  for (const tool of await scaffoldCompanionTools(target, channelKind).catch(failStartup)) {
57
54
  console.error(`[fastagent] wrote ${relative(target, tool)}`);
58
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastagent-sh/fastagent",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "description": "Vibe first. Then FastAgent: turn a local agent directory into a live service in your app, on GitHub, Telegram, Slack, or behind any channel.",
5
5
  "keywords": [
6
6
  "agent",