@mafdet/cli 0.4.6 → 0.4.7
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 +16 -0
- package/README.md +3 -3
- package/README.zh-CN.md +1 -1
- package/dist/commands/agent.d.ts +8 -0
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,22 @@ The version is the contract for the JSON output shapes and the exit codes.
|
|
|
6
6
|
Being 0.x, semver still permits a break in a minor bump; the intent is not to
|
|
7
7
|
use that latitude, and the promise becomes binding at 1.0.0.
|
|
8
8
|
|
|
9
|
+
## 0.4.7 - 2026-08-12
|
|
10
|
+
|
|
11
|
+
0.4.6 shipped without the fix it was published for.
|
|
12
|
+
|
|
13
|
+
Its headline change was that an interactive `mafdet agent` records your
|
|
14
|
+
questions and not only the model's replies. The edit that connected the
|
|
15
|
+
recorder to the session loop matched nothing when it was applied, and the
|
|
16
|
+
version went out with the old behaviour: typecheck passed, the whole suite
|
|
17
|
+
passed, and the unit test for it passed too, because that test drives the
|
|
18
|
+
session loop directly and never touches the command that was supposed to call
|
|
19
|
+
it. A real interactive run found it a few minutes later.
|
|
20
|
+
|
|
21
|
+
This release contains the wiring, and a test that goes through the command
|
|
22
|
+
rather than around it - verified to fail when the wiring is removed. If you
|
|
23
|
+
installed 0.4.6, upgrade: everything else in it was real, but that one was not.
|
|
24
|
+
|
|
9
25
|
## 0.4.6 - 2026-08-12
|
|
10
26
|
|
|
11
27
|
A third audit round. Two of its findings were things the previous round's
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The official Mafdet AI command line: model calls, account queries, and a
|
|
4
4
|
permissioned local agent.
|
|
5
5
|
|
|
6
|
-
> **0.4.
|
|
6
|
+
> **0.4.7.** 中文版见 [README.zh-CN.md](./README.zh-CN.md). The CLI never
|
|
7
7
|
> advertises a command it cannot serve, so `mafdet help` always lists exactly
|
|
8
8
|
> what works.
|
|
9
9
|
>
|
|
@@ -23,8 +23,8 @@ Or build it from this repository:
|
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
pnpm --filter @mafdet/cli build
|
|
26
|
-
cd packages/cli && npm pack # -> mafdet-cli-0.4.
|
|
27
|
-
npm install -g ./mafdet-cli-0.4.
|
|
26
|
+
cd packages/cli && npm pack # -> mafdet-cli-0.4.7.tgz
|
|
27
|
+
npm install -g ./mafdet-cli-0.4.7.tgz
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## The interactive session
|
package/README.zh-CN.md
CHANGED
package/dist/commands/agent.d.ts
CHANGED
|
@@ -8,6 +8,14 @@ export interface AgentIo extends CommandIo {
|
|
|
8
8
|
/** Overridden in tests; production reads the TTY. */
|
|
9
9
|
isInteractive?: boolean;
|
|
10
10
|
approver?: import("../agent/approvals.js").Approver;
|
|
11
|
+
/**
|
|
12
|
+
* Overridden in tests; production reads lines from the terminal.
|
|
13
|
+
*
|
|
14
|
+
* Injectable because the interactive path could otherwise only be exercised
|
|
15
|
+
* under a real pty - and `script` cannot allocate one in every CI, so the
|
|
16
|
+
* wiring here went untested and a broken edit shipped past a full suite.
|
|
17
|
+
*/
|
|
18
|
+
readLine?: () => Promise<string | undefined>;
|
|
11
19
|
}
|
|
12
20
|
export declare function agentCommand(argv: readonly string[], io: AgentIo): Promise<ExitCode>;
|
|
13
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AAQA,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAiBvE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGnD,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAmBtB,eAAO,MAAM,gBAAgB,0XAK+C,CAAC;AAE7E,eAAO,MAAM,YAAY,mgBAOmB,CAAC;AAE7C,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACxC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,qDAAqD;IACrD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,uBAAuB,EAAE,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AAQA,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAiBvE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGnD,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAmBtB,eAAO,MAAM,gBAAgB,0XAK+C,CAAC;AAE7E,eAAO,MAAM,YAAY,mgBAOmB,CAAC;AAE7C,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACxC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,qDAAqD;IACrD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,uBAAuB,EAAE,QAAQ,CAAC;IACpD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9C;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,EAAE,OAAO,GACV,OAAO,CAAC,QAAQ,CAAC,CAuInB;AAoLD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,OAAO,0JAI3E"}
|
package/dist/commands/agent.js
CHANGED
|
@@ -99,7 +99,13 @@ export async function agentCommand(argv, io) {
|
|
|
99
99
|
client: runtime.dataPlane,
|
|
100
100
|
...(recorder === undefined
|
|
101
101
|
? {}
|
|
102
|
-
: {
|
|
102
|
+
: {
|
|
103
|
+
onEvent: (event) => recorder.observe(event),
|
|
104
|
+
// T-1 · The user's questions. Without this the transcript held
|
|
105
|
+
// the replies and none of the prompts, so resuming it could
|
|
106
|
+
// not continue a conversation that was only half there.
|
|
107
|
+
onGoal: (goal) => recorder.goal(goal),
|
|
108
|
+
}),
|
|
103
109
|
model,
|
|
104
110
|
pricing: resolved,
|
|
105
111
|
catalog,
|
|
@@ -113,6 +119,7 @@ export async function agentCommand(argv, io) {
|
|
|
113
119
|
stderr: io.stderr,
|
|
114
120
|
signal: io.signal,
|
|
115
121
|
isTty: isTty(io),
|
|
122
|
+
...(io.readLine === undefined ? {} : { readLine: io.readLine }),
|
|
116
123
|
});
|
|
117
124
|
}
|
|
118
125
|
finally {
|