Skip to content

Releases

v0.26.0

Choose a tag to compare

@saravenpi saravenpi released this 15 Nov 23:47
5c76aab

Additive release. Nothing existing changes. New: httpx.Serve, httpx.WriteBudget, middleware.FixedWindow, middleware.Gzip, health.Version, netguard. Released with testdb/v0.2.0 (see below). Full list in CHANGELOG.md.

MIGRATION: what each app deletes and what it imports

Tronc imports are all github.com/FacileStudio/tronc/<pkg>. Bump tronc to v0.26.0 and tronc/testdb to v0.2.0 first.

1. Serve and graceful shutdown (all 24 backends)

Delete the &http.Server{...}, the ListenAndServe goroutine, the select on serverErrCh and the server.Shutdown block in main.go. Import .../httpx and call httpx.Serve(ctx, router, httpx.ServeConfig{Addr: addr, Logger: logger}), where ctx comes from signal.NotifyContext(ctx, os.Interrupt, syscall.SIGTERM). It returns nil after a clean stop.

Defaults: read header 5s, read 30s, write 60s, idle 120s, shutdown grace 15s. Zero takes the default, a negative value means no limit. Serve never wraps the ResponseWriter, so SSE, WebSocket and http.ResponseController keep working.

Keep today's behaviour with these settings:

App Set
Bulle WriteTimeout: -1, OnShutdown: []func(){pushSender.CloseStreams} (HTTP/2 resets a stream at an expired write deadline; model output streams for minutes)
Nuage ReadTimeout: -1, WriteTimeout: -1, ShutdownGrace: 45*time.Second, MaxHeaderBytes: 1<<20 (multi-gigabyte transfers)
Courrier ReadTimeout: 10*time.Second, WriteTimeout: 15*time.Second, IdleTimeout: 60*time.Second. Its assist and push handlers already move their own deadlines with ResponseController, which still works.
Echo ReadTimeout/WriteTimeout: 30*time.Second, ShutdownGrace: 10*time.Second. Replace extendWriteDeadline(suffix, d) with httpx.WriteBudget(d) on the summary and recording routes (r.With(...)), then delete the helper.
Antenne Nothing: it gains read, write and idle timeouts it never had. Check any long route first.
Everyone else Nothing, or copy the 5/10/15/60 values if a route depends on them.

2. Rate limiter and gzip

  • Agenda and Courrier: delete apps/api/internal/middleware/ratelimit.go. Use middleware.FixedWindow(middleware.FixedWindowConfig{Requests: 100, Window: time.Minute, MaxKeys: 50000}); Courrier's RateLimitBy becomes KeyFunc. Same window shape and envelope as before. Import .../middleware.
  • Perception: delete internal/middleware/ratelimit.go and use the existing middleware.Ratelimit (recipe in docs/ratelimit.md). Its Retry-After becomes the computed wait instead of 60.
  • Echo: stays app-side (identity-dependent budgets, /64 and /48 buckets). Documented in docs/ratelimit.md.
  • Agenda and Courrier: delete apps/api/internal/middleware/gzip.go and mount middleware.Gzip. It now compresses only text, JSON, XML, JavaScript and SVG, skips Range, Upgrade, event-stream, 204 and 304, and adds Vary: Accept-Encoding.

3. testdb (tronc/testdb v0.2.0)

  • Model drift: in each of Agenda, Courrier, Echo, GoSvelteBoilerplate, Journal, Nuage, Perception, Place, Plume, Prisme, Sablier, Vision (and Capsule/Casier where present), replace the body of schemas/columns_test.go (compatibleTypes, migratedColumnTypes, the loop) with testdb.AssertModelsMatch(t, db, queryModels...). Perception's pgvector column passes testdb.MatchOptions{Extra: ...} via AssertModelsMatchWith. The porte and MCP schema-drift tests (Plume, Courrier, Echo, Prisme) stay.
  • Hand-rolled harnesses: Echo and Journal delete internal/testdb/testdb.go and call testdb.OpenIsolated with testdb.URLFrom("ECHO_TEST_DATABASE_URL"); Antenne deletes internal/pgtest; Casier deletes internal/testdb for testdb.Open plus testdb.LockID; Sablier uses Open, Truncate and LockID; Place sets Config.SearchPathTail: []string{"public"}. Nuage's tests/helpers_test.go drops and recreates public; move it to Open and Truncate.

