@xopcai/xopc 0.0.399 → 0.0.400

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 (97) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/telegram/xopc.extension.json +1 -1
  3. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CpQYvwOW.js → agent-avatar-dicebear-B7GhbbJl.js} +1 -1
  4. package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BQxtFjlw.js → agent-defaults-settings-panel-Bu_K45Ek.js} +1 -1
  5. package/dist/gateway/static/root/assets/{agents-AuBMS_Pf.js → agents-ChQ0rVqM.js} +3 -3
  6. package/dist/gateway/static/root/assets/{app-management-settings-panel-QMCJPUuH.js → app-management-settings-panel-DXe_yRwn.js} +1 -1
  7. package/dist/gateway/static/root/assets/{appearance-settings-BGPmyRLn.js → appearance-settings-BzHQv_NH.js} +1 -1
  8. package/dist/gateway/static/root/assets/{apps-page-DtqV9r9m.js → apps-page-DRwxXHjg.js} +1 -1
  9. package/dist/gateway/static/root/assets/{archive-plugin-H2rWTIwC.js → archive-plugin-D4OpAzgH.js} +1 -1
  10. package/dist/gateway/static/root/assets/{automations-page-jENavthQ.js → automations-page-CvoN7NI-.js} +1 -1
  11. package/dist/gateway/static/root/assets/{automations-workspace-CImof0cA.js → automations-workspace-KgjR_a8V.js} +1 -1
  12. package/dist/gateway/static/root/assets/{binary-plugins-DPyR9xd5.js → binary-plugins-BQ51byO-.js} +1 -1
  13. package/dist/gateway/static/root/assets/{block-editor-LrMWBpSq.js → block-editor-CuaGcDNj.js} +1 -1
  14. package/dist/gateway/static/root/assets/{browser-automation-inputs-CyjyiwCe.js → browser-automation-inputs-BEj3E3Wg.js} +1 -1
  15. package/dist/gateway/static/root/assets/{browser-automations-page-BwuUYfOv.js → browser-automations-page-bf2wLb_U.js} +1 -1
  16. package/dist/gateway/static/root/assets/{browser-settings-page-C2B2U1px.js → browser-settings-page-B3B4j-fo.js} +1 -1
  17. package/dist/gateway/static/root/assets/{capabilities-page-D95AkBeY.js → capabilities-page-CrMVZkHU.js} +2 -2
  18. package/dist/gateway/static/root/assets/{capabilities-settings-panel-Dibaaecx.js → capabilities-settings-panel-brKKbjb1.js} +1 -1
  19. package/dist/gateway/static/root/assets/{capability-header-actions-DIAfw_sB.js → capability-header-actions-DrOc-yzD.js} +1 -1
  20. package/dist/gateway/static/root/assets/{channels-BDsCl-WU.js → channels-DwL_FBhH.js} +1 -1
  21. package/dist/gateway/static/root/assets/{chat-terminal-dock-B_JFEyRy.js → chat-terminal-dock-DmNnS6TM.js} +1 -1
  22. package/dist/gateway/static/root/assets/{computer-settings-page-B2vSOHPO.js → computer-settings-page-CzgZGc6E.js} +1 -1
  23. package/dist/gateway/static/root/assets/{connector-service-page-D2cCQJWy.js → connector-service-page-BIfX9zNS.js} +1 -1
  24. package/dist/gateway/static/root/assets/{connectors-page-C9t9v36q.js → connectors-page-e7r6aMEp.js} +1 -1
  25. package/dist/gateway/static/root/assets/{date-picker-BYz1BvpE.js → date-picker-CbrbJS2K.js} +1 -1
  26. package/dist/gateway/static/root/assets/{dependency-picker-B5onlFRJ.js → dependency-picker-58ZbwNby.js} +1 -1
  27. package/dist/gateway/static/root/assets/{desktop-pet-IsOXKVI4.js → desktop-pet-DwZJ9V8G.js} +1 -1
  28. package/dist/gateway/static/root/assets/{desktop-pet-settings-BZhPDsCp.js → desktop-pet-settings-miynV1MT.js} +1 -1
  29. package/dist/gateway/static/root/assets/{device-pairing-wizard-Hf-xMRH5.js → device-pairing-wizard-CcOeWnx0.js} +1 -1
  30. package/dist/gateway/static/root/assets/{directory-picker-path-field-C7mO36eo.js → directory-picker-path-field-6MGZG98P.js} +1 -1
  31. package/dist/gateway/static/root/assets/{extension-debug-page-BkSnNO_a.js → extension-debug-page-Dp_IJP6-.js} +1 -1
  32. package/dist/gateway/static/root/assets/{extension-page-CTXu0lgl.js → extension-page-pWuoYmVL.js} +1 -1
  33. package/dist/gateway/static/root/assets/{extension-settings-page-DzsZI4dz.js → extension-settings-page-SJ4T9oXh.js} +1 -1
  34. package/dist/gateway/static/root/assets/{gateway-settings-DDfLdRFy.js → gateway-settings-Ds5gFBVs.js} +1 -1
  35. package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-Dy3ktsqG.js → highlighted-body-KQOG7T2V-ChdUhMyZ.js} +1 -1
  36. package/dist/gateway/static/root/assets/{home-page-Cw0YZFEE.js → home-page-BGjlHbXQ.js} +1 -1
  37. package/dist/gateway/static/root/assets/{image-generation-api-CsX0tJA9.js → image-generation-api-xTanSnq4.js} +1 -1
  38. package/dist/gateway/static/root/assets/{imports-page-BnaJaGsz.js → imports-page-DstG_R0Z.js} +1 -1
  39. package/dist/gateway/static/root/assets/{index-dViajQ_4.js → index-fDaRYOv1.js} +8 -8
  40. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-B0-L_-9C.js → keyboard-shortcuts-settings-CtSA2o-v.js} +1 -1
  41. package/dist/gateway/static/root/assets/{local-app-workbench-page-DCU-MUm0.js → local-app-workbench-page-Bjy2vPj-.js} +1 -1
  42. package/dist/gateway/static/root/assets/{local-apps-page-CYB-jS8K.js → local-apps-page-BDApBgtY.js} +1 -1
  43. package/dist/gateway/static/root/assets/{logs-page-Dd_Miu5W.js → logs-page-DePchbyj.js} +1 -1
  44. package/dist/gateway/static/root/assets/{management-settings-EhbGOA7d.js → management-settings-CfnxE6K5.js} +1 -1
  45. package/dist/gateway/static/root/assets/{media-plugins-Gg2S_-0J.js → media-plugins-Bai9Og3V.js} +1 -1
  46. package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-bXnI7rUg.js +1 -0
  47. package/dist/gateway/static/root/assets/{note-detail-panel-b0LhcM8E.js → note-detail-panel-D9IfcVdl.js} +3 -3
  48. package/dist/gateway/static/root/assets/{notes-page-CrrJhf22.js → notes-page-KGS9DAHs.js} +1 -1
  49. package/dist/gateway/static/root/assets/{page-context-capture-button-CVkaHzKp.js → page-context-capture-button-Hwj5mgvr.js} +1 -1
  50. package/dist/gateway/static/root/assets/{personal-page-C5bS9Zox.js → personal-page-Bmkhjsrb.js} +1 -1
  51. package/dist/gateway/static/root/assets/{plugin-details-dialog-BEmOUy9T.js → plugin-details-dialog-F3p7hZfb.js} +1 -1
  52. package/dist/gateway/static/root/assets/{plugin-presentation-B9Am-_vW.js → plugin-presentation-BTc9eGAc.js} +1 -1
  53. package/dist/gateway/static/root/assets/{preview-open-alternatives-BsblzqIi.js → preview-open-alternatives-DAmgAXI9.js} +1 -1
  54. package/dist/gateway/static/root/assets/{product-open-page-OZZTYmjY.js → product-open-page-Cvujq-at.js} +1 -1
  55. package/dist/gateway/static/root/assets/{product-preview-content-BECp_NcY.js → product-preview-content-S1EfBQSH.js} +1 -1
  56. package/dist/gateway/static/root/assets/{project-detail-page-BIXCksxe.js → project-detail-page-nbeJjhHu.js} +1 -1
  57. package/dist/gateway/static/root/assets/{projects-page-XzE2Lrf2.js → projects-page-DKnFWTzc.js} +1 -1
  58. package/dist/gateway/static/root/assets/{remote-access-hub-DdeFnheH.js → remote-access-hub-DGjIoklN.js} +1 -1
  59. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DTEruUBq.js → runtime-tools-settings-panel-CZHb7XN3.js} +1 -1
  60. package/dist/gateway/static/root/assets/{schema-form-v4qyepTr.js → schema-form-P6uo4aTB.js} +1 -1
  61. package/dist/gateway/static/root/assets/{sessions-page-D6ff4Ntg.js → sessions-page-B-4njnNj.js} +1 -1
  62. package/dist/gateway/static/root/assets/settings-advanced-gate-DfsiUGi6.js +1 -0
  63. package/dist/gateway/static/root/assets/{settings-form-section-Bg4VGpOS.js → settings-form-section-h0HhEpiF.js} +1 -1
  64. package/dist/gateway/static/root/assets/{settings-page-DWnJiiZ3.js → settings-page-AknPfAp8.js} +1 -1
  65. package/dist/gateway/static/root/assets/{setup-status-panel-ShBGdTLC.js → setup-status-panel-BWfAXtFX.js} +1 -1
  66. package/dist/gateway/static/root/assets/{share-preview-page-CajYPnal.js → share-preview-page-DELcrD4H.js} +1 -1
  67. package/dist/gateway/static/root/assets/{shares-settings-CbkMauXr.js → shares-settings-BPuThYz5.js} +1 -1
  68. package/dist/gateway/static/root/assets/{skill-api-CViUmvY5.js → skill-api-BZa6K-ss.js} +1 -1
  69. package/dist/gateway/static/root/assets/{skill-reload-api-BBJFG6Sa.js → skill-reload-api-kkS6CsDm.js} +1 -1
  70. package/dist/gateway/static/root/assets/{skills-page-Xz71fZ-2.js → skills-page-CgbbAh89.js} +1 -1
  71. package/dist/gateway/static/root/assets/{style-C06V_QkC.js → style-p3jWw92_.js} +1 -1
  72. package/dist/gateway/static/root/assets/{system-settings-panel-ygHZouKG.js → system-settings-panel-CnW46J1H.js} +1 -1
  73. package/dist/gateway/static/root/assets/{task-detail-page-yrk_lymf.js → task-detail-page-Cse314-c.js} +1 -1
  74. package/dist/gateway/static/root/assets/{tracing-settings-page-BpwIY_cs.js → tracing-settings-page-DukbNSbs.js} +1 -1
  75. package/dist/gateway/static/root/assets/{tunnel-api-DJwLyVlX.js → tunnel-api-CnUDRk-U.js} +1 -1
  76. package/dist/gateway/static/root/assets/{usage-page-B7nIyRrc.js → usage-page-LsoUOpYt.js} +1 -1
  77. package/dist/gateway/static/root/assets/{use-autosave-CYG5ELoQ.js → use-autosave-DmXcbSNm.js} +1 -1
  78. package/dist/gateway/static/root/assets/{user-model-page-BYt2yFNk.js → user-model-page-CfyppZWW.js} +1 -1
  79. package/dist/gateway/static/root/assets/{voice-api-key-field-CTvb35O3.js → voice-api-key-field-BS5WRLuc.js} +1 -1
  80. package/dist/gateway/static/root/assets/{work-discovery-overlay-DQJpheuI.js → work-discovery-overlay-9rVKP_hV.js} +1 -1
  81. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BDK1g07U.js → workflow-run-setup-panel-qk5NOkwL.js} +1 -1
  82. package/dist/gateway/static/root/assets/{workflows-page-DFsw6QAX.js → workflows-page--iOSBqMk.js} +1 -1
  83. package/dist/gateway/static/root/assets/{xopc-cloud-account-card-CbASlMPP.js → xopc-cloud-account-card-B14g2TWE.js} +1 -1
  84. package/dist/gateway/static/root/index.html +1 -1
  85. package/dist/package.js +1 -1
  86. package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
  87. package/dist/src/agent/tool-manuals/computer.js +2 -2
  88. package/dist/src/agent/tools/computer-use-tool.js +9 -3
  89. package/dist/src/computer/diagnostics.js +1 -0
  90. package/dist/src/computer/errors.js +1 -0
  91. package/dist/src/computer/runtime.d.ts +23 -0
  92. package/dist/src/computer/runtime.js +90 -7
  93. package/dist/src/gateway/service.js +6 -6
  94. package/dist/src/home-intelligence/host.js +2 -2
  95. package/package.json +3 -3
  96. package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-B491wqqw.js +0 -1
  97. package/dist/gateway/static/root/assets/settings-advanced-gate-ewl9-rd5.js +0 -1
