@shapeshift-labs/loom 0.1.0 → 0.1.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/README.md CHANGED
@@ -1,248 +1,303 @@
1
- # @shapeshift-labs/loom
2
-
3
- Loom is the repo-level semantic collaboration CLI for Frontier projects and
4
- non-Frontier codebases. It creates a `.loom/` workspace, scans source files into
5
- Frontier semantic graph records, tracks repo status, emits projection plans, and
6
- delegates agent work to the existing Frontier Swarm tooling.
7
-
8
- ```sh
9
- npx @shapeshift-labs/loom init
10
- npx @shapeshift-labs/loom scan
11
- npx @shapeshift-labs/loom status
12
- npx @shapeshift-labs/loom snapshot -m "semantic checkpoint"
13
- npx @shapeshift-labs/loom cat-file <object-id> --json
14
- npx @shapeshift-labs/loom project --to python
15
- npx @shapeshift-labs/loom swarm collect --run agent-runs/my-run
16
- ```
17
-
18
-
19
- ## Related Packages
20
-
21
- The published Frontier package family is generated from one shared package catalog so READMEs stay in sync across packages:
22
-
23
- - [`@shapeshift-labs/frontier`](https://www.npmjs.com/package/@shapeshift-labs/frontier): Core JSON diff/apply, compact patch tuples, JSON Pointer, equality, clone, validation, Unicode helpers, and tiny dependency-free runtime budget/scheduler primitives.
24
- - [`@shapeshift-labs/frontier-query`](https://www.npmjs.com/package/@shapeshift-labs/frontier-query): Shared query-key, selector path, condition, entity identity, and table-shape primitives.
25
- - [`@shapeshift-labs/frontier-codec`](https://www.npmjs.com/package/@shapeshift-labs/frontier-codec): Patch serialization, binary frames, canonical JSON, and patch-history codecs.
26
- - [`@shapeshift-labs/frontier-engine`](https://www.npmjs.com/package/@shapeshift-labs/frontier-engine): Stateful planned diff engine, adaptive profiles, schema plans, and engine-level history helpers.
27
- - [`@shapeshift-labs/frontier-state`](https://www.npmjs.com/package/@shapeshift-labs/frontier-state): Patch-routed app-state subscriptions, owned commits, maintained views, and path mapping.
28
- - [`@shapeshift-labs/frontier-dataflow`](https://www.npmjs.com/package/@shapeshift-labs/frontier-dataflow): Serializable incremental dataflow and materialized-view graphs for Frontier apps, including selectors, dependency DAGs, filters, joins, aggregations, stale paths, recompute budgets, output patches, provenance records, and proof of why derived views changed.
29
- - [`@shapeshift-labs/frontier-state-cache`](https://www.npmjs.com/package/@shapeshift-labs/frontier-state-cache): Normalized query-result cache with entity/query watchers, persistence, change logs, optimistic layers, scheduled persistence, and mutation bridge.
30
- - [`@shapeshift-labs/frontier-state-cache-idb`](https://www.npmjs.com/package/@shapeshift-labs/frontier-state-cache-idb): IndexedDB persistence adapter for Frontier state-cache snapshots and durable change logs.
31
- - [`@shapeshift-labs/frontier-state-cache-file`](https://www.npmjs.com/package/@shapeshift-labs/frontier-state-cache-file): Structured file persistence adapter for Frontier state-cache snapshots and change logs.
32
- - [`@shapeshift-labs/frontier-state-cache-sql`](https://www.npmjs.com/package/@shapeshift-labs/frontier-state-cache-sql): SQL persistence adapter for Frontier state-cache snapshots and change logs.
33
- - [`@shapeshift-labs/frontier-schema`](https://www.npmjs.com/package/@shapeshift-labs/frontier-schema): JSON Schema validation, Frontier profile generation, CloudEvent envelopes, and query/table schema helpers.
34
- - [`@shapeshift-labs/frontier-migrations`](https://www.npmjs.com/package/@shapeshift-labs/frontier-migrations): Boundary-first data migrations, import normalization, plugin/API version mapping, versioned envelopes, graph diagnostics, patch path rewrites, dry-run reports, and current-shape rehydration.
35
- - [`@shapeshift-labs/frontier-event-log`](https://www.npmjs.com/package/@shapeshift-labs/frontier-event-log): Bounded event logs, replay cursors, consumer acknowledgements, keyed compaction, checkpoints, and Frontier patch event records.
36
- - [`@shapeshift-labs/frontier-inspect`](https://www.npmjs.com/package/@shapeshift-labs/frontier-inspect): Cross-package inspection/evidence bundles, registry graph snapshots, feature/resource impact reports, timeline/event normalization, redaction, JSONL import/export, and AI-readable app feature maps.
37
- - [`@shapeshift-labs/frontier-scheduler`](https://www.npmjs.com/package/@shapeshift-labs/frontier-scheduler): Deterministic work scheduling, lanes, cancellation, backpressure, frame policies, replay snapshots, and work graphs.
38
- - [`@shapeshift-labs/frontier-logging`](https://www.npmjs.com/package/@shapeshift-labs/frontier-logging): Opt-in structured logging, browser telemetry, scheduled sinks, file sinks, exporters, benchmark traces, and Frontier patch/update summaries.
39
- - [`@shapeshift-labs/frontier-mutation`](https://www.npmjs.com/package/@shapeshift-labs/frontier-mutation): Explicit mutation and selector plans compiled to Frontier patches or CRDT operations.
40
- - [`@shapeshift-labs/frontier-effects`](https://www.npmjs.com/package/@shapeshift-labs/frontier-effects): Serializable effect descriptors and resource graphs for Frontier apps, including fetch, storage, timers, navigation, workers, clipboard, broadcast, WebSocket, stream, policy metadata, runtime records, redaction, JSONL, proof helpers, and registry graph output.
41
- - [`@shapeshift-labs/frontier-auth`](https://www.npmjs.com/package/@shapeshift-labs/frontier-auth): Frontier-native auth contracts for providers, sessions, profile completeness, route and resource gates, account-linking policy, token issue/verify plans, runtime grants, audit events, registry graphs, lint resources, and auth evidence without owning app secrets, crypto, storage, or provider SDKs.
42
- - [`@shapeshift-labs/frontier-policy`](https://www.npmjs.com/package/@shapeshift-labs/frontier-policy): Serializable policy and capability decisions for Frontier apps, effects, views, sync, routes, traces, and AI tools.
43
- - [`@shapeshift-labs/frontier-flags`](https://www.npmjs.com/package/@shapeshift-labs/frontier-flags): Patchable policy-aware feature flag state for Frontier apps, including targeting, deterministic rollouts, experiment variants, kill switches, exposure records, audit logs, and replay evidence.
44
- - [`@shapeshift-labs/frontier-tools`](https://www.npmjs.com/package/@shapeshift-labs/frontier-tools): Serializable app action/tool manifests for AI-operable Frontier apps, including availability, validation, dry-run plans, patch previews, effect/tool constraints, execution records, rollback links, and registry graph output.
45
- - [`@shapeshift-labs/frontier-sandbox`](https://www.npmjs.com/package/@shapeshift-labs/frontier-sandbox): Runtime-agnostic sandbox contracts for Frontier patch-producing actions, including manifests, declared reads/writes/capabilities, host-validated patch/effect/event/log results, dynamic source modules, source event replay, and structural runtime adapters.
46
- - [`@shapeshift-labs/frontier-sandbox-quickjs`](https://www.npmjs.com/package/@shapeshift-labs/frontier-sandbox-quickjs): QuickJS/WebAssembly runtime adapter for Frontier sandbox actions, including invocation/runtime isolation modes, deadline and memory limits, dynamic source execution, and patch/effect result normalization.
47
- - [`@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.
48
- - [`@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.
49
- - [`@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.
50
- - [`@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.
51
- - [`@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.
52
- - [`@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.
53
- - [`@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.
54
- - [`@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.
55
- - [`@shapeshift-labs/frontier-lang-typescript`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-typescript): TypeScript projection adapter for Frontier Lang semantic documents, including type/entity/state/action/extern declarations and CRDT lattice descriptors.
56
- - [`@shapeshift-labs/frontier-lang-javascript`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-javascript): JavaScript projection adapter for Frontier Lang semantic documents, including ESM action stubs and schema/lattice descriptors.
57
- - [`@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.
58
- - [`@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.
59
- - [`@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.
60
- - [`@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.
61
- - [`@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.
62
- - [`@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.
63
- - [`@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.
64
- - [`@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.
65
- - [`@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.
66
- - [`@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.
67
- - [`@shapeshift-labs/frontier-lang-cli`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-cli): Command line interface for parsing, checking, hashing, emitting, native source import/projection, semantic slicing, and corpus roundtrip evidence for Frontier Lang projects.
68
- - [`@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, projection adapters, and source-language importer adapters.
69
- - [`@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.
70
- - [`@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.
71
- - [`@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.
72
- - [`@shapeshift-labs/frontier-kv-file`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-file): Node file persistence adapter for Frontier KV snapshots and append-only JSONL event logs, including atomic writes, compaction, replay loading, and adapter evidence.
73
- - [`@shapeshift-labs/frontier-kv-idb`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-idb): IndexedDB persistence adapter for Frontier KV snapshots and event logs, with structural IDB interfaces, upgrade planning, compact event storage, and replay loading.
74
- - [`@shapeshift-labs/frontier-kv-redis`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-redis): Redis-compatible command planning and structural client adapter for Frontier KV operations, including key mapping, TTL commands, optimistic CAS scripts, and replay evidence without bundling Redis drivers.
75
- - [`@shapeshift-labs/frontier-kv-server`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-server): Small Node HTTP server adapter for Frontier KV, including request planning, JSON endpoints for get/set/delete/scan/batch, optional rate-limit hooks, and replayable response evidence.
76
- - [`@shapeshift-labs/frontier-assets`](https://www.npmjs.com/package/@shapeshift-labs/frontier-assets): Serializable asset and content provenance graphs for Frontier apps, including source files, generated variants, thumbnails, LOD chunks, shader/material dependencies, transforms, hashes, owners, runtime consumers, review plans, registry graph output, and impact queries.
77
- - [`@shapeshift-labs/frontier-blueprint`](https://www.npmjs.com/package/@shapeshift-labs/frontier-blueprint): Serializable Blueprint/Prefab flyweight templates for Frontier apps, including parameterized instantiation, deterministic ID/path remapping, compact overrides, variants, effective-state materialization, scene/state patch emission, dependency metadata, and registry graph output.
78
- - [`@shapeshift-labs/frontier-triggers`](https://www.npmjs.com/package/@shapeshift-labs/frontier-triggers): Capability-gated event trigger registry, scoped event envelopes, listener/reaction rules, structured rejection, deterministic event-to-action scheduling, replay/provenance records, and registry graph output.
79
- - [`@shapeshift-labs/frontier-virtual`](https://www.npmjs.com/package/@shapeshift-labs/frontier-virtual): DOM-neutral virtualization, layout providers, range materialization, grids, spatial/frustum indexes, patch invalidation, camera anchors, and serializable layout state.
80
- - [`@shapeshift-labs/frontier-table`](https://www.npmjs.com/package/@shapeshift-labs/frontier-table): Renderer-neutral data grid and table primitives for Frontier apps, including stable row identity, sorting, filtering, selection, virtual ranges, patch-driven edits, cache/dataflow descriptors, and CRDT-compatible row and cell operation frames.
81
- - [`@shapeshift-labs/frontier-scene`](https://www.npmjs.com/package/@shapeshift-labs/frontier-scene): Patch-native 2D/3D scene graph, transform propagation, bounds queries, virtual/culling adapters, spatial invalidation, and camera/frustum materialization.
82
- - [`@shapeshift-labs/frontier-pathfinding`](https://www.npmjs.com/package/@shapeshift-labs/frontier-pathfinding): Patch-native grid pathfinding, typed-array A*/Dijkstra search, flow fields, connected components, line-of-sight smoothing, dirty-cell invalidation, and scheduler-friendly path jobs.
83
- - [`@shapeshift-labs/frontier-lod`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lod): Patch-native level-of-detail and significance selection for rendering and computation workloads, compact typed hot paths, multi-observer selection, budget degradation, materialization frames, and scheduler work plans.
84
- - [`@shapeshift-labs/frontier-route`](https://www.npmjs.com/package/@shapeshift-labs/frontier-route): DOM-neutral app/game route resources, route and scene manifests, match/resolve/transition planning, dependency metadata, sessions, registry graph output, and impact queries.
85
- - [`@shapeshift-labs/frontier-trace`](https://www.npmjs.com/package/@shapeshift-labs/frontier-trace): Serializable traces, spans, events, causal links, W3C trace context helpers, timeline/resource/path queries, critical-path analysis, registry graph output, JSONL/proof helpers, Chrome trace export, and redaction for app-wide feature observability.
86
- - [`@shapeshift-labs/frontier-manifest`](https://www.npmjs.com/package/@shapeshift-labs/frontier-manifest): Build/static feature manifests for owners, routes, actions, states, migrations, tests, source files, assets, resources, tasks, dependency metadata, registry graph output, feature maps, JSONL export, and impact queries.
87
- - [`@shapeshift-labs/frontier-view`](https://www.npmjs.com/package/@shapeshift-labs/frontier-view): Renderer-neutral view manifests, type defaults, validation frames, action bindings, visual channels, virtual/LOD hints, and data-to-representation mapping for Frontier apps.
88
- - [`@shapeshift-labs/frontier-icons`](https://www.npmjs.com/package/@shapeshift-labs/frontier-icons): Renderer-neutral icon records, icon sets, lookup aliases, SVG frames, string rendering, and registry evidence for Frontier apps.
89
- - [`@shapeshift-labs/frontier-design`](https://www.npmjs.com/package/@shapeshift-labs/frontier-design): Renderer-neutral design-system tokens, semantic roles, recipes, target style frames, CSS variable output, and registry graph evidence for Frontier apps.
90
- - [`@shapeshift-labs/frontier-canvas`](https://www.npmjs.com/package/@shapeshift-labs/frontier-canvas): Renderer-neutral infinite canvas surfaces for Frontier apps, including camera and viewport math, pan/zoom plans, grid materialization, snapping, hit testing, selection handles, extensible tool dispatch, frame records, registry graph output, and impact/proof helpers.
91
- - [`@shapeshift-labs/frontier-canvas-tools`](https://www.npmjs.com/package/@shapeshift-labs/frontier-canvas-tools): Renderer-neutral editor tools, state machines, transform handles, permissions, async records, and AI action bridges for Frontier canvas surfaces.
92
- - [`@shapeshift-labs/frontier-dnd`](https://www.npmjs.com/package/@shapeshift-labs/frontier-dnd): Renderer-neutral drag-and-drop sessions, sensor descriptors, collision ranking, drop planning, reorder patches, state partitioning, and registry evidence for Frontier apps.
93
- - [`@shapeshift-labs/frontier-dom`](https://www.npmjs.com/package/@shapeshift-labs/frontier-dom): Patch-native DOM and host renderer bindings, manifest hydration, JSX runtime/compiler helpers, SSR, devtools, and logging bridges.
94
- - [`@shapeshift-labs/frontier-playwright`](https://www.npmjs.com/package/@shapeshift-labs/frontier-playwright): Playwright/headless automation probes for Frontier state, DOM, devtools, marks, and timeline queries.
95
- - [`@shapeshift-labs/frontier-test`](https://www.npmjs.com/package/@shapeshift-labs/frontier-test): Serializable test/spec evidence manifests for Frontier apps, including fixtures, commands, expected patches/effects/routes/policies, coverage declarations, run plans, run records, report adapters, replay proofs, fuzzers, benchmarks, registry graph output, and impact queries.
96
- - [`@shapeshift-labs/frontier-fixtures`](https://www.npmjs.com/package/@shapeshift-labs/frontier-fixtures): Deterministic fixture and scenario generation for Frontier apps, including schema-valid sample state, related entity collections, actor personas, route states, replay-verified patch streams, event records, JSONL bundles, and evidence summaries.
97
- - [`@shapeshift-labs/frontier-component-preview`](https://www.npmjs.com/package/@shapeshift-labs/frontier-component-preview): Frontier-native component preview books, generated preview manifests, stateful variants, Vite virtual modules, standalone browser preview shells, inspector bridges, and preview harness evidence for Frontier apps.
98
- - [`@shapeshift-labs/frontier-documentation`](https://www.npmjs.com/package/@shapeshift-labs/frontier-documentation): Frontier-native documentation manifests, generated documentation books, package/API/source discovery, Vite virtual modules, standalone browser docs shells, inspector bridges, search indexes, and documentation harness evidence for Frontier apps and packages.
99
- - [`@shapeshift-labs/frontier-ast-walk`](https://www.npmjs.com/package/@shapeshift-labs/frontier-ast-walk): Dependency-light source graph, import/export/declaration/call analysis, Frontier package-use discovery, and business-logic placement findings for Frontier tools, apps, docs, fuzzers, benchmarks, and agent evidence.
100
- - [`@shapeshift-labs/frontier-history`](https://www.npmjs.com/package/@shapeshift-labs/frontier-history): Serializable temporal explanation and causality records for Frontier apps, including field-change explanations, action/workflow/policy/effect/trace/test provenance, audit windows, undo planning, registry/provenance graph output, JSONL replay bundles, and proof hashes.
101
- - [`@shapeshift-labs/frontier-application`](https://www.npmjs.com/package/@shapeshift-labs/frontier-application): Serializable whole-application graph and impact queries for Frontier apps, including features, owners, packages, routes, views, actions, mutations, state paths, effects, workers, assets, tests, traces, policies, workflows, migrations, benchmarks, registry graph output, feature maps, JSONL bundles, and proof hashes.
102
- - [`@shapeshift-labs/frontier-linter`](https://www.npmjs.com/package/@shapeshift-labs/frontier-linter): Serializable Frontier lint rules, diagnostics, fixes, reports, and fast rule execution for package catalogs, registry graphs, application maps, manifests, traces, policies, workflows, workers, assets, tests, benchmarks, and source snippets.
103
- - [`@shapeshift-labs/frontier-framework`](https://www.npmjs.com/package/@shapeshift-labs/frontier-framework): High-level app framework package for Frontier applications, including configuration, CLI scaffolding, Vite builds, monorepo layout, TSX route builds, split frontend/backend deploy artifacts, backend-neutral Fetch handler and sync transport contracts, runtime data-source migrations, devtools, harness gates, agent MCP/tool manifests, CI evidence gates, workflow manifests, SARIF/linter output, replay scripts, and evidence manifest output.
104
- - [`@shapeshift-labs/frontier-crdt`](https://www.npmjs.com/package/@shapeshift-labs/frontier-crdt): Native CRDT documents, update tooling, awareness, branches, conflict introspection, version frames, and undo.
105
- - [`@shapeshift-labs/frontier-crdt-sync`](https://www.npmjs.com/package/@shapeshift-labs/frontier-crdt-sync): CRDT sync endpoints, repo/storage/provider contracts, scheduled sync work, document URLs, local networks, model checking, forensics, and text binding contracts.
106
- - [`@shapeshift-labs/frontier-crdt-websocket`](https://www.npmjs.com/package/@shapeshift-labs/frontier-crdt-websocket): WebSocket client/server transports for Frontier CRDT sync providers.
107
- - [`@shapeshift-labs/frontier-react`](https://www.npmjs.com/package/@shapeshift-labs/frontier-react): React external-store hooks and adapters for Frontier state, cache, and CRDT surfaces.
108
- - [`@shapeshift-labs/frontier-richtext`](https://www.npmjs.com/package/@shapeshift-labs/frontier-richtext): Rich text Delta normalization/application, marks, embeds, ranges, and cursor/selection transforms for local editor integrations.
109
- - [`@shapeshift-labs/frontier-realtime`](https://www.npmjs.com/package/@shapeshift-labs/frontier-realtime): Shared realtime command, tick, snapshot, prediction, reconciliation, interpolation, rollback, message, and delta primitives.
110
- - [`@shapeshift-labs/frontier-realtime-server`](https://www.npmjs.com/package/@shapeshift-labs/frontier-realtime-server): Authoritative realtime room, tick, command validation, rate-limit, session, and snapshot-history runtime.
111
- - [`@shapeshift-labs/frontier-realtime-websocket`](https://www.npmjs.com/package/@shapeshift-labs/frontier-realtime-websocket): WebSocket client, wire, and Node room-server transport for Frontier realtime.
112
- - [`@shapeshift-labs/frontier-game`](https://www.npmjs.com/package/@shapeshift-labs/frontier-game): Game-facing entity, component, player, room, ownership, spatial interest, rollback, physics, and replication helpers above realtime.
113
-
114
- Package source repositories:
115
-
116
- - [`siliconjungle/-shapeshift-labs-frontier`](https://github.com/siliconjungle/-shapeshift-labs-frontier)
117
- - [`siliconjungle/-shapeshift-labs-frontier-query`](https://github.com/siliconjungle/-shapeshift-labs-frontier-query)
118
- - [`siliconjungle/-shapeshift-labs-frontier-codec`](https://github.com/siliconjungle/-shapeshift-labs-frontier-codec)
119
- - [`siliconjungle/-shapeshift-labs-frontier-engine`](https://github.com/siliconjungle/-shapeshift-labs-frontier-engine)
120
- - [`siliconjungle/-shapeshift-labs-frontier-state`](https://github.com/siliconjungle/-shapeshift-labs-frontier-state)
121
- - [`siliconjungle/-shapeshift-labs-frontier-dataflow`](https://github.com/siliconjungle/-shapeshift-labs-frontier-dataflow)
122
- - [`siliconjungle/-shapeshift-labs-frontier-state-cache`](https://github.com/siliconjungle/-shapeshift-labs-frontier-state-cache)
123
- - [`siliconjungle/-shapeshift-labs-frontier-state-cache-idb`](https://github.com/siliconjungle/-shapeshift-labs-frontier-state-cache-idb)
124
- - [`siliconjungle/-shapeshift-labs-frontier-state-cache-file`](https://github.com/siliconjungle/-shapeshift-labs-frontier-state-cache-file)
125
- - [`siliconjungle/-shapeshift-labs-frontier-state-cache-sql`](https://github.com/siliconjungle/-shapeshift-labs-frontier-state-cache-sql)
126
- - [`siliconjungle/-shapeshift-labs-frontier-schema`](https://github.com/siliconjungle/-shapeshift-labs-frontier-schema)
127
- - [`siliconjungle/-shapeshift-labs-frontier-migrations`](https://github.com/siliconjungle/-shapeshift-labs-frontier-migrations)
128
- - [`siliconjungle/-shapeshift-labs-frontier-event-log`](https://github.com/siliconjungle/-shapeshift-labs-frontier-event-log)
129
- - [`siliconjungle/-shapeshift-labs-frontier-inspect`](https://github.com/siliconjungle/-shapeshift-labs-frontier-inspect)
130
- - [`siliconjungle/-shapeshift-labs-frontier-scheduler`](https://github.com/siliconjungle/-shapeshift-labs-frontier-scheduler)
131
- - [`siliconjungle/-shapeshift-labs-frontier-logging`](https://github.com/siliconjungle/-shapeshift-labs-frontier-logging)
132
- - [`siliconjungle/-shapeshift-labs-frontier-mutation`](https://github.com/siliconjungle/-shapeshift-labs-frontier-mutation)
133
- - [`siliconjungle/-shapeshift-labs-frontier-effects`](https://github.com/siliconjungle/-shapeshift-labs-frontier-effects)
134
- - [`siliconjungle/-shapeshift-labs-frontier-auth`](https://github.com/siliconjungle/-shapeshift-labs-frontier-auth)
135
- - [`siliconjungle/-shapeshift-labs-frontier-policy`](https://github.com/siliconjungle/-shapeshift-labs-frontier-policy)
136
- - [`siliconjungle/-shapeshift-labs-frontier-flags`](https://github.com/siliconjungle/-shapeshift-labs-frontier-flags)
137
- - [`siliconjungle/-shapeshift-labs-frontier-tools`](https://github.com/siliconjungle/-shapeshift-labs-frontier-tools)
138
- - [`siliconjungle/-shapeshift-labs-frontier-sandbox`](https://github.com/siliconjungle/-shapeshift-labs-frontier-sandbox)
139
- - [`siliconjungle/-shapeshift-labs-frontier-sandbox-quickjs`](https://github.com/siliconjungle/-shapeshift-labs-frontier-sandbox-quickjs)
140
- - [`siliconjungle/-shapeshift-labs-frontier-workflow`](https://github.com/siliconjungle/-shapeshift-labs-frontier-workflow)
141
- - [`siliconjungle/-shapeshift-labs-frontier-worker`](https://github.com/siliconjungle/-shapeshift-labs-frontier-worker)
142
- - [`siliconjungle/-shapeshift-labs-frontier-queue`](https://github.com/siliconjungle/-shapeshift-labs-frontier-queue)
143
- - [`siliconjungle/-shapeshift-labs-frontier-swarm`](https://github.com/siliconjungle/-shapeshift-labs-frontier-swarm)
144
- - [`siliconjungle/-shapeshift-labs-frontier-swarm-codex`](https://github.com/siliconjungle/-shapeshift-labs-frontier-swarm-codex)
145
- - [`siliconjungle/-shapeshift-labs-frontier-lang-kernel`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-kernel)
146
- - [`siliconjungle/-shapeshift-labs-frontier-lang-parser`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-parser)
147
- - [`siliconjungle/-shapeshift-labs-frontier-lang-checker`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-checker)
148
- - [`siliconjungle/-shapeshift-labs-frontier-lang-typescript`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-typescript)
149
- - [`siliconjungle/-shapeshift-labs-frontier-lang-javascript`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-javascript)
150
- - [`siliconjungle/-shapeshift-labs-frontier-lang-rust`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-rust)
151
- - [`siliconjungle/-shapeshift-labs-frontier-lang-python`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-python)
152
- - [`siliconjungle/-shapeshift-labs-frontier-lang-c`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-c)
153
- - [`siliconjungle/-shapeshift-labs-frontier-lang-compiler`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-compiler)
154
- - [`siliconjungle/-shapeshift-labs-frontier-lang-swift`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-swift)
155
- - [`siliconjungle/-shapeshift-labs-frontier-lang-kotlin`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-kotlin)
156
- - [`siliconjungle/-shapeshift-labs-frontier-lang-java`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-java)
157
- - [`siliconjungle/-shapeshift-labs-frontier-lang-go`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-go)
158
- - [`siliconjungle/-shapeshift-labs-frontier-lang-csharp`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-csharp)
159
- - [`siliconjungle/-shapeshift-labs-frontier-lang-clang`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-clang)
160
- - [`siliconjungle/-shapeshift-labs-frontier-lang-cli`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-cli)
161
- - [`siliconjungle/-shapeshift-labs-frontier-lang`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang)
162
- - [`siliconjungle/-shapeshift-labs-frontier-kv`](https://github.com/siliconjungle/-shapeshift-labs-frontier-kv)
163
- - [`siliconjungle/-shapeshift-labs-frontier-kv-locks`](https://github.com/siliconjungle/-shapeshift-labs-frontier-kv-locks)
164
- - [`siliconjungle/-shapeshift-labs-frontier-kv-rate-limit`](https://github.com/siliconjungle/-shapeshift-labs-frontier-kv-rate-limit)
165
- - [`siliconjungle/-shapeshift-labs-frontier-kv-file`](https://github.com/siliconjungle/-shapeshift-labs-frontier-kv-file)
166
- - [`siliconjungle/-shapeshift-labs-frontier-kv-idb`](https://github.com/siliconjungle/-shapeshift-labs-frontier-kv-idb)
167
- - [`siliconjungle/-shapeshift-labs-frontier-kv-redis`](https://github.com/siliconjungle/-shapeshift-labs-frontier-kv-redis)
168
- - [`siliconjungle/-shapeshift-labs-frontier-kv-server`](https://github.com/siliconjungle/-shapeshift-labs-frontier-kv-server)
169
- - [`siliconjungle/-shapeshift-labs-frontier-assets`](https://github.com/siliconjungle/-shapeshift-labs-frontier-assets)
170
- - [`siliconjungle/-shapeshift-labs-frontier-blueprint`](https://github.com/siliconjungle/-shapeshift-labs-frontier-blueprint)
171
- - [`siliconjungle/-shapeshift-labs-frontier-triggers`](https://github.com/siliconjungle/-shapeshift-labs-frontier-triggers)
172
- - [`siliconjungle/-shapeshift-labs-frontier-virtual`](https://github.com/siliconjungle/-shapeshift-labs-frontier-virtual)
173
- - [`siliconjungle/-shapeshift-labs-frontier-table`](https://github.com/siliconjungle/-shapeshift-labs-frontier-table)
174
- - [`siliconjungle/-shapeshift-labs-frontier-scene`](https://github.com/siliconjungle/-shapeshift-labs-frontier-scene)
175
- - [`siliconjungle/-shapeshift-labs-frontier-pathfinding`](https://github.com/siliconjungle/-shapeshift-labs-frontier-pathfinding)
176
- - [`siliconjungle/-shapeshift-labs-frontier-lod`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lod)
177
- - [`siliconjungle/-shapeshift-labs-frontier-route`](https://github.com/siliconjungle/-shapeshift-labs-frontier-route)
178
- - [`siliconjungle/-shapeshift-labs-frontier-trace`](https://github.com/siliconjungle/-shapeshift-labs-frontier-trace)
179
- - [`siliconjungle/-shapeshift-labs-frontier-manifest`](https://github.com/siliconjungle/-shapeshift-labs-frontier-manifest)
180
- - [`siliconjungle/-shapeshift-labs-frontier-view`](https://github.com/siliconjungle/-shapeshift-labs-frontier-view)
181
- - [`siliconjungle/-shapeshift-labs-frontier-icons`](https://github.com/siliconjungle/-shapeshift-labs-frontier-icons)
182
- - [`siliconjungle/-shapeshift-labs-frontier-design`](https://github.com/siliconjungle/-shapeshift-labs-frontier-design)
183
- - [`siliconjungle/-shapeshift-labs-frontier-canvas`](https://github.com/siliconjungle/-shapeshift-labs-frontier-canvas)
184
- - [`siliconjungle/-shapeshift-labs-frontier-canvas-tools`](https://github.com/siliconjungle/-shapeshift-labs-frontier-canvas-tools)
185
- - [`siliconjungle/-shapeshift-labs-frontier-dnd`](https://github.com/siliconjungle/-shapeshift-labs-frontier-dnd)
186
- - [`siliconjungle/-shapeshift-labs-frontier-dom`](https://github.com/siliconjungle/-shapeshift-labs-frontier-dom)
187
- - [`siliconjungle/-shapeshift-labs-frontier-playwright`](https://github.com/siliconjungle/-shapeshift-labs-frontier-playwright)
188
- - [`siliconjungle/-shapeshift-labs-frontier-test`](https://github.com/siliconjungle/-shapeshift-labs-frontier-test)
189
- - [`siliconjungle/-shapeshift-labs-frontier-fixtures`](https://github.com/siliconjungle/-shapeshift-labs-frontier-fixtures)
190
- - [`siliconjungle/-shapeshift-labs-frontier-component-preview`](https://github.com/siliconjungle/-shapeshift-labs-frontier-component-preview)
191
- - [`siliconjungle/-shapeshift-labs-frontier-documentation`](https://github.com/siliconjungle/-shapeshift-labs-frontier-documentation)
192
- - [`siliconjungle/-shapeshift-labs-frontier-ast-walk`](https://github.com/siliconjungle/-shapeshift-labs-frontier-ast-walk)
193
- - [`siliconjungle/-shapeshift-labs-frontier-history`](https://github.com/siliconjungle/-shapeshift-labs-frontier-history)
194
- - [`siliconjungle/-shapeshift-labs-frontier-application`](https://github.com/siliconjungle/-shapeshift-labs-frontier-application)
195
- - [`siliconjungle/-shapeshift-labs-frontier-linter`](https://github.com/siliconjungle/-shapeshift-labs-frontier-linter)
196
- - [`siliconjungle/-shapeshift-labs-frontier-framework`](https://github.com/siliconjungle/-shapeshift-labs-frontier-framework)
197
- - [`siliconjungle/-shapeshift-labs-frontier-crdt`](https://github.com/siliconjungle/-shapeshift-labs-frontier-crdt)
198
- - [`siliconjungle/-shapeshift-labs-frontier-crdt-sync`](https://github.com/siliconjungle/-shapeshift-labs-frontier-crdt-sync)
199
- - [`siliconjungle/-shapeshift-labs-frontier-crdt-websocket`](https://github.com/siliconjungle/-shapeshift-labs-frontier-crdt-websocket)
200
- - [`siliconjungle/-shapeshift-labs-frontier-react`](https://github.com/siliconjungle/-shapeshift-labs-frontier-react)
201
- - [`siliconjungle/-shapeshift-labs-frontier-richtext`](https://github.com/siliconjungle/-shapeshift-labs-frontier-richtext)
202
- - [`siliconjungle/-shapeshift-labs-frontier-realtime`](https://github.com/siliconjungle/-shapeshift-labs-frontier-realtime)
203
- - [`siliconjungle/-shapeshift-labs-frontier-realtime-server`](https://github.com/siliconjungle/-shapeshift-labs-frontier-realtime-server)
204
- - [`siliconjungle/-shapeshift-labs-frontier-realtime-websocket`](https://github.com/siliconjungle/-shapeshift-labs-frontier-realtime-websocket)
205
- - [`siliconjungle/-shapeshift-labs-frontier-game`](https://github.com/siliconjungle/-shapeshift-labs-frontier-game)
206
- - [`siliconjungle/-shapeshift-labs-loom`](https://github.com/siliconjungle/-shapeshift-labs-loom)
207
-
208
- ## CLI
209
-
210
- - `loom init` creates `loom.json`, `.loomignore`, and the generated `.loom/`
211
- directories.
212
- - `loom scan` writes `.loom/graph/current.json` and
213
- `.loom/objects/source-index.json`.
214
- - `loom status` summarizes config, graph, git, and semantic import health.
215
- - `loom graph` prints the current graph summary or full graph with `--json`.
216
- - `loom diff` compares the current files against the saved graph.
217
- - `loom snapshot` stores a Git-familiar semantic snapshot: a tree object, a
218
- snapshot object, a ref update, and a reflog entry.
219
- - `loom cat-file <object-id>` prints a stored semantic object.
220
- - `loom project --to <target>` writes a projection plan under
221
- `.loom/projections/`.
222
- - `loom doctor` checks that the Frontier packages Loom uses are resolvable.
223
- - `loom swarm ...` passes through to `@shapeshift-labs/frontier-swarm-codex`.
224
-
225
- ## Programmatic API
1
+ # Loom
226
2
 
227
- ```ts
228
- import { initLoomProject, scanLoomProject, readLoomStatus } from '@shapeshift-labs/loom';
3
+ `@shapeshift-labs/loom` is the project-level CLI for semantic source graphs,
4
+ agent swarm coordination, and Frontier language tooling.
5
+
6
+ Think of it as a `.git`-like workspace layer for AI-assisted software work:
7
+ `loom init` creates a `.loom/` directory, `loom scan` imports source into a
8
+ semantic graph, `loom snapshot` writes content-addressed checkpoints, and the
9
+ delegate commands expose the lower-level Frontier tools without making users
10
+ remember each package name.
11
+
12
+ ## Install
13
+
14
+ Run with npm:
15
+
16
+ ```sh
17
+ npx @shapeshift-labs/loom help
18
+ ```
19
+
20
+ Install globally:
21
+
22
+ ```sh
23
+ npm install -g @shapeshift-labs/loom
24
+ loom init
25
+ ```
26
+
27
+ ## What It Does
28
+
29
+ Loom gives a repository a durable semantic workspace:
30
+
31
+ - `.loom/objects/` stores content-addressed graph and snapshot objects.
32
+ - `.loom/index.json` records the current imported source graph.
33
+ - `.loom/refs/` and `.loom/HEAD` track semantic graph snapshots.
34
+ - `.loom/graph/current.json` is the current machine-readable source graph.
35
+ - `.loom/projections/` stores target-language projection plans.
36
+ - `loom swarm ...` delegates to Frontier Swarm / Codex worker orchestration.
37
+ - `loom lang ...` delegates to Frontier Lang parsing, source import, slicing,
38
+ projection, and universal AST commands.
39
+ - `loom frontier ...` delegates to Frontier Framework when that optional
40
+ package is installed in the project.
41
+
42
+ The package intentionally keeps the generic workspace layer small. Heavy
43
+ capabilities live in the specialized Frontier packages and are reached through
44
+ delegates.
45
+
46
+ ## Quick Start
47
+
48
+ ```sh
49
+ loom init --name my-app --source "src/**/*.ts" --source "packages/**/*.ts"
50
+ loom scan
51
+ loom status --json
52
+ loom snapshot -m "initial semantic graph"
53
+ loom diff --json
54
+ loom project --to python
55
+ loom swarm doctor
56
+ loom lang import src/app.ts --language typescript --sidecar
57
+ ```
58
+
59
+ ## Command Reference
60
+
61
+ ### `loom init`
62
+
63
+ Creates `loom.json`, `.loomignore`, and the `.loom/` object/ref layout.
64
+
65
+ ```sh
66
+ loom init [--name <name>] [--source <glob>] [--exclude <glob>] [--language <name>] [--force]
67
+ ```
68
+
69
+ Options:
70
+
71
+ - `--name <name>`: project name written to `loom.json`.
72
+ - `--source <glob>` or `--include <glob>`: source glob. Repeatable.
73
+ - `--exclude <glob>`: ignored path or glob. Repeatable.
74
+ - `--language <name>`: expected language. Repeatable.
75
+ - `--force`: replace an existing `loom.json`.
76
+
77
+ ### `loom scan`
78
+
79
+ Imports configured source files through Frontier Lang and writes the current
80
+ semantic graph.
81
+
82
+ ```sh
83
+ loom scan [--json]
84
+ ```
85
+
86
+ Output: `.loom/graph/current.json`, `.loom/index.json`,
87
+ `.loom/objects/source-index.json`, and a content-addressed graph object.
88
+
89
+ ### `loom status`
90
+
91
+ Reports whether the project has Loom config, a current graph, git dirtiness,
92
+ semantic HEAD/ref information, installed Frontier package versions, and
93
+ delegate command availability.
94
+
95
+ ```sh
96
+ loom status [--json]
97
+ ```
98
+
99
+ ### `loom graph`
100
+
101
+ Prints `.loom/graph/current.json`.
102
+
103
+ ```sh
104
+ loom graph [--json]
105
+ ```
106
+
107
+ ### `loom diff`
108
+
109
+ Compares the saved graph with the current source tree without mutating `.loom/`.
110
+
111
+ ```sh
112
+ loom diff [--json]
113
+ ```
114
+
115
+ Output fields: `added`, `changed`, and `deleted`.
116
+
117
+ ### `loom snapshot`
118
+
119
+ Scans source, stores a tree object and snapshot object, updates `HEAD`, and
120
+ writes a reflog entry.
121
+
122
+ ```sh
123
+ loom snapshot [-m <message>] [--json]
124
+ ```
125
+
126
+ Options: `-m <message>` or `--message <message>`.
229
127
 
230
- await initLoomProject({ root: process.cwd(), name: 'my-app' });
231
- const scan = await scanLoomProject({ root: process.cwd() });
232
- const status = await readLoomStatus({ root: process.cwd() });
128
+ ### `loom cat-file`
129
+
130
+ Prints a stored Loom object by id.
131
+
132
+ ```sh
133
+ loom cat-file <object-id> [--json]
134
+ ```
135
+
136
+ Objects are JSON records with `kind`, `type`, and content-specific fields.
137
+
138
+ ### `loom project`
139
+
140
+ Creates a target-language projection plan from the current semantic graph.
141
+
142
+ ```sh
143
+ loom project --to <target> [--out <dir>] [--json]
144
+ ```
145
+
146
+ Options: `--to <target>` is required. `--out <dir>` defaults to
147
+ `.loom/projections`.
148
+
149
+ ### `loom doctor`
150
+
151
+ Checks required package resolution and reports optional delegates.
152
+
153
+ ```sh
154
+ loom doctor [--json]
155
+ ```
156
+
157
+ Required packages are Frontier core, Frontier Lang, Frontier Lang CLI, Frontier
158
+ Lang compiler, Frontier Swarm, and Frontier Swarm Codex. Frontier Framework is
159
+ reported as an optional delegate.
160
+
161
+ ### `loom swarm`
162
+
163
+ Delegates to the published Frontier Swarm Codex CLI.
164
+
165
+ ```sh
166
+ loom swarm <frontier-swarm-codex args...>
167
+ loom swarm-codex <frontier-swarm-codex args...>
168
+ ```
169
+
170
+ Examples:
171
+
172
+ ```sh
173
+ loom swarm doctor
174
+ loom swarm plan --manifest agent-ownership.json --tasks work-queue.json --outDir agent-runs/plan
175
+ loom swarm run --manifest agent-ownership.json --tasks work-queue.json --workspace copy --concurrency 8
176
+ loom swarm collect --run agent-runs/my-run
177
+ loom swarm query --run agent-runs/my-run --semantic --readiness ready
178
+ loom swarm tournament show --run agent-runs/my-run
179
+ ```
180
+
181
+ This exposes swarm planning, run/resume/stop, collect/query, merge admission,
182
+ semantic sidecar inspection, adaptive/tournament scheduling, scoring, cleanup,
183
+ repair-links, and verification commands provided by
184
+ `@shapeshift-labs/frontier-swarm-codex`.
185
+
186
+ ### `loom lang`
187
+
188
+ Delegates to the published Frontier Lang CLI.
189
+
190
+ ```sh
191
+ loom lang <frontier-lang args...>
192
+ loom frontier-lang <frontier-lang args...>
193
+ ```
194
+
195
+ Examples:
196
+
197
+ ```sh
198
+ loom lang parse model.frontier
199
+ loom lang check model.frontier --strict-effects
200
+ loom lang ast model.frontier
201
+ loom lang import src/app.ts --language typescript --sidecar
202
+ loom lang native-diff before.ts --after after.ts --language typescript
203
+ loom lang slice src/app.ts --symbol updateState --focused-command "npm test"
204
+ loom lang emit-python model.frontier
205
+ loom lang emit-rust model.frontier
206
+ ```
207
+
208
+ This exposes parsing, checking, hashing, universal AST output, native source
209
+ import, semantic sidecar generation, projection, slicing, test-slice, roundtrip,
210
+ corpus-roundtrip, and target emitters from Frontier Lang.
211
+
212
+ ### `loom frontier`
213
+
214
+ Delegates to Frontier Framework when `@shapeshift-labs/frontier-framework` is
215
+ installed in the project.
216
+
217
+ ```sh
218
+ loom frontier <frontier args...>
219
+ loom framework <frontier args...>
220
+ ```
221
+
222
+ Examples once the optional package is installed:
223
+
224
+ ```sh
225
+ loom frontier init
226
+ loom frontier doctor --json
227
+ loom frontier build --target evidence --json
228
+ loom frontier harness --json
229
+ loom frontier loop --strict --json
230
+ ```
231
+
232
+ If the optional framework package is missing, Loom exits with a clear install
233
+ message instead of failing during package installation.
234
+
235
+ ## Graph Shape
236
+
237
+ `loom scan` produces a graph shaped for agents and tools:
238
+
239
+ ```json
240
+ {
241
+ "kind": "loom.graph",
242
+ "version": 1,
243
+ "root": "/repo",
244
+ "generatedAt": "2026-06-10T00:00:00.000Z",
245
+ "summary": {
246
+ "files": 2,
247
+ "symbols": 18,
248
+ "ownershipRegions": 12,
249
+ "patchHints": 7
250
+ },
251
+ "files": [
252
+ {
253
+ "path": "src/app.ts",
254
+ "language": "typescript",
255
+ "hash": "sha256:...",
256
+ "semantic": {
257
+ "symbols": 12,
258
+ "ownershipRegions": 9,
259
+ "patchHints": 4
260
+ }
261
+ }
262
+ ],
263
+ "objectId": "sha256..."
264
+ }
265
+ ```
266
+
267
+ The graph is intentionally language-neutral. Native source import adapters map
268
+ language syntax into symbols, ownership regions, patch hints, and projection
269
+ metadata. Target emitters can then project the graph into language-specific
270
+ code or evidence plans.
271
+
272
+ ## JavaScript API
273
+
274
+ ```ts
275
+ import {
276
+ initLoomProject,
277
+ scanLoomProject,
278
+ snapshotLoomProject,
279
+ diffLoomProject,
280
+ createLoomProjectionPlan,
281
+ runDelegateCommand
282
+ } from '@shapeshift-labs/loom';
233
283
 
234
- console.log(scan.graph.summary, status.ready);
284
+ await initLoomProject({ name: 'demo', include: ['src/**/*.ts'] });
285
+ const scan = await scanLoomProject();
286
+ const snapshot = await snapshotLoomProject({ message: 'semantic checkpoint' });
287
+ const diff = await diffLoomProject();
288
+ const projection = await createLoomProjectionPlan({ target: 'python' });
289
+ await runDelegateCommand('lang', ['import', 'src/app.ts', '--sidecar']);
235
290
  ```
236
291
 
237
- ## `.loom` Layout
292
+ ## Current Boundaries
238
293
 
239
- Loom borrows Git's familiar shape without using Git's object format:
294
+ Loom is the umbrella CLI and semantic workspace layer. It does not replace the
295
+ lower-level packages:
240
296
 
241
- - `.loom/objects/xx/<hash>.json` stores immutable semantic records.
242
- - `.loom/refs/**` stores small mutable pointers to snapshot and graph objects.
243
- - `.loom/HEAD` is a symbolic ref, initialized to `refs/heads/main`.
244
- - `.loom/index.json` is the flat scan index used to create snapshots.
245
- - `.loom/logs/**` records ref updates.
297
+ Frontier Lang owns language parsing, universal ASTs, projections, and semantic
298
+ sidecars. Frontier Swarm owns worker queues, evidence, adaptive scheduling,
299
+ tournament feedback, and merge admission. Frontier Framework owns app
300
+ build/evidence/harness workflows when installed. Frontier core owns patch/diff
301
+ primitives.
246
302
 
247
- Loom is intentionally a CLI layer. The semantic AST, source import, projection,
248
- patch, swarm, and merge primitives stay in the existing Frontier packages.
303
+ That split keeps Loom stable while each specialist package evolves.
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAeA,wBAAsB,UAAU,CAAC,IAAI,WAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgD9E"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAgBA,wBAAsB,UAAU,CAAC,IAAI,WAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiD9E"}
package/dist/cli.js CHANGED
@@ -11,10 +11,13 @@ import { diffLoomProject } from './diff.js';
11
11
  import { createLoomProjectionPlan } from './project.js';
12
12
  import { catLoomObject, snapshotLoomProject } from './snapshot.js';
13
13
  import { runSwarmCommand } from './swarm.js';
14
+ import { isDelegateCommand, runDelegateCommand } from './delegate.js';
14
15
  export async function runLoomCli(argv = process.argv.slice(2)) {
15
16
  const command = argv[0] ?? 'help';
16
17
  if (command === 'swarm')
17
18
  return runSwarmCommand(argv.slice(1));
19
+ if (isDelegateCommand(command))
20
+ return runDelegateCommand(command, argv.slice(1));
18
21
  const args = parseArgs(argv.slice(1));
19
22
  const json = boolArg(args.json, false);
20
23
  try {
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,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pD;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAOvE;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAO7E;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOnF;AAED,wBAAgB,MAAM,IAAI,MAAM,CAE/B;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAa9E;AAWD,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAE9C"}
package/dist/common.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import fs from 'node:fs/promises';
2
+ import fsSync from 'node:fs';
2
3
  import path from 'node:path';
3
4
  import crypto from 'node:crypto';
4
5
  import { execFile } from 'node:child_process';
@@ -73,8 +74,24 @@ export async function packageVersion(name) {
73
74
  return String(pkg.version ?? '');
74
75
  }
75
76
  catch {
76
- return undefined;
77
+ try {
78
+ const packageRoot = packageRootForEntry(require.resolve(name));
79
+ const pkg = await readJson(path.join(packageRoot, 'package.json'));
80
+ return String(pkg.version ?? '');
81
+ }
82
+ catch {
83
+ return undefined;
84
+ }
85
+ }
86
+ }
87
+ function packageRootForEntry(entry) {
88
+ let dir = path.dirname(entry);
89
+ while (dir !== path.dirname(dir)) {
90
+ if (fsSync.existsSync(path.join(dir, 'package.json')))
91
+ return dir;
92
+ dir = path.dirname(dir);
77
93
  }
94
+ throw new Error(`could not find package root for ${entry}`);
78
95
  }
79
96
  export function printJson(value) {
80
97
  process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kB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AC,OAAO,IAAI,EAAE,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAC/D,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAuB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;YACzF,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,GAAG,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;YAAE,OAAO,GAAG,CAAC;QAClE,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,mCAAmC,KAAK,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAc;IACtC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,17 @@
1
+ export interface DelegateTarget {
2
+ packageName: string;
3
+ binName: string;
4
+ required: boolean;
5
+ description: string;
6
+ }
7
+ export declare const delegateTargets: Record<string, DelegateTarget>;
8
+ export declare function isDelegateCommand(command: string): boolean;
9
+ export declare function listDelegateTargets(): Array<{
10
+ command: string;
11
+ } & DelegateTarget>;
12
+ export declare function resolveDelegateTarget(command: string): {
13
+ target: DelegateTarget;
14
+ cliPath: string;
15
+ };
16
+ export declare function runDelegateCommand(command: string, args: string[]): Promise<number>;
17
+ //# sourceMappingURL=delegate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../src/delegate.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAqC1D,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,wBAAgB,mBAAmB,IAAI,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAAC,CAEjF;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAUlG;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAazF"}
@@ -0,0 +1,98 @@
1
+ import { spawn } from 'node:child_process';
2
+ import fs from 'node:fs';
3
+ import { createRequire } from 'node:module';
4
+ import path from 'node:path';
5
+ const require = createRequire(import.meta.url);
6
+ export const delegateTargets = {
7
+ swarm: {
8
+ packageName: '@shapeshift-labs/frontier-swarm-codex',
9
+ binName: 'frontier-swarm',
10
+ required: true,
11
+ description: 'Frontier Swarm and Codex worker orchestration.'
12
+ },
13
+ 'swarm-codex': {
14
+ packageName: '@shapeshift-labs/frontier-swarm-codex',
15
+ binName: 'frontier-swarm-codex',
16
+ required: true,
17
+ description: 'Explicit Frontier Swarm Codex adapter alias.'
18
+ },
19
+ lang: {
20
+ packageName: '@shapeshift-labs/frontier-lang-cli',
21
+ binName: 'frontier-lang',
22
+ required: true,
23
+ description: 'Frontier Lang parse, check, import, projection, and slice tools.'
24
+ },
25
+ 'frontier-lang': {
26
+ packageName: '@shapeshift-labs/frontier-lang-cli',
27
+ binName: 'frontier-lang',
28
+ required: true,
29
+ description: 'Explicit Frontier Lang CLI alias.'
30
+ },
31
+ frontier: {
32
+ packageName: '@shapeshift-labs/frontier-framework',
33
+ binName: 'frontier',
34
+ required: false,
35
+ description: 'Frontier Framework app, evidence, harness, and build tools.'
36
+ },
37
+ framework: {
38
+ packageName: '@shapeshift-labs/frontier-framework',
39
+ binName: 'frontier',
40
+ required: false,
41
+ description: 'Explicit Frontier Framework CLI alias.'
42
+ }
43
+ };
44
+ export function isDelegateCommand(command) {
45
+ return Boolean(delegateTargets[command]);
46
+ }
47
+ export function listDelegateTargets() {
48
+ return Object.entries(delegateTargets).map(([command, target]) => ({ command, ...target }));
49
+ }
50
+ export function resolveDelegateTarget(command) {
51
+ const target = delegateTargets[command];
52
+ if (!target)
53
+ throw new Error(`unknown delegated command: ${command}`);
54
+ const packageRoot = findPackageRoot(target.packageName);
55
+ const packageJson = JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf8'));
56
+ const bin = typeof packageJson.bin === 'string' ? packageJson.bin : packageJson.bin?.[target.binName];
57
+ if (!bin)
58
+ throw new Error(`${target.packageName} does not expose bin ${target.binName}`);
59
+ return { target, cliPath: path.join(packageRoot, bin) };
60
+ }
61
+ export async function runDelegateCommand(command, args) {
62
+ let cliPath;
63
+ try {
64
+ cliPath = resolveDelegateTarget(command).cliPath;
65
+ }
66
+ catch (error) {
67
+ process.stderr.write(delegateErrorMessage(command, error));
68
+ return 1;
69
+ }
70
+ return new Promise((resolve, reject) => {
71
+ const child = spawn(process.execPath, [cliPath, ...args], { stdio: 'inherit' });
72
+ child.on('error', reject);
73
+ child.on('close', (code) => resolve(code ?? 1));
74
+ });
75
+ }
76
+ function findPackageRoot(packageName) {
77
+ let entry;
78
+ try {
79
+ entry = require.resolve(packageName);
80
+ }
81
+ catch {
82
+ throw new Error(`package is not installed: ${packageName}`);
83
+ }
84
+ let dir = path.dirname(entry);
85
+ while (dir !== path.dirname(dir)) {
86
+ if (fs.existsSync(path.join(dir, 'package.json')))
87
+ return dir;
88
+ dir = path.dirname(dir);
89
+ }
90
+ throw new Error(`could not find package root for ${packageName}`);
91
+ }
92
+ function delegateErrorMessage(command, error) {
93
+ const target = delegateTargets[command];
94
+ const detail = error instanceof Error ? error.message : String(error);
95
+ const installHint = target?.required === false ? `Install ${target.packageName} to enable loom ${command}.\n` : '';
96
+ return `loom ${command} is unavailable: ${detail}\n${installHint}`;
97
+ }
98
+ //# sourceMappingURL=delegate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegate.js","sourceRoot":"","sources":["../src/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAS/C,MAAM,CAAC,MAAM,eAAe,GAAmC;IAC7D,KAAK,EAAE;QACL,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,gBAAgB;QACzB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,gDAAgD;KAC9D;IACD,aAAa,EAAE;QACb,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,sBAAsB;QAC/B,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,8CAA8C;KAC5D;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,oCAAoC;QACjD,OAAO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AC,WAAW,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,6BAA6B,WAAW,EAAE,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,GAAG,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;YAAE,OAAO,GAAG,CAAC;QAC9D,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,mCAAmC,WAAW,EAAE,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,oBAAoB,CAAC,OAAe,EAAE,KAAc;IAC3D,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtE,MAAM,WAAW,GAAG,MAAM,EAAE,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,WAAW,mBAAmB,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IACnH,OAAO,QAAQ,OAAO,oBAAoB,MAAM,KAAK,WAAW,EAAE,CAAC;AACrE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,IAAI,MAAM,CAuBjC"}
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,IAAI,MAAM,CA6BjC"}
package/dist/help.js CHANGED
@@ -12,6 +12,10 @@ Usage:
12
12
  loom project --to <target> [--out <dir>] [--json]
13
13
  loom doctor [--json]
14
14
  loom swarm <frontier-swarm-codex args...>
15
+ loom swarm-codex <frontier-swarm-codex args...>
16
+ loom lang <frontier-lang args...>
17
+ loom frontier <frontier args...>
18
+ loom framework <frontier args...>
15
19
 
16
20
  Examples:
17
21
  loom init --name emulator --source "src/**/*.ts"
@@ -20,6 +24,8 @@ Examples:
20
24
  loom cat-file <object-id> --json
21
25
  loom project --to rust
22
26
  loom swarm collect --run agent-runs/my-run
27
+ loom lang import src/app.ts --sidecar --out .loom/semantic-imports.json
28
+ loom frontier doctor --json
23
29
  `;
24
30
  }
25
31
  //# sourceMappingURL=help.js.map
package/dist/help.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ;IACtB,OAAO;;;;;;;;;;;;;;;;;;;;;CAqBR,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ;IACtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BR,CAAC;AACF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { parseArgs } from './args.js';
2
2
  export { createLoomConfig, readLoomConfig, writeLoomConfig } from './config.js';
3
3
  export { diffLoomProject } from './diff.js';
4
+ export { isDelegateCommand, listDelegateTargets, resolveDelegateTarget, runDelegateCommand } from './delegate.js';
4
5
  export { readLoomGraph } from './graph.js';
5
6
  export { initLoomProject } from './init.js';
6
7
  export { createLoomProjectionPlan } from './project.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,cAAc,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AC;AACxD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EACV,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export { parseArgs } from './args.js';
2
2
  export { createLoomConfig, readLoomConfig, writeLoomConfig } from './config.js';
3
3
  export { diffLoomProject } from './diff.js';
4
+ export { isDelegateCommand, listDelegateTargets, resolveDelegateTarget, runDelegateCommand } from './delegate.js';
4
5
  export { readLoomGraph } from './graph.js';
5
6
  export { initLoomProject } from './init.js';
6
7
  export { createLoomProjectionPlan } from './project.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAClH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAa,MAAM,YAAY,CAAC;AAU/D,wBAAsB,cAAc,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAsBhG;AAED,wBAAsB,iBAAiB,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAUnG"}
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAa,MAAM,YAAY,CAAC;AAY/D,wBAAsB,cAAc,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAuBhG;AAED,wBAAsB,iBAAiB,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAanG"}
package/dist/status.js CHANGED
@@ -1,12 +1,15 @@
1
1
  import { abs, gitDirtyCount, packageVersion, pathExists, readJson, resolveRoot } from './common.js';
2
2
  import { readLoomConfig } from './config.js';
3
+ import { listDelegateTargets } from './delegate.js';
3
4
  import { readHeadRef, readRef } from './store.js';
4
- const frontierPackages = [
5
- '@shapeshift-labs/frontier',
6
- '@shapeshift-labs/frontier-lang',
7
- '@shapeshift-labs/frontier-lang-compiler',
8
- '@shapeshift-labs/frontier-swarm',
9
- '@shapeshift-labs/frontier-swarm-codex'
5
+ const packageChecks = [
6
+ { name: '@shapeshift-labs/frontier', required: true },
7
+ { name: '@shapeshift-labs/frontier-lang', required: true },
8
+ { name: '@shapeshift-labs/frontier-lang-cli', required: true },
9
+ { name: '@shapeshift-labs/frontier-lang-compiler', required: true },
10
+ { name: '@shapeshift-labs/frontier-swarm', required: true },
11
+ { name: '@shapeshift-labs/frontier-swarm-codex', required: true },
12
+ { name: '@shapeshift-labs/frontier-framework', required: false }
10
13
  ];
11
14
  export async function readLoomStatus(options = {}) {
12
15
  const root = resolveRoot(options.root);
@@ -28,24 +31,28 @@ export async function readLoomStatus(options = {}) {
28
31
  headRef,
29
32
  headObject,
30
33
  graphSummary: graph?.summary,
31
- packages
34
+ packages,
35
+ delegates: listDelegateTargets()
32
36
  };
33
37
  }
34
38
  export async function doctorLoomProject(options = {}) {
35
39
  const status = await readLoomStatus(options);
36
40
  const packages = status.packages;
37
- const missing = Object.entries(packages).filter(([, version]) => !version).map(([name]) => name);
41
+ const required = new Set(packageChecks.filter((item) => item.required).map((item) => item.name));
42
+ const missing = Object.entries(packages).filter(([name, version]) => required.has(name) && !version).map(([name]) => name);
43
+ const optionalMissing = Object.entries(packages).filter(([name, version]) => !required.has(name) && !version).map(([name]) => name);
38
44
  return {
39
45
  ok: missing.length === 0,
40
46
  message: missing.length ? `missing packages: ${missing.join(', ')}` : 'frontier package resolution ok',
41
47
  status,
42
- missing
48
+ missing,
49
+ optionalMissing
43
50
  };
44
51
  }
45
52
  async function readPackageVersions() {
46
53
  const out = {};
47
- for (const name of frontierPackages)
48
- out[name] = await packageVersion(name);
54
+ for (const item of packageChecks)
55
+ out[item.name] = await packageVersion(item.name);
49
56
  return out;
50
57
  }
51
58
  //# sourceMappingURL=status.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGlD,MAAM,gBAAgB,GAAG;IACvB,2BAA2B;IAC3B,gCAAgC;IAChC,yCAAyC;IACzC,iCAAiC;IACjC,uCAAuC;CACxC,CAAC;AAEF,MAAM,CAAC,KAAK,U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ources":["../src/swarm.ts"],"names":[],"mappings":"AAEA,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAErE"}
package/dist/swarm.js CHANGED
@@ -1,14 +1,5 @@
1
- import { spawn } from 'node:child_process';
2
- import path from 'node:path';
3
- import { createRequire } from 'node:module';
4
- const require = createRequire(import.meta.url);
1
+ import { runDelegateCommand } from './delegate.js';
5
2
  export async function runSwarmCommand(args) {
6
- const pkgPath = require.resolve('@shapeshift-labs/frontier-swarm-codex/package.json');
7
- const cli = path.join(path.dirname(pkgPath), 'dist', 'cli.js');
8
- return new Promise((resolve, reject) => {
9
- const child = spawn(process.execPath, [cli, ...args], { stdio: 'inherit' });
10
- child.on('error', reject);
11
- child.on('close', (code) => resolve(code ?? 1));
12
- });
3
+ return runDelegateCommand('swarm', args);
13
4
  }
14
5
  //# sourceMappingURL=swarm.js.map
package/dist/swarm.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"swarm.js","sourceRoot":"","sources":["../src/swarm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAc;IAClD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,oDAAoD,CAAC,CAAC;IACtF,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC/D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC5E,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC1B,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"swarm.js","sourceRoot":"","sources":["../src/swarm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAc;IAClD,OAAO,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshift-labs/loom",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Repo-level semantic collaboration CLI over Frontier Lang, Frontier Swarm, and Frontier patches.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,6 +65,7 @@
65
65
  "dependencies": {
66
66
  "@shapeshift-labs/frontier": "0.1.9",
67
67
  "@shapeshift-labs/frontier-lang": "0.4.66",
68
+ "@shapeshift-labs/frontier-lang-cli": "0.3.40",
68
69
  "@shapeshift-labs/frontier-lang-compiler": "0.2.80",
69
70
  "@shapeshift-labs/frontier-swarm": "0.5.19",
70
71
  "@shapeshift-labs/frontier-swarm-codex": "0.5.83"