Govern X (Twitter) account work through three lanes: evidence reads, typed act plans for posting and account hygiene, and gated execution with per-act provider evidence. Nothing reaches a live timeline or mutates an account without an explicit approval recorded in the receipt.
Overview
One account, three lanes: read evidence, plan typed acts, execute an approved plan.
This is the public branded X (Twitter) catalog skill for the message-send action
family. Its core invariant: the agent may read, audit, draft, and plan freely,
but every act that publishes to a public timeline or mutates the account stops
at a human approval gate, and the sealed receipt proves which acts ran, against
which plan digest, with which provider evidence.
Write for the operator who owns the account, the reviewer who approves a live act, and downstream skills that consume the resulting packets. Keep each plan to the smallest evidence-backed act set that satisfies the objective. Existing post and user ids must come from supplied evidence, never memory or guesswork; name missing evidence as a blocker.
In the manual
Runners
executeplanreadread-archiverecentselectstatus
Declared by its execution profile. Read the profile
SKILL.md
One account, three lanes: read evidence, plan typed acts, execute an approved plan.
This is the public branded X (Twitter) catalog skill for the message-send action
family. Its core invariant: the agent may read, audit, draft, and plan freely,
but every act that publishes to a public timeline or mutates the account stops
at a human approval gate, and the sealed receipt proves which acts ran, against
which plan digest, with which provider evidence.
Write for the operator who owns the account, the reviewer who approves a live act, and downstream skills that consume the resulting packets. Keep each plan to the smallest evidence-backed act set that satisfies the objective. Existing post and user ids must come from supplied evidence, never memory or guesswork; name missing evidence as a blocker.
What this skill does
Seven runners:
read: collect account evidence from the live API through thetwitterconnector. Queries:snapshot,posts,mentions,search,following,followers. A query withoutparams.user_idreads the authenticated account; with it, another account. The connector reads whole pages until it has at leastmax_items, keeps every item of them, and reports innext_cursorwhere a further read starts (pass it back asparams.pagination_token). Emitsrunx/twitter.evidence.v1. Read-only; no gate.read-archive: inspect one contained X archive export (tweets.js,following.js, orfollower.js) through the runtime's digest-bound artifact page seam. Twitter code receives bounded, record-complete pages and never a path or whole-file escape hatch. The runtime snapshots up to 512 MiB and this skill requests 512 KiB pages; the page size is not a total archive limit. Emits the samerunx/twitter.evidence.v1packet; no gate.plan: turn one bounded objective plus evidence intorunx/twitter.plan.v1, an explicit list of typed acts with rationale, using agent judgment, then bind the exact plan through nativedata.digest. This is the curated lane, for dozens of acts that each deserve a reason. A plan is a draft; it delivers nothing. The result exposestwitter_plan.dataand the matchingdigest_result.data.digestrequired byexecute; callers never calculate the digest themselves.select: the bulk lane. Apply a deterministic predicate to an archive export and emit a compact plan, no agent judgment. Use it when the criterion is mechanical and the match set runs to thousands, where a per-item rationale would be wrong and would exceed the runtime output limit. Two targets:postspagestweets.jsand emitsdelete_postacts (predicate: author, date range, engagement threshold), with identical results across page sizes;usersreads a boundedfollowing.jsbundle and emitsunfollowacts (predicate:non_mutual: truefor accounts you follow that do not follow back, needingfollower.jstoo, or an explicituser_idslist). Emitsrunx/twitter.selection.v1carrying a digest-boundtwitter_plan.execute: run the next batch of an approved plan as onetwitterconnector operation behind its own approval, sealing per-act outcomes intorunx/twitter.execution.v1and appending one compact progress fact to a durable execution ledger. A batch is one published act (a post, reply, quote, or one thread segment), or the contiguous run of up to 50 acts of one other kind from the cursor. The approval binds that exact call. The kernel records each act's outcome as it lands and stops sending at a rate limit, so a monotonic cursor, not an accumulated id list, is enough to resume safely.
Durable operation memory and continuation
The skill remembers an operation in its bound store, local to the workspace
by default. It saves the exact plan once under its native digest, separately
from the compact execution progress stream. The saved plan preserves the
objective, account principal, exact content and targets, rationale, evidence
references and any applied context bindings. Progress preserves the pinned
account id, next act, partial thread cursor, cumulative processed, succeeded and failed act counts, a bounded last failure
evidence reference, the last batch summary and structured stop advice. No host opens the store database, reconstructs
completed ids or calculates plan hashes.
On the first execute, supply plan_json and its native plan_digest from
plan or select. A valid plan is saved before the effect approval; saving it
is not approval. On later calls, omit plan_json and supply only the digest.
The skill reads its own progress, selects the next batch and derives the
expected stream version and canonical retry key. The logical store defaults to
local://twitter; pass data_source_uri when the operation uses another
binding, and keep using that same workspace and store.
statusreads one plan and its progress without contacting X. It returns the objective, principal, current cursor, partial thread, last batch, next batch summary, cumulative outcome counts, failure evidence, structuredstop,retry_at, and compactnext_inputforexecute. It never returns an approval or claims a proposed batch has run.needs_planmeans this store has no saved plan: provide the original exact plan once, rather than inventing it or resetting a progress stream.recentlists a bounded page of prior execution summaries and plan digests. It does not scan history or return every post. A plan saved at an approval pause has no completed batch yet; find that paused invocation through native run history and resume its run id.
Each execution reads the bound account. It runs only when that account matches
the plan's principal (account:@handle, case insensitive) and, once progress
has pinned an account id, that same account. The exact approval identifies the
verified handle, account id, target and payload. Another available account is
never a fallback.
A native invocation and a multi-batch plan have different identities. If the
invocation pauses, continue that run id through runx resume; do not start
another run to escape an approval. If a call is interrupted or its outcome is
unknown, read native history and reconcile that same invocation first. Runx
owns in-flight custody and whether an effect may be retried. Only after a batch
is sealed and its result understood should another execute start the next
batch. A saved plan, status, receipt or supplied approval reference is context,
never new authority. Relay only actual operator decisions bound to the exact
native request.
Threads advance one segment per batch. The saved cursor contains the next
segment and confirmed reply id, so continuation does not repost earlier
segments. The cursor counts processed acts. Only provider-confirmed successful acts
increment counts.succeeded; settled refusals increment counts.failed. A
partially published thread is not a completed act. Failures remain visible
across later batches through cumulative counts and a bounded last_failure
containing the act, reason and native evidence reference. At the end, execution
returns completed_with_failures and status returns complete_with_failures
when any terminal act failed. Detailed outcomes remain in native evidence. A refused plan, digest mismatch or already-complete plan does not
append a fake progress event.
stop.action distinguishes wait, review and reconcile. A known rate
reset gives waiting status and a conditional next_input: the host must
wait until retry_at before using it. Unknown retry timing or account,
authentication and billing problems require review and expose no automatic
next input. An unsettled or ambiguous outcome asks for native reconciliation;
never start a replacement publish invocation to escape it. After resolving a
review stop, an operator may explicitly invoke execute again under a fresh
exact native approval. retry_at is the provider's reported reset, not proof the account will be
ready then. Wait until that time before another attempt, or stop for the
operator when retry timing is unknown. Inspect native failure evidence for
calls that fail before a settled batch result. Do not loop on permission,
billing, account restrictions or unknown acknowledgement. The host owns
scheduling and may choose a stricter cadence or spending cap. A CLI host can
return the wait to its operator; Fieldwork can persist a wakeup on its Work.
The skill contains no sleeping process, scheduler or personal memory service.
Direct CLI use
Use the installed CLI's inspection for exact input contracts. Select the workspace and connector once, then use the same workspace for continuation:
runx connector use twitter --credential user
runx connector use store
runx skill ./skills/twitter read -i query=snapshot --json
runx skill ./skills/twitter recent --json
runx skill ./skills/twitter status -i plan_digest=<native-plan-digest> --json
runx skill ./skills/twitter execute -i plan_digest=<native-plan-digest> --jsonFor the first execution, --inputs <file-or-stdin> carries the original plan
and native digest; subsequent executions use the compact next_input from
status. Local paths above illustrate a checkout; installed registry packages and
other compatible hosts use the same runner contracts. Paths, run ids and
artifact references come from runx, never guessed filesystem layouts.
The operating sequence is evidence → grounded plan or deterministic selection → exact native approval → bounded execution → status or native recovery. Codex supplies judgment and relays the person's decisions. It needs no X HTTP, SQL, batching, canonical hashing or private operator scripts. Fieldwork owns ongoing goals, brand/taste context, longer-lived memory and future wakeups; the same skill and native evidence work from either host.
Connector implementations
The skill targets typed X operations, not an HTTP library or browser driver.
An API implementation and an X-specific browser implementation can implement
the same operations if they preserve account binding, exact payload semantics,
bounded outcomes, idempotency/custody requirements and truthful finality. A
generic browser connector alone does not implement post.create or
users.follow: its X-specific implementation must translate those operations
and verify their results. Bind an implementation explicitly; do not silently
switch transport or account after a failure. Missing operations are readiness
failures, not permission to fall back to ad hoc browser or HTTP code. The
current packaged connector uses the X API; this skill change does not supply
or claim a working browser implementation.
Each runner emits exactly one packet for its lane: typed evidence with provenance and a content digest, a curated or bulk act plan bound by digest, or provider outcomes bound to the executed plan digest and appended to the ledger.
The act vocabulary, with its consequence class:
| kind | consequence | params |
|---|---|---|
post |
public_send | text |
reply |
public_send | text, in_reply_to |
quote |
public_send | text, quote_of |
thread |
public_send | texts (ordered, max 25) |
repost |
public_send | post_id |
delete_post |
live_mutation | post_id |
unfollow |
live_mutation | target_user_id |
mute |
live_mutation | target_user_id |
block |
live_mutation | target_user_id |
follow |
live_mutation | target_user_id |
like |
live_mutation | post_id |
Every kind is consequential, so every plan sets
gates.human_approval_required: true. follow, like, and repost are
engagement acts and share a hard cap of 10 per plan. Direct messages are
outside this skill.
A published act is confirmed by reading the post back. The other kinds are
acknowledged: X answers each with the resulting state (following: false,
deleted: true), which is the evidence, and has no read of one follow or like
cheap enough to confirm a batch. They set a state, so resending one changes
nothing. An answer that does not state the resulting state stops the cursor at
that act, and a later batch sends it again.
Post and reply text, and each thread segment, is a non-empty string of at
most 4000 characters, published verbatim; ids are X id strings. A plan that
breaks either is refused before approval.
When to use this skill
- Promote a release, publish a thread, or reply to a mention on behalf of a named principal, with content bound verbatim in the plan.
- Audit an account's own post history or following list and prune it: bulk delete old posts, unfollow low-value accounts, against operator-stated criteria.
- Gather timeline, mention, or search evidence for downstream research,
triage, or lead skills that consume
runx/twitter.evidence.v1. - Route a
message-sendplan onto X as its provider delivery lane.
When not to use this skill
- To send direct messages or manage DM conversations.
- To farm engagement: follow-churn, mass liking, coordinated reposting, or any volume pattern designed to game visibility. The engagement cap is not a budget to fill.
- To mention, reply to, or dogpile users who have not engaged with the principal, at volume.
- To operate an account the operator does not control, or to automate consumer account creation.
- To bypass the approval gate, the act caps, or the operator's spending limit on the pay-per-use API.
Procedure
For the plan runner, build twitter_plan this way:
- Hold one bounded objective. If the ask bundles unrelated jobs (a promo
thread plus a follow purge), return
needs_inputwith the split. - Ground every reference. Ids for
delete_post,unfollow,reply,quote,like,mute, andblockmust come fromevidence_jsonor an explicit operator-supplied id. If the evidence is missing or stale, name it as a blocker; never invent or approximate an id. - Write public content into the act params verbatim: the exact
textortextsto publish, shaped bybrand_contextwhen supplied. Do not plan a summary of what will be written; approval binds the exact words. - Give every act a stable
act_id(act-001onward), itskind,params, itsconsequencefrom the table, and a one-linerationaletied to the objective or the operator's stated criteria. - Apply
operator_policynarrowly. A prune criterion like "no engagement and older than 2023" selects only posts the evidence shows meet it; borderline items go toopen_questions, not into the act list. - Keep the plan small: at most 50 acts, at most 10 engagement acts, threads at most 25 segments. A larger job becomes staged plans.
- Set
decision:readywhen acts are grounded and complete;needs_inputfor missing objective, principal, evidence, or content;rejectfor asks outside the vocabulary or inside the abuse boundaries. - Never place credentials, bearer tokens, raw API dumps, or third-party personal data beyond public ids and handles in the plan.
Edge cases and stop conditions
- Mixed objective: return
needs_inputwith the runner or plan split. - Id not in evidence: blocker; the plan stays
needs_input. - Prune criteria ambiguous: select the unambiguous items, list the rest in
open_questions. - Rate limit or provider refusal during read: the read fails with the provider's reason; a read is whole or it fails.
- Oversized user-selection archive: the current two-file
usersselector refuses when either bounded text file exceeds the native read limit; it never treats truncation as an empty following/follower set.read-archiveitself remains paged. Do not claim an oversized users bulk plan was evaluated. - Rate limit during execute: nothing more is sent; the acts before it are
settled and the packet reports
next_act_index,remaining_count, and the reset time. After the reset, inspectstatusand invoke its compact next input; the skill reads and verifies the latest stream version itself. - One act refused: a refused act is recorded as
failedwith the provider's reason and the cursor moves past it. Unfollowing a deactivated account is already the state the act asked for, so it counts as done. - Plan digest mismatch on execute: the apply step refuses and executes nothing. A refusal is receipt evidence, not a fake ledger transition.
- Concurrent or interrupted work: reconcile the native run first. The skill derives its stream version and batch key; a host must not invent either.
- Partially posted thread: resume from the ledger's
active_threadcursor; never restart the thread from its first confirmed segment. - Approval missing or denied: the execute graph stops at the gate.
- No bound account: admission refuses before any provider call; bind one
with
runx connector use twitter --credential user. - Fully autonomous live posting requested:
reject; the gate is the contract.
Outputs
readandread-archivereturnrunx/twitter.evidence.v1: typed post or user records with metrics, the cursor the next live read starts from, and provenance naming the provider answers or archive artifact by digest.planreturnsrunx/twitter.plan.v1astwitter_plan.data, with its digest asdigest_result.data.digest. Each act carries its consequence and rationale, andcontext_bindingspreserve the exact brand or taste context the planner applied.selectreturnsrunx/twitter.selection.v1: the matched records and thetwitter_plana driver hands toexecute, withplan_digestbound so the approved and executed bytes are provably identical.executereturnsrunx/twitter.execution.v1for the current bounded batch: each act's result, where the next batch resumes, cumulative counts, any structured stop, and the provider's reported rate and reset, which the next host needs.
Worked example
Input: objective "delete my zero-engagement posts from before 2024",
principal account:@example, evidence from
read-archive(query: posts, archive_file: data/tweets.js) showing three matching
posts, operator_policy "keep anything with replies".
Output: decision: ready; three delete_post acts, each carrying the post id
from the evidence and a rationale quoting its age and zero metrics;
gates.human_approval_required: true; one borderline post with two replies
listed in open_questions. Execution then stops at the approval gate, and the
sealed receipt binds the approved digest to the three deletions the provider
confirmed.
Inputs
read:query(required),params(user_id,q,pagination_token),max_items.read-archive:queryand relativearchive_file(required),archive_base(workspacedefault, orskillfor packaged fixtures), andmax_items.plan:objective(required),principal(required),evidence_json,operator_policy,brand_context,operator_context.select:objective(required),principal(required),target(postsdefault, orusers),archive_file(posts),following_fileandfollowers_file(users),predicate(required: posts takert_of,is_retweet,text_prefix,text_contains,max_likes,max_reposts,before_year,after_year; users takenon_mutualoruser_ids),archive_base,max_acts.execute:plan_digest(required), optionalplan_jsonon the first call,data_source_uri(defaultlocal://twitter) andmax_acts(1–50). Native digest verification precedes saving the plan or provider effects. Version, retry identity and next batch are derived inside the skill.status:plan_digest(required), optionaldata_source_uriandmax_acts.recent: optionaldata_source_uri,limit(1–100, default 5) and pagecursor. Only execution summaries are listed.
Credentials and cost
The twitter connector declares two credentials, and the bound account's
credential decides how a request authenticates. Credentials never appear as
inputs or receipt material.
user: one JSON object holdingconsumer_key,consumer_secret,access_token,access_secret(OAuth 1.0a user context). Required for every mutation and for the authenticated account's own reads. Bind it withrunx connector use twitter --credential user, the JSON on stdin.app: the app-context bearer token, enough forsearchand reads that name another account byuser_id. Bind it withrunx connector use twitter --credential app, the token on stdin.
The X API bills per request on current plans and a post containing a link
costs a large multiple of a plain one, so prefer archive exports for bulk
history, set a spending cap in the developer portal, and let max_items and
the act caps bound each run.
Agent task contract
twitter-plan
Follow the plan procedure and act vocabulary above. Return one
twitter_plan containing decision, objective, principal, typed acts,
approval gates, evidence locators, open questions, blockers, and a truthful success
checkpoint. Every referenced post or user id must be grounded in supplied
evidence, and every public word must appear verbatim in the act params. A plan
never executes, publishes, deletes, follows, or otherwise mutates the account.
Published execution profile
The execution profile published with 0.5.11, shown as its exact bytes.
| Runners |
|
|---|---|
| Profile digest | sha256:a105ac7cd18b4e85681d90cfd0291235f917c5f67f782b0e1efb69ebf6f3f62b |
skill: twitter
version: "0.5.11"
catalog:
kind: skill
audience: public
visibility: public
role: branded
canonical_skill: runx/message-send
provider: twitter
execution: read
completion: provider_readback
approval: none
category: growth
harness:
files:
- fixtures/data/archive-follower.js
- fixtures/data/archive-following.js
- fixtures/data/archive-tweets.js
- fixtures/support/composed.graph
- fixtures/support/continuation.graph
- fixtures/support/failure-continuation.graph
- fixtures/support/account-stop.graph
cases: []
input_definitions:
execution_store:
type: string
required: false
default: local://twitter
description: Logical store for saved X plans and execution progress; bind its store connector in this workspace.
batch_limit:
type: integer
required: false
default: 50
description: Maximum acts in a batch; the skill selects one published act, one thread segment, or up to this many same-kind account acts.
schema: { minimum: 1, maximum: 50 }
connectors:
store:
operations: [events.append, events.read, heads.list]
twitter:
operations: [account.snapshot, account.posts.read, account.mentions.read, account.following.read, account.followers.read, posts.read, mentions.read, following.read, followers.read, posts.search, post.create, post.reply, post.quote, posts.delete, users.unfollow, users.follow, users.mute, users.block, posts.like, posts.repost]
runners:
read:
description: Read account evidence from X, page by page, from a snapshot, posts, mentions, search, following or followers.
default: true
inputs:
query:
type: string
required: true
description: "Evidence query kind: snapshot, posts, mentions, search, following, or followers."
schema: { enum: [snapshot, posts, mentions, search, following, followers] }
params:
type: object
required: false
description: "Query parameters: user_id (another account; the authenticated account when absent), q (search text), pagination_token (where an earlier read stopped)."
schema:
additionalProperties: false
properties:
user_id: { type: string, minLength: 1 }
q: { type: string, minLength: 1 }
pagination_token: { type: string, minLength: 1 }
max_items:
type: integer
required: false
default: 200
description: Items to read across pages. Pages are whole, so a read may return up to one page (99 items) more; next_cursor says where the next read starts.
schema: { minimum: 1, maximum: 10000 }
examples:
- query: snapshot
max_items: 200
result_from: [finalize, blocked]
steps:
- id: prepare
inputs:
query: "$input.query"
params: "$input.params"
source: live
max_items: "$input.max_items"
tool: { module: twitter-read.mjs, export: prepareRead }
outputs:
twitter_read_plan: object
- id: request
when:
value: $steps.prepare.twitter_read_plan.decision
equals: live
operation: twitter
operation_name: $steps.prepare.twitter_read_plan.connector_operation
input: $steps.prepare.twitter_read_plan.provider_input
- id: normalize
when:
value: $steps.prepare.twitter_read_plan.decision
equals: live
inputs:
read_plan: $steps.prepare.twitter_read_plan
provider_operation: $steps.request.provider_operation
tool: { module: twitter-read.mjs, export: normalizeRead }
outputs:
twitter_read_result: object
- id: digest
when:
value: $steps.prepare.twitter_read_plan.decision
equals: live
tool: data.digest
inputs:
value: $steps.normalize.twitter_read_result.items
- id: finalize
when:
value: $steps.prepare.twitter_read_plan.decision
equals: live
inputs:
read_result: $steps.normalize.twitter_read_result
digest_result: $steps.digest.digest_result
tool: { module: twitter-read.mjs, export: finalizeRead }
outputs:
twitter_evidence:
type: object
artifacts:
named_emits:
twitter_evidence: twitter_evidence
packets:
twitter_evidence: runx/twitter.evidence.v1
- id: blocked
when:
value: $steps.prepare.twitter_read_plan.decision
not_equals: live
inputs:
read_plan: $steps.prepare.twitter_read_plan
tool: { module: twitter-read.mjs, export: blockedRead }
outputs:
twitter_evidence: object
artifacts:
named_emits:
twitter_evidence: twitter_evidence
packets:
twitter_evidence: runx/twitter.evidence.v1
read-archive:
description: Read one X archive export (tweets, following or followers) in bounded pages.
inputs:
query:
type: string
required: true
description: "Archive query kind: posts, following, or followers."
schema: { enum: [posts, following, followers] }
archive_file:
type: string
required: true
description: Relative path to an X archive export file.
archive_base:
type: string
required: false
default: workspace
description: "Archive path base: workspace or skill."
schema: { enum: [workspace, skill] }
max_items:
type: integer
required: false
default: 200
description: Maximum items returned from the archive.
schema: { minimum: 1, maximum: 10000 }
examples:
- query: posts
archive_file: fixtures/data/archive-tweets.js
archive_base: skill
max_items: 10
result_from: [finalize]
steps:
- id: prepare
inputs:
query: "$input.query"
archive_file: "$input.archive_file"
source: archive
max_items: "$input.max_items"
tool: { module: twitter-read.mjs, export: prepareRead }
outputs:
twitter_read_plan: object
- id: normalize
scopes:
- fs.read
inputs:
archive_file: "$input.archive_file"
archive_base: "$input.archive_base"
read_plan: $steps.prepare.twitter_read_plan
tool: { module: twitter-read.mjs, export: normalizeArchivePage, pages: { path_from: archive_file, path_scope_from: archive_base, media_type: application/javascript, framing: json_array, page_bytes: 524288 } }
outputs:
twitter_read_result: object
- id: digest
tool: data.digest
inputs:
value: $steps.normalize.twitter_read_result.items
- id: finalize
inputs:
read_result: $steps.normalize.twitter_read_result
digest_result: $steps.digest.digest_result
tool: { module: twitter-read.mjs, export: finalizeRead }
outputs:
twitter_evidence: object
artifacts:
named_emits:
twitter_evidence: twitter_evidence
packets:
twitter_evidence: runx/twitter.evidence.v1
plan:
description: Turn one objective and its evidence into a plan of acts, each with its reason. Delivers nothing.
inputs:
objective:
type: string
required: true
description: One bounded objective for this plan.
principal:
type: string
required: true
description: The account being operated, for example account:@handle.
evidence_json:
type: object
required: false
description: A runx/twitter.evidence.v1 packet (or excerpt) grounding the plan; required for any act that references existing posts or users.
schema:
properties:
source: { type: string, enum: [live, archive] }
query:
type: object
required: [kind]
properties:
kind: { type: string, enum: [snapshot, posts, mentions, search, following, followers] }
params: { type: object, maxProperties: 50, additionalProperties: true }
additionalProperties: false
items:
type: array
maxItems: 10099
items: { type: object, additionalProperties: true }
item_count: { type: integer, minimum: 0, maximum: 10099 }
additionalProperties: true
operator_policy:
type: string
required: false
description: Operator constraints such as prune criteria, posting cadence, or content boundaries.
brand_context:
type: object
required: false
description: Brand-voice or taste-profile packet excerpt for public content.
schema:
properties:
schema: { type: string, minLength: 1, maxLength: 256 }
data: { type: object, additionalProperties: true }
additionalProperties: true
operator_context:
type: string
required: false
description: Extra operator guardrails.
examples:
- objective: Delete zero-engagement posts from before 2019.
principal: account:@example
evidence_json:
source: archive
query: { kind: posts }
items:
- id: '1001'
text: Old test post
created_at: Mon Apr 03 14:00:00 +0000 2017
metrics: { likes: 0, reposts: 0 }
operator_policy: Keep anything with likes or reposts.
result_from: [draft, digest]
steps:
- id: draft
inputs:
objective: "$input.objective"
principal: "$input.principal"
evidence_json: "$input.evidence_json"
operator_policy: "$input.operator_policy"
brand_context: "$input.brand_context"
operator_context: "$input.operator_context"
agent: { role: builder, task: twitter-plan }
outputs:
twitter_plan:
type: object
artifacts:
named_emits: { twitter_plan: twitter_plan }
packets: { twitter_plan: runx/twitter.plan.v1 }
- id: digest
tool: data.digest
inputs:
value: $steps.draft.twitter_plan
select:
description: Choose posts to delete or accounts to unfollow from an archive by a mechanical rule, for thousands of matches that need no judgment each.
inputs:
objective:
type: string
required: true
description: One bounded objective for this bulk selection.
principal:
type: string
required: true
description: The account being operated, for example account:@handle.
target:
type: string
required: false
default: posts
description: "What the selection operates over: posts (tweets.js, delete) or users (following.js, unfollow)."
schema: { enum: [posts, users] }
archive_file:
type: string
required: false
description: Path to an X tweets.js archive export; required for target posts.
archive_base:
type: string
required: false
default: workspace
description: "Archive path base: workspace or skill."
schema: { enum: [workspace, skill] }
following_file:
type: string
required: false
description: Path to an X following.js archive export; required for target users.
followers_file:
type: string
required: false
description: Path to an X follower.js archive export; required for the non_mutual predicate.
predicate:
type: object
required: true
description: "Typed selection predicate. Posts: rt_of, is_retweet, text_prefix, text_contains, max_likes, max_reposts, before_year, after_year. Users: non_mutual (true), user_ids. Every supplied field must match."
schema:
minProperties: 1
additionalProperties: false
properties:
rt_of: { type: string, minLength: 1 }
is_retweet: { type: boolean }
text_prefix: { type: string, minLength: 1 }
text_contains: { type: string, minLength: 1 }
max_likes: { type: integer, minimum: 0 }
max_reposts: { type: integer, minimum: 0 }
before_year: { type: integer, minimum: 2006, maximum: 9999 }
after_year: { type: integer, minimum: 2006, maximum: 9999 }
non_mutual: { const: true }
user_ids:
type: array
minItems: 1
uniqueItems: true
items: { type: string, minLength: 1 }
max_acts:
type: integer
required: false
default: 5000
description: Cap on selected acts; a larger match set is flagged truncated.
schema: { minimum: 1 }
examples:
- objective: Delete all reposts of the BetaList account.
principal: account:@example
target: posts
archive_file: fixtures/data/archive-tweets.js
archive_base: skill
predicate: { is_retweet: true, rt_of: BetaList }
max_acts: 5000
result_from: [finalize-posts, finalize-users]
steps:
- id: prepare
inputs:
target: "$input.target"
archive_file: "$input.archive_file"
following_file: "$input.following_file"
followers_file: "$input.followers_file"
predicate: "$input.predicate"
tool: { module: twitter-selection.mjs, export: prepareSelection }
outputs:
twitter_selection_plan: object
- id: read-users
tool: fs.read_bundle
scopes:
- fs.read
when:
value: $steps.prepare.twitter_selection_plan.target
equals: users
inputs:
path_scope: "$input.archive_base"
paths: $steps.prepare.twitter_selection_plan.paths
- id: select-posts
scopes:
- fs.read
inputs:
objective: "$input.objective"
principal: "$input.principal"
predicate: "$input.predicate"
max_acts: "$input.max_acts"
archive_file: "$input.archive_file"
archive_base: "$input.archive_base"
selection_plan: $steps.prepare.twitter_selection_plan
target: $input.target
following_file: $input.following_file
followers_file: $input.followers_file
when:
value: $steps.prepare.twitter_selection_plan.target
equals: posts
tool: { module: twitter-selection.mjs, export: selectArchivePage, pages: { path_from: archive_file, path_scope_from: archive_base, media_type: application/javascript, framing: json_array, page_bytes: 524288 } }
outputs:
twitter_selection_draft: object
- id: select-users
inputs:
objective: "$input.objective"
principal: "$input.principal"
predicate: "$input.predicate"
max_acts: "$input.max_acts"
selection_plan: $steps.prepare.twitter_selection_plan
file_read_bundle: $steps.read-users.file_read_bundle
target: $input.target
archive_file: $input.archive_file
archive_base: $input.archive_base
following_file: $input.following_file
followers_file: $input.followers_file
when:
value: $steps.prepare.twitter_selection_plan.target
equals: users
tool: { module: twitter-selection.mjs, export: selectUsersArchive }
outputs:
twitter_selection_draft: object
- id: digest-posts
tool: data.digest
when:
value: $steps.prepare.twitter_selection_plan.target
equals: posts
inputs:
value: $steps.select-posts.twitter_selection_draft.twitter_plan
- id: finalize-posts
when:
value: $steps.prepare.twitter_selection_plan.target
equals: posts
inputs:
twitter_selection_draft: $steps.select-posts.twitter_selection_draft
digest_result: $steps.digest-posts.digest_result
tool: { module: twitter-selection.mjs, export: bindSelectionDigest }
outputs:
twitter_selection:
type: object
artifacts:
named_emits:
twitter_selection: twitter_selection
packets:
twitter_selection: runx/twitter.selection.v1
- id: digest-users
tool: data.digest
when:
value: $steps.prepare.twitter_selection_plan.target
equals: users
inputs:
value: $steps.select-users.twitter_selection_draft.twitter_plan
- id: finalize-users
when:
value: $steps.prepare.twitter_selection_plan.target
equals: users
inputs:
twitter_selection_draft: $steps.select-users.twitter_selection_draft
digest_result: $steps.digest-users.digest_result
tool: { module: twitter-selection.mjs, export: bindSelectionDigest }
outputs:
twitter_selection: object
artifacts:
named_emits:
twitter_selection: twitter_selection
packets:
twitter_selection: runx/twitter.selection.v1
execute:
description: Run the next batch of an approved plan under its own approval, recording each act's outcome and the progress made.
inputs:
plan_json:
type: object
required: false
description: Exact plan for the first call; omitted on subsequent calls because the skill saves it by its native digest.
schema:
required: [decision, principal, acts, gates]
additionalProperties: false
properties:
decision: { type: string, enum: [ready, needs_input, reject, refused] }
objective: { type: string, minLength: 1, maxLength: 4000 }
principal: { type: string, minLength: 1, maxLength: 512 }
acts:
type: array
maxItems: 5000
items:
type: object
required: [act_id, kind, params, consequence, rationale]
additionalProperties: false
properties:
act_id: { type: string, pattern: '^act-[A-Za-z0-9._:-]+$' }
kind: { type: string, enum: [post, reply, quote, thread, delete_post, unfollow, follow, mute, block, like, repost] }
params: { type: object, minProperties: 1, additionalProperties: true }
consequence: { type: string, minLength: 1, maxLength: 256 }
rationale: { type: string, minLength: 1, maxLength: 4000 }
gates:
type: object
required: [human_approval_required]
properties:
human_approval_required: { const: true }
approval_id: { type: [string, 'null'] }
additionalProperties: false
evidence_locators: { type: array, maxItems: 100, items: { type: string, minLength: 1, maxLength: 2048 } }
context_bindings:
type: array
maxItems: 20
items:
type: object
required: [packet_digest, applied_rules]
additionalProperties: false
properties:
packet_digest: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }
applied_rules: { type: array, maxItems: 100, items: { type: string, minLength: 1, maxLength: 4000 } }
open_questions: { type: array, maxItems: 100, items: { type: string, minLength: 1, maxLength: 4000 } }
blockers: { type: array, maxItems: 100, items: { type: string, minLength: 1, maxLength: 4000 } }
success_checkpoint:
type: object
required: [milestone, description]
additionalProperties: false
properties:
milestone: { type: string, minLength: 1, maxLength: 256 }
description: { type: string, minLength: 1, maxLength: 4000 }
plan_digest:
type: string
required: true
description: Expected canonical digest of plan_json; a mismatch is a hard failure.
max_acts:
definition: batch_limit
data_source_uri:
definition: execution_store
examples:
- plan_json:
decision: refused
objective: Delete one post.
principal: account:@example
acts:
- act_id: act-refused-1
kind: delete_post
params: { post_id: '1001' }
consequence: live_mutation
rationale: This refusal example never reaches the provider.
gates: { human_approval_required: true, approval_id: approval:granted }
plan_digest: sha256:1b705d1cbf6f52e505f351ff99ad73a1a803f52152603ffe8d4258622d25bafb
max_acts: 50
data_source_uri: tenant://twitter/refused-plan
result_from: [apply, apply_noop, persist]
steps:
- id: saved
operation: store/events.read
result_fields: [after_version, events]
input:
data_source_uri: "$input.data_source_uri"
resource: twitter_plans
aggregate_id: "$input.plan_digest"
limit: 1
- id: resolve
inputs:
plan_json: "$input.plan_json"
plan_digest: "$input.plan_digest"
saved_plan: $steps.saved.provider_operation.result
tool: { module: twitter-memory.mjs, export: resolvePlan }
outputs:
resolved_plan: object
- id: ledger
operation: store/events.read
result_fields: [after_version, events]
input:
data_source_uri: "$input.data_source_uri"
resource: twitter_execution
aggregate_id: "$input.plan_digest"
limit: 1
- id: digest
tool: data.digest
inputs:
value: $steps.resolve.resolved_plan.plan
- id: prepare
inputs:
plan_json: $steps.resolve.resolved_plan.plan
plan_digest: "$input.plan_digest"
remember_plan: $steps.resolve.resolved_plan.remember
max_acts: "$input.max_acts"
digest_result: $steps.digest.digest_result
execution_ledger: $steps.ledger.provider_operation.result
tool: { module: twitter-execution.mjs, export: prepareExecution }
outputs:
twitter_execution_plan: object
- id: remember
when:
value: $steps.prepare.twitter_execution_plan.remember_plan
equals: true
operation: store/events.append
idempotency_key: $steps.prepare.twitter_execution_plan.saved_plan_key
input:
data_source_uri: "$input.data_source_uri"
resource: twitter_plans
aggregate_id: "$input.plan_digest"
expected_version: 0
event: $steps.prepare.twitter_execution_plan.saved_plan_event
- id: self
when:
value: $steps.prepare.twitter_execution_plan.decision
equals: ready
operation: twitter/account.snapshot
result_fields: [account]
input: {}
- id: bind
when:
value: $steps.prepare.twitter_execution_plan.decision
equals: ready
inputs:
execution_plan: $steps.prepare.twitter_execution_plan
account: $steps.self.provider_operation.result.account
tool: { module: twitter-execution.mjs, export: bindExecution }
outputs:
twitter_call: object
- id: request
when:
value: $steps.prepare.twitter_execution_plan.decision
equals: ready
operation: twitter
idempotency_key: $steps.prepare.twitter_execution_plan.idempotency_key
operation_name: $steps.bind.twitter_call.operation
input: $steps.bind.twitter_call.input
approval: $steps.bind.twitter_call.approval
act:
purpose: Execute one approved twitter act plan, batch by batch, and nothing beyond it.
- id: apply
when:
value: $steps.prepare.twitter_execution_plan.decision
equals: ready
inputs:
execution_plan: $steps.prepare.twitter_execution_plan
provider_operation: $steps.request.provider_operation
account_id: $steps.bind.twitter_call.account_id
tool: { module: twitter-execution-result.mjs, export: finalizeExecution }
outputs:
twitter_execution:
type: object
artifacts:
named_emits:
twitter_execution: twitter_execution
packets:
twitter_execution: runx/twitter.execution.v1
- id: apply_noop
when:
value: $steps.prepare.twitter_execution_plan.decision
not_equals: ready
inputs:
execution_plan: $steps.prepare.twitter_execution_plan
tool: { module: twitter-execution-result.mjs, export: finalizeExecution }
outputs:
twitter_execution: object
artifacts:
named_emits:
twitter_execution: twitter_execution
packets:
twitter_execution: runx/twitter.execution.v1
- id: persist
operation: store/events.append
idempotency_key: $steps.prepare.twitter_execution_plan.idempotency_key
when:
value: $steps.prepare.twitter_execution_plan.decision
equals: ready
input:
data_source_uri: "$input.data_source_uri"
resource: twitter_execution
aggregate_id: $steps.prepare.twitter_execution_plan.plan_digest
expected_version: $steps.prepare.twitter_execution_plan.expected_version
event: $steps.apply.twitter_execution.ledger_delta
status:
description: Read one saved plan and its durable progress, proposed next batch and provider retry time without calling X or granting approval.
inputs:
plan_digest:
type: string
required: true
description: Native digest of the saved plan, obtained from plan, select, execute or recent.
schema: { pattern: '^sha256:[0-9a-f]{64}$' }
data_source_uri:
definition: execution_store
max_acts:
definition: batch_limit
examples:
- plan_digest: sha256:0000000000000000000000000000000000000000000000000000000000000000
result_from: [status]
steps:
- id: saved
operation: store/events.read
result_fields: [after_version, events]
input:
data_source_uri: "$input.data_source_uri"
resource: twitter_plans
aggregate_id: "$input.plan_digest"
limit: 1
- id: resolve
inputs:
plan_json: null
plan_digest: "$input.plan_digest"
saved_plan: $steps.saved.provider_operation.result
tool: { module: twitter-memory.mjs, export: resolvePlan }
outputs:
resolved_plan: object
- id: ledger
operation: store/events.read
result_fields: [after_version, events]
input:
data_source_uri: "$input.data_source_uri"
resource: twitter_execution
aggregate_id: "$input.plan_digest"
limit: 1
- id: digest
tool: data.digest
inputs:
value: $steps.resolve.resolved_plan.plan
- id: prepare
inputs:
plan_json: $steps.resolve.resolved_plan.plan
plan_digest: "$input.plan_digest"
remember_plan: $steps.resolve.resolved_plan.remember
max_acts: "$input.max_acts"
digest_result: $steps.digest.digest_result
execution_ledger: $steps.ledger.provider_operation.result
tool: { module: twitter-execution.mjs, export: prepareExecution }
outputs:
twitter_execution_plan: object
- id: status
inputs:
execution_plan: $steps.prepare.twitter_execution_plan
plan: $steps.resolve.resolved_plan.plan
execution_ledger: $steps.ledger.provider_operation.result
plan_digest: "$input.plan_digest"
data_source_uri: "$input.data_source_uri"
max_acts: "$input.max_acts"
tool: { module: twitter-memory.mjs, export: executionStatus }
outputs:
twitter_status:
type: object
schema:
additionalProperties: false
required: [decision, data_source_uri, plan_digest, objective, principal, next_act_index, total_act_count, remaining_count, thread_reply_to, counts, last_failure, last_batch, stop, retry_at, next_batch, next_input, blockers]
properties:
decision: { type: string, enum: [needs_plan, ready, complete, complete_with_failures, refused, waiting, stopped] }
data_source_uri: { type: string }
plan_digest: { type: string }
objective: { type: [string, 'null'] }
principal: { type: [string, 'null'] }
next_act_index: { type: [integer, 'null'], minimum: 0 }
total_act_count: { type: [integer, 'null'], minimum: 0 }
remaining_count: { type: [integer, 'null'], minimum: 0 }
thread_reply_to: { type: [string, 'null'] }
counts:
type: [object, 'null']
required:
- processed
- succeeded
- failed
additionalProperties: false
properties:
processed:
type: integer
minimum: 0
succeeded:
type: integer
minimum: 0
failed:
type: integer
minimum: 0
last_failure:
type:
- object
- 'null'
required:
- act_id
- reason
- evidence_uri
additionalProperties: false
properties:
act_id:
type: string
minLength: 1
maxLength: 1000
reason:
type: string
minLength: 1
maxLength: 4000
evidence_uri:
type: string
minLength: 1
maxLength: 4000
last_batch:
anyOf:
- type: object
required:
- start_act_index
- selected_act_count
- processed_act_count
- succeeded_act_count
- failed_act_count
- rate_limited
additionalProperties: false
properties:
start_act_index:
type: integer
minimum: 0
selected_act_count:
type: integer
minimum: 0
maximum: 50
processed_act_count:
type: integer
minimum: 0
maximum: 50
succeeded_act_count:
type: integer
minimum: 0
maximum: 50
failed_act_count:
type: integer
minimum: 0
maximum: 50
rate_limited:
type: boolean
- type: 'null'
stop:
type:
- object
- 'null'
required:
- code
- reason
- action
- retry_at
additionalProperties: false
properties:
code:
type: string
minLength: 1
maxLength: 256
reason:
type: string
minLength: 1
maxLength: 4000
action:
type: string
enum:
- wait
- review
- reconcile
retry_at:
type:
- string
- 'null'
maxLength: 64
retry_at: { type: [string, 'null'] }
next_batch:
type: [object, 'null']
additionalProperties: false
required: [kind, act_ids, thread_segment_index, thread_segment_count]
properties:
kind: { type: string }
act_ids: { type: array, maxItems: 50, items: { type: string } }
thread_segment_index: { type: [integer, 'null'], minimum: 0 }
thread_segment_count: { type: [integer, 'null'], minimum: 1 }
next_input:
type: [object, 'null']
additionalProperties: false
required: [plan_digest, data_source_uri, max_acts]
properties:
plan_digest: { type: string }
data_source_uri: { type: string }
max_acts: { type: integer, minimum: 1, maximum: 50 }
blockers: { type: array, maxItems: 250, items: { type: string } }
recent:
description: List a bounded page of execution summaries from this workspace so another host can find the plan digest to inspect and continue.
inputs:
data_source_uri:
definition: execution_store
limit:
type: integer
required: false
default: 5
description: Number of recent execution streams to return.
schema: { minimum: 1, maximum: 100 }
cursor:
type: string
required: false
description: Page cursor returned by the previous recent call.
examples:
- limit: 5
result_from: [recent]
steps:
- id: heads
operation: store/heads.list
input:
data_source_uri: "$input.data_source_uri"
resource: twitter_execution
limit: "$input.limit"
cursor: "$input.cursor"
- id: recent
inputs:
heads: $steps.heads.provider_operation.result
data_source_uri: "$input.data_source_uri"
tool: { module: twitter-memory.mjs, export: recentExecutions }
outputs:
twitter_recent:
type: object
schema:
additionalProperties: false
required: [data_source_uri, items, next_cursor]
properties:
data_source_uri: { type: string }
items:
type: array
maxItems: 100
items:
type: object
additionalProperties: false
required: [plan_digest, account_id, decision, next_act_index, total_act_count, counts, last_failure, stop, retry_at]
properties:
plan_digest: { type: string }
account_id: { type: [string, 'null'] }
decision: { type: string }
next_act_index: { type: integer, minimum: 0 }
total_act_count: { type: integer, minimum: 0 }
counts:
type: [object, 'null']
required:
- processed
- succeeded
- failed
additionalProperties: false
properties:
processed:
type: integer
minimum: 0
succeeded:
type: integer
minimum: 0
failed:
type: integer
minimum: 0
last_failure:
type:
- object
- 'null'
required:
- act_id
- reason
- evidence_uri
additionalProperties: false
properties:
act_id:
type: string
minLength: 1
maxLength: 1000
reason:
type: string
minLength: 1
maxLength: 4000
evidence_uri:
type: string
minLength: 1
maxLength: 4000
stop:
type:
- object
- 'null'
required:
- code
- reason
- action
- retry_at
additionalProperties: false
properties:
code:
type: string
minLength: 1
maxLength: 256
reason:
type: string
minLength: 1
maxLength: 4000
action:
type: string
enum:
- wait
- review
- reconcile
retry_at:
type:
- string
- 'null'
maxLength: 64
retry_at: { type: [string, 'null'] }
next_cursor: { type: [string, 'null'] }
Published package and test evidence.
This exact version passed its recorded harness run: 18 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | 0.5.11 |
| Recorded result | 18 checks passed · 0 failed |
| Result source | Run by the Runx registry at publication |
| Suite | runx-harness |
| Test recorded | |
| Test record | Open the recorded run |
Inspect receipt references
sha256:bae2c0a88f8c7bd940e02cab3221f331b67e15bdf311cbb0b95323b49dc355b6sha256:155cbdd0030b95489357c3e82e59b707d1fffd9fe84820e7f5f126b40992ef76sha256:22f05bba94222a721dfe567fca70979ec908eb081252ea57d5dd8c60b59bb21bsha256:8f989f17bfd28439646924bf09c92e887319e9ca61f66c572c6f8894b84c6c5csha256:72bde153fb73644424a07aa8e3aea750a9dd2f9dadc6528bc07ec46956e776dfsha256:f6c2ad0d123475a0dcecf5b9cf0c6e8e4ab93b7c11603dbd1bab6ec2010f0846sha256:bb65d16142c41169eb7bbd681773e51e3a42f8772195a9b7cddd6b98a157b4c1sha256:0e1dea0ec2715eb1a197830aa64909058d0f36712f813ff81ac264f8cc569a53sha256:1cfcfa9fb2e09d33dee59b1dadfe92516618b120614199ffbf878ae392c965fdsha256:be5289be9d554c947dba093d49635948c494ae63de77361661c510b7a2c490b9sha256:64957e8089a1298ddafa3fa983f46d4126d0389db572b7b815b3ba4e18842a97sha256:ddf6310dc1a165bbdbeab7bbaafe37acf14edb58271e7ebb4ec9bb633e9cf953sha256:609824372a591426d99dc95daea72185998702969f15feb1ccfda369bebb0804sha256:deec1cd43f65f6563b8808860d403898d9858acd4160bcd360951de8fb95d4e4sha256:af0432e446ee3eaf477abc206092909abf9bf5bff802d4e1b44544b4964ede45sha256:12ccb58d8f8b97cbbd01a4c1147a1ae947e8a705e100563616898650a04a24bfsha256:09923664513d1a814628d65d1f0e4251896d38421e758501e8c53a1df972d4e1sha256:8777a1ec696875b52c08dc8c99ecbcc84bb44fc9f95e06bd788c11336d830e96Package identity
| Published revision | 0.5.11 |
|---|---|
| Content digest | sha256:6776b73b9de3532385007515b933d044db1e1be622cf90e4b6104496445de41f |
| SKILL.md digest | sha256:c34a02e92ea1a9f237c46f77b3a96237643ba448d7bb4af2e706bb7644d1c0a4 |
| Execution profile digest | sha256:a105ac7cd18b4e85681d90cfd0291235f917c5f67f782b0e1efb69ebf6f3f62b |
| Publisher identity | Verified publisher · runx |
| Trust tier | Verified publisherRunx has verified this publisher. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
0.5.11ViewingContent digest sha256:6776b73b9de3532385007515b933d044db1e1be622cf90e4b6104496445de41fsha-9392187a78ccContent digest sha256:9392187a78ccb97c1747e613bcd53ab9102f2e80628aa8cae5df10681b7b5af7sha-0f6fa068a133Content digest sha256:0f6fa068a1333bb153842976cd15a3fd49f6efce69290d60a4ca5da2293ecdcdsha-43f7b19bd360Content digest sha256:d7d764126daffe340ca8007c0be2be76925223266479b80f0e2f14858dc01841