Staging#274
Merged
Merged
Conversation
Centralize assistant timezone resolution behind the shared prompt helper so repeated now() calls and renderer timezone blocks reuse one TTL-backed lookup while still computing the current timestamp fresh each time.
Only cache successful assistant timezone values so transient get_logs errors or missing Contacts rows do not pin assistants to UTC for the full TTL. Add regression coverage for failed and empty timezone lookups.
…ssistants during config
…pick up package's custom guidance/etc
The spending-limit guard's credits ≤ 0 → block rule is correct only for CREDITS-mode accounts. METERED accounts pay by monthly invoice (orchestra's monthly_metered_invoicer) and intentionally hold a zero wallet — records ledger-only on METERED — so the legacy gate would block every call once the first usage event lands. now parses the field from the orchestra spend endpoint, propagates it through , and skips the credit-balance check when . CREDITS accounts and the 'field not present' legacy path keep the existing behaviour, so the guard never loosens during a partial orchestra rollout. Test coverage in — asserts allow on METERED with zero balance, block on CREDITS with zero balance, and the legacy fallback when orchestra hasn't surfaced yet.
Introduce a runtime-owned OAuth helper for refresh-token backed providers instead of putting provider-specific token semantics on SecretManager. The helper owns provider metadata, aliases, expiry checks, env overlay construction, and the actor-facing get_oauth_access_token(...) documentation surface. This gives generated Python a clear way to request an explicit provider-scoped access token when an SDK or HTTP client requires one, while preserving the normal environment-based credential path for SDKs that can read credentials directly.
Keep SecretManager focused on mirroring allowlisted runtime OAuth secrets from Orchestra into local Secrets, .env, and os.environ, while keeping OAuth provider semantics in the runtime helper. The sync path now has a single debounced gate so frequent runtime callers can ask for freshness without forcing a network round trip on every operation. Assistant update events and secret inspection still force sync because those paths represent explicit freshness boundaries. Normal runtime execution can use the same gate with a TTL, which keeps credentials reasonably current without making every actor step pay the full Orchestra sync cost.
Route in-process Python, venv-backed Python, persistent shell sessions, and runtime RPC through the OAuth runtime helper. The execute_code boundary now asks the debounced secret sync gate for freshness, and long-lived subprocesses receive OAuth env overlays so SDK/default-env credential paths do not keep stale inherited values. Explicit get_oauth_access_token(...) calls in venv and shell route back to the parent runtime, which keeps token freshness checks centralized instead of trusting child process environment snapshots. The actor integration test covers Microsoft and Google in the same sandbox to prevent accidental global-token behavior.
Expose the runtime OAuth helper in the CodeAct prompt using the same signature-and-docstring pattern as reason(...). The guidance distinguishes SDK/default environment behavior from cases that require an explicit access token, and warns against printing, logging, storing, or baking concrete token values into reusable functions or guidance. The prompt test locks in the exact helper signature, multi-provider examples, and anti-pattern guidance so future prompt edits do not accidentally regress the actor's understanding of refreshed OAuth credentials.
Route task execution through the active actor context instead of silently falling back to a simulated actor, and add workflow-specific post-run review plumbing for recurring and triggerable description-driven tasks.
Mark schedule payloads with explicit dict typing so queue linkage and datetime schedules can coexist without backend type inference conflicts.
Teach actor and scheduler prompts that new scheduled or triggered workflows should usually remain live and description-driven unless a stored function is explicitly requested or later distilled.
Verify child actor slot selection, reusable workflow review labeling, and real actor creation of live recurring and triggerable tasks with null entrypoints.
Add coverage for explicit actor requirements, entrypoint review context propagation, recurring clone timing, future instance patching, and task execution prompt builders.
Update scheduler tests to provide explicit simulated actors now that direct execution no longer creates an implicit fallback actor.
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.
No description provided.