@kumion/cli 0.6.1 → 0.6.2
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 +4 -1
- package/dist/main.js +16 -5
- package/dist/mcp.js +5 -2
- package/package.json +1 -1
- package/skills/kumion/SKILL.md +5 -1
package/README.md
CHANGED
|
@@ -167,7 +167,10 @@ them. `calls list` returns one page (20 by default, at most 100) and prints the
|
|
|
167
167
|
`--offset` of the next one. Every call in `calls list` and `calls get` carries what it came to: `outcome`
|
|
168
168
|
(`ai_resolved`, `ai_unresolved_hangup`, `invalid_call`, `handoff`, `system_ended`, or `na` when not judged),
|
|
169
169
|
`endedAtNode` (the node it ended on), `durationSec`, `transferred`, and `capturedItems` (the names of the
|
|
170
|
-
items it recorded, never their values).
|
|
170
|
+
items it recorded, never their values). `calls get` also returns `direction` (the raw value stored with
|
|
171
|
+
the call: `inbound`, `outbound`, `on_net`) and `portalDirection`, which is the 着信/発信 the Portal's call history
|
|
172
|
+
shows: `inbound`, `outbound`, or `null` when the call is neither (a trigger run, say). An `on_net` web call is
|
|
173
|
+
`inbound` there. Count 着信/発信 from `portalDirection`. A transcript's `turns` hold only what the caller and the agent said. A call handed to a person adds `handoffSegment` (`status` `transcribed` / `failed` / `not_sent`, `reason`, `fromSec` / `toSec`, and `turns` of `speaker`, `text`, `offsetSec`, in seconds into the call recording); `not_sent` means the tenant's contract forbids sending the recording out, so it has no text.
|
|
171
174
|
Add `--json` to any command for the API's JSON instead of a summary.
|
|
172
175
|
|
|
173
176
|
`hours` is the shop clock the call answers 「何時までですか」 from, and it is one calendar for the
|
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.2";
|
|
9
9
|
const HELP = `kumion — manage your Kumion voice agents over the Partner API
|
|
10
10
|
|
|
11
11
|
Usage: kumion <command> [options]
|
|
@@ -2008,6 +2008,7 @@ async function callsGet(args, deps) {
|
|
|
2008
2008
|
`Call ${call.id}`,
|
|
2009
2009
|
`Agent: ${call.agentName ?? "-"}${call.agentId ? ` (${call.agentId})` : ""}`,
|
|
2010
2010
|
`Source: ${call.source}${call.direction ? ` (${call.direction})` : ""}`,
|
|
2011
|
+
`Direction: ${call.portalDirection ?? "-"}`,
|
|
2011
2012
|
`Caller: ${call.remoteE164 ?? "-"}${call.localE164 ? ` → ${call.localE164}` : ""}`,
|
|
2012
2013
|
`Started: ${call.startedAt}`,
|
|
2013
2014
|
`Answered: ${call.answeredAt ?? "-"}`,
|
|
@@ -2026,11 +2027,21 @@ export function formatTranscript(transcript) {
|
|
|
2026
2027
|
if (!transcript.available) {
|
|
2027
2028
|
return "No transcript yet — it is written when the call ends, and a call that never connected has none.";
|
|
2028
2029
|
}
|
|
2029
|
-
|
|
2030
|
+
const segment = transcript.handoffSegment;
|
|
2031
|
+
if (transcript.turns.length === 0 && !segment)
|
|
2030
2032
|
return "The transcript is empty: nobody said anything.";
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
.
|
|
2033
|
+
const lines = transcript.turns.map((t) => `${t.at ? `[${t.at}] ` : ""}${t.role === "user" ? "Caller" : "Agent "}: ${t.text}`);
|
|
2034
|
+
if (segment) {
|
|
2035
|
+
lines.push("--- After the handover to a person ---");
|
|
2036
|
+
if (segment.status === "not_sent")
|
|
2037
|
+
lines.push("Not transcribed: the tenant's contract forbids sending the recording out.");
|
|
2038
|
+
else if (segment.status === "failed")
|
|
2039
|
+
lines.push(`Transcription failed${segment.reason ? ` (${segment.reason})` : ""}.`);
|
|
2040
|
+
for (const t of segment.turns) {
|
|
2041
|
+
lines.push(`${t.offsetSec !== null ? `[+${t.offsetSec}s] ` : ""}${t.speaker !== null ? `Person (speaker ${t.speaker})` : "Person"}: ${t.text}`);
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
return lines.join("\n");
|
|
2034
2045
|
}
|
|
2035
2046
|
async function callsTranscript(args, deps) {
|
|
2036
2047
|
const { values, positionals } = parse(args, {});
|
package/dist/mcp.js
CHANGED
|
@@ -414,7 +414,7 @@ export function createKumionMcpServer(client, options) {
|
|
|
414
414
|
annotations: { readOnlyHint: true },
|
|
415
415
|
}, (args) => attempt(() => client.listCalls(args)));
|
|
416
416
|
server.registerTool("get_call", {
|
|
417
|
-
description: "Read one call: agent, source and
|
|
417
|
+
description: "Read one call: agent, source, `direction` (the raw column) and `portalDirection` (inbound / outbound as the Portal 通話履歴 counts it; null when neither), numbers, when it started, was answered and ended, how it " +
|
|
418
418
|
"ended, its result (`outcome`, `endedAtNode`, `durationSec`, `transferred`, `capturedItems`), and whether " +
|
|
419
419
|
"a transcript exists (read it with get_call_transcript). The channel is only on list_calls. Needs calls:read.",
|
|
420
420
|
inputSchema: { callId },
|
|
@@ -423,7 +423,10 @@ export function createKumionMcpServer(client, options) {
|
|
|
423
423
|
server.registerTool("get_call_transcript", {
|
|
424
424
|
description: "Read what the caller (`user`) and the agent (`assistant`) said on one call, in order. Tool calls and " +
|
|
425
425
|
"the agent's instructions are not included. `available: false` means no transcript has been written " +
|
|
426
|
-
"yet (the call is still up, or never connected) — not that the call was silent.
|
|
426
|
+
"yet (the call is still up, or never connected) — not that the call was silent. A call handed to a " +
|
|
427
|
+
"person also carries `handoffSegment`: what the person said after the pickup (`status` transcribed / " +
|
|
428
|
+
"failed / not_sent; not_sent means the tenant's contract forbids sending the recording out, so there is " +
|
|
429
|
+
"no text). Needs calls:read.",
|
|
427
430
|
inputSchema: { callId },
|
|
428
431
|
annotations: { readOnlyHint: true },
|
|
429
432
|
}, (args) => attempt(async () => ({ transcript: await client.getTranscript(args.callId) })));
|
package/package.json
CHANGED
package/skills/kumion/SKILL.md
CHANGED
|
@@ -152,7 +152,11 @@ channel, time range, or caller number). Each call already carries its result (`o
|
|
|
152
152
|
transcript only for the call you need. `get_call_transcript` /
|
|
153
153
|
`kumion calls transcript <callId>` returns what the caller (`user`) and the agent
|
|
154
154
|
(`assistant`) said. `available: false` means no transcript has been written yet, not a
|
|
155
|
-
silent call.
|
|
155
|
+
silent call. A call handed to a person also has `handoffSegment`: what the person said after
|
|
156
|
+
the pickup (`status` is `transcribed`, `failed` or `not_sent`; `not_sent` means the tenant's
|
|
157
|
+
contract forbids sending the recording out, so there is no text). `turns` stays the AI part. `get_call` carries `direction` (the raw stored value) and `portalDirection` (`inbound` /
|
|
158
|
+
`outbound` / null: the 着信/発信 the Portal call history shows); count from `portalDirection`.
|
|
159
|
+
Use a transcript to find where the agent went wrong before editing its
|
|
156
160
|
draft. Transcripts are the tenant's customers' conversations: quote only what the task
|
|
157
161
|
needs.
|
|
158
162
|
|