@shapeshift-labs/frontier-lang-cli 0.3.29 → 0.3.31
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 +18 -5
- package/dist/index.js +23 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ frontier-lang native-diff src/todo.before.ts --after src/todo.after.ts --out nat
|
|
|
11
11
|
frontier-lang project-native native-import.json --source-only --out restored.ts
|
|
12
12
|
frontier-lang native-compile native-import.json --target rust --emit-on-blocked --source-only --out todo.rs
|
|
13
13
|
frontier-lang native-coverage src/todo.ts
|
|
14
|
+
frontier-lang native-capabilities src/todo.ts --target rust
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
## Related Packages
|
|
@@ -44,8 +45,8 @@ The published Frontier package family is generated from one shared package catal
|
|
|
44
45
|
- [`@shapeshift-labs/frontier-workflow`](https://www.npmjs.com/package/@shapeshift-labs/frontier-workflow): Serializable durable workflow/process manifests for Frontier apps, including steps, waits, approvals, timers, retries, expected patches, compensation, records, timelines, and registry graph output.
|
|
45
46
|
- [`@shapeshift-labs/frontier-worker`](https://www.npmjs.com/package/@shapeshift-labs/frontier-worker): Serializable worker and edge task descriptors for Frontier apps, including queues, idempotency keys, retry and timeout policy, declared reads/writes/effects, snapshots, patch outputs, produced assets, execution records, logs, trace links, proof hashes, dedupe indexes, and registry graph output.
|
|
46
47
|
- [`@shapeshift-labs/frontier-queue`](https://www.npmjs.com/package/@shapeshift-labs/frontier-queue): Serializable durable queue state, leases, retries, dedupe keys, patch-carrying jobs, dead-letter records, replay evidence, and queue inspection for Frontier apps.
|
|
47
|
-
- [`@shapeshift-labs/frontier-swarm`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm): Hierarchical swarm plans, lanes, compute profiles, ownership policy, semantic ownership regions, task queues, event streams, run records, merge bundles, merge indexes, queue overlays, merge admission, changed-path checks, and proof artifacts for Frontier agent work.
|
|
48
|
-
- [`@shapeshift-labs/frontier-swarm-codex`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm-codex): Node Codex CLI adapter for Frontier swarm plans, including prompt rendering, worktree and snapshot workspaces, Codex argument compatibility, browser resource allocation, JSONL capture, verification commands, pid-backed stop, collect/apply workflows, merge indexes, queue overlays, merge bundles, and result artifacts.
|
|
48
|
+
- [`@shapeshift-labs/frontier-swarm`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm): Hierarchical swarm plans, lanes, compute profiles, ownership policy, semantic ownership regions, task queues, event streams, run records, merge bundles, merge indexes, queue overlays, merge admission, coordinator dashboards, changed-path checks, and proof artifacts for Frontier agent work.
|
|
49
|
+
- [`@shapeshift-labs/frontier-swarm-codex`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm-codex): Node Codex CLI adapter for Frontier swarm plans, including prompt rendering, worktree and snapshot workspaces, Codex argument compatibility, browser resource allocation, JSONL capture, verification commands, pid-backed stop, collect/apply workflows, merge indexes, queue overlays, merge bundles, normalized job evidence, coordinator query artifacts, and result artifacts.
|
|
49
50
|
- [`@shapeshift-labs/frontier-lang-kernel`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-kernel): Runtime-neutral semantic source graph, type/lattice/extern declarations, patch bundles, replay, hashing, evidence records, and merge-admission kernel for Frontier Lang.
|
|
50
51
|
- [`@shapeshift-labs/frontier-lang-parser`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-parser): Dependency-light Frontier Lang parser for modules, entities, state, actions, effects, types, externs, targets, and lattice declarations.
|
|
51
52
|
- [`@shapeshift-labs/frontier-lang-checker`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-checker): Checker and diagnostics for Frontier Lang semantic documents, including type symbols, effects, regions, lattice laws, CRDT metadata, and patch evidence.
|
|
@@ -54,8 +55,14 @@ The published Frontier package family is generated from one shared package catal
|
|
|
54
55
|
- [`@shapeshift-labs/frontier-lang-rust`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-rust): Rust projection adapter for Frontier Lang semantic documents, including structs, aliases, and action stubs.
|
|
55
56
|
- [`@shapeshift-labs/frontier-lang-python`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-python): Python projection adapter for Frontier Lang semantic documents, including dataclasses, typed patch records, and action stubs.
|
|
56
57
|
- [`@shapeshift-labs/frontier-lang-c`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-c): C header projection adapter for Frontier Lang semantic documents, including structs and action prototypes.
|
|
57
|
-
- [`@shapeshift-labs/frontier-lang-compiler`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-compiler): Compiler facade for Frontier Lang source documents, including parse, check, hash, diagnostics,
|
|
58
|
-
- [`@shapeshift-labs/frontier-lang`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang):
|
|
58
|
+
- [`@shapeshift-labs/frontier-lang-compiler`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-compiler): Compiler facade for Frontier Lang source documents, including parse, check, hash, diagnostics, universal AST envelopes, proof/paradigm semantic summaries, projection to TypeScript, JavaScript, Rust, Python, and C, and native source-import adapters for semantic merge evidence.
|
|
59
|
+
- [`@shapeshift-labs/frontier-lang-swift`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-swift): Swift source-language importer package for Frontier Lang semantic documents, including package-level metadata, SwiftSyntax adapter helpers, native import results, and semantic sidecar generation for SwiftSyntax/SwiftParser-shaped syntax trees.
|
|
60
|
+
- [`@shapeshift-labs/frontier-lang-kotlin`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-kotlin): Kotlin PSI source-language importer package for Frontier Lang semantic documents, including package-level metadata, Kotlin PSI adapter helpers, native import results, and semantic sidecar generation for Kotlin PSI/KtFile-shaped syntax trees.
|
|
61
|
+
- [`@shapeshift-labs/frontier-lang-java`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-java): Java source-language importer package for Frontier Lang semantic documents, including package-level metadata, Java AST adapter helpers, native import results, and semantic sidecar generation for javac/JDT/JavaParser-shaped ASTs.
|
|
62
|
+
- [`@shapeshift-labs/frontier-lang-go`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-go): Go source-language importer package for Frontier Lang semantic documents, including package-level metadata, Go AST adapter helpers, native import results, and semantic sidecar generation for go/ast File or Package trees.
|
|
63
|
+
- [`@shapeshift-labs/frontier-lang-csharp`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-csharp): C# Roslyn source-language importer package for Frontier Lang semantic documents, including package-level metadata, Roslyn adapter helpers, native import results, and semantic sidecar generation for SyntaxTree/SyntaxNode-shaped ASTs.
|
|
64
|
+
- [`@shapeshift-labs/frontier-lang-clang`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-clang): Clang AST source-language importer package for Frontier Lang semantic documents, including package-level metadata, Clang AST JSON adapter helpers, native import results, and semantic sidecar generation for C/C++ translation units.
|
|
65
|
+
- [`@shapeshift-labs/frontier-lang`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang): Umbrella package for Frontier Lang kernel, parser, checker, compiler facade, universal AST helpers, and projection adapters.
|
|
59
66
|
- [`@shapeshift-labs/frontier-kv`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv): Serializable in-memory key/value state for Frontier apps, including TTL, versioned compare-and-set, batched patch mutations, scans, watchers, snapshots, JSONL event evidence, and replay verification.
|
|
60
67
|
- [`@shapeshift-labs/frontier-kv-locks`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-locks): Lease-style lock records on top of Frontier KV, including acquire, renew, release, fencing tokens, expiration, owner evidence, and replayable lock events.
|
|
61
68
|
- [`@shapeshift-labs/frontier-kv-rate-limit`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-rate-limit): Patch-native rate limit buckets for Frontier KV, including fixed windows, sliding windows, token buckets, deterministic refill, consume evidence, and reset records.
|
|
@@ -141,6 +148,12 @@ Package source repositories:
|
|
|
141
148
|
- [`siliconjungle/-shapeshift-labs-frontier-lang-python`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-python)
|
|
142
149
|
- [`siliconjungle/-shapeshift-labs-frontier-lang-c`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-c)
|
|
143
150
|
- [`siliconjungle/-shapeshift-labs-frontier-lang-compiler`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-compiler)
|
|
151
|
+
- [`siliconjungle/-shapeshift-labs-frontier-lang-swift`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-swift)
|
|
152
|
+
- [`siliconjungle/-shapeshift-labs-frontier-lang-kotlin`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-kotlin)
|
|
153
|
+
- [`siliconjungle/-shapeshift-labs-frontier-lang-java`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-java)
|
|
154
|
+
- [`siliconjungle/-shapeshift-labs-frontier-lang-go`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-go)
|
|
155
|
+
- [`siliconjungle/-shapeshift-labs-frontier-lang-csharp`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-csharp)
|
|
156
|
+
- [`siliconjungle/-shapeshift-labs-frontier-lang-clang`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-clang)
|
|
144
157
|
- [`siliconjungle/-shapeshift-labs-frontier-lang-cli`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-cli)
|
|
145
158
|
- [`siliconjungle/-shapeshift-labs-frontier-lang`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang)
|
|
146
159
|
- [`siliconjungle/-shapeshift-labs-frontier-kv`](https://github.com/siliconjungle/-shapeshift-labs-frontier-kv)
|
|
@@ -195,7 +208,7 @@ npm install -g @shapeshift-labs/frontier-lang-cli
|
|
|
195
208
|
frontier-lang check examples/todo.frontier
|
|
196
209
|
```
|
|
197
210
|
|
|
198
|
-
Commands: `parse`, `check`, `hash`, `ast`, `capabilities`, `to-json`, `from-json`, `import`, `project-native`, `native-compile`, `native-coverage`, `native-diff`, `roundtrip`, `corpus-roundtrip`, `emit`, `emit-ts`, `emit-js`, `emit-rust`, `emit-python`, and `emit-c`.
|
|
211
|
+
Commands: `parse`, `check`, `hash`, `ast`, `capabilities`, `to-json`, `from-json`, `import`, `project-native`, `native-compile`, `native-coverage`, `native-capabilities`, `native-diff`, `roundtrip`, `corpus-roundtrip`, `emit`, `emit-ts`, `emit-js`, `emit-rust`, `emit-python`, and `emit-c`.
|
|
199
212
|
|
|
200
213
|
```sh
|
|
201
214
|
frontier-lang emit app.frontier --target rust --out app.rs
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,14 @@ import { parseFrontierFile, parseFrontierSource } from '@shapeshift-labs/frontie
|
|
|
6
6
|
import { checkDocument } from '@shapeshift-labs/frontier-lang-checker';
|
|
7
7
|
import { hashDocumentBase } from '@shapeshift-labs/frontier-lang-kernel';
|
|
8
8
|
import {
|
|
9
|
+
NativeImportLanguageProfiles,
|
|
9
10
|
compileNativeSource,
|
|
10
11
|
compileFrontierDocument,
|
|
11
12
|
createNativeSourcePreservation,
|
|
12
13
|
createNativeImportCoverageMatrix,
|
|
13
14
|
createSemanticImportSidecar,
|
|
14
15
|
createUniversalAstFromDocument,
|
|
16
|
+
createUniversalCapabilityMatrix,
|
|
15
17
|
diffNativeSources,
|
|
16
18
|
importNativeSource,
|
|
17
19
|
projectNativeImportToSource,
|
|
@@ -84,6 +86,15 @@ export async function runCli(argv = process.argv.slice(2), io = console) {
|
|
|
84
86
|
const imported = importNativeFile(file, source, rest, { language });
|
|
85
87
|
return outputMaybeFile(io, rest, createNativeImportCoverageMatrix({ imports: [imported] }));
|
|
86
88
|
}
|
|
89
|
+
if (command === 'native-capabilities') {
|
|
90
|
+
const imported = readNativeImportForProjection(file, source, rest);
|
|
91
|
+
const target = readOption(rest, '--target');
|
|
92
|
+
return outputMaybeFile(io, rest, createUniversalCapabilityMatrix({
|
|
93
|
+
imports: [imported],
|
|
94
|
+
languages: nativeCapabilityLanguages(imported, rest),
|
|
95
|
+
targets: target ? [target] : undefined
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
87
98
|
if (command === 'native-diff') {
|
|
88
99
|
const afterPath = readOption(rest, '--after');
|
|
89
100
|
if (!afterPath) throw new Error('native-diff requires --after <file>');
|
|
@@ -344,6 +355,17 @@ function readNativeImportForProjection(file, source, args) {
|
|
|
344
355
|
return parsed;
|
|
345
356
|
}
|
|
346
357
|
|
|
358
|
+
function nativeCapabilityLanguages(imported, args) {
|
|
359
|
+
if (args.includes('--all-languages')) return undefined;
|
|
360
|
+
const language = imported?.language;
|
|
361
|
+
if (!language) return undefined;
|
|
362
|
+
const normalized = String(language).toLowerCase();
|
|
363
|
+
const matches = NativeImportLanguageProfiles.filter((profile) => (
|
|
364
|
+
profile.language === normalized || profile.aliases?.includes(normalized)
|
|
365
|
+
));
|
|
366
|
+
return matches.length ? matches : undefined;
|
|
367
|
+
}
|
|
368
|
+
|
|
347
369
|
function tryParseJson(source) {
|
|
348
370
|
const trimmed = source.trim();
|
|
349
371
|
if (!trimmed.startsWith('{') && !trimmed.startsWith('[')) return undefined;
|
|
@@ -366,7 +388,7 @@ function idFragment(value) {
|
|
|
366
388
|
return String(value ?? 'unknown').replace(/[^A-Za-z0-9]+/g, '_').replace(/^_+|_+$/g, '').toLowerCase() || 'unknown';
|
|
367
389
|
}
|
|
368
390
|
|
|
369
|
-
function help(io) { io.log('frontier-lang <parse|check|hash|ast|capabilities|to-json|from-json|import|project-native|native-compile|native-coverage|native-diff|roundtrip|corpus-roundtrip|emit|emit-ts|emit-js|emit-rust|emit-python|emit-c> <file> [--after file] [--target target] [--language language] [--parser parser] [--platform platform] [--ast] [--sidecar] [--sidecar-only] [--source-only] [--stubs] [--emit-on-blocked] [--out file] [--strict-effects]'); }
|
|
391
|
+
function help(io) { io.log('frontier-lang <parse|check|hash|ast|capabilities|to-json|from-json|import|project-native|native-compile|native-coverage|native-capabilities|native-diff|roundtrip|corpus-roundtrip|emit|emit-ts|emit-js|emit-rust|emit-python|emit-c> <file> [--after file] [--target target] [--language language] [--parser parser] [--platform platform] [--ast] [--sidecar] [--sidecar-only] [--source-only] [--stubs] [--emit-on-blocked] [--all-languages] [--out file] [--strict-effects]'); }
|
|
370
392
|
function readOption(args, flag) { const index = args.indexOf(flag); return index >= 0 ? args[index + 1] : undefined; }
|
|
371
393
|
function readIntegerOption(args, flag) {
|
|
372
394
|
const value = readOption(args, flag);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshift-labs/frontier-lang-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.31",
|
|
4
4
|
"description": "Command line interface for parsing, checking, hashing, and emitting Frontier Lang projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@shapeshift-labs/frontier-lang-checker": "0.3.4",
|
|
57
|
-
"@shapeshift-labs/frontier-lang-compiler": "0.2.
|
|
58
|
-
"@shapeshift-labs/frontier-lang-kernel": "0.3.
|
|
57
|
+
"@shapeshift-labs/frontier-lang-compiler": "0.2.39",
|
|
58
|
+
"@shapeshift-labs/frontier-lang-kernel": "0.3.8",
|
|
59
59
|
"@shapeshift-labs/frontier-lang-parser": "0.3.4"
|
|
60
60
|
},
|
|
61
61
|
"bin": {
|