@indigoai-us/hq-cli 5.345.122 → 5.345.123

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 (30) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +15 -0
  3. package/assets/scaffold/core/scripts/handoff-sync-prefetch.sh +121 -0
  4. package/assets/scaffold/core/scripts/handoff-sync-publish.sh +124 -0
  5. package/assets/scaffold/core/scripts/knowledge-pulse-lock.sh +27 -0
  6. package/assets/scaffold/core/scripts/lib/session-skill-catalog.sh +226 -0
  7. package/assets/scaffold/core/scripts/skill-installed.sh +43 -0
  8. package/dist/command-catalog.generated.d.ts +93 -0
  9. package/dist/command-catalog.generated.js +111 -0
  10. package/dist/command-registration-plan.d.ts +6 -0
  11. package/dist/command-registration-plan.js +1 -0
  12. package/dist/commands/core-bucket-c-handoff-sync-fast.d.ts +3 -0
  13. package/dist/commands/core-bucket-c-handoff-sync-fast.js +16 -0
  14. package/dist/commands/core-bucket-c-handoff-sync-native.d.ts +45 -0
  15. package/dist/commands/core-bucket-c-handoff-sync-native.js +300 -0
  16. package/dist/commands/core-bucket-c-small-fast.d.ts +5 -0
  17. package/dist/commands/core-bucket-c-small-fast.js +19 -0
  18. package/dist/commands/core-bucket-c-small-native.d.ts +11 -0
  19. package/dist/commands/core-bucket-c-small-native.js +197 -0
  20. package/dist/commands/core-derive-trigger-facts-native.js +4 -1
  21. package/dist/commands/core.js +25 -0
  22. package/dist/commands/deploy-comments.d.ts +2 -0
  23. package/dist/commands/deploy-comments.js +2 -2
  24. package/dist/commands/deploy-list.d.ts +22 -0
  25. package/dist/commands/deploy-list.js +153 -0
  26. package/dist/commands/lanes.js +41 -2
  27. package/dist/fast-scaffold.js +48 -0
  28. package/dist/lib/core-utils/session-company.d.ts +3 -0
  29. package/dist/lib/core-utils/session-company.js +78 -0
  30. package/package.json +1 -1
@@ -0,0 +1,78 @@
1
+ import * as fs from "node:fs";
2
+ import * as path from "node:path";
3
+ import { resolveSessionId } from "./session-id.js";
4
+ function metaValue(contents, key) {
5
+ for (const line of contents.split("\n")) {
6
+ const record = process.platform === "win32" ? line.replace(/\r$/, "") : line;
7
+ const first = record.match(/^\s*(\S+)/)?.[1] ?? "";
8
+ if (first !== `${key}:`)
9
+ continue;
10
+ return record.replace(/^[^:]+:[\t ]*/, "").replace(/^"|"$/g, "");
11
+ }
12
+ return "";
13
+ }
14
+ function listedCompanySlugs(contents) {
15
+ const listed = metaValue(contents, "company_slugs");
16
+ const primary = metaValue(contents, "company_slug");
17
+ const candidates = listed ? listed.split(",") : primary ? [primary] : [];
18
+ const seen = new Set();
19
+ const result = candidates.filter((slug) => {
20
+ if (!/^[A-Za-z0-9_-]+$/.test(slug) || seen.has(slug))
21
+ return false;
22
+ seen.add(slug);
23
+ return true;
24
+ });
25
+ if (result.length > 1 && result.includes("personal"))
26
+ return primary ? [primary] : [];
27
+ return primary && result[0] !== primary ? [primary] : result;
28
+ }
29
+ function isExactCompanyDirectory(root, slug) {
30
+ const companies = path.join(root, "companies");
31
+ try {
32
+ for (const entry of fs.readdirSync(companies)) {
33
+ const candidate = path.join(companies, entry);
34
+ try {
35
+ if (!fs.statSync(candidate).isDirectory() || fs.lstatSync(candidate).isSymbolicLink())
36
+ continue;
37
+ if (entry === slug)
38
+ return true;
39
+ }
40
+ catch (error) {
41
+ const code = error.code;
42
+ if (code !== "ENOENT" && code !== "ENOTDIR" && code !== "EACCES" && code !== "ELOOP")
43
+ throw error;
44
+ }
45
+ }
46
+ }
47
+ catch (error) {
48
+ const code = error.code;
49
+ if (code !== "ENOENT" && code !== "ENOTDIR" && code !== "EACCES" && code !== "ELOOP")
50
+ throw error;
51
+ }
52
+ return false;
53
+ }
54
+ /** Reads the active session's company lock without importing the full hq-session command. */
55
+ export function sessionCompanySlugs(root, env = process.env, multiCompanyLockEnabled = false) {
56
+ const sessionId = resolveSessionId(root, env);
57
+ if (!sessionId)
58
+ return [];
59
+ const metaPath = path.join(root, "workspace", "sessions", sessionId, "meta.yaml");
60
+ let contents;
61
+ try {
62
+ if (!fs.statSync(metaPath).isFile())
63
+ return [];
64
+ contents = fs.readFileSync(metaPath, "utf8");
65
+ }
66
+ catch (error) {
67
+ const code = error.code;
68
+ if (code === "ENOENT" || code === "ENOTDIR" || code === "EACCES" || code === "ELOOP")
69
+ return [];
70
+ throw error;
71
+ }
72
+ if (!multiCompanyLockEnabled) {
73
+ const primary = metaValue(contents, "company_slug");
74
+ return primary ? [primary] : [];
75
+ }
76
+ return listedCompanySlugs(contents).filter((slug) => slug === "personal" || isExactCompanyDirectory(root, slug));
77
+ }
78
+ //# sourceMappingURL=session-company.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.345.122",
3
+ "version": "5.345.123",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {