@superdoc/sdk 2.25.0-next.1 → 2.25.0-next.10

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 (46) hide show
  1. package/dist/agent/action-change-mode.cjs +6 -0
  2. package/dist/agent/action-change-mode.d.ts +1 -0
  3. package/dist/agent/action-change-mode.js +5 -0
  4. package/dist/agent/action-descriptors.json +2 -2
  5. package/dist/agent/actions.cjs +886 -530
  6. package/dist/agent/actions.d.ts +2 -0
  7. package/dist/agent/actions.js +887 -531
  8. package/dist/agent/catalog.cjs +5 -0
  9. package/dist/agent/catalog.js +5 -0
  10. package/dist/agent/doc-snapshot.cjs +10 -6
  11. package/dist/agent/doc-snapshot.d.ts +4 -1
  12. package/dist/agent/doc-snapshot.js +10 -6
  13. package/dist/agent/ir.d.ts +3 -0
  14. package/dist/embedded-prompts.generated.cjs +2 -1
  15. package/dist/embedded-prompts.generated.js +2 -1
  16. package/dist/embedded-tools.generated.cjs +5 -5
  17. package/dist/embedded-tools.generated.js +5 -5
  18. package/dist/generated/client.d.ts +534 -0
  19. package/dist/generated/contract.cjs +1 -1
  20. package/dist/generated/contract.js +1 -1
  21. package/dist/presets/core.cjs +2 -1
  22. package/dist/presets/core.d.ts +1 -0
  23. package/dist/presets/core.js +2 -2
  24. package/dist/presets/full.cjs +1804 -0
  25. package/dist/presets/full.d.ts +39 -0
  26. package/dist/presets/full.js +1795 -0
  27. package/dist/presets.cjs +2 -0
  28. package/dist/presets.js +2 -0
  29. package/dist/prompts/full-addendum.md +40 -0
  30. package/dist/prompts/system-prompt.md +3 -2
  31. package/dist/runtime/document-rpc.cjs +2 -8
  32. package/dist/runtime/document-rpc.js +2 -8
  33. package/dist/runtime/sdk-version.generated.cjs +1 -1
  34. package/dist/runtime/sdk-version.generated.d.ts +1 -1
  35. package/dist/runtime/sdk-version.generated.js +1 -1
  36. package/dist/runtime/tracked-support.cjs +11 -0
  37. package/dist/runtime/tracked-support.d.ts +6 -0
  38. package/dist/runtime/tracked-support.js +7 -0
  39. package/package.json +6 -6
  40. package/tools/catalog.json +9 -0
  41. package/tools/generation-receipt.json +20 -19
  42. package/tools/tools-policy.json +1 -1
  43. package/tools/tools.anthropic.json +9 -0
  44. package/tools/tools.generic.json +9 -0
  45. package/tools/tools.openai.json +9 -0
  46. package/tools/tools.vercel.json +9 -0
@@ -3,6 +3,10 @@
3
3
  var documentEvidence = require('../runtime/document-evidence.cjs');
4
4
  var operationCatalog = require('./operation-catalog.cjs');
5
5
 
6
+ const unboundDocuments = new WeakMap();
7
+ function withoutActionChangeMode(document) {
8
+ return unboundDocuments.get(document) ?? document;
9
+ }
6
10
  function bindActionChangeMode(document, changeMode) {
7
11
  const wrap = (value, path, owner) => new Proxy(value, {
8
12
  get(target, property, receiver) {
@@ -29,7 +33,9 @@ function bindActionChangeMode(document, changeMode) {
29
33
  });
30
34
  const wrapped = wrap(document, []);
31
35
  documentEvidence.forwardDocumentEvidence(document, wrapped);
36
+ unboundDocuments.set(wrapped, document);
32
37
  return wrapped;
33
38
  }
34
39
 
35
40
  exports.bindActionChangeMode = bindActionChangeMode;
41
+ exports.withoutActionChangeMode = withoutActionChangeMode;
@@ -1,3 +1,4 @@
1
1
  import type { BoundDocApi } from '../generated/client.js';
2
2
  import type { AgentChangeMode } from './ir.js';
3
+ export declare function withoutActionChangeMode(document: BoundDocApi): BoundDocApi;
3
4
  export declare function bindActionChangeMode(document: BoundDocApi, changeMode: AgentChangeMode): BoundDocApi;
@@ -1,5 +1,9 @@
1
1
  import { forwardDocumentEvidence } from '../runtime/document-evidence.js';
2
2
  import { getOperationCatalogEntry } from './operation-catalog.js';
3
+ const unboundDocuments = new WeakMap();
4
+ export function withoutActionChangeMode(document) {
5
+ return unboundDocuments.get(document) ?? document;
6
+ }
3
7
  export function bindActionChangeMode(document, changeMode) {
4
8
  const wrap = (value, path, owner) => new Proxy(value, {
5
9
  get(target, property, receiver) {
@@ -26,5 +30,6 @@ export function bindActionChangeMode(document, changeMode) {
26
30
  });
27
31
  const wrapped = wrap(document, []);
28
32
  forwardDocumentEvidence(document, wrapped);
33
+ unboundDocuments.set(wrapped, document);
29
34
  return wrapped;
30
35
  }
@@ -14,10 +14,10 @@
14
14
  "operations": ["create.heading"]
15
15
  },
16
16
  "replace_text": {
17
- "hint": "edits[{find,replace,occurrence?}], optional selector to scope replacements to one inspected block, caseSensitive?, expectedRevision?, changeMode? — for EDITING existing wording only; keep find/replace spans MINIMAL (the words that change, not the whole paragraph). When the find appears more than once in the selected block and only one should change, set that edit's occurrence (1-based match number within the block; requires selector; this is not selector.occurrence, which picks a block). NEVER use it to append a new sentence/clause/paragraph (use insert_paragraphs)",
17
+ "hint": "edits[{find,replace,occurrence?}], optional selector to scope replacements to one inspected block, caseSensitive?, expectedRevision?, changeMode?, granularity? (tracked only: \"range\" records each find as one deletion plus one insertion, what reviewers expect when a sentence or clause is reworded) — for EDITING existing wording only; keep find/replace spans MINIMAL (the words that change, not the whole paragraph). When the find appears more than once in the selected block and only one should change, set that edit's occurrence (1-based match number within the block; requires selector; this is not selector.occurrence, which picks a block). NEVER use it to append a new sentence/clause/paragraph (use insert_paragraphs)",
18
18
  "group": "Text/structure actions",
19
19
  "groupOrder": 2,
20
- "args": ["edits", "selector", "caseSensitive", "expectedRevision", "changeMode"],
20
+ "args": ["edits", "selector", "caseSensitive", "expectedRevision", "changeMode", "granularity"],
21
21
  "operations": ["replace"]
22
22
  },
23
23
  "delete_text": {