@moxt-ai/mobius 0.0.146 → 0.0.147
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/dist/agent-catalog/agent-diagnostics.d.ts +1 -1
- package/dist/agent-catalog/agent-diagnostics.d.ts.map +1 -1
- package/dist/agent-catalog/agent-diagnostics.js +31 -8
- package/dist/agent-catalog/agent-diagnostics.js.map +1 -1
- package/dist/agent-catalog/agent-discovery.d.ts +15 -1
- package/dist/agent-catalog/agent-discovery.d.ts.map +1 -1
- package/dist/agent-catalog/agent-discovery.js +34 -1
- package/dist/agent-catalog/agent-discovery.js.map +1 -1
- package/dist/agent-catalog/discover-agent.d.ts.map +1 -1
- package/dist/agent-catalog/discover-agent.js +3 -2
- package/dist/agent-catalog/discover-agent.js.map +1 -1
- package/dist/agent-catalog/discover-local-agents.d.ts +1 -0
- package/dist/agent-catalog/discover-local-agents.d.ts.map +1 -1
- package/dist/agent-catalog/discover-local-agents.js +8 -3
- package/dist/agent-catalog/discover-local-agents.js.map +1 -1
- package/dist/cli.js +95 -17
- package/dist/cli.js.map +2 -2
- package/dist/index.js +50 -7
- package/dist/index.js.map +2 -2
- package/dist/runtime.js +50 -7
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32569,6 +32569,17 @@ var AgentProbeFailed = class extends UnavailableAgent {
|
|
|
32569
32569
|
this.message = message;
|
|
32570
32570
|
}
|
|
32571
32571
|
};
|
|
32572
|
+
var UnsupportedAgentVersion = class extends UnavailableInstalledAgent {
|
|
32573
|
+
code = "agent_version_unsupported";
|
|
32574
|
+
message;
|
|
32575
|
+
minimumSupportedVersion;
|
|
32576
|
+
status = "unsupported_version";
|
|
32577
|
+
constructor(specification, agent, minimumSupportedVersion) {
|
|
32578
|
+
super(specification, agent);
|
|
32579
|
+
this.minimumSupportedVersion = minimumSupportedVersion;
|
|
32580
|
+
this.message = `Agent version ${agent.agentVersion} is below the minimum supported version ${minimumSupportedVersion}`;
|
|
32581
|
+
}
|
|
32582
|
+
};
|
|
32572
32583
|
var IntegrationProbeFailed = class extends UnavailableInstalledAgent {
|
|
32573
32584
|
code;
|
|
32574
32585
|
message;
|
|
@@ -32596,12 +32607,25 @@ var AuthenticationRequiredAgent = class extends UnavailableInstalledAgent {
|
|
|
32596
32607
|
super(specification, agent);
|
|
32597
32608
|
}
|
|
32598
32609
|
};
|
|
32610
|
+
var AgentDiscoveryResult = class {
|
|
32611
|
+
detectionMilliseconds;
|
|
32612
|
+
discovery;
|
|
32613
|
+
constructor(discovery, detectionMilliseconds) {
|
|
32614
|
+
if (!Number.isFinite(detectionMilliseconds) || detectionMilliseconds < 0) {
|
|
32615
|
+
throw new Error("The Agent detection duration is invalid");
|
|
32616
|
+
}
|
|
32617
|
+
this.detectionMilliseconds = Math.round(detectionMilliseconds * 1e3) / 1e3;
|
|
32618
|
+
this.discovery = discovery;
|
|
32619
|
+
}
|
|
32620
|
+
};
|
|
32599
32621
|
var LocalAgentInventory = class {
|
|
32600
32622
|
available;
|
|
32601
32623
|
discoveries;
|
|
32602
32624
|
installable;
|
|
32625
|
+
results;
|
|
32603
32626
|
unavailable;
|
|
32604
|
-
constructor(
|
|
32627
|
+
constructor(results) {
|
|
32628
|
+
const discoveries = results.map((result) => result.discovery);
|
|
32605
32629
|
const available = [];
|
|
32606
32630
|
const unavailable = [];
|
|
32607
32631
|
for (const discovery of discoveries) {
|
|
@@ -32620,8 +32644,17 @@ var LocalAgentInventory = class {
|
|
|
32620
32644
|
(discovery) => discovery instanceof UnavailableInstalledAgent ? discovery.agent : new MissingAgentDefinition(discovery.specification.id, discovery.specification.label)
|
|
32621
32645
|
)
|
|
32622
32646
|
);
|
|
32647
|
+
this.results = Object.freeze([...results]);
|
|
32623
32648
|
this.unavailable = Object.freeze(unavailable);
|
|
32624
32649
|
}
|
|
32650
|
+
detectionMillisecondsFor = (discovery) => {
|
|
32651
|
+
for (const result of this.results) {
|
|
32652
|
+
if (result.discovery === discovery) {
|
|
32653
|
+
return result.detectionMilliseconds;
|
|
32654
|
+
}
|
|
32655
|
+
}
|
|
32656
|
+
throw new Error("The Agent discovery result is unavailable");
|
|
32657
|
+
};
|
|
32625
32658
|
readyAgents = () => this.available.map((discovery) => discovery.agent);
|
|
32626
32659
|
};
|
|
32627
32660
|
|
|
@@ -36540,15 +36573,20 @@ async function discoverAgent(specification, context) {
|
|
|
36540
36573
|
);
|
|
36541
36574
|
continue;
|
|
36542
36575
|
}
|
|
36543
|
-
if (!supportedVersion) {
|
|
36544
|
-
continue;
|
|
36545
|
-
}
|
|
36546
36576
|
const installedAgent = new AgentIntegrationDefinition(
|
|
36547
36577
|
specification.id,
|
|
36548
36578
|
specification.label,
|
|
36549
36579
|
agent.identity.requestedPath,
|
|
36550
36580
|
agentVersion
|
|
36551
36581
|
);
|
|
36582
|
+
if (!supportedVersion) {
|
|
36583
|
+
lastFailure = new UnsupportedAgentVersion(
|
|
36584
|
+
specification,
|
|
36585
|
+
installedAgent,
|
|
36586
|
+
specification.minimumSupportedAgentVersion
|
|
36587
|
+
);
|
|
36588
|
+
continue;
|
|
36589
|
+
}
|
|
36552
36590
|
if (adapters.length === 0 && !(specification instanceof InProcessAcpAgentDefinition2)) {
|
|
36553
36591
|
return new MissingAdapter(specification, installedAgent);
|
|
36554
36592
|
}
|
|
@@ -36642,10 +36680,15 @@ async function discoverAgent(specification, context) {
|
|
|
36642
36680
|
// src/agent-catalog/discover-local-agents.ts
|
|
36643
36681
|
async function discoverLocalAgentInventory(options) {
|
|
36644
36682
|
const specifications = options.specifications ?? supportedLocalAgentSpecifications();
|
|
36645
|
-
const
|
|
36646
|
-
|
|
36683
|
+
const monotonicTimeMilliseconds = options.monotonicTimeMilliseconds ?? (() => performance.now());
|
|
36684
|
+
const results = await Promise.all(
|
|
36685
|
+
specifications.map(async (specification) => {
|
|
36686
|
+
const startedAt = monotonicTimeMilliseconds();
|
|
36687
|
+
const discovery = await discoverAgent(specification, options);
|
|
36688
|
+
return new AgentDiscoveryResult(discovery, monotonicTimeMilliseconds() - startedAt);
|
|
36689
|
+
})
|
|
36647
36690
|
);
|
|
36648
|
-
return new LocalAgentInventory(
|
|
36691
|
+
return new LocalAgentInventory(results);
|
|
36649
36692
|
}
|
|
36650
36693
|
|
|
36651
36694
|
// src/storage/runtime-installation-store.ts
|