@hncode/hncode-sdk 0.8.1 → 0.8.3

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/targets.d.ts +65 -1
  3. package/targets.js +65 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hncode/hncode-sdk",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Runtime helpers and TypeScript types for writing hncode plugins.",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/targets.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // GENERATED by scripts/gen-targets.mjs — do not edit by hand.
2
- // 938 patchable symbols across 92 files.
2
+ // 1002 patchable symbols across 97 files.
3
3
 
4
4
  /** A symbol a plugin may pass to `api.patch(target, handler)`. */
5
5
  export type PatchTarget =
@@ -28,14 +28,19 @@ export type PatchTarget =
28
28
  | "agent.js#Agent.usedTokens"
29
29
  | "agent.js#canSplitAfter"
30
30
  | "agent.js#formatEditDiffForModel"
31
+ | "agent.js#needsThinkingTags"
31
32
  | "agent.js#SYSTEM_PROMPT"
33
+ | "agent.js#THINKING_TAGS_INSTRUCTION"
32
34
  | "animate.js#ANIM_FPS"
33
35
  | "animate.js#bandCharsFor"
36
+ | "animate.js#breatheColour"
34
37
  | "animate.js#crossMs"
35
38
  | "animate.js#cycleMs"
36
39
  | "animate.js#ENTRY_EXIT_CHARS"
37
40
  | "animate.js#FRAME_MS"
38
41
  | "animate.js#framesPerChar"
42
+ | "animate.js#GLINT_LIFT"
43
+ | "animate.js#glintFor"
39
44
  | "animate.js#LIGHT_FRACTION"
40
45
  | "animate.js#lightAt"
41
46
  | "animate.js#lightMargin"
@@ -196,6 +201,7 @@ export type PatchTarget =
196
201
  | "config.js#saveConfig"
197
202
  | "config.js#setConfigBool"
198
203
  | "config.js#setConfigString"
204
+ | "config.js#systemLanguage"
199
205
  | "config.js#tomlPort"
200
206
  | "config.js#upsertModel"
201
207
  | "config.js#usageCost"
@@ -318,9 +324,15 @@ export type PatchTarget =
318
324
  | "hooks.js#runShellHooks"
319
325
  | "i18n.js#catalog"
320
326
  | "i18n.js#DEFAULT_LANG"
327
+ | "i18n.js#getUiLang"
321
328
  | "i18n.js#LANGUAGES"
322
329
  | "i18n.js#MESSAGES"
330
+ | "i18n.js#NOTICE_ZH"
331
+ | "i18n.js#noticeText"
332
+ | "i18n.js#setUiLang"
323
333
  | "i18n.js#t"
334
+ | "i18n.js#tOr"
335
+ | "i18n.js#uiText"
324
336
  | "image-row.js#encodeImageRow"
325
337
  | "image-row.js#IMAGE_MARK"
326
338
  | "image-row.js#imageBytes"
@@ -353,6 +365,10 @@ export type PatchTarget =
353
365
  | "llm.js#toAnthropic"
354
366
  | "llm.js#toOpenAi"
355
367
  | "llm.js#toResponsesInput"
368
+ | "log-file.js#appendLog"
369
+ | "log-file.js#DEFAULT_MAX_BYTES"
370
+ | "log-file.js#forgetLogSize"
371
+ | "log-file.js#rotateIfLarge"
356
372
  | "lsp.js#availableServers"
357
373
  | "lsp.js#changeDocument"
358
374
  | "lsp.js#commandExists"
@@ -376,18 +392,33 @@ export type PatchTarget =
376
392
  | "markdown.js#mathCellHeight"
377
393
  | "markdown.js#mathImageCapable"
378
394
  | "markdown.js#MD_RENDER_VERSION"
395
+ | "markdown.js#onMermaidReady"
379
396
  | "markdown.js#placeTex"
380
397
  | "markdown.js#renderMdIncremental"
381
398
  | "markdown.js#renderMdText"
382
399
  | "markdown.js#renderTable"
383
400
  | "markdown.js#splitBlocks"
384
401
  | "markdown.js#stripMathDelimiters"