4. netguard (security: one copy)

Import .../netguard.

  • Registre: delete apps/api/internal/netguard/ (6 files). Guard.Client(timeout, roots) becomes (&netguard.Guard{TLS: roots}).Client(timeout).
  • sonar: delete internal/netguard/{ranges,guard,dial}.go and their tests; keep proxy.go, qualify its calls with netguard.. Use Guard.ClientFollowing(timeout) where redirects must be followed (add the cookie jar locally).
  • Journal modules/alerts/safeguard.go: delete isBlockedIP, set Control: netguard.Control on the dialer.
  • Plume: delete internal/urlsafe; netguard.CheckURL at save time and (&netguard.Guard{}).Client(timeout) for delivery.
  • Nuage modules/settings/service.go: delete isPrivateAddress, call netguard.CheckURL, and send the webhook with a guarded client (today only the save-time check exists, so a rebinding name passes).
  • porte oidc/avatar.go: replace isPublicIP, embeddedIPv4 and blockedNetworks (needs tronc >= v0.26.0 in porte).
  • Unguarded today, add a guard or document why not: Sonde (checker probes and webhooks), Antenne (webhooks, delivery senders and probes), Casier and Echo webhooks, Vision webhooks. Gare's ingress probe is a loopback probe, not an SSRF guard.

5. health.Version

Agenda, Bulle, Casier, Courrier, Echo, Journal, Prisme, Sonde (identical 13-line apps/api/version.go), and Bobine, Capsule, Opus, Vision, Sablier (variants): delete versionHandler, keep var version = "dev" in main.go for -ldflags "-X main.version=...", and mount router.Get("/version", health.Version(version)). Import .../health (already imported for Mount). The answer now carries Cache-Control: no-store.

Notes

  • tronc/env (env.LoadCore, env.String and the typed helpers) is still skipped by GoSvelteBoilerplate, Place and Sonde, which hand-roll os.Getenv config (about 700 lines). GoSvelteBoilerplate seeds every new app, so fix it first.
  • The GitHub release for v0.25.0 was missing; it is created with this one.

v0.25.0

Choose a tag to compare

@saravenpi saravenpi released this 15 Nov 23:47

Adds bulle.Client.Summarize, makes bulle.Client.DecideAI run as the user, and removes bulle.ErrNoActingFor (breaking). joblock.Hold now checks for a cancelled context with a select. See CHANGELOG.md.

MIGRATION

  • bulle.ErrNoActingFor is gone. An empty ActingFor on DecideAI is now the normal call with the user's exchanged token. Delete any errors.Is(err, bulle.ErrNoActingFor) branch. Setting ActingFor keeps the old service-key call and is deprecated, as is ActingForHeader.
  • Summarize(ctx, SummarizeRequest{Query, Sources}) calls POST /api/ai/summarize as the user the TokenSource speaks for.

testdb/v0.2.0

Choose a tag to compare

@saravenpi saravenpi released this 15 Nov 23:47
5c76aab

tronc/testdb v0.2.0, additive. New: AssertModelsMatch, AssertModelsMatchWith, AllowedTypes, OpenIsolated, LockID, URLFrom, Config.SearchPathTail. See testdb/CHANGELOG.md.

MIGRATION

  • 13 apps delete the body of schemas/columns_test.go and call testdb.AssertModelsMatch(t, db, queryModels...). Import github.com/FacileStudio/tronc/testdb (already required). Details per app are in the tronc v0.26.0 release notes.
  • Echo, Journal, Antenne, Casier, Sablier and Place can delete their own schema harness: OpenIsolated (schema per test), LockID (goose lock per schema), URLFrom (their own env var), SearchPathTail (public for extensions).

v0.24.0

Choose a tag to compare

@saravenpi saravenpi released this 14 Nov 20:11

Adds the joblock package: joblock.Hold(ctx, db, key, run) keeps one replica running a background job through a Postgres advisory lock. See CHANGELOG.md.

