Repository navigation
Releases
Releases · distronode-corporation/district-social
district-social 0.1.0
The first release. The npm package is the engine: ES modules with TypeScript declarations,
for Node.js 22 or later. The CLI is in the repository and runs from a clone.
Added
- The engine (#2).
createEnginebinds a brand pack (the brief every model call reads, plus
optional QA gates) and the ports an application provides: a clock, a model, and optionally
stores for drafts, credentials and media, a lock and an approval gate. Every port has an
in-memory implementation, so a single process runs with no infrastructure. - Formatting (#2).
formatPostturns one source post into a render per network from a
model's structured output, and the engine writes image alt text. Per-network playbooks
then trim hashtags and move or drop body links in code, so those rules do not depend on
the model following its prompt. - QA (#2).
runQachecks each render against its network's limits and media rules, the
limits each connected transport declares, the brand pack's compliance gates and an
optional model review, and returns one pass or fail report (qaScoregives it a weighted
score). - Revision (#2).
applyMechanicalFixesclears the issues that are text or media-count edits
without a model call;reviseRendersasks the model for the smallest edit that clears the
issues still open on the current copy. - Publishing (#2).
publishDraftsends each render through its network's own API:
Instagram, Facebook, Threads, X, LinkedIn, YouTube, Reddit, Bluesky, Pinterest and TikTok.
A transport override can route a network through an aggregator instead (Zernio is the one
included). Images are fitted to each destination's limits at publish time, through a
fitter the application injects. - Approvals (#2). The
ApprovalGateport is a single-use approval for one draft and a hash
of its exact renders, with an in-memory gate. The port has no call that grants an
approval.publishDraftdoes not consult the gate in this release: the application
consumes the approval before it publishes. - Models (#2). The default model client is Claude, with your own Anthropic API key (read
throughsetSecretGetter) or Anthropic workload identity federation, and anyLlmClient
with the same contract can replace it. Video generation is Vertex AI Veo
(startVideoGeneration,pollVideoOperation) in your own Google Cloud project. - Bluesky sessions are bound to the account they were created for (#4). A stored session
carries a hash of the configured identifier and is resumed only when that matches; a
session for another identifier, or one stored without the hash, is dropped and the
configured account logs in once. - Trims that run in linear time (#4). The trailing-character trims CodeQL flagged as
polynomial-time regular expressions (URL punctuation in QA and link placement, slashes in
subreddit names and media base URLs, line-end whitespace in the Threads topic-tag lift)
give the same output without slowing down on long runs of those characters. - The CLI,
scripts/social/(#2). A client of an agent API built on this engine, with
new,list,show,qa,preflight,publish,unschedule,accounts,evidence
andprofiles. It authenticates with a Google ID token from Application Default
Credentials, sends requests only to the configured https origin, and publishes only by
citing the id of an approval a person created for that draft. - The project. CI runs lint, type-check, build and tests at 100 percent coverage per file,
plus CodeQL, OpenSSF Scorecard, dependency review, zizmor, gitleaks and a licence
allowlist, with Dependabot for updates. A review-threads check keeps a pull request red
while any review thread on it is unresolved (#4). The release workflow publishes from a
version tag with npm trusted publishing and a provenance attestation.
Install
npm install district-social
Published to npm from this tag by the release workflow, with npm trusted publishing and a provenance attestation: https://www.npmjs.com/package/district-social/v/0.1.0