@justjoshn/pi-pstack 0.15.36-pi.1 → 0.15.36-pi.7
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 +39 -0
- package/README.md +15 -12
- package/agents/ci-watcher.md +27 -0
- package/agents/thermo-nuclear-code-quality-review.md +23 -0
- package/assets/logo.png +0 -0
- package/automations/benny/FOR_AGENTS.md +1 -1
- package/automations/benny/README.md +2 -2
- package/automations/benny/skills/setup-benny/SKILL.md +5 -5
- package/bin/pstack-routines-supervisor +9 -0
- package/docs/guide/07-overnight.md +1 -1
- package/docs/guide/09-make-it-yours.md +1 -1
- package/docs/guide/10-recipes-and-pitfalls.md +1 -1
- package/docs/native-gaps.md +11 -5
- package/docs/parity-reverse-engineering.md +94 -0
- package/package.json +41 -6
- package/packaging/install-supervisor-unit.sh +164 -0
- package/packaging/launchd/com.pstack.routines-supervisor.plist.example +24 -0
- package/packaging/systemd/pstack-routines-supervisor.service.example +15 -0
- package/skills/architect/SKILL.md +1 -1
- package/skills/architect/references/runner-prompt.md +1 -1
- package/skills/arena/SKILL.md +3 -3
- package/skills/check-compiler-errors/SKILL.md +23 -0
- package/skills/create-skill/SKILL.md +515 -29
- package/skills/fix-ci/SKILL.md +29 -0
- package/skills/fix-merge-conflicts/SKILL.md +32 -0
- package/skills/get-pr-comments/SKILL.md +23 -0
- package/skills/how/SKILL.md +1 -1
- package/skills/ketchup-video/SKILL.md +2 -2
- package/skills/loop-on-ci/SKILL.md +50 -0
- package/skills/make-bot-ui/SKILL.md +2 -2
- package/skills/make-pr-easy-to-review/SKILL.md +59 -0
- package/skills/new-branch-and-pr/SKILL.md +29 -0
- package/skills/no-inline-imports/SKILL.md +12 -0
- package/skills/poteto-help/SKILL.md +4 -4
- package/skills/poteto-mode/playbooks/multi-phase-plan.md +1 -1
- package/skills/poteto-mode/playbooks/orchestrate.md +1 -1
- package/skills/pr-review-canvas/SKILL.md +176 -0
- package/skills/pr-review-canvas/renderer.js +170 -0
- package/skills/pr-review-canvas/styles.css +96 -0
- package/skills/pr-review-canvas/template.html +18 -0
- package/skills/reflect/SKILL.md +1 -1
- package/skills/review-and-ship/SKILL.md +41 -0
- package/skills/run-smoke-tests/SKILL.md +42 -0
- package/skills/statechart/scripts/test/cli.test.ts +1 -1
- package/skills/swarm/SKILL.md +2 -2
- package/skills/thermo-nuclear-code-quality-review/SKILL.md +192 -0
- package/skills/typescript-exhaustive-switch/SKILL.md +10 -0
- package/skills/verify-this/SKILL.md +74 -0
- package/skills/weekly-review/SKILL.md +32 -0
- package/skills/what-did-i-get-done/SKILL.md +31 -0
- package/skills/why/SKILL.md +1 -1
- package/skills/workflow-from-chats/SKILL.md +50 -0
- package/src/mode.ts +3 -3
- package/src/paths.ts +13 -0
- package/src/pi-command.ts +12 -0
- package/src/rule.ts +4 -4
- package/src/sections.ts +2 -1
- package/src/subscriptions/durable-store.ts +482 -0
- package/src/subscriptions/durable-types.ts +41 -0
- package/src/subscriptions/ensure-supervisor.ts +67 -0
- package/src/subscriptions/index.ts +231 -271
- package/src/subscriptions/supervisor-main.ts +88 -0
- package/src/subscriptions/supervisor.ts +271 -0
- package/src/subscriptions/webhook.ts +22 -9
- package/src/task/card.ts +29 -0
- package/src/task/records.ts +3 -8
- package/src/task/runner.ts +9 -14
- package/src/task/tool.ts +18 -21
- package/src/todo.ts +1 -2
- package/scripts/live-e2e.mjs +0 -257
- package/test/aliases.test.ts +0 -57
- package/test/ask.test.ts +0 -85
- package/test/autocomplete.test.ts +0 -39
- package/test/e2e/aliases.e2e.test.ts +0 -81
- package/test/e2e/ask.e2e.test.ts +0 -135
- package/test/e2e/harness.ts +0 -179
- package/test/e2e/host.e2e.test.ts +0 -193
- package/test/e2e/lifecycle.e2e.test.ts +0 -99
- package/test/e2e/mode.e2e.test.ts +0 -160
- package/test/e2e/package.e2e.test.ts +0 -67
- package/test/e2e/task.e2e.test.ts +0 -734
- package/test/e2e/todo.e2e.test.ts +0 -59
- package/test/fixtures/cursor-askquestion-calls.json +0 -806
- package/test/fixtures/fake-pi.mjs +0 -96
- package/test/fixtures/image-model.ts +0 -16
- package/test/fixtures/list-models.ts +0 -15
- package/test/fixtures/readonly-shell-exit.ts +0 -17
- package/test/fixtures/scripted-model.ts +0 -113
- package/test/loop.test.ts +0 -209
- package/test/mode.test.ts +0 -143
- package/test/plan.test.ts +0 -126
- package/test/readonly-shell-security.test.ts +0 -84
- package/test/readonly-shell.test.ts +0 -44
- package/test/records.test.ts +0 -143
- package/test/registry.test.ts +0 -18
- package/test/resources.test.ts +0 -162
- package/test/rule.test.ts +0 -92
- package/test/scripts.test.ts +0 -182
- package/test/sections.test.ts +0 -56
- package/test/subscriptions-cron.test.ts +0 -60
- package/test/subscriptions.test.ts +0 -598
- package/test/task-agents.test.ts +0 -49
- package/test/task-card.test.ts +0 -34
- package/test/task-fork.test.ts +0 -233
- package/test/task-format.test.ts +0 -65
- package/test/task-model.test.ts +0 -141
- package/test/task-runner.test.ts +0 -259
- package/test/task-schema.test.ts +0 -50
- package/test/task-status.test.ts +0 -155
- package/test/task-worktree.test.ts +0 -106
- package/test/todo.test.ts +0 -74
- package/test/visualize.test.ts +0 -152
- package/tsconfig.json +0 -5
- package/vitest.config.ts +0 -16
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { join } from 'node:path';
|
|
2
|
-
|
|
3
|
-
import { afterEach, beforeEach, expect, test } from 'vitest';
|
|
4
|
-
import { makeSandbox, type PiEvent, type RpcSession, type Sandbox, script, startRpc } from './harness.ts';
|
|
5
|
-
|
|
6
|
-
let sandbox: Sandbox;
|
|
7
|
-
let rpc: RpcSession;
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
sandbox = makeSandbox();
|
|
10
|
-
rpc = startRpc(sandbox, ['--session-dir', join(sandbox.root, 'sessions')]);
|
|
11
|
-
});
|
|
12
|
-
afterEach(async () => {
|
|
13
|
-
await rpc.close();
|
|
14
|
-
sandbox.dispose();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const settled = (after: number) => (event: PiEvent) => event.type === 'agent_settled' && rpc.events.indexOf(event) >= after;
|
|
18
|
-
|
|
19
|
-
async function prompt(message: string): Promise<void> {
|
|
20
|
-
const mark = rpc.events.length;
|
|
21
|
-
rpc.send({ type: 'prompt', message });
|
|
22
|
-
await rpc.waitFor(settled(mark));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const lastTodoResult = () => {
|
|
26
|
-
const ends = rpc.events.filter((event) => event.type === 'tool_execution_end' && event['toolName'] === 'TodoWrite');
|
|
27
|
-
const result = ends.at(-1)?.['result'] as { content: { text: string }[] } | undefined;
|
|
28
|
-
return result?.content[0]?.text;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
test('TodoWrite state follows a fork back to the earlier branch and drives the widget (TODO-001, TODO-002)', async () => {
|
|
32
|
-
await prompt(
|
|
33
|
-
script([
|
|
34
|
-
{
|
|
35
|
-
tool: 'TodoWrite',
|
|
36
|
-
args: {
|
|
37
|
-
merge: false,
|
|
38
|
-
todos: [
|
|
39
|
-
{ id: 'a', content: 'Alpha', status: 'pending' },
|
|
40
|
-
{ id: 'b', content: 'Beta', status: 'pending' },
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
]),
|
|
45
|
-
);
|
|
46
|
-
await prompt(script([{ tool: 'TodoWrite', args: { merge: true, todos: [{ id: 'a', status: 'completed' }] } }]));
|
|
47
|
-
expect(lastTodoResult()).toBe('Todos (1/2 completed):\n[x] a: Alpha\n[ ] b: Beta');
|
|
48
|
-
const widget = rpc.events.filter((event) => event.type === 'extension_ui_request' && event['method'] === 'setWidget' && event['widgetKey'] === 'pstack-todos').at(-1);
|
|
49
|
-
expect(widget?.['widgetLines']).toEqual(['Todos 1/2', '✓ Alpha', '○ Beta']);
|
|
50
|
-
|
|
51
|
-
rpc.send({ id: 'entries', type: 'get_entries' });
|
|
52
|
-
const entries = (await rpc.waitFor((event) => event['id'] === 'entries'))['data'] as { entries: { id: string; type: string; message?: { role: string } }[] };
|
|
53
|
-
const userEntries = entries.entries.filter((entry) => entry.type === 'message' && entry.message?.role === 'user');
|
|
54
|
-
rpc.send({ id: 'fork', type: 'fork', entryId: userEntries[1]?.id });
|
|
55
|
-
await rpc.waitFor((event) => event['id'] === 'fork' && event['success'] === true);
|
|
56
|
-
|
|
57
|
-
await prompt(script([{ tool: 'TodoWrite', args: { merge: true, todos: [{ id: 'c', content: 'Gamma', status: 'in_progress' }] } }]));
|
|
58
|
-
expect(lastTodoResult()).toBe('Todos (0/3 completed, 1 in progress):\n[ ] a: Alpha\n[ ] b: Beta\n[>] c: Gamma');
|
|
59
|
-
});
|