v0.23.2

Choose a tag to compare

@saravenpi saravenpi released this 14 Nov 03:51
4b9ed79

Rust: tronc-rs follow-up; TS: tronc-ts follow-up.

Changed

  • mcp.Failure plan-limit text says nothing was done and names the feature readably. A
    PlanLimit now reads "Nothing was done: the plan limit for storage is reached. Upgrade at
    " instead of "The plan limit for nuage.storage_gb is reached. Upgrade at ", so a
    model no longer tells the user a refused write partly happened, and no longer shows an
    internal key. A small table maps the suite's forfait keys (ai.access, courrier.mailboxes,
    echo.max_call_minutes, echo.max_participants, echo.recording, nuage.storage_gb,
    sonar.searches_daily); any other key stays as is. The upgrade link still goes through
    errors.SafeUpgradeURL. payment_required text is unchanged. Vector mcp_failure.json
    gains plan_limit_known_key_readable and plan_limit_unknown_key_raw, source @v0.23.2.
    Rust: tronc-rs follow-up (text and table). TS: tronc-ts follow-up (text and table).

v0.23.1

Choose a tag to compare

@saravenpi saravenpi released this 14 Nov 02:24
debef14

Rust: tronc-rs follow-up; TS: tronc-ts follow-up.

Security

  • mcp request dedupe matches the OAuth client. Request reuses an open action only when
    the user, kind, target, digest and the requesting client id all match. Before, a second
    client of the same person reused the first client's action, so consent given to client B
    could let client A collect the result (found in Casier, where the result is revealed
    values). Each client now opens its own action. Go-only in the vectors: no mcp_* subject
    covers confirmations, and the test pins it (TestRequestReusesOnlyTheSameClientsAction).
    Rust: tronc-rs follow-up. TS: tronc-ts follow-up.

Added

  • bulle.StatusError.RetryAfter: the wait Bulle's Retry-After header names, delay
    seconds or an HTTP date, on a 429 or a 503, capped at a day; zero when it names none or a
    past date. A 503 with a Retry-After now comes back as a *StatusError that still wraps
    ErrUnreachable; a 503 without one is unchanged. Vector bulle_errors.json gains four
    cases and a retry_after_seconds field, source @v0.23.1. Rust: tronc-rs follow-up. TS:
    tronc-ts follow-up.

v0.23.0

Choose a tag to compare

@saravenpi saravenpi released this 13 Nov 22:51

Rust: ported in tronc-rs v0.5.0; TS: ported in tronc-ts v0.3.0. Each entry names the port's
counterpart.

