@deftai/directive-core 0.80.0 → 0.82.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.
Files changed (82) hide show
  1. package/dist/content-contracts/skills/helpers.d.ts +6 -0
  2. package/dist/content-contracts/skills/helpers.js +47 -3
  3. package/dist/content-contracts/skills/skill-external-fetch-gate.d.ts +18 -0
  4. package/dist/content-contracts/skills/skill-external-fetch-gate.js +81 -0
  5. package/dist/doctor/checks.d.ts +6 -0
  6. package/dist/doctor/checks.js +139 -0
  7. package/dist/doctor/main.js +2 -1
  8. package/dist/eval/crud-telemetry.d.ts +2 -0
  9. package/dist/eval/crud-telemetry.js +30 -0
  10. package/dist/intake/github-body-cli.js +2 -0
  11. package/dist/intake/github-body.d.ts +11 -0
  12. package/dist/intake/github-body.js +95 -24
  13. package/dist/integration-e2e/helpers.js +1 -1
  14. package/dist/issue-sync/sync-from-xbrief.js +3 -0
  15. package/dist/orphan-active/evaluate.d.ts +25 -0
  16. package/dist/orphan-active/evaluate.js +275 -0
  17. package/dist/orphan-active/index.d.ts +3 -0
  18. package/dist/orphan-active/index.js +3 -0
  19. package/dist/orphan-active/refs.d.ts +16 -0
  20. package/dist/orphan-active/refs.js +105 -0
  21. package/dist/policy/index.d.ts +1 -0
  22. package/dist/policy/index.js +19 -5
  23. package/dist/policy/product-signal.d.ts +45 -0
  24. package/dist/policy/product-signal.js +210 -0
  25. package/dist/pr-wait-mergeable/cascade.d.ts +8 -0
  26. package/dist/pr-wait-mergeable/cascade.js +18 -0
  27. package/dist/pr-wait-mergeable/main.d.ts +4 -0
  28. package/dist/pr-wait-mergeable/main.js +44 -73
  29. package/dist/pr-wait-mergeable/result.d.ts +2 -1
  30. package/dist/pr-wait-mergeable/result.js +4 -0
  31. package/dist/pr-wait-mergeable/semantic-green.d.ts +27 -0
  32. package/dist/pr-wait-mergeable/semantic-green.js +202 -0
  33. package/dist/pr-wait-mergeable/types.d.ts +1 -0
  34. package/dist/pr-watch/constants.d.ts +4 -4
  35. package/dist/pr-watch/constants.js +4 -4
  36. package/dist/pr-watch/watch.js +5 -3
  37. package/dist/product-signal/actor-name.d.ts +18 -0
  38. package/dist/product-signal/actor-name.js +94 -0
  39. package/dist/product-signal/consent.d.ts +30 -0
  40. package/dist/product-signal/consent.js +116 -0
  41. package/dist/product-signal/gates.d.ts +17 -0
  42. package/dist/product-signal/gates.js +66 -0
  43. package/dist/product-signal/github-private-sink-adapter.d.ts +28 -0
  44. package/dist/product-signal/github-private-sink-adapter.js +274 -0
  45. package/dist/product-signal/headless.d.ts +8 -0
  46. package/dist/product-signal/headless.js +32 -0
  47. package/dist/product-signal/install-context.d.ts +13 -0
  48. package/dist/product-signal/install-context.js +41 -0
  49. package/dist/product-signal/local-signal-summary.d.ts +7 -0
  50. package/dist/product-signal/local-signal-summary.js +173 -0
  51. package/dist/product-signal/payload.d.ts +90 -0
  52. package/dist/product-signal/payload.js +124 -0
  53. package/dist/product-signal/sink-bootstrap.d.ts +29 -0
  54. package/dist/product-signal/sink-bootstrap.js +108 -0
  55. package/dist/product-signal/submit-adapter.d.ts +14 -0
  56. package/dist/product-signal/submit-adapter.js +2 -0
  57. package/dist/product-signal/submit.d.ts +54 -0
  58. package/dist/product-signal/submit.js +290 -0
  59. package/dist/release/native-steps.js +11 -4
  60. package/dist/render/framework-commands.js +6 -0
  61. package/dist/scm/gh-rest.d.ts +3 -1
  62. package/dist/scm/gh-rest.js +22 -0
  63. package/dist/scope/brief-io.d.ts +26 -0
  64. package/dist/scope/brief-io.js +77 -0
  65. package/dist/scope/decompose.js +2 -2
  66. package/dist/scope/decomposed-refs.js +3 -3
  67. package/dist/scope/demote.js +2 -2
  68. package/dist/scope/project-definition-sync.d.ts +2 -2
  69. package/dist/scope/project-definition-sync.js +15 -3
  70. package/dist/scope/registry-artifact-sync.d.ts +6 -1
  71. package/dist/scope/registry-artifact-sync.js +31 -13
  72. package/dist/scope/transition.js +23 -15
  73. package/dist/scope/undo.js +2 -2
  74. package/dist/scope/vbrief-json.d.ts +1 -2
  75. package/dist/scope/vbrief-json.js +1 -4
  76. package/dist/staleness-tickler/state.js +19 -2
  77. package/dist/triage/queue/cache.js +5 -0
  78. package/dist/verify-source/index.d.ts +1 -0
  79. package/dist/verify-source/index.js +1 -0
  80. package/dist/verify-source/skill-external-fetch-gate.d.ts +21 -0
  81. package/dist/verify-source/skill-external-fetch-gate.js +71 -0
  82. package/package.json +7 -3
