@superdoc-dev/sdk 1.0.0-next.69 → 1.0.0-next.71

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/tools.cjs CHANGED
@@ -292,24 +292,31 @@ async function chooseTools(input) {
292
292
  excluded.push({ toolName: tool.toolName, reason: 'force-excluded' });
293
293
  return false;
294
294
  });
295
- for (const forcedToolName of input.policy?.forceInclude ?? []) {
295
+ // Resolve forceInclude tools these are guaranteed slots exempt from budget trimming.
296
+ const forcedToolNames = new Set(input.policy?.forceInclude ?? []);
297
+ const forcedTools = [];
298
+ for (const forcedToolName of forcedToolNames) {
296
299
  const forced = indexByToolName.get(forcedToolName);
297
300
  if (!forced) {
298
301
  excluded.push({ toolName: forcedToolName, reason: 'not-in-profile' });
299
302
  continue;
300
303
  }
301
304
  candidates.push(forced);
305
+ forcedTools.push(forced);
302
306
  }
303
307
  candidates = [...new Map(candidates.map((tool) => [tool.toolName, tool])).values()];
304
- const selected = [];
308
+ // Start with forceInclude tools — they always occupy a slot.
309
+ const selected = [...forcedTools];
310
+ const selectedNames = new Set(selected.map((tool) => tool.toolName));
305
311
  const foundationalIds = new Set(policy.defaults.foundationalOperationIds);
306
- const foundational = candidates.filter((tool) => foundationalIds.has(tool.operationId));
312
+ const foundational = candidates.filter((tool) => foundationalIds.has(tool.operationId) && !selectedNames.has(tool.toolName));
307
313
  for (const tool of foundational) {
308
314
  if (selected.length >= minReadTools || selected.length >= maxTools)
309
315
  break;
310
316
  selected.push(tool);
317
+ selectedNames.add(tool.toolName);
311
318
  }
312
- const remaining = stableSortByPhasePriority(candidates.filter((tool) => !selected.some((entry) => entry.toolName === tool.toolName)), phasePolicy.priority);
319
+ const remaining = stableSortByPhasePriority(candidates.filter((tool) => !selectedNames.has(tool.toolName)), phasePolicy.priority);
313
320
  for (const tool of remaining) {
314
321
  if (selected.length >= maxTools) {
315
322
  excluded.push({ toolName: tool.toolName, reason: 'budget-trim' });
@@ -1 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AC;QACjB,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,WAAW,CAAC;KACtB,CAAC,CAAC;IACH,QAAQ,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtD,aAAa,EAAE;QACb,OAAO,EAAE,WAAW,CAAC;QACrB,KAAK,EAAE,SAAS,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,EAAE,MAAM,CAAC;QACtB,eAAe,EAAE,MAAM,CAAC;QACxB,QAAQ,EAAE,YAAY,CAAC;KACxB,CAAC;CACH,CAAC,CA6HD;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EACxC,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EAClC,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,OAAO,CAAC,CAgBlB"}
package/dist/tools.js CHANGED
@@ -288,24 +288,31 @@ export async function chooseTools(input) {
288
288
  excluded.push({ toolName: tool.toolName, reason: 'force-excluded' });
289
289
  return false;
290
290
  });
291
- for (const forcedToolName of input.policy?.forceInclude ?? []) {
291
+ // Resolve forceInclude tools these are guaranteed slots exempt from budget trimming.
292
+ const forcedToolNames = new Set(input.policy?.forceInclude ?? []);
293
+ const forcedTools = [];
294
+ for (const forcedToolName of forcedToolNames) {
292
295
  const forced = indexByToolName.get(forcedToolName);
293
296
  if (!forced) {
294
297
  excluded.push({ toolName: forcedToolName, reason: 'not-in-profile' });
295
298
  continue;
296
299
  }
297
300
  candidates.push(forced);
301
+ forcedTools.push(forced);
298
302
  }
299
303
  candidates = [...new Map(candidates.map((tool) => [tool.toolName, tool])).values()];
300
- const selected = [];
304
+ // Start with forceInclude tools — they always occupy a slot.
305
+ const selected = [...forcedTools];
306
+ const selectedNames = new Set(selected.map((tool) => tool.toolName));
301
307
  const foundationalIds = new Set(policy.defaults.foundationalOperationIds);
302
- const foundational = candidates.filter((tool) => foundationalIds.has(tool.operationId));
308
+ const foundational = candidates.filter((tool) => foundationalIds.has(tool.operationId) && !selectedNames.has(tool.toolName));
303
309
  for (const tool of foundational) {
304
310
  if (selected.length >= minReadTools || selected.length >= maxTools)
305
311
  break;
306
312
  selected.push(tool);
313
+ selectedNames.add(tool.toolName);
307
314
  }
308
- const remaining = stableSortByPhasePriority(candidates.filter((tool) => !selected.some((entry) => entry.toolName === tool.toolName)), phasePolicy.priority);
315
+ const remaining = stableSortByPhasePriority(candidates.filter((tool) => !selectedNames.has(tool.toolName)), phasePolicy.priority);
309
316
  for (const tool of remaining) {
310
317
  if (selected.length >= maxTools) {
311
318
  excluded.push({ toolName: tool.toolName, reason: 'budget-trim' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/sdk",
3
- "version": "1.0.0-next.69",
3
+ "version": "1.0.0-next.71",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -25,11 +25,11 @@
25
25
  "typescript": "^5.9.2"
26
26
  },
27
27
  "optionalDependencies": {
28
- "@superdoc-dev/sdk-darwin-arm64": "1.0.0-next.69",
29
- "@superdoc-dev/sdk-darwin-x64": "1.0.0-next.69",
30
- "@superdoc-dev/sdk-windows-x64": "1.0.0-next.69",
31
- "@superdoc-dev/sdk-linux-x64": "1.0.0-next.69",
32
- "@superdoc-dev/sdk-linux-arm64": "1.0.0-next.69"
28
+ "@superdoc-dev/sdk-darwin-arm64": "1.0.0-next.71",
29
+ "@superdoc-dev/sdk-linux-x64": "1.0.0-next.71",
30
+ "@superdoc-dev/sdk-linux-arm64": "1.0.0-next.71",
31
+ "@superdoc-dev/sdk-windows-x64": "1.0.0-next.71",
32
+ "@superdoc-dev/sdk-darwin-x64": "1.0.0-next.71"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
@@ -3,7 +3,7 @@
3
3
  "generatedAt": null,
4
4
  "namePolicyVersion": "v1",
5
5
  "exposureVersion": "v1",
6
- "toolCount": 382,
6
+ "toolCount": 384,
7
7
  "profiles": {
8
8
  "intent": {
9
9
  "name": "intent",
@@ -696,6 +696,50 @@
696
696
  },
697
697
  "intentId": "get_document_markdown"
698
698
  },
699
+ {
700
+ "operationId": "doc.getHtml",
701
+ "toolName": "get_document_html",
702
+ "profile": "intent",
703
+ "source": "intent",
704
+ "description": "Extract the document content as an HTML string.",
705
+ "inputSchema": {
706
+ "type": "object",
707
+ "properties": {
708
+ "doc": {
709
+ "type": "string"
710
+ },
711
+ "sessionId": {
712
+ "type": "string"
713
+ },
714
+ "unflattenLists": {
715
+ "type": "boolean"
716
+ }
717
+ },
718
+ "additionalProperties": false
719
+ },
720
+ "outputSchema": {
721
+ "type": "string"
722
+ },
723
+ "mutates": false,
724
+ "category": "query",
725
+ "capabilities": [
726
+ "search",
727
+ "session-targeting",
728
+ "stateless-doc"
729
+ ],
730
+ "errors": [],
731
+ "examples": [],
732
+ "commandTokens": [
733
+ "get-html"
734
+ ],
735
+ "profileTags": [],
736
+ "requiredCapabilities": [],
737
+ "sessionRequirements": {
738
+ "requiresOpenContext": true,
739
+ "supportsSessionTargeting": true
740
+ },
741
+ "intentId": "get_document_html"
742
+ },
699
743
  {
700
744
  "operationId": "doc.info",
701
745
  "toolName": "get_document_info",
@@ -21054,6 +21098,41 @@
21054
21098
  ],
21055
21099
  "type": "object"
21056
21100
  },
21101
+ "getHtml": {
21102
+ "additionalProperties": false,
21103
+ "properties": {
21104
+ "available": {
21105
+ "type": "boolean"
21106
+ },
21107
+ "dryRun": {
21108
+ "type": "boolean"
21109
+ },
21110
+ "reasons": {
21111
+ "items": {
21112
+ "enum": [
21113
+ "COMMAND_UNAVAILABLE",
21114
+ "HELPER_UNAVAILABLE",
21115
+ "OPERATION_UNAVAILABLE",
21116
+ "TRACKED_MODE_UNAVAILABLE",
21117
+ "DRY_RUN_UNAVAILABLE",
21118
+ "NAMESPACE_UNAVAILABLE",
21119
+ "STYLES_PART_MISSING",
21120
+ "COLLABORATION_ACTIVE"
21121
+ ]
21122
+ },
21123
+ "type": "array"
21124
+ },
21125
+ "tracked": {
21126
+ "type": "boolean"
21127
+ }
21128
+ },
21129
+ "required": [
21130
+ "available",
21131
+ "tracked",
21132
+ "dryRun"
21133
+ ],
21134
+ "type": "object"
21135
+ },
21057
21136
  "getMarkdown": {
21058
21137
  "additionalProperties": false,
21059
21138
  "properties": {
@@ -24771,6 +24850,7 @@
24771
24850
  "getNodeById",
24772
24851
  "getText",
24773
24852
  "getMarkdown",
24853
+ "getHtml",
24774
24854
  "info",
24775
24855
  "insert",
24776
24856
  "replace",
@@ -34140,6 +34220,49 @@
34140
34220
  "supportsSessionTargeting": true
34141
34221
  }
34142
34222
  },
34223
+ {
34224
+ "operationId": "doc.getHtml",
34225
+ "toolName": "doc_getHtml",
34226
+ "profile": "operation",
34227
+ "source": "operation",
34228
+ "description": "Extract the document content as an HTML string.",
34229
+ "inputSchema": {
34230
+ "type": "object",
34231
+ "properties": {
34232
+ "doc": {
34233
+ "type": "string"
34234
+ },
34235
+ "sessionId": {
34236
+ "type": "string"
34237
+ },
34238
+ "unflattenLists": {
34239
+ "type": "boolean"
34240
+ }
34241
+ },
34242
+ "additionalProperties": false
34243
+ },
34244
+ "outputSchema": {
34245
+ "type": "string"
34246
+ },
34247
+ "mutates": false,
34248
+ "category": "query",
34249
+ "capabilities": [
34250
+ "search",
34251
+ "session-targeting",
34252
+ "stateless-doc"
34253
+ ],
34254
+ "errors": [],
34255
+ "examples": [],
34256
+ "commandTokens": [
34257
+ "get-html"
34258
+ ],
34259
+ "profileTags": [],
34260
+ "requiredCapabilities": [],
34261
+ "sessionRequirements": {
34262
+ "requiresOpenContext": true,
34263
+ "supportsSessionTargeting": true
34264
+ }
34265
+ },
34143
34266
  {
34144
34267
  "operationId": "doc.info",
34145
34268
  "toolName": "doc_info",
@@ -54380,6 +54503,41 @@
54380
54503
  ],
54381
54504
  "type": "object"
54382
54505
  },
54506
+ "getHtml": {
54507
+ "additionalProperties": false,
54508
+ "properties": {
54509
+ "available": {
54510
+ "type": "boolean"
54511
+ },
54512
+ "dryRun": {
54513
+ "type": "boolean"
54514
+ },
54515
+ "reasons": {
54516
+ "items": {
54517
+ "enum": [
54518
+ "COMMAND_UNAVAILABLE",
54519
+ "HELPER_UNAVAILABLE",
54520
+ "OPERATION_UNAVAILABLE",
54521
+ "TRACKED_MODE_UNAVAILABLE",
54522
+ "DRY_RUN_UNAVAILABLE",
54523
+ "NAMESPACE_UNAVAILABLE",
54524
+ "STYLES_PART_MISSING",
54525
+ "COLLABORATION_ACTIVE"
54526
+ ]
54527
+ },
54528
+ "type": "array"
54529
+ },
54530
+ "tracked": {
54531
+ "type": "boolean"
54532
+ }
54533
+ },
54534
+ "required": [
54535
+ "available",
54536
+ "tracked",
54537
+ "dryRun"
54538
+ ],
54539
+ "type": "object"
54540
+ },
54383
54541
  "getMarkdown": {
54384
54542
  "additionalProperties": false,
54385
54543
  "properties": {
@@ -58097,6 +58255,7 @@
58097
58255
  "getNodeById",
58098
58256
  "getText",
58099
58257
  "getMarkdown",
58258
+ "getHtml",
58100
58259
  "info",
58101
58260
  "insert",
58102
58261
  "replace",
@@ -4,6 +4,7 @@
4
4
  "get_node_by_id": "doc.getNodeById",
5
5
  "get_document_text": "doc.getText",
6
6
  "get_document_markdown": "doc.getMarkdown",
7
+ "get_document_html": "doc.getHtml",
7
8
  "get_document_info": "doc.info",
8
9
  "insert_content": "doc.insert",
9
10
  "replace_content": "doc.replace",
@@ -195,6 +196,7 @@
195
196
  "doc_getNodeById": "doc.getNodeById",
196
197
  "doc_getText": "doc.getText",
197
198
  "doc_getMarkdown": "doc.getMarkdown",
199
+ "doc_getHtml": "doc.getHtml",
198
200
  "doc_info": "doc.info",
199
201
  "doc_insert": "doc.insert",
200
202
  "doc_replace": "doc.replace",
@@ -96,5 +96,5 @@
96
96
  "hasLists"
97
97
  ]
98
98
  },
99
- "contractHash": "ade757d72c4b4baa"
99
+ "contractHash": "319e2e35e3884278"
100
100
  }
@@ -261,6 +261,25 @@
261
261
  "additionalProperties": false
262
262
  }
263
263
  },
264
+ {
265
+ "name": "get_document_html",
266
+ "description": "Extract the document content as an HTML string.",
267
+ "input_schema": {
268
+ "type": "object",
269
+ "properties": {
270
+ "doc": {
271
+ "type": "string"
272
+ },
273
+ "sessionId": {
274
+ "type": "string"
275
+ },
276
+ "unflattenLists": {
277
+ "type": "boolean"
278
+ }
279
+ },
280
+ "additionalProperties": false
281
+ }
282
+ },
264
283
  {
265
284
  "name": "get_document_info",
266
285
  "description": "Return document metadata including revision, node count, and capabilities.",
@@ -14264,6 +14283,25 @@
14264
14283
  "additionalProperties": false
14265
14284
  }
14266
14285
  },
14286
+ {
14287
+ "name": "doc_getHtml",
14288
+ "description": "Extract the document content as an HTML string.",
14289
+ "input_schema": {
14290
+ "type": "object",
14291
+ "properties": {
14292
+ "doc": {
14293
+ "type": "string"
14294
+ },
14295
+ "sessionId": {
14296
+ "type": "string"
14297
+ },
14298
+ "unflattenLists": {
14299
+ "type": "boolean"
14300
+ }
14301
+ },
14302
+ "additionalProperties": false
14303
+ }
14304
+ },
14267
14305
  {
14268
14306
  "name": "doc_info",
14269
14307
  "description": "Return document metadata including revision, node count, and capabilities.",
@@ -665,6 +665,45 @@
665
665
  ]
666
666
  }