402
+ | "mcp-server.js#clientConfig"
403
+ | "mcp-server.js#contentBlocks"
404
+ | "mcp-server.js#createHttpServer"
405
+ | "mcp-server.js#externalName"
406
+ | "mcp-server.js#handleLine"
407
+ | "mcp-server.js#handleRequest"
408
+ | "mcp-server.js#internalName"
409
+ | "mcp-server.js#listen"
410
+ | "mcp-server.js#selectableTools"
411
+ | "mcp-server.js#SERVER_INFO"
412
+ | "mcp-server.js#serveStdio"
413
+ | "mcp-server.js#SUPPORTED_PROTOCOL_VERSIONS"
414
+ | "mcp-server.js#toolListPayload"
385
415
  | "mcp.js#callTool"
386
416
  | "mcp.js#CLIENT_INFO"
387
417
  | "mcp.js#CONNECT_TIMEOUT_MS"
388
418
  | "mcp.js#connectAll"
389
419
  | "mcp.js#connectServer"
390
420
  | "mcp.js#createHttpTransport"
421
+ | "mcp.js#createSseTransport"
391
422
  | "mcp.js#createStdioTransport"
392
423
  | "mcp.js#describeServers"
393
424
  | "mcp.js#disconnectAll"
@@ -397,15 +428,34 @@ export type PatchTarget =
397
428
  | "mcp.js#httpRequest"
398
429
  | "mcp.js#loadMcpConfig"
399
430
  | "mcp.js#mcpToolName"
431
+ | "mcp.js#normaliseServerDef"
432
+ | "mcp.js#openSseStream"
400
433
  | "mcp.js#parseSseForId"
401
434
  | "mcp.js#projectMcpFile"
402
435
  | "mcp.js#PROTOCOL_VERSION"
403
436
  | "mcp.js#request"
404
437
  | "mcp.js#setLiveConnections"
438
+ | "mcp.js#sseRequest"
439
+ | "mcp.js#SUPPORTED_PROTOCOL_VERSIONS"
405
440
  | "mcp.js#toHncodeSpec"
441
+ | "mcp.js#transportOf"
406
442
  | "memory-profile.js#memoryHeadline"
407
443
  | "memory-profile.js#profileMemory"
408
444
  | "memory-profile.js#renderMemoryProfile"
445
+ | "migrate-index.js#INDEX_ENTRY"
446
+ | "migrate-index.js#mapPath"
447
+ | "migrate-index.js#parseIndex"
448
+ | "migrate-index.js#renderIndex"
449
+ | "migrate.js#EXCLUDED"
450
+ | "migrate.js#fmtBytes"
451
+ | "migrate.js#hncodeHome"
452
+ | "migrate.js#MARKER"
453
+ | "migrate.js#planExport"
454
+ | "migrate.js#PORTABLE"
455
+ | "migrate.js#readArchive"
456
+ | "migrate.js#readArchiveManifest"
457
+ | "migrate.js#sizeOf"
458
+ | "migrate.js#writeArchive"
409
459
  | "notebook.js#cellSource"
410
460
  | "notebook.js#checkIndex"
411
461
  | "notebook.js#deleteCell"
@@ -615,11 +665,17 @@ export type PatchTarget =
615
665
  | "session-hub.js#SessionHub.statusChanged"
616
666
  | "session-hub.js#SessionHub.subscribe"
617
667
  | "session-hub.js#SessionHub.syncChat"
668
+ | "session-recover.js#recoverSessionFile"
669
+ | "session-recover.js#recoverSessionText"
670
+ | "session-recover.js#salvageMessages"
671
+ | "session-recover.js#sanitizeToolPairs"
618
672
  | "session-view.js#HEADLESS_VIEW"
619
673
  | "session-view.js#tuiView"
674
+ | "session.js#bumpMessage"
620
675
  | "session.js#clearSaveFailure"
621
676
  | "session.js#convRowFor"
622
677
  | "session.js#deleteSession"
678
+ | "session.js#flushSaves"
623
679
  | "session.js#invalidateSessionCache"
624
680
  | "session.js#lastSaveFailure"
625
681
  | "session.js#latestSession"
@@ -628,6 +684,8 @@ export type PatchTarget =
628
684
  | "session.js#newId"
629
685
  | "session.js#readSessionMeta"
630
686
  | "session.js#saveSession"
