@mindexec/cli 0.2.438 → 0.2.440
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/codex-runtime.js +3 -78
- package/package.json +1 -1
- package/scripts/remote-registry-follower-smoke.mjs +4 -3
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +24 -31
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-interactions.js +2 -1
- package/wwwroot/index.html +1 -1
- package/wwwroot/service-worker-assets.js +4 -4
- package/wwwroot/service-worker.js +1 -1
package/codex-runtime.js
CHANGED
|
@@ -37,7 +37,6 @@ const DEFAULT_TIMEOUT_MS = 8 * 60 * 1000;
|
|
|
37
37
|
const MAX_LOG_CHARS = 4000;
|
|
38
38
|
const MAX_EVENT_LOG = 120;
|
|
39
39
|
const TEMP_DIR = '.ai/codex';
|
|
40
|
-
const CODEX_CONFIG_PATH = path.join(os.homedir(), '.codex', 'config.toml');
|
|
41
40
|
const CODEX_SOURCE_HOME = path.join(os.homedir(), '.codex');
|
|
42
41
|
const CODEX_RUNTIME_HOME_ENV = 'MINDEXEC_CODEX_HOME';
|
|
43
42
|
const DEFAULT_CODEX_RUNTIME_HOME = path.join(os.homedir(), '.mindexec', 'codex-runtime');
|
|
@@ -95,69 +94,6 @@ function normalizeProviderKind(value) {
|
|
|
95
94
|
return '';
|
|
96
95
|
}
|
|
97
96
|
|
|
98
|
-
function isEnabledEnv(value) {
|
|
99
|
-
return /^(1|true|yes|on)$/i.test(String(value || '').trim());
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function unquoteTomlKey(value) {
|
|
103
|
-
const text = String(value || '').trim();
|
|
104
|
-
if (text.length >= 2 && ((text.startsWith('"') && text.endsWith('"')) || (text.startsWith("'") && text.endsWith("'")))) {
|
|
105
|
-
return text.slice(1, -1).replace(/\\(["\\])/g, '$1').trim();
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return text;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function readConfiguredMcpServerNames() {
|
|
112
|
-
if (isEnabledEnv(process.env.MINDEXEC_CODEX_INHERIT_MCP)) {
|
|
113
|
-
return [];
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const names = new Set();
|
|
117
|
-
try {
|
|
118
|
-
const content = readFileSync(CODEX_CONFIG_PATH, 'utf8');
|
|
119
|
-
for (const rawLine of content.split(/\r?\n/)) {
|
|
120
|
-
const line = rawLine.trim();
|
|
121
|
-
const match = line.match(/^\[mcp_servers\.((?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|[^\]\s]+))\]$/);
|
|
122
|
-
if (!match) {
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const name = unquoteTomlKey(match[1]);
|
|
127
|
-
if (/^[A-Za-z0-9_-]+$/.test(name)) {
|
|
128
|
-
names.add(name);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
} catch {
|
|
132
|
-
// Missing Codex config is fine; SDK auth still reports its own error if login is required.
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
for (const name of String(process.env.MINDEXEC_CODEX_DISABLED_MCP_SERVERS || 'cloudflare,supabase')
|
|
136
|
-
.split(',')
|
|
137
|
-
.map(item => item.trim())
|
|
138
|
-
.filter(Boolean)) {
|
|
139
|
-
if (/^[A-Za-z0-9_-]+$/.test(name)) {
|
|
140
|
-
names.add(name);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return Array.from(names).sort();
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function buildCodexSdkConfigOverrides() {
|
|
148
|
-
const mcpServerNames = readConfiguredMcpServerNames();
|
|
149
|
-
if (mcpServerNames.length === 0) {
|
|
150
|
-
return {};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const mcpServers = {};
|
|
154
|
-
for (const name of mcpServerNames) {
|
|
155
|
-
mcpServers[name] = { enabled: false };
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return { mcp_servers: mcpServers };
|
|
159
|
-
}
|
|
160
|
-
|
|
161
97
|
function resolveCodexRuntimeHome() {
|
|
162
98
|
const configured = String(process.env[CODEX_RUNTIME_HOME_ENV] || '').trim();
|
|
163
99
|
return path.resolve(configured || DEFAULT_CODEX_RUNTIME_HOME);
|
|
@@ -222,12 +158,6 @@ function buildCodexChildEnv() {
|
|
|
222
158
|
return env;
|
|
223
159
|
}
|
|
224
160
|
|
|
225
|
-
function appendCodexIsolationConfigArgs(args) {
|
|
226
|
-
for (const name of readConfiguredMcpServerNames()) {
|
|
227
|
-
args.push('--config', `mcp_servers.${name}.enabled=false`);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
161
|
function normalizeReasoningEffort(value) {
|
|
232
162
|
const normalized = String(value || '').trim().toLowerCase();
|
|
233
163
|
return ['minimal', 'low', 'medium', 'high', 'xhigh'].includes(normalized)
|
|
@@ -636,8 +566,7 @@ export function createCodexRuntime(options) {
|
|
|
636
566
|
const sdk = await loadCodexSdk();
|
|
637
567
|
await ensureCodexRuntimeHome();
|
|
638
568
|
const codex = new sdk.Codex({
|
|
639
|
-
env: buildCodexChildEnv()
|
|
640
|
-
config: buildCodexSdkConfigOverrides()
|
|
569
|
+
env: buildCodexChildEnv()
|
|
641
570
|
});
|
|
642
571
|
const thread = codex.startThread(threadOptions);
|
|
643
572
|
const localThreadId = `local_${crypto.randomUUID()}`;
|
|
@@ -702,8 +631,7 @@ export function createCodexRuntime(options) {
|
|
|
702
631
|
const sdk = await loadCodexSdk();
|
|
703
632
|
await ensureCodexRuntimeHome();
|
|
704
633
|
const codex = new sdk.Codex({
|
|
705
|
-
env: buildCodexChildEnv()
|
|
706
|
-
config: buildCodexSdkConfigOverrides()
|
|
634
|
+
env: buildCodexChildEnv()
|
|
707
635
|
});
|
|
708
636
|
const officialId = requestedThreadId && !requestedThreadId.startsWith('local_')
|
|
709
637
|
? requestedThreadId
|
|
@@ -860,8 +788,6 @@ export function createCodexRuntime(options) {
|
|
|
860
788
|
'--config',
|
|
861
789
|
`model_reasoning_effort=${threadOptions.modelReasoningEffort}`
|
|
862
790
|
];
|
|
863
|
-
appendCodexIsolationConfigArgs(args);
|
|
864
|
-
|
|
865
791
|
if (threadOptions.model) {
|
|
866
792
|
args.push('-m', threadOptions.model);
|
|
867
793
|
}
|
|
@@ -1019,8 +945,7 @@ export function createCodexRuntime(options) {
|
|
|
1019
945
|
const sdk = await loadCodexSdk();
|
|
1020
946
|
await ensureCodexRuntimeHome();
|
|
1021
947
|
const codex = new sdk.Codex({
|
|
1022
|
-
env: buildCodexChildEnv()
|
|
1023
|
-
config: buildCodexSdkConfigOverrides()
|
|
948
|
+
env: buildCodexChildEnv()
|
|
1024
949
|
});
|
|
1025
950
|
const thread = codex.resumeThread(threadId, threadOptions);
|
|
1026
951
|
threads.set(threadId, {
|
package/package.json
CHANGED
|
@@ -106,12 +106,13 @@ function startFakeSupabase(getTarget, setTarget = null) {
|
|
|
106
106
|
req.on('end', () => resolve(body));
|
|
107
107
|
});
|
|
108
108
|
const parsed = new URL(req.url || '/', 'http://127.0.0.1');
|
|
109
|
-
|
|
109
|
+
const requestRecord = {
|
|
110
110
|
method: req.method,
|
|
111
111
|
pathname: parsed.pathname,
|
|
112
112
|
authorization: req.headers.authorization || '',
|
|
113
113
|
apikey: req.headers.apikey || ''
|
|
114
|
-
}
|
|
114
|
+
};
|
|
115
|
+
requests.push(requestRecord);
|
|
115
116
|
|
|
116
117
|
if (req.method === 'GET' && parsed.pathname === '/rest/v1/remote_host_targets') {
|
|
117
118
|
assertRegistryAuth(req);
|
|
@@ -127,7 +128,7 @@ function startFakeSupabase(getTarget, setTarget = null) {
|
|
|
127
128
|
if (req.method === 'POST' && parsed.pathname === '/rest/v1/rpc/set_remote_host_target') {
|
|
128
129
|
assertRegistryAuth(req);
|
|
129
130
|
const body = JSON.parse(await readBody() || '{}');
|
|
130
|
-
|
|
131
|
+
requestRecord.body = body;
|
|
131
132
|
const now = Date.now();
|
|
132
133
|
const existing = getTarget();
|
|
133
134
|
const sameLease = existing
|
|
@@ -24229,7 +24229,6 @@
|
|
|
24229
24229
|
return css3dObj;
|
|
24230
24230
|
}
|
|
24231
24231
|
|
|
24232
|
-
// ▼▼▼ [New] Sync CSS3D DOM content from model ▼▼▼
|
|
24233
24232
|
function syncCss3dContent(nodeModel, cssObject) {
|
|
24234
24233
|
if (!nodeModel || !cssObject || !cssObject.element) return;
|
|
24235
24234
|
const nodeId = String(getNodeId(nodeModel) || '').trim();
|
|
@@ -24319,9 +24318,7 @@
|
|
|
24319
24318
|
restoreCss3dMediaOverlayState(nodeModel, cssObject);
|
|
24320
24319
|
}
|
|
24321
24320
|
let content = getPreferredCssMediaSource(nodeModel, contentTypeLower)
|
|
24322
|
-
|| nodeModel.response
|
|
24323
|
-
|| nodeModel.Response
|
|
24324
|
-
|| '';
|
|
24321
|
+
|| (nodeModel.response ?? nodeModel.Response ?? '');
|
|
24325
24322
|
const isLoading = !!(nodeModel.isLoading ?? nodeModel.IsLoading ?? false);
|
|
24326
24323
|
let hasContent = !!(`${content}`.trim());
|
|
24327
24324
|
const displayPrompt = getDisplayPrompt(nodeModel, prompt);
|
|
@@ -24594,23 +24591,26 @@
|
|
|
24594
24591
|
return;
|
|
24595
24592
|
}
|
|
24596
24593
|
|
|
24597
|
-
|
|
24598
|
-
|
|
24594
|
+
const responseEl = el.querySelector(`[id^="node-response-"]`) || el.querySelector('.node-response');
|
|
24595
|
+
const ownsInlineEditor = !!responseEl?.querySelector('.note-textarea, [id^="node-textarea-"]');
|
|
24596
|
+
const hasPendingMarkdownContent = Object.prototype.hasOwnProperty.call(cssObject.userData, 'pendingMarkdownContent');
|
|
24597
|
+
if (!ownsInlineEditor && hasPendingMarkdownContent) {
|
|
24598
|
+
content = String(cssObject.userData.pendingMarkdownContent ?? '');
|
|
24599
|
+
hasContent = !!content.trim();
|
|
24600
|
+
delete cssObject.userData.pendingMarkdownContent;
|
|
24601
|
+
}
|
|
24599
24602
|
const textarea = el.querySelector('textarea');
|
|
24600
|
-
if (!content && textarea?.value) {
|
|
24603
|
+
if (!ownsInlineEditor && !content && textarea?.value) {
|
|
24601
24604
|
content = textarea.value;
|
|
24602
24605
|
hasContent = !!(`${content}`.trim());
|
|
24603
24606
|
}
|
|
24604
|
-
|
|
24605
|
-
|
|
24606
|
-
|
|
24607
|
-
|
|
24608
|
-
|
|
24609
|
-
|
|
24610
|
-
// 3. Handle Markdown/Text Output
|
|
24611
|
-
const responseEl = el.querySelector(`[id^="node-response-"]`) || el.querySelector('.node-response');
|
|
24607
|
+
|
|
24608
|
+
if (!ownsInlineEditor && textarea && content && textarea.value !== content) {
|
|
24609
|
+
textarea.value = content;
|
|
24610
|
+
}
|
|
24611
|
+
|
|
24612
24612
|
const existingResponseSource = String(responseEl?.dataset?.src || '');
|
|
24613
|
-
if (!content && existingResponseSource) {
|
|
24613
|
+
if (!ownsInlineEditor && !hasPendingMarkdownContent && !content && existingResponseSource) {
|
|
24614
24614
|
content = existingResponseSource;
|
|
24615
24615
|
hasContent = !!(`${content}`.trim());
|
|
24616
24616
|
}
|
|
@@ -24619,7 +24619,9 @@
|
|
|
24619
24619
|
const isCodeNode = contentTypeLower === 'code';
|
|
24620
24620
|
const isCsvTableNode = contentTypeLower === CSV_TABLE_CONTENT_TYPE;
|
|
24621
24621
|
|
|
24622
|
-
if (
|
|
24622
|
+
if (ownsInlineEditor) {
|
|
24623
|
+
cssObject.userData.pendingMarkdownContent = content;
|
|
24624
|
+
} else if (isCsvTableNode) {
|
|
24623
24625
|
if (!responseEl.classList.contains('csv-table-scroll')) {
|
|
24624
24626
|
responseEl.className = 'node-response csv-table-scroll';
|
|
24625
24627
|
}
|
|
@@ -24629,13 +24631,13 @@
|
|
|
24629
24631
|
} else if (isCodeNode) {
|
|
24630
24632
|
renderCodeBodyContent(responseEl, content);
|
|
24631
24633
|
} else {
|
|
24632
|
-
|
|
24633
|
-
|
|
24634
|
-
|
|
24635
|
-
// Preserve existing server-rendered HTML on first sync (avoid style shifts)
|
|
24634
|
+
const lastContent = cssObject.userData.lastMarkdownContent;
|
|
24635
|
+
|
|
24636
24636
|
if (lastContent === undefined && responseEl.innerHTML && content && existingResponseSource === content) {
|
|
24637
|
+
delete cssObject.userData.pendingMarkdownContent;
|
|
24637
24638
|
cssObject.userData.lastMarkdownContent = content;
|
|
24638
24639
|
} else if (lastContent !== content) {
|
|
24640
|
+
delete cssObject.userData.pendingMarkdownContent;
|
|
24639
24641
|
const cachedHtml = getCachedMarkdownHtml(nodeModel, content);
|
|
24640
24642
|
if (cachedHtml) {
|
|
24641
24643
|
if (responseEl.innerHTML !== cachedHtml) {
|
|
@@ -24662,22 +24664,13 @@
|
|
|
24662
24664
|
bindInlineEditableNodeCanvasNavigation(inlineEditableRoot, nodeModel, `${contentTypeLower}-inline-editable`);
|
|
24663
24665
|
}
|
|
24664
24666
|
|
|
24665
|
-
// Hide loading indicator if present
|
|
24666
24667
|
const loadingEl = el.querySelector(`[id^="node-loading-"]`);
|
|
24667
24668
|
if (loadingEl) {
|
|
24668
24669
|
renderNodeLoadingRow(loadingEl, nodeModel, contentTypeLower, isLoading, hasContent);
|
|
24669
24670
|
}
|
|
24670
24671
|
renderBusinessAutomationChrome(resolveBusinessAutomationChromeContainer(el), nodeModel);
|
|
24671
24672
|
}
|
|
24672
|
-
//
|
|
24673
|
-
|
|
24674
|
-
// ▲▲▲ [New] ▲▲▲
|
|
24675
|
-
|
|
24676
|
-
// ▼▼▼ [New] Update loop for synchronizing CSS3D positions with WebGL ▼▼▼
|
|
24677
|
-
// Fixes the issue where CSS3D nodes "jump" or detach from their Glow/WebGL counterparts
|
|
24678
|
-
// during deep zoom or camera movement due to matrix calculation timing discrepancies.
|
|
24679
|
-
|
|
24680
|
-
// Reusable objects for Frustum Culling (avoid GC)
|
|
24673
|
+
// Reusable objects for Frustum Culling (avoid GC)
|
|
24681
24674
|
const _frustum = new THREE.Frustum();
|
|
24682
24675
|
const _projScreenMatrix = new THREE.Matrix4();
|
|
24683
24676
|
const _worldPos = new THREE.Vector3();
|
|
@@ -7628,6 +7628,7 @@ window.MindMapInteractions = (function () {
|
|
|
7628
7628
|
if (didChange) {
|
|
7629
7629
|
// Update Model
|
|
7630
7630
|
nodeEntry.model.response = newValue;
|
|
7631
|
+
delete nodeEntry.cssObject?.userData?.pendingMarkdownContent;
|
|
7631
7632
|
// Update Texture Cache Info
|
|
7632
7633
|
if (window.MindMapNodes && window.MindMapNodes.pendingNodeUpdates) {
|
|
7633
7634
|
window.MindMapNodes.pendingNodeUpdates.set(nodeEntry.model.id, {
|
|
@@ -7676,7 +7677,7 @@ window.MindMapInteractions = (function () {
|
|
|
7676
7677
|
responseDiv.style.scrollbarGutter = previousResponseStyle.scrollbarGutter;
|
|
7677
7678
|
// ▲▲▲ [Fix] ▲▲▲
|
|
7678
7679
|
|
|
7679
|
-
if (
|
|
7680
|
+
if (window.MindMapCss3DManager?.syncCss3dContent) {
|
|
7680
7681
|
window.MindMapCss3DManager.syncCss3dContent(nodeEntry.model, nodeEntry.cssObject);
|
|
7681
7682
|
}
|
|
7682
7683
|
|
package/wwwroot/index.html
CHANGED
|
@@ -579,7 +579,7 @@
|
|
|
579
579
|
}
|
|
580
580
|
|
|
581
581
|
const base = '_content/MindExecution.Shared/js/';
|
|
582
|
-
const scriptVersion = '20260713-
|
|
582
|
+
const scriptVersion = '20260713-ai-stream-edit-ownership-v934';
|
|
583
583
|
const scriptUrl = (script) => `${base}${script}?v=${scriptVersion}`;
|
|
584
584
|
console.log(`[Script Loader] Shared JS version: ${scriptVersion}`);
|
|
585
585
|
const criticalScripts = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
self.assetsManifest = {
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "+woAgnNO",
|
|
3
3
|
"assets": [
|
|
4
4
|
{
|
|
5
5
|
"hash": "sha256-+CSYMcqLNTsq3VnH11jgYyOCCdxvHzL74CBmo4sCmMU=",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"url": "_content/MindExecution.Shared/js/mind-map-core.js.backup"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
|
-
"hash": "sha256-
|
|
89
|
+
"hash": "sha256-dr+i09+KUFx+ddmSDqilzqJD0FDVye29n24Xz+YY1WU=",
|
|
90
90
|
"url": "_content/MindExecution.Shared/js/mind-map-css3d-manager.js"
|
|
91
91
|
},
|
|
92
92
|
{
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"url": "_content/MindExecution.Shared/js/mind-map-glow-shader.js"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
|
-
"hash": "sha256-
|
|
109
|
+
"hash": "sha256-60RAF7CCMbT2wOwnimQMNs2QsRzd8m2Vnx9yeMLDG98=",
|
|
110
110
|
"url": "_content/MindExecution.Shared/js/mind-map-interactions.js"
|
|
111
111
|
},
|
|
112
112
|
{
|
|
@@ -830,7 +830,7 @@
|
|
|
830
830
|
"url": "icon-512.png"
|
|
831
831
|
},
|
|
832
832
|
{
|
|
833
|
-
"hash": "sha256-
|
|
833
|
+
"hash": "sha256-x3feeu4dFQjGF+xdT9qMumctaRJpYoC1pplyiuUZyzU=",
|
|
834
834
|
"url": "index.html"
|
|
835
835
|
},
|
|
836
836
|
{
|