@kosuke-ai/kosuke 1.0.46 → 1.0.48
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/CHANGELOG.md +12 -0
- package/README.md +6 -2
- package/dist/commands/skill-runs.js +30 -11
- package/dist/generated/commands/deploys/queue-steer.js +1 -1
- package/dist/generated/commands/index.js +231 -225
- package/dist/generated/commands/projects/batch-merging-picks-set.js +31 -0
- package/dist/generated/commands/sensei/threads-create.js +35 -0
- package/dist/generated/commands/sessions/env-sync.js +21 -0
- package/dist/generated/commands/sessions/qa-set.js +1 -1
- package/dist/program.js +1 -4
- package/dist/runtime/attach.js +13 -51
- package/openapi.json +214 -2
- package/package.json +7 -4
- package/dist/runtime/aliases.js +0 -508
- package/dist/runtime/former-commands.js +0 -89
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.48
|
|
4
|
+
|
|
5
|
+
- Command names from before the command grammar no longer run; `kosuke <group> --help` lists the current ones. The MCP server refuses the former toolsets too: a client that requests `deploy`, `members` or `personal-tasks` now gets HTTP 400 and must switch its configuration to `deploys`, `workspaces` or `tasks`. The `user` and `workspaces` toolsets no longer include the tools that moved to `crons`, `files`, `integrations`, `plugins`, `providers`, `sensei` and `skills`: request those toolsets instead.
|
|
6
|
+
- Add `kosuke sensei threads create`, which lets Sensei open a new thread with its own Turn from any point of a Turn.
|
|
7
|
+
- Add `kosuke sessions env sync` to deliver a project's current environment variables to a running session sandbox and restart its services.
|
|
8
|
+
- `kosuke sessions skill-runs --help` now lists every `--result` value `finish` accepts. A marker it rejects, such as `--result pass`, still exits 0 and sends nothing, but prints one line on stderr saying it was not recorded and why.
|
|
9
|
+
|
|
10
|
+
## 1.0.47
|
|
11
|
+
|
|
12
|
+
- `kosuke deploys queue steer` now steers on any deploy model whose runtime takes a steer, not Claude only.
|
|
13
|
+
- Add `kosuke projects batch-merging picks set` for a Batch's own session: it lists the task pull requests merged into the Batch branch, which replaces the Session Label a Batch used to add.
|
|
14
|
+
|
|
3
15
|
## 1.0.46
|
|
4
16
|
|
|
5
17
|
- `kosuke sessions go-ahead set` now marks a draft pull request ready for review on GitHub, as the member, before it saves the go-ahead. When GitHub refuses, nothing is saved and the command fails with GitHub's reason.
|
package/README.md
CHANGED
|
@@ -40,10 +40,14 @@ kosuke sessions skill-runs finish kosuke:ship --result ready
|
|
|
40
40
|
|
|
41
41
|
The sandbox supplies the session identity and its Turn credential. The server selects the
|
|
42
42
|
running Chat Job. These commands accept only known switch names and result values, never
|
|
43
|
-
free text.
|
|
43
|
+
free text. `--result` takes one of `passed`, `failed`, `blocked`, `skipped`, `prototype`,
|
|
44
|
+
`question`, `ready`, `cancelled` or `open_items`, and `--help` lists them. A child skill
|
|
45
|
+
starts inside its parent and ends before the parent resumes.
|
|
44
46
|
|
|
45
47
|
Markers are best effort: one request, a 1.5-second deadline, no retry, and exit status zero
|
|
46
|
-
even for invalid input or a tracking failure. They print no success message.
|
|
48
|
+
even for invalid input or a tracking failure. They print no success message. Input they
|
|
49
|
+
reject sends nothing and prints one line on stderr saying the marker was not recorded and
|
|
50
|
+
why, without repeating the input. Without the
|
|
47
51
|
main-agent marker context, they send no request. Delegated Runs do not record markers.
|
|
48
52
|
Other commands keep their normal error exit codes. `sessions skill-runs --capabilities`
|
|
49
53
|
prints `skill-markers-v1` without credentials, so an older CLI never receives an unsupported rule.
|
|
@@ -31,6 +31,13 @@ const RESULTS = new Set([
|
|
|
31
31
|
]);
|
|
32
32
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
33
33
|
const DEADLINE_MS = 1500;
|
|
34
|
+
const RESULT_CHOICES = [...RESULTS].join('|');
|
|
35
|
+
// `run` answers --help before Commander, so this is the only help an agent reads: it names
|
|
36
|
+
// every result, or an agent following it must guess one.
|
|
37
|
+
const USAGE = `kosuke sessions skill-runs start <name> [--fix] [--sync] [--no-review]
|
|
38
|
+
kosuke sessions skill-runs finish <name> [--result ${RESULT_CHOICES}]
|
|
39
|
+
Best effort: one request, 1.5-second deadline, always exits 0.
|
|
40
|
+
`;
|
|
34
41
|
async function appendMarker(path, value) {
|
|
35
42
|
try {
|
|
36
43
|
const stat = await lstat(path).catch(() => null);
|
|
@@ -91,37 +98,49 @@ export async function runSkillMarkerCommand(args, options = {}) {
|
|
|
91
98
|
const [group, noun] = HAND_WRITTEN.sessionsSkillRuns.command;
|
|
92
99
|
if (args[0] !== group || args[1] !== noun)
|
|
93
100
|
return false;
|
|
94
|
-
const { env = process.env, fetch: request = globalThis.fetch, stdout = (text) => process.stdout.write(text), timeoutMs = DEADLINE_MS, } = options;
|
|
101
|
+
const { env = process.env, fetch: request = globalThis.fetch, stdout = (text) => process.stdout.write(text), stderr = (line) => process.stderr.write(line + '\n'), timeoutMs = DEADLINE_MS, } = options;
|
|
102
|
+
// Still exit 0, but say why, so an agent can correct a rejected marker. Never echo the input:
|
|
103
|
+
// it may be free text.
|
|
104
|
+
const notRecorded = (why) => {
|
|
105
|
+
try {
|
|
106
|
+
stderr(`kosuke: skill marker not recorded: ${why}. See kosuke sessions skill-runs --help.`);
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
// Reporting is best effort too.
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
112
|
+
};
|
|
95
113
|
if (args.length === 3 && args[2] === '--capabilities') {
|
|
96
114
|
stdout('skill-markers-v1\n');
|
|
97
115
|
return true;
|
|
98
116
|
}
|
|
99
117
|
if (args.includes('--help') || args.includes('-h')) {
|
|
100
|
-
stdout(
|
|
118
|
+
stdout(USAGE);
|
|
101
119
|
return true;
|
|
102
120
|
}
|
|
103
121
|
const [, , verb, rawName, ...rest] = args;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
!/^(?:kosuke:)?[a-z][a-z0-9-]{0,79}$/.test(rawName))
|
|
109
|
-
return true;
|
|
122
|
+
if (verb !== 'start' && verb !== 'finish')
|
|
123
|
+
return notRecorded('use start or finish');
|
|
124
|
+
if (!rawName || !/^(?:kosuke:)?[a-z][a-z0-9-]{0,79}$/.test(rawName))
|
|
125
|
+
return notRecorded('give a skill name, such as kosuke:ship');
|
|
110
126
|
const flags = [];
|
|
127
|
+
const action = verb === 'finish' ? 'end' : 'start';
|
|
111
128
|
let result;
|
|
112
129
|
for (let index = 0; index < rest.length; index++) {
|
|
113
130
|
const value = rest[index];
|
|
114
131
|
if (value === '--result' && action === 'end' && result === undefined) {
|
|
115
132
|
result = rest[++index];
|
|
116
133
|
if (!result || !RESULTS.has(result))
|
|
117
|
-
return
|
|
134
|
+
return notRecorded(`--result takes one of ${RESULT_CHOICES}`);
|
|
118
135
|
}
|
|
119
136
|
else if (FLAGS.has(value)) {
|
|
120
137
|
if (!flags.includes(value))
|
|
121
138
|
flags.push(value);
|
|
122
139
|
}
|
|
140
|
+
else if (value === '--result')
|
|
141
|
+
return notRecorded(action === 'start' ? 'only finish takes --result' : '--result is given once');
|
|
123
142
|
else
|
|
124
|
-
return
|
|
143
|
+
return notRecorded('an argument is not a known switch');
|
|
125
144
|
}
|
|
126
145
|
const bridge = env.KOSUKE_SKILL_MARKER_FILE;
|
|
127
146
|
const clockId = env.KOSUKE_SKILL_CLOCK_ID;
|
|
@@ -225,7 +244,7 @@ export function attachSkillMarkerCommands(program, options = {}) {
|
|
|
225
244
|
for (const flag of FLAGS)
|
|
226
245
|
command.option(flag);
|
|
227
246
|
if (action === 'finish')
|
|
228
|
-
command.option('--result <verdict>',
|
|
247
|
+
command.option('--result <verdict>', `One known result: ${RESULT_CHOICES}.`);
|
|
229
248
|
command.action(async (_name, _flags, cmd) => {
|
|
230
249
|
await runSkillMarkerCommand(cmd.parent.parent.parent.args, options);
|
|
231
250
|
});
|
|
@@ -6,7 +6,7 @@ export const operation = {
|
|
|
6
6
|
"queue",
|
|
7
7
|
"steer"
|
|
8
8
|
],
|
|
9
|
-
"summary": "Send your own queued Deploy Chat message into the running deploy agent Turn as a steer
|
|
9
|
+
"summary": "Send your own queued Deploy Chat message into the running deploy agent Turn as a steer, on any deploy model whose runtime takes one; the message stays queued when nothing can take it.",
|
|
10
10
|
"pathParams": [
|
|
11
11
|
"projectId",
|
|
12
12
|
"queuedMessageId"
|