Skip to content

Commit 0cd6553

Browse files
committed
improvement(docs): drop the preview-gated slack_app page, document managed_agent
- slack_oauth is reachable only through the preview-gated slack_v2 block, so documenting it published an unreleased surface under its own slack_app page. Triggers whose every hosting block sets `preview: true` are now excluded from the docs and the icon map. Triggers no block claims are untouched, so standalone webhook providers keep their pages. - Adds the MANUAL-CONTENT intro to managed_agent.mdx, matching the other integration pages. Verified it survives a regen.
1 parent d59e787 commit 0cd6553

6 files changed

Lines changed: 76 additions & 81 deletions

File tree

apps/docs/components/ui/icon-mapping.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,6 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
486486
similarweb: SimilarwebIcon,
487487
sixtyfour: SixtyfourIcon,
488488
slack: SlackIcon,
489-
slack_app: SlackIcon,
490489
smtp: SmtpIcon,
491490
sportmonks: SportmonksIcon,
492491
sqs: SQSIcon,

apps/docs/content/docs/en/integrations/managed_agent.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
1010
color="#DA7756"
1111
/>
1212

13+
{/* MANUAL-CONTENT-START:intro */}
14+
[Claude Managed Agents](https://www.anthropic.com/) are agents you build and host on the Claude Platform. Anthropic runs the agent loop, and the Claude Managed Agents block calls one from a Sim workflow.
15+
16+
With Claude Managed Agents, you can:
17+
18+
- **Run a hosted agent**: Send a message to an agent in your Claude workspace and get its final response back
19+
- **Pick the environment**: Choose the agent and the environment it runs in, so the same workflow can target development or production
20+
- **Attach credential vaults**: Give the agent scoped access to the credentials it needs for the run
21+
- **Use a memory store**: Connect a memory store with read or write access and pass instructions for how the agent should use it
22+
- **Send files**: Attach files to the run for the agent to work with
23+
- **Tag runs with metadata**: Add key-value tags so runs can be traced and grouped later
24+
25+
In Sim, the Claude Managed Agents block lets a workflow hand work to an agent that lives on the Claude Platform instead of assembling the prompt, tools, and loop yourself. The block returns the agent's final text alongside its session ID and token counts, so you can chain the response into later blocks and track cost per run.
26+
{/* MANUAL-CONTENT-END */}
27+
28+
1329
## Usage Instructions
1430

1531
Invoke a Claude Platform Managed Agent from a workflow. Select a Claude Platform account, pick an agent and environment from that workspace, optionally attach vaults, a memory store, and files, and add metadata tags. Returns the assistant's final text.

apps/docs/content/docs/en/integrations/meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@
217217
"similarweb",
218218
"sixtyfour",
219219
"slack",
220-
"slack_app",
221220
"smtp",
222221
"sportmonks",
223222
"sqs",

apps/docs/content/docs/en/integrations/slack_app.mdx

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

apps/sim/lib/integrations/icon-mapping.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
468468
similarweb: SimilarwebIcon,
469469
sixtyfour: SixtyfourIcon,
470470
slack: SlackIcon,
471-
slack_app: SlackIcon,
472471
smtp: SmtpIcon,
473472
sportmonks: SportmonksIcon,
474473
sqs: SQSIcon,

scripts/generate-docs.ts

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,17 +327,25 @@ function copyIconsFile(): void {
327327
*/
328328
async function addTriggerProviderIcons(iconMapping: Record<string, IconRef>): Promise<void> {
329329
const triggerFiles = (await glob(`${TRIGGERS_PATH}/**/*.ts`)).filter((f) => !f.includes('.test.'))
330+
const previewOnly = await collectPreviewOnlyTriggerIds()
330331

331332
for (const file of triggerFiles) {
332333
const fileContent = fs.readFileSync(file, 'utf-8')
333334
const source = stripSourceComments(fileContent)
334335

335-
for (const match of source.matchAll(/\bprovider\s*:\s*['"]([^'"]+)['"]/g)) {
336-
const provider = match[1]
336+
// Pair each trigger's `id` with the `provider` that follows it in the same
337+
// config, so files holding several trigger configs attribute each provider
338+
// (and its icon) to the right trigger.
339+
const configRegex =
340+
/\bid\s*:\s*['"]([^'"]+)['"][\s\S]{0,600}?\bprovider\s*:\s*['"]([^'"]+)['"]/g
341+
342+
for (const match of source.matchAll(configRegex)) {
343+
const [, triggerId, provider] = match
337344
if (iconMapping[provider]) continue
338345

339-
// Take the icon declared nearest after this provider so files holding
340-
// several trigger configs attribute each icon to the right provider.
346+
// Preview-only triggers get no page, so they need no provider icon.
347+
if (previewOnly.has(triggerId)) continue
348+
341349
const iconName = extractIconNameFromContent(source.slice(match.index))
342350
if (!iconName) continue
343351

@@ -4027,6 +4035,43 @@ async function buildProviderColorMap(): Promise<Map<string, string>> {
40274035
* Generate one MDX file per trigger provider and update the sidebar meta.json.
40284036
* Hand-written docs (HANDWRITTEN_TRIGGER_DOCS) are never touched.
40294037
*/
4038+
/**
4039+
* Trigger ids that every hosting block gates behind `preview: true`.
4040+
*
4041+
* Blocks declare the triggers they expose via `triggers.available`. A trigger
4042+
* listed only by preview blocks inherits their gate — `slack_oauth` is reachable
4043+
* solely through the preview-gated `slack_v2` block, so documenting it would
4044+
* publish an unreleased surface under its own `slack_app` page. Triggers no
4045+
* block claims are left alone: standalone webhook providers are legitimately
4046+
* unlisted and must keep their pages.
4047+
*/
4048+
async function collectPreviewOnlyTriggerIds(): Promise<Set<string>> {
4049+
const listedByReleased = new Set<string>()
4050+
const listedByPreview = new Set<string>()
4051+
4052+
const blockFiles = (await glob(`${BLOCKS_PATH}/*.ts`)).sort()
4053+
for (const blockFile of blockFiles) {
4054+
const fileContent = fs.readFileSync(blockFile, 'utf-8')
4055+
const exportRegex = /export\s+const\s+(\w+)Block\s*:\s*BlockConfig[^=]*=\s*\{/g
4056+
let match: RegExpExecArray | null
4057+
4058+
while ((match = exportRegex.exec(fileContent)) !== null) {
4059+
const startIndex = match.index + match[0].length - 1
4060+
const endIndex = findMatchingClose(fileContent, startIndex)
4061+
if (endIndex === -1) continue
4062+
4063+
const blockContent = fileContent.substring(startIndex, endIndex)
4064+
const available = extractArrayPropertyFromContent(blockContent, 'available')
4065+
if (!available?.length) continue
4066+
4067+
const target = isPreviewSource(blockContent) ? listedByPreview : listedByReleased
4068+
for (const triggerId of available) target.add(triggerId)
4069+
}
4070+
}
4071+
4072+
return new Set([...listedByPreview].filter((id) => !listedByReleased.has(id)))
4073+
}
4074+
40304075
async function generateAllTriggerDocs(): Promise<void> {
40314076
try {
40324077
console.log('Generating trigger documentation...')
@@ -4036,6 +4081,17 @@ async function generateAllTriggerDocs(): Promise<void> {
40364081
}
40374082

40384083
const fullRegistry = await buildFullTriggerRegistry()
4084+
4085+
// A trigger reachable only through a preview-gated block is as unreleased
4086+
// as that block — documenting it publishes an unshipped surface (and, when
4087+
// its provider has no released block, mints a whole page for it).
4088+
const previewOnly = await collectPreviewOnlyTriggerIds()
4089+
for (const triggerId of previewOnly) {
4090+
if (fullRegistry.delete(triggerId)) {
4091+
console.log(`Skipping trigger ${triggerId} — only hosted by a preview-gated block`)
4092+
}
4093+
}
4094+
40394095
const grouped = groupTriggersByProvider(fullRegistry)
40404096
const colorMap = await buildProviderColorMap()
40414097

0 commit comments

Comments
 (0)