@markupai/sidebar-adapter 2.4.0 → 2.5.0
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/README.md +41 -8
- package/asyncapi.json +62 -5
- package/dist/adapters/pluginAdapter.d.ts +6 -2
- package/dist/adapters/pluginAdapter.d.ts.map +1 -1
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/ipc/call-signatures.d.ts +8 -0
- package/dist/ipc/call-signatures.d.ts.map +1 -1
- package/dist/ipc/index.d.ts +4 -4
- package/dist/ipc/index.d.ts.map +1 -1
- package/dist/ipc/ipc-core.d.ts +31 -2
- package/dist/ipc/ipc-core.d.ts.map +1 -1
- package/dist/ipc/message-types.d.ts +35 -4
- package/dist/ipc/message-types.d.ts.map +1 -1
- package/dist/ipc/plugin-ipc-adapter.d.ts +6 -2
- package/dist/ipc/plugin-ipc-adapter.d.ts.map +1 -1
- package/dist/ipc/replace-progress.d.ts +9 -0
- package/dist/ipc/replace-progress.d.ts.map +1 -0
- package/dist/main.js +399 -303
- package/dist/main.umd.cjs +7 -7
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/pluginInterface.d.ts +12 -1
- package/dist/types/pluginInterface.d.ts.map +1 -1
- package/dist/types/progress.d.ts +18 -0
- package/dist/types/progress.d.ts.map +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -137,13 +137,24 @@ await adapter.selectContent({ start: 0, end: 11 }, content.documentReference);
|
|
|
137
137
|
await adapter.replaceContent("Hello universe", { start: 0, end: 11 }, content.documentReference);
|
|
138
138
|
|
|
139
139
|
// Replace multiple contents in the editor
|
|
140
|
-
|
|
140
|
+
const replacements = [
|
|
141
141
|
{ suggestion: "Hello universe", range: { start: 0, end: 11 } },
|
|
142
142
|
{ suggestion: "bar", range: { start: 20, end: 23 } },
|
|
143
|
-
]
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
];
|
|
144
|
+
await adapter.replaceMultipleContents(replacements);
|
|
145
|
+
|
|
146
|
+
// A large batch can need longer than the default 10 s: pass a timeout (ms) as
|
|
147
|
+
// the trailing argument. It stays on the sidebar side and is not sent to the host.
|
|
148
|
+
// It is capped at MAX_IPC_TIMEOUT_MS (about 24.8 days), so Infinity waits that
|
|
149
|
+
// long; NaN, 0 or a negative value uses the configured timeout instead (the
|
|
150
|
+
// configured one follows the same rule). A timeout error names a replaced value.
|
|
151
|
+
// `onProgress` is called while the host works (see "Progress of a batch");
|
|
152
|
+
// `onLateResult` once, when the host answers after the timeout.
|
|
153
|
+
await adapter.replaceMultipleContents(replacements, {
|
|
154
|
+
timeout: 60_000,
|
|
155
|
+
onProgress: ({ total, applied }) => console.log(`${applied.length} of ${total}`),
|
|
156
|
+
onLateResult: (result) => console.log(result.status),
|
|
157
|
+
});
|
|
147
158
|
|
|
148
159
|
// Clean up when done
|
|
149
160
|
adapter.destroy();
|
|
@@ -549,7 +560,7 @@ try {
|
|
|
549
560
|
}
|
|
550
561
|
```
|
|
551
562
|
|
|
552
|
-
For `replaceMultipleContents`, throw `ReplaceBatchError` when the batch could not be applied in full and you know which ranges landed. It extends `TextLookupError` and carries `applied` (`ContentRange[]`) and `failed` (`ReplaceBatchFailedRange[]`), the ranges as they were sent; a range in neither list was left untouched. The sidebar resolves the applied occurrences, invalidates the failed ones, and leaves the rest active. The error's `message` describes the batch, so it is shown only on the card the user applied from. Give a failed range its own `message` to explain that one occurrence on its card; without one, the sidebar shows its own "text could not be found" message. A host that verifies every range before editing throws it with an empty `applied`; a plain `TextLookupError` is still accepted and treated as a failure of the whole batch.
|
|
563
|
+
For `replaceMultipleContents`, throw `ReplaceBatchError` when the batch could not be applied in full and you know which ranges landed. It extends `TextLookupError` and carries `applied` (`ContentRange[]`) and `failed` (`ReplaceBatchFailedRange[]`), the ranges as they were sent; a range in neither list was left untouched, unless it was reported as applied before (see [Progress of a batch](#progress-of-a-batch)). The sidebar resolves the applied occurrences, invalidates the failed ones, and leaves the rest active. The error's `message` describes the batch, so it is shown only on the card the user applied from. Give a failed range its own `message` to explain that one occurrence on its card; without one, the sidebar shows its own "text could not be found" message. A host that verifies every range before editing throws it with an empty `applied`; a plain `TextLookupError` is still accepted and treated as a failure of the whole batch.
|
|
553
564
|
|
|
554
565
|
```typescript
|
|
555
566
|
import { ReplaceBatchError } from "@markupai/sidebar-adapter";
|
|
@@ -571,6 +582,28 @@ if (unverifiable.length > 0) {
|
|
|
571
582
|
|
|
572
583
|
Non-JS ports serialize it as `{ name: "ReplaceBatchError", message, applied, failed }` — see `ReplaceBatchErrorPayload` in `asyncapi.json`.
|
|
573
584
|
|
|
585
|
+
### Progress of a batch
|
|
586
|
+
|
|
587
|
+
A host can report which places it has replaced while it works on `replaceMultipleContents`. The adapter hands it `reportProgress` in an optional second parameter:
|
|
588
|
+
|
|
589
|
+
```typescript
|
|
590
|
+
replaceMultipleContents: async (replacements, context) => {
|
|
591
|
+
const applied: ContentRange[] = [];
|
|
592
|
+
for (const { suggestion, range } of replacements) {
|
|
593
|
+
await replaceInEditor(suggestion, range);
|
|
594
|
+
applied.push(range);
|
|
595
|
+
context?.reportProgress?.({ total: replacements.length, applied });
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
- Report a range only after its edit is in the document. The sidebar settles it at once, also when the call fails later.
|
|
601
|
+
- List every range applied so far, as it was sent in the call. An empty `applied` says that the host is still working.
|
|
602
|
+
- Reports carry no failures. Throw `ReplaceBatchError` for those, and include every reported range in its `applied`.
|
|
603
|
+
- A report does not change the timeout of the call, never throws, and expects no reply.
|
|
604
|
+
|
|
605
|
+
On the sidebar side, `onProgress` receives the reports. A call that times out rejects with `IpcTimeoutError` (`isIpcTimeoutError`). The host may still be working, so reports that arrive later still reach `onProgress`, and the final answer reaches `onLateResult`. The call is forgotten 5 minutes after its timeout (`LATE_RESULT_WINDOW_MS`): anything the host sends after that is dropped. Non-JS ports send `{ type: "progress", id, name, data }` with the id and name of the call; see `ReplaceProgress` in `asyncapi.json`. A sidebar that does not know the type ignores it.
|
|
606
|
+
|
|
574
607
|
Note: We document thrown errors via JSDoc `@throws` on the plugin interface and export union types `SelectContentError`, `ReplaceContentError` and `ReplaceMultipleContentsError` for control-flow typing when catching.
|
|
575
608
|
|
|
576
609
|
### Message Format
|
|
@@ -741,7 +774,7 @@ getInitConfig: async () => ({
|
|
|
741
774
|
});
|
|
742
775
|
```
|
|
743
776
|
|
|
744
|
-
With it on, the sidebar retains check results and issue decisions **per document** — switching away from a document and back restores its issues, resolved/dismissed state, and tab selection exactly as the user left them. With it off (or omitted, the default), the sidebar holds one shared check state regardless of any `notifyActiveDocumentChanged` calls you make.
|
|
777
|
+
With it on, the sidebar retains check results and issue decisions **per document** — switching away from a document and back restores its issues, resolved/dismissed state, and tab selection exactly as the user left them. With it off (or omitted, the default), the sidebar holds one shared check state regardless of any `notifyActiveDocumentChanged` calls you make; the only effect of such a call naming a different document is that the Style category filter is cleared, since it was picked for the previous document's results. Pass the same `documentReference` your `getContent` / `getSelectedContent` responses carry for that document: a different format makes every call look like a switch, so the filter would be cleared even when the user stays on the same document.
|
|
745
778
|
|
|
746
779
|
**In-flight checks keep running in the background.** Calling `notifyActiveDocumentChanged` — including with `null`, e.g. because the user closed the document's tab — does **not** stop a check already running against the outgoing document; it keeps streaming `onAgenticAgentResults`/`onAgenticStreamComplete` (tagged with its own `documentReference`) until it finishes, even after the document is no longer active or open in your host. There is currently **no host-facing RPC to cancel it** — cancellation is a sidebar-UI-only affordance (the Cancel button), not something `SidebarAdapter` exposes today. If your host needs to stop wasted work when a document closes mid-check, that isn't possible through this contract yet.
|
|
747
780
|
|
|
@@ -853,7 +886,7 @@ addComment: async (comment, documentReference) => {
|
|
|
853
886
|
|
|
854
887
|
`CommentRequest` carries:
|
|
855
888
|
|
|
856
|
-
- `text` — a plain-text body the sidebar composes: a `Markup AI ·` heading with the issue's category (or agent name), the explanation, and
|
|
889
|
+
- `text` — a plain-text body the sidebar composes: a `Markup AI ·` heading with the issue's category (or agent name), the explanation, and every suggestion when there are any, on one line labelled `Suggestion:` or `Suggestions:`. Post it as-is, or ignore it and build your own body from `issue`.
|
|
857
890
|
- `range` — the issue's `[start, end)` offsets, with the same semantics as `selectContent`/`replaceContent`. Resolve it the same way you do for highlighting.
|
|
858
891
|
- `issue` — the structured `AgenticIssuePayload` (category, explanation, suggestions, severity, …).
|
|
859
892
|
|
package/asyncapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"asyncapi": "3.0.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Markup AI Sidebar IPC contract",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.5.0",
|
|
6
6
|
"description": "Bidirectional RPC-over-postMessage contract between the Markup AI sidebar and its host. Generated from the @markupai/sidebar-adapter TypeScript types — do not hand-edit."
|
|
7
7
|
},
|
|
8
8
|
"channels": {
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
"replaceMultipleContents_response": {
|
|
29
29
|
"$ref": "#/components/messages/replaceMultipleContents_response"
|
|
30
30
|
},
|
|
31
|
+
"replaceMultipleContents_progress": {
|
|
32
|
+
"$ref": "#/components/messages/replaceMultipleContents_progress"
|
|
33
|
+
},
|
|
31
34
|
"getInitConfig_call": { "$ref": "#/components/messages/getInitConfig_call" },
|
|
32
35
|
"getInitConfig_response": { "$ref": "#/components/messages/getInitConfig_response" },
|
|
33
36
|
"onAgenticAgentResults_call": {
|
|
@@ -184,14 +187,15 @@
|
|
|
184
187
|
"action": "send",
|
|
185
188
|
"channel": { "$ref": "#/channels/sidebarToPlugin" },
|
|
186
189
|
"title": "replaceMultipleContents",
|
|
187
|
-
"description": "Replace multiple contents.",
|
|
190
|
+
"description": "Replace multiple contents. The plugin may send progress messages before it answers.",
|
|
188
191
|
"x-optional": false,
|
|
189
192
|
"messages": [{ "$ref": "#/channels/sidebarToPlugin/messages/replaceMultipleContents_call" }],
|
|
190
193
|
"reply": {
|
|
191
194
|
"channel": { "$ref": "#/channels/sidebarToPlugin" },
|
|
192
195
|
"messages": [
|
|
193
196
|
{ "$ref": "#/channels/sidebarToPlugin/messages/replaceMultipleContents_response" },
|
|
194
|
-
{ "$ref": "#/channels/sidebarToPlugin/messages/ipc_error" }
|
|
197
|
+
{ "$ref": "#/channels/sidebarToPlugin/messages/ipc_error" },
|
|
198
|
+
{ "$ref": "#/channels/sidebarToPlugin/messages/replaceMultipleContents_progress" }
|
|
195
199
|
]
|
|
196
200
|
}
|
|
197
201
|
},
|
|
@@ -675,6 +679,22 @@
|
|
|
675
679
|
}
|
|
676
680
|
}
|
|
677
681
|
},
|
|
682
|
+
"replaceMultipleContents_progress": {
|
|
683
|
+
"name": "replaceMultipleContents_progress",
|
|
684
|
+
"title": "progress replaceMultipleContents",
|
|
685
|
+
"payload": {
|
|
686
|
+
"title": "replaceMultipleContents_progress",
|
|
687
|
+
"type": "object",
|
|
688
|
+
"additionalProperties": false,
|
|
689
|
+
"required": ["type", "id", "name", "data"],
|
|
690
|
+
"properties": {
|
|
691
|
+
"type": { "const": "progress" },
|
|
692
|
+
"id": { "type": "integer" },
|
|
693
|
+
"name": { "const": "replaceMultipleContents" },
|
|
694
|
+
"data": { "$ref": "#/components/schemas/ReplaceProgress" }
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
},
|
|
678
698
|
"getInitConfig_call": {
|
|
679
699
|
"name": "getInitConfig_call",
|
|
680
700
|
"title": "call getInitConfig",
|
|
@@ -1711,6 +1731,42 @@
|
|
|
1711
1731
|
"description": "The `getInitConfig` reply as it crosses the IPC boundary: the integration's {@link SidebarConfig } plus the host adapter's own version stamp.\n\n`hostAdapterVersion` is written by the host-side adapter itself from its compiled-in {@link ADAPTER_VERSION } ; it always overwrites whatever the integration returned. Integrations never set it — their {@link PluginInterface.getInitConfig } keeps returning a plain `SidebarConfig`. The sidebar-side adapter strips it again before handing the config to the sidebar app and exposes it through `PluginAdapter.getHostAdapterVersion()`. Non-JS host ports set it themselves from their own version.",
|
|
1712
1732
|
"title": "InitConfigResponse"
|
|
1713
1733
|
},
|
|
1734
|
+
"ReplaceMultipleContext": {
|
|
1735
|
+
"type": "object",
|
|
1736
|
+
"properties": {
|
|
1737
|
+
"reportProgress": {
|
|
1738
|
+
"$comment": "(progress: ReplaceProgress) => void",
|
|
1739
|
+
"type": "object",
|
|
1740
|
+
"properties": {
|
|
1741
|
+
"namedArgs": {
|
|
1742
|
+
"type": "object",
|
|
1743
|
+
"properties": { "progress": { "$ref": "#/components/schemas/ReplaceProgress" } },
|
|
1744
|
+
"required": ["progress"],
|
|
1745
|
+
"additionalProperties": false
|
|
1746
|
+
}
|
|
1747
|
+
},
|
|
1748
|
+
"description": "Report which places are replaced so far. Best effort: it never throws, returns nothing to wait for, and does not change the call's timeout."
|
|
1749
|
+
}
|
|
1750
|
+
},
|
|
1751
|
+
"additionalProperties": false,
|
|
1752
|
+
"description": "What the adapter hands the host with a `replaceMultipleContents` call.",
|
|
1753
|
+
"title": "ReplaceMultipleContext"
|
|
1754
|
+
},
|
|
1755
|
+
"ReplaceProgress": {
|
|
1756
|
+
"type": "object",
|
|
1757
|
+
"properties": {
|
|
1758
|
+
"total": { "type": "number", "description": "How many places the host is replacing." },
|
|
1759
|
+
"applied": {
|
|
1760
|
+
"type": "array",
|
|
1761
|
+
"items": { "$ref": "#/components/schemas/ContentRange" },
|
|
1762
|
+
"description": "Every range replaced so far, as it was sent in the call. List a range only after its edit is in the document: the sidebar settles it at once."
|
|
1763
|
+
}
|
|
1764
|
+
},
|
|
1765
|
+
"required": ["total", "applied"],
|
|
1766
|
+
"additionalProperties": false,
|
|
1767
|
+
"description": "Wire shape of the `data` of a `progress` message for `replaceMultipleContents`: which places are in the document already.\n\nIt carries no failures; those come with the error that ends the call. An empty `applied` says that the host is still working.",
|
|
1768
|
+
"title": "ReplaceProgress"
|
|
1769
|
+
},
|
|
1714
1770
|
"PluginInterface": {
|
|
1715
1771
|
"type": "object",
|
|
1716
1772
|
"properties": {
|
|
@@ -1756,7 +1812,7 @@
|
|
|
1756
1812
|
"description": "Select or highlight content in the editor using document character offsets only."
|
|
1757
1813
|
},
|
|
1758
1814
|
"replaceMultipleContents": {
|
|
1759
|
-
"$comment": "(replacements: ContentReplacement[]) => Promise<void>",
|
|
1815
|
+
"$comment": "(\n replacements: ContentReplacement[],\n context?: ReplaceMultipleContext) => Promise<void>",
|
|
1760
1816
|
"type": "object",
|
|
1761
1817
|
"properties": {
|
|
1762
1818
|
"namedArgs": {
|
|
@@ -1765,7 +1821,8 @@
|
|
|
1765
1821
|
"replacements": {
|
|
1766
1822
|
"type": "array",
|
|
1767
1823
|
"items": { "$ref": "#/components/schemas/ContentReplacement" }
|
|
1768
|
-
}
|
|
1824
|
+
},
|
|
1825
|
+
"context": { "$ref": "#/components/schemas/ReplaceMultipleContext" }
|
|
1769
1826
|
},
|
|
1770
1827
|
"required": ["replacements"],
|
|
1771
1828
|
"additionalProperties": false
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CallOptions, IPCConfig } from "../ipc/message-types.js";
|
|
1
|
+
import type { CallOptions, IPCConfig, ProgressCallOptions } from "../ipc/message-types.js";
|
|
2
|
+
import type { ProgressPayloads } from "../ipc/call-signatures.js";
|
|
2
3
|
import type { CommentRequest, ContentRange, ContentReplacement, ContentInfo, SidebarConfig, SidebarBuildInfo, SidebarInterface, AgenticIssuePayload, IntegrationSettingsValues, IntegrationSettingsChangeMeta } from "../types/index.js";
|
|
3
4
|
/**
|
|
4
5
|
* PluginAdapter - Use in the Sidebar to communicate with the Plugin in the editor
|
|
@@ -51,8 +52,11 @@ export declare class PluginAdapter {
|
|
|
51
52
|
selectContent(range: ContentRange, documentReference?: string | null): Promise<void>;
|
|
52
53
|
/**
|
|
53
54
|
* Replace multiple contents in the editor
|
|
55
|
+
* @param options - Optional per-call overrides (e.g. timeout in ms; overrides default IPC timeout)
|
|
56
|
+
* and callbacks for the host's progress reports and for an answer after the timeout. They stay
|
|
57
|
+
* on the sidebar side.
|
|
54
58
|
*/
|
|
55
|
-
replaceMultipleContents(replacements: ContentReplacement[]): Promise<void>;
|
|
59
|
+
replaceMultipleContents(replacements: ContentReplacement[], options?: ProgressCallOptions<ProgressPayloads["replaceMultipleContents"]>): Promise<void>;
|
|
56
60
|
/**
|
|
57
61
|
* Notify plugin that one agent's results are available (streaming).
|
|
58
62
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/pluginAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"pluginAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/pluginAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAEjB;;;;;;;GAOG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAE9C,YAAY,OAAO,CAAC,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,MAAM,EAGhF;IAED;;OAEG;IACI,OAAO,IAAI,IAAI,CAGrB;IAED;;;;;OAKG;IACU,aAAa,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,CAGtF;IAED;;;;;;;OAOG;IACI,qBAAqB,IAAI,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AAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7C;IAED;;;;;OAKG;IACI,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAElD;IAED;;;;;;OAMG;IACI,UAAU,CACf,OAAO,EAAE,cAAc,EACvB,iBAAiB,GAAE,MAAM,GAAG,IAAW,GACtC,OAAO,CAAC,IAAI,CAAC,CAEf;IAED;;;;;OAKG;IACI,2BAA2B,CAChC,MAAM,EAAE,yBAAyB,EACjC,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,IAAI,CAAC,CAEf;IAED;;OAEG;IACI,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAExC;IAED;;OAEG;IACI,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAEjD;IAED;;OAEG;IACI,eAAe,IAAI,MAAM,CAE/B;CACF"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -35,6 +35,18 @@ export declare class ReplaceBatchError extends TextLookupError {
|
|
|
35
35
|
readonly failed: ReplaceBatchFailedRange[];
|
|
36
36
|
constructor(message: string, outcome: ReplaceBatchOutcome);
|
|
37
37
|
}
|
|
38
|
+
/** Rejection of an IPC call that got no answer within its timeout. */
|
|
39
|
+
export declare class IpcTimeoutError extends Error {
|
|
40
|
+
readonly name: string;
|
|
41
|
+
/**
|
|
42
|
+
* `requestedMs` is the timeout the caller gave when it could not be used as
|
|
43
|
+
* is (see `MAX_IPC_TIMEOUT_MS`); the message names it, so the caller's bug is
|
|
44
|
+
* visible where the timeout surfaces.
|
|
45
|
+
*/
|
|
46
|
+
constructor(method: string, timeoutMs: number, requestedMs?: number);
|
|
47
|
+
}
|
|
48
|
+
/** Type guard for IpcTimeoutError: the call timed out, and the host may still be working. */
|
|
49
|
+
export declare function isIpcTimeoutError(error: unknown): error is IpcTimeoutError;
|
|
38
50
|
/**
|
|
39
51
|
* Type guard for ReplaceBatchError. Check it before `isTextLookupError` when
|
|
40
52
|
* catching from `replaceMultipleContents`: every ReplaceBatchError is also a
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;GAOG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,SAAkB,IAAI,EAAE,MAAM,CAAqB;IAEnD,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED,+FAA+F;AAC/F,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,oGAAoG;IACpG,MAAM,EAAE,uBAAuB,EAAE,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,qBAAa,iBAAkB,SAAQ,eAAe;IACpD,SAAkB,IAAI,EAAE,MAAM,CAAuB;IACrD,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAE3C,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAKxD;CACF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E;AAoBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,eAAe;I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IG;IACH,YAAY,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAMlE;CACF;AAED,6FAA6F;AAC7F,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E;AAoBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,KAAK,KAAK,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CASrE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,KAAK,CAW/D"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { CommentRequest, ContentRange, ContentReplacement, ContentInfo, InitConfigResponse, SidebarBuildInfo, AgenticIssuePayload, PluginStatusType } from "../types/common.js";
|
|
2
|
+
import type { ReplaceProgress } from "../types/progress.js";
|
|
2
3
|
import type { IntegrationSettingsValues, IntegrationSettingsChangeMeta, IntegrationSettingsPatch, IntegrationSettingsSnapshot } from "../types/integrationSettings.js";
|
|
4
|
+
/**
|
|
5
|
+
* The payload of a `progress` message, per method that reports progress. A new
|
|
6
|
+
* method that reports adds an entry here.
|
|
7
|
+
*/
|
|
8
|
+
export interface ProgressPayloads {
|
|
9
|
+
replaceMultipleContents: ReplaceProgress;
|
|
10
|
+
}
|
|
3
11
|
/**
|
|
4
12
|
* Call signatures for all bidirectional IPC communication.
|
|
5
13
|
* This interface maps method names to their parameter types and return types.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-signatures.d.ts","sourceRoot":"","sources":["../../src/ipc/call-signatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,6BAA6B,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAK7B;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAEnC;;OAEG;IACH,kBAAkB,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3C;;;;;;OAMG;IACH,cAAc,CACZ,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,YAAY,EACnB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;OAMG;IACH,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErF;;OAEG;IACH,uBAAuB,CAAC,YAAY,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3E;;;;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
|
|
1
1
|
export { DeferredPromise } from "./deferred-promise.js";
|
|
2
|
-
export { IPCCore } from "./ipc-core.js";
|
|
3
|
-
export type { ReceiverFn } from "./ipc-core.js";
|
|
2
|
+
export { IPCCore, LATE_RESULT_WINDOW_MS, MAX_IPC_TIMEOUT_MS } from "./ipc-core.js";
|
|
3
|
+
export type { ReceiverFn, ProgressReceiverFn } from "./ipc-core.js";
|
|
4
4
|
export { PluginIPCAdapter } from "./plugin-ipc-adapter.js";
|
|
5
5
|
export { SidebarIPCAdapter } from "./sidebar-ipc-adapter.js";
|
|
6
|
-
export type { MessageBase, CallMessage, ResponseMessage, ErrorMessage, IPCMessage, IPCConfig, CallOptions, } from "./message-types.js";
|
|
6
|
+
export type { MessageBase, CallMessage, ResponseMessage, ErrorMessage, ProgressMessage, IPCMessage, IPCConfig, CallOptions, ProgressCallOptions, LateResult, } from "./message-types.js";
|
|
7
7
|
export { DEFAULT_IPC_CONFIG } from "./message-types.js";
|
|
8
|
-
export type { CallSignatures } from "./call-signatures.js";
|
|
8
|
+
export type { CallSignatures, ProgressPayloads } from "./call-signatures.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ipc/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ipc/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ipc/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,YAAY,EACV,WAAW,EACX,WAAW,EACX,eAAe,EACf,YAAY,EACZ,eAAe,EACf,UAAU,EACV,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzD,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/ipc/ipc-core.d.ts
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
import type { CallSignatures } from "./call-signatures.js";
|
|
2
|
-
import type { IPCMessage, IPCConfig,
|
|
2
|
+
import type { IPCMessage, IPCConfig, ProgressCallOptions } from "./message-types.js";
|
|
3
3
|
export type ReceiverFn<R extends keyof CallSignatures> = (...data: Parameters<NonNullable<CallSignatures[R]>>) => ReturnType<NonNullable<CallSignatures[R]>>;
|
|
4
|
+
/** A receiver that can report progress while it works. Reports expect no reply. */
|
|
5
|
+
export type ProgressReceiverFn<R extends keyof CallSignatures> = (report: (progress: unknown) => void, ...data: Parameters<NonNullable<CallSignatures[R]>>) => ReturnType<NonNullable<CallSignatures[R]>>;
|
|
6
|
+
/**
|
|
7
|
+
* How long a timed-out call that asked for late answers stays registered. A
|
|
8
|
+
* host that hangs, or a sidebar whose answer no longer matters, would
|
|
9
|
+
* otherwise keep the entry and its callbacks for the life of the page.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LATE_RESULT_WINDOW_MS: number;
|
|
12
|
+
/**
|
|
13
|
+
* The longest timeout `setTimeout` can wait (2^31 - 1 ms, about 24.8 days).
|
|
14
|
+
* A longer one, `Infinity` included, would fire at once, so it is clamped to
|
|
15
|
+
* this: "wait as long as it takes" waits as long as it can.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MAX_IPC_TIMEOUT_MS = 2147483647;
|
|
4
18
|
/**
|
|
5
19
|
* Core IPC system managing bidirectional communication
|
|
6
20
|
*/
|
|
7
21
|
export declare class IPCCore {
|
|
8
22
|
private promisesByID;
|
|
9
23
|
private receiversByName;
|
|
24
|
+
private readonly progressReceiverNames;
|
|
10
25
|
private currentID;
|
|
11
26
|
private config;
|
|
12
27
|
private readonly postMessage;
|
|
@@ -32,7 +47,7 @@ export declare class IPCCore {
|
|
|
32
47
|
* @param data - Parameters to send to the receiver
|
|
33
48
|
* @returns Promise that resolves with the receiver's response
|
|
34
49
|
*/
|
|
35
|
-
callWithOptions<T extends keyof CallSignatures>(name: T, options:
|
|
50
|
+
callWithOptions<T extends keyof CallSignatures>(name: T, options: ProgressCallOptions, ...data: Parameters<NonNullable<CallSignatures[T]>>): Promise<ReturnType<NonNullable<CallSignatures[T]>>>;
|
|
36
51
|
/**
|
|
37
52
|
* Registers a function to receive calls with a particular name.
|
|
38
53
|
* The return value will be sent back to the caller.
|
|
@@ -41,6 +56,15 @@ export declare class IPCCore {
|
|
|
41
56
|
* @param fn - The function that will receive calls
|
|
42
57
|
*/
|
|
43
58
|
receive<R extends keyof CallSignatures>(name: R, fn: ReceiverFn<R>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Registers a receiver that can report progress while it handles a call. The
|
|
61
|
+
* report function comes before the call's arguments, so it cannot collide
|
|
62
|
+
* with an optional trailing one.
|
|
63
|
+
*
|
|
64
|
+
* @param name - The name of the receiver
|
|
65
|
+
* @param fn - The function that will receive calls
|
|
66
|
+
*/
|
|
67
|
+
receiveWithProgress<R extends keyof CallSignatures>(name: R, fn: ProgressReceiverFn<R>): void;
|
|
44
68
|
/**
|
|
45
69
|
* Unregisters a receiver for a given call name
|
|
46
70
|
*
|
|
@@ -64,6 +88,11 @@ export declare class IPCCore {
|
|
|
64
88
|
* Handles incoming error messages
|
|
65
89
|
*/
|
|
66
90
|
private handleError;
|
|
91
|
+
/**
|
|
92
|
+
* Hands a progress report to the caller. A report for an unknown call is
|
|
93
|
+
* dropped: the call has its final answer, or its caller did not ask.
|
|
94
|
+
*/
|
|
95
|
+
private handleProgress;
|
|
67
96
|
/**
|
|
68
97
|
* Cleanup all pending promises and receivers
|
|
69
98
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ipc-core.d.ts","sourceRoot":"","sources":["../../src/ipc/ipc-core.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAGV,UAAU,
|
|
1
|
+
{"version":3,"file":"ipc-core.d.ts","sourceRoot":"","sources":["../../src/ipc/ipc-core.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAGV,UAAU,EAGV,SAAS,EAET,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAK7B,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI,CACvD,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,KAChD,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhD,mFAAmF;AACnF,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI,CAC/D,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,EACnC,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,KAChD,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAuEhD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAAa,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,aAAgB,CAAC;AAiBhD;;GAEG;AACH,qBAAa,OAAO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ACI,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAKhC;IAED;;;OAGG;IACU,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA0B7D;IAED;;OAEG;YACW,UAAU;IA+DxB;;OAEG;IACH,OAAO,CAAC,cAAc;IAkBtB;;OAEG;IACH,OAAO,CAAC,WAAW;IAoBnB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAMtB;;OAEG;IACI,OAAO,IAAI,IAAI,CAWrB;CACF"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Base message structure for IPC communication
|
|
3
3
|
*/
|
|
4
4
|
export type MessageBase = {
|
|
5
|
-
type: "call" | "response" | "error";
|
|
5
|
+
type: "call" | "response" | "error" | "progress";
|
|
6
6
|
id: number;
|
|
7
7
|
name: string;
|
|
8
8
|
};
|
|
@@ -27,16 +27,27 @@ export type ErrorMessage = MessageBase & {
|
|
|
27
27
|
type: "error";
|
|
28
28
|
errorJSON: string;
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Message a receiver sends while it handles a call. `id` is the call's id; no
|
|
32
|
+
* reply is expected. A side that does not know this type ignores it.
|
|
33
|
+
*/
|
|
34
|
+
export type ProgressMessage = MessageBase & {
|
|
35
|
+
type: "progress";
|
|
36
|
+
data: unknown;
|
|
37
|
+
};
|
|
30
38
|
/**
|
|
31
39
|
* Union of all possible message types
|
|
32
40
|
*/
|
|
33
|
-
export type IPCMessage = CallMessage | ResponseMessage | ErrorMessage;
|
|
41
|
+
export type IPCMessage = CallMessage | ResponseMessage | ErrorMessage | ProgressMessage;
|
|
34
42
|
/**
|
|
35
43
|
* Configuration for IPC system
|
|
36
44
|
*/
|
|
37
45
|
export interface IPCConfig {
|
|
38
46
|
/**
|
|
39
|
-
* Timeout in milliseconds for waiting for a response
|
|
47
|
+
* Timeout in milliseconds for waiting for a response. Above 2,147,483,647
|
|
48
|
+
* (`MAX_IPC_TIMEOUT_MS`), `Infinity` included, it is clamped to that; a
|
|
49
|
+
* fraction rounds up to whole milliseconds; `NaN`, 0 or a negative value
|
|
50
|
+
* uses the 10 s default instead.
|
|
40
51
|
* @default 10000 (10 seconds)
|
|
41
52
|
*/
|
|
42
53
|
timeout?: number;
|
|
@@ -46,10 +57,30 @@ export interface IPCConfig {
|
|
|
46
57
|
*/
|
|
47
58
|
export interface CallOptions {
|
|
48
59
|
/**
|
|
49
|
-
* Timeout in milliseconds for this call. Overrides
|
|
60
|
+
* Timeout in milliseconds for this call. Overrides the configured timeout.
|
|
61
|
+
* Above 2,147,483,647 (`MAX_IPC_TIMEOUT_MS`), `Infinity` included, it is
|
|
62
|
+
* clamped to that; a fraction rounds up to whole milliseconds; `NaN`, 0 or a
|
|
63
|
+
* negative value uses the configured timeout instead. A timeout error names
|
|
64
|
+
* a value that was replaced.
|
|
50
65
|
*/
|
|
51
66
|
timeout?: number;
|
|
52
67
|
}
|
|
68
|
+
/** The final answer of a call that had already timed out. */
|
|
69
|
+
export type LateResult = {
|
|
70
|
+
status: "success";
|
|
71
|
+
} | {
|
|
72
|
+
status: "error";
|
|
73
|
+
error: Error;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Callbacks for a call whose receiver may report progress.
|
|
77
|
+
*/
|
|
78
|
+
export interface ProgressCallOptions<TProgress = unknown> extends CallOptions {
|
|
79
|
+
/** Called for every report, also for one that arrives after the timeout. */
|
|
80
|
+
onProgress?: (progress: TProgress) => void;
|
|
81
|
+
/** Called once when the final answer arrives after the timeout. */
|
|
82
|
+
onLateResult?: (result: LateResult) => void;
|
|
83
|
+
}
|
|
53
84
|
/**
|
|
54
85
|
* Default IPC configuration
|
|
55
86
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-types.d.ts","sourceRoot":"","sources":["../../src/ipc/message-types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,GAA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AAC;AAEnF;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,SAAS,GAAG,OAAO,CAAE,SAAQ,WAAW;IAC3E,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;IAC3C,mEAAmE;IACnE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CAC7C;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,SAAS,CAElD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CallOptions, IPCConfig } from "./message-types.js";
|
|
1
|
+
import type { CallOptions, IPCConfig, ProgressCallOptions } from "./message-types.js";
|
|
2
|
+
import type { ProgressPayloads } from "./call-signatures.js";
|
|
2
3
|
import type { CommentRequest, ContentRange, ContentReplacement, ContentInfo, SidebarConfig, SidebarBuildInfo, AgenticIssuePayload } from "../types/common.js";
|
|
3
4
|
import type { IntegrationSettingsValues, IntegrationSettingsChangeMeta } from "../types/integrationSettings.js";
|
|
4
5
|
import type { SidebarInterface } from "../types/sidebarInterface.js";
|
|
@@ -51,8 +52,11 @@ export declare class PluginIPCAdapter {
|
|
|
51
52
|
selectContent(range: ContentRange, documentReference?: string | null): Promise<void>;
|
|
52
53
|
/**
|
|
53
54
|
* Replace multiple contents in the editor
|
|
55
|
+
* @param options - Optional per-call overrides (e.g. timeout in ms; overrides default IPC timeout)
|
|
56
|
+
* and callbacks for the host's progress reports and for an answer after the timeout. They stay
|
|
57
|
+
* on the sidebar side.
|
|
54
58
|
*/
|
|
55
|
-
replaceMultipleContents(replacements: ContentReplacement[]): Promise<void>;
|
|
59
|
+
replaceMultipleContents(replacements: ContentReplacement[], options?: ProgressCallOptions<ProgressPayloads["replaceMultipleContents"]>): Promise<void>;
|
|
56
60
|
/**
|
|
57
61
|
* Notify plugin that one agent's results are available (streaming).
|
|
58
62
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-ipc-adapter.d.ts","sourceRoot":"","sources":["../../src/ipc/plugin-ipc-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAc,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin-ipc-adapter.d.ts","sourceRoot":"","sources":["../../src/ipc/plugin-ipc-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAc,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,yBAAyB,EACzB,6BAA6B,EAE9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAU;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,wBAAwB,CAAuB;IAEvD,YAAY,OAAO,CAAC,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,YAAY,GAAE,MAAY,EAgBrF;IAED,OAAO,CAAC,QAAQ,CAAC,aAAa,CAqB5B;IAEF,OAAO,CAAC,iBAAiB;IAgFzB;;;;;OAKG;IACU,aAAa,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,CActF;IAED;;;;;OAKG;IACI,qBAAqB,IAAI,MAAM,GAAG,IAAI,CAE5C;IAED;;;OAGG;IACU,UAAU,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OAIG;IACU,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxD;IAED;;;;;OAKG;IACU,UAAU,CACrB,OAAO,EAAE,cAAc,EACvB,iBAAiB,GAAE,MAAM,GAAG,IAAW,GACtC,OAAO,CAAC,IAAI,CAAC,CAGf;IAED;;;;OAIG;IACU,2BAA2B,CACtC,MAAM,EAAE,yBAAyB,EACjC,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,IAAI,CAAC,CAEf;IAED;;OAEG;IACI,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAExC;IAED;;OAEG;IACI,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAgBjD;IAED;;OAEG;IACI,eAAe,IAAI,MAAM,CAE/B;IAED;;OAEG;IACI,OAAO,IAAI,IAAI,CAIrB;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ContentReplacement } from "../types/common.js";
|
|
2
|
+
import type { ReplaceProgress } from "../types/progress.js";
|
|
3
|
+
/**
|
|
4
|
+
* Read a `replaceMultipleContents` report off the wire. It crossed a frame, so
|
|
5
|
+
* it is untrusted: `null` when its shape is wrong, and ranges that were not
|
|
6
|
+
* part of the batch are left out.
|
|
7
|
+
*/
|
|
8
|
+
export declare function sanitizeReplaceProgress(raw: unknown, replacements: readonly ContentReplacement[]): ReplaceProgress | null;
|
|
9
|
+
//# sourceMappingURL=replace-progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace-progress.d.ts","sourceRoot":"","sources":["../../src/ipc/replace-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAUxD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,YAAY,EAAE,SAAS,kBAAkB,EAAE,GAC1C,eAAe,GAAG,IAAI,CAWxB"}
|