@superdoc-dev/sdk 1.16.0-next.50 → 1.16.0-next.51
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/action-primitives/doc-index.cjs +215 -0
- package/dist/action-primitives/doc-index.d.ts +83 -0
- package/dist/action-primitives/doc-index.d.ts.map +1 -0
- package/dist/action-primitives/doc-index.js +211 -0
- package/dist/action-primitives/engine.cjs +204 -0
- package/dist/action-primitives/engine.d.ts +71 -0
- package/dist/action-primitives/engine.d.ts.map +1 -0
- package/dist/action-primitives/engine.js +196 -0
- package/dist/action-primitives/receipt.cjs +39 -0
- package/dist/action-primitives/receipt.d.ts +49 -0
- package/dist/action-primitives/receipt.d.ts.map +1 -0
- package/dist/action-primitives/receipt.js +32 -0
- package/dist/action-primitives/resolve.cjs +252 -0
- package/dist/action-primitives/resolve.d.ts +56 -0
- package/dist/action-primitives/resolve.d.ts.map +1 -0
- package/dist/action-primitives/resolve.js +246 -0
- package/dist/action-primitives/session-cache.cjs +43 -0
- package/dist/action-primitives/session-cache.d.ts +19 -0
- package/dist/action-primitives/session-cache.d.ts.map +1 -0
- package/dist/action-primitives/session-cache.js +37 -0
- package/dist/action-primitives/tools/list-transform.cjs +661 -0
- package/dist/action-primitives/tools/list-transform.d.ts +98 -0
- package/dist/action-primitives/tools/list-transform.d.ts.map +1 -0
- package/dist/action-primitives/tools/list-transform.js +656 -0
- package/dist/action-primitives/tools/structure-insert.cjs +1343 -0
- package/dist/action-primitives/tools/structure-insert.d.ts +183 -0
- package/dist/action-primitives/tools/structure-insert.d.ts.map +1 -0
- package/dist/action-primitives/tools/structure-insert.js +1338 -0
- package/dist/action-primitives/tools/text-transform.cjs +669 -0
- package/dist/action-primitives/tools/text-transform.d.ts +64 -0
- package/dist/action-primitives/tools/text-transform.d.ts.map +1 -0
- package/dist/action-primitives/tools/text-transform.js +664 -0
- package/dist/action-primitives/types.d.ts +36 -0
- package/dist/action-primitives/types.d.ts.map +1 -0
- package/dist/action-primitives/types.js +15 -0
- package/dist/agent/actions.cjs +5381 -0
- package/dist/agent/actions.d.ts +404 -0
- package/dist/agent/actions.d.ts.map +1 -0
- package/dist/agent/actions.js +5373 -0
- package/dist/agent/catalog.cjs +483 -0
- package/dist/agent/catalog.d.ts +103 -0
- package/dist/agent/catalog.d.ts.map +1 -0
- package/dist/agent/catalog.js +471 -0
- package/dist/agent/doc-snapshot.cjs +663 -0
- package/dist/agent/doc-snapshot.d.ts +247 -0
- package/dist/agent/doc-snapshot.d.ts.map +1 -0
- package/dist/agent/doc-snapshot.js +657 -0
- package/dist/agent/index.d.ts +16 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +15 -0
- package/dist/agent/ir.cjs +170 -0
- package/dist/agent/ir.d.ts +216 -0
- package/dist/agent/ir.d.ts.map +1 -0
- package/dist/agent/ir.js +181 -0
- package/dist/agent/operation-catalog.cjs +418 -0
- package/dist/agent/operation-catalog.d.ts +36 -0
- package/dist/agent/operation-catalog.d.ts.map +1 -0
- package/dist/agent/operation-catalog.js +446 -0
- package/dist/agent/runtime.cjs +501 -0
- package/dist/agent/runtime.d.ts +120 -0
- package/dist/agent/runtime.d.ts.map +1 -0
- package/dist/agent/runtime.js +493 -0
- package/dist/embedded-prompts.generated.cjs +13 -0
- package/dist/embedded-prompts.generated.d.ts +4 -0
- package/dist/embedded-prompts.generated.d.ts.map +1 -0
- package/dist/embedded-prompts.generated.js +9 -0
- package/dist/generated/client.cjs +18 -0
- package/dist/generated/client.d.ts +119 -0
- package/dist/generated/client.d.ts.map +1 -1
- package/dist/generated/client.js +18 -0
- package/dist/generated/contract.cjs +524 -0
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/contract.js +524 -0
- package/dist/index.cjs +3 -7
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -8
- package/dist/presets/core.cjs +454 -0
- package/dist/presets/core.d.ts +20 -0
- package/dist/presets/core.d.ts.map +1 -0
- package/dist/presets/core.js +447 -0
- package/dist/presets.cjs +55 -8
- package/dist/presets.d.ts +39 -8
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +53 -8
- package/dist/prompts/mcp-prompt.md +23 -0
- package/dist/prompts/system-prompt.md +108 -0
- package/dist/runtime/transport-common.cjs +8 -0
- package/dist/runtime/transport-common.d.ts.map +1 -1
- package/dist/runtime/transport-common.js +8 -0
- package/dist/tools.cjs +46 -11
- package/dist/tools.d.ts +55 -8
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +45 -13
- package/package.json +9 -8
- package/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/__pycache__/intent_dispatch_generated.cpython-312.pyc +0 -0
|
@@ -252616,6 +252616,112 @@ export const CONTRACT = {
|
|
|
252616
252616
|
]
|
|
252617
252617
|
}
|
|
252618
252618
|
},
|
|
252619
|
+
"doc.executeCode": {
|
|
252620
|
+
"operationId": "doc.executeCode",
|
|
252621
|
+
"sdkSurface": "document",
|
|
252622
|
+
"command": "execute code",
|
|
252623
|
+
"commandTokens": [
|
|
252624
|
+
"execute",
|
|
252625
|
+
"code"
|
|
252626
|
+
],
|
|
252627
|
+
"category": "core",
|
|
252628
|
+
"description": "Run model-authored JavaScript IN-HOST against the live, SYNCHRONOUS Document API for the open session. Two globals are injected: `doc` (the synchronous Document API — do NOT await doc.* calls) and `console`. `return` a short summary; logs and the return value come back structured as { ok, result, logs, error }. Use for complex/multi-step workflows (loops, per-item branching, extract-then-generate) in ONE call instead of chaining many narrow tools. Large code can be passed on stdin.",
|
|
252629
|
+
"requiresDocumentContext": false,
|
|
252630
|
+
"docRequirement": "none",
|
|
252631
|
+
"responseEnvelopeKey": null,
|
|
252632
|
+
"params": [
|
|
252633
|
+
{
|
|
252634
|
+
"name": "sessionId",
|
|
252635
|
+
"kind": "flag",
|
|
252636
|
+
"type": "string",
|
|
252637
|
+
"flag": "session",
|
|
252638
|
+
"description": "Session ID for multi-session workflows. Optional when only one session is open."
|
|
252639
|
+
},
|
|
252640
|
+
{
|
|
252641
|
+
"name": "expectedRevision",
|
|
252642
|
+
"kind": "flag",
|
|
252643
|
+
"type": "number",
|
|
252644
|
+
"flag": "expected-revision",
|
|
252645
|
+
"agentVisible": false
|
|
252646
|
+
},
|
|
252647
|
+
{
|
|
252648
|
+
"name": "code",
|
|
252649
|
+
"kind": "flag",
|
|
252650
|
+
"type": "string",
|
|
252651
|
+
"description": "JavaScript body run as an async function with `doc` (synchronous Document API — do NOT await) and `console` injected. Omit to pass code on stdin."
|
|
252652
|
+
}
|
|
252653
|
+
],
|
|
252654
|
+
"constraints": null,
|
|
252655
|
+
"inputSchema": {
|
|
252656
|
+
"type": "object",
|
|
252657
|
+
"properties": {
|
|
252658
|
+
"code": {
|
|
252659
|
+
"type": "string",
|
|
252660
|
+
"description": "JavaScript body run as an async function with `doc` (synchronous Document API — do NOT await) and `console` injected. Omit to pass code on stdin."
|
|
252661
|
+
}
|
|
252662
|
+
},
|
|
252663
|
+
"additionalProperties": false
|
|
252664
|
+
},
|
|
252665
|
+
"mutates": true,
|
|
252666
|
+
"idempotency": "non-idempotent",
|
|
252667
|
+
"supportsTrackedMode": false,
|
|
252668
|
+
"supportsDryRun": false,
|
|
252669
|
+
"outputSchema": {
|
|
252670
|
+
"type": "object",
|
|
252671
|
+
"properties": {
|
|
252672
|
+
"ok": {
|
|
252673
|
+
"type": "boolean"
|
|
252674
|
+
},
|
|
252675
|
+
"result": {},
|
|
252676
|
+
"logs": {
|
|
252677
|
+
"type": "array",
|
|
252678
|
+
"items": {
|
|
252679
|
+
"type": "object",
|
|
252680
|
+
"properties": {
|
|
252681
|
+
"level": {
|
|
252682
|
+
"type": "string"
|
|
252683
|
+
},
|
|
252684
|
+
"message": {
|
|
252685
|
+
"type": "string"
|
|
252686
|
+
}
|
|
252687
|
+
}
|
|
252688
|
+
}
|
|
252689
|
+
},
|
|
252690
|
+
"error": {
|
|
252691
|
+
"type": "object",
|
|
252692
|
+
"properties": {
|
|
252693
|
+
"name": {
|
|
252694
|
+
"type": "string"
|
|
252695
|
+
},
|
|
252696
|
+
"message": {
|
|
252697
|
+
"type": "string"
|
|
252698
|
+
},
|
|
252699
|
+
"stack": {
|
|
252700
|
+
"type": "string"
|
|
252701
|
+
}
|
|
252702
|
+
}
|
|
252703
|
+
},
|
|
252704
|
+
"context": {
|
|
252705
|
+
"type": "object",
|
|
252706
|
+
"properties": {
|
|
252707
|
+
"dirty": {
|
|
252708
|
+
"type": "boolean"
|
|
252709
|
+
},
|
|
252710
|
+
"revision": {
|
|
252711
|
+
"type": "number"
|
|
252712
|
+
},
|
|
252713
|
+
"mutated": {
|
|
252714
|
+
"type": "boolean"
|
|
252715
|
+
}
|
|
252716
|
+
}
|
|
252717
|
+
}
|
|
252718
|
+
},
|
|
252719
|
+
"required": [
|
|
252720
|
+
"ok",
|
|
252721
|
+
"logs"
|
|
252722
|
+
]
|
|
252723
|
+
}
|
|
252724
|
+
},
|
|
252619
252725
|
"doc.status": {
|
|
252620
252726
|
"operationId": "doc.status",
|
|
252621
252727
|
"sdkSurface": "internal",
|
|
@@ -253204,6 +253310,424 @@ export const CONTRACT = {
|
|
|
253204
253310
|
"activeSessionId"
|
|
253205
253311
|
]
|
|
253206
253312
|
}
|
|
253313
|
+
},
|
|
253314
|
+
"doc.preset.list": {
|
|
253315
|
+
"operationId": "doc.preset.list",
|
|
253316
|
+
"sdkSurface": "document",
|
|
253317
|
+
"command": "preset list",
|
|
253318
|
+
"commandTokens": [
|
|
253319
|
+
"preset",
|
|
253320
|
+
"list"
|
|
253321
|
+
],
|
|
253322
|
+
"category": "session",
|
|
253323
|
+
"description": "List the LLM-tools preset ids registered in the Node SDK preset registry, plus the default preset id.",
|
|
253324
|
+
"requiresDocumentContext": false,
|
|
253325
|
+
"docRequirement": "none",
|
|
253326
|
+
"responseEnvelopeKey": null,
|
|
253327
|
+
"params": [],
|
|
253328
|
+
"constraints": null,
|
|
253329
|
+
"inputSchema": {
|
|
253330
|
+
"type": "object",
|
|
253331
|
+
"properties": {},
|
|
253332
|
+
"additionalProperties": false
|
|
253333
|
+
},
|
|
253334
|
+
"mutates": false,
|
|
253335
|
+
"idempotency": "idempotent",
|
|
253336
|
+
"supportsTrackedMode": false,
|
|
253337
|
+
"supportsDryRun": false,
|
|
253338
|
+
"outputSchema": {
|
|
253339
|
+
"type": "object",
|
|
253340
|
+
"properties": {
|
|
253341
|
+
"presets": {
|
|
253342
|
+
"type": "array",
|
|
253343
|
+
"items": {
|
|
253344
|
+
"type": "string"
|
|
253345
|
+
}
|
|
253346
|
+
},
|
|
253347
|
+
"defaultPreset": {
|
|
253348
|
+
"type": "string"
|
|
253349
|
+
}
|
|
253350
|
+
},
|
|
253351
|
+
"required": [
|
|
253352
|
+
"presets",
|
|
253353
|
+
"defaultPreset"
|
|
253354
|
+
]
|
|
253355
|
+
},
|
|
253356
|
+
"skipAsATool": true
|
|
253357
|
+
},
|
|
253358
|
+
"doc.preset.getCatalog": {
|
|
253359
|
+
"operationId": "doc.preset.getCatalog",
|
|
253360
|
+
"sdkSurface": "document",
|
|
253361
|
+
"command": "preset get-catalog",
|
|
253362
|
+
"commandTokens": [
|
|
253363
|
+
"preset",
|
|
253364
|
+
"get-catalog"
|
|
253365
|
+
],
|
|
253366
|
+
"category": "session",
|
|
253367
|
+
"description": "Return the full tool catalog for an LLM-tools preset (defaults to the registered default preset).",
|
|
253368
|
+
"requiresDocumentContext": false,
|
|
253369
|
+
"docRequirement": "none",
|
|
253370
|
+
"responseEnvelopeKey": null,
|
|
253371
|
+
"params": [
|
|
253372
|
+
{
|
|
253373
|
+
"name": "preset",
|
|
253374
|
+
"kind": "flag",
|
|
253375
|
+
"type": "string",
|
|
253376
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253377
|
+
}
|
|
253378
|
+
],
|
|
253379
|
+
"constraints": null,
|
|
253380
|
+
"inputSchema": {
|
|
253381
|
+
"type": "object",
|
|
253382
|
+
"properties": {
|
|
253383
|
+
"preset": {
|
|
253384
|
+
"type": "string",
|
|
253385
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253386
|
+
}
|
|
253387
|
+
},
|
|
253388
|
+
"additionalProperties": false
|
|
253389
|
+
},
|
|
253390
|
+
"mutates": false,
|
|
253391
|
+
"idempotency": "idempotent",
|
|
253392
|
+
"supportsTrackedMode": false,
|
|
253393
|
+
"supportsDryRun": false,
|
|
253394
|
+
"outputSchema": {
|
|
253395
|
+
"type": "object"
|
|
253396
|
+
},
|
|
253397
|
+
"skipAsATool": true
|
|
253398
|
+
},
|
|
253399
|
+
"doc.preset.getTools": {
|
|
253400
|
+
"operationId": "doc.preset.getTools",
|
|
253401
|
+
"sdkSurface": "document",
|
|
253402
|
+
"command": "preset get-tools",
|
|
253403
|
+
"commandTokens": [
|
|
253404
|
+
"preset",
|
|
253405
|
+
"get-tools"
|
|
253406
|
+
],
|
|
253407
|
+
"category": "session",
|
|
253408
|
+
"description": "Return the provider-shaped tool array (openai|anthropic|vercel|generic) for an LLM-tools preset, plus the active cache strategy.",
|
|
253409
|
+
"requiresDocumentContext": false,
|
|
253410
|
+
"docRequirement": "none",
|
|
253411
|
+
"responseEnvelopeKey": null,
|
|
253412
|
+
"params": [
|
|
253413
|
+
{
|
|
253414
|
+
"name": "provider",
|
|
253415
|
+
"kind": "flag",
|
|
253416
|
+
"type": "string",
|
|
253417
|
+
"required": true,
|
|
253418
|
+
"schema": {
|
|
253419
|
+
"oneOf": [
|
|
253420
|
+
{
|
|
253421
|
+
"const": "openai"
|
|
253422
|
+
},
|
|
253423
|
+
{
|
|
253424
|
+
"const": "anthropic"
|
|
253425
|
+
},
|
|
253426
|
+
{
|
|
253427
|
+
"const": "vercel"
|
|
253428
|
+
},
|
|
253429
|
+
{
|
|
253430
|
+
"const": "generic"
|
|
253431
|
+
}
|
|
253432
|
+
]
|
|
253433
|
+
},
|
|
253434
|
+
"description": "Tool provider format: openai | anthropic | vercel | generic."
|
|
253435
|
+
},
|
|
253436
|
+
{
|
|
253437
|
+
"name": "preset",
|
|
253438
|
+
"kind": "flag",
|
|
253439
|
+
"type": "string",
|
|
253440
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253441
|
+
},
|
|
253442
|
+
{
|
|
253443
|
+
"name": "cache",
|
|
253444
|
+
"kind": "flag",
|
|
253445
|
+
"type": "boolean",
|
|
253446
|
+
"description": "Apply provider-specific prompt-cache markers."
|
|
253447
|
+
},
|
|
253448
|
+
{
|
|
253449
|
+
"name": "excludeActions",
|
|
253450
|
+
"kind": "flag",
|
|
253451
|
+
"type": "string",
|
|
253452
|
+
"description": "Comma-separated action names to remove from the advertised action surface (core preset). Unknown names fail."
|
|
253453
|
+
}
|
|
253454
|
+
],
|
|
253455
|
+
"constraints": null,
|
|
253456
|
+
"inputSchema": {
|
|
253457
|
+
"type": "object",
|
|
253458
|
+
"properties": {
|
|
253459
|
+
"provider": {
|
|
253460
|
+
"type": "string",
|
|
253461
|
+
"oneOf": [
|
|
253462
|
+
{
|
|
253463
|
+
"const": "openai"
|
|
253464
|
+
},
|
|
253465
|
+
{
|
|
253466
|
+
"const": "anthropic"
|
|
253467
|
+
},
|
|
253468
|
+
{
|
|
253469
|
+
"const": "vercel"
|
|
253470
|
+
},
|
|
253471
|
+
{
|
|
253472
|
+
"const": "generic"
|
|
253473
|
+
}
|
|
253474
|
+
],
|
|
253475
|
+
"description": "Tool provider format: openai | anthropic | vercel | generic."
|
|
253476
|
+
},
|
|
253477
|
+
"preset": {
|
|
253478
|
+
"type": "string",
|
|
253479
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253480
|
+
},
|
|
253481
|
+
"cache": {
|
|
253482
|
+
"type": "boolean",
|
|
253483
|
+
"description": "Apply provider-specific prompt-cache markers."
|
|
253484
|
+
},
|
|
253485
|
+
"excludeActions": {
|
|
253486
|
+
"type": "string",
|
|
253487
|
+
"description": "Comma-separated action names to remove from the advertised action surface (core preset). Unknown names fail."
|
|
253488
|
+
}
|
|
253489
|
+
},
|
|
253490
|
+
"required": [
|
|
253491
|
+
"provider"
|
|
253492
|
+
],
|
|
253493
|
+
"additionalProperties": false
|
|
253494
|
+
},
|
|
253495
|
+
"mutates": false,
|
|
253496
|
+
"idempotency": "idempotent",
|
|
253497
|
+
"supportsTrackedMode": false,
|
|
253498
|
+
"supportsDryRun": false,
|
|
253499
|
+
"outputSchema": {
|
|
253500
|
+
"type": "object",
|
|
253501
|
+
"properties": {
|
|
253502
|
+
"tools": {
|
|
253503
|
+
"type": "array"
|
|
253504
|
+
},
|
|
253505
|
+
"cacheStrategy": {
|
|
253506
|
+
"type": "string"
|
|
253507
|
+
}
|
|
253508
|
+
},
|
|
253509
|
+
"required": [
|
|
253510
|
+
"tools",
|
|
253511
|
+
"cacheStrategy"
|
|
253512
|
+
]
|
|
253513
|
+
},
|
|
253514
|
+
"skipAsATool": true
|
|
253515
|
+
},
|
|
253516
|
+
"doc.preset.getSystemPrompt": {
|
|
253517
|
+
"operationId": "doc.preset.getSystemPrompt",
|
|
253518
|
+
"sdkSurface": "document",
|
|
253519
|
+
"command": "preset get-system-prompt",
|
|
253520
|
+
"commandTokens": [
|
|
253521
|
+
"preset",
|
|
253522
|
+
"get-system-prompt"
|
|
253523
|
+
],
|
|
253524
|
+
"category": "session",
|
|
253525
|
+
"description": "Return the SDK-style system prompt for an LLM-tools preset.",
|
|
253526
|
+
"requiresDocumentContext": false,
|
|
253527
|
+
"docRequirement": "none",
|
|
253528
|
+
"responseEnvelopeKey": null,
|
|
253529
|
+
"params": [
|
|
253530
|
+
{
|
|
253531
|
+
"name": "preset",
|
|
253532
|
+
"kind": "flag",
|
|
253533
|
+
"type": "string",
|
|
253534
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253535
|
+
},
|
|
253536
|
+
{
|
|
253537
|
+
"name": "excludeActions",
|
|
253538
|
+
"kind": "flag",
|
|
253539
|
+
"type": "string",
|
|
253540
|
+
"description": "Comma-separated action names whose per-action documentation lines are dropped from the prompt (core preset)."
|
|
253541
|
+
}
|
|
253542
|
+
],
|
|
253543
|
+
"constraints": null,
|
|
253544
|
+
"inputSchema": {
|
|
253545
|
+
"type": "object",
|
|
253546
|
+
"properties": {
|
|
253547
|
+
"preset": {
|
|
253548
|
+
"type": "string",
|
|
253549
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253550
|
+
},
|
|
253551
|
+
"excludeActions": {
|
|
253552
|
+
"type": "string",
|
|
253553
|
+
"description": "Comma-separated action names whose per-action documentation lines are dropped from the prompt (core preset)."
|
|
253554
|
+
}
|
|
253555
|
+
},
|
|
253556
|
+
"additionalProperties": false
|
|
253557
|
+
},
|
|
253558
|
+
"mutates": false,
|
|
253559
|
+
"idempotency": "idempotent",
|
|
253560
|
+
"supportsTrackedMode": false,
|
|
253561
|
+
"supportsDryRun": false,
|
|
253562
|
+
"outputSchema": {
|
|
253563
|
+
"type": "object",
|
|
253564
|
+
"properties": {
|
|
253565
|
+
"prompt": {
|
|
253566
|
+
"type": "string"
|
|
253567
|
+
}
|
|
253568
|
+
},
|
|
253569
|
+
"required": [
|
|
253570
|
+
"prompt"
|
|
253571
|
+
]
|
|
253572
|
+
},
|
|
253573
|
+
"skipAsATool": true
|
|
253574
|
+
},
|
|
253575
|
+
"doc.preset.getMcpPrompt": {
|
|
253576
|
+
"operationId": "doc.preset.getMcpPrompt",
|
|
253577
|
+
"sdkSurface": "document",
|
|
253578
|
+
"command": "preset get-mcp-prompt",
|
|
253579
|
+
"commandTokens": [
|
|
253580
|
+
"preset",
|
|
253581
|
+
"get-mcp-prompt"
|
|
253582
|
+
],
|
|
253583
|
+
"category": "session",
|
|
253584
|
+
"description": "Return the MCP-flavored system prompt for an LLM-tools preset.",
|
|
253585
|
+
"requiresDocumentContext": false,
|
|
253586
|
+
"docRequirement": "none",
|
|
253587
|
+
"responseEnvelopeKey": null,
|
|
253588
|
+
"params": [
|
|
253589
|
+
{
|
|
253590
|
+
"name": "preset",
|
|
253591
|
+
"kind": "flag",
|
|
253592
|
+
"type": "string",
|
|
253593
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253594
|
+
}
|
|
253595
|
+
],
|
|
253596
|
+
"constraints": null,
|
|
253597
|
+
"inputSchema": {
|
|
253598
|
+
"type": "object",
|
|
253599
|
+
"properties": {
|
|
253600
|
+
"preset": {
|
|
253601
|
+
"type": "string",
|
|
253602
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253603
|
+
}
|
|
253604
|
+
},
|
|
253605
|
+
"additionalProperties": false
|
|
253606
|
+
},
|
|
253607
|
+
"mutates": false,
|
|
253608
|
+
"idempotency": "idempotent",
|
|
253609
|
+
"supportsTrackedMode": false,
|
|
253610
|
+
"supportsDryRun": false,
|
|
253611
|
+
"outputSchema": {
|
|
253612
|
+
"type": "object",
|
|
253613
|
+
"properties": {
|
|
253614
|
+
"prompt": {
|
|
253615
|
+
"type": "string"
|
|
253616
|
+
}
|
|
253617
|
+
},
|
|
253618
|
+
"required": [
|
|
253619
|
+
"prompt"
|
|
253620
|
+
]
|
|
253621
|
+
},
|
|
253622
|
+
"skipAsATool": true
|
|
253623
|
+
},
|
|
253624
|
+
"doc.preset.dispatch": {
|
|
253625
|
+
"operationId": "doc.preset.dispatch",
|
|
253626
|
+
"sdkSurface": "document",
|
|
253627
|
+
"command": "preset dispatch",
|
|
253628
|
+
"commandTokens": [
|
|
253629
|
+
"preset",
|
|
253630
|
+
"dispatch"
|
|
253631
|
+
],
|
|
253632
|
+
"category": "core",
|
|
253633
|
+
"description": "Dispatch an LLM tool call through the named preset's dispatcher against the active session's live document. Used by cross-language SDKs (e.g. Python) to proxy preset behavior over the CLI.",
|
|
253634
|
+
"requiresDocumentContext": false,
|
|
253635
|
+
"docRequirement": "none",
|
|
253636
|
+
"responseEnvelopeKey": null,
|
|
253637
|
+
"params": [
|
|
253638
|
+
{
|
|
253639
|
+
"name": "sessionId",
|
|
253640
|
+
"kind": "flag",
|
|
253641
|
+
"type": "string",
|
|
253642
|
+
"flag": "session",
|
|
253643
|
+
"description": "Session ID for multi-session workflows. Optional when only one session is open."
|
|
253644
|
+
},
|
|
253645
|
+
{
|
|
253646
|
+
"name": "expectedRevision",
|
|
253647
|
+
"kind": "flag",
|
|
253648
|
+
"type": "number",
|
|
253649
|
+
"flag": "expected-revision",
|
|
253650
|
+
"agentVisible": false
|
|
253651
|
+
},
|
|
253652
|
+
{
|
|
253653
|
+
"name": "toolName",
|
|
253654
|
+
"kind": "flag",
|
|
253655
|
+
"type": "string",
|
|
253656
|
+
"flag": "tool-name",
|
|
253657
|
+
"required": true,
|
|
253658
|
+
"description": "Tool name to dispatch (e.g. superdoc_perform_action, superdoc_inspect, superdoc_execute_code)."
|
|
253659
|
+
},
|
|
253660
|
+
{
|
|
253661
|
+
"name": "args",
|
|
253662
|
+
"kind": "jsonFlag",
|
|
253663
|
+
"type": "json",
|
|
253664
|
+
"flag": "args-json",
|
|
253665
|
+
"description": "Tool arguments as a JSON object (matches the preset tool input schema)."
|
|
253666
|
+
},
|
|
253667
|
+
{
|
|
253668
|
+
"name": "excludeActions",
|
|
253669
|
+
"kind": "flag",
|
|
253670
|
+
"type": "string",
|
|
253671
|
+
"description": "Comma-separated action names to refuse at dispatch (defense-in-depth for a narrowed tool surface)."
|
|
253672
|
+
},
|
|
253673
|
+
{
|
|
253674
|
+
"name": "preset",
|
|
253675
|
+
"kind": "flag",
|
|
253676
|
+
"type": "string",
|
|
253677
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253678
|
+
}
|
|
253679
|
+
],
|
|
253680
|
+
"constraints": null,
|
|
253681
|
+
"inputSchema": {
|
|
253682
|
+
"type": "object",
|
|
253683
|
+
"properties": {
|
|
253684
|
+
"toolName": {
|
|
253685
|
+
"type": "string",
|
|
253686
|
+
"description": "Tool name to dispatch (e.g. superdoc_perform_action, superdoc_inspect, superdoc_execute_code)."
|
|
253687
|
+
},
|
|
253688
|
+
"args": {
|
|
253689
|
+
"type": "object",
|
|
253690
|
+
"description": "Tool arguments as a JSON object (matches the preset tool input schema)."
|
|
253691
|
+
},
|
|
253692
|
+
"excludeActions": {
|
|
253693
|
+
"type": "string",
|
|
253694
|
+
"description": "Comma-separated action names to refuse at dispatch (defense-in-depth for a narrowed tool surface)."
|
|
253695
|
+
},
|
|
253696
|
+
"preset": {
|
|
253697
|
+
"type": "string",
|
|
253698
|
+
"description": "Preset id. Defaults to the SDK default preset (legacy)."
|
|
253699
|
+
}
|
|
253700
|
+
},
|
|
253701
|
+
"required": [
|
|
253702
|
+
"toolName"
|
|
253703
|
+
],
|
|
253704
|
+
"additionalProperties": false
|
|
253705
|
+
},
|
|
253706
|
+
"mutates": true,
|
|
253707
|
+
"idempotency": "non-idempotent",
|
|
253708
|
+
"supportsTrackedMode": false,
|
|
253709
|
+
"supportsDryRun": false,
|
|
253710
|
+
"outputSchema": {
|
|
253711
|
+
"type": "object",
|
|
253712
|
+
"properties": {
|
|
253713
|
+
"result": {},
|
|
253714
|
+
"context": {
|
|
253715
|
+
"type": "object",
|
|
253716
|
+
"properties": {
|
|
253717
|
+
"dirty": {
|
|
253718
|
+
"type": "boolean"
|
|
253719
|
+
},
|
|
253720
|
+
"revision": {
|
|
253721
|
+
"type": "number"
|
|
253722
|
+
},
|
|
253723
|
+
"mutated": {
|
|
253724
|
+
"type": "boolean"
|
|
253725
|
+
}
|
|
253726
|
+
}
|
|
253727
|
+
}
|
|
253728
|
+
}
|
|
253729
|
+
},
|
|
253730
|
+
"skipAsATool": true
|
|
253207
253731
|
}
|
|
253208
253732
|
}
|
|
253209
253733
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -80,13 +80,6 @@ class SuperDocDocumentCore {
|
|
|
80
80
|
markClosed() {
|
|
81
81
|
this.boundRuntime.markClosed();
|
|
82
82
|
}
|
|
83
|
-
async formatRange(params, options = {}) {
|
|
84
|
-
const { properties, ...rest } = params;
|
|
85
|
-
return this.boundRuntime.invoke(contract.CONTRACT.operations['doc.format.apply'], {
|
|
86
|
-
...rest,
|
|
87
|
-
inline: properties,
|
|
88
|
-
}, options);
|
|
89
|
-
}
|
|
90
83
|
}
|
|
91
84
|
function attachBoundDocApi(target, api) {
|
|
92
85
|
const { save: _save, close: _close, ...boundMethods } = api;
|
|
@@ -166,6 +159,7 @@ exports.getSkill = skills.getSkill;
|
|
|
166
159
|
exports.installSkill = skills.installSkill;
|
|
167
160
|
exports.listSkills = skills.listSkills;
|
|
168
161
|
exports.chooseTools = tools.chooseTools;
|
|
162
|
+
exports.createAgentToolkit = tools.createAgentToolkit;
|
|
169
163
|
exports.dispatchSuperDocTool = tools.dispatchSuperDocTool;
|
|
170
164
|
exports.getMcpPrompt = tools.getMcpPrompt;
|
|
171
165
|
exports.getSystemPrompt = tools.getSystemPrompt;
|
|
@@ -176,6 +170,8 @@ exports.dispatchIntentTool = intentDispatch_generated.dispatchIntentTool;
|
|
|
176
170
|
exports.DEFAULT_PRESET = presets.DEFAULT_PRESET;
|
|
177
171
|
exports.getPreset = presets.getPreset;
|
|
178
172
|
exports.listPresets = presets.listPresets;
|
|
173
|
+
exports.registerPreset = presets.registerPreset;
|
|
174
|
+
exports.unregisterPreset = presets.unregisterPreset;
|
|
179
175
|
exports.SuperDocClient = SuperDocClient;
|
|
180
176
|
exports.SuperDocDocument = SuperDocDocument;
|
|
181
177
|
exports.createSuperDocClient = createSuperDocClient;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BoundDocApi, type DocCloseBoundParams, type DocCloseResult, type
|
|
1
|
+
import { type BoundDocApi, type DocCloseBoundParams, type DocCloseResult, type DocOpenParams as GeneratedDocOpenParams, type DocOpenResult, type DocSaveBoundParams, type DocSaveResult } from './generated/client.js';
|
|
2
2
|
import { SuperDocRuntime, type SuperDocClientOptions, type InvokeOptions, type OperationSpec, type RuntimeInvoker } from './runtime/process.js';
|
|
3
3
|
/**
|
|
4
4
|
* Wraps a raw runtime and injects a fixed sessionId into every invoke call.
|
|
@@ -14,9 +14,6 @@ declare class BoundRuntime implements RuntimeInvoker {
|
|
|
14
14
|
invoke<TData = unknown>(operation: OperationSpec, params?: Record<string, unknown>, options?: InvokeOptions): Promise<TData>;
|
|
15
15
|
markClosed(): void;
|
|
16
16
|
}
|
|
17
|
-
export interface DocFormatRangeBoundParams extends Omit<DocFormatApplyBoundParams, 'inline'> {
|
|
18
|
-
properties: NonNullable<DocFormatApplyBoundParams['inline']>;
|
|
19
|
-
}
|
|
20
17
|
/**
|
|
21
18
|
* Bound document handle. All document operations are available as typed methods.
|
|
22
19
|
* The handle injects its session id automatically — callers never pass
|
|
@@ -36,7 +33,6 @@ declare class SuperDocDocumentCore {
|
|
|
36
33
|
close(params?: DocCloseBoundParams, options?: InvokeOptions): Promise<DocCloseResult>;
|
|
37
34
|
/** @internal */
|
|
38
35
|
markClosed(): void;
|
|
39
|
-
formatRange(params: DocFormatRangeBoundParams, options?: InvokeOptions): Promise<DocFormatApplyResult>;
|
|
40
36
|
}
|
|
41
37
|
type SuperDocDocumentInstance = SuperDocDocumentCore & BoundDocApi;
|
|
42
38
|
export declare const SuperDocDocument: new (boundRuntime: BoundRuntime, sessionId: string, openResult: DocOpenResult, client: SuperDocClient) => SuperDocDocumentInstance;
|
|
@@ -81,9 +77,15 @@ export declare class SuperDocClient {
|
|
|
81
77
|
}
|
|
82
78
|
export declare function createSuperDocClient(options?: SuperDocClientOptions): SuperDocClient;
|
|
83
79
|
export { getSkill, installSkill, listSkills } from './skills.js';
|
|
84
|
-
export { chooseTools, dispatchSuperDocTool, getMcpPrompt, getSystemPrompt, getSystemPromptForProvider, getToolCatalog, listTools, DEFAULT_PRESET, getPreset, listPresets, } from './tools.js';
|
|
80
|
+
export { chooseTools, dispatchSuperDocTool, getMcpPrompt, getSystemPrompt, getSystemPromptForProvider, getToolCatalog, listTools, DEFAULT_PRESET, getPreset, listPresets, registerPreset, unregisterPreset, } from './tools.js';
|
|
85
81
|
export type { AnthropicSystemPrompt, CacheStrategy, SystemPromptForProviderResult, ToolCatalog, ToolCatalogEntry, ToolCatalogOperation, ToolChooserInput, ToolProvider, } from './tools.js';
|
|
86
82
|
export { dispatchIntentTool } from './generated/intent-dispatch.generated.js';
|
|
83
|
+
export type { BoundDocApi } from './generated/client.js';
|
|
84
|
+
export type { ActionName } from './agent/actions.js';
|
|
85
|
+
export type { AgentReceipt } from './agent/runtime.js';
|
|
86
|
+
export type { GetSystemPromptOptions, GetToolsOptions, GetToolsResult, PresetDescriptor } from './presets.js';
|
|
87
|
+
export { createAgentToolkit } from './tools.js';
|
|
88
|
+
export type { AgentToolkit, CreateAgentToolkitInput } from './tools.js';
|
|
87
89
|
export { SuperDocCliError } from './runtime/errors.js';
|
|
88
90
|
export type { InvokeOptions, OperationSpec, OperationParamSpec, RuntimeInvoker, SuperDocClientOptions, } from './runtime/process.js';
|
|
89
91
|
export type { DocOpenResult } from './generated/client.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,aAAa,IAAI,sBAAsB,EAC5C,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAO9B;;;;;GAKG;AACH,cAAM,YAAa,YAAW,cAAc;IAC1C,OAAO,CAAC,QAAQ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,EACrB,aAAa,EACb,6BAA6B,EAC7B,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAG9E,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9G,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EACV,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -73,13 +73,6 @@ class SuperDocDocumentCore {
|
|
|
73
73
|
markClosed() {
|
|
74
74
|
this.boundRuntime.markClosed();
|
|
75
75
|
}
|
|
76
|
-
async formatRange(params, options = {}) {
|
|
77
|
-
const { properties, ...rest } = params;
|
|
78
|
-
return this.boundRuntime.invoke(CONTRACT.operations['doc.format.apply'], {
|
|
79
|
-
...rest,
|
|
80
|
-
inline: properties,
|
|
81
|
-
}, options);
|
|
82
|
-
}
|
|
83
76
|
}
|
|
84
77
|
function attachBoundDocApi(target, api) {
|
|
85
78
|
const { save: _save, close: _close, ...boundMethods } = api;
|
|
@@ -154,6 +147,7 @@ export function createSuperDocClient(options = {}) {
|
|
|
154
147
|
return new SuperDocClient(options);
|
|
155
148
|
}
|
|
156
149
|
export { getSkill, installSkill, listSkills } from './skills.js';
|
|
157
|
-
export { chooseTools, dispatchSuperDocTool, getMcpPrompt, getSystemPrompt, getSystemPromptForProvider, getToolCatalog, listTools, DEFAULT_PRESET, getPreset, listPresets, } from './tools.js';
|
|
150
|
+
export { chooseTools, dispatchSuperDocTool, getMcpPrompt, getSystemPrompt, getSystemPromptForProvider, getToolCatalog, listTools, DEFAULT_PRESET, getPreset, listPresets, registerPreset, unregisterPreset, } from './tools.js';
|
|
158
151
|
export { dispatchIntentTool } from './generated/intent-dispatch.generated.js';
|
|
152
|
+
export { createAgentToolkit } from './tools.js';
|
|
159
153
|
export { SuperDocCliError } from './runtime/errors.js';
|