@ouro.bot/cli 0.1.0-alpha.683 → 0.1.0-alpha.684
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/changelog.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.684",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Bootstrap private-runtime provider credentials before queued work is flushed."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.683",
|
|
6
12
|
"changes": [
|
|
@@ -122,6 +122,7 @@ if (!ipcState.installed) {
|
|
|
122
122
|
// Dynamic import: agent-entry is process-start wiring that starts a sense process.
|
|
123
123
|
// Using dynamic import avoids a static heart/ -> senses/ dependency.
|
|
124
124
|
Promise.resolve().then(() => __importStar(require("./runtime-credentials"))).then(async ({ readMachineRuntimeCredentialConfig, readRuntimeCredentialConfig, refreshMachineRuntimeCredentialConfig, refreshRuntimeCredentialConfig, applyRuntimeCredentialBootstrapMessage, waitForRuntimeCredentialBootstrap, }) => {
|
|
125
|
+
const { readProviderCredentialPool, refreshProviderCredentialPool } = await Promise.resolve().then(() => __importStar(require("./provider-credentials")));
|
|
125
126
|
const bootstrappedBeforeWait = drainBufferedRuntimeCredentialBootstrap(applyRuntimeCredentialBootstrapMessage);
|
|
126
127
|
const bootstrappedDuringWait = bootstrappedBeforeWait ? true : await waitForRuntimeCredentialBootstrap(agentName);
|
|
127
128
|
if (bootstrappedDuringWait) {
|
|
@@ -133,6 +134,10 @@ Promise.resolve().then(() => __importStar(require("./runtime-credentials"))).the
|
|
|
133
134
|
if (!readRuntimeCredentialConfig(agentName).ok) {
|
|
134
135
|
void refreshRuntimeCredentialConfig(agentName, { preserveCachedOnFailure: true }).catch(() => undefined);
|
|
135
136
|
}
|
|
137
|
+
const providerPool = readProviderCredentialPool(agentName);
|
|
138
|
+
if (!providerPool.ok || Object.keys(providerPool.pool.providers).length === 0) {
|
|
139
|
+
await refreshProviderCredentialPool(agentName, { preserveCachedOnFailure: true }).catch(() => undefined);
|
|
140
|
+
}
|
|
136
141
|
/* v8 ignore next 7 -- process-start best-effort machine credential refresh runs in a child entrypoint and is covered operationally by daemon startup tests @preserve */
|
|
137
142
|
if (!readMachineRuntimeCredentialConfig(agentName).ok) {
|
|
138
143
|
void Promise.resolve().then(() => __importStar(require("./machine-identity"))).then(({ loadOrCreateMachineIdentity }) => {
|
|
@@ -66,6 +66,8 @@ const bundle_manifest_1 = require("../../mind/bundle-manifest");
|
|
|
66
66
|
const mcp_canary_1 = require("./mcp-canary");
|
|
67
67
|
const context_loss_sentinel_1 = require("../context-loss-sentinel");
|
|
68
68
|
const provider_credentials_1 = require("../provider-credentials");
|
|
69
|
+
const runtime_credentials_1 = require("../runtime-credentials");
|
|
70
|
+
const machine_identity_1 = require("../machine-identity");
|
|
69
71
|
function parseSocketPath(argv) {
|
|
70
72
|
const socketIndex = argv.indexOf("--socket");
|
|
71
73
|
if (socketIndex >= 0) {
|
|
@@ -100,6 +102,28 @@ const managedPrivateRuntimes = managedAgents.map((agent) => ({
|
|
|
100
102
|
agent,
|
|
101
103
|
config: (0, agent_discovery_1.readPrivateRuntimeConfig)(agent),
|
|
102
104
|
}));
|
|
105
|
+
function currentMachineId() {
|
|
106
|
+
return (0, machine_identity_1.loadOrCreateMachineIdentity)().machineId;
|
|
107
|
+
}
|
|
108
|
+
function privateRuntimeCredentialBootstrapFor(agent) {
|
|
109
|
+
const machineId = currentMachineId();
|
|
110
|
+
const runtime = (0, runtime_credentials_1.readRuntimeCredentialConfig)(agent);
|
|
111
|
+
const machine = (0, runtime_credentials_1.readMachineRuntimeCredentialConfig)(agent);
|
|
112
|
+
const providerPool = (0, provider_credentials_1.readProviderCredentialPool)(agent);
|
|
113
|
+
const providerCredentialRecords = providerPool.ok
|
|
114
|
+
? Object.values(providerPool.pool.providers).filter((record) => !!record)
|
|
115
|
+
: [];
|
|
116
|
+
const bootstrap = {
|
|
117
|
+
agentName: agent,
|
|
118
|
+
runtimeConfig: runtime.ok ? runtime.config : undefined,
|
|
119
|
+
machineRuntimeConfig: machine.ok ? machine.config : undefined,
|
|
120
|
+
machineId,
|
|
121
|
+
providerCredentialRecords: providerCredentialRecords.length > 0 ? providerCredentialRecords : undefined,
|
|
122
|
+
};
|
|
123
|
+
if (!bootstrap.runtimeConfig && !bootstrap.machineRuntimeConfig && !bootstrap.providerCredentialRecords)
|
|
124
|
+
return null;
|
|
125
|
+
return bootstrap;
|
|
126
|
+
}
|
|
103
127
|
function sentinelHealthStatus(receipt) {
|
|
104
128
|
if (receipt.verdict === "ready")
|
|
105
129
|
return "ok";
|
|
@@ -178,6 +202,7 @@ const processManager = new process_manager_1.DaemonProcessManager({
|
|
|
178
202
|
entry: "heart/agent-entry.js",
|
|
179
203
|
channel: "private-runtime",
|
|
180
204
|
autoStart: config.autoStart,
|
|
205
|
+
getRuntimeCredentialBootstrap: () => privateRuntimeCredentialBootstrapFor(agent),
|
|
181
206
|
})),
|
|
182
207
|
existsSync: fs.existsSync,
|
|
183
208
|
/* v8 ignore next 4 -- wiring: delegates to checkAgentConfig which has full unit tests @preserve */
|