667
667
  },
668
+ {
669
+ "name": "get_document_html",
670
+ "description": "Extract the document content as an HTML string.",
671
+ "parameters": {
672
+ "type": "object",
673
+ "properties": {
674
+ "doc": {
675
+ "type": "string"
676
+ },
677
+ "sessionId": {
678
+ "type": "string"
679
+ },
680
+ "unflattenLists": {
681
+ "type": "boolean"
682
+ }
683
+ },
684
+ "additionalProperties": false
685
+ },
686
+ "returns": {
687
+ "type": "string"
688
+ },
689
+ "metadata": {
690
+ "operationId": "doc.getHtml",
691
+ "profile": "intent",
692
+ "mutates": false,
693
+ "category": "query",
694
+ "capabilities": [
695
+ "search",
696
+ "session-targeting",
697
+ "stateless-doc"
698
+ ],
699
+ "requiredCapabilities": [],
700
+ "profileTags": [],
701
+ "examples": [],
702
+ "commandTokens": [
703
+ "get-html"
704
+ ]
705
+ }
706
+ },
668
707
  {
669
708
  "name": "get_document_info",
670
709
  "description": "Return document metadata including revision, node count, and capabilities.",
@@ -20172,6 +20211,41 @@
20172
20211
  ],
20173
20212
  "type": "object"
