dreamteamer 0.50.0 → 0.51.0
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/bin/dreamteamer.js +16 -148
- package/collections/modules.collection.yaml +1 -1
- package/collections/repos.collection.yaml +1 -1
- package/dist/api.d.ts +1 -2
- package/dist/api.js +0 -1
- package/dist/changes/commitPending.js +2 -12
- package/dist/changes/consts.d.ts +1 -1
- package/dist/changes/consts.js +1 -1
- package/dist/changes/deriveEvents.d.ts +1 -3
- package/dist/changes/deriveEvents.js +8 -11
- package/dist/changes/foldChanges.d.ts +1 -2
- package/dist/changes/foldChanges.js +2 -3
- package/dist/changes/groupChanges.d.ts +1 -4
- package/dist/changes/groupChanges.js +2 -6
- package/dist/changes/lib/reportLine.d.ts +1 -1
- package/dist/changes/lib/reportLine.js +2 -2
- package/dist/changes/printChanges.d.ts +1 -1
- package/dist/changes/printChanges.js +2 -2
- package/dist/changes/recordChanges.d.ts +0 -1
- package/dist/changes/recordChanges.js +0 -2
- package/dist/changes/rowChanges.js +0 -3
- package/dist/changes/types.d.ts +0 -2
- package/dist/check/check.js +82 -188
- package/dist/check/unreadData.js +1 -2
- package/dist/cli.js +1 -2
- package/dist/collections/renameCollection.js +0 -5
- package/dist/commands/compileCommand.js +2 -2
- package/dist/commands/exportsCommand.js +1 -4
- package/dist/commands/fmtCommand.js +1 -2
- package/dist/commands/lib/unknownVerb.js +1 -1
- package/dist/commands/relationsCommand.js +2 -7
- package/dist/commands/updateCommand.js +3 -11
- package/dist/compile/compile.js +21 -86
- package/dist/compile/consts.js +1 -2
- package/dist/compile/lib/compileCollections.d.ts +4 -8
- package/dist/compile/lib/compileCollections.js +5 -97
- package/dist/compile/types.d.ts +0 -9
- package/dist/exports/planExports.d.ts +2 -2
- package/dist/exports/planExports.js +9 -24
- package/dist/exports/runExports.d.ts +2 -3
- package/dist/exports/runExports.js +72 -81
- package/dist/extensions/declaredExtensions.d.ts +2 -3
- package/dist/extensions/declaredExtensions.js +2 -30
- package/dist/fmt/formatDescriptors.d.ts +1 -1
- package/dist/fmt/formatDescriptors.js +1 -1
- package/dist/init/init.js +0 -1
- package/dist/init/seedBlock.js +0 -1
- package/dist/install/applyInstall.js +3 -13
- package/dist/install/installCommand.js +0 -6
- package/dist/install/npmAndCompile.js +1 -1
- package/dist/install/observeState.d.ts +0 -1
- package/dist/install/observeState.js +0 -23
- package/dist/install/planInstall.js +0 -10
- package/dist/lib/consts.js +1 -1
- package/dist/modules/removeModule.js +0 -3
- package/dist/modules/renameModule.js +0 -7
- package/dist/modules/runModuleScript.d.ts +1 -2
- package/dist/modules/runModuleScript.js +1 -2
- package/dist/modules/setModule.js +1 -1
- package/dist/record/exportsContext.d.ts +2 -10
- package/dist/record/exportsContext.js +5 -33
- package/dist/record/pathToRecord.js +7 -8
- package/dist/record/regenerate.d.ts +4 -5
- package/dist/record/regenerate.js +5 -5
- package/dist/record/sees.d.ts +2 -2
- package/dist/record/sees.js +3 -3
- package/dist/record/storageOf.js +1 -7
- package/dist/record/types.d.ts +7 -10
- package/dist/records/history.d.ts +1 -1
- package/dist/records/history.js +1 -1
- package/dist/records/lib/landedIn.d.ts +1 -1
- package/dist/records/lib/landedIn.js +1 -1
- package/dist/records/recordsCommand.js +2 -2
- package/dist/repos/lib/relPath.js +3 -4
- package/dist/repos/materializeRepo.js +1 -1
- package/dist/runtime/exportsFacts.d.ts +1 -13
- package/dist/runtime/exportsFacts.js +2 -6
- package/dist/scripts/migrate-stubs.js +54 -72
- package/dist/statusCommand.js +2 -83
- package/dist/store/Store.d.ts +13 -31
- package/dist/store/Store.js +17 -51
- package/dist/store/add.js +1 -1
- package/dist/store/addedDates.js +5 -5
- package/dist/store/external.d.ts +1 -3
- package/dist/store/external.js +2 -12
- package/dist/store/lib/applyMirrorEdits.js +2 -3
- package/dist/store/lib/assertUnambiguous.js +1 -1
- package/dist/store/lib/checkRefs.d.ts +2 -5
- package/dist/store/lib/checkRefs.js +4 -7
- package/dist/store/lib/commit.js +3 -6
- package/dist/store/lib/idsKey.js +2 -3
- package/dist/store/lib/indexAdd.js +0 -2
- package/dist/store/lib/validate.d.ts +1 -2
- package/dist/store/lib/validate.js +2 -2
- package/dist/store/lib/walkIds.js +0 -23
- package/dist/store/recordFiles.js +1 -4
- package/dist/store/recordRoot.js +0 -7
- package/dist/store/rename.js +2 -11
- package/dist/store/revert.js +2 -2
- package/dist/store/set.js +1 -1
- package/dist/store/types.d.ts +0 -5
- package/dist/store/vouched.d.ts +2 -2
- package/dist/store/vouched.js +4 -5
- package/dist/types.d.ts +3 -37
- package/dist/usage.d.ts +1 -1
- package/dist/usage.js +18 -28
- package/dist/workspace/discoverModules.d.ts +2 -4
- package/dist/workspace/discoverModules.js +5 -43
- package/dist/workspace/findWorkspace.js +3 -3
- package/dist/workspace/lib/aheadCount.d.ts +1 -1
- package/dist/workspace/lib/aheadCount.js +1 -1
- package/dist/workspace/types.d.ts +2 -7
- package/package.json +1 -1
- package/skills/using-dreamteamer/SKILL.md +9 -10
- package/skills/using-dreamteamer/references/before-you-build.md +2 -2
- package/skills/using-dreamteamer/references/changes.md +6 -7
- package/skills/using-dreamteamer/references/collections.md +22 -91
- package/skills/using-dreamteamer/references/records.md +1 -2
- package/skills/using-dreamteamer/references/writing-a-module.md +2 -2
- package/dist/changes/layerOf.d.ts +0 -6
- package/dist/changes/layerOf.js +0 -12
- package/dist/install/buildClone.d.ts +0 -5
- package/dist/install/buildClone.js +0 -22
- package/dist/install/commitOf.d.ts +0 -1
- package/dist/install/commitOf.js +0 -2
- package/dist/install/install.d.ts +0 -8
- package/dist/install/install.js +0 -177
- package/dist/install/installClone.d.ts +0 -6
- package/dist/install/installClone.js +0 -32
- package/dist/install/isLink.d.ts +0 -1
- package/dist/install/isLink.js +0 -9
- package/dist/install/offRef.d.ts +0 -7
- package/dist/install/offRef.js +0 -19
- package/dist/record/ownersReadIn.d.ts +0 -9
- package/dist/record/ownersReadIn.js +0 -11
- package/dist/update/update.d.ts +0 -7
- package/dist/update/update.js +0 -57
- package/dist/workspace/declaredGitModules.d.ts +0 -51
- package/dist/workspace/declaredGitModules.js +0 -89
- package/dist/workspace/layerEntries.d.ts +0 -16
- package/dist/workspace/layerEntries.js +0 -36
package/dist/usage.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const USAGE = "usage: dreamteamer <verb> [<target>] [flags]\n\n --workspace, -w <name|path>\n run the verb in another workspace: a record layer this workspace declares, by\n its git_modules name, or any workspace by path. A path resolves from the\n directory you typed it in; every other path in the command resolves inside the\n target. The working directory is unchanged, and the flag reaches this command\n only: a process it starts resolves its own workspace from its own directory.\n --vault <path> deprecated \u2014 the old spelling of --workspace, still honoured.\n\nrecord verbs (hard validation \u2014 invalid writes are rejected before disk).\nA <target> is either a collection name or a <collection>/<id> reference; the reference splits at\nthe longest DECLARED collection prefix, so finance/transactions/2026/03/coffee is ONE argument:\n list <collection> [--filter k=v] [--where <json>] [--sort [-]<field>] [--json]\n (--filter is ONE condition \u2014 repeat it to AND more\n (--filter a=1 --filter b=2 wants both);\n anything compound goes in one --where, operator\n objects e.g. '{\"starts\":{\"_gte\":\"2026-07-01\"}}' \u2014\n operators: _eq _neq _lt _lte _gt _gte _in _nin\n _null _empty _contains _starts_with _ends_with\n _between _regex _and _or, plus _n*/_i* negated and\n case-insensitive variants; date-times sort and\n compare as instants, across offsets; an enum\n sorts in its declared order)\n get <collection>/<id> [--json] (--json, and each list --json row, adds $file and\n $repo: where the record is read from and the repo\n that commits it \u2014 null outside every repo here)\n [--referrer <collection>/<id>] an id no root holds is\n named from the referrer's repo's exports manifest\n add <collection> [\"<title>\"] --<field> <value> \u2026 [--id <explicit-id>]\n (ONE bare positional fills the collection's title\n field \u2014 the one its record_title opens with \u2014 so\n dt add task \"call the bank\" is\n dt add tasks --name \"call the bank\".\n a format: binary collection takes --from <path>\n instead \u2014 the file IS the record, fields derive;\n --force replaces an existing file record.\n A repeated --<field> is one ELEMENT of an array\n field \u2014 refused on a scalar one; a single value\n still splits on commas)\n set <collection>/<id> <field>=<value> \u2026 (repeating a pair adds an element, exactly as a\n repeated --<field> does)\n rm <collection>/<id> [--force]\n rename <collection>/<id> <new-id> (rewrites all inbound refs in one WRITE \u2014\n commit publishes the set together)\n reorder <collection>/<id> --after|--before <id> | --top | --bottom\n reorder <collection> --init (place every record that has no position yet \u2014 the collection's `type: position` field)\n values <collection> <field> [--limit n] (the vocabulary a field actually uses \u2014\n what a filter/validator offers as choices)\n history <collection>/<id> [--json] (git revisions of this record, newest first)\n diff <collection>/<id> [--hash <sha>] (the patch one revision applied; defaults to HEAD)\n revert <collection>/<id> --hash <sha> (restore the content at <sha> as a pending write)\n next <collection>[/<id>] [--ids <id>,\u2026] (which bound commands apply, and in which state:\n available / done / not-applicable \u2014 what can\n happen to this record next)\n relations [<collection>] (every two-way pair: owner.field \u2192 target.mirror)\n relations rebuild <collection> [--drop <f>] (regenerate mirror VALUES from the owning side;\n --drop removes a stale ex-mirror key from records)\n relocate <target> [--dry-run] [--json] (move record FILES to where the compiled descriptor\n puts them \u2014 a record stored under another\n collection (storage.under) whose folder disagrees\n with its owner field, or a file record in a\n collection that became shape: folder. Ids and\n references never change; a pending edit on a\n moved file, or a dangling owner, refuses the whole\n plan \u2014 commit, or fix the field, first)\n relocate <collection> --to-root [--dry-run] (the REVERSE: every placed record back into the\n collection's own folder, ids unchanged \u2014 the step\n before removing or changing storage.under)\n resolve '<string>' | <collection>/<id> <field>\n (render ${env:NAME} \u00B7 ${workspaceFolder} \u00B7\n ${userHome} \u2014 the ONLY substitution point; a\n record keeps the template verbatim. An array\n field prints one item per line)\n\nsystem verbs \u2014 the SAME verbs, on the entities the compiler materializes (modules, collections,\nskills, agents, commands, command-bindings, ui-views, mixins, and any kind an\ninstalled extension adds). \u26A0 ONE\ndifference in POLICY, not in spelling: a SYSTEM write commits itself, because an uncompilable or\nunpublished schema is not a state a workspace should sit in; a RECORD write does not \u2014 `commit`\npublishes it. The commit lands in the repo that holds the source, so a write into a git module\ncommits there.\n add collections --name <name> [--module <m>] [--namespace <ns>] [--mixins docs,\u2026]\n [--id-from '{{ \u2026 }}'] [--description \"\u2026\"] [--suffix <s>]\n (--namespace health --name doctors === --name\n health/doctors; a module declaring exactly ONE\n namespace infers it, and the resolved name is echoed.\n --namespace '' means no namespace)\n add modules --name <id> [--description \"\u2026\"] [--namespace <ns>] [--extension] [--package <npm name>]\n (modules/<id>/ + every kind folder + package.json + README.md,\n floored on this engine. --namespace DECLARES it in the module\n (\u00A78), so every later `add collections --module <id>` infers it.\n --extension adds src/extension.js with a one-token setup unit;\n --package names it for npm and makes it publishable \u2014 the\n folder stays the id. Without it, folder = package name = id.\n the git shape is `install --clone <url> [name]`)\n add skills --name <id> --description \"\u2026\" (skills/<id>/SKILL.md \u2014 --description is required,\n because an undescribed skill is undiscoverable)\n add ui-views --route </route> --scope collection --collection collections/<c>\n [--id <id>] [display.list.layout=<id>] [k.v=\u2026]\n set <system>/<id> <field>=<value> \u2026 (collections: description \u00B7 use_when \u00B7 title \u00B7\n singular \u00B7 record_title \u00B7 sensitive \u00B7 internal \u00B7\n display.nav.icon \u00B7 display.nav.order \u00B7\n display.nav.section \u00B7 display.list.columns \u00B7\n display.list.sort, plus module=<m>, which MOVES it.\n modules: description \u00B7 namespaces \u00B7 dependencies \u00B7\n peer_collections, record-shaped (modules/core).\n ui-views: dotted keys \u2014 display.list.sort=-date. An\n empty value REMOVES the key; quote it to write the\n empty string itself ('display.list.sort=\"\"').\n skills/agents/commands/\u2026: frontmatter keys)\n rm <system>/<id> [--force] [--dry-run]\n rename <system>/<id> <new-id> (a collection's rename moves its records, re-suffixes\n the files and rewrites every inbound ref, ONE commit)\n reorder collections/<c> \u2026 (refused since 0.49: the nav's order is nav.yaml \u2014 the\n sidebar's Move entries or a hand edit; display.nav.order\n compiles and moves no row)\n get collections/<c> [--module <m>] (--module prints ONE module's source contribution\n rather than the merged descriptor)\n list modules | collections | skills | \u2026 (id \u00B7 location \u00B7 path \u00B7 namespaces \u00B7 package name)\n revert <system>/<id> (refused: its source is in git \u2014\n `git checkout <sha> -- <path>` then `dt compile`)\n fmt [<collection>] [--dry-run] (collection and mixin sources in block style, top-level\n keys in canonical order; fields, the keys inside a\n field and every comment stay where they are. Sources\n under git_modules/ and node_modules/ are skipped)\n\nfield verbs \u2014 a field is the one sub-entity, and it has verbs of its own (there is no `fields`\ncollection: the ENGINE does not read one, and `rename-field` was the only capability it would buy):\n add-field <collection> --name <field> [--type <type>] [--many] [--required]\n [--enum a,b] [--default-value v] [--unique] [--mirror-of <field>]\n [--on-delete restrict|set-null] [--soft] [--sensitive] [--body]\n [--description \"\u2026\"] [--module <m>]\n types: string markdown boolean integer number date datetime url email\n reference map position, a collection name (a reference), or\n a,b for a union of collections (an object's sub-fields are\n authored in the descriptor). --many makes it a list; a\n date-time may be written as \"2026-07-28 12:00\" and the local\n offset is stamped on for you.\n --mirror-of <field> makes this the generated, read-only mirror of the\n --type collection's <field>, which references this one; a unique key\n mirrors as one record, any other as a list.\n --soft lets a reference name a record that does not exist (yet); the\n value must still name one of its collections.\n --body marks the field a record's PROSE lands in (the text after the\n frontmatter): --type markdown, one per collection, and it stays last.\n A field the collection's module does not own lands in an OVERLAY\n (--module names the module; it must depend on the owner).\n set-field <collection> --name <field> [the add-field flags] [--module <m>]\n (each flag changes the key it names and nothing else; an empty value\n clears it \u2014 --enum= --default-value= \u2014 and false clears a switch \u2014\n --unique false. set-field never moves a field.)\n rm-field <collection> --name <field> [--module <m>] [--dry-run]\n (clears the field's VALUES in the same write, and reports the count;\n prunes it from its own columns, sort, badge and sections, and refuses\n naming every other position that still names it)\n rename-field <collection> --name <field> --to <new-name> [--dry-run]\n (rewrites the key in every record AND every position that names the\n field: the collection's sources, templates, ids.from, display,\n constraints, storage.under.parent, a mirror's mirror_of, a ui-view's\n filter and display, a binding's conditions. ONE commit; a position it\n cannot rewrite is refused by name, and --dry-run lists each one)\n rename-value <collection> <field> <old> <new> [--dry-run]\n (renames one enum value: the enum, its default, a constraint's const or\n enum, view filters, binding conditions and every record. ONE commit)\n\nEvery <collection> above may be spelled in the SINGULAR: dt add task \u2026, dt get task/<id>,\ndt list meeting-analysis, dt add-field task \u2026. The singular is derived from the descriptor\n(tasks \u2192 task, companies \u2192 company) and authored on it as singular: where inflection is\nwrong (people \u2192 person); compile refuses two collections whose words collide. A REFERENCE\ninside a record still names the collection in full \u2014 tasks/kickoff, never task/kickoff.\n\nEvery verb that MOVES records or CLEARS values takes --dry-run and prints its plan first:\n records N \u00B7 refs M \u00B7 descriptors K \u00B7 values cleared V\n\nworkspace verbs:\n init from a folder to a workspace in ONE command: pins the engine that runs it (exactly),\n writes the skeleton, installs, compiles, checks, runs the safe part of any declared\n module's setup, makes the folder a git repository when it is not one and commits what\n it wrote (inside a repository: the same scoped commit, your staged work untouched).\n Refused before any write: an engine of another version declared, locked or installed\n (never upgraded \u2014 dt update --engine), and a path it writes that links out of the\n folder. Re-run it to resume \u2014 a repeat changes nothing.\n [--no-git] [--git <remote-url>] (adds origin, never pushes) [--no-compile]\n [--from <dir>] (a preset's missing packages from a folder of tarballs, offline)\n [--input <id>=<value>]\u2026 [--allow <kind>]\u2026 [--no-input] (a preset's setup, as `setup`)\n [--harnesses claude-code,codex,pi,gemini-cli,cursor] [--workspace_module <name>]\n --version print the engine version (works anywhere)\n install make THIS checkout ready \u2014 the engine, .env (linked from the primary when this is a\n worktree), declared local assets, git modules, compile, and a declared postinstall.\n Idempotent: it prints a board of what it found and what it did\n [--dry-run] plan only [--json] the board as data\n [--link-env] link .env even into a worktree OUTSIDE the primary root\n install --hook | --print-adapters\n --hook: read a harness hook's JSON payload from stdin and install the checkout its\n `cwd` names \u2014 the process cwd is the harness's, never the worktree's\n --print-adapters: print the hook snippet for each declared harness, with every hook an\n installed extension adds. Merging it into the harness's own settings file is the\n operator's act \u2014 the engine never writes one\n install repos/<id> | repos --all [--json]\n materialize an attached repo's working tree ON DEMAND \u2014 never as part of making a\n checkout ready; --all is the explicit opt-in, e.g. before going offline\n install <spec>\u2026 [--from <dir>] bring a MODULE in: a name, name@version, ./file.tgz,\n ./folder (a development link) or a git URL \u2014 installs it and every module its\n dreamteamer.dependencies names, and a module preset's members at the versions it pins\n (refusing, before npm writes anything, a package with no dreamteamer key, an engine\n floor this engine does not meet, a ring, and a version installed differently), pins\n exact versions, compiles, merges the shipped nav fragments into nav.yaml, runs the\n safe part of the module's setup and commits package.json, package-lock.json, nav.yaml\n and what setup wrote. Without a version: npm's latest. --from resolves names from a\n folder of tarballs (offline). Old nav settings with no nav.yaml refuse a package that\n ships a nav fragment until migrated; [--allow nav-reset] starts from the fragments.\n Setup flags as for `setup`: [--input <id>=<value>]\u2026 [--allow <kind>]\u2026 [--no-input];\n [--no-commit] [--json]\n Exit 0 done \u00B7 1 refused or failed (nothing half-written) \u00B7 2 usage \u00B7 3 input missing\n install --clone <url> [name] attach a git module to this workspace\n update <name>[@<version>] | --engine move ONE npm pin forward on purpose: to the latest\n release (or the named version), re-pinned exactly, closure-checked as install is,\n compiled, committed; a module preset moves its installed members to its new pins.\n A downgrade needs [--allow downgrade]; old nav settings with no nav.yaml refuse a\n module update until migrated, or [--allow nav-reset]; a development link is skipped\n and named; [--from <dir>] resolves from a folder of tarballs; [--no-commit]\n update pull git_modules clones forward (ff-only on the lockfile ref), rebuild,\n then compile; [<name>] updates just one. dirty clones are skipped\n compile materialize modules + workspace sources into .dreamteamer (+ harness adapters)\n [--watch] recompile on source changes\n check validate every record against the compiled descriptors (report-only), then every\n installed extension's own checks. A reference this workspace's own records reach only\n through a record layer is a \u26A0 line until its exports manifest lists it (a reader\n without that layer sees it dangle); a reference no root answers is external when the\n referring repo's manifest vouches for it. nav.yaml: a name that resolves to nothing or\n is listed twice is a \u26A0 line, never a violation\n [--strict-export] makes each unlisted one, and a stale manifest, a violation\n modules/<id> --alone: is that inline module publishable \u2014 packed, installed into a fresh\n workspace on this engine with only its declared dependencies, compiled, checked; exit 0\n publishable, 1 refused naming why, 2 usage [--keep] leaves the temp workspace\n exports write this workspace's dreamteamer-exports.json \u2014 each id its records name that no file\n here holds, with its label and the workspace holding it \u2014 and commit that one file\n [--layer <name>] that layer's, from this workspace's view [--dry-run] [--json]\n doctor what works on this machine \u2014 the engine, then each extension's checks \u2014 as one board:\n READY / DEGRADED / UNAVAILABLE, each fix on its row. Exit 0 [--strict] exit 1 when\n anything is UNAVAILABLE [--json]\n setup [<unit>] drive the setup a module declares \u2014 resume, repair, verify, sign in. The\n engine names no module: a unit is what an installed package contributes (dt status\n lists them). Inputs: [--input <id>=<value>]\u2026 (or <unit>.<id>=; then the environment,\n then the declared default; a terminal asks for what is still missing, [--no-input]\n never asks \u2192 exit 3 with the ids). Effects: workspace-file writes run; download,\n network and machine ask y/n in a terminal or run under [--allow <kind>]\u2026; an account\n step (sign-in, consent) runs only under [--authorize], in a terminal. [--verify] runs\n the unit's live check and writes its receipt. [--skip] records the skip in\n package.json (dt setup <unit> clears it). [--json] the result as data.\n Exit 0 done (pending and blocked steps printed) \u00B7 1 a unit's apply failed \u00B7 2 usage \u00B7 3 a required input missing\n status workspace status: compiled runtime freshness, per-module channel/ref, staleness\n run <module> [<script> [<arg>\u2026]] run a script a module declares (dreamteamer.scripts) by\n NAME, never by its path inside the package: on this node, at the workspace root, every\n argument after the script passed to it untouched, its exit code returned. The module is\n its package name or its id; modules/<id> and a git_modules clone shadow the installed\n package, as for extensions. Without a script: list the module's scripts.\n Exit: the script's \u00B7 1 no such module, script or file \u00B7 2 usage\n\n changes the records created / updated / deleted in every repo that holds records \u2014 the\n workspace and each record layer \u2014 grouped by collection, each with its path, layer\n and whether it is committed. Its first line is the report a reply ends with\n [--since <sha|YYYY-MM-DD>] (default: HEAD \u2014 what is written but not committed;\n a sha or date adds the commits since then, e.g. --since HEAD~1) [--json]\n commit publish records already written to disk: samples git status over every\n collection's record dirs, one commit PER REPO, subject composed from the\n status letters. Scope it with any number of targets, each either a whole\n <collection> or one <collection>/<id> \u2014 the record form is what keeps a\n concurrent session's pending records out of your commit. Ends with the same\n record report `changes` prints, for what it published.\n [<collection>|<collection>/<id> \u2026] [-m <subject>] [--dry-run] [--json]\n help this text\n\nextension verbs \u2014 an extension (a module that also ships code: its package.json declares\n`dreamteamer.extension`) adds its own verbs, listed below when this workspace has any.\n";
|
|
1
|
+
export declare const USAGE = "usage: dreamteamer <verb> [<target>] [flags]\n\n --workspace, -w <path>\n run the verb in another workspace. The path resolves from the\n directory you typed it in; every other path in the command resolves inside the\n target. The working directory is unchanged, and the flag reaches this command\n only: a process it starts resolves its own workspace from its own directory.\n --vault <path> deprecated \u2014 the old spelling of --workspace, still honoured.\n\nrecord verbs (hard validation \u2014 invalid writes are rejected before disk).\nA <target> is either a collection name or a <collection>/<id> reference; the reference splits at\nthe longest DECLARED collection prefix, so finance/transactions/2026/03/coffee is ONE argument:\n list <collection> [--filter k=v] [--where <json>] [--sort [-]<field>] [--json]\n (--filter is ONE condition \u2014 repeat it to AND more\n (--filter a=1 --filter b=2 wants both);\n anything compound goes in one --where, operator\n objects e.g. '{\"starts\":{\"_gte\":\"2026-07-01\"}}' \u2014\n operators: _eq _neq _lt _lte _gt _gte _in _nin\n _null _empty _contains _starts_with _ends_with\n _between _regex _and _or, plus _n*/_i* negated and\n case-insensitive variants; date-times sort and\n compare as instants, across offsets; an enum\n sorts in its declared order)\n get <collection>/<id> [--json] (--json, and each list --json row, adds $file and\n $repo: where the record is read from and the repo\n that commits it \u2014 null outside every repo here)\n add <collection> [\"<title>\"] --<field> <value> \u2026 [--id <explicit-id>]\n (ONE bare positional fills the collection's title\n field \u2014 the one its record_title opens with \u2014 so\n dt add task \"call the bank\" is\n dt add tasks --name \"call the bank\".\n a format: binary collection takes --from <path>\n instead \u2014 the file IS the record, fields derive;\n --force replaces an existing file record.\n A repeated --<field> is one ELEMENT of an array\n field \u2014 refused on a scalar one; a single value\n still splits on commas)\n set <collection>/<id> <field>=<value> \u2026 (repeating a pair adds an element, exactly as a\n repeated --<field> does)\n rm <collection>/<id> [--force]\n rename <collection>/<id> <new-id> (rewrites all inbound refs in one WRITE \u2014\n commit publishes the set together)\n reorder <collection>/<id> --after|--before <id> | --top | --bottom\n reorder <collection> --init (place every record that has no position yet \u2014 the collection's `type: position` field)\n values <collection> <field> [--limit n] (the vocabulary a field actually uses \u2014\n what a filter/validator offers as choices)\n history <collection>/<id> [--json] (git revisions of this record, newest first)\n diff <collection>/<id> [--hash <sha>] (the patch one revision applied; defaults to HEAD)\n revert <collection>/<id> --hash <sha> (restore the content at <sha> as a pending write)\n next <collection>[/<id>] [--ids <id>,\u2026] (which bound commands apply, and in which state:\n available / done / not-applicable \u2014 what can\n happen to this record next)\n relations [<collection>] (every two-way pair: owner.field \u2192 target.mirror)\n relations rebuild <collection> [--drop <f>] (regenerate mirror VALUES from the owning side;\n --drop removes a stale ex-mirror key from records)\n relocate <target> [--dry-run] [--json] (move record FILES to where the compiled descriptor\n puts them \u2014 a record stored under another\n collection (storage.under) whose folder disagrees\n with its owner field, or a file record in a\n collection that became shape: folder. Ids and\n references never change; a pending edit on a\n moved file, or a dangling owner, refuses the whole\n plan \u2014 commit, or fix the field, first)\n relocate <collection> --to-root [--dry-run] (the REVERSE: every placed record back into the\n collection's own folder, ids unchanged \u2014 the step\n before removing or changing storage.under)\n resolve '<string>' | <collection>/<id> <field>\n (render ${env:NAME} \u00B7 ${workspaceFolder} \u00B7\n ${userHome} \u2014 the ONLY substitution point; a\n record keeps the template verbatim. An array\n field prints one item per line)\n\nsystem verbs \u2014 the SAME verbs, on the entities the compiler materializes (modules, collections,\nskills, agents, commands, command-bindings, ui-views, mixins, and any kind an\ninstalled extension adds). \u26A0 ONE\ndifference in POLICY, not in spelling: a SYSTEM write commits itself, because an uncompilable or\nunpublished schema is not a state a workspace should sit in; a RECORD write does not \u2014 `commit`\npublishes it. The commit lands in the repo that holds the source, so a write into a module that\nis a repo of its own commits there.\n add collections --name <name> [--module <m>] [--namespace <ns>] [--mixins docs,\u2026]\n [--id-from '{{ \u2026 }}'] [--description \"\u2026\"] [--suffix <s>]\n (--namespace health --name doctors === --name\n health/doctors; a module declaring exactly ONE\n namespace infers it, and the resolved name is echoed.\n --namespace '' means no namespace)\n add modules --name <id> [--description \"\u2026\"] [--namespace <ns>] [--extension] [--package <npm name>]\n (modules/<id>/ + every kind folder + package.json + README.md,\n floored on this engine. --namespace DECLARES it in the module\n (\u00A78), so every later `add collections --module <id>` infers it.\n --extension adds src/extension.js with a one-token setup unit;\n --package names it for npm and makes it publishable \u2014 the\n folder stays the id. Without it, folder = package name = id.)\n add skills --name <id> --description \"\u2026\" (skills/<id>/SKILL.md \u2014 --description is required,\n because an undescribed skill is undiscoverable)\n add ui-views --route </route> --scope collection --collection collections/<c>\n [--id <id>] [display.list.layout=<id>] [k.v=\u2026]\n set <system>/<id> <field>=<value> \u2026 (collections: description \u00B7 use_when \u00B7 title \u00B7\n singular \u00B7 record_title \u00B7 sensitive \u00B7 internal \u00B7\n display.nav.icon \u00B7 display.nav.order \u00B7\n display.nav.section \u00B7 display.list.columns \u00B7\n display.list.sort, plus module=<m>, which MOVES it.\n modules: description \u00B7 namespaces \u00B7 dependencies \u00B7\n peer_collections, record-shaped (modules/core).\n ui-views: dotted keys \u2014 display.list.sort=-date. An\n empty value REMOVES the key; quote it to write the\n empty string itself ('display.list.sort=\"\"').\n skills/agents/commands/\u2026: frontmatter keys)\n rm <system>/<id> [--force] [--dry-run]\n rename <system>/<id> <new-id> (a collection's rename moves its records, re-suffixes\n the files and rewrites every inbound ref, ONE commit)\n reorder collections/<c> \u2026 (refused since 0.49: the nav's order is nav.yaml \u2014 the\n sidebar's Move entries or a hand edit; display.nav.order\n compiles and moves no row)\n get collections/<c> [--module <m>] (--module prints ONE module's source contribution\n rather than the merged descriptor)\n list modules | collections | skills | \u2026 (id \u00B7 location \u00B7 path \u00B7 namespaces \u00B7 package name)\n revert <system>/<id> (refused: its source is in git \u2014\n `git checkout <sha> -- <path>` then `dt compile`)\n fmt [<collection>] [--dry-run] (collection and mixin sources in block style, top-level\n keys in canonical order; fields, the keys inside a\n field and every comment stay where they are. Sources\n under node_modules/ are skipped)\n\nfield verbs \u2014 a field is the one sub-entity, and it has verbs of its own (there is no `fields`\ncollection: the ENGINE does not read one, and `rename-field` was the only capability it would buy):\n add-field <collection> --name <field> [--type <type>] [--many] [--required]\n [--enum a,b] [--default-value v] [--unique] [--mirror-of <field>]\n [--on-delete restrict|set-null] [--soft] [--sensitive] [--body]\n [--description \"\u2026\"] [--module <m>]\n types: string markdown boolean integer number date datetime url email\n reference map position, a collection name (a reference), or\n a,b for a union of collections (an object's sub-fields are\n authored in the descriptor). --many makes it a list; a\n date-time may be written as \"2026-07-28 12:00\" and the local\n offset is stamped on for you.\n --mirror-of <field> makes this the generated, read-only mirror of the\n --type collection's <field>, which references this one; a unique key\n mirrors as one record, any other as a list.\n --soft lets a reference name a record that does not exist (yet); the\n value must still name one of its collections.\n --body marks the field a record's PROSE lands in (the text after the\n frontmatter): --type markdown, one per collection, and it stays last.\n A field the collection's module does not own lands in an OVERLAY\n (--module names the module; it must depend on the owner).\n set-field <collection> --name <field> [the add-field flags] [--module <m>]\n (each flag changes the key it names and nothing else; an empty value\n clears it \u2014 --enum= --default-value= \u2014 and false clears a switch \u2014\n --unique false. set-field never moves a field.)\n rm-field <collection> --name <field> [--module <m>] [--dry-run]\n (clears the field's VALUES in the same write, and reports the count;\n prunes it from its own columns, sort, badge and sections, and refuses\n naming every other position that still names it)\n rename-field <collection> --name <field> --to <new-name> [--dry-run]\n (rewrites the key in every record AND every position that names the\n field: the collection's sources, templates, ids.from, display,\n constraints, storage.under.parent, a mirror's mirror_of, a ui-view's\n filter and display, a binding's conditions. ONE commit; a position it\n cannot rewrite is refused by name, and --dry-run lists each one)\n rename-value <collection> <field> <old> <new> [--dry-run]\n (renames one enum value: the enum, its default, a constraint's const or\n enum, view filters, binding conditions and every record. ONE commit)\n\nEvery <collection> above may be spelled in the SINGULAR: dt add task \u2026, dt get task/<id>,\ndt list meeting-analysis, dt add-field task \u2026. The singular is derived from the descriptor\n(tasks \u2192 task, companies \u2192 company) and authored on it as singular: where inflection is\nwrong (people \u2192 person); compile refuses two collections whose words collide. A REFERENCE\ninside a record still names the collection in full \u2014 tasks/kickoff, never task/kickoff.\n\nEvery verb that MOVES records or CLEARS values takes --dry-run and prints its plan first:\n records N \u00B7 refs M \u00B7 descriptors K \u00B7 values cleared V\n\nworkspace verbs:\n init from a folder to a workspace in ONE command: pins the engine that runs it (exactly),\n writes the skeleton, installs, compiles, checks, runs the safe part of any declared\n module's setup, makes the folder a git repository when it is not one and commits what\n it wrote (inside a repository: the same scoped commit, your staged work untouched).\n Refused before any write: an engine of another version declared, locked or installed\n (never upgraded \u2014 dt update --engine), and a path it writes that links out of the\n folder. Re-run it to resume \u2014 a repeat changes nothing.\n [--no-git] [--git <remote-url>] (adds origin, never pushes) [--no-compile]\n [--from <dir>] (a preset's missing packages from a folder of tarballs, offline)\n [--input <id>=<value>]\u2026 [--allow <kind>]\u2026 [--no-input] (a preset's setup, as `setup`)\n [--harnesses claude-code,codex,pi,gemini-cli,cursor] [--workspace_module <name>]\n --version print the engine version (works anywhere)\n install make THIS checkout ready \u2014 the engine, .env (linked from the primary when this is a\n worktree), declared local assets, compile, and a declared postinstall.\n Idempotent: it prints a board of what it found and what it did\n [--dry-run] plan only [--json] the board as data\n [--link-env] link .env even into a worktree OUTSIDE the primary root\n install --hook | --print-adapters\n --hook: read a harness hook's JSON payload from stdin and install the checkout its\n `cwd` names \u2014 the process cwd is the harness's, never the worktree's\n --print-adapters: print the hook snippet for each declared harness, with every hook an\n installed extension adds. Merging it into the harness's own settings file is the\n operator's act \u2014 the engine never writes one\n install repos/<id> | repos --all [--json]\n materialize an attached repo's working tree ON DEMAND \u2014 never as part of making a\n checkout ready; --all is the explicit opt-in, e.g. before going offline\n install <spec>\u2026 [--from <dir>] bring a MODULE in: a name, name@version, ./file.tgz,\n ./folder (a development link) or a git URL \u2014 installs it and every module its\n dreamteamer.dependencies names, and a module preset's members at the versions it pins\n (refusing, before npm writes anything, a package with no dreamteamer key, an engine\n floor this engine does not meet, a ring, and a version installed differently), pins\n exact versions, compiles, merges the shipped nav fragments into nav.yaml, runs the\n safe part of the module's setup and commits package.json, package-lock.json, nav.yaml\n and what setup wrote. Without a version: npm's latest. --from resolves names from a\n folder of tarballs (offline). Old nav settings with no nav.yaml refuse a package that\n ships a nav fragment until migrated; [--allow nav-reset] starts from the fragments.\n Setup flags as for `setup`: [--input <id>=<value>]\u2026 [--allow <kind>]\u2026 [--no-input];\n [--no-commit] [--json]\n Exit 0 done \u00B7 1 refused or failed (nothing half-written) \u00B7 2 usage \u00B7 3 input missing\n update <name>[@<version>] | --engine move ONE npm pin forward on purpose: to the latest\n release (or the named version), re-pinned exactly, closure-checked as install is,\n compiled, committed; a module preset moves its installed members to its new pins.\n A downgrade needs [--allow downgrade]; old nav settings with no nav.yaml refuse a\n module update until migrated, or [--allow nav-reset]; a development link is skipped\n and named; [--from <dir>] resolves from a folder of tarballs; [--no-commit]\n compile materialize modules + workspace sources into .dreamteamer (+ harness adapters)\n [--watch] recompile on source changes\n check validate every record against the compiled descriptors (report-only), then every\n installed extension's own checks. A reference no record here answers is external when\n the workspace's exports manifest vouches for it. nav.yaml: a name that resolves to\n nothing or is listed twice is a \u26A0 line, never a violation\n [--strict-export] makes a stale manifest a violation\n modules/<id> --alone: is that inline module publishable \u2014 packed, installed into a fresh\n workspace on this engine with only its declared dependencies, compiled, checked; exit 0\n publishable, 1 refused naming why, 2 usage [--keep] leaves the temp workspace\n exports bring this workspace's dreamteamer-exports.json level with its records \u2014 drop each entry\n for an id a record here now holds, or (when every record is read) one nothing\n references \u2014 and commit that one file [--dry-run] [--json]\n doctor what works on this machine \u2014 the engine, then each extension's checks \u2014 as one board:\n READY / DEGRADED / UNAVAILABLE, each fix on its row. Exit 0 [--strict] exit 1 when\n anything is UNAVAILABLE [--json]\n setup [<unit>] drive the setup a module declares \u2014 resume, repair, verify, sign in. The\n engine names no module: a unit is what an installed package contributes (dt status\n lists them). Inputs: [--input <id>=<value>]\u2026 (or <unit>.<id>=; then the environment,\n then the declared default; a terminal asks for what is still missing, [--no-input]\n never asks \u2192 exit 3 with the ids). Effects: workspace-file writes run; download,\n network and machine ask y/n in a terminal or run under [--allow <kind>]\u2026; an account\n step (sign-in, consent) runs only under [--authorize], in a terminal. [--verify] runs\n the unit's live check and writes its receipt. [--skip] records the skip in\n package.json (dt setup <unit> clears it). [--json] the result as data.\n Exit 0 done (pending and blocked steps printed) \u00B7 1 a unit's apply failed \u00B7 2 usage \u00B7 3 a required input missing\n status workspace status: compiled runtime freshness, per-module channel/ref, staleness\n run <module> [<script> [<arg>\u2026]] run a script a module declares (dreamteamer.scripts) by\n NAME, never by its path inside the package: on this node, at the workspace root, every\n argument after the script passed to it untouched, its exit code returned. The module is\n its package name or its id; modules/<id> shadows the installed package, as for\n extensions. Without a script: list the module's scripts.\n Exit: the script's \u00B7 1 no such module, script or file \u00B7 2 usage\n\n changes the records created / updated / deleted in every repo that holds records \u2014\n grouped by collection, each with its path and whether it is committed. Its first line is the report a reply ends with\n [--since <sha|YYYY-MM-DD>] (default: HEAD \u2014 what is written but not committed;\n a sha or date adds the commits since then, e.g. --since HEAD~1) [--json]\n commit publish records already written to disk: samples git status over every\n collection's record dirs, one commit PER REPO, subject composed from the\n status letters. Scope it with any number of targets, each either a whole\n <collection> or one <collection>/<id> \u2014 the record form is what keeps a\n concurrent session's pending records out of your commit. Ends with the same\n record report `changes` prints, for what it published.\n [<collection>|<collection>/<id> \u2026] [-m <subject>] [--dry-run] [--json]\n help this text\n\nextension verbs \u2014 an extension (a module that also ships code: its package.json declares\n`dreamteamer.extension`) adds its own verbs, listed below when this workspace has any.\n";
|
package/dist/usage.js
CHANGED
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
// other fails the suite.
|
|
5
5
|
export const USAGE = `usage: dreamteamer <verb> [<target>] [flags]
|
|
6
6
|
|
|
7
|
-
--workspace, -w <
|
|
8
|
-
run the verb in another workspace
|
|
9
|
-
its git_modules name, or any workspace by path. A path resolves from the
|
|
7
|
+
--workspace, -w <path>
|
|
8
|
+
run the verb in another workspace. The path resolves from the
|
|
10
9
|
directory you typed it in; every other path in the command resolves inside the
|
|
11
10
|
target. The working directory is unchanged, and the flag reaches this command
|
|
12
11
|
only: a process it starts resolves its own workspace from its own directory.
|
|
@@ -29,8 +28,6 @@ the longest DECLARED collection prefix, so finance/transactions/2026/03/coffee i
|
|
|
29
28
|
get <collection>/<id> [--json] (--json, and each list --json row, adds $file and
|
|
30
29
|
$repo: where the record is read from and the repo
|
|
31
30
|
that commits it — null outside every repo here)
|
|
32
|
-
[--referrer <collection>/<id>] an id no root holds is
|
|
33
|
-
named from the referrer's repo's exports manifest
|
|
34
31
|
add <collection> ["<title>"] --<field> <value> … [--id <explicit-id>]
|
|
35
32
|
(ONE bare positional fills the collection's title
|
|
36
33
|
field — the one its record_title opens with — so
|
|
@@ -82,8 +79,8 @@ skills, agents, commands, command-bindings, ui-views, mixins, and any kind an
|
|
|
82
79
|
installed extension adds). ⚠ ONE
|
|
83
80
|
difference in POLICY, not in spelling: a SYSTEM write commits itself, because an uncompilable or
|
|
84
81
|
unpublished schema is not a state a workspace should sit in; a RECORD write does not — \`commit\`
|
|
85
|
-
publishes it. The commit lands in the repo that holds the source, so a write into a
|
|
86
|
-
commits there.
|
|
82
|
+
publishes it. The commit lands in the repo that holds the source, so a write into a module that
|
|
83
|
+
is a repo of its own commits there.
|
|
87
84
|
add collections --name <name> [--module <m>] [--namespace <ns>] [--mixins docs,…]
|
|
88
85
|
[--id-from '{{ … }}'] [--description "…"] [--suffix <s>]
|
|
89
86
|
(--namespace health --name doctors === --name
|
|
@@ -96,8 +93,7 @@ commits there.
|
|
|
96
93
|
(§8), so every later \`add collections --module <id>\` infers it.
|
|
97
94
|
--extension adds src/extension.js with a one-token setup unit;
|
|
98
95
|
--package names it for npm and makes it publishable — the
|
|
99
|
-
folder stays the id. Without it, folder = package name = id.
|
|
100
|
-
the git shape is \`install --clone <url> [name]\`)
|
|
96
|
+
folder stays the id. Without it, folder = package name = id.)
|
|
101
97
|
add skills --name <id> --description "…" (skills/<id>/SKILL.md — --description is required,
|
|
102
98
|
because an undescribed skill is undiscoverable)
|
|
103
99
|
add ui-views --route </route> --scope collection --collection collections/<c>
|
|
@@ -127,7 +123,7 @@ commits there.
|
|
|
127
123
|
fmt [<collection>] [--dry-run] (collection and mixin sources in block style, top-level
|
|
128
124
|
keys in canonical order; fields, the keys inside a
|
|
129
125
|
field and every comment stay where they are. Sources
|
|
130
|
-
under
|
|
126
|
+
under node_modules/ are skipped)
|
|
131
127
|
|
|
132
128
|
field verbs — a field is the one sub-entity, and it has verbs of its own (there is no \`fields\`
|
|
133
129
|
collection: the ENGINE does not read one, and \`rename-field\` was the only capability it would buy):
|
|
@@ -191,7 +187,7 @@ workspace verbs:
|
|
|
191
187
|
[--harnesses claude-code,codex,pi,gemini-cli,cursor] [--workspace_module <name>]
|
|
192
188
|
--version print the engine version (works anywhere)
|
|
193
189
|
install make THIS checkout ready — the engine, .env (linked from the primary when this is a
|
|
194
|
-
worktree), declared local assets,
|
|
190
|
+
worktree), declared local assets, compile, and a declared postinstall.
|
|
195
191
|
Idempotent: it prints a board of what it found and what it did
|
|
196
192
|
[--dry-run] plan only [--json] the board as data
|
|
197
193
|
[--link-env] link .env even into a worktree OUTSIDE the primary root
|
|
@@ -217,30 +213,25 @@ workspace verbs:
|
|
|
217
213
|
Setup flags as for \`setup\`: [--input <id>=<value>]… [--allow <kind>]… [--no-input];
|
|
218
214
|
[--no-commit] [--json]
|
|
219
215
|
Exit 0 done · 1 refused or failed (nothing half-written) · 2 usage · 3 input missing
|
|
220
|
-
install --clone <url> [name] attach a git module to this workspace
|
|
221
216
|
update <name>[@<version>] | --engine move ONE npm pin forward on purpose: to the latest
|
|
222
217
|
release (or the named version), re-pinned exactly, closure-checked as install is,
|
|
223
218
|
compiled, committed; a module preset moves its installed members to its new pins.
|
|
224
219
|
A downgrade needs [--allow downgrade]; old nav settings with no nav.yaml refuse a
|
|
225
220
|
module update until migrated, or [--allow nav-reset]; a development link is skipped
|
|
226
221
|
and named; [--from <dir>] resolves from a folder of tarballs; [--no-commit]
|
|
227
|
-
update pull git_modules clones forward (ff-only on the lockfile ref), rebuild,
|
|
228
|
-
then compile; [<name>] updates just one. dirty clones are skipped
|
|
229
222
|
compile materialize modules + workspace sources into .dreamteamer (+ harness adapters)
|
|
230
223
|
[--watch] recompile on source changes
|
|
231
224
|
check validate every record against the compiled descriptors (report-only), then every
|
|
232
|
-
installed extension's own checks. A reference
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
is listed twice is a ⚠ line, never a violation
|
|
237
|
-
[--strict-export] makes each unlisted one, and a stale manifest, a violation
|
|
225
|
+
installed extension's own checks. A reference no record here answers is external when
|
|
226
|
+
the workspace's exports manifest vouches for it. nav.yaml: a name that resolves to
|
|
227
|
+
nothing or is listed twice is a ⚠ line, never a violation
|
|
228
|
+
[--strict-export] makes a stale manifest a violation
|
|
238
229
|
modules/<id> --alone: is that inline module publishable — packed, installed into a fresh
|
|
239
230
|
workspace on this engine with only its declared dependencies, compiled, checked; exit 0
|
|
240
231
|
publishable, 1 refused naming why, 2 usage [--keep] leaves the temp workspace
|
|
241
|
-
exports
|
|
242
|
-
|
|
243
|
-
|
|
232
|
+
exports bring this workspace's dreamteamer-exports.json level with its records — drop each entry
|
|
233
|
+
for an id a record here now holds, or (when every record is read) one nothing
|
|
234
|
+
references — and commit that one file [--dry-run] [--json]
|
|
244
235
|
doctor what works on this machine — the engine, then each extension's checks — as one board:
|
|
245
236
|
READY / DEGRADED / UNAVAILABLE, each fix on its row. Exit 0 [--strict] exit 1 when
|
|
246
237
|
anything is UNAVAILABLE [--json]
|
|
@@ -258,13 +249,12 @@ workspace verbs:
|
|
|
258
249
|
run <module> [<script> [<arg>…]] run a script a module declares (dreamteamer.scripts) by
|
|
259
250
|
NAME, never by its path inside the package: on this node, at the workspace root, every
|
|
260
251
|
argument after the script passed to it untouched, its exit code returned. The module is
|
|
261
|
-
its package name or its id; modules/<id>
|
|
262
|
-
|
|
252
|
+
its package name or its id; modules/<id> shadows the installed package, as for
|
|
253
|
+
extensions. Without a script: list the module's scripts.
|
|
263
254
|
Exit: the script's · 1 no such module, script or file · 2 usage
|
|
264
255
|
|
|
265
|
-
changes the records created / updated / deleted in every repo that holds records —
|
|
266
|
-
|
|
267
|
-
and whether it is committed. Its first line is the report a reply ends with
|
|
256
|
+
changes the records created / updated / deleted in every repo that holds records —
|
|
257
|
+
grouped by collection, each with its path and whether it is committed. Its first line is the report a reply ends with
|
|
268
258
|
[--since <sha|YYYY-MM-DD>] (default: HEAD — what is written but not committed;
|
|
269
259
|
a sha or date adds the commits since then, e.g. --since HEAD~1) [--json]
|
|
270
260
|
commit publish records already written to disk: samples git status over every
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Workspace } from "../types.js";
|
|
2
2
|
/**
|
|
3
|
-
* module discovery,
|
|
4
|
-
*
|
|
3
|
+
* module discovery, two channels in precedence order: inline modules/* > npm deps
|
|
4
|
+
* (declared in package.json, NOT a node_modules scan).
|
|
5
5
|
* same NAME in two channels = the same module delivered twice — the more local
|
|
6
6
|
* copy wins (npm-link semantics); shadows are returned for warning/status, never
|
|
7
7
|
* compiled. different-name identity collisions stay hard errors downstream.
|
|
@@ -11,7 +11,6 @@ export declare function discoverModules(root: string, pkg: Workspace["pkg"]): {
|
|
|
11
11
|
name: string;
|
|
12
12
|
root: string;
|
|
13
13
|
channel: string;
|
|
14
|
-
layer?: string;
|
|
15
14
|
}[];
|
|
16
15
|
shadows: {
|
|
17
16
|
name: string;
|
|
@@ -19,5 +18,4 @@ export declare function discoverModules(root: string, pkg: Workspace["pkg"]): {
|
|
|
19
18
|
loser: string;
|
|
20
19
|
}[];
|
|
21
20
|
disabledModules: string[];
|
|
22
|
-
layerRefusals: string[];
|
|
23
21
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { layerEntries } from "./layerEntries.js";
|
|
4
3
|
import { disablesPackage, isPackageEntry } from "../extensions/extensions.js";
|
|
5
4
|
/**
|
|
6
|
-
* module discovery,
|
|
7
|
-
*
|
|
5
|
+
* module discovery, two channels in precedence order: inline modules/* > npm deps
|
|
6
|
+
* (declared in package.json, NOT a node_modules scan).
|
|
8
7
|
* same NAME in two channels = the same module delivered twice — the more local
|
|
9
8
|
* copy wins (npm-link semantics); shadows are returned for warning/status, never
|
|
10
9
|
* compiled. different-name identity collisions stay hard errors downstream.
|
|
@@ -18,12 +17,6 @@ export function discoverModules(root, pkg) {
|
|
|
18
17
|
// caller (compile, status, install) sees the same set.
|
|
19
18
|
const disable = pkg?.dreamteamer?.disable ?? [];
|
|
20
19
|
const disabledHits = new Set();
|
|
21
|
-
// A clone that is a WORKSPACE (its own manifest names `workspace_module`), or whose entry lists
|
|
22
|
-
// `records`, is a RECORD LAYER — another workspace's data read here — never a bundle: its own
|
|
23
|
-
// modules/ would otherwise unpack and collide with ours. With `module: true` its ONE workspace
|
|
24
|
-
// module is a source too (below).
|
|
25
|
-
const layerList = layerEntries(pkg, root);
|
|
26
|
-
const layers = new Set(layerList.map(l => l.name));
|
|
27
20
|
// the same rule the extension loader applies (full package name, or its scope-stripped id), so a
|
|
28
21
|
// disabled package loses its content AND its code together
|
|
29
22
|
const disabled = (name) => {
|
|
@@ -51,9 +44,9 @@ export function discoverModules(root, pkg) {
|
|
|
51
44
|
return null;
|
|
52
45
|
} // no package.json, or unparseable — not a module
|
|
53
46
|
};
|
|
54
|
-
// A PACKAGE OF MODULES: a dependency
|
|
47
|
+
// A PACKAGE OF MODULES: a dependency whose root carries `modules/` bundles several
|
|
55
48
|
// modules — its sub-modules are the modules, and the root itself is never compiled. One
|
|
56
|
-
// `npm install`
|
|
49
|
+
// `npm install` then delivers a whole family, and `disable` cherry-picks from it.
|
|
57
50
|
// Inline `modules/*` never nest: a `modules/` folder at an inline module root stays the
|
|
58
51
|
// unknown-folder compile error it always was, because the workspace's own tree has no reason to
|
|
59
52
|
// bundle.
|
|
@@ -82,42 +75,11 @@ export function discoverModules(root, pkg) {
|
|
|
82
75
|
tryAdd(name, srcRoot, channel);
|
|
83
76
|
};
|
|
84
77
|
scanDir(path.join(root, "modules"), "inline", false);
|
|
85
|
-
const gitDir = path.join(root, "git_modules");
|
|
86
|
-
if (fs.existsSync(gitDir)) {
|
|
87
|
-
for (const name of fs.readdirSync(gitDir).sort()) {
|
|
88
|
-
if (layers.has(name))
|
|
89
|
-
continue;
|
|
90
|
-
const srcRoot = path.join(gitDir, name);
|
|
91
|
-
const mpkg = readPkg(srcRoot);
|
|
92
|
-
if (mpkg)
|
|
93
|
-
tryAddOrUnpack(mpkg.name ?? name, srcRoot, "git");
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
78
|
for (const dep of Object.keys({ ...pkg.dependencies, ...pkg.devDependencies }).sort()) {
|
|
97
79
|
const srcRoot = path.join(root, "node_modules", dep);
|
|
98
80
|
const mpkg = readPkg(srcRoot);
|
|
99
81
|
if (mpkg)
|
|
100
82
|
tryAddOrUnpack(mpkg.name ?? dep, srcRoot, "npm");
|
|
101
83
|
}
|
|
102
|
-
|
|
103
|
-
// as its own manifest names it — as a git-channel source, the way a bundle contributes its modules.
|
|
104
|
-
// Kept out of `byName` on purpose: a name another channel holds must be REFUSED, never shadowed, and
|
|
105
|
-
// compile does that, naming the entry. A clone not on disk contributes nothing, like any layer.
|
|
106
|
-
const layerModules = [];
|
|
107
|
-
const layerRefusals = [];
|
|
108
|
-
for (const l of layerList) {
|
|
109
|
-
const clone = path.join(gitDir, l.name);
|
|
110
|
-
if (!l.module || !fs.existsSync(clone))
|
|
111
|
-
continue;
|
|
112
|
-
const wm = readPkg(clone)?.dreamteamer?.workspace_module;
|
|
113
|
-
const srcRoot = wm ? path.join(clone, "modules", wm) : null;
|
|
114
|
-
const mpkg = srcRoot ? readPkg(srcRoot) : null;
|
|
115
|
-
if (!mpkg) {
|
|
116
|
-
layerRefusals.push(`git_modules.${l.name}.module: ${wm ? `the clone names workspace_module "${wm}", but modules/${wm}/ holds no module package.json` : "the clone names no dreamteamer.workspace_module"} — there is no module to contribute. Drop \`module\`, or give the clone a workspace module.`);
|
|
117
|
-
}
|
|
118
|
-
else if (!disabled(mpkg.name ?? wm)) {
|
|
119
|
-
layerModules.push({ name: mpkg.name ?? wm, root: srcRoot, channel: "git", layer: l.name });
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return { modules: [...byName.values(), ...layerModules], shadows, disabledModules: [...disabledHits], layerRefusals };
|
|
84
|
+
return { modules: [...byName.values()], shadows, disabledModules: [...disabledHits] };
|
|
123
85
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
/** path segments that mean "the thing below me is a module of the thing above me", never a workspace */
|
|
4
|
-
const MODULE_SEGMENTS = new Set(["node_modules", "
|
|
4
|
+
const MODULE_SEGMENTS = new Set(["node_modules", "modules"]);
|
|
5
5
|
export function findWorkspace(start = process.cwd()) {
|
|
6
6
|
let dir = path.resolve(start);
|
|
7
7
|
const candidates = []; // nearest → topmost
|
|
@@ -30,8 +30,8 @@ export function findWorkspace(start = process.cwd()) {
|
|
|
30
30
|
let found = candidates[0];
|
|
31
31
|
for (const higher of candidates.slice(1)) {
|
|
32
32
|
// a workspace named with `--workspace` (bin/dreamteamer.js pins it, for THIS process only — never
|
|
33
|
-
// in the environment, so no child inherits it) is never climbed out of, even when it
|
|
34
|
-
//
|
|
33
|
+
// in the environment, so no child inherits it) is never climbed out of, even when it sits under
|
|
34
|
+
// another workspace's module folder — that is exactly the case it names.
|
|
35
35
|
if (found.root === globalThis[Symbol.for("dreamteamer.workspace")])
|
|
36
36
|
break;
|
|
37
37
|
if (!nestedAsModule(higher.root, found.root))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* How many commits this repo has that its upstream does not. Falls back to "not on any remote",
|
|
3
|
-
* because a fresh
|
|
3
|
+
* because a fresh clone may have no upstream configured and "ahead of nothing" is not a
|
|
4
4
|
* number the report can print.
|
|
5
5
|
*/
|
|
6
6
|
export declare function aheadCount(root: string): number | null;
|
|
@@ -2,7 +2,7 @@ import { execFileSync } from "node:child_process";
|
|
|
2
2
|
import { QUIET } from "../../lib/consts.js";
|
|
3
3
|
/**
|
|
4
4
|
* How many commits this repo has that its upstream does not. Falls back to "not on any remote",
|
|
5
|
-
* because a fresh
|
|
5
|
+
* because a fresh clone may have no upstream configured and "ahead of nothing" is not a
|
|
6
6
|
* number the report can print.
|
|
7
7
|
*/
|
|
8
8
|
export function aheadCount(root) {
|
|
@@ -42,12 +42,8 @@ export interface Snapshot {
|
|
|
42
42
|
/**
|
|
43
43
|
* ONE COMMIT PER REPO, in the repo that actually holds each source.
|
|
44
44
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* nothing, the pathspec-scoped `git commit` had nothing to record and failed, and the gate rolled
|
|
48
|
-
* the whole op back with a message naming git. A schema write into a git-shape module was therefore
|
|
49
|
-
* impossible, and the reason was invisible: the source compiled, the field was live for one
|
|
50
|
-
* instant, and then the file was restored.
|
|
45
|
+
* A module under modules/<id> may be a repo of its own; a schema write into it must commit THERE,
|
|
46
|
+
* since the workspace root's pathspec-scoped commit would record nothing and roll the op back.
|
|
51
47
|
*
|
|
52
48
|
* `repoRootOf` (compile.js, there since `owns_data` needed it) answers "which repo holds this path"
|
|
53
49
|
* — nearest `.git` at or above it, workspace-relative, `.` for the workspace itself. Grouping by it
|
|
@@ -75,7 +71,6 @@ export interface ModuleSource {
|
|
|
75
71
|
name: string;
|
|
76
72
|
root: string;
|
|
77
73
|
channel: string;
|
|
78
|
-
layer?: string;
|
|
79
74
|
}
|
|
80
75
|
/**
|
|
81
76
|
* What `renderTemplate` renders AGAINST, for one workspace: the names `dreamteamer.vars` declares,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dreamteamer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "A workspace compiler for coding agents — schema-validated records as plain files over git, compiled into every harness",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Gilad Khen <giladkhen@gmail.com>",
|
|
@@ -40,7 +40,7 @@ unsure which skill owns the job in front of you.
|
|
|
40
40
|
|
|
41
41
|
**lifecycle:** `dt init` makes a new workspace in one command — skeleton, install, compile, check,
|
|
42
42
|
one commit (`references/setup.md`). a FRESH CLONE owes `dt install` before anything reads: it makes
|
|
43
|
-
the checkout ready (the engine,
|
|
43
|
+
the checkout ready (the engine and modules, then compile) — `.dreamteamer/`,
|
|
44
44
|
the harness folders and the root `CLAUDE.md`/`AGENTS.md`/`GEMINI.md` are gitignored build output,
|
|
45
45
|
so a clone has no runtime and no orientation until compile writes them — and `.env` is
|
|
46
46
|
per-machine (declared keys: `references/records.md`). `dt status` says
|
|
@@ -93,8 +93,7 @@ the primary workspace's, whoever shipped the skill you are reading.
|
|
|
93
93
|
|
|
94
94
|
- **start a session in the workspace it is about.** it is the only thing that loads that workspace's
|
|
95
95
|
instructions, and it settles name collisions in its favour.
|
|
96
|
-
- **to touch another workspace from here, `-w <
|
|
97
|
-
layer is named by its git_modules name (`-w project-alpha`), any other workspace by path. the flag
|
|
96
|
+
- **to touch another workspace from here, `-w <path>` (`--workspace`) — not `cd`.** the flag
|
|
98
97
|
resolves the target's schema, validates and commits there, and leaves the working directory alone;
|
|
99
98
|
a `cd` outlives the command. (`--vault <path>` is the deprecated spelling.)
|
|
100
99
|
- **every record write prints the workspace it landed in** — `✔ <workspace> · <path>`. a write to
|
|
@@ -108,20 +107,20 @@ follows a write — a record verb, `dt commit`, a system verb, a script that cal
|
|
|
108
107
|
hand-edited record — ENDS with the record report, and nothing written, nothing appended.
|
|
109
108
|
|
|
110
109
|
**measure it, never recall it.** run `dt changes` before replying: it lists what is written and
|
|
111
|
-
not committed, in
|
|
110
|
+
not committed, in every repo of this workspace. if you committed during the turn,
|
|
112
111
|
`dt changes --since <the sha HEAD had before your first write>` (or fold what `dt commit` printed —
|
|
113
112
|
the same block). the report, for a turn that added a contact, set two, removed a meeting and added
|
|
114
|
-
an issue
|
|
113
|
+
an issue:
|
|
115
114
|
|
|
116
115
|
```
|
|
117
|
-
records — contacts: 1 created, 2 updated · issues
|
|
118
|
-
[contacts/sam-diaz](data/contacts/sam-diaz.contact.md) (created) · [contacts/dana-oren](data/contacts/dana-oren.contact.md) (updated) · [contacts/harbor-mutual-desk](data/contacts/harbor-mutual-desk.contact.md) (updated) · [issues/login-times-out](
|
|
116
|
+
records — contacts: 1 created, 2 updated · issues: 1 created · meetings: 1 deleted
|
|
117
|
+
[contacts/sam-diaz](data/contacts/sam-diaz.contact.md) (created) · [contacts/dana-oren](data/contacts/dana-oren.contact.md) (updated) · [contacts/harbor-mutual-desk](data/contacts/harbor-mutual-desk.contact.md) (updated) · [issues/login-times-out](data/issues/login-times-out.issue.md) (created) · meetings/kickoff (deleted)
|
|
119
118
|
```
|
|
120
119
|
|
|
121
120
|
- **line one is `dt changes`'s first line, verbatim**: one entry per collection touched, counts per
|
|
122
|
-
verb
|
|
121
|
+
verb.
|
|
123
122
|
- **then every record as a link** — `[<ref>](<path>)`, the path column `dt changes` prints, which is
|
|
124
|
-
relative to the workspace root
|
|
123
|
+
relative to the workspace root so the editor opens it. a deleted record has
|
|
125
124
|
no file: write its ref with `(deleted)`, unlinked. past twenty records, say `+ N more` and
|
|
126
125
|
point at `dt changes --json`.
|
|
127
126
|
- **measured, not attributed.** `dt changes` measures the shared state exactly but cannot say
|
|
@@ -197,7 +196,7 @@ write. Every other verb works on them.
|
|
|
197
196
|
⚠ **ONE difference, and it is POLICY rather than spelling: a SYSTEM write commits itself; a RECORD
|
|
198
197
|
write does not.** An uncompilable or unpublished schema is not a state a workspace should sit in, so
|
|
199
198
|
every system verb writes its source, proves it with a real compile, and commits — **in the repo that
|
|
200
|
-
holds the source**, so a write into a
|
|
199
|
+
holds the source**, so a write into a module that is a repo of its own commits there and says
|
|
201
200
|
`ahead 1 — push when ready`. A record write lands on disk and `dt commit` publishes it.
|
|
202
201
|
|
|
203
202
|
⚠ **Every verb that moves records or clears values takes `--dry-run` and prints its plan first:**
|
|
@@ -95,7 +95,7 @@ the copy is theirs to maintain, and nothing will later tell them it drifted from
|
|
|
95
95
|
- **Creating a collection** — cheap to make, expensive to retire: records accumulate, references
|
|
96
96
|
point at it, and deleting it later is a migration, not an undo.
|
|
97
97
|
- **Installing a module** (`dt install <package>`) — its collections start holding records the
|
|
98
|
-
day it lands. A RECIPE is never installed (`npm i`, `
|
|
98
|
+
day it lands. A RECIPE is never installed (`npm i`, `dt install`): recipes are copied, and
|
|
99
99
|
importing one re-creates the fork the copy-and-adapt split exists to avoid.
|
|
100
100
|
|
|
101
101
|
## common mistakes
|
|
@@ -104,7 +104,7 @@ the copy is theirs to maintain, and nothing will later tell them it drifted from
|
|
|
104
104
|
|---|---|
|
|
105
105
|
| building because you didn't find it in 30 seconds | there are four places to look, and the first is this workspace |
|
|
106
106
|
| searching only the literal word the operator used | the existing thing is usually filed under a synonym — search the concept, not the string |
|
|
107
|
-
| `npm i` / `
|
|
107
|
+
| `npm i` / `dt install` a recipe module | recipes are copied, not installed — importing re-creates the fork the split exists to avoid |
|
|
108
108
|
| copying a recipe in and keeping all of it | deleting what you won't use IS the adoption step |
|
|
109
109
|
| lifting from a sibling workspace | it holds real personal data; read for reference only |
|
|
110
110
|
| proposing without naming the setup cost | the `.env` keys and the accounts are the actual price |
|
|
@@ -10,12 +10,11 @@ dt changes # what is written and not committed — every
|
|
|
10
10
|
dt changes --since <sha|YYYY-MM-DD> # everything since then: the commits AND the uncommitted state
|
|
11
11
|
dt changes --since HEAD~1 # what 0.41.0's bare `dt changes` answered: the last commit, plus anything pending
|
|
12
12
|
dt changes --json
|
|
13
|
-
dt changes -w <
|
|
13
|
+
dt changes -w <path> # the same, run IN another workspace (its own paths, its own HEAD)
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
per record it reports `change` — `created` / `updated` / `deleted` — the `ref`, the
|
|
17
|
-
workspace-relative `path`, the `repo` it lives in
|
|
18
|
-
the workspace and for a module's own clone) and whether it is `committed`. the human output's FIRST
|
|
17
|
+
workspace-relative `path`, the `repo` it lives in and whether it is `committed`. the human output's FIRST
|
|
19
18
|
LINE is the report line a reply ends with (`SKILL.md`, "a reply that wrote records ends with the
|
|
20
19
|
record report"), then one row per record, then the count. `dt commit` prints the same block for
|
|
21
20
|
what it just published. **read-only by construction** — nothing stored, so running it twice is free
|
|
@@ -23,7 +22,7 @@ and running it wrong costs nothing.
|
|
|
23
22
|
|
|
24
23
|
`--json` is `{ since, head, events, collections }`: `events` one entry per record (carrying 0.41.0's
|
|
25
24
|
`type` — `item-added` / `item-updated` / `item-removed` — beside `change`, so an older reader keeps
|
|
26
|
-
working), `collections` one count row per collection
|
|
25
|
+
working), `collections` one count row per collection.
|
|
27
26
|
|
|
28
27
|
## when to use
|
|
29
28
|
|
|
@@ -34,8 +33,8 @@ of commits did to the *data*. **not for** ordinary "show me the diff" questions
|
|
|
34
33
|
|
|
35
34
|
## the mechanism — enough to trust its edges
|
|
36
35
|
|
|
37
|
-
1. it covers **every repo that holds records**: each compiled descriptor's
|
|
38
|
-
|
|
36
|
+
1. it covers **every repo that holds records**: each compiled descriptor's root, grouped per repo
|
|
37
|
+
(a module can own its records). a changed path that
|
|
39
38
|
matches no descriptor is **skipped** — source and runtime churn are not data events — and
|
|
40
39
|
runtime entities never appear.
|
|
41
40
|
2. the uncommitted half is the same `git status` sample `dt commit` publishes from and `dt status`
|
|
@@ -69,6 +68,6 @@ rather than run over it.
|
|
|
69
68
|
| reporting every row `dt changes` prints | the uncommitted state is shared with other sessions — keep only your own writes |
|
|
70
69
|
| an empty report when nothing was written | nothing written, nothing appended |
|
|
71
70
|
| expecting bare `dt changes` to show the last commit | since 0.42.0 it is the uncommitted state; `--since HEAD~1` adds the last commit |
|
|
72
|
-
| hand-rolling the diff + path mapping | `dt changes` is the mechanism; a hand-roll misses folder-shape records,
|
|
71
|
+
| hand-rolling the diff + path mapping | `dt changes` is the mechanism; a hand-roll misses folder-shape records, per-repo HEADs and the rename split |
|
|
73
72
|
| writing an events file to "remember" what changed | history is the record; anything you write can drift from it |
|
|
74
73
|
| reading the output as a to-do list | it says what changed, not what it means — the judgment is yours |
|