opencode-swarm 7.140.5 → 7.141.0

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.
Files changed (86) hide show
  1. package/.opencode/skills/deep-dive/SKILL.md +7 -6
  2. package/.opencode/skills/running-tests/SKILL.md +7 -0
  3. package/.opencode/skills/swarm-pr-review/SKILL.md +2 -4
  4. package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +54 -0
  5. package/dist/agents/explorer.d.ts +1 -1
  6. package/dist/background/candidate-contract.d.ts +1 -1
  7. package/dist/background/lane-delivery-store.d.ts +43 -0
  8. package/dist/background/lane-output-store.d.ts +6 -0
  9. package/dist/background/pr-review-trigger-contract.d.ts +36 -0
  10. package/dist/cli/{config-doctor-5vzpq4qa.js → config-doctor-ayer8jwj.js} +2 -2
  11. package/dist/cli/{core-xjzdc56e.js → core-yep18rkf.js} +1 -1
  12. package/dist/cli/{curation-policy-avvb56x2.js → curation-policy-j1fbc3ry.js} +5 -5
  13. package/dist/cli/{curator-5nytvg7p.js → curator-fkwhph34.js} +28 -28
  14. package/dist/cli/{curator-llm-factory-rds75zhj.js → curator-llm-factory-b1wtbwwv.js} +28 -28
  15. package/dist/cli/{dispatch-2s23fbcs.js → dispatch-y8rergph.js} +1 -1
  16. package/dist/cli/{evidence-summary-service-zq4gyx6g.js → evidence-summary-service-8e6594tg.js} +9 -9
  17. package/dist/cli/{explorer-e9h66egs.js → explorer-18353rhn.js} +1 -1
  18. package/dist/cli/{gate-evidence-smn2wqft.js → gate-evidence-rt9034ft.js} +4 -4
  19. package/dist/cli/{guardrail-explain-an7jvam1.js → guardrail-explain-fhx1kft6.js} +29 -29
  20. package/dist/cli/{guardrail-log-0hnd2k9v.js → guardrail-log-x94s1jh9.js} +3 -3
  21. package/dist/cli/{hive-promoter-qe8pqg79.js → hive-promoter-3ay1hffy.js} +28 -28
  22. package/dist/cli/{index-8rp1y4ab.js → index-10zsx1x2.js} +1 -1
  23. package/dist/cli/{index-nyjtzmsj.js → index-1dwa96x7.js} +2 -2
  24. package/dist/cli/{index-tjqzr3jc.js → index-3d13jkzq.js} +2 -2
  25. package/dist/cli/{index-epvhf50h.js → index-9d4gck4e.js} +2 -1
  26. package/dist/cli/{index-0rx9t9w8.js → index-9snyxgtf.js} +1 -1
  27. package/dist/cli/{index-affh1gtg.js → index-acpsb3g1.js} +40 -9
  28. package/dist/cli/{index-2bg901qt.js → index-awwqa1f5.js} +6 -6
  29. package/dist/cli/{index-41hkt36g.js → index-ays8g6cm.js} +36 -5
  30. package/dist/cli/{index-01ggt2mj.js → index-b9mwe99e.js} +6 -6
  31. package/dist/cli/{index-p8kk34am.js → index-c2hczjhp.js} +1 -1
  32. package/dist/cli/{index-c432knmy.js → index-f1hsrgw1.js} +1 -1
  33. package/dist/cli/{index-nwrwy8eb.js → index-fckf6g01.js} +1 -1
  34. package/dist/cli/{index-kb5q9v34.js → index-fcsf8vjm.js} +3 -3
  35. package/dist/cli/{index-jm4cpp4n.js → index-g4w73p1v.js} +1 -1
  36. package/dist/cli/{index-mm2egvdt.js → index-h375yxj5.js} +30 -30
  37. package/dist/cli/{index-vh05t3w5.js → index-kq5p3nm3.js} +1 -1
  38. package/dist/cli/{index-z7h37d63.js → index-m54erqap.js} +1 -1
  39. package/dist/cli/{index-z90nvqj3.js → index-nk2ma3mh.js} +1324 -938
  40. package/dist/cli/{index-ex7r16gc.js → index-nkr3j0j1.js} +2 -2
  41. package/dist/cli/{index-s1v0wza5.js → index-nse60anv.js} +1 -1
  42. package/dist/cli/{index-ptn13xjn.js → index-pkby67j3.js} +1 -1
  43. package/dist/cli/{index-t5pytnca.js → index-q4vaar2b.js} +2 -2
  44. package/dist/cli/{index-m9xrdjn0.js → index-qskz8j2z.js} +1 -1
  45. package/dist/cli/{index-wrb0gykj.js → index-rx33k785.js} +3 -3
  46. package/dist/cli/{index-wkt9fj06.js → index-sd1w4pya.js} +3 -3
  47. package/dist/cli/{index-qy1nq52t.js → index-v250345n.js} +1 -1
  48. package/dist/cli/{index-386ts4tm.js → index-w95sxwfr.js} +4 -4
  49. package/dist/cli/{index-e0mpz2j3.js → index-x5kk9gyk.js} +5 -5
  50. package/dist/cli/{index-ztgn70jz.js → index-xcqst95a.js} +2 -2
  51. package/dist/cli/{index-v2xrer41.js → index-xmzmeknp.js} +3 -1
  52. package/dist/cli/{index-0r2m0vbq.js → index-ytnm84ed.js} +3 -3
  53. package/dist/cli/{index-912qz4y0.js → index-zbj3yrrd.js} +1 -1
  54. package/dist/cli/index.js +28 -28
  55. package/dist/cli/{knowledge-escalator-4pfrc902.js → knowledge-escalator-53m3sh8p.js} +10 -10
  56. package/dist/cli/{knowledge-events-3zkfnksk.js → knowledge-events-s5pmx5h3.js} +8 -8
  57. package/dist/cli/{knowledge-link-m9p80f4r.js → knowledge-link-x86ebng8.js} +4 -4
  58. package/dist/cli/{knowledge-store-dpqgvvjt.js → knowledge-store-dv70gxxc.js} +5 -5
  59. package/dist/cli/{knowledge-validator-2c7w87dk.js → knowledge-validator-je30smbr.js} +7 -7
  60. package/dist/cli/{pending-delegations-cxx9tezp.js → pending-delegations-7xsagjy5.js} +3 -3
  61. package/dist/cli/{pr-subscriptions-2sfnb599.js → pr-subscriptions-r6cdsa3t.js} +3 -3
  62. package/dist/cli/{runner-mky3vvht.js → runner-nm3baddf.js} +5 -5
  63. package/dist/cli/{scan-cursor-1z60gwrw.js → scan-cursor-tcdcjbp9.js} +6 -6
  64. package/dist/cli/{schema-vpnkwvez.js → schema-6cg2smxx.js} +1 -1
  65. package/dist/cli/{scope-persistence-p9dmprry.js → scope-persistence-v51d74j2.js} +6 -6
  66. package/dist/cli/{skill-generator-yx7ka1cj.js → skill-generator-7kp8s0ne.js} +12 -12
  67. package/dist/cli/{telemetry-0x6kszvk.js → telemetry-zex3zv3v.js} +1 -1
  68. package/dist/cli/{worktree-collision-ownership-wm5pse49.js → worktree-collision-ownership-n41qw3n8.js} +3 -3
  69. package/dist/cli/{worktree-isolation-bwc6ra8e.js → worktree-isolation-g6t99t0x.js} +28 -28
  70. package/dist/hooks/delegation-gate.d.ts +6 -0
  71. package/dist/hooks/knowledge-application-gate.d.ts +1 -1
  72. package/dist/hooks/knowledge-events.d.ts +5 -2
  73. package/dist/hooks/knowledge-receipt-ledger.d.ts +38 -0
  74. package/dist/hooks/knowledge-receipt-observability.d.ts +24 -1
  75. package/dist/hooks/knowledge-receipt-validator.d.ts +19 -3
  76. package/dist/hooks/knowledge-types.d.ts +9 -0
  77. package/dist/hooks/pr-workflow-gate.d.ts +20 -0
  78. package/dist/hooks/repo-graph-injection.d.ts +52 -0
  79. package/dist/index.js +231 -218
  80. package/dist/lang/backend.d.ts +7 -1
  81. package/dist/lang/default-backend.d.ts +2 -1
  82. package/dist/tools/create-tool.d.ts +5 -2
  83. package/dist/tools/dispatch-lanes.d.ts +45 -5
  84. package/dist/tools/knowledge-receipt.d.ts +40 -0
  85. package/dist/tools/test-runner.d.ts +13 -5
  86. package/package.json +1 -1