20174
20213
  },
20214
+ "getHtml": {
20215
+ "additionalProperties": false,
20216
+ "properties": {
20217
+ "available": {
20218
+ "type": "boolean"
20219
+ },
20220
+ "dryRun": {
20221
+ "type": "boolean"
20222
+ },
20223
+ "reasons": {
20224
+ "items": {
20225
+ "enum": [
20226
+ "COMMAND_UNAVAILABLE",
20227
+ "HELPER_UNAVAILABLE",
20228
+ "OPERATION_UNAVAILABLE",
20229
+ "TRACKED_MODE_UNAVAILABLE",
20230
+ "DRY_RUN_UNAVAILABLE",
20231
+ "NAMESPACE_UNAVAILABLE",
20232
+ "STYLES_PART_MISSING",
20233
+ "COLLABORATION_ACTIVE"
20234
+ ]
20235
+ },
20236
+ "type": "array"
20237
+ },
20238
+ "tracked": {
20239
+ "type": "boolean"
20240
+ }
20241
+ },
20242
+ "required": [
20243
+ "available",
20244
+ "tracked",
20245
+ "dryRun"
20246
+ ],
20247
+ "type": "object"
20248
+ },
20175
20249
  "getMarkdown": {
20176
20250
  "additionalProperties": false,
20177
20251
  "properties": {
@@ -23889,6 +23963,7 @@
23889
23963
  "getNodeById",
23890
23964
  "getText",
23891
23965
  "getMarkdown",
23966
+ "getHtml",
23892
23967
  "info",
23893
23968
  "insert",
23894
23969
  "replace",
@@ -32772,6 +32847,45 @@
32772
32847
  ]
32773
32848
  }
