tokenmaxxing 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +5 -31
- package/LICENSE +21 -0
- package/README.md +1 -2
- package/agent-plugin/agents/tokenmaxxing-claude.md +43 -0
- package/agent-plugin/agents/tokenmaxxing-codex.md +40 -0
- package/agent-plugin/bin/tokenmaxxing-mcp +7 -0
- package/agent-plugin/hooks/cursor-relay.json +14 -0
- package/agent-plugin/mcp.json +10 -0
- package/agent-plugin/plugin.json +20 -0
- package/agent-plugin/skills/codex-pool/SKILL.md +23 -0
- package/agent-plugin/skills/codex-pool/references/codex.md +5 -0
- package/agent-plugin/skills/credentials-hygiene/SKILL.md +26 -0
- package/agent-plugin/skills/credentials-hygiene/references/credentials.md +6 -0
- package/agent-plugin/skills/doctor-diagnostics/SKILL.md +26 -0
- package/agent-plugin/skills/doctor-diagnostics/references/troubleshooting.md +5 -0
- package/agent-plugin/skills/pool-status/SKILL.md +27 -0
- package/agent-plugin/skills/pool-status/references/commands.md +8 -0
- package/agent-plugin/skills/relay-session/SKILL.md +118 -0
- package/agent-plugin/skills/relay-session/references/ipc.md +23 -0
- package/agent-plugin/skills/safe-contribution/SKILL.md +27 -0
- package/agent-plugin/skills/safe-contribution/references/ship.md +5 -0
- package/agent-plugin/skills/sdk-pairing/SKILL.md +33 -0
- package/agent-plugin/skills/sdk-pairing/references/sdk.md +6 -0
- package/agent-plugin/skills/switching-policy/SKILL.md +29 -0
- package/agent-plugin/skills/switching-policy/references/policy.md +7 -0
- package/package.json +3 -5
- package/src/cli/codexinit.ts +11 -2
- package/src/cli/init.ts +9 -3
- package/src/cli/relay.ts +323 -0
- package/src/entries/codexstophook.ts +10 -0
- package/src/entries/mcp.ts +288 -0
- package/src/entries/relaypermission.ts +105 -0
- package/src/entries/stophook.ts +11 -0
- package/src/lib/decide.ts +2 -4
- package/src/lib/install.ts +61 -7
- package/src/lib/lock.ts +3 -7
- package/src/lib/log.ts +8 -11
- package/src/lib/paths.ts +3 -9
- package/src/lib/relay/config.ts +84 -0
- package/src/lib/relay/decide.ts +75 -0
- package/src/lib/relay/gc.ts +80 -0
- package/src/lib/relay/install.ts +143 -0
- package/src/lib/relay/markers.ts +148 -0
- package/src/lib/relay/modes.ts +82 -0
- package/src/lib/relay/protocol.ts +61 -0
- package/src/lib/relay/registry.ts +175 -0
- package/src/lib/relay/tmux.ts +109 -0
- package/src/lib/relay/turn.ts +137 -0
- package/src/lib/relay/worker.ts +141 -0
- package/src/lib/usage.ts +6 -5
- package/src/main.ts +6 -6
- package/src/cli/serve.ts +0 -1790
- package/src/lib/slackbridge.ts +0 -1363
- package/src/lib/slackstate.ts +0 -352
- package/src/lib/slackstream.ts +0 -300
- package/src/serve-plugin/.claude-plugin/plugin.json +0 -4
- package/src/serve-plugin/skills/ask-the-user/SKILL.md +0 -41
- package/src/serve-plugin/skills/serve-session/SKILL.md +0 -50
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ask-the-user
|
|
3
|
-
description: Use when you need the requesting user's decision, approval, or missing information to proceed, when you are blocked, or when long-running work they asked about is done, in a Slack-relayed tokenmaxxing serve session. Explains how to ask so the user actually gets notified.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Asking the user from a serve session
|
|
7
|
-
|
|
8
|
-
This session is relayed into a Slack thread. There is no interactive prompt:
|
|
9
|
-
the AskUserQuestion tool is unavailable, and only what you write in your reply
|
|
10
|
-
reaches anyone. A plain reply does not notify the user; a mention does.
|
|
11
|
-
|
|
12
|
-
## How to ask
|
|
13
|
-
|
|
14
|
-
1. Write the question into your reply and tag the requester by including their
|
|
15
|
-
mention token literally in the text: `<@U...>`, using the requester id from
|
|
16
|
-
the "Slack relay context" note in this turn. Slack renders it as @name and
|
|
17
|
-
notifies them.
|
|
18
|
-
2. State the fork in one short paragraph: what you were doing, the options,
|
|
19
|
-
which one you recommend and why. One question at a time.
|
|
20
|
-
3. Call the in-process `need_attention` tool (mcp__tokenmaxxing__need_attention)
|
|
21
|
-
in this same turn. The daemon then marks the thread as waiting on the user
|
|
22
|
-
(a question-mark reaction on their message), tags them once more if they
|
|
23
|
-
stay quiet, and relays a reaction from them back to you as their answer -
|
|
24
|
-
so phrase yes/no forks so a thumbs up picks your recommended option.
|
|
25
|
-
4. End the turn after asking. Do not pick a real fork's option unilaterally,
|
|
26
|
-
do not busy-wait, and do not keep working past the fork: the user's thread
|
|
27
|
-
reply arrives as your next turn and continues this same session.
|
|
28
|
-
|
|
29
|
-
## When to ask (and tag)
|
|
30
|
-
|
|
31
|
-
- A real decision fork: destructive or irreversible actions, spending money or
|
|
32
|
-
metering account quota, a policy or design choice the user would want to
|
|
33
|
-
make, missing credentials or facts only they have.
|
|
34
|
-
- You are blocked and cannot proceed.
|
|
35
|
-
- You finished long-running work they asked to be told about.
|
|
36
|
-
|
|
37
|
-
## When not to tag
|
|
38
|
-
|
|
39
|
-
- Routine replies and progress: the user reads the thread, and a mention that
|
|
40
|
-
is not actionable trains them to ignore the real ones.
|
|
41
|
-
- Never mention @here, @channel, or @everyone.
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: serve-session
|
|
3
|
-
description: How a tokenmaxxing serve session runs - the shared repo checkout, session resume across turns, when to cut your own git worktree, and how to hand finished work back. Use when deciding where to work, commit, push, or open a PR, or before any operation that moves, deletes, or switches the working directory.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How a serve session runs
|
|
7
|
-
|
|
8
|
-
tokenmaxxing serve bridges a Slack thread to this Claude Code session. Every
|
|
9
|
-
thread message becomes one turn; your streamed output posts back into the
|
|
10
|
-
thread as Slack messages.
|
|
11
|
-
|
|
12
|
-
## Working directory
|
|
13
|
-
|
|
14
|
-
- This session runs directly IN the linked repo checkout, and it is SHARED:
|
|
15
|
-
the repo's owner and other Slack threads work in the same checkout at the
|
|
16
|
-
same time. Read-only work (answering questions, reviewing code, reading
|
|
17
|
-
logs or history) happens here freely and in parallel. Uncommitted changes
|
|
18
|
-
you do not recognize belong to someone else - never reset, restore, or
|
|
19
|
-
stash over them; stage only your own hunks; on a collision, stop and ask
|
|
20
|
-
(see the ask-the-user skill).
|
|
21
|
-
- MUTATING work cuts its own worktree FIRST (`git worktree add`). If the
|
|
22
|
-
task will edit, create, move, or delete files - or run anything that
|
|
23
|
-
writes into the tree - do it from a fresh worktree by default: other
|
|
24
|
-
threads and the owner share this checkout, and two agents editing one tree
|
|
25
|
-
corrupt each other silently. Say in the thread that you cut one, do the
|
|
26
|
-
task's whole life there (follow-ups included), and remove it once the work
|
|
27
|
-
is merged. Skip the worktree only when the user explicitly asked for a
|
|
28
|
-
change in this checkout itself.
|
|
29
|
-
- Your session's cwd stays the SHARED CHECKOUT on every turn regardless (each
|
|
30
|
-
turn is a fresh process at the recorded cwd, and resume is keyed to it, so
|
|
31
|
-
the daemon can never move it). Reach your worktree by absolute path - or
|
|
32
|
-
`cd` inside each command - every turn; never rely on a previous turn's
|
|
33
|
-
`cd`, and re-read the thread for the worktree path when resuming a task.
|
|
34
|
-
- Session resume is keyed to the session's cwd. Never delete or move it, and
|
|
35
|
-
never switch the checkout's branch without asking: the thread (and other
|
|
36
|
-
people's work) would break.
|
|
37
|
-
|
|
38
|
-
## Turns
|
|
39
|
-
|
|
40
|
-
- Each turn is a fresh claude process resumed by session id: the conversation
|
|
41
|
-
transcript carries over, but background processes and unsaved in-memory
|
|
42
|
-
state do not. Persist anything a later turn needs to files.
|
|
43
|
-
- Nothing can answer an interactive dialog mid-turn. To get the user's input,
|
|
44
|
-
follow the ask-the-user skill.
|
|
45
|
-
|
|
46
|
-
## Handing work back
|
|
47
|
-
|
|
48
|
-
- Follow the repo's own shipping conventions (its AGENTS.md or CLAUDE.md);
|
|
49
|
-
when in doubt, branch and open a PR rather than committing to the default
|
|
50
|
-
branch. Push or merge only when the user asks.
|