makecoder-c-bin-win-x64 5.0.22 → 5.0.23
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/win32-x64/README-0dd89854.md.zst +0 -0
- package/dist/win32-x64/README-5c323083.md.zst +0 -0
- package/dist/win32-x64/README-6c6581c4.md.zst +0 -0
- package/dist/win32-x64/README-855767df.md.zst +0 -0
- package/dist/win32-x64/README-b64d803b.md.zst +0 -0
- package/dist/win32-x64/{README-7qvwkvrv.md → README-np7rgj5p.md} +4 -3
- package/dist/win32-x64/{README-30faskmk.md → README-zxp6jh6w.md} +5 -4
- package/dist/win32-x64/SCHEMA-941f8839.md.zst +0 -0
- package/dist/win32-x64/SKILL-2caf8bec.md.zst +0 -0
- package/dist/win32-x64/SKILL-af503b63.md.zst +0 -0
- package/dist/win32-x64/SKILL-f1be9d20.md.zst +0 -0
- package/dist/win32-x64/build-eval-6e5c47ac.md.zst +0 -0
- package/dist/win32-x64/causes-1ad72f34.md.zst +0 -0
- package/dist/win32-x64/cc-cell-segmenter-shim.js +172 -0
- package/dist/win32-x64/cc-runtime.json +7 -9
- package/dist/win32-x64/cc.js +4 -20650
- package/dist/win32-x64/claude-code.d.ts-c417f0db.txt.zst +0 -0
- package/dist/win32-x64/cost-optimization-c264eeaf.md.zst +0 -0
- package/dist/win32-x64/error-codes-7b23548b.md.zst +0 -0
- package/dist/win32-x64/eval-hillclimb-550c7e7d.md.zst +0 -0
- package/dist/win32-x64/examples-688bfcda.md.zst +0 -0
- package/dist/win32-x64/kit-modules.js-2f2fb0e9.txt.zst +0 -0
- package/dist/win32-x64/managed-agents-api-reference-9ddcd923.md.zst +0 -0
- package/dist/win32-x64/managed-agents-events-6cfafc52.md.zst +0 -0
- package/dist/win32-x64/managed-agents-multiagent-2764d8d2.md.zst +0 -0
- package/dist/win32-x64/model-migration-10795ea2.md.zst +0 -0
- package/dist/win32-x64/models-31cc5a0b.md.zst +0 -0
- package/dist/win32-x64/platform-availability-f5b4883f.md.zst +0 -0
- package/dist/win32-x64/preserved-thinking-migration-c0ec355d.md.zst +0 -0
- package/dist/win32-x64/prompt-audit-ac006f8d.md.zst +0 -0
- package/dist/win32-x64/prompt-caching-a0dab962.md.zst +0 -0
- package/dist/win32-x64/reference-7675843e.md.zst +0 -0
- package/dist/win32-x64/sdk-upgrade-fbb98867.md.zst +0 -0
- package/dist/win32-x64/src/plugins/functionHooks/hooks-worker/hooks-worker.js +2 -2
- package/dist/win32-x64/streaming-d5e3e0d3.md.zst +0 -0
- package/dist/win32-x64/streaming-f9fd65d0.md.zst +0 -0
- package/dist/win32-x64/template.html-80565be8.txt.zst +0 -0
- package/dist/win32-x64/tool-use-cb3780ea.md.zst +0 -0
- package/dist/win32-x64/tool-use-concepts-e27a6e66.md.zst +0 -0
- package/dist/win32-x64/tool-use-e666014c.md.zst +0 -0
- package/package.json +2 -2
- package/dist/win32-x64/README-1adba0d5.md.zst +0 -0
- package/dist/win32-x64/README-1f2a0xpy.md +0 -189
- package/dist/win32-x64/README-4543fbfe.md.zst +0 -0
- package/dist/win32-x64/README-92b24d43.md.zst +0 -0
- package/dist/win32-x64/README-de1712b4.md.zst +0 -0
- package/dist/win32-x64/SCHEMA-80d41355.md.zst +0 -0
- package/dist/win32-x64/SKILL-236405d8.md.zst +0 -0
- package/dist/win32-x64/SKILL-4y8qrz28.md +0 -46
- package/dist/win32-x64/SKILL-8cc0kwr3.md +0 -39
- package/dist/win32-x64/SKILL-8cfe9276.md.zst +0 -0
- package/dist/win32-x64/SKILL-ddae9619.md.zst +0 -0
- package/dist/win32-x64/build-eval-61524bd7.md.zst +0 -0
- package/dist/win32-x64/causes-0ecc624a.md.zst +0 -0
- package/dist/win32-x64/claude-code.d.ts-8ef3f324.txt.zst +0 -0
- package/dist/win32-x64/cost-optimization-be31affb.md.zst +0 -0
- package/dist/win32-x64/error-codes-8c86764e.md.zst +0 -0
- package/dist/win32-x64/eval-hillclimb-a60c233b.md.zst +0 -0
- package/dist/win32-x64/examples-de855a6e.md.zst +0 -0
- package/dist/win32-x64/kit-modules.js-fb86f7cc.txt.zst +0 -0
- package/dist/win32-x64/managed-agents-api-reference-224d46c3.md.zst +0 -0
- package/dist/win32-x64/managed-agents-events-9d0c0001.md.zst +0 -0
- package/dist/win32-x64/managed-agents-multiagent-e4608060.md.zst +0 -0
- package/dist/win32-x64/model-migration-0afe82a9.md.zst +0 -0
- package/dist/win32-x64/models-7ff954b0.md.zst +0 -0
- package/dist/win32-x64/payload.template.html.asset +0 -0
- package/dist/win32-x64/platform-availability-689576e2.md.zst +0 -0
- package/dist/win32-x64/preserved-thinking-migration-8e8eab6d.md.zst +0 -0
- package/dist/win32-x64/prompt-audit-c2ef092d.md.zst +0 -0
- package/dist/win32-x64/prompt-caching-686b210d.md.zst +0 -0
- package/dist/win32-x64/reference-2ccb611f.md.zst +0 -0
- package/dist/win32-x64/sdk-upgrade-c0be7fcf.md.zst +0 -0
- package/dist/win32-x64/seed-canvas.mjs-a5d6a8af.txt.zst +0 -0
- package/dist/win32-x64/streaming-8f3e55cc.md.zst +0 -0
- package/dist/win32-x64/streaming-bfeb4a2b.md.zst +0 -0
- package/dist/win32-x64/template.html-0add8491.txt.zst +0 -0
- package/dist/win32-x64/template.html-cfc12d66.txt.zst +0 -0
- package/dist/win32-x64/tool-use-642f1e38.md.zst +0 -0
- package/dist/win32-x64/tool-use-8d92ddf6.md.zst +0 -0
- package/dist/win32-x64/tool-use-concepts-04417f2f.md.zst +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -44,8 +44,9 @@ end
|
|
|
44
44
|
|
|
45
45
|
## Extended Thinking
|
|
46
46
|
|
|
47
|
-
> **Fable 5, {{OPUS_NAME}}, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is removed on Fable 5, {{OPUS_NAME}}, Opus 4.8, and 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
|
|
48
|
-
> **{{OPUS_NAME}}:** thinking is on
|
|
47
|
+
> **Fable 5, {{OPUS_NAME}}, {{PREV_OPUS_NAME}}, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is removed on Fable 5, {{OPUS_NAME}}, {{PREV_OPUS_NAME}}, Opus 4.8, and 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
|
|
48
|
+
> **{{OPUS_NAME}}:** thinking is always on - omit `thinking` (or send `{ type: "adaptive" }`, which is equivalent); `{ type: "disabled" }` returns a 400 at every effort, as does a thinking budget. Control depth with `output_config.effort` instead - the default is `medium` on this model, where {{PREV_OPUS_NAME}} defaults to `high`.
|
|
49
|
+
> **{{PREV_OPUS_NAME}}:** thinking is on by default - omitting `thinking:` runs adaptive (`{ type: "adaptive" }` is equivalent), unlike Opus 4.8/4.7 where omitting it meant no thinking. `{ type: "disabled" }` is accepted only at effort `high` or lower; pairing it with `xhigh`/`max` returns a 400.
|
|
49
50
|
> **Older models:** Use `thinking: { type: "enabled", budget_tokens: N }` (must be < `max_tokens`, min 1024).
|
|
50
51
|
|
|
51
52
|
```ruby
|
|
@@ -98,7 +99,7 @@ if message.stop_reason == :refusal && message.stop_details
|
|
|
98
99
|
end
|
|
99
100
|
```
|
|
100
101
|
|
|
101
|
-
**Refusal fallbacks ({{FABLE_NAME}}) - opt in by default.** Fallbacks are opt-in: without them a refused request simply stops. New `{{FABLE_ID}}` code should include the server-side `fallbacks` parameter (beta header `server-side-fallback-2026-06-01`, `fallbacks: [{model: "
|
|
102
|
+
**Refusal fallbacks ({{FABLE_NAME}}) - opt in by default.** Fallbacks are opt-in: without them a refused request simply stops. New `{{FABLE_ID}}` code should include the server-side `fallbacks` parameter (beta header `server-side-fallback-2026-06-01`, `fallbacks: [{model: "claude-opus-4-8"}]` on the beta messages call) by default. The exact Ruby binding (and the client-side middleware for providers without server-side support) is not documented here - WebFetch the Ruby SDK repo's `examples/` from `shared/live-sources.md`; full semantics in `shared/model-migration.md` -> Migrating to {{FABLE_NAME}} -> `refusal` stop reason.
|
|
102
103
|
|
|
103
104
|
---
|
|
104
105
|
|
|
@@ -99,7 +99,7 @@ use Anthropic\Messages\ThinkingBlock;
|
|
|
99
99
|
$message = $client->messages->create(
|
|
100
100
|
model: '{{OPUS_ID}}',
|
|
101
101
|
maxTokens: 16000,
|
|
102
|
-
thinking: ['type' => 'adaptive', 'display' => 'summarized'], // display opt-in: default is omitted (empty thinking text) on Fable 5/5.1, Mythos 5/5.1, {{OPUS_NAME}}, Opus 4.8/4.7, and {{
|
|
102
|
+
thinking: ['type' => 'adaptive', 'display' => 'summarized'], // display opt-in: default is omitted (empty thinking text) on Fable 5/5.1, Mythos 5/5.1, {{OPUS_NAME}}, {{PREV_OPUS_NAME}}, Opus 4.8/4.7, {{SONNET_NAME}}, and {{PREV_SONNET_NAME}}
|
|
103
103
|
messages: [
|
|
104
104
|
['role' => 'user', 'content' => 'Solve: 27 * 453'],
|
|
105
105
|
],
|
|
@@ -117,8 +117,9 @@ foreach ($message->content as $block) {
|
|
|
117
117
|
}
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
> **Fable 5, {{OPUS_NAME}}, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking (above). `['type' => 'enabled', 'budgetTokens' => N]` is removed on Fable 5, {{OPUS_NAME}}, Opus 4.8, and 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
|
|
121
|
-
> **{{OPUS_NAME}}:** thinking is on
|
|
120
|
+
> **Fable 5, {{OPUS_NAME}}, {{PREV_OPUS_NAME}}, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking (above). `['type' => 'enabled', 'budgetTokens' => N]` is removed on Fable 5, {{OPUS_NAME}}, {{PREV_OPUS_NAME}}, Opus 4.8, and 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
|
|
121
|
+
> **{{OPUS_NAME}}:** thinking is always on - omit `thinking:` (or send `['type' => 'adaptive']`, which is equivalent); `['type' => 'disabled']` returns a 400 at every effort, as does a thinking budget. Control depth with the `outputConfig:` effort instead - the default is `medium` on this model, where {{PREV_OPUS_NAME}} defaults to `high`.
|
|
122
|
+
> **{{PREV_OPUS_NAME}}:** thinking is on by default - omitting `thinking:` runs adaptive (`['type' => 'adaptive']` is equivalent), unlike Opus 4.8/4.7 where omitting it meant no thinking. `['type' => 'disabled']` is accepted only at effort `high` or lower; pairing it with `xhigh`/`max` returns a 400.
|
|
122
123
|
> **Older models:** Use `thinking: ['type' => 'enabled', 'budgetTokens' => N]` (budget must be < `maxTokens`, min 1024).
|
|
123
124
|
|
|
124
125
|
`$block->type === 'thinking'` also works for the check; `instanceof` narrows for PHPStan.
|
|
@@ -157,7 +158,7 @@ if ($message->stopReason === 'refusal' && $message->stopDetails !== null) {
|
|
|
157
158
|
}
|
|
158
159
|
```
|
|
159
160
|
|
|
160
|
-
**Refusal fallbacks ({{FABLE_NAME}}) - opt in by default.** Fallbacks are opt-in: without them a refused request simply stops. New `{{FABLE_ID}}` code should include the server-side `fallbacks` parameter (beta header `server-side-fallback-2026-06-01`, fallback model `
|
|
161
|
+
**Refusal fallbacks ({{FABLE_NAME}}) - opt in by default.** Fallbacks are opt-in: without them a refused request simply stops. New `{{FABLE_ID}}` code should include the server-side `fallbacks` parameter (beta header `server-side-fallback-2026-06-01`, fallback model `claude-opus-4-8`, on the beta messages call) by default. The exact PHP binding (and the client-side middleware for providers without server-side support) is not documented here - WebFetch the PHP SDK repo's `examples/` from `shared/live-sources.md`; full semantics in `shared/model-migration.md` -> Migrating to {{FABLE_NAME}} -> `refusal` stop reason.
|
|
161
162
|
|
|
162
163
|
---
|
|
163
164
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// Public Bun adapter for Claude Code 2.1.284.
|
|
2
|
+
const SEG = new Intl.Segmenter(undefined, { granularity: 'grapheme' });
|
|
3
|
+
const BIDI = require('bidi-js')();
|
|
4
|
+
class CellSegmenter {
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
this.opts=opts;
|
|
7
|
+
this.graphemes=[' ',''];
|
|
8
|
+
for(let i=33;i<=126;i++) this.graphemes.push(String.fromCharCode(i));
|
|
9
|
+
this.graphemes.push('\t','\ufffd');
|
|
10
|
+
this.charIds=new Map(this.graphemes.map((v,i)=>[v,i]));
|
|
11
|
+
this.sgrKeys=[''];this.sgrCloseKeys=[''];this.uris=[''];
|
|
12
|
+
this.styleIds=new Map([['',0]]);this.uriIds=new Map([['',0]]);
|
|
13
|
+
this.styles=[];
|
|
14
|
+
}
|
|
15
|
+
internChar(ch){let id=this.charIds.get(ch);if(id===undefined){id=this.graphemes.length;this.graphemes.push(ch);this.charIds.set(ch,id)}return id}
|
|
16
|
+
internStyle(codes){const key=codes.map(x=>x.open).join('\0');let id=this.styleIds.get(key);if(id===undefined){id=this.sgrKeys.length;this.sgrKeys.push(key);this.sgrCloseKeys.push(codes.map(x=>x.close).join('\0'));this.styleIds.set(key,id)}return id}
|
|
17
|
+
applySgr(codes,params){
|
|
18
|
+
const close={1:22,2:22,3:23,4:24,5:25,7:27,8:28,9:29,21:24};
|
|
19
|
+
const group={1:'intensity',2:'intensity',3:'italic',4:'underline',21:'underline',5:'blink',7:'inverse',8:'conceal',9:'strike'};
|
|
20
|
+
const resets={22:['intensity'],23:['italic'],24:['underline'],25:['blink'],27:['inverse'],28:['conceal'],29:['strike'],39:['foreground'],49:['background']};
|
|
21
|
+
const result=[...codes];
|
|
22
|
+
const clear=name=>{const i=result.findIndex(x=>x.group===name);if(i>=0)result.splice(i,1)};
|
|
23
|
+
const add=(name,open,end)=>{const i=result.findIndex(x=>x.group===name);if(i>=0&&result[i].open===open)return;if(i>=0)result.splice(i,1);result.push({group:name,open,close:end})};
|
|
24
|
+
const nums=params===''?[0]:params.split(';').map(x=>x===''?0:Number(x));
|
|
25
|
+
for(let i=0;i<nums.length;i++){
|
|
26
|
+
const n=nums[i];
|
|
27
|
+
if(n===0){result.length=0;continue}
|
|
28
|
+
if(resets[n]){for(const name of resets[n])clear(name);continue}
|
|
29
|
+
if(n===38||n===48){
|
|
30
|
+
const mode=nums[i+1],length=mode===5?1:mode===2?3:0;
|
|
31
|
+
if(length&&i+1+length<nums.length){
|
|
32
|
+
const values=nums.slice(i,i+2+length);i+=1+length;
|
|
33
|
+
if(values.every(Number.isInteger)&&values.slice(2).every(x=>x>=0&&x<=255))add(n===38?'foreground':'background',`\x1b[${values.join(';')}m`,n===38?'\x1b[39m':'\x1b[49m');
|
|
34
|
+
}
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if(close[n]){add(group[n],`\x1b[${n}m`,`\x1b[${close[n]}m`);continue}
|
|
38
|
+
if(n>=30&&n<=37||n>=90&&n<=97)add('foreground',`\x1b[${n}m`,'\x1b[39m');
|
|
39
|
+
else if(n>=40&&n<=47||n>=100&&n<=107)add('background',`\x1b[${n}m`,'\x1b[49m');
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
internUri(uri){let id=this.uriIds.get(uri);if(id===undefined){id=this.uris.length;this.uris.push(uri);this.uriIds.set(uri,id)}return id}
|
|
44
|
+
segment(text,cells,runs,reorder){
|
|
45
|
+
let visible='', codes=[],uri='',state=[];
|
|
46
|
+
for(let i=0;i<text.length;){
|
|
47
|
+
if(text[i]==='\x1b'){
|
|
48
|
+
const rest=text.slice(i);let m=/^\x1b\[[0-9;]*m/.exec(rest);
|
|
49
|
+
if(m){codes=this.applySgr(codes,m[0].slice(2,-1));i+=m[0].length;continue}
|
|
50
|
+
m=/^\x1b\]8;[^;]*;([^\x07\x1b]*)(?:\x07|\x1b\\)/.exec(rest);
|
|
51
|
+
if(m){uri=m[1];this.internUri(uri);i+=m[0].length;continue}
|
|
52
|
+
m=/^\x1b(?:\[[0-?]*[ -/]*[@-~]|\][^\x07]*(?:\x07|\x1b\\))/.exec(rest);
|
|
53
|
+
if(m){i+=m[0].length;continue}
|
|
54
|
+
i++;continue;
|
|
55
|
+
}
|
|
56
|
+
const codePoint=text.codePointAt(i),raw=String.fromCodePoint(codePoint);
|
|
57
|
+
const replaced=(this.opts.substitute||[]).some(([lo,hi])=>codePoint>=lo&&codePoint<=hi)?'\ufffd':raw;
|
|
58
|
+
state.push({codes,uri});
|
|
59
|
+
if(replaced.length===2)state.push({codes,uri});
|
|
60
|
+
visible+=replaced;i+=raw.length;
|
|
61
|
+
}
|
|
62
|
+
let tokens=[];let run=-1,lastStyle=-1,lastUri=-1;
|
|
63
|
+
for(const part of SEG.segment(visible)){
|
|
64
|
+
const ch=part.segment;
|
|
65
|
+
if(ch==='\n'||ch==='\r'||ch==='\r\n')continue;
|
|
66
|
+
// A joiner chain after a zero-width space is folded into that cluster;
|
|
67
|
+
// style changes on the joiners are not interned as separate entries.
|
|
68
|
+
if(/^\u200d+$/u.test(ch)){
|
|
69
|
+
let prior=part.index-1;
|
|
70
|
+
while(prior>=0&&visible[prior]==='\u200d')prior--;
|
|
71
|
+
if(prior>=0&&visible[prior]==='\u200b')continue;
|
|
72
|
+
}
|
|
73
|
+
const width=ch==='\t'?256:Math.min(2,Math.max(0,Bun.stringWidth(ch,{ambiguousIsNarrow:true})));
|
|
74
|
+
const {codes:style,uri:link}=state[part.index]||{codes:[],uri:''};
|
|
75
|
+
const sid=this.internStyle(style),uid=this.internUri(link);
|
|
76
|
+
if(width===0)continue;
|
|
77
|
+
if(sid!==lastStyle||uid!==lastUri){run++;lastStyle=sid;lastUri=uid}
|
|
78
|
+
runs[2*run]=sid;runs[2*run+1]=uid;
|
|
79
|
+
tokens.push({ch:this.internChar(ch),width,sid,uid,run,start:part.index,end:part.index+ch.length});
|
|
80
|
+
}
|
|
81
|
+
if(reorder&&tokens.length&&/[\u0590-\u08ff\ufb1d-\ufdff\ufe70-\ufeff]/u.test(visible)){
|
|
82
|
+
// The native object resolves one visual run across line breaks. bidi-js
|
|
83
|
+
// treats LF/CR as paragraph separators, so retain their positions as
|
|
84
|
+
// neutral spaces while calculating the order of the visible cells.
|
|
85
|
+
const bidiText=visible.replace(/[\n\r]/g,' ');
|
|
86
|
+
const strong=bidiText.match(/[\p{L}]/u)?.[0];
|
|
87
|
+
const direction=strong&&/[\u0590-\u08ff\ufb1d-\ufdff\ufe70-\ufeff]/u.test(strong)?'rtl':'ltr';
|
|
88
|
+
const levels=BIDI.getEmbeddingLevels(bidiText,direction);
|
|
89
|
+
const rtl=/[\u0590-\u08ff\ufb1d-\ufdff\ufe70-\ufeff]/u;
|
|
90
|
+
const nearestStrong=(at,step)=>{
|
|
91
|
+
for(let i=at;i>=0&&i<bidiText.length;i+=step){
|
|
92
|
+
if(/\p{L}/u.test(bidiText[i]))return rtl.test(bidiText[i])?'rtl':'ltr';
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
};
|
|
96
|
+
for(let i=0;i<bidiText.length;i++){
|
|
97
|
+
const cp=bidiText.codePointAt(i);
|
|
98
|
+
if(cp<=0xffff)continue;
|
|
99
|
+
const emoji=String.fromCodePoint(cp);
|
|
100
|
+
const left=nearestStrong(i-1,-1),right=nearestStrong(i+2,1);
|
|
101
|
+
const rtlContext=left&&left===right?left==='rtl':direction==='rtl';
|
|
102
|
+
if(rtlContext){
|
|
103
|
+
levels.levels[i]=1;levels.levels[i+1]=1;
|
|
104
|
+
if(direction==='rtl'&&/\p{Extended_Pictographic}/u.test(emoji)){
|
|
105
|
+
let before=i-1,after=i+2;
|
|
106
|
+
while(before>=0&&bidiText[before]==='\u200d')levels.levels[before--]=1;
|
|
107
|
+
while(after<bidiText.length&&bidiText[after]==='\u200d')levels.levels[after++]=1;
|
|
108
|
+
for(let j=before;j>=0&&bidiText[j]===' ';j--)levels.levels[j]=1;
|
|
109
|
+
for(let j=after;j<bidiText.length&&bidiText[j]===' ';j++)levels.levels[j]=1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
i++;
|
|
113
|
+
}
|
|
114
|
+
// Reordering is by rendered grapheme. A joiner attached to the prior
|
|
115
|
+
// grapheme inherits its level instead of forming a separate bidi cell.
|
|
116
|
+
for(let i=1;i<bidiText.length;i++){
|
|
117
|
+
if(bidiText[i]==='\u200d')levels.levels[i]=levels.levels[i-1];
|
|
118
|
+
}
|
|
119
|
+
// bidi-js resets trailing formatting characters during reordering.
|
|
120
|
+
// ZWJ belongs to the preceding grapheme here, so preserve its level.
|
|
121
|
+
const indices=BIDI.getReorderedIndices(bidiText.replace(/\u200d/g,'\ufffc'),levels);
|
|
122
|
+
const chars=new Int32Array(visible.length).fill(-1);
|
|
123
|
+
for(let i=0;i<tokens.length;i++)for(let k=tokens[i].start;k<tokens[i].end;k++)chars[k]=i;
|
|
124
|
+
const seen=new Set(),ordered=[];
|
|
125
|
+
for(const pos of indices){const i=chars[pos];if(i>=0&&!seen.has(i)){ordered.push(tokens[i]);seen.add(i)}}
|
|
126
|
+
tokens=ordered;
|
|
127
|
+
}
|
|
128
|
+
if(tokens.length*2>cells.length||tokens.length*2>runs.length)return -tokens.length;
|
|
129
|
+
for(let k=0;k<tokens.length;k++){let {ch,width,run}=tokens[k];cells[2*k]=ch;cells[2*k+1]=width|(run<<10)}
|
|
130
|
+
return tokens.length;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
setCell(dst,screenWidth,x,y,ch,word){
|
|
134
|
+
const maxRows=Math.floor(dst.length/(2*screenWidth));
|
|
135
|
+
if(x<0||y<0||x>=screenWidth||y>=maxRows)return 65535*1048576+x+1;
|
|
136
|
+
const ix=2*(y*screenWidth+x),prev=dst[ix+1]&this.opts.screen.widthMask,next=word&this.opts.screen.widthMask;
|
|
137
|
+
let start=x,end=x+1;
|
|
138
|
+
if(prev===1&&next!==1&&x+1<screenWidth){const tail=ix+2;if((dst[tail+1]&3)===2){dst[tail]=this.opts.screen.emptyCharIndex;dst[tail+1]=this.opts.screen.emptyWord;end=x+2}}
|
|
139
|
+
if(prev===2&&next!==2&&x>0){const head=ix-2;if((dst[head+1]&3)===1){dst[head]=this.opts.screen.emptyCharIndex;dst[head+1]=this.opts.screen.emptyWord;start=x-1}}
|
|
140
|
+
dst[ix]=ch;dst[ix+1]=word;
|
|
141
|
+
if(next===1&&x+1<screenWidth){
|
|
142
|
+
if((dst[ix+3]&3)===1&&x+2<screenWidth&&(dst[ix+5]&3)===2){dst[ix+4]=this.opts.screen.emptyCharIndex;dst[ix+5]=this.opts.screen.emptyWord;end=x+3}
|
|
143
|
+
dst[ix+2]=this.opts.screen.spacerCharIndex;dst[ix+3]=this.opts.screen.spacerTail;end=Math.max(end,x+2)
|
|
144
|
+
}
|
|
145
|
+
return end*68719476736+start*1048576+(x+1);
|
|
146
|
+
}
|
|
147
|
+
paint(dst,screenWidth,x,y,cells,count,_unused,charIndices,runWords){
|
|
148
|
+
let start=screenWidth,end=-1,col=x;
|
|
149
|
+
for(let k=0;k<count;k++){
|
|
150
|
+
let charId=cells[2*k],packed=cells[2*k+1],width=packed&255;
|
|
151
|
+
if(packed&256){
|
|
152
|
+
if(col>=screenWidth)continue;
|
|
153
|
+
const next=Math.min(screenWidth,(Math.floor(col/this.opts.screen.tabWidth)+1)*this.opts.screen.tabWidth);
|
|
154
|
+
if(col<screenWidth){start=Math.min(start,col);end=Math.max(end,next);for(let at=col;at<next;at++){const ix=2*(y*screenWidth+at);if(ix>=0&&ix+1<dst.length){dst[ix]=this.opts.screen.emptyCharIndex;dst[ix+1]=this.opts.screen.emptyWord}}}
|
|
155
|
+
col=next;continue;
|
|
156
|
+
}
|
|
157
|
+
if(width<1)continue;
|
|
158
|
+
if(col>=screenWidth){col+=width===2?1:width;continue}
|
|
159
|
+
let actual=width===2&&col===screenWidth-1?3:width;
|
|
160
|
+
const idx=2*(y*screenWidth+col),run=packed>>>10;
|
|
161
|
+
if(idx<0||idx+1>=dst.length)break;
|
|
162
|
+
dst[idx]=actual===3?this.opts.screen.emptyCharIndex:charIndices[charId];
|
|
163
|
+
dst[idx+1]=actual===3?3:(runWords[run]||0)|(actual===2?1:0);
|
|
164
|
+
start=Math.min(start,col);end=Math.max(end,col+1);
|
|
165
|
+
if(actual===2&&col+1<screenWidth){dst[idx+2]=this.opts.screen.spacerCharIndex;dst[idx+3]=this.opts.screen.spacerTail;end=Math.max(end,col+2)}
|
|
166
|
+
col+=actual===3?1:width;
|
|
167
|
+
}
|
|
168
|
+
if(end<0)return 65535*1048576+col;
|
|
169
|
+
return end*68719476736+start*1048576+col;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (typeof Bun.ant?.CellSegmenter !== "function") Bun.ant={...Bun.ant,CellSegmenter};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"mode": "
|
|
3
|
+
"mode": "public-shim",
|
|
4
4
|
"platform": "win32-x64",
|
|
5
|
-
"version": "2.1.
|
|
5
|
+
"version": "2.1.284",
|
|
6
6
|
"package": "@anthropic-ai/claude-code-win32-x64",
|
|
7
|
-
"source": "https://registry.npmjs.org/@anthropic-ai/claude-code-win32-x64/-/claude-code-win32-x64-2.1.
|
|
8
|
-
"upstreamSha256": "
|
|
9
|
-
"bundleSha256": "
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"loaderSha256": "198c1c248891c402dfe32ba6ac0561c48bb2e05beea95cd31f2764b40678576b",
|
|
13
|
-
"signing": "unsigned"
|
|
7
|
+
"source": "https://registry.npmjs.org/@anthropic-ai/claude-code-win32-x64/-/claude-code-win32-x64-2.1.284.tgz",
|
|
8
|
+
"upstreamSha256": "0416631e846f743110da5282409776fa1313e65f33a588aae066eaf8db0fda7d",
|
|
9
|
+
"bundleSha256": "45b13340e60ec1d2ccf5924aa69a6ca697bda025ff6ed77219a318fc641152dd",
|
|
10
|
+
"shimFile": "cc-cell-segmenter-shim.js",
|
|
11
|
+
"shimSha256": "221fba1f6924184db77d33aa7b30342b978f1f2fa07e9f763cddf014e75affbf"
|
|
14
12
|
}
|