Move people in¶
Two operator commands bring people's choices and earlier conversations from
another bot into one Discord server. Both read a version 1 JSON file of at most
1 MiB, check that its guild_id is the server of --tenant, and run in one
transaction. Repeating a file is safe.
Tag opt-outs¶
daimon tags import opt-outs.json --tenant TENANT_UUID
The file lists the Discord ids of people who never want to be tagged:
{"version": 1, "guild_id": "123456789012345678", "discord_ids": ["111", "222"]}
Each person is opted out as if they had asked Daimon never to tag them, and gets an identity if they have none yet. The command prints how many it added and how many had already opted out.
Earlier private conversations¶
daimon dm import-history dms.json --tenant TENANT_UUID --agent AGENT_NAME
The file holds each person's earlier turns, user or assistant, in any
order:
{"version": 1, "guild_id": "123456789012345678", "source_name": "Helper",
"exported_at": "2026-03-01T12:00:00Z",
"users": [{"external_user_id": "111",
"turns": [{"role": "user", "text": "Hi", "at": "2026-03-01T10:00:00Z"}]}]}
A person's first private conversation here with --agent, which must be one of
the tenant's agents, starts from theirs without saying so. One with another agent
leaves it waiting. The latest twelve turns, within 16,000
characters, are the conversation's history. Older turns, within 8,000
characters, are quoted as untrusted context. The conversation waits with no
expiry and is used once; a new conversation after that starts empty, and
importing the file again never brings it back.
People who already have a private conversation here get theirs at their next
/new, in the same way, and the command reports them. A person who appears in
several files has their turns merged when the files come from one export, and
the command fails when they do not, so one history never replaces another.
Erasing a person's data also erases a conversation still waiting for them.
Watches and reminders¶
daimon watches import watches-1.json watches-2.json --tenant TENANT_UUID \
--agent-id AGENT_ID --agent-name NAME --urls-out urls.json
daimon watches go-live --tenant TENANT_UUID --agent-id AGENT_ID --agent-name NAME
Each file lists at most 25 watches, plus timers. Give every file of one export
in the same run. Each watch commits on its own, so watch ingress waits at most
for one; a rerun finishes a run that stopped. A callback watch keeps its
token's SHA-256 and also gets a new private link. The links go only to
--urls-out (mode 0600), as {source id: url}, merged with an earlier file;
they are never printed. Set DAIMON_WATCHES__CALLBACK_BASE_URL first. Owners
without an identity get one.
Every file must name the server (guild_id) of
--tenant, and the agent must belong to it. A callback watch ends at its old
expiry, and one already past it is skipped. One with no expiry, or longer than the
callback_watch_lifetime setting (30 days by default), ends that long after it
goes live; with the setting at 0 it is permanent. An owner already at the live-watch limit is skipped
and counted, not an error. Rerunning issues no second link; a watch that has not
gone live is updated from the file.
Until a watch goes live, a post to either of its links answers a retryable
503, so senders try again; a link nobody holds still gets the same 403. An
import that never goes live lapses 30 days after it was imported.
Entries and timers marked paused stay paused at go-live: a watch waits for
its owner to resume it, and a timer is never scheduled.
Imported watches start paused and report to the owner's private conversation.
Check each owner, channel and thread, which the import prints, then run
go-live. It checks that the agent is an unarchived agent of the tenant, which
must be a live Discord server. An import with timers or callback watches
needs --agent-id and --agent-name and checks them too. Held timers belong to
that agent: only its go-live schedules them and only its --full run cancels
them.
go-live makes every watch imported for that agent live on the owner, channel
and thread the import printed: polled and callback watches resume. A page watch
first needs a fresh signing key from its owner. A watch that cannot go live, such
as one with an unmapped source, is listed with the reason and stays paused. Rerunning go-live is safe and picks up what was
fixed since.
Timers are held, not scheduled. go-live schedules each one that is still more
than a minute away, once; one already due is skipped. Reminders set in a private
conversation fire in that person's private messages, ones set in a thread fire in it and
one-off reminders set in a plain channel fire in that channel. A channel reminder
runs unattended, as its owner, and only if the agent can still post there and the
owner can still see it; otherwise it is settled with a reason and nothing is sent.
Reminders in a private conversation or a plain channel fire only for an agent on
Managed Agents. A plain channel's own backend setting, when it has one, wins over the
agent's. For the others go-live lists them by name, counts them as not_scheduled,
schedules none and leaves them held for a rerun.
Channel reminders whose channel id is not numeric are counted. Any past the 25 pending a person may hold are skipped. Notes and instructions over their limit are cut and counted; an empty note is fine. The command prints a count per outcome. A settled timer keeps no text.
A reminder that cannot start because Discord answers with a server error, a rate limit or a network failure is offered again, up to five times. Once its turn has run, sending is retried in place a few times and a reminder that still fails is settled: the turn never runs twice. Any other Discord error settles it at once.
Rerun the import after fixing the file: held timers that nothing has scheduled
are updated. A rerun never pauses again what unpause released. With --full it also
cancels held timers that no file of the run lists. An export split over several
files may list its timers in only one, so --full refuses a run whose files list
no timers.
A privacy purge erases the held rows of the person, but importing the same files
again restores them. Delete the import files, and the --urls-out file, after
use.
Reminders and callback watches made natively in a private conversation: the first deploy settles the reminders already due there, which never fired before, so none fires at once. A callback watch made in a Discord private conversation reports there.
daimon watches unpause --tenant TENANT_UUID --all-timers # or --timer-id, --watch-id
daimon watches renew WATCH_UUID --tenant TENANT_UUID # 30 more days
daimon watches rotate-link WATCH_UUID --tenant TENANT_UUID --urls-out link.json
unpause releases timers or a watch that went live paused because they were
paused in the old system; rerun go-live to schedule released timers.
rotate-link replaces every link of a callback watch and shows the new
one once, or writes it to --urls-out (mode 0600), keyed by the old id as
import --urls-out is.
Repository memory¶
scripts/import_repo_memory.py imports another system's repository memory; its
docstring holds the input formats and steps. With --tenant, a creator with no
account here gets a Discord identity in that tenant. The image has no scripts/,
so copy the script and its inputs into a worker container and run it there:
docker cp scripts/import_repo_memory.py WORKER:/tmp/
docker exec WORKER python /tmp/import_repo_memory.py --snapshot /tmp/export.json \
--repos /tmp/repos.json --tenant TENANT_UUID --manifest /tmp/manifest.json
It is a dry run until you add --apply.