687
+ | "session.js#saveSessionNow"
688
+ | "session.js#saveSessionSoon"
631
689
  | "session.js#sessionFile"
632
690
  | "session.js#sessionsDir"
633
691
  | "settings-schema.js#changedSettings"
@@ -783,6 +841,7 @@ export type PatchTarget =
783
841
  | "text.js#stripAnsi"
784
842
  | "text.js#tailChars"
785
843
  | "text.js#visualCol"
844
+ | "text.js#wrapStyled"
786
845
  | "text.js#wrapWords"
787
846
  | "toml.js#parse"
788
847
  | "tool-line.js#formatToolLine"
@@ -833,6 +892,7 @@ export type PatchTarget =
833
892
  | "tui.js#failureReason"
834
893
  | "tui.js#feedArgStream"
835
894
  | "tui.js#findCommand"
895
+ | "tui.js#getUiLang"
836
896
  | "tui.js#highlightCommandName"
837
897
  | "tui.js#highlightMatches"
838
898
  | "tui.js#isFailureResult"
@@ -846,6 +906,7 @@ export type PatchTarget =
846
906
  | "tui.js#mergeRefreshedModelEntry"
847
907
  | "tui.js#messageSignature"
848
908
  | "tui.js#metricsSignature"
909
+ | "tui.js#metricsSignatureIncremental"
849
910
  | "tui.js#paintCellFrame"
850
911
  | "tui.js#pickerFiltered"
851
912
  | "tui.js#PLAN_CLOSE_TAG"
@@ -871,12 +932,15 @@ export type PatchTarget =
871
932
  | "tui.js#scrollFromThumbPos"
872
933
  | "tui.js#setArgCompletionProvider"
873
934
  | "tui.js#setTip"
935
+ | "tui.js#setUiLang"
874
936
  | "tui.js#startTUI"
875
937
  | "tui.js#startupChat"
876
938
  | "tui.js#SWARM_MODE_INSTRUCTION"
877
939
  | "tui.js#tintRange"
878
940
  | "tui.js#TIPS"
879
941
  | "tui.js#tokenize"
942
+ | "tui.js#tr"
943
+ | "tui.js#trTitle"
880
944
  | "tui.js#windowOffset"
881
945
  | "tui.js#writeWindowTitle"
882
946
  | "update.js#AUTO_UPDATE_INTERVAL_MS"
