@zackbart/connecta 0.1.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 +13 -0
- package/LICENSE +21 -0
- package/README.md +249 -0
- package/SECURITY.md +25 -0
- package/assets/connecta-clay-hero.png +0 -0
- package/dist/activity.d.ts +82 -0
- package/dist/activity.d.ts.map +1 -0
- package/dist/activity.js +51 -0
- package/dist/activity.js.map +1 -0
- package/dist/auth/bearer.d.ts +10 -0
- package/dist/auth/bearer.d.ts.map +1 -0
- package/dist/auth/bearer.js +47 -0
- package/dist/auth/bearer.js.map +1 -0
- package/dist/auth/clerk.d.ts +20 -0
- package/dist/auth/clerk.d.ts.map +1 -0
- package/dist/auth/clerk.js +167 -0
- package/dist/auth/clerk.js.map +1 -0
- package/dist/auth/downstream-oauth.d.ts +78 -0
- package/dist/auth/downstream-oauth.d.ts.map +1 -0
- package/dist/auth/downstream-oauth.js +180 -0
- package/dist/auth/downstream-oauth.js.map +1 -0
- package/dist/catalog.d.ts +11 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +144 -0
- package/dist/catalog.js.map +1 -0
- package/dist/connectors/api.d.ts +34 -0
- package/dist/connectors/api.d.ts.map +1 -0
- package/dist/connectors/api.js +36 -0
- package/dist/connectors/api.js.map +1 -0
- package/dist/connectors/remote-mcp.d.ts +33 -0
- package/dist/connectors/remote-mcp.d.ts.map +1 -0
- package/dist/connectors/remote-mcp.js +255 -0
- package/dist/connectors/remote-mcp.js.map +1 -0
- package/dist/credentials.d.ts +33 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +177 -0
- package/dist/credentials.js.map +1 -0
- package/dist/execute.d.ts +40 -0
- package/dist/execute.d.ts.map +1 -0
- package/dist/execute.js +424 -0
- package/dist/execute.js.map +1 -0
- package/dist/executors/quickjs.d.ts +26 -0
- package/dist/executors/quickjs.d.ts.map +1 -0
- package/dist/executors/quickjs.js +267 -0
- package/dist/executors/quickjs.js.map +1 -0
- package/dist/favicon.d.ts +2 -0
- package/dist/favicon.d.ts.map +1 -0
- package/dist/favicon.js +49 -0
- package/dist/favicon.js.map +1 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-result.d.ts +9 -0
- package/dist/mcp-result.d.ts.map +1 -0
- package/dist/mcp-result.js +35 -0
- package/dist/mcp-result.js.map +1 -0
- package/dist/meta-tools.d.ts +100 -0
- package/dist/meta-tools.d.ts.map +1 -0
- package/dist/meta-tools.js +797 -0
- package/dist/meta-tools.js.map +1 -0
- package/dist/node.d.ts +9 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +57 -0
- package/dist/node.js.map +1 -0
- package/dist/registry.d.ts +78 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +299 -0
- package/dist/registry.js.map +1 -0
- package/dist/server.d.ts +31 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +543 -0
- package/dist/server.js.map +1 -0
- package/dist/skills.d.ts +8 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +60 -0
- package/dist/skills.js.map +1 -0
- package/dist/storage/file.d.ts +8 -0
- package/dist/storage/file.d.ts.map +1 -0
- package/dist/storage/file.js +53 -0
- package/dist/storage/file.js.map +1 -0
- package/dist/storage/memory.d.ts +4 -0
- package/dist/storage/memory.d.ts.map +1 -0
- package/dist/storage/memory.js +29 -0
- package/dist/storage/memory.js.map +1 -0
- package/dist/types.d.ts +219 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/ui.d.ts +91 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +1031 -0
- package/dist/ui.js.map +1 -0
- package/package.json +96 -0
- package/src/activity.ts +144 -0
- package/src/auth/bearer.ts +54 -0
- package/src/auth/clerk.ts +226 -0
- package/src/auth/downstream-oauth.ts +202 -0
- package/src/catalog.ts +166 -0
- package/src/connectors/api.ts +80 -0
- package/src/connectors/remote-mcp.ts +324 -0
- package/src/credentials.ts +259 -0
- package/src/execute.ts +550 -0
- package/src/executors/quickjs.ts +321 -0
- package/src/favicon.ts +53 -0
- package/src/index.ts +197 -0
- package/src/mcp-result.ts +43 -0
- package/src/meta-tools.ts +1120 -0
- package/src/node.ts +62 -0
- package/src/registry.ts +400 -0
- package/src/server.ts +758 -0
- package/src/skills.ts +63 -0
- package/src/storage/file.ts +62 -0
- package/src/storage/memory.ts +34 -0
- package/src/types.ts +254 -0
- package/src/ui.ts +1121 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAChC,mqBAAmqB,CAAC;AAEtqB,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD1B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EACT,0FAA0F;QAC5F,OAAO,EAAE,WAAW;KACrB;CACO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { KVStorage } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* JSON-file-backed KVStorage for Node. Loads once, persists on every write via
|
|
4
|
+
* a temp-file + rename (atomic-ish). Only reachable via the "@zackbart/connecta/node"
|
|
5
|
+
* subpath so the main entry stays Workers-clean.
|
|
6
|
+
*/
|
|
7
|
+
export declare function fileStorage(path: string): KVStorage;
|
|
8
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/storage/file.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAO7C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAyCnD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync, } from "node:fs";
|
|
2
|
+
import { dirname } from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* JSON-file-backed KVStorage for Node. Loads once, persists on every write via
|
|
5
|
+
* a temp-file + rename (atomic-ish). Only reachable via the "@zackbart/connecta/node"
|
|
6
|
+
* subpath so the main entry stays Workers-clean.
|
|
7
|
+
*/
|
|
8
|
+
export function fileStorage(path) {
|
|
9
|
+
let data = {};
|
|
10
|
+
if (existsSync(path)) {
|
|
11
|
+
try {
|
|
12
|
+
data = JSON.parse(readFileSync(path, "utf8"));
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
data = {};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const persist = () => {
|
|
19
|
+
const dir = dirname(path);
|
|
20
|
+
if (dir)
|
|
21
|
+
mkdirSync(dir, { recursive: true });
|
|
22
|
+
const tmp = `${path}.tmp`;
|
|
23
|
+
writeFileSync(tmp, JSON.stringify(data));
|
|
24
|
+
renameSync(tmp, path);
|
|
25
|
+
};
|
|
26
|
+
const fresh = (key) => {
|
|
27
|
+
const e = data[key];
|
|
28
|
+
if (!e)
|
|
29
|
+
return null;
|
|
30
|
+
if (e.exp && Date.now() > e.exp) {
|
|
31
|
+
delete data[key];
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return e;
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
async get(key) {
|
|
38
|
+
return fresh(key)?.value ?? null;
|
|
39
|
+
},
|
|
40
|
+
async set(key, value, opts) {
|
|
41
|
+
data[key] = {
|
|
42
|
+
value,
|
|
43
|
+
exp: opts?.ttlSeconds ? Date.now() + opts.ttlSeconds * 1000 : undefined,
|
|
44
|
+
};
|
|
45
|
+
persist();
|
|
46
|
+
},
|
|
47
|
+
async delete(key) {
|
|
48
|
+
delete data[key];
|
|
49
|
+
persist();
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/storage/file.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,IAAI,IAAI,GAA0B,EAAE,CAAC;IACrC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAA0B,CAAC;QACzE,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,GAAG;YAAE,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7C,MAAM,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC;QAC1B,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QACzC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IACF,MAAM,KAAK,GAAG,CAAC,GAAW,EAAgB,EAAE;QAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QACpB,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC,CAAC;IACF,OAAO;QACL,KAAK,CAAC,GAAG,CAAC,GAAG;YACX,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC;QACnC,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI;YACxB,IAAI,CAAC,GAAG,CAAC,GAAG;gBACV,KAAK;gBACL,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS;aACxE,CAAC;YACF,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,GAAG;YACd,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,EAAE,CAAC;QACZ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/storage/memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAO7C,oEAAoE;AACpE,wBAAgB,aAAa,IAAI,SAAS,CAyBzC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** In-memory KV store with expiry. The default for dev and Node. */
|
|
2
|
+
export function memoryStorage() {
|
|
3
|
+
const map = new Map();
|
|
4
|
+
const fresh = (key) => {
|
|
5
|
+
const e = map.get(key);
|
|
6
|
+
if (!e)
|
|
7
|
+
return null;
|
|
8
|
+
if (e.exp && Date.now() > e.exp) {
|
|
9
|
+
map.delete(key);
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return e;
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
async get(key) {
|
|
16
|
+
return fresh(key)?.value ?? null;
|
|
17
|
+
},
|
|
18
|
+
async set(key, value, opts) {
|
|
19
|
+
map.set(key, {
|
|
20
|
+
value,
|
|
21
|
+
exp: opts?.ttlSeconds ? Date.now() + opts.ttlSeconds * 1000 : undefined,
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
async delete(key) {
|
|
25
|
+
map.delete(key);
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/storage/memory.ts"],"names":[],"mappings":"AAOA,oEAAoE;AACpE,MAAM,UAAU,aAAa;IAC3B,MAAM,GAAG,GAAG,IAAI,GAAG,EAAiB,CAAC;IACrC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAgB,EAAE;QAC1C,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QACpB,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YAChC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC,CAAC;IACF,OAAO;QACL,KAAK,CAAC,GAAG,CAAC,GAAG;YACX,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC;QACnC,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI;YACxB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE;gBACX,KAAK;gBACL,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS;aACxE,CAAC,CAAC;QACL,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,GAAG;YACd,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/** A JSON Schema object describing a tool's input. */
|
|
2
|
+
export type JsonSchema = Record<string, unknown>;
|
|
3
|
+
/** Minimal key/value store — the only state connecta needs. */
|
|
4
|
+
export interface KVStorage {
|
|
5
|
+
get(key: string): Promise<string | null>;
|
|
6
|
+
set(key: string, value: string, opts?: {
|
|
7
|
+
ttlSeconds?: number;
|
|
8
|
+
}): Promise<void>;
|
|
9
|
+
delete(key: string): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export interface Logger {
|
|
12
|
+
debug(...args: unknown[]): void;
|
|
13
|
+
info(...args: unknown[]): void;
|
|
14
|
+
warn(...args: unknown[]): void;
|
|
15
|
+
error(...args: unknown[]): void;
|
|
16
|
+
}
|
|
17
|
+
export interface ToolDef {
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
inputSchema?: JsonSchema;
|
|
21
|
+
/** Optional JSON Schema describing the tool's structured result. */
|
|
22
|
+
outputSchema?: JsonSchema;
|
|
23
|
+
/**
|
|
24
|
+
* Standard MCP tool behavior hints plus provider-specific extensions.
|
|
25
|
+
* Connecta fails closed: only readOnlyHint === true (without a contradictory
|
|
26
|
+
* destructiveHint) may use call_tool, batch_call, or execute_code. Every
|
|
27
|
+
* other tool must cross the call_destructive_tool approval boundary.
|
|
28
|
+
*/
|
|
29
|
+
annotations?: ToolAnnotations;
|
|
30
|
+
}
|
|
31
|
+
export interface ToolAnnotations extends Record<string, unknown> {
|
|
32
|
+
title?: string;
|
|
33
|
+
readOnlyHint?: boolean;
|
|
34
|
+
destructiveHint?: boolean;
|
|
35
|
+
idempotentHint?: boolean;
|
|
36
|
+
openWorldHint?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export type ConnectorCredentialValues = Record<string, string>;
|
|
39
|
+
/** Read-only access to the credentials assigned to one connector. */
|
|
40
|
+
export interface ConnectorCredentialAccess {
|
|
41
|
+
/**
|
|
42
|
+
* Returns one decrypted field. Omitting `field` preserves the original
|
|
43
|
+
* single-credential behavior and reads the reserved `value` field.
|
|
44
|
+
*/
|
|
45
|
+
get(field?: string): Promise<string | null>;
|
|
46
|
+
/** Returns every decrypted field, or null when nothing is configured. */
|
|
47
|
+
getAll(): Promise<ConnectorCredentialValues | null>;
|
|
48
|
+
}
|
|
49
|
+
/** Operator-facing description of one named credential field. */
|
|
50
|
+
export interface ConnectorCredentialFieldConfig {
|
|
51
|
+
/** Stable field name used by connector code and the credential API. */
|
|
52
|
+
name: string;
|
|
53
|
+
/** Short field label, e.g. "Account email". */
|
|
54
|
+
label: string;
|
|
55
|
+
/** Plain-language guidance shown in /ui. Never include the credential itself. */
|
|
56
|
+
description?: string;
|
|
57
|
+
/** Input placeholder, e.g. "you@example.com". */
|
|
58
|
+
placeholder?: string;
|
|
59
|
+
/** Browser input type. Defaults to password. */
|
|
60
|
+
inputType?: "email" | "password" | "text";
|
|
61
|
+
}
|
|
62
|
+
/** Operator-facing description of the credential set a connector needs. */
|
|
63
|
+
export interface ConnectorCredentialConfig {
|
|
64
|
+
/** Short group or field label, e.g. "API token" or "Service credentials". */
|
|
65
|
+
label: string;
|
|
66
|
+
/** Plain-language guidance shown in /ui. Never include the credential itself. */
|
|
67
|
+
description?: string;
|
|
68
|
+
/** Password-field placeholder, e.g. "Paste API token". */
|
|
69
|
+
placeholder?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Named fields for multi-value authentication. Omit to retain the original
|
|
72
|
+
* one-secret credential behavior.
|
|
73
|
+
*/
|
|
74
|
+
fields?: ConnectorCredentialFieldConfig[];
|
|
75
|
+
}
|
|
76
|
+
export interface CredentialTestResult {
|
|
77
|
+
ok: boolean;
|
|
78
|
+
message?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ConnectorContext {
|
|
81
|
+
/** Storage namespaced to this connector. */
|
|
82
|
+
storage: KVStorage;
|
|
83
|
+
logger: Logger;
|
|
84
|
+
/** Public base URL of this deployment (origin), used for OAuth callbacks. */
|
|
85
|
+
baseUrl: string;
|
|
86
|
+
/**
|
|
87
|
+
* Read-only access to this connector's operator-managed credential. Present
|
|
88
|
+
* only when the connector declares `credential` and the deployment configures
|
|
89
|
+
* `credentialEncryptionKey`.
|
|
90
|
+
*/
|
|
91
|
+
credential?: ConnectorCredentialAccess;
|
|
92
|
+
/**
|
|
93
|
+
* Identity shared by connector calls that belong to one inbound request.
|
|
94
|
+
* Connectors may use it to reuse request-safe resources within that request,
|
|
95
|
+
* but must never retain I/O resources beyond the scope's lifetime.
|
|
96
|
+
*
|
|
97
|
+
* Optional for custom/test contexts; the context object itself is the scope
|
|
98
|
+
* when omitted.
|
|
99
|
+
*/
|
|
100
|
+
requestScope?: object;
|
|
101
|
+
/** Best-effort cancellation signal for this individual tool call. */
|
|
102
|
+
signal?: AbortSignal;
|
|
103
|
+
/** Requested tool-call deadline in milliseconds. */
|
|
104
|
+
timeoutMs?: number;
|
|
105
|
+
}
|
|
106
|
+
export type ConnectorStatusState = "ok" | "auth_required" | "error";
|
|
107
|
+
export interface ConnectorStatus {
|
|
108
|
+
state: ConnectorStatusState;
|
|
109
|
+
/** When state === "auth_required", the URL the operator should open. */
|
|
110
|
+
authorizationUrl?: string;
|
|
111
|
+
message?: string;
|
|
112
|
+
}
|
|
113
|
+
/** The whole plugin contract — the one open seam. */
|
|
114
|
+
export interface Connector {
|
|
115
|
+
id: string;
|
|
116
|
+
/** Human-readable display name; the stable `id` remains the tool-address prefix. */
|
|
117
|
+
title?: string;
|
|
118
|
+
/** How call_tool wraps results. "mcp" passes the content array through; anything else is JSON-wrapped. */
|
|
119
|
+
kind?: "mcp" | "api";
|
|
120
|
+
description?: string;
|
|
121
|
+
/** Optional operator-managed credential slot rendered inside this connector's /ui card. */
|
|
122
|
+
credential?: ConnectorCredentialConfig;
|
|
123
|
+
/** Optional server-side check used by /ui's Test action. */
|
|
124
|
+
testCredential?(value: string, ctx: ConnectorContext): Promise<CredentialTestResult>;
|
|
125
|
+
/** Optional multi-field credential check used by /ui's Test action. */
|
|
126
|
+
testCredentials?(values: ConnectorCredentialValues, ctx: ConnectorContext): Promise<CredentialTestResult>;
|
|
127
|
+
/**
|
|
128
|
+
* Statically-known tool defs, exposed by in-code connectors (`api()`) for
|
|
129
|
+
* startup convention checks. Remote connectors omit this — their tools are
|
|
130
|
+
* fetched lazily over the network and are not known at construction time.
|
|
131
|
+
*/
|
|
132
|
+
staticTools?: ToolDef[];
|
|
133
|
+
listTools(ctx: ConnectorContext): Promise<ToolDef[]>;
|
|
134
|
+
callTool(name: string, args: unknown, ctx: ConnectorContext): Promise<unknown>;
|
|
135
|
+
/** Optional connector-level health/auth status for list_connectors. */
|
|
136
|
+
status?(ctx: ConnectorContext): Promise<ConnectorStatus>;
|
|
137
|
+
/**
|
|
138
|
+
* Optional: start (or with force, restart from scratch) a downstream OAuth
|
|
139
|
+
* flow (called by authorize_connector). Present only on connectors that use
|
|
140
|
+
* downstream OAuth. Returns the resulting status — "auth_required" with an
|
|
141
|
+
* authorizationUrl when there is a URL to open, "ok" when already authorized.
|
|
142
|
+
*/
|
|
143
|
+
startAuth?(ctx: ConnectorContext, opts?: {
|
|
144
|
+
force?: boolean;
|
|
145
|
+
}): Promise<ConnectorStatus>;
|
|
146
|
+
/**
|
|
147
|
+
* Optional: verify the OAuth `state` returned to /oauth/callback/<id> against
|
|
148
|
+
* the value this connector generated when it started the flow. Present only
|
|
149
|
+
* on downstream-OAuth connectors. The callback MUST reject before finishAuth
|
|
150
|
+
* when this returns false — otherwise anyone holding the pending URL could
|
|
151
|
+
* complete consent with their own account.
|
|
152
|
+
*/
|
|
153
|
+
verifyState?(state: string | null, ctx: ConnectorContext): Promise<boolean>;
|
|
154
|
+
/** Optional: complete a downstream OAuth flow (called by /oauth/callback/<id>). */
|
|
155
|
+
finishAuth?(code: string, ctx: ConnectorContext): Promise<void>;
|
|
156
|
+
}
|
|
157
|
+
/** Result of one sandboxed code execution. */
|
|
158
|
+
export interface ExecuteResult {
|
|
159
|
+
result: unknown;
|
|
160
|
+
error?: string;
|
|
161
|
+
logs?: string[];
|
|
162
|
+
}
|
|
163
|
+
/** A named group of host functions exposed to sandboxed code as a global. */
|
|
164
|
+
export interface ExecutorProvider {
|
|
165
|
+
name: string;
|
|
166
|
+
fns: Record<string, (...args: unknown[]) => Promise<unknown>>;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Runs model-written JavaScript in a sandbox where the ONLY capabilities are
|
|
170
|
+
* the provider functions — no network, filesystem, env, or timers. Structurally
|
|
171
|
+
* compatible with `DynamicWorkerExecutor` from `@cloudflare/codemode` (Workers);
|
|
172
|
+
* `quickJsExecutor()` from "@zackbart/connecta/quickjs" is the Node implementation.
|
|
173
|
+
* NEVER back this with an unsandboxed eval — the code is untrusted.
|
|
174
|
+
*/
|
|
175
|
+
export interface Executor {
|
|
176
|
+
execute(code: string, providers: ExecutorProvider[]): Promise<ExecuteResult>;
|
|
177
|
+
}
|
|
178
|
+
/** Result of an inbound-auth check. */
|
|
179
|
+
export type AuthResult = {
|
|
180
|
+
ok: true;
|
|
181
|
+
userId?: string;
|
|
182
|
+
subjectId?: string;
|
|
183
|
+
} | {
|
|
184
|
+
ok: false;
|
|
185
|
+
response: Response;
|
|
186
|
+
};
|
|
187
|
+
/** Public browser-auth configuration exposed to connecta's status UI. */
|
|
188
|
+
export type UiAuthConfig = {
|
|
189
|
+
kind: "clerk";
|
|
190
|
+
publishableKey: string;
|
|
191
|
+
frontendApiUrl: string;
|
|
192
|
+
signInUrl?: string;
|
|
193
|
+
signUpUrl?: string;
|
|
194
|
+
};
|
|
195
|
+
/** Optional labels used by Connecta's browser UI and OAuth result pages. */
|
|
196
|
+
export interface ConnectaBranding {
|
|
197
|
+
/** Product label. Defaults to "Connecta". */
|
|
198
|
+
productName?: string;
|
|
199
|
+
/** Organization or owner shown beside the product label. */
|
|
200
|
+
ownerName?: string;
|
|
201
|
+
/** Optional link for the organization or owner label. */
|
|
202
|
+
ownerUrl?: string;
|
|
203
|
+
/** Status-dashboard introduction. */
|
|
204
|
+
description?: string;
|
|
205
|
+
}
|
|
206
|
+
/** An inbound authentication provider (bearer token, Clerk, ...). */
|
|
207
|
+
export interface InboundAuth {
|
|
208
|
+
kind: string;
|
|
209
|
+
/**
|
|
210
|
+
* Optional browser sign-in configuration. When present, `/ui` uses this
|
|
211
|
+
* provider instead of asking the operator to paste a static bearer secret.
|
|
212
|
+
*/
|
|
213
|
+
uiAuth?: UiAuthConfig;
|
|
214
|
+
/** Serve/short-circuit .well-known + OPTIONS. Return null when not handled. */
|
|
215
|
+
handleMetadata?(request: Request, baseUrl: string): Response | null | Promise<Response | null>;
|
|
216
|
+
/** Attempt to authorize a request. */
|
|
217
|
+
authorize(request: Request, baseUrl: string): AuthResult | Promise<AuthResult>;
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjD,+DAA+D;AAC/D,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,GAAG,CACD,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,CA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AAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,+EAA+E;IAC/E,cAAc,CAAC,CACb,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC9C,sCAAsC;IACtC,SAAS,CACP,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACrC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,qEAAqE"}
|
package/dist/ui.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { CredentialVault } from "./credentials.js";
|
|
2
|
+
import type { Registry } from "./registry.js";
|
|
3
|
+
import type { ConnectaBranding, UiAuthConfig } from "./types.js";
|
|
4
|
+
/** Connecta's default monochrome "C" mark. */
|
|
5
|
+
export declare const CONNECTA_FAVICON_SVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\">\n <style>\n .fg { fill: #000 }\n @media (prefers-color-scheme: dark) { .fg { fill: #fff } }\n </style>\n <path class=\"fg\" d=\"M27 9.4A13 13 0 1 0 27 22.6l-4.4-2.5a8 8 0 1 1 0-8.2z\"/>\n</svg>";
|
|
6
|
+
interface ResolvedBranding {
|
|
7
|
+
productName: string;
|
|
8
|
+
ownerName?: string;
|
|
9
|
+
ownerUrl?: string;
|
|
10
|
+
description: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolveBranding(branding?: ConnectaBranding): ResolvedBranding;
|
|
13
|
+
/**
|
|
14
|
+
* True only for absolute `http:`/`https:` URLs. Downstream connectors control
|
|
15
|
+
* their `authorizationUrl`, so a hostile/misconfigured one could hand back a
|
|
16
|
+
* `javascript:` (or other) scheme; gate it before it can become an href.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isSafeHttpUrl(url: unknown): boolean;
|
|
19
|
+
export interface UiTool {
|
|
20
|
+
name: string;
|
|
21
|
+
address: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface UiConnector {
|
|
25
|
+
id: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
status: "ok" | "auth_required" | "error";
|
|
29
|
+
message?: string;
|
|
30
|
+
authorizationUrl?: string;
|
|
31
|
+
toolCount: number;
|
|
32
|
+
tools: UiTool[];
|
|
33
|
+
credential?: {
|
|
34
|
+
label: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
fields?: Array<{
|
|
38
|
+
name: string;
|
|
39
|
+
label: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
placeholder?: string;
|
|
42
|
+
inputType: "email" | "password" | "text";
|
|
43
|
+
configured: boolean;
|
|
44
|
+
lastFour?: string;
|
|
45
|
+
updatedAt?: string;
|
|
46
|
+
}>;
|
|
47
|
+
configured: boolean;
|
|
48
|
+
/** A stored value exists and may be deleted even if it cannot be decrypted. */
|
|
49
|
+
removable?: boolean;
|
|
50
|
+
lastFour?: string;
|
|
51
|
+
updatedAt?: string;
|
|
52
|
+
testable: boolean;
|
|
53
|
+
error?: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface UiData {
|
|
57
|
+
serverInfo: {
|
|
58
|
+
name: string;
|
|
59
|
+
version: string;
|
|
60
|
+
};
|
|
61
|
+
connectors: UiConnector[];
|
|
62
|
+
activityEnabled: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface FilteredUiConnector {
|
|
65
|
+
connector: UiConnector;
|
|
66
|
+
tools: UiTool[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Filter by connector identity/description or tool name/description. A
|
|
70
|
+
* connector-level match stays visible even when it currently exposes no tools
|
|
71
|
+
* (for example while authorization is required).
|
|
72
|
+
*/
|
|
73
|
+
export declare function filterUiConnectors(connectors: UiConnector[], query: string): FilteredUiConnector[];
|
|
74
|
+
/**
|
|
75
|
+
* Build the read-only status payload served at `/ui/data`. Broken connectors are
|
|
76
|
+
* isolated: they surface status "error" with an empty tool list rather than
|
|
77
|
+
* failing the whole payload.
|
|
78
|
+
*/
|
|
79
|
+
export declare function buildUiData(registry: Registry, baseUrl: string, serverInfo: {
|
|
80
|
+
name: string;
|
|
81
|
+
version: string;
|
|
82
|
+
}, credentialVault?: CredentialVault, activityEnabled?: boolean): Promise<UiData>;
|
|
83
|
+
/**
|
|
84
|
+
* The `/ui` shell carries no connector data: everything comes client-side from
|
|
85
|
+
* the auth-gated `/ui/data`. A configured Clerk provider gives operators a
|
|
86
|
+
* normal sign-in flow and a short-lived session token; bearer-only deployments
|
|
87
|
+
* retain the manual-token fallback.
|
|
88
|
+
*/
|
|
89
|
+
export declare function renderUiHtml(uiAuth?: UiAuthConfig, mcpUrl?: string, branding?: ConnectaBranding): string;
|
|
90
|
+
export {};
|
|
91
|
+
//# sourceMappingURL=ui.d.ts.map
|
package/dist/ui.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEjE,8CAA8C;AAC9C,eAAO,MAAM,oBAAoB,gRAM1B,CAAC;AAER,UAAU,gBAAgB;IACxB,WAAW,EAAE,M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