@indigoai-us/hq-cli 5.312.1 → 5.312.2-beta.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 (48) hide show
  1. package/CHANGELOG.md +2 -5
  2. package/dist/command-catalog.generated.d.ts +0 -65
  3. package/dist/command-catalog.generated.js +0 -80
  4. package/dist/commands/cloud.js +1 -0
  5. package/dist/commands/company.js +0 -2
  6. package/dist/commands/core.js +0 -7
  7. package/dist/fast-core.js +3 -10
  8. package/dist/fast-scaffold.d.ts +0 -2
  9. package/dist/fast-scaffold.js +0 -11
  10. package/dist/lib/doctor/checks/work-context.js +1 -9
  11. package/dist/lib/mesh/client.js +5 -23
  12. package/dist/lib/mesh/live/daemon/doctor.d.ts +0 -2
  13. package/dist/lib/mesh/live/daemon/doctor.js +1 -11
  14. package/dist/lib/search-index/embed-lock.d.ts +0 -2
  15. package/dist/lib/search-index/embed-lock.js +1 -10
  16. package/dist/lib/work-context/contract.d.ts +0 -3
  17. package/dist/lib/work-context/contract.schema.json +1 -3
  18. package/dist/lib/work-context/outbox.d.ts +5 -14
  19. package/dist/lib/work-context/outbox.js +5 -48
  20. package/dist/lib/work-context/reconcile.js +5 -26
  21. package/dist/main.d.ts +0 -20
  22. package/dist/main.js +1 -8
  23. package/package.json +1 -1
  24. package/assets/scaffold/core/scripts/lib/work-mesh-live-hook.sh +0 -378
  25. package/assets/scaffold/core/scripts/lib/work-mesh-live-rebind.sh +0 -141
  26. package/assets/scaffold/core/scripts/migrate-policy-triggers.sh +0 -373
  27. package/assets/scaffold/core/scripts/register-project.sh +0 -262
  28. package/assets/scaffold/core/scripts/work-mesh-live-rebind.sh +0 -59
  29. package/dist/commands/company-rename-flag.d.ts +0 -4
  30. package/dist/commands/company-rename-flag.js +0 -7
  31. package/dist/commands/company-rename.d.ts +0 -4
  32. package/dist/commands/company-rename.js +0 -90
  33. package/dist/commands/core-eval-trigger-native.d.ts +0 -4
  34. package/dist/commands/core-eval-trigger-native.js +0 -12
  35. package/dist/commands/core-migrate-policy-triggers-native.d.ts +0 -21
  36. package/dist/commands/core-migrate-policy-triggers-native.js +0 -378
  37. package/dist/commands/core-native-hook-helper-commands.d.ts +0 -4
  38. package/dist/commands/core-native-hook-helper-commands.js +0 -56
  39. package/dist/commands/core-native-hook-helpers-flag.d.ts +0 -4
  40. package/dist/commands/core-native-hook-helpers-flag.js +0 -7
  41. package/dist/commands/core-register-project-native.d.ts +0 -30
  42. package/dist/commands/core-register-project-native.js +0 -347
  43. package/dist/commands/core-work-mesh-live-rebind-native.d.ts +0 -18
  44. package/dist/commands/core-work-mesh-live-rebind-native.js +0 -262
  45. package/dist/lib/mesh/denial-codes.d.ts +0 -5
  46. package/dist/lib/mesh/denial-codes.js +0 -14
  47. package/dist/utils/core-eval-trigger.d.ts +0 -4
  48. package/dist/utils/core-eval-trigger.js +0 -88
@@ -1,88 +0,0 @@
1
- /** Pure evaluator shared by the native command and migration helper. */
2
- function parseBooleanExpression(input) {
3
- const expression = input;
4
- if (/[^01&|!() \t]/.test(expression))
5
- return { valid: false, value: false };
6
- let position = 0;
7
- let valid = true;
8
- const skip = () => { while (expression[position] === " " || expression[position] === "\t")
9
- position += 1; };
10
- const atom = () => {
11
- skip();
12
- const char = expression[position];
13
- if (char === "(") {
14
- position += 1;
15
- const value = parseOr();
16
- skip();
17
- if (expression[position] !== ")") {
18
- valid = false;
19
- return false;
20
- }
21
- position += 1;
22
- return value;
23
- }
24
- if (char === "0" || char === "1") {
25
- position += 1;
26
- return char === "1";
27
- }
28
- valid = false;
29
- return false;
30
- };
31
- const parseNot = () => {
32
- skip();
33
- if (expression[position] === "!") {
34
- position += 1;
35
- return !parseNot();
36
- }
37
- return atom();
38
- };
39
- const parseAnd = () => {
40
- let value = parseNot();
41
- skip();
42
- while (valid && expression.slice(position, position + 2) === "&&") {
43
- position += 2;
44
- const rhs = parseNot();
45
- value = value && rhs;
46
- skip();
47
- }
48
- return value;
49
- };
50
- function parseOr() {
51
- let value = parseAnd();
52
- skip();
53
- while (valid && expression.slice(position, position + 2) === "||") {
54
- position += 2;
55
- const rhs = parseAnd();
56
- value = value || rhs;
57
- skip();
58
- }
59
- return value;
60
- }
61
- const value = parseOr();
62
- skip();
63
- return { valid: valid && position === expression.length, value };
64
- }
65
- /** Return shell-compatible 0/1/2: true, false, or malformed. */
66
- export function evaluateTrigger(expr, facts = "") {
67
- if (expr.replace(/[ \t]/g, "") === "")
68
- return 2;
69
- const have = new Set(facts.split(/[ ,]+/).filter(Boolean));
70
- const substituted = expr.replace(/[A-Za-z0-9_./][A-Za-z0-9_./-]*/g, (token) => have.has(token.toLowerCase()) ? "1" : "0");
71
- if (/[^01&|!() \t]/.test(substituted))
72
- return 2;
73
- const parsed = parseBooleanExpression(substituted);
74
- if (!parsed.valid)
75
- return 2;
76
- return parsed.value ? 0 : 1;
77
- }
78
- export function checkTriggerExpressions(stdin) {
79
- if (!stdin)
80
- return "";
81
- return stdin.split("\n").filter((line, index, all) => index < all.length - 1 || line !== "").map((line) => {
82
- const tab = line.indexOf("\t");
83
- const id = tab < 0 ? line : line.slice(0, tab);
84
- const expr = tab < 0 ? "" : line.slice(tab + 1);
85
- return `${id}\t${evaluateTrigger(expr, "") === 2 ? "malformed" : "ok"}\n`;
86
- }).join("");
87
- }
88
- //# sourceMappingURL=core-eval-trigger.js.map