@@ -146,6 +146,21 @@ export declare const ComputerUseInputSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
146
146
  label: z.ZodString;
147
147
  }, z.core.$strict>], "kind">>;
148
148
  flowId: z.ZodOptional<z.ZodUUID>;
149
+ }, z.core.$strict>, z.ZodObject<{
150
+ op: z.ZodLiteral<"run">;
151
+ goal: z.ZodString;
152
+ expect: z.ZodDiscriminatedUnion<[z.ZodObject<{
153
+ kind: z.ZodLiteral<"text">;
154
+ text: z.ZodString;
155
+ }, z.core.$strict>, z.ZodObject<{
156
+ kind: z.ZodLiteral<"field">;
157
+ label: z.ZodString;
158
+ value: z.ZodString;
159
+ }, z.core.$strict>, z.ZodObject<{
160
+ kind: z.ZodLiteral<"selected">;
161
+ label: z.ZodString;
162
+ }, z.core.$strict>], "kind">;
163
+ maxActions: z.ZodOptional<z.ZodNumber>;
149
164
  }, z.core.$strict>, z.ZodObject<{
150
165
  op: z.ZodLiteral<"close">;
151
166
  saveFlowAs: z.ZodOptional<z.ZodString>;
@@ -197,6 +212,13 @@ export interface ComputerPublicResult {
197
212
  report?: ComputerSessionReport;
198
213
  flows?: ReturnType<typeof computerFlowMetadata>[];
199
214
  savedFlow?: ReturnType<typeof computerFlowMetadata>;
215
+ run?: {
216
+ actionsExecuted: number;
217
+ modelRequests: number;
218
+ observationsReused: number;
219
+ elapsedMs: number;
220
+ stopReason: 'condition_satisfied' | 'condition_present' | 'action_limit' | 'time_limit' | 'handoff';
221
+ };
200
222
  }
201
223
  export declare class ComputerRuntime {
202
224
  private readonly endpoints;
@@ -210,6 +232,7 @@ export declare class ComputerRuntime {
210
232
  constructor(endpoints: EndpointToolRuntime, getConfig: () => Config, getTurnEndpoint?: (owner: string) => string | undefined, flowStore?: ComputerFlowRepository);
211
233
  execute(owner: string, input: ComputerUseInput, signal?: AbortSignal): Promise<ComputerPublicResult>;
212
234
  private flowScope;
235
+ private executeGoal;
213
236
  private executeInput;
214
237
  private isUndispatchedChange;
215
238
  private reserveRescue;
@@ -14,6 +14,7 @@ import { ComputerSessionDiagnostics } from "./diagnostics.js";
14
14
  import { ComputerExpectationSchema, ComputerTaskState, verifyComputerExpectation } from "./task-state.js";
15
15
  import { randomUUID } from "node:crypto";
16
16
  import { z } from "zod";
17
+ import { setTimeout } from "node:timers/promises";
17
18
  //#region src/computer/runtime.ts
18
19
  init_src();
19
20
  init_providers();
@@ -83,6 +84,12 @@ const ComputerUseInputSchema = z.discriminatedUnion("op", [
83
84
  expect: ComputerExpectationSchema.optional(),
84
85
  flowId: z.uuid().optional()
85
86
  }).strict(),
87
+ z.object({
88
+ op: z.literal("run"),
89
+ goal: z.string().min(1).max(4e3),
90
+ expect: ComputerExpectationSchema,
91
+ maxActions: z.number().int().min(1).max(12).optional()
92
+ }).strict(),
86
93
  z.object({
87
94
  op: z.literal("close"),
88
95
  saveFlowAs: z.string().trim().min(1).max(160).optional()
@@ -198,7 +205,8 @@ var ComputerRuntime = class {
198
205
  const diagnostics = this.sessions.get(owner)?.diagnostics ?? (input.op === "open" ? new ComputerSessionDiagnostics() : void 0);
199
206
  if (diagnostics) this.openingReports.set(owner, diagnostics);
200
207
  try {
201
- const result = await this.executeInput(owner, input, signal ? AbortSignal.any([signal, operation.signal]) : operation.signal, diagnostics);
208
+ const operationSignal = signal ? AbortSignal.any([signal, operation.signal]) : operation.signal;
209
+ const result = input.op === "run" ? await this.executeGoal(owner, input, operationSignal, diagnostics) : await this.executeInput(owner, input, operationSignal, diagnostics);
202
210
  if (result.errorCode) diagnostics?.fail(new Error(result.errorCode), diagnostics.phase, result.receipt?.dispatch ?? "notStarted");
203
211
  if (diagnostics && !this.sessions.has(owner)) this.retainReport(owner, diagnostics);
204
212
  return {
@@ -233,7 +241,63 @@ var ComputerRuntime = class {
233
241
  const effective = resolveEffectiveAgentConfigForSession(owner).config;
234
242
  return JSON.stringify([effective.id, effective.workspace]);
235
243
  }
236
- async executeInput(owner, input, signal, diagnostics) {
244
+ async executeGoal(owner, input, signal, diagnostics) {
245
+ const startedAt = Date.now();
246
+ const requestsBefore = diagnostics?.snapshot().counters.modelRequests ?? 0;
247
+ const context = { observationsReused: 0 };
248
+ let actionsExecuted = 0;
249
+ const finish = (result, stopReason) => ({
250
+ ...result,
251
+ run: {
252
+ actionsExecuted,
253
+ modelRequests: (diagnostics?.snapshot().counters.modelRequests ?? 0) - requestsBefore,
254
+ observationsReused: context.observationsReused,
255
+ elapsedMs: Math.max(0, Date.now() - startedAt),
256
+ stopReason
257
+ }
258
+ });
259
+ const step = {
260
+ op: "step",
261
+ goal: input.goal,
262
+ expect: input.expect
263
+ };
264
+ try {
265
+ while (true) {
266
+ signal.throwIfAborted();
267
+ let result = await this.executeInput(owner, step, signal, diagnostics, context);
268
+ const authorizationDeadline = Date.now() + 6e4;
269
+ while (result.status === "pending_authorization" || result.status === "pending_action") {
270
+ const authorizingSession = result.status === "pending_authorization";
271
+ if (Date.now() >= authorizationDeadline) {
272
+ await this.close(owner);
273
+ throw new Error("COMPUTER_AUTHORIZATION_TIMEOUT");
274
+ }
275
+ await setTimeout(250, void 0, { signal });
276
+ result = await this.executeInput(owner, authorizingSession ? { op: "observe" } : step, signal, diagnostics, context);
277
+ if (authorizingSession && result.status === "ready" && !result.errorCode) result = await this.executeInput(owner, step, signal, diagnostics, context);
278
+ }
279
+ if (result.receipt?.dispatch === "completed") actionsExecuted++;
280
+ if (result.errorCode || result.pending || result.receipt && result.receipt.dispatch !== "completed") return finish(result, "handoff");
281
+ if (result.verified) return finish({
282
+ ...result,
283
+ status: "goal_satisfied"
284
+ }, "condition_satisfied");
285
+ if (result.status === "condition_present") return finish(result, "condition_present");
286
+ if (!result.receipt || result.status !== "ready") return finish(result, "handoff");
287
+ const stopReason = actionsExecuted >= (input.maxActions ?? 6) ? "action_limit" : Date.now() - startedAt >= 12e4 ? "time_limit" : void 0;
288
+ if (stopReason) return finish({
289
+ ...result,
290
+ status: "goal_limit",
291
+ verified: false,
292
+ nextAction: "The small-goal budget ended without verifying the condition. Inspect the result and remaining requirements before continuing; do not claim success."
293
+ }, stopReason);
294
+ }
295
+ } finally {
296
+ context.observation?.frame?.fill(0);
297
+ context.observation = void 0;
298
+ }
299
+ }
300
+ async executeInput(owner, input, signal, diagnostics, goalContext) {
237
301
  signal.throwIfAborted();
238
302
  const config = this.getConfig();
239
303
  if (!config.computer.enabled) {
@@ -383,7 +447,7 @@ var ComputerRuntime = class {
383
447
  if (input.op === "observe") return this.present(status.value);
384
448
  const context = s.pendingContext;
385
449
  phase = "dispatch";
386
- const result = await this.dispatchAction(s, s.pending, signal);
450
+ const result = await this.dispatchAction(s, s.pending, signal, goalContext);
387
451
  if (!this.isUndispatchedChange(result) || !context) return result;
388
452
  input = {
389
453
  op: "step",
@@ -401,7 +465,12 @@ var ComputerRuntime = class {
401
465
  signal.throwIfAborted();
402
466
  if (Date.now() - s.createdAt >= config.computer.maxSessionDurationMs) throw new Error("COMPUTER_SESSION_BUDGET");
403
467
  phase = "observe";
404
- const observed = await this.send(s, {
468
+ const cached = goalContext?.observation;
469
+ if (goalContext) goalContext.observation = void 0;
470
+ const reuse = cached && status.value.status === "ready" && cached.value.brokerEpoch === status.value.brokerEpoch && cached.value.generation === status.value.generation && cached.value.grantId === status.value.grantId && cached.value.observation && Date.now() - cached.value.observation.capturedAt >= 0 && Date.now() - cached.value.observation.capturedAt <= 5e3;
471
+ if (cached && !reuse) cached.frame?.fill(0);
472
+ if (reuse) goalContext.observationsReused++;
473
+ const observed = reuse ? cached : await this.send(s, {
405
474
  op: "observe",
406
475
  sessionId: s.id,
407
476
  owner
@@ -415,6 +484,17 @@ var ComputerRuntime = class {
415
484
  verified: verification?.status === "satisfied",
416
485
  budget: this.budget(s)
417
486
  };
487
+ if (goalContext && input.op === "step" && input.expect?.kind === "text" && verification?.status === "satisfied") return {
488
+ ...this.present(observed.value),
489
+ status: "condition_present",
490
+ verified: false,
491
+ verification: {
492
+ ...verification,
493
+ preexisting: true
494
+ },
495
+ budget: this.budget(s),
496
+ nextAction: "This text was already visible before input. Choose a page-specific or selected-state condition; no action was dispatched."
497
+ };
418
498
  if (input.op === "step" && input.expect?.kind !== "text" && verification?.status === "satisfied") {
419
499
  s.diagnostics.verify(verification);
420
500
  s.adapter.reset?.();
@@ -507,7 +587,7 @@ var ComputerRuntime = class {
507
587
  flowId: input.flowId
508
588
  };
509
589
  phase = "dispatch";
510
- const result = await this.dispatchAction(s, e, signal);
590
+ const result = await this.dispatchAction(s, e, signal, goalContext);
511
591
  if (!this.isUndispatchedChange(result)) return result;
512
592
  this.reserveRescue(s, signal);
513
593
  } finally {
@@ -539,7 +619,7 @@ var ComputerRuntime = class {
539
619
  s.diagnostics.count("rescueAttempts");
540
620
  s.adapter.reset?.();
541
621
  }
542
- async dispatchAction(s, envelope, signal) {
622
+ async dispatchAction(s, envelope, signal, goalContext) {
543
623
  if (!s.pending) {
544
624
  if (s.actions >= this.getConfig().computer.maxActionsPerSession) throw new Error("COMPUTER_ACTION_BUDGET");
545
625
  s.actions++;
@@ -557,7 +637,10 @@ var ComputerRuntime = class {
557
637
  throw new Error("COMPUTER_RECEIPT_MISMATCH");
558
638
  }
559
639
  if (reply.value.status !== "pending_action") s.pending = void 0;
560
- reply.frame?.fill(0);
640
+ if (goalContext && reply.value.status === "ready" && !reply.value.errorCode && reply.value.receipt?.dispatch === "completed" && reply.frame && reply.mimeType && reply.value.observation) {
641
+ goalContext.observation?.frame?.fill(0);
642
+ goalContext.observation = reply;
643
+ } else reply.frame?.fill(0);
561
644
  if (reply.value.status === "ready" && reply.value.errorCode === "COMPUTER_OBSERVATION_CHANGED" && !reply.value.receipt) {
562
645
  s.diagnostics.discard();
563
646
  s.actions--;
@@ -84,8 +84,6 @@ import { bootstrapApplicationStateSync } from "../bootstrap/application-state.js
84
84
  import { setPairingBroadcastSink } from "../channels/pairing/pairing-events.js";
85
85
  import { registerClarificationChannelRuntime } from "./clarify-runtime.js";
86
86
  import { ChannelManager } from "../channels/manager.js";
87
- import { ChatPreviewService } from "../chat-previews/service.js";
88
- import "../chat-previews/index.js";
89
87
  import { configureGatewayHttpProxy } from "../infra/http-proxy-env.js";
90
88
  import "../config/index.js";
91
89
  import { ManagedComposioEventPoller } from "../connectors/composio-managed-events.js";
@@ -103,6 +101,10 @@ import { DiscussionSealer } from "../discussions/sealer.js";
103
101
  import "../discussions/index.js";
104
102
  import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
105
103
  import "../endpoint-tools/index.js";
104
+ import { HomeCapabilityPreflightService } from "../home-intelligence/capability-preflight.js";
105
+ import { HomeAdviceGenerator } from "../home-intelligence/generator.js";
106
+ import { HomeIntelligenceHost } from "../home-intelligence/host.js";
107
+ import { HomeSnapshotBuilder } from "../home-intelligence/snapshot.js";
106
108
  import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
107
109
  import { prepareAutomationAgentSession } from "./automation-agent-session.js";
108
110
  import { stopTailscaleExposure } from "./tailscale-lifecycle.js";
@@ -136,6 +138,8 @@ import { getXopcCloudCatalogCoordinator } from "../providers/xopc-cloud-catalog-
136
138
  import { ModelCatalogSyncService } from "../providers/model-catalog-sync-service.js";
137
139
  import { NotificationService } from "../notifications/service.js";
138
140
  import "../local-apps/index.js";
141
+ import { ChatPreviewService } from "../chat-previews/service.js";
142
+ import "../chat-previews/index.js";
139
143
  import { TaskAllocationDispatcher } from "../tasks/task-allocation-service.js";
140
144
  import { TaskResultDeliveryService } from "../tasks/task-result-delivery-service.js";
141
145
  import { createRuntimeBrowserAutomationService } from "../browser/automations/runtime-service.js";
@@ -163,10 +167,6 @@ import { TaskMainUpdateDecisionService } from "../tasks/task-main-update-decisio
163
167
  import { selectTaskMainUpdateAttempt, submitAndConfirmTaskMainUpdate } from "../tasks/task-main-update-input.js";
164
168
  import { checkAppContextAccess, prepareAppContext } from "./service/app-context-access.js";
165
169
  import { applyAutomaticVoiceLanguage, inferProductLanguageFromEnvironment, initializeVoiceDefaults } from "../voice/language-profile.js";
166
- import { HomeAdviceGenerator } from "../home-intelligence/generator.js";
167
- import { HomeIntelligenceHost } from "../home-intelligence/host.js";
168
- import { HomeSnapshotBuilder } from "../home-intelligence/snapshot.js";
169
- import { HomeCapabilityPreflightService } from "../home-intelligence/capability-preflight.js";
170
170
  import crypto from "node:crypto";
171
171
  //#region src/gateway/service.ts
172
172
  init_session_repository();
@@ -1,10 +1,10 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { HomeAdviceBudgetExceededError, isHomeProseLocalized } from "./generator.js";
4
3
  import { homePatternKey } from "./strategy.js";
5
- import { HomeAdvicePolicy } from "./policy.js";
6
4
  import { HomeIntelligenceRepository } from "./repository.js";
7
5
  import { HomeOpportunityApplicationService } from "./application-service.js";
6
+ import { HomeAdvicePolicy } from "./policy.js";
7
+ import { HomeAdviceBudgetExceededError, isHomeProseLocalized } from "./generator.js";
8
8
  import { buildHomeOpportunityNotification } from "./notification.js";
9
9
  import { createHash } from "node:crypto";
10
10
  //#region src/home-intelligence/host.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xopcai/xopc",
3
- "version": "0.0.399",
3
+ "version": "0.0.400",
4
4
  "description": "Local-first personal AI with Ada, task delegation, files, projects, workflows, and automations. Use cloud or local models.",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -168,12 +168,12 @@
168
168
  "vitest": "4.1.5",
169
169
  "vue": "^3.5.35",
170
170
  "xlsx": "file:web/vendor/xlsx-0.20.3.tgz",
171
- "@xopcai/browser-control-contract": "0.1.0",
172
171
  "@xopcai/computer-control-contract": "0.1.0",
173
- "@xopcai/endpoint-tools-client": "0.0.0",
174
172
  "@xopcai/endpoint-tools-protocol": "0.0.0",
173
+ "@xopcai/browser-control-contract": "0.1.0",
175
174
  "@xopcai/image-providers": "0.1.0",
176
175
  "@xopcai/gateway-contract": "0.0.0",
176
+ "@xopcai/endpoint-tools-client": "0.0.0",
177
177
  "@xopcai/realtime-client": "0.0.0",
178
178
  "@xopcai/realtime-protocol": "0.0.0"
179
179
  },
@@ -1 +0,0 @@
1
- import{Uc as e}from"./index-dViajQ_4.js";export{e as Mermaid};
@@ -1 +0,0 @@
1
- import{Hn as e}from"./index-dViajQ_4.js";function t(t){let{children:n,fallback:r}=t,i=r===void 0?null:r;return e()?n:i}export{t};