Skip to content

Commit 804a452

Browse files
authored
v0.8.3: sim cli, new tools, credential groups, splunk, finder-like files refactor, security hardening
2 parents 417ae20 + 5d172b4 commit 804a452

1,197 files changed

Lines changed: 140552 additions & 36472 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/add-block/SKILL.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,11 +993,15 @@ After adding or changing one, run:
993993
```bash
994994
bun run scripts/generate-docs.ts
995995
bun run integration-catalog:check
996+
bun run docs:check
996997
```
997998

998999
The catalog check independently derives deployment metadata from the executable block registry and
999-
compares it with the committed `apps/sim/lib/integrations/integrations.json`. Review the generated
1000-
diff and keep only intentional changes.
1000+
compares it with the committed `apps/sim/lib/integrations/integrations.json`. `docs:check` re-renders
1001+
every generated docs artifact in memory and fails on any committed file that differs — it runs in CI
1002+
via `check:audits`, so commit the full generator output. If the generator also trues up pages an
1003+
earlier PR left stale, commit that catch-up too; reverting it as "unrelated drift" makes `docs:check`
1004+
fail.
10011005
## Checklist Before Finishing
10021006

10031007
- [ ] `integrationType` is set to the correct `IntegrationType` enum value
@@ -1018,6 +1022,7 @@ diff and keep only intentional changes.
10181022
- [ ] If any tool was added, changed or removed alongside the block: ran `bun run tool-metadata:generate` and committed the artifacts
10191023
- [ ] Ran `bun run scripts/generate-docs.ts`, reviewed the generated diff, and committed the integration catalog changes
10201024
- [ ] `bun run integration-catalog:check` passes
1025+
- [ ] `bun run docs:check` passes (CI gate — fails on any stale generated docs page)
10211026
- [ ] If icon missing: asked user to provide SVG
10221027
- [ ] If triggers exist: `triggers` config set, trigger subBlocks spread
10231028
- [ ] Optional/rarely-used fields set to `mode: 'advanced'`

.agents/skills/add-integration/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,7 @@ Run the documentation generator:
561561
```bash
562562
bun run scripts/generate-docs.ts
563563
bun run integration-catalog:check
564+
bun run docs:check
564565
```
565566

566567
This creates `apps/docs/content/docs/en/integrations/{service}.mdx` — one page per service carrying the block's Actions and, if it has one, its Triggers section. Never hand-edit generated pages; the only editable region is the `{/* MANUAL-CONTENT */}` block (see `scripts/README.md`).
@@ -651,6 +652,9 @@ If creating V2 versions (API-aligned outputs):
651652
- [ ] Verified docs file created
652653
- [ ] Reviewed and committed the generated `apps/sim/lib/integrations/integrations.json` change
653654
- [ ] `bun run integration-catalog:check` passes
655+
- [ ] `bun run docs:check` passes — CI fails on stale generated docs, so commit the full generator
656+
output, including catch-up regeneration for pages another PR left stale (never revert it as
657+
"unrelated drift")
654658

655659
### Final Validation (Required)
656660
- [ ] Read every tool file and cross-referenced inputs/outputs against the API docs

