@oddington/cli 0.1.52 → 0.1.53
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 +114 -24
- package/dist/os.js +232 -183
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -22,28 +22,41 @@ Run `os --help` or add `--help` to any command for the full command list.
|
|
|
22
22
|
Commands print readable output by default. Add `--json` when another program
|
|
23
23
|
will consume the result.
|
|
24
24
|
|
|
25
|
-
Dropbox setup uses an offline OAuth URL and hidden one-time code entry:
|
|
25
|
+
Dropbox connection setup uses an offline OAuth URL and hidden one-time code entry:
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
|
-
os connection create dropbox --workspace example --name
|
|
29
|
-
os connection create dropbox --workspace example --name business --access full-dropbox --root "/Business"
|
|
28
|
+
os connection create dropbox --workspace example --name business --root "/Business"
|
|
30
29
|
os connection list --workspace example --all
|
|
31
30
|
os connection inspect --workspace example --id <returned-id>
|
|
32
31
|
os connection test --workspace example --connection dropbox/business
|
|
33
32
|
```
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
A Dropbox connection lets routines work with an existing Dropbox folder. Its
|
|
35
|
+
root is the base path trusted routines must use, not provider-enforced token
|
|
36
|
+
containment. Setup and testing only read provider state; routine calls change
|
|
37
|
+
Dropbox immediately, independently of publication. Disconnect prevents new
|
|
38
|
+
delivery but does not revoke an already delivered token.
|
|
39
|
+
|
|
40
|
+
Dropbox storage backs the OS Files capability with a separate dedicated folder:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
os files storage connect dropbox --workspace example --name os-files
|
|
44
|
+
os files storage select --workspace example --connection dropbox/os-files
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Connecting authorizes storage; selecting it separately changes placement for new
|
|
48
|
+
remote Files. A routine connection cannot be selected as File storage, and
|
|
49
|
+
routines never receive storage credentials. OS uses separate company-owned OAuth
|
|
50
|
+
applications for these purposes. Members authorize their own accounts; they do
|
|
51
|
+
not register applications or handle OS app keys. Missing service setup names
|
|
52
|
+
either Dropbox connection authorization or Dropbox storage authorization.
|
|
53
|
+
|
|
54
|
+
The old `--access full-dropbox --root ...` connection flag remains a compatibility
|
|
55
|
+
alias. A connection command without `--root`, or with `--access app-folder`, now
|
|
56
|
+
points to the explicit Files storage command; it never silently changes purpose.
|
|
57
|
+
Older installed clients retain their explicit authorization semantics on the API.
|
|
58
|
+
Deployment operators must complete the credential-name cutover in
|
|
59
|
+
`server/dropbox-authorization-rollout.md` before deploying this server version.
|
|
47
60
|
|
|
48
61
|
Sign-in and session operations use `https://auth.oddington.ai`. Connection
|
|
49
62
|
management, repository targets, local app repository context, Dropbox authorization,
|
|
@@ -60,6 +73,40 @@ Data and shared Files go directly to their OS owners. Local publication validate
|
|
|
60
73
|
the whole captured set before applying Records, retaining Files and publishing
|
|
61
74
|
Asks/Digests; retry resumes the same retained identities and receipts.
|
|
62
75
|
|
|
76
|
+
## Repository schema types
|
|
77
|
+
|
|
78
|
+
Inside a TypeScript code repository with a GitHub origin and named branch, run:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
os data schema general
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Your ordinary CLI login resolves the worktree to one member workspace. `general`
|
|
85
|
+
is a Data repository alias there. The command reads only its published normalized
|
|
86
|
+
schema and writes the marked root `os-data.generated.d.ts`. It reports that path
|
|
87
|
+
and the TypeScript project files it integrates. Review and commit those files;
|
|
88
|
+
a fresh clone uses the types without signing in or regenerating them.
|
|
89
|
+
|
|
90
|
+
Keep importing `data` from `@oddington/sdk`. A known repository literal now gains
|
|
91
|
+
schema-aware `records.select`, `pages` and `all` queries and projected values.
|
|
92
|
+
No source import, app declaration, build or launch is needed. Other operations
|
|
93
|
+
and dynamic repository names retain their generic types. Types grant no access;
|
|
94
|
+
runtime Data validation and membership remain authoritative.
|
|
95
|
+
|
|
96
|
+
Run the same command explicitly after a published schema changes, then review
|
|
97
|
+
and commit its diff. Other aliases in the declaration are preserved. An unchanged
|
|
98
|
+
refresh leaves generated and project bytes untouched. App build/launch never
|
|
99
|
+
refreshes this file. The command does not retrieve Records or commit anything.
|
|
100
|
+
|
|
101
|
+
Project integration preserves JSONC comments and authored settings, including
|
|
102
|
+
confined local inheritance, source includes and project references. Unsupported
|
|
103
|
+
or ambiguous layouts (including package-based/external inheritance, symlinks,
|
|
104
|
+
nested Git repositories and incompatible referenced build projects) are refused
|
|
105
|
+
before writing. Access, parsing, transport or write failures preserve the prior
|
|
106
|
+
complete declaration and project configuration. Generation is serialized within
|
|
107
|
+
the worktree; after a process interruption, check that no generation is running
|
|
108
|
+
before removing a stale `.os-data-schema.lock` directory and refreshing again.
|
|
109
|
+
|
|
63
110
|
## Local apps
|
|
64
111
|
|
|
65
112
|
From anywhere inside the app’s Git worktree, run:
|
|
@@ -346,6 +393,22 @@ and other CLI output never reveal saved credentials.
|
|
|
346
393
|
`OS_CONNECTION_CREDENTIAL`. Only run trusted code, and do not print or
|
|
347
394
|
retain that value.
|
|
348
395
|
|
|
396
|
+
## Check routine requirements
|
|
397
|
+
|
|
398
|
+
```sh
|
|
399
|
+
os routine check invoice-import
|
|
400
|
+
os routine check invoice-import --json
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
Checks the frozen authored definition, local runtimes, configured workspace
|
|
404
|
+
capabilities and declared local Claude readiness. No business steps run, no
|
|
405
|
+
provider operations or model requests are made, and no Run, first-use routine
|
|
406
|
+
bookkeeping, Records, Files, Inbox items or publication intent are created.
|
|
407
|
+
OS login and readiness metadata still require normal host access. Failure
|
|
408
|
+
reports the same typed setup issues and recovery commands as pre-run checks;
|
|
409
|
+
JSON includes `status`, `stepsRan: false`, and any error/issues. A check does not
|
|
410
|
+
reserve access: running later checks current requirements again.
|
|
411
|
+
|
|
349
412
|
## Deploy routines
|
|
350
413
|
|
|
351
414
|
From the customer Git worktree, a signed-in workspace member can run:
|
|
@@ -447,10 +510,11 @@ const captured = await inbox.readRecords({
|
|
|
447
510
|
})
|
|
448
511
|
```
|
|
449
512
|
|
|
450
|
-
OS
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
513
|
+
OS intersects the routine's declared access with configured workspace
|
|
514
|
+
capabilities. A new routine runs locally from a customer branch without
|
|
515
|
+
registration, a merge to main, or deployment. The canonical ID is the `id` you
|
|
516
|
+
author in `defineRoutine`; use that same ID in the command. Named connections
|
|
517
|
+
must already be configured in the workspace; declaring a name does not create it:
|
|
454
518
|
|
|
455
519
|
```sh
|
|
456
520
|
os routine run invoice-import --input input.json
|
|
@@ -480,10 +544,10 @@ detail, results and newest-first recent history use the same SDK handle contract
|
|
|
480
544
|
The command executes once and accepts no workspace, version, command, environment
|
|
481
545
|
or authority override.
|
|
482
546
|
|
|
483
|
-
Before local execution, the command names
|
|
547
|
+
Before local execution, the command names declared connections and explains that
|
|
484
548
|
local filesystem changes, model calls and provider effects happen immediately.
|
|
485
549
|
Only Record, File, Ask and Digest changes stay local for review. The child
|
|
486
|
-
receives temporary
|
|
550
|
+
receives temporary scoped authority, which is revoked when execution ends.
|
|
487
551
|
Success reports concrete nonzero counts and the stable Run reference:
|
|
488
552
|
|
|
489
553
|
```sh
|
|
@@ -494,7 +558,7 @@ os routine publish <run> --json
|
|
|
494
558
|
|
|
495
559
|
Declared records appear in the matched checkout; exact files, captured receipts,
|
|
496
560
|
source/input and authored items stay in the private Run directory
|
|
497
|
-
|
|
561
|
+
`~/.os/<workspace>/runs/<run>`.
|
|
498
562
|
`execution.json` retains steps, optional result, redacted child output and known
|
|
499
563
|
effect evidence. `complete.json` seals successful intent. Inspect these files and
|
|
500
564
|
the bounded Git diff, then publish from the original root. Bare publish lists
|
|
@@ -508,7 +572,7 @@ Run evidence. Run output includes `runId`, `state`, `placement`, `changes`,
|
|
|
508
572
|
the same Run reference, change state, confirmed receipts, Files, items and links.
|
|
509
573
|
|
|
510
574
|
The SDK's `data.repository(name)` collection, selection and search calls also work in
|
|
511
|
-
this mode, using only
|
|
575
|
+
this mode, using only declared workspace repository access and the exact committed
|
|
512
576
|
checkout version captured for the run. Dirty and untracked files are ignored;
|
|
513
577
|
an OS cache outside the checkout reuses derived data without remote access.
|
|
514
578
|
Accepted record effects advance later selections and searches to their exact
|
|
@@ -522,7 +586,7 @@ provider connections retain their normal network and authority requirements;
|
|
|
522
586
|
local execution may contact OS or providers.
|
|
523
587
|
|
|
524
588
|
For modern local execution, install the workspace separately with Bun 1.3.14.
|
|
525
|
-
Keep `@oddington/sdk` exactly 0.1.
|
|
589
|
+
Keep `@oddington/sdk` exactly 0.1.29 in root `devDependencies`, compatible Node,
|
|
526
590
|
the selected private ESM manifest and the shared frozen lock. OS verifies only
|
|
527
591
|
the selected installed graph, stages its confined bytes and builds the same
|
|
528
592
|
executable unit used by deployment, preserving declared assets and SDK ownership.
|
|
@@ -531,6 +595,32 @@ packages report unavailable before business work. Local Python dependency
|
|
|
531
595
|
provisioning is unsupported. Launch never repairs the workspace or falls back
|
|
532
596
|
from a broken modern manifest to legacy execution.
|
|
533
597
|
|
|
598
|
+
Global npm Bun is supported: `npm install --global bun@1.3.14`. Add the global
|
|
599
|
+
executable directory to PATH. OS excludes executables owned by the customer
|
|
600
|
+
checkout, while accepting host installations whose paths contain `node_modules`.
|
|
601
|
+
|
|
602
|
+
Routine requirement failures name missing workspace resources and local AI
|
|
603
|
+
setup together before any business step starts. For example, a declared
|
|
604
|
+
`dropbox/documents` with no workspace connection is reported as a missing
|
|
605
|
+
connection, with the Dropbox connection setup command and a placeholder for your
|
|
606
|
+
existing folder. Inspect all configured connections with
|
|
607
|
+
`os connection list --workspace <slug> --all`.
|
|
608
|
+
|
|
609
|
+
Local AI supports signed-in Claude Code 2.1.259 and newer. An older unsupported
|
|
610
|
+
version explains the required feature and prints `claude update`; a missing
|
|
611
|
+
login prints `claude auth login`. Settings-policy failures point to `claude
|
|
612
|
+
doctor`. Readiness never sends documents or makes a model request.
|
|
613
|
+
|
|
614
|
+
Reuse ordinary customer source through relative imports from `routines/lib/`,
|
|
615
|
+
without a package manifest in `lib/`. Each consuming routine declares any
|
|
616
|
+
runtime packages that shared code imports. Importing another routine's package
|
|
617
|
+
is rejected because its dependency boundary differs; copying its steps is not
|
|
618
|
+
required.
|
|
619
|
+
|
|
620
|
+
Business steps can also be tested with ordinary fixture inputs in the customer
|
|
621
|
+
repository. A real local OS Run uses the configured workspace connections;
|
|
622
|
+
fixtures do not require registering or deploying the routine.
|
|
623
|
+
|
|
534
624
|
Routines without a selected package manifest retain the existing legacy path:
|
|
535
625
|
native Node TypeScript stripping, a module `routines/package.json`, a matching
|
|
536
626
|
`engines.node`, and an installed SDK. A workspace root alone does not cut over
|