@axhub/genie 0.1.9 → 0.2.1
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/dist/api-docs.html +6 -6
- package/dist/assets/App-BfaNALgf.js +504 -0
- package/dist/assets/ReviewApp-DIT2yWk-.js +1 -0
- package/dist/assets/{_basePickBy-DF_C8v-X.js → _basePickBy-Dz3NcIVK.js} +1 -1
- package/dist/assets/{_baseUniq-Dl8X6bvw.js → _baseUniq-DON_Sg7x.js} +1 -1
- package/dist/assets/{arc-TwO_Ni8v.js → arc-Y4G80q-l.js} +1 -1
- package/dist/assets/{architectureDiagram-2XIMDMQ5-Dgm9kjQy.js → architectureDiagram-2XIMDMQ5-D_qR4657.js} +1 -1
- package/dist/assets/{blockDiagram-WCTKOSBZ-BhTxXYHE.js → blockDiagram-WCTKOSBZ-NsmAlV5_.js} +1 -1
- package/dist/assets/{c4Diagram-IC4MRINW-D3xrrPyf.js → c4Diagram-IC4MRINW-cbOJM4yr.js} +1 -1
- package/dist/assets/channel-C6KNnXlA.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-Fb3wkGSX.js → chunk-4BX2VUAB-bLBhl74J.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-CQwPJLM_.js → chunk-55IACEB6-D8kNkDUO.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-B3SocdK3.js → chunk-FMBD7UC4-BjR6UbXB.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-4LjhKVWX.js → chunk-JSJVCQXG-luNqWn64.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-B5NX8jxL.js → chunk-KX2RTZJC-CNnKm6dK.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-6puKzw3k.js → chunk-NQ4KR5QH-Cp9gb43u.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CxscPgdC.js → chunk-QZHKN3VN-HlVYo2Oq.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-uBFUeI3B.js → chunk-WL4C6EOR-CjSZoOGO.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-BQlzzlH7.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-BQlzzlH7.js +1 -0
- package/dist/assets/clone-DMxS3qWP.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DlbARPn2.js → cose-bilkent-S5V4N54A-DZWRjeEd.js} +1 -1
- package/dist/assets/{dagre-KLK3FWXG-D5rHdqja.js → dagre-KLK3FWXG-yAzUmqI7.js} +1 -1
- package/dist/assets/{diagram-E7M64L7V-1UmM7jTs.js → diagram-E7M64L7V-CvzlIvDJ.js} +1 -1
- package/dist/assets/{diagram-IFDJBPK2-BiB8xLQb.js → diagram-IFDJBPK2-DFMIJpuM.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-D0DHiPZv.js → diagram-P4PSJMXO-KL-J3gyb.js} +1 -1
- package/dist/assets/{erDiagram-INFDFZHY-CnRJ2Jix.js → erDiagram-INFDFZHY-BXszHbTM.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-CEgo6QRr.js → flowDiagram-PKNHOUZH-Ba43NVp6.js} +1 -1
- package/dist/assets/{ganttDiagram-A5KZAMGK-BIuQLJvD.js → ganttDiagram-A5KZAMGK-uLHfhCrg.js} +1 -1
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-BgM4MazK.js → gitGraphDiagram-K3NZZRJ6-BTEuFaiL.js} +1 -1
- package/dist/assets/{graph-CAfp4sq_.js → graph-h2nuWjx4.js} +1 -1
- package/dist/assets/{highlighted-body-TPN3WLV5-qMmmT5JC.js → highlighted-body-TPN3WLV5-C6BY7XZJ.js} +1 -1
- package/dist/assets/index-2198VgsK.css +1 -0
- package/dist/assets/index-C6Bb2jGF.js +2 -0
- package/dist/assets/{infoDiagram-LFFYTUFH-CWSerJ0x.js → infoDiagram-LFFYTUFH-BOLfvCIq.js} +1 -1
- package/dist/assets/{ishikawaDiagram-PHBUUO56-CzeVsiJ6.js → ishikawaDiagram-PHBUUO56-BRzQ1ee5.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-D_NYt9lf.js → journeyDiagram-4ABVD52K-DXm_VcMy.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-CX7AUuup.js → kanban-definition-K7BYSVSG-D_oyzopl.js} +1 -1
- package/dist/assets/{layout-DSvVDs_y.js → layout-Q8YoR_E1.js} +1 -1
- package/dist/assets/{linear-CVh3kWAl.js → linear-B3qNg7di.js} +1 -1
- package/dist/assets/mermaid-O7DHMXV3-BVZ_4MKo.js +988 -0
- package/dist/assets/{mindmap-definition-YRQLILUH-w_orDc4B.js → mindmap-definition-YRQLILUH-CjulgYdi.js} +1 -1
- package/dist/assets/{pieDiagram-SKSYHLDU-Ddit1h2q.js → pieDiagram-SKSYHLDU-8VzrefxA.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-DVw1s8Ut.js → quadrantDiagram-337W2JSQ-CFh-ijm2.js} +1 -1
- package/dist/assets/{requirementDiagram-Z7DCOOCP-DQPZpp_9.js → requirementDiagram-Z7DCOOCP-BNPlTs5Q.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-CfbFynOx.js → sankeyDiagram-WA2Y5GQK-C5l_hYst.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-BO9n1wra.js → sequenceDiagram-2WXFIKYE-B4a_rQw8.js} +1 -1
- package/dist/assets/{stateDiagram-RAJIS63D-CRL3ceNd.js → stateDiagram-RAJIS63D-Bt4mMmKB.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-6NYMazfq.js +1 -0
- package/dist/assets/{timeline-definition-YZTLITO2-BR7smGEM.js → timeline-definition-YZTLITO2-CLYvSw_R.js} +1 -1
- package/dist/assets/{treemap-KZPCXAKY-DkR8x0Kw.js → treemap-KZPCXAKY-ksND0hZK.js} +1 -1
- package/dist/assets/{vendor-codemirror-D5if-Qdt.js → vendor-codemirror-Dz7_EqNA.js} +2 -2
- package/dist/assets/{vendor-react-CSz7XC90.js → vendor-react-Cpt6D04s.js} +1 -1
- package/dist/assets/{vennDiagram-LZ73GAT5-DS7XpPV_.js → vennDiagram-LZ73GAT5-CaQg4oZK.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-BgjSBvNS.js → xychartDiagram-JWTSCODW-C8dCbTeM.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/manifest.json +1 -1
- package/package.json +4 -3
- package/server/claude-sdk.js +9 -3
- package/server/cli.js +569 -11
- package/server/cli.test.js +76 -0
- package/server/external-agent/auth.js +88 -0
- package/server/external-agent/service.js +1052 -0
- package/server/external-agent/service.test.js +41 -0
- package/server/external-agent/ws.js +1526 -0
- package/server/external-agent/ws.test.js +289 -0
- package/server/gemini-cli.js +2 -1
- package/server/index.js +52 -16
- package/server/openai-codex.js +22 -3
- package/server/opencode-cli.js +3 -2
- package/server/projects.js +104 -19
- package/server/routes/agent.js +59 -566
- package/server/session-core/runtimeState.js +390 -0
- package/server/session-core/runtimeWriter.js +4 -0
- package/server/utils/agentImages.js +253 -0
- package/server/utils/defaultWorkingDirectory.js +34 -0
- package/shared/conversationEvents.js +43 -3
- package/dist/assets/App-IUhj6pRQ.js +0 -546
- package/dist/assets/ReviewApp-B8aNlXpI.js +0 -1
- package/dist/assets/channel-D6xYGBae.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-CAq2xBD7.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-CAq2xBD7.js +0 -1
- package/dist/assets/clone-Ci5Ji0hp.js +0 -1
- package/dist/assets/index-DIJsxqXa.css +0 -1
- package/dist/assets/index-DLN_-tVh.js +0 -2
- package/dist/assets/mermaid-O7DHMXV3-CrPRD2Zy.js +0 -964
- package/dist/assets/stateDiagram-v2-FVOUBMTO-CZOgjDCg.js +0 -1
package/server/projects.js
CHANGED
|
@@ -52,6 +52,89 @@ import path from 'path';
|
|
|
52
52
|
import readline from 'readline';
|
|
53
53
|
import crypto from 'crypto';
|
|
54
54
|
import { parseCodexTokenCountInfo } from './utils/codexTokenUsage.js';
|
|
55
|
+
import { CODEX_MODELS } from '../shared/modelConstants.js';
|
|
56
|
+
|
|
57
|
+
const KNOWN_CODEX_MODELS = new Set(
|
|
58
|
+
(CODEX_MODELS?.OPTIONS || []).map((option) => String(option?.value || '').trim().toLowerCase()).filter(Boolean)
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
function isRecognizedCodexModel(value) {
|
|
62
|
+
if (typeof value !== 'string') return false;
|
|
63
|
+
const normalized = value.trim().toLowerCase();
|
|
64
|
+
if (!normalized || normalized === 'custom' || normalized === 'default') {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (KNOWN_CODEX_MODELS.has(normalized)) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return /^(gpt-\d|o[1345](?:$|[-.])|codex(?:$|[-.]))/i.test(normalized);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function getCodexModelFromPayload(payload) {
|
|
76
|
+
if (!payload || typeof payload !== 'object') {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const candidates = [
|
|
81
|
+
payload.model,
|
|
82
|
+
payload.collaboration_mode?.model
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
for (const candidate of candidates) {
|
|
86
|
+
if (isRecognizedCodexModel(candidate)) {
|
|
87
|
+
return candidate.trim();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function extractVisibleUserMessage(value) {
|
|
95
|
+
const text = String(value || '').trim();
|
|
96
|
+
if (!text) {
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (text.startsWith('# AGENTS.md instructions for ') || text.includes('<environment_context>')) {
|
|
101
|
+
return '';
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (text.startsWith('[DYNAMIC CONTEXT V1]')) {
|
|
105
|
+
const marker = '\n\n[USER MESSAGE]\n';
|
|
106
|
+
const markerIndex = text.indexOf(marker);
|
|
107
|
+
if (markerIndex >= 0) {
|
|
108
|
+
return text.slice(markerIndex + marker.length).trim();
|
|
109
|
+
}
|
|
110
|
+
return '';
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const dynamicContextMatch = text.match(
|
|
114
|
+
/^<dynamic_context(?:\s[^>]*)?>[\s\S]*?<\/dynamic_context>\s*<user_message>\s*([\s\S]*?)\s*<\/user_message>$/i
|
|
115
|
+
);
|
|
116
|
+
if (dynamicContextMatch) {
|
|
117
|
+
return String(dynamicContextMatch[1] || '').trim();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return text;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function isInjectedContextContent(value) {
|
|
124
|
+
const text = String(value || '').trim();
|
|
125
|
+
if (!text) {
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (
|
|
130
|
+
text.startsWith('# AGENTS.md instructions for ') ||
|
|
131
|
+
text.startsWith('[DYNAMIC CONTEXT V1]')
|
|
132
|
+
) {
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return /^<dynamic_context(?:\s|>)/i.test(text) || text.includes('<environment_context>');
|
|
137
|
+
}
|
|
55
138
|
|
|
56
139
|
// Import TaskMaster detection functions
|
|
57
140
|
async function detectTaskMasterFolder(projectPath) {
|
|
@@ -1955,12 +2038,6 @@ async function parseCodexSessionFile(filePath) {
|
|
|
1955
2038
|
crlfDelay: Infinity
|
|
1956
2039
|
});
|
|
1957
2040
|
|
|
1958
|
-
const isUsableCodexModel = (value) => {
|
|
1959
|
-
if (typeof value !== 'string') return false;
|
|
1960
|
-
const normalized = value.trim().toLowerCase();
|
|
1961
|
-
return normalized.length > 0 && normalized !== 'custom' && normalized !== 'default';
|
|
1962
|
-
};
|
|
1963
|
-
|
|
1964
2041
|
let sessionMeta = null;
|
|
1965
2042
|
let lastTimestamp = null;
|
|
1966
2043
|
let lastUserMessage = null;
|
|
@@ -1982,27 +2059,33 @@ async function parseCodexSessionFile(filePath) {
|
|
|
1982
2059
|
sessionMeta = {
|
|
1983
2060
|
id: entry.payload.id,
|
|
1984
2061
|
cwd: entry.payload.cwd,
|
|
1985
|
-
model: entry.payload
|
|
2062
|
+
model: getCodexModelFromPayload(entry.payload),
|
|
1986
2063
|
timestamp: entry.timestamp,
|
|
1987
2064
|
git: entry.payload.git
|
|
1988
2065
|
};
|
|
1989
2066
|
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
lastResolvedModel = entry.payload.model_provider;
|
|
2067
|
+
const sessionMetaModel = getCodexModelFromPayload(entry.payload);
|
|
2068
|
+
if (sessionMetaModel) {
|
|
2069
|
+
lastResolvedModel = sessionMetaModel;
|
|
1994
2070
|
}
|
|
1995
2071
|
}
|
|
1996
2072
|
|
|
1997
|
-
if (entry.type === 'turn_context'
|
|
1998
|
-
|
|
2073
|
+
if (entry.type === 'turn_context') {
|
|
2074
|
+
const turnContextModel = getCodexModelFromPayload(entry.payload);
|
|
2075
|
+
if (turnContextModel) {
|
|
2076
|
+
lastResolvedModel = turnContextModel;
|
|
2077
|
+
}
|
|
1999
2078
|
}
|
|
2000
2079
|
|
|
2001
2080
|
// Count messages and extract user messages for summary
|
|
2002
2081
|
if (entry.type === 'event_msg' && entry.payload?.type === 'user_message') {
|
|
2082
|
+
const visibleUserMessage = extractVisibleUserMessage(entry.payload.message);
|
|
2083
|
+
if (!visibleUserMessage) {
|
|
2084
|
+
continue;
|
|
2085
|
+
}
|
|
2003
2086
|
messageCount++;
|
|
2004
|
-
if (
|
|
2005
|
-
lastUserMessage =
|
|
2087
|
+
if (visibleUserMessage) {
|
|
2088
|
+
lastUserMessage = visibleUserMessage;
|
|
2006
2089
|
}
|
|
2007
2090
|
}
|
|
2008
2091
|
|
|
@@ -2107,20 +2190,22 @@ async function getCodexSessionMessages(sessionId, limit = null, offset = 0) {
|
|
|
2107
2190
|
const content = entry.payload.content;
|
|
2108
2191
|
const role = entry.payload.role || 'assistant';
|
|
2109
2192
|
const textContent = extractText(content);
|
|
2193
|
+
const visibleTextContent = role === 'user'
|
|
2194
|
+
? extractVisibleUserMessage(textContent)
|
|
2195
|
+
: textContent;
|
|
2110
2196
|
|
|
2111
|
-
|
|
2112
|
-
if (textContent?.includes('<environment_context>')) {
|
|
2197
|
+
if (!visibleTextContent) {
|
|
2113
2198
|
continue;
|
|
2114
2199
|
}
|
|
2115
2200
|
|
|
2116
2201
|
// Only add if there's actual content
|
|
2117
|
-
if (
|
|
2202
|
+
if (visibleTextContent?.trim()) {
|
|
2118
2203
|
messages.push({
|
|
2119
2204
|
type: role === 'user' ? 'user' : 'assistant',
|
|
2120
2205
|
timestamp: entry.timestamp,
|
|
2121
2206
|
message: {
|
|
2122
2207
|
role: role,
|
|
2123
|
-
content:
|
|
2208
|
+
content: visibleTextContent
|
|
2124
2209
|
}
|
|
2125
2210
|
});
|
|
2126
2211
|
}
|