Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .agents/repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,9 @@ xlsx,odt}.ts`) still reach the catch-all as `failed` + `indexer_error` and are r
that the old execution is retired, an authorized decision about unknown external effects, and
a guarded release contract. Never clear the hold or manufacture node-attempt evidence merely
because a stop was requested, a lease expired, or the old containers disappeared.
Erasure deletes other eligible subject runs and records the held runs separately on a partial
receipt; organization deletion returns an explicit conflict. These are containment, not a
retirement contract or a release of the holds.
- **A run lease compares the clocks of the hosts it spans** — the stepper stamps and checks the
30 s lease with its own host's clock (`claimRun`, `heartbeatRun`, `sweepOverdueRuns`), and the
read model's `stalled` compares it with the database's. Workers on hosts whose clocks differ by
Expand Down
4 changes: 4 additions & 0 deletions .github/ci-scope.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ integration:
- 'tools/cli/src/lib/deployment/acceptance-migrations.ts'
- 'tools/cli/src/lib/deployment/migration-model.ts'
- 'tools/cli/src/lib/deployment/automation-floor.ts'
- 'tools/cli/src/lib/deployment/automation-cutover-sql.ts'
- 'tools/cli/src/lib/deployment/automation-model.ts'
- 'tools/cli/src/lib/deployment/source-migrations.ts'
- 'tools/cli/src/lib/deployment/runtime-command.ts'
Expand Down Expand Up @@ -59,12 +60,15 @@ cli:
- 'services/platform/backend/auth/oidc.ts'
- 'services/platform/backend/db/sql.ts'
- 'services/platform/backend/db/ssl.ts'
- 'services/platform/backend/domains/api_keys/owners.ts'
- 'services/platform/backend/domains/api_keys/retire.ts'
- 'services/platform/backend/domains/audit_logs/**'
- 'services/platform/backend/domains/sandbox/retirement-schedule.ts'
- 'services/platform/backend/domains/two_factor/service.ts'
- 'services/platform/backend/jobs/enqueue.ts'
- 'services/platform/backend/jobs/tasks.ts'
- 'services/platform/backend/lib/org-config.ts'
- 'services/platform/backend/realtime/outbox.ts'
- 'services/platform/lib/**'
- 'configs/platform/**'
- 'packages/shared/**'
Expand Down
3 changes: 3 additions & 0 deletions .github/release-candidate-contract.json
Original file line number Diff line number Diff line change
Expand Up @@ -4506,12 +4506,15 @@
"services/platform/backend/auth/oidc.ts",
"services/platform/backend/db/sql.ts",
"services/platform/backend/db/ssl.ts",
"services/platform/backend/domains/api_keys/owners.ts",
"services/platform/backend/domains/api_keys/retire.ts",
"services/platform/backend/domains/audit_logs/**",
"services/platform/backend/domains/sandbox/retirement-schedule.ts",
"services/platform/backend/domains/two_factor/service.ts",
"services/platform/backend/jobs/enqueue.ts",
"services/platform/backend/jobs/tasks.ts",
"services/platform/backend/lib/org-config.ts",
"services/platform/backend/realtime/outbox.ts",
"services/platform/lib/**",
"configs/platform/**",
"packages/shared/**",
Expand Down
177 changes: 177 additions & 0 deletions .github/release-notes/v0.5.79.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
## Highlights

- API-key creation offers a custom expiry option and previews the resulting expiry date.
The keys table now includes an **Expires** column.
[#4495](https://github.com/tale-project/tale/pull/4495)
- Owners and Admins can create an organization-bound API key for another eligible member,
a team, a project or the organization itself. A member's key follows that member's live
permissions; team, project and organization keys act with their own assigned role and keep
working when their creator leaves.
[#4501](https://github.com/tale-project/tale/pull/4501)
- A project's API key cannot read organization-wide knowledge entries through chat search,
listing or the user-keyed sandbox entry finder. Its scoped project document access remains
available.
[#4565](https://github.com/tale-project/tale/pull/4565)
- Project budget rules cap the project's chats, agent turns, automation model calls, voice
output and calls made with its own API keys, in addition to other applicable limits. Pending
work reserves its admitted usage, and moving a chat or changing an automation's project
installations does not move an existing reservation or its booking. Uncertain voice and
direct automation model outcomes retain a conservative usage estimate before retrying.
The refusal identifies a reached project limit; see the upgrade notes for accounting limits.
[#4505](https://github.com/tale-project/tale/pull/4505),
[#4507](https://github.com/tale-project/tale/pull/4507),
[#4565](https://github.com/tale-project/tale/pull/4565)
- Chat consistently checks attachment access across deferred sends, retries and regenerated
replies. Existing message history is not rewritten.
- Agent connector calls keep credentials in the platform process and avoid launching a
sandbox process for every call. Within each backend process, the bridge limits concurrent
calls for each session; a deadline signal stops further service requests after a short grace
period.
[#4544](https://github.com/tale-project/tale/pull/4544)
- Erasure requests can delete eligible automation runs while preserving runs held after an
upgrade. The receipt stays **Partial**, explains the execution hold, and counts deleted and
preserved runs separately. Its summary and detailed breakdown now agree for both stored
count formats. Deleting an organization with these holds returns an explanatory conflict.
[#4565](https://github.com/tale-project/tale/pull/4565)
- Automation template analysis reuses its whitespace scan when recovering from repeated
malformed expressions. Long shared whitespace suffixes no longer cause the same text to be
scanned and trimmed for each failed expression. Existing expression limits and quoted
delimiters keep their behavior.
[#4564](https://github.com/tale-project/tale/pull/4564),
[#4565](https://github.com/tale-project/tale/pull/4565)
- The public proxy refuses private deployment-control paths, including deployments under a URL
prefix. The CLI continues to use its local control connection for deployment operations.
[#4563](https://github.com/tale-project/tale/pull/4563),
[#4565](https://github.com/tale-project/tale/pull/4565)
- Project agents can request a compact `task_get` occupancy view that returns the newest run
beside an explicitly requested historical run. It omits large discussions and review files
when the caller only needs a run observation. The default full response remains available;
a read does not reserve capacity or authorize a start or review decision.
[#4569](https://github.com/tale-project/tale/pull/4569)
- Idle sandbox spawners avoid loading unused Kubernetes and error-reporting integrations.
Capacity checks and cleanup reuse bounded Docker inventory reads, reducing repeated process
launches while retaining resource and ownership checks.
[#4542](https://github.com/tale-project/tale/pull/4542)
- Sandbox cache permission repairs use a digest-pinned BusyBox helper image. First use still
needs registry access if the image is not cached.
[#4565](https://github.com/tale-project/tale/pull/4565)
- Sandbox cleanup briefly rereads an empty process environment so it can find owned processes
caught while starting another executable. The existing scan deadline and process-ownership
checks remain in force.
[#4531](https://github.com/tale-project/tale/pull/4531)
- Knowledge databases store embeddings in separate tables for each supported vector width.
Organizations sharing a database can choose different widths. Saving a different width in
Data residency queues already indexed documents that lack vectors at that width.
[#4445](https://github.com/tale-project/tale/pull/4445)
- Failed Git commands during CLI source acquisition identify the source type, Git stage and
validated exit status when available, with bounded hints for disk, DNS, timeout and
output-limit failures. Private Git output and credentials remain hidden. These hints help
investigate a failure; they do not establish its cause or trigger an automatic retry.
[#4573](https://github.com/tale-project/tale/pull/4573)

## Upgrade notes

- v0.5.78 publication was stopped after source defects were confirmed. Its existing tag and
package publications remain immutable. Use this release's CLI and matching runtime images
for the complete forward upgrade. Do not rebuild or retag v0.5.78. Its retained
[authored notes](https://github.com/tale-project/tale/blob/4d60debc9263784f98bd74b36d3a4e8576125126/.github/release-notes/v0.5.78.md)
describe the preceding feature changes and remaining known limitations when upgrading from
v0.5.77; they are not evidence that v0.5.78 finished publishing or deploying.
- Back up the application and knowledge databases, configuration, keys and external stores
before deployment. The first upgrade from v0.5.77 applies application migrations
`0154` (API-key ownership), `0155` (project usage) and `0160`–`0163` (automation leases,
recovery history, per-step call records and the protocol-2 writer fence), plus `0164`
(captured budget projects and pending voice estimates). A configuration-only
update does not install these runtime changes.
- Existing personal API keys retain their behavior. Older images refuse the new
organization-bound keys, so finish the runtime rollout before moving an integration to one.
Agents and automations started by a project's key retain their own permissions and tool
access, which may reach beyond the project. Revoking a key blocks future calls but
does not stop work already admitted. See [API keys](https://docs.tale.dev/platform/admin/api-keys).
- Project usage starts with bookings made by the new runtime; migration `0155` does not backfill
earlier spend, and older images do not write the new project buckets during a mixed-version
rollout. Budget periods spanning the upgrade can therefore undercount project usage. Finish
retiring older admission processes before relying on the new reservations for every request.
Legacy pending rows without project stamps retain their prior lookup behavior; an unknown
historical voice price is not reconstructed. Project budgets exclude transcription and do
not send advance warnings. See
[Policies and limits](https://docs.tale.dev/platform/admin/governance/policies-and-limits).
- Direct automation `llm` calls require catalog pricing before admission. They reserve the
estimated prompt and permitted output, plus one request; these are estimates, not a
provider-enforced monetary ceiling. Unknown outcomes book that saved estimate once. A
reserved voice attempt that fails, times out or is replaced also books its saved estimate
and one request, including failures before dispatch. This may conservatively count an
attempt the provider did not charge. Retries must fit the remaining budget after that
booking. Authorized history retention and privacy erasure still delete their covered data;
the repair neither reconstructs erased usage nor guarantees caps across that deletion.
- Knowledge migrations `private_knowledge/15` and `public_web/16` copy existing vectors and build
indexes while retaining the legacy vector column for compatibility. Allow disk space for both
copies and time for the corpus-sized migration. Supported widths are 256, 384, 512, 768, 1024,
1536, 2048, 3072 and 4096; widths above 2000 use sequential vector scans. An unsupported
existing width requires selecting a supported model and indexing again. Changing width
re-embeds documents through the configured provider and can incur provider usage. Keep the
existing width during a mixed-version rollout: the older image can search newly indexed data
only at its legacy column's declared width. Same-width model changes do not automatically
re-embed the corpus. See [Data residency](https://docs.tale.dev/self-hosted/configuration/data-residency).
- The managed upgrade first requires zero unfinished automation runs across every organization.
For the supported legacy runtime `b4931db4`, the CLI verifies the complete migration inventory,
holds a database lock against new admissions and claims, and gracefully stops the recorded
backend API and worker containers before migration `0163`. The initial census and compatibility
checks run before any backend stop. A failed stop or changed identity leaves cutover pending.
Existing protocol-1 tag deployments must use this managed upgrade first. Keep the bundle and
cutover receipt if a stop or readback fails; the
CLI starts no replacements until its recovery checks pass. This barrier does not establish
the outcome of historical external effects or cancel independent project agents.
[#4579](https://github.com/tale-project/tale/pull/4579),
[#4565](https://github.com/tale-project/tale/pull/4565)
- Migration `0163` retains a fallback for older queued, running and waiting automation runs
still present at cutover: they become **On hold**. Their
earlier progress and unknown external outcomes remain protected, and they do not resume
automatically. Already-admitted external work may still finish. Check the external service
before taking further action. **Request stop** records an acknowledgement and requests owned
session cancellation; it does not prove termination, undo effects or release the hold.
There is currently no supported retirement action that releases these legacy holds. Their
tasks remain excluded from replacement runs, erasure stays partial, and organization deletion
is refused while a hold remains. Plan the cutover around this limitation.
- After migration, repair forward with a compatible runtime and this release's CLI. The CLI
checks the installed database floor and target image before deployment or rollback. An
already-created protocol-2 backend also requires a compatible target, even while stopped or
before its migration commits. Older CLIs and manual Docker commands do not implement this
guard, and a snapshot cannot undo external effects. The guard currently supports the bundled
application database: an explicit
`DATABASE_URL`, custom `APP_DB_NAME` or installed backend pointing elsewhere is refused.
It does not start a stopped database to inspect it. Keep the existing runtime and repair the
readback when compatibility cannot be established. A successful cutover is only one part of
release acceptance: verify the completed rollout, serving identities, migration inventories
and native configuration readback for every deployment. See
[Upgrades](https://docs.tale.dev/self-hosted/operate/upgrades).
- Custom Compose configurations need at least `30s` stop grace for `backend-api` and `120s` for
`backend-worker`. `SHUTDOWN_DRAIN_MS` defaults to `15000` for the API and `90000` for a worker;
keep stop grace at least 15 seconds above a longer drain setting. The matching CLI generates
these values. `AUTOMATION_ORG_CONCURRENCY` defaults to `8` steps per organization across
workers; `0` disables that limit. Synchronize clocks across worker hosts.
- Update clients that exhaustively handle automation states and failure codes for REST/OpenAPI
contract `3.22.0`, including held runs, stop requests, resumption fields, `waitingFor: in_doubt`,
`engine_incompatible` and `effect_in_doubt`. An uncertain individual write is decided in the
app, separately from a legacy run's stop request. No notification is sent for an in-doubt wait.
Clients must also accept `GET /api/v1/me`'s `key.owner`, an empty `user.email` for a key that
is not a person, and `data.scope: project` on a `429 BUDGET_EXCEEDED` response. A project's
key receives `403 API_KEY_SCOPE_FORBIDDEN` outside its permitted routes.
- The inherited MCP authoring changes include issue locations, analysis and inferred types in
validation results, save warnings, and capability output schemas. Revalidate custom
automations: agent `files` contribute dependencies and `ITEM_WITHOUT_FOREACH` is an error.
Expressions and `transform` bodies have analysis limits of 8192 UTF-16 code units, 512
JavaScript tokens and 64 nesting levels. Whitespace around a template expression is excluded
from its size; whitespace inside a `transform` body counts. Shorten or split oversized code.
See [Automation concepts](https://docs.tale.dev/platform/automations/concepts).
- Before using compact occupancy reads, require `output.view` to equal `occupancy`. Older
runtimes can return the full view without binding `requestedRunId`; do not treat that as a
supported compact result. Missing or failed reads leave occupancy unknown. Workflow holds
still block replacement even when their run is not live, and normal start/retry limits apply.
- When upgrading from v0.5.76 or earlier, also follow the
[v0.5.77 upgrade notes](https://github.com/tale-project/tale/releases/tag/v0.5.77), including
the Bun 1.4.2 runtime, serving-identity proxy header, pinned contract-digest review and
`task_delegate_review` runtime prerequisite. The built-in **Triage GitHub issues** and
**Review GitHub pull requests** schedules still require their missing repository inputs
(`owner` and `repo`); editor validation reports `TRIGGER_INPUT_MISMATCH` but does not repair
those schedules.
11 changes: 11 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@
"labels": ["dependencies", "security"]
},
"osvVulnerabilityAlerts": true,
"customManagers": [
{
"customType": "regex",
"managerFilePatterns": ["/^services/sandbox/src/volume\\.ts$/"],
"matchStrings": [
"CACHE_PERMISSION_IMAGE\\s*=\\s*'(?<depName>busybox):(?<currentValue>[^'@\\s]+)@(?<currentDigest>sha256:[a-f0-9]{64})'"
],
"datasourceTemplate": "docker",
"versioningTemplate": "docker"
}
],
"packageRules": [
{
"description": "Patch updates: 30 day stabilization, grouped",
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ on:
- 'services/platform/backend/auth/oidc.ts'
- 'services/platform/backend/db/sql.ts'
- 'services/platform/backend/db/ssl.ts'
- 'services/platform/backend/domains/api_keys/owners.ts'
- 'services/platform/backend/domains/api_keys/retire.ts'
- 'services/platform/backend/domains/audit_logs/**'
- 'services/platform/backend/domains/sandbox/retirement-schedule.ts'
- 'services/platform/backend/domains/two_factor/service.ts'
- 'services/platform/backend/jobs/enqueue.ts'
- 'services/platform/backend/jobs/tasks.ts'
- 'services/platform/backend/lib/org-config.ts'
- 'services/platform/backend/realtime/outbox.ts'
- 'services/platform/lib/**'
- 'configs/platform/**'
- 'packages/shared/**'
Expand Down
Loading