Changelog¶
All notable changes to this project will be documented in this file.
[0.15.0] - 2026-11-19¶
Added¶
- Documented the coordinated 0.15.0 effective OpenAPI scanner and proxy preflight for Python, TypeScript and Rust. Inherited and referenced parameters share a single resolution step for tool schemas and routing metadata.
- Defined the portable HTTP proxy subset and shared diagnostic JSON for validating selected operations before registration. Effective findings redact external reference identifiers.
[0.14.0] - 2026-10-09¶
Coordinated Python, TypeScript, and Rust SDK update for apcore 0.32.0. Public loader signatures and error types are unchanged, but binding-file validation is stricter.
Breaking¶
- Binding documents with unknown top-level or entry keys, or only one inline
schema, now fail in both loose and strict modes instead of being tolerated.
Remove unsupported keys, put application-specific entry data in
metadata, and supply bothinput_schemaandoutput_schema(or neither in loose mode). Runtimeauto_schemaandschema_refentries must use apcore's runtime loader rather than the toolkit's pure-data loader. - Strict mode now rejects non-list
tagsconsistently across SDKs; TypeScript and Rust previously accepted them. Loose mode continues with[]and a warning.
Changed¶
- Required apcore floor raised to 0.32.0 across the Python, TypeScript, and
Rust SDKs. The toolkit's imported runtime surface (
Registry, module and annotation types, schema helpers,Context, andModuleError) is unchanged by the release. Its pure-dataBindingLoader, however, now follows the binding-file structural rules made normative in apcore 0.32.0: unknown document or entry keys and one-sided inline schema pairs are rejected in both loose and strict modes. Runtimeauto_schemainference remains deliberately owned by apcore's target-loadingBindingLoader, not this toolkit's pure-data parser.
Fixed¶
- BindingLoader behavior aligned across SDKs. Rust now warns and defaults
malformed inline schemas to
{}in loose mode. TypeScript and Rust now reject non-listtagsin strict mode and warn and default to[]in loose mode, matching the documented Python behavior. Python now warns and continues for non-stringspec_versionvalues instead of raising an unhashable-valueTypeErrorfor lists or mappings.
Added¶
- Shared binding-structure conformance corpus — 18 cases, each exercised in both modes through in-memory parsing and YAML file loading by all three SDKs. Public loader signatures and error types remain unchanged.
- SDK CI checks out the canonical fixture repository's
mainbeside each SDK and fails with publication-order guidance if the new binding-structure corpus is missing. Publish the corpus before the SDK changes.
[0.13.0] - 2026-09-28¶
A breaking release: OpenAPIScanner module IDs are normalised into apcore's Canonical ID alphabet (read the Migration note before upgrading — IDs derived from camelCase names change), and Rust's BaseScanner::scan becomes fallible. The apcore floor is unchanged (0.31.0).
Changed — BREAKING¶
OpenAPIScanneremits module IDs in apcore's Canonical ID alphabet. V1 usedoperationIdverbatim with case preserved and sanitised to[A-Za-z0-9_.-], an alphabet no apcore registry accepts (PROTOCOL_SPEC §2.7 admits only[a-z0-9_.]). The canonical Swagger Petstore (listPets,createPets,showPetById) scanned cleanly and registered nothing; so did any path containing a hyphen. Theapcore-mcpandapcore-a2aOpenAPI backends, in all three languages, each shipped a private projection to compensate. The rule now lives in the toolkit, once:derive_module_idconverts to snake_case with two pinned word-boundary regexes (getUserById→get_user_by_id,getHTTPResponse→get_http_response) — the camelCase → snake_case conversion apcore's PROTOCOL_SPEC §2.2 (Algorithm A02) already requires for Canonical IDs, which V1's verbatim choice contradicted; the word boundaries match what apcore's own SDKs produce — and the scanner applies the same normalisation to the final ID, afterbase_path_prefixand both ID-affecting hooks. The normalisation never rewrites an ID apcore already accepts, so FastAPI's generatedread_item_items__item_id__get, utoipa function names and any other snake_caseoperationIdare used as they are: runs of_are kept, because no registry enforces §2.7's no-__clause and collapsing them would rename every FastAPI ID that registers today. The acronym rule is pinned as([A-Z])([A-Z][a-z]): output-identical to the([A-Z]+)form, but linear-time — the+form is quadratic in Python's and JavaScript's engines on a long run of capitals, and the scanner reads documents it did not write. A segment that still begins with a digit (/v1/2fa) is not repaired, since that would invent a name: after deduplication the module carries a pinned legality warning naming the ID actually emitted, and the consumer decides. The rawoperationIdstays inmetadata.openapi.operation_id; the scanner deliberately sets nosuggested_alias(the reasoning is recorded in the spec). Resolves the spec's Open Question Q1. Seedocs/features/openapi-scanner.md.- Migration: only names containing uppercase letters change meaning: they are split into words (
getUserById→get_user_by_id,/userProfiles→user_profiles). This includes IDs that registered before: V1 lowercased a path before sanitising it, so a camelCase path parameter — the most common case — gave a legal, working ID that now changes (/pets/{petId}:pets.petid.get→pets.pet_id.get). Names apcore rejected before (hyphens, a leading_, other punctuation) now register (/user-profiles→user_profiles). Measured against the IDs theapcore-mcp/apcore-a2abackends register today — V1 plus their lowercase projection — every lowercaseoperationIdand path whose ID was legal derives the identical ID, except anoperationIdwhose last character before any trailing.,_or punctuation is a hyphen (list-:list_→list) and a path with no segment that survives normalisation (/_:get→root.get). Those backends' projections lowercased without splitting words (listPets→listpets); because their dependency on the toolkit is open-ended (>=0.12.0), their users getlist_petsas soon as they pick up this release, even before the backends change. ACL rules, bindings andinclude/excludepatterns written against the old camelCase-derived IDs need updating — filters match the emitted, normalised ID (a patternreplaceItemSubno longer matchesitems.replace_item_sub.put). conformance/fixtures/openapi_scan.json2.0.0 — cases 003 and 015 re-pinned to the normalised IDs. Nine new cases: 025 pins the word-boundary regexes (acronyms, digits, hyphens), that a legal FastAPI ID with__runs passes through unchanged, the operationId-branch trailing-_strip, and one_per astral code point; 026 path-branch normalisation; 027 the legality warning from both derivation branches; 028base_path_prefixnormalisation; 029 hook-output normalisation; 030 that the legality warning follows deduplication and names the emitted ID; 031 theroot.<method>fallback for a path with no surviving segment; 032 that the final pass keeps a legal ID a hook returns (pre_.abc_); 033 one_per replaced character, never collapsed (list--pets→list__pets), a path segment's trailing_kept, and lowercasing after replacement (KELVIN SIGN). Cases 029 and 032 need new driver hooks,always_returns_mixed_case_id(aderive_module_idhook returning"Custom-Space.GetThing") andalways_returns_legal_trailing_underscore_id(returning"abc_"); case 028 is the first to passoptions.base_path_prefix. 24 → 33 cases.- Rust
BaseScanner::scanis fallible (apcore-toolkit-rust#4). It returnsResult<Vec<ScannedModule>, Self::Error>with an associatedErrortype, where it used to return a bareVecand leave a Rust scanner no way to report what Python and TypeScript raise.OpenAPIScannerstays a standalone struct by decision: its per-call input is a document plus options rather than an application, and nothing dispatches overBaseScanner(axum-apcoreuses its own trait), so an impl would be an entry point nothing calls. Documented inscanning.mdand the Rust note inopenapi-scanner.md; the README's Rust example is updated, and also stops calling aget_source_namemethod the trait never had.
[0.12.0] - 2026-09-23¶
The first release since 0.11.1, and a substantial one: it adds the toolkit's first credential-handling surface (RFC 8628 Device Authorization Flow, #17), closes a latent BindingLoader spec gap (#18), fixes a credential-disclosure path in $ref resolution, and raises the apcore floor to 0.31.0.
The device-auth half is the protocol only — the toolkit writes nothing to a terminal; it emits events and the consumer renders them.
Added¶
DeviceAuthClient,DeviceAuthConfig,TokenSet,TokenStore,FileTokenStore,Grant/DeviceCodeGrantand the four extension hooks. The toolkit writes nothing to a terminal: it emits events, and the consumer renders them. Seedocs/features/device-auth.md.conformance/fixtures/device_auth.json— 65 cases across eleven case kinds. No HTTP mocking is required in any SDK: the state machine is pure over an injected monotonic clock and a scripted response sequence, so a harness feeds responses in order and records the sleeps. Written, reviewed, and committed before any SDK started, the same ordering that gaveTuiViewModelzero divergences and whose absence gavecsv/jsonlthree independent bugs.-
V1 ships device flow only, with the
Grantinterface in place so a second grant is one implementation against a stable seam rather than a rewrite. This is a deliberate scope-down from the proposal's own recommendation (device flow + manual code entry + PKCE): PKCE widens the exact surface whose risk mitigation depends on being narrow, and no consumer has yet named a provider lacking device-flow support. The decision reverses the moment one does. -
BindingLoader.loadgainspattern(#18) — apcore 0.30 madebindings.patterna canonical config default, but the toolkit loader hardcoded the value and had no parameter through which a caller could honour a configured one. Any consumer needing the loader's return value rather than apcore's registration side effect (e.g.apexe, which builds its ownCliModulefrom each descriptor) silently dropped the key.loadnow takes the resolved pattern; the loader takes a value and does not readConfig, keeping the pure-data layer dependency-free and leaving resolution with the caller that actually holds aConfig. Python and TypeScript gain an optional parameter; Rust gainsload_with_patternand keepsload's arity, mirroring apcore's ownload_binding_dir/load_binding_dir_with_configtwo-tier shape. Seedocs/features/binding-loader.md. conformance/fixtures/binding_pattern.json— 43 shared cases (5validate, 27match, 11select) pinning the matcher, the rejected patterns, howpatterncomposes withrecursive, and the filesystem-entry rules (directories never match; the file-type check follows symlinks, so a symlinked binding file is selected while a symlinked directory is neither selected nor descended into; a dangling link is skipped, not read). The spec carries the matching algorithm in pseudocode, not just the syntax, because three independent implementations converge only if the algorithm is fixed: the two-pointer single-star-backtracking match, over Unicode code points, in bounded time.
Changed¶
-
HTTPProxyRegistryWriter.authHeaderFactory(TypeScript) widened toRecord | Promise<Record>and awaited — backward-compatible, since awaiting a non-promise is a no-op. Without itasAuthHeaderFactory()could not plug into its own stated integration point. Rust adds a separateas_async_auth_header_factory()rather than changing the existing signature; Python stays synchronous because itshttpxpath already is. -
docs/scope.md— the "token management" exclusion is disambiguated. It previously read as an undifferentiated exclusion covering anything token-shaped. It now separatesapflow's two token concerns (LLM context-token budgeting; issuingapflow's own service JWTs) from third-party credential acquisition, and admits the latter to the toolkit on the narrow grounds that the toolkit already ships theauth_header_factoryseam it fills. This unblocks #17 Phase 0. docs/features/device-auth.md— status PROPOSED → ACCEPTED. Both blocking prerequisites are resolved and all six open questions have recorded verdicts. Still no code: Phase 2 is ~2000 LOC across three SDKs and its conformance corpus, the gating artifact, is not written. Notably, V1 grant scope was narrowed from the document's own recommendation (device flow + manual code entry + PKCE) to device flow only, with theGrantinterface retained so the wider scope stays one implementation away rather than a rewrite.docs/features/tui-view-model.md— the five open questions have recorded verdicts, checked against what actually shipped in 0.11.1 rather than what was recommended. Four were adopted as written. The fifth was not: the builder resolvesdisplay.alias > module_id, not the richerdisplay.cli.alias > display.alias > canonical_idchain the proposal asked for, so a binding setting onlydisplay.cli.aliasstill renders differently inapcore-clithan in the view model. Recorded as follow-up instead of closed quietly.
Changed — dependency floor¶
- Required apcore floor raised to 0.31.0. apcore 0.31.0 is two joined audit cycles (
PROTOCOL_SPECv1.37.0 → v1.59.0): a configuration-surface audit and a deep-chain call-graph audit settling 54 cross-language divergences, five of them security defects. No code change was needed here — the toolkit's apcore surface isRegistry,Module/FunctionModule,ModuleAnnotations,ModuleExample,ModuleDescriptor,Context,ModuleError/ErrorCode, and none of it moved. All three suites passed unmodified against 0.31.0 — the upgrade itself required no code change (the counts below are the release's final totals, which the two fixes in this release raised further). - Notable for this toolkit specifically: apcore 0.31.0 adds Algorithm A25 (
match_glob), which replaces the three disagreeing glob dialects this project reported as apcore#116 and apcore#117.BindingLoader.load's matcher was specified independently of apcore precisely because there was no single upstream behaviour to inherit; there now is. The two algorithms were compared exhaustively over 85,995 pattern/value pairs and agree on every one — no behaviour change is required. The remaining difference is validation, not matching: see the note indocs/features/binding-loader.md.
Changed — bindings.pattern is never rejected¶
loadno longer raises onpatternfor syntactic reasons. An earlier draft of this work rejected an empty pattern and any pattern containing/or\; that validation was removed before release, sopatternships with none. Every string is a valid pattern —a[b,{x,y},**,/and\are literals — and one matching no file yields no modules, which is not an error. This adopts apcore 0.31.0's Algorithm A25 requirement 2 (PROTOCOL_SPEC§9.2.3) and §5.12.6 clause 6 verbatim.- The reason, recorded because it gives up a better error message.
**/*.binding.yaml— the shape a caller reaches for first when they want recursion — was a clear error pointing atrecursive=True, and is now a silently empty result. That diagnostic was surrendered because the entire purpose of this parameter is to let a caller honour apcore'sbindings.pattern: a caller resolving the key fromConfigand handing the same string to both components must get the same answer from both, and under 0.12.0 apcore matched nothing while the toolkit raised. Two components reading one configuration key and disagreeing is exactly what #18 was filed to close. The diagnostic now lives in the docs: if a pattern selects nothing and contains/, you probably wantedrecursive=True. \is a literal, not a separator (A25 requirement 4), so on a filesystem permitting it,sub\*.binding.yamlgenuinely matchessub\x.binding.yaml. Verified identical across all three SDKs end-to-end.- Removed with it: Rust's
BindingLoadError::InvalidPatternvariant (back to 7) andvalidate_binding_pattern; TypeScript'svalidateBindingPattern. All were introduced in the unreleased 0.12.0 and were never published. The corpus loses itsvalidatecase kind; its five cases becamematchcases asserting what those patterns now do, plus aselectcase pinning that the loader surfaces an empty result rather than an error — 44 cases, 0 skipped, in all three SDKs.
Fixed — security¶
$refsibling keys were discarded during schema resolution, droppingx-sensitive.deep_resolve_refsresolved a node like{"$ref": "…", "x-sensitive": true}to the referenced schema alone, silently losing every key written beside the reference. This is a credential-disclosure path, not a fidelity nicety: apcore readsx-sensitiveoff the resolved schema to decide what to redact, and this toolkit'sOpenAPIScannerproduces theinput_schema/output_schemathat the output writers register into an apcoreRegistry. A field whose OpenAPI document marked it sensitive beside a$reftherefore reached apcore with nothing to redact on, and was logged in plaintext. apcore closed the same hole in its own resolver in 0.31.0 (decision D-98); fixing it there and not here would have left the leak intact for every schema this toolkit produces, because the marking is already gone by the time apcore sees it. All three SDKs were affected identically — so this was not a cross-SDK divergence, and the existing corpus could not have caught it.- The resolved target is now shallow-merged with its siblings, sibling winning on conflict, at every depth. The merge is deliberately not restricted to
x-extension keys: limiting it to the one symptom that was noticed would leavedescription,titleanddeprecatedsilently dropped. A$refthat fails to resolve still contributes its siblings. New shared corpusconformance/fixtures/ref_resolution.json(9 cases); normative text indocs/features/openapi.md.
Fixed¶
docs/features/output-writers.md— theauth_header_factoryinvocation contract is documented, verified against the shipped 0.11.1 sources in all three SDKs: invoked once per outbound request from insideexecute(so a rotating credential works without a writer change), and synchronous in all three (so an async credential source cannot refresh inside it). This resolves #17 Phase 1.docs/features/binding-loader.md— three TypeScript examples were wrong. Theloadexamples showedloader.load("users.binding.yaml", { strict: true })and describedrecursiveas{ recursive: true };load's 2nd and 3rd parameters have always been positional booleans, andBindingLoadOptionsbelongs toloadData/parseBindingDocument. Confirmed by compiling the documented line (TS2345). The failure mode was self-concealing outside TypeScript:{ strict: true }is truthy, so a JavaScript caller following the docs got strict mode by accident.docs/features/binding-loader.md— the Rust error enum was documented as 7 variants in two places;InvalidPatternmakes 8.
Spec amendments made during implementation¶
Each was found by an SDK implementer and is recorded in device-auth.md with its date and reason:
- The cross-origin endpoint rule contradicted itself and the corpus. It said discovered endpoints "SHOULD share the issuer's origin" and that a cross-origin one "is rejected rather than followed" —
SHOULDand "rejected" cannot both hold, and case 029 requires such an endpoint to be used. Resolved:https://is a hard error; a different origin is a warning and is followed. Rejecting breaks providers that host the token endpoint on a separate host, and the document's authority is already established by fetching from the issuer's own well-known path over TLS plus a verbatim issuer comparison. classify_error's invocation rule was never stated. "Always call, alias wins" and "call only when unresolved" produce identical results for a pure hook — so both pass a corpus that does not pin it, while differing observably for a hook with side effects. Now: consulted only when the identifier is still unresolved.- The injected-clock table named two clocks; there are three. The monotonic clock measures the polling deadline; a separate wall clock computes
expires_at. Case 015 pinned the wall clock while the prose never named it, so three SDKs would have named it three ways. - Poll-loop ordering is now normative (sleep → check deadline → poll). The corpus pinned it; the prose did not, and it is the most likely off-by-one in the implementation.
- The store key was undefined when no
issueris configured — a first-class path, since explicit endpoints are supported. Now falls back to the token endpoint. error_aliasesdoes not apply on the refresh path. Otherwise the one alias the spec explicitly describes (invalid_grant→expired_token) would disable the one terminal rule protecting the store.on_user_codereceives the effective deadline, never null. Found as a live three-way divergence after all three landed: Python passed the 900-second fallback, TypeScript and Rust passed the absent wire value.client_secret_basicform-urlencodes before base64 (RFC 6749 §2.3.1). Raw concatenation is a real defect — a secret containing+reaches the server as one containing a space.
Corpus cases that could not fail, and were rewritten¶
Recorded rather than quietly fixed, because a case that cannot fail reports coverage that does not exist:
- 045 and 046 were vacuous. 045 supplied no error body, so a harness inventing a standard identifier resolved it before the hook was ever reached; 046 used
access_denied, which resolves without the hook, so it passed whatever the hook did. Both now carry a deliberately unresolved identifier. - 054 and 055 both omitted
device_authorization_endpoint, so discovery failed whether or not the issuer check fired — an implementation that normalises the issuer before comparing passed both. Found by mutation testing in the TypeScript SDK. - 058 and 061 were written as exact-byte assertions and rewritten as round trips. The three languages' form encoders disagree on space,
*and~, and every one of those spellings decodes identically — so pinning one would have forced two SDKs to hand-roll an encoder for no functional gain. This is the repository's own ownership rule applied rather than assumed: byte-equivalence is for formats two consumers must compare, and the consumer here is a third-party authorization server that decodes.
Known cross-SDK issues found while specifying this¶
- apcore's own three SDKs interpret
bindings.patternthree different ways.apcore-pythonusesPath.glob(full glob incl. character classes);apcore-ruststrips a leading*and suffix-matches;apcore-typescriptdoespattern.replace('*','')thenendsWith. All three agree on the default*.binding.yamland on essentially nothing else —data*.yamlmatchesdata1.yamlin Python only. This is the same latent-divergence shape as #18, one layer up. The toolkit therefore specifies its own matcher and pins it with a fixture rather than inheriting an accident. To be filed upstream againstapcore. - The corpus's
empty_pattern/path_separatoridentifiers are corpus vocabulary, not public API. Python and TypeScript expose a singleBindingLoadErrorwith no machine-readable discriminator for any failure kind, so a caller cannot read the identifier off a thrown error; Rust callers can matchInvalidPattern. A cross-SDK error-code field is worth its own issue. - Non-UTF-8 file names are handled inconsistently in
apcore-toolkit-rust— the recursive branch converts withto_string_lossy(invalid bytes become U+FFFD, which can then match*), the flat branch usesto_str()and skips. Pre-existing, not covered by the fixture.
[0.11.0] - 2026-09-06¶
Patch release across Python, TypeScript, and Rust: raises the required apcore floor to 0.30.0.
Feature release across Python, TypeScript, and Rust: ships two previously-proposed Tier-1 toolkit features — OpenAPI Scanner and TUI View Model — plus two blocking HTTPProxyRegistryWriter defect fixes in apcore-toolkit-rust. docs/features/device-auth.md remains a design proposal and does not ship in this release.
Added¶
- OpenAPI Scanner (
OpenAPIScanner,derive_module_id,load_spec) — turns a whole OpenAPI 3.0/3.1 document into aScannedModulelist, one module per operation, with a byte-identicalmodule_idderivation across all three SDKs. Built on the already-shippedextract_input_schema/extract_output_schema/deep_resolve_refsprimitives. Seedocs/features/openapi-scanner.md. Verified against the published Swagger Petstore OpenAPI 3.0 reference spec — byte-identicalScannedModuleoutput across all three SDKs, in addition to the shared 24-case conformance corpus (conformance/fixtures/openapi_scan.json). - TUI View Model (
TuiViewModel,modules_to_view_model,format_view_model) — lifts the module-list view shape (columns, rows, filter/sort/color-by-tag semantics) into a Tier-1 byte-equivalent structure, ending three independent per-SDK table-rendering implementations. Seedocs/features/tui-view-model.md. Asserted byte-identical via the shared 11-case conformance corpus (conformance/fixtures/view_model.json), and cross-checked end-to-end against the Petstore-scanned modules above (identical grouped/filtered/sorted output across all three SDKs). output-writers.md§metadataContract — documents the previously-unspecifiedhttp_method/url_pathmetadata keysHTTPProxyRegistryWriterreads, including the uppercase requirement and the method-driven body-vs-query rule.
Changed¶
-
Required apcore floor raised to 0.29.0 across all three SDKs. apcore 0.29.0 is approval- and ACL-layer work plus a large documentation-conformance pass.
ApprovalRequestgainscaller_idandaction(additive, spec v1.32.0 decision D-03);CancelToken.raise_if_cancelled()lands in Python and TypeScript as an additive alias forcheck(); and the ACL pattern array (callers/targets) has its shape closed at every entry point — an empty array,["$or"],["$not"]and the multi-operand["$not", p1, p2]are now refused rather than silently matching nothing, which underdefault_effect: allowhad been permitting the very call the rule named (apcore#112). Per-SDK it additionally carriesAsyncTaskManager.startReaper()returning aPromisein TypeScript, and in RustAPCore::on/offreturningResultplusACLRulebecoming#[non_exhaustive]. None of it touches the Registry / Module / annotations surface this toolkit uses in any of the three languages — confirmed per-SDK by grepping every apcore import insrc/against the symbols apcore 0.29.0 changed. No code or API changes; all three test suites pass unmodified against apcore 0.29.0 (Python 760, TypeScript 657, Rust 477 lib + 13 integration + 8 doc). -
Required apcore floor raised to 0.30.0 across all three SDKs. apcore 0.30.0 is confined to the
Config/BindingLoaderlayer: the §9.2.2 deprecation-warning cadence is now spec-normative (once per configuration load, never once per process — TypeScript additionally gainsConfig.projectRoot,userLevelConfigPaths(), and a new out-of-tree-relative-path deprecation notice building toward it); a set-but-empty path-typedAPCORE_*override (e.g.APCORE_ACL_ROOT=) is now discarded instead of silently resolving to the working directory; the missing-binding-directory error names a directory rather than a file; andbindings.dir/bindings.patternbecome canonical defaults reachable fromConfig.get()in all three SDKs. None of it touches the Registry / Module / annotations surface this toolkit uses — confirmed per-SDK by grepping every apcore import insrc/against the symbols apcore 0.30.0 changed: noConfig,BindingLoader,ACL,ApprovalRequest,CancelToken,ExecutionPolicy, orExecutorreference exists in any of the three toolkits. No code or API changes; all three test suites pass unmodified against apcore 0.30.0 (Python 798, TypeScript 680, Rust 485 lib + 13 integration + 8 doc).
Fixed¶
apcore-toolkit-rust—HTTPProxyRegistryWriterrejectedHEAD/OPTIONS/TRACErequests before any network call. OnlyGET/POST/PUT/PATCH/DELETEwere handled; OpenAPI-scanned modules using the other three recognised HTTP methods failed at execution time on Rust only. Fixed.apcore-toolkit-rust— the post-substitution "unfilled path parameter" check used a narrower regex than extraction/substitution, so a hyphenated path parameter (e.g.{item-id}) left unfilled by the caller was not flagged. Path-parameter extraction and substitution were already correct — this is a narrower, corrected diagnosis than the defect as originally filed; see the correction indocs/features/openapi-scanner.md. Fixed by reusing the same extraction function for both checks.
Cross-SDK audit findings (fixed in this release)¶
A post-implementation line-by-line audit comparing all three SDKs' new code — beyond what the shared conformance corpus exercises — found and fixed:
- TypeScript —
TuiViewModel'sFilter.annotationssilently excluded every module when filtering byrequires_approvaloropen_world. The filter takes the spec's snake_case flag names, but the installedapcore-jsModuleAnnotationstype uses camelCase fields, so the raw property lookup always missed — a documented, valid usage path, not a malformed-input edge case. Fixed with an explicit name mapping. - Python —
OpenAPIScannermis-parsed a non-arraytagsvalue.list(tags or [])silently character-split a string value ("tags": "foo"→["f","o","o"]) instead of degrading to an empty list, as TypeScript and Rust already did. - Several lower-severity type-coercion divergences (a truthy-vs-strict
deprecatedboolean check, non-stringoperationId/info.version/summaryleniency, Unicode- vs ASCII-only digit matching for 2xx response-status detection) were also found and aligned toward the stricter, more-correct behaviour across all three SDKs. None affect a valid OpenAPI document; all are gated behind malformed/non-conforming input.
Docs¶
docs/features/tui-view-model.mdanddocs/features/openapi-scanner.mdstatus flipped from "PROPOSED — not implemented" to "IMPLEMENTED"; both moved from Proposed Capabilities to the main feature table indocs/features/overview.md;mkdocs.ymlnav labels dropped the "(proposed)" suffix.docs/features/device-auth.mdis unaffected and remains a proposal.
[0.10.2] - 2026-09-01¶
Patch release, version-aligned across Python, TypeScript, and Rust. Bumps the required apcore floor to 0.28.0. apcore 0.27.0 and 0.28.0 are almost entirely ACL/Executor governance work (argument-scoped approval, ACLRule.approval/approval_required, ExecutionPolicy.resolve() call-site parameters, Executor.governance_state()/governanceState(), ACL effect/condition hardening) — none of it touches the Registry/Module/annotations surface this toolkit uses in any of the three languages (confirmed per-SDK via grep and cross-checked against the current apcore source). No code or API changes; all three test suites pass unmodified against apcore 0.28.0 (Python 719, TypeScript 617, Rust 453 lib + integration).
Note: apcore 0.28.0 also makes dict-declared input_schema/output_schema validation actually enforce (previously a no-op in the Python SDK). This toolkit's Python HTTPProxyRegistryWriter registers such modules but is never itself routed through a live apcore Executor, so nothing here changes — but a framework adapter that executes a dict-schema module built by this writer through apcore 0.28.0 will now see real validation where it previously saw none.
[0.10.1] - 2026-07-14¶
Patch release, version-aligned across Python, TypeScript, and Rust. Bumps the required apcore floor to 0.26.0 to align the ecosystem on the 0.26.0 governance layer (Execution Policy, governance events, no-handler fail-loud) — additive, no breaking changes for this toolkit. No code or API changes; all three test suites pass unmodified (Python 719, TypeScript 617, Rust 453 lib + integration).
[0.10.0] - 2026-07-07¶
Version-aligned feature release across Python, TypeScript, and Rust: a shared conformance verifier that guards registry writers against silently dropping behavioral annotations (which would disable approval/ACL gating), plus — in Python — a centralized writer so subclass adapters can no longer omit a field. Additive; no breaking changes. All three test suites pass (Python 719, TypeScript 617, Rust 453 lib + integration).
Added¶
- All SDKs —
assert_annotations_preserved/assertAnnotationsPreservedconformance check. A framework-agnostic helper (raises / throws / panics) that registers a scanned module and asserts its behavioral annotations (requires_approval,destructive) surviveget_definition. Adapters import it into their own test suites so a writer that silently drops annotations — disabling approval/ACL gating — fails loudly. Exported from the package root in each SDK.
Changed¶
- Python —
RegistryWriterfield mapping is centralized._to_function_moduleno longer builds theFunctionModuleinline; a new_build_function_moduleforwards all carried fields (includingannotationsanddisplay). Subclass writers now override only the narrow hooks_adapt_func/_build_input_schema/_build_output_schemaand can no longer omit a field. Behavior is unchanged for callers that do not override the hooks. (The TypeScript and Rust writers already preserved annotations — no change was required there.)
Cross-SDK note¶
The motivating bug — dropped annotations silently disabling governance — existed only in two Python framework adapters (fixed in their own repos). The TypeScript (nestjs-apcore) and Rust (axum-apcore) adapters already preserved annotations; this release adds the shared guard across all three languages so no future adapter can regress unnoticed. A new exported symbol ⇒ MINOR; no breaking changes.
[0.9.0] - 2026-06-23¶
Version-aligned bug-fix release across Python, TypeScript, and Rust. Each SDK fixes a distinct correctness defect surfaced by real framework integration against the apcore 0.24.0 runtime. No conformance-fixture changes; all three test suites pass (Python 713, TypeScript 614, Rust all green).
Fixed¶
- Python — OpenAPI parser crashed on integer status-code keys and explicit
null.extract_output_schemaassumed string response keys, so django-ninja's integer keys ({200: ...}) raisedTypeErrorinre.match/sorted;nullresponses/content/requestBody/properties/required raisedAttributeError. Keys are now normalized to strings and null containers fall back to empty. (7 new regression tests.) - TypeScript — registry verification and async registration were broken against the real
Registry.RegistryVerifiercalled the nonexistentgetModule()(apcore exposesget()), soverify: truealways failed; andRegistryWriter.writedid notawaitthe asyncregister(), risking unhandled rejections and premature verification. Both fixed. - Rust — registry writers required
&mut Registry, blocking framework integration. apcore'sRegistryis interior-mutable (register(&self, …)) and executors only exposeArc<Registry>.RegistryWriter::writeandHttpProxyWriter::writenow take&Registry(source-compatible —&mut Tcoerces to&T).
Cross-SDK note¶
These were independent per-language defects, not a shared-contract change — each SDK's stable surface is otherwise unchanged. The Rust signature relaxation is the only API-surface change and is backward-compatible at existing call sites.
[0.8.1] - 2026-06-12¶
Aligned release across Python, TypeScript, and Rust. Bumps the required apcore runtime to 0.24.0 (skipping 0.23.0 — no in-scope changes). No changes to toolkit API surface or conformance fixtures.
Changed¶
- Required runtime bumped to apcore 0.24.0 —
docs/getting-started.mdprerequisites updated fromapcore 0.22.0+toapcore 0.24.0+. Python constraint bumped fromapcore>=0.22.0to>=0.24.0; TypeScript fromapcore-js>=0.22.0to>=0.24.0. Rust SDK updated toapcore = "0.23"— apcore 0.24.0 is not yet published to crates.io; a follow-up patch will advance it to"0.24"once indexed. Toolkit's stable surface (ModuleAnnotations,Registry,ModuleExample,parse_docstring,Module,Context,errors,annotationsFromJSON/annotationsToJSON) is unchanged by the 0.22 → 0.24 delta; all three SDKs pass full test suites without code changes.
apcore 0.23.0 changes in scope for the toolkit:
- None. apcore 0.23.0 adds AI error-recovery metadata to
ModuleError(theuser_fixable/ai_guidancepolicy) and rewritesCircuitBreakerMiddlewareto a rolling-window model. Neither touches the toolkit's stable surface — the toolkit does not instantiateCircuitBreakerMiddlewareor constructModuleErrorwith recovery metadata fields.
apcore 0.24.0 changes in scope for the toolkit:
- None. apcore 0.24.0 scopes
ToggleStateto per-APCore-instance and adds conformance coverage for agent governance and toggle isolation. The toolkit does not useToggleState,APCore, orACLdirectly. The TypeScriptRegistry.unregister()drain-state fix (A-D-001) is downstream ofRegistryWriter's path —RegistryWriteronly callsregister, notunregister.
apcore 0.23.0 changes out of scope for the toolkit:
- CircuitBreakerMiddleware rewritten to rolling-window error-rate model (breaking constructor: failure_threshold/success_threshold removed, open_threshold/window_size/min_samples added). Toolkit does not use circuit-breaker middleware.
- A2ASubscriber no longer retries 4xx responses. Toolkit does not subscribe to apcore events.
- DLQ original_event now nests module_id/timestamp under metadata. Toolkit does not emit apcore events.
- AI error-recovery metadata (user_fixable, ai_guidance) populated in ModuleError at the framework level. Toolkit re-raises ModuleError from RegistryWriter but does not construct them with recovery metadata.
apcore 0.24.0 changes out of scope for the toolkit:
- Per-instance ToggleState isolation (all three SDKs, #71). Toolkit does not construct APCore instances.
- Registry.unregister() drain-state fix (TypeScript A-D-001). Toolkit's RegistryWriter.write() calls register only.
- Sensitive-key redaction recurses into arrays (TypeScript/Rust A-D-003). Toolkit does not call redaction utilities.
- Env value coercion and namespace fallback alignment (TypeScript A-D-008, Rust A-D-007/009). Toolkit does not read apcore Config.
- Before-middleware double on_error fire (TypeScript A-D-011), ACL removeRule(null) conditions fix (A-D-016), error details key casing (camelCase → snake_case A-D-019). Toolkit does not install middleware or manage ACL rules.
- Rust: schema type coercion enabled by default; SchemaValidator returns coerced value. Toolkit conformance fixtures (format_csv, format_jsonl, display_resolve) do not exercise schema validation.
- Rust: registry event delivery-or-DLQ guarantee (A-D-013), middleware on_error exact-once fix (A-D-010/012), mid-stream error recovery (A-D-015), APCore.on()/events() shared event bus fix (D1-011).
Documentation¶
docs/getting-started.md— prerequisites updated fromapcore 0.22.0+toapcore 0.24.0+across all three language tabs.README.md— SDK badges updated to 0.8.1; apcore badge updated to 0.24.0+; version compatibility snapshot updated to 0.24.0 / apcore-toolkit 0.8.1 (dated 2026-06-12).
[0.8.0] - 2026-05-28¶
Aligned release across Python, TypeScript, and Rust. Bumps the required apcore runtime to 0.22.0 and versions all three SDKs to 0.8.0. No changes to toolkit API surface or conformance fixtures.
Changed¶
- Required runtime bumped to apcore 0.22.0 —
docs/getting-started.mdprerequisites updated fromapcore 0.21.0+toapcore 0.22.0+. Rust SDK dependency updated fromapcore = "0.21"(caret:>=0.21.0, <0.22.0) toapcore = "0.22"— the prior caret constraint excluded 0.22.0 entirely, making this a required fix for users on the latest apcore. Python and TypeScript constraints bumped fromapcore>=0.21.0/apcore-js>=0.21.0to>=0.22.0for consistency. Toolkit's stable surface (ModuleAnnotations,Registry,ModuleExample,parse_docstring,Module,Context,errors,annotationsFromJSON/annotationsToJSON) is unchanged by the 0.21 → 0.22 delta; all three SDKs pass full test suites without code changes.
apcore 0.22.0 changes in scope for the toolkit:
-
Registry.register()concurrent same-ID rejection (D-65) — 0.22.0 rejects the second concurrent caller immediately withInvalidInputError(code=DUPLICATE_MODULE_ID)instead of resolving via lock-ordering.RegistryWriter.write()registers modules sequentially and is unaffected under normal usage; callers who concurrently invokewrite()on overlapping module sets will now see deterministic immediate rejection instead of a race outcome. Theidempotent: falseproperty note indocs/features/output-writers.mdupdated to reflect the 0.22.0 behavior. -
Registration Ordering Invariants (D-65) — modules are now guaranteed not to become visible to
registry.get()/registry.list()until allon_loadcallbacks have completed.RegistryWriter.write()returns only after all registrations finish; callers can now rely on modules being immediately discoverable on return. -
StreamingModuleexplicit interface — apcore 0.22.0 promotesStreamingModulefrom duck-typed to an explicit Protocol / interface / trait.RegistryWriternow detects and handles streaming targets across all three SDKs:- Python / TypeScript — if the resolved target has an async
stream()method,RegistryWriter._to_function_module/_toFunctionModulecreates a streaming adapter (_StreamingFunctionModule/StreamingFunctionModule) that satisfiesisinstance(m, StreamingModule)/isStreamingModule(m)without the duck-typing deprecation warning. The adapter's execute path delegates to the target'sexecute()method (or callable form); the stream path delegates totarget.stream(). - Rust — new
StreamingHandlerFactorytype andRegistryWriter::with_streaming_handler_factory(factory)builder. When the factory returnsSome(stream_fn)for a target,RegistryWriterregisters aStreamingFunctionModulethat implements bothModuleandStreamingModule(as_streaming()returnsSome(self)). - Fallback (all SDKs) — if
annotations.streaming=Truebut no streaming implementation is found (no asyncstream()method / factory returnsNone),RegistryWriterlogs a WARNING and clears thestreamingflag to preventStreamingInterfaceError. The module is registered as a non-streamingFunctionModule. - Three new streaming unit tests per SDK.
docs/features/output-writers.mdContract: RegistryWriter.writestreaming admonition updated from a limitation warning to usage documentation.
- Python / TypeScript — if the resolved target has an async
apcore 0.22.0 changes out of scope for the toolkit (not consumed by the toolkit's stable surface):
- Context.create() signature unified — executor and caller_id parameters removed, cancel_token promoted as first-class parameter (D-24). Toolkit does not call Context.create().
- Canonical event name renames — apcore.module.registered → apcore.registry.module_registered, apcore.module.unregistered → apcore.registry.module_unregistered, apcore.error.threshold_exceeded → apcore.health.error_threshold_exceeded, apcore.latency.threshold_exceeded → apcore.health.latency_threshold_exceeded. Toolkit does not emit or subscribe to apcore events.
- TaskStore fully-async requirement (D-17), cancel() real-interrupt requirement (D-18), call_with_trace error semantics (D-19), cancellation short-circuit (D-20), cancel token two-point check (D-21), MiddlewareChainError unwrap (D-22), shallow-copy get_status / list_tasks (D-23).
- Rust TraceParent gains tracestate: Vec<(String, String)> field; ContextBuilder::tracestate() removed. Toolkit does not construct TraceParent or use ContextBuilder.
- A2ASubscriber now retries 3× on 5xx/timeout by default; reserved namespace query Config.reserved_namespaces(); Duplicate Middleware Detection normative SHOULD.
Documentation¶
docs/features/output-writers.md—Contract: RegistryWriter.writeupdated:idempotentproperty corrected to reflect 0.22.0 immediateDUPLICATE_MODULE_IDrejection; newStreamingModulewarning admonition; new Registration Ordering tip admonition.docs/getting-started.md— prerequisites updated fromapcore 0.21.0+toapcore 0.22.0+across all three language tabs.
[0.7.0] - 2026-05-12¶
Aligned release across Python, TypeScript, and Rust. Adds byte-equivalent tabular formatters (format_csv, format_jsonl) for cross-SDK consistency, with shared conformance corpus and updated formatting spec. Lifts a class of bugs that previously affected every apcore-cli SDK's --format csv / --format jsonl implementation. Includes the post-audit cross-SDK contract reconciliation pass (D10 contract-parity findings).
Added¶
format_csv(rows, *, bom=False)andformat_jsonl(rows)— byte-equivalent tabular data formatters inapcore_toolkit.formatting.tabular(Python) /src/formatting/tabular.ts(TypeScript) /src/formatting/tabular.rs(Rust). Re-exported at the top-level package / crate root. All three SDKs emit identical bytes for the same input, asserted via the new shared conformance corpus atconformance/fixtures/format_csv.json(15 cases) andformat_jsonl.json(8 cases).- Tabular Formats section in
docs/features/formatting.md(~90 lines) — full contract for header derivation (union of keys, insertion-order), cell serialization (canonical compact JSON for nested values, whole-number floats as integers matching JSJSON.stringify, NaN/Inf → empty cell / null), RFC 4180 CRLF for CSV / LF for JSONL, BOM option, number portability constraints (Number.MAX_SAFE_INTEGER), and the explicit YAML deferral note.
Changed¶
apcore-toolkit-rust—serde_jsonpreserve_orderfeature enabled. Required for canonical insertion-order key emission, matching Pythondictand JS object key ordering. Transitively affects allserde_json::Mapinstances in the dependency tree; downstream code that relied on alphabetical iteration must re-sort explicitly (the toolkit'srender_annotations_tablealready does so to honour theformatting.mdalphabetical contract).
Why¶
Per-SDK reimplementations of csv/jsonl had accumulated divergence over time: apcore-cli-python emitted Python repr {'k': 'v'} for nested values (invalid JSON); apcore-cli-typescript derived headers from Object.keys(rows[0]) only (silent data loss on heterogeneous rows — surfaced via aisee-cli); apcore-cli-rust used \n instead of CRLF. The spec MUST language couldn't enforce conformance on downstream consumers (e.g. aisee-cli) that reimplemented their own emission. Lifting csv/jsonl into the toolkit replaces those independent failure modes with a single conformance-tested reference. See apcore-cli/docs/tech-design.md ADR-09 for the full tier-split rationale (byte-equivalent toolkit-delegated vs SDK-native presentation vs trivial stdlib).
Notes¶
- YAML is intentionally not in this tier yet. Each idiomatic YAML library (PyYAML, js-yaml, serde_yaml_ng) emits different forms even for identical input. Byte-equivalence requires a custom emitter, which is deferred. YAML remains SDK-native (Tier 2) and may differ across languages.
- Integers exceeding
Number.MAX_SAFE_INTEGER(2^53 - 1) are not portable across SDKs; callers should serialize them as JSON strings.
Downstream impact¶
Downstream adapters (apcore-cli, apcore-mcp, apcore-a2a, and product CLIs like aisee-cli) should delete any local csv/jsonl emission logic and import format_csv / format_jsonl from the toolkit. The shared conformance corpus enforces that every downstream produces identical output going forward.
Spec — cross-SDK contract reconciliation (post-audit)¶
The 2026-05-12 cross-SDK audit (/apcore-skills:audit --scope toolkit) flagged six D10 contract-parity divergences between spec text and the three implementations. Spec is the authority for cross-SDK behaviour, so the following spec sections were updated to either narrow the contract to match uniform implementation behaviour, or document an intentional language-specific divergence:
docs/features/binding-loader.md§ Loose-mode wrong-type policy (D10-001) — added a new subsection declaring the cross-SDK policy for non-required wrong-type optional fields (input_schema,output_schema,tags): strict mode raisesBindingLoadError; loose mode warns and coerces to the empty default. All three SDKs follow this policy after the Python implementation was adjusted (seeapcore-toolkit-python0.7.0 entry).docs/features/output-writers.md§ Contract: get_writer (D10-002, D10-003) — clarified that canonical formats ("yaml","python"/"typescript","registry") are matched case-sensitively in all three SDKs. The HTTP-proxy aliases ("http-proxy","http_proxy","httpproxy") are now declared as a cross-SDK guarantee — accepted by Python, TypeScript, and Rust. Rust additionally matches the alias set case-insensitively.docs/features/openapi.md§ Contract: resolve_ref (D10-004) — added a "Language-specific hardening" note documenting the TypeScript-only__proto__/constructor/prototypeJSON-pointer-segment guard (PROTO_DENY_LISTinbinding-parser.ts). Python and Rust are not vulnerable to the same prototype-pollution attack and walk those segments like any other key.docs/features/formatting.md§ Contract: format_module / format_modules (D10-005) — clarified that Rust's typedModuleStyle/SchemaStyle/GroupByenums make the unknown-style branch compile-time-impossible.Err(FormatError)covers only runtime schema-shape failures (e.g.FormatError::SchemaNotObject), not unknown style values.docs/features/display-overlay.md§ Contract: DisplayResolver.resolve (D10-006) — narrowed the### Errorsblock from "invalid binding format or conflicting resolution options" to "MCP alias validation only", matching the uniform implementation behaviour across all three SDKs (warn-and-continue on invalid binding-data shape; raise only on alias collisions or shadowing).
[0.6.0] - 2026-05-07¶
Aligned release across Python, TypeScript, and Rust. Adds surface-aware formatters (LLM markdown / SKILL.md / CLI table-row / JSON), declares the canonical HTTP-method → annotations mapping, and bumps the required apcore runtime to 0.20.0.
Changed¶
- Required runtime bumped to apcore 0.21.0 —
README.mdbadge anddocs/getting-started.mdprerequisites updated fromapcore 0.19.0+toapcore 0.21.0+. Toolkit only consumes apcore's stable surface (ModuleAnnotations,Registry,ModuleExample,parse_docstring,Module,Context,errors,jsonSchemaToTypeBox,annotationsFromJSON/annotationsToJSON); none of those touched the 0.19 → 0.21 changes (which were focused onOverridesStore,SubscriberFactory,StepMiddleware, schema/system-modules hardening, plusCircuitOpenError→CircuitBreakerOpenErrorrename andTaskStore.put→saverename — all out of toolkit's reach). All three SDKs continue to pass full test suites (Python 585 / TypeScript 490 / Rust 380).
Added¶
- Surface-aware formatters (#13) —
format_module,format_schema,format_modulesfor renderingScannedModuleand JSON Schema for specific consumer surfaces. Four styles:markdown(LLM context),skill(drop-in.claude/skills/<id>/SKILL.mdor.gemini/skills/<id>/SKILL.mdbody with minimalname+descriptionfrontmatter — no vendor-specific extensions),table-row(CLI listing),json(programmatic). Replaces the ad-hocto_markdown(asdict(module))pattern downstream surfaces were using. Spec:docs/features/formatting.md. - Annotation-table cross-SDK alignment (#13 follow-up) —
format_module(style="markdown" | "skill")now emits the## Behaviorfact table identically across Python / TypeScript / Rust: only fields that differ fromModuleAnnotationsdefaults are listed, rows are sorted alphabetically by key, and bool values render as lowercasetrue/false. The## Behaviorsection is omitted entirely when every annotation field equals its default. This closes the byte-equality gap surfaced by the original cross-SDK verification step.
Changed¶
infer_annotations_from_methodcanonical mapping (#11) — spec now declaresHEADandOPTIONSMUST map toreadonly=true(withoutcacheable=true), aligning with RFC 9110 §9.2 safe-method semantics. Closes a Python/TypeScript ↔ Rust divergence where Rust already returnedreadonly=truefor these methods while Python and TypeScript returned default annotations. Spec:docs/features/scanning.md.
Fixed¶
HTTPProxyRegistryWriterdoc inconsistency (#12) —docs/features/output-writers.mdheading, Contract block, andget_writer()factory table now correctly list TypeScript alongside Python and Rust.apcore-toolkit-typescripthas shippedHTTPProxyRegistryWritersince thehttp-proxywriter feature commit; the toolkit docs had not caught up.docs/features/overview.mdSDK Parity table was already correct. The TypeScript build needs only Node 18+ for the globalfetch; no extra install is required.Contract: get_writerInputs alignment (sync follow-up) —docs/features/output-writers.mdContract: get_writerInputs paragraph for TypeScript was still asserting "http-proxyis not available in TypeScript" (residue from the original #12 misdirection); corrected to list"http-proxy"/"http_proxy"and theoptions.baseUrlrequirement. Rust paragraph clarified to surfaceErr(OutputFormatError::Unknown)rather than the imprecise "returnsNone".HTTPProxyRegistryWriterconstructor unit divergence (sync follow-up) — added an admonition under the constructor docs noting that Python usestimeout: float = 60.0(seconds), Rust usestimeout_secs: f64(seconds, validated non-zero finite), and TypeScript usestimeoutMs: number = 60_000(milliseconds, default 60 s). Default behavior is identical; cross-language porters MUST translate units when passing an explicit value.
[0.5.0] - 2026-04-21¶
Aligned release across Python, TypeScript, and Rust. Tracks apcore 0.19.0 features (expanded ModuleAnnotations, display field, declarative config spec).
Added¶
BindingLoader(three SDKs) — parses.binding.yamlfiles back intoScannedModuleobjects. Pure-data reader: no target import, no Registry side effects. Distinct fromapcore.BindingLoaderwhich does both. Enables verification, merging, diffing, and round-trip workflows.- Loose mode (default): only
module_id + targetrequired. - Strict mode: additionally requires
input_schema + output_schema. spec_versionvalidated; missing/unsupported values WARN but do not fail.- Errors:
BindingLoadErrorwithfile_path,module_id,missing_fields,reason(Rust: 7-variantthiserrorenum — addsFileTooLarge(16 MiB per-file cap) andTooManyFiles(10,000-files-per-directory cap) safety variants). ScannedModule.display(three SDKs) — new optional top-level field holding the sparse display overlay for binding YAML persistence. Distinct frommetadata["display"](resolved form produced byDisplayResolver).- New feature doc:
docs/features/binding-loader.md. docs/features/display-overlay.md— new section explaining the sparse-overlay vs resolved-display distinction, and the round-trip flow.docs/features/output-writers.md— notes on conditionaldisplay:emission,spec_versionstamping, and a Rust example.docs/features/overview.md— Binding Loader entry; tri-language parity note.mkdocs.ymlnav — adds Binding Loader, Display Overlay, Convention Scanning entries.
Changed¶
YAMLWriter— emits top-leveldisplay:key only whenScannedModule.displayis non-empty. Rust writer refactored fromjson!macro toserde_json::Mapto support conditional keys.serializers.module_to_dict / moduleToDict / module_to_value— includedisplayfield.- Python
AIEnhancer._build_prompt— confidence template now built dynamically fromgaps. Whenannotationsis in gaps, requests per-field confidence for every validator key (annotations.readonly,annotations.streaming,annotations.cache_ttl, …). Previously hard-coded to{"description": 0.0, "documentation": 0.0}, which caused annotation-field confidence lookups to fall back to0.0and fail the threshold check — annotation enhancement silently never took effect.
Dependencies¶
apcore >= 0.19.0/apcore-js >= 0.19.0— picks up the expandedModuleAnnotations(12 fields: addsstreaming,cacheable,cache_ttl,cache_key_fields,paginated,pagination_style,extra),FunctionModule.display, and new binding/schema error types. No toolkit type changes were needed for annotations — reflection (Python), serde (Rust), andannotationsFromJSON(TypeScript) propagate new fields automatically.
Fixed (Rust)¶
output::registry_writer/http_proxy_writer— fixed pre-existingModuleDescriptorinitialization errors following the apcore 0.19.0 upgrade: adds requireddisplayfield; updatesannotationstoOption<ModuleAnnotations>; fills all descriptor fields inhttp_proxy_writer(previously partial).
Tests¶
| SDK | Δ tests | Total |
|---|---|---|
| Python | +34 | 440 |
| TypeScript | +29 | 320 |
| Rust | +26 | 304 |
All round-trip tests (YAMLWriter.write → BindingLoader.load) verify end-to-end preservation of display, annotations (12 fields), metadata, examples, and schemas.
Hardening (post-review)¶
A code-forge:review pass on the 0.5.0 delta produced a short list of cross-SDK inconsistencies; they are fixed as part of this same release:
- Silent drop of malformed
displayvalues — Python, TypeScript, and Rust all used to swallow non-mapping overlays without warning. All three SDKs now emit a WARN with the offending module_id and returnNone/null, matching the behaviour ofannotations/examplesparsers. ScannedModule.displaydefensive copy — Python'sYAMLWriterused to emit a bare reference (binding["display"] = module.display); it now deep-copies, matching TypeScript'sstructuredCloneand Rust's.clone().- Python
ScannedModule.displayfield position — moved from the middle of the dataclass to the end, preserving positional construction compatibility with pre-0.5.0 callers. - Python
BindingLoaderpolish —load()gainedrecursive: bool = False;read_textforces UTF-8. - TypeScript
BindingLoaderpolish —_parseExamplesusesstructuredClone;fs.statSyncfailures distinguishENOENTfrom othererrnocodes. - Rust
BindingLoaderpolish —read_dirper-entry errors are now surfaced asBindingLoadError::FileRead(previously silently discarded);MissingFields/InvalidStructureDisplayno longer leakSome(...)/Nonedebug wrappers.
Hardening (cross-SDK sync — post-audit)¶
A later cross-SDK sync pass surfaced semantic divergences between the three loaders/writers/scanners. These are fixed in 0.5.0 as well, bringing the shipped SDKs to behavioural parity where the spec now documents it:
BindingLoaderstrict-mode wrong-type rejection (Python, TypeScript) — a required field is now rejected when absent,null, or of the wrong type (e.g.module_id: 42,target: true, empty-stringmodule_id). Previously Python/TypeScript silently coerced wrong-type scalars viastr(value)/String(value), while Rust already rejected them; the same YAML now behaves identically in all three SDKs. The error reason widens from "missing required fields" / "missing or null required fields" to "missing or invalid required fields", matching the Rust loader.BindingLoaderdefensive deep-copy (Python, TypeScript) — Python previously did a shallowdict(raw_input_schema)/list(raw_tags); TypeScript's_asRecordreturned a fresh outer{}but shared nested refs. Both now deep-cloneinput_schema,output_schema, andmetadata(copy.deepcopyin Python,structuredClonein TypeScript). Rust'sValue.clonewas already deep. Caller mutation of a loadedScannedModule.input_schema.properties.id.typeno longer leaks back into the parsed YAML source graph.BaseScanner.deduplicate_idscollision pre-scan (Python) — Python'sdeduplicate_idsnow pre-computes the set of originalmodule_ids and bumps the suffix counter past any collision, matching the TypeScript and Rust algorithms. Input[a, a, a_2]now yields[a, a_3, a_2]instead of the previous buggy[a, a_2, a_2].YAMLWriteratomic writes (Python) — Python now writes each binding file to<name>.<pid>.tmp,fsyncs, thenos.replaces onto the final path, matching the TypeScript (tmp + renameSync) and Rust (tmp + sync_all + rename) writers. A crash mid-write no longer leaves a partial YAML thatBindingLoaderfails to parse. A pre-write check also refuses to overwrite a symlink at the target path.resolve_target.allowed_prefixes(Python) — Python'sresolve_targetnow accepts an optionalallowed_prefixes: list[str] | Noneargument (forwarded fromRegistryWriter.write(..., allowed_prefixes=...)). When set, imports outside the allowlist raisePermissionErrorbeforeimportlib.import_moduleruns. Mitigates arbitrary-code-execution via forged binding files (e.g.target: "os:system"). Parity with the TypeScript SDK'sallowedPrefixesoption, adapted to Python's module-name import model. Rust does not need this becauseresolve_targetis parse-only and theHandlerFactoryis the security boundary.
Documentation¶
flattenParamsremoved from TypeScript docs + README — the Pythonflatten_pydantic_paramscontinues to ship, but TypeScript's advertisedflattenParams(func, zodSchema)was never actually exported and its wrapper semantics are a no-op in TypeScript (native object-argument idiom already flat).docs/features/pydantic.mdis now Python-only with an admonition explaining the TypeScript/Rust rationale.HTTPProxyRegistryWriterdocs corrected — spec strippeddry_run/verify/verifiersfrom thewriteContract (Python and Rust impls do not accept them); availability widened from "Python only" to "Python (always) and Rust (withhttp-proxyCargo feature)".- Cross-SDK async contract for
RegistryWriter.write— spec now documentsasync: falsefor Python/Rust andasync: truefor TypeScript (TypeScript mustawait resolveTargetinternally). run_verifier_chain/runVerifierChain— added a public Contract block indocs/features/output-writers.md(was public in all three SDKs but undocumented).- Binding Loader: Rust safety caps — new "Safety Caps (Rust only)" section documenting the 16 MiB per-file and 10,000 files-per-directory limits. Rust
BindingLoadErrorvariant count corrected from 5 to 7 (addsFileTooLarge,TooManyFiles). ScannedModule.Fields— removed spuriousspec_versionrow (it is a YAML document header stamped byYAMLWriter, not a field on the object); addedsuggested_alias(present in all three SDKs but previously undocumented).filter_modulesContract errors — corrected Python entry: raisesValueError(wrappingre.errorviafrom exc), notre.errordirectly; TypeScriptSyntaxError, Rustregex::Errorunchanged.- Tri-language scope —
docs/scope.mdupdated from "dual-language" (Python + TypeScript) to tri-language parity.docs/getting-started.mdgained a Rust prerequisites + installation tab.docs/index.mdorg URL corrected (aipartnerup→aiperceivable) and Quick Start link redirected togetting-started.md. - Stale TypeScript examples fixed —
docs/features/openapi.md(new ScannedModule→createScannedModule) anddocs/ai-enhancement.md(writer.write(modules, { outputDir })→writer.write(modules, "./bindings")). Staleapcore >= 0.14.0ingetting-started.mdbumped to0.19.0+. - Rust README —
Scannertrait references corrected to the actualBaseScanner<App>(5 replacements in Core Modules table and two examples).
[0.4.0] - 2026-03-23¶
Added¶
DisplayResolver(apcore_toolkit.display) — sparse binding.yaml display overlay (§5.13). Merges per-surface presentation fields (alias, description, guidance, tags, documentation) intoScannedModule.metadata["display"]for downstream CLI/MCP/A2A surfaces.- Resolution chain per field: surface-specific override >
displaydefault > binding-level field > scanner value. resolve(modules, *, binding_path=..., binding_data=...)— accepts pre-parsed dict or a path to a.binding.yamlfile / directory of*.binding.yamlfiles.binding_datatakes precedence overbinding_path.- MCP alias auto-sanitization: replaces characters outside
[a-zA-Z0-9_-]with_; prepends_if result starts with a digit. - MCP alias hard limit: raises
ValueErrorif sanitized alias exceeds 64 characters. - CLI alias validation: warns and falls back to
display.aliaswhen user-explicitly-set alias does not match^[a-z][a-z0-9_-]*$(module_id fallback always accepted without warning). suggested_aliasinScannedModule.metadata(emitted bysimplify_ids=Truescanner) used as fallback when nodisplay.aliasis set.- Match-count logging:
INFOfor match count,WARNINGwhen binding map loaded but zero modules matched. - New feature spec:
docs/features/display-overlay.md
Tests¶
- 30 new tests in
tests/test_display_resolver.pycovering: no-binding fallthrough, alias-only overlay, surface-specific overrides, MCP sanitization, MCP 64-char limit,suggested_aliasfallback, sparse overlay (10 modules / 1 binding), tags resolution,binding_pathfile and directory loading, guidance chain, CLI invalid alias warning and fallback,binding_datavsbinding_pathprecedence.
Added (Convention Module Discovery — §5.14)¶
ConventionScanner— scans acommands/directory of plain Python files for public functions and converts them toScannedModuleinstances with schema inferred from PEP 484 type annotations.- Module ID:
{file_prefix}.{function_name}withMODULE_PREFIXoverride. - Description from first line of docstring (
"(no description)"fallback). input_schema/output_schemainferred from type hints.CLI_GROUPandTAGSmodule-level constants stored in metadata.include/excluderegex filters on module IDs.- New feature spec:
docs/features/convention-scanning.md
Tests (Convention Module Discovery)¶
- 15 new tests in
tests/test_convention_scanner.py.
[0.3.1] - 2026-03-22¶
Changed¶
- Rebrand: aipartnerup → aiperceivable
[0.3.0] - 2026-03-19¶
Added¶
deep_resolve_refs/deepResolveRefsdocumented in OpenAPI Integration page with three-level resolution explanationHTTPProxyRegistryWritersection in Output Writers page with features, installation instructions, and usage example"http-proxy"format inget_writer()factory table with Language columnHTTPProxyRegistryWriterandenrich_schema_descriptionsadded to README Core Modules tablemodules_to_dicts()/modulesToDicts()added to Serialization Utilities table- "Choosing a Writer" table updated with
HTTPProxyRegistryWriterrow
Fixed¶
resolve_schemadescription corrected from "recursively resolves" to "single level only" — the recursive resolver isdeep_resolve_refs- Reference Resolution section rewritten with accurate three-level explanation
- Duplicate
## Reference Resolutionheading removed
[0.2.0] - 2026-03-12¶
Added¶
TypeScriptWriterto Core Modules tables in README and docs index"typescript"format toget_writer()factory example (TypeScript only)documentationandwarningsfields toScannedModuleFields table- Serialization Utilities section (
annotationsToDict,moduleToDict) in Smart Scanning docs - Changelog page for documentation site
Fixed¶
- Updated
WriteResulttable in Output Writers docs with TypeScript naming and type columns - Fixed
ai_guidance→metadata.ai_guidancein AI Enhancement docs - TypeScript examples: replaced
new ScannedModule({...})withcreateScannedModule({...})(ScannedModuleis an interface, not a class) - TypeScript
YAMLWriterandTypeScriptWriterwrite()call signatures corrected fromwrite(modules, { outputDir })towrite(modules, outputDir, options?) filterModulesinclude pattern corrected fromRegExpliteral tostringmatching the actual TypeScript signatureresolveTargetexample now showsawait(the function is async)flattenParamsexample now shows requiredzodSchemasecond argument- OpenAPI import corrected from
"apcore-toolkit/openapi"to"apcore-toolkit"(no sub-path export in TypeScript) - TypeScript Registry import corrected from
"@anthropic/apcore"to"apcore-js" - Broken changelog links fixed (
docs/changelog.md→ rootCHANGELOG.md) docs/features/scanning.md— TypeScript exampleincludeoption type corrected tostring, import updateddocs/index.md— Python-only framing updated; toolkit is dual-language
[0.1.0] - 2026-03-06¶
Initial release. Extracts shared framework-agnostic logic from django-apcore
and flask-apcore into a standalone toolkit package.
Added¶
ScannedModuledataclass — canonical representation of a scanned endpointBaseScannerABC withfilter_modules(),deduplicate_ids(),infer_annotations_from_method(), andextract_docstring()utilitiesYAMLWriter— generates.binding.yamlfiles forapcore.BindingLoaderPythonWriter— generates@module-decorated Python wrapper filesRegistryWriter— registers modules directly intoapcore.Registryto_markdown()— generic dict-to-Markdown conversion with depth control and table heuristicsflatten_pydantic_params()— flattens Pydantic model parameters into scalar kwargs for MCP tool invocationresolve_target()— resolvesmodule.path:qualnametarget stringsenrich_schema_descriptions()— merges docstring parameter descriptions into JSON Schema propertiesannotations_to_dict()/module_to_dict()— serialization utilities- OpenAPI utilities:
resolve_ref(),resolve_schema(),extract_input_schema(),extract_output_schema() - Output format factory via
get_writer() - 150 tests with 94% code coverage
Dependencies¶
- apcore >= 0.9.0
- pydantic >= 2.0
- PyYAML >= 6.0