@yegor256/jinka 0.0.11 → 0.0.13
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/bin/jinka.js +29 -12
- package/package.json +1 -1
- package/plugin/skills/accept-pull-request/SKILL.md +50 -26
- package/plugin/skills/check-ci-jobs/SKILL.md +33 -27
- package/plugin/skills/clean-up-backlog/SKILL.md +33 -23
- package/plugin/skills/find-new-bug/SKILL.md +26 -21
- package/plugin/skills/fix-a-bug/SKILL.md +47 -37
- package/plugin/skills/provide-code-review/SKILL.md +36 -22
- package/plugin/skills/repair-a-pull-request/SKILL.md +76 -0
- package/plugin/skills/triage-an-issue/SKILL.md +38 -30
- package/src/agent.js +2 -2
- package/src/answer.json +16 -0
- package/src/appended.js +12 -0
- package/src/claude.js +4 -1
- package/src/codex.js +8 -4
- package/src/crew.js +17 -10
- package/src/disk.js +11 -4
- package/src/event.js +10 -2
- package/src/genie.js +9 -7
- package/src/hello.js +1 -1
- package/src/jinka.js +2 -2
- package/src/skills.js +37 -0
- package/src/summary.js +1 -0
- package/src/teed.js +20 -0
- package/src/temp.js +17 -0
- package/src/tokens.js +7 -2
- package/src/wand.js +12 -2
package/src/tokens.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: Copyright (c) 2026 Yegor Bugayenko
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
|
+
import { styleText } from 'node:util';
|
|
5
|
+
|
|
4
6
|
export const tokens = () => {
|
|
5
7
|
const messages = new Map();
|
|
6
8
|
return Object.freeze({
|
|
@@ -21,7 +23,10 @@ export const tokens = () => {
|
|
|
21
23
|
return;
|
|
22
24
|
}
|
|
23
25
|
},
|
|
24
|
-
text: () =>
|
|
25
|
-
|
|
26
|
+
text: () => {
|
|
27
|
+
const sum = [...messages.values()].reduce((total, count) => total + count, 0);
|
|
28
|
+
const text = new Intl.NumberFormat('en', { notation: 'compact', maximumFractionDigits: 1 }).format(sum);
|
|
29
|
+
return sum > 1_000_000 ? styleText('red', text, { validateStream: false }) : text;
|
|
30
|
+
}
|
|
26
31
|
});
|
|
27
32
|
};
|
package/src/wand.js
CHANGED
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
import { styleText } from 'node:util';
|
|
5
|
+
import { setTimeout } from 'node:timers/promises';
|
|
5
6
|
import { duration } from './duration.js';
|
|
6
7
|
import { ellipsized } from './ellipsized.js';
|
|
7
8
|
|
|
8
|
-
export const wand = (wishes, agent, row, protocol) => {
|
|
9
|
+
export const wand = (wishes, agent, row, protocol, slack) => {
|
|
10
|
+
const idle = (text) => row.show(`${styleText('gray', 'idle', { validateStream: false })}\t${styleText('gray', text, { validateStream: false })}`);
|
|
11
|
+
const rest = async (left, signal) => {
|
|
12
|
+
if (left > 0) {
|
|
13
|
+
idle(`waiting for wishes (${left}s)`);
|
|
14
|
+
await setTimeout(1000, undefined, { signal });
|
|
15
|
+
await rest(left - 1, signal);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
9
18
|
const once = async (signal) => {
|
|
10
|
-
|
|
19
|
+
idle('waiting for wishes');
|
|
11
20
|
const wish = await wishes.next(signal);
|
|
12
21
|
row.show(`${ellipsized(wish.name(), 64).text()}\tstarting the agent`);
|
|
13
22
|
const start = Date.now();
|
|
@@ -20,6 +29,7 @@ export const wand = (wishes, agent, row, protocol) => {
|
|
|
20
29
|
wish.free();
|
|
21
30
|
protocol.info(`failed with exit code ${code}${summary === '' ? '' : `: ${summary}`} ${suffix}`);
|
|
22
31
|
}
|
|
32
|
+
await rest(slack, signal);
|
|
23
33
|
};
|
|
24
34
|
return Object.freeze({
|
|
25
35
|
run: async (signal) => {
|