viber-channel 0.8.29 → 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.
- package/lib/capabilities.ts +35 -27
- package/lib/runner_exec.ts +5 -2
- package/lib/runner_registry.ts +2 -0
- package/lib/runner_relaunch.ts +1 -0
- package/lib/spawn_reason.ts +5 -3
- package/lib/team_template_tool.ts +3 -2
- package/package.json +1 -1
package/lib/capabilities.ts
CHANGED
|
@@ -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
|
|
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).
|
|
48
|
-
" reviewers). NAMES: each agent is
|
|
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
|
-
"
|
|
61
|
-
" launch-team
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
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,19 +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
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
" {\"
|
|
88
|
-
"
|
|
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
|
-
" model: leave
|
|
94
|
-
"
|
|
95
|
-
" folder — once launched, remove the entry you added (the running agent does not",
|
|
96
|
-
" need it; only a new launch-team would).",
|
|
97
|
+
" model/effort: leave them OUT (runtime default) UNLESS the owner explicitly asks",
|
|
98
|
+
" for one; claude only: model opus|sonnet|haiku|fable, effort low|medium|high|xhigh|max.",
|
|
97
99
|
" (On the web, sidebar ⋯ → Add agent launches ONE named agent without a template edit.)",
|
|
98
100
|
"",
|
|
99
101
|
"DISSOLVE (stops the processes, then revokes the proven-stopped instances):",
|
|
@@ -116,8 +118,11 @@ export function capabilitiesText(channelVersion: string | null = null): string {
|
|
|
116
118
|
"ON THE WEB (owner, sidebar \"⋯\"): project row → Add agent (one named agent from a",
|
|
117
119
|
"template role, into an existing or new team) / New team; team row → Add agent;",
|
|
118
120
|
"agent row → Revoke (confirmation; works online or offline). Both launches need an",
|
|
119
|
-
"ONLINE runner (the Viber app). Project page → clean up offline agents:
|
|
120
|
-
"offline instances
|
|
121
|
+
"ONLINE runner (the Viber app). Project page → \"Grand ménage\" (clean up offline agents):",
|
|
122
|
+
"revokes the offline instances, then PERMANENTLY deletes the agent↔agent DMs and agent",
|
|
123
|
+
"conversations whose agents are ALL revoked and none online, history included (also those",
|
|
124
|
+
"of agents revoked earlier, and old memberless pre-identity ones whose token died;",
|
|
125
|
+
"human↔agent DMs are kept). The server re-checks each one.",
|
|
121
126
|
"Its only guard is live presence: right after a ws_server restart, wait ~30 s before",
|
|
122
127
|
"cleaning up, or live agents not yet re-reported get revoked.",
|
|
123
128
|
"",
|
|
@@ -138,8 +143,11 @@ export function capabilitiesText(channelVersion: string | null = null): string {
|
|
|
138
143
|
" runtime REQUIRED claude | codex | gemma",
|
|
139
144
|
" permission REQUIRED read-only | read-write (gemma: read-only only)",
|
|
140
145
|
" rolePrompt REQUIRED non-empty, ≤ 600 chars AFTER {prefix} expands to 32 chars",
|
|
141
|
-
" model optional
|
|
142
|
-
"
|
|
146
|
+
" model optional claude: opus | sonnet | haiku | fable (a family, never a",
|
|
147
|
+
" version); other runtimes: ≤ 64, stored but not applied",
|
|
148
|
+
" effort optional claude only: low | medium | high | xhigh | max",
|
|
149
|
+
" model/effort: leave them OUT (runtime default) unless the",
|
|
150
|
+
" owner explicitly asks for one",
|
|
143
151
|
" count optional integer 1..10",
|
|
144
152
|
" name: non-empty, ≤ 80, unique per owner, case-insensitive (409 without code = taken).",
|
|
145
153
|
" update: send ONLY the fields you change (name / spec / project_id) plus",
|
|
@@ -152,18 +160,18 @@ export function capabilitiesText(channelVersion: string | null = null): string {
|
|
|
152
160
|
" A template in use CAN be deleted: running agents keep running, but a queued web",
|
|
153
161
|
" launch of it fails (\"template no longer exists\"); so does an edit after the",
|
|
154
162
|
" launch was queued (template_changed).",
|
|
155
|
-
"LAUNCHING
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
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).",
|
|
159
167
|
"",
|
|
160
168
|
"CODEX agents, observed today: their Viber MCP calls, message_agent included, have",
|
|
161
169
|
"been rejected by their approval policy (#609), so they cannot open an exchange — write",
|
|
162
170
|
"to them FIRST and read their reply on that DM. Their `gh` has no usable token in",
|
|
163
171
|
"the sandbox (#525): run gh (labels, PR comments) for them.",
|
|
164
172
|
"",
|
|
165
|
-
"
|
|
166
|
-
"
|
|
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.",
|
|
167
175
|
"viber-gateway has no --help: an unknown verb runs the startup command (exit 2",
|
|
168
176
|
"without --dir; with --dir it runs startup on that registry).",
|
|
169
177
|
].join("\n");
|
package/lib/runner_exec.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface SnapshotRole {
|
|
|
31
31
|
permission: string;
|
|
32
32
|
rolePrompt?: string;
|
|
33
33
|
model?: string;
|
|
34
|
+
effort?: string;
|
|
34
35
|
count?: number;
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -249,7 +250,8 @@ export type TeamSpawnRunner = (
|
|
|
249
250
|
* that crossed this boundary carried neither the provenance nor the proof
|
|
250
251
|
* (`gwl10-review-codex-2`). Each runner now proves its own claim: the gateway through
|
|
251
252
|
* {@link gatewayNothingToDo} (roster coverage **and** verdict), `vibe-master` through
|
|
252
|
-
* `classifyCollision`, which
|
|
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).
|
|
253
255
|
*
|
|
254
256
|
* ⚠ **OPTIONAL, and the reader FAILS CLOSED on absence** (`?? false`): an omitted field is *no
|
|
255
257
|
* claim*, never *nothing to do*. ▶ This is deliberately unlike the `nonce` above, which is
|
|
@@ -331,7 +333,8 @@ export const execFileTeamSpawn: TeamSpawnRunner = (args, nonce) => {
|
|
|
331
333
|
resolve({
|
|
332
334
|
ok: !err,
|
|
333
335
|
// ▶ #590: vibe-master's OWN guarantee, stated by the launcher that holds it.
|
|
334
|
-
// ⚠ MEASURED (`vibe-master/lib/teams.ts`, `classifyCollision
|
|
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
|
|
335
338
|
// when `missing.length === 0` — every roster name live — and a non-colliding call returns
|
|
336
339
|
// `null` before it, so an empty roster cannot produce it either. A partial team is
|
|
337
340
|
// `partial_team` and stays a failure. ▶ **The same roster-coverage property as the
|
package/lib/runner_registry.ts
CHANGED
|
@@ -74,6 +74,8 @@ export interface RegistryRole {
|
|
|
74
74
|
permission: string;
|
|
75
75
|
rolePrompt?: string;
|
|
76
76
|
model?: string;
|
|
77
|
+
/** #656: claude reasoning effort, replayed as `--effort` on a relaunch. */
|
|
78
|
+
effort?: string;
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
export type RegistryEntryState = "active" | "closed";
|
package/lib/runner_relaunch.ts
CHANGED
|
@@ -53,6 +53,7 @@ export function relaunchArgs(entry: RegistryEntry): string[] {
|
|
|
53
53
|
if (entry.team_name) args.push("--team", entry.team_name);
|
|
54
54
|
if (entry.env) args.push("--env", entry.env);
|
|
55
55
|
if (entry.role.model) args.push("--model", entry.role.model);
|
|
56
|
+
if (entry.role.effort) args.push("--effort", entry.role.effort);
|
|
56
57
|
if (entry.conversation_id && RELOADS_CONVERSATION.has(runtime)) args.push("--conversation", entry.conversation_id);
|
|
57
58
|
// Last: free text, nothing appended after it (same rule as the gateway's argv).
|
|
58
59
|
if (entry.role.rolePrompt) args.push("--role", entry.role.rolePrompt);
|
package/lib/spawn_reason.ts
CHANGED
|
@@ -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`
|
|
11
|
-
*
|
|
12
|
-
*
|
|
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
|
*/
|
|
@@ -54,9 +54,10 @@ export const TEAM_TEMPLATES_TOOL_DEF = {
|
|
|
54
54
|
spec: {
|
|
55
55
|
type: "object",
|
|
56
56
|
description:
|
|
57
|
-
"The roster, for create/update: { roles: [{ role, runtime, permission, rolePrompt, model?, count? }] } — same shape `get` returns. " +
|
|
57
|
+
"The roster, for create/update: { roles: [{ role, runtime, permission, rolePrompt, model?, effort?, count? }] } — same shape `get` returns. " +
|
|
58
58
|
"On update a spec REPLACES the whole spec: send every role. " +
|
|
59
|
-
"model: leave it OUT (the runtime picks its own default) UNLESS the owner explicitly asks for a model. " +
|
|
59
|
+
"model: leave it OUT (the runtime picks its own default) UNLESS the owner explicitly asks for a model; on claude it is a family: opus, sonnet, haiku or fable. " +
|
|
60
|
+
"effort (claude only): low, medium, high, xhigh or max — same rule, leave it OUT unless asked. " +
|
|
60
61
|
"Full field rules: the capabilities tool.",
|
|
61
62
|
},
|
|
62
63
|
project_id: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viber-channel",
|
|
3
|
-
"version": "0.8.
|
|
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": {
|