@kumion/cli 0.6.0 → 0.6.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.
- package/README.md +5 -2
- package/dist/main.js +22 -4
- package/dist/mcp.js +4 -3
- package/package.json +1 -1
- package/skills/kumion/SKILL.md +8 -4
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ npm i -g @kumion/cli
|
|
|
15
15
|
kumion --help
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Requires Node.js 20.18 or later.
|
|
18
|
+
Requires Node.js 20.18.1 or later.
|
|
19
19
|
|
|
20
20
|
By default the CLI talks to `https://app.kumion.jp`. Another environment can be
|
|
21
21
|
selected with `--base-url` or `KUMION_API_BASE` (see [Options and environment](#options-and-environment)).
|
|
@@ -363,6 +363,9 @@ A key a node does not store follows the agent's setting (会話の運用) or the
|
|
|
363
363
|
| `opening_speech` | start | `required` | `string` | The opening line. Supports {{variables}}. |
|
|
364
364
|
| `items` | start, agent | `required` | `{key,label?,example?,source?,value_type?,options?,must_ask?,min_digits?,max_digits?,tool?,option_writes?}[]` | What this step collects, one object per item, in the order it asks. `key`: slot key. `label`: display name. `example`: test-call example. `source`: where the value comes from (caller, derived, system, tool). `value_type`: kind (text, select, boolean, ...). `options`: choices of a select item. `must_ask`: ask the caller to confirm on the spot even if already known (advanced). `min_digits` / `max_digits`: for a `code` item, the fewest / most digits the value may hold, counted by the platform (the same number twice = exact length). `tool`: `{tool_key,result_field}` for a tool-sourced item. `option_writes`: option → tool that must succeed before that option lets the call leave (advanced). |
|
|
365
365
|
| `allow_interruptions` | start, agent | `tune` | `boolean` | Absent means the caller may interrupt. Only an explicit false is stored. |
|
|
366
|
+
| `route_judge` | start | `tune` | `boolean` | Absent means off. Only an explicit true is stored. On: while the call stays on this start step, each caller turn is first read by the call model's own probability readout (at most 400 ms, before the AI answers); when it is sure which of the step's three connections fits, the call moves on without a model turn. Offered only for a call model whose endpoint has a calibrated readout; the step needs exactly three AI connections without items and no fixed connections (graph diagnostics `route_judge_not_applicable`). |
|
|
367
|
+
| `wait_for_first_word` | start | `tune` | `boolean` | Absent means off. Only an explicit true is stored. On: an outbound call waits for the customer to speak first and says the opening line when they finish or `first_word_wait_seconds` runs out. An inbound call never reads it (graph diagnostics `first_word_wait_outbound_only`). |
|
|
368
|
+
| `first_word_wait_seconds` | start | `tune` | `number` | Seconds `wait_for_first_word` waits (1 to 10, default 3). Absent means the default. Read only when `wait_for_first_word` is true. |
|
|
366
369
|
| `respond_on_enter` | agent | `tune` | `boolean` | Absent means the node answers on arrival. Only an explicit false (wait for the caller) is stored. |
|
|
367
370
|
| `confirm_before_end` | agent | `tune` | `boolean` | Absent means off (agents published before this setting keep their behaviour); a node created on the canvas stores true, and a node compiled from a SOP or document stores true when its connection to an end node requires items (the `end_without_readback` rule). On: the platform reads the recorded items back once before the call ends, and the end opens on a later caller turn with caller_confirmed. |
|
|
368
371
|
| `confirm_before_end_keys` | agent | `internal` | `string[]` | Set by the compiler on a 伝言 step. With `confirm_before_end` on, the end readback reads only these item keys (the call-back number); absent means every item the ending requires. |
|
|
@@ -423,7 +426,7 @@ kumion agents publish <agentId> # runs the pre-publish check, then publishe
|
|
|
423
426
|
`test-runs start` checks the draft without publishing anything. `agents publish` runs
|
|
424
427
|
the Portal's pre-publish check and publishes only when it passes; when it does not, the
|
|
425
428
|
failing cases are printed and nothing goes live. The CLI has no way to skip or override
|
|
426
|
-
|
|
429
|
+
a case that failed again on re-run (`[reproduced]`). A refusal that carries no re-run verdict (for example a structural problem) is not intermittent either: fix its cause. The one exception: a case that failed only in some of its re-runs is marked
|
|
427
430
|
`[intermittent]` (one that failed again is `[reproduced]`), and when nothing else is wrong the refusal
|
|
428
431
|
says so and `agents publish <agentId> --accept-intermittent` (MCP: `acceptIntermittent`) publishes it
|
|
429
432
|
anyway. It never applies to a check that failed every time. `test-runs get` marks the same cases and lists
|
package/dist/main.js
CHANGED
|
@@ -5,7 +5,7 @@ import { ApiError, KumionClient, isTextFile, specText, } from "./client.js";
|
|
|
5
5
|
import { DEFAULT_BASE_URL, keyPrefix, looksLikeApiKey, normalizeBaseUrl, resolveCredentials, } from "./credentials.js";
|
|
6
6
|
import { DEFAULT_DEVICE_SCOPES, deviceLogin } from "./device-login.js";
|
|
7
7
|
import { describeError, ReportedFailure, UsageError } from "./errors.js";
|
|
8
|
-
export const VERSION = "0.6.
|
|
8
|
+
export const VERSION = "0.6.1";
|
|
9
9
|
const HELP = `kumion — manage your Kumion voice agents over the Partner API
|
|
10
10
|
|
|
11
11
|
Usage: kumion <command> [options]
|
|
@@ -1613,11 +1613,23 @@ async function agentsPublish(args, deps) {
|
|
|
1613
1613
|
if (body.publishRunId)
|
|
1614
1614
|
lines.push(`Publish run: ${String(body.publishRunId)} (details in the Portal).`);
|
|
1615
1615
|
if (body.code === "intermittent") {
|
|
1616
|
-
|
|
1617
|
-
|
|
1616
|
+
const detail = Array.isArray(body.intermittent) ? body.intermittent : [];
|
|
1617
|
+
for (const c of detail) {
|
|
1618
|
+
lines.push(`Case ${c.caseId ?? "?"} ran ${c.attempts?.length ?? 0} time(s):`);
|
|
1619
|
+
for (const a of c.attempts ?? []) {
|
|
1620
|
+
lines.push(` #${a.attempt} ${a.outcome}`);
|
|
1621
|
+
lines.push(...(a.reasons ?? []).map((r) => ` - ${r.kind}: ${r.detail}`));
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
lines.push("The check failed only in some of its runs (intermittent) and nothing else is wrong. " +
|
|
1625
|
+
"If the reasons above are acceptable, publish anyway with `kumion agents publish " + agentId + " --accept-intermittent`. " +
|
|
1626
|
+
"Do not pass it unless the user has read them and agreed.");
|
|
1627
|
+
}
|
|
1628
|
+
else if (verdict?.cases?.some((c) => c.gate === "reproduced")) {
|
|
1629
|
+
lines.push("A failing case failed again on re-run (reproduced), so it cannot be skipped: fix the draft, run `kumion test-runs start`, and publish again.");
|
|
1618
1630
|
}
|
|
1619
1631
|
else {
|
|
1620
|
-
lines.push("
|
|
1632
|
+
lines.push("The CLI cannot publish past this refusal: fix the cause above, run `kumion test-runs start`, and publish again.");
|
|
1621
1633
|
}
|
|
1622
1634
|
throw new ReportedFailure(lines.join("\n"));
|
|
1623
1635
|
}
|
|
@@ -1785,6 +1797,12 @@ export function summarizeTestRun(run) {
|
|
|
1785
1797
|
lines.push(...formatFindings(r.failures, " "));
|
|
1786
1798
|
}
|
|
1787
1799
|
}
|
|
1800
|
+
const gates = new Set((run.results ?? []).filter((r) => r.failures?.length).map((r) => r.gate));
|
|
1801
|
+
if (run.status === "failed" && gates.has("reproduced"))
|
|
1802
|
+
lines.push("[reproduced] cases failed again on re-run: fix the draft.");
|
|
1803
|
+
if (run.status === "failed" && gates.has("intermittent")) {
|
|
1804
|
+
lines.push("[intermittent] cases failed only in some runs. `agents publish --accept-intermittent` can publish past them if the user accepts the reasons.");
|
|
1805
|
+
}
|
|
1788
1806
|
return lines.join("\n");
|
|
1789
1807
|
}
|
|
1790
1808
|
async function testRunsStart(args, deps) {
|
package/dist/mcp.js
CHANGED
|
@@ -302,9 +302,10 @@ export function createKumionMcpServer(client, options) {
|
|
|
302
302
|
}, (args) => attempt(() => client.confirmFacts(args.agentId, args.factIds)));
|
|
303
303
|
server.registerTool("publish_agent", {
|
|
304
304
|
description: "Publish the agent's draft so callers get it. Runs the same pre-publish check as the Portal first and " +
|
|
305
|
-
"publishes only if it passes; a
|
|
305
|
+
"publishes only if it passes; a check that failed again on re-run (`gate: reproduced`) cannot be skipped. " +
|
|
306
|
+
"The exception: a check that failed " +
|
|
306
307
|
"only in some of its runs comes back with code `intermittent` and the cases (`gate: intermittent`), and " +
|
|
307
|
-
"`acceptIntermittent` publishes it anyway. Can take a few minutes. On failure the " +
|
|
308
|
+
"`acceptIntermittent` publishes it anyway; pass it only after the user has seen each run's reasons and explicitly agreed. Can take a few minutes. On failure the " +
|
|
308
309
|
"failing cases are returned. A success carries `unconfirmedFacts`: how many of the agent's 資料 facts " +
|
|
309
310
|
"nobody has confirmed yet — for each of them the agent says it will check and call back instead of " +
|
|
310
311
|
"stating it (confirm_facts confirms them). Needs agents:publish.",
|
|
@@ -314,7 +315,7 @@ export function createKumionMcpServer(client, options) {
|
|
|
314
315
|
acceptIntermittent: z
|
|
315
316
|
.boolean()
|
|
316
317
|
.optional()
|
|
317
|
-
.describe("Publish although the check failed only in some of its runs (code `intermittent`). Has no effect on a check that failed
|
|
318
|
+
.describe("Publish although the check failed only in some of its runs (code `intermittent`). Pass only after the user has seen each run's reasons and explicitly agreed. Has no effect on a check that failed again on re-run."),
|
|
318
319
|
},
|
|
319
320
|
annotations: { destructiveHint: true, idempotentHint: false },
|
|
320
321
|
}, (args) => attempt(() => client.publishAgent(args.agentId, args.revision, { acceptIntermittent: args.acceptIntermittent === true })));
|
package/package.json
CHANGED
package/skills/kumion/SKILL.md
CHANGED
|
@@ -24,7 +24,8 @@ Two ways in, same operations and same permissions:
|
|
|
24
24
|
`update_capture_spec`, `get_agent_capture`, `set_agent_capture`,
|
|
25
25
|
`upload_document`, `get_document_upload_job`, `get_document`,
|
|
26
26
|
`replace_document`, `start_test_run`, `get_test_run`, `list_test_runs`,
|
|
27
|
-
`create_call`, `
|
|
27
|
+
`create_call`, `create_scheduled_call`, `list_scheduled_calls`,
|
|
28
|
+
`cancel_scheduled_call`, `list_calls`, `get_call`, `get_call_transcript`.
|
|
28
29
|
- **The `kumion` CLI** otherwise (`kumion --help`). Add `--json` for machine-readable
|
|
29
30
|
output.
|
|
30
31
|
|
|
@@ -86,10 +87,10 @@ A partner with several customers has one profile per customer tenant
|
|
|
86
87
|
5. **Publish** — only when the user asked for it. `publish_agent` /
|
|
87
88
|
`kumion agents publish <agentId>`. It runs the same pre-publish check as the Portal
|
|
88
89
|
and can take a few minutes. If the check fails, nothing goes live and the failing
|
|
89
|
-
cases come back: fix, test, publish again.
|
|
90
|
-
look for one. One case is the exception: when the refusal says the check failed only
|
|
90
|
+
cases come back: fix, test, publish again. A reproduced failure (`[reproduced]`) has no skip or
|
|
91
|
+
override; do not look for one. A refusal with no re-run verdict is not intermittent: fix its cause. One case is the exception: when the refusal says the check failed only
|
|
91
92
|
intermittently (`[intermittent]`, code `intermittent`), `--accept-intermittent` /
|
|
92
|
-
`acceptIntermittent` publishes it. Use it only
|
|
93
|
+
`acceptIntermittent` publishes it. Use it only after the user has seen each run's reasons and said to accept that risk.
|
|
93
94
|
6. **Try it** (optional) — `create_call` / `kumion calls create <agentId>` starts a web
|
|
94
95
|
test call and returns a LiveKit room and token. With `phoneNumber` / `--to <phone>` it
|
|
95
96
|
places a real outbound call instead (a domestic number; the agent must be published
|
|
@@ -263,6 +264,9 @@ A key a node does not store follows the agent's setting (会話の運用) or the
|
|
|
263
264
|
| `opening_speech` | start | `required` | `string` | The opening line. Supports {{variables}}. |
|
|
264
265
|
| `items` | start, agent | `required` | `{key,label?,example?,source?,value_type?,options?,must_ask?,min_digits?,max_digits?,tool?,option_writes?}[]` | What this step collects, one object per item, in the order it asks. `key`: slot key. `label`: display name. `example`: test-call example. `source`: where the value comes from (caller, derived, system, tool). `value_type`: kind (text, select, boolean, ...). `options`: choices of a select item. `must_ask`: ask the caller to confirm on the spot even if already known (advanced). `min_digits` / `max_digits`: for a `code` item, the fewest / most digits the value may hold, counted by the platform (the same number twice = exact length). `tool`: `{tool_key,result_field}` for a tool-sourced item. `option_writes`: option → tool that must succeed before that option lets the call leave (advanced). |
|
|
265
266
|
| `allow_interruptions` | start, agent | `tune` | `boolean` | Absent means the caller may interrupt. Only an explicit false is stored. |
|
|
267
|
+
| `route_judge` | start | `tune` | `boolean` | Absent means off. Only an explicit true is stored. On: while the call stays on this start step, each caller turn is first read by the call model's own probability readout (at most 400 ms, before the AI answers); when it is sure which of the step's three connections fits, the call moves on without a model turn. Offered only for a call model whose endpoint has a calibrated readout; the step needs exactly three AI connections without items and no fixed connections (graph diagnostics `route_judge_not_applicable`). |
|
|
268
|
+
| `wait_for_first_word` | start | `tune` | `boolean` | Absent means off. Only an explicit true is stored. On: an outbound call waits for the customer to speak first and says the opening line when they finish or `first_word_wait_seconds` runs out. An inbound call never reads it (graph diagnostics `first_word_wait_outbound_only`). |
|
|
269
|
+
| `first_word_wait_seconds` | start | `tune` | `number` | Seconds `wait_for_first_word` waits (1 to 10, default 3). Absent means the default. Read only when `wait_for_first_word` is true. |
|
|
266
270
|
| `respond_on_enter` | agent | `tune` | `boolean` | Absent means the node answers on arrival. Only an explicit false (wait for the caller) is stored. |
|
|
267
271
|
| `confirm_before_end` | agent | `tune` | `boolean` | Absent means off (agents published before this setting keep their behaviour); a node created on the canvas stores true, and a node compiled from a SOP or document stores true when its connection to an end node requires items (the `end_without_readback` rule). On: the platform reads the recorded items back once before the call ends, and the end opens on a later caller turn with caller_confirmed. |
|
|
268
272
|
| `confirm_before_end_keys` | agent | `internal` | `string[]` | Set by the compiler on a 伝言 step. With `confirm_before_end` on, the end readback reads only these item keys (the call-back number); absent means every item the ending requires. |
|