space-data-module-sdk 0.5.21 → 0.5.22
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/package.json +1 -1
- package/src/AGENTS.md +9 -10
- package/src/auth/AGENTS.md +6 -9
- package/src/bundle/AGENTS.md +8 -12
- package/src/compiler/AGENTS.md +14 -12
- package/src/compliance/AGENTS.md +9 -11
- package/src/host/AGENTS.md +13 -14
- package/src/manifest/AGENTS.md +6 -9
- package/src/runtime-host/AGENTS.md +12 -10
- package/src/testing/AGENTS.md +12 -11
package/package.json
CHANGED
package/src/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# AGENTS
|
|
2
2
|
|
|
3
|
-
Apply the root `AGENTS.md` first. This file
|
|
4
|
-
|
|
3
|
+
Apply the root `AGENTS.md` first. This file is a map for module authors reading
|
|
4
|
+
the SDK source, not a prompt to edit SDK internals by default.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Use `src/` As A Reference Map
|
|
7
7
|
|
|
8
8
|
- `src/manifest`, `src/compliance`, `src/standards`: manifest shape, type refs,
|
|
9
9
|
standards validation, and compliance warnings/errors.
|
|
@@ -23,11 +23,10 @@ subsystem.
|
|
|
23
23
|
- `src/generated`: generated code. Do not hand-edit unless regeneration is part
|
|
24
24
|
of the task and you update the generation path or fixtures as needed.
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## Author Rules
|
|
27
27
|
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
repo-level verification set in `test/AGENTS.md`.
|
|
28
|
+
- Prefer public APIs and examples over editing `src/*`.
|
|
29
|
+
- Read the nearest child `AGENTS.md` to understand which source files define the
|
|
30
|
+
contract you are using.
|
|
31
|
+
- Only edit internals here when the task explicitly says to change the SDK
|
|
32
|
+
standard for everyone.
|
package/src/auth/AGENTS.md
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# AGENTS
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
This directory is the reference implementation for deployment authorization and
|
|
4
|
+
signing helpers used by compliant module distribution.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## What Authors Should Use It For
|
|
7
7
|
|
|
8
8
|
- Keep signing and authorization flows deterministic and explicit.
|
|
9
9
|
- Do not invent app-local signature records when a repo-level contract belongs
|
|
10
10
|
here.
|
|
11
|
-
- When auth changes affect transport or deployment plans, update the related
|
|
12
|
-
surfaces together rather than splitting incompatible changes across repos.
|
|
13
11
|
|
|
14
12
|
## Related Surfaces
|
|
15
13
|
|
|
@@ -18,8 +16,7 @@ and related record handling used by module distribution.
|
|
|
18
16
|
- `test/transport-records.test.js`
|
|
19
17
|
- `test/deployment-plan.test.js`
|
|
20
18
|
|
|
21
|
-
##
|
|
19
|
+
## Note
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- `node --test test/transport-records.test.js test/deployment-plan.test.js`
|
|
21
|
+
Use the exported helpers here rather than inventing your own signing records.
|
|
22
|
+
Only edit this directory when you are intentionally changing the auth contract.
|
package/src/bundle/AGENTS.md
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
# AGENTS
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
packaging
|
|
3
|
+
This directory is the reference implementation for `sds.bundle` and wasm
|
|
4
|
+
custom-section packaging.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## What Authors Should Use It For
|
|
7
7
|
|
|
8
8
|
- `sds.bundle` is the single-file delivery format.
|
|
9
9
|
- Put bundle data in a wasm custom section; do not append raw bytes after the
|
|
10
10
|
wasm binary.
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
- If the bundle contract changes, regenerate vectors and update the bundle docs
|
|
14
|
-
and demos in the same change.
|
|
11
|
+
- Use the public bundle helpers and CLI from this repo rather than inventing a
|
|
12
|
+
custom one-file format.
|
|
15
13
|
|
|
16
|
-
##
|
|
14
|
+
## Note
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- `node --test test/module-bundle.test.js test/module-bundle-vectors.test.js test/module-bundle-cli.test.js test/module-bundle-go.test.js test/module-bundle-python.test.js`
|
|
21
|
-
- `npm run generate:vectors` when vectors or the contract changed
|
|
16
|
+
Only edit this directory when you are intentionally changing bundle behavior for
|
|
17
|
+
all consumers.
|
package/src/compiler/AGENTS.md
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
# AGENTS
|
|
2
2
|
|
|
3
|
-
Apply the root and `src/AGENTS.md` files first.
|
|
3
|
+
Apply the root and `src/AGENTS.md` files first. This directory tells module
|
|
4
|
+
authors how the compiler behaves.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## What Authors Should Take From This Directory
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
- `compileModuleFromSource(...)` and the CLI are the canonical ways to produce a
|
|
9
|
+
compliant artifact.
|
|
10
|
+
- Manifest embedding and required exports are generated together with the wasm
|
|
11
|
+
bytes.
|
|
12
|
+
- Shared browser/WasmEdge artifacts should land at
|
|
13
|
+
`dist/isomorphic/module.wasm`.
|
|
9
14
|
|
|
10
|
-
## Compiler Rules
|
|
15
|
+
## Compiler Rules Authors Should Follow
|
|
11
16
|
|
|
12
17
|
- Preserve the canonical manifest accessor exports and validate them together
|
|
13
18
|
with compiled wasm.
|
|
@@ -18,18 +23,15 @@ target inference, toolchain integration, and canonical artifact layout.
|
|
|
18
23
|
imports.
|
|
19
24
|
- Prefer repo-local Emscripten or `sdn-emception`. Do not assume Homebrew
|
|
20
25
|
toolchains.
|
|
21
|
-
- If you change runtime-target inference, keep the browser/WasmEdge shared path
|
|
22
|
-
on the standalone profile unless the docs and tests are updated deliberately.
|
|
23
26
|
|
|
24
|
-
## Key Files
|
|
27
|
+
## Key Files To Read
|
|
25
28
|
|
|
26
29
|
- `compileModule.js`
|
|
27
30
|
- `compileModuleFromSource.js`
|
|
28
31
|
- `emception*.js`
|
|
29
32
|
- `invokeGlue.js`
|
|
30
33
|
|
|
31
|
-
##
|
|
34
|
+
## Note
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- `node --test test/compiler-emception-subpath-export.test.js`
|
|
36
|
+
Do not edit compiler internals just to build one module. Only change this
|
|
37
|
+
directory when you are intentionally changing the repo-wide compile contract.
|
package/src/compliance/AGENTS.md
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
# AGENTS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This directory is the reference policy for what counts as a compliant module or
|
|
4
4
|
artifact.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## What Authors Should Use It For
|
|
7
7
|
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
describe the broader contract accurately.
|
|
8
|
+
- Use the CLI and public validation helpers to understand whether a manifest or
|
|
9
|
+
artifact is compliant.
|
|
10
|
+
- Read this directory when you need to know why a module was rejected.
|
|
11
|
+
- Prefer fixing your module manifest or build output before changing policy here.
|
|
13
12
|
|
|
14
|
-
##
|
|
13
|
+
## Note
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- `node --test test/module-sdk.test.js test/compliance.test.js`
|
|
15
|
+
Only edit this directory when you are intentionally changing the compliance
|
|
16
|
+
standard for all module authors.
|
package/src/host/AGENTS.md
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
# AGENTS
|
|
2
2
|
|
|
3
|
-
Apply the root and `src/AGENTS.md` files first.
|
|
3
|
+
Apply the root and `src/AGENTS.md` files first. This directory explains the
|
|
4
|
+
host/runtime boundary that compliant modules can rely on.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## What Authors Should Take From This Directory
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
- The portable shared path is standalone WASI, optionally plus `sdn_host`.
|
|
9
|
+
- Browser helpers here are host-side shims and harnesses, not proof that raw
|
|
10
|
+
WasmEdge-native guest imports are browser-portable.
|
|
11
|
+
- The isomorphic loader and browser harness show how the same artifact is meant
|
|
12
|
+
to run in both places.
|
|
10
13
|
|
|
11
|
-
## Host Rules
|
|
14
|
+
## Host Rules Authors Should Follow
|
|
12
15
|
|
|
13
16
|
- Shared browser/WasmEdge artifacts must stay within standalone WASI plus the
|
|
14
17
|
optional `sdn_host` bridge. Raw WasmEdge-native extension imports are not
|
|
@@ -20,7 +23,7 @@ isomorphic loader path.
|
|
|
20
23
|
- Scope host capabilities tightly: filesystem roots, network allowlists, TLS,
|
|
21
24
|
exec, timers, and crypto should stay explicit.
|
|
22
25
|
|
|
23
|
-
## Key Files
|
|
26
|
+
## Key Files To Read
|
|
24
27
|
|
|
25
28
|
- `abi.js`
|
|
26
29
|
- `browserEdgeShims.js`
|
|
@@ -29,11 +32,7 @@ isomorphic loader path.
|
|
|
29
32
|
- `nodeHost.js`
|
|
30
33
|
- `wasiShim.js`
|
|
31
34
|
|
|
32
|
-
##
|
|
35
|
+
## Note
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- `node --test test/process-invoke.test.js`
|
|
37
|
-
- `node --test test/wasmedge-runner-build.test.js`
|
|
38
|
-
- `node --test test/wasmedge-runner-runtime.test.js` when WasmEdge behavior is
|
|
39
|
-
part of the change
|
|
37
|
+
Prefer using the exported host and harness surfaces rather than editing these
|
|
38
|
+
files unless the task is explicitly to change the SDK host contract.
|
package/src/manifest/AGENTS.md
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
# AGENTS
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
normalization
|
|
3
|
+
This directory is the reference implementation for manifest encoding,
|
|
4
|
+
normalization, and round-trip behavior.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## What Authors Should Use It For
|
|
7
7
|
|
|
8
8
|
- Keep manifest encode/decode round-trips stable.
|
|
9
9
|
- Prefer canonical SDS schema names and file identifiers; do not add repo-local
|
|
10
10
|
aliases when a standards name already exists.
|
|
11
|
-
- If you change a manifest field or normalization rule, update the compiler,
|
|
12
|
-
compliance checks, and any affected examples/tests together.
|
|
13
11
|
|
|
14
|
-
##
|
|
12
|
+
## Note
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- `node --test test/module-sdk.test.js test/compliance.test.js`
|
|
14
|
+
Use the public manifest helpers from this repo to build manifests. Only edit
|
|
15
|
+
this directory when you are intentionally changing the manifest standard.
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# AGENTS
|
|
2
2
|
|
|
3
|
-
Apply the root and `src/AGENTS.md` files first.
|
|
3
|
+
Apply the root and `src/AGENTS.md` files first. This directory shows the
|
|
4
|
+
host-owned storage and ingest path available to module authors.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## What Authors Should Take From This Directory
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
- Host-owned durable identity is `(schemaFileId, rowId)` for rows and
|
|
9
|
+
`(regionId, recordIndex)` for aligned-binary regions.
|
|
10
|
+
- The canonical ingest path is direct FlatBuffer bytes, not JSON.
|
|
11
|
+
- If the host owns persistence, use these helpers. If a module owns state, keep
|
|
12
|
+
the stream binary and use the resident-module pump path from `src/testing`.
|
|
10
13
|
|
|
11
14
|
## Storage And Streaming Rules
|
|
12
15
|
|
|
@@ -19,14 +22,13 @@ side.
|
|
|
19
22
|
- If a resident module owns state, keep the stream binary and push into the
|
|
20
23
|
module through the harness/pump path rather than inventing JSON wrappers.
|
|
21
24
|
|
|
22
|
-
## Key Files
|
|
25
|
+
## Key Files To Read
|
|
23
26
|
|
|
24
27
|
- `flatbufferStreamIngestor.js`
|
|
25
28
|
- `flatsqlRuntimeStore.js`
|
|
26
29
|
- `index.js`
|
|
27
30
|
|
|
28
|
-
##
|
|
31
|
+
## Note
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- `npm run benchmark:stream-1gib` for large-stream changes
|
|
33
|
+
Do not edit this directory just to store data for one module. Use the exported
|
|
34
|
+
helpers unless you are intentionally changing the runtime-host contract.
|
package/src/testing/AGENTS.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# AGENTS
|
|
2
2
|
|
|
3
|
-
Apply the root and `src/AGENTS.md` files first.
|
|
3
|
+
Apply the root and `src/AGENTS.md` files first. This directory contains the
|
|
4
|
+
author-facing harnesses and streaming helpers.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## What Authors Should Use From Here
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
- `createBrowserModuleHarness(...)` is the browser-side proof path for shared
|
|
9
|
+
standalone artifacts.
|
|
10
|
+
- `createModuleHarness(...)` is the generic process-side harness.
|
|
11
|
+
- `createModuleFlatBufferStreamPump(...)` is the canonical no-JSON path for
|
|
12
|
+
streaming size-prefixed FlatBuffer frames into a resident module instance.
|
|
10
13
|
|
|
11
14
|
## Harness Rules
|
|
12
15
|
|
|
@@ -19,15 +22,13 @@ clients, runtime-matrix helpers, and resident-module FlatBuffer pumps.
|
|
|
19
22
|
- Avoid hiding stateful behavior inside one-off demos; if a harness contract is
|
|
20
23
|
real, test it here.
|
|
21
24
|
|
|
22
|
-
## Key Files
|
|
25
|
+
## Key Files To Read
|
|
23
26
|
|
|
24
27
|
- `browserModuleHarness.js`
|
|
25
28
|
- `moduleFlatbufferStreamPump.js`
|
|
26
29
|
- `processInvoke.js`
|
|
27
30
|
|
|
28
|
-
##
|
|
31
|
+
## Note
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- `npm run test:module-stream`
|
|
33
|
-
- `node --test test/process-invoke.test.js`
|
|
33
|
+
Use these helpers from your module repo or app harnesses. Only edit them when
|
|
34
|
+
you are intentionally changing the SDK testing/runtime contract.
|