@xpert-ai/plugin-sdk 3.27.0 → 3.29.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/collaboration-client.cjs.js +31 -5
- package/collaboration-client.esm.js +31 -5
- package/data-workbench.cjs.js +0 -679
- package/data-workbench.esm.js +1 -676
- package/docs/artifact-presentations.md +2 -0
- package/docs/artifact-types.md +97 -0
- package/docs/data-workbench.md +37 -0
- package/index.cjs.js +481 -49
- package/index.esm.js +469 -49
- package/model-provider.cjs.js +7 -1
- package/model-provider.esm.js +7 -2
- package/package.json +2 -2
- package/src/data-workbench.d.ts +0 -2
- package/src/index.d.ts +2 -0
- package/src/lib/agent/handoff/types.d.ts +5 -0
- package/src/lib/agent/middleware/capabilities/assistant-task.d.ts +6 -1
- package/src/lib/agent/middleware/capabilities/execution-observability.d.ts +26 -0
- package/src/lib/agent/middleware/capabilities/index.d.ts +1 -0
- package/src/lib/agent/runtime/capability.d.ts +4 -0
- package/src/lib/agent/runtime/cli-model-profile.d.ts +1 -1
- package/src/lib/agent/runtime/execution-runner.d.ts +11 -0
- package/src/lib/agent/runtime/index.d.ts +2 -0
- package/src/lib/agent/runtime/managed.d.ts +94 -0
- package/src/lib/agent/runtime/process-supervisor.d.ts +1 -0
- package/src/lib/agent/runtime/strategy.d.ts +14 -0
- package/src/lib/agent/runtime/types.d.ts +30 -1
- package/src/lib/ai-model/native-model.d.ts +5 -1
- package/src/lib/artifact-type/definition.schema.d.ts +119 -0
- package/src/lib/artifact-type/index.d.ts +91 -0
- package/src/lib/artifact-type/registry.d.ts +25 -0
- package/src/lib/assistant-capability/index.d.ts +1 -0
- package/src/lib/assistant-capability/middleware.d.ts +10 -0
- package/src/lib/collaboration/types.d.ts +5 -0
- package/src/lib/content-resource/catalog.d.ts +88 -0
- package/src/lib/content-resource/editor-compatibility.d.ts +3 -0
- package/src/lib/content-resource/editor.d.ts +35 -3
- package/src/lib/content-resource/index.d.ts +3 -0
- package/src/lib/data/datasource/adapter.strategy.d.ts +3 -0
- package/src/lib/data/datasource/index.d.ts +0 -2
- package/src/lib/data/datasource/strategy.interface.d.ts +5 -1
- package/src/lib/data/datasource/types.d.ts +2 -2
- package/src/lib/data/datasource/workbench.d.ts +4 -3
- package/src/lib/execution-control/context.d.ts +7 -0
- package/src/lib/execution-control/index.d.ts +2 -0
- package/src/lib/managed-queue/index.d.ts +12 -0
- package/src/lib/runtime/capabilities/artifact-drafts.d.ts +10 -1
- package/src/lib/runtime/capabilities/artifact-library.d.ts +52 -0
- package/src/lib/runtime/capabilities/artifacts.d.ts +15 -0
- package/src/lib/runtime/capabilities/index.d.ts +1 -0
- package/src/lib/runtime/capabilities/mcp-client-runtime.d.ts +2 -0
- package/src/lib/runtime/capabilities/sandbox-jobs.d.ts +12 -3
- package/src/lib/sandbox/file-edit-command.d.ts +2 -0
- package/src/lib/sandbox/file-edit-diff.d.ts +1 -0
- package/src/lib/sandbox/protocol.d.ts +13 -1
- package/src/lib/sandbox/runtime-provider.d.ts +12 -0
- package/src/lib/data/datasource/workbench-adapter.d.ts +0 -51
- package/src/lib/data/datasource/workbench-pagination.d.ts +0 -6
- package/src/lib/data/datasource/workbench-sql-lexer.d.ts +0 -11
- package/src/lib/data/datasource/workbench-sql-syntax.d.ts +0 -3
- package/src/lib/data/datasource/workbench-sql.d.ts +0 -20
|
@@ -113,6 +113,8 @@ function createSocketIoTransportAdapter(socket) {
|
|
|
113
113
|
var _options_initialPresence;
|
|
114
114
|
let presence = _extends._extends({}, (_options_initialPresence = options.initialPresence) != null ? _options_initialPresence : {});
|
|
115
115
|
let pending = [];
|
|
116
|
+
let inFlight = [];
|
|
117
|
+
let synchronized = false;
|
|
116
118
|
let flushTimer;
|
|
117
119
|
let syncTimer;
|
|
118
120
|
let presenceTimer;
|
|
@@ -128,9 +130,12 @@ function createSocketIoTransportAdapter(socket) {
|
|
|
128
130
|
const flush = ()=>{
|
|
129
131
|
if (flushTimer) clearTimeout(flushTimer);
|
|
130
132
|
flushTimer = undefined;
|
|
131
|
-
if (!pending.length || !options.transport.connected) return;
|
|
133
|
+
if (!pending.length || inFlight.length || !synchronized || !options.transport.connected) return;
|
|
132
134
|
const updates = pending;
|
|
133
135
|
pending = [];
|
|
136
|
+
// Keep bytes until the server acknowledges persistence. Replaying a Yjs update
|
|
137
|
+
// after a lost acknowledgement is idempotent; dropping it could lose an edit.
|
|
138
|
+
inFlight = updates;
|
|
134
139
|
options.transport.emit('update', {
|
|
135
140
|
updateBase64: bytesToBase64(options.document.mergeUpdates(updates)),
|
|
136
141
|
origin: 'plugin-client'
|
|
@@ -159,23 +164,44 @@ function createSocketIoTransportAdapter(socket) {
|
|
|
159
164
|
started = true;
|
|
160
165
|
options.onConnectionChange == null ? void 0 : options.onConnectionChange.call(options, 'connecting');
|
|
161
166
|
cleanups.push(options.document.onUpdate((update, origin)=>{
|
|
162
|
-
if (origin === remoteOrigin) return;
|
|
167
|
+
if (origin === remoteOrigin || options.session.access !== 'write') return;
|
|
163
168
|
pending.push(update);
|
|
164
169
|
if (!flushTimer) flushTimer = setTimeout(flush, batchMs);
|
|
165
170
|
}));
|
|
166
171
|
cleanups.push(options.transport.on('connect', ()=>{
|
|
172
|
+
synchronized = false;
|
|
167
173
|
var _options_transport_clientId;
|
|
168
174
|
selfClientId = (_options_transport_clientId = options.transport.clientId) != null ? _options_transport_clientId : selfClientId;
|
|
169
175
|
options.onConnectionChange == null ? void 0 : options.onConnectionChange.call(options, 'connected');
|
|
170
176
|
requestSync();
|
|
171
177
|
emitPresence();
|
|
172
178
|
}));
|
|
173
|
-
cleanups.push(options.transport.on('disconnect', ()=>
|
|
174
|
-
|
|
179
|
+
cleanups.push(options.transport.on('disconnect', ()=>{
|
|
180
|
+
synchronized = false;
|
|
181
|
+
pending = [
|
|
182
|
+
...inFlight,
|
|
183
|
+
...pending
|
|
184
|
+
];
|
|
185
|
+
inFlight = [];
|
|
186
|
+
options.onConnectionChange == null ? void 0 : options.onConnectionChange.call(options, 'disconnected');
|
|
187
|
+
}));
|
|
188
|
+
cleanups.push(options.transport.on('sync', (payload)=>{
|
|
189
|
+
applyRemote(payload);
|
|
190
|
+
// The initial sync is sent only after session authorization and room setup.
|
|
191
|
+
// A raw socket connect can precede that setup, so do not flush on connect.
|
|
192
|
+
if (stringValue(payload['updateBase64'])) {
|
|
193
|
+
synchronized = true;
|
|
194
|
+
flush();
|
|
195
|
+
}
|
|
196
|
+
}));
|
|
175
197
|
cleanups.push(options.transport.on('update', applyRemote));
|
|
176
198
|
cleanups.push(options.transport.on('update-ack', (payload)=>{
|
|
177
199
|
const ack = parseAck(payload);
|
|
178
|
-
if (ack
|
|
200
|
+
if (ack && ack.documentId === options.session.documentId) {
|
|
201
|
+
inFlight = [];
|
|
202
|
+
options.onAck == null ? void 0 : options.onAck.call(options, ack);
|
|
203
|
+
flush();
|
|
204
|
+
}
|
|
179
205
|
}));
|
|
180
206
|
cleanups.push(options.transport.on('presence', (payload)=>{
|
|
181
207
|
const item = parsePresence(payload);
|
|
@@ -111,6 +111,8 @@ function createSocketIoTransportAdapter(socket) {
|
|
|
111
111
|
var _options_initialPresence;
|
|
112
112
|
let presence = _extends({}, (_options_initialPresence = options.initialPresence) != null ? _options_initialPresence : {});
|
|
113
113
|
let pending = [];
|
|
114
|
+
let inFlight = [];
|
|
115
|
+
let synchronized = false;
|
|
114
116
|
let flushTimer;
|
|
115
117
|
let syncTimer;
|
|
116
118
|
let presenceTimer;
|
|
@@ -126,9 +128,12 @@ function createSocketIoTransportAdapter(socket) {
|
|
|
126
128
|
const flush = ()=>{
|
|
127
129
|
if (flushTimer) clearTimeout(flushTimer);
|
|
128
130
|
flushTimer = undefined;
|
|
129
|
-
if (!pending.length || !options.transport.connected) return;
|
|
131
|
+
if (!pending.length || inFlight.length || !synchronized || !options.transport.connected) return;
|
|
130
132
|
const updates = pending;
|
|
131
133
|
pending = [];
|
|
134
|
+
// Keep bytes until the server acknowledges persistence. Replaying a Yjs update
|
|
135
|
+
// after a lost acknowledgement is idempotent; dropping it could lose an edit.
|
|
136
|
+
inFlight = updates;
|
|
132
137
|
options.transport.emit('update', {
|
|
133
138
|
updateBase64: bytesToBase64(options.document.mergeUpdates(updates)),
|
|
134
139
|
origin: 'plugin-client'
|
|
@@ -157,23 +162,44 @@ function createSocketIoTransportAdapter(socket) {
|
|
|
157
162
|
started = true;
|
|
158
163
|
options.onConnectionChange == null ? void 0 : options.onConnectionChange.call(options, 'connecting');
|
|
159
164
|
cleanups.push(options.document.onUpdate((update, origin)=>{
|
|
160
|
-
if (origin === remoteOrigin) return;
|
|
165
|
+
if (origin === remoteOrigin || options.session.access !== 'write') return;
|
|
161
166
|
pending.push(update);
|
|
162
167
|
if (!flushTimer) flushTimer = setTimeout(flush, batchMs);
|
|
163
168
|
}));
|
|
164
169
|
cleanups.push(options.transport.on('connect', ()=>{
|
|
170
|
+
synchronized = false;
|
|
165
171
|
var _options_transport_clientId;
|
|
166
172
|
selfClientId = (_options_transport_clientId = options.transport.clientId) != null ? _options_transport_clientId : selfClientId;
|
|
167
173
|
options.onConnectionChange == null ? void 0 : options.onConnectionChange.call(options, 'connected');
|
|
168
174
|
requestSync();
|
|
169
175
|
emitPresence();
|
|
170
176
|
}));
|
|
171
|
-
cleanups.push(options.transport.on('disconnect', ()=>
|
|
172
|
-
|
|
177
|
+
cleanups.push(options.transport.on('disconnect', ()=>{
|
|
178
|
+
synchronized = false;
|
|
179
|
+
pending = [
|
|
180
|
+
...inFlight,
|
|
181
|
+
...pending
|
|
182
|
+
];
|
|
183
|
+
inFlight = [];
|
|
184
|
+
options.onConnectionChange == null ? void 0 : options.onConnectionChange.call(options, 'disconnected');
|
|
185
|
+
}));
|
|
186
|
+
cleanups.push(options.transport.on('sync', (payload)=>{
|
|
187
|
+
applyRemote(payload);
|
|
188
|
+
// The initial sync is sent only after session authorization and room setup.
|
|
189
|
+
// A raw socket connect can precede that setup, so do not flush on connect.
|
|
190
|
+
if (stringValue(payload['updateBase64'])) {
|
|
191
|
+
synchronized = true;
|
|
192
|
+
flush();
|
|
193
|
+
}
|
|
194
|
+
}));
|
|
173
195
|
cleanups.push(options.transport.on('update', applyRemote));
|
|
174
196
|
cleanups.push(options.transport.on('update-ack', (payload)=>{
|
|
175
197
|
const ack = parseAck(payload);
|
|
176
|
-
if (ack
|
|
198
|
+
if (ack && ack.documentId === options.session.documentId) {
|
|
199
|
+
inFlight = [];
|
|
200
|
+
options.onAck == null ? void 0 : options.onAck.call(options, ack);
|
|
201
|
+
flush();
|
|
202
|
+
}
|
|
177
203
|
}));
|
|
178
204
|
cleanups.push(options.transport.on('presence', (payload)=>{
|
|
179
205
|
const item = parsePresence(payload);
|