@automagik/genie 4.260407.1 → 4.260407.2

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.
@@ -10,7 +10,7 @@
10
10
  "plugins": [
11
11
  {
12
12
  "name": "genie",
13
- "version": "4.260407.1",
13
+ "version": "4.260407.2",
14
14
  "source": "./plugins/genie",
15
15
  "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
16
16
  }
@@ -19,3 +19,4 @@
19
19
  {"timestamp":"2026-04-04T00:00:00.000Z","duration_ms":30000,"api_calls":0,"tools_generated":0,"errors":["gh CLI not available","GitHub MCP tools not present in session"],"status":"success","fallback":true,"metrics":{"releases_24h":2,"merged_prs_7d":35,"avg_merge_time_h":0.3,"ship_rate_pct":85}}
20
20
  {"timestamp":"2026-04-05T12:24:47Z","duration_ms":32000,"api_calls":0,"tools_generated":0,"errors":["gh CLI not available","GitHub MCP tools not present in session"],"status":"success","fallback":true,"metrics":{"releases_24h":2,"merged_prs_7d":35,"avg_merge_time_h":0.3,"ship_rate_pct":85}}
21
21
  {"timestamp":"2026-04-06T12:29:47.000Z","duration_ms":12500,"api_calls":0,"tools_generated":1,"errors":["gh_cli_unavailable: fallback to last_metrics from state.json"],"metrics":{"releases_24h":2,"merged_prs_7d":35,"avg_merge_time_h":0.3,"ship_rate_pct":85}}
22
+ {"timestamp":"2026-04-07T12:04:30Z","duration_ms":27000,"api_calls":0,"tools_generated":0,"errors":["gh CLI not available","no GitHub token or MCP GitHub tools present in session"],"status":"failed","fallback":false,"metrics":null}
@@ -1,6 +1,6 @@
1
1
  {
2
- "last_run": "2026-04-06T12:29:47.000Z",
3
- "last_run_status": "success",
2
+ "last_run": "2026-04-07T12:04:30Z",
3
+ "last_run_status": "failed",
4
4
  "last_metrics": {
5
5
  "releases_24h": 2,
6
6
  "merged_prs_7d": 35,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/genie",
3
- "version": "4.260407.1",
3
+ "version": "4.260407.2",
4
4
  "description": "Collaborative terminal toolkit for human + AI workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genie",
3
- "version": "4.260407.1",
3
+ "version": "4.260407.2",
4
4
  "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, turn them into wishes, execute with /work, validate with /review, and ship as one team.",
5
5
  "author": {
6
6
  "name": "Namastex Labs"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genie-plugin",
3
- "version": "4.260407.1",
3
+ "version": "4.260407.2",
4
4
  "private": true,
5
5
  "description": "Runtime dependencies for genie bundled CLIs",
6
6
  "type": "module",
@@ -1,30 +1,25 @@
1
- import { beforeEach, describe, expect, it, mock } from 'bun:test';
1
+ // IMPORTANT: Import _sdk-mocks FIRST it registers the process-global
2
+ // mock.module for @anthropic-ai/claude-agent-sdk. Bun's mock.module is
3
+ // process-global; the first file to register wins. Without this import,
4
+ // this file's own mock registration races with _sdk-mocks.ts and whichever
5
+ // loads first in CI (alphabetical order) determines which queryMock is live.
6
+ // Sharing one registration eliminates the 9 CI-only flaky failures.
7
+ import { queryMock, resetQueryMock } from '../../../services/executors/__tests__/_sdk-mocks.js';
8
+
9
+ import { beforeEach, describe, expect, it, type mock } from 'bun:test';
2
10
  import type { SpawnContext } from '../../executor-types.js';
3
11
 
4
- // Mock the SDK query function before importing provider
5
- mock.module('@anthropic-ai/claude-agent-sdk', () => ({
6
- query: mock(() => {
7
- const gen = (async function* () {
8
- yield { type: 'assistant', message: { content: [{ type: 'text', text: 'hello' }] } };
9
- })();
10
- return Object.assign(gen, {
11
- interrupt: mock(),
12
- setPermissionMode: mock(),
13
- setModel: mock(),
14
- return: mock(async () => ({ value: undefined, done: true })),
15
- throw: mock(async () => ({ value: undefined, done: true })),
16
- });
17
- }),
18
- }));
19
-
20
12
  const { ClaudeSdkProvider } = await import('../claude-sdk.js');
21
- const sdk = await import('@anthropic-ai/claude-agent-sdk');
13
+
14
+ // Alias for backward compat with assertions that used `sdk.query`
15
+ const sdk = { query: queryMock } as { query: ReturnType<typeof mock> };
22
16
 
23
17
  describe('ClaudeSdkProvider', () => {
24
18
  let provider: InstanceType<typeof ClaudeSdkProvider>;
25
19
  let ctx: SpawnContext;
26
20
 
27
21
  beforeEach(() => {
22
+ resetQueryMock();
28
23
  provider = new ClaudeSdkProvider();
29
24
  ctx = {
30
25
  agentId: 'test-agent',