@hasna/machines 0.0.22 → 0.0.24
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 +35 -5
- package/dist/cli/index.js +115 -11
- 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 +498 -13
- package/dist/index.js +263 -12
- package/dist/mcp/index.js +115 -11
- package/dist/topology.d.ts +117 -1
- package/dist/topology.d.ts.map +1 -1
- package/package.json +4 -1
- package/schemas/machines-consumer.schema.json +47 -0
- package/scripts/consumer-conformance.mjs +430 -0
package/README.md
CHANGED
|
@@ -57,15 +57,25 @@ should import `@hasna/machines/consumer`:
|
|
|
57
57
|
```ts
|
|
58
58
|
import {
|
|
59
59
|
MACHINES_CONSUMER_CONTRACT,
|
|
60
|
+
createMachineResolverSnapshot,
|
|
60
61
|
discoverMachineTopology,
|
|
61
62
|
getLocalMachineTopology,
|
|
62
63
|
resolveMachineRoute,
|
|
64
|
+
resolveMachineWorkspace,
|
|
65
|
+
validateMachinesConsumerEnvelope,
|
|
63
66
|
} from "@hasna/machines/consumer";
|
|
64
67
|
|
|
65
68
|
console.log(MACHINES_CONSUMER_CONTRACT.schema_version);
|
|
66
69
|
const topology = discoverMachineTopology();
|
|
67
70
|
const local = getLocalMachineTopology();
|
|
68
71
|
const route = resolveMachineRoute("spark01");
|
|
72
|
+
const workspace = resolveMachineWorkspace({
|
|
73
|
+
machineId: "spark01",
|
|
74
|
+
projectId: "open-knowledge",
|
|
75
|
+
repoName: "open-knowledge",
|
|
76
|
+
});
|
|
77
|
+
const snapshot = createMachineResolverSnapshot({ route, workspace });
|
|
78
|
+
console.log(validateMachinesConsumerEnvelope("resolver_snapshot", snapshot).ok);
|
|
69
79
|
```
|
|
70
80
|
|
|
71
81
|
The SDK merges manifest entries, local heartbeats, SSH route hints, and
|
|
@@ -74,11 +84,31 @@ The SDK merges manifest entries, local heartbeats, SSH route hints, and
|
|
|
74
84
|
when present, and fall back to local probes or app-local machine registries when
|
|
75
85
|
it is absent.
|
|
76
86
|
|
|
77
|
-
Topology, route, workspace, and
|
|
78
|
-
package version metadata,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
87
|
+
Topology, route, workspace, compatibility, and resolver-snapshot JSON include
|
|
88
|
+
`schema_version`, package version metadata, capability flags, and cacheability
|
|
89
|
+
metadata where downstream apps may persist resolver evidence. The current
|
|
90
|
+
consumer contract version is `1`; the exported `MACHINES_CONSUMER_CONTRACT`
|
|
91
|
+
records the stable entrypoint, envelope names, schema artifact, field
|
|
92
|
+
capabilities, default resolver TTL, and stable exports used by downstream apps
|
|
93
|
+
such as `@hasna/knowledge`.
|
|
94
|
+
|
|
95
|
+
The package includes `schemas/machines-consumer.schema.json` and also exports
|
|
96
|
+
`MACHINES_CONSUMER_SCHEMA_BUNDLE`, `getMachinesConsumerSchemaBundle()`, and
|
|
97
|
+
`validateMachinesConsumerEnvelope()`. Downstream apps can use these helpers to
|
|
98
|
+
validate route, workspace, compatibility, and resolver-snapshot envelopes
|
|
99
|
+
without importing CLI, MCP, agent, installer, or storage-heavy internals.
|
|
100
|
+
|
|
101
|
+
The package also ships a downstream conformance fixture for consumers that want
|
|
102
|
+
to verify their optional adapter boundary without copying app-specific smoke
|
|
103
|
+
tests:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
bun scripts/consumer-conformance.mjs --json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
It exercises four shapes: local SDK import, a fake future SDK contract that
|
|
110
|
+
must be rejected before resolver output is trusted, global `machines` CLI-only
|
|
111
|
+
fallback, and no-SDK/no-CLI unavailable diagnostics.
|
|
82
112
|
|
|
83
113
|
CLI and MCP expose the same topology view:
|
|
84
114
|
|
package/dist/cli/index.js
CHANGED
|
@@ -7628,13 +7628,18 @@ 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 DEFAULT_MACHINE_RESOLVER_TTL_MS = 24 * 60 * 60 * 1000;
|
|
7631
7632
|
var MACHINES_CONSUMER_CAPABILITIES = {
|
|
7632
7633
|
topology: true,
|
|
7633
7634
|
compatibility: true,
|
|
7634
7635
|
route_resolution: true,
|
|
7635
7636
|
cli_json_fallback: true,
|
|
7636
7637
|
workspace_path_mapping: true,
|
|
7637
|
-
workspace_diagnostics: true
|
|
7638
|
+
workspace_diagnostics: true,
|
|
7639
|
+
schema_artifacts: true,
|
|
7640
|
+
cacheability_metadata: true,
|
|
7641
|
+
resolver_snapshots: true,
|
|
7642
|
+
field_capability_descriptors: true
|
|
7638
7643
|
};
|
|
7639
7644
|
function getMachinesConsumerCapabilities() {
|
|
7640
7645
|
return { ...MACHINES_CONSUMER_CAPABILITIES };
|
|
@@ -7905,11 +7910,69 @@ function routeConfidence(input) {
|
|
|
7905
7910
|
return "low";
|
|
7906
7911
|
return "none";
|
|
7907
7912
|
}
|
|
7913
|
+
function addMilliseconds(date, milliseconds) {
|
|
7914
|
+
return new Date(date.getTime() + milliseconds).toISOString();
|
|
7915
|
+
}
|
|
7916
|
+
function routeAuthority(input) {
|
|
7917
|
+
if (!input.machine)
|
|
7918
|
+
return "unresolved";
|
|
7919
|
+
if (input.matchedBy === "fallback")
|
|
7920
|
+
return "fallback";
|
|
7921
|
+
if (input.selectedHint?.kind === "local")
|
|
7922
|
+
return "live_topology";
|
|
7923
|
+
if (input.selectedHint?.kind === "tailscale" || input.machine.tailscale.online !== null)
|
|
7924
|
+
return "live_topology";
|
|
7925
|
+
if (input.machine.manifest_declared)
|
|
7926
|
+
return "manifest";
|
|
7927
|
+
return "open-machines";
|
|
7928
|
+
}
|
|
7929
|
+
function workspaceAuthority(paths) {
|
|
7930
|
+
const sources = [paths.workspace_root.source, paths.project_root.source, paths.open_files_root.source];
|
|
7931
|
+
if (sources.some((source) => source === "argument"))
|
|
7932
|
+
return "argument";
|
|
7933
|
+
if (sources.some((source) => source === "manifest_metadata"))
|
|
7934
|
+
return "manifest_metadata";
|
|
7935
|
+
if (sources.some((source) => source === "manifest"))
|
|
7936
|
+
return "manifest";
|
|
7937
|
+
if (sources.some((source) => source === "inferred"))
|
|
7938
|
+
return "inferred";
|
|
7939
|
+
if (sources.every((source) => source === "unresolved"))
|
|
7940
|
+
return "unresolved";
|
|
7941
|
+
return "open-machines";
|
|
7942
|
+
}
|
|
7943
|
+
function cacheability(input) {
|
|
7944
|
+
const ttlMs = input.ttlMs === undefined ? DEFAULT_MACHINE_RESOLVER_TTL_MS : input.ttlMs;
|
|
7945
|
+
const expiresAt = typeof ttlMs === "number" && ttlMs > 0 ? addMilliseconds(input.observedAt, ttlMs) : null;
|
|
7946
|
+
const stale = expiresAt ? input.now.getTime() > new Date(expiresAt).getTime() : false;
|
|
7947
|
+
const confidenceCacheable = input.confidence !== "none" && input.confidence !== "low";
|
|
7948
|
+
const cacheable = input.ok && confidenceCacheable && !stale && input.authority !== "unresolved";
|
|
7949
|
+
const reasons = [...input.reasons];
|
|
7950
|
+
if (!input.ok)
|
|
7951
|
+
reasons.push("resolver_not_ok");
|
|
7952
|
+
if (!confidenceCacheable)
|
|
7953
|
+
reasons.push(`low_confidence:${input.confidence}`);
|
|
7954
|
+
if (stale)
|
|
7955
|
+
reasons.push("stale");
|
|
7956
|
+
if (input.authority === "unresolved")
|
|
7957
|
+
reasons.push("unresolved_authority");
|
|
7958
|
+
return {
|
|
7959
|
+
observed_at: input.observedAt.toISOString(),
|
|
7960
|
+
verified_at: input.ok ? input.now.toISOString() : null,
|
|
7961
|
+
expires_at: expiresAt,
|
|
7962
|
+
ttl_ms: typeof ttlMs === "number" && ttlMs > 0 ? ttlMs : null,
|
|
7963
|
+
source_authority: input.authority,
|
|
7964
|
+
confidence: input.confidence,
|
|
7965
|
+
cacheable,
|
|
7966
|
+
stale,
|
|
7967
|
+
reasons: [...new Set(reasons)].sort()
|
|
7968
|
+
};
|
|
7969
|
+
}
|
|
7908
7970
|
function resolveMachineRoute(machineId, options = {}) {
|
|
7971
|
+
const now = options.now ?? new Date;
|
|
7909
7972
|
const topology = options.topology ?? discoverMachineTopology(options);
|
|
7910
7973
|
const warnings = [...topology.warnings];
|
|
7911
7974
|
const { machine, matchedBy } = findRouteMachine(topology, machineId);
|
|
7912
|
-
const generatedAt =
|
|
7975
|
+
const generatedAt = now.toISOString();
|
|
7913
7976
|
if (!machine) {
|
|
7914
7977
|
warnings.push(`machine_not_found:${machineId}`);
|
|
7915
7978
|
return {
|
|
@@ -7933,16 +7996,27 @@ function resolveMachineRoute(machineId, options = {}) {
|
|
|
7933
7996
|
tailscale_online: null,
|
|
7934
7997
|
selected_hint: null
|
|
7935
7998
|
},
|
|
7999
|
+
cacheability: cacheability({
|
|
8000
|
+
ok: false,
|
|
8001
|
+
observedAt: now,
|
|
8002
|
+
now,
|
|
8003
|
+
ttlMs: options.resolverTtlMs,
|
|
8004
|
+
authority: "unresolved",
|
|
8005
|
+
confidence: "none",
|
|
8006
|
+
reasons: [`machine_not_found:${machineId}`]
|
|
8007
|
+
}),
|
|
7936
8008
|
warnings
|
|
7937
8009
|
};
|
|
7938
8010
|
}
|
|
7939
8011
|
const selectedHint = selectRouteHint(machine.route_hints);
|
|
7940
8012
|
const route = selectedHint?.kind ?? machine.ssh.route ?? "unknown";
|
|
7941
8013
|
const local = route === "local" || machine.machine_id === topology.local_machine_id;
|
|
8014
|
+
const confidence = routeConfidence({ machine, hint: selectedHint, matchedBy });
|
|
8015
|
+
const ok = Boolean(selectedHint?.target);
|
|
7942
8016
|
return {
|
|
7943
8017
|
schema_version: MACHINES_CONSUMER_CONTRACT_VERSION,
|
|
7944
8018
|
package: topology.package,
|
|
7945
|
-
ok
|
|
8019
|
+
ok,
|
|
7946
8020
|
machine_id: machine.machine_id,
|
|
7947
8021
|
requested_machine_id: machineId,
|
|
7948
8022
|
generated_at: generatedAt,
|
|
@@ -7950,7 +8024,7 @@ function resolveMachineRoute(machineId, options = {}) {
|
|
|
7950
8024
|
source: route,
|
|
7951
8025
|
target: selectedHint?.target ?? null,
|
|
7952
8026
|
command_target: selectedHint?.target ?? null,
|
|
7953
|
-
confidence
|
|
8027
|
+
confidence,
|
|
7954
8028
|
local,
|
|
7955
8029
|
evidence: {
|
|
7956
8030
|
topology: true,
|
|
@@ -7960,6 +8034,15 @@ function resolveMachineRoute(machineId, options = {}) {
|
|
|
7960
8034
|
tailscale_online: machine.tailscale.online,
|
|
7961
8035
|
selected_hint: selectedHint
|
|
7962
8036
|
},
|
|
8037
|
+
cacheability: cacheability({
|
|
8038
|
+
ok,
|
|
8039
|
+
observedAt: now,
|
|
8040
|
+
now,
|
|
8041
|
+
ttlMs: options.resolverTtlMs,
|
|
8042
|
+
authority: routeAuthority({ machine, selectedHint, matchedBy }),
|
|
8043
|
+
confidence,
|
|
8044
|
+
reasons: selectedHint ? [] : ["route_target_unresolved"]
|
|
8045
|
+
}),
|
|
7963
8046
|
warnings
|
|
7964
8047
|
};
|
|
7965
8048
|
}
|
|
@@ -8256,10 +8339,11 @@ function metadataKeysForDiagnostics(metadata) {
|
|
|
8256
8339
|
return Object.keys(metadata).filter((key) => !/(secret|token|key|password|credential)/i.test(key)).sort();
|
|
8257
8340
|
}
|
|
8258
8341
|
function resolveMachineWorkspace(options) {
|
|
8342
|
+
const now = options.now ?? new Date;
|
|
8259
8343
|
const topology = options.topology ?? discoverMachineTopology(options);
|
|
8260
8344
|
const warnings = [...topology.warnings];
|
|
8261
8345
|
const { machine, matchedBy } = findRouteMachine(topology, options.machineId);
|
|
8262
|
-
const generatedAt =
|
|
8346
|
+
const generatedAt = now.toISOString();
|
|
8263
8347
|
const repoName = options.repoName ?? options.projectId;
|
|
8264
8348
|
const openFilesRepoName = options.openFilesRepoName ?? "open-files";
|
|
8265
8349
|
if (!machine) {
|
|
@@ -8286,6 +8370,15 @@ function resolveMachineWorkspace(options) {
|
|
|
8286
8370
|
manifest_declared: null,
|
|
8287
8371
|
metadata_keys: []
|
|
8288
8372
|
},
|
|
8373
|
+
cacheability: cacheability({
|
|
8374
|
+
ok: false,
|
|
8375
|
+
observedAt: now,
|
|
8376
|
+
now,
|
|
8377
|
+
ttlMs: options.resolverTtlMs,
|
|
8378
|
+
authority: "unresolved",
|
|
8379
|
+
confidence: "none",
|
|
8380
|
+
reasons: [`machine_not_found:${options.machineId}`]
|
|
8381
|
+
}),
|
|
8289
8382
|
warnings
|
|
8290
8383
|
};
|
|
8291
8384
|
const diagnostics2 = workspaceDiagnostics({
|
|
@@ -8317,10 +8410,16 @@ function resolveMachineWorkspace(options) {
|
|
|
8317
8410
|
warnings.push(`open_files_root_inferred:${options.projectId}`);
|
|
8318
8411
|
if (!projectRootPath)
|
|
8319
8412
|
warnings.push(`project_root_unresolved:${options.projectId}`);
|
|
8413
|
+
const workspacePaths = {
|
|
8414
|
+
workspace_root: { path: workspaceRootPath, source: workspaceRootSource },
|
|
8415
|
+
project_root: { path: projectRootPath, source: projectRootSource },
|
|
8416
|
+
open_files_root: { path: openFilesRootPath, source: openFilesRootSource }
|
|
8417
|
+
};
|
|
8418
|
+
const workspaceOk = Boolean(projectRootPath);
|
|
8320
8419
|
const resolution = {
|
|
8321
8420
|
schema_version: MACHINES_CONSUMER_CONTRACT_VERSION,
|
|
8322
8421
|
package: topology.package,
|
|
8323
|
-
ok:
|
|
8422
|
+
ok: workspaceOk,
|
|
8324
8423
|
requested_machine_id: options.machineId,
|
|
8325
8424
|
machine_id: machine.machine_id,
|
|
8326
8425
|
generated_at: generatedAt,
|
|
@@ -8335,11 +8434,7 @@ function resolveMachineWorkspace(options) {
|
|
|
8335
8434
|
trust_status: trustStatus(machine),
|
|
8336
8435
|
auth_status: authStatus(machine)
|
|
8337
8436
|
},
|
|
8338
|
-
paths:
|
|
8339
|
-
workspace_root: { path: workspaceRootPath, source: workspaceRootSource },
|
|
8340
|
-
project_root: { path: projectRootPath, source: projectRootSource },
|
|
8341
|
-
open_files_root: { path: openFilesRootPath, source: openFilesRootSource }
|
|
8342
|
-
},
|
|
8437
|
+
paths: workspacePaths,
|
|
8343
8438
|
diagnostics: [],
|
|
8344
8439
|
repair_hints: [],
|
|
8345
8440
|
evidence: {
|
|
@@ -8348,6 +8443,15 @@ function resolveMachineWorkspace(options) {
|
|
|
8348
8443
|
manifest_declared: machine.manifest_declared,
|
|
8349
8444
|
metadata_keys: metadataKeysForDiagnostics(metadata)
|
|
8350
8445
|
},
|
|
8446
|
+
cacheability: cacheability({
|
|
8447
|
+
ok: workspaceOk,
|
|
8448
|
+
observedAt: now,
|
|
8449
|
+
now,
|
|
8450
|
+
ttlMs: options.resolverTtlMs,
|
|
8451
|
+
authority: workspaceAuthority(workspacePaths),
|
|
8452
|
+
confidence: workspaceOk ? "medium" : "none",
|
|
8453
|
+
reasons: projectRootPath ? [] : [`project_root_unresolved:${options.projectId}`]
|
|
8454
|
+
}),
|
|
8351
8455
|
warnings
|
|
8352
8456
|
};
|
|
8353
8457
|
const diagnostics = workspaceDiagnostics({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MACHINES_CONSUMER_SCHEMA_URI, type MachineResolverSnapshot, type MachineRouteResolution, type MachineTopology, type MachineWorkspaceResolution } from "./topology.js";
|
|
2
|
+
import type { MachineCompatibilityReport } from "./compatibility.js";
|
|
3
|
+
export type MachinesConsumerSchemaEnvelope = "contract" | "topology" | "route" | "workspace" | "compatibility" | "resolver_snapshot";
|
|
4
|
+
export interface MachinesConsumerValidationResult {
|
|
5
|
+
ok: boolean;
|
|
6
|
+
envelope: MachinesConsumerSchemaEnvelope;
|
|
7
|
+
schema_id: typeof MACHINES_CONSUMER_SCHEMA_URI;
|
|
8
|
+
errors: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface MachinesConsumerSchemaBundle {
|
|
11
|
+
$schema: "https://json-schema.org/draft/2020-12/schema";
|
|
12
|
+
$id: typeof MACHINES_CONSUMER_SCHEMA_URI;
|
|
13
|
+
title: string;
|
|
14
|
+
type: "object";
|
|
15
|
+
$defs: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export declare const MACHINES_CONSUMER_SCHEMA_BUNDLE: MachinesConsumerSchemaBundle;
|
|
18
|
+
export declare function getMachinesConsumerSchemaBundle(): MachinesConsumerSchemaBundle;
|
|
19
|
+
export declare function validateMachinesConsumerEnvelope(envelope: MachinesConsumerSchemaEnvelope, value: unknown): MachinesConsumerValidationResult;
|
|
20
|
+
export type MachinesConsumerEnvelopeValue = MachineTopology | MachineRouteResolution | MachineWorkspaceResolution | MachineCompatibilityReport | MachineResolverSnapshot;
|
|
21
|
+
//# sourceMappingURL=consumer-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer-schema.d.ts","sourceRoot":"","sources":["../src/consumer-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,4BAA4B,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAChC,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErE,MAAM,MAAM,8BAA8B,GACtC,UAAU,GACV,UAAU,GACV,OAAO,GACP,WAAW,GACX,eAAe,GACf,mBAAmB,CAAC;AAExB,MAAM,WAAW,gCAAgC;IAC/C,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,8BAA8B,CAAC;IACzC,SAAS,EAAE,OAAO,4BAA4B,CAAC;IAC/C,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,8CAA8C,CAAC;IACxD,GAAG,EAAE,OAAO,4BAA4B,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,eAAO,MAAM,+BAA+B,EAAE,4BAoI7C,CAAC;AAiCF,wBAAgB,+BAA+B,IAAI,4BAA4B,CAE9E;AAED,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,8BAA8B,EACxC,KAAK,EAAE,OAAO,GACb,gCAAgC,CA+ClC;AAED,MAAM,MAAM,6BAA6B,GACrC,eAAe,GACf,sBAAsB,GACtB,0BAA0B,GAC1B,0BAA0B,GAC1B,uBAAuB,CAAC"}
|
package/dist/consumer.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
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, MachineWorkspaceDiagnostic, MachineWorkspaceDiagnosticStatus, MachineWorkspaceOptions, MachineWorkspacePath, MachineWorkspacePathSource, MachineWorkspaceProject, MachineWorkspaceRepairHint, MachineWorkspaceResolution, MachineWorkspaceTrustStatus, MachinesConsumerContract, MachinesConsumerEnvelope, MachinesConsumerCapabilities, MachinesContractPackage, TopologyCommandResult, TopologyCommandRunner, } from "./topology.js";
|
|
1
|
+
export { MACHINES_CONSUMER_CAPABILITIES, MACHINES_CONSUMER_CONTRACT, MACHINES_CONSUMER_ENTRYPOINT, MACHINES_CONSUMER_CONTRACT_VERSION, MACHINES_CONSUMER_FIELD_CAPABILITIES, MACHINES_CONSUMER_SCHEMA_ARTIFACT, MACHINES_CONSUMER_SCHEMA_URI, MACHINES_PACKAGE_NAME, DEFAULT_MACHINE_RESOLVER_TTL_MS, createMachineResolverSnapshot, discoverMachineTopology, getMachinesConsumerCapabilities, getLocalMachineTopology, resolveMachineRoute, resolveMachineWorkspace, } from "./topology.js";
|
|
2
|
+
export type { MachineRouteConfidence, MachineRouteHint, MachineRouteKind, MachineRouteOptions, MachineRouteResolution, MachineResolverAuthority, MachineResolverCacheability, MachineResolverSnapshot, MachineResolverSnapshotRoute, MachineResolverSnapshotWorkspace, MachineTopology, MachineTopologyEntry, MachineTopologyOptions, MachineWorkspaceAuthStatus, MachineWorkspaceDiagnostic, MachineWorkspaceDiagnosticStatus, MachineWorkspaceOptions, MachineWorkspacePath, MachineWorkspacePathSource, MachineWorkspaceProject, MachineWorkspaceRepairHint, MachineWorkspaceResolution, MachineWorkspaceTrustStatus, MachinesConsumerContract, MachinesConsumerEnvelope, MachinesConsumerFieldCapabilities, MachinesConsumerCapabilities, MachinesContractPackage, TopologyCommandResult, TopologyCommandRunner, } from "./topology.js";
|
|
3
|
+
export { MACHINES_CONSUMER_SCHEMA_BUNDLE, getMachinesConsumerSchemaBundle, validateMachinesConsumerEnvelope, } from "./consumer-schema.js";
|
|
4
|
+
export type { MachinesConsumerEnvelopeValue, MachinesConsumerSchemaBundle, MachinesConsumerSchemaEnvelope, MachinesConsumerValidationResult, } from "./consumer-schema.js";
|
|
3
5
|
export { checkMachineCompatibility, } from "./compatibility.js";
|
|
4
6
|
export type { CompatibilityCheck, CompatibilityCommandRunner, CompatibilityCommandSpec, CompatibilityPackageSpec, CompatibilitySource, CompatibilityStatus, CompatibilityWorkspaceSpec, MachineCompatibilityOptions, MachineCompatibilityReport, } from "./compatibility.js";
|
|
5
7
|
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,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,0BAA0B,EAC1B,gCAAgC,EAChC,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,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"}
|
|
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,oCAAoC,EACpC,iCAAiC,EACjC,4BAA4B,EAC5B,qBAAqB,EACrB,+BAA+B,EAC/B,6BAA6B,EAC7B,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,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,EAC5B,gCAAgC,EAChC,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,EAC1B,gCAAgC,EAChC,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,wBAAwB,EACxB,iCAAiC,EACjC,4BAA4B,EAC5B,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,6BAA6B,EAC7B,4BAA4B,EAC5B,8BAA8B,EAC9B,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAC9B,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"}
|