octwin-cli 0.1.10 → 0.1.11
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/CHANGELOG.md +91 -83
- package/dist/index.js +12 -0
- package/package.json +1 -1
- package/templates/starter/manifest.yaml +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,83 +1,91 @@
|
|
|
1
|
-
# Changelog — octwin-cli
|
|
2
|
-
|
|
3
|
-
All notable changes to the `octwin` CLI (npm package [`octwin-cli`](https://www.npmjs.com/package/octwin-cli)).
|
|
4
|
-
Format: [Keep a Changelog](https://keepachangelog.com/) — newest first, bucketed into
|
|
5
|
-
**Added · Changed · Deprecated · Removed · Fixed · Security**. The platform-wide view lives in the
|
|
6
|
-
repo root [`CHANGELOG.md`](../../CHANGELOG.md); this file is the CLI-only cut that ships with the package.
|
|
7
|
-
|
|
8
|
-
## [0.1.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
`
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
## [0.1.
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
## [0.1.
|
|
77
|
-
- `octwin
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
# Changelog — octwin-cli
|
|
2
|
+
|
|
3
|
+
All notable changes to the `octwin` CLI (npm package [`octwin-cli`](https://www.npmjs.com/package/octwin-cli)).
|
|
4
|
+
Format: [Keep a Changelog](https://keepachangelog.com/) — newest first, bucketed into
|
|
5
|
+
**Added · Changed · Deprecated · Removed · Fixed · Security**. The platform-wide view lives in the
|
|
6
|
+
repo root [`CHANGELOG.md`](../../CHANGELOG.md); this file is the CLI-only cut that ships with the package.
|
|
7
|
+
|
|
8
|
+
## [0.1.11] - 2026-07-21
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Auth-failure hint on every command, not just the inspect family** (author-feedback A7). `validate`,
|
|
12
|
+
`deploy`, `status`, and the single-record read now print the scope/transient explanation on a 401/403
|
|
13
|
+
(the shared `authFailureHint`), instead of a bare `HTTP 401` that left it ambiguous whether the token
|
|
14
|
+
lacked a scope or the platform hiccupped.
|
|
15
|
+
|
|
16
|
+
## [0.1.10] - 2026-07-21
|
|
17
|
+
|
|
18
|
+
The capability reference is now **pulled, never bundled** — the authoring skill dropped its committed KB
|
|
19
|
+
snapshot, so `octwin platform-kb pull` is the single source of truth, and the CLI watches it for drift.
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- **KB-drift nudge** — after any command that already talks to the platform (`deploy` / `status` /
|
|
23
|
+
`test` / `validate --remote` / `records` / `cases` / `logs` / `whoami`), the CLI does one tiny
|
|
24
|
+
`octwin-platform-kb?meta=1` GET and prints a one-line "the platform capability reference changed —
|
|
25
|
+
`octwin platform-kb pull`" when the platform's `content_hash` no longer matches your last pull.
|
|
26
|
+
Fail-silent + TTY-only + no-op until you've pulled once — the sibling of the existing CLI-upgrade notice.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- **`octwin platform-kb pull`** now records the reference's `content_hash` in `.octwin/platform-kb/index.json`
|
|
30
|
+
(the fingerprint the drift check compares against).
|
|
31
|
+
|
|
32
|
+
The conversation-debugging release — driven by the second author-feedback round (xpeng-egypt),
|
|
33
|
+
which found the author→validate→deploy loop solid but multi-turn debugging impossible from the CLI.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
- **`octwin chat --tap "<tap-id>"`** — press a rendered button / list row (sends the web channel's
|
|
37
|
+
`type:'interactive'` inbound). Paired with full render printing, any tap-driven flow is now drivable headlessly.
|
|
38
|
+
- **Full render printing** — every reply prints its complete interactive content: list sections/rows,
|
|
39
|
+
buttons, and carousel cards, each with its **tap id**; header/footer/list-button text included.
|
|
40
|
+
- **`--json` on `chat` / `logs` / `cases`** — raw SSE envelopes (chat) or raw event/case payloads.
|
|
41
|
+
- **`octwin cases [caseId] [--queues]`** — inspect casework (support tickets): the inbox, one case +
|
|
42
|
+
timeline + applicable decisions, or queue keys with open counts. Casework packs previously had zero
|
|
43
|
+
data-inspection path (`records case` was a dead end).
|
|
44
|
+
- **Per-subcommand `--help`/`-h`** — intercepted before any network or auth work (previously
|
|
45
|
+
`octwin logs --help` made a network call and could die with a 401).
|
|
46
|
+
- Multi-message turns: `chat` now collects **all** of a turn's renders (quiet-gap detection) instead
|
|
47
|
+
of cutting at the first one.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- **`octwin logs`**: the conversation list shows contact handle + last activity and filters with
|
|
51
|
+
`--as <handle>`; the timeline prints **full** event text (no more 240-char truncation) plus the
|
|
52
|
+
renders each turn actually sent; footer points at `--json` / `mastra-messages` for verbatim payloads.
|
|
53
|
+
- **Network failures name the target URL** (`platform unreachable at <url>`), and 401s explain
|
|
54
|
+
invalid-token vs one-off transient instead of a bare status code.
|
|
55
|
+
- `octwin records` on an unknown entity now surfaces the server's error body, and for `case`/`cases`
|
|
56
|
+
points at `octwin cases`.
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
- **Multi-turn chat actually works.** Two bugs made consecutive `octwin chat` calls look like "every
|
|
60
|
+
call starts fresh": (1) the idempotency `local_id` was a **constant** per handle, so the platform's
|
|
61
|
+
5-minute inbound dedup silently dropped the second message — a fresh id is now minted per call;
|
|
62
|
+
(2) a fresh SSE connect **replays** recent history and the CLI printed the first render frame — i.e.
|
|
63
|
+
the *previous* turn's greeting — as the reply; the CLI now drains the replay and only accepts frames
|
|
64
|
+
newer than the connect boundary. The platform always kept one open conversation per `--as` handle —
|
|
65
|
+
the same handle genuinely continues the same conversation now.
|
|
66
|
+
|
|
67
|
+
## [0.1.8] - 2026-07-21
|
|
68
|
+
- Global-first install guidance (`npm i -g octwin-cli`); upgrade notice suppressed under `npx`.
|
|
69
|
+
|
|
70
|
+
## [0.1.7] - 2026-07-21
|
|
71
|
+
- `--version`/`-v` flag; daily fail-silent, TTY-only "newer version available" notice.
|
|
72
|
+
|
|
73
|
+
## [0.1.6] - 2026-07-21
|
|
74
|
+
- `octwin init` scaffolds a home-hub menu (`home` list_picker + example `browse` tool) instead of a bare greeting.
|
|
75
|
+
|
|
76
|
+
## [0.1.5] - 2026-07-20
|
|
77
|
+
- `octwin validate --remote` (the platform's FULL manifest + flow-DSL check, all errors at once);
|
|
78
|
+
headless debugging commands `octwin records` / `octwin logs` / `octwin chat`; `octwin test` became
|
|
79
|
+
an alias for `validate --remote`. First author-feedback round.
|
|
80
|
+
|
|
81
|
+
## [0.1.4] - 2026-07-20
|
|
82
|
+
- Authoring reliability + DX fixes from the first end-to-end external-pack test.
|
|
83
|
+
|
|
84
|
+
## [0.1.3] - 2026-07-20
|
|
85
|
+
- `octwin platform-kb pull` — pull the platform capability reference for the authoring skill.
|
|
86
|
+
|
|
87
|
+
## [0.1.2] - 2026-07-20
|
|
88
|
+
- Proper npm README.
|
|
89
|
+
|
|
90
|
+
## [0.1.1] - 2026-07-20
|
|
91
|
+
- Initial npm publish: `init` / `validate` / `login` / `whoami` / `deploy` / `status`, `oct_` deploy tokens.
|
package/dist/index.js
CHANGED
|
@@ -98,6 +98,13 @@ function authFailureHint(status, url) {
|
|
|
98
98
|
? `the token was rejected — invalid / expired / revoked. If it JUST worked, this can be a one-off platform hiccup: retry once before re-logging in (octwin login --url ${url} --token oct_…)`
|
|
99
99
|
: `the token is valid but not authorized here (missing scope, plan feature, or role)`;
|
|
100
100
|
}
|
|
101
|
+
/** Print the auth-scope hint below an HTTP-failure line when it's a 401/403 —
|
|
102
|
+
* so every command explains a token problem, not just the inspect family
|
|
103
|
+
* (author-feedback A7). No-op for other statuses. */
|
|
104
|
+
function printAuthHint(status, url) {
|
|
105
|
+
if (status === 401 || status === 403)
|
|
106
|
+
console.error(` → ${authFailureHint(status, url)}`);
|
|
107
|
+
}
|
|
101
108
|
/** Pretty-print a JSON error body (or raw text) for an HTTP failure line. */
|
|
102
109
|
function errDetail(json) {
|
|
103
110
|
if (json == null)
|
|
@@ -379,6 +386,7 @@ async function cmdValidate(flags) {
|
|
|
379
386
|
if (res.status === 404)
|
|
380
387
|
die('this platform has no /packs/validate endpoint yet (older version) — deploy runs the full check');
|
|
381
388
|
console.error(`✗ remote validate failed (HTTP ${res.status})`);
|
|
389
|
+
printAuthHint(res.status, url);
|
|
382
390
|
console.error(typeof json === 'string' ? json : JSON.stringify(json, null, 2));
|
|
383
391
|
process.exit(1);
|
|
384
392
|
}
|
|
@@ -545,6 +553,7 @@ async function cmdDeploy(flags) {
|
|
|
545
553
|
}
|
|
546
554
|
if (!res.ok) {
|
|
547
555
|
console.error(`✗ deploy failed (HTTP ${res.status})`);
|
|
556
|
+
printAuthHint(res.status, url);
|
|
548
557
|
console.error(typeof json === 'string' ? json : JSON.stringify(json, null, 2));
|
|
549
558
|
process.exit(1);
|
|
550
559
|
}
|
|
@@ -576,6 +585,7 @@ async function cmdStatus(flags) {
|
|
|
576
585
|
if (res.status === 404)
|
|
577
586
|
die(`'${id}' is not installed on ${tenant}/${project} yet — run \`octwin deploy\` first`);
|
|
578
587
|
console.error(`✗ status check failed (HTTP ${res.status})`);
|
|
588
|
+
printAuthHint(res.status, url);
|
|
579
589
|
console.error(typeof json === 'string' ? json : JSON.stringify(json, null, 2));
|
|
580
590
|
process.exit(1);
|
|
581
591
|
}
|
|
@@ -709,6 +719,8 @@ async function cmdRecords(flags) {
|
|
|
709
719
|
die('forbidden — mint a token with the `records:read` scope');
|
|
710
720
|
if (status === 404)
|
|
711
721
|
die(`record '${recordId}' not found`);
|
|
722
|
+
if (status === 401)
|
|
723
|
+
die(`could not read record — ${authFailureHint(401, url)}`);
|
|
712
724
|
if (status !== 200)
|
|
713
725
|
die(`could not read record (HTTP ${status})`);
|
|
714
726
|
console.log(JSON.stringify(json?.record ?? json, null, 2));
|
package/package.json
CHANGED
|
@@ -41,3 +41,14 @@ agents:
|
|
|
41
41
|
# relative; `.md` files may use built-in placeholders like {{pack.id}}.
|
|
42
42
|
instructions:
|
|
43
43
|
- file: prompts/identity.md
|
|
44
|
+
# No working_memory block — deliberate, and you should keep it that way.
|
|
45
|
+
# Declaring one makes the platform add Mastra's updateWorkingMemory tool +
|
|
46
|
+
# a "call it every turn" instruction: an extra LLM generation on most turns,
|
|
47
|
+
# and small models (like the lite default above) parrot the
|
|
48
|
+
# <working_memory_data> envelope straight into user-visible replies. Session
|
|
49
|
+
# identity (name/lang/phone) already reaches the model via the platform's
|
|
50
|
+
# first-turn [ctx: …] header, and tools read it from the request context —
|
|
51
|
+
# so you gain nothing here. Leave it off unless you're on a large model and
|
|
52
|
+
# have a concrete slot schema to maintain.
|
|
53
|
+
default_memory:
|
|
54
|
+
lastMessages: 10 # size of the recalled message window
|