@habitat-ai/cli 0.6.0 → 0.8.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.
@@ -1,2 +1,2 @@
1
- import { t as habitatApp } from "./habitat.app-Cl-58zQB.js";
1
+ import { t as habitatApp } from "./habitat.app-B8eGl9YJ.js";
2
2
  export { habitatApp };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as executeHabitat } from "./application-gZ8XAszE.js";
1
+ import { t as executeHabitat } from "./application-fyrwZzvC.js";
2
2
  import { t as cliPackageRoot } from "./product-version-Bqc0L8lq.js";
3
3
  //#region src/index.ts
4
4
  await executeHabitat({
package/dist/nx-plugin.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as resolveCatalogForWorkspace } from "./application-gZ8XAszE.js";
1
+ import { n as resolveCatalogForWorkspace } from "./application-fyrwZzvC.js";
2
2
  import { t as cliPackageRoot } from "./product-version-Bqc0L8lq.js";
3
3
  import { posix } from "node:path";
4
4
  //#region src/nx/projection.ts
@@ -13,6 +13,7 @@ const HABITAT_AUTHORITY_GLOB = `{${HABITAT_CATALOG_PATHS.join(",")}}`;
13
13
  const DEFAULT_CHECK_TARGET = "check:policy";
14
14
  const HABITAT_EXECUTABLE = "habitat";
15
15
  const PORTABLE_OWNER_PROJECT = /^[A-Za-z0-9@][A-Za-z0-9@._/+:-]*$/u;
16
+ const GRIT_PLATFORM_INPUT = { runtime: "node -p process.platform" };
16
17
  /**
17
18
  * Projects resolved Habitat applications and compatibility rules into native Nx targets.
18
19
  *
@@ -158,14 +159,17 @@ function ownerTarget(ownerProject, inputs, hasCompatibility) {
158
159
  };
159
160
  }
160
161
  function ownerInputs(targets, runtimeInputs) {
161
- const runtimeStrings = new Set(runtimeInputs.filter((input) => typeof input === "string"));
162
+ const ownerRuntimeInputs = new Set(runtimeInputs);
162
163
  const corpusInputs = /* @__PURE__ */ new Set();
163
- for (const target of Object.values(targets)) for (const input of target.inputs ?? []) if (typeof input === "string" && !runtimeStrings.has(input)) corpusInputs.add(input);
164
- return [...runtimeInputs, ...[...corpusInputs].sort(compareText)];
164
+ for (const target of Object.values(targets)) for (const input of target.inputs ?? []) if (typeof input !== "string") ownerRuntimeInputs.add(input);
165
+ else if (!ownerRuntimeInputs.has(input)) corpusInputs.add(input);
166
+ return [...ownerRuntimeInputs, ...[...corpusInputs].sort(compareText)];
165
167
  }
