Skip to content

Commit 8e57b16

Browse files
authored
Merge pull request #20 from run-llama/stainless/release
Release SDK updates
2 parents d1adc05 + 0f29c29 commit 8e57b16

258 files changed

Lines changed: 39530 additions & 32793 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.

‎.github/workflows/stlc-promote.yml‎

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,59 @@ jobs:
6969
env:
7070
GH_TOKEN: ${{ steps.prod-token.outputs.token }}
7171
run: |
72+
# Regenerate the body on every promote. The release branch is
73+
# force-pushed, so a body written only at gh-pr-create time freezes at
74+
# whatever was pending the day the PR opened and never mentions
75+
# anything promoted since.
76+
git log --reverse --pretty=$'%H\t%s' production/main..origin/main > commits.tsv
77+
PROD_REPO="${PRODUCTION_REPO}" python3 - commits.tsv > body.md <<'PY'
78+
import os, re, sys
79+
80+
repo = os.environ["PROD_REPO"]
81+
rows = [l.rstrip("\n").split("\t", 1) for l in open(sys.argv[1]) if "\t" in l]
82+
83+
NAMED = [("feat", "### Features"), ("fix", "### Bug Fixes"),
84+
("perf", "### Performance"), ("docs", "### Documentation"),
85+
("refactor", "### Refactors")]
86+
CHORE = {"chore", "ci", "build", "test", "style", "release"}
87+
NOISE = re.compile(r"^(Build SDK|Merge pull request #\d+|Merge branch )")
88+
89+
named, chores, unconventional, generated = {}, [], [], []
90+
for sha, subject in rows:
91+
m = re.match(r"^(\w+)(\([^)]*\))?!?:", subject)
92+
kind = m.group(1) if m else ""
93+
if kind in dict(NAMED): named.setdefault(kind, []).append((sha, subject))
94+
elif kind in CHORE: chores.append((sha, subject))
95+
elif NOISE.match(subject): generated.append((sha, subject))
96+
else: unconventional.append((sha, subject))
97+
98+
def rows_md(items):
99+
out = []
100+
for sha, subject in items:
101+
# Five-digit refs are run-llama/platform PRs; GitHub would
102+
# otherwise autolink them to this repo's own issue numbers.
103+
subject = re.sub(r"\(#(\d{5,})\)",
104+
r"([#\1](https://github.com/run-llama/platform/pull/\1))", subject)
105+
out.append(f"- {subject} ([`{sha[:7]}`](https://github.com/{repo}/commit/{sha}))")
106+
return out
107+
108+
L = [f"Promotes `stainless/release` onto `main` — **{len(rows)} commits**. "
109+
"Merging this lets release-please cut the next release and write `CHANGELOG.md`.", ""]
110+
for kind, title in NAMED:
111+
if named.get(kind):
112+
L += [title, *rows_md(named[kind]), ""]
113+
if unconventional:
114+
L += ["### :warning: Not conventional-commit — release-please will DROP these from `CHANGELOG.md`",
115+
*rows_md(unconventional), ""]
116+
for items, title in ((chores, "Chores &amp; CI"), (generated, "Codegen &amp; merge commits")):
117+
if items:
118+
L += [f"<details><summary>{title} ({len(items)})</summary>", "",
119+
*rows_md(items), "", "</details>", ""]
120+
L.append("<sub>Regenerated by `stlc-promote.yml` on every promote, from "
121+
"`main...stainless/release`.</sub>")
122+
print("\n".join(L))
123+
PY
124+
72125
EXISTING_PR=$(gh pr list \
73126
--repo "${PRODUCTION_REPO}" \
74127
--head stainless/release \
@@ -81,7 +134,9 @@ jobs:
81134
--base main \
82135
--head stainless/release \
83136
--title "Release SDK updates" \
84-
--body "$(git log --oneline production/main..origin/main)"
137+
--body-file body.md
85138
else
86-
echo "Release PR #${EXISTING_PR} already exists. Force-push has updated it."
139+
gh pr edit "${EXISTING_PR}" \
140+
--repo "${PRODUCTION_REPO}" \
141+
--body-file body.md
87142
fi

‎.github/workflows/stlc-sync-from-production.yml‎

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Sync from production
22

33
on:
4-
schedule:
5-
# A poll, not a release — tune to how often releases/contributions land on
6-
# production. Every few hours is plenty; daily is fine.
7-
- cron: '17 */6 * * *'
4+
# Cadence lives in run-llama/stainless .github/workflows/stlc-dispatch-backsync.yml,
5+
# which dispatches this workflow with a CI_BOT App installation token. A `schedule:`
6+
# here would fire it a second time and attribute that run to whoever last edited the
7+
# cron. Verified 2026-08-07 by running both paths side by side: dispatched runs show
8+
# llama-org-ci-bot[bot], scheduled runs showed a maintainer who had left the org.
89
workflow_dispatch: {}
910

1011
permissions:
11-
contents: write # push the back-sync branch on staging
12-
pull-requests: write # open/merge the back-sync PR on staging
12+
contents: read # checkout only — the push and the PR use the CI_BOT app token
1313

1414
concurrency:
1515
group: stlc-sync-from-production
@@ -21,8 +21,6 @@ jobs:
2121
if: github.repository == 'run-llama/llamacloud-prod-java'
2222
env:
2323
PRODUCTION_REPO: run-llama/llama-parse-java
24-
# The built-in token writes the branch + PR on this (staging) repo.
25-
GH_TOKEN: ${{ github.token }}
2624
steps:
2725
- name: Generate production-repo token (CI_BOT GitHub App, read-only)
2826
id: prod-token
@@ -34,10 +32,24 @@ jobs:
3432
repositories: llama-parse-java
3533
permission-contents: read
3634

35+
- name: Generate staging-repo token (CI_BOT GitHub App)
36+
id: staging-token
37+
uses: actions/create-github-app-token@v1
38+
with:
39+
app-id: ${{ secrets.CI_BOT_APP_ID }}
40+
private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }}
41+
# owner/repositories omitted: the token scopes to this repository.
42+
permission-contents: write
43+
permission-pull-requests: write
44+
# production/main carries .github/workflows changes; GITHUB_TOKEN can
45+
# never push those.
46+
permission-workflows: write
47+
3748
- name: Check out staging
3849
uses: actions/checkout@v6
3950
with:
4051
fetch-depth: 0
52+
persist-credentials: false
4153

