viber-channel 0.8.30 → 0.8.31

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.
@@ -8,7 +8,8 @@
8
8
  * chooses to call it; the channel instructions carry just a one-line pointer.
9
9
  *
10
10
  * This is the HOME of "how to USE Viber" for every project (TaskMan points here,
11
- * #651). Every claim below was checked against the code at #651; keep it that way.
11
+ * #651). Every claim below was checked against the code at #651 (launch path: #660);
12
+ * keep it that way.
12
13
  *
13
14
  * Pure (no I/O) so it is trivially testable and identical across hosts.
14
15
  */
@@ -44,8 +45,9 @@ export function capabilitiesText(channelVersion: string | null = null): string {
44
45
  " viber-gateway launch-team <template> --prefix <p> [--team <t>] [--env dev|staging]",
45
46
  " [--cwd <dir>]",
46
47
  " → --env defaults to staging (the stable channel: agents register with no trust",
47
- " prompt; use it for working teams). Built-in template: dev-team (dev lead + 2",
48
- " reviewers). NAMES: each agent is <prefix>-<role>, the team is --team, else the",
48
+ " prompt; use it for working teams). <template> is the NAME of one of the owner's",
49
+ " WEB templates, e.g. dev-team (dev lead + 2 reviewers). NAMES: each agent is",
50
+ " <prefix>-<role>, the team is --team, else the",
49
51
  " prefix. Example: template dev-team, --prefix i700 → agents i700-dev-lead,",
50
52
  " i700-review-opus, i700-review-codex, all in team \"i700\".",
51
53
  " ⚠ TRAP — --team DEFAULTS TO THE PREFIX. If you launch a child with a prefix that",
@@ -57,11 +59,13 @@ export function capabilitiesText(channelVersion: string | null = null): string {
57
59
  " the full LABEL <prefix>-<role>: same label = same identity and lock (#293).",
58
60
  " E.g. w651-agent (prefix w651) may launch a role child with --prefix w651: label",
59
61
  " w651-child differs, so that is fine — but pass a distinct --team (w651-child).",
60
- "WHICH \"dev-team\"? The name is resolved per path, not globally:",
61
- " launch-team → the entry of .viber/agent-teams.json with that name if any (it",
62
- " REPLACES the built-in entirely), else the built-in. The web (New team / Add agent)",
63
- " → the owner's database template of that name. Same name, possibly three rosters.",
64
- " When you copy a web template into agent-teams.json, give it a DISTINCT name.",
62
+ "WHERE DO TEMPLATES COME FROM? ONE source (#660): the owner's templates on the web.",
63
+ " launch-team reads <template> from the web at launch time (with the folder's",
64
+ " project token); the web's New team / Add agent use the same templates. No local",
65
+ " file, no built-in, no cache, no fallback: web unreachable, token refused or name",
66
+ " unknown = an error, and NOTHING is launched (an unknown name lists the available",
67
+ " ones). A leftover .viber/agent-teams.json is IGNORED (launch-team says so).",
68
+ " A template the spawn would refuse (its warnings, see below) is refused up front.",
65
69
  " Output is verbose; only these lines matter:",
66
70
  " team: verdict COMPLETE|INCOMPLET — N member(s)",
67
71
  " member <agent-name>: launch <launch-id> — spec … (<runtime>)",
@@ -81,20 +85,17 @@ export function capabilitiesText(channelVersion: string | null = null): string {
81
85
  " after launching is NOT a failure. Wait simply: call list_agents with",
82
86
  " label_prefix \"<prefix>-\" and online: true every ~10 s, for at most ~60 s; past",
83
87
  " that, check that the Viber app is running.",
84
- "ONE AGENT ALONE = a one-role team. KNOWN LIMIT: launch-team has no --name and no solo",
85
- "shortcut: add a one-role template to .viber/agent-teams.json (merged with the",
86
- "built-ins; an entry with a built-in's name REPLACES it entirely), then launch it:",
87
- " {\"teams\":{\"solo\":{\"roles\":[{\"role\":\"dev\",\"runtime\":\"claude\",",
88
- " \"permission\":\"read-write\",\"rolePrompt\":\"You are the dev of {prefix}.\"}]}}}",
88
+ "ONE AGENT ALONE = a one-role WEB template. KNOWN LIMIT: launch-team has no --name:",
89
+ "the owner creates the template on the web (or an orchestrator agent does, with",
90
+ "team_templates create, ONLY on the owner's explicit request), then you launch it:",
91
+ " spec {\"roles\":[{\"role\":\"dev\",\"runtime\":\"claude\",\"permission\":\"read-write\",",
92
+ " \"rolePrompt\":\"You are the dev of {prefix}.\"}]} named e.g. solo",
89
93
  " viber-gateway launch-team solo --prefix g1 --team g1-solo",
90
94
  " → agent \"g1-dev\", team \"g1-solo\"",
91
95
  " runtime: claude|codex|gemma · permission: read-only|read-write (gemma: read-only",
92
96
  " only; all roles of one template must share one permission) · count optional;",
93
97
  " model/effort: leave them OUT (runtime default) UNLESS the owner explicitly asks",
94
98
  " for one; claude only: model opus|sonnet|haiku|fable, effort low|medium|high|xhigh|max.",
95
- " CLEAN UP: .viber/agent-teams.json is SHARED by everyone launching from that",
96
- " folder — once launched, remove the entry you added (the running agent does not",
97
- " need it; only a new launch-team would).",
98
99
  " (On the web, sidebar ⋯ → Add agent launches ONE named agent without a template edit.)",
99
100
  "",
100
101
  "DISSOLVE (stops the processes, then revokes the proven-stopped instances):",
@@ -159,18 +160,18 @@ export function capabilitiesText(channelVersion: string | null = null): string {
159
160
  " A template in use CAN be deleted: running agents keep running, but a queued web",
160
161
  " launch of it fails (\"template no longer exists\"); so does an edit after the",
161
162
  " launch was queued (template_changed).",
162
- "LAUNCHING A WEB/DB TEMPLATE: launch-team does NOT read these templates (only built-ins",
163
- "+ .viber/agent-teams.json), and agents cannot launch through the API. Either the owner",
164
- "launches it from the web (sidebar ⋯ → New team / Add agent), or you copy its spec",
165
- "(team_templates get) into .viber/agent-teams.json under a name, then launch-team it.",
163
+ "LAUNCHING ONE OF THESE TEMPLATES: launch-team reads exactly these (the web is the only",
164
+ "source, #660) — an edit here is what the next launch-team launches. Agents still cannot",
165
+ "launch through the API: launch-team on a machine, or the owner from the web (sidebar",
166
+ "⋯ → New team / Add agent).",
166
167
  "",
167
168
  "CODEX agents, observed today: their Viber MCP calls, message_agent included, have",
168
169
  "been rejected by their approval policy (#609), so they cannot open an exchange — write",
169
170
  "to them FIRST and read their reply on that DM. Their `gh` has no usable token in",
170
171
  "the sandbox (#525): run gh (labels, PR comments) for them.",
171
172
  "",
172
- "Low level, not relaunchable from the web: `vibe-master spawn --permission <p>",
173
- "[--runtime codex|claude|gemma] [--name <id>]` (`vibe-master --help`).",
173
+ "Never launch agents by calling vibe-master yourself: launch-team (or the web) is the",
174
+ "ONLY launch path (#660), the one the runner supervises and relaunches.",
174
175
  "viber-gateway has no --help: an unknown verb runs the startup command (exit 2",
175
176
  "without --dir; with --dir it runs startup on that registry).",
176
177
  ].join("\n");
@@ -250,7 +250,8 @@ export type TeamSpawnRunner = (
250
250
  * that crossed this boundary carried neither the provenance nor the proof
251
251
  * (`gwl10-review-codex-2`). Each runner now proves its own claim: the gateway through
252
252
  * {@link gatewayNothingToDo} (roster coverage **and** verdict), `vibe-master` through
253
- * `classifyCollision`, which emits this word only when NO roster member is missing.
253
+ * `classifyCollision`, which emitted this word only when NO roster member was missing
254
+ * (removed in #660 with `vibe-master team spawn`; no vibe-master command emits it now).
254
255
  *
255
256
  * ⚠ **OPTIONAL, and the reader FAILS CLOSED on absence** (`?? false`): an omitted field is *no
256
257
  * claim*, never *nothing to do*. ▶ This is deliberately unlike the `nonce` above, which is
@@ -332,7 +333,8 @@ export const execFileTeamSpawn: TeamSpawnRunner = (args, nonce) => {
332
333
  resolve({
333
334
  ok: !err,
334
335
  // ▶ #590: vibe-master's OWN guarantee, stated by the launcher that holds it.
335
- // ⚠ MEASURED (`vibe-master/lib/teams.ts`, `classifyCollision`): this word is emitted only
336
+ // ⚠ MEASURED before #660 (`vibe-master/lib/teams.ts`, `classifyCollision`, removed with
337
+ // `team spawn`; `spawn` never emits a marker, so this now only reads an absent one): this word was emitted only
336
338
  // when `missing.length === 0` — every roster name live — and a non-colliding call returns
337
339
  // `null` before it, so an empty roster cannot produce it either. A partial team is
338
340
  // `partial_team` and stays a failure. ▶ **The same roster-coverage property as the
@@ -7,9 +7,11 @@
7
7
  * had nowhere to go. The cause existed — it was on the runner's stderr — and was
8
8
  * thrown away here.
9
9
  *
10
- * `vibe-master` now emits a machine line (`VIBEMASTER_RESULT {"reason":…}`,
11
- * see vibe-master/lib/spawn_result.ts). This module extracts it and turns a
12
- * reason into a sentence the web can show. The runner's OWN refusals (policy,
10
+ * `vibe-master team spawn` emitted a machine line (`VIBEMASTER_RESULT {"reason":…}`);
11
+ * #660 removed that command and its emitter. The live emitter of a team outcome is
12
+ * now `viber-gateway/lib/result_marker.ts` (`VIBERGATEWAY_RESULT`, read by
13
+ * `gateway_result.ts`); the reasons below remain its vocabulary. This module
14
+ * extracts the old line and turns a reason into a sentence the web can show. The runner's OWN refusals (policy,
13
15
  * unsafe input, a prior partial run) carry reasons from the same vocabulary, so
14
16
  * the web never has to speak two languages.
15
17
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viber-channel",
3
- "version": "0.8.30",
3
+ "version": "0.8.31",
4
4
  "description": "Voice + text MCP channel between a Claude Code session and the Viber UI (https://viber.dgypx.dev). Push transcripts to Claude; send_message tool delivers text back to the UI.",
5
5
  "type": "module",
6
6
  "bin": {