@xortex/xcode 3.0.5 → 3.1.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.
- package/INSTALLATION.md +285 -0
- package/QUICKSTART.md +151 -0
- package/SYSTEM_PROMPT.md +583 -0
- package/SYSTEM_PROMPT_EXTRACTED.md +1 -0
- package/Untitled +1 -0
- package/bin/xcode +69 -120
- package/bootstrap/state.ts +1758 -0
- package/bun-bundle-hook.js +38 -17
- package/bun-bundle-shim.ts +12 -0
- package/bun.lock +645 -0
- package/context/QueuedMessageContext.tsx +63 -0
- package/context/fpsMetrics.tsx +30 -0
- package/context/mailbox.tsx +38 -0
- package/context/modalContext.tsx +58 -0
- package/context/notifications.tsx +240 -0
- package/context/overlayContext.tsx +151 -0
- package/context/promptOverlayContext.tsx +125 -0
- package/context/stats.tsx +220 -0
- package/context/voice.tsx +88 -0
- package/coordinator/coordinatorMode.ts +369 -0
- package/costHook.ts +22 -0
- package/dialogLaunchers.tsx +133 -0
- package/entrypoints/cli.tsx +1 -1
- package/extract_prompt.ts +304 -0
- package/ink.ts +85 -0
- package/install.sh +221 -0
- package/interactiveHelpers.tsx +366 -0
- package/macro.ts +1 -1
- package/memdir/findRelevantMemories.ts +141 -0
- package/memdir/memdir.ts +511 -0
- package/memdir/memoryAge.ts +53 -0
- package/memdir/memoryScan.ts +94 -0
- package/memdir/memoryTypes.ts +271 -0
- package/memdir/paths.ts +291 -0
- package/memdir/teamMemPaths.ts +292 -0
- package/memdir/teamMemPrompts.ts +100 -0
- package/moreright/useMoreRight.tsx +26 -0
- package/native-ts/color-diff/index.ts +999 -0
- package/native-ts/file-index/index.ts +370 -0
- package/native-ts/yoga-layout/enums.ts +134 -0
- package/native-ts/yoga-layout/index.ts +2578 -0
- package/outputStyles/loadOutputStylesDir.ts +98 -0
- package/package.json +5 -42
- package/plugins/builtinPlugins.ts +159 -0
- package/plugins/bundled/index.ts +23 -0
- package/projectOnboardingState.ts +83 -0
- package/public/claude-files.png +0 -0
- package/public/leak-tweet.png +0 -0
- package/query/config.ts +46 -0
- package/query/deps.ts +40 -0
- package/query/stopHooks.ts +470 -0
- package/query/tokenBudget.ts +93 -0
- package/replLauncher.tsx +27 -0
- package/schemas/hooks.ts +222 -0
- package/screens/Doctor.tsx +575 -0
- package/screens/REPL.tsx +7107 -0
- package/screens/ResumeConversation.tsx +399 -0
- package/scripts/postinstall.js +90 -0
- package/server/createDirectConnectSession.ts +88 -0
- package/server/directConnectManager.ts +213 -0
- package/server/types.ts +57 -0
- package/setup.ts +477 -0
- package/stub_types.sh +13 -0
- package/tasks.ts +39 -0
- package/tools.ts +396 -0
- package/tsconfig.json +16 -0
- package/upstreamproxy/relay.ts +455 -0
- package/upstreamproxy/upstreamproxy.ts +285 -0
- package/vim/motions.ts +82 -0
- package/vim/operators.ts +556 -0
- package/vim/textObjects.ts +186 -0
- package/vim/transitions.ts +490 -0
- package/vim/types.ts +199 -0
- package/voice/voiceModeEnabled.ts +54 -0
- package/utils/bunBundleCompat.ts +0 -44
package/bun-bundle-hook.js
CHANGED
|
@@ -1,25 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Node.js require hook to shim bun:bundle
|
|
3
|
-
*
|
|
2
|
+
* Node.js require hook to shim 'bun:bundle' for tsx/Node.js compatibility.
|
|
3
|
+
*
|
|
4
|
+
* Strategy:
|
|
5
|
+
* 1. Intercept Module._resolveFilename so 'bun:bundle' resolves to a
|
|
6
|
+
* sentinel path (not a real file) instead of throwing MODULE_NOT_FOUND.
|
|
7
|
+
* 2. Pre-populate Module._cache with the shim exports under that sentinel
|
|
8
|
+
* path, so Module._load finds it in cache and never tries to read a file.
|
|
9
|
+
*
|
|
10
|
+
* This works even when tsx wraps _resolveFilename after this hook is installed,
|
|
11
|
+
* because tsx calls the original _resolveFilename as a fallback.
|
|
12
|
+
*
|
|
13
|
+
* Loaded via --require before tsx.
|
|
4
14
|
*/
|
|
15
|
+
if (!global.__bunBundleHookInstalled) {
|
|
16
|
+
global.__bunBundleHookInstalled = true;
|
|
5
17
|
|
|
6
|
-
const Module = require('module');
|
|
7
|
-
const path = require('path');
|
|
18
|
+
const Module = require('module');
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
// Use a sentinel that looks like an absolute path so tsx / Node accept it.
|
|
21
|
+
// It never needs to exist on disk because we pre-populate the cache.
|
|
22
|
+
const SENTINEL = '\0bun:bundle';
|
|
10
23
|
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// Redirect to our compatibility module
|
|
18
|
-
const compatPath = path.join(projectRoot, 'utils', 'bunBundleCompat.js');
|
|
19
|
-
return compatPath;
|
|
24
|
+
// feature() shim: in Node.js all DCE gates are off by default.
|
|
25
|
+
// Override via CLAUDE_CODE_FEATURE_<NAME>=1 if needed.
|
|
26
|
+
function feature(name) {
|
|
27
|
+
const key = 'CLAUDE_CODE_FEATURE_' + String(name).replace(/[^A-Za-z0-9]/g, '_').toUpperCase();
|
|
28
|
+
const v = process.env[key];
|
|
29
|
+
return v === '1' || v === 'true';
|
|
20
30
|
}
|
|
21
31
|
|
|
22
|
-
|
|
23
|
-
|
|
32
|
+
// Populate the module cache before tsx can intercept _load
|
|
33
|
+
const shimModule = new Module(SENTINEL, null);
|
|
34
|
+
shimModule.id = SENTINEL;
|
|
35
|
+
shimModule.filename = SENTINEL;
|
|
36
|
+
shimModule.loaded = true;
|
|
37
|
+
shimModule.exports = { feature };
|
|
38
|
+
Module._cache[SENTINEL] = shimModule;
|
|
24
39
|
|
|
25
|
-
|
|
40
|
+
// Intercept _resolveFilename so 'bun:bundle' maps to our sentinel
|
|
41
|
+
const originalResolve = Module._resolveFilename;
|
|
42
|
+
Module._resolveFilename = function (request, parent, isMain, options) {
|
|
43
|
+
if (request === 'bun:bundle') return SENTINEL;
|
|
44
|
+
return originalResolve.call(this, request, parent, isMain, options);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shim for Bun's `bun:bundle` module, used in Node.js via tsx path aliases.
|
|
3
|
+
* Provides a no-op `feature()` function since all Bun DCE gates default to false
|
|
4
|
+
* in Node.js (the guarded code blocks have their own Node.js fallbacks).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export function feature(name: string): boolean {
|
|
8
|
+
// Allow opt-in via env var if ever needed
|
|
9
|
+
const key = `CLAUDE_CODE_FEATURE_${String(name).replace(/[^A-Za-z0-9]/g, '_').toUpperCase()}`;
|
|
10
|
+
const v = process.env[key];
|
|
11
|
+
return v === '1' || v === 'true';
|
|
12
|
+
}
|