@hasna/machines 0.0.19 → 0.0.21
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 +26 -8
- package/dist/cli/index.js +198 -13
- package/dist/commands/workspace.d.ts +37 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/compatibility.d.ts.map +1 -1
- package/dist/consumer.d.ts +2 -2
- package/dist/consumer.d.ts.map +1 -1
- package/dist/consumer.js +41 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +189 -13
- package/dist/mcp/index.js +12 -13
- package/dist/topology.d.ts +13 -0
- package/dist/topology.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,13 +49,20 @@ machines self-test
|
|
|
49
49
|
|
|
50
50
|
## Topology SDK
|
|
51
51
|
|
|
52
|
-
`@hasna/machines` exposes a compact
|
|
53
|
-
that need machine identity without importing CLI
|
|
54
|
-
need the stable app-to-app contract
|
|
52
|
+
`@hasna/machines` exposes a compact consumer SDK for other open-core packages
|
|
53
|
+
that need machine identity without importing CLI, MCP, agent, installer, or
|
|
54
|
+
storage-heavy internals. Consumers that only need the stable app-to-app contract
|
|
55
|
+
should import `@hasna/machines/consumer`:
|
|
55
56
|
|
|
56
57
|
```ts
|
|
57
|
-
import {
|
|
58
|
-
|
|
58
|
+
import {
|
|
59
|
+
MACHINES_CONSUMER_CONTRACT,
|
|
60
|
+
discoverMachineTopology,
|
|
61
|
+
getLocalMachineTopology,
|
|
62
|
+
resolveMachineRoute,
|
|
63
|
+
} from "@hasna/machines/consumer";
|
|
64
|
+
|
|
65
|
+
console.log(MACHINES_CONSUMER_CONTRACT.schema_version);
|
|
59
66
|
const topology = discoverMachineTopology();
|
|
60
67
|
const local = getLocalMachineTopology();
|
|
61
68
|
const route = resolveMachineRoute("spark01");
|
|
@@ -67,9 +74,11 @@ The SDK merges manifest entries, local heartbeats, SSH route hints, and
|
|
|
67
74
|
when present, and fall back to local probes or app-local machine registries when
|
|
68
75
|
it is absent.
|
|
69
76
|
|
|
70
|
-
Topology, route, and compatibility JSON include `schema_version`,
|
|
71
|
-
version metadata, and capability flags. The current consumer contract
|
|
72
|
-
`1
|
|
77
|
+
Topology, route, workspace, and compatibility JSON include `schema_version`,
|
|
78
|
+
package version metadata, and capability flags. The current consumer contract
|
|
79
|
+
version is `1`; the exported `MACHINES_CONSUMER_CONTRACT` records the stable
|
|
80
|
+
entrypoint, envelope names, and stable exports used by downstream apps such as
|
|
81
|
+
`@hasna/knowledge`.
|
|
73
82
|
|
|
74
83
|
CLI and MCP expose the same topology view:
|
|
75
84
|
|
|
@@ -104,6 +113,15 @@ workspace inference second; consumers can still pass manual overrides.
|
|
|
104
113
|
machines workspace resolve --machine spark01 --project open-knowledge --repo open-knowledge --json
|
|
105
114
|
```
|
|
106
115
|
|
|
116
|
+
If a resolver result reports inferred project or open-files roots, repair the
|
|
117
|
+
manifest metadata explicitly. The command previews changes by default and only
|
|
118
|
+
writes when `--apply` is passed:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
machines workspace repair --machine spark01 --project open-knowledge --repo open-knowledge --json
|
|
122
|
+
machines workspace repair --machine spark01 --project open-knowledge --repo open-knowledge --apply --json
|
|
123
|
+
```
|
|
124
|
+
|
|
107
125
|
## Compatibility SDK
|
|
108
126
|
|
|
109
127
|
Open-core consumers can use `@hasna/machines` to preflight a peer before
|
package/dist/cli/index.js
CHANGED
|
@@ -7628,6 +7628,16 @@ import { spawnSync } from "child_process";
|
|
|
7628
7628
|
init_paths();
|
|
7629
7629
|
var MACHINES_CONSUMER_CONTRACT_VERSION = 1;
|
|
7630
7630
|
var MACHINES_PACKAGE_NAME = "@hasna/machines";
|
|
7631
|
+
var MACHINES_CONSUMER_CAPABILITIES = {
|
|
7632
|
+
topology: true,
|
|
7633
|
+
compatibility: true,
|
|
7634
|
+
route_resolution: true,
|
|
7635
|
+
cli_json_fallback: true,
|
|
7636
|
+
workspace_path_mapping: true
|
|
7637
|
+
};
|
|
7638
|
+
function getMachinesConsumerCapabilities() {
|
|
7639
|
+
return { ...MACHINES_CONSUMER_CAPABILITIES };
|
|
7640
|
+
}
|
|
7631
7641
|
function normalizePlatform2(value = platform3()) {
|
|
7632
7642
|
const normalized = value.toLowerCase();
|
|
7633
7643
|
if (normalized === "darwin" || normalized === "macos")
|
|
@@ -7828,13 +7838,7 @@ function discoverMachineTopology(options = {}) {
|
|
|
7828
7838
|
name: MACHINES_PACKAGE_NAME,
|
|
7829
7839
|
version: getPackageVersion()
|
|
7830
7840
|
},
|
|
7831
|
-
capabilities:
|
|
7832
|
-
topology: true,
|
|
7833
|
-
compatibility: true,
|
|
7834
|
-
route_resolution: true,
|
|
7835
|
-
cli_json_fallback: true,
|
|
7836
|
-
workspace_path_mapping: true
|
|
7837
|
-
},
|
|
7841
|
+
capabilities: getMachinesConsumerCapabilities(),
|
|
7838
7842
|
generated_at: now.toISOString(),
|
|
7839
7843
|
local_machine_id: localMachineId,
|
|
7840
7844
|
local_hostname: hostname3(),
|
|
@@ -9034,6 +9038,156 @@ function getStatus() {
|
|
|
9034
9038
|
};
|
|
9035
9039
|
}
|
|
9036
9040
|
|
|
9041
|
+
// src/commands/workspace.ts
|
|
9042
|
+
init_paths();
|
|
9043
|
+
function isRecord2(value) {
|
|
9044
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
9045
|
+
}
|
|
9046
|
+
function cloneMetadata(metadata) {
|
|
9047
|
+
return isRecord2(metadata) ? { ...metadata } : {};
|
|
9048
|
+
}
|
|
9049
|
+
function mappedPath(metadata, field, key) {
|
|
9050
|
+
const container = metadata[field];
|
|
9051
|
+
if (!isRecord2(container))
|
|
9052
|
+
return null;
|
|
9053
|
+
const value = container[key];
|
|
9054
|
+
if (typeof value === "string" && value.trim())
|
|
9055
|
+
return value.trim();
|
|
9056
|
+
if (isRecord2(value)) {
|
|
9057
|
+
const nested = value["path"] ?? value["root"] ?? value["workspacePath"] ?? value["workspace_path"];
|
|
9058
|
+
if (typeof nested === "string" && nested.trim())
|
|
9059
|
+
return nested.trim();
|
|
9060
|
+
}
|
|
9061
|
+
return null;
|
|
9062
|
+
}
|
|
9063
|
+
function writeMappedPath(metadata, field, key, path) {
|
|
9064
|
+
const existing = metadata[field];
|
|
9065
|
+
const container = isRecord2(existing) ? { ...existing } : {};
|
|
9066
|
+
container[key] = path;
|
|
9067
|
+
metadata[field] = container;
|
|
9068
|
+
}
|
|
9069
|
+
function buildPatch(input) {
|
|
9070
|
+
const previous = mappedPath(input.metadata, input.field, input.key);
|
|
9071
|
+
if (!input.path) {
|
|
9072
|
+
return {
|
|
9073
|
+
field: input.field,
|
|
9074
|
+
key: input.key,
|
|
9075
|
+
path: null,
|
|
9076
|
+
previous_path: previous,
|
|
9077
|
+
status: "unresolved"
|
|
9078
|
+
};
|
|
9079
|
+
}
|
|
9080
|
+
const status = previous === input.path ? "unchanged" : input.apply ? "written" : "would_write";
|
|
9081
|
+
return {
|
|
9082
|
+
field: input.field,
|
|
9083
|
+
key: input.key,
|
|
9084
|
+
path: input.path,
|
|
9085
|
+
previous_path: previous,
|
|
9086
|
+
status
|
|
9087
|
+
};
|
|
9088
|
+
}
|
|
9089
|
+
function upsertMachineMetadata(manifest, machineId, metadata) {
|
|
9090
|
+
return {
|
|
9091
|
+
...manifest,
|
|
9092
|
+
machines: manifest.machines.map((machine) => machine.id === machineId ? { ...machine, metadata } : machine)
|
|
9093
|
+
};
|
|
9094
|
+
}
|
|
9095
|
+
function repairWorkspaceManifestMappings(options) {
|
|
9096
|
+
const projectId = options.projectId;
|
|
9097
|
+
const repoName = options.repoName ?? projectId;
|
|
9098
|
+
const openFilesRepoName = options.openFilesRepoName ?? "open-files";
|
|
9099
|
+
const apply = options.apply === true;
|
|
9100
|
+
const resolution = resolveMachineWorkspace({
|
|
9101
|
+
machineId: options.machineId,
|
|
9102
|
+
projectId,
|
|
9103
|
+
repoName,
|
|
9104
|
+
openFilesRepoName,
|
|
9105
|
+
projectRoot: options.projectRoot,
|
|
9106
|
+
openFilesRoot: options.openFilesRoot,
|
|
9107
|
+
workspaceRoot: options.workspaceRoot,
|
|
9108
|
+
includeTailscale: options.includeTailscale,
|
|
9109
|
+
now: options.now
|
|
9110
|
+
});
|
|
9111
|
+
const warnings = [...resolution.warnings];
|
|
9112
|
+
const manifest = readManifest();
|
|
9113
|
+
const manifestMachineId = resolution.machine_id ?? options.machineId;
|
|
9114
|
+
const machine = manifest.machines.find((entry) => entry.id === manifestMachineId) ?? null;
|
|
9115
|
+
const trusted = resolution.machine.trust_status === "trusted" || options.allowUntrusted === true;
|
|
9116
|
+
if (!machine) {
|
|
9117
|
+
warnings.push(`manifest_machine_missing:${manifestMachineId}`);
|
|
9118
|
+
return {
|
|
9119
|
+
ok: false,
|
|
9120
|
+
applied: false,
|
|
9121
|
+
manifest_path: getManifestPath(),
|
|
9122
|
+
machine_id: resolution.machine_id,
|
|
9123
|
+
project_id: projectId,
|
|
9124
|
+
repo_name: repoName,
|
|
9125
|
+
open_files_repo_name: openFilesRepoName,
|
|
9126
|
+
trusted,
|
|
9127
|
+
resolution,
|
|
9128
|
+
patches: [],
|
|
9129
|
+
warnings
|
|
9130
|
+
};
|
|
9131
|
+
}
|
|
9132
|
+
const metadata = cloneMetadata(machine.metadata);
|
|
9133
|
+
const patches = [
|
|
9134
|
+
buildPatch({
|
|
9135
|
+
metadata,
|
|
9136
|
+
field: "workspace_paths",
|
|
9137
|
+
key: projectId,
|
|
9138
|
+
path: options.projectRoot ?? resolution.paths.project_root.path,
|
|
9139
|
+
apply
|
|
9140
|
+
}),
|
|
9141
|
+
buildPatch({
|
|
9142
|
+
metadata,
|
|
9143
|
+
field: "open_files_roots",
|
|
9144
|
+
key: projectId,
|
|
9145
|
+
path: options.openFilesRoot ?? resolution.paths.open_files_root.path,
|
|
9146
|
+
apply
|
|
9147
|
+
})
|
|
9148
|
+
];
|
|
9149
|
+
const hasUnresolved = patches.some((patch) => patch.status === "unresolved");
|
|
9150
|
+
const hasWrites = patches.some((patch) => patch.status === "would_write" || patch.status === "written");
|
|
9151
|
+
if (apply && hasWrites && !trusted) {
|
|
9152
|
+
warnings.push(`manifest_repair_requires_trusted_machine:${manifestMachineId}`);
|
|
9153
|
+
return {
|
|
9154
|
+
ok: false,
|
|
9155
|
+
applied: false,
|
|
9156
|
+
manifest_path: getManifestPath(),
|
|
9157
|
+
machine_id: manifestMachineId,
|
|
9158
|
+
project_id: projectId,
|
|
9159
|
+
repo_name: repoName,
|
|
9160
|
+
open_files_repo_name: openFilesRepoName,
|
|
9161
|
+
trusted,
|
|
9162
|
+
resolution,
|
|
9163
|
+
patches: patches.map((patch) => patch.status === "written" ? { ...patch, status: "would_write" } : patch),
|
|
9164
|
+
warnings
|
|
9165
|
+
};
|
|
9166
|
+
}
|
|
9167
|
+
let applied = false;
|
|
9168
|
+
if (apply && !hasUnresolved && hasWrites) {
|
|
9169
|
+
for (const patch of patches) {
|
|
9170
|
+
if (patch.path && patch.status === "written")
|
|
9171
|
+
writeMappedPath(metadata, patch.field, patch.key, patch.path);
|
|
9172
|
+
}
|
|
9173
|
+
writeManifest(upsertMachineMetadata(manifest, manifestMachineId, metadata));
|
|
9174
|
+
applied = true;
|
|
9175
|
+
}
|
|
9176
|
+
return {
|
|
9177
|
+
ok: resolution.ok && !hasUnresolved && (!apply || applied || !hasWrites),
|
|
9178
|
+
applied,
|
|
9179
|
+
manifest_path: getManifestPath(),
|
|
9180
|
+
machine_id: manifestMachineId,
|
|
9181
|
+
project_id: projectId,
|
|
9182
|
+
repo_name: repoName,
|
|
9183
|
+
open_files_repo_name: openFilesRepoName,
|
|
9184
|
+
trusted,
|
|
9185
|
+
resolution,
|
|
9186
|
+
patches,
|
|
9187
|
+
warnings
|
|
9188
|
+
};
|
|
9189
|
+
}
|
|
9190
|
+
|
|
9037
9191
|
// src/compatibility.ts
|
|
9038
9192
|
init_db();
|
|
9039
9193
|
var DEFAULT_COMMANDS = [
|
|
@@ -9266,12 +9420,7 @@ function checkMachineCompatibility(options = {}) {
|
|
|
9266
9420
|
name: MACHINES_PACKAGE_NAME,
|
|
9267
9421
|
version: getPackageVersion()
|
|
9268
9422
|
},
|
|
9269
|
-
capabilities:
|
|
9270
|
-
topology: true,
|
|
9271
|
-
compatibility: true,
|
|
9272
|
-
route_resolution: true,
|
|
9273
|
-
cli_json_fallback: true
|
|
9274
|
-
},
|
|
9423
|
+
capabilities: getMachinesConsumerCapabilities(),
|
|
9275
9424
|
ok: summary.fail === 0,
|
|
9276
9425
|
machine_id: machineId,
|
|
9277
9426
|
source: checks[0]?.source ?? "local",
|
|
@@ -10785,6 +10934,25 @@ function renderWorkspaceResolution(result) {
|
|
|
10785
10934
|
["warnings", result.warnings.join(", ") || "none"]
|
|
10786
10935
|
]);
|
|
10787
10936
|
}
|
|
10937
|
+
function renderWorkspaceRepairResult(result) {
|
|
10938
|
+
const patchLines = result.patches.map((patch) => {
|
|
10939
|
+
const path = patch.path ?? "unresolved";
|
|
10940
|
+
const previous = patch.previous_path ? ` previous=${patch.previous_path}` : "";
|
|
10941
|
+
return `${patch.field}.${patch.key}: ${patch.status} ${path}${previous}`;
|
|
10942
|
+
});
|
|
10943
|
+
return [
|
|
10944
|
+
renderKeyValueTable([
|
|
10945
|
+
["machine", result.machine_id ?? "unresolved"],
|
|
10946
|
+
["project", result.project_id],
|
|
10947
|
+
["trusted", String(result.trusted)],
|
|
10948
|
+
["applied", String(result.applied)],
|
|
10949
|
+
["manifest", result.manifest_path],
|
|
10950
|
+
["warnings", result.warnings.join(", ") || "none"]
|
|
10951
|
+
]),
|
|
10952
|
+
renderList("patches", patchLines)
|
|
10953
|
+
].join(`
|
|
10954
|
+
`);
|
|
10955
|
+
}
|
|
10788
10956
|
function renderFleetStatus(status) {
|
|
10789
10957
|
return [
|
|
10790
10958
|
renderKeyValueTable([
|
|
@@ -10952,6 +11120,23 @@ workspaceCommand.command("resolve").description("Resolve repo and open-files roo
|
|
|
10952
11120
|
if (!result.ok && !options.json)
|
|
10953
11121
|
process.exitCode = 1;
|
|
10954
11122
|
});
|
|
11123
|
+
workspaceCommand.command("repair").description("Preview or write explicit manifest path mappings for inferred workspace roots").requiredOption("--machine <id>", "Machine identifier").requiredOption("--project <id>", "Canonical project id").option("--repo <name>", "Repository name; defaults to project id").option("--open-files-repo <name>", "Open-files repository name", "open-files").option("--workspace-root <path>", "Override the machine workspace root for resolution").option("--project-root <path>", "Explicit project root to write").option("--open-files-root <path>", "Explicit open-files root to write").option("--apply", "Write the mappings into the manifest", false).option("--allow-untrusted", "Allow writing mappings for machines not marked trusted", false).option("--no-tailscale", "Skip tailscale status probing").option("-j, --json", "Print JSON output", false).action((options) => {
|
|
11124
|
+
const result = repairWorkspaceManifestMappings({
|
|
11125
|
+
machineId: options.machine,
|
|
11126
|
+
projectId: options.project,
|
|
11127
|
+
repoName: options.repo,
|
|
11128
|
+
openFilesRepoName: options.openFilesRepo,
|
|
11129
|
+
workspaceRoot: options.workspaceRoot,
|
|
11130
|
+
projectRoot: options.projectRoot,
|
|
11131
|
+
openFilesRoot: options.openFilesRoot,
|
|
11132
|
+
apply: options.apply,
|
|
11133
|
+
allowUntrusted: options.allowUntrusted,
|
|
11134
|
+
includeTailscale: options.tailscale !== false
|
|
11135
|
+
});
|
|
11136
|
+
printJsonOrText(result, renderWorkspaceRepairResult(result), options.json);
|
|
11137
|
+
if (!result.ok && !options.json)
|
|
11138
|
+
process.exitCode = 1;
|
|
11139
|
+
});
|
|
10955
11140
|
program2.command("diff").description("Show manifest differences between two machines").requiredOption("--left <id>", "Left machine identifier").option("--right <id>", "Right machine identifier (defaults to current machine)").option("-j, --json", "Print JSON output", false).action((options) => {
|
|
10956
11141
|
const result = diffMachines(options.left, options.right);
|
|
10957
11142
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type MachineWorkspaceResolution } from "../topology.js";
|
|
2
|
+
export interface WorkspaceManifestRepairOptions {
|
|
3
|
+
machineId: string;
|
|
4
|
+
projectId: string;
|
|
5
|
+
repoName?: string;
|
|
6
|
+
openFilesRepoName?: string;
|
|
7
|
+
projectRoot?: string;
|
|
8
|
+
openFilesRoot?: string;
|
|
9
|
+
workspaceRoot?: string;
|
|
10
|
+
includeTailscale?: boolean;
|
|
11
|
+
apply?: boolean;
|
|
12
|
+
allowUntrusted?: boolean;
|
|
13
|
+
now?: Date;
|
|
14
|
+
}
|
|
15
|
+
export type WorkspaceManifestRepairStatus = "unchanged" | "would_write" | "written" | "unresolved";
|
|
16
|
+
export interface WorkspaceManifestRepairPatch {
|
|
17
|
+
field: "workspace_paths" | "open_files_roots";
|
|
18
|
+
key: string;
|
|
19
|
+
path: string | null;
|
|
20
|
+
previous_path: string | null;
|
|
21
|
+
status: WorkspaceManifestRepairStatus;
|
|
22
|
+
}
|
|
23
|
+
export interface WorkspaceManifestRepairResult {
|
|
24
|
+
ok: boolean;
|
|
25
|
+
applied: boolean;
|
|
26
|
+
manifest_path: string;
|
|
27
|
+
machine_id: string | null;
|
|
28
|
+
project_id: string;
|
|
29
|
+
repo_name: string;
|
|
30
|
+
open_files_repo_name: string;
|
|
31
|
+
trusted: boolean;
|
|
32
|
+
resolution: MachineWorkspaceResolution;
|
|
33
|
+
patches: WorkspaceManifestRepairPatch[];
|
|
34
|
+
warnings: string[];
|
|
35
|
+
}
|
|
36
|
+
export declare function repairWorkspaceManifestMappings(options: WorkspaceManifestRepairOptions): WorkspaceManifestRepairResult;
|
|
37
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/commands/workspace.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAG1F,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ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,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,MAAM,WAAW,0BAA0B;IACzC,cAAc,EAAE,OAAO,kCAAkC,CAAC;IAC1D,OAAO,EAAE,uBAAuB,CAAC;IACjC,YAAY,EAAE,4BAA4B,CAAC;IAC3C,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,MAAM,MAAM,0BAA0B,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,oBAAoB,CAAC;AAEtG,MAAM,WAAW,2BAA2B;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACtC,QAAQ,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACtC,UAAU,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC1C,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAiQD,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,2BAAgC,GAAG,0BAA0B,CAgC/G"}
|
package/dist/consumer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { MACHINES_CONSUMER_CONTRACT_VERSION, MACHINES_PACKAGE_NAME, discoverMachineTopology, getLocalMachineTopology, resolveMachineRoute, resolveMachineWorkspace, } from "./topology.js";
|
|
2
|
-
export type { MachineRouteConfidence, MachineRouteHint, MachineRouteKind, MachineRouteOptions, MachineRouteResolution, MachineTopology, MachineTopologyEntry, MachineTopologyOptions, MachineWorkspaceAuthStatus, MachineWorkspaceOptions, MachineWorkspacePath, MachineWorkspacePathSource, MachineWorkspaceProject, MachineWorkspaceResolution, MachineWorkspaceTrustStatus, MachinesConsumerCapabilities, MachinesContractPackage, TopologyCommandResult, TopologyCommandRunner, } from "./topology.js";
|
|
1
|
+
export { MACHINES_CONSUMER_CAPABILITIES, MACHINES_CONSUMER_CONTRACT, MACHINES_CONSUMER_ENTRYPOINT, MACHINES_CONSUMER_CONTRACT_VERSION, MACHINES_PACKAGE_NAME, discoverMachineTopology, getMachinesConsumerCapabilities, getLocalMachineTopology, resolveMachineRoute, resolveMachineWorkspace, } from "./topology.js";
|
|
2
|
+
export type { MachineRouteConfidence, MachineRouteHint, MachineRouteKind, MachineRouteOptions, MachineRouteResolution, MachineTopology, MachineTopologyEntry, MachineTopologyOptions, MachineWorkspaceAuthStatus, MachineWorkspaceOptions, MachineWorkspacePath, MachineWorkspacePathSource, MachineWorkspaceProject, MachineWorkspaceResolution, MachineWorkspaceTrustStatus, MachinesConsumerContract, MachinesConsumerEnvelope, MachinesConsumerCapabilities, MachinesContractPackage, TopologyCommandResult, TopologyCommandRunner, } from "./topology.js";
|
|
3
3
|
export { checkMachineCompatibility, } from "./compatibility.js";
|
|
4
4
|
export type { CompatibilityCheck, CompatibilityCommandRunner, CompatibilityCommandSpec, CompatibilityPackageSpec, CompatibilitySource, CompatibilityStatus, CompatibilityWorkspaceSpec, MachineCompatibilityOptions, MachineCompatibilityReport, } from "./compatibility.js";
|
|
5
5
|
export { resolveMachineCommand, runMachineCommand, } from "./remote.js";
|
package/dist/consumer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumer.d.ts","sourceRoot":"","sources":["../src/consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,GAClB,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"consumer.d.ts","sourceRoot":"","sources":["../src/consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,kCAAkC,EAClC,qBAAqB,EACrB,uBAAuB,EACvB,+BAA+B,EAC/B,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,GAClB,MAAM,cAAc,CAAC"}
|
package/dist/consumer.js
CHANGED
|
@@ -4311,6 +4311,40 @@ function getPackageVersion() {
|
|
|
4311
4311
|
// src/topology.ts
|
|
4312
4312
|
var MACHINES_CONSUMER_CONTRACT_VERSION = 1;
|
|
4313
4313
|
var MACHINES_PACKAGE_NAME = "@hasna/machines";
|
|
4314
|
+
var MACHINES_CONSUMER_ENTRYPOINT = "@hasna/machines/consumer";
|
|
4315
|
+
var MACHINES_CONSUMER_CAPABILITIES = {
|
|
4316
|
+
topology: true,
|
|
4317
|
+
compatibility: true,
|
|
4318
|
+
route_resolution: true,
|
|
4319
|
+
cli_json_fallback: true,
|
|
4320
|
+
workspace_path_mapping: true
|
|
4321
|
+
};
|
|
4322
|
+
var MACHINES_CONSUMER_CONTRACT = {
|
|
4323
|
+
schema_version: MACHINES_CONSUMER_CONTRACT_VERSION,
|
|
4324
|
+
package_name: MACHINES_PACKAGE_NAME,
|
|
4325
|
+
entrypoint: MACHINES_CONSUMER_ENTRYPOINT,
|
|
4326
|
+
capabilities: MACHINES_CONSUMER_CAPABILITIES,
|
|
4327
|
+
envelopes: ["topology", "route", "workspace", "compatibility"],
|
|
4328
|
+
stable_exports: [
|
|
4329
|
+
"MACHINES_CONSUMER_CONTRACT",
|
|
4330
|
+
"MACHINES_CONSUMER_CONTRACT_VERSION",
|
|
4331
|
+
"MACHINES_CONSUMER_CAPABILITIES",
|
|
4332
|
+
"MACHINES_PACKAGE_NAME",
|
|
4333
|
+
"discoverMachineTopology",
|
|
4334
|
+
"getLocalMachineTopology",
|
|
4335
|
+
"resolveMachineRoute",
|
|
4336
|
+
"resolveMachineWorkspace",
|
|
4337
|
+
"checkMachineCompatibility",
|
|
4338
|
+
"resolveMachineCommand",
|
|
4339
|
+
"runMachineCommand",
|
|
4340
|
+
"buildSshCommand",
|
|
4341
|
+
"resolveSshTarget",
|
|
4342
|
+
"getPackageVersion"
|
|
4343
|
+
]
|
|
4344
|
+
};
|
|
4345
|
+
function getMachinesConsumerCapabilities() {
|
|
4346
|
+
return { ...MACHINES_CONSUMER_CAPABILITIES };
|
|
4347
|
+
}
|
|
4314
4348
|
function normalizePlatform2(value = platform2()) {
|
|
4315
4349
|
const normalized = value.toLowerCase();
|
|
4316
4350
|
if (normalized === "darwin" || normalized === "macos")
|
|
@@ -4511,13 +4545,7 @@ function discoverMachineTopology(options = {}) {
|
|
|
4511
4545
|
name: MACHINES_PACKAGE_NAME,
|
|
4512
4546
|
version: getPackageVersion()
|
|
4513
4547
|
},
|
|
4514
|
-
capabilities:
|
|
4515
|
-
topology: true,
|
|
4516
|
-
compatibility: true,
|
|
4517
|
-
route_resolution: true,
|
|
4518
|
-
cli_json_fallback: true,
|
|
4519
|
-
workspace_path_mapping: true
|
|
4520
|
-
},
|
|
4548
|
+
capabilities: getMachinesConsumerCapabilities(),
|
|
4521
4549
|
generated_at: now.toISOString(),
|
|
4522
4550
|
local_machine_id: localMachineId,
|
|
4523
4551
|
local_hostname: hostname3(),
|
|
@@ -5168,12 +5196,7 @@ function checkMachineCompatibility(options = {}) {
|
|
|
5168
5196
|
name: MACHINES_PACKAGE_NAME,
|
|
5169
5197
|
version: getPackageVersion()
|
|
5170
5198
|
},
|
|
5171
|
-
capabilities:
|
|
5172
|
-
topology: true,
|
|
5173
|
-
compatibility: true,
|
|
5174
|
-
route_resolution: true,
|
|
5175
|
-
cli_json_fallback: true
|
|
5176
|
-
},
|
|
5199
|
+
capabilities: getMachinesConsumerCapabilities(),
|
|
5177
5200
|
ok: summary.fail === 0,
|
|
5178
5201
|
machine_id: machineId,
|
|
5179
5202
|
source: checks[0]?.source ?? "local",
|
|
@@ -5189,10 +5212,14 @@ export {
|
|
|
5189
5212
|
resolveMachineRoute,
|
|
5190
5213
|
resolveMachineCommand,
|
|
5191
5214
|
getPackageVersion,
|
|
5215
|
+
getMachinesConsumerCapabilities,
|
|
5192
5216
|
getLocalMachineTopology,
|
|
5193
5217
|
discoverMachineTopology,
|
|
5194
5218
|
checkMachineCompatibility,
|
|
5195
5219
|
buildSshCommand,
|
|
5196
5220
|
MACHINES_PACKAGE_NAME,
|
|
5197
|
-
|
|
5221
|
+
MACHINES_CONSUMER_ENTRYPOINT,
|
|
5222
|
+
MACHINES_CONSUMER_CONTRACT_VERSION,
|
|
5223
|
+
MACHINES_CONSUMER_CONTRACT,
|
|
5224
|
+
MACHINES_CONSUMER_CAPABILITIES
|
|
5198
5225
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from "./commands/setup.js";
|
|
|
23
23
|
export * from "./commands/ssh.js";
|
|
24
24
|
export * from "./commands/sync.js";
|
|
25
25
|
export * from "./commands/status.js";
|
|
26
|
+
export * from "./commands/workspace.js";
|
|
26
27
|
export * from "./mcp/server.js";
|
|
27
28
|
export { MACHINES_STORAGE_ENV, MACHINES_STORAGE_FALLBACK_ENV, MACHINES_STORAGE_MODE_ENV, MACHINES_STORAGE_MODE_FALLBACK_ENV, MACHINES_STORAGE_TABLES, STORAGE_DATABASE_ENV, STORAGE_MODE_ENV, STORAGE_TABLES, getStorageDatabaseEnv, getStorageDatabaseEnvName, getStorageDatabaseUrl, getStorageMode, getStoragePg, getStorageStatus, getSyncMetaAll, parseStorageTables, resolveTables, runStorageMigrations, storagePull, storagePush, storageSync, } from "./storage.js";
|
|
28
29
|
export type { StorageEnv, StorageMode, StorageStatus, SyncMeta, SyncResult as StorageSyncResult } from "./storage.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,yBAAyB,EACzB,kCAAkC,EAClC,uBAAuB,EACvB,oBAAoB,EACpB,gB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,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtH,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11111,6 +11111,40 @@ function getPackageVersion() {
|
|
|
11111
11111
|
// src/topology.ts
|
|
11112
11112
|
var MACHINES_CONSUMER_CONTRACT_VERSION = 1;
|
|
11113
11113
|
var MACHINES_PACKAGE_NAME = "@hasna/machines";
|
|
11114
|
+
var MACHINES_CONSUMER_ENTRYPOINT = "@hasna/machines/consumer";
|
|
11115
|
+
var MACHINES_CONSUMER_CAPABILITIES = {
|
|
11116
|
+
topology: true,
|
|
11117
|
+
compatibility: true,
|
|
11118
|
+
route_resolution: true,
|
|
11119
|
+
cli_json_fallback: true,
|
|
11120
|
+
workspace_path_mapping: true
|
|
11121
|
+
};
|
|
11122
|
+
var MACHINES_CONSUMER_CONTRACT = {
|
|
11123
|
+
schema_version: MACHINES_CONSUMER_CONTRACT_VERSION,
|
|
11124
|
+
package_name: MACHINES_PACKAGE_NAME,
|
|
11125
|
+
entrypoint: MACHINES_CONSUMER_ENTRYPOINT,
|
|
11126
|
+
capabilities: MACHINES_CONSUMER_CAPABILITIES,
|
|
11127
|
+
envelopes: ["topology", "route", "workspace", "compatibility"],
|
|
11128
|
+
stable_exports: [
|
|
11129
|
+
"MACHINES_CONSUMER_CONTRACT",
|
|
11130
|
+
"MACHINES_CONSUMER_CONTRACT_VERSION",
|
|
11131
|
+
"MACHINES_CONSUMER_CAPABILITIES",
|
|
11132
|
+
"MACHINES_PACKAGE_NAME",
|
|
11133
|
+
"discoverMachineTopology",
|
|
11134
|
+
"getLocalMachineTopology",
|
|
11135
|
+
"resolveMachineRoute",
|
|
11136
|
+
"resolveMachineWorkspace",
|
|
11137
|
+
"checkMachineCompatibility",
|
|
11138
|
+
"resolveMachineCommand",
|
|
11139
|
+
"runMachineCommand",
|
|
11140
|
+
"buildSshCommand",
|
|
11141
|
+
"resolveSshTarget",
|
|
11142
|
+
"getPackageVersion"
|
|
11143
|
+
]
|
|
11144
|
+
};
|
|
11145
|
+
function getMachinesConsumerCapabilities() {
|
|
11146
|
+
return { ...MACHINES_CONSUMER_CAPABILITIES };
|
|
11147
|
+
}
|
|
11114
11148
|
function normalizePlatform2(value = platform2()) {
|
|
11115
11149
|
const normalized = value.toLowerCase();
|
|
11116
11150
|
if (normalized === "darwin" || normalized === "macos")
|
|
@@ -11311,13 +11345,7 @@ function discoverMachineTopology(options = {}) {
|
|
|
11311
11345
|
name: MACHINES_PACKAGE_NAME,
|
|
11312
11346
|
version: getPackageVersion()
|
|
11313
11347
|
},
|
|
11314
|
-
capabilities:
|
|
11315
|
-
topology: true,
|
|
11316
|
-
compatibility: true,
|
|
11317
|
-
route_resolution: true,
|
|
11318
|
-
cli_json_fallback: true,
|
|
11319
|
-
workspace_path_mapping: true
|
|
11320
|
-
},
|
|
11348
|
+
capabilities: getMachinesConsumerCapabilities(),
|
|
11321
11349
|
generated_at: now.toISOString(),
|
|
11322
11350
|
local_machine_id: localMachineId,
|
|
11323
11351
|
local_hostname: hostname3(),
|
|
@@ -11968,12 +11996,7 @@ function checkMachineCompatibility(options = {}) {
|
|
|
11968
11996
|
name: MACHINES_PACKAGE_NAME,
|
|
11969
11997
|
version: getPackageVersion()
|
|
11970
11998
|
},
|
|
11971
|
-
capabilities:
|
|
11972
|
-
topology: true,
|
|
11973
|
-
compatibility: true,
|
|
11974
|
-
route_resolution: true,
|
|
11975
|
-
cli_json_fallback: true
|
|
11976
|
-
},
|
|
11999
|
+
capabilities: getMachinesConsumerCapabilities(),
|
|
11977
12000
|
ok: summary.fail === 0,
|
|
11978
12001
|
machine_id: machineId,
|
|
11979
12002
|
source: checks[0]?.source ?? "local",
|
|
@@ -13545,6 +13568,154 @@ function runSync(machineId, options = {}) {
|
|
|
13545
13568
|
recordSyncRun(plan.machineId, "completed", summary);
|
|
13546
13569
|
return summary;
|
|
13547
13570
|
}
|
|
13571
|
+
// src/commands/workspace.ts
|
|
13572
|
+
function isRecord2(value) {
|
|
13573
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
13574
|
+
}
|
|
13575
|
+
function cloneMetadata(metadata) {
|
|
13576
|
+
return isRecord2(metadata) ? { ...metadata } : {};
|
|
13577
|
+
}
|
|
13578
|
+
function mappedPath(metadata, field, key) {
|
|
13579
|
+
const container = metadata[field];
|
|
13580
|
+
if (!isRecord2(container))
|
|
13581
|
+
return null;
|
|
13582
|
+
const value = container[key];
|
|
13583
|
+
if (typeof value === "string" && value.trim())
|
|
13584
|
+
return value.trim();
|
|
13585
|
+
if (isRecord2(value)) {
|
|
13586
|
+
const nested = value["path"] ?? value["root"] ?? value["workspacePath"] ?? value["workspace_path"];
|
|
13587
|
+
if (typeof nested === "string" && nested.trim())
|
|
13588
|
+
return nested.trim();
|
|
13589
|
+
}
|
|
13590
|
+
return null;
|
|
13591
|
+
}
|
|
13592
|
+
function writeMappedPath(metadata, field, key, path) {
|
|
13593
|
+
const existing = metadata[field];
|
|
13594
|
+
const container = isRecord2(existing) ? { ...existing } : {};
|
|
13595
|
+
container[key] = path;
|
|
13596
|
+
metadata[field] = container;
|
|
13597
|
+
}
|
|
13598
|
+
function buildPatch(input) {
|
|
13599
|
+
const previous = mappedPath(input.metadata, input.field, input.key);
|
|
13600
|
+
if (!input.path) {
|
|
13601
|
+
return {
|
|
13602
|
+
field: input.field,
|
|
13603
|
+
key: input.key,
|
|
13604
|
+
path: null,
|
|
13605
|
+
previous_path: previous,
|
|
13606
|
+
status: "unresolved"
|
|
13607
|
+
};
|
|
13608
|
+
}
|
|
13609
|
+
const status = previous === input.path ? "unchanged" : input.apply ? "written" : "would_write";
|
|
13610
|
+
return {
|
|
13611
|
+
field: input.field,
|
|
13612
|
+
key: input.key,
|
|
13613
|
+
path: input.path,
|
|
13614
|
+
previous_path: previous,
|
|
13615
|
+
status
|
|
13616
|
+
};
|
|
13617
|
+
}
|
|
13618
|
+
function upsertMachineMetadata(manifest, machineId, metadata) {
|
|
13619
|
+
return {
|
|
13620
|
+
...manifest,
|
|
13621
|
+
machines: manifest.machines.map((machine) => machine.id === machineId ? { ...machine, metadata } : machine)
|
|
13622
|
+
};
|
|
13623
|
+
}
|
|
13624
|
+
function repairWorkspaceManifestMappings(options) {
|
|
13625
|
+
const projectId = options.projectId;
|
|
13626
|
+
const repoName = options.repoName ?? projectId;
|
|
13627
|
+
const openFilesRepoName = options.openFilesRepoName ?? "open-files";
|
|
13628
|
+
const apply = options.apply === true;
|
|
13629
|
+
const resolution = resolveMachineWorkspace({
|
|
13630
|
+
machineId: options.machineId,
|
|
13631
|
+
projectId,
|
|
13632
|
+
repoName,
|
|
13633
|
+
openFilesRepoName,
|
|
13634
|
+
projectRoot: options.projectRoot,
|
|
13635
|
+
openFilesRoot: options.openFilesRoot,
|
|
13636
|
+
workspaceRoot: options.workspaceRoot,
|
|
13637
|
+
includeTailscale: options.includeTailscale,
|
|
13638
|
+
now: options.now
|
|
13639
|
+
});
|
|
13640
|
+
const warnings = [...resolution.warnings];
|
|
13641
|
+
const manifest = readManifest();
|
|
13642
|
+
const manifestMachineId = resolution.machine_id ?? options.machineId;
|
|
13643
|
+
const machine = manifest.machines.find((entry) => entry.id === manifestMachineId) ?? null;
|
|
13644
|
+
const trusted = resolution.machine.trust_status === "trusted" || options.allowUntrusted === true;
|
|
13645
|
+
if (!machine) {
|
|
13646
|
+
warnings.push(`manifest_machine_missing:${manifestMachineId}`);
|
|
13647
|
+
return {
|
|
13648
|
+
ok: false,
|
|
13649
|
+
applied: false,
|
|
13650
|
+
manifest_path: getManifestPath(),
|
|
13651
|
+
machine_id: resolution.machine_id,
|
|
13652
|
+
project_id: projectId,
|
|
13653
|
+
repo_name: repoName,
|
|
13654
|
+
open_files_repo_name: openFilesRepoName,
|
|
13655
|
+
trusted,
|
|
13656
|
+
resolution,
|
|
13657
|
+
patches: [],
|
|
13658
|
+
warnings
|
|
13659
|
+
};
|
|
13660
|
+
}
|
|
13661
|
+
const metadata = cloneMetadata(machine.metadata);
|
|
13662
|
+
const patches = [
|
|
13663
|
+
buildPatch({
|
|
13664
|
+
metadata,
|
|
13665
|
+
field: "workspace_paths",
|
|
13666
|
+
key: projectId,
|
|
13667
|
+
path: options.projectRoot ?? resolution.paths.project_root.path,
|
|
13668
|
+
apply
|
|
13669
|
+
}),
|
|
13670
|
+
buildPatch({
|
|
13671
|
+
metadata,
|
|
13672
|
+
field: "open_files_roots",
|
|
13673
|
+
key: projectId,
|
|
13674
|
+
path: options.openFilesRoot ?? resolution.paths.open_files_root.path,
|
|
13675
|
+
apply
|
|
13676
|
+
})
|
|
13677
|
+
];
|
|
13678
|
+
const hasUnresolved = patches.some((patch) => patch.status === "unresolved");
|
|
13679
|
+
const hasWrites = patches.some((patch) => patch.status === "would_write" || patch.status === "written");
|
|
13680
|
+
if (apply && hasWrites && !trusted) {
|
|
13681
|
+
warnings.push(`manifest_repair_requires_trusted_machine:${manifestMachineId}`);
|
|
13682
|
+
return {
|
|
13683
|
+
ok: false,
|
|
13684
|
+
applied: false,
|
|
13685
|
+
manifest_path: getManifestPath(),
|
|
13686
|
+
machine_id: manifestMachineId,
|
|
13687
|
+
project_id: projectId,
|
|
13688
|
+
repo_name: repoName,
|
|
13689
|
+
open_files_repo_name: openFilesRepoName,
|
|
13690
|
+
trusted,
|
|
13691
|
+
resolution,
|
|
13692
|
+
patches: patches.map((patch) => patch.status === "written" ? { ...patch, status: "would_write" } : patch),
|
|
13693
|
+
warnings
|
|
13694
|
+
};
|
|
13695
|
+
}
|
|
13696
|
+
let applied = false;
|
|
13697
|
+
if (apply && !hasUnresolved && hasWrites) {
|
|
13698
|
+
for (const patch of patches) {
|
|
13699
|
+
if (patch.path && patch.status === "written")
|
|
13700
|
+
writeMappedPath(metadata, patch.field, patch.key, patch.path);
|
|
13701
|
+
}
|
|
13702
|
+
writeManifest(upsertMachineMetadata(manifest, manifestMachineId, metadata));
|
|
13703
|
+
applied = true;
|
|
13704
|
+
}
|
|
13705
|
+
return {
|
|
13706
|
+
ok: resolution.ok && !hasUnresolved && (!apply || applied || !hasWrites),
|
|
13707
|
+
applied,
|
|
13708
|
+
manifest_path: getManifestPath(),
|
|
13709
|
+
machine_id: manifestMachineId,
|
|
13710
|
+
project_id: projectId,
|
|
13711
|
+
repo_name: repoName,
|
|
13712
|
+
open_files_repo_name: openFilesRepoName,
|
|
13713
|
+
trusted,
|
|
13714
|
+
resolution,
|
|
13715
|
+
patches,
|
|
13716
|
+
warnings
|
|
13717
|
+
};
|
|
13718
|
+
}
|
|
13548
13719
|
// node_modules/zod/v4/core/core.js
|
|
13549
13720
|
var NEVER2 = Object.freeze({
|
|
13550
13721
|
status: "aborted"
|
|
@@ -22702,6 +22873,7 @@ export {
|
|
|
22702
22873
|
resolveMachineWorkspace,
|
|
22703
22874
|
resolveMachineRoute,
|
|
22704
22875
|
resolveBackupTarget,
|
|
22876
|
+
repairWorkspaceManifestMappings,
|
|
22705
22877
|
renderDomainMapping,
|
|
22706
22878
|
renderDashboardHtml,
|
|
22707
22879
|
removeNotificationChannel,
|
|
@@ -22738,6 +22910,7 @@ export {
|
|
|
22738
22910
|
getNotificationsPath,
|
|
22739
22911
|
getManifestPath,
|
|
22740
22912
|
getManifestMachine,
|
|
22913
|
+
getMachinesConsumerCapabilities,
|
|
22741
22914
|
getLocalMachineTopology,
|
|
22742
22915
|
getLocalMachineId,
|
|
22743
22916
|
getDefaultNotificationConfig,
|
|
@@ -22786,7 +22959,10 @@ export {
|
|
|
22786
22959
|
MACHINES_STORAGE_FALLBACK_ENV,
|
|
22787
22960
|
MACHINES_STORAGE_ENV,
|
|
22788
22961
|
MACHINES_PACKAGE_NAME,
|
|
22962
|
+
MACHINES_CONSUMER_ENTRYPOINT,
|
|
22789
22963
|
MACHINES_CONSUMER_CONTRACT_VERSION,
|
|
22964
|
+
MACHINES_CONSUMER_CONTRACT,
|
|
22965
|
+
MACHINES_CONSUMER_CAPABILITIES,
|
|
22790
22966
|
MACHINES_BACKUP_PREFIX_FALLBACK_ENV,
|
|
22791
22967
|
MACHINES_BACKUP_PREFIX_ENV,
|
|
22792
22968
|
MACHINES_BACKUP_BUCKET_FALLBACK_ENV,
|
package/dist/mcp/index.js
CHANGED
|
@@ -4370,6 +4370,16 @@ import { arch as arch2, hostname as hostname3, platform as platform2, userInfo a
|
|
|
4370
4370
|
import { spawnSync } from "child_process";
|
|
4371
4371
|
var MACHINES_CONSUMER_CONTRACT_VERSION = 1;
|
|
4372
4372
|
var MACHINES_PACKAGE_NAME = "@hasna/machines";
|
|
4373
|
+
var MACHINES_CONSUMER_CAPABILITIES = {
|
|
4374
|
+
topology: true,
|
|
4375
|
+
compatibility: true,
|
|
4376
|
+
route_resolution: true,
|
|
4377
|
+
cli_json_fallback: true,
|
|
4378
|
+
workspace_path_mapping: true
|
|
4379
|
+
};
|
|
4380
|
+
function getMachinesConsumerCapabilities() {
|
|
4381
|
+
return { ...MACHINES_CONSUMER_CAPABILITIES };
|
|
4382
|
+
}
|
|
4373
4383
|
function normalizePlatform2(value = platform2()) {
|
|
4374
4384
|
const normalized = value.toLowerCase();
|
|
4375
4385
|
if (normalized === "darwin" || normalized === "macos")
|
|
@@ -4570,13 +4580,7 @@ function discoverMachineTopology(options = {}) {
|
|
|
4570
4580
|
name: MACHINES_PACKAGE_NAME,
|
|
4571
4581
|
version: getPackageVersion()
|
|
4572
4582
|
},
|
|
4573
|
-
capabilities:
|
|
4574
|
-
topology: true,
|
|
4575
|
-
compatibility: true,
|
|
4576
|
-
route_resolution: true,
|
|
4577
|
-
cli_json_fallback: true,
|
|
4578
|
-
workspace_path_mapping: true
|
|
4579
|
-
},
|
|
4583
|
+
capabilities: getMachinesConsumerCapabilities(),
|
|
4580
4584
|
generated_at: now.toISOString(),
|
|
4581
4585
|
local_machine_id: localMachineId,
|
|
4582
4586
|
local_hostname: hostname3(),
|
|
@@ -6582,12 +6586,7 @@ function checkMachineCompatibility(options = {}) {
|
|
|
6582
6586
|
name: MACHINES_PACKAGE_NAME,
|
|
6583
6587
|
version: getPackageVersion()
|
|
6584
6588
|
},
|
|
6585
|
-
capabilities:
|
|
6586
|
-
topology: true,
|
|
6587
|
-
compatibility: true,
|
|
6588
|
-
route_resolution: true,
|
|
6589
|
-
cli_json_fallback: true
|
|
6590
|
-
},
|
|
6589
|
+
capabilities: getMachinesConsumerCapabilities(),
|
|
6591
6590
|
ok: summary.fail === 0,
|
|
6592
6591
|
machine_id: machineId,
|
|
6593
6592
|
source: checks[0]?.source ?? "local",
|
package/dist/topology.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MachinePlatform } from "./types.js";
|
|
2
2
|
export declare const MACHINES_CONSUMER_CONTRACT_VERSION = 1;
|
|
3
3
|
export declare const MACHINES_PACKAGE_NAME = "@hasna/machines";
|
|
4
|
+
export declare const MACHINES_CONSUMER_ENTRYPOINT = "@hasna/machines/consumer";
|
|
4
5
|
export interface TopologyCommandResult {
|
|
5
6
|
stdout: string;
|
|
6
7
|
stderr: string;
|
|
@@ -54,6 +55,18 @@ export interface MachinesConsumerCapabilities {
|
|
|
54
55
|
cli_json_fallback: true;
|
|
55
56
|
workspace_path_mapping?: true;
|
|
56
57
|
}
|
|
58
|
+
export type MachinesConsumerEnvelope = "topology" | "route" | "workspace" | "compatibility";
|
|
59
|
+
export interface MachinesConsumerContract {
|
|
60
|
+
schema_version: typeof MACHINES_CONSUMER_CONTRACT_VERSION;
|
|
61
|
+
package_name: typeof MACHINES_PACKAGE_NAME;
|
|
62
|
+
entrypoint: typeof MACHINES_CONSUMER_ENTRYPOINT;
|
|
63
|
+
capabilities: MachinesConsumerCapabilities;
|
|
64
|
+
envelopes: MachinesConsumerEnvelope[];
|
|
65
|
+
stable_exports: string[];
|
|
66
|
+
}
|
|
67
|
+
export declare const MACHINES_CONSUMER_CAPABILITIES: MachinesConsumerCapabilities;
|
|
68
|
+
export declare const MACHINES_CONSUMER_CONTRACT: MachinesConsumerContract;
|
|
69
|
+
export declare function getMachinesConsumerCapabilities(): MachinesConsumerCapabilities;
|
|
57
70
|
export interface MachineTopology {
|
|
58
71
|
schema_version: typeof MACHINES_CONSUMER_CONTRACT_VERSION;
|
|
59
72
|
package: MachinesContractPackage;
|
package/dist/topology.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../src/topology.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAmB,eAAe,EAAE,MAAM,YAAY,CAAC;AAGnE,eAAO,MAAM,kCAAkC,IAAI,CAAC;AACpD,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../src/topology.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAmB,eAAe,EAAE,MAAM,YAAY,CAAC;AAGnE,eAAO,MAAM,kCAAkC,IAAI,CAAC;AACpD,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AACvD,eAAO,MAAM,4BAA4B,6BAA6B,CAAC;AAEvE,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,qBAAqB,CAAC;AAE/E,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,GAAG,CAAC,EAAE,IAAI,C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