Added

  • mcp.AppSpec.Scopes, so a read-only server (sonar) goes through NewApp with
    Scopes{Read: "<app>.read"} instead of copying it. Rust: tronc-rs App::new. TS: has
    read-only servers already.
  • mcp.StateKey(app, secret): SHA-256 over <app>-mcp-state:<secret>, byte for byte the key
    the thirteen apps derived by hand, so signed questions survive the move. Vector
    mcp_state_key.json. Rust: state_key. TS: stateKey.
  • Bounded pending actions. Request asks about the person's open action of the same kind,
    target and digest instead of inserting another, on the link and the MRTR paths.
    PostgresPending.Open reads at most OpenLimit + 1 rows; Confirmations.List keeps
    OpenLimit (100) and reports truncated, which PendingList carries as
    "truncated": true. PostgresPending.Prune, PrunePending(ctx, exec, olderThan) and
    KeepPruned(ctx, store, every, olderThan, logger) delete the actions resolved or expired
    more than 30 days ago, hourly. No migration or index. A Postgres-backed test pins that prune
    spares open, recently resolved and recently expired actions. The dedupe is best effort, and a
    reused action keeps its first client and expiry. Rust: dedupe, limit, prune. TS: same.
  • Confirmation text. Outcome.Message carries the standard "Nothing happened yet…" text
    (Confirmations.Waiting(), naming the pending lifetime, or the time a reused action has left)
    on a link, and MessageDeclined on a declined Resume, the text eight apps each kept a copy
    of. Rust: ask/resume helper. TS: same.
  • PendingPage.Mount(router, auth...) mounts the confirm page API at /mcp/pending
    (PendingAPIPath) behind the app's auth, nil-safe for docs tests. Rust: PendingPage router.
    TS: Go-only for now, tronc-ts has no confirm page.
  • Offset pager Page(items, cursor, size), Offset(cursor) and Cursor(offset, total), the
    copies in Plume, Casier and Echo. Rust: pager. TS: same.
  • mcp.PlanLimit: Failure maps any error with PlanLimit() (feature, upgradeURL), such as
    porte's forfait.LimitError once it gains the method, to "The plan limit for is
    reached. Upgrade at ". Rust and TS: same text.
  • Typed Bulle AI calls. bulle.Client.Complete(ctx, CompleteRequest{System, Prompt, Input, Schema, MaxTokens, SpaceID}) for POST /api/ai/complete as the user, and
    DecideAI(ctx, DecideRequest{ActingFor, State, Questions}) for POST /api/ai/decide as the
    app's service with X-Bulle-Acting-For. SpaceID is omitted when empty, so it is safe before
    Bulle accepts it. Request.Header adds headers to Call. PlanRequired.Limit carries a
    402's limit. Rust: complete(space_id). TS: complete, decideAI.
  • Conformance vectors for mcp and bulle: mcp_http (401 and 403 challenges, write gate,
    Origin refusal, 405, RFC 9728 metadata), mcp_rate_limit (default burst 120, burst equal to the
    per-minute limit, one bucket per user, none depending on replay speed), mcp_digest, mcp_state_key, mcp_failure, bulle_errors (402 bare and
    enveloped, upgrade URL filter, 4xx, 5xx, redirect) and bulle_paths. Their source is
    tronc@v0.23.0; the eight older files are unchanged. Rust: consume in CI. TS: same.

Changed

  • mcp.Failure keeps an unavailable error's message instead of the generic text, and
    re-checks a payment_required upgrade URL with errors.SafeUpgradeURL. Rust and TS: align.
  • bulle.Client never follows a redirect: a 3xx fails as ErrUnreachable, so the token
    never leaves for another URL. It works on a copy of Config.HTTPClient. Rust: redirect-refusing
    client. TS: same.
  • Annotations rule written into mcp.Annotations and docs/api.md: overwriting or removing
    the user's data, or silencing an alert, is Destructive; only a tool with no further effect
    on a repeat call is Idempotent. Docs only; Rust and TS: annotation presets.
  • build(deps): the root module requires jackc/pgx/v5 v5.9.2 for the Postgres-backed prune
    test, which runs when TEST_DATABASE_URL is set (CI sets it), and moves golang.org/x/text to
    v0.41.0 and golang.org/x/sync to v0.22.0, the versions testdb already uses. No package
    outside the tests imports pgx.

Fixed

  • mcp.Failure capitalised one byte, so a message starting with an accented letter
    ("échec") came out garbled. It now uppercases the first rune. Rust and TS were already right.

v0.22.0

Choose a tag to compare

@saravenpi saravenpi released this 11 Nov 03:52

