Skip to content

Changelog

This is built from the release tags and the commits that touched the SDK between them. The SDK is pre-1.0, so a release can contain breaking changes; they are marked Breaking. Dates are the tag dates.

To move between releases, change the version in go get github.com/flowcatalyst/go-sdk@vX.Y.Z. The module path changed once, at v0.0.9.

  • FieldPolicyResponse.LockedMembers: the policy members the client does not let its applications override (set by platform administrators; read-only here). The SDK has no call to set an application’s override; use the platform’s /api/field-policies/{clientId}/applications/{appCode} routes.
  • Field-worker unlock keys. FieldWorkers().ListUnlockKeys and RevokeUnlockKey (on an already revoked key it ends the sessions the key left), FieldUnlockKeyListResponse; the device’s UnlockKey; the policy’s UnlockKeysEnabled and UnlockKeyAttestation. PinReauthDays accepts 0 and defaults to 0.
  • FieldPolicyResponse.ToRequest and FieldPolicies().Update: read the policy, change it, write every field back. A policy PUT replaces the policy, so a request that leaves UnlockKeysEnabled out switches unlock keys off for the client, revokes its keys and signs those workers out. Put is unchanged and sends what it is given; prefer Update.
  • Field-worker photos. FieldWorkers().SetPhoto (raw image body, with its content type), GetPhoto (returns the bytes, an ETag, and whether the answer was not modified) and RemovePhoto; FieldPolicies().DeletePhotos; FieldWorkerResponse.Photo. FieldPolicyResponse and PutFieldPolicyRequest gain PhotosEnabled and WorkerMaySetOwnPhoto (a PUT replaces the policy: a field left out takes its default, PhotosEnabled true and WorkerMaySetOwnPhoto false). The client sends a body of bytes as it is and can read an answer of bytes.
  • Behaviour change: a token verifies only in the spelling it was issued in. TokenValidator, HmacTokenValidator and FieldTokenVerifier refuse a token whose segments are not canonical base64url: another last character with the same significant bits, = padding, + or /, a line break, or whitespace in the token (for a field token, FieldReasonMalformed). A DPoP proof so spelled, with its key’s x or y so spelled, or with whitespace around it, is FieldReasonInvalidProof. Nothing the platform issues is affected; only a token someone re-spelled after it was issued, or one from a signer with a non-standard encoder, stops working. See Wire conventions.
  • A field worker can be created without a code. EnsureFieldWorkerRequest.WorkerCode is optional; left empty, the platform generates the code and FieldWorkerResponse.WorkerCode carries it. New EnsureFieldWorkerRequest.IdempotencyKey (only without a code): a repeat with the same key answers the same worker, and Ensure marks such a request repeatable.
  • PutFieldPolicyRequest.WorkerCodeDigits and FieldPolicyResponse.WorkerCodeDigits: the number of digits of a generated worker code (3 to 6, default 3).
  • Breaking: retries follow the request’s repeatability. Before, every request was retried on 408, 425, 429, 500, 502, 503, 504 and on any transport error, so a POST the platform had applied was sent again when its answer was lost: a provisioning retried after a gateway 502 was refused 409 ALREADY_PROVISIONED and its one-time secrets were gone, and a create could make a duplicate. Now a POST or PATCH is not repeated after 500, 502, 503, 504 or a transport failure after the request may have been sent. Only the syncs, FieldTokens.Introspect and Router.InPipelineBatch are marked repeatable. 408, 425, 429 and failures before sending are still retried for every request. See Retries.
  • New *client.OutcomeUnknownError and client.IsOutcomeUnknown. A non-repeatable request that ends with 502, 503, 504 or a transport failure after sending returns it instead of the bare *APIError or transport error. It unwraps to them, so errors.As(err, &apiErr) still sees a 502. Test client.IsOutcomeUnknown(err) where you create or change something, read the state (for a provisioning, Applications.GetServiceAccount), and send again only if it was not applied. A POST that answers 500 is no longer retried.
  • New FlowCatalystClient.PostRepeatable for a custom POST that is safe to send twice.
  • WithTimeout bounds each attempt, not all attempts together, so a repeatable request that times out can be retried. With the defaults a call can take up to three timeouts plus the delays; bound the whole call with the context.
  • WithRetry(0, ...) makes one request (it made none and returned nil).
  • A DELETE that answers 404 on a retry after an unknown outcome succeeds.
  • Applications.GetServiceAccount is back: GET /api/applications/{id}/service-account returns the application’s *ServiceAccountResponse (no secret); 404 when the application is unknown or has no account; it needs read access to the application and service-account:view. The earlier advice to call ServiceAccounts().Get with the application’s serviceAccountId was wrong: that is the id of the account’s service principal, not of the service account, so the lookup answers 404.
  • ServiceAccountCredentials.Webhook (*ServiceAccountWebhookSecrets: AuthToken and SigningSecret): Applications().ProvisionServiceAccount returns the account’s webhook credentials, once, in plaintext. It is nil from a platform that predates them. Re-provisioning is unchanged: 409 ALREADY_PROVISIONED, nothing rotated.
  • JwksCache.Register starts a fetch in the background. Get still makes its own first fetch so the caller sees the error.
  • Breaking: Go 1.27 or later. The SDK now uses github.com/lestrrat-go/jwx/v4 (v2 is deprecated), which needs Go 1.27 (jwx v4 needs an experiment flag on Go 1.26). The SDK’s CI matrix and README say so.
  • Breaking: auth.JwksCache.Get returns jwx v4’s jwk.Set, not v2’s. Nothing outside the SDK calls it in the platform. jwx v4 moved the key-set cache out of its core, so the SDK uses the project’s jwkfetch module (and httprc, as before). The cache keeps its behaviour: the first fetch happens on first use, a failed first fetch keeps failing as a discovery error until RefreshJWKS, cached keys are served during an outage, and a rotation is seen only after a refresh.
  • The MongoDB outbox reader moves to mongo-driver v2. The BSON written for every filter, update, sort and projection is byte-identical and documents decode the same.
  • Dependencies only: the SDK’s direct dependencies moved to their latest releases (among them pgx 5.13.0, go-redis 9.23.0 and jwx 2.1.7).