@@ -0,0 +1,71 @@
1
+ /**
2
+ * skill-external-fetch-gate.ts -- deterministic gate for fetch-then-execute skill prose (#1936 / #1532).
3
+ *
4
+ * Production entry for collectExternalFetchViolations: wired into
5
+ * `task verify:skill-external-fetch-gate` and `check:framework-source`.
6
+ *
7
+ * Exit codes (three-state):
8
+ * 0 -- clean: every shipped skill with external-fetch language has Security context mitigation.
9
+ * 1 -- drift: one or more skills pair fetch/follow-through with execute/install without mitigation.
10
+ * 2 -- config error: skills directory missing or unreadable.
11
+ */
12
+ import { existsSync } from "node:fs";
13
+ import { resolve } from "node:path";
14
+ import { listSkillMdEntriesFromRoot, listSkillMdFilesFromRoot, resolveContentPathFromRoot, } from "../content-contracts/skills/helpers.js";
15
+ import { collectExternalFetchViolations } from "../content-contracts/skills/skill-external-fetch-gate.js";
16
+ const EXIT_OK = 0;
17
+ const EXIT_DRIFT = 1;
18
+ const EXIT_CONFIG_ERROR = 2;
19
+ function resolveSkillsRoot(projectRoot) {
20
+ const resolved = resolveContentPathFromRoot(resolve(projectRoot), "skills");
21
+ return existsSync(resolved) ? resolved : null;
22
+ }
23
+ /**
24
+ * Evaluate the skill external-fetch gate for a framework-source or consumer tree.
25
+ */
26
+ export function evaluateSkillExternalFetchGate(projectRoot) {
27
+ const root = resolve(projectRoot);
28
+ const skillsRoot = resolveSkillsRoot(root);
29
+ if (skillsRoot === null) {
30
+ return {
31
+ code: EXIT_CONFIG_ERROR,
32
+ message: `skill external-fetch gate: skills directory not found under ${root}`,
33
+ stream: "stderr",
34
+ };
35
+ }
36
+ let entries;
37
+ try {
38
+ const skillPaths = listSkillMdFilesFromRoot(root);
39
+ if (skillPaths.length === 0) {
40
+ return {
41
+ code: EXIT_DRIFT,
42
+ message: `FAIL: skill external-fetch gate found no SKILL.md files under ${skillsRoot}`,
43
+ stream: "stderr",
44
+ };
45
+ }
46
+ entries = listSkillMdEntriesFromRoot(root);
47
+ }
48
+ catch (err) {
49
+ const msg = err instanceof Error ? err.message : String(err);
50
+ return {
51
+ code: EXIT_CONFIG_ERROR,
52
+ message: `skill external-fetch gate: failed to read skills under ${skillsRoot}: ${msg}`,
53
+ stream: "stderr",
54
+ };
55
+ }
56
+ const violations = collectExternalFetchViolations(entries);
57
+ if (violations.length > 0) {
58
+ const sanitize = (value) => value.replace(/\r?\n/g, " ");
59
+ const lines = [
60
+ `FAIL: skill external-fetch gate detected ${violations.length} violation(s):`,
61
+ ...violations.map((v) => ` - ${sanitize(v.skillPath)}: ${sanitize(v.detail)}`),
62
+ ];
63
+ return { code: EXIT_DRIFT, message: lines.join("\n"), stream: "stderr" };
64
+ }
65
+ return {
66
+ code: EXIT_OK,
67
+ message: `OK: skill external-fetch gate clean -- ${entries.length} skill(s) scanned (root=${root.replace(/\r?\n/g, " ")}).`,
68
+ stream: "stdout",
69
+ };
70
+ }
71
+ //# sourceMappingURL=skill-external-fetch-gate.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftai/directive-core",
3
- "version": "0.80.0",
3
+ "version": "0.82.0",
4
4
  "description": "TypeScript engine core for the Directive framework.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,6 +30,10 @@
30
30
  "types": "./dist/wip-cap/index.d.ts",
31
31
  "default": "./dist/wip-cap/index.js"
32
32
  },
33
+ "./orphan-active": {
34
+ "types": "./dist/orphan-active/index.d.ts",
35
+ "default": "./dist/orphan-active/index.js"
36
+ },
33
37
  "./agents-md-budget": {
34
38
  "types": "./dist/agents-md-budget/index.d.ts",
35
39
  "default": "./dist/agents-md-budget/index.js"
@@ -309,8 +313,8 @@
309
313
  "provenance": true
310
314
  },
311
315
  "dependencies": {
312
- "@deftai/directive-content": "^0.80.0",
313
- "@deftai/directive-types": "^0.80.0",
316
+ "@deftai/directive-content": "^0.82.0",
317
+ "@deftai/directive-types": "^0.82.0",
314
318
  "archiver": "^8.0.0"
315
319
  },
316
320
  "scripts": {