@nanobpm/urban 0.56.0 → 0.57.0
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/dist/context/adversarial/index.d.ts +1 -0
- package/dist/context/adversarial/index.js +1 -0
- package/dist/context/binding/index.d.ts +1 -0
- package/dist/context/binding/index.js +1 -0
- package/dist/context/conformance/index.d.ts +1 -0
- package/dist/context/conformance/index.js +1 -0
- package/dist/context/conformance/scaffold.conformance.d.ts +1 -0
- package/dist/context/conformance/scaffold.conformance.js +10 -0
- package/dist/context/git/index.d.ts +1 -0
- package/dist/context/git/index.js +1 -0
- package/dist/context/index.d.ts +6 -0
- package/dist/context/index.js +18 -0
- package/dist/context/pii/index.d.ts +1 -0
- package/dist/context/pii/index.js +1 -0
- package/dist/context/retrieval/index.d.ts +1 -0
- package/dist/context/retrieval/index.js +1 -0
- package/dist/context/schema/index.d.ts +1 -0
- package/dist/context/schema/index.js +1 -0
- package/package.json +32 -1
- package/src/context/README.md +60 -0
- package/src/context/adversarial/index.ts +2 -0
- package/src/context/binding/index.ts +2 -0
- package/src/context/conformance/index.ts +2 -0
- package/src/context/conformance/scaffold.conformance.ts +11 -0
- package/src/context/git/index.ts +2 -0
- package/src/context/index.ts +19 -0
- package/src/context/pii/index.ts +2 -0
- package/src/context/retrieval/index.ts +2 -0
- package/src/context/schema/index.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// SCAFFOLD PLACEHOLDER — always-passing conformance case so `test:conformance`
|
|
2
|
+
// is GREEN on the empty scaffold. Slice S2 (schema) REPLACES this file with the
|
|
3
|
+
// real conformance corpus/tests under src/context/conformance/**/*.conformance.ts.
|
|
4
|
+
// S2 must NOT edit packages/urban/package.json (the test:conformance script is
|
|
5
|
+
// already pre-declared here by the scaffold).
|
|
6
|
+
import { test } from "node:test";
|
|
7
|
+
import assert from "node:assert/strict";
|
|
8
|
+
test("scaffold conformance placeholder — replaced by slice S2", () => {
|
|
9
|
+
assert.equal(true, true);
|
|
10
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @nanobpm/urban/context — the Urban context layer (epic #303).
|
|
2
|
+
//
|
|
3
|
+
// This is the SCAFFOLD-OWNED top barrel. It re-exports the public surface of
|
|
4
|
+
// each slice subdirectory so consumers can `import { … } from
|
|
5
|
+
// "@nanobpm/urban/context"`. Every slice owns exactly ONE subdirectory and
|
|
6
|
+
// replaces only its own `index.ts`; nobody but the scaffold task edits this
|
|
7
|
+
// file or packages/urban/package.json. See ./README.md for the seam contract.
|
|
8
|
+
//
|
|
9
|
+
// While the scaffold is empty every subdir barrel is `export {};`, so this
|
|
10
|
+
// aggregate typechecks and builds cleanly. Slice barrels are re-exported here
|
|
11
|
+
// as they land; the adversarial slice (S7) is test-only and is intentionally
|
|
12
|
+
// NOT part of the published surface.
|
|
13
|
+
export * from "./binding/index.js";
|
|
14
|
+
export * from "./schema/index.js";
|
|
15
|
+
export * from "./pii/index.js";
|
|
16
|
+
export * from "./git/index.js";
|
|
17
|
+
export * from "./retrieval/index.js";
|
|
18
|
+
export * from "./conformance/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanobpm/urban",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"description": "Urban: build and run code-first apps on Nano — runtime, derivation toolkit, and CLI in one. Author durable processes with @nanobpm/workflow (defineFlow), a typed datasource, forms, triggers and surfaces from a nano.app.json manifest, on Node or Deno.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -51,6 +51,35 @@
|
|
|
51
51
|
"types": "./dist/effect/index.d.ts",
|
|
52
52
|
"default": "./dist/effect/index.js"
|
|
53
53
|
},
|
|
54
|
+
"./context": {
|
|
55
|
+
"types": "./dist/context/index.d.ts",
|
|
56
|
+
"default": "./dist/context/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./context/binding": {
|
|
59
|
+
"types": "./dist/context/binding/index.d.ts",
|
|
60
|
+
"default": "./dist/context/binding/index.js"
|
|
61
|
+
},
|
|
62
|
+
"./context/schema": {
|
|
63
|
+
"types": "./dist/context/schema/index.d.ts",
|
|
64
|
+
"default": "./dist/context/schema/index.js"
|
|
65
|
+
},
|
|
66
|
+
"./context/pii": {
|
|
67
|
+
"types": "./dist/context/pii/index.d.ts",
|
|
68
|
+
"default": "./dist/context/pii/index.js"
|
|
69
|
+
},
|
|
70
|
+
"./context/git": {
|
|
71
|
+
"types": "./dist/context/git/index.d.ts",
|
|
72
|
+
"default": "./dist/context/git/index.js"
|
|
73
|
+
},
|
|
74
|
+
"./context/retrieval": {
|
|
75
|
+
"types": "./dist/context/retrieval/index.d.ts",
|
|
76
|
+
"default": "./dist/context/retrieval/index.js"
|
|
77
|
+
},
|
|
78
|
+
"./context/conformance": {
|
|
79
|
+
"types": "./dist/context/conformance/index.d.ts",
|
|
80
|
+
"default": "./dist/context/conformance/index.js"
|
|
81
|
+
},
|
|
82
|
+
"./context/source": "./src/context/index.ts",
|
|
54
83
|
"./source": "./src/index.ts"
|
|
55
84
|
},
|
|
56
85
|
"files": [
|
|
@@ -65,6 +94,8 @@
|
|
|
65
94
|
"gen:runtime": "node scripts/gen-runtime.mjs",
|
|
66
95
|
"check:runtime": "node scripts/gen-runtime.mjs --check",
|
|
67
96
|
"test": "node --test --experimental-strip-types \"src/**/*.test.ts\"",
|
|
97
|
+
"test:conformance": "node --test --experimental-strip-types \"src/context/conformance/**/*.conformance.ts\"",
|
|
98
|
+
"check:pii": "node --experimental-strip-types scripts/check-pii.ts",
|
|
68
99
|
"test:deno": "deno test -A --no-check src/"
|
|
69
100
|
},
|
|
70
101
|
"dependencies": {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# `@nanobpm/urban/context` — the Urban context layer (epic #303)
|
|
2
|
+
|
|
3
|
+
This directory is the **producer** side of the Urban context layer: a git-backed,
|
|
4
|
+
governed memory substrate for Nano apps. It is published from `@nanobpm/urban`
|
|
5
|
+
under the `./context/*` subpaths and is the contract that the consumer repo
|
|
6
|
+
(`nanobpm/nano-workforce#291`) builds against.
|
|
7
|
+
|
|
8
|
+
The layer is delivered as a set of parallel **slices**, each landed by its own
|
|
9
|
+
agent. This README documents the **seam** that lets those slices land in
|
|
10
|
+
parallel without colliding.
|
|
11
|
+
|
|
12
|
+
## What `@nanobpm/urban/context` publishes
|
|
13
|
+
|
|
14
|
+
| Subpath | Slice | Surface |
|
|
15
|
+
| -------------------------------- | --------------- | ------- |
|
|
16
|
+
| `@nanobpm/urban/context` | scaffold barrel | Aggregate of every slice below |
|
|
17
|
+
| `@nanobpm/urban/context/binding` | S1 | Bindable `context` resource + binding descriptor |
|
|
18
|
+
| `@nanobpm/urban/context/schema` | S2 | Memory-record schema + provenance/mode model |
|
|
19
|
+
| `@nanobpm/urban/context/pii` | S6 | PII classifier + mandatory pre-commit guard |
|
|
20
|
+
| `@nanobpm/urban/context/git` | S3 | Git substrate + PR-governance + path partitioning |
|
|
21
|
+
| `@nanobpm/urban/context/retrieval` | S4 | Retrieval (structured / frontmatter / text) |
|
|
22
|
+
| `@nanobpm/urban/context/conformance` | S2 | Conformance corpus + reusable runner (imported by S7 and the consumer) |
|
|
23
|
+
| `@nanobpm/urban/context/source` | — | Raw TypeScript entry (mirrors the package's `./source`) |
|
|
24
|
+
|
|
25
|
+
The adversarial slice (S7) lives in `./adversarial/` and is **test-only** — it is
|
|
26
|
+
not part of the published surface and is intentionally excluded from the top
|
|
27
|
+
barrel.
|
|
28
|
+
|
|
29
|
+
## The seam — rules every slice MUST follow
|
|
30
|
+
|
|
31
|
+
1. **Each slice owns exactly one subdirectory.** A slice replaces only files
|
|
32
|
+
inside its own directory (its placeholder `index.ts` becomes its real
|
|
33
|
+
barrel). It never edits a sibling's directory.
|
|
34
|
+
|
|
35
|
+
2. **Only the scaffold task edits the shared surface.** `packages/urban/package.json`
|
|
36
|
+
(the `exports` map **and** the `scripts` block) and this directory's top
|
|
37
|
+
barrel `index.ts` are **scaffold-owned**. No sibling slice may edit either —
|
|
38
|
+
everything a slice needs (its subpath export, and the two shared scripts) is
|
|
39
|
+
**pre-declared** here already.
|
|
40
|
+
|
|
41
|
+
3. **Fill the pre-declared subpaths and scripts.** The `exports` map already
|
|
42
|
+
lists every `./context/*` subpath (including `./context/conformance`), and the
|
|
43
|
+
`scripts` block already declares:
|
|
44
|
+
- `test:conformance` → runs `src/context/conformance/**/*.conformance.ts`.
|
|
45
|
+
**Slice S2 replaces** the placeholder `conformance/scaffold.conformance.ts`
|
|
46
|
+
with the real corpus/tests. S2 must not touch `package.json`.
|
|
47
|
+
- `check:pii` → runs `scripts/check-pii.ts`. **Slice s6-pii-ci replaces** the
|
|
48
|
+
no-op `scripts/check-pii.ts` placeholder with real layout-aware
|
|
49
|
+
classification. It must not touch `package.json`.
|
|
50
|
+
|
|
51
|
+
## Build / test wiring
|
|
52
|
+
|
|
53
|
+
- Context code lives under `src/`, which `tsconfig.build.json` already globs, so
|
|
54
|
+
the new files build with no compiler-config change.
|
|
55
|
+
- Context code is **server-side only** and is deliberately **not** added to
|
|
56
|
+
`tsconfig.browser.json`.
|
|
57
|
+
- `npm run test --workspace @nanobpm/urban` runs `src/**/*.test.ts`.
|
|
58
|
+
- `npm run test:conformance --workspace @nanobpm/urban` runs the conformance
|
|
59
|
+
corpus.
|
|
60
|
+
- `npm run check:pii --workspace @nanobpm/urban` runs the PII gate.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// SCAFFOLD PLACEHOLDER — always-passing conformance case so `test:conformance`
|
|
2
|
+
// is GREEN on the empty scaffold. Slice S2 (schema) REPLACES this file with the
|
|
3
|
+
// real conformance corpus/tests under src/context/conformance/**/*.conformance.ts.
|
|
4
|
+
// S2 must NOT edit packages/urban/package.json (the test:conformance script is
|
|
5
|
+
// already pre-declared here by the scaffold).
|
|
6
|
+
import { test } from "node:test";
|
|
7
|
+
import assert from "node:assert/strict";
|
|
8
|
+
|
|
9
|
+
test("scaffold conformance placeholder — replaced by slice S2", () => {
|
|
10
|
+
assert.equal(true, true);
|
|
11
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// @nanobpm/urban/context — the Urban context layer (epic #303).
|
|
2
|
+
//
|
|
3
|
+
// This is the SCAFFOLD-OWNED top barrel. It re-exports the public surface of
|
|
4
|
+
// each slice subdirectory so consumers can `import { … } from
|
|
5
|
+
// "@nanobpm/urban/context"`. Every slice owns exactly ONE subdirectory and
|
|
6
|
+
// replaces only its own `index.ts`; nobody but the scaffold task edits this
|
|
7
|
+
// file or packages/urban/package.json. See ./README.md for the seam contract.
|
|
8
|
+
//
|
|
9
|
+
// While the scaffold is empty every subdir barrel is `export {};`, so this
|
|
10
|
+
// aggregate typechecks and builds cleanly. Slice barrels are re-exported here
|
|
11
|
+
// as they land; the adversarial slice (S7) is test-only and is intentionally
|
|
12
|
+
// NOT part of the published surface.
|
|
13
|
+
|
|
14
|
+
export * from "./binding/index.ts";
|
|
15
|
+
export * from "./schema/index.ts";
|
|
16
|
+
export * from "./pii/index.ts";
|
|
17
|
+
export * from "./git/index.ts";
|
|
18
|
+
export * from "./retrieval/index.ts";
|
|
19
|
+
export * from "./conformance/index.ts";
|