edgegate-mcp 0.4.1 → 0.8.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 +27 -3
- package/dist/client.d.ts +43 -1
- package/dist/client.js +83 -0
- package/dist/client.js.map +1 -1
- package/dist/server.js +178 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/change_member_role.d.ts +18 -0
- package/dist/tools/change_member_role.js +61 -0
- package/dist/tools/change_member_role.js.map +1 -0
- package/dist/tools/check_byo_bucket.d.ts +12 -0
- package/dist/tools/check_byo_bucket.js +89 -0
- package/dist/tools/check_byo_bucket.js.map +1 -0
- package/dist/tools/check_status.d.ts +2 -2
- package/dist/tools/compare_runs.d.ts +2 -2
- package/dist/tools/connect_huggingface.d.ts +15 -0
- package/dist/tools/connect_huggingface.js +83 -0
- package/dist/tools/connect_huggingface.js.map +1 -0
- package/dist/tools/connect_qaihub.d.ts +15 -0
- package/dist/tools/connect_qaihub.js +62 -0
- package/dist/tools/connect_qaihub.js.map +1 -0
- package/dist/tools/create_api_key.d.ts +18 -0
- package/dist/tools/create_api_key.js +73 -0
- package/dist/tools/create_api_key.js.map +1 -0
- package/dist/tools/create_pipeline.d.ts +34 -4
- package/dist/tools/create_pipeline.js +31 -0
- package/dist/tools/create_pipeline.js.map +1 -1
- package/dist/tools/create_workspace.d.ts +12 -0
- package/dist/tools/create_workspace.js +51 -0
- package/dist/tools/create_workspace.js.map +1 -0
- package/dist/tools/disconnect_byo_bucket.d.ts +12 -0
- package/dist/tools/disconnect_byo_bucket.js +90 -0
- package/dist/tools/disconnect_byo_bucket.js.map +1 -0
- package/dist/tools/disconnect_huggingface.d.ts +12 -0
- package/dist/tools/disconnect_huggingface.js +44 -0
- package/dist/tools/disconnect_huggingface.js.map +1 -0
- package/dist/tools/disconnect_qaihub.d.ts +12 -0
- package/dist/tools/disconnect_qaihub.js +42 -0
- package/dist/tools/disconnect_qaihub.js.map +1 -0
- package/dist/tools/export_run_report.d.ts +2 -2
- package/dist/tools/get_audit_report.d.ts +2 -2
- package/dist/tools/get_byo_audit.d.ts +27 -0
- package/dist/tools/get_byo_audit.js +125 -0
- package/dist/tools/get_byo_audit.js.map +1 -0
- package/dist/tools/get_huggingface_integration.d.ts +12 -0
- package/dist/tools/get_huggingface_integration.js +52 -0
- package/dist/tools/get_huggingface_integration.js.map +1 -0
- package/dist/tools/get_qaihub_integration.d.ts +12 -0
- package/dist/tools/get_qaihub_integration.js +52 -0
- package/dist/tools/get_qaihub_integration.js.map +1 -0
- package/dist/tools/get_report.d.ts +1 -1
- package/dist/tools/invite_member.d.ts +18 -0
- package/dist/tools/invite_member.js +85 -0
- package/dist/tools/invite_member.js.map +1 -0
- package/dist/tools/list_api_keys.d.ts +12 -0
- package/dist/tools/list_api_keys.js +51 -0
- package/dist/tools/list_api_keys.js.map +1 -0
- package/dist/tools/list_members.d.ts +12 -0
- package/dist/tools/list_members.js +43 -0
- package/dist/tools/list_members.js.map +1 -0
- package/dist/tools/register_byo_artifact.d.ts +27 -0
- package/dist/tools/register_byo_artifact.js +122 -0
- package/dist/tools/register_byo_artifact.js.map +1 -0
- package/dist/tools/register_byo_bucket.d.ts +24 -0
- package/dist/tools/register_byo_bucket.js +143 -0
- package/dist/tools/register_byo_bucket.js.map +1 -0
- package/dist/tools/remove_member.d.ts +15 -0
- package/dist/tools/remove_member.js +64 -0
- package/dist/tools/remove_member.js.map +1 -0
- package/dist/tools/revoke_api_key.d.ts +15 -0
- package/dist/tools/revoke_api_key.js +49 -0
- package/dist/tools/revoke_api_key.js.map +1 -0
- package/dist/types.d.ts +169 -0
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/plugin.json +7 -2
- package/skills/edgegate-byo-storage.md +148 -0
- package/skills/edgegate-connect-huggingface.md +64 -0
- package/skills/edgegate-connect-qaihub.md +56 -0
- package/skills/edgegate-import.md +2 -2
- package/skills/edgegate-init.md +17 -0
- package/skills/edgegate-members.md +51 -0
- package/skills/edgegate-workspace-setup.md +74 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ MCP server for [EdgeGate](https://edgegate.frozo.ai) — set up edge-AI regressi
|
|
|
4
4
|
|
|
5
5
|
## What does it do?
|
|
6
6
|
|
|
7
|
-
EdgeGate runs AI model regression tests on real Snapdragon hardware via Qualcomm AI Hub, then produces signed evidence bundles you can attach to CI gates. This npm package exposes EdgeGate's REST API as
|
|
7
|
+
EdgeGate runs AI model regression tests on real Snapdragon hardware via Qualcomm AI Hub, then produces signed evidence bundles you can attach to CI gates. This npm package exposes EdgeGate's REST API as 30+ MCP tools, plus bundled skills, so you can drive the whole flow from a prompt:
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
> Use the edgegate MCP to set up a CI gate for my MobileNet ONNX model.
|
|
@@ -69,10 +69,29 @@ See [docs/tools.md](./docs/tools.md) for the full tool reference. Quick list:
|
|
|
69
69
|
| `edgegate_setup_github_action` | Generate the GitHub Actions workflow + secret commands |
|
|
70
70
|
| `edgegate_compare_runs` | Diff two runs — gate flips, metric deltas, per-device breakdown, REGRESSION / IMPROVEMENT / NEUTRAL verdict |
|
|
71
71
|
| `edgegate_export_run_report` | Save a complete run report as a markdown file to disk (returns the file path + preview) |
|
|
72
|
-
| `edgegate_import_huggingface_model` | Import a
|
|
72
|
+
| `edgegate_import_huggingface_model` | Import a HuggingFace ONNX model — returns artifact_id ready for `edgegate_create_pipeline`. Uses the workspace's personal HF token when connected; otherwise anonymous |
|
|
73
|
+
| `edgegate_connect_huggingface` | Store a personal HuggingFace token in the workspace so imports can read private / gated / Qualcomm-org repos. Validated against HF whoami before encryption |
|
|
74
|
+
| `edgegate_get_huggingface_integration` | Show whether a HF token is currently connected (no plaintext) |
|
|
75
|
+
| `edgegate_disconnect_huggingface` | Delete the HF integration; future imports fall back to anonymous access |
|
|
76
|
+
| `edgegate_connect_qaihub` | Connect / rotate a Qualcomm AI Hub token (encrypted at rest, never returned in plaintext) |
|
|
77
|
+
| `edgegate_get_qaihub_integration` | Show the connection status of the workspace's AI Hub token |
|
|
78
|
+
| `edgegate_disconnect_qaihub` | Permanently delete the AI Hub integration |
|
|
79
|
+
| `edgegate_create_workspace` | Create a new workspace (caller becomes owner) |
|
|
80
|
+
| `edgegate_list_api_keys` | List API keys in the workspace (no plaintext) |
|
|
81
|
+
| `edgegate_create_api_key` | Mint a new API key — plaintext returned exactly once |
|
|
82
|
+
| `edgegate_revoke_api_key` | Revoke an API key by id (audit row preserved) |
|
|
83
|
+
| `edgegate_list_members` | List members + roles |
|
|
84
|
+
| `edgegate_invite_member` | Add an existing EdgeGate user to the workspace at a given role |
|
|
85
|
+
| `edgegate_change_member_role` | Change a member's role (cannot downgrade the last owner) |
|
|
86
|
+
| `edgegate_remove_member` | Remove a member (their pipelines/runs are preserved) |
|
|
73
87
|
| `edgegate_list_promptpacks` | List all promptpacks in a workspace (id, version, case count, published status) |
|
|
74
88
|
| `edgegate_create_promptpack` | Create a new promptpack with test cases (prompts, expected outputs, per-case overrides) |
|
|
75
89
|
| `edgegate_publish_promptpack` | Publish a promptpack version so it is usable in pipelines (completes the create → publish → use lifecycle) |
|
|
90
|
+
| `edgegate_register_byo_bucket` | **Enterprise.** Register the workspace's own S3 bucket + IAM role as a BYO storage grant. Returns the External ID to paste into the role's trust policy |
|
|
91
|
+
| `edgegate_check_byo_bucket` | **Enterprise.** Re-run the AssumeRole + HeadObject readiness probe; renders the typed `BYO_*` error code with a fix checklist |
|
|
92
|
+
| `edgegate_register_byo_artifact` | **Enterprise.** Register an existing `s3://<bucket>/<key>` URI as an EdgeGate Artifact (no bytes uploaded — HeadObject only). Returns an `artifact_id` ready for `edgegate_create_pipeline` |
|
|
93
|
+
| `edgegate_disconnect_byo_bucket` | **Enterprise.** Delete the BYO grant. Refuses (409) if artifacts still reference it |
|
|
94
|
+
| `edgegate_get_byo_audit` | **Enterprise.** Paginated append-only audit log of every AssumeRole / HeadObject / GetObject / KMS Decrypt call. `aws_request_id` joins to your own CloudTrail |
|
|
76
95
|
|
|
77
96
|
## Skills
|
|
78
97
|
|
|
@@ -84,8 +103,13 @@ Slash commands you can invoke directly:
|
|
|
84
103
|
- `/edgegate-audit` — fetch the evidence bundle for a run
|
|
85
104
|
- `/edgegate-compare` — diff two runs (auto-baseline) with REGRESSION/IMPROVEMENT/NEUTRAL verdict
|
|
86
105
|
- `/edgegate-export` — save a run report as a markdown file (for PR comments, Slack, compliance)
|
|
87
|
-
- `/edgegate-import` — import a
|
|
106
|
+
- `/edgegate-import` — import a Hugging Face ONNX model (anonymous, or workspace-token for private / gated / qualcomm-org repos)
|
|
107
|
+
- `/edgegate-connect-huggingface` — attach a personal HuggingFace token to the workspace so the import flow can read private / gated / qualcomm-org repos
|
|
108
|
+
- `/edgegate-connect-qaihub` — connect a Qualcomm AI Hub token so runs can actually compile and profile on Snapdragon devices
|
|
109
|
+
- `/edgegate-workspace-setup` — bootstrap a brand-new workspace end-to-end (create → connect AI Hub → API key → invite teammates)
|
|
110
|
+
- `/edgegate-members` — list / invite / change role / remove workspace members
|
|
88
111
|
- `/edgegate-promptpacks` — list existing promptpacks or create a new one with generated test cases
|
|
112
|
+
- `/edgegate-byo-storage` — Enterprise BYO storage onboarding (register grant → paste External ID → verify probe → first artifact → first run → audit log)
|
|
89
113
|
|
|
90
114
|
## License
|
|
91
115
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { APIKeyCreateResponse, HFImportJob, Pipeline, PromptPackCreateBody, PromptPackSummary, RunBundle, RunComparison, RunDetail, RunSummary, Workspace, WorkflowTemplate } from "./types.js";
|
|
1
|
+
import type { APIKeyCreateResponse, APIKeyCreatedResponse, APIKeyListItem, ArtifactResponse, ByoArtifactRegisterRequest, ByoAuditPage, ByoGrant, HFImportJob, HuggingFaceConnectResponse, HuggingFaceIntegrationStatus, InputSpec, Member, Pipeline, PromptPackCreateBody, PromptPackSummary, QaihubIntegration, RunBundle, RunComparison, RunDetail, RunSummary, Workspace, WorkflowTemplate, WorkspaceRole } from "./types.js";
|
|
2
2
|
export interface EdgeGateClientOptions {
|
|
3
3
|
apiUrl: string;
|
|
4
4
|
apiKey: string;
|
|
@@ -51,6 +51,9 @@ export declare class EdgeGateClient {
|
|
|
51
51
|
artifact_id: string;
|
|
52
52
|
label?: string;
|
|
53
53
|
}>;
|
|
54
|
+
/** Optional explicit AI Hub compile input shapes. Omit to let EdgeGate
|
|
55
|
+
* auto-detect from the ONNX file (works for most models). */
|
|
56
|
+
input_specs?: Record<string, InputSpec>;
|
|
54
57
|
}): Promise<Pipeline>;
|
|
55
58
|
listPipelines(workspaceId: string): Promise<Pipeline[]>;
|
|
56
59
|
triggerRun(workspaceId: string, body: {
|
|
@@ -70,8 +73,47 @@ export declare class EdgeGateClient {
|
|
|
70
73
|
filename?: string;
|
|
71
74
|
}): Promise<HFImportJob>;
|
|
72
75
|
getHuggingFaceImportJob(workspaceId: string, jobId: string): Promise<HFImportJob>;
|
|
76
|
+
connectHuggingFaceIntegration(workspaceId: string, token: string): Promise<HuggingFaceConnectResponse>;
|
|
77
|
+
rotateHuggingFaceIntegration(workspaceId: string, token: string): Promise<HuggingFaceConnectResponse>;
|
|
78
|
+
getHuggingFaceIntegration(workspaceId: string): Promise<HuggingFaceIntegrationStatus>;
|
|
79
|
+
deleteHuggingFaceIntegration(workspaceId: string): Promise<void>;
|
|
80
|
+
connectQaihubIntegration(workspaceId: string, token: string): Promise<QaihubIntegration>;
|
|
81
|
+
rotateQaihubIntegration(workspaceId: string, token: string): Promise<QaihubIntegration>;
|
|
82
|
+
getQaihubIntegration(workspaceId: string): Promise<QaihubIntegration>;
|
|
83
|
+
deleteQaihubIntegration(workspaceId: string): Promise<void>;
|
|
84
|
+
createWorkspace(name: string): Promise<Workspace>;
|
|
85
|
+
listApiKeys(workspaceId: string): Promise<APIKeyListItem[]>;
|
|
86
|
+
createApiKey(workspaceId: string, body: {
|
|
87
|
+
name: string;
|
|
88
|
+
expires_at?: string | null;
|
|
89
|
+
}): Promise<APIKeyCreatedResponse>;
|
|
90
|
+
revokeApiKey(workspaceId: string, keyId: string): Promise<void>;
|
|
91
|
+
listMembers(workspaceId: string): Promise<Member[]>;
|
|
92
|
+
addMember(workspaceId: string, body: {
|
|
93
|
+
user_email: string;
|
|
94
|
+
role: WorkspaceRole;
|
|
95
|
+
}): Promise<Member>;
|
|
96
|
+
updateMemberRole(workspaceId: string, userId: string, role: WorkspaceRole): Promise<Member>;
|
|
97
|
+
removeMember(workspaceId: string, userId: string): Promise<void>;
|
|
73
98
|
listPromptPacks(workspaceId: string): Promise<PromptPackSummary[]>;
|
|
74
99
|
createPromptPack(workspaceId: string, body: PromptPackCreateBody): Promise<PromptPackSummary>;
|
|
75
100
|
publishPromptPack(workspaceId: string, promptpackId: string, version: string): Promise<PromptPackSummary>;
|
|
101
|
+
registerByoGrant(workspaceId: string, body: {
|
|
102
|
+
role_arn: string;
|
|
103
|
+
bucket: string;
|
|
104
|
+
region: string;
|
|
105
|
+
kms_key_id?: string;
|
|
106
|
+
}): Promise<ByoGrant>;
|
|
107
|
+
getByoGrant(workspaceId: string): Promise<ByoGrant>;
|
|
108
|
+
verifyByoGrant(workspaceId: string): Promise<ByoGrant>;
|
|
109
|
+
deleteByoGrant(workspaceId: string): Promise<void>;
|
|
110
|
+
registerByoArtifact(workspaceId: string, body: ByoArtifactRegisterRequest): Promise<ArtifactResponse>;
|
|
111
|
+
getByoAudit(workspaceId: string, params?: {
|
|
112
|
+
artifact_id?: string;
|
|
113
|
+
run_id?: string;
|
|
114
|
+
since?: string;
|
|
115
|
+
cursor?: number;
|
|
116
|
+
limit?: number;
|
|
117
|
+
}): Promise<ByoAuditPage>;
|
|
76
118
|
private request;
|
|
77
119
|
}
|
package/dist/client.js
CHANGED
|
@@ -66,6 +66,58 @@ export class EdgeGateClient {
|
|
|
66
66
|
async getHuggingFaceImportJob(workspaceId, jobId) {
|
|
67
67
|
return this.request("GET", `/v1/workspaces/${workspaceId}/artifacts/import-huggingface/${jobId}`);
|
|
68
68
|
}
|
|
69
|
+
async connectHuggingFaceIntegration(workspaceId, token) {
|
|
70
|
+
return this.request("POST", `/v1/workspaces/${workspaceId}/integrations/huggingface`, { token });
|
|
71
|
+
}
|
|
72
|
+
async rotateHuggingFaceIntegration(workspaceId, token) {
|
|
73
|
+
return this.request("PUT", `/v1/workspaces/${workspaceId}/integrations/huggingface/rotate`, { token });
|
|
74
|
+
}
|
|
75
|
+
async getHuggingFaceIntegration(workspaceId) {
|
|
76
|
+
return this.request("GET", `/v1/workspaces/${workspaceId}/integrations/huggingface`);
|
|
77
|
+
}
|
|
78
|
+
async deleteHuggingFaceIntegration(workspaceId) {
|
|
79
|
+
await this.request("DELETE", `/v1/workspaces/${workspaceId}/integrations/huggingface`);
|
|
80
|
+
}
|
|
81
|
+
// Qualcomm AI Hub integration ─────────────────────────────────────────
|
|
82
|
+
async connectQaihubIntegration(workspaceId, token) {
|
|
83
|
+
return this.request("POST", `/v1/workspaces/${workspaceId}/integrations/qaihub`, { token });
|
|
84
|
+
}
|
|
85
|
+
async rotateQaihubIntegration(workspaceId, token) {
|
|
86
|
+
return this.request("PUT", `/v1/workspaces/${workspaceId}/integrations/qaihub/rotate`, { token });
|
|
87
|
+
}
|
|
88
|
+
async getQaihubIntegration(workspaceId) {
|
|
89
|
+
return this.request("GET", `/v1/workspaces/${workspaceId}/integrations/qaihub`);
|
|
90
|
+
}
|
|
91
|
+
async deleteQaihubIntegration(workspaceId) {
|
|
92
|
+
await this.request("DELETE", `/v1/workspaces/${workspaceId}/integrations/qaihub`);
|
|
93
|
+
}
|
|
94
|
+
// Workspace CRUD ─────────────────────────────────────────────────────
|
|
95
|
+
async createWorkspace(name) {
|
|
96
|
+
return this.request("POST", `/v1/workspaces`, { name });
|
|
97
|
+
}
|
|
98
|
+
// API keys ───────────────────────────────────────────────────────────
|
|
99
|
+
async listApiKeys(workspaceId) {
|
|
100
|
+
return this.request("GET", `/v1/workspaces/${workspaceId}/api-keys`);
|
|
101
|
+
}
|
|
102
|
+
async createApiKey(workspaceId, body) {
|
|
103
|
+
return this.request("POST", `/v1/workspaces/${workspaceId}/api-keys`, body);
|
|
104
|
+
}
|
|
105
|
+
async revokeApiKey(workspaceId, keyId) {
|
|
106
|
+
await this.request("DELETE", `/v1/workspaces/${workspaceId}/api-keys/${keyId}`);
|
|
107
|
+
}
|
|
108
|
+
// Members ────────────────────────────────────────────────────────────
|
|
109
|
+
async listMembers(workspaceId) {
|
|
110
|
+
return this.request("GET", `/v1/workspaces/${workspaceId}/members`);
|
|
111
|
+
}
|
|
112
|
+
async addMember(workspaceId, body) {
|
|
113
|
+
return this.request("POST", `/v1/workspaces/${workspaceId}/members`, body);
|
|
114
|
+
}
|
|
115
|
+
async updateMemberRole(workspaceId, userId, role) {
|
|
116
|
+
return this.request("PUT", `/v1/workspaces/${workspaceId}/members/${userId}`, { role });
|
|
117
|
+
}
|
|
118
|
+
async removeMember(workspaceId, userId) {
|
|
119
|
+
await this.request("DELETE", `/v1/workspaces/${workspaceId}/members/${userId}`);
|
|
120
|
+
}
|
|
69
121
|
async listPromptPacks(workspaceId) {
|
|
70
122
|
return this.request("GET", `/v1/workspaces/${workspaceId}/promptpacks`);
|
|
71
123
|
}
|
|
@@ -75,6 +127,37 @@ export class EdgeGateClient {
|
|
|
75
127
|
async publishPromptPack(workspaceId, promptpackId, version) {
|
|
76
128
|
return this.request("PUT", `/v1/workspaces/${workspaceId}/promptpacks/${promptpackId}/${version}/publish`);
|
|
77
129
|
}
|
|
130
|
+
// BYO storage (Enterprise) ────────────────────────────────────────────
|
|
131
|
+
async registerByoGrant(workspaceId, body) {
|
|
132
|
+
return this.request("POST", `/v1/workspaces/${workspaceId}/byo-storage/grants`, body);
|
|
133
|
+
}
|
|
134
|
+
async getByoGrant(workspaceId) {
|
|
135
|
+
return this.request("GET", `/v1/workspaces/${workspaceId}/byo-storage/grants`);
|
|
136
|
+
}
|
|
137
|
+
async verifyByoGrant(workspaceId) {
|
|
138
|
+
return this.request("POST", `/v1/workspaces/${workspaceId}/byo-storage/grants/verify`);
|
|
139
|
+
}
|
|
140
|
+
async deleteByoGrant(workspaceId) {
|
|
141
|
+
await this.request("DELETE", `/v1/workspaces/${workspaceId}/byo-storage/grants`);
|
|
142
|
+
}
|
|
143
|
+
async registerByoArtifact(workspaceId, body) {
|
|
144
|
+
return this.request("POST", `/v1/workspaces/${workspaceId}/artifacts/byo`, body);
|
|
145
|
+
}
|
|
146
|
+
async getByoAudit(workspaceId, params = {}) {
|
|
147
|
+
const qs = new URLSearchParams();
|
|
148
|
+
if (params.artifact_id)
|
|
149
|
+
qs.set("artifact_id", params.artifact_id);
|
|
150
|
+
if (params.run_id)
|
|
151
|
+
qs.set("run_id", params.run_id);
|
|
152
|
+
if (params.since)
|
|
153
|
+
qs.set("since", params.since);
|
|
154
|
+
if (typeof params.cursor === "number")
|
|
155
|
+
qs.set("cursor", String(params.cursor));
|
|
156
|
+
if (typeof params.limit === "number")
|
|
157
|
+
qs.set("limit", String(params.limit));
|
|
158
|
+
const suffix = qs.toString() ? `?${qs.toString()}` : "";
|
|
159
|
+
return this.request("GET", `/v1/workspaces/${workspaceId}/byo-storage/audit${suffix}`);
|
|
160
|
+
}
|
|
78
161
|
async request(method, path, body) {
|
|
79
162
|
const url = `${this.apiUrl}${path}`;
|
|
80
163
|
const isIdempotent = method === "GET";
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAmC1C,MAAM,OAAO,aAAc,SAAQ,KAAK;IAEpB;IACA;IACA;IAHlB,YACkB,MAAc,EACd,MAAc,EACd,GAAW;QAE3B,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,CAAE,IAA4B,CAAC,MAAM,CAAC;gBAC9C,CAAC,CAAC,IAAI,IAAI,eAAe,CAAC;YAC9B,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,YAAY,IAAI,OAAO,GAAG,QAAQ,EAAE,CAAC;gBAC7D,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAC/B,SAAS;YACX,CAAC;YACD,MAAM,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QACpD,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;CACF;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;AACzD,CAAC;AACD,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -17,6 +17,25 @@ import { importHuggingfaceModelHandler, importHuggingfaceModelInputSchema, } fro
|
|
|
17
17
|
import { listPromptpacksHandler, listPromptpacksInputSchema, } from "./tools/list_promptpacks.js";
|
|
18
18
|
import { createPromptpackHandler, createPromptpackInputSchema, } from "./tools/create_promptpack.js";
|
|
19
19
|
import { publishPromptpackHandler, publishPromptpackInputSchema, } from "./tools/publish_promptpack.js";
|
|
20
|
+
import { connectHuggingfaceHandler, connectHuggingfaceInputSchema, } from "./tools/connect_huggingface.js";
|
|
21
|
+
import { disconnectHuggingfaceHandler, disconnectHuggingfaceInputSchema, } from "./tools/disconnect_huggingface.js";
|
|
22
|
+
import { getHuggingfaceIntegrationHandler, getHuggingfaceIntegrationInputSchema, } from "./tools/get_huggingface_integration.js";
|
|
23
|
+
import { connectQaihubHandler, connectQaihubInputSchema, } from "./tools/connect_qaihub.js";
|
|
24
|
+
import { getQaihubIntegrationHandler, getQaihubIntegrationInputSchema, } from "./tools/get_qaihub_integration.js";
|
|
25
|
+
import { disconnectQaihubHandler, disconnectQaihubInputSchema, } from "./tools/disconnect_qaihub.js";
|
|
26
|
+
import { createWorkspaceHandler, createWorkspaceInputSchema, } from "./tools/create_workspace.js";
|
|
27
|
+
import { listApiKeysHandler, listApiKeysInputSchema, } from "./tools/list_api_keys.js";
|
|
28
|
+
import { createApiKeyHandler, createApiKeyInputSchema, } from "./tools/create_api_key.js";
|
|
29
|
+
import { revokeApiKeyHandler, revokeApiKeyInputSchema, } from "./tools/revoke_api_key.js";
|
|
30
|
+
import { listMembersHandler, listMembersInputSchema, } from "./tools/list_members.js";
|
|
31
|
+
import { inviteMemberHandler, inviteMemberInputSchema, } from "./tools/invite_member.js";
|
|
32
|
+
import { changeMemberRoleHandler, changeMemberRoleInputSchema, } from "./tools/change_member_role.js";
|
|
33
|
+
import { removeMemberHandler, removeMemberInputSchema, } from "./tools/remove_member.js";
|
|
34
|
+
import { registerByoBucketHandler, registerByoBucketInputSchema, } from "./tools/register_byo_bucket.js";
|
|
35
|
+
import { checkByoBucketHandler, checkByoBucketInputSchema, } from "./tools/check_byo_bucket.js";
|
|
36
|
+
import { registerByoArtifactHandler, registerByoArtifactInputSchema, } from "./tools/register_byo_artifact.js";
|
|
37
|
+
import { disconnectByoBucketHandler, disconnectByoBucketInputSchema, } from "./tools/disconnect_byo_bucket.js";
|
|
38
|
+
import { getByoAuditHandler, getByoAuditInputSchema, } from "./tools/get_byo_audit.js";
|
|
20
39
|
const TOOLS = [
|
|
21
40
|
{
|
|
22
41
|
name: "edgegate_setup_workspace",
|
|
@@ -118,6 +137,165 @@ const TOOLS = [
|
|
|
118
137
|
schema: publishPromptpackInputSchema,
|
|
119
138
|
handler: publishPromptpackHandler,
|
|
120
139
|
},
|
|
140
|
+
{
|
|
141
|
+
name: "edgegate_connect_huggingface",
|
|
142
|
+
description: "Store a personal HuggingFace access token for this workspace so the import flow " +
|
|
143
|
+
"can read private / gated / Qualcomm-org repos (most qualcomm/*, Intel/*, and many " +
|
|
144
|
+
"Xenova/* repos 401 the anonymous endpoint). The token is validated against HF " +
|
|
145
|
+
"whoami before encryption and is never echoed in plaintext. If an integration " +
|
|
146
|
+
"already exists this tool rotates the token. Requires admin role.",
|
|
147
|
+
schema: connectHuggingfaceInputSchema,
|
|
148
|
+
handler: connectHuggingfaceHandler,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: "edgegate_get_huggingface_integration",
|
|
152
|
+
description: "Show whether a personal HuggingFace token is connected to this workspace (and " +
|
|
153
|
+
"whether it is currently active or disabled). Does not return the token itself.",
|
|
154
|
+
schema: getHuggingfaceIntegrationInputSchema,
|
|
155
|
+
handler: getHuggingfaceIntegrationHandler,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "edgegate_disconnect_huggingface",
|
|
159
|
+
description: "Permanently delete the workspace's HuggingFace integration. Future HF imports fall " +
|
|
160
|
+
"back to anonymous access. Requires owner role.",
|
|
161
|
+
schema: disconnectHuggingfaceInputSchema,
|
|
162
|
+
handler: disconnectHuggingfaceHandler,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "edgegate_connect_qaihub",
|
|
166
|
+
description: "Store a Qualcomm AI Hub API token for this workspace so EdgeGate can submit " +
|
|
167
|
+
"compile + profile jobs on real Snapdragon devices. The token is encrypted at " +
|
|
168
|
+
"rest and is never returned in plaintext after the initial connect. If an " +
|
|
169
|
+
"integration already exists this tool transparently rotates the token. Requires " +
|
|
170
|
+
"admin role.",
|
|
171
|
+
schema: connectQaihubInputSchema,
|
|
172
|
+
handler: connectQaihubHandler,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "edgegate_get_qaihub_integration",
|
|
176
|
+
description: "Show whether a Qualcomm AI Hub token is connected to this workspace and " +
|
|
177
|
+
"whether it is currently active. Does not return the token itself.",
|
|
178
|
+
schema: getQaihubIntegrationInputSchema,
|
|
179
|
+
handler: getQaihubIntegrationHandler,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: "edgegate_disconnect_qaihub",
|
|
183
|
+
description: "Permanently delete the workspace's Qualcomm AI Hub integration. Any new EdgeGate " +
|
|
184
|
+
"runs in this workspace will then fail with NO_AIHUB_TOKEN until a fresh token is " +
|
|
185
|
+
"connected. Requires owner role.",
|
|
186
|
+
schema: disconnectQaihubInputSchema,
|
|
187
|
+
handler: disconnectQaihubHandler,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: "edgegate_create_workspace",
|
|
191
|
+
description: "Create a new EdgeGate workspace. The caller automatically becomes the owner. " +
|
|
192
|
+
"Subject to plan-tier workspace limits. After creation, connect Qualcomm AI Hub " +
|
|
193
|
+
"and define pipelines as usual.",
|
|
194
|
+
schema: createWorkspaceInputSchema,
|
|
195
|
+
handler: createWorkspaceHandler,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "edgegate_list_api_keys",
|
|
199
|
+
description: "List all API keys in this workspace (id, name, prefix...suffix, status, last_used). " +
|
|
200
|
+
"Plaintext is never returned. Requires owner role.",
|
|
201
|
+
schema: listApiKeysInputSchema,
|
|
202
|
+
handler: listApiKeysHandler,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "edgegate_create_api_key",
|
|
206
|
+
description: "Create a new API key for this workspace. The plaintext token is returned EXACTLY " +
|
|
207
|
+
"ONCE in the response — copy it to your CI secrets or local env immediately. " +
|
|
208
|
+
"Requires Pro tier or above. Requires owner role.",
|
|
209
|
+
schema: createApiKeyInputSchema,
|
|
210
|
+
handler: createApiKeyHandler,
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: "edgegate_revoke_api_key",
|
|
214
|
+
description: "Revoke an API key by id. The key is immediately rejected for all subsequent " +
|
|
215
|
+
"requests; the row is preserved (with revoked_at set) so the audit trail survives. " +
|
|
216
|
+
"Destructive. Requires owner role.",
|
|
217
|
+
schema: revokeApiKeyInputSchema,
|
|
218
|
+
handler: revokeApiKeyHandler,
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: "edgegate_list_members",
|
|
222
|
+
description: "List all members of this workspace with their email + role. Requires at least " +
|
|
223
|
+
"viewer role.",
|
|
224
|
+
schema: listMembersInputSchema,
|
|
225
|
+
handler: listMembersHandler,
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "edgegate_invite_member",
|
|
229
|
+
description: "Add an existing EdgeGate user to this workspace by email at the given role " +
|
|
230
|
+
"(owner / admin / viewer). v1 only attaches existing users — does not send " +
|
|
231
|
+
"invitation emails to external addresses. Requires admin role; only owners can " +
|
|
232
|
+
"add other owners.",
|
|
233
|
+
schema: inviteMemberInputSchema,
|
|
234
|
+
handler: inviteMemberHandler,
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "edgegate_change_member_role",
|
|
238
|
+
description: "Change a member's role in this workspace. Cannot downgrade the last owner — " +
|
|
239
|
+
"promote another member to owner first. Requires owner role.",
|
|
240
|
+
schema: changeMemberRoleInputSchema,
|
|
241
|
+
handler: changeMemberRoleHandler,
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: "edgegate_remove_member",
|
|
245
|
+
description: "Remove a member from this workspace. The user loses access immediately; their " +
|
|
246
|
+
"pipelines and runs are preserved. Cannot remove the last owner. Destructive. " +
|
|
247
|
+
"Requires owner role.",
|
|
248
|
+
schema: removeMemberInputSchema,
|
|
249
|
+
handler: removeMemberHandler,
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "edgegate_register_byo_bucket",
|
|
253
|
+
description: "Enterprise only. Register the workspace's customer-owned S3 bucket + IAM role " +
|
|
254
|
+
"as a BYO storage grant. EdgeGate's workers will AssumeRole into your AWS " +
|
|
255
|
+
"account to read model bytes — they never leave your account. Returns the " +
|
|
256
|
+
"External ID you must add to your role's trust policy. Requires owner role. " +
|
|
257
|
+
"402 from non-Enterprise workspaces; 409 if a grant already exists (does NOT " +
|
|
258
|
+
"auto-rotate — disconnect + re-register or rotate via dashboard).",
|
|
259
|
+
schema: registerByoBucketInputSchema,
|
|
260
|
+
handler: registerByoBucketHandler,
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "edgegate_check_byo_bucket",
|
|
264
|
+
description: "Re-run the AssumeRole + HeadObject readiness probe against the workspace's " +
|
|
265
|
+
"BYO grant. Returns the updated grant status with the typed BYO_* error code " +
|
|
266
|
+
"if it failed, plus a checklist of common IAM / bucket / KMS misconfigurations " +
|
|
267
|
+
"to inspect. Requires admin role.",
|
|
268
|
+
schema: checkByoBucketInputSchema,
|
|
269
|
+
handler: checkByoBucketHandler,
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: "edgegate_register_byo_artifact",
|
|
273
|
+
description: "Register an existing S3 URI in your registered bucket as an EdgeGate Artifact. " +
|
|
274
|
+
"EdgeGate HeadObjects the URI to confirm the key exists + capture size/etag — " +
|
|
275
|
+
"bytes are NOT uploaded through EdgeGate. Returns an artifact_id you can pass " +
|
|
276
|
+
"directly to edgegate_create_pipeline / edgegate_run_gate. Requires admin role. " +
|
|
277
|
+
"Pre-conditions: Enterprise plan + active BYO grant + bucket matches the grant.",
|
|
278
|
+
schema: registerByoArtifactInputSchema,
|
|
279
|
+
handler: registerByoArtifactHandler,
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "edgegate_disconnect_byo_bucket",
|
|
283
|
+
description: "Delete the workspace's BYO storage grant. EdgeGate stops attempting to read " +
|
|
284
|
+
"from your bucket. Refuses (409) if artifacts still reference it — surface " +
|
|
285
|
+
"lists the safe paths forward (rotate External ID via dashboard, or drop the " +
|
|
286
|
+
"artifacts first). Destructive. Requires owner role.",
|
|
287
|
+
schema: disconnectByoBucketInputSchema,
|
|
288
|
+
handler: disconnectByoBucketHandler,
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "edgegate_get_byo_audit",
|
|
292
|
+
description: "Fetch the workspace's append-only BYO storage audit log (every AssumeRole, " +
|
|
293
|
+
"HeadObject, GetObject, KMS Decrypt). Supports filters by artifact_id, run_id, " +
|
|
294
|
+
"since timestamp, plus cursor pagination. Each row's aws_request_id is the " +
|
|
295
|
+
"join key for cross-referencing against your own CloudTrail. Requires admin role.",
|
|
296
|
+
schema: getByoAuditInputSchema,
|
|
297
|
+
handler: getByoAuditHandler,
|
|
298
|
+
},
|
|
121
299
|
];
|
|
122
300
|
function getClient() {
|
|
123
301
|
const apiUrl = process.env.EDGEGATE_API_URL ?? "https://edgegateapi.frozo.ai";
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAu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qBAAqB,CAAC,CAAC;AAC9D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,sCAAsC;IACtC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { EdgeGateClient } from "../client.js";
|
|
3
|
+
import type { ToolResult } from "./setup_workspace.js";
|
|
4
|
+
export declare const changeMemberRoleInputSchema: z.ZodObject<{
|
|
5
|
+
workspace_id: z.ZodString;
|
|
6
|
+
user_id: z.ZodString;
|
|
7
|
+
role: z.ZodEnum<["owner", "admin", "viewer"]>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
workspace_id: string;
|
|
10
|
+
role: "owner" | "admin" | "viewer";
|
|
11
|
+
user_id: string;
|
|
12
|
+
}, {
|
|
13
|
+
workspace_id: string;
|
|
14
|
+
role: "owner" | "admin" | "viewer";
|
|
15
|
+
user_id: string;
|
|
16
|
+
}>;
|
|
17
|
+
export type ChangeMemberRoleInput = z.infer<typeof changeMemberRoleInputSchema>;
|
|
18
|
+
export declare function changeMemberRoleHandler(client: EdgeGateClient, input: ChangeMemberRoleInput): Promise<ToolResult>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { EdgeGateError } from "../client.js";
|
|
3
|
+
export const changeMemberRoleInputSchema = z.object({
|
|
4
|
+
workspace_id: z.string().uuid(),
|
|
5
|
+
user_id: z
|
|
6
|
+
.string()
|
|
7
|
+
.uuid()
|
|
8
|
+
.describe("Target member's user_id (from `edgegate_list_members`)."),
|
|
9
|
+
role: z
|
|
10
|
+
.enum(["owner", "admin", "viewer"])
|
|
11
|
+
.describe("The new role. Requires the caller to be a workspace owner."),
|
|
12
|
+
});
|
|
13
|
+
export async function changeMemberRoleHandler(client, input) {
|
|
14
|
+
try {
|
|
15
|
+
const member = await client.updateMemberRole(input.workspace_id, input.user_id, input.role);
|
|
16
|
+
return {
|
|
17
|
+
content: [
|
|
18
|
+
{
|
|
19
|
+
type: "text",
|
|
20
|
+
text: `Updated **${member.email}** to **${member.role}** in this workspace.`,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
if (err instanceof EdgeGateError) {
|
|
27
|
+
if (err.status === 400) {
|
|
28
|
+
// Most likely "Cannot remove the last owner from workspace".
|
|
29
|
+
return {
|
|
30
|
+
isError: true,
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: "text",
|
|
34
|
+
text: `Role change rejected: ${err.detail}\n\n` +
|
|
35
|
+
`If you're trying to downgrade the last owner, first promote ` +
|
|
36
|
+
`another member to owner via this tool, then come back to ` +
|
|
37
|
+
`downgrade the original owner.`,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if (err.status === 404) {
|
|
43
|
+
return {
|
|
44
|
+
isError: true,
|
|
45
|
+
content: [
|
|
46
|
+
{
|
|
47
|
+
type: "text",
|
|
48
|
+
text: `User \`${input.user_id}\` is not a member of this workspace.`,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
isError: true,
|
|
55
|
+
content: [{ type: "text", text: `EdgeGate returned ${err.status}: ${err.detail}` }],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
throw err;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=change_member_role.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change_member_role.js","sourceRoot":"","sources":["../../src/tools/change_member_role.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAA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E,CAAC;gBACvB,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,UAAU,KAAK,CAAC,OAAO,uCAAuC;yBACrE;qBACF;iBACF,CAAC;YACJ,CAAC;YACD,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC;aACpF,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { EdgeGateClient } from "../client.js";
|
|
3
|
+
import type { ToolResult } from "./setup_workspace.js";
|
|
4
|
+
export declare const checkByoBucketInputSchema: z.ZodObject<{
|
|
5
|
+
workspace_id: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
workspace_id: string;
|
|
8
|
+
}, {
|
|
9
|
+
workspace_id: string;
|
|
10
|
+
}>;
|
|
11
|
+
export type CheckByoBucketInput = z.infer<typeof checkByoBucketInputSchema>;
|
|
12
|
+
export declare function checkByoBucketHandler(client: EdgeGateClient, input: CheckByoBucketInput): Promise<ToolResult>;
|