Added

  • mcp.PendingPage[T], the confirm page API. Routes serves GET /, POST /{id}/confirm
    and POST /{id}/dismiss, the handlers Courrier, Agenda, Nuage, Opus and Sablier each wrote in
    modules/mcp/pending_routes.go. The app passes how to read the signed-in person (User, which
    refuses a delegated token with the new ErrDelegated), the detail of each target
    (Describe, over the shared PendingItem its item type embeds) and the confirm result
    (Done). PendingList[T], PendingResult and EmptyRequest replace the five copies of
    types_pending.go; PendingRoutes[T](PendingDoc) replaces the five documentation.go
    route lists.
  • mcp.NewApp(AppConfig, AppSpec), the wiring every app's NewService repeated: resource
    check, confirmations with the confirm page at <origin>/pending, and the server at
    PerMinute calls a minute (default 120). AppConfig is the five apps' identical Config.
  • mcp.Digest and mcp.TargetIDs. The fingerprint all five apps computed (hex of the first
    16 bytes of SHA-256 over NUL-joined fields), byte for byte, so actions opened before an app
    adopts it still confirm; and the user-plus-numeric-target parse Agenda, Opus and Sablier
    shared.
  • Erasing pending actions. Pending.Erase(ctx, userIDs...), implemented by
    PostgresPending and mcptest.Pending, and ErasePending(ctx, exec, userIDs...) to run the
    same delete inside an account erasure's own transaction. Courrier, Nuage, Opus and Sablier
    each kept their own DELETE FROM mcp_actions for this.
  • apiref reflects embedded structs and generic types. The fields of a struct embedded by
    value are promoted into the outer schema, as encoding/json promotes them, instead of being
    dropped (unexported type) or nested under the type name. An instance of a generic type gets a
    valid component name, PendingList_Item, instead of one holding brackets and package paths.
  • Conformance vectors. conformance/vectors/*.json pins what errors, httpjson, health,
    the request log, the security headers, the client-IP rule, spa and spa.InlineScriptHashes
    answer today, in a JSON envelope (source, subject, cases) a port reads as its
    specification. go test ./conformance builds every case from the real packages and fails on
    any drift; go test ./conformance -update rewrites the files after a deliberate change.
    tronc-rs copies them at a tag.

Changed

  • Breaking for custom stores: mcp.Pending gains Erase. Every suite app uses
    PostgresPending or mcptest.Pending, which both implement it.
  • Licence: tronc is now licensed under MIT (see LICENSE); before this, the repository carried no licence. The nested migrate and testdb modules carry the same file.

v0.20.0

Choose a tag to compare

@saravenpi saravenpi released this 10 Nov 12:23

Added

  • Read-only MCP servers. mcp.Options.Scopes may set Read alone when every tool is
    read-only: the metadata then lists only that scope and the write gate is not mounted. A tool
    that is not read-only on such a server is refused at boot. mcptest.Run accepts metadata with
    one scope and fails when a server listing no write scope serves a write tool. sonar's search
    server is the first user, with sonar.read as its only scope.

Fixed

  • mcp.Failure keeps plan refusals actionable. A payment_required error, such as an
    exhausted daily quota, kept only the generic "could not finish" text. It now keeps its message
    and appends the upgrade page from WithUpgradeURL, so the model can send the user there.

v0.19.0

Choose a tag to compare

@saravenpi saravenpi released this 10 Nov 11:38

Added

  • mcp, the remote MCP server kit, extracted from Courrier. mcp.Mount(router, Options)
    serves the go-sdk v1.8.0 streamable transport in stateless mode at the resource's path, with
    the RFC 9728 metadata at its well-known path. In front of it: the Origin check (403), the
    bearer check with error="invalid_token" and resource_metadata in the 401 challenge, a 403
    insufficient_scope step-up challenge for a write tool called without the write scope, and a
    per-person rate limit. GET answers 405. List results are cached privately.
  • Typed tools with required annotations. mcp.NewTool(ToolSpec, handler) builds a tool from a
    typed go-sdk handler. Mount refuses a tool without the <app>_ prefix, a title, a
    description or all four hints, and any tool that is not read-only needs the write scope, at
    the HTTP gate and again inside the handler. Write calls are audited, without arguments.
  • mcp.Confirmations asks a person before a sensitive action runs: MRTR input_required
    when the client declares form elicitation on 2026-07-28, otherwise a pending action and a
    confirm link. The question state is HMAC-signed and bound to the person, each action runs at
    most once (atomic claim), and a target that changed since the question closes the action.
    mcp.PostgresPending stores actions in mcp_actions (mcp.PendingSchema, additive).
  • Helpers: Failure for actionable tool errors, Detailed, EncodeCursor/DecodeCursor,
    FitCount, EncodedSize and Clip for a 25k-token result budget.
  • mcp/mcptest, the conformance kit. mcptest.Run checks the 401 challenge, the metadata,
    405 on GET, the Origin check, annotations, schemas, a stable sorted tool list, the write-scope
    challenge and each sensitive tool's confirmation path. NewIssuer is a fake authorization
    server and NewPending an in-memory store.

Changed

  • The root module now requires github.com/modelcontextprotocol/go-sdk v1.8.0 beside chi
    (owner decision; see docs/development.md).