dreamteamer 0.37.0 → 0.38.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dreamteamer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.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>",
|
|
@@ -46,6 +46,12 @@ what the operator types. Compile copies the file **verbatim** to `.claude/comman
|
|
|
46
46
|
straight to the harness untouched. Harnesses without native command discovery get a
|
|
47
47
|
`/<name> — description` index in their orientation block instead.
|
|
48
48
|
|
|
49
|
+
**A folder is a namespace.** `commands/rnd/design.command.md` has the id `rnd/design` (its `name`
|
|
50
|
+
is `rnd/design` too), compiles to `.claude/commands/rnd/design.md`, and is typed `/rnd:design` —
|
|
51
|
+
the spelling the orientation block, the bindings section and `dt next` all use. A binding names it
|
|
52
|
+
`commands/rnd/design`. One folder deep; a family of commands shipped by one module takes its id as
|
|
53
|
+
the folder, so eight lifecycle commands read as one family in the picker.
|
|
54
|
+
|
|
49
55
|
```markdown
|
|
50
56
|
---
|
|
51
57
|
name: process-inbox
|
package/src/compile.js
CHANGED
|
@@ -1038,7 +1038,9 @@ export function compile(ws) {
|
|
|
1038
1038
|
const text = e.bytes.toString('utf8');
|
|
1039
1039
|
e.bytes = Buffer.from(`${text}${text.endsWith('\n') ? '' : '\n'}${dump({ compiled: { display: viewDisplay(d ? displayOf(d) : {}, view) } })}`);
|
|
1040
1040
|
}
|
|
1041
|
-
|
|
1041
|
+
// a command's id is its path under commands/, folders included: `commands/rnd/design.command.md` is
|
|
1042
|
+
// `rnd/design`, typed as `/rnd:design` — the folder is the namespace, as claude-code already reads it
|
|
1043
|
+
const commandIds = new Set([...entries.keys()].filter((k) => k.startsWith('commands/')).map((k) => k.slice('commands/'.length).replace(/\.command\.md$/, '')));
|
|
1042
1044
|
for (const [rt, e] of entries) {
|
|
1043
1045
|
if (!rt.startsWith('command-bindings/')) continue;
|
|
1044
1046
|
const file = e.sources[0].path;
|
package/src/harnesses.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
// .cursor) are gitignored and pruned by stamp. removing a harness from config removes its
|
|
12
12
|
// block/file on the next compile.
|
|
13
13
|
import fs from 'node:fs';
|
|
14
|
+
import { slash } from './namespace.js';
|
|
14
15
|
import path from 'node:path';
|
|
15
16
|
import { load, dump } from './yaml.js';
|
|
16
17
|
|
|
@@ -115,7 +116,8 @@ export function runHarnessAdapters({ root, entries, harnesses, prevManifest, sou
|
|
|
115
116
|
write(path.join('.claude/agents', path.basename(rt).replace(/\.agent\.md$/, '.md')), stampMd(transformAgent(e.bytes)));
|
|
116
117
|
n++;
|
|
117
118
|
} else if (rt.startsWith('commands/')) {
|
|
118
|
-
|
|
119
|
+
// the folder is the namespace: commands/rnd/design.command.md → .claude/commands/rnd/design.md → /rnd:design
|
|
120
|
+
write(path.join('.claude/commands', rt.slice('commands/'.length).replace(/\.command\.md$/, '.md')), stampMd(e.bytes));
|
|
119
121
|
n++;
|
|
120
122
|
}
|
|
121
123
|
}
|
|
@@ -307,7 +309,7 @@ function buildModulesIndex(entries) {
|
|
|
307
309
|
if (!kind) continue;
|
|
308
310
|
const src = e.sources?.[0]?.path ?? '';
|
|
309
311
|
const owner = mods.find((mod) => src.startsWith(mod.path));
|
|
310
|
-
if (owner) owner[kind].push(kind === 'skills' ? rt.split('/')[1] :
|
|
312
|
+
if (owner) owner[kind].push(kind === 'skills' ? rt.split('/')[1] : rt.slice('commands/'.length).replace(/\.command\.md$/, ''));
|
|
311
313
|
}
|
|
312
314
|
for (const mod of mods) { mod.skills.sort(); mod.commands.sort(); }
|
|
313
315
|
return mods;
|
|
@@ -383,7 +385,7 @@ function collectionsSection(index, modules, workspaceModule, verbs) {
|
|
|
383
385
|
for (const m of groups) {
|
|
384
386
|
const where = [`\`${m.id}\``, m.path ? m.path.replace(/\/$/, '') : 'the workspace root', ...(m.namespaces.length ? [`namespaces: ${m.namespaces.join(' · ')}`] : [])];
|
|
385
387
|
lines.push('', `**${m.title}** (${where.join(' · ')})${m.description ? ` — ${m.description}` : ''}`);
|
|
386
|
-
const ships = [...(m.skills.length ? [`skills: ${m.skills.join(' · ')}`] : []), ...(m.commands.length ? [`commands: ${m.commands.map((c) =>
|
|
388
|
+
const ships = [...(m.skills.length ? [`skills: ${m.skills.join(' · ')}`] : []), ...(m.commands.length ? [`commands: ${m.commands.map((c) => slash(c)).join(' · ')}`] : []), ...(m.bin.length ? [`runs: ${m.bin.join(' · ')}`] : []), ...(verbs.get(m.id)?.length ? [`verbs: ${verbs.get(m.id).map((v) => `dt ${v}`).join(' · ')}`] : [])];
|
|
387
389
|
if (ships.length) lines.push(` ${ships.join(' · ')}`);
|
|
388
390
|
for (const c of data.filter((c) => c.module === m.id)) {
|
|
389
391
|
lines.push(`- ${c.name}${c.description ? ` — ${c.description}` : ''}`);
|
|
@@ -470,7 +472,7 @@ function bindingsSection(entries) {
|
|
|
470
472
|
if (!coll || !cmd) continue;
|
|
471
473
|
const gate = [renderGate('available when', d.available_when), renderGate('done when', d.done_when)].filter(Boolean).join(' · ');
|
|
472
474
|
if (!byCollection.has(coll)) byCollection.set(coll, []);
|
|
473
|
-
byCollection.get(coll).push(
|
|
475
|
+
byCollection.get(coll).push(`${slash(cmd)}${gate ? ` (${gate})` : ''}`);
|
|
474
476
|
}
|
|
475
477
|
if (!byCollection.size) return [];
|
|
476
478
|
const lines = ['', 'VERBS BOUND TO COLLECTIONS (`dt next <collection>[/<id>]` answers per record):'];
|
|
@@ -538,7 +540,7 @@ function orientationBlock(flavor, skillsIndex, sourceLayout = 'flat', namespaces
|
|
|
538
540
|
'',
|
|
539
541
|
'agent personas live at `.dreamteamer/agents/*.agent.md`; commands at',
|
|
540
542
|
'`.dreamteamer/commands/`, invoked as `/<name>` by the harness:',
|
|
541
|
-
...buildCommandsIndex(entries).map((c) => `-
|
|
543
|
+
...buildCommandsIndex(entries).map((c) => `- \`${slash(c.id)}\` — ${c.desc}`),
|
|
542
544
|
);
|
|
543
545
|
}
|
|
544
546
|
return lines.join('\n');
|
package/src/namespace.js
CHANGED
|
@@ -208,3 +208,8 @@ export function storageOverlaps(entries) {
|
|
|
208
208
|
}
|
|
209
209
|
return problems;
|
|
210
210
|
}
|
|
211
|
+
|
|
212
|
+
/** How a command id is typed: `/<id>`, with a namespace folder spelled as claude-code spells it —
|
|
213
|
+
* `rnd/design` is `/rnd:design`. One rule for the orientation block, the bindings section, the
|
|
214
|
+
* commands index and `dt next`, so what a session reads is what it types. */
|
|
215
|
+
export const slash = (id) => `/${String(id).replace(/\//g, ':')}`;
|
package/src/record-commands.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ref traversal (tier 1). serves `dreamteamer commands for`, GET /api/commands/:name,
|
|
6
6
|
// and (through the extension's api.ts port) the studio's Commands tab.
|
|
7
7
|
import { matchesFilter } from './filter.js';
|
|
8
|
-
import { parseRef } from './namespace.js';
|
|
8
|
+
import { parseRef, slash } from './namespace.js';
|
|
9
9
|
|
|
10
10
|
// memoized `<collection>/<id>` → parsed fields (or null) for ONE evaluation pass:
|
|
11
11
|
// overlapping refs across a 50-record selection parse once, and filter.js stays
|
|
@@ -66,7 +66,7 @@ export function commandsFor(store, collection, ids = []) {
|
|
|
66
66
|
scope: b.scope ?? 'record',
|
|
67
67
|
};
|
|
68
68
|
if (row.scope === 'collection') {
|
|
69
|
-
rows.push({ ...row, invocation:
|
|
69
|
+
rows.push({ ...row, invocation: `${slash(cmd.name)} ${collection}` });
|
|
70
70
|
continue;
|
|
71
71
|
}
|
|
72
72
|
const states = {};
|
|
@@ -85,7 +85,7 @@ export function commandsFor(store, collection, ids = []) {
|
|
|
85
85
|
states,
|
|
86
86
|
eligible,
|
|
87
87
|
done: ids.filter((id) => states[id] === 'done'),
|
|
88
|
-
invocation: eligible.length ?
|
|
88
|
+
invocation: eligible.length ? `${slash(cmd.name)} ${eligible.map((id) => `${collection}/${id}`).join(' ')}` : null,
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
// record commands first (the headline on a record page), then collection commands; name-sorted within
|