@devosurf/tesser-connectors 0.1.0-alpha.3 → 0.1.0-alpha.4

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 (3) hide show
  1. package/README.md +1 -1
  2. package/llms.txt +85 -0
  3. package/package.json +4 -3
package/README.md CHANGED
@@ -6,7 +6,7 @@ The Tesser connector library. **Apache-2.0** — connectors are permissive so th
6
6
  >
7
7
  > `outlook-mail` supports delegated Microsoft 365 user mailboxes by default and shared mailbox operations via the optional `mailbox` input, which targets Graph `/users/{userPrincipalName}` endpoints. It includes message list/get/send/reply/move/read-state/category helpers, draft create/reply/update/send, attachment get/list, mail folder list, master category list/create, and a delta-query `messageReceived` poll trigger. Graph webhook subscriptions remain future work because the runtime must own `validationToken` echoing and renewal.
8
8
 
9
- A connector is **our own** typed artifact — no Nango, no third-party OAuth code (ADR-0004). One connector per directory (`connectors/<name>/index.ts` + colocated tests + `sampleData`); a codegen step owns the registry, so you never hand-edit a global file. Auth is declared **once** and injected into every Action as a pre-authed `ctx.http` client — the author **never names a token** (`ctx.auth` is a masked escape hatch for odd placements). Actions are nested typed calls that return *our* stable shape, which `output` validates — never the raw provider response (ADR-0012):
9
+ A connector is **our own** typed artifact — no Nango, no third-party OAuth code (ADR-0004). One connector per directory (`connectors/<name>/index.ts` + colocated tests + `sampleData`); a codegen step owns the registry, so you never hand-edit a global file. The npm package intentionally ships `manifest.json`, `llms.txt`, and every connector `index.ts` so agents can inspect the installed, version-pinned source instead of relying on stale generated summaries. Auth is declared **once** and injected into every Action as a pre-authed `ctx.http` client — the author **never names a token** (`ctx.auth` is a masked escape hatch for odd placements). Actions are nested typed calls that return *our* stable shape, which `output` validates — never the raw provider response (ADR-0012):
10
10
 
