@odla-ai/cli 0.27.10 → 0.27.11
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/bin.cjs +14 -5
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-OGZELVS5.js → chunk-Y7WFLSTN.js} +15 -6
- package/dist/chunk-Y7WFLSTN.js.map +1 -0
- package/dist/index.cjs +14 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-OGZELVS5.js.map +0 -1
package/dist/bin.cjs
CHANGED
|
@@ -2697,7 +2697,7 @@ async function calendarCalendars(options) {
|
|
|
2697
2697
|
return calendars;
|
|
2698
2698
|
}
|
|
2699
2699
|
async function calendarConnect(options) {
|
|
2700
|
-
const { cfg, ctx, out } = await lifecycleContext(options);
|
|
2700
|
+
const { cfg, ctx, out } = await lifecycleContext(options, ["app.manage"]);
|
|
2701
2701
|
productionConsent(ctx.env, options.yes, "connect calendar");
|
|
2702
2702
|
const page2 = calendarBookingPageUrl(cfg, ctx.env);
|
|
2703
2703
|
const applied = page2 === void 0 ? await readCalendarStatus(ctx) : await applyCalendarSettings(ctx, page2);
|
|
@@ -2723,7 +2723,7 @@ async function ensureCalendarConnected(ctx, options) {
|
|
|
2723
2723
|
const connectOptions = connectionOptions(options, out);
|
|
2724
2724
|
return await continueConnectedCalendar(ctx, current, connectOptions) ?? connectWithContext(ctx, connectOptions);
|
|
2725
2725
|
}
|
|
2726
|
-
async function lifecycleContext(options) {
|
|
2726
|
+
async function lifecycleContext(options, optionalProjectCapabilities = []) {
|
|
2727
2727
|
const cfg = await loadProjectConfig(options.configPath);
|
|
2728
2728
|
if (!cfg.services.includes("calendar")) throw new Error("calendar service is not enabled in config services");
|
|
2729
2729
|
const env = options.env ?? (cfg.envs.includes("dev") ? "dev" : cfg.envs[0]);
|
|
@@ -2741,7 +2741,8 @@ async function lifecycleContext(options) {
|
|
|
2741
2741
|
openApprovalUrl: options.openConsentUrl
|
|
2742
2742
|
},
|
|
2743
2743
|
doFetch,
|
|
2744
|
-
out
|
|
2744
|
+
out,
|
|
2745
|
+
{ optionalProjectCapabilities }
|
|
2745
2746
|
);
|
|
2746
2747
|
return { cfg, ctx: { platform: cfg.platformUrl, appId: cfg.app.id, env, token, fetch: doFetch }, out };
|
|
2747
2748
|
}
|
|
@@ -3117,11 +3118,17 @@ async function assertTenantAdminAccess(doFetch, cfg, env, token) {
|
|
|
3117
3118
|
if (res.ok || res.status === 404) return;
|
|
3118
3119
|
if (res.status === 403) {
|
|
3119
3120
|
const detail = await safeText4(res);
|
|
3120
|
-
|
|
3121
|
+
const code = errorCode(detail);
|
|
3122
|
+
if (code === "human_session_required") {
|
|
3121
3123
|
throw new Error(
|
|
3122
3124
|
`${env}: odla-db rejected the provision credential before checking ownership for "${cfg.app.id}" (tenant ${tenantId}): human_session_required. Retrying or changing app owners will not help; the deployed odla-db must accept owner-approved app.manage credentials on provisioning routes`
|
|
3123
3125
|
);
|
|
3124
3126
|
}
|
|
3127
|
+
if (code === "provision_approval_required") {
|
|
3128
|
+
throw new Error(
|
|
3129
|
+
`${env}: the agent credential does not carry the owner-reviewed app.manage grant required to provision "${cfg.app.id}" (tenant ${tenantId}). The human owner id on the token is accountability, not agent authority. Discard the cached or supplied token and run this command with the current CLI to approve one fresh exact-project provisioning handshake`
|
|
3130
|
+
);
|
|
3131
|
+
}
|
|
3125
3132
|
throw new Error(
|
|
3126
3133
|
`${env}: this credential lacks live app.manage authority for "${cfg.app.id}" (tenant ${tenantId}) \u2014 nothing was minted or written; re-run provision with a fresh owner-approved provision handshake. If the human account is not an owner, an existing owner must add it in signed-in Studio; an agent token cannot repair ownership`
|
|
3127
3134
|
);
|
|
@@ -4486,7 +4493,9 @@ async function secretsSet(options) {
|
|
|
4486
4493
|
throw new Error('"$"-prefixed vault names are platform-reserved; for the Clerk secret key use "odla-ai secrets set-clerk-key"');
|
|
4487
4494
|
}
|
|
4488
4495
|
const { cfg, tenantId, value: value2, doFetch, out } = await resolveVaultWrite(options);
|
|
4489
|
-
const token = await getDeveloperToken(cfg, options, doFetch, out
|
|
4496
|
+
const token = await getDeveloperToken(cfg, options, doFetch, out, {
|
|
4497
|
+
optionalProjectCapabilities: ["app.manage"]
|
|
4498
|
+
});
|
|
4490
4499
|
try {
|
|
4491
4500
|
await (0, import_ai2.putSecret)({ endpoint: cfg.dbEndpoint, token, fetch: doFetch }, tenantId, name, value2);
|
|
4492
4501
|
} catch (err) {
|