@open330/oac 2026.2.5
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 +115 -0
- package/LICENSE +21 -0
- package/README.md +597 -0
- package/dist/budget/index.d.ts +117 -0
- package/dist/budget/index.js +23 -0
- package/dist/budget/index.js.map +1 -0
- package/dist/chunk-4IUL7ECC.js +3152 -0
- package/dist/chunk-4IUL7ECC.js.map +1 -0
- package/dist/chunk-5GAUWC3L.js +469 -0
- package/dist/chunk-5GAUWC3L.js.map +1 -0
- package/dist/chunk-6A37SKAJ.js +58 -0
- package/dist/chunk-6A37SKAJ.js.map +1 -0
- package/dist/chunk-7C7SC4TZ.js +358 -0
- package/dist/chunk-7C7SC4TZ.js.map +1 -0
- package/dist/chunk-CJAJ4MBO.js +475 -0
- package/dist/chunk-CJAJ4MBO.js.map +1 -0
- package/dist/chunk-LQC5DLT7.js +317 -0
- package/dist/chunk-LQC5DLT7.js.map +1 -0
- package/dist/chunk-OTPXGXO7.js +2368 -0
- package/dist/chunk-OTPXGXO7.js.map +1 -0
- package/dist/chunk-QPVNC7S4.js +1833 -0
- package/dist/chunk-QPVNC7S4.js.map +1 -0
- package/dist/cli/cli.d.ts +13 -0
- package/dist/cli/cli.js +16 -0
- package/dist/cli/cli.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +22 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/completion/index.d.ts +91 -0
- package/dist/completion/index.js +587 -0
- package/dist/completion/index.js.map +1 -0
- package/dist/config-DequKoFA.d.ts +1468 -0
- package/dist/core/index.d.ts +64 -0
- package/dist/core/index.js +87 -0
- package/dist/core/index.js.map +1 -0
- package/dist/dashboard/index.d.ts +14 -0
- package/dist/dashboard/index.js +1253 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/discovery/index.d.ts +285 -0
- package/dist/discovery/index.js +50 -0
- package/dist/discovery/index.js.map +1 -0
- package/dist/event-bus-KiuR6e3P.d.ts +91 -0
- package/dist/execution/index.d.ts +215 -0
- package/dist/execution/index.js +27 -0
- package/dist/execution/index.js.map +1 -0
- package/dist/repo/index.d.ts +33 -0
- package/dist/repo/index.js +19 -0
- package/dist/repo/index.js.map +1 -0
- package/dist/tracking/index.d.ts +357 -0
- package/dist/tracking/index.js +15 -0
- package/dist/tracking/index.js.map +1 -0
- package/dist/types-CYCwgojB.d.ts +34 -0
- package/dist/types-Ck7IucqK.d.ts +195 -0
- package/docs/config-reference.md +271 -0
- package/docs/multi-agent-support-technical-spec.md +312 -0
- package/package.json +82 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { E as Epic } from '../types-Ck7IucqK.js';
|
|
2
|
+
|
|
3
|
+
type AgentProviderId = "claude-code" | "codex" | "opencode" | string;
|
|
4
|
+
type TaskSource = "lint" | "todo" | "test-gap" | "dead-code" | "github-issue" | "custom";
|
|
5
|
+
type TaskComplexity = "trivial" | "simple" | "moderate" | "complex";
|
|
6
|
+
type ExecutionMode = "new-pr" | "update-pr" | "direct-commit";
|
|
7
|
+
interface Task {
|
|
8
|
+
id: string;
|
|
9
|
+
source: TaskSource;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
targetFiles: string[];
|
|
13
|
+
priority: number;
|
|
14
|
+
complexity: TaskComplexity;
|
|
15
|
+
executionMode: ExecutionMode;
|
|
16
|
+
linkedIssue?: {
|
|
17
|
+
number: number;
|
|
18
|
+
url: string;
|
|
19
|
+
labels: string[];
|
|
20
|
+
};
|
|
21
|
+
metadata: Record<string, unknown>;
|
|
22
|
+
discoveredAt: string;
|
|
23
|
+
}
|
|
24
|
+
interface TokenEstimate {
|
|
25
|
+
taskId: string;
|
|
26
|
+
providerId: AgentProviderId;
|
|
27
|
+
contextTokens: number;
|
|
28
|
+
promptTokens: number;
|
|
29
|
+
expectedOutputTokens: number;
|
|
30
|
+
totalEstimatedTokens: number;
|
|
31
|
+
confidence: number;
|
|
32
|
+
feasible: boolean;
|
|
33
|
+
estimatedCostUsd?: number;
|
|
34
|
+
}
|
|
35
|
+
interface TokenCounter {
|
|
36
|
+
countTokens(text: string): number;
|
|
37
|
+
readonly invocationOverhead: number;
|
|
38
|
+
readonly maxContextTokens: number;
|
|
39
|
+
/** Free any cached resources (e.g. tiktoken encoders). Optional. */
|
|
40
|
+
reset?(): void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Free cached tiktoken encoders held by the module-level counter singletons.
|
|
44
|
+
* Useful for reclaiming memory in long-lived processes or between test runs.
|
|
45
|
+
*/
|
|
46
|
+
declare function resetCounters(): void;
|
|
47
|
+
declare function estimateTokens(task: Task, provider: AgentProviderId): Promise<TokenEstimate>;
|
|
48
|
+
/**
|
|
49
|
+
* Estimate tokens for an entire epic by summing subtask estimates
|
|
50
|
+
* plus a 20% context overhead for shared module understanding.
|
|
51
|
+
*/
|
|
52
|
+
declare function estimateEpicTokens(epic: Epic, provider: AgentProviderId): Promise<number>;
|
|
53
|
+
|
|
54
|
+
declare function estimateLocChanges(task: Task): number;
|
|
55
|
+
declare function analyzeTaskComplexity(task: Task): TaskComplexity;
|
|
56
|
+
|
|
57
|
+
type DeferredReason = "budget_exceeded" | "low_confidence" | "too_complex";
|
|
58
|
+
interface ExecutionPlan {
|
|
59
|
+
totalBudget: number;
|
|
60
|
+
selectedTasks: Array<{
|
|
61
|
+
task: Task;
|
|
62
|
+
estimate: TokenEstimate;
|
|
63
|
+
cumulativeBudgetUsed: number;
|
|
64
|
+
}>;
|
|
65
|
+
deferredTasks: Array<{
|
|
66
|
+
task: Task;
|
|
67
|
+
estimate: TokenEstimate;
|
|
68
|
+
reason: DeferredReason;
|
|
69
|
+
}>;
|
|
70
|
+
reserveTokens: number;
|
|
71
|
+
remainingTokens: number;
|
|
72
|
+
}
|
|
73
|
+
declare function buildExecutionPlan(tasks: Task[], estimates: Map<string, TokenEstimate>, budget: number): ExecutionPlan;
|
|
74
|
+
interface EpicExecutionPlan {
|
|
75
|
+
totalBudget: number;
|
|
76
|
+
selectedEpics: Array<{
|
|
77
|
+
epic: Epic;
|
|
78
|
+
estimatedTokens: number;
|
|
79
|
+
cumulativeBudgetUsed: number;
|
|
80
|
+
}>;
|
|
81
|
+
deferredEpics: Array<{
|
|
82
|
+
epic: Epic;
|
|
83
|
+
estimatedTokens: number;
|
|
84
|
+
reason: "budget_exceeded";
|
|
85
|
+
}>;
|
|
86
|
+
reserveTokens: number;
|
|
87
|
+
remainingTokens: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Build an execution plan for epics. Unlike task-level planning, epics are
|
|
91
|
+
* sorted purely by priority (not priority/tokens ratio) since they are
|
|
92
|
+
* already coherent units of work.
|
|
93
|
+
*/
|
|
94
|
+
declare function buildEpicExecutionPlan(epics: Epic[], budget: number): EpicExecutionPlan;
|
|
95
|
+
|
|
96
|
+
declare class ClaudeTokenCounter {
|
|
97
|
+
readonly invocationOverhead = 1500;
|
|
98
|
+
readonly maxContextTokens = 200000;
|
|
99
|
+
readonly encoding = "cl100k_base";
|
|
100
|
+
countTokens(text: string): number;
|
|
101
|
+
/** Free the cached tiktoken encoder so it can be re-created on next use. */
|
|
102
|
+
reset(): void;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare const PRIMARY_ENCODING = "o200k_base";
|
|
106
|
+
declare const FALLBACK_ENCODING = "cl100k_base";
|
|
107
|
+
type SupportedCodexEncoding = typeof PRIMARY_ENCODING | typeof FALLBACK_ENCODING;
|
|
108
|
+
declare class CodexTokenCounter {
|
|
109
|
+
readonly invocationOverhead = 1000;
|
|
110
|
+
readonly maxContextTokens = 200000;
|
|
111
|
+
get encoding(): SupportedCodexEncoding;
|
|
112
|
+
countTokens(text: string): number;
|
|
113
|
+
/** Free the cached tiktoken encoder so it can be re-created on next use. */
|
|
114
|
+
reset(): void;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { type AgentProviderId, ClaudeTokenCounter, CodexTokenCounter, type EpicExecutionPlan, type ExecutionMode, type ExecutionPlan, type Task, type TaskComplexity, type TaskSource, type TokenCounter, type TokenEstimate, analyzeTaskComplexity, buildEpicExecutionPlan, buildExecutionPlan, estimateEpicTokens, estimateLocChanges, estimateTokens, resetCounters };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ClaudeTokenCounter,
|
|
3
|
+
CodexTokenCounter,
|
|
4
|
+
analyzeTaskComplexity,
|
|
5
|
+
buildEpicExecutionPlan,
|
|
6
|
+
buildExecutionPlan,
|
|
7
|
+
estimateEpicTokens,
|
|
8
|
+
estimateLocChanges,
|
|
9
|
+
estimateTokens,
|
|
10
|
+
resetCounters
|
|
11
|
+
} from "../chunk-5GAUWC3L.js";
|
|
12
|
+
export {
|
|
13
|
+
ClaudeTokenCounter,
|
|
14
|
+
CodexTokenCounter,
|
|
15
|
+
analyzeTaskComplexity,
|
|
16
|
+
buildEpicExecutionPlan,
|
|
17
|
+
buildExecutionPlan,
|
|
18
|
+
estimateEpicTokens,
|
|
19
|
+
estimateLocChanges,
|
|
20
|
+
estimateTokens,
|
|
21
|
+
resetCounters
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|