@@ -83,7 +83,12 @@ export interface TestRunSummary {
83
83
  * can accept them in `buildTestCommand` without a circular import back to
84
84
  * `src/tools/test-runner.ts`.
85
85
  */
86
- export type TestScope = 'all' | 'convention' | 'graph' | 'impact';
86
+ export type TestScope = 'all' | 'convention' | 'graph' | 'impact' | 'target';
87
+ export interface NativeTestTarget {
88
+ framework: 'go-test' | 'ctest';
89
+ name: string;
90
+ path: string;
91
+ }
87
92
  /**
88
93
  * Options influencing build-command construction. Backends may ignore
89
94
  * unrecognized opts; the default backend honors all of these.
@@ -92,6 +97,7 @@ export interface BuildTestCommandOpts {
92
97
  scope?: TestScope;
93
98
  coverage?: boolean;
94
99
  bail?: boolean;
100
+ nativeTarget?: NativeTestTarget;
95
101
  }
96
102
  /**
97
103
  * Selected web/UI framework for a project (PROJECT_FRAMEWORK template
@@ -9,7 +9,7 @@
9
9
  * to the environment, and it lives in `src/build/discovery.ts` with full
10
10
  * invariant-3 properties (cwd, stdin: 'ignore', timeout, bounded stdio).
11
11
  */
12
- import type { BuildCommandSelection, BuildTestCommandOpts, FrameworkSelection, LanguageBackend, TestFrameworkSelection, TestRunSummary } from './backend';
12
+ import type { BuildCommandSelection, BuildTestCommandOpts, FrameworkSelection, LanguageBackend, NativeTestTarget, TestFrameworkSelection, TestRunSummary } from './backend';
13
13
  import type { LanguageProfile } from './profiles';
14
14
  /**
15
15
  * Tokenize a string command into an array. Splits on whitespace; respects
@@ -47,6 +47,7 @@ export declare function defaultSelectTestFramework(profile: LanguageProfile, dir
47
47
  * Returns null when the framework name is not in the supported set.
48
48
  */
49
49
  export declare function defaultBuildTestCommand(profile: LanguageProfile, framework: string, files: string[], dir?: string, opts?: BuildTestCommandOpts): string[] | null;
50
+ export declare function buildNativeTargetCommand(target: NativeTestTarget): string[];
50
51
  /**
51
52
  * Default parseTestOutput: full 14-framework switch ported verbatim from
52
53
  * `src/tools/test-runner.ts:parseTestOutput`. Returns a TestRunSummary
@@ -18,11 +18,14 @@ export type ToolResult = string | {
18
18
  export interface SwarmToolOptions<Args extends Record<string, unknown>> {
19
19
  description: string;
20
20
  args: Args;
21
+ allowWorkingDirectoryOverride?: boolean;
21
22
  execute: (args: Args, directory: string, ctx?: ToolContext) => Promise<ToolResult>;
22
23
  }
23
24
  /**
24
- * Creates a swarm tool with automatic working directory injection.
25
- * Wraps the @opencode-ai/plugin/tool factory to always inject `directory` and `ctx` into tool execute callbacks.
25
+ * Creates a swarm tool with optional working_directory override injection.
26
+ * Wraps the @opencode-ai/plugin/tool factory to always inject `directory` and `ctx`
27
+ * into tool execute callbacks, and to expose a caller-controlled
28
+ * `working_directory` only for tools that explicitly opt into that override.
26
29
  *
27
30
  * Registration contract (issue #1781 E4): every `export const NAME = createSwarmTool({...})`
28
31
  * in `src/tools/**` MUST have a corresponding entry in `TOOL_METADATA`
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { type BackgroundDelegationRecord } from '../background/pending-delegations.js';
3
3
  import { resolveExactMergeBaseAsync, resolvePrWorkflowRevisionDigestAsync } from '../background/workspace-snapshot.js';
4
4
  import { type PrReviewDepthTier } from '../hooks/pr-workflow-gate.js';
5
+ import { buildLaneOrientationBlock } from '../hooks/repo-graph-injection.js';
5
6
  import { createParallelDispatcher } from '../parallel/dispatcher/parallel-dispatcher.js';
6
7
  import { createSwarmTool } from './create-tool.js';
7
8
  export declare const MAX_PROMPT_CHARS = 80000;
@@ -31,6 +32,7 @@ declare const DispatchLanesArgsSchema: z.ZodObject<{
31
32
  common_prompt: z.ZodOptional<z.ZodString>;
32
33
  max_concurrent: z.ZodOptional<z.ZodNumber>;
33
34
  timeout_ms: z.ZodOptional<z.ZodNumber>;
35
+ orientation: z.ZodOptional<z.ZodBoolean>;
34
36
  }, z.core.$strip>;
35
37
  declare const DispatchLanesAsyncArgsSchema: z.ZodObject<{
36
38
  lanes: z.ZodArray<z.ZodObject<{
@@ -45,6 +47,7 @@ declare const DispatchLanesAsyncArgsSchema: z.ZodObject<{
45
47
  common_prompt: z.ZodOptional<z.ZodString>;
46
48
  max_concurrent: z.ZodOptional<z.ZodNumber>;
47
49
  timeout_ms: z.ZodOptional<z.ZodNumber>;
50
+ orientation: z.ZodOptional<z.ZodBoolean>;
48
51
  launch_timeout_ms: z.ZodOptional<z.ZodNumber>;
49
52
  batch_id: z.ZodOptional<z.ZodString>;
50
53
  mode: z.ZodOptional<z.ZodString>;
@@ -290,6 +293,7 @@ export declare const _test_exports: {
290
293
  applyCommonPrompt: typeof applyCommonPrompt;
291
294
  applyExplorerFormatSuffix: typeof applyExplorerFormatSuffix;
292
295
  applyPrWorkflowPromptContract: typeof applyPrWorkflowPromptContract;
296
+ augmentCommonPromptWithOrientation: typeof augmentCommonPromptWithOrientation;
293
297
  buildCollectResult: typeof buildCollectResult;
294
298
  buildReadOnlyTools: typeof buildReadOnlyTools;
295
299
  buildLaneSessionCreateArgs: typeof buildLaneSessionCreateArgs;
@@ -311,6 +315,7 @@ export declare const _test_exports: {
311
315
  common_prompt: z.ZodOptional<z.ZodString>;
312
316
  max_concurrent: z.ZodOptional<z.ZodNumber>;
313
317
  timeout_ms: z.ZodOptional<z.ZodNumber>;
318
+ orientation: z.ZodOptional<z.ZodBoolean>;
314
319
  }, z.core.$strip>;
315
320
  DispatchLanesAsyncArgsSchema: z.ZodObject<{
316
321
  lanes: z.ZodArray<z.ZodObject<{
@@ -325,6 +330,7 @@ export declare const _test_exports: {
325
330
  common_prompt: z.ZodOptional<z.ZodString>;
326
331
  max_concurrent: z.ZodOptional<z.ZodNumber>;
327
332
  timeout_ms: z.ZodOptional<z.ZodNumber>;
333
+ orientation: z.ZodOptional<z.ZodBoolean>;
328
334
  launch_timeout_ms: z.ZodOptional<z.ZodNumber>;
329
335
  batch_id: z.ZodOptional<z.ZodString>;
330
336
  mode: z.ZodOptional<z.ZodString>;
@@ -372,9 +378,10 @@ export declare const _test_exports: {
372
378
  DEFAULT_ASYNC_STALE_TIMEOUT_MS: number;
373
379
  DEFAULT_COLLECT_TIMEOUT_MS: number;
374
380
  /**
375
- * Clears the module-level `deliveredLaneOutputs` de-dupe set (see
376
- * S1.1) so tests can assert first-poll vs. repeat-poll behavior without
377
- * cross-test bleed-through.
381
+ * Clears the lane-output delivery de-dupe state (see S1.1) so tests can
382
+ * assert first-poll vs. repeat-poll behavior without cross-test
383
+ * bleed-through. Delegates to the persistent lane-delivery store's
384
+ * in-memory reset; disk state is untouched.
378
385
  */
379
386
  resetDeliveredLaneOutputs: () => void;
380
387
  recordToLaneResult: typeof recordToLaneResult;
@@ -406,8 +413,14 @@ declare function extractAssistantTranscript(messages: Array<{
406
413
  transcriptIncomplete: boolean;
407
414
  };
408
415
  declare function nextCollectPollInterval(currentMs: number): number;
409
- declare function buildCollectResult(batchId: string, records: BackgroundDelegationRecord[], includePending: boolean): CollectLaneResultsResult;
410
- declare function recordToLaneResult(record: BackgroundDelegationRecord, batchId: string): DispatchLaneResult;
416
+ declare function buildCollectResult(batchId: string, records: BackgroundDelegationRecord[], includePending: boolean, deliveryContext?: {
417
+ directory?: string;
418
+ sessionID?: string;
419
+ }): CollectLaneResultsResult;
420
+ declare function recordToLaneResult(record: BackgroundDelegationRecord, batchId: string, deliveryContext?: {
421
+ directory?: string;
422
+ sessionID?: string;
423
+ }): DispatchLaneResult;
411
424
  declare function buildReadOnlyTools(): ReadOnlyToolPermissions;
412
425
  type ApplyCommonPromptResult = {
413
426
  ok: true;
@@ -426,6 +439,33 @@ type ApplyCommonPromptResult = {
426
439
  * when no `commonPrompt` is provided, or shallow-copied lanes with rewritten
427
440
  * prompts when it is. Callers may treat the returned array as their own.
428
441
  */
442
+ interface OrientationAugmentDeps {
443
+ buildBlock?: typeof buildLaneOrientationBlock;
444
+ }
445
+ /**
446
+ * Resolve the `orientation` arg into an augmented common_prompt (issue #1988 C2).
447
+ *
448
+ * Execute-time resolution (no zod default — a schema default cannot depend on
449
+ * graph state): `false` skips entirely; `true` or undefined attempts the block,
450
+ * and buildLaneOrientationBlock itself returns null unless a fresh graph
451
+ * exists, so undefined degrades to "false when no fresh graph".
452
+ *
453
+ * Overflow rule: the drop decision runs ONCE here, at the common+lane stage —
454
+ * max over lanes of (common_prompt + orientation + separator + lane.prompt +
455
+ * ORIENTATION_SUFFIX_RESERVE_CHARS) versus MAX_PROMPT_CHARS — BEFORE
456
+ * appending. If any lane would exceed the cap the block is dropped (debug
457
+ * log) rather than truncating content or failing dispatch. The reserve keeps
458
+ * typical suffix appends (fixed worst case ≈3.2k chars) out of failure
459
+ * territory they would not have reached without the block; extreme but
460
+ * schema-valid configurations (maxed item-id/owned-lane arrays) can exceed
461
+ * the reserve, and anything beyond it remains the caller's own size
462
+ * responsibility, as before this feature.
463
+ *
464
+ * Fail-open: any builder error degrades to the un-augmented common_prompt.
465
+ */
466
+ declare function augmentCommonPromptWithOrientation(directory: string, lanes: readonly {
467
+ prompt: string;
468
+ }[], commonPrompt: string | undefined, orientation: boolean | undefined, sessionID: string | undefined, deps?: OrientationAugmentDeps): Promise<string | undefined>;
429
469
  declare function applyCommonPrompt(lanes: DispatchLaneSpec[], commonPrompt: string | undefined): ApplyCommonPromptResult;
430
470
  declare function applyExplorerFormatSuffix(lanes: DispatchLaneSpec[], options?: {
431
471
  failClosed?: boolean;
@@ -12,8 +12,48 @@
12
12
  * relevant, the receipt can set `no_relevant_knowledge: true` — the point is to
13
13
  * force explicit consideration, not fake usage.
14
14
  */
15
+ import { z } from 'zod';
15
16
  import { createSwarmTool } from './create-tool.js';
17
+ declare const ignoredItem: z.ZodObject<{
18
+ id: z.ZodString;
19
+ reason: z.ZodEnum<{
20
+ stale: "stale";
21
+ other: "other";
22
+ superseded: "superseded";
23
+ unsafe: "unsafe";
24
+ too_generic: "too_generic";
25
+ already_satisfied: "already_satisfied";
26
+ }>;
27
+ note: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$strip>;
29
+ /**
30
+ * A shown entry that did not apply to the task at hand (issue #2032).
31
+ * Reasoned: the reason is required so `n_a` cannot be used as a silent
32
+ * evasion channel — a gate consumer can always ask "why not applicable?".
33
+ * The reason is trimmed before validation (min(1) after trim), so a
34
+ * whitespace-only reason is rejected exactly like an empty one — matching
35
+ * the phase gate's `reason?.trim()` resolution rule.
36
+ */
37
+ declare const notApplicableItem: z.ZodObject<{
38
+ id: z.ZodString;
39
+ reason: z.ZodString;
40
+ }, z.core.$strip>;
41
+ /**
42
+ * Map the calling agent to a canonical receipt-source class (issue #2032).
43
+ * Explicit allowlist — do NOT widen silently. The three independent-verifier
44
+ * roles the knowledge contract names get their own class; every other
45
+ * non-empty role (coder, spec_writer, sme, docs, designer, custom roles) is
46
+ * the exposed agent reporting on itself, which is exactly what the
47
+ * `'delegate'` source class means — a self-report, NOT "subagent of an
48
+ * architect". Unknown/absent caller stays honestly `'unknown'`; missing
49
+ * legacy source is never inferred.
50
+ */
51
+ declare function receiptSourceForAgent(agent: string): string;
16
52
  export declare const knowledge_receipt: ReturnType<typeof createSwarmTool>;
17
53
  export declare const _internals: {
18
54
  knowledge_receipt: typeof knowledge_receipt;
55
+ receiptSourceForAgent: typeof receiptSourceForAgent;
56
+ ignoredItemSchema: typeof ignoredItem;
57
+ notApplicableItemSchema: typeof notApplicableItem;
19
58
  };
59
+ export {};
@@ -1,8 +1,11 @@
1
1
  import * as fs from 'node:fs';
2
2
  import type { tool } from '@opencode-ai/plugin';
3
3
  import { isCommandAvailable } from '../build/discovery';
4
+ import type { NativeTestTarget, TestScope } from '../lang/backend';
5
+ import { buildNativeTargetCommand } from '../lang/default-backend';
4
6
  import { analyzeImpact, loadImpactMap } from '../test-impact/analyzer.js';
5
7
  import { getAllHistory, type TestRunRecord } from '../test-impact/history-store.js';
8
+ import { bunSpawn } from '../utils/bun-compat';
6
9
  export declare const MAX_OUTPUT_BYTES = 512000;
7
10
  export declare const MAX_COMMAND_LENGTH = 500;
8
11
  export declare const DEFAULT_TIMEOUT_MS = 60000;
@@ -23,8 +26,9 @@ export declare function estimateFanOut(sourceFiles: string[], cwd: string): Prom
23
26
  export declare const SUPPORTED_FRAMEWORKS: readonly ["bun", "vitest", "jest", "mocha", "pytest", "cargo", "pester", "go-test", "maven", "gradle", "dotnet-test", "ctest", "swift-test", "dart-test", "rspec", "minitest", "pest", "phpunit", "php-artisan"];
24
27
  export type TestFramework = (typeof SUPPORTED_FRAMEWORKS)[number] | 'none';
25
28
  export interface TestRunnerArgs {
26
- scope?: 'all' | 'convention' | 'graph' | 'impact';
29
+ scope?: TestScope;
27
30
  files?: string[];
31
+ native_target?: NativeTestTarget;
28
32
  coverage?: boolean;
29
33
  timeout_ms?: number;
30
34
  bail?: boolean;
@@ -48,7 +52,7 @@ declare const AGGREGATE_TEST_NAME = "(aggregate)";
48
52
  export interface TestSuccessResult {
49
53
  success: true;
50
54
  framework: TestFramework;
51
- scope: 'all' | 'convention' | 'graph' | 'impact';
55
+ scope: TestScope;
52
56
  command: string[];
53
57
  timeout_ms: number;
54
58
  duration_ms: number;
@@ -62,7 +66,7 @@ export interface TestSuccessResult {
62
66
  export interface TestErrorResult {
63
67
  success: false;
64
68
  framework: TestFramework;
65
- scope: 'all' | 'convention' | 'graph' | 'impact';
69
+ scope: TestScope;
66
70
  command?: string[];
67
71
  timeout_ms?: number;
68
72
  duration_ms?: number;
@@ -103,7 +107,7 @@ export declare function detectTestFrameworkViaDispatch(cwd: string): Promise<Tes
103
107
  * Returns null on framework=`none` or when dispatch fails — callers (the
104
108
  * test-runner) then surface "no test command available".
105
109
  */
106
- export declare function buildTestCommandViaDispatch(framework: TestFramework, scope: 'all' | 'convention' | 'graph' | 'impact', files: string[], coverage: boolean, baseDir: string, bail: boolean): Promise<string[] | null>;
110
+ export declare function buildTestCommandViaDispatch(framework: TestFramework, scope: TestScope, files: string[], coverage: boolean, baseDir: string, bail: boolean, nativeTarget?: NativeTestTarget): Promise<string[] | null>;
107
111
  /**
108
112
  * Parse test output via the LanguageBackend dispatch path. Calls
109
113
  * `backend.parseTestOutput` for the directory's resolved backend and
@@ -147,7 +151,8 @@ export declare function isLanguageSpecificTestFile(basename: string): boolean;
147
151
  * Exported for unit tests.
148
152
  */
149
153
  export declare function getTestFilesFromConvention(sourceFiles: string[], workingDir?: string): string[];
150
- export declare function runTests(framework: TestFramework, scope: 'all' | 'convention' | 'graph' | 'impact', files: string[], coverage: boolean, timeout_ms: number, cwd: string, bail: boolean): Promise<TestResult>;
154
+ declare function formatNativeHistoryTestFile(target: NativeTestTarget, historyPath: string): string;
155
+ export declare function runTests(framework: TestFramework, scope: TestScope, files: string[], coverage: boolean, timeout_ms: number, cwd: string, bail: boolean, nativeTarget?: NativeTestTarget): Promise<TestResult>;
151
156
  declare function selectHistoryForAnalysis(history: ReturnType<typeof getAllHistory>): TestRunRecord[];
152
157
  export declare const test_runner: ReturnType<typeof tool>;
153
158
  export declare const _internals: {
@@ -157,6 +162,9 @@ export declare const _internals: {
157
162
  existsSync: typeof fs.existsSync;
158
163
  readdirSync: typeof fs.readdirSync;
159
164
  readFileSync: typeof fs.readFileSync;
165
+ bunSpawn: typeof bunSpawn;
166
+ buildNativeTargetCommand: typeof buildNativeTargetCommand;
167
+ formatNativeHistoryTestFile: typeof formatNativeHistoryTestFile;
160
168
  selectHistoryForAnalysis: typeof selectHistoryForAnalysis;
161
169
  AGGREGATE_TEST_NAME: typeof AGGREGATE_TEST_NAME;
162
170
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.140.5",
3
+ "version": "7.141.0",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",