@embrasure/ember 0.2.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/README.md +58 -0
- package/dist/auth.d.ts +24 -0
- package/dist/auth.js +305 -0
- package/dist/catalog.d.ts +180 -0
- package/dist/catalog.js +115 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +6 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/mcp.d.ts +13 -0
- package/dist/mcp.js +167 -0
- package/dist/operator.d.ts +36 -0
- package/dist/operator.js +493 -0
- package/dist/plugin-deletion.d.ts +29 -0
- package/dist/plugin-deletion.js +30 -0
- package/dist/plugin-edits.d.ts +125 -0
- package/dist/plugin-edits.js +73 -0
- package/dist/plugin-policy.d.ts +71 -0
- package/dist/plugin-policy.js +47 -0
- package/dist/program.d.ts +3 -0
- package/dist/program.js +274 -0
- package/dist/query-response.d.ts +31 -0
- package/dist/query-response.js +15 -0
- package/dist/types.d.ts +192 -0
- package/dist/types.js +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/package.json +60 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { RecordDataPolicyAssessmentInput, SaveDataPolicyInput } from "@embrasure/api-client";
|
|
2
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
3
|
+
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
4
|
+
[key: string]: JsonValue;
|
|
5
|
+
};
|
|
6
|
+
export type JsonObject = {
|
|
7
|
+
[key: string]: JsonValue;
|
|
8
|
+
};
|
|
9
|
+
export type SetupInput = {
|
|
10
|
+
action: "plan" | "apply";
|
|
11
|
+
database?: string;
|
|
12
|
+
};
|
|
13
|
+
export type SourcesInput = {
|
|
14
|
+
action: "types" | "list";
|
|
15
|
+
} | {
|
|
16
|
+
action: "connect";
|
|
17
|
+
kind: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
mode?: string;
|
|
20
|
+
return_to?: string;
|
|
21
|
+
} | {
|
|
22
|
+
action: "status" | "verify";
|
|
23
|
+
connection_id: string;
|
|
24
|
+
};
|
|
25
|
+
export type IngestionTable = {
|
|
26
|
+
source_schema: string;
|
|
27
|
+
source_table: string;
|
|
28
|
+
primary_key_columns?: string[];
|
|
29
|
+
selected_columns?: string[];
|
|
30
|
+
destination_table?: string;
|
|
31
|
+
cursor_column?: string;
|
|
32
|
+
incremental_strategy?: "cursor" | "postgres_xmin";
|
|
33
|
+
};
|
|
34
|
+
export type IngestionInput = {
|
|
35
|
+
action: "plan" | "start";
|
|
36
|
+
connection_id: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
database_id?: string;
|
|
39
|
+
source_kind: string;
|
|
40
|
+
ingestion_engine?: "worker_batch" | "aws_dms_firehose" | "embrasure_flow";
|
|
41
|
+
cadence_minutes?: number;
|
|
42
|
+
tables?: IngestionTable[];
|
|
43
|
+
} | {
|
|
44
|
+
action: "status";
|
|
45
|
+
ingestion_run_id?: string;
|
|
46
|
+
} | {
|
|
47
|
+
action: "sync" | "pause" | "resume";
|
|
48
|
+
ingestion_run_id: string;
|
|
49
|
+
};
|
|
50
|
+
export type QueryInput = {
|
|
51
|
+
action: "run";
|
|
52
|
+
sql: string;
|
|
53
|
+
database?: string;
|
|
54
|
+
max_result_rows?: number;
|
|
55
|
+
} | {
|
|
56
|
+
action: "status" | "cancel";
|
|
57
|
+
query_id: string;
|
|
58
|
+
} | {
|
|
59
|
+
action: "results";
|
|
60
|
+
query_id: string;
|
|
61
|
+
limit?: number;
|
|
62
|
+
next_token?: string;
|
|
63
|
+
} | {
|
|
64
|
+
action: "history";
|
|
65
|
+
limit?: number;
|
|
66
|
+
};
|
|
67
|
+
export type WarehouseInput = SetupInput | {
|
|
68
|
+
action: "status";
|
|
69
|
+
} | {
|
|
70
|
+
action: "usage";
|
|
71
|
+
window?: "month_to_date" | "7d" | "30d" | "90d";
|
|
72
|
+
};
|
|
73
|
+
export type CatalogInput = {
|
|
74
|
+
action: "search";
|
|
75
|
+
query: string;
|
|
76
|
+
limit?: number;
|
|
77
|
+
refs?: string[];
|
|
78
|
+
} | {
|
|
79
|
+
action: "describe";
|
|
80
|
+
target: "context";
|
|
81
|
+
object_id: string;
|
|
82
|
+
include_related?: boolean;
|
|
83
|
+
} | {
|
|
84
|
+
action: "describe";
|
|
85
|
+
target: "table";
|
|
86
|
+
database: string;
|
|
87
|
+
table: string;
|
|
88
|
+
column_limit?: number;
|
|
89
|
+
column_offset?: number;
|
|
90
|
+
} | {
|
|
91
|
+
action: "list";
|
|
92
|
+
database: string;
|
|
93
|
+
limit?: number;
|
|
94
|
+
next_token?: string;
|
|
95
|
+
};
|
|
96
|
+
export type OperatorResult = {
|
|
97
|
+
ok: boolean;
|
|
98
|
+
action: string;
|
|
99
|
+
data: JsonObject;
|
|
100
|
+
next_action?: string;
|
|
101
|
+
};
|
|
102
|
+
export type OperatorRequest = {
|
|
103
|
+
tool: "warehouse";
|
|
104
|
+
input: WarehouseInput;
|
|
105
|
+
} | {
|
|
106
|
+
tool: "sources";
|
|
107
|
+
input: SourcesInput;
|
|
108
|
+
} | {
|
|
109
|
+
tool: "ingestion";
|
|
110
|
+
input: IngestionInput;
|
|
111
|
+
} | {
|
|
112
|
+
tool: "query";
|
|
113
|
+
input: QueryInput;
|
|
114
|
+
} | {
|
|
115
|
+
tool: "catalog";
|
|
116
|
+
input: CatalogInput;
|
|
117
|
+
};
|
|
118
|
+
export type PluginCatalogEdit = {
|
|
119
|
+
action: "save";
|
|
120
|
+
key: string;
|
|
121
|
+
title: string;
|
|
122
|
+
summary: string;
|
|
123
|
+
preview?: boolean;
|
|
124
|
+
} | {
|
|
125
|
+
action: "correct";
|
|
126
|
+
object_id: string;
|
|
127
|
+
title?: string;
|
|
128
|
+
summary?: string;
|
|
129
|
+
note?: string;
|
|
130
|
+
preview?: boolean;
|
|
131
|
+
};
|
|
132
|
+
export type PluginPolicyInput = ({
|
|
133
|
+
action: "save_requirements";
|
|
134
|
+
} & SaveDataPolicyInput) | {
|
|
135
|
+
action: "policy_context";
|
|
136
|
+
policy_id: string;
|
|
137
|
+
} | ({
|
|
138
|
+
action: "record_assessment";
|
|
139
|
+
policy_id: string;
|
|
140
|
+
} & RecordDataPolicyAssessmentInput);
|
|
141
|
+
export type PluginDeletionInput = {
|
|
142
|
+
action: "deletion_config" | "deletion_history" | "automatic_requests" | "check_automatic_requests";
|
|
143
|
+
} | {
|
|
144
|
+
action: "configure_automatic_requests";
|
|
145
|
+
enabled?: boolean;
|
|
146
|
+
source_object_id: string;
|
|
147
|
+
subject_column: string;
|
|
148
|
+
status_column: string;
|
|
149
|
+
withdrawn_value: string;
|
|
150
|
+
purpose_column?: string | null;
|
|
151
|
+
purpose_value?: string | null;
|
|
152
|
+
expires_at_column?: string | null;
|
|
153
|
+
expected_revision?: string | null;
|
|
154
|
+
} | {
|
|
155
|
+
action: "preview_automatic_request";
|
|
156
|
+
request_id: string;
|
|
157
|
+
} | {
|
|
158
|
+
action: "configure_deletion";
|
|
159
|
+
targets: Array<{
|
|
160
|
+
object_id: string;
|
|
161
|
+
subject_column: string;
|
|
162
|
+
}>;
|
|
163
|
+
expected_revision?: string | null;
|
|
164
|
+
} | {
|
|
165
|
+
action: "preview_deletion";
|
|
166
|
+
subject_id: string;
|
|
167
|
+
configuration_revision: string;
|
|
168
|
+
} | {
|
|
169
|
+
action: "execute_deletion";
|
|
170
|
+
request_id: string;
|
|
171
|
+
confirmation: string;
|
|
172
|
+
};
|
|
173
|
+
export type PluginIngestionEdit = {
|
|
174
|
+
action: "inspect_table";
|
|
175
|
+
ingestion_run_id: string;
|
|
176
|
+
table_id: string;
|
|
177
|
+
} | {
|
|
178
|
+
action: "edit_table";
|
|
179
|
+
ingestion_run_id: string;
|
|
180
|
+
table_id: string;
|
|
181
|
+
selected_columns: string[];
|
|
182
|
+
preview?: boolean;
|
|
183
|
+
};
|
|
184
|
+
export type PluginOperatorRequest = Exclude<OperatorRequest, {
|
|
185
|
+
tool: "catalog" | "ingestion";
|
|
186
|
+
}> | {
|
|
187
|
+
tool: "catalog";
|
|
188
|
+
input: CatalogInput | PluginCatalogEdit | PluginPolicyInput | PluginDeletionInput;
|
|
189
|
+
} | {
|
|
190
|
+
tool: "ingestion";
|
|
191
|
+
input: IngestionInput | PluginIngestionEdit;
|
|
192
|
+
};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EMBER_VERSION = "0.2.0";
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const EMBER_VERSION = "0.2.0";
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@embrasure/ember",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/EmbrasureAI/embrasure.git",
|
|
7
|
+
"directory": "packages/ember"
|
|
8
|
+
},
|
|
9
|
+
"description": "Operate the Ember managed data warehouse from a CLI or MCP client.",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"ember",
|
|
12
|
+
"data-warehouse",
|
|
13
|
+
"mcp",
|
|
14
|
+
"cli",
|
|
15
|
+
"data-agents"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./mcp": {
|
|
26
|
+
"types": "./dist/mcp.d.ts",
|
|
27
|
+
"default": "./dist/mcp.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"bin": {
|
|
31
|
+
"ember": "./dist/cli.js"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"README.md"
|
|
36
|
+
],
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=20"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@modelcontextprotocol/server": "^2.0.0",
|
|
45
|
+
"commander": "^14.0.2",
|
|
46
|
+
"zod": "^4.1.13",
|
|
47
|
+
"@embrasure/api-client": "0.1.7"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/node": "^20.19.25",
|
|
51
|
+
"typescript": "^5.9.3",
|
|
52
|
+
"vitest": "^4.1.11"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
56
|
+
"lint": "tsc -p tsconfig.json --noEmit",
|
|
57
|
+
"test": "vitest run src",
|
|
58
|
+
"publish:audit": "pnpm --dir ../.. cli:publish-audit"
|
|
59
|
+
}
|
|
60
|
+
}
|