32774
32849
  },
32850
+ {
32851
+ "name": "doc_getHtml",
32852
+ "description": "Extract the document content as an HTML string.",
32853
+ "parameters": {
32854
+ "type": "object",
32855
+ "properties": {
32856
+ "doc": {
32857
+ "type": "string"
32858
+ },
32859
+ "sessionId": {
32860
+ "type": "string"
32861
+ },
32862
+ "unflattenLists": {
32863
+ "type": "boolean"
32864
+ }
32865
+ },
32866
+ "additionalProperties": false
32867
+ },
32868
+ "returns": {
32869
+ "type": "string"
32870
+ },
32871
+ "metadata": {
32872
+ "operationId": "doc.getHtml",
32873
+ "profile": "operation",
32874
+ "mutates": false,
32875
+ "category": "query",
32876
+ "capabilities": [
32877
+ "search",
32878
+ "session-targeting",
32879
+ "stateless-doc"
32880
+ ],
32881
+ "requiredCapabilities": [],
32882
+ "profileTags": [],
32883
+ "examples": [],
32884
+ "commandTokens": [
32885
+ "get-html"
32886
+ ]
32887
+ }
32888
+ },
32775
32889
  {
32776
32890
  "name": "doc_info",
32777
32891
  "description": "Return document metadata including revision, node count, and capabilities.",
@@ -52279,6 +52393,41 @@
52279
52393
  ],
