@oddington/cli 0.1.40 → 0.1.41

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.
Files changed (3) hide show
  1. package/README.md +34 -32
  2. package/dist/os.js +172 -176
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -323,22 +323,28 @@ and other CLI output never reveal saved credentials.
323
323
  `ODDINGTON_CONNECTION_CREDENTIAL`. Only run trusted code, and do not print or
324
324
  retain that value.
325
325
 
326
- ## Deploy and roll back routines
326
+ ## Deploy routines
327
327
 
328
- From the installed routine's customer Git worktree, a signed-in workspace
329
- member can run:
328
+ From the customer Git worktree, a signed-in workspace member can run:
330
329
 
331
330
  ```sh
332
331
  os routine deploy invoice-import
333
- os routine rollback invoice-import
332
+ os routine deploy invoice-import --yes --json
334
333
  ```
335
334
 
336
- Deploy reads `routines/invoice-import/routine.json` and packages the exact
337
- eligible current source, including eligible uncommitted changes, plus frozen
338
- dependencies. The declaration must match every installed access grant. OS
339
- builds and checks definitions, then activates only a compatible ready version;
340
- a failure preserves the current active version. Deployment never invokes
341
- business code or creates installation authority.
335
+ Deploy selects the `defineRoutine` export with that canonical ID from conventional
336
+ `routines/<directory>/routine.ts` files. It packages the complete definition,
337
+ including ordered steps and every declared response handler, reachable source and
338
+ frozen dependencies. The directory can have a different name. No `routine.json`,
339
+ installation or enablement is required. Requested access is a maximum intersected
340
+ with configured workspace capabilities. Source identity and signed-in membership
341
+ select the workspace; callers cannot override authority.
342
+
343
+ Before upload, the command shows the routine ID, requested access, named
344
+ connections and stable handler IDs. Declining writes nothing. Noninteractive
345
+ use requires `--yes`; it supplies consent and leaves every validation intact.
346
+ Build/startup failure preserves the previous current deployment. Deploying never
347
+ executes business code or publishes an Ask.
342
348
 
343
349
  Modern layout uses one Bun workspace and lock under `routines/`, shared authoring
344
350
  tools at its root, and a private ESM manifest per selected routine. For example,
@@ -357,13 +363,12 @@ imports; customer scripts, build hooks, aliases and SDK replacement are refused.
357
363
  See [frozen source admission](src/routine-deployment-source.md) for the bounded
358
364
  import and dependency contract.
359
365
 
360
- The command reports phases, bounded diagnostics, the opaque version, source
361
- summary, runtime profile/features and capability names. Closing the CLI stops
362
- inspection while accepted OS work continues. Repeat the identical command to
363
- resume its deployment; source uploads and accepted seals recover lost replies.
364
- Rollback selects the preceding compatible retained version on OS without a
365
- rebuild. Both commands accept only the routine name and `--json` output option;
366
- they accept no commit, module, image, command, credential or version selector.
366
+ The command reports bounded deployment facts and safe failures. JSON stdout is
367
+ one outcome; review and progress use stderr. Closing the CLI stops inspection
368
+ while accepted OS work continues. A later successful deploy replaces the single
369
+ current unit for new remote Runs and newly accepted responses. V0 exposes no
370
+ rollback or historical code selection. The command accepts no commit, module,
371
+ image, command, credential or workspace selector.
367
372
  JSON returns product facts without progress prose and uses the same exit status
368
373
  as human output.
369
374
 
@@ -429,31 +434,28 @@ os routine run invoice-import --input input.json
429
434
  os routine run invoice-import --input - --json
430
435
  ```
431
436
 
432
- OS matches the current Git worktree to exactly one authenticated installed
433
- workspace/routine and resolves `routines/invoice-import/run.ts`. The entry exports
434
- an inert `defineRoutine` definition from `@oddington/sdk`. No handler deployment
435
- is required unless an authored item declares executable handlers. JSON input
436
- is validated before business work; its file/stdin path is transport, not input.
437
- Omitted input is `{}`. Each JSON value is bounded to 256 KiB.
437
+ OS resolves the worktree's stable source identity and the canonical `defineRoutine`
438
+ export in `routine.ts`. JSON input is validated before business work; its file/stdin
439
+ path is transport, not business input. Omitted input uses the definition's default,
440
+ when supplied. Each JSON value is bounded to 256 KiB. Local publication never
441
+ deploys the routine or its handlers.
438
442
 
439
443
  To execute the active deployed version on OS, use:
440
444
 
441
445
  ```sh
442
446
  os routine run invoice-import --remote --input input.json
443
447
  os routine run invoice-import --remote --input - --json
444
- os routine cancel <run> --json
445
448
  ```
446
449
 
447
450
  Remote start reads only worktree identity and business input. It neither uploads
448
451
  local source nor creates a local captured change set. It reports the accepted
449
- Run's `id`, `state` and inspection URL, then returns; disconnecting does not cancel
450
- the Run. OS-owned changes apply during execution and need no publish command.
451
- Uncertain acknowledgements retry the same start key and input. If recovery is
452
- still unavailable, output retains `startKey` and warns that OS may have accepted
453
- the action; repeating the command deliberately requests another Run. Cancellation
454
- resolves the Run through current workspace membership, works outside a checkout,
455
- and reports the recorded state while OS stops execution. Neither command accepts
456
- workspace, version, command, environment or authority overrides.
452
+ Run's ID, ordered steps, safe summaries and terminal result or failure through the
453
+ shared Run handle. Remote Runs omit local publication; their authorized OS changes
454
+ apply during execution. Input/defaults and access come from the deployed definition,
455
+ and later activation cannot change a started invocation's code. Retained step
456
+ detail, results and newest-first recent history use the same SDK handle contracts.
457
+ The command executes once and accepts no workspace, version, command, environment
458
+ or authority override.
457
459
 
458
460
  Before local execution, the command names installed connections and explains that
459
461
  local filesystem changes, model calls and provider effects happen immediately.