@indigoai-us/hq-cli 5.345.50 → 5.345.52

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 (33) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/commands/core-hq-session-native.js +2 -2
  3. package/dist/commands/core-resolve-company-native.js +2 -2
  4. package/dist/commands/lanes.js +52 -11
  5. package/dist/commands/secrets.js +2 -2
  6. package/dist/commands/workers.js +2 -2
  7. package/dist/hq-cloud-sync-runner/bin/sync-runner.js +40293 -13770
  8. package/dist/hq-cloud-sync-runner/package.json +1 -1
  9. package/dist/lib/bot/daemon.d.ts +1 -1
  10. package/dist/lib/bot/daemon.js +35 -29
  11. package/dist/lib/daemon/install.js +34 -3
  12. package/dist/lib/doctor/checks/bots.js +3 -8
  13. package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
  14. package/dist/lib/flag-registry-worker-source.generated.js +1 -1
  15. package/dist/lib/lanes/outpost-dispatch.d.ts +1 -0
  16. package/dist/lib/lanes/outpost-dispatch.js +2 -0
  17. package/dist/lib/mesh/live/daemon/install.js +28 -15
  18. package/dist/lib/service-manager/index.d.ts +3 -0
  19. package/dist/lib/service-manager/index.js +22 -6
  20. package/dist/lib/service-manager/launchd.d.ts +40 -3
  21. package/dist/lib/service-manager/launchd.js +106 -5
  22. package/dist/lib/service-manager/migration-state.d.ts +12 -0
  23. package/dist/lib/service-manager/migration-state.js +46 -0
  24. package/dist/lib/service-manager/migration.d.ts +22 -0
  25. package/dist/lib/service-manager/migration.js +85 -0
  26. package/dist/lib/service-manager/startup-migration.d.ts +24 -0
  27. package/dist/lib/service-manager/startup-migration.js +27 -0
  28. package/dist/lib/service-manager/types.d.ts +3 -0
  29. package/dist/main.js +22 -0
  30. package/dist/native-fast-route.d.ts +4 -0
  31. package/dist/native-fast-route.js +20 -0
  32. package/dist/utils/resident-package-preload.js +2 -1
  33. package/package.json +2 -2
@@ -28,6 +28,26 @@ export async function fastFlagEnabled(flagKey, env = process.env, options = {})
28
28
  return false;
29
29
  }
30
30
  }
31
+ /** Reads a fail-safe flag that stays enabled unless a fresh value disables it. */
32
+ export async function fastFlagEnabledDefaultOn(flagKey, env = process.env, options = {}) {
33
+ try {
34
+ const override = nativeRouteOverride(flagKey, env, options.numericEnvironmentOverride !== false);
35
+ if (override !== null)
36
+ return override;
37
+ const [{ resolveProcessFlagCompanyContext }, { readFlagSnapshotFile }] = await Promise.all([
38
+ import("./lib/process-flag-company-context.js"),
39
+ import("./lib/flag-snapshot-file.js"),
40
+ ]);
41
+ const { companyUid } = resolveProcessFlagCompanyContext(env);
42
+ if (!companyUid)
43
+ return true;
44
+ return readFlagSnapshotFile(companyUid, { env })?.flags[flagKey] !== false;
45
+ }
46
+ catch {
47
+ // This flag is a kill switch: missing scope or cache data must leave the feature enabled.
48
+ return true;
49
+ }
50
+ }
31
51
  /** The route's documented CLI override also accepts the conventional 1/0. */
32
52
  function nativeRouteOverride(flagKey, env, numericEnvironmentOverride) {
33
53
  const override = readLocalOverride(flagKey, env);
@@ -41,7 +41,7 @@ export const RESIDENT_PACKAGE_MODULES = {
41
41
  ],
42
42
  "bot-logs-follow": [],
43
43
  mcp: ["../lib/mcp/tools.js", "../lib/mcp/prompts.js", "../lib/anywhere-person-setting.js", "../utils/cognito-session.js", "@indigoai-us/hq-cloud", "../sentry.js", "../lib/doctor/client-health-reason-codes-flag.js", "@indigoai-us/hq-flags-client"],
44
- childWrapper: ["../main.js"],
44
+ childWrapper: ["../main.js", "../lib/service-manager/startup-migration.js"],
45
45
  coreJobRun: ["../lib/flag-registry.js"],
46
46
  "daemon-call": ["../lib/daemon/protocol.js"],
47
47
  daemon: [
@@ -200,6 +200,7 @@ const LOADERS = {
200
200
  ],
201
201
  childWrapper: [
202
202
  () => import("../main.js"),
203
+ () => import("../lib/service-manager/startup-migration.js"),
203
204
  ],
204
205
  coreJobRun: [
205
206
  () => import("../lib/flag-registry.js"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.345.50",
3
+ "version": "5.345.52",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -48,7 +48,7 @@
48
48
  "@aws-sdk/client-iot-data-plane": "^3.1096.0",
49
49
  "@aws-sdk/client-s3": "^3.1049.0",
50
50
  "@aws-sdk/dsql-signer": "^3.1146.0",
51
- "@indigoai-us/hq-cloud": "~6.18.50",
51
+ "@indigoai-us/hq-cloud": "~6.18.54",
52
52
  "@indigoai-us/hq-flags-client": "^0.1.2",
53
53
  "@modelcontextprotocol/sdk": "1.29.0",
54
54
  "@sentry/node": "^10.49.0",