@stage5/lumine 0.2.18 → 0.2.19
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/README.md +58 -0
- package/bin/lumine.js +6 -1
- package/lib/admin.js +770 -0
- package/lib/commands.js +66 -2
- package/lib/constants.js +1 -0
- package/lib/http.js +4 -1
- package/package.json +1 -1
- package/sdk/LUMINE_ADMIN.md +715 -0
package/README.md
CHANGED
|
@@ -153,6 +153,64 @@ claude "Read CLAUDE.md, then make the requested change."
|
|
|
153
153
|
The login command uses a browser approval code and stores a scoped token and the
|
|
154
154
|
selected project at `~/.twinkle/lumine-cli-auth.json`.
|
|
155
155
|
|
|
156
|
+
## Privileged website administration
|
|
157
|
+
|
|
158
|
+
`lumine admin` reuses Mikey's saved CLI login while keeping the visible public
|
|
159
|
+
actor separate. The server reloads Mikey's current authority from the writer,
|
|
160
|
+
resolves Zero/Ciel by immutable IDs, and binds every operation to an expiring,
|
|
161
|
+
purpose-scoped daily run. Flags, usernames, token claims, and local state never
|
|
162
|
+
grant delegation. Delegated work does not create a bot login or presence
|
|
163
|
+
session, but its public content changes use Twinkle's normal real-time socket
|
|
164
|
+
events.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
lumine admin identity list --json
|
|
168
|
+
lumine admin daily-run start --identity auto --comment-mode off --json
|
|
169
|
+
lumine admin recommendations list --cursor '<cursor>' --json
|
|
170
|
+
lumine admin subjects candidates --after 2026-08-01T00:00:00Z --json
|
|
171
|
+
lumine admin subjects candidates --effort unassigned --json
|
|
172
|
+
lumine admin subject get 123 --include-comments --json
|
|
173
|
+
lumine admin post get https://www.twin-kle.com/ai-stories/88 --json
|
|
174
|
+
lumine admin post comments dailyReflection:99 --json
|
|
175
|
+
lumine admin subject comments 123 --cursor '<cursor>' --json
|
|
176
|
+
lumine admin subject reveal 123 --json
|
|
177
|
+
lumine admin subject effort set 123 --level 3 --json
|
|
178
|
+
lumine admin subject creator set-made-by-poster 123 --json
|
|
179
|
+
lumine admin featured list --json
|
|
180
|
+
lumine admin subject feature 123 --json
|
|
181
|
+
lumine admin subject unfeature 123 --json
|
|
182
|
+
lumine admin featured reorder --subject-ids 30,20,10 --json
|
|
183
|
+
lumine admin post recommend comment:456 --anyone-can-reward --reward-twinkles 3 --json
|
|
184
|
+
lumine admin post reward comment:456 --twinkles 3 --json
|
|
185
|
+
lumine admin daily-run complete --json
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Numeric recommendation targets default to subjects. Use `comment:<id>`,
|
|
189
|
+
`aiStory:<id>`, `dailyReflection:<id>`, a canonical URL, or the matching
|
|
190
|
+
`--type` for another post kind. Commenting is always `off` for a new run unless
|
|
191
|
+
`--comment-mode draft` or `--comment-mode post` is explicitly supplied. Drafts
|
|
192
|
+
and posts use the selected bot's server-owned canonical persona; a later human
|
|
193
|
+
reply is handled by Twinkle's existing autonomous Zero/Ciel responder without
|
|
194
|
+
Lumine remaining active.
|
|
195
|
+
|
|
196
|
+
Every operation is noninteractive when its required arguments are present.
|
|
197
|
+
`--json` prints exactly one uncolored JSON value and returns a nonzero status
|
|
198
|
+
for forbidden, not-found, validation, and partial-failure responses. Pass a
|
|
199
|
+
stable `--idempotency-key` when retrying one mutation across processes; the
|
|
200
|
+
server also enforces canonical no-duplicate invariants. Failed mutation JSON
|
|
201
|
+
includes `error.details.retryIdempotencyKey` so a partial attempt can be
|
|
202
|
+
resumed with the exact generated key.
|
|
203
|
+
|
|
204
|
+
Subject and recommendation-queue listings use opaque, stable snapshot cursors.
|
|
205
|
+
Pass the returned `data.pagination.nextCursor` back through `--cursor` until
|
|
206
|
+
`data.pagination.exhausted` is true. Subject `--after` is inclusive and cursors
|
|
207
|
+
are bound to the original date and effort filters.
|
|
208
|
+
|
|
209
|
+
The complete run lifecycle, command contracts, nullable fields, Karma approval
|
|
210
|
+
behavior, pagination semantics, secret-subject behavior, presence isolation,
|
|
211
|
+
and retry rules are documented in
|
|
212
|
+
[`sdk/LUMINE_ADMIN.md`](sdk/LUMINE_ADMIN.md).
|
|
213
|
+
|
|
156
214
|
`lumine login` opens the Twinkle approval page automatically. If you are running
|
|
157
215
|
in SSH, CI, or an agent environment, use:
|
|
158
216
|
|
package/bin/lumine.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { main } from "../lib/commands.js";
|
|
3
|
+
import { formatAdminJsonError, isAdminJsonInvocation } from "../lib/admin.js";
|
|
3
4
|
|
|
4
5
|
main().catch((error) => {
|
|
5
|
-
|
|
6
|
+
if (isAdminJsonInvocation(process.argv.slice(2))) {
|
|
7
|
+
console.log(JSON.stringify(formatAdminJsonError(error)));
|
|
8
|
+
} else {
|
|
9
|
+
console.error(`lumine: ${error?.message || error}`);
|
|
10
|
+
}
|
|
6
11
|
process.exitCode = 1;
|
|
7
12
|
});
|