@odla-ai/cli 0.25.23 → 0.26.1
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 +32 -2
- package/dist/bin.cjs +485 -165
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-JJ42NV7X.js → chunk-ZAZBUURZ.js} +485 -165
- package/dist/chunk-ZAZBUURZ.js.map +1 -0
- package/dist/index.cjs +485 -165
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -12
- package/dist/index.d.ts +14 -12
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/skills/odla/references/sdks.md +5 -3
- package/skills/odla-migrate/references/phase-2b-calendar.md +13 -8
- package/dist/chunk-JJ42NV7X.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -4,7 +4,7 @@ import { HostedSecurityJob, GitHubConnectionStatus, GitHubSecuritySource, Hosted
|
|
|
4
4
|
export { GitHubConnectionAttempt, GitHubConnectionStatus, GitHubSecuritySource, HostedSecurityCounts, HostedSecurityCoverage, HostedSecurityIntent, HostedSecurityIntentResponse, HostedSecurityJob, HostedSecurityJobStatus, HostedSecurityPlan, HostedSecurityPlanRoute, HostedSecurityReport, HostedSecurityReportFinding, HostedSecurityRoute } from '@odla-ai/security/hosted';
|
|
5
5
|
|
|
6
6
|
/** One exact device-grant scope obtainable through the approval flow. */
|
|
7
|
-
type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "platform:status:read" | "app:config:read" | "app:config:write" | "app:code:host:connect" | "platform:code:host:connect" | "platform:security:self" | "platform:runbook:write";
|
|
7
|
+
type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "platform:status:read" | "platform:chat:credential:write" | "app:config:read" | "app:config:write" | "app:code:host:connect" | "platform:code:host:connect" | "platform:security:self" | "platform:runbook:write";
|
|
8
8
|
/** Inputs for obtaining one short-lived, exact-scope device grant. */
|
|
9
9
|
interface ScopedPlatformTokenOptions {
|
|
10
10
|
platform: string;
|
|
@@ -162,6 +162,17 @@ declare function codeConnect(options: CodeConnectOptions): Promise<void>;
|
|
|
162
162
|
/** Run outbound presence and fenced Pi commands without opening a listener. */
|
|
163
163
|
declare function runCodeRuntime(input: CodeRuntimeInput): Promise<void>;
|
|
164
164
|
|
|
165
|
+
interface RunResult {
|
|
166
|
+
code: number;
|
|
167
|
+
stdout: string;
|
|
168
|
+
stderr: string;
|
|
169
|
+
}
|
|
170
|
+
/** Subprocess seam: injectable in tests, `defaultRunner` in production. */
|
|
171
|
+
type CommandRunner = (cmd: string, args: string[], opts?: {
|
|
172
|
+
input?: string;
|
|
173
|
+
cwd?: string;
|
|
174
|
+
}) => Promise<RunResult>;
|
|
175
|
+
|
|
165
176
|
/** Map a CLI failure to its process exit code: 75 (EX_TEMPFAIL) marks work that
|
|
166
177
|
* has not failed but has not finished — a handshake still awaiting human
|
|
167
178
|
* approval (the pending state is persisted, so rerunning resumes it), or a
|
|
@@ -186,6 +197,8 @@ interface CliDependencies {
|
|
|
186
197
|
/** Runs git in the working directory; injected so `runbook impact` can be
|
|
187
198
|
* driven over a fixed diff instead of whatever the checkout happens to be. */
|
|
188
199
|
runGit?: (args: string[]) => string;
|
|
200
|
+
/** Runs Wrangler for one-purpose platform secret rotations. */
|
|
201
|
+
runner?: CommandRunner;
|
|
189
202
|
}
|
|
190
203
|
/**
|
|
191
204
|
* Parse CLI arguments and dispatch the matching odla command.
|
|
@@ -380,17 +393,6 @@ declare function calendarConnect(options: CalendarLifecycleOptions): Promise<Cal
|
|
|
380
393
|
* project grant is not revoked. */
|
|
381
394
|
declare function calendarDisconnect(options: CalendarLifecycleOptions): Promise<CalendarStatus>;
|
|
382
395
|
|
|
383
|
-
interface RunResult {
|
|
384
|
-
code: number;
|
|
385
|
-
stdout: string;
|
|
386
|
-
stderr: string;
|
|
387
|
-
}
|
|
388
|
-
/** Subprocess seam: injectable in tests, `defaultRunner` in production. */
|
|
389
|
-
type CommandRunner = (cmd: string, args: string[], opts?: {
|
|
390
|
-
input?: string;
|
|
391
|
-
cwd?: string;
|
|
392
|
-
}) => Promise<RunResult>;
|
|
393
|
-
|
|
394
396
|
type OdlaEnvName = string;
|
|
395
397
|
type AppRules = Record<string, {
|
|
396
398
|
view?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { HostedSecurityJob, GitHubConnectionStatus, GitHubSecuritySource, Hosted
|
|
|
4
4
|
export { GitHubConnectionAttempt, GitHubConnectionStatus, GitHubSecuritySource, HostedSecurityCounts, HostedSecurityCoverage, HostedSecurityIntent, HostedSecurityIntentResponse, HostedSecurityJob, HostedSecurityJobStatus, HostedSecurityPlan, HostedSecurityPlanRoute, HostedSecurityReport, HostedSecurityReportFinding, HostedSecurityRoute } from '@odla-ai/security/hosted';
|
|
5
5
|
|
|
6
6
|
/** One exact device-grant scope obtainable through the approval flow. */
|
|
7
|
-
type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "platform:status:read" | "app:config:read" | "app:config:write" | "app:code:host:connect" | "platform:code:host:connect" | "platform:security:self" | "platform:runbook:write";
|
|
7
|
+
type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "platform:status:read" | "platform:chat:credential:write" | "app:config:read" | "app:config:write" | "app:code:host:connect" | "platform:code:host:connect" | "platform:security:self" | "platform:runbook:write";
|
|
8
8
|
/** Inputs for obtaining one short-lived, exact-scope device grant. */
|
|
9
9
|
interface ScopedPlatformTokenOptions {
|
|
10
10
|
platform: string;
|
|
@@ -162,6 +162,17 @@ declare function codeConnect(options: CodeConnectOptions): Promise<void>;
|
|
|
162
162
|
/** Run outbound presence and fenced Pi commands without opening a listener. */
|
|
163
163
|
declare function runCodeRuntime(input: CodeRuntimeInput): Promise<void>;
|
|
164
164
|
|
|
165
|
+
interface RunResult {
|
|
166
|
+
code: number;
|
|
167
|
+
stdout: string;
|
|
168
|
+
stderr: string;
|
|
169
|
+
}
|
|
170
|
+
/** Subprocess seam: injectable in tests, `defaultRunner` in production. */
|
|
171
|
+
type CommandRunner = (cmd: string, args: string[], opts?: {
|
|
172
|
+
input?: string;
|
|
173
|
+
cwd?: string;
|
|
174
|
+
}) => Promise<RunResult>;
|
|
175
|
+
|
|
165
176
|
/** Map a CLI failure to its process exit code: 75 (EX_TEMPFAIL) marks work that
|
|
166
177
|
* has not failed but has not finished — a handshake still awaiting human
|
|
167
178
|
* approval (the pending state is persisted, so rerunning resumes it), or a
|
|
@@ -186,6 +197,8 @@ interface CliDependencies {
|
|
|
186
197
|
/** Runs git in the working directory; injected so `runbook impact` can be
|
|
187
198
|
* driven over a fixed diff instead of whatever the checkout happens to be. */
|
|
188
199
|
runGit?: (args: string[]) => string;
|
|
200
|
+
/** Runs Wrangler for one-purpose platform secret rotations. */
|
|
201
|
+
runner?: CommandRunner;
|
|
189
202
|
}
|
|
190
203
|
/**
|
|
191
204
|
* Parse CLI arguments and dispatch the matching odla command.
|
|
@@ -380,17 +393,6 @@ declare function calendarConnect(options: CalendarLifecycleOptions): Promise<Cal
|
|
|
380
393
|
* project grant is not revoked. */
|
|
381
394
|
declare function calendarDisconnect(options: CalendarLifecycleOptions): Promise<CalendarStatus>;
|
|
382
395
|
|
|
383
|
-
interface RunResult {
|
|
384
|
-
code: number;
|
|
385
|
-
stdout: string;
|
|
386
|
-
stderr: string;
|
|
387
|
-
}
|
|
388
|
-
/** Subprocess seam: injectable in tests, `defaultRunner` in production. */
|
|
389
|
-
type CommandRunner = (cmd: string, args: string[], opts?: {
|
|
390
|
-
input?: string;
|
|
391
|
-
cwd?: string;
|
|
392
|
-
}) => Promise<RunResult>;
|
|
393
|
-
|
|
394
396
|
type OdlaEnvName = string;
|
|
395
397
|
type AppRules = Record<string, {
|
|
396
398
|
view?: string;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odla-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"description": "Agent-operable CLI for odla provisioning, calendar consent and sync lifecycle, System AI administration, Worker secrets, security jobs, and smoke checks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://odla.ai/docs/packages/cli",
|
|
@@ -40,8 +40,8 @@ block (`availabilityCalendars` per env, optional `bookingCalendar`). Normal
|
|
|
40
40
|
provision opens a second, state-bound Google checkpoint issued by the
|
|
41
41
|
platform; the human grants the booking scopes in a browser. Google tokens
|
|
42
42
|
stay platform-side and never become app/CLI secrets. Google Calendar is the
|
|
43
|
-
single source of truth — odla stores no
|
|
44
|
-
nothing syncs.
|
|
43
|
+
single source of truth — odla stores no event mirror, bounded exact-lifetime
|
|
44
|
+
mutation receipts are purged with the app, and nothing syncs.
|
|
45
45
|
|
|
46
46
|
```ts
|
|
47
47
|
// Trusted Worker only — the admin key must never enter browser code.
|
|
@@ -61,7 +61,9 @@ const { booking } = await cal.actions.create(
|
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
Store the returned `eventId`/`meetUrl` on the app's own record;
|
|
64
|
-
`actions.reschedule(eventId, …)` and
|
|
64
|
+
`actions.reschedule(eventId, { idempotencyKey, … })` and
|
|
65
|
+
`actions.cancel(eventId, { idempotencyKey })` use it. Derive each key from the
|
|
66
|
+
record and exact intended action; reuse it only for an exact retry. A
|
|
65
67
|
taken slot rejects with non-retryable `calendar_slot_unavailable` — refetch
|
|
66
68
|
slots, don't retry. Browser code never calls `initCalendar` or the platform
|
|
67
69
|
calendar routes; it hits the app's own endpoints and may import pure helpers
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Use this phase when the site should offer real scheduling: visitors pick a
|
|
4
4
|
bookable slot and the app creates a live Google Calendar event — with a Meet
|
|
5
5
|
link and an invitation email that Google itself sends. Google Calendar is the
|
|
6
|
-
single source of truth; odla stores no calendar
|
|
6
|
+
single source of truth; odla stores no calendar mirror. Bounded exact-lifetime
|
|
7
|
+
mutation receipts make retries safe and are removed on app purge. There is no
|
|
7
8
|
sync, no mirror, and no `$bookings` namespace.
|
|
8
9
|
|
|
9
10
|
Human obligations: complete the server-issued Google consent page in a
|
|
@@ -95,14 +96,17 @@ this app's own Worker endpoints and may import pure helpers from
|
|
|
95
96
|
```
|
|
96
97
|
|
|
97
98
|
Store the returned `booking.eventId` and `booking.meetUrl` on the app's
|
|
98
|
-
own record (its odla-db row) — that
|
|
99
|
-
|
|
99
|
+
own record (its odla-db row) — that is the app's product record. Attendee
|
|
100
|
+
source data lives in Google; the platform may retain the bounded create
|
|
101
|
+
response in the exact app lifetime for replay. On `calendar_slot_unavailable` (409,
|
|
100
102
|
non-retryable) return a "slot taken" response; the client refetches
|
|
101
103
|
`/api/booking/slots` and re-picks. On retryable
|
|
102
104
|
`calendar_booking_in_progress`, retry once after a short delay.
|
|
103
|
-
6. Reschedule/cancel go through the stored id
|
|
104
|
-
`cal.actions.reschedule(eventId, {
|
|
105
|
-
|
|
105
|
+
6. Reschedule/cancel go through the stored id and require stable exact-action
|
|
106
|
+
keys: `cal.actions.reschedule(eventId, { idempotencyKey:
|
|
107
|
+
\`booking:${applicationId}:move:${startAt}:${endAt}\`, startAt, endAt })`
|
|
108
|
+
and `cal.actions.cancel(eventId, { idempotencyKey:
|
|
109
|
+
\`booking:${applicationId}:cancel\` })` — expose them as app endpoints
|
|
106
110
|
gated to the record's owner. Attendees can also act through Google's own
|
|
107
111
|
invitation flows; treat Google as authoritative.
|
|
108
112
|
7. Frontend. Two supported shapes:
|
|
@@ -125,7 +129,8 @@ UI creates the event on the booking calendar with a Meet link; the Google
|
|
|
125
129
|
invitation email arrives in the test attendee's inbox; a repeat POST with the
|
|
126
130
|
same idempotency key returns `duplicate: true` (no second event); a taken
|
|
127
131
|
slot returns 409 and the UI refetches slots; reschedule and cancel work via
|
|
128
|
-
the stored `eventId`;
|
|
129
|
-
app
|
|
132
|
+
the stored `eventId`; no event mirror exists and retry receipts are purged
|
|
133
|
+
with the app; attendee source data remains in Google and the app stores only
|
|
134
|
+
its own product record; no Google credential exists in local files; and
|
|
130
135
|
PM records the booking-flow decision and the active task comment links this
|
|
131
136
|
evidence.
|