Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dist/namespace-registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"STDHEX",
"STDHTTP",
"STDJSON",
"STDKV",
"STDLOG",
"STDMATH",
"STDMOCK",
Expand Down
105 changes: 105 additions & 0 deletions dist/seam-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,111 @@
}
]
},
"STDKV": {
"contract_version": 1,
"entry_points": [
{
"args": [
{
"doc": "collection id",
"name": "coll",
"type": "string"
},
{
"doc": "record key",
"name": "key",
"type": "string"
}
],
"label": "$$exists^STDKV(coll, key)",
"raises": [],
"returns": {
"doc": "1 iff the record exists; 0 otherwise",
"type": "bool"
}
},
{
"args": [
{
"doc": "collection id",
"name": "coll",
"type": "string"
},
{
"doc": "record key",
"name": "key",
"type": "string"
},
{
"doc": "field id within the record",
"name": "field",
"type": "string"
},
{
"doc": "value returned when the field is unset",
"name": "default",
"type": "string"
}
],
"label": "$$get^STDKV(coll, key, field, default)",
"raises": [],
"returns": {
"doc": "the stored value, or `default` when unset",
"type": "string"
}
},
{
"args": [
{
"doc": "collection id",
"name": "coll",
"type": "string"
},
{
"doc": "record key",
"name": "key",
"type": "string"
}
],
"label": "$$kill^STDKV(coll, key)",
"raises": [],
"returns": {
"doc": "1 (idempotent — absent record is a no-op)",
"type": "bool"
}
},
{
"args": [
{
"doc": "collection id (VSLFS: a FileMan file number)",
"name": "coll",
"type": "string"
},
{
"doc": "record key (VSLFS: an IENS)",
"name": "key",
"type": "string"
},
{
"doc": "field id within the record (VSLFS: a field number)",
"name": "field",
"type": "string"
},
{
"doc": "the value to store (raw bytes; byte-faithful)",
"name": "value",
"type": "string"
}
],
"label": "$$set^STDKV(coll, key, field, value)",
"raises": [],
"returns": {
"doc": "1 on success",
"type": "bool"
}
}
]
},
"STDNET": {
"contract_version": 1,
"entry_points": [
Expand Down
3 changes: 2 additions & 1 deletion dist/skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Generated from m-stdlib's `dist/stdlib-manifest.json` — every public
module + label, the canonical-idiom library, and the full U-STD* error
surface, all rendered for AI / agent context loading.

**Catalogue:** 34 modules, 298 public labels,
**Catalogue:** 35 modules, 302 public labels,
44 error codes.

## When to use this skill
Expand Down Expand Up @@ -53,6 +53,7 @@ often replace bespoke per-site reinventions.
- **`STDHEX`** — RFC-4648 §8 hex encoding (lowercase by default).
- **`STDHTTP`** — HTTP/1.1 client (track H3, target tag v0.4.0).
- **`STDJSON`** — RFC 8259 JSON parser + serialiser.
- **`STDKV`** — minimal keyed record-store seam (the S1 storage contract).
- **`STDLOG`** — structured key=value logger (v0.0.4).
- **`STDMATH`** — Numeric helpers (clamp / min / max / sum / count / mean over arrays).
- **`STDMOCK`** — opt-in test-time call interception (mock registry).
Expand Down
11 changes: 10 additions & 1 deletion dist/skill/manifest-index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# m-stdlib — manifest index

m-stdlib v0.8.0; 34 modules; 298 public labels.
m-stdlib v0.8.0; 35 modules; 302 public labels.

Generated from `dist/stdlib-manifest.json`. One entry per module
with every public label: signature on the left, synopsis on the
Expand Down Expand Up @@ -293,6 +293,15 @@ RFC 8259 JSON parser + serialiser.

_raises: `U-STDJSON-ENCODE`, `U-STDJSON-PARSE`_

## `STDKV`

minimal keyed record-store seam (the S1 storage contract).

- `$$exists^STDKV(coll, key)` — Return 1 iff record (coll,key) has any field set; else 0.
- `$$get^STDKV(coll, key, field, default)` — Read the value at (coll,key,field); else `default`.
- `$$kill^STDKV(coll, key)` — Remove the whole record (coll,key); return 1 (idempotent).
- `$$set^STDKV(coll, key, field, value)` — Store `value` at (coll,key,field); return 1.

## `STDLOG`

structured key=value logger (v0.0.4).
Expand Down
Loading
Loading