@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.
- package/README.md +46 -0
- package/dist/{application-gZ8XAszE.js → application-fyrwZzvC.js} +3 -3
- package/dist/application.js +1 -1
- package/dist/{cli-hhbbymEz.js → cli-B3N248Jk.js} +2451 -363
- package/dist/cli.js +1 -1
- package/dist/generators/cli-command.js +1 -1
- package/dist/generators/service.js +2 -2
- package/dist/{habitat.app-Cl-58zQB.js → habitat.app-B8eGl9YJ.js} +1990 -319
- package/dist/habitat.app.js +1 -1
- package/dist/index.js +1 -1
- package/dist/nx-plugin.js +12 -6
- package/dist/{oclif-CJS8CHjO.js → oclif-fzwqfE6X.js} +1 -1
- package/dist/oclif.js +1 -1
- package/generators/service/files/AGENTS.md.template +3 -0
- package/generators/service/files/habitat.toml.template +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
package/dist/habitat.app.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as habitatApp } from "./habitat.app-
|
|
1
|
+
import { t as habitatApp } from "./habitat.app-B8eGl9YJ.js";
|
|
2
2
|
export { habitatApp };
|
package/dist/index.js
CHANGED
package/dist/nx-plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveCatalogForWorkspace } from "./application-
|
|
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
|
|
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
|
|
164
|
-
|
|
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 [...
|
|
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 [...
|
|
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-
|
|
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
|
@@ -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`.
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@habitat-ai/cli",
|
|
3
|
-
"version": "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.
|
|
73
|
+
"@effect/platform-node": "4.1.4",
|
|
74
74
|
"@getgrit/cli": "0.1.0-alpha.1743007075",
|
|
75
|
-
"@habitat-ai/sdk": "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.
|
|
82
|
-
"@orpc/
|
|
83
|
-
"@orpc/server": "2.0.0-beta.
|
|
84
|
-
"effect": "4.
|
|
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",
|