Skip to content

Commit f0f3343

Browse files
authored
Merge branch 'main' into oskar/feat-sso-plugin-contract
2 parents 2ad9510 + 3b91999 commit f0f3343

187 files changed

Lines changed: 11519 additions & 4381 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.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
---
4+
5+
Cache your chat agent's system prompt with Anthropic prompt caching. `chat.toStreamTextOptions()` now emits the system prompt as a cacheable message when you opt in, so a large, stable system block is billed at cache-read rates on every turn instead of full price.
6+
7+
```ts
8+
// at the streamText call site (Anthropic sugar)
9+
streamText({
10+
...chat.toStreamTextOptions({ cacheControl: { type: "ephemeral" } }),
11+
messages,
12+
});
13+
14+
// provider-agnostic equivalent
15+
chat.toStreamTextOptions({
16+
systemProviderOptions: { anthropic: { cacheControl: { type: "ephemeral" } } },
17+
});
18+
19+
// or where the prompt is defined
20+
chat.prompt.set(SYSTEM_PROMPT, {
21+
providerOptions: { anthropic: { cacheControl: { type: "ephemeral" } } },
22+
});
23+
```
24+
25+
Without an option, `system` stays a plain string. Pairs with a `prepareMessages` cache breakpoint to cache the conversation prefix across turns too.

.github/workflows/check-review-md.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ concurrency:
1414

1515
jobs:
1616
audit:
17+
# Set the ENABLE_CLAUDE_CODE repository variable to 'false' to turn off Claude
18+
# jobs; leave it unset (the default) to keep them enabled.
1719
if: >-
20+
vars.ENABLE_CLAUDE_CODE != 'false' &&
1821
github.event.pull_request.draft == false &&
1922
github.event.pull_request.head.repo.full_name == github.repository
2023
runs-on: ubuntu-latest

.github/workflows/claude-md-audit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ concurrency:
1515

1616
jobs:
1717
audit:
18+
# Set the ENABLE_CLAUDE_CODE repository variable to 'false' to turn off Claude
19+
# jobs; leave it unset (the default) to keep them enabled.
1820
if: >-
21+
vars.ENABLE_CLAUDE_CODE != 'false' &&
1922
github.event.pull_request.draft == false &&
2023
github.event.pull_request.head.repo.full_name == github.repository
2124
runs-on: ubuntu-latest

.github/workflows/claude.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ on:
1212

1313
jobs:
1414
claude:
15+
# Set the ENABLE_CLAUDE_CODE repository variable to 'false' to turn off Claude
16+
# jobs; leave it unset (the default) to keep them enabled.
1517
if: |
16-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
18+
vars.ENABLE_CLAUDE_CODE != 'false' &&
19+
(
20+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
21+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
22+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
23+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
24+
)
2025
runs-on: ubuntu-latest
2126
permissions:
2227
contents: write

.github/workflows/dependabot-critical-alerts.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ permissions:
2525
jobs:
2626
alert:
2727
name: Post critical alerts
28+
# Set the ENABLE_DEPENDABOT_ALERTS repository variable to 'false' to turn off
29+
# the Dependabot alert/summary notifiers — e.g. forks/mirrors that lack the
30+
# DEPENDABOT_ALERTS_TOKEN / SLACK_BOT_TOKEN secrets. Defaults to enabled.
31+
if: ${{ vars.ENABLE_DEPENDABOT_ALERTS != 'false' }}
2832
runs-on: ubuntu-latest
2933
environment: dependabot-summary
3034
env:

.github/workflows/dependabot-weekly-summary.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ permissions:
1919
jobs:
2020
summary:
2121
name: Post weekly Dependabot summary
22+
# Set the ENABLE_DEPENDABOT_ALERTS repository variable to 'false' to turn off
23+
# the Dependabot alert/summary notifiers — e.g. forks/mirrors that lack the
24+
# DEPENDABOT_ALERTS_TOKEN / SLACK_BOT_TOKEN secrets. Defaults to enabled.
25+
if: ${{ vars.ENABLE_DEPENDABOT_ALERTS != 'false' }}
2226
runs-on: ubuntu-latest
2327
environment: dependabot-summary
2428
env:

.github/workflows/helm-prerelease.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,15 @@ jobs:
6868

6969
prerelease:
7070
needs: lint-and-test
71+
# Set the ENABLE_HELM_PRERELEASE repository variable to 'false' to turn off
72+
# publishing the chart to GHCR — e.g. forks/mirrors that lack write_package
73+
# on the owner's charts namespace. Defaults to enabled; the lint-and-test
74+
# job above always runs regardless.
7175
if: |
72-
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
76+
vars.ENABLE_HELM_PRERELEASE != 'false' &&
77+
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
7378
github.event_name == 'push' ||
74-
github.event_name == 'workflow_dispatch'
79+
github.event_name == 'workflow_dispatch')
7580
runs-on: ubuntu-latest
7681
permissions:
7782
contents: read

.github/workflows/release-helm.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ jobs:
6363

6464
release:
6565
needs: lint-and-test
66+
# Set the ENABLE_HELM_PRERELEASE repository variable to 'false' to turn off
67+
# publishing the chart to GHCR — e.g. forks/mirrors that lack write_package
68+
# on the owner's charts namespace. Defaults to enabled; the lint-and-test
69+
# job above always runs regardless.
70+
if: ${{ vars.ENABLE_HELM_PRERELEASE != 'false' }}
6671
runs-on: ubuntu-latest
6772
permissions:
6873
contents: write # for gh-release

.github/workflows/workflow-checks.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ jobs:
3636

3737
zizmor:
3838
name: Zizmor
39+
# Uploads SARIF to the Security tab, which requires GitHub code scanning to be
40+
# enabled on the repository. Set the ENABLE_WORKFLOW_SECURITY_SCAN repository
41+
# variable to 'false' to skip this job where code scanning isn't available;
42+
# leave it unset (the default) to run the scan.
43+
if: ${{ vars.ENABLE_WORKFLOW_SECURITY_SCAN != 'false' }}
3944
runs-on: ubuntu-latest
4045
permissions:
4146
security-events: write # Upload SARIF to GitHub Security tab
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: improvement
4+
---
5+
6+
Harden the native realtime backend's run-change publishing so a publish can never throw into a run lifecycle operation and never buffers commands in memory during a pub/sub Redis outage.

0 commit comments

Comments
 (0)