|
Important
|
STDLIB-04 ("residual This document is the triage: it groups every |
- Counts (live, 2026-05-23)
- Classification (what "real implementation" means per row)
- Per-module triage
effects.affine(14 fn, 0 type) — Built-inio.affine(5 fn, 0 type) — Built-inCrypto.affine(3 fn, 0 type) — Built-inHttp.affine(8 fn, 1 type) — Typed-boundary bridgeNetwork.affine(2 fn, 0 type) — Adapter-side (Deno-ESM)Deno.affine(24 fn, 3 type) — Adapter-side (Deno-ESM)Sqlite.affine(6 fn, 1 type) — Adapter-side (Deno-ESM)Vscode.affine(55 fn, 12 type) — Adapter-side (Node/VS Code)VscodeLanguageClient.affine(4 fn, 2 type) — Adapter-side (Node)Grammy.affine(10 fn, 3 type) — Adapter-side (Deno-ESM)Ajv.affine(4 fn, 2 type) — Adapter-side (Deno-ESM)
- Implementation policy
- Cross-references
- Update protocol
| Module | extern fn |
extern type |
Class |
|---|---|---|---|
|
14 |
0 |
Built-ins (interpreter) |
|
5 |
0 |
Built-ins (interpreter) |
|
3 |
0 |
Built-ins (interpreter) |
|
8 |
1 |
Typed-boundary bridge (ADR-018 / #225 CPS line) |
|
2 |
0 |
Adapter-side (Deno-ESM target) |
|
24 |
3 |
Adapter-side (Deno-ESM target) |
|
6 |
1 |
Adapter-side (Deno-ESM target) |
|
55 |
12 |
Adapter-side ( |
|
4 |
2 |
Adapter-side ( |
|
10 |
3 |
Adapter-side (Deno-ESM target) |
|
4 |
2 |
Adapter-side (Deno-ESM target) |
Total |
135 |
24 |
extern declarations are type-only signatures: they tell the
compiler the shape of a function/type that exists at the host
boundary. "Real implementation" means different things depending on
which boundary the extern rides over. We recognise four classes:
| Class | Definition | "Real impl" criterion |
|---|---|---|
Built-in (interpreter) |
Side-effecting primitive that must be available to interpreter eval
( |
|
Typed-boundary bridge |
Crosses the language boundary with a contract (e.g.
|
Producer-side codegen path + verifier-side type contract |
Adapter-side (Deno-ESM) |
Compiles via the |
Adapter package exists, the symbol is exported, and a
cross-runtime smoke test under |
Adapter-side (Node / VS Code host) |
Compiles via the Node-CJS backend; the emitted |
|
extern fn |
Status | Notes |
|---|---|---|
|
adequate |
Interpreter + WASI preview1 emit. |
|
adequate |
Same. |
|
stub-only |
Interpreter has placeholder; not yet wired through codegen-deno. |
|
adequate |
Interpreter + WASI preview1. |
|
adequate |
Same. |
|
adequate |
Interpreter wires
to |
|
adequate |
|
|
adequate |
Same shape as |
|
partial |
Interpreter only; deno backend re-exports JS native; wasm-core has no string story. |
|
partial |
Same. |
Per-row unblock: not a single PR. read_line for the
non-interpreter targets is the next concrete row; everything else
is "adequate for the current consumer surface".
extern fn |
Status | Notes |
|---|---|---|
|
stub-only |
Interpreter only. |
|
stub-only |
Same. |
|
stub-only |
Same. |
|
stub-only |
Same. |
|
stub-only |
Blocked on INT-03 S5 (native env/argv) for cross-target parity. |
Unblock: INT-03 S5 (native clocks/env/argv) for the WASI path; deno backend can ship adapter coverage independently.
extern fn |
Status | Notes |
|---|---|---|
|
partial |
Interpreter wires |
|
partial |
Same. |
|
partial |
Same; deno + interpreter; INT-03 S4a (WASI clock) covers WASI emit. |
Unblock: noted for completeness; not on the critical path.
Status: DONE — STDLIB-01 closed. See docs/TECH-DEBT.adoc
STDLIB-01: ADR-018 delivery plan complete; Deno-ESM (#226)
typed-wasm CPS line PR1..PR3d (#227/#233/#236/#237/#238/#266) all
merged.
extern fn |
Status | Notes |
|---|---|---|
|
stub-only |
No adapter package; not on a known consumer’s critical path. |
|
stub-only |
Same; gates on Tokio-style async ABI which isn’t designed yet. |
Unblock: lowest-priority class; no consumer requesting it.
Largest non-Vscode adapter. Covers Deno.readFile, Deno.cwd,
Deno.run, file-system primitives, env access, etc.
| Surface area | Status | Notes |
|---|---|---|
Filesystem reads ( |
partial |
|
Filesystem writes ( |
stub-only |
No consumer yet. |
Process ( |
stub-only |
Overlaps with INT-03 S5 (WASI env/argv). |
HTTP server ( |
stub-only |
Overlaps with
|
Unblock: bulk of this should fold into packages/affine-deno
(does not yet exist as a sibling to affine-vscode); creation of
that package is the meta-unblock.
open, prepare, exec, query, close, transaction. All
stub-only. No adapter package. Unblocks when a consumer
(currently none) requests it.
Largest extern surface in the repo. Already has an adapter
(packages/affine-vscode/mod.js) and is load-bearing — issue
#35 Phase 3 (VS Code extension migration from TS to AffineScript)
is shipping against it.
| Surface area | Status | Notes |
|---|---|---|
|
done |
Live in
|
|
partial |
Used by extension.affine; not all 55 surface methods exercised. |
|
partial |
Same. |
|
partial |
Same. |
String marshalling helpers |
done |
Shared handle table. |
Unblock: the unused methods get filled in row-by-row when a consumer needs them; there is no requirement to implement all 55 before #35 Phase 4 (rattlescript-face sweep) closes.
LSP client wrapper. Already adapter-covered; #317 smoke tests it end-to-end. No outstanding rows.
Telegram bot framework adapter. Stub-only; no consumer.
Per the testing standards (docs/standards/TESTING.adoc):
-
Every
externimplementation PR must add at least one smoke test under the matching adapter’s test path (oraffinescript- deno-test/for the Deno-ESM class,editors/vscode/test/for the VS Code class, an interpreter alcotest for the built-in class). -
The
externrow in this document moves fromstub-only/partialtodoneonly when the smoke test lands. -
No PR may stub a new
externwithout recording it here.
-
TECH-DEBT.adoc — STDLIB-04 ledger entry (S3, open).
-
ECOSYSTEM.adoc — INT-01..12 integration roadmap that
externadapters ride on. -
standards/TESTING.adoc — smoke-test requirements per class.
-
packages/affine-vscode/mod.js— the canonical Node/VS-Code-host adapter shape.