@loxtep/sdk 0.11.1 → 0.13.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cli/commands/attach-cmd.d.ts +1 -1
  3. package/dist/cli/commands/attach-cmd.js +1 -1
  4. package/dist/cli/commands/delivery-cmd.d.ts +1 -0
  5. package/dist/cli/commands/delivery-cmd.d.ts.map +1 -1
  6. package/dist/cli/commands/delivery-cmd.js +60 -44
  7. package/dist/cli/commands/delivery-cmd.js.map +1 -1
  8. package/dist/cli/commands/ingest-cmd.d.ts +1 -0
  9. package/dist/cli/commands/ingest-cmd.d.ts.map +1 -1
  10. package/dist/cli/commands/ingest-cmd.js +37 -24
  11. package/dist/cli/commands/ingest-cmd.js.map +1 -1
  12. package/dist/cli/commands/start-cmd.d.ts +25 -0
  13. package/dist/cli/commands/start-cmd.d.ts.map +1 -0
  14. package/dist/cli/commands/start-cmd.js +145 -0
  15. package/dist/cli/commands/start-cmd.js.map +1 -0
  16. package/dist/cli/commands/transform-cmd.d.ts +1 -0
  17. package/dist/cli/commands/transform-cmd.d.ts.map +1 -1
  18. package/dist/cli/commands/transform-cmd.js +36 -23
  19. package/dist/cli/commands/transform-cmd.js.map +1 -1
  20. package/dist/cli/help.d.ts.map +1 -1
  21. package/dist/cli/help.js +9 -3
  22. package/dist/cli/help.js.map +1 -1
  23. package/dist/cli/index.d.ts.map +1 -1
  24. package/dist/cli/index.js +576 -515
  25. package/dist/cli/index.js.map +1 -1
  26. package/dist/cli/setup-prompt.d.ts +2 -0
  27. package/dist/cli/setup-prompt.d.ts.map +1 -0
  28. package/dist/cli/setup-prompt.js +3 -0
  29. package/dist/cli/setup-prompt.js.map +1 -0
  30. package/dist/client/data-products.d.ts +10 -8
  31. package/dist/client/data-products.d.ts.map +1 -1
  32. package/dist/client/data-products.js +142 -93
  33. package/dist/client/data-products.js.map +1 -1
  34. package/dist/client/flow-types.d.ts +16 -6
  35. package/dist/client/flow-types.d.ts.map +1 -1
  36. package/dist/client/flow-types.js +6 -1
  37. package/dist/client/flow-types.js.map +1 -1
  38. package/dist/client/index.d.ts +89 -88
  39. package/dist/client/index.d.ts.map +1 -1
  40. package/dist/client/index.js +13 -12
  41. package/dist/client/index.js.map +1 -1
  42. package/dist/client/projects-types.d.ts +1 -1
  43. package/dist/client/queues.d.ts +5 -3
  44. package/dist/client/queues.d.ts.map +1 -1
  45. package/dist/client/queues.js +26 -21
  46. package/dist/client/queues.js.map +1 -1
  47. package/dist/client/workflows.d.ts +7 -7
  48. package/dist/client/workflows.d.ts.map +1 -1
  49. package/dist/client/workflows.js +71 -63
  50. package/dist/client/workflows.js.map +1 -1
  51. package/dist/lib/sdk-ingest-bundle.d.ts +5 -1
  52. package/dist/lib/sdk-ingest-bundle.d.ts.map +1 -1
  53. package/dist/lib/sdk-ingest-bundle.js +38 -29
  54. package/dist/lib/sdk-ingest-bundle.js.map +1 -1
  55. package/dist/rstreams/event-bridge.d.ts +4 -4
  56. package/dist/rstreams/event-bridge.d.ts.map +1 -1
  57. package/dist/rstreams/event-bridge.js +23 -16
  58. package/dist/rstreams/event-bridge.js.map +1 -1
  59. package/docs/event-writer-transport-modes.md +47 -0
  60. package/docs/getting-started.md +19 -0
  61. package/docs/sdk-first-ingest.md +14 -12
  62. package/docs/sdk-mcp-mapping.md +8 -3
  63. package/package.json +1 -1
  64. package/schemas/entity-json-schemas/SCHEMA_SYNC.md +1 -1
  65. package/schemas/entity-json-schemas/SOURCE.json +5 -4
  66. package/schemas/entity-json-schemas/connection.json +35 -0
  67. package/schemas/entity-json-schemas/data-product.json +16 -0
  68. package/schemas/entity-json-schemas/grant.json +146 -0
  69. package/schemas/entity-json-schemas/transformation.json +19 -0
