@ouro.bot/cli 0.1.0-alpha.447 → 0.1.0-alpha.448
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,14 @@
|
|
|
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.448",
|
|
6
|
+
"changes": [
|
|
7
|
+
"`ouro status` and agent prompt provider visibility now distinguish \"the daemon has not loaded provider credentials in this process\" from \"the agent vault is missing credentials.\" A saved live check that passed stays ready instead of being downgraded to stale/missing just because status rendering is running in a fresh daemon process.",
|
|
8
|
+
"Provider visibility now carries a safe `not-loaded` credential state and renders it as `checked previously`, preserving the last live-check result without reading or printing secrets during ordinary status/prompt rendering.",
|
|
9
|
+
"Regression coverage locks the installed-product failure shape: an empty in-process provider cache plus ready provider state no longer produces misleading auth repair guidance."
|
|
10
|
+
]
|
|
11
|
+
},
|
|
4
12
|
{
|
|
5
13
|
"version": "0.1.0-alpha.447",
|
|
6
14
|
"changes": [
|
|
@@ -2966,7 +2966,7 @@ async function executeProviderCheck(command, deps) {
|
|
|
2966
2966
|
throw error;
|
|
2967
2967
|
}
|
|
2968
2968
|
}
|
|
2969
|
-
function renderProviderCredentialLine(credential) {
|
|
2969
|
+
function renderProviderCredentialLine(agentName, credential) {
|
|
2970
2970
|
if (credential.status === "present") {
|
|
2971
2971
|
const credentialFields = credential.credentialFields.length > 0 ? ` credentials: ${credential.credentialFields.join(", ")}` : " credentials: none";
|
|
2972
2972
|
const configFields = credential.configFields.length > 0 ? ` config: ${credential.configFields.join(", ")}` : " config: none";
|
|
@@ -2975,6 +2975,9 @@ function renderProviderCredentialLine(credential) {
|
|
|
2975
2975
|
if (credential.status === "invalid-pool") {
|
|
2976
2976
|
return `credentials: vault unavailable (${credential.error}); repair: ${credential.repair.command}`;
|
|
2977
2977
|
}
|
|
2978
|
+
if (credential.status === "not-loaded") {
|
|
2979
|
+
return `credentials: not loaded in this process; run \`ouro provider refresh --agent ${agentName}\` to read the vault now`;
|
|
2980
|
+
}
|
|
2978
2981
|
return `credentials: missing; repair: ${credential.repair.command}`;
|
|
2979
2982
|
}
|
|
2980
2983
|
async function executeProviderStatus(command, deps) {
|
|
@@ -3010,7 +3013,7 @@ async function executeProviderStatus(command, deps) {
|
|
|
3010
3013
|
const binding = resolved.binding;
|
|
3011
3014
|
lines.push(` ${lane}: ${binding.provider} / ${binding.model} (${binding.source})`);
|
|
3012
3015
|
lines.push(` readiness: ${binding.readiness.status}${binding.readiness.error ? ` (${binding.readiness.error})` : ""}`);
|
|
3013
|
-
lines.push(` ${renderProviderCredentialLine(binding.credential)}`);
|
|
3016
|
+
lines.push(` ${renderProviderCredentialLine(command.agent, binding.credential)}`);
|
|
3014
3017
|
for (const warning of binding.warnings) {
|
|
3015
3018
|
lines.push(` warning: ${warning.message}`);
|
|
3016
3019
|
}
|
|
@@ -89,6 +89,16 @@ function resolveCredential(poolResult, provider, agentName) {
|
|
|
89
89
|
warnings: [missingCredentialWarning(provider)],
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
+
if ((0, provider_credentials_1.isProviderCredentialPoolNotLoaded)(poolResult)) {
|
|
93
|
+
return {
|
|
94
|
+
credential: {
|
|
95
|
+
status: "not-loaded",
|
|
96
|
+
provider,
|
|
97
|
+
poolPath: poolResult.poolPath,
|
|
98
|
+
},
|
|
99
|
+
warnings: [],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
92
102
|
if (poolResult.reason === "invalid" || poolResult.reason === "unavailable") {
|
|
93
103
|
return {
|
|
94
104
|
credential: {
|
|
@@ -130,6 +140,9 @@ function staleReadiness(readiness, reason) {
|
|
|
130
140
|
}
|
|
131
141
|
function resolveReadiness(input) {
|
|
132
142
|
if (!input.readiness) {
|
|
143
|
+
if (input.credential.status === "not-loaded") {
|
|
144
|
+
return { readiness: { status: "unknown" }, warnings: [] };
|
|
145
|
+
}
|
|
133
146
|
if (input.credential.status === "missing") {
|
|
134
147
|
return { readiness: { status: "unknown", reason: "credential-missing" }, warnings: [] };
|
|
135
148
|
}
|
|
@@ -170,6 +183,9 @@ function resolveReadiness(input) {
|
|
|
170
183
|
warnings: [],
|
|
171
184
|
};
|
|
172
185
|
}
|
|
186
|
+
if (input.credential.status === "not-loaded") {
|
|
187
|
+
return { readiness: readinessFromState(input.readiness), warnings: [] };
|
|
188
|
+
}
|
|
173
189
|
return { readiness: readinessFromState(input.readiness), warnings: [] };
|
|
174
190
|
}
|
|
175
191
|
function resolveEffectiveProviderBinding(input) {
|
|
@@ -33,10 +33,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PROVIDER_CREDENTIAL_POOL_NOT_LOADED_ERROR = void 0;
|
|
36
37
|
exports.splitProviderCredentialFields = splitProviderCredentialFields;
|
|
37
38
|
exports.providerCredentialsVaultPath = providerCredentialsVaultPath;
|
|
38
39
|
exports.providerCredentialItemName = providerCredentialItemName;
|
|
39
40
|
exports.providerCredentialMachineHomeDir = providerCredentialMachineHomeDir;
|
|
41
|
+
exports.isProviderCredentialPoolNotLoaded = isProviderCredentialPoolNotLoaded;
|
|
40
42
|
exports.readProviderCredentialPool = readProviderCredentialPool;
|
|
41
43
|
exports.refreshProviderCredentialPool = refreshProviderCredentialPool;
|
|
42
44
|
exports.createProviderCredentialRecord = createProviderCredentialRecord;
|
|
@@ -54,6 +56,7 @@ const credential_access_1 = require("../repertoire/credential-access");
|
|
|
54
56
|
const VALID_PROVIDERS = ["azure", "minimax", "anthropic", "openai-codex", "github-copilot"];
|
|
55
57
|
const VALID_PROVENANCE_SOURCES = ["auth-flow", "manual"];
|
|
56
58
|
const VAULT_ITEM_PREFIX = "providers/";
|
|
59
|
+
exports.PROVIDER_CREDENTIAL_POOL_NOT_LOADED_ERROR = "provider credentials have not been loaded from vault";
|
|
57
60
|
const PROVIDER_FIELD_SPLITS = {
|
|
58
61
|
anthropic: {
|
|
59
62
|
credentials: ["setupToken", "refreshToken", "expiresAt"],
|
|
@@ -197,7 +200,7 @@ function recordFromPayload(payload) {
|
|
|
197
200
|
provenance: { ...payload.provenance },
|
|
198
201
|
};
|
|
199
202
|
}
|
|
200
|
-
function missingPool(agentName, error =
|
|
203
|
+
function missingPool(agentName, error = exports.PROVIDER_CREDENTIAL_POOL_NOT_LOADED_ERROR) {
|
|
201
204
|
return {
|
|
202
205
|
ok: false,
|
|
203
206
|
reason: "missing",
|
|
@@ -205,6 +208,11 @@ function missingPool(agentName, error = "provider credentials have not been load
|
|
|
205
208
|
error,
|
|
206
209
|
};
|
|
207
210
|
}
|
|
211
|
+
function isProviderCredentialPoolNotLoaded(result) {
|
|
212
|
+
return !result.ok
|
|
213
|
+
&& result.reason === "missing"
|
|
214
|
+
&& result.error === exports.PROVIDER_CREDENTIAL_POOL_NOT_LOADED_ERROR;
|
|
215
|
+
}
|
|
208
216
|
function cacheResult(agentName, result) {
|
|
209
217
|
cachedPools.set(agentName, result);
|
|
210
218
|
return result;
|
|
@@ -21,7 +21,7 @@ function credentialVisibility(binding) {
|
|
|
21
21
|
}
|
|
22
22
|
return {
|
|
23
23
|
status: credential.status,
|
|
24
|
-
repairCommand: credential.repair.command,
|
|
24
|
+
...("repair" in credential ? { repairCommand: credential.repair.command } : {}),
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
function readinessVisibility(binding) {
|
|
@@ -87,6 +87,8 @@ function credentialLabel(credential) {
|
|
|
87
87
|
return credential.source ?? "vault";
|
|
88
88
|
if (credential.status === "invalid-pool")
|
|
89
89
|
return "vault unavailable";
|
|
90
|
+
if (credential.status === "not-loaded")
|
|
91
|
+
return "checked previously";
|
|
90
92
|
return "missing";
|
|
91
93
|
}
|
|
92
94
|
function readinessLabel(readiness) {
|
|
@@ -102,7 +104,7 @@ function readinessLabel(readiness) {
|
|
|
102
104
|
return readiness.status;
|
|
103
105
|
}
|
|
104
106
|
function providerStatusDetail(lane) {
|
|
105
|
-
if (lane.credential.status
|
|
107
|
+
if (lane.credential.status === "missing" || lane.credential.status === "invalid-pool")
|
|
106
108
|
return undefined;
|
|
107
109
|
return lane.readiness.error;
|
|
108
110
|
}
|