@elaraai/e3-cloud-claude-plugin 0.0.0-stage → 1.0.90-alpha.0

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/index.json ADDED
@@ -0,0 +1,749 @@
1
+ {
2
+ "version": 2,
3
+ "stats": {
4
+ "totalEntries": 27,
5
+ "totalFiles": 1,
6
+ "packages": {
7
+ "e3-cloud-ui": 12,
8
+ "e3-cloud-cli": 11,
9
+ "e3-cloud-client": 4
10
+ }
11
+ },
12
+ "entries": [
13
+ {
14
+ "id": "e3-cloud-ui:pages.examples.tsx:pageReadsAndWritesAnInput",
15
+ "skill": "e3-cloud-ui",
16
+ "package": "e3-cloud-ui",
17
+ "file": "packages/e3-cloud-ui/test/pages.examples.tsx",
18
+ "suite": "Reading and writing data",
19
+ "test": "A page's body that reads an input and writes it back from a slider: what Page('overview', { title: 'Overview' }, () => …) takes",
20
+ "keywords": [
21
+ "Page",
22
+ "body",
23
+ "Data.bind",
24
+ "read",
25
+ "write",
26
+ "input",
27
+ "Slider",
28
+ "Stat",
29
+ "Reactive"
30
+ ],
31
+ "imports": [
32
+ "import { East, ArrayType, DictType, FloatType, NullType, StringType, StructType, example, variant } from '@elaraai/east';",
33
+ "import { Button, HStack, Reactive, Slider, Stat, Table, Text, UIComponentType, VStack } from '@elaraai/east-ui';",
34
+ "import { Data, Func, Record } from '@elaraai/e3-ui';",
35
+ "import e3, { type Runner } from '@elaraai/e3';",
36
+ "import { Nav, Page, PageLink } from '@elaraai/e3-cloud-ui';"
37
+ ],
38
+ "languages": [
39
+ "tsx"
40
+ ],
41
+ "source": "// A page's body that reads an input and writes it back from a slider: what Page('overview', { title: 'Overview' }, () => …) takes\n// inputs: []\n/** An input people set from a page. */\nconst target = e3.input('target', FloatType, variant('value', 100.0));\n\nEast.function([], UIComponentType, _$ => (\n <Reactive>{$ => {\n const t = $.let(Data.bind(target));\n return (\n <VStack gap=\"3\" align=\"stretch\">\n <Stat label=\"Target\" value={East.print(t.read())} />\n <Slider value={t.read()} min={0} max={200} onChangeEnd={t.write} />\n </VStack>\n );\n }}</Reactive>\n ))"
42
+ },
43
+ {
44
+ "id": "e3-cloud-ui:pages.examples.tsx:pageWithParams",
45
+ "skill": "e3-cloud-ui",
46
+ "package": "e3-cloud-ui",
47
+ "file": "packages/e3-cloud-ui/test/pages.examples.tsx",
48
+ "suite": "Params",
49
+ "test": "A page's body that takes params: its one argument, a struct for several. A link or Nav.go to the page gives them, and the page's URL carries them",
50
+ "keywords": [
51
+ "Page",
52
+ "params",
53
+ "argument",
54
+ "struct",
55
+ "PageDef",
56
+ "body"
57
+ ],
58
+ "imports": [
59
+ "import { East, ArrayType, DictType, FloatType, NullType, StringType, StructType, example, variant } from '@elaraai/east';",
60
+ "import { Button, HStack, Reactive, Slider, Stat, Table, Text, UIComponentType, VStack } from '@elaraai/east-ui';",
61
+ "import { Data, Func, Record } from '@elaraai/e3-ui';",
62
+ "import e3, { type Runner } from '@elaraai/e3';",
63
+ "import { Nav, Page, PageLink } from '@elaraai/e3-cloud-ui';"
64
+ ],
65
+ "languages": [
66
+ "tsx"
67
+ ],
68
+ "source": "// A page's body that takes params: its one argument, a struct for several. A link or Nav.go to the page gives them, and the page's URL carries them\n// inputs: [{ site: 'Northgate', line: 'L1' }]\nconst LineKey = StructType({ site: StringType, line: StringType });\n\nEast.function([LineKey], UIComponentType, (_$, key) => (\n <VStack gap=\"2\" align=\"stretch\">\n <Text>{East.str`Site ${key.site}`}</Text>\n <Text>{East.str`Line ${key.line}`}</Text>\n </VStack>\n ))"
69
+ },
70
+ {
71
+ "id": "e3-cloud-ui:pages.examples.tsx:pageLinksToAPageWithParams",
72
+ "skill": "e3-cloud-ui",
73
+ "package": "e3-cloud-ui",
74
+ "file": "packages/e3-cloud-ui/test/pages.examples.tsx",
75
+ "suite": "Between pages",
76
+ "test": "A link to another page of the app for each line, each carrying the line as the target page's params. A page that takes no params is linked without them: <PageLink to={overview}>",
77
+ "keywords": [
78
+ "PageLink",
79
+ "link",
80
+ "to",
81
+ "params",
82
+ "Page",
83
+ "navigation",
84
+ "list"
85
+ ],
86
+ "imports": [
87
+ "import { East, ArrayType, DictType, FloatType, NullType, StringType, StructType, example, variant } from '@elaraai/east';",
88
+ "import { Button, HStack, Reactive, Slider, Stat, Table, Text, UIComponentType, VStack } from '@elaraai/east-ui';",
89
+ "import { Data, Func, Record } from '@elaraai/e3-ui';",
90
+ "import e3, { type Runner } from '@elaraai/e3';",
91
+ "import { Nav, Page, PageLink } from '@elaraai/e3-cloud-ui';"
92
+ ],
93
+ "languages": [
94
+ "tsx"
95
+ ],
96
+ "source": "// A link to another page of the app for each line, each carrying the line as the target page's params. A page that takes no params is linked without them: <PageLink to={overview}>\n// inputs: []\nconst LineKey = StructType({ site: StringType, line: StringType });\n\n/** The production lines, each a site and a line. */\nconst lines = e3.input('lines', ArrayType(LineKey), variant('value', []));\n\n/** A page that takes params: one line's, a struct. */\nconst linePage = Page('line', { title: 'Line', icon: 'gears' },\n () => East.function([LineKey], UIComponentType, (_$, key) => (\n <Text>{East.str`${key.site} · ${key.line}`}</Text>\n )));\n\nEast.function([], UIComponentType, _$ => (\n <Reactive>{$ => {\n const ls = $.let(Data.bind(lines));\n return (\n <VStack gap=\"2\" align=\"flex-start\">\n {ls.read().map(($, key) => (\n <PageLink to={linePage} params={key}>{East.str`${key.site} · ${key.line}`}</PageLink>\n ))}\n </VStack>\n );\n }}</Reactive>\n ))"
97
+ },
98
+ {
99
+ "id": "e3-cloud-ui:pages.examples.tsx:pageGoesToAPageOnRowClick",
100
+ "skill": "e3-cloud-ui",
101
+ "package": "e3-cloud-ui",
102
+ "file": "packages/e3-cloud-ui/test/pages.examples.tsx",
103
+ "suite": "Between pages",
104
+ "test": "Going to another page from an event: Nav.go(page, params) when a table's row is clicked, the row's line as the target's params",
105
+ "keywords": [
106
+ "Nav.go",
107
+ "Nav",
108
+ "navigate",
109
+ "Table",
110
+ "onRowClick",
111
+ "params",
112
+ "Page"
113
+ ],
114
+ "imports": [
115
+ "import { East, ArrayType, DictType, FloatType, NullType, StringType, StructType, example, variant } from '@elaraai/east';",
116
+ "import { Button, HStack, Reactive, Slider, Stat, Table, Text, UIComponentType, VStack } from '@elaraai/east-ui';",
117
+ "import { Data, Func, Record } from '@elaraai/e3-ui';",
118
+ "import e3, { type Runner } from '@elaraai/e3';",
119
+ "import { Nav, Page, PageLink } from '@elaraai/e3-cloud-ui';"
120
+ ],
121
+ "languages": [
122
+ "tsx"
123
+ ],
124
+ "source": "// Going to another page from an event: Nav.go(page, params) when a table's row is clicked, the row's line as the target's params\n// inputs: []\nconst LineKey = StructType({ site: StringType, line: StringType });\n\n/** The production lines, each a site and a line. */\nconst lines = e3.input('lines', ArrayType(LineKey), variant('value', []));\n\n/** A page that takes params: one line's, a struct. */\nconst linePage = Page('line', { title: 'Line', icon: 'gears' },\n () => East.function([LineKey], UIComponentType, (_$, key) => (\n <Text>{East.str`${key.site} · ${key.line}`}</Text>\n )));\n\nEast.function([], UIComponentType, _$ => (\n <Reactive>{$ => {\n const rows = $.let(Data.bind(lines).read());\n // Bound once, so a render passes the same handler\n const open = $.const(East.function([Table.Types.RowClickEvent], NullType, ($, e) => {\n const r = $.let(rows.get(e.rowIndex));\n $(Nav.go(linePage, { site: r.site, line: r.line }));\n }));\n return <Table data={rows} columns={['site', 'line']} onRowClick={open} />;\n }}</Reactive>\n ))"
125
+ },
126
+ {
127
+ "id": "e3-cloud-ui:pages.examples.tsx:pageGoesBack",
128
+ "skill": "e3-cloud-ui",
129
+ "package": "e3-cloud-ui",
130
+ "file": "packages/e3-cloud-ui/test/pages.examples.tsx",
131
+ "suite": "Between pages",
132
+ "test": "Going back, as the browser's Back does: Nav.back() from a button",
133
+ "keywords": [
134
+ "Nav.back",
135
+ "Nav",
136
+ "back",
137
+ "Button",
138
+ "history"
139
+ ],
140
+ "imports": [
141
+ "import { East, ArrayType, DictType, FloatType, NullType, StringType, StructType, example, variant } from '@elaraai/east';",
142
+ "import { Button, HStack, Reactive, Slider, Stat, Table, Text, UIComponentType, VStack } from '@elaraai/east-ui';",
143
+ "import { Data, Func, Record } from '@elaraai/e3-ui';",
144
+ "import e3, { type Runner } from '@elaraai/e3';",
145
+ "import { Nav, Page, PageLink } from '@elaraai/e3-cloud-ui';"
146
+ ],
147
+ "languages": [
148
+ "tsx"
149
+ ],
150
+ "source": "// Going back, as the browser's Back does: Nav.back() from a button\n// inputs: [{ site: 'Northgate', line: 'L1' }]\nconst LineKey = StructType({ site: StringType, line: StringType });\n\nEast.function([LineKey], UIComponentType, (_$, key) => (\n <HStack gap=\"2\">\n <Text>{East.str`${key.site} · ${key.line}`}</Text>\n <Button variant=\"ghost\" onClick={East.function([], NullType, $ => { $(Nav.back()); })}>Back</Button>\n </HStack>\n ))"
151
+ },
152
+ {
153
+ "id": "e3-cloud-ui:pages.examples.tsx:pageCallsAFunction",
154
+ "skill": "e3-cloud-ui",
155
+ "package": "e3-cloud-ui",
156
+ "file": "packages/e3-cloud-ui/test/pages.examples.tsx",
157
+ "suite": "Functions and records",
158
+ "test": "Calling a function of the package from a page: Func.bind(adjust), its call on a click and its pending state while the call runs",
159
+ "keywords": [
160
+ "Func.bind",
161
+ "call",
162
+ "function",
163
+ "e3.function",
164
+ "pending",
165
+ "Button"
166
+ ],
167
+ "imports": [
168
+ "import { East, ArrayType, DictType, FloatType, NullType, StringType, StructType, example, variant } from '@elaraai/east';",
169
+ "import { Button, HStack, Reactive, Slider, Stat, Table, Text, UIComponentType, VStack } from '@elaraai/east-ui';",
170
+ "import { Data, Func, Record } from '@elaraai/e3-ui';",
171
+ "import e3, { type Runner } from '@elaraai/e3';",
172
+ "import { Nav, Page, PageLink } from '@elaraai/e3-cloud-ui';"
173
+ ],
174
+ "languages": [
175
+ "tsx"
176
+ ],
177
+ "source": "// Calling a function of the package from a page: Func.bind(adjust), its call on a click and its pending state while the call runs\n// inputs: [{ site: 'Northgate', line: 'L1' }]\n/** The runtime the package's functions run on. */\nconst RUNNER: Runner = { runtime: 'east-c', platforms: ['east-c-std'] };\n\nconst LineKey = StructType({ site: StringType, line: StringType });\n\n/** A function a page calls. */\nconst adjust = e3.function('adjust',\n East.function([LineKey, FloatType], FloatType, (_$, _key, pct) => pct.add(1.0)),\n { runner: RUNNER });\n\nEast.function([LineKey], UIComponentType, (_$, key) => (\n <Reactive>{$ => {\n const run = $.let(Func.bind(adjust));\n const adjustByFive = $.const(East.function([], NullType, $ => { $(run.call(key, 5.0)); }));\n return <Button loading={run.pending()} onClick={adjustByFive}>Adjust by 5%</Button>;\n }}</Reactive>\n ))"
178
+ },
179
+ {
180
+ "id": "e3-cloud-ui:pages.examples.tsx:pageMutatesARecord",
181
+ "skill": "e3-cloud-ui",
182
+ "package": "e3-cloud-ui",
183
+ "file": "packages/e3-cloud-ui/test/pages.examples.tsx",
184
+ "suite": "Functions and records",
185
+ "test": "Changing a record from a page: Record.bind(orders, [approve]) names the mutations the page may run, and o.mutate.approve(id) commits one",
186
+ "keywords": [
187
+ "Record.bind",
188
+ "mutate",
189
+ "mutation",
190
+ "record",
191
+ "e3.record",
192
+ "Button",
193
+ "commit"
194
+ ],
195
+ "imports": [
196
+ "import { East, ArrayType, DictType, FloatType, NullType, StringType, StructType, example, variant } from '@elaraai/east';",
197
+ "import { Button, HStack, Reactive, Slider, Stat, Table, Text, UIComponentType, VStack } from '@elaraai/east-ui';",
198
+ "import { Data, Func, Record } from '@elaraai/e3-ui';",
199
+ "import e3, { type Runner } from '@elaraai/e3';",
200
+ "import { Nav, Page, PageLink } from '@elaraai/e3-cloud-ui';"
201
+ ],
202
+ "languages": [
203
+ "tsx"
204
+ ],
205
+ "source": "// Changing a record from a page: Record.bind(orders, [approve]) names the mutations the page may run, and o.mutate.approve(id) commits one\n// inputs: []\n/** The runtime the package's functions run on. */\nconst RUNNER: Runner = { runtime: 'east-c', platforms: ['east-c-std'] };\n\nconst Order = StructType({ line: StringType, qty: FloatType, status: StringType });\n\n/** A record of orders, changed only through its mutations. */\nconst orders = e3.record('orders', DictType(StringType, Order), new Map());\n\n/** Approves an order by its id. */\nconst approve = e3.mutation.reduce('approve', orders,\n East.function([DictType(StringType, Order), StringType], DictType(StringType, Order), (_$, all, _id) => all),\n { runner: RUNNER });\n\nEast.function([], UIComponentType, _$ => (\n <Reactive>{$ => {\n const o = $.let(Record.bind(orders, [approve]));\n const approveA17 = $.const(East.function([], NullType, $ => { $(o.mutate.approve('A-17')); }));\n return <Button onClick={approveA17}>Approve A-17</Button>;\n }}</Reactive>\n ))"
206
+ },
207
+ {
208
+ "id": "e3-cloud-ui:pages.examples.tsx:pageReadsARecordThroughAnIndex",
209
+ "skill": "e3-cloud-ui",
210
+ "package": "e3-cloud-ui",
211
+ "file": "packages/e3-cloud-ui/test/pages.examples.tsx",
212
+ "suite": "Functions and records",
213
+ "test": "Reading a record through one of its indexes, a page at a time: Data.bindPaged(orders, { index: byLine }) given the index's declaration, its rows the index key and the order's id",
214
+ "keywords": [
215
+ "Data.bindPaged",
216
+ "index",
217
+ "recordIndex",
218
+ "record",
219
+ "paged",
220
+ "Table",
221
+ "ik",
222
+ "key"
223
+ ],
224
+ "imports": [
225
+ "import { East, ArrayType, DictType, FloatType, NullType, StringType, StructType, example, variant } from '@elaraai/east';",
226
+ "import { Button, HStack, Reactive, Slider, Stat, Table, Text, UIComponentType, VStack } from '@elaraai/east-ui';",
227
+ "import { Data, Func, Record } from '@elaraai/e3-ui';",
228
+ "import e3, { type Runner } from '@elaraai/e3';",
229
+ "import { Nav, Page, PageLink } from '@elaraai/e3-cloud-ui';"
230
+ ],
231
+ "languages": [
232
+ "tsx"
233
+ ],
234
+ "source": "// Reading a record through one of its indexes, a page at a time: Data.bindPaged(orders, { index: byLine }) given the index's declaration, its rows the index key and the order's id\n// inputs: []\nconst Order = StructType({ line: StringType, qty: FloatType, status: StringType });\n\n/** A record of orders, changed only through its mutations. */\nconst orders = e3.record('orders', DictType(StringType, Order), new Map());\n\n/** The orders by line. */\nconst byLine = e3.recordIndex('by_line', orders,\n { key: East.function([StringType, Order], StringType, (_$, _id, o) => o.line) });\n\nEast.function([], UIComponentType, _$ => (\n <Reactive>{$ => {\n const mine = $.let(Data.bindPaged(orders, { index: byLine }));\n return <Table data={mine} columns={['ik', 'key']} />;\n }}</Reactive>\n ))"
235
+ },
236
+ {
237
+ "id": "e3-cloud-ui:static:app",
238
+ "skill": "e3-cloud-ui",
239
+ "package": "e3-cloud-ui",
240
+ "file": "static",
241
+ "suite": "App",
242
+ "test": "An app: its pages, a ui() task's output as a page, its menu's groups, its home and the package it was built against",
243
+ "keywords": [
244
+ "App",
245
+ "Page",
246
+ "Page.task",
247
+ "Menu",
248
+ "Menu.group",
249
+ "home",
250
+ "pages",
251
+ "menu",
252
+ "package",
253
+ "title",
254
+ "logo",
255
+ "icon",
256
+ "parent",
257
+ "app",
258
+ "e3-cloud-ui"
259
+ ],
260
+ "imports": [
261
+ "import { East, FloatType, variant } from '@elaraai/east';",
262
+ "import { Reactive, Slider, Stat, UIComponentType, VStack } from '@elaraai/east-ui';",
263
+ "import { Data } from '@elaraai/e3-ui';",
264
+ "import e3 from '@elaraai/e3';",
265
+ "import { App, Menu, Page, PageLink } from '@elaraai/e3-cloud-ui';"
266
+ ],
267
+ "source": "// src/apps/ops.tsx: the package's declarations are imported from the solution's package\nconst target = e3.input('target', FloatType, variant('value', 100.0));\nconst acme = e3.package('acme', '1.5.0', /* its tasks, inputs, functions and records */ target);\n\n// A page: a name (its URL segment), what the sidebar and crumbs show, and its\n// body as a thunk, so pages can link to pages declared after them\nconst overview = Page('overview', { title: 'Overview', icon: 'gauge-high' },\n () => East.function([], UIComponentType, _$ => (\n <Reactive>{$ => {\n const t = $.let(Data.bind(target));\n return <VStack><Stat label=\"Target\" value={East.print(t.read())} /><Slider value={t.read()} min={0} max={200} onChangeEnd={t.write} /></VStack>;\n }}</Reactive>\n )));\n\n// A page under another: its crumbs name the parent, and the sidebar lights the parent's item\nconst settings = Page('settings', { title: 'Settings', icon: 'sliders', parent: overview },\n () => East.function([], UIComponentType, _$ => <PageLink to={overview}>Back to the overview</PageLink>));\n\n// The app: deployed to one workspace, apart from the package, which must run (or be deployed with) acme@1.5.0\nexport default App('ops', {\n package: acme,\n title: 'Acme Operations',\n home: overview,\n menu: [Menu.group('Analyse', [overview]), Menu.group([settings])], // a group with no label shows none\n pages: [overview, settings],\n});",
268
+ "languages": [
269
+ "typescript"
270
+ ]
271
+ },
272
+ {
273
+ "id": "e3-cloud-ui:static:page-task",
274
+ "skill": "e3-cloud-ui",
275
+ "package": "e3-cloud-ui",
276
+ "file": "static",
277
+ "suite": "Page.task",
278
+ "test": "A ui() task's output as a page: the dataflow computes it, the app shows it",
279
+ "keywords": [
280
+ "Page.task",
281
+ "ui",
282
+ "task",
283
+ "output",
284
+ "UIComponentType",
285
+ "page"
286
+ ],
287
+ "imports": [
288
+ "import { East, ArrayType } from '@elaraai/east';",
289
+ "import { Table, UIComponentType } from '@elaraai/east-ui';",
290
+ "import { ui } from '@elaraai/e3-ui';",
291
+ "import { Page } from '@elaraai/e3-cloud-ui';"
292
+ ],
293
+ "source": "// The task is the package's: a ui() task returning UIComponentType from its inputs\nconst board = ui('board', [forecast.output], East.function([ArrayType(Forecast)], UIComponentType, (_$, rows) => (\n <Table data={rows} columns={['site', 'line', 'units']} />\n)));\n// The page shows the task's latest output; its app's checks hold the task to being a ui() task of the package\nconst boardPage = Page.task('board', board, { title: 'Board', icon: 'table-columns' });",
294
+ "languages": [
295
+ "typescript"
296
+ ]
297
+ },
298
+ {
299
+ "id": "e3-cloud-ui:static:build",
300
+ "skill": "e3-cloud-ui",
301
+ "package": "e3-cloud-ui",
302
+ "file": "static",
303
+ "suite": "buildApp",
304
+ "test": "Building the bundle an app deploy uploads: the app object and its package's zip, as e3's export writes it; a refusal names what is wrong",
305
+ "keywords": [
306
+ "buildApp",
307
+ "exportApp",
308
+ "AppBuildError",
309
+ "bundle",
310
+ "AppBundle",
311
+ "build",
312
+ "app object",
313
+ "package zip",
314
+ "e3-cloud app build"
315
+ ],
316
+ "imports": [
317
+ "import { AppBuildError, buildApp, exportApp } from '@elaraai/e3-cloud-ui';"
318
+ ],
319
+ "source": "import ops from './apps/ops.js';\n\ntry {\n const bundle = await buildApp(ops); // { app, package }: the app object (AppType) and the package's zip\n console.log(bundle.app.name, bundle.app.pages.length, bundle.app.builtWith);\n await exportApp(ops, 'dist/ops.app'); // the same bundle, written where `e3-cloud app deploy` reads it\n} catch (err) {\n if (err instanceof AppBuildError) console.error(err.message); // a page that does not build, a duplicate name, a menu naming no page…\n else throw err;\n}",
320
+ "languages": [
321
+ "typescript"
322
+ ]
323
+ },
324
+ {
325
+ "id": "e3-cloud-ui:static:check",
326
+ "skill": "e3-cloud-ui",
327
+ "package": "e3-cloud-ui",
328
+ "file": "static",
329
+ "suite": "checkApp",
330
+ "test": "Checking an app against a package before deploying it: every page's binds against what the package declares, and the e3 it was built with",
331
+ "keywords": [
332
+ "checkApp",
333
+ "check",
334
+ "problems",
335
+ "AppProblem",
336
+ "bundlePackageView",
337
+ "dry run",
338
+ "binds",
339
+ "types"
340
+ ],
341
+ "imports": [
342
+ "import { buildApp, bundlePackageView } from '@elaraai/e3-cloud-ui';",
343
+ "import { checkApp } from '@elaraai/e3-cloud-ui/check';"
344
+ ],
345
+ "source": "const bundle = await buildApp(ops);\n// The package the app was built against, read from the bundle; null: no platform's e3 to hold it to\nconst problems = checkApp(bundle.app, await bundlePackageView(bundle), { e3Version: null });\nfor (const problem of problems) console.log(problem.type); // dataset_missing, dataset_type, function_missing, record_mutation_missing, task_not_ui, …\n// The server runs the same checks at every deploy: `e3-cloud app deploy … --dry-run` answers them without deploying",
346
+ "languages": [
347
+ "typescript"
348
+ ]
349
+ },
350
+ {
351
+ "id": "e3-cloud-cli:static:sign-in",
352
+ "skill": "e3-cloud-cli",
353
+ "package": "e3-cloud-cli",
354
+ "file": "static",
355
+ "suite": "e3-cloud",
356
+ "test": "Signing in to a deployment, and who you are there: the e3 CLI's sign-in (`e3 auth login`; there is no `e3 login`), whose credentials the e3-cloud CLI shares",
357
+ "keywords": [
358
+ "login",
359
+ "sign in",
360
+ "e3 auth login",
361
+ "auth",
362
+ "whoami",
363
+ "token",
364
+ "credentials",
365
+ "server",
366
+ "e3-cloud"
367
+ ],
368
+ "imports": [],
369
+ "source": "npm install -g @elaraai/e3-cloud-cli @elaraai/e3-cli\ne3 auth login https://e3.example.com # the device flow; e3-cloud reads the same credentials\ne3-cloud whoami https://e3.example.com # your identity there, and whether you are an admin",
370
+ "languages": [
371
+ "typescript"
372
+ ]
373
+ },
374
+ {
375
+ "id": "e3-cloud-cli:static:app-deploy",
376
+ "skill": "e3-cloud-cli",
377
+ "package": "e3-cloud-cli",
378
+ "file": "static",
379
+ "suite": "e3-cloud app",
380
+ "test": "Building and deploying apps: a bundle per app, deployed to a workspace; UI-only when the workspace runs its package, else with it",
381
+ "keywords": [
382
+ "app build",
383
+ "app deploy",
384
+ "app list",
385
+ "app versions",
386
+ "app remove",
387
+ "bundle",
388
+ "--from-source",
389
+ "--dry-run",
390
+ "with package",
391
+ "ui only",
392
+ "deploy",
393
+ "--force",
394
+ "protected",
395
+ "workspace_protected",
396
+ "develop",
397
+ "preview",
398
+ "iterate"
399
+ ],
400
+ "imports": [],
401
+ "source": "# Apps are developed in the cloud, not locally: deploy each change to a workspace of your own (here staging) and open it in the console\ne3-cloud app build src/apps/ops.tsx # → dist/ops.app: the app and the package it was built against\ne3-cloud app deploy https://e3.example.com/repos/acme staging dist/ops.app --dry-run # the checks, nothing deployed\ne3-cloud app deploy https://e3.example.com/repos/acme staging dist/ops.app # live at once when staging runs its package;\n # else its package deploys first (people's edited inputs kept) and it goes live as that completes\ne3-cloud app deploy https://e3.example.com/repos/acme staging --from-source src/apps/ops.tsx src/apps/exec.tsx # several, together\ne3-cloud app list https://e3.example.com/repos/acme staging\ne3-cloud app versions https://e3.example.com/repos/acme staging ops # kept versions, newest first\ne3-cloud app remove https://e3.example.com/repos/acme staging ops\n# A protected workspace (one with a staging) refuses a deploy and a removal: deploy to its staging and release.\n# An admin alone forces one past it, warned first, its history recording it as forced:\ne3-cloud app deploy https://e3.example.com/repos/acme production dist/ops.app --force",
402
+ "languages": [
403
+ "typescript"
404
+ ]
405
+ },
406
+ {
407
+ "id": "e3-cloud-cli:static:for-platform",
408
+ "skill": "e3-cloud-cli",
409
+ "package": "e3-cloud-cli",
410
+ "file": "static",
411
+ "suite": "e3-cloud app --for-platform",
412
+ "test": "Before a platform upgrade: stage each app's bundle built with the next e3, which the platform deploy switches live",
413
+ "keywords": [
414
+ "for-platform",
415
+ "stage",
416
+ "platform upgrade",
417
+ "e3 version",
418
+ "list-all",
419
+ "needs rebuild",
420
+ "builtWith"
421
+ ],
422
+ "imports": [],
423
+ "source": "e3-cloud app list-all https://e3.example.com # admin: every app, and which needs a bundle built with the platform's e3\n# after upgrading the project's @elaraai packages to the next release (1.0.88, say):\ne3-cloud app deploy https://e3.example.com/repos/acme production dist/ops.app --for-platform 1.0.88\n# staged beside the live version; the platform deploy that moves to 1.0.88 refuses while an app has none staged",
424
+ "languages": [
425
+ "typescript"
426
+ ]
427
+ },
428
+ {
429
+ "id": "e3-cloud-cli:static:release",
430
+ "skill": "e3-cloud-cli",
431
+ "package": "e3-cloud-cli",
432
+ "file": "static",
433
+ "suite": "e3-cloud release",
434
+ "test": "Staging to production: give production a staging (which protects it), copy production onto it, deploy a candidate there, then release exactly what staging runs; history and rollback",
435
+ "keywords": [
436
+ "release",
437
+ "rollback",
438
+ "history",
439
+ "copy",
440
+ "workspace copy",
441
+ "--plan",
442
+ "--carry",
443
+ "--remove-apps",
444
+ "staging",
445
+ "production",
446
+ "promote",
447
+ "protected",
448
+ "not_staging",
449
+ "nothing_to_release"
450
+ ],
451
+ "imports": [],
452
+ "source": "e3-cloud staging add https://e3.example.com/repos/acme production staging # once: a copy of production; production is protected from then on\ne3 workspace copy https://e3.example.com/repos/acme production staging # before each change: rehearse on production's data (the cloud copies the apps too)\ne3-cloud app deploy https://e3.example.com/repos/acme staging dist/ops.app # the candidate\ne3-cloud release https://e3.example.com/repos/acme staging production --plan # package, apps, next-e3 bundles, records, inputs, carry, checks, forced changes it undoes; changes nothing\ne3-cloud release https://e3.example.com/repos/acme staging production --carry inputs/mappings\n# only production's staging releases to it; one that would change nothing is refused;\n# production gets staging's package and app versions by hash (and its bundles staged for the next e3), keeps the inputs people set in it, migrates its records;\n# --carry copies inputs (and records new in the release) from staging; --remove-apps removes production's apps staging lacks\ne3-cloud history https://e3.example.com/repos/acme production # each release, deploy, app deploy, copy, rollback, staging added or stopped, forced change, with its id\ne3-cloud rollback https://e3.example.com/repos/acme production --plan # back to the newest entry that changed it and differs from what it runs (or name an id); open on a protected workspace",
453
+ "languages": [
454
+ "typescript"
455
+ ]
456
+ },
457
+ {
458
+ "id": "e3-cloud-cli:static:staging",
459
+ "skill": "e3-cloud-cli",
460
+ "package": "e3-cloud-cli",
461
+ "file": "static",
462
+ "suite": "e3-cloud staging",
463
+ "test": "A workspace's staging, which protects it as a protected branch: add one (a copy, or a workspace as it stands), list them, stop one (admins alone)",
464
+ "keywords": [
465
+ "staging",
466
+ "staging add",
467
+ "staging stop",
468
+ "staging list",
469
+ "protected",
470
+ "protect",
471
+ "protection",
472
+ "--as-is",
473
+ "--replace",
474
+ "--force",
475
+ "workspace_protected",
476
+ "staging_conflict",
477
+ "live"
478
+ ],
479
+ "imports": [],
480
+ "source": "e3-cloud staging add https://e3.example.com/repos/acme production staging --plan # what it would do; nothing changes\ne3-cloud staging add https://e3.example.com/repos/acme production staging # a copy of production as it is now, data included\ne3-cloud staging add https://e3.example.com/repos/acme production uat --as-is # a workspace there, as it stands (--replace copies over it instead; never unasked)\ne3-cloud staging list https://e3.example.com/repos/acme # each staging, and the workspace it protects\ne3-cloud staging stop https://e3.example.com/repos/acme production # admins alone: unprotects production, deletes nothing\n# One staging to a workspace, none of its own. A protected workspace changes only by a release from its staging, or a rollback:\n# e3's workspace deploy, an app deploy or removal (unless an admin's --force), a copy onto it and its removal are refused, naming its staging.\n# Its data goes on: inputs, records, runs, schedules.",
481
+ "languages": [
482
+ "typescript"
483
+ ]
484
+ },
485
+ {
486
+ "id": "e3-cloud-cli:static:users",
487
+ "skill": "e3-cloud-cli",
488
+ "package": "e3-cloud-cli",
489
+ "file": "static",
490
+ "suite": "e3-cloud user",
491
+ "test": "A repository's people and business roles: owners, and users holding roles that grant apps and pages; the deployment's users for admins",
492
+ "keywords": [
493
+ "user",
494
+ "add",
495
+ "remove",
496
+ "list",
497
+ "role",
498
+ "roles",
499
+ "owner",
500
+ "business role",
501
+ "grant",
502
+ "--roles",
503
+ "--grant",
504
+ "invitation",
505
+ "disable",
506
+ "enable",
507
+ "list-all"
508
+ ],
509
+ "imports": [],
510
+ "source": "e3-cloud role set https://e3.example.com/repos/acme Rostering --grant production/workforce:shifts,roster # a role: apps, every page or some\ne3-cloud role list https://e3.example.com/repos/acme\ne3-cloud user list https://e3.example.com/repos/acme\ne3-cloud user add https://e3.example.com/repos/acme ada@example.com --roles 'Rostering,All apps' # a user: reaches only what the roles' pages bind\ne3-cloud user add https://e3.example.com/repos/acme lee@example.com --role owner\ne3-cloud user remove https://e3.example.com/repos/acme ada@example.com # or takes back the invitation of someone not signed in yet\n# admins: the deployment's users, invitations, and sign-in\ne3-cloud user list-all https://e3.example.com\ne3-cloud user invitations https://e3.example.com\ne3-cloud user disable https://e3.example.com ada@example.com",
511
+ "languages": [
512
+ "typescript"
513
+ ]
514
+ },
515
+ {
516
+ "id": "e3-cloud-cli:static:secrets",
517
+ "skill": "e3-cloud-cli",
518
+ "package": "e3-cloud-cli",
519
+ "file": "static",
520
+ "suite": "e3-cloud secrets",
521
+ "test": "A repository's secrets: values set write-only, read by task code with Env.get(\"NAME\")",
522
+ "keywords": [
523
+ "secrets",
524
+ "set",
525
+ "list",
526
+ "rm",
527
+ "Env.get",
528
+ "credentials",
529
+ "password",
530
+ "write-only"
531
+ ],
532
+ "imports": [],
533
+ "source": "printf %s \"$PG_PASSWORD\" | e3-cloud secrets set https://e3.example.com/repos/acme PG_PASSWORD # from stdin, out of the shell's history\ne3-cloud secrets list https://e3.example.com/repos/acme # names only: a value is never shown\ne3-cloud secrets rm https://e3.example.com/repos/acme PG_PASSWORD\n# task code reads it with Env.get(\"PG_PASSWORD\") (east-node-std); the next run reads a new value",
534
+ "languages": [
535
+ "typescript"
536
+ ]
537
+ },
538
+ {
539
+ "id": "e3-cloud-cli:static:schedules",
540
+ "skill": "e3-cloud-cli",
541
+ "package": "e3-cloud-cli",
542
+ "file": "static",
543
+ "suite": "e3-cloud schedule",
544
+ "test": "A workspace's schedule: when its dataflow runs, and which tasks each run forces",
545
+ "keywords": [
546
+ "schedule",
547
+ "cron",
548
+ "timezone",
549
+ "force-tasks",
550
+ "set",
551
+ "get",
552
+ "list",
553
+ "remove",
554
+ "dataflow run"
555
+ ],
556
+ "imports": [],
557
+ "source": "e3-cloud schedule set https://e3.example.com/repos/acme/workspaces/production --cron \"0 6 * * 1-5\" --timezone Australia/Sydney \\\n --force-tasks ingest_sales --description \"Weekday refresh before the stand-up\"\ne3-cloud schedule get https://e3.example.com/repos/acme/workspaces/production\ne3-cloud schedule list https://e3.example.com/repos/acme\ne3-cloud schedule remove https://e3.example.com/repos/acme/workspaces/production",
558
+ "languages": [
559
+ "typescript"
560
+ ]
561
+ },
562
+ {
563
+ "id": "e3-cloud-cli:static:task-configs",
564
+ "skill": "e3-cloud-cli",
565
+ "package": "e3-cloud-cli",
566
+ "file": "static",
567
+ "suite": "e3-cloud compute / timeout",
568
+ "test": "Each task's compute size and timeout in a workspace",
569
+ "keywords": [
570
+ "compute",
571
+ "size",
572
+ "serverless",
573
+ "small",
574
+ "medium",
575
+ "large",
576
+ "xlarge",
577
+ "timeout",
578
+ "--regex",
579
+ "task config"
580
+ ],
581
+ "imports": [],
582
+ "source": "e3-cloud compute set https://e3.example.com/repos/acme/workspaces/production train_forecast --size medium # serverless, small, medium, large, xlarge\ne3-cloud compute set https://e3.example.com/repos/acme/workspaces/production '^score_' --size large --regex\ne3-cloud timeout set https://e3.example.com/repos/acme/workspaces/production train_forecast --timeout 2h\ne3-cloud compute list https://e3.example.com/repos/acme/workspaces/production",
583
+ "languages": [
584
+ "typescript"
585
+ ]
586
+ },
587
+ {
588
+ "id": "e3-cloud-cli:static:records",
589
+ "skill": "e3-cloud-cli",
590
+ "package": "e3-cloud-cli",
591
+ "file": "static",
592
+ "suite": "e3-cloud records",
593
+ "test": "A record's history, a commit's state, rolling back to a commit, and backups",
594
+ "keywords": [
595
+ "records",
596
+ "history",
597
+ "show",
598
+ "rollback",
599
+ "backup",
600
+ "backups",
601
+ "restore",
602
+ "backup-pull",
603
+ "commit",
604
+ "audit"
605
+ ],
606
+ "imports": [],
607
+ "source": "e3-cloud records list https://e3.example.com/repos/acme production\ne3-cloud records history https://e3.example.com/repos/acme production orders --limit 50\ne3-cloud records show https://e3.example.com/repos/acme production orders <commit> -o orders.beast2\ne3-cloud records backup https://e3.example.com/repos/acme production orders --note \"before the import\"\ne3-cloud records rollback https://e3.example.com/repos/acme production orders <commit> # a new commit holding that state",
608
+ "languages": [
609
+ "typescript"
610
+ ]
611
+ },
612
+ {
613
+ "id": "e3-cloud-cli:static:feedback",
614
+ "skill": "e3-cloud-cli",
615
+ "package": "e3-cloud-cli",
616
+ "file": "static",
617
+ "suite": "e3-cloud feedback",
618
+ "test": "Feedback people send from a workspace's pages: turn it on, list it, read a note and its screenshot, close it",
619
+ "keywords": [
620
+ "feedback",
621
+ "enable",
622
+ "disable",
623
+ "list",
624
+ "show",
625
+ "close",
626
+ "reopen",
627
+ "screenshot",
628
+ "notes"
629
+ ],
630
+ "imports": [],
631
+ "source": "e3-cloud feedback enable https://e3.example.com/repos/acme/workspaces/staging\ne3-cloud feedback list https://e3.example.com/repos/acme/workspaces/staging --status open\ne3-cloud feedback show https://e3.example.com/repos/acme/workspaces/staging 12 --screenshot fb-12.webp\ne3-cloud feedback close https://e3.example.com/repos/acme/workspaces/staging 12",
632
+ "languages": [
633
+ "typescript"
634
+ ]
635
+ },
636
+ {
637
+ "id": "e3-cloud-client:static:basics",
638
+ "skill": "e3-cloud-client",
639
+ "package": "e3-cloud-client",
640
+ "file": "static",
641
+ "suite": "@elaraai/e3-cloud-client",
642
+ "test": "Driving a deployment from code: the server's origin and a token in every call; ApiError names a refusal",
643
+ "keywords": [
644
+ "whoami",
645
+ "addUser",
646
+ "RequestOptions",
647
+ "token",
648
+ "ApiError",
649
+ "role",
650
+ "client"
651
+ ],
652
+ "imports": [
653
+ "import { variant, none, some } from '@elaraai/east';",
654
+ "import { ApiError, addUser, whoami } from '@elaraai/e3-cloud-client';"
655
+ ],
656
+ "source": "const url = 'https://e3.example.com';\nconst options = { token: process.env.E3_TOKEN! };\nconst me = await whoami(url, options);\ntry {\n await addUser(url, 'acme', { email: 'floor@example.com', role: variant('user', { roles: ['All apps'] }) }, options);\n} catch (err) {\n if (err instanceof ApiError) console.error(err.code, err.message); // forbidden, not_found, …\n else throw err;\n}",
657
+ "languages": [
658
+ "typescript"
659
+ ]
660
+ },
661
+ {
662
+ "id": "e3-cloud-client:static:app-deploy",
663
+ "skill": "e3-cloud-client",
664
+ "package": "e3-cloud-client",
665
+ "file": "static",
666
+ "suite": "@elaraai/e3-cloud-client apps",
667
+ "test": "Deploying an app from code: upload its object, deploy it, and wait for the deploy job when its package deploys with it",
668
+ "keywords": [
669
+ "appUpload",
670
+ "appDeploy",
671
+ "appDeployWait",
672
+ "encodeAppObject",
673
+ "deploying",
674
+ "live",
675
+ "refused",
676
+ "apps"
677
+ ],
678
+ "imports": [
679
+ "import { variant, none, some } from '@elaraai/east';",
680
+ "import { appDeploy, appDeployWait, appProblemsText, appUpload } from '@elaraai/e3-cloud-client';",
681
+ "import { buildApp, encodeAppObject } from '@elaraai/e3-cloud-ui';"
682
+ ],
683
+ "source": "const bundle = await buildApp(ops);\nconst source = await appUpload(url, 'acme', 'staging', 'ops', encodeAppObject(bundle.app), options);\nconst deployed = await appDeploy(url, 'acme', 'staging', 'ops', { source, forPlatform: none, dryRun: false }, options);\nif (deployed.type === 'refused') console.error(appProblemsText('Deploy refused', deployed.value, 'acme@1.5.0'));\nif (deployed.type === 'deploying') await appDeployWait(url, 'acme', 'staging', deployed.value.job, options); // its package first, then live",
684
+ "languages": [
685
+ "typescript"
686
+ ]
687
+ },
688
+ {
689
+ "id": "e3-cloud-client:static:release",
690
+ "skill": "e3-cloud-client",
691
+ "package": "e3-cloud-client",
692
+ "file": "static",
693
+ "suite": "@elaraai/e3-cloud-client releases",
694
+ "test": "Staging and releasing from code: add a staging (which protects its workspace), the plan first, then the release, its deploy job waited for; a workspace's history and a rollback",
695
+ "keywords": [
696
+ "releaseWorkspace",
697
+ "rollbackWorkspace",
698
+ "workspaceHistory",
699
+ "ReleasePlan",
700
+ "plan",
701
+ "carry",
702
+ "removeApps",
703
+ "releasing",
704
+ "released",
705
+ "refused",
706
+ "addStaging",
707
+ "stopStaging",
708
+ "staging",
709
+ "protected",
710
+ "undoes",
711
+ "not_staging",
712
+ "nothing_to_release"
713
+ ],
714
+ "imports": [
715
+ "import { variant, none, some } from '@elaraai/east';",
716
+ "import { addStaging, appDeployWait, releasePlanRefusalLines, releaseWorkspace, rollbackWorkspace, stopStaging, workspaceHistory } from '@elaraai/e3-cloud-client';"
717
+ ],
718
+ "source": "// Once: production's staging, a copy of it; production is protected from then on (stopStaging: admins alone)\nawait addStaging(url, 'acme', 'production', { name: 'staging', start: variant('copy', null), plan: false }, options);\nconst request = { from: 'staging', carry: ['inputs/mappings'], removeApps: false }; // only production's staging releases to it\nconst planned = await releaseWorkspace(url, 'acme', 'production', { ...request, plan: true }, options);\nconst plan = planned.type === 'releasing' ? planned.value.plan : planned.value;\nif (plan.problems.length > 0 || plan.checks.length > 0) throw new Error(releasePlanRefusalLines(plan).join('\\n')); // nothing_to_release among them\nfor (const undone of plan.undoes) console.warn(`undoes ${undone.summary}`); // changes an admin forced onto production\nconst released = await releaseWorkspace(url, 'acme', 'production', { ...request, plan: false }, options);\nif (released.type === 'releasing') await appDeployWait(url, 'acme', 'production', released.value.job, options);\nconst { entries } = await workspaceHistory(url, 'acme', 'production', options); // newest first\nawait rollbackWorkspace(url, 'acme', 'production', { to: some(entries[1]!.id), plan: true }, options);",
719
+ "languages": [
720
+ "typescript"
721
+ ]
722
+ },
723
+ {
724
+ "id": "e3-cloud-client:static:configure",
725
+ "skill": "e3-cloud-client",
726
+ "package": "e3-cloud-client",
727
+ "file": "static",
728
+ "suite": "@elaraai/e3-cloud-client configuration",
729
+ "test": "Configuring a workspace from code: a secret, a schedule, and a task's compute size",
730
+ "keywords": [
731
+ "putSecret",
732
+ "setSchedule",
733
+ "setCompute",
734
+ "schedule",
735
+ "secret",
736
+ "compute",
737
+ "cron"
738
+ ],
739
+ "imports": [
740
+ "import { variant, none, some } from '@elaraai/east';",
741
+ "import { putSecret, setCompute, setSchedule } from '@elaraai/e3-cloud-client';"
742
+ ],
743
+ "source": "await putSecret(url, 'acme', 'PG_PASSWORD', process.env.PG_PASSWORD!, options);\nawait setSchedule(url, 'acme', 'production', { cronExpression: '0 6 * * 1-5', timezone: some('Australia/Sydney'), forceTasks: [], enabled: true, description: none }, options);\nawait setCompute(url, 'acme', 'production', 'train_forecast', variant('medium', null), options);",
744
+ "languages": [
745
+ "typescript"
746
+ ]
747
+ }
748
+ ]
749
+ }