opencode-matrixx 2.6.10 → 2.6.12

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 (132) hide show
  1. package/README.md +6 -5
  2. package/dist/agents/architect/default.d.ts +1 -1
  3. package/dist/agents/architect/gpt.d.ts +1 -1
  4. package/dist/agents/dynamic-agent-prompt-builder.d.ts +6 -5
  5. package/dist/agents/oracle/plan-template.d.ts +1 -7
  6. package/dist/agents/oracle/system-prompt.d.ts +1 -1
  7. package/dist/cli.js +29 -86
  8. package/dist/config/schema/agent-overrides.d.ts +126 -126
  9. package/dist/config/schema/commands.d.ts +0 -5
  10. package/dist/config/schema/dcp.d.ts +3 -3
  11. package/dist/config/schema/hooks.d.ts +3 -2
  12. package/dist/config/schema/internal/permission.d.ts +8 -8
  13. package/dist/config/schema/knowledge.d.ts +34 -0
  14. package/dist/config/schema/matrixx-config.d.ts +145 -132
  15. package/dist/config/schema/tool-gating.d.ts +9 -0
  16. package/dist/config/schema.d.ts +2 -1
  17. package/dist/create-hooks.d.ts +3 -2
  18. package/dist/features/background-agent/manager.d.ts +19 -0
  19. package/dist/features/bdd/schema.d.ts +5 -5
  20. package/dist/features/builtin-commands/templates/evolution.d.ts +1 -1
  21. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  22. package/dist/features/builtin-commands/types.d.ts +1 -1
  23. package/dist/features/evolution/compressor/index.d.ts +2 -2
  24. package/dist/features/evolution/compressor/interface.d.ts +9 -4
  25. package/dist/features/evolution/compressor/llm.d.ts +14 -4
  26. package/dist/features/evolution/evaluator.d.ts +10 -0
  27. package/dist/features/evolution/pipeline.d.ts +3 -1
  28. package/dist/features/evolution/schema.d.ts +46 -0
  29. package/dist/features/evolution/store/budget-ledger.d.ts +46 -0
  30. package/dist/features/evolution/store/index.d.ts +5 -0
  31. package/dist/features/evolution/store/lifecycle.d.ts +52 -0
  32. package/dist/features/evolution/store/project-identity.d.ts +27 -0
  33. package/dist/features/evolution/store/query.d.ts +23 -0
  34. package/dist/features/evolution/{store.d.ts → store/trace-store.d.ts} +1 -1
  35. package/dist/features/evolution/types.d.ts +34 -1
  36. package/dist/features/evolution/writer-emit.d.ts +17 -0
  37. package/dist/features/evolution/writer-frontmatter.d.ts +23 -0
  38. package/dist/features/evolution/writer-supersede.d.ts +20 -0
  39. package/dist/features/evolution/writer.d.ts +4 -0
  40. package/dist/features/knowledge-hub/index.d.ts +3 -0
  41. package/dist/features/knowledge-hub/loader.d.ts +11 -0
  42. package/dist/features/knowledge-hub/resolver.d.ts +2 -0
  43. package/dist/features/mission-state/constants.d.ts +20 -0
  44. package/dist/features/mission-state/index.d.ts +1 -0
  45. package/dist/features/mission-state/plan-storage.d.ts +32 -6
  46. package/dist/features/mission-state/reconcile.d.ts +75 -0
  47. package/dist/features/mission-state/reconcile.test.d.ts +1 -0
  48. package/dist/features/mission-state/storage.d.ts +26 -0
  49. package/dist/features/mission-state/types.d.ts +6 -0
  50. package/dist/features/plan-contract/appendix.d.ts +14 -0
  51. package/dist/features/plan-contract/constants.d.ts +16 -0
  52. package/dist/features/plan-contract/front-matter.d.ts +34 -0
  53. package/dist/features/plan-contract/index.d.ts +14 -0
  54. package/dist/features/plan-contract/migration.d.ts +36 -0
  55. package/dist/features/plan-contract/schema.d.ts +32 -0
  56. package/dist/features/plan-contract/skeleton.d.ts +5 -0
  57. package/dist/features/plan-contract/types.d.ts +56 -0
  58. package/dist/features/plan-contract/validate.d.ts +9 -0
  59. package/dist/features/session-state/state.d.ts +0 -11
  60. package/dist/hooks/auto-slash-command/executor.d.ts +11 -3
  61. package/dist/hooks/auto-slash-command/hook.d.ts +0 -2
  62. package/dist/hooks/evolution-compressor/host-llm-call.d.ts +17 -0
  63. package/dist/hooks/index.d.ts +3 -2
  64. package/dist/hooks/knowledge-hub-guard/approvals.d.ts +5 -0
  65. package/dist/hooks/knowledge-hub-guard/hook.d.ts +15 -0
  66. package/dist/hooks/knowledge-hub-guard/hook.test.d.ts +1 -0
  67. package/dist/hooks/knowledge-hub-guard/index.d.ts +3 -0
  68. package/dist/hooks/knowledge-hub-injector/hook.d.ts +26 -0
  69. package/dist/hooks/knowledge-hub-injector/hook.test.d.ts +1 -0
  70. package/dist/hooks/knowledge-hub-injector/index.d.ts +2 -0
  71. package/dist/hooks/knowledge-hub-search-nudge/hook.d.ts +16 -0
  72. package/dist/hooks/knowledge-hub-search-nudge/hook.test.d.ts +1 -0
  73. package/dist/hooks/knowledge-hub-search-nudge/index.d.ts +2 -0
  74. package/dist/hooks/plan-persister/index.d.ts +4 -0
  75. package/dist/hooks/plan-persister/task-link.d.ts +31 -0
  76. package/dist/hooks/plan-persister/task-sync.d.ts +39 -0
  77. package/dist/hooks/plan-persister/task-sync.test.d.ts +1 -0
  78. package/dist/hooks/start-work/index.d.ts +1 -0
  79. package/dist/hooks/start-work/plan-filter.d.ts +48 -0
  80. package/dist/hooks/task-continuation-enforcer/constants.d.ts +0 -5
  81. package/dist/index.js +6247 -4111
  82. package/dist/matrixx.schema.json +88 -145
  83. package/dist/plugin/hooks/create-core-hooks.d.ts +3 -2
  84. package/dist/plugin/hooks/create-session-hooks.d.ts +1 -2
  85. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +3 -2
  86. package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -1
  87. package/dist/plugin/tool-gating.d.ts +35 -0
  88. package/dist/shared/dcp-guidance.d.ts +16 -0
  89. package/dist/{tools/dcp-switch-profile/tools.d.ts → shared/dcp-switch-profile.d.ts} +1 -3
  90. package/dist/shared/index.d.ts +1 -0
  91. package/dist/tools/background-task/constants.d.ts +1 -0
  92. package/dist/tools/background-task/create-background-wait-all.d.ts +3 -0
  93. package/dist/tools/background-task/index.d.ts +1 -1
  94. package/dist/tools/background-task/tools.d.ts +1 -0
  95. package/dist/tools/background-task/types.d.ts +3 -0
  96. package/dist/tools/delegate-task/constants.d.ts +6 -0
  97. package/dist/tools/delegate-task/prompt-builder.d.ts +1 -0
  98. package/dist/tools/delegate-task/prompt-builder.tdd.test.d.ts +1 -0
  99. package/dist/tools/delegate-task/tdd-enforcement.test.d.ts +1 -0
  100. package/dist/tools/delegate-task/tools.d.ts +6 -0
  101. package/dist/tools/delegate-task/types.d.ts +1 -0
  102. package/dist/tools/evolution/constants.d.ts +24 -0
  103. package/dist/tools/evolution/index.d.ts +3 -0
  104. package/dist/tools/evolution/query-actions.d.ts +3 -0
  105. package/dist/tools/evolution/query-actions.test.d.ts +1 -0
  106. package/dist/tools/evolution/tools.d.ts +16 -0
  107. package/dist/tools/evolution/tools.test.d.ts +1 -0
  108. package/dist/tools/evolution/types.d.ts +20 -0
  109. package/dist/tools/index.d.ts +2 -1
  110. package/dist/tools/knowledge-hub-confirm/index.d.ts +1 -0
  111. package/dist/tools/knowledge-hub-confirm/tools.d.ts +12 -0
  112. package/dist/tools/knowledge-hub-confirm/tools.test.d.ts +1 -0
  113. package/dist/tools/plan/constants.d.ts +1 -0
  114. package/dist/tools/plan/index.d.ts +1 -0
  115. package/dist/tools/plan/plan-tasks.d.ts +3 -0
  116. package/dist/tools/plan/types.d.ts +10 -0
  117. package/package.json +1 -1
  118. package/dist/config/schema/failure-counter.d.ts +0 -7
  119. package/dist/features/builtin-commands/templates/bdd-backend.d.ts +0 -1
  120. package/dist/features/builtin-commands/templates/bdd-contract.d.ts +0 -1
  121. package/dist/features/builtin-commands/templates/bdd-frontend.d.ts +0 -1
  122. package/dist/features/builtin-commands/templates/bdd-tests.d.ts +0 -1
  123. package/dist/features/builtin-commands/templates/dcp-profile.d.ts +0 -1
  124. package/dist/hooks/failure-counter/counter.d.ts +0 -7
  125. package/dist/hooks/failure-counter/hook.d.ts +0 -18
  126. package/dist/hooks/failure-counter/index.d.ts +0 -3
  127. package/dist/hooks/failure-counter/patterns.d.ts +0 -6
  128. package/dist/hooks/hashline-edit-diff-enhancer/hook.d.ts +0 -28
  129. package/dist/hooks/hashline-edit-diff-enhancer/index.d.ts +0 -1
  130. package/dist/tools/dcp-switch-profile/index.d.ts +0 -1
  131. /package/dist/{hooks/failure-counter/counter.test.d.ts → features/knowledge-hub/loader.test.d.ts} +0 -0
  132. /package/dist/{hooks/failure-counter/patterns.test.d.ts → features/knowledge-hub/resolver.test.d.ts} +0 -0
