@elementumai/edk 0.8.0-preview.11 → 0.8.1
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 +378 -324
- package/dist-sdk/src/catalog/ai-provider-models.d.ts +30 -0
- package/dist-sdk/src/catalog/ai-provider-models.js +63 -0
- package/dist-sdk/src/catalog/factories.d.ts +56 -3
- package/dist-sdk/src/catalog/factories.js +65 -2
- package/dist-sdk/src/catalog/from-authoring.js +6 -1
- package/dist-sdk/src/catalog/index.d.ts +3 -2
- package/dist-sdk/src/catalog/index.js +3 -2
- package/dist-sdk/src/catalog/org.d.ts +1 -1
- package/dist-sdk/src/catalog/org.js +83 -6
- package/dist-sdk/src/catalog/render.d.ts +13 -1
- package/dist-sdk/src/catalog/render.js +21 -4
- package/dist-sdk/src/catalog/token.js +14 -0
- package/dist-sdk/src/catalog/types.d.ts +60 -3
- package/dist-sdk/src/catalog/types.js +3 -0
- package/dist-sdk/src/core/system-fields.d.ts +2 -0
- package/dist-sdk/src/core/system-fields.js +2 -0
- package/dist-sdk/src/core/types/ai-provider.d.ts +10 -23
- package/dist-sdk/src/core/types/ai-provider.js +1 -25
- package/dist-sdk/src/core/types/app.d.ts +20 -1
- package/dist-sdk/src/engine/build/context.d.ts +18 -0
- package/dist-sdk/src/engine/build/source-context.d.ts +45 -0
- package/dist-sdk/src/engine/build/source-context.js +23 -0
- package/dist-sdk/src/engine/pull/context.d.ts +15 -0
- package/dist-sdk/src/engine/pull/org.d.ts +10 -0
- package/dist-sdk/src/engine/pull/org.js +34 -4
- package/dist-sdk/src/engine/tf/index.d.ts +1 -1
- package/dist-sdk/src/engine/tf/index.js +1 -1
- package/dist-sdk/src/engine/tf/labels.d.ts +45 -0
- package/dist-sdk/src/engine/tf/labels.js +71 -0
- package/dist-sdk/src/entities/access-policy/build.d.ts +26 -0
- package/dist-sdk/src/entities/access-policy/build.js +7 -0
- package/dist-sdk/src/entities/access-policy/filter.d.ts +61 -0
- package/dist-sdk/src/entities/access-policy/filter.js +83 -0
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +48 -0
- package/dist-sdk/src/entities/access-policy/from-tf.js +189 -0
- package/dist-sdk/src/entities/access-policy/module.d.ts +3 -0
- package/dist-sdk/src/entities/access-policy/module.js +17 -0
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +36 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +149 -0
- package/dist-sdk/src/entities/access-policy/types.d.ts +4 -0
- package/dist-sdk/src/entities/access-policy/types.js +10 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +38 -3
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +199 -32
- package/dist-sdk/src/entities/agent/from-tf.d.ts +18 -3
- package/dist-sdk/src/entities/agent/from-tf.js +135 -15
- package/dist-sdk/src/entities/agent/index.d.ts +1 -1
- package/dist-sdk/src/entities/agent/module.js +8 -2
- package/dist-sdk/src/entities/agent/to-tf.js +62 -10
- package/dist-sdk/src/entities/agent/tools.d.ts +88 -9
- package/dist-sdk/src/entities/agent/tools.js +46 -7
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +51 -4
- package/dist-sdk/src/entities/agent-tool/from-tf.js +131 -35
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +4 -2
- package/dist-sdk/src/entities/agent-tool/to-tf.js +103 -17
- package/dist-sdk/src/entities/agent-tool/types.d.ts +5 -4
- package/dist-sdk/src/entities/agent-tool/types.js +38 -6
- package/dist-sdk/src/entities/app/build.d.ts +63 -13
- package/dist-sdk/src/entities/app/build.js +48 -1
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +3 -0
- package/dist-sdk/src/entities/app/from-tf.d.ts +1 -1
- package/dist-sdk/src/entities/app/from-tf.js +32 -15
- package/dist-sdk/src/entities/app/index.d.ts +4 -1
- package/dist-sdk/src/entities/app/index.js +2 -1
- package/dist-sdk/src/entities/app/module.js +9 -2
- package/dist-sdk/src/entities/app/to-tf.d.ts +5 -0
- package/dist-sdk/src/entities/app/to-tf.js +33 -4
- package/dist-sdk/src/entities/automation/build.d.ts +57 -13
- package/dist-sdk/src/entities/automation/build.js +48 -36
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +25 -8
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +16 -1
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +179 -43
- package/dist-sdk/src/entities/automation/filter.d.ts +15 -3
- package/dist-sdk/src/entities/automation/filter.js +12 -2
- package/dist-sdk/src/entities/automation/from-tf.d.ts +26 -27
- package/dist-sdk/src/entities/automation/from-tf.js +1229 -223
- package/dist-sdk/src/entities/automation/index.d.ts +4 -0
- package/dist-sdk/src/entities/automation/index.js +4 -0
- package/dist-sdk/src/entities/automation/module.js +29 -32
- package/dist-sdk/src/entities/automation/operators.d.ts +29 -2
- package/dist-sdk/src/entities/automation/operators.js +27 -1
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +19 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +24 -0
- package/dist-sdk/src/entities/automation/script-code.d.ts +10 -21
- package/dist-sdk/src/entities/automation/script-code.js +272 -5
- package/dist-sdk/src/entities/automation/tasks.d.ts +125 -19
- package/dist-sdk/src/entities/automation/tasks.js +83 -15
- package/dist-sdk/src/entities/automation/to-tf.d.ts +10 -29
- package/dist-sdk/src/entities/automation/to-tf.js +1134 -231
- package/dist-sdk/src/entities/automation/triggers.d.ts +9 -1
- package/dist-sdk/src/entities/automation/types.d.ts +29 -4
- package/dist-sdk/src/entities/automation/types.js +76 -46
- package/dist-sdk/src/entities/element/build.d.ts +23 -10
- package/dist-sdk/src/entities/element/build.js +1 -0
- package/dist-sdk/src/entities/element/from-tf.d.ts +1 -1
- package/dist-sdk/src/entities/element/from-tf.js +18 -3
- package/dist-sdk/src/entities/element/index.d.ts +4 -1
- package/dist-sdk/src/entities/element/index.js +2 -1
- package/dist-sdk/src/entities/element/module.js +3 -1
- package/dist-sdk/src/entities/element/to-tf.js +21 -3
- package/dist-sdk/src/entities/field/build.d.ts +56 -13
- package/dist-sdk/src/entities/field/build.js +10 -0
- package/dist-sdk/src/entities/field/calc/runtime.js +4 -0
- package/dist-sdk/src/entities/field/from-tf.d.ts +5 -3
- package/dist-sdk/src/entities/field/from-tf.js +118 -7
- package/dist-sdk/src/entities/field/module.js +3 -2
- package/dist-sdk/src/entities/field/to-tf.d.ts +27 -9
- package/dist-sdk/src/entities/field/to-tf.js +62 -17
- package/dist-sdk/src/entities/field/types.d.ts +26 -0
- package/dist-sdk/src/entities/field/types.js +34 -12
- package/dist-sdk/src/entities/file-reader/build.d.ts +108 -50
- package/dist-sdk/src/entities/file-reader/build.js +23 -23
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +6 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +109 -0
- package/dist-sdk/src/entities/file-reader/from-tf.d.ts +13 -0
- package/dist-sdk/src/entities/file-reader/from-tf.js +172 -0
- package/dist-sdk/src/entities/file-reader/index.d.ts +8 -3
- package/dist-sdk/src/entities/file-reader/index.js +7 -2
- package/dist-sdk/src/entities/file-reader/module.d.ts +3 -0
- package/dist-sdk/src/entities/file-reader/module.js +115 -0
- package/dist-sdk/src/entities/file-reader/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/file-reader/to-tf.js +84 -0
- package/dist-sdk/src/entities/file-reader/types.d.ts +32 -0
- package/dist-sdk/src/entities/file-reader/types.js +30 -0
- package/dist-sdk/src/entities/org/ai-provider.d.ts +13 -0
- package/dist-sdk/src/entities/org/ai-provider.js +46 -0
- package/dist-sdk/src/entities/org/connector.d.ts +8 -1
- package/dist-sdk/src/entities/org/connector.js +12 -14
- package/dist-sdk/src/entities/org/group.js +10 -1
- package/dist-sdk/src/entities/org/index.d.ts +1 -0
- package/dist-sdk/src/entities/org/index.js +1 -0
- package/dist-sdk/src/entities/org/user.js +10 -1
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +44 -9
- package/dist-sdk/src/entities/shared/filters/types.d.ts +1 -1
- package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +17 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.js +31 -0
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +10 -1
- package/dist-sdk/src/entities/shared/types/field-types.js +9 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +19 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +36 -8
- package/dist-sdk/src/entities/skill/from-tf.js +4 -3
- package/dist-sdk/src/entities/skill/index.d.ts +1 -1
- package/dist-sdk/src/entities/skill/module.js +6 -1
- package/dist-sdk/src/entities/skill/to-tf.js +3 -2
- package/dist-sdk/src/entities/skill/tools.d.ts +25 -3
- package/dist-sdk/src/entities/skill/tools.js +17 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +15 -2
- package/dist-sdk/src/entities/skill-tool/from-tf.js +32 -11
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.js +32 -9
- package/dist-sdk/src/entities/view/from-tf.d.ts +6 -2
- package/dist-sdk/src/entities/view/from-tf.js +11 -9
- package/dist-sdk/src/entities/view/to-tf.d.ts +9 -7
- package/dist-sdk/src/entities/view/to-tf.js +33 -18
- package/dist-sdk/src/entities/view/types.d.ts +1 -1
- package/dist-sdk/src/entities/view/types.js +1 -1
- package/dist-sdk/src/graph/deferred-catalog-render.d.ts +0 -5
- package/dist-sdk/src/graph/deferred-catalog-render.js +1 -20
- package/dist-sdk/src/graph/index.d.ts +8 -0
- package/dist-sdk/src/graph/index.js +13 -9
- package/dist-sdk/src/graph/modules.js +6 -1
- package/dist-sdk/src/graph/types.d.ts +77 -3
- package/package.json +42 -14
- package/dist-sdk/src/entities/automation/value-ref-tf.d.ts +0 -76
- package/dist-sdk/src/entities/automation/value-ref-tf.js +0 -190
package/README.md
CHANGED
|
@@ -1,409 +1,463 @@
|
|
|
1
1
|
# @elementumai/edk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Statically typed TypeScript SDK for authoring Elementum apps, elements,
|
|
4
|
+
automations, agents, skills, flows, search tables, and related configuration as
|
|
5
|
+
code. `@elementumai/edk` is SDK-only; the standalone `elementum` CLI is
|
|
6
|
+
distributed separately as part of the signed toolchain.
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
This repository is the canonical source for the public SDK, the standalone
|
|
9
|
+
`elementum` CLI, the OpenTofu provider under `provider/`, and the temporary
|
|
10
|
+
private bridge under `cmd/elementum/`. The installed toolchain manages
|
|
11
|
+
the bridge and OpenTofu; neither is a separate public executable or checkout.
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
npm install @elementumai/edk
|
|
9
|
-
```
|
|
13
|
+
## Installation
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Install the signed macOS toolchain:
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
```sh
|
|
18
|
+
curl -fsSL https://elementum-toolchain-distribution.vercel.app | sh
|
|
19
|
+
elementum init
|
|
20
|
+
```
|
|
14
21
|
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
The installer places `elementum` in `~/.elementum/bin` and adds that directory
|
|
23
|
+
to PATH via your shell profile (`~/.zprofile` for zsh). The current shell won't
|
|
24
|
+
see it until the profile reloads, so `elementum: command not found` right after
|
|
25
|
+
install just means you need a fresh shell — open a new terminal or run
|
|
26
|
+
`source ~/.zprofile`.
|
|
17
27
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```
|
|
28
|
+
Install the SDK in the package workspace that contains your Elementum org
|
|
29
|
+
folders:
|
|
21
30
|
|
|
22
|
-
|
|
31
|
+
```sh
|
|
32
|
+
npm install @elementumai/edk
|
|
33
|
+
```
|
|
23
34
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
edk plan
|
|
35
|
+
Use Node 24 or newer. The npm package is the authoring SDK; the only public
|
|
36
|
+
executable is `elementum`.
|
|
27
37
|
|
|
28
|
-
|
|
29
|
-
edk plan --organization <organization> --environment <environment> --instance <instance> \
|
|
30
|
-
--client-id "$ELEMENTUM_CLIENT_ID" --client-secret "$ELEMENTUM_CLIENT_SECRET"
|
|
38
|
+
### Platform support
|
|
31
39
|
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
The signed `elementum` toolchain currently targets **macOS only** — Apple
|
|
41
|
+
Silicon (`darwin-arm64`) and Intel (`darwin-x64`). Linux builds are on the
|
|
42
|
+
roadmap but not yet available. The authoring SDK (`@elementumai/edk`) is pure
|
|
43
|
+
TypeScript and runs anywhere Node 24+ runs, so Linux CI can install the SDK and
|
|
44
|
+
typecheck or build authored source; the platform commands (`auth`, `pull`,
|
|
45
|
+
`plan`, `apply`) require running `elementum` on macOS for now.
|
|
34
46
|
|
|
35
|
-
|
|
36
|
-
edk plan --profile-env-file=.env.staging
|
|
37
|
-
```
|
|
47
|
+
## Authentication and profiles
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
The SDK is credential-free and never calls the platform. Authentication and all
|
|
50
|
+
platform I/O are owned by the managed private bridge:
|
|
40
51
|
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
```sh
|
|
53
|
+
elementum auth login --profile <profile>
|
|
54
|
+
elementum --profile=<profile> auth status
|
|
44
55
|
```
|
|
45
56
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
**Before apply:** run `edk plan`. This validates that the workspace folder's
|
|
51
|
-
instance/org matches `ei auth status`.
|
|
57
|
+
A profile selects the organization, instance, optional organization
|
|
58
|
+
environment, credentials, and custom endpoints. Pass it explicitly before any
|
|
59
|
+
command when reproducibility matters:
|
|
52
60
|
|
|
53
|
-
|
|
61
|
+
```sh
|
|
62
|
+
elementum --profile=<profile> pull org --data-only
|
|
63
|
+
elementum --profile=<profile> plan
|
|
64
|
+
```
|
|
54
65
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
66
|
+
For `plan` and `apply`, `--profile` is optional. The CLI resolves the marked org
|
|
67
|
+
root from the explicit target or current directory, including targets nested
|
|
68
|
+
under `apps/`, `elements/`, or an individual authored file. It reads
|
|
69
|
+
`<instance>/<organization>` from that org root's path and selects the one saved
|
|
70
|
+
profile with the same identity. It does not infer tenant identity from shell
|
|
71
|
+
variables.
|
|
72
|
+
|
|
73
|
+
An explicit `--profile` overrides filesystem selection. The existing safety
|
|
74
|
+
check still rejects that profile if its instance or organization differs from
|
|
75
|
+
the workspace path. If no saved profile matches, or multiple profiles have the
|
|
76
|
+
same filesystem identity, the command fails before planning with the workspace
|
|
77
|
+
identity and tells you to pass `--profile` explicitly. Commands that bootstrap a
|
|
78
|
+
workspace should use an explicit profile because no org root exists yet.
|
|
79
|
+
|
|
80
|
+
## Workspace setup
|
|
81
|
+
|
|
82
|
+
Start from the parent directory that will contain one or more
|
|
83
|
+
`<instance>/<organization>` workspaces:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
mkdir elementum-workspace
|
|
87
|
+
cd elementum-workspace
|
|
88
|
+
npm init -y
|
|
89
|
+
npm install @elementumai/edk
|
|
90
|
+
elementum auth login --profile <profile>
|
|
91
|
+
elementum --profile=<profile> pull org --data-only
|
|
92
|
+
cd <instance>/<organization>
|
|
93
|
+
elementum --profile=<profile> init
|
|
58
94
|
```
|
|
59
95
|
|
|
60
|
-
`
|
|
61
|
-
|
|
62
|
-
|
|
96
|
+
`pull org --data-only` bootstraps and refreshes org reference identities. It
|
|
97
|
+
creates the package/workspace scaffolding, `org.ts`, the `@catalog` path alias,
|
|
98
|
+
and the Terraform input/output skeleton:
|
|
63
99
|
|
|
64
100
|
```text
|
|
65
101
|
<workspace>/
|
|
66
102
|
package.json
|
|
67
|
-
.npmrc
|
|
68
103
|
<instance>/
|
|
69
|
-
<
|
|
104
|
+
<organization>/
|
|
105
|
+
org.ts
|
|
106
|
+
tsconfig.json
|
|
107
|
+
terraform.tfstate # created by OpenTofu; commit this
|
|
70
108
|
apps/
|
|
71
109
|
elements/
|
|
72
|
-
tables/
|
|
73
110
|
generated/
|
|
74
111
|
catalog.ts
|
|
75
|
-
|
|
112
|
+
.tf/ # generated and ignored
|
|
113
|
+
in/ # bridge export input
|
|
114
|
+
out/ # SDK build output
|
|
76
115
|
```
|
|
77
116
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
117
|
+
`elementum init` is an idempotent installation/workspace convergence command.
|
|
118
|
+
It verifies the managed compatibility train, auth, SDK namespace/version,
|
|
119
|
+
workspace layout, and provider identity. It never logs in or silently migrates
|
|
120
|
+
Terraform state.
|
|
81
121
|
|
|
82
|
-
|
|
83
|
-
|
|
122
|
+
Do not hand-edit `org.ts`, `generated/`, or `.tf/`. Refresh those through their
|
|
123
|
+
owning commands.
|
|
84
124
|
|
|
85
|
-
|
|
86
|
-
to `<cwd>/<instance>/<org>` from `ei auth`: for example, from `edk-project`,
|
|
87
|
-
the `edk` org on instance `dev` writes `dev/edk/generated/...` and
|
|
88
|
-
`dev/edk/apps/...`. Plan/apply refuse a folder that doesn't match the active
|
|
89
|
-
ei profile.
|
|
125
|
+
## Recommended flow
|
|
90
126
|
|
|
91
|
-
|
|
127
|
+
Pull first when editing an object that already exists:
|
|
92
128
|
|
|
93
|
-
|
|
129
|
+
```sh
|
|
130
|
+
cd <workspace>/<instance>/<organization>
|
|
131
|
+
elementum --profile=<profile> pull org --data-only
|
|
132
|
+
elementum --profile=<profile> pull app <namespace>
|
|
133
|
+
# or: elementum --profile=<profile> pull element <namespace>
|
|
94
134
|
|
|
95
|
-
|
|
135
|
+
# edit apps/<ref>/... or elements/<ref>/...
|
|
136
|
+
npx tsc --noEmit
|
|
137
|
+
elementum build
|
|
138
|
+
elementum --profile=<profile> plan
|
|
139
|
+
elementum --profile=<profile> apply
|
|
140
|
+
```
|
|
96
141
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
142
|
+
`pull app` and `pull element` reconstruct editable TypeScript, regenerate the
|
|
143
|
+
catalog, then automatically adopt the exported resources into committed
|
|
144
|
+
Terraform state. Adoption is gated to exactly the expected imports, zero
|
|
145
|
+
create/update/destroy operations, and a clean follow-up plan. Use `--no-adopt`
|
|
146
|
+
only when you deliberately want source without state adoption.
|
|
147
|
+
|
|
148
|
+
Pull commands reserve stdout for one JSON summary. Diagnostics and stream kinds
|
|
149
|
+
that do not yet have an extractor are reported rather than silently discarded.
|
|
150
|
+
|
|
151
|
+
## CLI commands
|
|
152
|
+
|
|
153
|
+
The TypeScript-owned command surface is:
|
|
154
|
+
|
|
155
|
+
```sh
|
|
156
|
+
elementum init [--check] [--json]
|
|
157
|
+
elementum update [--check | --dry-run] [--channel stable|preview] [--version <semver>]
|
|
158
|
+
elementum migrate provider-source [orgRoot] [--check | --dry-run | --auto-approve]
|
|
159
|
+
|
|
160
|
+
elementum pull org --data-only [--root <orgRoot>]
|
|
161
|
+
elementum pull app <namespace> [--root <orgRoot>] [--no-adopt]
|
|
162
|
+
elementum pull element <namespace> [--root <orgRoot>] [--no-adopt]
|
|
163
|
+
elementum clone app <namespace> --as <newName> [--namespace <newns>] [--root <orgRoot>]
|
|
164
|
+
elementum build [orgRoot]
|
|
165
|
+
elementum plan [orgRoot-or-nested-target] [bridge args...]
|
|
166
|
+
elementum apply [orgRoot-or-nested-target] [bridge args...]
|
|
167
|
+
|
|
168
|
+
elementum list apps|elements|users|groups|categories|cloud-links
|
|
169
|
+
elementum list ai-provider-connectors|automations|tables
|
|
170
|
+
elementum new agent --app <appRef> --name "Triage Bot"
|
|
171
|
+
elementum new skill --app <appRef> --name "Lookup Ticket"
|
|
172
|
+
elementum canvas <orgRoot-or-file> [--port <port>] [--no-open]
|
|
173
|
+
elementum playbooks list|install|status|path|print
|
|
105
174
|
```
|
|
106
175
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
`
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
edk list users
|
|
119
|
-
edk list groups
|
|
120
|
-
edk list categories
|
|
121
|
-
edk list cloud-links
|
|
122
|
-
edk list ai-provider-connectors
|
|
123
|
-
edk fetch app --aspect-id <uuid> --fields --agents --automations --search-tables
|
|
124
|
-
edk import org
|
|
125
|
-
edk import app --id <uuid>
|
|
126
|
-
edk import element --id <uuid>
|
|
127
|
-
edk import cloud-links
|
|
128
|
-
edk import connectors
|
|
129
|
-
edk import automation --id <uuid> --app-id <uuid>
|
|
130
|
-
edk import agent --id <uuid> --app-id <uuid>
|
|
131
|
-
edk import skill --id <uuid> --app-id <uuid>
|
|
132
|
-
edk new agent --app <appRef> --name "Triage Bot"
|
|
133
|
-
edk new skill --app <appRef> --name "Lookup Ticket"
|
|
134
|
-
edk plan <instance>/<org>
|
|
135
|
-
edk plan <instance>/<org>/apps/<appRef>
|
|
136
|
-
edk apply <instance>/<org>
|
|
137
|
-
edk apply <instance>/<org>/apps/<appRef>
|
|
138
|
-
edk pull app --id <uuid> --all
|
|
139
|
-
edk pull app --aspect-id <uuid>
|
|
140
|
-
edk pull app --aspect-id <uuid> --all
|
|
141
|
-
edk pull element --id <uuid>
|
|
142
|
-
edk pull element --id <uuid> --all
|
|
143
|
-
edk pull automation --workflow <uuid>
|
|
144
|
-
edk pull agent --agent <uuid>
|
|
145
|
-
edk pull skill --skill <uuid>
|
|
146
|
-
edk pull search-table --aspect <uuid> --search-table <uuid>
|
|
147
|
-
edk pull -i
|
|
148
|
-
edk canvas <instance>/<org>/apps/myApp/automations/someAutomation.ts
|
|
149
|
-
edk skills path
|
|
150
|
-
edk skills print
|
|
176
|
+
`auth` and other bridge-owned commands route through the managed bridge. Run
|
|
177
|
+
`elementum --help` for the combined local and bridge command surface.
|
|
178
|
+
|
|
179
|
+
`build` loads app, element, and supported child authoring files and replaces its
|
|
180
|
+
marker-owned files under `.tf/out/`; it never calls the platform. `plan` and
|
|
181
|
+
`apply` run from `.tf/out/`, initialize OpenTofu there when necessary, and
|
|
182
|
+
forward extra arguments:
|
|
183
|
+
|
|
184
|
+
```sh
|
|
185
|
+
elementum plan <instance>/<organization>/apps/myApp/myApp.ts
|
|
186
|
+
elementum --profile=<profile> apply <instance>/<organization> -auto-approve
|
|
151
187
|
```
|
|
152
188
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
file under an already-imported app's `agents/`/`skills/` folder (agents and
|
|
167
|
-
skills are app-owned only — elements never own them). The refName is minted
|
|
168
|
-
from `--name` and regenerates the owning app's catalog so the new entity is
|
|
169
|
-
immediately referenceable; re-running with the same `--name` mints a
|
|
170
|
-
disambiguated refName rather than overwriting the existing file. Run these
|
|
171
|
-
from the parent workspace, same as `edk import`/`edk pull` — `--app` must
|
|
172
|
-
match a refName already imported/pulled there (e.g.
|
|
173
|
-
`<instance>/<organization>/apps/<appRef>`),
|
|
174
|
-
so a "not imported" error usually means either the wrong `--app` value or that
|
|
175
|
-
you ran the command from inside the org folder instead of its parent. A
|
|
176
|
-
scaffolded agent's `connector` is left as an unresolved
|
|
177
|
-
`catalog.connectors` placeholder — open the file and let IDE autocomplete on
|
|
178
|
-
`catalog.connectors.` pick a real handle; it won't typecheck until you do. A
|
|
179
|
-
scaffolded skill starts with `tools: []`, immediately compilable, plus a
|
|
180
|
-
commented-out example call for each of the six skill tool factories
|
|
181
|
-
(`skillSearchAspect`, `skillSearchTable`, `skillCreateRecord`,
|
|
182
|
-
`skillUpdateRecord`, `skillAutomation`, `skillRunAgent`) with the app's own
|
|
183
|
-
handle already filled in — uncomment whichever kinds you need, add the
|
|
184
|
-
matching import, and autocomplete the remaining `catalog.` refs.
|
|
185
|
-
|
|
186
|
-
Ignore legacy top-level files such as `generated/apps/aspects-catalog.ts`
|
|
187
|
-
(sometimes remembered as `aspect-catalog.ts`) if you find them in an older
|
|
188
|
-
workspace. Current catalogs live under each instance/org folder, for example
|
|
189
|
-
`<instance>/<organization>/generated/catalog.ts` and
|
|
190
|
-
`<instance>/<organization>/apps/<appRef>/generated/catalog.ts`.
|
|
191
|
-
|
|
192
|
-
## Canvas — explore your workspace
|
|
193
|
-
|
|
194
|
-
`edk canvas` opens a local, fully offline explorer for an org workspace:
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
edk canvas <instance>/<org> # explore a workspace directory
|
|
198
|
-
edk canvas # same, resolved from ei auth / org workspace cwd
|
|
189
|
+
The optional path may be the org root or anything nested beneath it. Run from
|
|
190
|
+
any directory inside the marked org workspace to omit it. The CLI always runs
|
|
191
|
+
the bridge/OpenTofu pass-through from that root's `.tf/out/`; it does not scan
|
|
192
|
+
or deploy an individual target file.
|
|
193
|
+
|
|
194
|
+
`new agent` and `new skill` create offline app-owned scaffolds without
|
|
195
|
+
overwriting an existing ref. Here, `skill` means an Elementum **agentic
|
|
196
|
+
skill** attached to an agent. Coding-agent guidance is packaged separately as
|
|
197
|
+
**playbooks** (Agent Skills-standard `SKILL.md` directories):
|
|
198
|
+
|
|
199
|
+
```sh
|
|
200
|
+
elementum playbooks list
|
|
201
|
+
elementum playbooks install --yes
|
|
199
202
|
```
|
|
200
203
|
|
|
201
|
-
The
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
tokens). It watches the workspace and hot-reloads on every save; `/` focuses
|
|
206
|
-
search, which filters apps, fields, and identities live. Broken authoring
|
|
207
|
-
files degrade to an inline error card — the rest of the workspace stays
|
|
208
|
-
navigable.
|
|
204
|
+
The installed slash commands are `/elementum`, `/elementum-uat`,
|
|
205
|
+
`/elementum-debug`, `/elementum-deployments`, and `/elementum-design`.
|
|
206
|
+
`elementum skills ...` remains the platform command family for agentic-skill
|
|
207
|
+
operations.
|
|
209
208
|
|
|
210
|
-
|
|
211
|
-
the first export with `toUI()` (or `.build().toUI()`) renders and reloads on
|
|
212
|
-
save. Pass `--port <port>` to avoid conflicts or `--no-open` to skip opening
|
|
213
|
-
a browser.
|
|
209
|
+
## Canvas
|
|
214
210
|
|
|
215
|
-
|
|
211
|
+
Canvas is an offline, live-reloading view of authored source:
|
|
216
212
|
|
|
217
|
-
|
|
218
|
-
|
|
213
|
+
```sh
|
|
214
|
+
elementum canvas <instance>/<organization>
|
|
215
|
+
elementum canvas apps/myApp/flows/someFlow.ts
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
A directory target opens the workspace explorer at `http://localhost:3456`,
|
|
219
|
+
covering pulled org identities, apps, fields, status/stages, agents and their
|
|
220
|
+
tools, and supported automations. A file target renders the first export with
|
|
221
|
+
`toUI()` (or `.build().toUI()`). Use `--port <port>` to choose another port or
|
|
222
|
+
`--no-open` to suppress browser launch.
|
|
223
|
+
|
|
224
|
+
## Package imports
|
|
225
|
+
|
|
226
|
+
Import public package subpaths, not repository-relative modules:
|
|
219
227
|
|
|
220
228
|
```ts
|
|
221
|
-
import {
|
|
222
|
-
import {
|
|
223
|
-
import {
|
|
229
|
+
import { calc, defineApp } from "@elementumai/edk/app";
|
|
230
|
+
import { defineElement } from "@elementumai/edk/elements";
|
|
231
|
+
import {
|
|
232
|
+
defineAutomation,
|
|
233
|
+
defineWorkflow,
|
|
234
|
+
executeScript,
|
|
235
|
+
onDemand,
|
|
236
|
+
} from "@elementumai/edk/automations";
|
|
237
|
+
import {
|
|
238
|
+
agentCreateRecord,
|
|
239
|
+
agentRunAutomation,
|
|
240
|
+
agentSearchAspect,
|
|
241
|
+
defineAgent,
|
|
242
|
+
} from "@elementumai/edk/agents";
|
|
224
243
|
import { defineSkill } from "@elementumai/edk/agents/skills";
|
|
225
244
|
import { defineFlow } from "@elementumai/edk/flows";
|
|
226
245
|
import { defineSearchTable } from "@elementumai/edk/searchTables";
|
|
227
246
|
import { defineApprovalChain } from "@elementumai/edk/approvalChains";
|
|
228
247
|
import { defineTable } from "@elementumai/edk/tables";
|
|
229
248
|
import { eq } from "@elementumai/edk/core/filters";
|
|
249
|
+
import catalog from "@catalog";
|
|
230
250
|
```
|
|
231
251
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
```
|
|
252
|
+
The package exports and `typesVersions` map are kept in lockstep. Generated
|
|
253
|
+
source uses the same public subpaths.
|
|
254
|
+
|
|
255
|
+
## Authoring model
|
|
256
|
+
|
|
257
|
+
EDK uses names and typed tokens in source, with Terraform state providing
|
|
258
|
+
platform identity:
|
|
259
|
+
|
|
260
|
+
1. `pull org --data-only` writes org reference bags to `org.ts`, including
|
|
261
|
+
cloud links, categories, connectors, and groups.
|
|
262
|
+
2. `pull app` or `pull element` writes editable source and adopts existing
|
|
263
|
+
resources into `terraform.tfstate`.
|
|
264
|
+
3. `generated/catalog.ts` is a pure barrel derived from the authored file tree.
|
|
265
|
+
Import app/entity tokens from `@catalog`; import org tokens from `org.ts`.
|
|
266
|
+
4. `build` converts TypeScript to the one supported HCL dialect in `.tf/out/`.
|
|
267
|
+
5. OpenTofu resolves references and computes create/update/replace/destroy
|
|
268
|
+
behavior during `plan` and `apply`.
|
|
269
|
+
|
|
270
|
+
There are no UUIDs or minted handles in authored source. The TypeScript bag key
|
|
271
|
+
is the Terraform label in camelCase through a lossless label conversion. For
|
|
272
|
+
example, a field's key in `fields: {}` is its identity; its display `name` can
|
|
273
|
+
change.
|
|
274
|
+
|
|
275
|
+
Configured builders such as `defineAgent` and `defineAutomation` return
|
|
276
|
+
`{ ref(refName), def(refName) }`. Workspace discovery supplies the ref name from
|
|
277
|
+
the file path. There is no `.deploy()` method.
|
|
278
|
+
|
|
279
|
+
## Automation example
|
|
280
|
+
|
|
281
|
+
The Terraform path currently round-trips on-demand triggers plus execute-script
|
|
282
|
+
and create-variable tasks. Other typed trigger/task factories remain available
|
|
283
|
+
to the authoring API but are reported as unsupported by `build` until their
|
|
284
|
+
Terraform mappings land.
|
|
266
285
|
|
|
267
286
|
```ts
|
|
268
|
-
import { defineAutomation,
|
|
269
|
-
import
|
|
287
|
+
import { defineAutomation, onDemand } from "@elementumai/edk/automations";
|
|
288
|
+
import { template } from "@elementumai/edk/core";
|
|
270
289
|
|
|
271
290
|
export default defineAutomation({
|
|
272
|
-
name: "
|
|
273
|
-
parent: "
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
291
|
+
name: "Greet New Student",
|
|
292
|
+
parent: "students",
|
|
293
|
+
workflowRevision: "1.0.0",
|
|
294
|
+
workflow: onDemand({ STUDENT_NAME: "text" })
|
|
295
|
+
.setVariable("GREETING", {
|
|
296
|
+
value: (ctx) => template("Welcome, ", ctx.trigger.STUDENT_NAME),
|
|
297
|
+
})
|
|
298
|
+
.executeScript("FORMAT_GREETING", {
|
|
299
|
+
inputs: (ctx) => ({ greeting: ctx.variables.GREETING }),
|
|
300
|
+
code: (input) => ({
|
|
301
|
+
message: `${input.parameters.greeting}!`,
|
|
302
|
+
}),
|
|
303
|
+
})
|
|
304
|
+
.outputs((ctx) => ({
|
|
305
|
+
message: ctx.tasks.FORMAT_GREETING.result.message,
|
|
280
306
|
})),
|
|
281
307
|
});
|
|
282
308
|
```
|
|
283
309
|
|
|
284
|
-
|
|
310
|
+
The file path supplies the automation ref; `parent` is the owning app ref.
|
|
311
|
+
`workflowRevision` is required SemVer and is the explicit publish gate. Editing
|
|
312
|
+
tasks or triggers updates the draft; bump the revision only when that draft
|
|
313
|
+
should be published.
|
|
285
314
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
315
|
+
## Agent example
|
|
316
|
+
|
|
317
|
+
Agents live under `apps/<appRef>/agents/<agentRef>.ts`. Their connector comes
|
|
318
|
+
from the org catalog, while app and field targets come from `@catalog`:
|
|
289
319
|
|
|
290
320
|
```ts
|
|
291
|
-
import {
|
|
321
|
+
import { agentSearchAspect, defineAgent } from "@elementumai/edk/agents";
|
|
292
322
|
import catalog from "@catalog";
|
|
323
|
+
import { org } from "../../../org.js";
|
|
293
324
|
|
|
294
325
|
export default defineAgent({
|
|
295
326
|
name: "Support Agent",
|
|
296
|
-
parent: "
|
|
297
|
-
connector:
|
|
298
|
-
description: "
|
|
299
|
-
instructions: "Search records and summarize next
|
|
300
|
-
temperature: 0.2,
|
|
301
|
-
maxLength: 2000,
|
|
327
|
+
parent: "support",
|
|
328
|
+
connector: org.connectors.claudeSonnet,
|
|
329
|
+
description: "Finds support records.",
|
|
330
|
+
instructions: "Search records and summarize the next action.",
|
|
302
331
|
tools: [
|
|
303
332
|
agentSearchAspect({
|
|
304
|
-
name: "
|
|
305
|
-
description: "
|
|
306
|
-
aspect: catalog.
|
|
307
|
-
queryDescription: "Describe the record
|
|
333
|
+
name: "find_records",
|
|
334
|
+
description: "Searches support records.",
|
|
335
|
+
aspect: catalog.support,
|
|
336
|
+
queryDescription: "Describe the record to find.",
|
|
337
|
+
fields: [
|
|
338
|
+
{
|
|
339
|
+
field: catalog.support.fields.status,
|
|
340
|
+
description: "Current status",
|
|
341
|
+
},
|
|
342
|
+
],
|
|
308
343
|
}),
|
|
309
344
|
],
|
|
310
345
|
});
|
|
311
346
|
```
|
|
312
347
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
348
|
+
The Terraform path currently round-trips create-record, search-aspect, and
|
|
349
|
+
run-automation agent tools. Unsupported tools and runtime-only knobs are
|
|
350
|
+
reported as build diagnostics instead of being emitted as partial resources.
|
|
351
|
+
Authored tool names use 1–64 letters, digits, or underscores, with no doubled
|
|
352
|
+
underscores.
|
|
353
|
+
|
|
354
|
+
## Plan and apply
|
|
355
|
+
|
|
356
|
+
Always build before planning:
|
|
357
|
+
|
|
358
|
+
```sh
|
|
359
|
+
cd <workspace>/<instance>/<organization>
|
|
360
|
+
elementum build
|
|
361
|
+
elementum plan
|
|
362
|
+
elementum apply
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
`plan` and `apply` are pass-throughs to the managed bridge with inherited
|
|
366
|
+
stdio. With no explicit profile, the CLI selects the unique saved profile
|
|
367
|
+
matching the org root's `<instance>/<organization>` path. Review destroy and
|
|
368
|
+
replacement actions just as you would in any Terraform plan.
|
|
369
|
+
|
|
370
|
+
## Identity and state recovery
|
|
371
|
+
|
|
372
|
+
`terraform.tfstate` at the org root is the durable binding between authored
|
|
373
|
+
labels and live platform objects. Commit it to the workspace repository.
|
|
374
|
+
`.tf/` remains generated and ignored.
|
|
375
|
+
|
|
376
|
+
The generated `providers.tf` pins a **local** OpenTofu backend at
|
|
377
|
+
`<orgRoot>/terraform.tfstate` and is regenerated on every `build`, so a remote
|
|
378
|
+
backend cannot be substituted in this release. The committed `terraform.tfstate`
|
|
379
|
+
is the source of truth; coordinate concurrent changes through your normal git
|
|
380
|
+
workflow (single writer, review on change) rather than distributed state
|
|
381
|
+
locking. Remote backends and state locking are candidates for a later release.
|
|
382
|
+
|
|
383
|
+
If state is lost, do not apply the built configuration: OpenTofu would see the
|
|
384
|
+
live objects as new. Restore the state file from version control or re-adopt
|
|
385
|
+
each stream with:
|
|
386
|
+
|
|
387
|
+
```sh
|
|
388
|
+
elementum --profile=<profile> pull org --data-only
|
|
389
|
+
elementum --profile=<profile> pull app <namespace>
|
|
390
|
+
elementum --profile=<profile> pull element <namespace>
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
After an update reports an old provider identity, inspect and explicitly
|
|
394
|
+
migrate the committed state:
|
|
395
|
+
|
|
396
|
+
```sh
|
|
397
|
+
elementum migrate provider-source <orgRoot> --check
|
|
398
|
+
elementum migrate provider-source <orgRoot> --auto-approve
|
|
399
|
+
elementum --profile=<profile> plan <orgRoot>
|
|
336
400
|
```
|
|
337
401
|
|
|
338
|
-
|
|
339
|
-
`
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
## Create Vs Update
|
|
359
|
-
|
|
360
|
-
`plan`/`apply` resolve each entity's handle-tokens against `generated/state.<env>.json`, then
|
|
361
|
-
decide per entity:
|
|
362
|
-
|
|
363
|
-
- **create** — no binding recorded for this `kind::refName` → POST.
|
|
364
|
-
- **skip** — bound, and a structural diff against the recorded baseline is
|
|
365
|
-
empty → no wire call.
|
|
366
|
-
- **update** — bound, and the payload differs → PUT against the bound id,
|
|
367
|
-
carrying the changed fields. (A bound-but-baseline-less entity — e.g. one
|
|
368
|
-
imported reference-only and now being managed — diffs as all-changed and
|
|
369
|
-
reconciles the platform to local source.)
|
|
370
|
-
- **update-unsupported** — bound and changed, but the kind has no platform
|
|
371
|
-
PUT. Apply reports `DeployUpdateUnsupportedError`; delete the entity on the
|
|
372
|
-
platform and re-create.
|
|
373
|
-
- **blocked** — a referenced handle isn't bound yet (import the app/entity it
|
|
374
|
-
points at). Apply surfaces the miss rather than POSTing a dangling reference.
|
|
375
|
-
|
|
376
|
-
Support today:
|
|
377
|
-
|
|
378
|
-
- **Automations, agents, skills** support create, update, and skip.
|
|
379
|
-
- **Flows, search tables, tables** are create-only — a change to a deployed one
|
|
380
|
-
is `update-unsupported` until the platform ships PUT.
|
|
381
|
-
|
|
382
|
-
There are no source-level ids and no `.deploy()` seed refs anymore: identity
|
|
383
|
-
lives entirely in state. On disk, state is consolidated into
|
|
384
|
-
`generated/state.<env>.json` in the org workspace; it contains org bindings,
|
|
385
|
-
the app registry, per-app bindings, and baselines. Override the generated-state
|
|
386
|
-
directory with `EDK_STATE_DIR`. Commit the state file to share identity across
|
|
387
|
-
machines; gitignore it for per-developer state.
|
|
388
|
-
|
|
389
|
-
If a state file is corrupt or schema-incompatible, the loader throws
|
|
390
|
-
`DeployStateCorruptError` rather than silently rebuilding it — re-import the
|
|
391
|
-
owning app to rebuild bindings.
|
|
392
|
-
|
|
393
|
-
### Recovering identity
|
|
394
|
-
|
|
395
|
-
Lost `generated/state.<env>.json` (fresh clone, deleted by accident) means EDK no longer knows
|
|
396
|
-
which platform entities your handle-tokens map to. Re-run `edk import org` for
|
|
397
|
-
org references, then pull the app/entity again or use `edk import app --id
|
|
398
|
-
<uuid>` as a reference-only bootstrap when you only need bindings. Author files
|
|
399
|
-
keep working unchanged because they only reference handles, never ids.
|
|
402
|
+
The migration creates an ignored recovery snapshot, runs OpenTofu
|
|
403
|
+
`state replace-provider`, refreshes generated provider configuration, and never
|
|
404
|
+
applies infrastructure.
|
|
405
|
+
|
|
406
|
+
## Create and update semantics
|
|
407
|
+
|
|
408
|
+
Terraform owns lifecycle decisions; EDK has no second deployment state machine:
|
|
409
|
+
|
|
410
|
+
- Configured resource absent from state: create.
|
|
411
|
+
- Resource present in config and state with changed attributes: update in place
|
|
412
|
+
or replace, according to provider schema.
|
|
413
|
+
- Resource present in state but absent from built config: destroy.
|
|
414
|
+
- Existing platform resource mapped into state by pull: adopt.
|
|
415
|
+
|
|
416
|
+
Pull adoption's zero-write gates prevent an existing resource from being
|
|
417
|
+
mistaken for a create. Build diagnostics are part of the safety contract:
|
|
418
|
+
unsupported stream kinds are never silently adopted or emitted. Renames that
|
|
419
|
+
change an exported Terraform label are guarded during adoption and rebound with
|
|
420
|
+
state moves when the existing platform identity can be proven.
|
|
400
421
|
|
|
401
422
|
## Development
|
|
402
423
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
424
|
+
The repository builds three distinct output trees:
|
|
425
|
+
|
|
426
|
+
- `dist-sdk/` — `tsc -p tsconfig.sdk.json` output, the sole source tree packed
|
|
427
|
+
into the `@elementumai/edk` SDK package;
|
|
428
|
+
- `dist-cli/` — Node-compatible `tsc -p tsconfig.cli.json` output used by local
|
|
429
|
+
development, tests, integration tooling, and the binary build script; it is
|
|
430
|
+
not part of the SDK package or the final release payload;
|
|
431
|
+
- `dist-bin/` — standalone `elementum` executables produced from `dist-cli` by
|
|
432
|
+
the locked local Bun dependency; these are the CLI release inputs distributed
|
|
433
|
+
separately from npm.
|
|
434
|
+
|
|
435
|
+
The repository's principal source roots are siblings:
|
|
436
|
+
|
|
437
|
+
```text
|
|
438
|
+
src/ # TypeScript SDK and public CLI
|
|
439
|
+
cmd/elementum/ # temporary private Go bridge module
|
|
440
|
+
provider/ # OpenTofu provider module
|
|
441
|
+
distribution/ # registry and installer package
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Contributor setup, change-specific tests, Go/provider checks, and pull-request
|
|
445
|
+
verification are documented in [CONTRIBUTING.md](CONTRIBUTING.md). The shortest
|
|
446
|
+
local CLI path is:
|
|
447
|
+
|
|
448
|
+
```sh
|
|
449
|
+
npm run local:setup
|
|
450
|
+
npm run elementum -- --help
|
|
451
|
+
npm run test:cli
|
|
409
452
|
```
|
|
453
|
+
|
|
454
|
+
See [binary validation](docs/edk-binary.md) for release and
|
|
455
|
+
compatibility-train checks.
|
|
456
|
+
|
|
457
|
+
## Contributor integration harness
|
|
458
|
+
|
|
459
|
+
The Preston High harness creates, mutates, renames, and deletes live resources.
|
|
460
|
+
Use only a dedicated test organization and profile. The complete setup,
|
|
461
|
+
required org identities, golden-workspace flow, command flags, and failure
|
|
462
|
+
semantics live in the
|
|
463
|
+
[Golden integration test](CONTRIBUTING.md#golden-integration-test).
|