fix: getConfig() in configureSession() + peer dep ranges#1310
Merged
threepointone merged 2 commits intomainfrom Apr 15, 2026
Merged
fix: getConfig() in configureSession() + peer dep ranges#1310threepointone merged 2 commits intomainfrom
threepointone merged 2 commits intomainfrom
Conversation
Lazy-create the assistant_config table before any config queries to prevent "no such table" errors when getConfig() is called (e.g. inside configureSession()). Added a #configTableReady flag and _ensureConfigTable() and call it from _configSet/_configGet/_configDelete in think.ts. Add ThinkConfigInSessionAgent, corresponding tests, and update wrangler/test exports to reproduce and validate GH-1309 behavior. Add changesets: fix-config-in-configure-session (patch for @cloudflare/think) and fix-peer-dep-ranges (patches for several packages) and change .changeset/config.json updateInternalDependencies from "patch" to "minor" to avoid overwriting peer-dep range fixes.
🦋 Changeset detectedLatest commit: f1d8100 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
Add a new src/tools/sandbox.ts providing a createSandboxTools stub that returns an empty ToolSet and logs a one-time warning (not yet implemented). Update package exports in packages/think/package.json to include ./tools/sandbox (types and import) and add src/tools/sandbox.ts to the build input list in packages/think/scripts/build.ts so the stub is compiled and published. This lets code like createSandboxTools(env.SANDBOX) compile and spread harmlessly while the real implementation is pending.
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
Fixes #1309 and #1308.
getConfig()insideconfigureSession()throws "no such table: assistant_config" (#1309)_ensureConfigTable()lazy init toThinkso_configGet/_configSet/_configDeleteensure theassistant_configtable exists before querying it. These methods bypassSession/AgentSessionProviderentirely (they usethis.sqldirectly), so they need their own table guard.baseSession.getHistory()beforeconfigureSession()(as suggested in the issue) would break context blocks — it triggersSession._ensureReady()which sets_ready = truebefore any.withContext()calls are made, silently discarding them.ThinkConfigInSessionAgenttest agent and 3 tests covering: first start with no config, reading stored config duringconfigureSession(), and fallback behavior.Incorrect peer dependency ranges on published packages (#1308)
>=0.8.7 <1.0.0), but changesets'updateInternalDependencies: "patch"was rewriting them to tight^0.x.yranges at publish time. In pre-1.0 semver,^0.10.1=<0.11.0, soagents@0.11.0falls outside.updateInternalDependenciesfrom"patch"to"minor"in.changeset/config.jsonto prevent future range overwrites.@cloudflare/ai-chat,hono-agents, and@cloudflare/voiceso the correct ranges get published.Test plan
getConfig()insideconfigureSession())npm run checkpasses (sherif, export checks, oxfmt, oxlint, typecheck across 73 projects)npm run buildpassesMade with Cursor