@@ -0,0 +1,31 @@
1
+ import type { MatrixxConfig } from "../../config/schema";
2
+ import type { MissionState } from "../../features/mission-state/types";
3
+ import type { TaskObject } from "../../tools/task/types";
4
+ export declare function isTerminalTaskStatus(status: string): boolean;
5
+ export interface LinkageOptions {
6
+ directory: string;
7
+ sessionScoped: boolean;
8
+ resolveParent?: (parentID: string) => TaskObject | null;
9
+ }
10
+ export interface LinkageDecision {
11
+ linked: boolean;
12
+ reason: string;
13
+ }
14
+ export declare function isTaskLinkedToMission(task: TaskObject, mission: MissionState, opts: LinkageOptions, depth?: number, seen?: ReadonlySet<string>): LinkageDecision;
15
+ export interface LinkedTodos {
16
+ todos: Array<{
17
+ content: string;
18
+ status: string;
19
+ }>;
20
+ unknown: number;
21
+ skipped: Array<{
22
+ id: string;
23
+ reason: string;
24
+ }>;
25
+ }
26
+ /**
27
+ * Filtered replacement for the old unfiltered union read: strict-parse every
28
+ * task file (null = log + count as unknown, never a vote), drop stale files,
29
+ * and admit only mission-linked tasks.
30
+ */
31
+ export declare function collectLinkedTodos(directory: string, mission: MissionState, config?: Partial<MatrixxConfig>): LinkedTodos;
@@ -0,0 +1,39 @@
1
+ import type { MatrixxConfig } from "../../config/schema";
2
+ import type { MissionState } from "../../features/mission-state/types";
3
+ import type { TaskObject } from "../../tools/task/types";
4
+ import { collectLinkedTodos } from "./task-link";
5
+ export interface FilteredSyncInput {
6
+ directory: string;
7
+ mission: MissionState;
8
+ planPath: string;
9
+ todos: Array<{
10
+ content: string;
11
+ status: string;
12
+ }>;
13
+ actorSessionId: string;
14
+ matchSubject?: string;
15
+ }
16
+ export interface MatchedBox {
17
+ line: string;
18
+ shared: number;
19
+ score: number;
20
+ }
21
+ export interface FilteredSyncResult {
22
+ ok: boolean;
23
+ skippedReason?: string;
24
+ total: number;
25
+ completed: number;
26
+ flaggedVerification: string[];
27
+ matched?: MatchedBox;
28
+ }
29
+ export declare function applyFilteredSync(input: FilteredSyncInput): Promise<FilteredSyncResult>;
30
+ export interface SyncTriggerInput {
31
+ directory: string;
32
+ task: TaskObject;
33
+ config?: Partial<MatrixxConfig>;
34
+ }
35
+ export interface SyncTriggerResult extends FilteredSyncResult {
36
+ linked: boolean;
37
+ }
38
+ export declare function maybeSyncTaskToPlans(input: SyncTriggerInput): Promise<SyncTriggerResult>;
39
+ export { collectLinkedTodos };
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
+ export * from "./plan-filter";
1
2
  export { createStartWorkHook, HOOK_NAME } from "./start-work-hook";
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Staleness-aware plan classification for start-work.
3
+ *
4
+ * Replaces the bare `!getPlanProgress(p).isComplete` predicate: archived
5
+ * plans are excluded, `total==0 needsTriage` plans leave the actionable set,
6
+ * and mtime-stale plans with no linked active tasks are demoted to stale
7
+ * candidates instead of hijacking auto-select.
8
+ */
9
+ import type { MatrixxConfig } from "../../config/schema";
10
+ /** Plans under this segment are archived candidates (see Task 6); never listed. */
11
+ export declare const ARCHIVED_PLAN_SEGMENT = "_archive";
12
+ export declare function isArchivedPlan(planPath: string): boolean;
13
+ /** Age of a plan file in ms since last write (mtime). Null when unstatable. */
14
+ export declare function getPlanAgeMs(planPath: string): number | null;
15
+ /**
16
+ * Stale threshold in ms from plugin config.
17
+ * `tasks.stale_after_hours` (default 24h, legacy `morpheus.tasks.*`).
18
+ */
19
+ export declare function getPlansStaleAfterMs(config?: Partial<MatrixxConfig>): number;
20
+ /** A plan whose file cannot be stat'ed is treated as fresh (not stale). */
21
+ export declare function isPlanStale(planPath: string, staleAfterMs: number): boolean;
22
+ /** Human-readable age, e.g. "3h", "2d". Clamped at zero for clock skew. */
23
+ export declare function formatPlanAge(ageMs: number): string;
24
+ export interface ClassifyPlansOptions {
25
+ staleAfterMs?: number;
26
+ /**
27
+ * True when the plan still has linked active tasks. Defaults to false
28
+ * (stale by mtime alone); the Task 6 reconciler wires the real linkage.
29
+ */
30
+ hasLinkedActiveTasks?: (planPath: string) => boolean;
31
+ }
32
+ export interface ClassifiedPlans {
33
+ /** Fresh incomplete plans — the only auto-select candidates. */
34
+ actionable: string[];
35
+ /** Mtime-stale incomplete plans — shown under a stale-candidate section. */
36
+ staleCandidates: string[];
37
+ /** total==0 plans — shown with a needsTriage tag, never actionable. */
38
+ triage: string[];
39
+ completed: string[];
40
+ }
41
+ /**
42
+ * Split plans into actionable / stale-candidate / triage / completed.
43
+ * Input order (findOraclePlans mtime newest-first) is preserved per bucket.
44
+ */
45
+ export declare function classifyPlans(plans: string[], opts?: ClassifyPlansOptions): ClassifiedPlans;
46
+ export type PlanListTag = "stale" | "needsTriage";
47
+ /** One numbered plan line: progress + mtime age + optional tag. */
48
+ export declare function formatPlanListLine(planPath: string, index: number, tag?: PlanListTag): string;
@@ -1,11 +1,6 @@
1
1
  export declare const HOOK_NAME = "task-continuation-enforcer";
2
2
  export declare const DEFAULT_SKIP_AGENTS: string[];
3
- export declare const EXPLORER_AGENTS: string[];
4
- export declare function hasNonExplorerBgTasks(tasks: Array<{
5
- agent?: string;
6
- }>): boolean;
7
3
  export declare const CONTINUATION_PROMPT: string;
8
- export declare const BOOTSTRAP_PROMPT: string;
9
4
  export declare const COUNTDOWN_SECONDS = 2;
10
5
  export declare const TOAST_DURATION_MS = 900;
11
6
  export declare const COUNTDOWN_GRACE_PERIOD_MS = 500;