@loxtep/sdk 0.3.0 → 0.5.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/CHANGELOG.md +105 -0
- package/README.md +178 -82
- package/dist/authoring/compiler.d.ts +5 -0
- package/dist/authoring/compiler.d.ts.map +1 -1
- package/dist/authoring/compiler.js +149 -0
- package/dist/authoring/compiler.js.map +1 -1
- package/dist/authoring/index.d.ts +1 -1
- package/dist/authoring/index.d.ts.map +1 -1
- package/dist/authoring/index.js.map +1 -1
- package/dist/authoring/toolbox.d.ts +7 -7
- package/dist/authoring/toolbox.d.ts.map +1 -1
- package/dist/authoring/toolbox.js +5 -5
- package/dist/authoring/toolbox.js.map +1 -1
- package/dist/authoring/types.d.ts +47 -0
- package/dist/authoring/types.d.ts.map +1 -1
- package/dist/cli/commands/data-contracts-cmd.d.ts +8 -0
- package/dist/cli/commands/data-contracts-cmd.d.ts.map +1 -1
- package/dist/cli/commands/data-contracts-cmd.js +11 -0
- package/dist/cli/commands/data-contracts-cmd.js.map +1 -1
- package/dist/cli/commands/data-products-cmd.d.ts +2 -0
- package/dist/cli/commands/data-products-cmd.d.ts.map +1 -1
- package/dist/cli/commands/data-products-cmd.js +35 -0
- package/dist/cli/commands/data-products-cmd.js.map +1 -1
- package/dist/cli/commands/deploy-cmd.js +1 -1
- package/dist/cli/commands/deploy-cmd.js.map +1 -1
- package/dist/cli/commands/instances-cmd.d.ts +37 -0
- package/dist/cli/commands/instances-cmd.d.ts.map +1 -0
- package/dist/cli/commands/instances-cmd.js +150 -0
- package/dist/cli/commands/instances-cmd.js.map +1 -0
- package/dist/cli/commands/triggers-cmd.d.ts +19 -0
- package/dist/cli/commands/triggers-cmd.d.ts.map +1 -0
- package/dist/cli/commands/{connections-cmd.js → triggers-cmd.js} +12 -12
- package/dist/cli/commands/triggers-cmd.js.map +1 -0
- package/dist/cli/commands/workflows-cmd.d.ts +8 -1
- package/dist/cli/commands/workflows-cmd.d.ts.map +1 -1
- package/dist/cli/commands/workflows-cmd.js +23 -2
- package/dist/cli/commands/workflows-cmd.js.map +1 -1
- package/dist/cli/index.d.ts +5 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +121 -40
- package/dist/cli/index.js.map +1 -1
- package/dist/client/connectors.d.ts +1 -1
- package/dist/client/connectors.d.ts.map +1 -1
- package/dist/client/connectors.js +1 -1
- package/dist/client/connectors.js.map +1 -1
- package/dist/client/data-products-types.d.ts +24 -1
- package/dist/client/data-products-types.d.ts.map +1 -1
- package/dist/client/data-products.d.ts +4 -2
- package/dist/client/data-products.d.ts.map +1 -1
- package/dist/client/data-products.js +17 -1
- package/dist/client/data-products.js.map +1 -1
- package/dist/client/discovery.d.ts +4 -4
- package/dist/client/discovery.d.ts.map +1 -1
- package/dist/client/discovery.js +4 -4
- package/dist/client/discovery.js.map +1 -1
- package/dist/client/index.d.ts +4 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/instances-types.d.ts +92 -0
- package/dist/client/instances-types.d.ts.map +1 -1
- package/dist/client/instances.d.ts +26 -4
- package/dist/client/instances.d.ts.map +1 -1
- package/dist/client/instances.js +94 -3
- package/dist/client/instances.js.map +1 -1
- package/dist/client/loxtep-client.d.ts +32 -21
- package/dist/client/loxtep-client.d.ts.map +1 -1
- package/dist/client/loxtep-client.js +36 -26
- package/dist/client/loxtep-client.js.map +1 -1
- package/dist/client/projects.d.ts +1 -1
- package/dist/client/projects.d.ts.map +1 -1
- package/dist/client/projects.js +1 -1
- package/dist/client/projects.js.map +1 -1
- package/dist/client/promises.d.ts +11 -0
- package/dist/client/promises.d.ts.map +1 -1
- package/dist/client/promises.js +11 -0
- package/dist/client/promises.js.map +1 -1
- package/dist/client/schemas.d.ts +1 -0
- package/dist/client/schemas.d.ts.map +1 -1
- package/dist/client/schemas.js +4 -0
- package/dist/client/schemas.js.map +1 -1
- package/dist/client/{consumptions-types.d.ts → target-types.d.ts} +25 -8
- package/dist/client/target-types.d.ts.map +1 -0
- package/dist/client/target-types.js +10 -0
- package/dist/client/target-types.js.map +1 -0
- package/dist/client/targets.d.ts +21 -0
- package/dist/client/targets.d.ts.map +1 -0
- package/dist/client/targets.js +103 -0
- package/dist/client/targets.js.map +1 -0
- package/dist/client/thesaurus.d.ts +7 -2
- package/dist/client/thesaurus.d.ts.map +1 -1
- package/dist/client/thesaurus.js +16 -4
- package/dist/client/thesaurus.js.map +1 -1
- package/dist/client/{connection-types.d.ts → trigger-types.d.ts} +22 -21
- package/dist/client/trigger-types.d.ts.map +1 -0
- package/dist/client/trigger-types.js +19 -0
- package/dist/client/trigger-types.js.map +1 -0
- package/dist/client/triggers.d.ts +19 -0
- package/dist/client/triggers.d.ts.map +1 -0
- package/dist/client/{connections.js → triggers.js} +12 -11
- package/dist/client/triggers.js.map +1 -0
- package/dist/client/workflows.d.ts +38 -6
- package/dist/client/workflows.d.ts.map +1 -1
- package/dist/client/workflows.js +192 -8
- package/dist/client/workflows.js.map +1 -1
- package/dist/codegen/load-workspace-context.d.ts.map +1 -1
- package/dist/codegen/load-workspace-context.js +6 -4
- package/dist/codegen/load-workspace-context.js.map +1 -1
- package/docs/getting-started.md +7 -12
- package/docs/quick-reference.md +6 -19
- package/docs/sdk-mcp-mapping.md +3 -3
- package/package.json +3 -3
- package/dist/cli/commands/connections-cmd.d.ts +0 -19
- package/dist/cli/commands/connections-cmd.d.ts.map +0 -1
- package/dist/cli/commands/connections-cmd.js.map +0 -1
- package/dist/cli/commands/data-assets-cmd.d.ts +0 -12
- package/dist/cli/commands/data-assets-cmd.d.ts.map +0 -1
- package/dist/cli/commands/data-assets-cmd.js +0 -75
- package/dist/cli/commands/data-assets-cmd.js.map +0 -1
- package/dist/cli/commands/flows-cmd.d.ts +0 -19
- package/dist/cli/commands/flows-cmd.d.ts.map +0 -1
- package/dist/cli/commands/flows-cmd.js +0 -37
- package/dist/cli/commands/flows-cmd.js.map +0 -1
- package/dist/cli/commands/pipelines-cmd.d.ts +0 -17
- package/dist/cli/commands/pipelines-cmd.d.ts.map +0 -1
- package/dist/cli/commands/pipelines-cmd.js +0 -52
- package/dist/cli/commands/pipelines-cmd.js.map +0 -1
- package/dist/cli/commands/promises-cmd.d.ts +0 -11
- package/dist/cli/commands/promises-cmd.d.ts.map +0 -1
- package/dist/cli/commands/promises-cmd.js +0 -53
- package/dist/cli/commands/promises-cmd.js.map +0 -1
- package/dist/client/connection-types.d.ts.map +0 -1
- package/dist/client/connection-types.js +0 -18
- package/dist/client/connection-types.js.map +0 -1
- package/dist/client/connections.d.ts +0 -18
- package/dist/client/connections.d.ts.map +0 -1
- package/dist/client/connections.js.map +0 -1
- package/dist/client/consumptions-types.d.ts.map +0 -1
- package/dist/client/consumptions-types.js +0 -5
- package/dist/client/consumptions-types.js.map +0 -1
- package/dist/client/consumptions.d.ts +0 -14
- package/dist/client/consumptions.d.ts.map +0 -1
- package/dist/client/consumptions.js +0 -47
- package/dist/client/consumptions.js.map +0 -1
- package/dist/client/data-assets-types.d.ts +0 -150
- package/dist/client/data-assets-types.d.ts.map +0 -1
- package/dist/client/data-assets-types.js +0 -5
- package/dist/client/data-assets-types.js.map +0 -1
- package/dist/client/data-assets.d.ts +0 -31
- package/dist/client/data-assets.d.ts.map +0 -1
- package/dist/client/data-assets.js +0 -182
- package/dist/client/data-assets.js.map +0 -1
- package/dist/client/flows.d.ts +0 -33
- package/dist/client/flows.d.ts.map +0 -1
- package/dist/client/flows.js +0 -218
- package/dist/client/flows.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,111 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
and this project adheres to
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## [0.5.0] - 2026-07-13
|
|
10
|
+
|
|
11
|
+
### Breaking changes — API surface redesign
|
|
12
|
+
|
|
13
|
+
The client surface was reorganized around the ingest → define → deliver journey
|
|
14
|
+
and made consistent. All renames are clean breaks (no deprecated aliases).
|
|
15
|
+
|
|
16
|
+
- **Casing** — every method is now `snake_case`. Renamed:
|
|
17
|
+
`workflows.listWorkflows → list`, `workflows.getWorkflowGraph → get_graph`,
|
|
18
|
+
`workflows.createWorkflow → create`,
|
|
19
|
+
`discovery.getEvidence → get_evidence`,
|
|
20
|
+
`discovery.getLineageImpact → get_lineage_impact`,
|
|
21
|
+
`discovery.getGovernanceFlags → get_governance_flags`,
|
|
22
|
+
`discovery.runDiscovery → run`,
|
|
23
|
+
`connectors.getOauthUrl → get_oauth_url`,
|
|
24
|
+
`projects.applyTemplate → apply_template`,
|
|
25
|
+
`thesaurus.listTerms → list_terms`,
|
|
26
|
+
`thesaurus.resolveCanonicalKey → resolve_canonical_key`,
|
|
27
|
+
`data_products.getUsageMap → get_usage_map`.
|
|
28
|
+
- **`flows` merged into `workflows`** — `client.flows` is removed. Use
|
|
29
|
+
`client.workflows` (`list`, `get`, `create`, `get_graph`, `deploy`). The
|
|
30
|
+
low-level `get_writer` escape hatch remains on `workflows` but is `@internal`
|
|
31
|
+
and undocumented; use `data_products.get_writer(name)`.
|
|
32
|
+
- **`connections` → `triggers`** — ingest source bindings. Types
|
|
33
|
+
`Connection*` → `Trigger*`; `CONNECTION_TYPES`/`CONNECTION_STATUSES` →
|
|
34
|
+
`TRIGGER_TYPES`/`TRIGGER_STATUSES`.
|
|
35
|
+
- **`delivery` → `targets`** — delivery sink bindings. Types
|
|
36
|
+
`DeliveryInterface`/`DeliveryType`/`Delivery*Input` → `Target`/`TargetType`/
|
|
37
|
+
`Target*Input`; the `deliveryType` discriminator → `targetType`.
|
|
38
|
+
- **`improvements`, `activity`, `process_intelligence`** marked `@internal`
|
|
39
|
+
(still on the client, excluded from docs and the generated API reference).
|
|
40
|
+
|
|
41
|
+
### CLI
|
|
42
|
+
|
|
43
|
+
- `flows *` commands removed; use `workflows list | get | create | deploy`.
|
|
44
|
+
- `connections *` commands renamed to `triggers *`.
|
|
45
|
+
|
|
46
|
+
## [0.4.0] - 2026-07-13
|
|
47
|
+
|
|
48
|
+
### Breaking changes
|
|
49
|
+
|
|
50
|
+
- **`consumptions` namespace removed** — use `data_products.delivery` and `DeliveryInterface` instead.
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- **`data_products.delivery` namespace** — `list`, `create`, `update`, and `delete` for delivery interfaces.
|
|
55
|
+
- **`data_products.readiness` / `data_products.promote`** — medallion tier promotion APIs.
|
|
56
|
+
- **`instances` client namespace** and **`loxtep instances` CLI** — list, get, create, and update runtime instances.
|
|
57
|
+
- **Data product promotion CLI** — `loxtep data-products readiness` and `loxtep data-products promote`.
|
|
58
|
+
- **Data contracts CLI** — `loxtep data-contracts create`.
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
|
|
62
|
+
- Flow and data-product writers now delegate buffering/batching to the rstreams `load` stream via `createQueueWriter`.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## [0.3.0] - 2026-06-08
|
|
67
|
+
|
|
68
|
+
### Terminology Migration
|
|
69
|
+
|
|
70
|
+
The SDK now uses "delivery" terminology as the primary interface, replacing the
|
|
71
|
+
overloaded "consumption" vocabulary. This aligns the SDK with the platform UI,
|
|
72
|
+
documentation, and MCP tool names.
|
|
73
|
+
|
|
74
|
+
**Namespace rename:** `consumptions` → `delivery`
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const interfaces = await client.dataProducts.delivery.list(dpId);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Type:** `DeliveryInterface`
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import type { DeliveryInterface } from '@loxtep/sdk';
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**`deliveryType` field on `DeliveryInterface`:**
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
const webhook: DeliveryInterface = {
|
|
90
|
+
id: 'di_...',
|
|
91
|
+
deliveryType: 'webhook',
|
|
92
|
+
endpointUrl: 'https://example.com/hook',
|
|
93
|
+
method: 'POST',
|
|
94
|
+
// ...
|
|
95
|
+
};
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The old `consumptions` namespace and `Consumption` type have been removed.
|
|
99
|
+
|
|
100
|
+
### New features
|
|
101
|
+
|
|
102
|
+
- **`dataProducts.delivery` namespace** — Primary namespace for managing delivery
|
|
103
|
+
interfaces with `list()`, `create()`, `update()`, and `delete()` methods.
|
|
104
|
+
- **`DeliveryInterface` type** — Includes a `deliveryType` discriminator field
|
|
105
|
+
(`'webhook' | 'api_endpoint' | 'export' | 'database_sync' | 'bi_connect' | 'event_stream'`).
|
|
106
|
+
|
|
107
|
+
### Removed
|
|
108
|
+
|
|
109
|
+
- `dataProducts.consumptions` namespace — removed. Use `dataProducts.delivery`.
|
|
110
|
+
- `Consumption` type — removed. Use `DeliveryInterface`.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
9
114
|
## [0.2.0] - Unreleased
|
|
10
115
|
|
|
11
116
|
### Breaking changes
|
package/README.md
CHANGED
|
@@ -1,17 +1,39 @@
|
|
|
1
1
|
# Loxtep Node.js SDK
|
|
2
2
|
|
|
3
|
-
Client for the Loxtep API
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Client for the Loxtep API, organized around one journey: **ingest → define →
|
|
4
|
+
deliver**. Install the SDK and get to your first event in five steps (below),
|
|
5
|
+
then reach for the namespace that matches the stage you're in:
|
|
6
|
+
|
|
7
|
+
- **Ingest** — `triggers`, `connectors`, `workflows`, `data_products.get_writer`
|
|
8
|
+
- **Define** — `data_products`, `schemas`, `quality`, `catalog`, `discovery`,
|
|
9
|
+
`domains`, `standards`, `data_contracts`, `thesaurus`, `procedures`
|
|
10
|
+
- **Deliver** — `data_products` (reader/stream/replay/query), `targets`
|
|
11
|
+
- **Advanced / platform** — `projects`, `templates`, `instances`, `observe`,
|
|
12
|
+
`queues`, `metrics`
|
|
8
13
|
|
|
9
14
|
**Node.js 22+** is the supported runtime (`engines` in `package.json`). **Live**
|
|
10
15
|
queue/flow writes use the **Loxtep stream** data plane; configure stream bus
|
|
11
16
|
resources (`streams` on `LoxtepClient` and instance env from your stack) and AWS
|
|
12
17
|
credentials for SigV4 on both REST and the bus.
|
|
13
18
|
|
|
14
|
-
##
|
|
19
|
+
## Ways to get started
|
|
20
|
+
|
|
21
|
+
This SDK supports two developer workflows:
|
|
22
|
+
|
|
23
|
+
| Path | Use case | Entry point |
|
|
24
|
+
|------|----------|-------------|
|
|
25
|
+
| **Programmatic** | Write/read events from application code (microservices, lambdas, scripts) | `LoxtepClient` → `data_products.get_writer` / `get_reader` |
|
|
26
|
+
| **Code-first CLI** | Author workflows as TypeScript, test locally, deploy via CI | `loxtep init → attach → generate → test → deploy` |
|
|
27
|
+
|
|
28
|
+
There are also two additional paths that don't require this SDK:
|
|
29
|
+
- **Agent-first (MCP)** — drive Loxtep conversationally from Cursor, Kiro, Claude, etc. See [loxtep-plugins-skills](https://github.com/LoxtepInc/loxtep-plugins-skills).
|
|
30
|
+
- **Web UI** — visual project setup and management at [app.loxtep.io](https://app.loxtep.io).
|
|
31
|
+
|
|
32
|
+
All paths are documented in the [Loxtep Quickstart](https://docs.loxtep.io/quickstart).
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Quick start — Programmatic (< 5 min to first stream)
|
|
15
37
|
|
|
16
38
|
1. **Install**
|
|
17
39
|
|
|
@@ -61,57 +83,116 @@ credentials for SigV4 on both REST and the bus.
|
|
|
61
83
|
stream bus configuration automatically from the deployment metadata. No
|
|
62
84
|
manual queue names, no stream config, no bot IDs.
|
|
63
85
|
|
|
64
|
-
4. **
|
|
65
|
-
queue name, or stream bus resources, use `flows.get_writer` directly:
|
|
66
|
-
|
|
67
|
-
```ts
|
|
68
|
-
const writer = client.flows.get_writer('your-flow-id', {
|
|
69
|
-
bot_id: 'your-bot-id',
|
|
70
|
-
output_queue_name: 'your-ingest-queue',
|
|
71
|
-
});
|
|
72
|
-
writer.write({ customer_id: '123', name: 'Alice', email: 'alice@example.com' });
|
|
73
|
-
writer.write({ customer_id: '456', name: 'Bob', email: 'bob@example.com' });
|
|
74
|
-
await writer.close();
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
The `write()` method accepts your raw business object — the SDK handles
|
|
78
|
-
batching and delivery to the stream bus automatically. No event envelope
|
|
79
|
-
or metadata wrapper is needed.
|
|
80
|
-
|
|
81
|
-
5. **Stream config from the platform (optional)** — after login,
|
|
86
|
+
4. **Stream config from the platform (optional)** — after login,
|
|
82
87
|
`await client.observe.stream_config()` returns stream resource names
|
|
83
88
|
needed for the data plane. Merge into
|
|
84
89
|
`new LoxtepClient({ ...opts, streams: { ...partial } })` with your
|
|
85
90
|
JWT-backed client. Note: `data_products.get_writer` and `get_reader` resolve
|
|
86
91
|
stream config automatically — this is only needed for manual bus access.
|
|
87
92
|
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Quick start — Code-first CLI (init → deploy)
|
|
96
|
+
|
|
97
|
+
For developers who author workflows as TypeScript and want the full local-dev-to-production lifecycle:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# 1. Install
|
|
101
|
+
npm install @loxtep/sdk
|
|
102
|
+
|
|
103
|
+
# 2. Authenticate
|
|
104
|
+
npx loxtep login
|
|
105
|
+
|
|
106
|
+
# 3. Scaffold a project from a template
|
|
107
|
+
npx loxtep init --template shopify-orders
|
|
108
|
+
|
|
109
|
+
# 4. Bind to a runtime instance
|
|
110
|
+
npx loxtep attach --instance prod
|
|
111
|
+
|
|
112
|
+
# 5. Generate typed workspace constants
|
|
113
|
+
npx loxtep generate
|
|
114
|
+
|
|
115
|
+
# 6. Author a workflow (see authoring module docs below)
|
|
116
|
+
|
|
117
|
+
# 7. Test locally with a sample event
|
|
118
|
+
npx loxtep test orders-enricher --event ./events/order-created.json
|
|
119
|
+
|
|
120
|
+
# 8. Deploy to the workflow engine
|
|
121
|
+
npx loxtep deploy
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The `generate` step produces `.loxtep/generated/index.ts` with typed constants for every data product, connector, domain, and queue in your workspace. Import them in your workflow modules for compile-time safety:
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import { defineDataWorkflow, on } from '@loxtep/sdk/authoring'
|
|
128
|
+
import { workspace } from './.loxtep/generated'
|
|
129
|
+
|
|
130
|
+
export default defineDataWorkflow({
|
|
131
|
+
name: 'orders-enricher',
|
|
132
|
+
triggers: [on.queueEvent(workspace.queues.orders_raw)],
|
|
133
|
+
async handler(ctx, event) {
|
|
134
|
+
await ctx.toolbox.dataProducts.upsert({
|
|
135
|
+
dataProduct: workspace.dataProducts.orders_enriched,
|
|
136
|
+
domain: workspace.domains.commerce,
|
|
137
|
+
record: event,
|
|
138
|
+
})
|
|
139
|
+
},
|
|
140
|
+
})
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
See `loxtep init --help`, `loxtep attach --help`, etc. for all flags. The full CLI reference is in the [CLI reference](#cli-reference) section below.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
88
147
|
## API surface
|
|
89
148
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
- **
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
- **
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
- **
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- **
|
|
110
|
-
- **
|
|
111
|
-
- **
|
|
112
|
-
- **
|
|
113
|
-
|
|
114
|
-
- **
|
|
149
|
+
Every method is `snake_case`. Namespaces are grouped by the stage of the journey
|
|
150
|
+
they serve, and labelled by *kind*: **Resource** (full CRUD), **Reference**
|
|
151
|
+
(read-only), **Runtime** (live stream I/O).
|
|
152
|
+
|
|
153
|
+
### Ingest — connect sources, write events
|
|
154
|
+
|
|
155
|
+
- **triggers** *(Resource)* – `get`, `list`, `create`, `update`, `delete`,
|
|
156
|
+
`test` — ingest source bindings (external systems that feed a workflow)
|
|
157
|
+
- **connectors** *(Resource)* – `list`, `get`, `create`, `update`, `delete`,
|
|
158
|
+
`test`, `get_oauth_url` — org-level catalog of connectable system types
|
|
159
|
+
- **workflows** *(Resource)* – `list`, `get`, `create`, `get_graph`, `deploy` —
|
|
160
|
+
the ingestion → transformation → export DAG
|
|
161
|
+
- **data_products.get_writer(name)** *(Runtime)* – the write path for events
|
|
162
|
+
|
|
163
|
+
### Define — semantics, schema, quality, governance
|
|
164
|
+
|
|
165
|
+
- **data_products** *(Resource + Runtime)* – `get`, `get_lexicon`, `list`,
|
|
166
|
+
`search`, `query`, `list_tables`, `get_queue_info`, `get_reader_checkpoint`,
|
|
167
|
+
`create`, `readiness`, `promote`, `get_usage_map`, `invalidate_cache`
|
|
168
|
+
- **schemas** *(Reference)* – `get`, `list`, `tag_pii_fields`
|
|
169
|
+
- **quality** *(Resource)* – `list`, `get`, `create`
|
|
170
|
+
- **catalog** *(Reference)* – `search`
|
|
171
|
+
- **discovery** *(Reference)* – `search`, `get_evidence`, `get_lineage_impact`,
|
|
172
|
+
`get_governance_flags`, `run`
|
|
173
|
+
- **domains** *(Reference)* – `list`, `get`
|
|
174
|
+
- **standards** *(Reference)* – `list`, `get`
|
|
175
|
+
- **data_contracts** *(Resource)* – `list`, `get`, `create`, `update`, `delete`
|
|
176
|
+
- **thesaurus** *(Reference)* – `list_terms`, `resolve_canonical_key`,
|
|
177
|
+
`append_synonym`
|
|
178
|
+
- **procedures** *(Reference)* – `list`
|
|
179
|
+
|
|
180
|
+
### Deliver — consume and route data
|
|
181
|
+
|
|
182
|
+
- **data_products** *(Runtime)* – `get_reader`, `stream`, `replay`
|
|
183
|
+
- **targets** *(Resource)* – `list`, `get`, `create`, `update`, `delete` —
|
|
184
|
+
delivery sink bindings (webhook, API, export, DB sync, BI, event stream)
|
|
185
|
+
|
|
186
|
+
### Advanced / platform
|
|
187
|
+
|
|
188
|
+
- **projects** *(Resource)* – `list`, `get`, `create`, `update`, `delete`,
|
|
189
|
+
`apply_template`, `repository`
|
|
190
|
+
- **templates** *(Reference)* – `list`, `get`
|
|
191
|
+
- **instances** *(Reference)* – `list`, `get`, `get_stream_config`
|
|
192
|
+
- **observe** – `status`, `stream_config`
|
|
193
|
+
- **queues** – `get_queue_metadata`, `get_reader_checkpoint`, `open_reader`,
|
|
194
|
+
`open_writer`
|
|
195
|
+
- **metrics** – `log`, `get_reporter`
|
|
115
196
|
|
|
116
197
|
## Data product writer and reader
|
|
117
198
|
|
|
@@ -143,28 +224,6 @@ Options:
|
|
|
143
224
|
Cache: call `client.data_products.invalidate_cache('name')` to force
|
|
144
225
|
re-resolution on the next call.
|
|
145
226
|
|
|
146
|
-
## Flow writer (lower-level escape hatch)
|
|
147
|
-
|
|
148
|
-
`client.flows.get_writer(flow_id)` returns a **FlowWriter** with:
|
|
149
|
-
|
|
150
|
-
- **`write(event)`** – enqueues a raw business object. Batching is transparent:
|
|
151
|
-
you do not control batch size or flush timing.
|
|
152
|
-
- **`close()`** – flushes any buffered events and guarantees delivery (or
|
|
153
|
-
attempts to). Always call `close()` when done writing.
|
|
154
|
-
|
|
155
|
-
Example:
|
|
156
|
-
|
|
157
|
-
```ts
|
|
158
|
-
const writer = client.flows.get_writer(flowId, { bot_id: 'your-bot-id' });
|
|
159
|
-
writer.write({ customer_id: '123', name: 'Alice', email: 'alice@example.com' });
|
|
160
|
-
writer.write({ customer_id: '456', name: 'Bob', email: 'bob@example.com' });
|
|
161
|
-
await writer.close();
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
Pass your raw business objects — no envelope, no `id`/`payload` wrapper needed.
|
|
165
|
-
Buffered events flush on `close()` via the stream data plane to the resolved
|
|
166
|
-
output queue.
|
|
167
|
-
|
|
168
227
|
## Stream helpers
|
|
169
228
|
|
|
170
229
|
Use `mapStream` and `filterStream` with `data_products.stream()`,
|
|
@@ -184,6 +243,39 @@ for await (const event of filterStream(
|
|
|
184
243
|
}
|
|
185
244
|
```
|
|
186
245
|
|
|
246
|
+
## Targets (delivery)
|
|
247
|
+
|
|
248
|
+
Configure how a data product delivers data to external systems.
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
import { LoxtepClient } from '@loxtep/sdk';
|
|
252
|
+
import type { Target, TargetCreateInput } from '@loxtep/sdk';
|
|
253
|
+
|
|
254
|
+
const client = new LoxtepClient({
|
|
255
|
+
api_url: 'https://api.loxtep.com',
|
|
256
|
+
auth: { type: 'jwt', token: process.env.LOXTEP_AUTH_TOKEN! },
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
// List targets for a data product
|
|
260
|
+
const { items, pagination } = await client.targets.list('dp_abc123');
|
|
261
|
+
|
|
262
|
+
// Create a webhook target
|
|
263
|
+
const webhook = await client.targets.create('dp_abc123', {
|
|
264
|
+
targetType: 'webhook',
|
|
265
|
+
name: 'Order notifications',
|
|
266
|
+
endpoint_url: 'https://example.com/webhooks/orders',
|
|
267
|
+
method: 'POST',
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
// Update a target
|
|
271
|
+
await client.targets.update('dp_abc123', webhook.consumption_id, {
|
|
272
|
+
is_active: false,
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
// Delete a target
|
|
276
|
+
await client.targets.delete('dp_abc123', webhook.consumption_id);
|
|
277
|
+
```
|
|
278
|
+
|
|
187
279
|
## Documentation
|
|
188
280
|
|
|
189
281
|
- **Getting started** – Zero to first event in under 5 minutes.
|
|
@@ -203,7 +295,13 @@ for await (const event of filterStream(
|
|
|
203
295
|
| `login --email <e> --password <p>` | Headless login for CI (optional `--mfa-code`) |
|
|
204
296
|
| `logout` | Remove stored credentials |
|
|
205
297
|
| `whoami` | Print current user and organization |
|
|
206
|
-
| `init`
|
|
298
|
+
| `init [--template <slug>]` | Scaffold project structure, AGENTS.md, and default skill |
|
|
299
|
+
| `init --create-repo [name]` | Scaffold + create a new GitHub repo (private default) |
|
|
300
|
+
| `init --from-repo <url>` | Scaffold + import from an existing repo |
|
|
301
|
+
| `attach --instance <name-or-id>` | Bind project to a runtime instance |
|
|
302
|
+
| `generate` | Codegen typed workspace constants to `.loxtep/generated/index.ts` |
|
|
303
|
+
| `test <module> --event <file>` | Run a workflow module locally with sample event(s) |
|
|
304
|
+
| `deploy` | Compile modules, validate resources, deploy to workflow engine |
|
|
207
305
|
| `config list` | Show api_url, organization_id, project_id, instance_id |
|
|
208
306
|
| `config paths` | Show resolved URLs for auth and SDK path matrix |
|
|
209
307
|
| `config set <key> <value>` | Set api_url \| organization_id \| project_id \| instance_id |
|
|
@@ -215,15 +313,14 @@ for await (const event of filterStream(
|
|
|
215
313
|
| `data-products create --name … --domain-id …` | Create data product |
|
|
216
314
|
| `data-products query <id> <SQL>` | Run SQL in data product context (or `--file query.sql`) |
|
|
217
315
|
| `data-products tables <id>` | List tables for data product |
|
|
218
|
-
| `
|
|
219
|
-
| `
|
|
220
|
-
| `
|
|
221
|
-
| `workflows list [--project-id <id>]` | List workflows |
|
|
316
|
+
| `workflows list [--project-id <id>]` | List workflows (project_id required or from config) |
|
|
317
|
+
| `workflows get <id>` | Get workflow by id (with nodes) |
|
|
318
|
+
| `workflows create --name <n> --project-id <id>` | Create workflow (optional: `--template-id`, `--description`) |
|
|
222
319
|
| `workflows deploy --project-id <id>` | Deploy workflow (optional: `--instance-id`, `--version-id`) |
|
|
223
|
-
| `
|
|
224
|
-
| `
|
|
225
|
-
| `
|
|
226
|
-
| `
|
|
320
|
+
| `triggers list` | List triggers (ingest source bindings) |
|
|
321
|
+
| `triggers get <id>` | Get trigger by id |
|
|
322
|
+
| `triggers create --name <n> --type <t> --key <k>` | Create trigger |
|
|
323
|
+
| `triggers test <id>` | Test trigger |
|
|
227
324
|
| `observe status` | Show observability status (bots) |
|
|
228
325
|
| `queue info <data-product-id>` | Queue info by data product id |
|
|
229
326
|
| `queue info --queue <name>` | Queue info by queue name |
|
|
@@ -240,9 +337,8 @@ Examples:
|
|
|
240
337
|
loxtep login
|
|
241
338
|
loxtep whoami
|
|
242
339
|
loxtep data-products list
|
|
243
|
-
loxtep flows list --project-id <project-id>
|
|
244
|
-
loxtep flows get <flow-id>
|
|
245
340
|
loxtep workflows list --project-id <project-id>
|
|
341
|
+
loxtep workflows get <workflow-id>
|
|
246
342
|
loxtep workflows deploy --project-id <id> --instance-id <id>
|
|
247
343
|
loxtep config export --from-connector <connector-id> --format json
|
|
248
344
|
loxtep queue info <data-product-id>
|
|
@@ -31,6 +31,11 @@ export type GraphPatchOp = {
|
|
|
31
31
|
op: 'connect_nodes';
|
|
32
32
|
from_entity_id: string;
|
|
33
33
|
to_entity_id: string;
|
|
34
|
+
} | {
|
|
35
|
+
op: 'connect_nodes_labeled';
|
|
36
|
+
from_entity_id: string;
|
|
37
|
+
to_entity_id: string;
|
|
38
|
+
label: 'approved' | 'rejected' | 'error';
|
|
34
39
|
} | {
|
|
35
40
|
op: 'disconnect_nodes';
|
|
36
41
|
from_entity_id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../src/authoring/compiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../src/authoring/compiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAgD,MAAM,YAAY,CAAC;AACnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAM7D,MAAM,MAAM,YAAY,GACpB;IAAE,EAAE,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,M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,EAAE,kBAAkB,EACvB,GAAG,EAAE,iBAAiB,GACrB,gBAAgB,CAwDlB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC/B,GAAG,EAAE,iBAAiB,GACrB;IAAE,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,GAAG,EAAE,YAAY,EAAE,CAAA;CAAE,CAYjF"}
|
|
@@ -82,6 +82,140 @@ function resolveWorkflowId(workflowName, ctx) {
|
|
|
82
82
|
return match?.data.id;
|
|
83
83
|
}
|
|
84
84
|
// ────────────────────────────────────────────────────────────────────────────
|
|
85
|
+
// Node compile-time validation (R10.3)
|
|
86
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
87
|
+
/**
|
|
88
|
+
* Validate declared nodes before lowering. Fail fast if:
|
|
89
|
+
* 1. Any node has an `upstream` that cannot be resolved to a known node name
|
|
90
|
+
* 2. Any ApprovalNodeSpec lacks at least one labeled downstream connection
|
|
91
|
+
*
|
|
92
|
+
* The `knownNames` map is seeded with trigger/handler names before this runs,
|
|
93
|
+
* and we also consider other declared node names as valid references.
|
|
94
|
+
*/
|
|
95
|
+
function validateNodes(nodes, seedNames) {
|
|
96
|
+
// Build the full set of known names: seed names (triggers, handler) + all declared node names
|
|
97
|
+
const knownNames = new Set(seedNames.keys());
|
|
98
|
+
for (const node of nodes) {
|
|
99
|
+
knownNames.add(node.name);
|
|
100
|
+
}
|
|
101
|
+
for (const node of nodes) {
|
|
102
|
+
// Validate upstream is resolvable
|
|
103
|
+
if (!knownNames.has(node.upstream)) {
|
|
104
|
+
throw new Error(`Node "${node.name}" has upstream "${node.upstream}" which does not resolve to any known node.`);
|
|
105
|
+
}
|
|
106
|
+
// Validate ApprovalNodeSpec has at least one labeled downstream
|
|
107
|
+
if (node.kind === 'approval') {
|
|
108
|
+
if (!node.approved && !node.rejected) {
|
|
109
|
+
throw new Error(`Approval node "${node.name}" must have at least one labeled downstream connection (approved or rejected).`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
115
|
+
// Node lowering helpers
|
|
116
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
117
|
+
/**
|
|
118
|
+
* Lower the `nodes` array from a DataWorkflowModule into graph patch ops.
|
|
119
|
+
*
|
|
120
|
+
* For each declared node:
|
|
121
|
+
* - Emits an `add_node` op with the correct entity_type and config
|
|
122
|
+
* - Emits a `connect_nodes` op from the resolved upstream node
|
|
123
|
+
* - For ApprovalNodeSpec: emits `connect_nodes_labeled` for approved/rejected paths
|
|
124
|
+
* - For AgentNodeSpec: emits `connect_nodes_labeled` for error path
|
|
125
|
+
*
|
|
126
|
+
* The `nameToEntityId` map provides resolution of node names to entity_ids,
|
|
127
|
+
* seeded with trigger and handler entity ids before processing nodes.
|
|
128
|
+
*/
|
|
129
|
+
function lowerNodes(nodes, workflowName, nameToEntityId) {
|
|
130
|
+
const ops = [];
|
|
131
|
+
// First pass: assign entity_ids for all declared nodes so cross-references resolve
|
|
132
|
+
for (const node of nodes) {
|
|
133
|
+
const entityId = nodeId(workflowName, `node_${node.name}`);
|
|
134
|
+
nameToEntityId.set(node.name, entityId);
|
|
135
|
+
}
|
|
136
|
+
// Second pass: emit ops for each node
|
|
137
|
+
for (const node of nodes) {
|
|
138
|
+
const entityId = nameToEntityId.get(node.name);
|
|
139
|
+
if (node.kind === 'approval') {
|
|
140
|
+
// Emit add_node for approval
|
|
141
|
+
const entity = {
|
|
142
|
+
approval_node_id: entityId,
|
|
143
|
+
name: node.name,
|
|
144
|
+
approval_channel: node.approvalChannel,
|
|
145
|
+
timeout_hours: node.timeoutHours,
|
|
146
|
+
};
|
|
147
|
+
if (node.description !== undefined) {
|
|
148
|
+
entity.description = node.description;
|
|
149
|
+
}
|
|
150
|
+
ops.push({ op: 'add_node', entity_type: 'approvals', entity });
|
|
151
|
+
// Emit connect_nodes from upstream
|
|
152
|
+
const upstreamId = nameToEntityId.get(node.upstream);
|
|
153
|
+
if (upstreamId) {
|
|
154
|
+
ops.push({ op: 'connect_nodes', from_entity_id: upstreamId, to_entity_id: entityId });
|
|
155
|
+
}
|
|
156
|
+
// Emit connect_nodes_labeled for approved path
|
|
157
|
+
if (node.approved) {
|
|
158
|
+
const approvedId = nameToEntityId.get(node.approved);
|
|
159
|
+
if (approvedId) {
|
|
160
|
+
ops.push({
|
|
161
|
+
op: 'connect_nodes_labeled',
|
|
162
|
+
from_entity_id: entityId,
|
|
163
|
+
to_entity_id: approvedId,
|
|
164
|
+
label: 'approved',
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// Emit connect_nodes_labeled for rejected path
|
|
169
|
+
if (node.rejected) {
|
|
170
|
+
const rejectedId = nameToEntityId.get(node.rejected);
|
|
171
|
+
if (rejectedId) {
|
|
172
|
+
ops.push({
|
|
173
|
+
op: 'connect_nodes_labeled',
|
|
174
|
+
from_entity_id: entityId,
|
|
175
|
+
to_entity_id: rejectedId,
|
|
176
|
+
label: 'rejected',
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else if (node.kind === 'agent') {
|
|
182
|
+
// Emit add_node for agent
|
|
183
|
+
const entity = {
|
|
184
|
+
agent_node_id: entityId,
|
|
185
|
+
name: node.name,
|
|
186
|
+
model_id: node.modelId,
|
|
187
|
+
prompt_template: node.promptTemplate,
|
|
188
|
+
timeout_seconds: node.timeoutSeconds ?? 30,
|
|
189
|
+
};
|
|
190
|
+
if (node.outputSchema !== undefined) {
|
|
191
|
+
entity.output_schema = node.outputSchema;
|
|
192
|
+
}
|
|
193
|
+
if (node.description !== undefined) {
|
|
194
|
+
entity.description = node.description;
|
|
195
|
+
}
|
|
196
|
+
ops.push({ op: 'add_node', entity_type: 'agents', entity });
|
|
197
|
+
// Emit connect_nodes from upstream
|
|
198
|
+
const upstreamId = nameToEntityId.get(node.upstream);
|
|
199
|
+
if (upstreamId) {
|
|
200
|
+
ops.push({ op: 'connect_nodes', from_entity_id: upstreamId, to_entity_id: entityId });
|
|
201
|
+
}
|
|
202
|
+
// Emit connect_nodes_labeled for error path
|
|
203
|
+
if (node.error) {
|
|
204
|
+
const errorId = nameToEntityId.get(node.error);
|
|
205
|
+
if (errorId) {
|
|
206
|
+
ops.push({
|
|
207
|
+
op: 'connect_nodes_labeled',
|
|
208
|
+
from_entity_id: entityId,
|
|
209
|
+
to_entity_id: errorId,
|
|
210
|
+
label: 'error',
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return { ops };
|
|
217
|
+
}
|
|
218
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
85
219
|
// Public API
|
|
86
220
|
// ────────────────────────────────────────────────────────────────────────────
|
|
87
221
|
/**
|
|
@@ -124,6 +258,21 @@ export function compileModule(mod, ctx) {
|
|
|
124
258
|
to_entity_id: handler.entityId,
|
|
125
259
|
});
|
|
126
260
|
}
|
|
261
|
+
// Lower declarative nodes (approval gates, agent invocations) if present (R9.3, R9.4, R10.1, R10.2)
|
|
262
|
+
if (mod.nodes && mod.nodes.length > 0) {
|
|
263
|
+
// Build name-to-entityId map seeded with trigger/handler nodes
|
|
264
|
+
const nameToEntityId = new Map();
|
|
265
|
+
// Register trigger nodes by their constructed names (trigger_0, trigger_1, ...)
|
|
266
|
+
for (let i = 0; i < triggerEntityIds.length; i++) {
|
|
267
|
+
nameToEntityId.set(`trigger_${i}`, triggerEntityIds[i]);
|
|
268
|
+
}
|
|
269
|
+
// Register the handler node
|
|
270
|
+
nameToEntityId.set('handler', handler.entityId);
|
|
271
|
+
// Compile-time validation (R10.3): fail fast before emitting ops
|
|
272
|
+
validateNodes(mod.nodes, nameToEntityId);
|
|
273
|
+
const nodeResult = lowerNodes(mod.nodes, mod.name, nameToEntityId);
|
|
274
|
+
ops.push(...nodeResult.ops);
|
|
275
|
+
}
|
|
127
276
|
return {
|
|
128
277
|
name: mod.name,
|
|
129
278
|
...(workflow_id !== undefined ? { workflow_id } : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.js","sourceRoot":"","sources":["../../src/authoring/compiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"compiler.js","sourceRoot":"","sources":["../../src/authoring/compiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA0CH,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,oEAAoE;AACpE,SAAS,MAAM,CAAC,YAAoB,EAAE,MAAc;IAClD,OAAO,GAAG,YAAY,KAAK,MAAM,EAAE,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CACnB,OAAoB,EACpB,YAAoB,EACpB,KAAa;IAEb,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,EAAE,WAAW,KAAK,EAAE,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAkB,EAAE,CAAC;IAE/B,MAAM,MAAM,GAA4B;QACtC,aAAa,EAAE,QAAQ;QACvB,IAAI,EAAE,GAAG,YAAY,YAAY,KAAK,EAAE;QACxC,YAAY,EAAE,OAAO,CAAC,IAAI;KAC3B,CAAC;IAEF,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;QAEtC,iCAAiC;QACjC,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,O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