You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional companions: `credentialLabels` (override the picker's section/connect-row copy) and `allowServiceAccounts: true` (trigger-mode only — list service accounts, which triggers otherwise exclude; set only when the trigger's polling path can resolve a service-account token). The connect modal, provider families (Google JSON key, Atlassian token, token-paste, client-credential, Slack bot), and the preview gate are all resolved from `serviceAccountProviderId` — you don't wire them per block.
165
165
166
+
### OAuth deployment availability (required for integration blocks)
167
+
168
+
A visible tools-category block with OAuth is deployment-gated. Its `oauth-input.serviceId` is
169
+
projected into `apps/sim/lib/integrations/integrations.json`, then resolved through
170
+
`resolveOAuthClientCapabilityId()` in `apps/sim/lib/core/config/env-capabilities.ts`.
171
+
172
+
When adding or changing an OAuth integration block:
173
+
174
+
1. Keep exactly one distinct OAuth `serviceId` across the block's `oauth-input` subBlocks.
175
+
2. Confirm that service ID resolves to an entry in `OAUTH_CLIENT_CAPABILITIES`. Google and
176
+
Microsoft service IDs intentionally share their provider-level capability; do not add duplicate
177
+
entries for those aliases.
178
+
3. For a new capability, add its required client fields to `OAUTH_CLIENT_CAPABILITIES` and ensure
179
+
every referenced field exists in the env schema in `apps/sim/lib/core/config/env.ts`. Then add
180
+
the matching `text` or `secret` input modes to `OAUTH_CLIENT_SETUP_FIELDS` in
181
+
`scripts/setup/capability-config.ts`. The CLI catalog is exhaustively typed and checked against
182
+
the runtime field list; do not infer secrecy from the field name.
183
+
4. If the canonical OAuth service declares `serviceAccountProviderId`, keep
184
+
`SERVICE_ACCOUNT_METADATA_BY_OAUTH_SERVICE_ID` in
185
+
`apps/sim/lib/integrations/service-account-metadata.ts` aligned. Set
186
+
`deploymentRequirement` only when the service-account path is preview-gated or depends on the
187
+
OAuth client fields; otherwise omit it.
188
+
189
+
Missing capability metadata is a runtime configuration error, not a reason to make the integration
190
+
silently available.
191
+
166
192
### Selectors (with dynamic options)
167
193
```typescript
168
194
// Channel selector (Slack, Discord, etc.)
@@ -919,12 +945,25 @@ Derive templates from the service's real use cases. Each prompt should name a co
919
945
-**Ground every skill in operations the block actually exposes** — cross-check each skill's steps against `tools.access`. Never describe an action the integration cannot perform.
920
946
-**Derive skills from real, popular use cases found online — never invent them.** Web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles) and only add a skill you can source as something people genuinely do with the service. Do not hallucinate skills.
921
947
922
-
## Generated tool metadata
948
+
## Generated artifacts
923
949
924
-
Adding a block on its own needs **no** regeneration — a block references existing tool IDs through `tools.access` and does not change any tool's shape.
950
+
Adding a block on its own needs no **tool metadata** regeneration — a block references existing
951
+
tool IDs through `tools.access` and does not change any tool's shape.
925
952
926
953
But if the same change also adds, edits **or removes** a tool, run `bun run tool-metadata:generate` and commit the result, or CI fails on stale artifacts. That matters here because a block's `outputs` are authored to match its tools' outputs, and the UI now reads those from the generated metadata rather than the executable registry — an unregenerated tool change makes the block's outputs disagree with what the panel renders. See `.agents/skills/tool-registry-boundary/SKILL.md`.
927
954
955
+
A visible integration block does require the generated integration catalog and docs to be refreshed.
956
+
After adding or changing one, run:
957
+
958
+
```bash
959
+
bun run scripts/generate-docs.ts
960
+
bun run integration-catalog:check
961
+
```
962
+
963
+
The catalog check independently derives deployment metadata from the executable block registry and
964
+
compares it with the committed `apps/sim/lib/integrations/integrations.json`. Review the generated
965
+
diff and keep only intentional changes.
966
+
928
967
## Checklist Before Finishing
929
968
930
969
-[ ]`integrationType` is set to the correct `IntegrationType` enum value
@@ -934,12 +973,17 @@ But if the same change also adds, edits **or removes** a tool, run `bun run tool
934
973
-[ ] DependsOn set for fields that need other values
935
974
-[ ] Required fields marked correctly (boolean or condition)
936
975
-[ ] OAuth inputs have correct `serviceId` and `requiredScopes: getScopesForService(serviceId)`
976
+
-[ ] Every OAuth `serviceId` resolves through `resolveOAuthClientCapabilityId()` to the correct `OAUTH_CLIENT_CAPABILITIES` entry
977
+
-[ ] Any new OAuth capability fields exist in `apps/sim/lib/core/config/env.ts`
978
+
-[ ] If the OAuth service supports service accounts, `SERVICE_ACCOUNT_METADATA_BY_OAUTH_SERVICE_ID` matches its canonical `serviceAccountProviderId` and deployment requirement
937
979
-[ ] Scope descriptions added to `SCOPE_DESCRIPTIONS` in `lib/oauth/utils.ts` for any new scopes
938
980
-[ ] Tools.access lists all tool IDs (snake_case)
939
981
-[ ] Tools.config.tool returns correct tool ID (snake_case)
940
982
-[ ] Outputs match tool outputs
941
983
-[ ] Block + meta registered in registry-maps.ts (`BLOCK_REGISTRY` / `BLOCK_META_REGISTRY`)
942
984
-[ ] If any tool was added, changed or removed alongside the block: ran `bun run tool-metadata:generate` and committed the artifacts
985
+
-[ ] Ran `bun run scripts/generate-docs.ts`, reviewed the generated diff, and committed the integration catalog changes
Copy file name to clipboardExpand all lines: .agents/skills/add-column-type/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ This was not always true: adding `currency` originally took ~40 edits across 32
15
15
Do **not** hunt for places to edit. Add your type to the `ColumnType` union first and let `tsc` produce the list:
16
16
17
17
```bash
18
-
cd apps/sim &&bunx tsc --noEmit -p tsconfig.json
18
+
cd apps/sim &&bun run type-check
19
19
```
20
20
21
21
You will get two errors, naming `column-types/registry.ts` and `column-types/registry.server.ts`. Register in both.
@@ -153,7 +153,7 @@ Registering the *type* is compiler-enforced. Registering its *metadata* is not,
153
153
154
154
## Final Validation (Required)
155
155
156
-
1.**`cd apps/sim && bunx tsc --noEmit -p tsconfig.json`** — must be clean. If any file *outside*`column-types/` errors, that file has a hardcoded type list; fix it to read the registry.
156
+
1.**`cd apps/sim && bun run type-check`** — must be clean. If any file *outside*`column-types/` errors, that file has a hardcoded type list; fix it to read the registry.
157
157
2.**Grep for leaks** — `grep -rnE "(===|!==) '{id}'|case '{id}':" apps/sim --include='*.ts' --include='*.tsx' | grep -v column-types/`. (All three forms: a plain `!==` and a `case` are how half of `currency`'s real branches are written.) Hits are expected; judge each. A hit is fine when it mounts a specific React component or encodes a genuinely one-off behavior (`json`'s mono textarea, `date`'s timezone-aware parsing). A hit is a **leak** when it restates something the registry could answer — an icon, a label, a colour, an operator set, a cast, a coercion. Leaks get a registry field, not a new branch.
158
158
3.**Run the suite** — `bunx vitest run lib/table 'app/workspace/[workspaceId]/tables' lib/api app/api/table app/api/v1 lib/copilot/tools/server/table`. Existing tests must pass **unchanged**; needing to edit one means you changed behavior for the other types.
159
159
4.**`bun run lint:check`, `bun run check:api-validation`, `bun run check:client-boundary`** from the repo root.
1.`bunx tsc --noEmit` (from `apps/sim`, `NODE_OPTIONS=--max-old-space-size=8192`) and `bunx biome check` on the changed files.
131
+
1.`bun run type-check` (from `apps/sim`) and `bunx biome check` on the changed files.
132
132
2. In a table → **+ New column → Enrichments** → pick the new enrichment, map its inputs to columns, name the output column(s), Save. Confirm it appears in the catalog with its icon/description.
133
133
3. With hosted keys (or a workspace BYOK key) configured for each provider's service, run a row and confirm the cell fills; the dev-server log shows `Enrichment hit { provider }`. A row whose providers all miss completes blank; a row where every provider errored shows an error cell.
0 commit comments