.agents/skills/add-tools/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@ All tool IDs MUST use `snake_case`: `{service}_{action}` (e.g., `x_create_tweet`
475475
- [ ] Index.ts exports all tools and re-exports types (`export * from './types'`)
476476
- [ ] Tools registered in `tools/registry.ts`
477477
- [ ] `bun run tool-metadata:generate` run and the regenerated artifacts committed
478+
- [ ] `bun run scripts/generate-docs.ts` run and the refreshed docs committed — the integration's
479+
docs page is rendered from each tool's description, params, and outputs, and CI's
480+
`bun run docs:check` fails on stale pages
478481
- [ ] Block wired: `tools.access`, dropdown options, subBlocks, `tools.config`, outputs, inputs
479482
- [ ] Model, durable-storage, and internal-execution boundaries use the shared provenance mechanisms
480483
only where a concrete Sim `{{...}}` resolution path requires them

.agents/skills/add-trigger/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,3 +511,6 @@ Add to `helm/sim/values.yaml` under the existing polling cron jobs:
511511
- [ ] `bun run type-check` passes
512512
- [ ] Manually verify output keys match trigger `outputs` keys
513513
- [ ] Trigger UI shows correctly in the block
514+
- [ ] Ran `bun run scripts/generate-docs.ts` and committed the refreshed pages — trigger sections
515+
render into the owning integration's docs page, and CI's `bun run docs:check` fails on stale
516+
pages

.agents/skills/migrate-application-operation/SKILL.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,43 @@ Classify each as `migrate`, `defer`, or `non-goal`. Do not migrate adjacent oper
7878

7979
Preserve behavior unless the task explicitly changes it. Stop and report a decision when surfaces currently disagree on security or compatibility behavior; do not silently choose one.
8080

81+
## Freeze observable behavior before editing
82+
83+
Treat the legacy route or tool as an ordered program, not merely a bag of business logic. Before moving code, write a compact baseline for every in-scope entry point and add focused characterization tests for behavior not already pinned down.
84+
85+
Capture all of these when they apply:
86+
87+
- Accepted inputs, including trimming, blank omission, duplicate query keys, aliases, defaults, and bounds.
88+
- Authentication and authorization order, minimum roles, resource membership, concealment, and exact error/status mapping.
89+
- Exact success bodies, optional fields, status codes, redirects, cookies, headers, and binary or stream behavior.
90+
- Mutation ordering, transaction boundaries, idempotency, no-ops, and observable state after each possible partial failure.
91+
- Audit, notification, analytics, and billing timing plus exact semantic dimensions and attribution.
92+
- Browser or protocol state ownership, concurrency isolation, expiry, callback ordering, and cleanup behavior.
93+
- Every value newly crossing into HTML, JavaScript, SQL, URLs, logs, provider payloads, or another encoding context.
94+
95+
Compare the old statement order with the proposed application lifecycle explicitly:
96+
97+
```text
98+
legacy parse/normalize
99+
-> legacy authorization checks
100+
-> branch-specific canonical lookup
101+
-> mutation(s)
102+
-> per-step side effects
103+
-> response or redirect catch
104+
```
105+
106+
Moving those steps under a wrapper may change behavior even when each individual call is reused. In particular:
107+
108+
- `projectAudit` and `afterSuccess` run only after `execute` returns. They cannot describe earlier committed mutations when a later step throws. Make the compound mutation atomic or define explicit partial-result/failure projection semantics before migrating it.
109+
- Operation metadata is executable policy. Adding a resource role to a workspace-only legacy read is an authorization change, not an architectural cleanup.
110+
- A shared error policy does not automatically preserve route-local concealment, subclass ordering, browser redirects, or branch-specific messages.
111+
- A shared contract does not automatically preserve manual `URLSearchParams` normalization or exact legacy response unions.
112+
- A shared use case may own domain behavior while separate surface presenters still preserve different wire shapes.
113+
- Per-flow identity is insufficient when another part of the flow remains in browser-global state such as one cookie.
114+
- Passing a newly supported parameter through old rendering code creates a new security boundary even when the renderer itself is unchanged.
115+
116+
Fail fast if the baseline cannot be established from code, tests, or an explicit product decision. Do not infer that behavior is unimportant because it was previously implicit.
117+
81118
## Keep the layers distinct
82119

83120
Use these responsibilities:
@@ -270,6 +307,10 @@ Add focused tests for every migrated surface and principal kind allowed by the o
270307
- Public API: personal and workspace keys, rate and rollout behavior, concealment, exact external envelope, and rate headers.
271308
- Copilot or tools: trusted context, exact registered operation membership, rejected forged scope, aliases and resume paths, permission re-check, safe errors, and unchanged tool result shapes.
272309
- Side effects: audit derives from authoritative results; shared notifications follow audit; neither occurs for rejection or no-op.
310+
- Compatibility characterization: legacy normalization, exact response/redirect/cookie behavior, concealment, error subclass precedence, and branch-specific output.
311+
- Failure sequencing: inject a failure after each independently committing step and assert persisted state plus audit, analytics, and notification effects.
312+
- Concurrency: overlap stateful browser or provider flows and prove each callback consumes only its own state and return destination.
313+
- Rendering boundaries: exercise hostile values for every newly connected input that reaches HTML, inline JavaScript, URLs, logs, or provider requests.
273314

274315
Run at minimum:
275316

.agents/skills/validate-integration/SKILL.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,15 +388,25 @@ Several files are generated from tool and block definitions. Editing a tool or b
388388
bun run tool-metadata:generate # repo root — apps/sim/tools/generated/*
389389
bun run scripts/generate-docs.ts # docs .mdx + lib/integrations/integrations.json + docs icons
390390
bun run integration-catalog:check # registry ↔ committed deployment metadata drift
391+
bun run docs:check # committed docs ↔ what the generator renders today
391392
```
392393

393394
- **`tool-metadata:generate`** — required whenever a tool's `outputs`, `params`, or descriptions change. CI enforces this with `bun run tool-metadata:check`, which fails with *"Generated tool metadata is stale"*. This is the easiest gate to miss, because nothing in the tool file hints that a generated artifact mirrors it.
394395
- **`generate-docs`** — required whenever block metadata changes (`bgColor`, `name`, `description`, operations, outputs). Regenerates the integration `.mdx`, `integrations.json`, and the docs copy of `components/icons.tsx`.
395396
- **`integration-catalog:check`** — loads the executable block registry, derives visible integration
396397
deployment fields, and compares them with the committed catalog. It catches missing/unexpected
397398
entries and stale auth/service IDs without loading the executable registry in client code.
398-
399-
**Always diff the regen output before committing.** These generators rewrite every file they own, so they will also sweep in unrelated drift that accumulated on the base branch — pages losing sections, unrelated icons appearing. Keep only the hunks belonging to the integration under validation and `git checkout --` the rest, otherwise an unrelated doc regression rides along in the PR. Verify no page was silently dropped by comparing the directory listing before and after.
399+
- **`docs:check`** — check mode of `generate-docs.ts`: renders every generated docs artifact in
400+
memory and fails listing any committed file that differs. Runs in CI via `check:audits`.
401+
402+
**Always diff the regen output before committing — but commit all of it.** These generators rewrite
403+
every file they own, so they also true up drift that accumulated on the base branch (pages whose
404+
source changed without a regen). That catch-up is correct output, not a regression: `docs:check`
405+
fails CI on any page left stale, so reverting swept-in hunks with `git checkout --` reintroduces the
406+
failure. Review the diff to confirm each hunk is explained by a real source change (yours or an
407+
upstream PR that skipped regeneration), and investigate anything that looks like content loss — a
408+
page losing a section usually means its source block moved or a generator input broke, not that the
409+
hunk should be reverted.
400410

401411
If an icon changed, `apps/sim/components/icons.tsx` is the source of truth and `apps/docs/components/icons.tsx` is its generated mirror — they must end up byte-identical for that component.
402412

@@ -408,9 +418,10 @@ After fixing, confirm:
408418
3. The integration's tests pass, and any test you added actually fails without its fix (revert it once and watch it go red)
409419
4. Derived artifacts regenerated and their diffs reviewed (see above)
410420
5. `bun run integration-catalog:check` passes
411-
6. For OAuth or service-account changes, `bun test apps/sim/lib/integrations/availability.server.test.ts` passes
412-
7. Re-read all modified files to verify fixes are correct
413-
8. Any remaining unknown response schemas were explicitly reported to the user instead of guessed
421+
6. `bun run docs:check` passes
422+
7. For OAuth or service-account changes, `bun test apps/sim/lib/integrations/availability.server.test.ts` passes
423+
8. Re-read all modified files to verify fixes are correct
424+
9. Any remaining unknown response schemas were explicitly reported to the user instead of guessed
414425

415426
## Checklist Summary
416427

@@ -439,7 +450,7 @@ After fixing, confirm:
439450
- [ ] Reported all issues grouped by severity
440451
- [ ] Fixed all critical and warning issues
441452
- [ ] Ran `bun run tool-metadata:generate` if any tool outputs/params changed, and confirmed `bun run tool-metadata:check` passes
442-
- [ ] Ran `bun run generate-docs` if any block metadata changed, and reverted unrelated drift the generator swept in
453+
- [ ] Ran `bun run generate-docs` if any block metadata changed, and committed the full generated diff — including stale-page catch-up for other integrations (`bun run docs:check` fails CI on reverted generator output)
443454
- [ ] Ran `bun run lint` after fixes
444455
- [ ] Verified TypeScript compiles clean
445456
- [ ] Verified added tests fail without their fix

.claude/commands/add-block-preview.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)