Changelog
Every change of behaviour or format of the centrex package that an agent, a script or a person can notice. The format follows Keep a Changelog; 0.1.0 is the first release.
[Unreleased]
[0.1.0] - 2026-12-04
First release on npm, under the proprietary licence in LICENSE: free to install and use, not to copy, change or redistribute. The package ships its code bundled and minified.
Added: the formats of v1
These are the shapes scripts and agents rely on; a change to any of them is recorded below it.
- CLI exit codes:
0success (a job still pending included: readjob.status),1failure of the action,2usage error (unknown command or option, bad flag value,--paramsor--secretsthat is not the expected JSON). Results are JSON on stdout. - Errors of
exec,planandapplyare printed on stderr as{ "error": { "name", "message", ...fields } }; the MCP server returns the same object as the text of a tool error.ApiErrorcarriesoperationId,status,code,contextId,details,missingPermissions,attemptsandretryAfterSecondswhen known;StalePlanErrorcarriesplanIdandchangedFields;TimeoutErrorandNetworkErrorcarry acode(timeout,network.error). - A job-style read still running at its timeout is a result, not an error:
job: { id, state, status: "pending", polls, waitedMs, statusOperation, resultsOperation?, resume: { operationId, options: { jobId } }, note }, with the last status asresponse. A completed one hasjob.status: "completed"and its results asresponse. - Responses up to 20 KB of JSON (20,480 bytes;
maxInlineBytes) come back inline; larger ones are saved, redacted by secret field name, to<org folder>/responses/<operationId>-<ISO stamp>.jsonand come back assaved: { file, bytes, summary: { elements, topLevelKeys, first }, note }. allPagescollects at most 1,000 elements per call; a listing note says{ style, pagesRead, itemsReturned, pageNumber?, pageSize?, pageCount?, total?, morePages, cappedAt?, next?, note }.- A plan file,
plans/<planId>.json, holds{ planId, status, orgId, operationId, verb, path, params, secretFields, permissions, createdAt, expiresAt, appliedAt? }plus what its write shape recorded (kind:update,create,action,deleteorstateUnknown, with the state read, the touched fields, the changes or the payload). The plan result shows the same without the secret digests, plusplanFile. Plans expire 30 minutes after they are made. - The apply log,
apply-log.jsonl, is append-only, one JSON object per line: after a write,{ timestamp, orgId, planId, operationId, verb, path, params, stateBefore, stateAfter, result | error, confirmed?, warnings? }; after a refusal,{ timestamp, orgId, planId, operationId?, verb?, path?, params?, result: "refused", reason, error }. Parameters and states are redacted by secret field name.
Added: flow export and publish
execute postFlowsExportJobsexports one flow as YAML. It runs as a read although the catalog classifies the POST as a write: body{ flows: [{ flow: { id | name + type, version? }, exportType?: "Yaml" }] }, exactly one flow. The file lands in<org folder>/flows/<name>-<type>-<version>.yaml(new folder, private) and is never overwritten: identical content is left alone, different content gets-2,-3… The result is{ operationId, verb, path, response: { file, written, flow: { id, name, type, version }, bytes, sha256 }, notes }.plan postFlowsJobstakesbody: { file }(a YAML file inside the org’s folder;createStubsother thanfalseis refused) and returns a plan of a newkind,flowPublish:{ flow: { name, type }, target: { action: "update", flowId, publishedVersion } | { action: "create" }, file, frozen: { sha256, bytes }, base: { version, sha256 } | null, diff: { identical, added, removed, lines, truncated } | null, validation: { ran: false, note } | { ran: true, validator, valid, problems }, warnings }. The plan file also keepsfrozen.yaml(the file, values under secret field names redacted) andfrozen.redactions;secretFieldsnames themflow.L<line>.<key>.applyof aflowPublishplan publishes the frozen copy: registers the job withcreateStubs: false, uploads the file, pollsgetFlowsJob. Its result hasstate: { flow: { id, name, type, publishedVersion } }andresponse: { jobId, status, messages }. It refuses with aStalePlanError(changedFields:publishedVersionorpublished flow content) when the live flow changed since the plan.confirmedis true when the flow has a newer published version (a new flow: exists with the planned name and type).- New errors:
FlowJobFailedError(operationId,jobId,messages) for an export or publish job that ended in Failure,FlowJobError,StorageError(status,code,attempts) andStorageUrlError(code: "storage.url.refused") for the signed URLs. No error, plan, log or result carries a signed URL. - The client calls a host other than the login and API hosts in one case only: a signed URL that
postFlowsJobsorgetFlowsExportJobhas just returned, https only, with no token, no redirects, and for the upload only the headers the API returned (Client.storage). describeofpostFlowsExportJobsandpostFlowsJobsadds aflowFiletext saying how each is used.ExecutorOptions.flowValidatoris where a validation of a flow file that does not publish it plugs into the plan. None ships yet: every plan saysvalidation.ran: false.
Added: the method of the expert agent
describeanswers three new ids,method,method:diagnosisandmethod:testing, with{ kind: "method", id, part, bootstrapFormat, ids, text }. They are text shipped incatalog/method/, never appear insearch, and an unknown part fails with aMethodErrorlisting the valid ids.method:diagnosisaddssuspects: { base, local, localPath, localNote? }: the base list ofcatalog/method/suspects.mdand the lines of<org folder>/suspects.md. It is the onedescribethat reaches the org (to know which org this is); when it cannot,localis empty,localPathis null andlocalNotesays why.- New command
centrex bootstrap [--dir <folder>] [--force]: writes.claude/skills/centrex-expert/SKILL.mdand prints{ path, action, format, previousFormat, message }, whereactioniscreated,unchanged,replacedorkept.kept(a different file is there and--forcewas not given) exits1and writes nothing. - The MCP server’s instructions end with a pointer to
describethe idmethodbefore design, build, fix or diagnosis work. catalog buildinto another--outfolder copiesmethod/next torecipes/.
Added: the bootstrap for Devin
centrex bootstraptakes--client <claude|devin>(defaultclaude).--client devinwrites the same pointer to.devin/skills/centrex-expert/SKILL.md, for Devin Local and Devin CLI; the command it names to replace itself iscentrex bootstrap --client devin --force. Any other value is a usage error (exit2). The file written for Claude Code is unchanged, and the format number stays1.- The result of
centrex bootstrapgainsclient("claude"or"devin"). - The library exports
BOOTSTRAP_CLIENTS,BootstrapClientandisBootstrapClient;bootstrapPath,bootstrapTextandinstallBootstraptake the client. - The method’s core tells the expert agent to give the human the replace command its bootstrap names when that one carries
--client.
Changed: search finds more operations
searchunderstands more words:encuestaforsurvey,llamarforcall, anddo not call,no llamarandlista de no llamarfordnc. The groups live incatalog/synonyms.json, as before.- New hand-maintained data file
catalog/search-keywords.json:{ "<operationId>": ["extra words", ...] }, indexed with the summary of that operation.postFlowsJobsnow answers “publish flow”, “import flow” and “subir flow”;getConversationanswers “get conversation participants”. The file is never rewritten bycatalog buildorcatalog update, and is copied into another--outfolder; a catalog folder without it works as before. - The default limit stays 8 and the engine is unchanged.
test/fixtures/search-expectations.jsonlists queries with the operation each must return in the default results; a test fails when one drops out.
Changed in the review pass
- The query POST allowlist is reviewed data.
catalog/query-post-candidates.json(new) holds the generator’s heuristic output and is regenerated bycatalog buildandcatalog update;catalog/query-posts.jsonis now hand-edited only, withread,writeandreadJobssections, and is the only source of the read classification of POST operations. A build never rewrites it in place, copies it withrecipes/into another--outfolder, and reports on stderr (and inreviewof its JSON result) the candidates not reviewed yet and the entries naming operations that no longer exist. The reviewed job-style reads moved there fromsrc/catalog/readJobs.ts; the library exportREAD_JOBSis gone. - 16 POST operations that run, test, trigger or export something are now write operations and need
planandapply, among thempostIntegrationsActionTest,postIntegrationsActionDraftTest,postOutboundContactlistExport,postOutboundDnclistExport,postTelephonySiptracesDownload,postConversationsSummariesPreview,postWorkforcemanagementHistoricaldataValidateandpostScriptExport(docs/query-post-review.mdlists every decision). - A POST or PATCH write is no longer retried after a 502, 503 or 504, since Genesys may have acted on it; it is still retried on a 429. Reads (query POSTs included), PUT and DELETE are retried on 502/503/504 as before.
applyclaims the plan before anything else: its file moves toplans/applying/(created exclusively, then the pending file removed), so two applies of the same plan at once write once and the other is refused with anApplyError(“being applied”). A failed write returns the plan toplans/.- Plan files store their parameters with the values under secret field names redacted. The plan result lists those dotted paths in
secretFields;applyneeds their values again (centrex apply <planId> --secrets <json>, or the new optionalsecretsargument of the MCPapplytool) and refuses, naming them, when one is missing or unknown. - A change to a secret-named field the plan touches is detected at apply: the update plan keeps a SHA-256 digest of its value in the plan file (not in the plan result) and a changed digest makes the plan stale.
- A PUT plan lists the fields the body leaves out as
{ field, before, removed: true }changes, since a PUT replaces the whole resource; read-only fields and fields the body definition does not declare are not listed. Those fields jointouchedFields, so a change to them makes the plan stale.FieldChange.afteris absent on a removed field. CENTREX_LOGIN_BASE_URLandCENTREX_API_BASE_URLare test-only and accepted only when they point at a loopback host (localhost,127.0.0.1,[::1]); any other value is aConfigErrorbefore any request.ExecutorOptions.baseUrlsis unchanged.searchanddescribe(and the MCP server’s tool list) work without anyGENESYSCLOUD_*variable.createExecutorno longer throws for missing credentials; the firststatus,execute,planorapplyraises theConfigError, before any request.catalog update(andcatalog buildwithout--public/--extended) downloads the swaggers fromhttps://api.<GENESYSCLOUD_REGION>/api/v2/docs/swagger[all]when the variable is set, and fromapi.mypurecloud.comotherwise.BuildOptions.regiondoes the same for the library.executeclamps theinterval(start/end, ISO 8601) of the body of an analytics read (postAnalytics*query POSTs and query jobs) to now when it ends in the future, sends the clamped interval, and says so in a newnotesarray of the result. An interval that starts in the future is anExecuteErrorbefore any call.- Every apply appends one record to
apply-log.jsonl: a refusal (unknown or other org’s plan, expired, already applied, being applied, stale, resource gone, read-only mode, secrets missing) appends{ timestamp, orgId, planId, operationId?, verb?, path?, params?, result: "refused", reason, error }and writes nothing. In read-only modeapplynow reads the org (GET /api/v2/organizations/me) to find its log before refusing; it still writes nothing. - When the GET that reads the current state answers 403 or 404 at plan time, the plan is made with
kind: "stateUnknown", astateNotesaying why and a newstateError: { operationId, status, code }; apply writes without the staleness check. A 404 on the GET of a DELETE stays an error. - The flow composite operations read the sub-flows of one depth in parallel, five at a time (the bulk-read pool), instead of one after another; their results keep the call order.
- The 1,000-element cap of
allPagesis a ceiling:ExecutorOptions.maxItemssets it (1,000 by default), a per-callmaxItemsabove it is anExecuteErrorbefore any call, and a reading capped at the ceiling tells the agent to narrow the query instead of raisingmaxItems. - The apply result and its log record carry
confirmedand, when false,warnings: a DELETE whose re-read still returns the resource, a confirming re-read that failed after a successful write (the result now comes back withstate: nullinstead of an error, and the plan is applied), a created resource with no id to re-read, and a write with no GET. - Expired plans are moved from
plans/toplans/expired/whenstatus,planorapplyfinds them, soplans/holds only plans that can still be applied. Applying one is still refused as expired. - A
Retry-Afterheader in HTTP-date form is honoured like the delay-seconds form (counted from the client’s clock, the 60-second ceiling included); it used to be ignored in favour of the backoff. - PUT and PATCH bodies are validated at plan time like creating POST bodies: types and enums for both, required fields for PUT only; a mismatch is a
PlanErrornaming every field. A top-level field the body definition does not declare is a newwarningsentry of the plan (update and create shapes), not an error. - Search indexes operation descriptions at a low weight and boosts composite operations and recipes a little (1.15), so
search "delete flow"showssafe-deletefirst andsearch "delete a queue"lists it. - Renamed identifiers that carried the vendor’s name:
GenesysErroris nowApiError(its JSONnameis"ApiError"),GenesysErrorBodyisApiErrorBody,GenesysErrorContextisApiErrorContextand the swagger typeGenesysVisibilityisOperationVisibility. The swagger keyx-genesys-visibilityis unchanged. - The 403 message of an operation that declares no permission says “this operation needs no specific permission” (it said “endpoint”).
- A write finds the GET that reads its state by path template whatever the parameters are named (
Catalog.operationAt), and calls it with the write’s path values by position. Six DELETE and PATCH operations on chat messages and participants now plan with their state read instead of unknown.