52280
52394
  "type": "object"
52281
52395
  },
52396
+ "getHtml": {
52397
+ "additionalProperties": false,
52398
+ "properties": {
52399
+ "available": {
52400
+ "type": "boolean"
52401
+ },
52402
+ "dryRun": {
52403
+ "type": "boolean"
52404
+ },
52405
+ "reasons": {
52406
+ "items": {
52407
+ "enum": [
52408
+ "COMMAND_UNAVAILABLE",
52409
+ "HELPER_UNAVAILABLE",
52410
+ "OPERATION_UNAVAILABLE",
52411
+ "TRACKED_MODE_UNAVAILABLE",
52412
+ "DRY_RUN_UNAVAILABLE",
52413
+ "NAMESPACE_UNAVAILABLE",
52414
+ "STYLES_PART_MISSING",
52415
+ "COLLABORATION_ACTIVE"
52416
+ ]
52417
+ },
52418
+ "type": "array"
52419
+ },
52420
+ "tracked": {
52421
+ "type": "boolean"
52422
+ }
52423
+ },
52424
+ "required": [
52425
+ "available",
52426
+ "tracked",
52427
+ "dryRun"
52428
+ ],
52429
+ "type": "object"
52430
+ },
52282
52431
  "getMarkdown": {
52283
52432
  "additionalProperties": false,
52284
52433
  "properties": {
@@ -55996,6 +56145,7 @@
55996
56145
  "getNodeById",
55997
56146
  "getText",
55998
56147
  "getMarkdown",
56148
+ "getHtml",
55999
56149
  "info",
56000
56150
  "insert",
56001
56151
  "replace",
@@ -276,6 +276,28 @@
276
276
  }
277
277
  }