4254
- name: Fetch production main
4355
env:
@@ -64,10 +76,17 @@ jobs:
6476
6577
- name: Push production main to the back-sync branch on staging
6678
if: steps.diff.outputs.behind == 'true'
67-
run: git push origin production/main:refs/heads/stlc/from-prod --force
79+
env:
80+
STAGING_REPO_TOKEN: ${{ steps.staging-token.outputs.token }}
81+
run: |
82+
git push \
83+
"https://x-access-token:${STAGING_REPO_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" \
84+
production/main:refs/heads/stlc/from-prod --force
6885
6986
- name: Open or update the back-sync PR on staging
7087
if: steps.diff.outputs.behind == 'true'
88+
env:
89+
GH_TOKEN: ${{ steps.staging-token.outputs.token }}
7190
run: |
7291
EXISTING_PR=$(gh pr list --head stlc/from-prod --base main --state open --json number --jq '.[0].number')
7392
if [ -z "${EXISTING_PR}" ]; then

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 136
1+
configured_endpoints: 150

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- x-release-please-start-version -->
44

55
[![Maven Central](https://img.shields.io/maven-central/v/ai.llamaindex.llamacloud/llama-cloud)](https://central.sonatype.com/artifact/ai.llamaindex.llamacloud/llama-cloud/1.4.0)
6-
[![javadoc](https://javadoc.io/badge2/ai.llamaindex.llamacloud/llama-cloud/1.4.0/javadoc.svg)](https://javadoc.io/doc/ai.llamaindex.llamacloud/llama-cloud/1.3.0)
6+
[![javadoc](https://javadoc.io/badge2/ai.llamaindex.llamacloud/llama-cloud/1.4.0/javadoc.svg)](https://javadoc.io/doc/ai.llamaindex.llamacloud/llama-cloud/1.4.0)
77

88
<!-- x-release-please-end -->
99

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClient.kt‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ import ai.llamaindex.llamacloud.services.blocking.DataSinkService
1212
import ai.llamaindex.llamacloud.services.blocking.DataSourceService
1313
import ai.llamaindex.llamacloud.services.blocking.ExtractService
1414
import ai.llamaindex.llamacloud.services.blocking.FileService
15+
import ai.llamaindex.llamacloud.services.blocking.JobDataPointService
1516
import ai.llamaindex.llamacloud.services.blocking.ParsingService
1617
import ai.llamaindex.llamacloud.services.blocking.PipelineService
1718
import ai.llamaindex.llamacloud.services.blocking.ProjectService
1819
import ai.llamaindex.llamacloud.services.blocking.RetrieverService
1920
import ai.llamaindex.llamacloud.services.blocking.SheetService
21+
import ai.llamaindex.llamacloud.services.blocking.SplitService
22+
import ai.llamaindex.llamacloud.services.blocking.V2ProjectService
23+
import ai.llamaindex.llamacloud.services.blocking.WebhookConfigService
2024
import java.util.function.Consumer
2125

2226
/**
@@ -59,6 +63,8 @@ interface LlamaCloudClient {
5963

6064
fun sheets(): SheetService
6165

66+
fun split(): SplitService
67+
6268
fun parsing(): ParsingService
6369

6470
fun extract(): ExtractService
@@ -71,8 +77,14 @@ interface LlamaCloudClient {
7177

7278
fun configurations(): ConfigurationService
7379

80+
fun webhookConfigs(): WebhookConfigService
81+
7482
fun projects(): ProjectService
7583

84+
fun v2Projects(): V2ProjectService
85+
86+
fun jobDataPoints(): JobDataPointService
87+
7688
fun dataSinks(): DataSinkService
7789

7890
fun dataSources(): DataSourceService
@@ -110,6 +122,8 @@ interface LlamaCloudClient {
110122

111123
fun sheets(): SheetService.WithRawResponse
112124

125+
fun split(): SplitService.WithRawResponse
126+
113127
fun parsing(): ParsingService.WithRawResponse
114128

115129
fun extract(): ExtractService.WithRawResponse
@@ -122,8 +136,14 @@ interface LlamaCloudClient {
122136

123137
fun configurations(): ConfigurationService.WithRawResponse
124138

139+
fun webhookConfigs(): WebhookConfigService.WithRawResponse
140+
125141
fun projects(): ProjectService.WithRawResponse
126142

143+
fun v2Projects(): V2ProjectService.WithRawResponse
144+
145+
fun jobDataPoints(): JobDataPointService.WithRawResponse
146+
127147
fun dataSinks(): DataSinkService.WithRawResponse
128148

129149
fun dataSources(): DataSourceService.WithRawResponse

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsync.kt‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ import ai.llamaindex.llamacloud.services.async.DataSinkServiceAsync
1212
import ai.llamaindex.llamacloud.services.async.DataSourceServiceAsync
1313
import ai.llamaindex.llamacloud.services.async.ExtractServiceAsync
1414
import ai.llamaindex.llamacloud.services.async.FileServiceAsync
15+
import ai.llamaindex.llamacloud.services.async.JobDataPointServiceAsync
1516
import ai.llamaindex.llamacloud.services.async.ParsingServiceAsync
1617
import ai.llamaindex.llamacloud.services.async.PipelineServiceAsync
1718
import ai.llamaindex.llamacloud.services.async.ProjectServiceAsync
1819
import ai.llamaindex.llamacloud.services.async.RetrieverServiceAsync
1920
import ai.llamaindex.llamacloud.services.async.SheetServiceAsync
21+
import ai.llamaindex.llamacloud.services.async.SplitServiceAsync
22+
import ai.llamaindex.llamacloud.services.async.V2ProjectServiceAsync
23+
import ai.llamaindex.llamacloud.services.async.WebhookConfigServiceAsync
2024
import java.util.function.Consumer
2125

2226
/**
@@ -59,6 +63,8 @@ interface LlamaCloudClientAsync {
5963

6064
fun sheets(): SheetServiceAsync
6165

66+
fun split(): SplitServiceAsync
67+
6268
fun parsing(): ParsingServiceAsync
6369

6470
fun extract(): ExtractServiceAsync
@@ -71,8 +77,14 @@ interface LlamaCloudClientAsync {
7177

7278
fun configurations(): ConfigurationServiceAsync
7379

80+
fun webhookConfigs(): WebhookConfigServiceAsync
81+
7482
fun projects(): ProjectServiceAsync
7583

84+
fun v2Projects(): V2ProjectServiceAsync
85+
86+
fun jobDataPoints(): JobDataPointServiceAsync
87+
7688
fun dataSinks(): DataSinkServiceAsync
7789

7890
fun dataSources(): DataSourceServiceAsync
@@ -114,6 +126,8 @@ interface LlamaCloudClientAsync {
114126

115127
fun sheets(): SheetServiceAsync.WithRawResponse
116128

129+
fun split(): SplitServiceAsync.WithRawResponse
130+
117131
fun parsing(): ParsingServiceAsync.WithRawResponse
118132

119133
fun extract(): ExtractServiceAsync.WithRawResponse
@@ -126,8 +140,14 @@ interface LlamaCloudClientAsync {
126140

127141
fun configurations(): ConfigurationServiceAsync.WithRawResponse
128142

143+
fun webhookConfigs(): WebhookConfigServiceAsync.WithRawResponse
144+
129145
fun projects(): ProjectServiceAsync.WithRawResponse
130146

147+
fun v2Projects(): V2ProjectServiceAsync.WithRawResponse
148+
149+
fun jobDataPoints(): JobDataPointServiceAsync.WithRawResponse
150+
131151
fun dataSinks(): DataSinkServiceAsync.WithRawResponse
132152

133153
fun dataSources(): DataSourceServiceAsync.WithRawResponse

0 commit comments

Comments
 (0)