@oddington/cli 0.1.37 → 0.1.39
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 +34 -99
- package/dist/os.js +189 -167
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,80 +45,31 @@ From anywhere inside the app’s Git worktree, run:
|
|
|
45
45
|
os app launch <name>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Launch reads exactly `apps/<name>/app.json`,
|
|
49
|
-
|
|
48
|
+
Launch reads exactly `apps/<name>/app.json`, resolves one member workspace from
|
|
49
|
+
the worktree's stable source identity, runs the colocated package’s fixed `npm run build`, and
|
|
50
50
|
opens its confined public interface in your ordinary browser. Prepare the app’s
|
|
51
51
|
documented dependencies separately; launch never installs them. Git, npm and
|
|
52
52
|
the required Node version must be available. Missing declarations, dependencies,
|
|
53
53
|
build output or membership stop launch with setup guidance.
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
`steps`; `result` is optional. A mapping containing only `routine` is invalid.
|
|
57
|
-
For example:
|
|
55
|
+
The declaration contains only stable app scope. For example:
|
|
58
56
|
|
|
59
57
|
```json
|
|
60
58
|
{
|
|
61
59
|
"name": "accounting",
|
|
62
|
-
"workspace": "sample",
|
|
63
|
-
"interface": { "root": "dist/interface" },
|
|
64
60
|
"repositories": ["general"],
|
|
65
|
-
"routines":
|
|
66
|
-
"reconcile": {
|
|
67
|
-
"routine": "reconcile-records",
|
|
68
|
-
"input": {
|
|
69
|
-
"type": "object",
|
|
70
|
-
"properties": {
|
|
71
|
-
"includeArchived": { "type": "boolean" },
|
|
72
|
-
"limit": { "type": "integer", "minimum": 1, "maximum": 100 }
|
|
73
|
-
},
|
|
74
|
-
"additionalProperties": false
|
|
75
|
-
},
|
|
76
|
-
"result": {
|
|
77
|
-
"type": "object",
|
|
78
|
-
"properties": { "processed": { "type": "integer" } },
|
|
79
|
-
"required": ["processed"],
|
|
80
|
-
"additionalProperties": false
|
|
81
|
-
},
|
|
82
|
-
"steps": [
|
|
83
|
-
{ "id": "read" },
|
|
84
|
-
{
|
|
85
|
-
"id": "write",
|
|
86
|
-
"summary": {
|
|
87
|
-
"type": "object",
|
|
88
|
-
"properties": { "changed": { "type": "integer" } },
|
|
89
|
-
"required": ["changed"],
|
|
90
|
-
"additionalProperties": false
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
}
|
|
61
|
+
"routines": ["reconcile-records"]
|
|
96
62
|
}
|
|
97
63
|
```
|
|
98
64
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
and integers and their bounds must be safe integers. A `file` value is a complete
|
|
108
|
-
shared File descriptor, never a bare ID or operating-system path.
|
|
109
|
-
|
|
110
|
-
Schemas nest at most eight nodes deep, and an operation's input, result and step
|
|
111
|
-
summaries share a budget of 64 object properties. Encoded input and result each
|
|
112
|
-
fit within 16 KiB of UTF-8 JSON. Declare one to 64 ordered steps with unique
|
|
113
|
-
lowercase letter or number IDs separated by single hyphens. Each step has only
|
|
114
|
-
`id` and an optional `summary` schema. Omitting a summary or result schema permits
|
|
115
|
-
no corresponding value. Values are not coerced, schemas have no defaults, and
|
|
116
|
-
an optional property stays absent rather than accepting `null`.
|
|
117
|
-
|
|
118
|
-
Declare a closed empty object for input with no properties; an app without
|
|
119
|
-
routine operations may use `"routines": {}`. Unsupported schema or process-control
|
|
120
|
-
fields stop launch before build or hosting. Validation grants no routine or File
|
|
121
|
-
authority, and opening the interface does not require local routine code.
|
|
65
|
+
Definitions are discovered by exported ID in confined `routines/*/routine.ts`,
|
|
66
|
+
independently of directory names. `os app build <name>` and launch use the same
|
|
67
|
+
preparation, generate the ignored `.os/app.d.ts` and `app-descriptor.json` pair,
|
|
68
|
+
then build fixed `dist/index.html`. Types infer input/defaults, result and step
|
|
69
|
+
detail from the definition. Browser assets embed only the safe structural
|
|
70
|
+
descriptor, never access declarations, source imports or live availability.
|
|
71
|
+
Unsupported input or invalid generation fails preparation without exposing a
|
|
72
|
+
partial pair. An app without routine operations uses `"routines": []`.
|
|
122
73
|
|
|
123
74
|
The command prints the clean assigned IPv4 loopback URL and owns the host until
|
|
124
75
|
Ctrl-C or termination. No root, workspace, command or port override is accepted;
|
|
@@ -140,44 +91,28 @@ The SDK retries renewal independently of Data reads. Confirmed renewal denial an
|
|
|
140
91
|
shutdown end it immediately. An opener
|
|
141
92
|
failure stops the host without printing a bootstrap secret.
|
|
142
93
|
|
|
143
|
-
Launch supplies authenticated context and unchanged interface assets.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
Supplied File inputs reject execution unavailable before capability issuance;
|
|
166
|
-
File-use transfer and a local browser Files adapter remain unsupported. Local
|
|
167
|
-
Data uses the exact published index; warm reads make no synchronous hosted or
|
|
168
|
-
CLI-store calls and neither initiate nor await browser-session renewal.
|
|
169
|
-
|
|
170
|
-
The host owns children across refresh and tab closure. Exact-origin browser
|
|
171
|
-
state permits `recover()` without a run selector while the host/session remains
|
|
172
|
-
authorized. Successful credential rotation preserves admitted Data and routine
|
|
173
|
-
work and the same bounded run ownership. Other tabs confirm and adopt the stored
|
|
174
|
-
winner silently; an old credential cannot start new requests or erase that
|
|
175
|
-
winner. `events()` reconnects in order; `cancel()` resolves after child
|
|
176
|
-
termination and capability revocation. Host stop, local sign-out, expiry or
|
|
177
|
-
authority loss ends active execution. At most four runs occupy authorization,
|
|
178
|
-
execution or cleanup slots; event retention is bounded to 256 events / 1 MiB
|
|
179
|
-
per run, with ten minutes of terminal grace and at most 16 terminal streams.
|
|
180
|
-
Cancellation or later failure does not undo confirmed shared effects.
|
|
94
|
+
Launch supplies authenticated context and unchanged interface assets.
|
|
95
|
+
`app.listRoutines()` preserves declaration order, including unavailable entries.
|
|
96
|
+
`app.routines[id].describe()` combines structural metadata with current readiness
|
|
97
|
+
and read-only connection availability; starts recheck current source and complete
|
|
98
|
+
authority. Defaulted `run()` and authorized OS File descriptors use the same
|
|
99
|
+
local runner as CLI. There is no app-specific child lifecycle.
|
|
100
|
+
|
|
101
|
+
Run handles expose `current()`, connected `watch()`, retained `step(id)` and
|
|
102
|
+
explicit `publish()`. Successful local execution reports `not_needed`, `ready`,
|
|
103
|
+
`published` or publication `failed`; it never publishes automatically. Publication
|
|
104
|
+
uses the existing guarded publisher and preserves confirmed receipts. Routine
|
|
105
|
+
`runs.list()` returns at most 20 recent summaries; `runs.get(id)` opens retained
|
|
106
|
+
facts under newly checked authority. Older Runs are not pruned. History and step
|
|
107
|
+
detail survive refresh; interrupted execution has no restart recovery.
|
|
108
|
+
|
|
109
|
+
The host owns live work across refresh and tab closure. Credential renewal
|
|
110
|
+
preserves the logical session; replaced contexts invalidate old handles. Host
|
|
111
|
+
stop, sign-out, expiry or authority loss ends active work. At most four starts
|
|
112
|
+
occupy authorization/execution/cleanup slots. No browser command, path, workspace,
|
|
113
|
+
connection setting, replay cursor or cancellation API is exposed. Local Data
|
|
114
|
+
continues to use its exact published index. Browser File creation remains a
|
|
115
|
+
separate unsupported local adapter; existing authorized Files may be Run input.
|
|
181
116
|
|
|
182
117
|
## Connections
|
|
183
118
|
|