11
11
  ```ts
12
12
  defineConnector({
package/llms.txt ADDED
@@ -0,0 +1,85 @@
1
+ # @devosurf/tesser-connectors — installed Connector source map
2
+
3
+ This package intentionally ships the installed Connector source as TypeScript. For exact Connector APIs, inspect the version-pinned files in `node_modules`; do not rely on training data, memory, or hand-written summaries.
4
+
5
+ ## Hard rule
6
+
7
+ Do not guess Connector APIs from memory, training data, old examples, or web search. After `pnpm install`, inspect the installed package in `node_modules/@devosurf/tesser-connectors`.
8
+
9
+ ## Source-of-truth order for agents
10
+
11
+ 1. Project policy: `AGENTS.md` and `.tesser/docs/connectors.md`.
12
+ 2. Connector inventory: `node_modules/@devosurf/tesser-connectors/manifest.json`.
13
+ 3. Import names: `node_modules/@devosurf/tesser-connectors/index.ts`.
14
+ 4. Exact input/output schemas, samples, triggers, provider quirks: `node_modules/@devosurf/tesser-connectors/<connector-id>/index.ts`.
15
+ 5. Provider OAuth facts: `node_modules/@devosurf/tesser-connectors/providers/*.ts` and `catalog/index.ts`.
16
+
17
+ Never edit `node_modules`. Read it, then edit the Automation under `automations/<id>/` and validate with `tesser test --json` / `tesser build --json`.
18
+
19
+ ## Quick inspection commands
20
+
21
+ Run `pnpm install` first if `node_modules` is absent.
22
+
23
+ ```bash
24
+ # Barrel export names: use these names in `import { ... } from "@devosurf/tesser-connectors"`.
25
+ sed -n '1,180p' node_modules/@devosurf/tesser-connectors/index.ts
26
+
27
+ # Installed connector inventory with actions/triggers.
28
+ node - <<'NODE'
29
+ const fs = require('node:fs');
30
+ const manifest = JSON.parse(fs.readFileSync('node_modules/@devosurf/tesser-connectors/manifest.json', 'utf8'));
31
+ for (const c of manifest.connectors) {
32
+ console.log("");
33
+ console.log(`${c.id}: ${c.describe}`);
34
+ const auth = Object.keys(c.auth ?? {});
35
+ if (auth.length) console.log(` auth: ${auth.join(', ')}`);
36
+ if (c.actions?.length) console.log(` actions: ${c.actions.map((a) => `${a.path} [${a.safety}${a.retrySafe ? ', retry-safe' : ''}]`).join(', ')}`);
37
+ if (c.triggers?.length) console.log(` triggers: ${c.triggers.map((t) => `${t.id} [${t.strategy}]`).join(', ')}`);
38
+ }
39
+ NODE
40
+
41
+ # Exact schemas for one Connector, including Zod input/output objects.
42
+ sed -n '1,260p' node_modules/@devosurf/tesser-connectors/outlook-mail/index.ts
43
+ ```
44
+
45
+ ## Authoring pattern
46
+
47
+ ```ts
48
+ import { defineAutomation, onSchedule } from "@devosurf/tesser-sdk";
49
+ import { github, slack } from "@devosurf/tesser-connectors";
50
+ import { z } from "zod";
51
+
52
+ export default defineAutomation({
53
+ id: "digest",
54
+ trigger: onSchedule({ cron: "0 9 * * *", tz: "UTC" }),
55
+ connections: { github, slack },
56
+ output: z.object({ posted: z.boolean(), count: z.number() }),
57
+
58
+ run: async (_input, ctx) => {
59
+ const issues = await ctx.step("fetch-open-issues", () =>
60
+ ctx.connections.github.issues.list({ state: "open", labels: ["bug"] }),
61
+ );
62
+
63
+ if (issues.length === 0) return { posted: false, count: 0 };
64
+
65
+ await ctx.step("post-to-slack", () =>
66
+ ctx.connections.slack.chat.postMessage({ channel: "#ops", text: `${issues.length} bugs` }),
67
+ );
68
+
69
+ return { posted: true, count: issues.length };
70
+ },
71
+ });
72
+ ```
73
+
74
+ ## Rules that matter more than the Connector API
75
+
76
+ - A Connector import is not an authed client. It is a typed requirement declaration.
77
+ - Runtime calls go through `ctx.connections.<connection-key>` inside `run`.
78
+ - Every Connector Action call must be inside `ctx.step(...)`.
79
+ - Declare raw credentials separately with `secrets: { name: secret({ describe: "..." }) }`.
80
+ - The Credential broker injects values at runtime; agents must never read or print tokens/secrets.
81
+ - Deploy halts on missing Connections or Secrets; a human completes the connect link.
82
+
83
+ ## Connector ids currently shipped in this package
84
+
85
+ Read `manifest.json` for the authoritative list. Current ids include core HTTP/email/repo/chat/calendar/document/spreadsheet/model/harness Connectors such as `http`, `github`, `slack`, `resend`, `gmail`, `outlook-mail`, Google Connectors, and Harness/model Connectors. Do not hardcode this list in Automations or docs; inspect the installed manifest.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devosurf/tesser-connectors",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.4",
4
4
  "description": "Tesser connector library — typed integrations consumed as ctx.connections.<name>.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -14,13 +14,14 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "zod": "^4.4.3",
17
- "@devosurf/tesser-sdk": "0.1.0-alpha.3"
17
+ "@devosurf/tesser-sdk": "0.1.0-alpha.4"
18
18
  },
19
19
  "devDependencies": {
20
- "@devosurf/tesser-testing": "^0.1.0-alpha.3"
20
+ "@devosurf/tesser-testing": "^0.1.0-alpha.4"
21
21
  },
22
22
  "files": [
23
23
  "index.ts",
24
+ "llms.txt",
24
25
  "catalog/index.ts",
25
26
  "providers/*.ts",
26
27
  "*/index.ts",