278
278
  },
279
+ {
280
+ "type": "function",
281
+ "function": {
282
+ "name": "get_document_html",
283
+ "description": "Extract the document content as an HTML string.",
284
+ "parameters": {
285
+ "type": "object",
286
+ "properties": {
287
+ "doc": {
288
+ "type": "string"
289
+ },
290
+ "sessionId": {
291
+ "type": "string"
292
+ },
293
+ "unflattenLists": {
294
+ "type": "boolean"
295
+ }
296
+ },
297
+ "additionalProperties": false
298
+ }
299
+ }
300
+ },
279
301
  {
280
302
  "type": "function",
281
303
  "function": {
@@ -14852,6 +14874,28 @@
14852
14874
  }
14853
14875
  }
14854
14876
  },
14877
+ {
14878
+ "type": "function",
14879
+ "function": {
14880
+ "name": "doc_getHtml",
14881
+ "description": "Extract the document content as an HTML string.",
14882
+ "parameters": {
14883
+ "type": "object",
14884
+ "properties": {
14885
+ "doc": {
14886
+ "type": "string"
14887
+ },
14888
+ "sessionId": {
14889
+ "type": "string"
14890
+ },
14891
+ "unflattenLists": {
14892
+ "type": "boolean"
14893
+ }
14894
+ },
14895
+ "additionalProperties": false
14896
+ }
14897
+ }
14898
+ },
14855
14899
  {
14856
14900
  "type": "function",
14857
14901
  "function": {