166
168
  function applicationInputs(application, runtimeInputs) {
167
169
  const files = new Set(HABITAT_CATALOG_PATHS.map(workspaceInput));
170
+ const inputs = [...runtimeInputs];
168
171
  if (application.runner.name === "grit") {
172
+ inputs.push(GRIT_PLATFORM_INPUT);
169
173
  addLocalAssetInput(files, application.runner.pattern);
170
174
  for (const entry of application.runner.acquisition.entries) if (entry.source.kind === "root-pattern") files.add(workspaceInput(entry.path));
171
175
  else addSubjectInputs(files, entry.path, entry.kind);
@@ -173,22 +177,24 @@ function applicationInputs(application, runtimeInputs) {
173
177
  addLocalAssetInput(files, application.runner.structure);
174
178
  for (const binding of application.runner.rootBindings) if (binding.path !== void 0) addSubjectInputs(files, binding.path, binding.kind);
175
179
  }
176
- return [...runtimeInputs, ...[...files].sort()];
180
+ return [...inputs, ...[...files].sort()];
177
181
  }
178
182
  function compatibilityInputs(rule, runtimeInputs) {
179
183
  const files = new Set(HABITAT_CATALOG_PATHS.map(workspaceInput));
184
+ const inputs = [...runtimeInputs];
180
185
  files.add(workspaceInput(".habitat/**"));
181
186
  files.add(workspaceInput(rule.manifestPath));
182
187
  addLocalAssetInput(files, rule.baseline);
183
188
  for (const pattern of rule.coveragePatterns) files.add(workspaceInput(pattern));
184
189
  if (rule.runner.name === "grit") {
190
+ inputs.push(GRIT_PLATFORM_INPUT);
185
191
  addLocalAssetInput(files, rule.runner.pattern);
186
192
  for (const entry of rule.runner.acquisition.entries) {
187
193
  if (entry.kind === "directory" && entry.path === ".") continue;
188
194
  addSubjectInputs(files, entry.path, entry.kind);
189
195
  }
190
196
  } else addLocalAssetInput(files, rule.runner.structure);
191
- return [...runtimeInputs, ...[...files].sort(compareText)];
197
+ return [...inputs, ...[...files].sort(compareText)];
192
198
  }
193
199
  function addLocalAssetInput(target, asset) {
194
200
  if (asset.provenance.kind === "local") target.add(workspaceInput(asset.relativePath));
@@ -1,4 +1,4 @@
1
- import { t as entrypoint } from "./cli-hhbbymEz.js";
1
+ import { t as entrypoint } from "./cli-B3N248Jk.js";
2
2
  import { n as createOclifSourceBundle } from "./host-BcptPYDL.js";
3
3
  import { deriveRuntimeArtifacts } from "@habitat-ai/sdk/runtime/derivation";
4
4
  //#region src/oclif.ts
package/dist/oclif.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { r as FINALLY_HOOK } from "./host-BcptPYDL.js";
2
- import { n as sourceBundle, t as COMMANDS } from "./oclif-CJS8CHjO.js";
2
+ import { n as sourceBundle, t as COMMANDS } from "./oclif-fzwqfE6X.js";
3
3
  export { COMMANDS, FINALLY_HOOK, sourceBundle };
@@ -28,4 +28,7 @@
28
28
 
29
29
  ## Validation
30
30
 
31
+ - Read this package's `habitat.toml` for its service blueprint version. From the workspace root,
32
+ run `habitat check --owner <%= name %> --json` and confirm the selected bridge rule was evaluated.
33
+ The unversioned service blueprint README and skill belong to version 1, not this generated service.
31
34
  - Run `bunx nx run <%= name %>:typecheck` and `bunx nx run <%= name %>:build`.
@@ -2,7 +2,7 @@ schemaVersion = 1
2
2
  id = <%- nameLiteral %>
3
3
  ownerProject = <%- nameLiteral %>
4
4
  blueprint = "service"
5
- blueprintVersion = 3
5
+ blueprintVersion = 5
6
6
 
7
7
  [roots]
8
8
  project = <%- directoryLiteral %>
@@ -1166,5 +1166,5 @@
1166
1166
  "enableJsonFlag": false
1167
1167
  }
1168
1168
  },
1169
- "version": "0.6.0"
1169
+ "version": "0.8.0"
1170
1170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@habitat-ai/cli",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -70,18 +70,18 @@
70
70
  "test": "vitest run --project habitat-cli"
71
71
  },
72
72
  "dependencies": {
73
- "@effect/platform-node": "4.0.0-beta.101",
73
+ "@effect/platform-node": "4.1.4",
74
74
  "@getgrit/cli": "0.1.0-alpha.1743007075",
75
- "@habitat-ai/sdk": "0.6.0",
75
+ "@habitat-ai/sdk": "0.8.0",
76
76
  "@nx/devkit": "23.1.1",
77
77
  "@oclif/core": "4.13.3",
78
78
  "@oclif/plugin-help": "^6.2.27",
79
79
  "@oclif/plugin-plugins": "^5.4.84",
80
80
  "@opentelemetry/api": "1.9.0",
81
- "@orpc/contract": "2.0.0-beta.32",
82
- "@orpc/experimental-effect": "2.0.0-beta.32",
83
- "@orpc/server": "2.0.0-beta.32",
84
- "effect": "4.0.0-beta.101",
81
+ "@orpc/contract": "2.0.0-beta.51",
82
+ "@orpc/effect": "2.0.0-beta.51",
83
+ "@orpc/server": "2.0.0-beta.51",
84
+ "effect": "4.1.4",
85
85
  "nx": "23.1.1",
86
86
  "picomatch": "4.0.4",
87
87
  "smol-toml": "1.7.0",