@indigoai-us/hq-cli 5.312.2-beta.0 → 5.313.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/CHANGELOG.md +9 -2
- package/assets/scaffold/core/scripts/lib/work-mesh-live-hook.sh +378 -0
- package/assets/scaffold/core/scripts/lib/work-mesh-live-rebind.sh +141 -0
- package/assets/scaffold/core/scripts/migrate-policy-triggers.sh +373 -0
- package/assets/scaffold/core/scripts/register-project.sh +262 -0
- package/assets/scaffold/core/scripts/work-mesh-live-rebind.sh +59 -0
- package/dist/command-catalog.generated.d.ts +80 -0
- package/dist/command-catalog.generated.js +99 -0
- package/dist/commands/cloud.js +0 -1
- package/dist/commands/company-rename-flag.d.ts +4 -0
- package/dist/commands/company-rename-flag.js +7 -0
- package/dist/commands/company-rename.d.ts +4 -0
- package/dist/commands/company-rename.js +90 -0
- package/dist/commands/company.js +2 -0
- package/dist/commands/core-eval-trigger-native.d.ts +4 -0
- package/dist/commands/core-eval-trigger-native.js +12 -0
- package/dist/commands/core-knowledge-prefs.d.ts +0 -1
- package/dist/commands/core-knowledge-prefs.js +1 -1
- package/dist/commands/core-migrate-policy-triggers-native.d.ts +21 -0
- package/dist/commands/core-migrate-policy-triggers-native.js +378 -0
- package/dist/commands/core-native-hook-helper-commands.d.ts +4 -0
- package/dist/commands/core-native-hook-helper-commands.js +56 -0
- package/dist/commands/core-native-hook-helpers-flag.d.ts +4 -0
- package/dist/commands/core-native-hook-helpers-flag.js +7 -0
- package/dist/commands/core-register-project-native.d.ts +30 -0
- package/dist/commands/core-register-project-native.js +347 -0
- package/dist/commands/core-work-mesh-live-rebind-native.d.ts +18 -0
- package/dist/commands/core-work-mesh-live-rebind-native.js +262 -0
- package/dist/commands/core-worker-share-native.d.ts +0 -1
- package/dist/commands/core-worker-share-native.js +1 -1
- package/dist/commands/core.js +7 -0
- package/dist/commands/lanes-message.js +3 -0
- package/dist/commands/lanes-questions.js +2 -1
- package/dist/commands/lanes-resume.js +3 -0
- package/dist/commands/lanes.js +151 -21
- package/dist/fast-core.js +10 -3
- package/dist/fast-scaffold.d.ts +2 -0
- package/dist/fast-scaffold.js +11 -0
- package/dist/lib/doctor/checks/work-context.js +9 -1
- package/dist/lib/lanes/config.d.ts +3 -0
- package/dist/lib/lanes/config.js +14 -0
- package/dist/lib/lanes/disk-guard.d.ts +66 -0
- package/dist/lib/lanes/disk-guard.js +172 -0
- package/dist/lib/lanes/flag-keys.d.ts +2 -0
- package/dist/lib/lanes/flag-keys.js +2 -0
- package/dist/lib/lanes/grants.d.ts +4 -3
- package/dist/lib/lanes/grants.js +12 -7
- package/dist/lib/lanes/hire-grant-dispatch.js +2 -3
- package/dist/lib/lanes/index.d.ts +1 -1
- package/dist/lib/lanes/index.js +1 -1
- package/dist/lib/lanes/reconcile.d.ts +7 -1
- package/dist/lib/lanes/reconcile.js +142 -11
- package/dist/lib/lanes/registry-flag.d.ts +6 -0
- package/dist/lib/lanes/registry-flag.js +25 -0
- package/dist/lib/lanes/spawn.d.ts +5 -0
- package/dist/lib/lanes/spawn.js +26 -1
- package/dist/lib/lanes/store.js +11 -0
- package/dist/lib/lanes/types.d.ts +11 -1
- package/dist/lib/lanes/types.js +1 -0
- package/dist/lib/mesh/client.js +23 -5
- package/dist/lib/mesh/denial-codes.d.ts +5 -0
- package/dist/lib/mesh/denial-codes.js +14 -0
- package/dist/lib/mesh/live/daemon/doctor.d.ts +2 -0
- package/dist/lib/mesh/live/daemon/doctor.js +11 -1
- package/dist/lib/search-index/embed-lock.d.ts +2 -0
- package/dist/lib/search-index/embed-lock.js +10 -1
- package/dist/lib/work-context/contract.d.ts +3 -0
- package/dist/lib/work-context/contract.schema.json +3 -1
- package/dist/lib/work-context/outbox.d.ts +14 -5
- package/dist/lib/work-context/outbox.js +48 -5
- package/dist/lib/work-context/reconcile.js +26 -5
- package/dist/main.d.ts +20 -0
- package/dist/main.js +8 -1
- package/dist/utils/core-eval-trigger.d.ts +4 -0
- package/dist/utils/core-eval-trigger.js +88 -0
- package/dist/utils/pack-contributions.d.ts +0 -5
- package/dist/utils/pack-contributions.js +1 -1
- package/dist/utils/redact-error-text.d.ts +0 -2
- package/dist/utils/redact-error-text.js +1 -1
- package/dist/utils/sandbox-runner-client.d.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,88 @@
|
|
|
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
|
|
@@ -77,11 +77,6 @@ export type LinkStatus = 'live' | 'broken' | 'missing' | 'foreign';
|
|
|
77
77
|
* effect (a config merge) is handled separately (US-004/US-005).
|
|
78
78
|
*/
|
|
79
79
|
export declare function contributionLinks(hqRoot: string, packDir: string, contributes: Partial<Record<PackContributeKey, string[]>>): WiredLink[];
|
|
80
|
-
/**
|
|
81
|
-
* Canonical absolute path — resolves symlinks and platform aliases such as
|
|
82
|
-
* macOS `/var` ↔ `/private/var` so equivalent paths compare equal.
|
|
83
|
-
*/
|
|
84
|
-
export declare function canonicalPath(p: string): string;
|
|
85
80
|
/** Classify a host path against the link that should own it. */
|
|
86
81
|
export declare function linkStatus(link: WiredLink, packDir?: string): LinkStatus;
|
|
87
82
|
/** A content pack's manifest plus the install-time stamped source. */
|
|
@@ -137,7 +137,7 @@ export function contributionLinks(hqRoot, packDir, contributes) {
|
|
|
137
137
|
* Canonical absolute path — resolves symlinks and platform aliases such as
|
|
138
138
|
* macOS `/var` ↔ `/private/var` so equivalent paths compare equal.
|
|
139
139
|
*/
|
|
140
|
-
|
|
140
|
+
function canonicalPath(p) {
|
|
141
141
|
try {
|
|
142
142
|
return fs.realpathSync.native(p);
|
|
143
143
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** Upper bound on any redacted diagnostic — a message, not a payload dump. */
|
|
2
|
-
export declare const REDACTED_TEXT_MAX_LENGTH = 1000;
|
|
3
1
|
/**
|
|
4
2
|
* Strip credentials from `text`, flatten control characters/whitespace, and
|
|
5
3
|
* bound the length. Idempotent, so applying it at both the throw site and the
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// share it: provider-minted text is untrusted and must never be printed raw.
|
|
12
12
|
import { redactUrlsInText } from "./redact-url.js";
|
|
13
13
|
/** Upper bound on any redacted diagnostic — a message, not a payload dump. */
|
|
14
|
-
|
|
14
|
+
const REDACTED_TEXT_MAX_LENGTH = 1_000;
|
|
15
15
|
/**
|
|
16
16
|
* Strip credentials from `text`, flatten control characters/whitespace, and
|
|
17
17
|
* bound the length. Idempotent, so applying it at both the throw site and the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type SandboxRunnerState = "queued" | "running" | "succeeded" | "failed";
|
|
2
2
|
export interface SandboxRunnerStartRequest {
|
|
3
3
|
companyUid: string;
|
|
4
4
|
secretNames: string[];
|
|
@@ -45,4 +45,5 @@ export declare class SandboxRunnerClient {
|
|
|
45
45
|
getJob(token: string, jobId: string): Promise<SandboxRunnerJob>;
|
|
46
46
|
pollJob(token: string, jobId: string, options?: SandboxRunnerPollOptions): Promise<SandboxRunnerJob>;
|
|
47
47
|
}
|
|
48
|
+
export {};
|
|
48
49
|
//# sourceMappingURL=sandbox-runner-client.d.ts.map
|