@@ -2,10 +2,10 @@
2
2
  * Build local-first SDK ingest workflow package files
3
3
  * (connector + workflow + connection + source data product).
4
4
  */
5
- import { randomUUID } from 'node:crypto';
6
- import { EntityType, validateEntity } from './entity-json-schemas/index.js';
5
+ import { randomUUID } from "node:crypto";
6
+ import { EntityType, validateEntity } from "./entity-json-schemas/index.js";
7
7
  /** Placeholder starter template id for SDK-provisioned ingestion flows. */
8
- export const SDK_INGEST_TEMPLATE_ID = '00000000-0000-4000-8000-0000000000a1';
8
+ export const SDK_INGEST_TEMPLATE_ID = "00000000-0000-4000-8000-0000000000a1";
9
9
  /**
10
10
  * Map an API connector (or stub) into a schema-valid local connector entity.
11
11
  * Entity schema uses catalog-style fields (name, category, auth_type) that differ
@@ -13,9 +13,9 @@ export const SDK_INGEST_TEMPLATE_ID = '00000000-0000-4000-8000-0000000000a1';
13
13
  */
14
14
  export function toLocalConnectorEntity(connector, now = new Date().toISOString()) {
15
15
  const meta = connector.metadata ?? {};
16
- const name = (typeof meta.name === 'string' && meta.name.trim()) ||
16
+ const name = (typeof meta.name === "string" && meta.name.trim()) ||
17
17
  `${connector.connector_type} connector`;
18
- const description = (typeof meta.description === 'string' && meta.description.trim()) ||
18
+ const description = (typeof meta.description === "string" && meta.description.trim()) ||
19
19
  `Local stub for ${connector.connector_type} connector`;
20
20
  return {
21
21
  connector_id: connector.connector_id,
@@ -23,11 +23,11 @@ export function toLocalConnectorEntity(connector, now = new Date().toISOString()
23
23
  connector_type: connector.connector_type,
24
24
  name,
25
25
  description,
26
- category: 'custom',
26
+ category: "custom",
27
27
  // Entity schema enum has no "jwt"; use custom and keep API auth in metadata.
28
- auth_type: 'custom',
29
- version: '1.0.0',
30
- metadata: { ...meta, sdk_auth_type: 'jwt' },
28
+ auth_type: "custom",
29
+ version: "1.0.0",
30
+ metadata: { ...meta, sdk_auth_type: "jwt" },
31
31
  created_at: connector.created_at ?? now,
32
32
  updated_at: connector.updated_at ?? now,
33
33
  };
@@ -41,7 +41,7 @@ export function buildSdkIngestLocalPackage(params) {
41
41
  const connectionId = params.connection_id ?? randomUUID();
42
42
  const dataProductId = params.data_product_id ?? randomUUID();
43
43
  const now = new Date().toISOString();
44
- const workflowName = params.workflow_name ?? 'SDK App Events Ingest';
44
+ const workflowName = params.workflow_name ?? "SDK App Events Ingest";
45
45
  const files = {};
46
46
  if (params.include_connector_file !== false && params.connector) {
47
47
  files[`connectors/${params.connector_id}.json`] = toLocalConnectorEntity(params.connector, now);
@@ -52,11 +52,11 @@ export function buildSdkIngestLocalPackage(params) {
52
52
  project_id: params.project_id,
53
53
  name: workflowName,
54
54
  template_id: SDK_INGEST_TEMPLATE_ID,
55
- workflow_type: 'ingestion',
55
+ workflow_type: "ingestion",
56
56
  domain_id: params.domain_id,
57
- status: 'active',
57
+ status: "active",
58
58
  configuration: {},
59
- metadata: { ingestion_method: 'sdk' },
59
+ metadata: { ingestion_method: "sdk" },
60
60
  created_at: now,
61
61
  updated_at: now,
62
62
  };
@@ -66,14 +66,17 @@ export function buildSdkIngestLocalPackage(params) {
66
66
  project_id: params.project_id,
67
67
  workflow_id: workflowId,
68
68
  connector_id: params.connector_id,
69
- key: 'sdk-input',
70
- name: 'SDK Input',
71
- type: 'sdk',
72
- status: 'active',
69
+ key: "sdk-input",
70
+ name: "SDK Input",
71
+ type: "sdk",
72
+ status: "active",
73
73
  configuration: {
74
- sdk_type: 'nodejs',
74
+ sdk_type: "nodejs",
75
75
  event_type: params.data_product_name,
76
76
  },
77
+ runtime_settings: {
78
+ event_writer: { transport_mode: params.transport_mode ?? "default" },
79
+ },
77
80
  created_at: now,
78
81
  updated_at: now,
79
82
  };
@@ -82,18 +85,18 @@ export function buildSdkIngestLocalPackage(params) {
82
85
  organization_id: params.organization_id,
83
86
  workflow_id: workflowId,
84
87
  upstream_entity_id: connectionId,
85
- upstream_entity_type: 'connections',
88
+ upstream_entity_type: "connections",
86
89
  domain_id: params.domain_id,
87
90
  name: params.data_product_name,
88
- status: 'draft',
91
+ status: "draft",
89
92
  governance: {
90
- classification: 'internal',
93
+ classification: "internal",
91
94
  pii_fields: [],
92
95
  compliance_requirements: [],
93
96
  tags: [],
94
97
  },
95
98
  metadata: {
96
- kind: 'source',
99
+ kind: "source",
97
100
  project_id: params.project_id,
98
101
  },
99
102
  created_at: now,
@@ -105,7 +108,8 @@ export function buildSdkIngestLocalPackage(params) {
105
108
  if (params.user_id) {
106
109
  dataProduct.owner = { user_id: params.user_id };
107
110
  }
108
- files[`workflows/${workflowId}/data-products/${dataProductId}.json`] = dataProduct;
111
+ files[`workflows/${workflowId}/data-products/${dataProductId}.json`] =
112
+ dataProduct;
109
113
  return {
110
114
  workflow_id: workflowId,
111
115
  connection_id: connectionId,
@@ -119,10 +123,13 @@ export function buildSdkIngestLocalPackage(params) {
119
123
  * Flat bundle map for `save_workflow_bundle` / `bundle save` (workflow-relative keys).
120
124
  */
121
125
  export function buildSdkIngestBundle(params) {
122
- const local = buildSdkIngestLocalPackage({ ...params, include_connector_file: false });
126
+ const local = buildSdkIngestLocalPackage({
127
+ ...params,
128
+ include_connector_file: false,
129
+ });
123
130
  const wf = local.workflow_id;
124
131
  const files = {
125
- 'workflow.json': local.files[`workflows/${wf}/workflow.json`],
132
+ "workflow.json": local.files[`workflows/${wf}/workflow.json`],
126
133
  [`connections/${local.connection_id}.json`]: local.files[`workflows/${wf}/connections/${local.connection_id}.json`],
127
134
  [`data-products/${local.data_product_id}.json`]: local.files[`workflows/${wf}/data-products/${local.data_product_id}.json`],
128
135
  };
@@ -139,16 +146,18 @@ export function validateSdkIngestPackageFiles(files) {
139
146
  const errors = [];
140
147
  for (const [path, entity] of Object.entries(files)) {
141
148
  let entityType = null;
142
- if (path.startsWith('connectors/') && path.endsWith('.json')) {
149
+ if (path.startsWith("connectors/") && path.endsWith(".json")) {
143
150
  entityType = EntityType.CONNECTOR;
144
151
  }
145
- else if (path.endsWith('/workflow.json') || path === 'workflow.json') {
152
+ else if (path.endsWith("/workflow.json") || path === "workflow.json") {
146
153
  entityType = EntityType.WORKFLOW;
147
154
  }
148
- else if (path.includes('/connections/') || path.startsWith('connections/')) {
155
+ else if (path.includes("/connections/") ||
156
+ path.startsWith("connections/")) {
149
157
  entityType = EntityType.CONNECTION;
150
158
  }
151
- else if (path.includes('/data-products/') || path.startsWith('data-products/')) {
159
+ else if (path.includes("/data-products/") ||
160
+ path.startsWith("data-products/")) {
152
161
  entityType = EntityType.DATA_PRODUCT;
153
162
  }
154
163
  if (!entityType)
@@ -1 +1 @@
1
- {"version":3,"file":"sdk-ingest-bundle.js","sourceRoot":"","sources":["../../src/lib/sdk-ingest-bundle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAE5E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,sCAAsC,CAAC;AAuC7E;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACpC,SAAyC,EACzC,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;IAE9B,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC;IACtC,MAAM,IAAI,GACR,CAAC,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACnD,GAAG,SAAS,CAAC,cAAc,YAAY,CAAC;IAC1C,MAAM,WAAW,GACf,CAAC,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACjE,kBAAkB,SAAS,CAAC,cAAc,YAAY,CAAC;IAEzD,OAAO;QACL,YAAY,EAAE,SAAS,CAAC,YAAY;QACpC,eAAe,EAAE,SAAS,CAAC,eAAe;QAC1C,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,IAAI;QACJ,WAAW;QACX,QAAQ,EAAE,QAAQ;QAClB,6EAA6E;QAC7E,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,EAAE,GAAG,IAAI,EAAE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CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,IAAI,KAAK,eAAe,EAAE,CAAC;YACvE,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC;QACnC,CAAC;aAAM,IACL,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;YAC9B,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAC/B,CAAC;YACD,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACrC,CAAC;aAAM,IACL,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAChC,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EACjC,CAAC;YACD,UAAU,GAAG,UAAU,CAAC,YAAY,CAAC;QACvC,CAAC;QAED,IAAI,CAAC,UAAU;YAAE,SAAS;QAE1B,MAAM,MAAM,GAAG,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YACnC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;gBAChC,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE;oBAC1B,WAAW,EAAE,UAAU;oBACvB,OAAO,EAAE,GAAG,CAAC,OAAO;iBACrB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Map stream read wrappers to the SDK queue event shape; write payloads via putEvent / putEvents.
3
3
  */
4
- import type { RStreamsSdk } from 'leo-sdk';
5
- import type { QueueEvent, WriteOptions } from '../client/queue-types.js';
6
- import type { FlowWriter } from '../client/flow-types.js';
4
+ import type { RStreamsSdk } from "leo-sdk";
5
+ import type { QueueEvent, WriteOptions } from "../client/queue-types.js";
6
+ import { type EventWriterTransportMode, type FlowWriter } from "../client/flow-types.js";
7
7
  /**
8
8
  * Build the rstreams envelope for a business object. The source bot is set by the writer
9
9
  * (`rsdk.load(botId, …)`), so we deliberately emit NO top-level `id` — in rstreams that is the
@@ -20,7 +20,7 @@ export declare function toLeoEnvelope(businessObject: unknown, options?: WriteOp
20
20
  * Stream `error` events (e.g. Kinesis ResourceNotFoundException) are captured and cause
21
21
  * `close()` / subsequent `write()` to reject/throw instead of becoming an unhandled rejection.
22
22
  */
23
- export declare function createQueueWriter(rsdk: RStreamsSdk, botId: string, queueName: string, closedError: () => Error): FlowWriter;
23
+ export declare function createQueueWriter(rsdk: RStreamsSdk, botId: string, queueName: string, closedError: () => Error, transportMode?: EventWriterTransportMode): FlowWriter;
24
24
  /**
25
25
  * Read up to `limit` events from `inQueue` acting as bot `id`, then return (mapped events, last start for next page).
26
26
  * Uses one offloadEvents invocation per batch (stream checkpoints advance between calls).
@@ -1 +1 @@
1
- {"version":3,"file":"event-bridge.d.ts","sourceRoot":"","sources":["../../src/rstreams/event-bridge.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAwB1D;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,cAAc,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQtG;AAeD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,KAAK,GACvB,UAAU,CA+DZ;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAAC,UAAU,EAAE,M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CAAC,CA2B/B"}
@@ -1,16 +1,17 @@
1
1
  /**
2
2
  * Map stream read wrappers to the SDK queue event shape; write payloads via putEvent / putEvents.
3
3
  */
4
+ import { parseEventWriterTransportMode, } from "../client/flow-types.js";
4
5
  function readEventToQueueEvent(wrapper) {
5
6
  const w = wrapper;
6
- const event_id = (typeof w.id === 'string' && w.id) ||
7
- (typeof w.eid === 'string' && w.eid) ||
8
- (typeof w.event_id === 'string' &&
7
+ const event_id = (typeof w.id === "string" && w.id) ||
8
+ (typeof w.eid === "string" && w.eid) ||
9
+ (typeof w.event_id === "string" &&
9
10
  w.event_id) ||
10
- '';
11
+ "";
11
12
  return {
12
13
  event_id,
13
- event_type: typeof w.event === 'string' ? w.event : undefined,
14
+ event_type: typeof w.event === "string" ? w.event : undefined,
14
15
  payload: (w.payload ?? w),
15
16
  correlation_id: w.correlation_id,
16
17
  };
@@ -25,7 +26,7 @@ export function toLeoEnvelope(businessObject, options) {
25
26
  const env = { payload: businessObject };
26
27
  const ts = options?.event_source_timestamp;
27
28
  if (ts != null) {
28
- const ms = typeof ts === 'number' ? ts : Date.parse(String(ts));
29
+ const ms = typeof ts === "number" ? ts : Date.parse(String(ts));
29
30
  if (!Number.isNaN(ms))
30
31
  env.event_source_timestamp = ms;
31
32
  }
@@ -43,15 +44,21 @@ function asError(err) {
43
44
  * Stream `error` events (e.g. Kinesis ResourceNotFoundException) are captured and cause
44
45
  * `close()` / subsequent `write()` to reject/throw instead of becoming an unhandled rejection.
45
46
  */
46
- export function createQueueWriter(rsdk, botId, queueName, closedError) {
47
- const stream = rsdk.load(botId, queueName);
47
+ export function createQueueWriter(rsdk, botId, queueName, closedError, transportMode = "default") {
48
+ const resolvedTransportMode = parseEventWriterTransportMode(transportMode);
49
+ const transportOptions = resolvedTransportMode === "fast"
50
+ ? { useS3: false }
51
+ : resolvedTransportMode === "volume"
52
+ ? { useS3: false, firehose: true }
53
+ : { useS3: true };
54
+ const stream = rsdk.load(botId, queueName, transportOptions);
48
55
  let closed = false;
49
56
  let streamError = null;
50
57
  const onStreamError = (err) => {
51
58
  streamError = asError(err);
52
59
  };
53
- if (typeof stream.on === 'function') {
54
- stream.on('error', onStreamError);
60
+ if (typeof stream.on === "function") {
61
+ stream.on("error", onStreamError);
55
62
  }
56
63
  return {
57
64
  write(event, options) {
@@ -88,10 +95,10 @@ export function createQueueWriter(rsdk, botId, queueName, closedError) {
88
95
  settled = true;
89
96
  resolve();
90
97
  };
91
- if (typeof stream.once === 'function') {
92
- stream.once('error', fail);
98
+ if (typeof stream.once === "function") {
99
+ stream.once("error", fail);
93
100
  }
94
- stream.end(err => {
101
+ stream.end((err) => {
95
102
  if (err) {
96
103
  fail(err);
97
104
  return;
@@ -102,8 +109,8 @@ export function createQueueWriter(rsdk, botId, queueName, closedError) {
102
109
  });
103
110
  }
104
111
  finally {
105
- if (typeof stream.removeListener === 'function') {
106
- stream.removeListener('error', onStreamError);
112
+ if (typeof stream.removeListener === "function") {
113
+ stream.removeListener("error", onStreamError);
107
114
  }
108
115
  }
109
116
  },
@@ -120,7 +127,7 @@ export async function readQueueBatch(rsdk, id, inQueue, limit, start) {
120
127
  start: start ?? undefined,
121
128
  transform(_payload, wrapper, callback) {
122
129
  collected.push(readEventToQueueEvent(wrapper));
123
- if (typeof callback === 'function')
130
+ if (typeof callback === "function")
124
131
  callback();
125
132
  },
126
133
  });
@@ -1 +1 @@
1
- {"version":3,"file":"event-bridge.js","sourceRoot":"","sources":["../../src/rstreams/event-bridge.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,SAAS,qBAAqB,CAAI,OAAqB;IACrD,MAAM,CAAC,GAAG,OAMT,CAAC;IACF,MAAM,QAAQ,GACZ,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,QAAQ,IAAI,CAAC,CAAC,EAAE,CAAC;QAClC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC;QACpC,CAAC,OAAQ,CAA2B,CAAC,Q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T,IAAI,OAAO,MAAM,CAAC,cAAc,KAAK,UAAU,EAAE,CAAC;oBAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;gBAChD,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAWD,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,IAAiB,EACjB,EAAU,EACV,OAAe,EACf,KAAa,EACb,KAAqB;IAErB,MAAM,SAAS,GAAiB,EAAE,CAAC;IACnC,yFAAyF;IACzF,MACE,IAGD,CAAC,aAAa,CAAC;QACd,EAAE;QACF,OAAO;QACP,KAAK;QACL,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,KAAK,IAAI,SAAS;QACzB,SAAS,CACP,QAAW,EACX,OAAqB,EACrB,QAAkC;YAElC,SAAS,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC;YAC/C,IAAI,OAAO,QAAQ,KAAK,UAAU;gBAAE,QAAQ,EAAE,CAAC;QACjD,CAAC;KACF,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC7C,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,IAAI,EAAE,QAAQ,IAAI,SAAS;KACxC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,47 @@
1
+ # Event writer transport modes
2
+
3
+ Node and Python event writers use `default` unless you explicitly select a
4
+ different mode.
5
+
6
+ | Mode | Best for | Tradeoff |
7
+ | --------- | -------------------------------- | ------------------------------------------- |
8
+ | `default` | Most application and pipeline IO | Durable, balanced, and recommended |
9
+ | `fast` | Lowest publish latency | Direct publishing may cost more |
10
+ | `volume` | Sustained high throughput | Throughput batching introduces delivery lag |
11
+
12
+ ## Node
13
+
14
+ ```ts
15
+ const writer = await client.get_writer("orders", {
16
+ transport_mode: "default",
17
+ });
18
+ ```
19
+
20
+ The top-level data-product writer, low-level workflow writer, and queue writer
21
+ all accept the same values.
22
+
23
+ ## Python
24
+
25
+ ```python
26
+ writer = client.get_writer("orders", transport_mode="default")
27
+ ```
28
+
29
+ Sync and async data-product and low-level workflow writers accept the same
30
+ values.
31
+
32
+ ## CLI and MCP
33
+
34
+ ```bash
35
+ loxtep ingest create --name orders --transport-mode default
36
+ loxtep transform create --from orders --transport-mode fast
37
+ loxtep delivery create --from orders --connector-id <id> --transport-mode volume
38
+ ```
39
+
40
+ The CLI writes the setting to
41
+ `runtime_settings.event_writer.transport_mode` in the generated entity JSON.
42
+ MCP uses the same field in `save_workflow_bundle`; retrieve the current contract
43
+ with `get_entity_schemas`.
44
+
45
+ Durable writes still publish a small queue notification after storing the event
46
+ batch. A notification transport timeout can therefore affect `default` mode;
47
+ the mode alone does not establish the cause of a transport error.
@@ -23,6 +23,25 @@ write events with `get_writer`.
23
23
  > or the **Web UI** at [app.loxtep.io](https://app.loxtep.io).
24
24
  > Overview: [Loxtep Quickstart](https://app.loxtep.io/docs/quickstart/quickstart).
25
25
 
26
+ ## Start with your coding agent
27
+
28
+ With Node.js 22.20 or newer, run:
29
+
30
+ ```bash
31
+ npx --package @loxtep/sdk loxtep start
32
+ ```
33
+
34
+ The starter detects Claude Code, Codex, OpenCode, or Cursor Agent, installs the
35
+ integration, and launches the agent with the canonical setup prompt. If several
36
+ clients are installed, choose one with `--client claude|codex|opencode|cursor`.
37
+ Use `--no-launch` to configure and print the prompt for a manual restart.
38
+ Normal Loxtep signup and hosted OAuth are required. This path does not require
39
+ SDK login, a project attachment, or copied credentials. Existing client settings
40
+ are preserved; conflicting Loxtep entries must be reviewed instead of overwritten.
41
+ The agent then discovers authorized context or offers a synthetic policy example
42
+ in an empty org, and verifies an answer with scoped retrieval and citations.
43
+
44
+
26
45
  ## Table of Contents
27
46
 
28
47
  - [Prerequisites](#prerequisites)
@@ -64,15 +64,17 @@ The SDK reads your workspace (`.loxtep/project.json` + credentials). No manual
64
64
  URL or token wiring.
65
65
 
66
66
  ```typescript
67
- import { LoxtepClient } from '@loxtep/sdk';
67
+ import { LoxtepClient } from "@loxtep/sdk";
68
68
 
69
69
  const client = await LoxtepClient.fromWorkspace();
70
70
 
71
- const writer = await client.get_writer('app-events');
71
+ const writer = await client.get_writer("app-events", {
72
+ transport_mode: "default", // durable/recommended; fast may cost more; volume has lag
73
+ });
72
74
 
73
75
  writer.write({
74
- user_id: 'u_1',
75
- action: 'signup',
76
+ user_id: "u_1",
77
+ action: "signup",
76
78
  });
77
79
 
78
80
  await writer.close();
@@ -87,7 +89,7 @@ Use the same name you passed to `ingest provision`.
87
89
 
88
90
  ```typescript
89
91
  const client = await LoxtepClient.fromWorkspace();
90
- const reader = await client.get_reader('app-events');
92
+ const reader = await client.get_reader("app-events");
91
93
 
92
94
  for await (const event of reader) {
93
95
  console.log(event);
@@ -115,12 +117,12 @@ Then `get_writer('app-events')` in your app.
115
117
 
116
118
  ## If something goes wrong
117
119
 
118
- | What you see | What to do |
119
- | ------------ | ---------- |
120
- | Data product not found | Run `data-products list`. Check the name matches `get_writer('…')` exactly. |
121
- | Not ready to accept writes | Run `ingest provision`, then `deploy` (or `ingest provision --deploy`). Make sure you ran `attach` first. |
122
- | Multiple products with the same name | Pass the data product id to `get_writer`, or ensure `attach` points at the right instance. |
123
- | No domain available | Create a domain in the Loxtep UI, or pass `--domain-id` to `ingest provision`. |
120
+ | What you see | What to do |
121
+ | ------------------------------------ | --------------------------------------------------------------------------------------------------------- |
122
+ | Data product not found | Run `data-products list`. Check the name matches `get_writer('…')` exactly. |
123
+ | Not ready to accept writes | Run `ingest provision`, then `deploy` (or `ingest provision --deploy`). Make sure you ran `attach` first. |
124
+ | Multiple products with the same name | Pass the data product id to `get_writer`, or ensure `attach` points at the right instance. |
125
+ | No domain available | Create a domain in the Loxtep UI, or pass `--domain-id` to `ingest provision`. |
124
126
 
125
127
  ---
126
128
 
@@ -136,6 +138,6 @@ or another client, describe what you want in plain language, for example:
136
138
  The assistant provisions the same end state as `ingest provision`. After that,
137
139
  Phase 4 above is unchanged: `get_writer('app-events')` and `write()`.
138
140
 
139
- **Loxtep Studio (web app)** — *Beta.* You can also design and publish a data
141
+ **Loxtep Studio (web app)** — _Beta._ You can also design and publish a data
140
142
  product in the Loxtep UI. Once it exists on your instance, the SDK code in
141
143
  Phase 4 is the same.
@@ -4,12 +4,17 @@ This is a **guide for agents**, not an exhaustive OpenAPI listing. MCP stays on
4
4
  **HTTP**; the SDK adds **typed REST** and the **stream data plane** for live
5
5
  I/O.
6
6
 
7
- The SDK exposes **10 namespaces** that mirror hosted MCP tools, plus HTTP
7
+ Hosted MCP exposes **11 tools**: ten job facades plus the MCP Apps-only
8
+ `loxtep_package_review` review card. The SDK exposes **10 namespaces** that
9
+ mirror the job facades, plus HTTP
8
10
  namespaces `client.governance` (policies and access requests) and
9
11
  `client.entities` (projection inference). Old flat namespaces
10
12
  (`data_products`, `workflows`, `connectors`, …) are **removed** — no
11
- deprecation aliases. `emit_semantic_gap_candidate` stays MCP-only: it enqueues
12
- inside the AI lambda and has no HTTP route.
13
+ deprecation aliases. The package-review card is not an SDK namespace.
14
+
15
+ Current MCP-only operations also include delivery grant list/get/save/update,
16
+ organization ontology inference start/get/cancel/list/review, and
17
+ `emit_semantic_gap_candidate`; do not invent SDK methods for them.
13
18
 
14
19
  | MCP facade | SDK namespace | Nested APIs / notes |
15
20
  | --- | --- | --- |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxtep/sdk",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "description": "Loxtep SDK for Node.js — the Enterprise Context Layer: data products, workflows, projects, queues, and machine-usable context for AI",
5
5
  "author": "Loxtep <engineering@loxtep.io>",
6
6
  "homepage": "https://loxtep.io",
@@ -4,7 +4,7 @@ These JSON Schema draft-07 files are byte-identical copies of the Loxtep platfor
4
4
  single entity-schema source, used by `loxtep lint` and `validateEntity()`.
5
5
 
6
6
  **Source:** `LoxtepInc/loxtep` `platform-backend/_core/src/workspace/entity-json-schemas/`
7
- **Pinned commit:** `4d8f526e7dcc27751d298d87fd32798739274af1` (git blob ids per file in `SOURCE.json`)
7
+ **Pinned commit:** `3046abfeb8e41a2d846a82c4f98c875cc0b98713` (git blob ids per file in `SOURCE.json`)
8
8
 
9
9
  **Sync** (from `nodejs/`, with a loxtep checkout at the commit to pin):
10
10
 
@@ -1,22 +1,23 @@
1
1
  {
2
2
  "repository": "LoxtepInc/loxtep",
3
3
  "path": "platform-backend/_core/src/workspace/entity-json-schemas",
4
- "commit": "4d8f526e7dcc27751d298d87fd32798739274af1",
4
+ "commit": "3046abfeb8e41a2d846a82c4f98c875cc0b98713",
5
5
  "files": {
6
6
  "agent.json": "894158338a8bd3b08b7a042006be0d669aa0fe56",
7
7
  "approval.json": "37cad8aff6e250be2bc8ccb966d97018d48f0663",
8
- "connection.json": "22efeaf02a3142cf89296074b992f0e81f4d3c2b",
8
+ "connection.json": "00c6fedc5a574d02a27655d8f584c8b6a0a91bd5",
9
9
  "connector.json": "712b7f7abb0c06aecd29a76b667950a0eda070d7",
10
10
  "container.json": "3b5b3a51d4f27645e3db2e8e2992aeee984de5ee",
11
11
  "contract.json": "04fec0f7f4c26890e8163d88770a5613316b245d",
12
- "data-product.json": "ebf208b50d0330958daf73bfdd81c1444cc037f0",
12
+ "data-product.json": "e9303aa4e69ba3b0a604bedfef3273a6c6a8323e",
13
13
  "domain.json": "42e83648bdebec54fabdb1ba9f7d7a1369f3ba05",
14
14
  "export.json": "44ef4bb5c21860a66cd57d86e06a66ff7813c225",
15
+ "grant.json": "9ccf2bf26d8aed76723534161a039d47a2dbd7bb",
15
16
  "odps-product.json": "53b8eb5eb070d0d1e60a91fe908e038ee3e5d599",
16
17
  "projection.json": "5457e3f233f936d3fba38bc8513fb99a54961607",
17
18
  "quality-rule.json": "d0c298616b2e20a02256cde2f63acf38f7bb6f3f",
18
19
  "schema.json": "38940cc4e8b59a70cf44699459af0b8a09f0fc52",
19
- "transformation.json": "af95be38f90adafc0c7b9179d454c0593d9b49bd",
20
+ "transformation.json": "75e773049944417892c31f17da15fe393446e6ff",
20
21
  "validation.json": "056452196c622c7bac0bdd496db623ee2e22f083",
21
22
  "workflow-graph.json": "9715eea18965bea97fc5546edb4b37629c77315b",
22
23
  "workflow.json": "afe25e55833ac957bdcd62d32e6c9df83779c54b"
@@ -317,6 +317,41 @@
317
317
  },
318
318
  "additionalProperties": true
319
319
  },
320
+ "runtime_settings": {
321
+ "type": ["object", "null"],
322
+ "description": "Native runtime tuning. Event writes use the default durable mode unless explicitly changed.",
323
+ "properties": {
324
+ "event_writer": {
325
+ "type": ["object", "null"],
326
+ "description": "Event writer behavior for normal outputs, errors, quarantine records, and acknowledgements produced by this connection.",
327
+ "properties": {
328
+ "transport_mode": {
329
+ "type": "string",
330
+ "enum": ["default", "fast", "volume"],
331
+ "default": "default",
332
+ "description": "Event write transport: default is durable and balanced (recommended); fast has the lowest latency but may cost more; volume is optimized for high throughput and introduces delivery lag."
333
+ },
334
+ "chunk_bytes": {
335
+ "type": "integer",
336
+ "minimum": 1,
337
+ "description": "Durable-mode file target size in bytes. Advanced tuning; leave unset for the platform default."
338
+ },
339
+ "flush_ms": {
340
+ "type": "integer",
341
+ "minimum": 1,
342
+ "description": "Durable-mode flush interval in milliseconds. Advanced tuning; leave unset for the platform default."
343
+ },
344
+ "sections_per_file": {
345
+ "type": "integer",
346
+ "minimum": 1,
347
+ "description": "Durable-mode sections per file. Advanced tuning; leave unset for the platform default."
348
+ }
349
+ },
350
+ "additionalProperties": false
351
+ }
352
+ },
353
+ "additionalProperties": true
354
+ },
320
355
  "delivery_config": {
321
356
  "type": ["object", "null"],
322
357
  "description": "Outbound write policy for delivery-tail connections (mirror of ingestion_config for the source side). Auth/transport stay on configuration and the org connector; table, write_mode, upsert primary_key, batch sizes, and conflict rules live here. Distinct from data-product projection delivery_config (entities MS).",
@@ -175,6 +175,22 @@
175
175
  { "type": "string", "minLength": 1 }
176
176
  ]
177
177
  },
178
+ "published_access_methods": {
179
+ "type": "array",
180
+ "description": "Design-time permitted consumption methods (D3). Baseline event_stream (data product trigger) is always effective even when omitted; sync coalesces it into data_products.delivery.",
181
+ "items": {
182
+ "type": "string",
183
+ "enum": [
184
+ "event_stream",
185
+ "sql",
186
+ "api_endpoint",
187
+ "webhook",
188
+ "export",
189
+ "bi_connect"
190
+ ]
191
+ },
192
+ "uniqueItems": true
193
+ },
178
194
  "odps_document": {
179
195
  "description": "Canonical ODPS v4.1 document (`{ product: ... }`). Preferred for platform catalog, governance, and ecosystem interoperability. Validated in the dataproducts API; Loxtep-specific fields under product.custom.loxtep.",
180
196
  "allOf": [