Security fixes; behaviour changes:

  • webhook.Verifier.Verify and webhook.Validator.Validate return ErrMissingSecret for an empty secret, before any other check. A verifier built from an unset environment variable no longer accepts requests signed with the empty key. Constructors are unchanged (no panic).
  • scheduledjobs.Runner.ProcessSigned verifies with FLOWCATALYST_SIGNING_SECRET when Builder.SigningSecret was not called. A firing with a missing, invalid or stale signature is ResultUnauthorized; no handler runs and no lock is taken. With no secret from either source it still runs the firing and logs one warning per runner.
  • New Builder.RequireSignature() (default off): with no resolvable secret Process and ProcessSigned return ResultUnauthorized.
  • New webhook.SigningSecretEnvVar and webhook.SigningSecretFromEnv().
  • Path segments are escaped (url.PathEscape) in every client method that put a caller-supplied id, code, name or identifier into the URL path. Ids made of [A-Za-z0-9_:-] are unchanged on the wire.
  • Access-token claims: AccessTokenClaims.Tier (with a fallback to the legacy scope tier), IsAnchor, IsPartner, IsClient, Permissions and HasPermission from the scope, ClientIDs and ClientCodes from id:code entries, and HasClientAccess on the id.
  • Scheduled-job runner: Envelope.Concurrent (no lock for a concurrent job unless EnforceLock), and Builder.SigningSecret with Runner.ProcessSigned (a bad or missing signature is refused).
  • Push rows. outbox.TypePush, outbox.NewPush and outbox.PushRow, and WritePush on both writers (outboxpgx.Sink and outboxsql.Writer). The row’s message group is the topic unless set; on Postgres the insert also runs pg_notify('fc_outbox_push') so a listening relay delivers at once. A refused push is a *outbox.PushError with a code. See Outbox.
  • The conformance harness for plan-built rows reads connectionId and idempotencyKey.
  • Dispatch jobs follow the framework’s current vectors. A job that names no client of its own now carries the writer’s ClientCode, except under the platform client _platform. An idempotency key is written as given and must not be blank or longer than 100 bytes of UTF-8. connectionId and idempotencyKey come last in the payload.
  • Field workers: an optional contact phone number (PHONE_INVALID for a malformed one).
  • Field workers can be linked to a platform user for audit correlation only (it grants nothing): FieldWorkers().Link and Unlink, LinkedPrincipalID on FieldPrincipal, and on the worker and introspection responses.
  • Field tokens from unenrolled devices. FieldPrincipal.DeviceID is empty and DeviceMode is UNENROLLED when the token’s key is not an enrolled device.
  • FieldPrincipal.Actor (from the token’s act claim) and Test for test identities.
  • Admin calls on FieldWorkers(): IssueBadge, ListBadges, RevokeBadge, BulkIssueBadges, CreateSignInCode.
  • Dispatch jobs send connectionId and idempotencyKey. DispatchJob gains ConnectionID and IdempotencyKey, sent and validated.

