@skillcdn/console 0.6.1 → 0.6.3
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 +14 -7
- package/SKILLCDN.md +3 -2
- package/dist/agent-page.d.ts +2 -0
- package/dist/agent-page.d.ts.map +1 -1
- package/dist/agent-page.js +77 -30
- package/dist/agent-page.js.map +1 -1
- package/dist/agent-state.d.ts +9 -0
- package/dist/agent-state.d.ts.map +1 -0
- package/dist/agent-state.js +28 -0
- package/dist/agent-state.js.map +1 -0
- package/dist/agent-usage.d.ts +9 -6
- package/dist/agent-usage.d.ts.map +1 -1
- package/dist/agent-usage.js +38 -8
- package/dist/agent-usage.js.map +1 -1
- package/dist/api.d.ts +4 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4 -3
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts +2 -0
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +369 -130
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/format.d.ts +13 -4
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +43 -9
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts +82 -9
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +780 -318
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/pack.d.ts +2 -2
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +6 -4
- package/dist/cli/pack.js.map +1 -1
- package/dist/cli/runner-files.d.ts +16 -0
- package/dist/cli/runner-files.d.ts.map +1 -0
- package/dist/cli/runner-files.js +110 -0
- package/dist/cli/runner-files.js.map +1 -0
- package/dist/cli/runner-host.d.ts +7 -0
- package/dist/cli/runner-host.d.ts.map +1 -1
- package/dist/cli/runner-host.js +40 -2
- package/dist/cli/runner-host.js.map +1 -1
- package/dist/client.d.ts +22 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +7 -1
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +61 -11
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +146 -35
- package/dist/components/agent-page.js.map +1 -1
- package/dist/components/agents.d.ts +3 -2
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +9 -3
- package/dist/components/agents.js.map +1 -1
- package/dist/components/calendar.d.ts +24 -4
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +78 -35
- package/dist/components/calendar.js.map +1 -1
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +40 -12
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +2 -0
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +4 -0
- package/dist/data.js.map +1 -1
- package/dist/desk-page.js +5 -5
- package/dist/desk-page.js.map +1 -1
- package/dist/feed-words.d.ts.map +1 -1
- package/dist/feed-words.js +18 -1
- package/dist/feed-words.js.map +1 -1
- package/dist/i18n/en.d.ts +51 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +44 -2
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +52 -17
- package/dist/i18n/ko.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +10 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +10 -0
- package/dist/limits.js.map +1 -1
- package/dist/plugin/capabilities.d.ts +1 -1
- package/dist/plugin/capabilities.d.ts.map +1 -1
- package/dist/plugin/capabilities.js +6 -1
- package/dist/plugin/capabilities.js.map +1 -1
- package/dist/plugin/context.d.ts +101 -8
- package/dist/plugin/context.d.ts.map +1 -1
- package/dist/plugin/limits.d.ts +7 -0
- package/dist/plugin/limits.d.ts.map +1 -1
- package/dist/plugin/limits.js +7 -0
- package/dist/plugin/limits.js.map +1 -1
- package/dist/plugin/testing.d.ts +2 -0
- package/dist/plugin/testing.d.ts.map +1 -1
- package/dist/plugin/testing.js +2 -0
- package/dist/plugin/testing.js.map +1 -1
- package/dist/rules.js +1 -1
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts.map +1 -1
- package/dist/runner/acp.js +9 -3
- package/dist/runner/acp.js.map +1 -1
- package/dist/runner/claude.d.ts.map +1 -1
- package/dist/runner/claude.js +143 -10
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/codex.d.ts.map +1 -1
- package/dist/runner/codex.js +14 -2
- package/dist/runner/codex.js.map +1 -1
- package/dist/runner/config.d.ts +18 -0
- package/dist/runner/config.d.ts.map +1 -1
- package/dist/runner/config.js +77 -1
- package/dist/runner/config.js.map +1 -1
- package/dist/runner/desk.d.ts +7 -0
- package/dist/runner/desk.d.ts.map +1 -1
- package/dist/runner/desk.js +20 -4
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/message.d.ts +26 -2
- package/dist/runner/message.d.ts.map +1 -1
- package/dist/runner/message.js +120 -32
- package/dist/runner/message.js.map +1 -1
- package/dist/runner/runner.d.ts +40 -2
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +533 -32
- package/dist/runner/runner.js.map +1 -1
- package/dist/runner/slack-status.d.ts +19 -0
- package/dist/runner/slack-status.d.ts.map +1 -0
- package/dist/runner/slack-status.js +332 -0
- package/dist/runner/slack-status.js.map +1 -0
- package/dist/runner/slack.d.ts +17 -11
- package/dist/runner/slack.d.ts.map +1 -1
- package/dist/runner/slack.js +1199 -109
- package/dist/runner/slack.js.map +1 -1
- package/dist/runner/types.d.ts +205 -6
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/types.js.map +1 -1
- package/dist/runner/usage.d.ts +6 -1
- package/dist/runner/usage.d.ts.map +1 -1
- package/dist/runner/usage.js +9 -2
- package/dist/runner/usage.js.map +1 -1
- package/dist/runner.d.ts +4 -4
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +3 -3
- package/dist/runner.js.map +1 -1
- package/dist/schemas.d.ts +263 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +137 -5
- package/dist/schemas.js.map +1 -1
- package/dist/vocabulary.d.ts +7 -0
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +6 -0
- package/dist/vocabulary.js.map +1 -1
- package/dist/wake-text.d.ts +43 -0
- package/dist/wake-text.d.ts.map +1 -0
- package/dist/wake-text.js +115 -0
- package/dist/wake-text.js.map +1 -0
- package/docs/specs/cli.md +21 -12
- package/docs/specs/plugins.md +12 -7
- package/docs/specs/rest.md +14 -5
- package/docs/specs/runner.md +133 -26
- package/docs/start.md +26 -5
- package/package.json +3 -3
- package/skills/building-a-plugin/SKILL.md +3 -3
- package/skills/deploying-a-console/SKILL.md +3 -3
- package/skills/deploying-a-console/references/access.md +15 -1
- package/skills/deploying-a-console/references/resources.md +2 -2
- package/skills/deploying-a-console/scripts/github-app.mjs +593 -0
- package/skills/planning-the-board/references/setting-up.md +1 -1
- package/skills/running-an-agent/SKILL.md +18 -72
- package/skills/running-an-agent/references/preparing-the-machine.md +17 -0
- package/skills/running-an-agent/references/several-tasks.md +1 -1
- package/skills/running-an-agent/references/slack-app.md +55 -8
- package/skills/running-an-agent/references/the-account-and-the-invitation.md +5 -0
- package/skills/running-an-agent/references/what-was-not-seen-run-yet.md +3 -0
- package/skills/running-an-agent/references/when-the-agent-could-not-go-on.md +16 -0
- package/skills/running-an-agent/references/your-first-task.md +19 -0
- package/skills/trying-a-console/SKILL.md +136 -0
- package/skills/trying-a-console/references/when-it-does-not-go.md +30 -0
- package/skills/working-the-board/SKILL.md +11 -15
- package/skills/working-the-board/references/a-pack-skills-questions.md +3 -0
- package/skills/working-the-board/references/a-plugins-commands.md +3 -0
- package/skills/working-the-board/references/a-review.md +3 -0
- package/skills/working-the-board/references/an-open-run.md +3 -0
- package/skills/working-the-board/references/requirements.md +7 -0
- package/skills/working-the-board/references/the-pack.md +3 -3
- package/skills/working-the-board/references/what-they-were-told.md +3 -0
- package/skills/working-the-board/references/work-given-in-chat.md +5 -0
- package/src/agent-page.tsx +133 -41
- package/src/agent-state.ts +33 -0
- package/src/agent-usage.ts +55 -12
- package/src/api.ts +23 -0
- package/src/cli/cli.ts +443 -137
- package/src/cli/format.ts +49 -9
- package/src/cli/help.ts +904 -359
- package/src/cli/pack.ts +6 -4
- package/src/cli/runner-files.ts +120 -0
- package/src/cli/runner-host.ts +48 -2
- package/src/client.ts +64 -0
- package/src/components/agent-page.tsx +264 -39
- package/src/components/agents.tsx +20 -5
- package/src/components/calendar.tsx +92 -36
- package/src/console.tsx +47 -10
- package/src/data.ts +6 -0
- package/src/desk-page.tsx +5 -5
- package/src/feed-words.ts +20 -1
- package/src/i18n/en.ts +50 -2
- package/src/i18n/ko.ts +62 -17
- package/src/index.ts +2 -0
- package/src/limits.ts +10 -0
- package/src/plugin/capabilities.ts +8 -1
- package/src/plugin/context.ts +103 -7
- package/src/plugin/limits.ts +7 -0
- package/src/plugin/testing.ts +4 -0
- package/src/rules.ts +1 -1
- package/src/runner/acp.ts +9 -3
- package/src/runner/claude.ts +159 -10
- package/src/runner/codex.ts +14 -2
- package/src/runner/config.ts +114 -1
- package/src/runner/desk.ts +23 -4
- package/src/runner/message.ts +144 -35
- package/src/runner/runner.ts +658 -35
- package/src/runner/slack-status.ts +423 -0
- package/src/runner/slack.ts +1509 -128
- package/src/runner/types.ts +200 -5
- package/src/runner/usage.ts +16 -3
- package/src/runner.ts +20 -1
- package/src/schemas.ts +161 -3
- package/src/vocabulary.ts +9 -0
- package/src/wake-text.ts +133 -0
package/src/cli/format.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
+
import { reasonMoment } from "../agent-state.js";
|
|
2
3
|
import { usageNear, usageSaidTogether, usageStanding, usedHundredths } from "../agent-usage.js";
|
|
3
4
|
import { describeEvent } from "../feed-words.js";
|
|
4
5
|
import { NOTIFICATION_KINDS, type NotificationKind } from "../notifications.js";
|
|
@@ -7,6 +8,7 @@ import type {
|
|
|
7
8
|
RestAgent,
|
|
8
9
|
RestAgentRunner,
|
|
9
10
|
RestAgentSecret,
|
|
11
|
+
RestAgentSecretOffer,
|
|
10
12
|
RestArtifact,
|
|
11
13
|
RestCategory,
|
|
12
14
|
RestComment,
|
|
@@ -290,21 +292,28 @@ export function formatOwnWakeLine(wake: RestOwnWake): string {
|
|
|
290
292
|
}
|
|
291
293
|
|
|
292
294
|
/**
|
|
293
|
-
* How an agent account stands (ADR-0085), in a few words: the state,
|
|
294
|
-
* where its runner said, as when a usage limit resets (ADR-0150), and when its runner was
|
|
295
|
-
* heard from.
|
|
295
|
+
* How an agent account stands (ADR-0085), in a few words: the state, since when, until when
|
|
296
|
+
* where its runner said, as when a usage limit resets (ADR-0150), why, and when its runner was
|
|
297
|
+
* last heard from. The moment after `since` is the state's alone, and the reason stands apart
|
|
298
|
+
* from it, after `why:`: with when it was said where that is another moment than the state's,
|
|
299
|
+
* a turn that completed or a new conversation under a state that stayed, and with none where
|
|
300
|
+
* it came with the state or the console keeps no moment for it.
|
|
296
301
|
*/
|
|
297
302
|
export function formatAgentState(agent: RestAgent): string {
|
|
298
303
|
const state = agent.state ?? null;
|
|
299
304
|
if (state === null) {
|
|
300
305
|
return "no runner has been heard from yet";
|
|
301
306
|
}
|
|
302
|
-
const
|
|
307
|
+
const said = reasonMoment(state);
|
|
303
308
|
const until =
|
|
304
309
|
state.until === undefined || state.until === null ? "" : `, until ${moment(state.until)}`;
|
|
310
|
+
const why =
|
|
311
|
+
state.reason === null
|
|
312
|
+
? ""
|
|
313
|
+
: `; why: ${state.reason.replaceAll("_", " ")}${said === undefined ? "" : `, said ${moment(said)}`}`;
|
|
305
314
|
const heard =
|
|
306
315
|
state.heardAt === null ? "" : `; its runner was last heard from ${moment(state.heardAt)}`;
|
|
307
|
-
return `${state.state}
|
|
316
|
+
return `${state.state} since ${moment(state.since)}${until}${why}${heard}`;
|
|
308
317
|
}
|
|
309
318
|
|
|
310
319
|
/**
|
|
@@ -341,6 +350,32 @@ export function formatSecretLine(secret: RestAgentSecret): string {
|
|
|
341
350
|
return `${secret.name} (${facts.join(", ")})`;
|
|
342
351
|
}
|
|
343
352
|
|
|
353
|
+
/**
|
|
354
|
+
* One secret offered to an agent account (ADR-0169): the offer's id, the name proposed, who
|
|
355
|
+
* offers it and through which agent, and how it stands; and, on a line of its own, what the
|
|
356
|
+
* offerer said it is for, as their words. Never its value.
|
|
357
|
+
*/
|
|
358
|
+
export function formatSecretOffer(offer: RestAgentSecretOffer): string {
|
|
359
|
+
const who = offer.by === null ? "someone who is gone" : calledOf(offer.by);
|
|
360
|
+
const ended = moment(offer.decidedAt ?? offer.endsAt);
|
|
361
|
+
const stands =
|
|
362
|
+
offer.state === "waiting"
|
|
363
|
+
? `waits until ${moment(offer.endsAt)}`
|
|
364
|
+
: offer.state === "taken"
|
|
365
|
+
? `taken ${ended}${offer.takenAs === null || offer.takenAs === offer.name ? "" : ` as ${offer.takenAs}`}`
|
|
366
|
+
: offer.state === "left"
|
|
367
|
+
? `left ${ended}`
|
|
368
|
+
: `ran out ${ended}`;
|
|
369
|
+
const facts = [
|
|
370
|
+
`from ${who}${offer.agent === null ? "" : ` through ${offer.agent}`}`,
|
|
371
|
+
`offered ${moment(offer.at)}`,
|
|
372
|
+
stands,
|
|
373
|
+
...(offer.expiresOn === null ? [] : [`ends on ${offer.expiresOn}`]),
|
|
374
|
+
];
|
|
375
|
+
const line = `${offer.id} ${offer.name} (${facts.join(", ")})`;
|
|
376
|
+
return offer.note === null ? line : `${line}\n ${who} says of it: ${offer.note}`;
|
|
377
|
+
}
|
|
378
|
+
|
|
344
379
|
/** The provider a listing names, as people call it. */
|
|
345
380
|
const HOST_NAMES = { gh: "GitHub", google: "Google" } as const;
|
|
346
381
|
|
|
@@ -372,7 +407,12 @@ export function formatWorkspace(workspace: RestWorkspace): string {
|
|
|
372
407
|
].join(", ")}`,
|
|
373
408
|
)),
|
|
374
409
|
`people visibility: ${visibility} (${visibility === "everyone" ? "everyone sees everyone" : "a member sees only the people they share a project with; an administrator sees everyone"})`,
|
|
375
|
-
`
|
|
410
|
+
// What `auto` means is said where the week is left to it, and not beside a day that was chosen.
|
|
411
|
+
`week begins on: ${
|
|
412
|
+
(workspace.weekStart ?? "auto") === "auto"
|
|
413
|
+
? "auto (the system default, as each device has it)"
|
|
414
|
+
: workspace.weekStart
|
|
415
|
+
}`,
|
|
376
416
|
`time zone: ${zone ?? "none"} (${zone === null ? "moments are printed as the API gives them, in UTC" : "moments are printed in it, as ISO 8601 with its offset"})`,
|
|
377
417
|
`language: ${workspace.language ?? "none"} (${workspace.language == null ? "whoever has not chosen a language reads English, and the plugins write to them in it" : "whoever has not chosen a language reads it, and the plugins write to them in it"})`,
|
|
378
418
|
`skills: ${workspace.skills.address ?? "no address of the organization's"} at ${workspace.skills.source}`,
|
|
@@ -684,7 +724,7 @@ export function formatRules(
|
|
|
684
724
|
}
|
|
685
725
|
// The mark ends the line bare, so that it is copied as it is.
|
|
686
726
|
const later = parts.named
|
|
687
|
-
? `
|
|
727
|
+
? ` Now that they are read, a take in this session leaves them out: console take <number> --rules ${mark}`
|
|
688
728
|
: "";
|
|
689
729
|
return [
|
|
690
730
|
`Rules ${mark}: ${follows}${later}`,
|
|
@@ -1358,8 +1398,8 @@ export function formatTaskFollow(
|
|
|
1358
1398
|
): string {
|
|
1359
1399
|
const named = `Notifications of #${task.number} ${task.title} are ${follow.on ? "on" : "off"}`;
|
|
1360
1400
|
const other = follow.on
|
|
1361
|
-
? `Turn them off: console mute ${task.number}`
|
|
1362
|
-
: `Turn them on: console follow ${task.number}`;
|
|
1401
|
+
? `Turn them off: console task mute ${task.number}`
|
|
1402
|
+
: `Turn them on: console task follow ${task.number}`;
|
|
1363
1403
|
if (follow.on ? !follow.all : !follow.usual) {
|
|
1364
1404
|
return `${named}, as your settings have it${follow.on ? ": you are told of it by the kinds you have on (console notify)" : ""}. ${other}`;
|
|
1365
1405
|
}
|