@xopcai/xopc 0.0.340 → 0.0.342
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/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CZsW4B_4.js → agent-avatar-dicebear-BHTH7Hzp.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-C70FWAHE.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-BmYHMIPz.js +1 -0
- package/dist/gateway/static/root/assets/agents-BqIiqYmt.js +70 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-9hEICfl6.js → agents-admin-api-Op3XAo56.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-B6_Ocd3H.js → app-management-settings-panel-DrvjGsNn.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CYk3wLnQ.js → appearance-settings-CdYUxeW5.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-DmDgodab.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-Cq8nfXI4.js → archive-plugin-Dvl6N_oW.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-D3dSY_dy.js → automations-page-7eSAb9Fz.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BXLmMZKj.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BKqt6Et6.js → binary-plugins-B6fBdtZm.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-H3ijAjys.js → block-editor-DnMibNrZ.js} +29 -29
- package/dist/gateway/static/root/assets/{browser-automation-inputs-cnvnVaXG.js → browser-automation-inputs-CX5HElxM.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-CjIhwapc.js → browser-automations-page-fTkFKnIa.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-CGF08LW0.js +3 -0
- package/dist/gateway/static/root/assets/{capabilities-CE5NAPxj.js → capabilities-DSg8th5w.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-CM55DJos.js → capabilities-page-CBQUqwHq.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BIXA7-_a.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-DRdadVwO.js → capability-header-actions-UQmVc6ea.js} +1 -1
- package/dist/gateway/static/root/assets/channels-Cwqvvnpy.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-bMULpQTT.js → chat-terminal-dock-81LOYomp.js} +2 -2
- package/dist/gateway/static/root/assets/computer-settings-page-DffgMAWa.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-f6kDBxXv.js → connector-service-page-DjKxEmO4.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-w-DTg9X-.js +2 -0
- package/dist/gateway/static/root/assets/{date-picker-BxODmHib.js → date-picker--gtRUEYY.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BNPg7CKM.js → dependency-picker-OM5MJcAI.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-I6v0yXqp.js → desktop-pet-Ck5QncbS.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-tSuk-nRY.js → desktop-pet-settings-Be9YZ7dP.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-CG2bKfYq.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BvrnQNVH.js → directory-picker-path-field-CS-rIYvx.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BU56INhZ.js → extension-debug-page-yeovsc29.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DQu5R6aV.js → extension-page-BGXlLDIK.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-oL7xkRyC.js → extension-settings-page-1T5JWoRQ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BdBCP9uF.js → gateway-config-swr-D_oNkPwY.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-MiR9DJIf.js → gateway-realtime-B6tO02l7.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DA3d45t6.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-DXaGFC4E.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-B8XTENLw.js → gateway-startup-retry-DVo2M1Ed.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-Be8_HeNB.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DufKsb8h.js → image-generation-api-DjyB_9yW.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-CKj_w0ri.js → imports-page-DHoZ6dWz.js} +1 -1
- package/dist/gateway/static/root/assets/index-Bbo9EJvY.js +106 -0
- package/dist/gateway/static/root/assets/index-CRfBe1x4.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BUqFy1Mk.js → keyboard-shortcuts-settings-DOloJmHM.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-Uo5UKdF8.js → local-app-workbench-page-DzvhfcOp.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-DoxtxoTl.js → local-apps-page-BcZxG7Sm.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-Bwxng2U0.js → local-session-drafts-yZc4OIxG.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-GbEE8D1I.js → locale-store-CCYf4Qxv.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-jPeHW3s9.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-BDnKvfCl.js → management-settings-Dal0gIED.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DtEVIWB3.js → markdown-view-gPnGW4pR.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Gt-PA4Fe.js → media-plugins-BqXBeW_0.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-DvcSrOiI.js → messages-6j-AkWdj.js} +2 -2
- package/dist/gateway/static/root/assets/note-detail-panel-Dnd6FEft.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-DWMxG17u.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-CZ-NyERX.js → page-context-capture-button-CblMYGvM.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-7u-lmA1o.js → page-tabs-BQLuzP2G.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Bolgk7cf.js → preview-open-alternatives-bAtTMiqI.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-CJEViLcx.js → product-open-page-BiZx2t3O.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BeCtOOvf.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DVFst1Zv.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DTHBAr2T.js → registry-api-DGRLQQ_H.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-xlX73tyv.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BKus_7qQ.js → runtime-tools-settings-panel-BL43kX94.js} +2 -2
- package/dist/gateway/static/root/assets/scenes-page-CHIai08O.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-DvkI2pYT.js → schema-form-BpTqO-iv.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-Bb2zLVED.js → session-api-BXyyrPIk.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-9M-yBtb4.js → session-manager-OBkrb3ow.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-DEcTMG-C.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DXWLgEoV.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BzC6oYCR.js → settings-form-section-DTsRLeno.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DpEe6N0D.js → settings-page-DXuAkBPd.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Di0Ed3Y_.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DAE82vq9.js → share-preview-page-kKdqUjj2.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-Deazms2V.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-DkZFVXn8.js → skill-api-BYnK8QTQ.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-B6GZUBNC.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-BAEDw1ez.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-BWVB47be.js → system-settings-panel-DbULjt1I.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-Dwa6P2yd.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-D1I9v9nz.js → tunnel-api-CEoNfQtH.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-DyKTK2iS.js → usage-page-BFFftzL6.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-G5bltEoh.js → use-autosave-qKVzK824.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-Cb9EhncT.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-C2Q5SXkb.js → voice-api-key-field-DUg1IyGa.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DIBe0AZN.js → voice-config-api-Dh_RxWat.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-J-w4XEEK.js → work-discovery-overlay-C8RS5pAe.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CmZCSCBe.js → workflow-run-setup-panel-FkVKYHxF.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CXTfjyCR.js +6 -0
- package/dist/gateway/static/root/index.html +15 -15
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/mobile-user-understanding.js +9 -0
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/embedded/current-turn-images.d.ts +4 -0
- package/dist/src/agent/embedded/current-turn-images.js +22 -0
- package/dist/src/agent/embedded/run-turn.js +15 -3
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +25 -2
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +9 -3
- package/dist/src/agent/tools/xopc-use-tool.js +1 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/oauth-provider-lock.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +3 -2
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/extension-cli-register.js +2 -0
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +1 -0
- package/dist/src/config/schema.js +2 -1
- package/dist/src/extensions/agent-plugins/inventory.d.ts +37 -13
- package/dist/src/extensions/agent-plugins/inventory.js +1 -0
- package/dist/src/extensions/agent-plugins/sources.d.ts +13 -1
- package/dist/src/extensions/agent-plugins/sources.js +17 -2
- package/dist/src/extensions/agent-plugins/store.d.ts +46 -0
- package/dist/src/extensions/agent-plugins/store.js +19 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/marketplace.d.ts +2 -1
- package/dist/src/extensions/marketplace.js +6 -5
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -0
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/agent-plugins.js +6 -4
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +62 -4
- package/dist/src/gateway/image-generation-setup.js +2 -2
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/service/marketplace-service.d.ts +1 -1
- package/dist/src/gateway/service/marketplace-service.js +3 -2
- package/dist/src/gateway/service.js +2 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tui/backends/embedded-backend.js +3 -3
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/user-context/config.d.ts +2 -0
- package/dist/src/user-context/config.js +2 -0
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/user-model/repository.d.ts +2 -0
- package/dist/src/user-model/repository.js +18 -1
- package/dist/src/voice/realtime/omniEngine.js +8 -6
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-C_56_X-e.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-DPil7wFb.js +0 -1
- package/dist/gateway/static/root/assets/agents-DXcxDhxl.js +0 -70
- package/dist/gateway/static/root/assets/apps-page-DOteYBc9.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-DuULlur3.js +0 -7
- package/dist/gateway/static/root/assets/browser-settings-page-DvMsxdHZ.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-3kh-Ox8d.js +0 -8
- package/dist/gateway/static/root/assets/channels-BU6w4j04.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-T4wZrdXv.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BZ2oIRzn.js +0 -2
- package/dist/gateway/static/root/assets/device-pairing-wizard-Dka3NDC5.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-Cj-byMay.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Kp84CfNh.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CtjDNSNA.js +0 -1
- package/dist/gateway/static/root/assets/index-Bd7mDZFV.css +0 -1
- package/dist/gateway/static/root/assets/index-b_BtpHlo.js +0 -106
- package/dist/gateway/static/root/assets/logs-page-NHrVWElJ.js +0 -2
- package/dist/gateway/static/root/assets/note-detail-panel-ddFcoIGv.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-DHY9KaXz.js +0 -8
- package/dist/gateway/static/root/assets/project-detail-page-BcikJ4wu.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-DFZXCRc2.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Dr2FLBo-.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-Sp5hozOY.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-Cm4j_l7t.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CpD6cRcO.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CfuLya7v.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Bqkvdt3m.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-rA2myUNh.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-CrTKXe6r.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-DcsgbSjp.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-7tObyrXy.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-DcXyKH2p.js +0 -6
|
@@ -12,6 +12,7 @@ import { getAssistantTurnErrorMessage, isAssistantTurnAborted, isAssistantTurnFa
|
|
|
12
12
|
import { isAgentTurnUnsettledError, resolveAgentTurnTimeoutMs, runAgentTurnWithTimeout } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
13
13
|
import { detectToolLoops } from "../orchestration/loop-guard.js";
|
|
14
14
|
import { tryApplySessionTranscriptHygiene } from "../transcript/transcript-hygiene.js";
|
|
15
|
+
import { restoreCurrentTurnImages } from "./current-turn-images.js";
|
|
15
16
|
import { resolvePromptCachePolicy } from "../../providers/prompt-cache-plan.js";
|
|
16
17
|
import { wrapStreamFnForXopcExtensions } from "./xopc-stream-bridge.js";
|
|
17
18
|
import { acquireEmbeddedSessionRunner, evictEmbeddedSessionRunner } from "./session-runner.js";
|
|
@@ -326,9 +327,14 @@ async function runXopcEmbeddedTurn(params) {
|
|
|
326
327
|
const authoritativePrepareRequest = async (request, signal) => {
|
|
327
328
|
const prepared = await basePrepareRequest?.(request, signal);
|
|
328
329
|
const currentContext = prepared?.context ?? request.context;
|
|
330
|
+
const imagesForModel = resolvedModel.input?.includes("image") === false ? [] : params.images ?? [];
|
|
331
|
+
const restoreImages = (messages) => restoreCurrentTurnImages(messages, imagesForModel, runId);
|
|
329
332
|
if (!useAuthoritativeProjection) return {
|
|
330
333
|
...prepared,
|
|
331
|
-
context:
|
|
334
|
+
context: {
|
|
335
|
+
...currentContext,
|
|
336
|
+
messages: restoreImages(currentContext.messages)
|
|
337
|
+
}
|
|
332
338
|
};
|
|
333
339
|
try {
|
|
334
340
|
const messages = await transcriptRuntime.loadMessages();
|
|
@@ -336,7 +342,7 @@ async function runXopcEmbeddedTurn(params) {
|
|
|
336
342
|
...prepared,
|
|
337
343
|
context: {
|
|
338
344
|
...currentContext,
|
|
339
|
-
messages: withRecoveredMessages(currentContext.messages, messages)
|
|
345
|
+
messages: restoreImages(withRecoveredMessages(currentContext.messages, messages))
|
|
340
346
|
}
|
|
341
347
|
};
|
|
342
348
|
} catch (error) {
|
|
@@ -347,7 +353,13 @@ async function runXopcEmbeddedTurn(params) {
|
|
|
347
353
|
runId,
|
|
348
354
|
phase: "prepare_request"
|
|
349
355
|
}, "Failed to refresh the authoritative compacted projection");
|
|
350
|
-
return
|
|
356
|
+
return {
|
|
357
|
+
...prepared,
|
|
358
|
+
context: {
|
|
359
|
+
...currentContext,
|
|
360
|
+
messages: restoreImages(currentContext.messages)
|
|
361
|
+
}
|
|
362
|
+
};
|
|
351
363
|
}
|
|
352
364
|
};
|
|
353
365
|
session.agent.prepareRequest = authoritativePrepareRequest;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { executeExternalOperation } from "../../capabilities/runtime/external-operations.js";
|
|
2
|
-
import { canonicalCapabilityJson } from "../../capabilities/runtime/dispatcher.js";
|
|
3
1
|
import { COMPUTER_CONTROL_TOOL, init_src } from "../../../packages/computer-control-contract/src/index.js";
|
|
4
2
|
import { BROWSER_CONTROL_ENDPOINT_TOOL_NAME } from "../../../packages/browser-control-contract/src/index.js";
|
|
3
|
+
import { executeExternalOperation } from "../../capabilities/runtime/external-operations.js";
|
|
4
|
+
import { canonicalCapabilityJson } from "../../capabilities/runtime/dispatcher.js";
|
|
5
5
|
import { externalToolRef, parseExternalToolRef } from "./refs.js";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
//#region src/agent/external-tools/endpoint-provider.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
2
1
|
import { getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "../../config/schema.js";
|
|
2
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
3
3
|
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
4
4
|
import { getDefaultModelSync, getModelsByProvider, init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
5
5
|
import { resolveAgentModelFallbackValues, resolveAgentModelPrimaryValue } from "../../config/model-input.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { init_attachment_ref, parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
|
-
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
5
|
-
import { extractTextContent } from "./context/workspace.js";
|
|
6
4
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
7
5
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
6
|
+
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
8
7
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
9
8
|
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
10
9
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
10
|
+
import { extractTextContent } from "./context/workspace.js";
|
|
11
11
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
12
12
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
13
13
|
import { runWithEmbeddedExecutionSession } from "./embedded/execution-context.js";
|
|
@@ -102,10 +102,26 @@ export interface MarketplacePackageDetail {
|
|
|
102
102
|
username: string;
|
|
103
103
|
avatarUrl: string | null;
|
|
104
104
|
};
|
|
105
|
+
publisher?: {
|
|
106
|
+
verification: 'community' | 'verified';
|
|
107
|
+
sourceRepository: string | null;
|
|
108
|
+
};
|
|
105
109
|
latestVersion: {
|
|
106
110
|
version: string;
|
|
107
111
|
changelog: string | null;
|
|
108
112
|
publishedAt: string;
|
|
113
|
+
downloadUrl?: string;
|
|
114
|
+
sha256?: string | null;
|
|
115
|
+
sourceCommit?: string | null;
|
|
116
|
+
artifactFormat?: string;
|
|
117
|
+
riskTier?: 'content' | 'network' | 'local-exec';
|
|
118
|
+
componentIndex?: {
|
|
119
|
+
skills: string[];
|
|
120
|
+
mcpServers: Array<{
|
|
121
|
+
name: string;
|
|
122
|
+
transport: string;
|
|
123
|
+
}>;
|
|
124
|
+
};
|
|
109
125
|
};
|
|
110
126
|
}
|
|
111
127
|
export interface StoreConnectorPackageDetail {
|
|
@@ -144,14 +160,21 @@ export interface StorePublishedPackageHead {
|
|
|
144
160
|
checksum?: string;
|
|
145
161
|
integrity?: string;
|
|
146
162
|
sha256?: string;
|
|
163
|
+
sourceCommit?: string | null;
|
|
164
|
+
artifactFormat?: string;
|
|
165
|
+
riskTier?: 'content' | 'network' | 'local-exec';
|
|
147
166
|
};
|
|
148
167
|
}
|
|
149
|
-
export
|
|
168
|
+
export type ResolvedExtensionStoreArtifact = {
|
|
150
169
|
downloadUrl: string;
|
|
151
170
|
version: string;
|
|
152
171
|
integrity?: string;
|
|
153
172
|
sha256?: string;
|
|
154
|
-
|
|
173
|
+
sourceCommit?: string;
|
|
174
|
+
artifactFormat?: string;
|
|
175
|
+
riskTier?: 'content' | 'network' | 'local-exec';
|
|
176
|
+
};
|
|
177
|
+
export declare function resolveExtensionZipDownloadUrl(storeBaseUrl: string, packageName: string, version?: string): Promise<ResolvedExtensionStoreArtifact>;
|
|
155
178
|
export declare function downloadExtensionStoreZipBuffer(storeBaseUrl: string, downloadUrl: string): Promise<Buffer>;
|
|
156
179
|
export declare function downloadConnectorStoreZipBuffer(storeBaseUrl: string, downloadUrl: string): Promise<Buffer>;
|
|
157
180
|
export declare function skillIdForMarketplaceInstall(packageName: string): string | undefined;
|
|
@@ -181,7 +181,7 @@ async function resolveExtensionZipDownloadUrl(storeBaseUrl, packageName, version
|
|
|
181
181
|
const base = normalizeBaseUrl(storeBaseUrl);
|
|
182
182
|
const enc = encodeURIComponent(packageName.trim());
|
|
183
183
|
const meta = await fetchJson(`${base}/api/v1/packages/${enc}`);
|
|
184
|
-
if (meta.type !== "extension") throw new Error(`Package "${packageName}" has type "${meta.type}" (expected extension). Use \`xopc skills install\` for skills.`);
|
|
184
|
+
if (meta.type !== "extension" && meta.type !== "plugin") throw new Error(`Package "${packageName}" has type "${meta.type}" (expected plugin or extension). Use \`xopc skills install\` for skills.`);
|
|
185
185
|
if (version?.trim()) {
|
|
186
186
|
const detail = await fetchJson(`${base}/api/v1/packages/${enc}/versions/${encodeURIComponent(version.trim())}`);
|
|
187
187
|
if (!detail.downloadUrl) throw new Error("Store version has no download URL");
|
|
@@ -190,7 +190,10 @@ async function resolveExtensionZipDownloadUrl(storeBaseUrl, packageName, version
|
|
|
190
190
|
downloadUrl: detail.downloadUrl,
|
|
191
191
|
version: detail.version,
|
|
192
192
|
integrity: detail.integrity ?? detail.checksum ?? detail.sha256,
|
|
193
|
-
...detail.sha256 ? { sha256: detail.sha256 } : {}
|
|
193
|
+
...detail.sha256 ? { sha256: detail.sha256 } : {},
|
|
194
|
+
...detail.sourceCommit ? { sourceCommit: detail.sourceCommit } : {},
|
|
195
|
+
...detail.artifactFormat ? { artifactFormat: detail.artifactFormat } : {},
|
|
196
|
+
...detail.riskTier ? { riskTier: detail.riskTier } : {}
|
|
194
197
|
};
|
|
195
198
|
}
|
|
196
199
|
const lv = meta.latestVersion;
|
|
@@ -200,7 +203,10 @@ async function resolveExtensionZipDownloadUrl(storeBaseUrl, packageName, version
|
|
|
200
203
|
downloadUrl: lv.downloadUrl,
|
|
201
204
|
version: lv.version,
|
|
202
205
|
integrity: lv.integrity ?? lv.checksum ?? lv.sha256,
|
|
203
|
-
...lv.sha256 ? { sha256: lv.sha256 } : {}
|
|
206
|
+
...lv.sha256 ? { sha256: lv.sha256 } : {},
|
|
207
|
+
...lv.sourceCommit ? { sourceCommit: lv.sourceCommit } : {},
|
|
208
|
+
...lv.artifactFormat ? { artifactFormat: lv.artifactFormat } : {},
|
|
209
|
+
...lv.riskTier ? { riskTier: lv.riskTier } : {}
|
|
204
210
|
};
|
|
205
211
|
}
|
|
206
212
|
async function downloadExtensionStoreZipBuffer(storeBaseUrl, downloadUrl) {
|
|
@@ -9,9 +9,9 @@ import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
|
9
9
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
10
10
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
11
11
|
import "../../activity/index.js";
|
|
12
|
+
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
12
13
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
13
14
|
import "../../capabilities/runtime/dispatcher.js";
|
|
14
|
-
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
15
15
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
16
16
|
import "../../projects/index.js";
|
|
17
17
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AgentEntrySchema, EffectiveAgentConfigSchema } from "../agent-config/schema.js";
|
|
2
2
|
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
3
3
|
import { init_agent_config } from "../agent-config/index.js";
|
|
4
|
-
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
5
|
-
import { defineAtomicCapability, defineReadCapability } from "../capabilities/runtime/dispatcher.js";
|
|
6
4
|
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
7
5
|
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
6
|
+
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
7
|
+
import { defineAtomicCapability, defineReadCapability } from "../capabilities/runtime/dispatcher.js";
|
|
8
8
|
import { AgentCatalogService } from "./service.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/agent-catalog/capabilities.ts
|
|
@@ -2,8 +2,8 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
5
|
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
6
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
7
7
|
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
8
8
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
9
9
|
import { dirname, join } from "path";
|
|
@@ -3,8 +3,8 @@ import { init_paths, resolveOAuthPath } from "../config/paths.js";
|
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { dirname } from "node:path";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
|
-
import { mkdir, open, readFile, rm, stat } from "node:fs/promises";
|
|
7
6
|
import { setTimeout } from "node:timers/promises";
|
|
7
|
+
import { mkdir, open, readFile, rm, stat } from "node:fs/promises";
|
|
8
8
|
//#region src/auth/oauth-provider-lock.ts
|
|
9
9
|
function lockPath(providerId) {
|
|
10
10
|
return `${resolveOAuthPath(providerId.toLowerCase())}.lock`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
3
2
|
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
|
+
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
4
4
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
//#region src/auth/sync-provider-auth.ts
|
|
@@ -3,10 +3,10 @@ import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
|
3
3
|
import { init_trust_policy, resolveAutomationSafetyForTrust } from "../../user-context/trust-policy.js";
|
|
4
4
|
import { getUserTrustPolicy } from "../../storage/sqlite/user-trust-repository.js";
|
|
5
5
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
6
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
6
7
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
7
8
|
import { ExternalEffectNotAppliedError } from "../../capabilities/runtime/external-operations.js";
|
|
8
9
|
import { defineExternalCapability, defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
9
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
10
10
|
import { AutomationCreateCapabilityInputSchema } from "./write.js";
|
|
11
11
|
import { simulateAutomation } from "../draft/automation-draft-validator.js";
|
|
12
12
|
import { AutomationDraftService } from "../draft/automation-draft-service.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
2
2
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
3
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
4
|
+
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
4
5
|
import { cutoverLegacyAgentConfig } from "../agent-catalog/migrations/legacy-config-cutover.js";
|
|
5
6
|
import "../agent-catalog/index.js";
|
|
6
|
-
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
7
7
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
8
8
|
//#region src/bootstrap/application-state.ts
|
|
9
9
|
init_sqlite();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SqliteCommitEffectError, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
-
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
3
2
|
import { CapabilityError } from "./errors.js";
|
|
4
3
|
import { executeExternalOperation } from "./external-operations.js";
|
|
4
|
+
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/capabilities/runtime/dispatcher.ts
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CapabilityError } from "./errors.js";
|
|
2
2
|
import { CapabilityDispatcher } from "./dispatcher.js";
|
|
3
|
-
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
4
3
|
import { registerLocalAppReadCapabilities } from "../../local-apps/capabilities/read.js";
|
|
5
4
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
6
5
|
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
@@ -19,6 +18,7 @@ import { registerSceneReadCapabilities } from "../../scenes/capabilities/read.js
|
|
|
19
18
|
import { registerSceneWriteCapabilities } from "../../scenes/capabilities/write.js";
|
|
20
19
|
import { registerSettingsCapability } from "./settings.js";
|
|
21
20
|
import { registerAppContextCapability } from "./app-context.js";
|
|
21
|
+
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
22
22
|
//#region src/capabilities/runtime/product.ts
|
|
23
23
|
function createProductDispatcher(getNotes, taskWrites) {
|
|
24
24
|
const dispatcher = new CapabilityDispatcher();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
2
2
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
|
-
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
4
3
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
4
|
+
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
5
5
|
import { commandRegistry } from "./registry.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_paths, resolveConfigPath } from "../../config/paths.js";
|
|
4
3
|
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
4
|
+
import { init_paths, resolveConfigPath } from "../../config/paths.js";
|
|
5
5
|
import { commandRegistry } from "../registry.js";
|
|
6
6
|
import { parseConfigValue } from "../config-value.js";
|
|
7
7
|
import { getConfigValueAtPath, parseConfigPath, setConfigValueAtPath, unsetConfigValueAtPath } from "../config-paths.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
3
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
5
5
|
import { init_agent_session_key, resolveAgentMainConversationId } from "../../routing/agent-session-key.js";
|
|
6
6
|
import { ExtensionLoader } from "../../extensions/loader.js";
|
|
7
7
|
import "../../extensions/index.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { normalizeAgentId, validateAgentIdForNewAgent } from "../../agent-catalog/id.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
3
3
|
import { init_agent_scope, resolveAgentDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
5
4
|
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
//#region src/cli/commands/agents.ts
|
|
8
8
|
init_repository();
|
|
@@ -38,11 +38,12 @@ async function installAgentPluginFromCli(source, options) {
|
|
|
38
38
|
default: false
|
|
39
39
|
})) return;
|
|
40
40
|
}
|
|
41
|
-
const plugin = await withAgentPluginSource(source, cfg, (local) => store.install(local, {
|
|
41
|
+
const plugin = await withAgentPluginSource(source, cfg, (local, provenance) => store.install(local, {
|
|
42
42
|
reviewHash: plan.reviewHash,
|
|
43
43
|
replace: options.force,
|
|
44
44
|
expectedId: options.expectedId,
|
|
45
|
-
sourceLabel: source.startsWith("https://") || source.startsWith("store:") ? source : resolve(source)
|
|
45
|
+
sourceLabel: source.startsWith("https://") || source.startsWith("store:") ? source : resolve(source),
|
|
46
|
+
provenance
|
|
46
47
|
}));
|
|
47
48
|
console.log(`Installed plugin:${plugin.id} (${plugin.receipt.enabled ? "enabled" : "disabled"}).`);
|
|
48
49
|
return plugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
2
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
3
2
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
3
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
5
4
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
5
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
6
6
|
import { loadConfig } from "../../config/loader.js";
|
|
7
7
|
import { formatExamples, register } from "../registry.js";
|
|
8
8
|
import { getContextWithOpts } from "../context.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
2
|
-
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
|
-
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
4
2
|
import { getAgentDefaultModelRef, init_schema } from "../../../config/schema.js";
|
|
3
|
+
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
5
4
|
import { init_models_json, loadModelsJson, saveModelsJson } from "../../../config/models-json.js";
|
|
6
5
|
import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
7
6
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
8
7
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
9
8
|
import { getAllProviders, getModelsByProvider, getProviderDisplayName, init_providers, providerSupportsApiKey, providerSupportsOAuth } from "../../../providers/index.js";
|
|
9
|
+
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
10
10
|
import { prepareUpdateGlobalDefaults } from "../../../gateway/global-defaults-admin.js";
|
|
11
11
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
12
12
|
import { getXopcCloudCatalogCoordinator } from "../../../providers/xopc-cloud-catalog-coordinator.js";
|
|
@@ -4,6 +4,7 @@ import "../extensions/index.js";
|
|
|
4
4
|
import { loadConfig } from "../config/loader.js";
|
|
5
5
|
import { MessageBus } from "../infra/bus/queue.js";
|
|
6
6
|
import "../infra/bus/index.js";
|
|
7
|
+
import { bootstrapApplicationStateSync } from "../bootstrap/application-state.js";
|
|
7
8
|
import { createDefaultContext } from "./registry.js";
|
|
8
9
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
9
10
|
import "../config/index.js";
|
|
@@ -19,6 +20,7 @@ function argvRequestsVersionOnly(argv) {
|
|
|
19
20
|
async function registerExtensionCliCommands(program) {
|
|
20
21
|
if (argvRequestsVersionOnly(process.argv)) return;
|
|
21
22
|
const ctx = createDefaultContext(process.argv, {});
|
|
23
|
+
bootstrapApplicationStateSync(ctx.configPath);
|
|
22
24
|
const config = loadConfig(ctx.configPath);
|
|
23
25
|
const workspace = getWorkspacePath(config) || ctx.workspacePath;
|
|
24
26
|
const rawExt = config.extensions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
2
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
3
2
|
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
3
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
4
4
|
import { assertConfigRewriteSafeForRunningGateway, saveConfig } from "../../config/loader.js";
|
|
5
5
|
import { ensureStarterAgentsInitialized } from "../../agent/starter-agents.js";
|
|
6
6
|
import { bootstrapApplicationStateSync } from "../../bootstrap/application-state.js";
|
package/dist/src/config/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXopcCloudCatalogCachePath, resolveXopcDatabasePath } from "./paths-state.js";
|
|
2
|
-
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
3
|
-
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
4
|
-
import { resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
5
|
-
import { FILENAMES, WORKSPACE_FILES, existsSync, hasBundledExtensionManifest, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMcpOAuthPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
6
2
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
7
3
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
8
4
|
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
9
5
|
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
6
|
+
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
7
|
+
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
8
|
+
import { resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
10
9
|
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
10
|
+
import { FILENAMES, WORKSPACE_FILES, existsSync, hasBundledExtensionManifest, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMcpOAuthPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
11
11
|
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
12
12
|
import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
13
13
|
import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
4
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
5
3
|
import { ConfigSchema, init_schema } from "./schema.js";
|
|
4
|
+
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
6
5
|
import { init_resolution, setActivePlatformDiscovery } from "../platform/resolution.js";
|
|
6
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
7
7
|
import { assertChannelPluginConfigs } from "./validate-channel-configs.js";
|
|
8
8
|
import { isGatewayConfigLockedByAnotherProcessSync } from "../gateway/lock.js";
|
|
9
9
|
import { dirname } from "path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
3
|
-
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
4
3
|
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
5
5
|
import { init_model_policy, isComputerModel } from "../computer/model-policy.js";
|
|
6
6
|
import { existsSync, readFileSync } from "fs";
|
|
7
7
|
import { z } from "zod";
|
|
@@ -1266,6 +1266,7 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1266
1266
|
confirm: "confirm";
|
|
1267
1267
|
deny: "deny";
|
|
1268
1268
|
}>>;
|
|
1269
|
+
showMemoryReferences: z.ZodDefault<z.ZodBoolean>;
|
|
1269
1270
|
processingPolicy: z.ZodDefault<z.ZodEnum<{
|
|
1270
1271
|
local_only: "local_only";
|
|
1271
1272
|
remote_allowed: "remote_allowed";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { ComputerConfigSchema, init_config } from "../computer/config.js";
|
|
2
3
|
import { AgentModelsOverrideSchema, ImageGenerationRouteSchema, ModelRouteSchema } from "../agent-config/schema.js";
|
|
3
4
|
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
4
5
|
import { init_agent_config } from "../agent-config/index.js";
|
|
5
6
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
6
|
-
import { ComputerConfigSchema, init_config } from "../computer/config.js";
|
|
7
7
|
import { DEFAULT_CONTEXT_COMPACTION_POLICY, UserContextConfigSchema, init_config as init_config$1 } from "../user-context/config.js";
|
|
8
8
|
import { init_public_url, validatePublicUrl } from "./public-url.js";
|
|
9
9
|
import { PlatformConfigSchema, init_contracts } from "../platform/contracts.js";
|
|
@@ -1013,6 +1013,7 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1013
1013
|
enabled: true,
|
|
1014
1014
|
writePolicy: "allow",
|
|
1015
1015
|
sensitiveWritePolicy: "confirm",
|
|
1016
|
+
showMemoryReferences: true,
|
|
1016
1017
|
processingPolicy: "remote_allowed",
|
|
1017
1018
|
extraction: {
|
|
1018
1019
|
reviewIntervalTurns: 10,
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
import { type InstalledAgentPlugin } from './store.js';
|
|
2
2
|
export declare function agentPluginInventoryRow(plugin: InstalledAgentPlugin): {
|
|
3
|
+
components: {
|
|
4
|
+
skills: {
|
|
5
|
+
name: string;
|
|
6
|
+
}[];
|
|
7
|
+
mcp: {
|
|
8
|
+
name: string;
|
|
9
|
+
id: string;
|
|
10
|
+
type: "sse" | "streamable-http" | "stdio";
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
diagnostics: import("./validation.js").PluginDiagnostic[];
|
|
14
|
+
provenance?: {
|
|
15
|
+
kind: "store";
|
|
16
|
+
packageName: string;
|
|
17
|
+
packageType: "extension" | "plugin";
|
|
18
|
+
version: string;
|
|
19
|
+
sha256: string;
|
|
20
|
+
publisherVerification?: "verified" | "community";
|
|
21
|
+
sourceRepository?: string;
|
|
22
|
+
sourceCommit?: string;
|
|
23
|
+
artifactFormat?: string;
|
|
24
|
+
riskTier?: "content" | "network" | "local-exec";
|
|
25
|
+
};
|
|
3
26
|
id: string;
|
|
4
27
|
pluginId: string;
|
|
5
28
|
format: "agent-plugin";
|
|
@@ -13,6 +36,8 @@ export declare function agentPluginInventoryRow(plugin: InstalledAgentPlugin): {
|
|
|
13
36
|
hasUi: boolean;
|
|
14
37
|
hasConfigSchema: boolean;
|
|
15
38
|
canRollback: boolean;
|
|
39
|
+
};
|
|
40
|
+
export declare function listAgentPluginInventory(): {
|
|
16
41
|
components: {
|
|
17
42
|
skills: {
|
|
18
43
|
name: string;
|
|
@@ -24,8 +49,18 @@ export declare function agentPluginInventoryRow(plugin: InstalledAgentPlugin): {
|
|
|
24
49
|
}[];
|
|
25
50
|
};
|
|
26
51
|
diagnostics: import("./validation.js").PluginDiagnostic[];
|
|
27
|
-
|
|
28
|
-
|
|
52
|
+
provenance?: {
|
|
53
|
+
kind: "store";
|
|
54
|
+
packageName: string;
|
|
55
|
+
packageType: "extension" | "plugin";
|
|
56
|
+
version: string;
|
|
57
|
+
sha256: string;
|
|
58
|
+
publisherVerification?: "verified" | "community";
|
|
59
|
+
sourceRepository?: string;
|
|
60
|
+
sourceCommit?: string;
|
|
61
|
+
artifactFormat?: string;
|
|
62
|
+
riskTier?: "content" | "network" | "local-exec";
|
|
63
|
+
};
|
|
29
64
|
id: string;
|
|
30
65
|
pluginId: string;
|
|
31
66
|
format: "agent-plugin";
|
|
@@ -39,15 +74,4 @@ export declare function listAgentPluginInventory(): {
|
|
|
39
74
|
hasUi: boolean;
|
|
40
75
|
hasConfigSchema: boolean;
|
|
41
76
|
canRollback: boolean;
|
|
42
|
-
components: {
|
|
43
|
-
skills: {
|
|
44
|
-
name: string;
|
|
45
|
-
}[];
|
|
46
|
-
mcp: {
|
|
47
|
-
name: string;
|
|
48
|
-
id: string;
|
|
49
|
-
type: "sse" | "streamable-http" | "stdio";
|
|
50
|
-
}[];
|
|
51
|
-
};
|
|
52
|
-
diagnostics: import("./validation.js").PluginDiagnostic[];
|
|
53
77
|
}[];
|
|
@@ -16,6 +16,7 @@ function agentPluginInventoryRow(plugin) {
|
|
|
16
16
|
hasUi: false,
|
|
17
17
|
hasConfigSchema: false,
|
|
18
18
|
canRollback: !!plugin.receipt.previous,
|
|
19
|
+
...plugin.receipt.provenance ? { provenance: plugin.receipt.provenance } : {},
|
|
19
20
|
components: {
|
|
20
21
|
skills: plugin.skills.map((skill) => ({ name: skill.name })),
|
|
21
22
|
mcp: Object.entries(plugin.servers).map(([name, server]) => ({
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { Config } from '../../config/schema.js';
|
|
2
|
+
export interface AgentPluginSourceProvenance {
|
|
3
|
+
kind: 'store';
|
|
4
|
+
packageName: string;
|
|
5
|
+
packageType: 'plugin' | 'extension';
|
|
6
|
+
version: string;
|
|
7
|
+
sha256: string;
|
|
8
|
+
publisherVerification?: 'community' | 'verified';
|
|
9
|
+
sourceRepository?: string;
|
|
10
|
+
sourceCommit?: string;
|
|
11
|
+
artifactFormat?: string;
|
|
12
|
+
riskTier?: 'content' | 'network' | 'local-exec';
|
|
13
|
+
}
|
|
2
14
|
export declare function isAgentPluginArchive(buffer: Buffer): boolean;
|
|
3
15
|
export declare function withAgentPluginArchive<T>(buffer: Buffer, fn: (local: string) => T): T;
|
|
4
16
|
/** Resolve remote artifacts only for explicit inspect/install requests, never during discovery. */
|
|
5
|
-
export declare function withAgentPluginSource<T>(source: string, config: Config | undefined, fn: (local: string) => T): Promise<T>;
|
|
17
|
+
export declare function withAgentPluginSource<T>(source: string, config: Config | undefined, fn: (local: string, provenance?: AgentPluginSourceProvenance) => T): Promise<T>;
|
|
@@ -37,15 +37,30 @@ function withAgentPluginArchive(buffer, fn) {
|
|
|
37
37
|
async function withAgentPluginSource(source, config, fn) {
|
|
38
38
|
if (!source.startsWith("https://") && !source.startsWith("store:")) return fn(source);
|
|
39
39
|
let buffer;
|
|
40
|
+
let provenance;
|
|
40
41
|
if (source.startsWith("store:")) {
|
|
41
|
-
const { resolveExtensionZipDownloadUrl, resolveExtensionsStoreBaseUrl, downloadExtensionStoreZipBuffer, verifyStoreArtifactSha256 } = await import("../../agent/skills/marketplace/adapters/store/store-api-client.js");
|
|
42
|
+
const { fetchMarketplacePackageDetail, resolveExtensionZipDownloadUrl, resolveExtensionsStoreBaseUrl, downloadExtensionStoreZipBuffer, verifyStoreArtifactSha256 } = await import("../../agent/skills/marketplace/adapters/store/store-api-client.js");
|
|
42
43
|
const spec = source.slice(6);
|
|
43
44
|
const match = /^([a-z0-9.-]+)(?:@([^/]+))?$/.exec(spec);
|
|
44
45
|
if (!match) throw new Error("Expected store:<package>[@version]");
|
|
45
46
|
const base = resolveExtensionsStoreBaseUrl(config);
|
|
47
|
+
const detail = await fetchMarketplacePackageDetail(base, match[1]);
|
|
48
|
+
if (detail.type !== "plugin" && detail.type !== "extension") throw new Error(`Store package has unsupported type: ${detail.type}`);
|
|
46
49
|
const artifact = await resolveExtensionZipDownloadUrl(base, match[1], match[2]);
|
|
47
50
|
buffer = await downloadExtensionStoreZipBuffer(base, artifact.downloadUrl);
|
|
48
51
|
verifyStoreArtifactSha256(buffer, artifact.sha256);
|
|
52
|
+
provenance = {
|
|
53
|
+
kind: "store",
|
|
54
|
+
packageName: match[1],
|
|
55
|
+
packageType: detail.type,
|
|
56
|
+
version: artifact.version,
|
|
57
|
+
sha256: artifact.sha256,
|
|
58
|
+
...detail.publisher?.verification ? { publisherVerification: detail.publisher.verification } : {},
|
|
59
|
+
...detail.publisher?.sourceRepository ? { sourceRepository: detail.publisher.sourceRepository } : {},
|
|
60
|
+
...artifact.sourceCommit ? { sourceCommit: artifact.sourceCommit } : {},
|
|
61
|
+
...artifact.artifactFormat ? { artifactFormat: artifact.artifactFormat } : {},
|
|
62
|
+
...artifact.riskTier ? { riskTier: artifact.riskTier } : {}
|
|
63
|
+
};
|
|
49
64
|
} else {
|
|
50
65
|
const url = new URL(source);
|
|
51
66
|
const response = await createPluginHttpFetch(url, {})(url, { signal: AbortSignal.timeout(3e4) });
|
|
@@ -66,7 +81,7 @@ async function withAgentPluginSource(source, config, fn) {
|
|
|
66
81
|
}
|
|
67
82
|
buffer = Buffer.concat(chunks);
|
|
68
83
|
}
|
|
69
|
-
return withAgentPluginArchive(buffer, fn);
|
|
84
|
+
return withAgentPluginArchive(buffer, (local) => fn(local, provenance));
|
|
70
85
|
}
|
|
71
86
|
//#endregion
|
|
72
87
|
export { isAgentPluginArchive, withAgentPluginArchive, withAgentPluginSource };
|