apcore-cli 0.9.1 → 0.10.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/CHANGELOG.md +53 -0
- package/dist/bin/apcore-cli.js +1606 -1579
- package/dist/bin/apcore-cli.js.map +1 -1
- package/dist/index.d.ts +43 -10
- package/dist/index.js +2268 -2251
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,59 @@ All notable changes to apcore-cli (TypeScript SDK) will be documented in this fi
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.10.1] - 2026-06-15
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Required runtime bumped to apcore-js 0.24.0 and apcore-toolkit 0.8.1.** Peer
|
|
13
|
+
dependency floors in `package.json` raised from `apcore-js>=0.22.0` /
|
|
14
|
+
`apcore-toolkit>=0.8.0` to `apcore-js>=0.24.0` / `apcore-toolkit>=0.8.1` (and the
|
|
15
|
+
`apcore-toolkit` devDependency to `^0.8.1`), tracking the aligned apcore 0.24.0 and
|
|
16
|
+
apcore-toolkit 0.8.1 releases. **No source changes** — the full test suite passes
|
|
17
|
+
unchanged.
|
|
18
|
+
|
|
19
|
+
The apcore-js 0.22.0 → 0.24.0 delta does not touch any surface the CLI consumes:
|
|
20
|
+
- **Error `details` key casing camelCase → snake_case (A-D-019)** scopes only the
|
|
21
|
+
*inner* `details` keys of `CALL_DEPTH_EXCEEDED` / `CIRCULAR_CALL` /
|
|
22
|
+
`CALL_FREQUENCY_EXCEEDED` (`maxDepth` → `max_depth`, etc.). The CLI's error
|
|
23
|
+
serialization in `main.ts` reads top-level fields (`details`, `suggestion`,
|
|
24
|
+
`ai_guidance`, `retryable`, `user_fixable`) and forwards `details` verbatim — it
|
|
25
|
+
never references the inner keys, and the public TS getters (`maxDepth`, …) are
|
|
26
|
+
unchanged. Transparent pass-through; no golden tests pin the shape.
|
|
27
|
+
- **Per-instance `ToggleState` isolation (#71)** — the CLI never constructs
|
|
28
|
+
`ToggleState`/`APCore` nor calls `isModuleDisabled()`.
|
|
29
|
+
- The CLI's internal `Registry` / `Executor` / `ModuleDescriptor` mirror interfaces
|
|
30
|
+
in `src/cli.ts` (`list(): string[]`, `getDefinition()`, `call()`,
|
|
31
|
+
`moduleId`, `name: string | null`) still match apcore-js 0.24.0 exactly.
|
|
32
|
+
- Out of scope and unused by the CLI: `Registry.unregister()` drain fix (A-D-001),
|
|
33
|
+
array redaction (A-D-003), `Config` env coercion (A-D-008), middleware
|
|
34
|
+
`on_error` (A-D-011), ACL `removeRule(null)` (A-D-016), `CircuitBreakerMiddleware`,
|
|
35
|
+
`A2ASubscriber`, DLQ, `EventEmitter`.
|
|
36
|
+
|
|
37
|
+
## [0.10.0] - 2026-05-18
|
|
38
|
+
|
|
39
|
+
### Changed — BREAKING
|
|
40
|
+
|
|
41
|
+
- **Removed graceful dynamic-import fallback for `apcore-toolkit` in `applyToolkitIntegration` (resolves 6.2).** `package.json` already declares `apcore-toolkit>=0.7.0` as a required peer dependency, but `main.ts:792-801` used a `try { await import("apcore-toolkit") } catch { logWarn(...); return }` pattern — self-contradiction between manifest and runtime behaviour. The fallback is gone; `BindingLoader` and `DisplayResolver` are now statically imported at the top of `main.ts`. A missing toolkit installation now fails at module load time with `ERR_MODULE_NOT_FOUND`, matching the peer-dep contract. `loadBindingDisplayOverlay` no longer takes a `toolkit: Record<string, unknown>` parameter (signature simplified).
|
|
42
|
+
- **CLI-internal `Registry`, `Executor`, and `ModuleDescriptor` interfaces now match apcore-js >= 0.22.0 exactly (resolves "D9-W2 Known gap" in `src/cli.ts`).** Embedders may now pass an `apcore-js` `Registry` / `Executor` instance — and the `ModuleDescriptor` objects those instances return — directly to `createCli()` with no adapter or field remapping. Four surfaces aligned:
|
|
43
|
+
- **`Executor.execute(moduleId, input)` → `Executor.call(moduleId, input)`**. `execute` is removed entirely; `call` is the single required invocation method.
|
|
44
|
+
- **`Registry.listModules() → ModuleDescriptor[]` → `Registry.list() → string[]`**. `list()` returns module IDs only (matches apcore-js semantics). A new exported helper `listAllDefinitions(registry: Registry): ModuleDescriptor[]` performs the `list() + getDefinition()` iteration for call sites that need full descriptors.
|
|
45
|
+
- **`Registry.getModule(moduleId)` → `Registry.getDefinition(moduleId)`** (rename only — semantics identical).
|
|
46
|
+
- **`ModuleDescriptor.id: string` → `ModuleDescriptor.moduleId: string`**; **`ModuleDescriptor.name: string` → `ModuleDescriptor.name: string | null`** (matches apcore-js `name` nullability). All internal accesses (`approval`, `display-helpers`, `discovery`, `main`, `output`) updated. The generic `sortModulesByUsage<T>` helper in `system-usage.ts` accepts any of `{ moduleId, id, module_id }` for forward/backward compatibility with snake_case audit payloads.
|
|
47
|
+
- **CLI JSON output preserves the `id` field name** for backward compatibility with downstream scripts (jq pipelines, log parsers). The output boundary in `output.ts` maps `descriptor.moduleId` → JSON `id` explicitly; emitted JSON shape is unchanged from 0.9.x.
|
|
48
|
+
- **Migration for embedders** who provided custom Registry / Executor / ModuleDescriptor shims to `createCli()`:
|
|
49
|
+
```ts
|
|
50
|
+
// Before (0.9.x):
|
|
51
|
+
const registry = { listModules: () => mods, getModule: (id) => mods.find(m => m.id === id) ?? null };
|
|
52
|
+
const executor = { execute: (id, input) => myInvoke(id, input) };
|
|
53
|
+
const mod = { id: "math.add", name: "math.add", description: "Add" };
|
|
54
|
+
// After (0.10.0):
|
|
55
|
+
const registry = { list: () => mods.map(m => m.moduleId), getDefinition: (id) => mods.find(m => m.moduleId === id) ?? null };
|
|
56
|
+
const executor = { call: (id, input) => myInvoke(id, input) };
|
|
57
|
+
const mod = { moduleId: "math.add", name: "math.add", description: "Add" };
|
|
58
|
+
```
|
|
59
|
+
Embedders using apcore-js's own `Registry` / `Executor` (the common case via `APCore` client) need no code change — those instances and their descriptors already satisfy the new shim shape verbatim.
|
|
60
|
+
|
|
8
61
|
## [0.9.1] - 2026-05-13
|
|
9
62
|
|
|
10
63
|
### Fixed
|