@odla-ai/cli 0.25.23 → 0.26.2

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/index.d.cts CHANGED
@@ -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
@@ -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
@@ -57,7 +57,7 @@ import {
57
57
  startHostedSecurityJob,
58
58
  surfacePaths,
59
59
  validateInvocation
60
- } from "./chunk-JJ42NV7X.js";
60
+ } from "./chunk-MBZXWPZP.js";
61
61
  export {
62
62
  AGENT_HARNESSES,
63
63
  CAPABILITIES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odla-ai/cli",
3
- "version": "0.25.23",
3
+ "version": "0.26.2",
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 calendar or attendee data, and
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 `actions.cancel(eventId)` use it. A
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 or attendee data. There is no
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 record is the app's only persistence;
99
- attendee data lives in Google. On `calendar_slot_unavailable` (409,
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, { startAt, endAt })` and
105
- `cal.actions.cancel(eventId)` (idempotent) expose them as app endpoints
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`; zero attendee data is persisted anywhere except the
129
- app's own tenant record; no Google credential exists in local files; and
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.