@hasna/machines 0.0.23 → 0.0.25
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 +49 -5
- package/dist/agent/index.js +1 -1
- package/dist/cli/index.js +272 -41
- package/dist/commands/apps.d.ts.map +1 -1
- package/dist/commands/manifest.d.ts.map +1 -1
- package/dist/commands/screen.d.ts +35 -0
- package/dist/commands/screen.d.ts.map +1 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/consumer-schema.d.ts +21 -0
- package/dist/consumer-schema.d.ts.map +1 -0
- package/dist/consumer.d.ts +4 -2
- package/dist/consumer.d.ts.map +1 -1
- package/dist/consumer.js +499 -13
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +339 -31
- package/dist/manifests.d.ts.map +1 -1
- package/dist/mcp/index.js +146 -37
- package/dist/topology.d.ts +117 -1
- package/dist/topology.d.ts.map +1 -1
- package/package.json +2 -1
- package/schemas/machines-consumer.schema.json +47 -0
- package/scripts/consumer-conformance.mjs +27 -2
package/dist/mcp/index.js
CHANGED
|
@@ -4017,7 +4017,7 @@ var coerce = {
|
|
|
4017
4017
|
};
|
|
4018
4018
|
var NEVER = INVALID;
|
|
4019
4019
|
// src/commands/backup.ts
|
|
4020
|
-
import { homedir } from "os";
|
|
4020
|
+
import { homedir, hostname } from "os";
|
|
4021
4021
|
import { join as join2 } from "path";
|
|
4022
4022
|
var MACHINES_BACKUP_BUCKET_ENV = "HASNA_MACHINES_S3_BUCKET";
|
|
4023
4023
|
var MACHINES_BACKUP_BUCKET_FALLBACK_ENV = "MACHINES_S3_BUCKET";
|
|
@@ -4087,7 +4087,7 @@ function buildBackupPlan(bucket, prefix) {
|
|
|
4087
4087
|
{
|
|
4088
4088
|
id: "backup-upload",
|
|
4089
4089
|
title: "Upload archive to S3",
|
|
4090
|
-
command: `aws s3 cp ${quote(archivePath)} s3://${target.bucket}/${target.prefix}/$(
|
|
4090
|
+
command: `aws s3 cp ${quote(archivePath)} ${quote(`s3://${target.bucket}/${target.prefix}/${hostname()}-backup.tgz`)}`,
|
|
4091
4091
|
manager: "custom"
|
|
4092
4092
|
}
|
|
4093
4093
|
];
|
|
@@ -4127,7 +4127,7 @@ function runBackup(bucket, prefix, options = {}) {
|
|
|
4127
4127
|
|
|
4128
4128
|
// src/manifests.ts
|
|
4129
4129
|
import { existsSync as existsSync3, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
4130
|
-
import { arch, homedir as homedir2, hostname, platform, userInfo } from "os";
|
|
4130
|
+
import { arch, homedir as homedir2, hostname as hostname2, platform, userInfo } from "os";
|
|
4131
4131
|
import { dirname as dirname3 } from "path";
|
|
4132
4132
|
|
|
4133
4133
|
// src/paths.ts
|
|
@@ -4235,6 +4235,7 @@ function writeManifest(manifest, path = getManifestPath()) {
|
|
|
4235
4235
|
generatedAt: new Date().toISOString(),
|
|
4236
4236
|
machines: normalizeMachines(manifest.machines)
|
|
4237
4237
|
};
|
|
4238
|
+
fleetSchema.parse(payload);
|
|
4238
4239
|
writeFileSync(path, `${JSON.stringify(payload, null, 2)}
|
|
4239
4240
|
`, "utf8");
|
|
4240
4241
|
return path;
|
|
@@ -4243,12 +4244,12 @@ function getManifestMachine(machineId, path = getManifestPath()) {
|
|
|
4243
4244
|
return readManifest(path).machines.find((machine) => machine.id === machineId) || null;
|
|
4244
4245
|
}
|
|
4245
4246
|
function detectCurrentMachineManifest() {
|
|
4246
|
-
const machineId = process.env["HASNA_MACHINES_MACHINE_ID"] ||
|
|
4247
|
+
const machineId = process.env["HASNA_MACHINES_MACHINE_ID"] || hostname2();
|
|
4247
4248
|
const user = userInfo().username;
|
|
4248
4249
|
const bunDir = dirname3(process.execPath);
|
|
4249
4250
|
return {
|
|
4250
4251
|
id: machineId,
|
|
4251
|
-
hostname:
|
|
4252
|
+
hostname: hostname2(),
|
|
4252
4253
|
sshAddress: `${user}@${machineId}`,
|
|
4253
4254
|
tailscaleName: machineId,
|
|
4254
4255
|
platform: normalizePlatform(),
|
|
@@ -4263,11 +4264,11 @@ function detectCurrentMachineManifest() {
|
|
|
4263
4264
|
|
|
4264
4265
|
// src/remote.ts
|
|
4265
4266
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
4266
|
-
import { hostname as
|
|
4267
|
+
import { hostname as hostname5 } from "os";
|
|
4267
4268
|
|
|
4268
4269
|
// src/db.ts
|
|
4269
4270
|
import { Database } from "bun:sqlite";
|
|
4270
|
-
import { hostname as
|
|
4271
|
+
import { hostname as hostname3 } from "os";
|
|
4271
4272
|
class SqliteAdapter {
|
|
4272
4273
|
raw;
|
|
4273
4274
|
constructor(path) {
|
|
@@ -4332,7 +4333,7 @@ function getDb(path = getDbPath()) {
|
|
|
4332
4333
|
return getAdapter(path).raw;
|
|
4333
4334
|
}
|
|
4334
4335
|
function getLocalMachineId() {
|
|
4335
|
-
return process.env["HASNA_MACHINES_MACHINE_ID"] ||
|
|
4336
|
+
return process.env["HASNA_MACHINES_MACHINE_ID"] || hostname3();
|
|
4336
4337
|
}
|
|
4337
4338
|
function listHeartbeats(machineId) {
|
|
4338
4339
|
const db = getDb();
|
|
@@ -4366,17 +4367,22 @@ function recordSyncRun(machineId, status, actions) {
|
|
|
4366
4367
|
|
|
4367
4368
|
// src/topology.ts
|
|
4368
4369
|
import { existsSync as existsSync4 } from "fs";
|
|
4369
|
-
import { arch as arch2, hostname as
|
|
4370
|
+
import { arch as arch2, hostname as hostname4, platform as platform2, userInfo as userInfo2 } from "os";
|
|
4370
4371
|
import { spawnSync } from "child_process";
|
|
4371
4372
|
var MACHINES_CONSUMER_CONTRACT_VERSION = 1;
|
|
4372
4373
|
var MACHINES_PACKAGE_NAME = "@hasna/machines";
|
|
4374
|
+
var DEFAULT_MACHINE_RESOLVER_TTL_MS = 24 * 60 * 60 * 1000;
|
|
4373
4375
|
var MACHINES_CONSUMER_CAPABILITIES = {
|
|
4374
4376
|
topology: true,
|
|
4375
4377
|
compatibility: true,
|
|
4376
4378
|
route_resolution: true,
|
|
4377
4379
|
cli_json_fallback: true,
|
|
4378
4380
|
workspace_path_mapping: true,
|
|
4379
|
-
workspace_diagnostics: true
|
|
4381
|
+
workspace_diagnostics: true,
|
|
4382
|
+
schema_artifacts: true,
|
|
4383
|
+
cacheability_metadata: true,
|
|
4384
|
+
resolver_snapshots: true,
|
|
4385
|
+
field_capability_descriptors: true
|
|
4380
4386
|
};
|
|
4381
4387
|
function getMachinesConsumerCapabilities() {
|
|
4382
4388
|
return { ...MACHINES_CONSUMER_CAPABILITIES };
|
|
@@ -4584,7 +4590,7 @@ function discoverMachineTopology(options = {}) {
|
|
|
4584
4590
|
capabilities: getMachinesConsumerCapabilities(),
|
|
4585
4591
|
generated_at: now.toISOString(),
|
|
4586
4592
|
local_machine_id: localMachineId,
|
|
4587
|
-
local_hostname:
|
|
4593
|
+
local_hostname: hostname4(),
|
|
4588
4594
|
current_platform: normalizePlatform2(),
|
|
4589
4595
|
manifest_path_known: existsSync4(getManifestPath()),
|
|
4590
4596
|
machines,
|
|
@@ -4609,7 +4615,7 @@ function routeTargetMatches(machine, requested) {
|
|
|
4609
4615
|
}
|
|
4610
4616
|
function findRouteMachine(topology, requestedMachineId) {
|
|
4611
4617
|
const requested = normalizeMachineAlias(requestedMachineId);
|
|
4612
|
-
if (requested === "local" || requested === "localhost" || requested === normalizeMachineAlias(
|
|
4618
|
+
if (requested === "local" || requested === "localhost" || requested === normalizeMachineAlias(hostname4()) || requested === normalizeMachineAlias(topology.local_machine_id)) {
|
|
4613
4619
|
return {
|
|
4614
4620
|
machine: topology.machines.find((machine) => machine.machine_id === topology.local_machine_id) ?? null,
|
|
4615
4621
|
matchedBy: "local_alias"
|
|
@@ -4647,11 +4653,69 @@ function routeConfidence(input) {
|
|
|
4647
4653
|
return "low";
|
|
4648
4654
|
return "none";
|
|
4649
4655
|
}
|
|
4656
|
+
function addMilliseconds(date, milliseconds) {
|
|
4657
|
+
return new Date(date.getTime() + milliseconds).toISOString();
|
|
4658
|
+
}
|
|
4659
|
+
function routeAuthority(input) {
|
|
4660
|
+
if (!input.machine)
|
|
4661
|
+
return "unresolved";
|
|
4662
|
+
if (input.matchedBy === "fallback")
|
|
4663
|
+
return "fallback";
|
|
4664
|
+
if (input.selectedHint?.kind === "local")
|
|
4665
|
+
return "live_topology";
|
|
4666
|
+
if (input.selectedHint?.kind === "tailscale" || input.machine.tailscale.online !== null)
|
|
4667
|
+
return "live_topology";
|
|
4668
|
+
if (input.machine.manifest_declared)
|
|
4669
|
+
return "manifest";
|
|
4670
|
+
return "open-machines";
|
|
4671
|
+
}
|
|
4672
|
+
function workspaceAuthority(paths) {
|
|
4673
|
+
const sources = [paths.workspace_root.source, paths.project_root.source, paths.open_files_root.source];
|
|
4674
|
+
if (sources.some((source) => source === "argument"))
|
|
4675
|
+
return "argument";
|
|
4676
|
+
if (sources.some((source) => source === "manifest_metadata"))
|
|
4677
|
+
return "manifest_metadata";
|
|
4678
|
+
if (sources.some((source) => source === "manifest"))
|
|
4679
|
+
return "manifest";
|
|
4680
|
+
if (sources.some((source) => source === "inferred"))
|
|
4681
|
+
return "inferred";
|
|
4682
|
+
if (sources.every((source) => source === "unresolved"))
|
|
4683
|
+
return "unresolved";
|
|
4684
|
+
return "open-machines";
|
|
4685
|
+
}
|
|
4686
|
+
function cacheability(input) {
|
|
4687
|
+
const ttlMs = input.ttlMs === undefined ? DEFAULT_MACHINE_RESOLVER_TTL_MS : input.ttlMs;
|
|
4688
|
+
const expiresAt = typeof ttlMs === "number" && ttlMs > 0 ? addMilliseconds(input.observedAt, ttlMs) : null;
|
|
4689
|
+
const stale = expiresAt ? input.now.getTime() > new Date(expiresAt).getTime() : false;
|
|
4690
|
+
const confidenceCacheable = input.confidence !== "none" && input.confidence !== "low";
|
|
4691
|
+
const cacheable = input.ok && confidenceCacheable && !stale && input.authority !== "unresolved";
|
|
4692
|
+
const reasons = [...input.reasons];
|
|
4693
|
+
if (!input.ok)
|
|
4694
|
+
reasons.push("resolver_not_ok");
|
|
4695
|
+
if (!confidenceCacheable)
|
|
4696
|
+
reasons.push(`low_confidence:${input.confidence}`);
|
|
4697
|
+
if (stale)
|
|
4698
|
+
reasons.push("stale");
|
|
4699
|
+
if (input.authority === "unresolved")
|
|
4700
|
+
reasons.push("unresolved_authority");
|
|
4701
|
+
return {
|
|
4702
|
+
observed_at: input.observedAt.toISOString(),
|
|
4703
|
+
verified_at: input.ok ? input.now.toISOString() : null,
|
|
4704
|
+
expires_at: expiresAt,
|
|
4705
|
+
ttl_ms: typeof ttlMs === "number" && ttlMs > 0 ? ttlMs : null,
|
|
4706
|
+
source_authority: input.authority,
|
|
4707
|
+
confidence: input.confidence,
|
|
4708
|
+
cacheable,
|
|
4709
|
+
stale,
|
|
4710
|
+
reasons: [...new Set(reasons)].sort()
|
|
4711
|
+
};
|
|
4712
|
+
}
|
|
4650
4713
|
function resolveMachineRoute(machineId, options = {}) {
|
|
4714
|
+
const now = options.now ?? new Date;
|
|
4651
4715
|
const topology = options.topology ?? discoverMachineTopology(options);
|
|
4652
4716
|
const warnings = [...topology.warnings];
|
|
4653
4717
|
const { machine, matchedBy } = findRouteMachine(topology, machineId);
|
|
4654
|
-
const generatedAt =
|
|
4718
|
+
const generatedAt = now.toISOString();
|
|
4655
4719
|
if (!machine) {
|
|
4656
4720
|
warnings.push(`machine_not_found:${machineId}`);
|
|
4657
4721
|
return {
|
|
@@ -4675,16 +4739,27 @@ function resolveMachineRoute(machineId, options = {}) {
|
|
|
4675
4739
|
tailscale_online: null,
|
|
4676
4740
|
selected_hint: null
|
|
4677
4741
|
},
|
|
4742
|
+
cacheability: cacheability({
|
|
4743
|
+
ok: false,
|
|
4744
|
+
observedAt: now,
|
|
4745
|
+
now,
|
|
4746
|
+
ttlMs: options.resolverTtlMs,
|
|
4747
|
+
authority: "unresolved",
|
|
4748
|
+
confidence: "none",
|
|
4749
|
+
reasons: [`machine_not_found:${machineId}`]
|
|
4750
|
+
}),
|
|
4678
4751
|
warnings
|
|
4679
4752
|
};
|
|
4680
4753
|
}
|
|
4681
4754
|
const selectedHint = selectRouteHint(machine.route_hints);
|
|
4682
4755
|
const route = selectedHint?.kind ?? machine.ssh.route ?? "unknown";
|
|
4683
4756
|
const local = route === "local" || machine.machine_id === topology.local_machine_id;
|
|
4757
|
+
const confidence = routeConfidence({ machine, hint: selectedHint, matchedBy });
|
|
4758
|
+
const ok = Boolean(selectedHint?.target);
|
|
4684
4759
|
return {
|
|
4685
4760
|
schema_version: MACHINES_CONSUMER_CONTRACT_VERSION,
|
|
4686
4761
|
package: topology.package,
|
|
4687
|
-
ok
|
|
4762
|
+
ok,
|
|
4688
4763
|
machine_id: machine.machine_id,
|
|
4689
4764
|
requested_machine_id: machineId,
|
|
4690
4765
|
generated_at: generatedAt,
|
|
@@ -4692,7 +4767,7 @@ function resolveMachineRoute(machineId, options = {}) {
|
|
|
4692
4767
|
source: route,
|
|
4693
4768
|
target: selectedHint?.target ?? null,
|
|
4694
4769
|
command_target: selectedHint?.target ?? null,
|
|
4695
|
-
confidence
|
|
4770
|
+
confidence,
|
|
4696
4771
|
local,
|
|
4697
4772
|
evidence: {
|
|
4698
4773
|
topology: true,
|
|
@@ -4702,6 +4777,15 @@ function resolveMachineRoute(machineId, options = {}) {
|
|
|
4702
4777
|
tailscale_online: machine.tailscale.online,
|
|
4703
4778
|
selected_hint: selectedHint
|
|
4704
4779
|
},
|
|
4780
|
+
cacheability: cacheability({
|
|
4781
|
+
ok,
|
|
4782
|
+
observedAt: now,
|
|
4783
|
+
now,
|
|
4784
|
+
ttlMs: options.resolverTtlMs,
|
|
4785
|
+
authority: routeAuthority({ machine, selectedHint, matchedBy }),
|
|
4786
|
+
confidence,
|
|
4787
|
+
reasons: selectedHint ? [] : ["route_target_unresolved"]
|
|
4788
|
+
}),
|
|
4705
4789
|
warnings
|
|
4706
4790
|
};
|
|
4707
4791
|
}
|
|
@@ -4998,10 +5082,11 @@ function metadataKeysForDiagnostics(metadata) {
|
|
|
4998
5082
|
return Object.keys(metadata).filter((key) => !/(secret|token|key|password|credential)/i.test(key)).sort();
|
|
4999
5083
|
}
|
|
5000
5084
|
function resolveMachineWorkspace(options) {
|
|
5085
|
+
const now = options.now ?? new Date;
|
|
5001
5086
|
const topology = options.topology ?? discoverMachineTopology(options);
|
|
5002
5087
|
const warnings = [...topology.warnings];
|
|
5003
5088
|
const { machine, matchedBy } = findRouteMachine(topology, options.machineId);
|
|
5004
|
-
const generatedAt =
|
|
5089
|
+
const generatedAt = now.toISOString();
|
|
5005
5090
|
const repoName = options.repoName ?? options.projectId;
|
|
5006
5091
|
const openFilesRepoName = options.openFilesRepoName ?? "open-files";
|
|
5007
5092
|
if (!machine) {
|
|
@@ -5028,6 +5113,15 @@ function resolveMachineWorkspace(options) {
|
|
|
5028
5113
|
manifest_declared: null,
|
|
5029
5114
|
metadata_keys: []
|
|
5030
5115
|
},
|
|
5116
|
+
cacheability: cacheability({
|
|
5117
|
+
ok: false,
|
|
5118
|
+
observedAt: now,
|
|
5119
|
+
now,
|
|
5120
|
+
ttlMs: options.resolverTtlMs,
|
|
5121
|
+
authority: "unresolved",
|
|
5122
|
+
confidence: "none",
|
|
5123
|
+
reasons: [`machine_not_found:${options.machineId}`]
|
|
5124
|
+
}),
|
|
5031
5125
|
warnings
|
|
5032
5126
|
};
|
|
5033
5127
|
const diagnostics2 = workspaceDiagnostics({
|
|
@@ -5059,10 +5153,16 @@ function resolveMachineWorkspace(options) {
|
|
|
5059
5153
|
warnings.push(`open_files_root_inferred:${options.projectId}`);
|
|
5060
5154
|
if (!projectRootPath)
|
|
5061
5155
|
warnings.push(`project_root_unresolved:${options.projectId}`);
|
|
5156
|
+
const workspacePaths = {
|
|
5157
|
+
workspace_root: { path: workspaceRootPath, source: workspaceRootSource },
|
|
5158
|
+
project_root: { path: projectRootPath, source: projectRootSource },
|
|
5159
|
+
open_files_root: { path: openFilesRootPath, source: openFilesRootSource }
|
|
5160
|
+
};
|
|
5161
|
+
const workspaceOk = Boolean(projectRootPath);
|
|
5062
5162
|
const resolution = {
|
|
5063
5163
|
schema_version: MACHINES_CONSUMER_CONTRACT_VERSION,
|
|
5064
5164
|
package: topology.package,
|
|
5065
|
-
ok:
|
|
5165
|
+
ok: workspaceOk,
|
|
5066
5166
|
requested_machine_id: options.machineId,
|
|
5067
5167
|
machine_id: machine.machine_id,
|
|
5068
5168
|
generated_at: generatedAt,
|
|
@@ -5077,11 +5177,7 @@ function resolveMachineWorkspace(options) {
|
|
|
5077
5177
|
trust_status: trustStatus(machine),
|
|
5078
5178
|
auth_status: authStatus(machine)
|
|
5079
5179
|
},
|
|
5080
|
-
paths:
|
|
5081
|
-
workspace_root: { path: workspaceRootPath, source: workspaceRootSource },
|
|
5082
|
-
project_root: { path: projectRootPath, source: projectRootSource },
|
|
5083
|
-
open_files_root: { path: openFilesRootPath, source: openFilesRootSource }
|
|
5084
|
-
},
|
|
5180
|
+
paths: workspacePaths,
|
|
5085
5181
|
diagnostics: [],
|
|
5086
5182
|
repair_hints: [],
|
|
5087
5183
|
evidence: {
|
|
@@ -5090,6 +5186,15 @@ function resolveMachineWorkspace(options) {
|
|
|
5090
5186
|
manifest_declared: machine.manifest_declared,
|
|
5091
5187
|
metadata_keys: metadataKeysForDiagnostics(metadata)
|
|
5092
5188
|
},
|
|
5189
|
+
cacheability: cacheability({
|
|
5190
|
+
ok: workspaceOk,
|
|
5191
|
+
observedAt: now,
|
|
5192
|
+
now,
|
|
5193
|
+
ttlMs: options.resolverTtlMs,
|
|
5194
|
+
authority: workspaceAuthority(workspacePaths),
|
|
5195
|
+
confidence: workspaceOk ? "medium" : "none",
|
|
5196
|
+
reasons: projectRootPath ? [] : [`project_root_unresolved:${options.projectId}`]
|
|
5197
|
+
}),
|
|
5093
5198
|
warnings
|
|
5094
5199
|
};
|
|
5095
5200
|
const diagnostics = workspaceDiagnostics({
|
|
@@ -5135,7 +5240,7 @@ function shellQuote3(value) {
|
|
|
5135
5240
|
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
5136
5241
|
}
|
|
5137
5242
|
function machineIsLocal(machineId, localMachineId) {
|
|
5138
|
-
return machineId === "local" || machineId === "localhost" || machineId === localMachineId || machineId ===
|
|
5243
|
+
return machineId === "local" || machineId === "localhost" || machineId === localMachineId || machineId === hostname5();
|
|
5139
5244
|
}
|
|
5140
5245
|
function resolveMachineCommand(machineId, command, localMachineId = getLocalMachineId()) {
|
|
5141
5246
|
if (machineIsLocal(machineId, localMachineId)) {
|
|
@@ -5187,20 +5292,21 @@ function shellQuote4(value) {
|
|
|
5187
5292
|
}
|
|
5188
5293
|
function buildAppCommand(machine, app) {
|
|
5189
5294
|
const packageName = getPackageName(app);
|
|
5295
|
+
const quotedPackageName = shellQuote4(packageName);
|
|
5190
5296
|
const manager = getAppManager(machine, app);
|
|
5191
5297
|
if (manager === "custom") {
|
|
5192
5298
|
return packageName;
|
|
5193
5299
|
}
|
|
5194
5300
|
if (machine.platform === "macos") {
|
|
5195
5301
|
if (manager === "cask") {
|
|
5196
|
-
return `brew install --cask ${
|
|
5302
|
+
return `brew install --cask ${quotedPackageName}`;
|
|
5197
5303
|
}
|
|
5198
|
-
return `brew install ${
|
|
5304
|
+
return `brew install ${quotedPackageName}`;
|
|
5199
5305
|
}
|
|
5200
5306
|
if (machine.platform === "windows") {
|
|
5201
|
-
return `winget install ${
|
|
5307
|
+
return `winget install ${quotedPackageName}`;
|
|
5202
5308
|
}
|
|
5203
|
-
return `sudo apt-get install -y ${
|
|
5309
|
+
return `sudo apt-get install -y ${quotedPackageName}`;
|
|
5204
5310
|
}
|
|
5205
5311
|
function buildAppProbeCommand(machine, app) {
|
|
5206
5312
|
const packageName = shellQuote4(getPackageName(app));
|
|
@@ -6002,9 +6108,10 @@ function manifestList() {
|
|
|
6002
6108
|
return readManifest();
|
|
6003
6109
|
}
|
|
6004
6110
|
function manifestAdd(machine) {
|
|
6111
|
+
const validatedMachine = machineSchema.parse(machine);
|
|
6005
6112
|
const manifest = readManifest();
|
|
6006
|
-
const nextMachines = manifest.machines.filter((entry) => entry.id !==
|
|
6007
|
-
nextMachines.push(
|
|
6113
|
+
const nextMachines = manifest.machines.filter((entry) => entry.id !== validatedMachine.id);
|
|
6114
|
+
nextMachines.push(validatedMachine);
|
|
6008
6115
|
const nextManifest = { ...manifest, machines: nextMachines };
|
|
6009
6116
|
writeManifest(nextManifest);
|
|
6010
6117
|
return nextManifest;
|
|
@@ -6270,6 +6377,7 @@ function renderDashboardHtml() {
|
|
|
6270
6377
|
}
|
|
6271
6378
|
|
|
6272
6379
|
// src/commands/setup.ts
|
|
6380
|
+
import { homedir as homedir4 } from "os";
|
|
6273
6381
|
function quote3(value) {
|
|
6274
6382
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
6275
6383
|
}
|
|
@@ -6317,11 +6425,11 @@ function buildPackageSteps(machine) {
|
|
|
6317
6425
|
const manager = pkg.manager || (machine.platform === "macos" ? "brew" : "apt");
|
|
6318
6426
|
let command = pkg.name;
|
|
6319
6427
|
if (manager === "bun") {
|
|
6320
|
-
command = `bun install -g ${pkg.name}`;
|
|
6428
|
+
command = `bun install -g ${quote3(pkg.name)}`;
|
|
6321
6429
|
} else if (manager === "brew") {
|
|
6322
|
-
command = `brew install ${pkg.name}`;
|
|
6430
|
+
command = `brew install ${quote3(pkg.name)}`;
|
|
6323
6431
|
} else if (manager === "apt") {
|
|
6324
|
-
command = `sudo apt-get install -y ${pkg.name}`;
|
|
6432
|
+
command = `sudo apt-get install -y ${quote3(pkg.name)}`;
|
|
6325
6433
|
}
|
|
6326
6434
|
return {
|
|
6327
6435
|
id: `package-${index + 1}`,
|
|
@@ -6339,7 +6447,7 @@ function buildSetupPlan(machineId) {
|
|
|
6339
6447
|
const target = selected || {
|
|
6340
6448
|
id: currentMachineId,
|
|
6341
6449
|
platform: "linux",
|
|
6342
|
-
workspacePath:
|
|
6450
|
+
workspacePath: `${homedir4()}/workspace`
|
|
6343
6451
|
};
|
|
6344
6452
|
const steps = [...buildBaseSteps(target), ...buildPackageSteps(target)];
|
|
6345
6453
|
return {
|
|
@@ -6386,6 +6494,7 @@ function runSetup(machineId, options = {}) {
|
|
|
6386
6494
|
|
|
6387
6495
|
// src/commands/sync.ts
|
|
6388
6496
|
import { existsSync as existsSync7, lstatSync, readFileSync as readFileSync5, symlinkSync, copyFileSync } from "fs";
|
|
6497
|
+
import { homedir as homedir5 } from "os";
|
|
6389
6498
|
function quote4(value) {
|
|
6390
6499
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
6391
6500
|
}
|
|
@@ -6403,13 +6512,13 @@ function packageCheckCommand(machine, packageName, manager = machine.platform ==
|
|
|
6403
6512
|
}
|
|
6404
6513
|
function packageInstallCommand(machine, packageName, manager = machine.platform === "macos" ? "brew" : "apt") {
|
|
6405
6514
|
if (manager === "bun") {
|
|
6406
|
-
return `bun install -g ${packageName}`;
|
|
6515
|
+
return `bun install -g ${quote4(packageName)}`;
|
|
6407
6516
|
}
|
|
6408
6517
|
if (manager === "brew") {
|
|
6409
|
-
return `brew install ${packageName}`;
|
|
6518
|
+
return `brew install ${quote4(packageName)}`;
|
|
6410
6519
|
}
|
|
6411
6520
|
if (manager === "apt") {
|
|
6412
|
-
return `sudo apt-get install -y ${packageName}`;
|
|
6521
|
+
return `sudo apt-get install -y ${quote4(packageName)}`;
|
|
6413
6522
|
}
|
|
6414
6523
|
return packageName;
|
|
6415
6524
|
}
|
|
@@ -6462,7 +6571,7 @@ function buildSyncPlan(machineId) {
|
|
|
6462
6571
|
const target = selected || {
|
|
6463
6572
|
id: currentMachineId,
|
|
6464
6573
|
platform: "linux",
|
|
6465
|
-
workspacePath:
|
|
6574
|
+
workspacePath: `${homedir5()}/workspace`
|
|
6466
6575
|
};
|
|
6467
6576
|
const actions = [
|
|
6468
6577
|
...detectPackageActions(target),
|
package/dist/topology.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ 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
4
|
export declare const MACHINES_CONSUMER_ENTRYPOINT = "@hasna/machines/consumer";
|
|
5
|
+
export declare const MACHINES_CONSUMER_SCHEMA_URI = "https://schemas.hasna.xyz/machines/consumer/v1/machines-consumer.schema.json";
|
|
6
|
+
export declare const MACHINES_CONSUMER_SCHEMA_ARTIFACT = "schemas/machines-consumer.schema.json";
|
|
7
|
+
export declare const DEFAULT_MACHINE_RESOLVER_TTL_MS: number;
|
|
5
8
|
export interface TopologyCommandResult {
|
|
6
9
|
stdout: string;
|
|
7
10
|
stderr: string;
|
|
@@ -12,6 +15,7 @@ export interface MachineTopologyOptions {
|
|
|
12
15
|
includeTailscale?: boolean;
|
|
13
16
|
runner?: TopologyCommandRunner;
|
|
14
17
|
now?: Date;
|
|
18
|
+
resolverTtlMs?: number | null;
|
|
15
19
|
}
|
|
16
20
|
export interface MachineRouteHint {
|
|
17
21
|
kind: "local" | "lan" | "tailscale" | "ssh";
|
|
@@ -55,17 +59,58 @@ export interface MachinesConsumerCapabilities {
|
|
|
55
59
|
cli_json_fallback: true;
|
|
56
60
|
workspace_path_mapping?: true;
|
|
57
61
|
workspace_diagnostics?: true;
|
|
62
|
+
schema_artifacts?: true;
|
|
63
|
+
cacheability_metadata?: true;
|
|
64
|
+
resolver_snapshots?: true;
|
|
65
|
+
field_capability_descriptors?: true;
|
|
66
|
+
}
|
|
67
|
+
export type MachinesConsumerEnvelope = "topology" | "route" | "workspace" | "compatibility" | "resolver_snapshot";
|
|
68
|
+
export interface MachinesConsumerFieldCapabilities {
|
|
69
|
+
topology: {
|
|
70
|
+
machine_identity: true;
|
|
71
|
+
route_hints: true;
|
|
72
|
+
tailscale_status: true;
|
|
73
|
+
manifest_metadata: true;
|
|
74
|
+
};
|
|
75
|
+
route: {
|
|
76
|
+
cacheability: true;
|
|
77
|
+
confidence: true;
|
|
78
|
+
resolver_evidence: true;
|
|
79
|
+
};
|
|
80
|
+
workspace: {
|
|
81
|
+
cacheability: true;
|
|
82
|
+
path_mapping: true;
|
|
83
|
+
diagnostics: true;
|
|
84
|
+
repair_hints: true;
|
|
85
|
+
trust_auth: true;
|
|
86
|
+
};
|
|
87
|
+
compatibility: {
|
|
88
|
+
commands: true;
|
|
89
|
+
packages: true;
|
|
90
|
+
workspaces: true;
|
|
91
|
+
};
|
|
92
|
+
resolver_snapshot: {
|
|
93
|
+
cacheability: true;
|
|
94
|
+
redacted_provenance: true;
|
|
95
|
+
};
|
|
58
96
|
}
|
|
59
|
-
export type MachinesConsumerEnvelope = "topology" | "route" | "workspace" | "compatibility";
|
|
60
97
|
export interface MachinesConsumerContract {
|
|
61
98
|
schema_version: typeof MACHINES_CONSUMER_CONTRACT_VERSION;
|
|
62
99
|
package_name: typeof MACHINES_PACKAGE_NAME;
|
|
63
100
|
entrypoint: typeof MACHINES_CONSUMER_ENTRYPOINT;
|
|
101
|
+
schema_uri: typeof MACHINES_CONSUMER_SCHEMA_URI;
|
|
102
|
+
schema_artifact: typeof MACHINES_CONSUMER_SCHEMA_ARTIFACT;
|
|
64
103
|
capabilities: MachinesConsumerCapabilities;
|
|
104
|
+
field_capabilities: MachinesConsumerFieldCapabilities;
|
|
105
|
+
cacheability: {
|
|
106
|
+
default_ttl_ms: typeof DEFAULT_MACHINE_RESOLVER_TTL_MS;
|
|
107
|
+
stale_requires_refresh: true;
|
|
108
|
+
};
|
|
65
109
|
envelopes: MachinesConsumerEnvelope[];
|
|
66
110
|
stable_exports: string[];
|
|
67
111
|
}
|
|
68
112
|
export declare const MACHINES_CONSUMER_CAPABILITIES: MachinesConsumerCapabilities;
|
|
113
|
+
export declare const MACHINES_CONSUMER_FIELD_CAPABILITIES: MachinesConsumerFieldCapabilities;
|
|
69
114
|
export declare const MACHINES_CONSUMER_CONTRACT: MachinesConsumerContract;
|
|
70
115
|
export declare function getMachinesConsumerCapabilities(): MachinesConsumerCapabilities;
|
|
71
116
|
export interface MachineTopology {
|
|
@@ -82,6 +127,18 @@ export interface MachineTopology {
|
|
|
82
127
|
}
|
|
83
128
|
export type MachineRouteKind = "local" | "lan" | "tailscale" | "ssh" | "unknown";
|
|
84
129
|
export type MachineRouteConfidence = "exact" | "high" | "medium" | "low" | "none";
|
|
130
|
+
export type MachineResolverAuthority = "open-machines" | "manifest" | "manifest_metadata" | "live_topology" | "argument" | "inferred" | "fallback" | "unresolved" | "mixed" | "unknown";
|
|
131
|
+
export interface MachineResolverCacheability {
|
|
132
|
+
observed_at: string;
|
|
133
|
+
verified_at: string | null;
|
|
134
|
+
expires_at: string | null;
|
|
135
|
+
ttl_ms: number | null;
|
|
136
|
+
source_authority: MachineResolverAuthority;
|
|
137
|
+
confidence: MachineRouteConfidence;
|
|
138
|
+
cacheable: boolean;
|
|
139
|
+
stale: boolean;
|
|
140
|
+
reasons: string[];
|
|
141
|
+
}
|
|
85
142
|
export interface MachineRouteResolution {
|
|
86
143
|
schema_version: typeof MACHINES_CONSUMER_CONTRACT_VERSION;
|
|
87
144
|
package: MachinesContractPackage;
|
|
@@ -103,6 +160,7 @@ export interface MachineRouteResolution {
|
|
|
103
160
|
tailscale_online: boolean | null;
|
|
104
161
|
selected_hint: MachineRouteHint | null;
|
|
105
162
|
};
|
|
163
|
+
cacheability: MachineResolverCacheability;
|
|
106
164
|
warnings: string[];
|
|
107
165
|
}
|
|
108
166
|
export interface MachineRouteOptions extends MachineTopologyOptions {
|
|
@@ -165,6 +223,7 @@ export interface MachineWorkspaceResolution {
|
|
|
165
223
|
manifest_declared: boolean | null;
|
|
166
224
|
metadata_keys: string[];
|
|
167
225
|
};
|
|
226
|
+
cacheability: MachineResolverCacheability;
|
|
168
227
|
warnings: string[];
|
|
169
228
|
}
|
|
170
229
|
export interface MachineWorkspaceOptions extends MachineTopologyOptions {
|
|
@@ -181,5 +240,62 @@ export interface MachineWorkspaceOptions extends MachineTopologyOptions {
|
|
|
181
240
|
export declare function discoverMachineTopology(options?: MachineTopologyOptions): MachineTopology;
|
|
182
241
|
export declare function resolveMachineRoute(machineId: string, options?: MachineRouteOptions): MachineRouteResolution;
|
|
183
242
|
export declare function resolveMachineWorkspace(options: MachineWorkspaceOptions): MachineWorkspaceResolution;
|
|
243
|
+
export interface MachineResolverSnapshotRoute {
|
|
244
|
+
ok: boolean;
|
|
245
|
+
source: MachineRouteKind;
|
|
246
|
+
route: MachineRouteKind;
|
|
247
|
+
target: string | null;
|
|
248
|
+
command_target: string | null;
|
|
249
|
+
confidence: MachineRouteConfidence;
|
|
250
|
+
local: boolean;
|
|
251
|
+
cacheability: MachineResolverCacheability;
|
|
252
|
+
}
|
|
253
|
+
export interface MachineResolverSnapshotWorkspace {
|
|
254
|
+
ok: boolean;
|
|
255
|
+
project: MachineWorkspaceProject;
|
|
256
|
+
machine: MachineWorkspaceResolution["machine"];
|
|
257
|
+
paths: MachineWorkspaceResolution["paths"];
|
|
258
|
+
diagnostics: MachineWorkspaceDiagnostic[];
|
|
259
|
+
repair_hints: MachineWorkspaceRepairHint[];
|
|
260
|
+
cacheability: MachineResolverCacheability;
|
|
261
|
+
}
|
|
262
|
+
export interface MachineResolverSnapshot {
|
|
263
|
+
schema_version: typeof MACHINES_CONSUMER_CONTRACT_VERSION;
|
|
264
|
+
package: MachinesContractPackage;
|
|
265
|
+
generated_at: string;
|
|
266
|
+
requested_machine_id: string;
|
|
267
|
+
machine_id: string | null;
|
|
268
|
+
route: MachineResolverSnapshotRoute;
|
|
269
|
+
workspace: MachineResolverSnapshotWorkspace | null;
|
|
270
|
+
cacheability: MachineResolverCacheability;
|
|
271
|
+
warnings: string[];
|
|
272
|
+
provenance: {
|
|
273
|
+
route: {
|
|
274
|
+
schema_version: number;
|
|
275
|
+
generated_at: string;
|
|
276
|
+
evidence: {
|
|
277
|
+
matched_by: MachineRouteResolution["evidence"]["matched_by"];
|
|
278
|
+
manifest_declared: boolean | null;
|
|
279
|
+
heartbeat_status: MachineTopologyEntry["heartbeat_status"] | null;
|
|
280
|
+
tailscale_online: boolean | null;
|
|
281
|
+
selected_hint_kind: MachineRouteKind | null;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
workspace: {
|
|
285
|
+
schema_version: number;
|
|
286
|
+
generated_at: string;
|
|
287
|
+
metadata_keys: string[];
|
|
288
|
+
matched_by: MachineRouteResolution["evidence"]["matched_by"];
|
|
289
|
+
manifest_declared: boolean | null;
|
|
290
|
+
} | null;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
export interface CreateMachineResolverSnapshotOptions {
|
|
294
|
+
route: MachineRouteResolution;
|
|
295
|
+
workspace?: MachineWorkspaceResolution | null;
|
|
296
|
+
now?: Date;
|
|
297
|
+
resolverTtlMs?: number | null;
|
|
298
|
+
}
|
|
299
|
+
export declare function createMachineResolverSnapshot(options: CreateMachineResolverSnapshotOptions): MachineResolverSnapshot;
|
|
184
300
|
export declare function getLocalMachineTopology(options?: MachineTopologyOptions): MachineTopologyEntry;
|
|
185
301
|
//# sourceMappingURL=topology.d.ts.map
|
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;AACvD,eAAO,MAAM,4BAA4B,6BAA6B,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;AACvE,eAAO,MAAM,4BAA4B,iFAAiF,C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,IAAI,CAAC;SACnC,GAAG,IAAI,CAAC;KACV,CAAC;CACH;AAED,MAAM,WAAW,oCAAoC;IACnD,KAAK,EAAE,sBAAsB,CAAC;IAC9B,SAAS,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAC;IAC9C,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,oCAAoC,GAAG,uBAAuB,CAqEpH;AAED,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,sBAA2B,GAAG,oBAAoB,CAkBlG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/machines",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "Machine fleet management CLI + MCP for developers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"dist",
|
|
30
|
+
"schemas",
|
|
30
31
|
"scripts",
|
|
31
32
|
"README.md"
|
|
32
33
|
],
|