feat(appkit): establish ambient user execution scopes - #594
Open
MarioCadenas wants to merge 3 commits into
Open
MarioCadenas wants to merge 3 commits into
MarioCadenas wants to merge 3 commits into
Conversation
MarioCadenas
requested review from
atilafassina
and removed request for
a team
September 23, 2026 16:00
This was referenced Sep 23, 2026
MarioCadenas
added this pull request to stack #602
September 24, 2026 08:14
Contributor
📦 Bundle size reportCompared against
|
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 1.2 MB (+11 KB) | 429 KB (+4.2 KB) |
| Type declarations | 448 KB (+4.9 KB) | 163 KB (+1.8 KB) |
| Source maps | 2.4 MB (+20 KB) | 805 KB (+7.8 KB) |
| Other | 11 KB | 3.7 KB |
| Total | 4.0 MB (+35 KB) | 1.4 MB (+14 KB) |
Per-entry composition (own code — deps external (as shipped))
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
. |
97 KB (+1.3 KB) | 2.5 KB | 100 KB (+1.3 KB) | external | 318 KB (+4.1 KB) |
./beta |
94 KB (+1.0 KB) | 457 B | 94 KB (+1.0 KB) | external | 284 KB (+2.8 KB) |
./testing |
40 KB (+1.3 KB) | 30 KB (-21 B) | 70 KB (+1.3 KB) | external | 204 KB (+3.2 KB) |
./tsdown |
520 B | 0 B | 520 B | external | 813 B |
./type-generator |
23 KB | 0 B | 23 KB | external | 65 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
. |
index.js |
initial | 93 KB |
. |
utils.js |
initial | 4.0 KB |
. |
remote-tunnel-manager.js |
lazy | 2.5 KB |
./beta |
beta.js |
initial | 77 KB |
./beta |
stream-manager.js |
initial | 5.8 KB |
./beta |
databricks.js |
initial | 3.2 KB |
./beta |
wide-event-emitter.js |
initial | 3.1 KB |
./beta |
configuration.js |
initial | 2.3 KB |
./beta |
service-context.js |
initial | 1.9 KB |
./beta |
client.js |
initial | 542 B |
./beta |
client-options.js |
initial | 219 B |
./beta |
supervisor-api.js |
lazy | 192 B |
./beta |
databricks.js |
lazy | 142 B |
./beta |
index.js |
lazy | 123 B |
./testing |
manifest.js |
initial | 27 KB |
./testing |
index.js |
initial | 10 KB |
./testing |
wide-event-emitter.js |
initial | 2.9 KB |
./testing |
index.js |
lazy | 26 KB |
./testing |
remote-tunnel-manager.js |
lazy | 2.5 KB |
./testing |
utils.js |
lazy | 1.2 KB |
./tsdown |
index.js |
initial | 520 B |
./type-generator |
index.js |
initial | 23 KB |
@databricks/appkit-ui
npm tarball (packed): 350 KB — gzipped download (dist + bin; excludes release-only docs/NOTICE).
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 395 KB | 132 KB |
| Type declarations | 229 KB | 84 KB |
| Source maps | 766 KB | 253 KB (+1 B) |
| CSS | 16 KB | 3.2 KB |
| Total | 1.4 MB | 472 KB (+1 B) |
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
./js |
5.3 KB | 49 KB | 55 KB | 208 KB | 14 KB |
./js/beta |
20 B | 0 B | 20 B | 0 B | 0 B |
./react |
432 KB | 49 KB | 481 KB | 1.3 MB | 177 KB |
./react/beta |
1.0 KB | 0 B | 1.0 KB | 0 B | 1.9 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
./js |
index.js |
initial | 5.2 KB |
./js |
chunk |
initial | 120 B |
./js |
apache-arrow |
lazy | 49 KB |
./js/beta |
beta.js |
initial | 20 B |
./react |
index.js |
initial | 430 KB |
./react |
tslib |
initial | 2.1 KB |
./react |
apache-arrow |
lazy | 49 KB |
./react/beta |
beta.js |
initial | 1.0 KB |
Contributor
🤖 AppKit PR bot🔬 Run evalsStart an eval for this PR from the evals-monitor app: Go to Evals Monitor → 📦 Try this PR's app templateScaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh run download 36113876418 -R databricks/appkit -n appkit-template-0.78.0-pr.331c6fd-execution-user-scope-594 -D appkit-pr-594 \
&& unzip -o "appkit-pr-594/appkit-template-0.78.0-pr.331c6fd-execution-user-scope-594.zip" -d "appkit-pr-594" \
&& databricks apps init --template "appkit-pr-594"The template pins |
MarioCadenas
force-pushed
the
execution-user-scope
branch
2 times, most recently
from
September 24, 2026 16:03
d2cd647 to
4fb0967
Compare
Inherit ambient callers and retain fail-closed request-based tool dispatch. Preserve deprecated context exports and warehouse access for existing callers. Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
Share the plain-object helper while preserving existing exports and object semantics. Remove redundant proxy exclusions and clarify fail-closed tool scope selection. Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
MarioCadenas
force-pushed
the
execution-user-scope
branch
from
September 25, 2026 08:36
4fb0967 to
94af654
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add top-level
appkit.asUser(req)with a shared caller snapshot for shorthand calls, run blocks, and lazy streams. This is the second layer of the execution-model stack, based on #592. Do not merge independently of the base.asUser(req)as a deprecated compatibility wrapper.apporuser:<id>.asApp().Fail-closed tool dispatch
PluginContext.executeToolinherits an existing ALS caller. With no caller, it establishes the same request-based user scope asasUser(req)before opening the tool span or executing the provider. Missing production credentials reject. This preserves the original direct OBO dispatch behavior; callers do not need to adopt the new top-level API.The agents HTTP execution routes (
/invocations,/responses,/api/agents/chat) also establish user scope at entry. The marked development fallback remains the only missing-token exception. StandalonerunAgentretains its separate SP default.The testing kit uses production header validation and ALS with only the workspace client factory faked. It records the identity actually observed by the tool.
Design reference:
design-docs/execution-identity-e2e.md, sections 5.1.2, 5.1.3, 5.1.4, and 9. Per the updated compatibility requirement, this is additive and preserves legacy behavior and exports. No breaking-change marker or bypass label is needed.Verification
pnpm -r typecheckpnpm build,pnpm docs:build,pnpm check:fix,pnpm knip, and generated-type freshness