Skip to content

docs(cre): add batch secret fetching for Go and TypeScript SDKs - #4057

Merged
SyedAsadKazmi merged 3 commits into
mainfrom
batchSecrets
Aug 14, 2026
Merged

SyedAsadKazmi merged 3 commits into
mainfrom
batchSecrets

Conversation

@wentzeld

Copy link
Copy Markdown
Contributor

Summary

  • Adds runtime.getSecrets() (TS) and runtime.GetSecrets() (Go) documentation to the SDK core reference pages, covering signatures, return types, error behavior, and examples
  • Restructures the "Fetching multiple secrets" section in both simulation guides to recommend batch fetch as the primary approach, with sequential fetch kept as an alternative
  • Adds two new runnable snippet files (using-secrets-batch-ts.ts, using-secrets-batch-go.go) used by the guide pages

Test plan

  • Verify the new batch snippet files render correctly in both simulation guide pages
  • Confirm getSecrets / GetSecrets sections appear correctly in the TS and Go SDK reference pages
  • Check that the SecretsProvider interface block in core-go.mdx now shows both methods
  • Confirm existing single-secret and sequential-fetch examples are still present and unchanged

@wentzeld
wentzeld requested review from a team as code owners August 13, 2026 15:54
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview Aug 14, 2026 2:35pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

👋 wentzeld, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

thodges-gh
thodges-gh previously approved these changes Aug 13, 2026
If any secret in a batch fails to fetch, `getSecrets()` throws a `SecretsBatchError` containing all error messages from the failed secrets.
</Aside>

### Using sequential fetch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section can be removed

Comment thread src/content/cre/llms-full-go.txt Outdated
If any secret in the batch fails to fetch, `GetSecrets()` returns an error containing all error messages from the failed secrets.
</Aside>

### Using sequential fetch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

If any secret in the batch fails to fetch, `GetSecrets()` returns an error containing all error messages from the failed secrets.
</Aside>

### Using sequential fetch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Comment thread src/content/cre/llms-full-ts.txt Outdated
If any secret in a batch fails to fetch, `getSecrets()` throws a `SecretsBatchError` containing all error messages from the failed secrets.
</Aside>

### Using sequential fetch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

### `SecretsProvider` interface

The `SecretsProvider` interface is embedded in `Runtime`, which means `GetSecret` is available directly on the runtime object. It is also passed as a parameter to [`InitWorkflow`](#initworkflow), allowing you to access secrets during workflow initialization.
The `SecretsProvider` interface is embedded in `Runtime`, which means both `GetSecret` and `GetSecrets` are available directly on the runtime object. It is also passed as a parameter to [`InitWorkflow`](#initworkflow), allowing you to access secrets during workflow initialization.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get rid of the GetSecret reference here and below

calling `.result()`. This is because `runInNodeMode` returns a function that can accept additional arguments.
</Aside>

## `runtime.getSecret()`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get rid of this section

@SyedAsadKazmi
SyedAsadKazmi enabled auto-merge (squash) August 14, 2026 14:33
@SyedAsadKazmi
SyedAsadKazmi merged commit c795100 into main Aug 14, 2026
27 checks passed
@SyedAsadKazmi
SyedAsadKazmi deleted the batchSecrets branch August 14, 2026 14:37

This branch was successfully deployed

1 active deployment
Preview 3e393437 Deployed Aug 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants