@zackbart/connecta 0.10.1 → 0.10.2
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/AGENTS.md +113 -0
- package/CHANGELOG.md +51 -0
- package/README.md +53 -9
- package/bin/connecta.mjs +272 -0
- package/dist/catalog-service.d.ts +39 -1
- package/dist/catalog-service.d.ts.map +1 -1
- package/dist/catalog-service.js +133 -11
- package/dist/catalog-service.js.map +1 -1
- package/dist/catalog.d.ts +17 -0
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +113 -13
- package/dist/catalog.js.map +1 -1
- package/dist/execute.d.ts +45 -1
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +265 -68
- package/dist/execute.js.map +1 -1
- package/dist/invocation.d.ts.map +1 -1
- package/dist/invocation.js +1 -5
- package/dist/invocation.js.map +1 -1
- package/dist/meta-tools.d.ts +1 -0
- package/dist/meta-tools.d.ts.map +1 -1
- package/dist/meta-tools.js +410 -12
- package/dist/meta-tools.js.map +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +1 -1
- package/dist/tool-safety.d.ts +10 -0
- package/dist/tool-safety.d.ts.map +1 -0
- package/dist/tool-safety.js +12 -0
- package/dist/tool-safety.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/documentation/architecture.md +7 -0
- package/documentation/auth.md +58 -0
- package/documentation/call-admission.md +7 -0
- package/documentation/code-first-exploration.md +292 -0
- package/documentation/code-mode.md +697 -0
- package/documentation/connector-guides.md +7 -0
- package/documentation/connectors.md +63 -0
- package/documentation/mcp-2026-07-28.md +46 -0
- package/documentation/meta-tools.md +167 -0
- package/documentation/operations.md +7 -0
- package/documentation/operator-ui.md +7 -0
- package/documentation/request-admission.md +7 -0
- package/documentation/storage-and-credentials.md +54 -0
- package/ethos.md +132 -0
- package/examples/node/README.md +53 -0
- package/examples/node/src/index.ts +73 -0
- package/examples/worker/README.md +160 -0
- package/examples/worker/src/cloudflare-kv.ts +43 -0
- package/examples/worker/src/d1-activity-row.ts +100 -0
- package/examples/worker/src/d1-activity.ts +144 -0
- package/examples/worker/src/index.ts +136 -0
- package/examples/worker/wrangler.jsonc +26 -0
- package/package.json +11 -1
- package/src/catalog-service.ts +177 -15
- package/src/catalog.ts +143 -12
- package/src/execute.ts +372 -96
- package/src/invocation.ts +1 -8
- package/src/meta-tools.ts +504 -11
- package/src/skills.ts +1 -1
- package/src/tool-safety.ts +15 -0
- package/src/version.ts +1 -1
- package/templates/node/.env.example +5 -0
- package/templates/node/AGENTS.md +19 -0
- package/templates/node/README.md +33 -0
- package/templates/node/package.json +23 -0
- package/templates/node/src/index.ts +43 -0
- package/templates/node/tsconfig.json +12 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "connecta-deployment",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=20.9.0"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"doctor": "connecta doctor",
|
|
11
|
+
"start": "tsx src/index.ts",
|
|
12
|
+
"typecheck": "tsc --noEmit"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@zackbart/connecta": "0.10.2",
|
|
16
|
+
"quickjs-emscripten": "0.32.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^22.0.0",
|
|
20
|
+
"tsx": "^4.23.1",
|
|
21
|
+
"typescript": "^5.6.0"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prescribed Connecta deployment.
|
|
3
|
+
*
|
|
4
|
+
* Keep this file as deployment configuration: connectors, authentication,
|
|
5
|
+
* storage, and public origin. Add application logic only inside deliberate
|
|
6
|
+
* api() connector handlers.
|
|
7
|
+
*/
|
|
8
|
+
import { api, bearerToken, createConnecta } from "@zackbart/connecta";
|
|
9
|
+
import { fileStorage, listen } from "@zackbart/connecta/node";
|
|
10
|
+
import { quickJsExecutor } from "@zackbart/connecta/quickjs";
|
|
11
|
+
|
|
12
|
+
const token = process.env.CONNECTA_TOKEN;
|
|
13
|
+
if (!token) {
|
|
14
|
+
throw new Error(
|
|
15
|
+
"CONNECTA_TOKEN is required. Refusing to start without inbound auth.",
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
const port = Number(process.env.PORT ?? 8787);
|
|
19
|
+
|
|
20
|
+
const connecta = createConnecta({
|
|
21
|
+
storage: fileStorage("./.connecta-state.json"),
|
|
22
|
+
auth: bearerToken(token, { subjectId: "operator" }),
|
|
23
|
+
publicUrl: `http://localhost:${port}`,
|
|
24
|
+
// Keep this for the prescribed seven-tool code-first surface.
|
|
25
|
+
executor: quickJsExecutor(),
|
|
26
|
+
connectors: [
|
|
27
|
+
api("time", {
|
|
28
|
+
description: "Time — current timestamp",
|
|
29
|
+
tools: [
|
|
30
|
+
{
|
|
31
|
+
name: "get_now",
|
|
32
|
+
description: "Return the current time as an ISO 8601 timestamp.",
|
|
33
|
+
inputSchema: { type: "object", properties: {} },
|
|
34
|
+
annotations: { readOnlyHint: true },
|
|
35
|
+
handler: async () => ({ now: new Date().toISOString() }),
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
}),
|
|
39
|
+
],
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
listen(connecta, port);
|
|
43
|
+
console.log(`connecta listening on http://localhost:${port}/mcp`);
|