@duo-director/cli 0.3.0-rc.4 → 0.3.0-rc.6

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.
@@ -10551,7 +10551,7 @@ function declaredReferenceParts(message2) {
10551
10551
  }
10552
10552
 
10553
10553
  // packages/director/dist/context/policy.js
10554
- var CONTEXT_POLICY_VERSION = "6";
10554
+ var CONTEXT_POLICY_VERSION = "8";
10555
10555
  var EDGE_WEIGHTS = {
10556
10556
  GOVERNS: 1,
10557
10557
  IMPLEMENTS: 0.9,
@@ -12999,7 +12999,7 @@ function taskWords(task) {
12999
12999
  return task.split(SEPARATORS).map((w) => {
13000
13000
  const token = w.replace(/^[.]+|[.]+$/gu, "");
13001
13001
  const trimmed = w.replace(/[.]+$/u, "");
13002
- return { token, pathText: /^\.[\\/]/u.test(trimmed) ? trimmed : token };
13002
+ return { token, pathText: trimmed };
13003
13003
  }).filter((w) => w.token.length > 0);
13004
13004
  }
13005
13005
  function pathOf(pathText) {
@@ -13007,6 +13007,12 @@ function pathOf(pathText) {
13007
13007
  return void 0;
13008
13008
  return normalizeRepoPath(pathText).value;
13009
13009
  }
13010
+ function rootFileOf(pathText) {
13011
+ if (pathText.includes("/") || pathText.includes("\\") || !pathText.includes("."))
13012
+ return void 0;
13013
+ const p = normalizeRepoPath(pathText).value;
13014
+ return p === void 0 || p !== pathText ? void 0 : { path: p, leadingDot: pathText.startsWith(".") };
13015
+ }
13010
13016
  var NAME_TOKEN = /^[A-Za-z_$][\w$]*(?:\.#?[A-Za-z_$][\w$]*)*$/u;
13011
13017
  function isPathSignal(path36) {
13012
13018
  const words = taskWords(path36);
@@ -13139,11 +13145,26 @@ function resolveSeeds(task, truth, store, explicit = [], groups = NO_CALLABLE_GR
13139
13145
  exactTokens.add(token);
13140
13146
  continue;
13141
13147
  }
13148
+ const root = rootFileOf(pathText);
13149
+ const rootNode = root === void 0 ? void 0 : store.getNode(fileRef(root.path));
13150
+ const asRootFile = () => {
13151
+ if (rootNode !== void 0) {
13152
+ add(rootNode, "path", pathText, SEED_STRENGTH.path);
13153
+ exact++;
13154
+ exactTokens.add(token);
13155
+ }
13156
+ };
13157
+ if (rootNode !== void 0 && root?.leadingDot === true) {
13158
+ asRootFile();
13159
+ continue;
13160
+ }
13142
13161
  if (token.includes("/"))
13143
13162
  continue;
13144
13163
  const name = token.replace(/\(\)$/u, "");
13145
- if (!NAME_TOKEN.test(name) || name.length < 3)
13164
+ if (!NAME_TOKEN.test(name) || name.length < 3) {
13165
+ asRootFile();
13146
13166
  continue;
13167
+ }
13147
13168
  const qualified = symbols.filter((s) => s.payload.qualifiedName === name);
13148
13169
  if (qualified.length === 1 && qualified[0] !== void 0) {
13149
13170
  add(qualified[0], "symbol", token, SEED_STRENGTH.symbol);
@@ -13164,6 +13185,10 @@ function resolveSeeds(task, truth, store, explicit = [], groups = NO_CALLABLE_GR
13164
13185
  continue;
13165
13186
  }
13166
13187
  const named = qualified.length > 1 ? qualified : symbols.filter((s) => s.payload.name === name);
13188
+ if (qualified.length === 0 && named.length === 0) {
13189
+ asRootFile();
13190
+ continue;
13191
+ }
13167
13192
  if (named.length === 1 && named[0] !== void 0) {
13168
13193
  add(named[0], "symbol-name", token, SEED_STRENGTH["symbol-name"]);
13169
13194
  exact++;
@@ -13636,7 +13661,9 @@ var TEMPLATES = {
13636
13661
  unresolved: (id3) => `${id3} is not in the Project Truth. Which Requirement or Issue do you mean?`,
13637
13662
  pending: (id3, title, on) => `${id3} "${title}" is an unconfirmed proposal. This task${on} depends on it; please confirm or reject it.`,
13638
13663
  declared: (owner, text4) => `Open question in ${owner}: "${text4}". It affects this task; please decide it.`,
13639
- missingIntent: () => "No confirmed Requirement or Decision is linked to this task.",
13664
+ // C258 (T59): the signal is about the assembled context (Context packet intent tier), not about the task or the
13665
+ // Project Truth as a whole; a review may have no task and its rules may still apply a confirmed Decision.
13666
+ missingIntent: () => "The context DUO assembled contains no confirmed Requirement or Decision intent.",
13640
13667
  note: (owner, text4) => `${owner}: UNKNOWN ${text4}`,
13641
13668
  pendingNote: (id3, title) => `${id3} "${title}" is PENDING / NOT CONFIRMED`
13642
13669
  },
@@ -13645,7 +13672,7 @@ var TEMPLATES = {
13645
13672
  unresolved: (id3) => `${id3}\uAC00 \uD604\uC7AC Project Truth\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4. \uC5B4\uB5A4 Requirement/Issue\uB97C \uC758\uBBF8\uD558\uB294\uC9C0 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.`,
13646
13673
  pending: (id3, title, on) => `${id3} "${title}"\uB294 \uC544\uC9C1 \uD655\uC815\uB418\uC9C0 \uC54A\uC740 \uC81C\uC548\uC785\uB2C8\uB2E4. \uC774 \uC791\uC5C5${on}\uC740 \uC774 \uACB0\uC815\uC5D0 \uC758\uC874\uD558\uBBC0\uB85C \uD655\uC815 \uB610\uB294 \uAC70\uC808\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.`,
13647
13674
  declared: (owner, text4) => `${owner}\uC758 \uBBF8\uD655\uC815 \uC0AC\uD56D: "${text4}". \uC774 \uC791\uC5C5\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uBBC0\uB85C \uAC12\uC744 \uC815\uD574 \uC8FC\uC138\uC694.`,
13648
- missingIntent: () => "\uC774 \uC791\uC5C5\uACFC \uC5F0\uACB0\uB41C \uD655\uC815 Requirement/Decision\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
13675
+ missingIntent: () => "DUO\uAC00 \uAD6C\uC131\uD55C Context\uC5D0 \uD655\uC815\uB41C Requirement/Decision intent\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
13649
13676
  note: (owner, text4) => `${owner}: UNKNOWN ${text4}`,
13650
13677
  pendingNote: (id3, title) => `${id3} "${title}"\uB294 \uD655\uC815\uB418\uC9C0 \uC54A\uC740 \uC81C\uC548\uC785\uB2C8\uB2E4(PENDING / NOT CONFIRMED)`
13651
13678
  }
@@ -14760,7 +14787,7 @@ function reviewVerdict(claims, gaps) {
14760
14787
  const ask = gaps?.requiresHumanInput === true ? gaps.gaps.filter((g) => g.action === "ask").map((g) => g.id) : [];
14761
14788
  const warn = [
14762
14789
  ...claims.filter((c) => !c.blockEligible && c.provenance !== "pre-existing" && (c.alignment === "PARTIAL" || c.alignment === "CONFLICT" || c.alignment === "UNKNOWN" && c.drift)).map((c) => c.id).sort(compareUtf8),
14763
- ...(gaps?.gaps ?? []).filter((g) => g.action === "surface").map((g) => g.id)
14790
+ ...(gaps?.gaps ?? []).filter((g) => g.action === "surface" && g.kind !== "missing-intent").map((g) => g.id)
14764
14791
  ];
14765
14792
  const verdict = blocking.length > 0 ? "BLOCK" : ask.length > 0 ? "ASK" : warn.length > 0 ? "WARN" : "PASS";
14766
14793
  return { verdict, basis: { blocking, ask, warn } };
@@ -16530,7 +16557,14 @@ ${advice.join("\n")}`);
16530
16557
  `Semantic assistance (supplemental, never blocks): ${a.status}${a.failure === void 0 ? "" : ` (${a.failure})`}`,
16531
16558
  ...a.claims.filter((c) => c.alignment !== "ALIGNED").map((c) => `- semantic ${c.alignment} ${c.claimId}: ${c.reason}`)
16532
16559
  ];
16533
- return [`Verdict ${r.verdict ?? "-"} \xB7 ${r.claims.length} claims \xB7 llm calls ${r.metrics.llmCalls}`, ...lines4, ...semantic].join("\n");
16560
+ const q = r.gaps === void 0 ? void 0 : renderGapQuestions(r.gaps, { locale: "en" });
16561
+ const gaps = q === void 0 || q.primaryQuestion === void 0 && q.notes.length === 0 ? [] : [
16562
+ "Knowledge gaps:",
16563
+ ...q.primaryQuestion === void 0 ? [] : [`Question for the human: ${q.primaryQuestion}`],
16564
+ ...q.additionalQuestions.map((a2) => `Question for the human: ${a2.question}`),
16565
+ ...q.notes.map((n) => `- ${n.note}`)
16566
+ ];
16567
+ return [`Verdict ${r.verdict ?? "-"} \xB7 ${r.claims.length} claims \xB7 llm calls ${r.metrics.llmCalls}`, ...lines4, ...gaps, ...semantic].join("\n");
16534
16568
  }
16535
16569
  },
16536
16570
  duo_get_requirement: {
package/dist/duoctl.js CHANGED
@@ -12,7 +12,7 @@ if (problem !== void 0) {
12
12
  process.exit(1);
13
13
  }
14
14
  try {
15
- await import("./cli-HZ2NURMX.js");
15
+ await import("./cli-BR27FGZA.js");
16
16
  } catch (error) {
17
17
  const e = error;
18
18
  if (e.code === "ERR_MODULE_NOT_FOUND" || e.code === "MODULE_NOT_FOUND") {
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "format": "duo.runtime-tree/1",
3
- "package": "@duo-director/cli@0.3.0-rc.4",
3
+ "package": "@duo-director/cli@0.3.0-rc.6",
4
4
  "delivery": "bundleDependencies",
5
5
  "lock": {
6
6
  "file": "apps/cli/npm-shrinkwrap.json",
7
- "sha256": "d683a96ac07d29c09d75690f85a6529adf705975feb0a402e535caa60b22ce42",
7
+ "sha256": "b8f0e46860190ea06de77b421c413d8822d155202e9d1b7c5c3c2180a66173ef",
8
8
  "registry": "https://registry.npmjs.org/"
9
9
  },
10
10
  "packages": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duo-director/cli",
3
- "version": "0.3.0-rc.4",
3
+ "version": "0.3.0-rc.6",
4
4
  "description": "DUO: AI Project Direction Layer for Coding Agents (duoctl)",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {