omgbase 0.10.0 → 0.10.1
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/build-info.json +2 -2
- package/dist/src/cmd/oqx.js +10 -5
- package/package.json +3 -3
package/dist/build-info.json
CHANGED
package/dist/src/cmd/oqx.js
CHANGED
|
@@ -63,22 +63,27 @@ async function runOqx(cli, args) {
|
|
|
63
63
|
});
|
|
64
64
|
cli.io.out(" e.g. query 'from docs where nodes count { where kind == \"md:task\" } >= 2'");
|
|
65
65
|
cli.io.out(" query 'select items: section.blocks collect { where type == \"list_item\" } from nodes where kind == \"md:section\"'");
|
|
66
|
-
cli.io.out(" query 'select $path, open from docs where nodes collect { ^open: value where kind == \"md:task\"
|
|
67
|
-
cli.io.out(" query 'select owner_id, owner: ^nodes single { where kind == \"person\"
|
|
66
|
+
cli.io.out(" query 'select $path, open from docs where nodes collect { ^open: value where kind == \"md:task\" and not attrs.checked }'");
|
|
67
|
+
cli.io.out(" query 'select owner_id, owner: ^nodes single { where kind == \"person\" and attrs.id == ^owner_id } from docs' # ^docs/^nodes/^blocks/^edges: the repository (the root row) from inside a row; 0^docs from any depth; ^$id / 0^$id = the repository id");
|
|
68
68
|
cli.io.out(" query 'docs count { where layer == \"canon\" }' # scalar; also <target> exists/none/first/single { … } at the top level");
|
|
69
|
-
cli.io.out(" query 'from docs where nodes none { where kind == \"md:task\"
|
|
69
|
+
cli.io.out(" query 'from docs where nodes none { where kind == \"md:task\" and not checked }' # none = zero rows (≡ not … exists; \"every\" = none over the complement)");
|
|
70
|
+
cli.io.out(" query 'from docs where era is not null and (layer == \"canon\" or layer == \"working\")' # and / or / not are the connectives (&& || ! accepted); x is y / x is not y = identity, x is null = absent");
|
|
71
|
+
cli.io.out(" query 'docs { type == \"substance\" and not verified }' # sugar: a block without a consumer is collect; a leading predicate drops `where` (bare names still project — filter a bare field with `is x`); not after follow, where { … } is options");
|
|
72
|
+
cli.io.out(" query 'select subject, process: ^docs[slug == ^subject].$path from docs where type == \"lab-note\"' # x[p] = first match or absent; x[p]! = exactly one, required; x[n] = positional; title! = the value or a loud error; a select item may use the items to its left");
|
|
73
|
+
cli.io.out(" query 'select $path, $depth from docs where $path == \"/timeline/review.md\" follow refs(before), refs(after)' # refs(field): the live documents a property's references name (either path form or a d_ id; dangling dropped) — a receiver, a source or a follow destination");
|
|
74
|
+
cli.io.out(" query 'select $path, next: ^docs { ^$path in list(before) } from docs where type == \"milestone\"' # paths are /-rooted on the surface ($path == \"/x.md\"; inputs accept both forms), so a property's reference compares with ^$path directly");
|
|
70
75
|
cli.io.out(" query 'from docs where type == \"practitioner\" order by era desc limit 2 offset 1' # limit/offset bound the set (after order/distinct, before the consumer)");
|
|
71
76
|
cli.io.out(" query 'select fm: entries(frontmatter) collect { k: $key, v: $it } from docs where $path == \"/x.md\"' # a record as a collection ($key/$it); also entries(attrs), entries(inline)");
|
|
72
77
|
cli.io.out(" query 'select $path values from docs where layer == \"canon\"' # `values`: bare values, no {id,path} hits (one item only)");
|
|
73
78
|
cli.io.out(" query 'select $path, tags: tags collect { $it values where $it != \"draft\" } from docs' # $it = the current item (here: each tag)");
|
|
74
79
|
cli.io.out(" query 'docs collect { from nodes where kind == \"md:task\" }' # `from E` re-projects the source (→ nodes)");
|
|
75
|
-
cli.io.out(" query 'from docs where text(\"philosophers stone\")
|
|
80
|
+
cli.io.out(" query 'from docs where text(\"philosophers stone\") and layer == \"canon\"' # full-text prune");
|
|
76
81
|
cli.io.out(" query 'select s: semantic(\"the great work\") from blocks where semantic(\"the great work\") > 0.6' # embedding score (needs a provider)");
|
|
77
82
|
cli.io.out(" query 'from docs where type == \"practitioner\" order by era desc' # order by <expr> [asc|desc]");
|
|
78
83
|
cli.io.out(" query 'select t: text, d: $depth, s: $stop from blocks where $id == \"b_x\" follow block.children' # recursive walk ($depth/$stop metadata)");
|
|
79
84
|
cli.io.out(" query 'from nodes where name == \"Overview\" follow section.subsections { depth 3 }' # follow [distinct] <rel> [{ where … frontier … depth n by … }]");
|
|
80
85
|
cli.io.out(" query 'select p: $path, d: $depth, s: $stop from docs where $path == \"/index.md\" follow doc.out' # citation graph (cyclic-safe: $stop=cycle)");
|
|
81
|
-
cli.io.out(" query 'from blocks where type == \"list_item\"
|
|
86
|
+
cli.io.out(" query 'from blocks where type == \"list_item\" and $leaf follow block.children' # $leaf/$depth/$stop filter the walk result post-walk");
|
|
82
87
|
cli.io.out(" query 'select src: $src, to: $dst_path from edges where predicate == \"depends_on\"' # the edges target: predicate/provenance/dst_kind + $src/$dst_path/$dst_uri");
|
|
83
88
|
return EXIT_OK;
|
|
84
89
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omgbase",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Open Markdown Graph Base — CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"omg": "./dist/src/main.js"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@omgbase/core": "^0.10.
|
|
48
|
+
"@omgbase/core": "^0.10.1",
|
|
49
49
|
"@omgbase/fs-adapter": "^0.2.0",
|
|
50
|
-
"@omgbase/sync": "^0.4.
|
|
50
|
+
"@omgbase/sync": "^0.4.11",
|
|
51
51
|
"yaml": "^2.9.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|