mythik 0.1.5 → 0.2.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/README.md +68 -32
- package/dist/actions/transaction-engine.d.ts +10 -0
- package/dist/actions/transaction-engine.d.ts.map +1 -1
- package/dist/actions/transaction-engine.js +13 -1
- package/dist/actions/transaction-engine.js.map +1 -1
- package/dist/agent-context/inventory.d.ts +62 -0
- package/dist/agent-context/inventory.d.ts.map +1 -0
- package/dist/agent-context/inventory.js +248 -0
- package/dist/agent-context/inventory.js.map +1 -0
- package/dist/data/data-sources.d.ts +12 -0
- package/dist/data/data-sources.d.ts.map +1 -1
- package/dist/data/data-sources.js +13 -0
- package/dist/data/data-sources.js.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/reveal/context.d.ts +22 -0
- package/dist/reveal/context.d.ts.map +1 -0
- package/dist/reveal/context.js +159 -0
- package/dist/reveal/context.js.map +1 -0
- package/dist/reveal/index.d.ts +7 -0
- package/dist/reveal/index.d.ts.map +1 -0
- package/dist/reveal/index.js +7 -0
- package/dist/reveal/index.js.map +1 -0
- package/dist/reveal/protocol.d.ts +28 -0
- package/dist/reveal/protocol.d.ts.map +1 -0
- package/dist/reveal/protocol.js +2 -0
- package/dist/reveal/protocol.js.map +1 -0
- package/dist/reveal/recorder.d.ts +20 -0
- package/dist/reveal/recorder.d.ts.map +1 -0
- package/dist/reveal/recorder.js +31 -0
- package/dist/reveal/recorder.js.map +1 -0
- package/dist/reveal/redaction.d.ts +12 -0
- package/dist/reveal/redaction.d.ts.map +1 -0
- package/dist/reveal/redaction.js +85 -0
- package/dist/reveal/redaction.js.map +1 -0
- package/dist/reveal/truncation.d.ts +4 -0
- package/dist/reveal/truncation.d.ts.map +1 -0
- package/dist/reveal/truncation.js +48 -0
- package/dist/reveal/truncation.js.map +1 -0
- package/dist/reveal/types.d.ts +104 -0
- package/dist/reveal/types.d.ts.map +1 -0
- package/dist/reveal/types.js +2 -0
- package/dist/reveal/types.js.map +1 -0
- package/dist/runtime/mount-spec-runtime.d.ts +5 -0
- package/dist/runtime/mount-spec-runtime.d.ts.map +1 -1
- package/dist/runtime/mount-spec-runtime.js +1 -0
- package/dist/runtime/mount-spec-runtime.js.map +1 -1
- package/docs/consumer/README.md +11 -0
- package/docs/consumer/WHERE-TO-LOOK.md +1 -1
- package/docs/consumer/ai-context-runtime-semantics.md +14 -11
- package/docs/consumer/ai-context.md +85 -18
- package/docs/consumer/reference-doc.md +131 -34
- package/docs/llms.txt +6 -1
- package/docs/wiki/compiled/README.md +13 -11
- package/docs/wiki/compiled/_gaps.md +1 -1
- package/docs/wiki/compiled/_index.md +11 -7
- package/docs/wiki/compiled/_inventory.md +22 -14
- package/docs/wiki/compiled/_lint.md +21 -17
- package/docs/wiki/compiled/antipattern-store-save-bypass.md +13 -8
- package/docs/wiki/compiled/cli-agent.md +70 -0
- package/docs/wiki/compiled/cli-existing-spec-edit-loop.md +9 -8
- package/docs/wiki/compiled/cli-overview.md +12 -7
- package/docs/wiki/compiled/cli-patch.md +14 -11
- package/docs/wiki/compiled/cli-programmatic-api.md +17 -7
- package/docs/wiki/compiled/cli-push.md +36 -24
- package/docs/wiki/compiled/cli-reveal.md +64 -0
- package/docs/wiki/compiled/cli-toon.md +9 -9
- package/docs/wiki/compiled/cli-versioning-author.md +19 -15
- package/docs/wiki/compiled/concept-agent-context-protocol.md +76 -0
- package/docs/wiki/compiled/concept-mythik-reveal.md +63 -0
- package/docs/wiki/compiled/concept-package-layout.md +7 -6
- package/docs/wiki/compiled/concept-public-package-names.md +9 -5
- package/docs/wiki/compiled/concept-shape-animations.md +4 -2
- package/docs/wiki/compiled/concept-spec-store-interface.md +7 -4
- package/docs/wiki/compiled/concept-spec-store-layering.md +5 -5
- package/docs/wiki/compiled/concept-versioned-store.md +8 -5
- package/docs/wiki/compiled/pattern-git-vs-db-versioning.md +8 -6
- package/docs/wiki/compiled/pattern-push-vs-patch.md +13 -12
- package/package.json +1 -1
|
@@ -13,10 +13,11 @@ Mythik publishes unscoped npm packages. Do not generate scoped package imports f
|
|
|
13
13
|
|---|---|
|
|
14
14
|
| `mythik` | Browser-safe core runtime, state, expressions, validation, browser-safe stores |
|
|
15
15
|
| `mythik/server` | Node-only stores, SQL drivers, and SQL DDL helpers exported from the core package subpath |
|
|
16
|
-
| `mythik-react` | React host, renderer, and web primitives |
|
|
17
|
-
| `mythik-
|
|
18
|
-
| `mythik-cli
|
|
19
|
-
| `mythik-
|
|
16
|
+
| `mythik-react` | React host, renderer, and web primitives |
|
|
17
|
+
| `mythik-react-native` | React Native and Expo renderer, public preview, with an explicit primitive support matrix |
|
|
18
|
+
| `mythik-cli` | CLI package; installs the `mythik` binary |
|
|
19
|
+
| `mythik-cli/api` | Programmatic CLI API: `runPush`, `runPatch`, `runLint`, and related types |
|
|
20
|
+
| `mythik-server` | Express server runtime for ApiSpecs |
|
|
20
21
|
|
|
21
22
|
The `mythik` package also ships the AI documentation under `node_modules/mythik/docs`.
|
|
22
23
|
Use [[@cli-docs]] to locate or copy it after install.
|
|
@@ -28,7 +29,10 @@ npm install mythik mythik-react
|
|
|
28
29
|
npm install -D mythik-cli
|
|
29
30
|
```
|
|
30
31
|
|
|
31
|
-
Add `mythik-server` only when building a Mythik-backed Node server.
|
|
32
|
+
Add `mythik-server` only when building a Mythik-backed Node server.
|
|
33
|
+
For React Native and Expo, install `mythik mythik-react-native`; Expo
|
|
34
|
+
apps should install native peer packages with `npx expo install ...`
|
|
35
|
+
so Expo selects versions compatible with the app SDK.
|
|
32
36
|
|
|
33
37
|
SQL adapters (`mssql`, `pg`, `mysql2`, `better-sqlite3`) are optional peer dependencies. Install only the selected database adapter:
|
|
34
38
|
|
|
@@ -29,8 +29,10 @@ useShapeAnimations(ref, animations, options)
|
|
|
29
29
|
|
|
30
30
|
## RN variant
|
|
31
31
|
|
|
32
|
-
`packages/react-native/src/animation/useShapeAnimations.ts` —
|
|
33
|
-
|
|
32
|
+
`packages/react-native/src/animation/useShapeAnimations.ts` — internal
|
|
33
|
+
implementation used by the public-preview native blob/background renderer.
|
|
34
|
+
It is not exported from the `mythik-react-native` package root as a standalone
|
|
35
|
+
public hook.
|
|
34
36
|
|
|
35
37
|
```ts
|
|
36
38
|
useShapeAnimations(animations, options) → { animatedProps }
|
|
@@ -32,10 +32,13 @@ readers without breaking the consumer adapter contract.**
|
|
|
32
32
|
|
|
33
33
|
## Approved consumer paths (3 forms)
|
|
34
34
|
|
|
35
|
-
Never call `SpecStore.save()` from app code. Use:
|
|
36
|
-
- **Shell**: `mythik push <id> --from-file spec.json`
|
|
37
|
-
- **Bulk**: `mythik push --from-dir <folder>`
|
|
38
|
-
- **Programmatic**: `runPush` / `runPatch` from `mythik-cli/api`
|
|
35
|
+
Never call `SpecStore.save()` from app code. Use:
|
|
36
|
+
- **Shell**: `mythik push <id> --from-file spec.json --author <agent>` or `mythik patch <id> --from-file patch.json --author <agent>`
|
|
37
|
+
- **Bulk**: `mythik push --from-dir <folder> --author <agent>`
|
|
38
|
+
- **Programmatic**: `runPush` / `runPatch` from `mythik-cli/api` with `author`
|
|
39
|
+
|
|
40
|
+
Existing full-spec replacement requires explicit `--replace`. Intentionally
|
|
41
|
+
unversioned stores require explicit `--allow-unversioned`.
|
|
39
42
|
|
|
40
43
|
See [[@cli-push]] + [[@antipattern-store-save-bypass]].
|
|
41
44
|
|
|
@@ -18,14 +18,14 @@ Understanding the layering prevents bypassing validation.
|
|
|
18
18
|
| `store.saveVersion(id, doc, meta)` | **NO** | Versioned write. Writes to `screen_versions` and updates the current spec. |
|
|
19
19
|
| `SpecEngine.patch(id, patches)` | **YES** | Applies RFC-6902 patches, validates through the document handler, and persists the patched document through `store.save`. |
|
|
20
20
|
| `mythik push` / `runPush` | **YES** | Validates and writes through `saveVersion` when a versioned store + author are used. |
|
|
21
|
-
| `mythik patch` / `runPatch` | **YES** | Uses `SpecEngine.patch` for patch application + validation.
|
|
21
|
+
| `mythik patch` / `runPatch` | **YES** | Uses `SpecEngine.patch` for patch application + validation. With a versioned store + author, captures the patched document and writes once through `saveVersion`. Without author, persisted writes are rejected unless `--allow-unversioned` is explicit. |
|
|
22
22
|
|
|
23
23
|
## Consumer rule
|
|
24
24
|
|
|
25
|
-
**Never call `store.save()` from application code.** Use:
|
|
26
|
-
|
|
27
|
-
- `mythik push <id>` / `mythik patch <id> --from-file patch.json
|
|
28
|
-
- `runPush` / `runPatch` from `mythik-cli/api` for programmatic work.
|
|
25
|
+
**Never call `store.save()` from application code.** Use:
|
|
26
|
+
|
|
27
|
+
- `mythik push <id> --from-file spec.json --author <agent>` / `mythik patch <id> --from-file patch.json --author <agent>` for shell work.
|
|
28
|
+
- `runPush` / `runPatch` from `mythik-cli/api` with `author` for programmatic work.
|
|
29
29
|
|
|
30
30
|
See [[@antipattern-store-save-bypass]] and [[@cli-lint]].
|
|
31
31
|
|
|
@@ -21,9 +21,11 @@ currentVersion(id): Promise<number>
|
|
|
21
21
|
|
|
22
22
|
## Activation
|
|
23
23
|
|
|
24
|
-
`mythik push --author <name>` and `mythik patch --author <name>` activate
|
|
25
|
-
versioning automatically
|
|
26
|
-
|
|
24
|
+
`mythik push --author <name>` and `mythik patch --author <name>` activate
|
|
25
|
+
versioning automatically when the resolved store supports
|
|
26
|
+
`saveVersion`. Without `--author`, persisted writes are rejected unless
|
|
27
|
+
`--allow-unversioned` is explicit. Existing full-spec replacement
|
|
28
|
+
requires `--replace`.
|
|
27
29
|
|
|
28
30
|
## Snapshots + patch chain
|
|
29
31
|
|
|
@@ -57,8 +59,9 @@ See `concept-customize-versioned-store.md` for the recipe.
|
|
|
57
59
|
- [[@cli-versioning-author]]
|
|
58
60
|
- [[@cli-history]]
|
|
59
61
|
- [[@concept-rollback]]
|
|
60
|
-
- [[@concept-environment-store]]
|
|
61
|
-
- [[@concept-customize-versioned-store]]
|
|
62
|
+
- [[@concept-environment-store]]
|
|
63
|
+
- [[@concept-customize-versioned-store]]
|
|
64
|
+
- [[@concept-agent-context-protocol]]
|
|
62
65
|
|
|
63
66
|
## Sources (raw)
|
|
64
67
|
|
|
@@ -9,12 +9,14 @@ sources: [docs/consumer/ai-context-runtime-semantics.md#62-git-backed-vs-db-vers
|
|
|
9
9
|
|
|
10
10
|
Two history models — pick one per project.
|
|
11
11
|
|
|
12
|
-
## Git-backed history
|
|
13
|
-
|
|
14
|
-
- Specs in repo, `git log` + `git blame` serve as audit trail.
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
## Git-backed history
|
|
13
|
+
|
|
14
|
+
- Specs in repo, `git log` + `git blame` serve as audit trail.
|
|
15
|
+
- Persisted CLI writes must still be explicit: use `--author <name>`
|
|
16
|
+
when the resolved store supports versioning, or `--allow-unversioned`
|
|
17
|
+
only when the project intentionally uses a non-versioned store.
|
|
18
|
+
- CLI writes via `store.save` only on the explicit unversioned path.
|
|
19
|
+
- **Best for**: single-env apps, dev-loop iteration, specs-as-code.
|
|
18
20
|
|
|
19
21
|
## DB-versioned history
|
|
20
22
|
|
|
@@ -10,18 +10,19 @@ sources: [docs/consumer/ai-context-runtime-semantics.md#61-push-vs-patch--file-f
|
|
|
10
10
|
Two paradigms for modifying specs. Pick one per project; mixing creates
|
|
11
11
|
issues.
|
|
12
12
|
|
|
13
|
-
## Push paradigm (file-first)
|
|
14
|
-
|
|
15
|
-
- Specs live in git under `specs/*.json`.
|
|
16
|
-
- Modify locally, then run `mythik push <id>`.
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
13
|
+
## Push paradigm (file-first)
|
|
14
|
+
|
|
15
|
+
- Specs live in git under `specs/*.json`.
|
|
16
|
+
- Modify locally, lint, then run `mythik push <id> --from-file spec.json --author <agent>`.
|
|
17
|
+
- Existing persisted specs require explicit `--replace` for full replacement.
|
|
18
|
+
- Diff-reviewable in CI through normal JSON file diffs.
|
|
19
|
+
- Full-spec bandwidth cost per write.
|
|
20
|
+
|
|
21
|
+
## Patch paradigm (DB-first)
|
|
22
|
+
|
|
23
|
+
- Specs live in the DB; local files are optional working snapshots.
|
|
24
|
+
- Modify via `mythik patch <id> --from-file patch.json --author <agent>` for shell-safe
|
|
25
|
+
surgical writes.
|
|
25
26
|
- Requires `mythik pull <id>` to refresh any local `specs/*.json` snapshot
|
|
26
27
|
after a DB patch.
|
|
27
28
|
|
package/package.json
CHANGED