package/targets.js CHANGED
@@ -30,14 +30,19 @@ export const PATCH_TARGETS = [
30
30
  "agent.js#Agent.usedTokens",
31
31
  "agent.js#canSplitAfter",
32
32
  "agent.js#formatEditDiffForModel",
33
+ "agent.js#needsThinkingTags",
33
34
  "agent.js#SYSTEM_PROMPT",
35
+ "agent.js#THINKING_TAGS_INSTRUCTION",
34
36
  "animate.js#ANIM_FPS",
35
37
  "animate.js#bandCharsFor",
38
+ "animate.js#breatheColour",
36
39
  "animate.js#crossMs",
37
40
  "animate.js#cycleMs",
38
41
  "animate.js#ENTRY_EXIT_CHARS",
39
42
  "animate.js#FRAME_MS",
40
43
  "animate.js#framesPerChar",
44
+ "animate.js#GLINT_LIFT",
45
+ "animate.js#glintFor",
41
46
  "animate.js#LIGHT_FRACTION",
42
47
  "animate.js#lightAt",
43
48
  "animate.js#lightMargin",
@@ -198,6 +203,7 @@ export const PATCH_TARGETS = [
198
203
  "config.js#saveConfig",
199
204
  "config.js#setConfigBool",
200
205
  "config.js#setConfigString",
206
+ "config.js#systemLanguage",
201
207
  "config.js#tomlPort",
202
208
  "config.js#upsertModel",
203
209
  "config.js#usageCost",
@@ -320,9 +326,15 @@ export const PATCH_TARGETS = [
320
326
  "hooks.js#runShellHooks",
321
327
  "i18n.js#catalog",
322
328
  "i18n.js#DEFAULT_LANG",
329
+ "i18n.js#getUiLang",
323
330
  "i18n.js#LANGUAGES",
324
331
  "i18n.js#MESSAGES",
332
+ "i18n.js#NOTICE_ZH",
333
+ "i18n.js#noticeText",
334
+ "i18n.js#setUiLang",
325
335
  "i18n.js#t",
336
+ "i18n.js#tOr",
337
+ "i18n.js#uiText",
326
338
  "image-row.js#encodeImageRow",
327
339
  "image-row.js#IMAGE_MARK",
328
340
  "image-row.js#imageBytes",
@@ -355,6 +367,10 @@ export const PATCH_TARGETS = [
355
367
  "llm.js#toAnthropic",
356
368
  "llm.js#toOpenAi",
357
369
  "llm.js#toResponsesInput",
370
+ "log-file.js#appendLog",
371
+ "log-file.js#DEFAULT_MAX_BYTES",
372
+ "log-file.js#forgetLogSize",
373
+ "log-file.js#rotateIfLarge",
358
374
  "lsp.js#availableServers",
359
375
  "lsp.js#changeDocument",
360
376
  "lsp.js#commandExists",
@@ -378,18 +394,33 @@ export const PATCH_TARGETS = [
378
394
  "markdown.js#mathCellHeight",
379
395
  "markdown.js#mathImageCapable",
380
396
  "markdown.js#MD_RENDER_VERSION",
397
+ "markdown.js#onMermaidReady",
381
398
  "markdown.js#placeTex",
382
399
  "markdown.js#renderMdIncremental",
383
400
  "markdown.js#renderMdText",
384
401
  "markdown.js#renderTable",
385
402
  "markdown.js#splitBlocks",
386
403
  "markdown.js#stripMathDelimiters",
404
+ "mcp-server.js#clientConfig",
405
+ "mcp-server.js#contentBlocks",
406
+ "mcp-server.js#createHttpServer",
407
+ "mcp-server.js#externalName",
408
+ "mcp-server.js#handleLine",
409
+ "mcp-server.js#handleRequest",
410
+ "mcp-server.js#internalName",
411
+ "mcp-server.js#listen",
412
+ "mcp-server.js#selectableTools",
413
+ "mcp-server.js#SERVER_INFO",
414
+ "mcp-server.js#serveStdio",
415
+ "mcp-server.js#SUPPORTED_PROTOCOL_VERSIONS",
416
+ "mcp-server.js#toolListPayload",
387
417
  "mcp.js#callTool",
388
418
  "mcp.js#CLIENT_INFO",
389
419
  "mcp.js#CONNECT_TIMEOUT_MS",
390
420
  "mcp.js#connectAll",
391
421
  "mcp.js#connectServer",
392
422
  "mcp.js#createHttpTransport",
423
+ "mcp.js#createSseTransport",
393
424
  "mcp.js#createStdioTransport",
394
425
  "mcp.js#describeServers",
395
426
  "mcp.js#disconnectAll",
@@ -399,15 +430,34 @@ export const PATCH_TARGETS = [
399
430
  "mcp.js#httpRequest",
400
431
  "mcp.js#loadMcpConfig",
401
432
  "mcp.js#mcpToolName",
433
+ "mcp.js#normaliseServerDef",
434
+ "mcp.js#openSseStream",
402
435
  "mcp.js#parseSseForId",
403
436
  "mcp.js#projectMcpFile",
404
437
  "mcp.js#PROTOCOL_VERSION",
405
438
  "mcp.js#request",
406
439
  "mcp.js#setLiveConnections",
440
+ "mcp.js#sseRequest",
441
+ "mcp.js#SUPPORTED_PROTOCOL_VERSIONS",
407
442
  "mcp.js#toHncodeSpec",
443
+ "mcp.js#transportOf",
408
444
  "memory-profile.js#memoryHeadline",
409
445
  "memory-profile.js#profileMemory",
410
446
  "memory-profile.js#renderMemoryProfile",
447
+ "migrate-index.js#INDEX_ENTRY",
448
+ "migrate-index.js#mapPath",
449
+ "migrate-index.js#parseIndex",
450
+ "migrate-index.js#renderIndex",
451
+ "migrate.js#EXCLUDED",
452
+ "migrate.js#fmtBytes",
453
+ "migrate.js#hncodeHome",
454
+ "migrate.js#MARKER",
455
+ "migrate.js#planExport",
456
+ "migrate.js#PORTABLE",
457
+ "migrate.js#readArchive",
458
+ "migrate.js#readArchiveManifest",
459
+ "migrate.js#sizeOf",
460
+ "migrate.js#writeArchive",
411
461
  "notebook.js#cellSource",
412
462
  "notebook.js#checkIndex",
413
463
  "notebook.js#deleteCell",
@@ -617,11 +667,17 @@ export const PATCH_TARGETS = [
617
667
  "session-hub.js#SessionHub.statusChanged",
618
668
  "session-hub.js#SessionHub.subscribe",
619
669
  "session-hub.js#SessionHub.syncChat",
670
+ "session-recover.js#recoverSessionFile",
671
+ "session-recover.js#recoverSessionText",
672
+ "session-recover.js#salvageMessages",
673
+ "session-recover.js#sanitizeToolPairs",
620
674
  "session-view.js#HEADLESS_VIEW",
621
675
  "session-view.js#tuiView",
676
+ "session.js#bumpMessage",
622
677
  "session.js#clearSaveFailure",
623
678
  "session.js#convRowFor",
624
679
  "session.js#deleteSession",
680
+ "session.js#flushSaves",
625
681
  "session.js#invalidateSessionCache",
626
682
  "session.js#lastSaveFailure",
627
683
  "session.js#latestSession",
@@ -630,6 +686,8 @@ export const PATCH_TARGETS = [
630
686
  "session.js#newId",
631
687
  "session.js#readSessionMeta",
632
688
  "session.js#saveSession",
689
+ "session.js#saveSessionNow",
690
+ "session.js#saveSessionSoon",
633
691
  "session.js#sessionFile",
634
692
  "session.js#sessionsDir",
635
693
  "settings-schema.js#changedSettings",
@@ -785,6 +843,7 @@ export const PATCH_TARGETS = [
785
843
  "text.js#stripAnsi",
786
844
  "text.js#tailChars",
787
845
  "text.js#visualCol",
846
+ "text.js#wrapStyled",
788
847
  "text.js#wrapWords",
789
848
  "toml.js#parse",
790
849
  "tool-line.js#formatToolLine",
@@ -835,6 +894,7 @@ export const PATCH_TARGETS = [
835
894
  "tui.js#failureReason",
836
895
  "tui.js#feedArgStream",
837
896
  "tui.js#findCommand",
897
+ "tui.js#getUiLang",
838
898
  "tui.js#highlightCommandName",
839
899
  "tui.js#highlightMatches",
840
900
  "tui.js#isFailureResult",
@@ -848,6 +908,7 @@ export const PATCH_TARGETS = [
848
908
  "tui.js#mergeRefreshedModelEntry",
849
909
  "tui.js#messageSignature",
850
910
  "tui.js#metricsSignature",
911
+ "tui.js#metricsSignatureIncremental",
851
912
  "tui.js#paintCellFrame",
852
913
  "tui.js#pickerFiltered",
853
914
  "tui.js#PLAN_CLOSE_TAG",
@@ -873,12 +934,15 @@ export const PATCH_TARGETS = [
873
934
  "tui.js#scrollFromThumbPos",
874
935
  "tui.js#setArgCompletionProvider",
875
936
  "tui.js#setTip",
937
+ "tui.js#setUiLang",
876
938
  "tui.js#startTUI",
877
939
  "tui.js#startupChat",
878
940
  "tui.js#SWARM_MODE_INSTRUCTION",
879
941
  "tui.js#tintRange",
880
942
  "tui.js#TIPS",
881
943
  "tui.js#tokenize",
944
+ "tui.js#tr",
945
+ "tui.js#trTitle",
882
946
  "tui.js#windowOffset",
883
947
  "tui.js#writeWindowTitle",
884
948
  "update.js#AUTO_UPDATE_INTERVAL_MS",
@@ -951,4 +1015,4 @@ export const PATCH_TARGET_SET = new Set(PATCH_TARGETS);
951
1015
  /** True when `target` names a real, patchable symbol. */
952
1016
  export function isPatchTarget(target) { return PATCH_TARGET_SET.has(String(target)); }
953
1017
 
954
- export const GENERATED_FROM = "hncode src/ (92 files, 938 symbols)";
1018
+ export const GENERATED_FROM = "hncode src/ (97 files, 1002 symbols)";