dreamteamer 0.42.0 → 0.43.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.42.0",
3
+ "version": "0.43.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>",
package/src/api.d.ts CHANGED
@@ -72,7 +72,9 @@ export const EXTENSION_API: 1;
72
72
  export function openWorkspace(start?: string): Promise<Workspace & { extensions: LoadedExtension[] }>;
73
73
  export function findWorkspace(start?: string): Workspace;
74
74
  /** every extension's `check` contribution on `ws`, in the shape `check(ws, { extra })` takes */
75
- export function contributedViolations(ws: Workspace): Promise<{ file: string; msg: string }[]>;
75
+ export function contributedViolations(ws: Workspace): Promise<{ file: string; msg: string; warning?: true }[]>;
76
+ /** `true`: an extension check's `{ file, message, warning: true }` is printed and never counted. */
77
+ export const CHECK_WARNINGS: true;
76
78
  /** every extension's `next` lines about `ids` of `collection` — what `dt next` prints; a throw is one `error: true` line */
77
79
  export function contributedNotes(ws: Workspace, collection: string, ids?: string[]): { id: string | null; text: string; by: string; error?: true }[];
78
80
  export function declaredExtensions(ws: Workspace): { name: string; version: string; dir: string; entry: string }[];
package/src/api.js CHANGED
@@ -36,14 +36,19 @@ export async function openWorkspace(start = process.cwd()) {
36
36
  }
37
37
  export { findWorkspace };
38
38
  export { EXTENSION_API, declaredExtensions, contributedNotes } from './extensions.js';
39
+ /** An extension's `check` may return `{ file, message, warning: true }`: printed as a warning, never a
40
+ * violation. A module reads this flag to know the engine it runs on has the channel — on one without
41
+ * it, a warning item would be counted as a violation. */
42
+ export const CHECK_WARNINGS = true;
39
43
 
40
44
  /** What every extension's `check` reports on `ws`, as `check(ws, { extra })` takes it — attributed to
41
- * the extension, a throw being a violation. `dt check` and an in-process caller get one verdict. */
45
+ * the extension, a throw being a violation. `dt check` and an in-process caller get one verdict. An
46
+ * item the extension marked `warning: true` keeps the mark: `check` prints it and does not count it. */
42
47
  export async function contributedViolations(ws) {
43
48
  const out = [];
44
49
  for (const e of (ws.extensions ?? []).filter((x) => x.check)) {
45
50
  try {
46
- for (const v of (await e.check({ root: ws.root, ws, dt: self })) ?? []) out.push({ file: v.file ?? e.name, msg: `${v.message} (${e.name})` });
51
+ for (const v of (await e.check({ root: ws.root, ws, dt: self })) ?? []) out.push({ file: v.file ?? e.name, msg: `${v.message} (${e.name})`, ...(v.warning === true ? { warning: true } : {}) });
47
52
  } catch (err) { out.push({ file: e.name, msg: `check failed — ${err.message}` }); }
48
53
  }
49
54
  return out;
package/src/check.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // dreamteamer check — validate every record against the compiled descriptors.
2
2
  // report-only: JSON Schema (ajv), id patterns, reference resolution, stray files, plus any
3
- // `extra` violations a caller gathered (extension checks), reported after the schema's.
3
+ // `extra` violations a caller gathered (extension checks), reported after the schema's — an item marked
4
+ // `warning` is printed as a warning and never counted.
4
5
  // NEVER modifies a file. returns the exit code.
5
6
  import fs from 'node:fs';
6
7
  import path from 'node:path';
@@ -327,7 +328,9 @@ export function check({ root }, { extra = [] } = {}) {
327
328
  }
328
329
 
329
330
  // ---- report ----------------------------------------------------------------------
330
- violations.push(...extra);
331
+ // an extension's warning is printed and never counted: a disagreement worth seeing that must not turn
332
+ // the workspace red (src/api.js contributedViolations carries the mark)
333
+ violations.push(...extra.filter((v) => !v.warning));
331
334
  for (const s of strays) {
332
335
  console.log(`⚠ ${s.file} — unrecognized file in ${s.collection} folder${s.note ? ` (${s.note})` : ''}`);
333
336
  }
@@ -337,6 +340,7 @@ export function check({ root }, { extra = [] } = {}) {
337
340
  for (const [coll, n] of [...softRefs].sort()) {
338
341
  console.log(`⚠ peer collection "${coll}" is declared but not installed — ${n} reference${n === 1 ? '' : 's'} unresolvable`);
339
342
  }
343
+ for (const w of extra.filter((v) => v.warning)) console.log(`⚠ ${w.file} — ${w.msg}`);
340
344
  if (shadowedStubs.length) console.log(`ℹ ${shadowedStubs.length} stub record${shadowedStubs.length === 1 ? '' : 's'} shadowed by a real record of ${shadowedStubs.length === 1 ? 'its' : 'their'} id`);
341
345
  if (violations.length === 0) {
342
346
  console.log(`✔ 0 violations (${[...index.values()].reduce((n, m) => n + m.size, 0)} records across ${descriptors.size} collections)`);
package/src/extensions.js CHANGED
@@ -19,7 +19,8 @@
19
19
  // harnesses { <id>: (ctx) → { blocks: {file: text}, summary } } a harness adapter
20
20
  // orientation string one paragraph appended to the orientation block
21
21
  // hooks { <ClaudeHookEvent>: '<dt verb args>' } rendered by `dt install --print-adapters`
22
- // check ({ root, ws, dt }) → [{ file, message }] cross-record rules `dt check` reports after the schema's
22
+ // check ({ root, ws, dt }) → [{ file, message, warning? }] cross-record rules `dt check` reports after
23
+ // the schema's; `warning: true` prints a warning that does not count (`dt.CHECK_WARNINGS` says so)
23
24
  // doctor ({ root, ws, dt }) → [{ label, state, detail?, fix? }] rows `dt doctor` renders as one capability
24
25
  // next ({ root, ws, collection, ids }) → [{ id, text }] a line about a record `dt next` prints (sync)
25
26
  //