Behaviour changes:

  • FieldTokenVerifier requires exp. A field token with no exp claim is refused as invalid_token.
  • auth.FieldMiddleware requires FieldTokenVerifierConfig.BaseURL and panics at construction without it. The proof’s htu is compared with BaseURL plus the request path; the Host and X-Forwarded-Proto fallback is gone.
  • TokenValidator accepts token_use identity again. The allowlist is api, identity or absent; field and anything else stay refused. v0.0.12’s refusal of identity was an unintended break.
  • Field-worker identity. auth.FieldTokenVerifier, auth.FieldMiddleware and auth.FieldPrincipalFrom verify a field access token (RS256, typ fc-field+jwt) and its ES256 DPoP proof.
  • The admin client: FieldWorkers(), FieldDevices(), FieldPolicies() and FieldTokens() (introspection).
  • TokenValidator now refuses token_use values that are not an API credential. (This refused identity too, which v0.0.13 reversed.)
  • Ingestions: a target has a kind (DISPATCH_JOB or EVENT), dataOnly and wrapNonJson; an event target omits the delivery fields. An HTTP source gains accept (content types and body).

A version bump only; no SDK change is recorded between v0.0.9 and v0.0.10.

  • New module path: github.com/flowcatalyst/go-sdk, published to its own repository one commit per release. Breaking for imports only: change github.com/flowcatalyst/flowcatalyst/pkg/fcsdk/... to github.com/flowcatalyst/go-sdk/....
  • Ingestion responses carry config, warnings and namesHidden as the platform sends them.

Under the old module path.

  • Breaking. IngestionsResource.Failures takes client.IngestionFailureFilters (Category, Undismissed).
  • Ingestion notices, drafts and the save outcome (Save.Outcome, Save.AwaitingPromote); versions carry Draft and Digest; failures carry Category and dismissal; DismissFailure and Secrets.
  • client.WithOnBehalfOf sends X-On-Behalf-Of on platform-config set, delete and reveal, checked before sending.
  • SFTPSource.AcceptAnyHostKey.
  • Platform-config list rows name the client’s identifier beside its stored id (ClientIdentifier).
  • RevealSecret documents the reveal permissions and the linked-client confinement.
  • The ingestion API: Ingestions() and IngestionSets().
  • Platform-config reveal-secret: PlatformConfig().RevealSecret, and "***" as the value of every SECRET property on reads.
  • The /api/me routes are checked against the OpenAPI lock.

v0.0.4, v0.0.3, v0.0.2 (2026-10-15 to 2026-10-16)

Section titled “v0.0.4, v0.0.3, v0.0.2 (2026-10-15 to 2026-10-16)”

Version bumps only; no SDK change is recorded in these three releases.

The first tagged release. The SDK had just been made its own Go module (Apache-2.0) with a release line, CI and a smoke test. It contained:

  • The use-case envelope (usecaseop) and the pgx unit of work (usecasepgx).
  • The outbox writers with rows following the shared vector, dispatch jobs, a database/sql writer (outboxsql) and MySQL support. Dispatch jobs on usecaseop.Plan (Plan.Dispatch).
  • sync with connections, scheduled jobs, the OpenAPI document and docs, and principal-sync results.
  • The platform client, with every DTO and method audited against the OpenAPI lock.
  • auth, webhook, scheduledjobs, tsid, cache and lock.
  • Database-backed tests moved to the nested pkg/fcsdk/tests module.

The platform client was audited method by method against the OpenAPI lock. These signatures changed from the pre-release code, and they are the shape you get today:

  • 204 routes return only error: Applications.Update, EnableForClient, DisableForClient; Clients.Update, EnableApplication, DisableApplication, UpdateApplications; DispatchPools.Update, Archive, Suspend, Activate; EventTypes.Update; Subscriptions.Update; Processes.Update; ScheduledJobs.Update, Pause, Resume, Archive, LogForInstance, CompleteInstance.
  • {id} creates return *CreatedResponse: DispatchPools.Create, EventTypes.Create, Subscriptions.Create, Processes.Create. Connections.Create returns the whole *ConnectionResponse.
  • Responses that were discarded are returned: Connections.Pause and Activate; Principals.AddRole, RemoveRole, SetRoles, GrantClientAccess; Principals.SyncUsers returns *SyncUsersResult (syncedEmails); Roles.ListForApplication returns []RoleResponse.
  • Routes the platform did not have were removed: Applications.GetServiceAccount and Applications.UpdateClientConfig (use GetClientConfig, EnableForClient and DisableForClient). GetServiceAccount came back in v0.3.0, above, when the platform gained GET /api/applications/{id}/service-account. The advice given at the time, to read the account with ServiceAccounts().Get and the application’s serviceAccountId, was wrong: that id is the service principal’s, so the lookup answers 404. Point an application at an account with Applications.LinkServiceAccount.
  • Query parameters match the lock: Applications.List(ctx, appType, active), Clients.List(ctx), Connections.List(ctx, clientID, status), EventTypes.List(ctx, *EventTypeFilters), Processes.List(ctx, *ProcessFilters).
  • Wrong routes fixed: Processes.Archive and DispatchPools.Archive call /archive (they had called the hard DELETE); DispatchPools.Delete is new.
  • Required request members are always sent, including false where the platform requires the member.

The SDK’s README still has an “Unreleased” section listing three behaviour changes. They are in v0.0.13, above. Treat that section as stale.