@xopcai/xopc 0.0.354 → 0.0.355
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-B8PS1eLP.js → agent-avatar-dicebear-DiEBNuSv.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-CLBSL9hl.js → agent-defaults-settings-panel-DpBmB3QX.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-BninweSg.js → agent-plugin-dialog-DlojWUY_.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CcVLP_WP.js → agents-CeSCdUHP.js} +3 -3
- package/dist/gateway/static/root/assets/{app-management-settings-panel-COdQOmdT.js → app-management-settings-panel-MkSa6isi.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CDNjc2yy.js → appearance-settings-B7hCkaT_.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-C-kvpPj8.js → apps-page-D_CduJuC.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-87DN5nXX.js → automations-page-uEnQawd7.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-BdZ8NO8k.js → automations-workspace-pdiSK3Qk.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-B04Kv5DU.js → block-editor-r4mKGacz.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-Ck6Zb9aU.js → browser-automations-page-Blrxyy_h.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-DHlyYItE.js → browser-settings-page-DGuwrO7j.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-C-6RLFNh.js → capabilities-page-DUIA2K--.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-CST_HBkR.js → capabilities-settings-panel-CwPNQsJS.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-PBPJJsp6.js → capability-header-actions-CyvI2F5x.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-CM4sIvcP.js → channels-DBxDJV8I.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DTd7mWyE.js → chat-terminal-dock-YdxhecE7.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page--9rh1mvu.js → computer-settings-page-BuCrA8yD.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-v6Is0BOO.js → connector-service-page-BiB2GYkp.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-CryQzmEZ.js → connectors-page-nQAgZk-5.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-DTsMzjoZ.js → date-picker-BJtADyRQ.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Y1QYCcLp.js → dependency-picker-D-Ko0G40.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D9dfZrOp.js → desktop-pet-CVPWcWwC.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BHVOHZUL.js → desktop-pet-settings-BcN_I-7y.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-Cy5YDZ2b.js → device-pairing-wizard-CoKKoUlt.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DeMo9KlE.js → directory-picker-path-field-m0CubGEP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-AWrvy1Nb.js → extension-page-Dd88ynHj.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-C5KgmhYu.js → extension-settings-page-Dq1MXh6D.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DC-lok0J.js → gateway-settings-C_bTRQeE.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-C29_VFAs.js → home-page-xbqSikkK.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-BKVKfVMA.js → imports-page-Cd4tcbLU.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BJh5gU04.css → index-BuzC93X-.css} +1 -1
- package/dist/gateway/static/root/assets/{index-ByFXhQ-T.js → index-CYeGnj-L.js} +43 -44
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DiwE4gKU.js → keyboard-shortcuts-settings-CmalfzgQ.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-Dt3TC64L.js → local-app-workbench-page-BquHHLj6.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-DFPhWkxU.js → local-apps-page-RPLHMvYs.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-C4faHZHj.js → logs-page-7NMGltSw.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-pZLdvIiw.js → management-settings-zwFewbhp.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-BLnT1tYJ.js → note-detail-panel-CwMg9cvF.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-BawArJvP.js → notes-page-CWJwrvo7.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CiBUm2Br.js → page-context-capture-button-DqmAq4Ov.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-Bbgx_dgV.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-B8_w6c3J.js → product-open-page-SsG2sljT.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-CDZdKiTz.js → project-detail-page-wp5cFhM7.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-BvahSrZi.js → projects-page-Brfi519S.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-CU_UdkuI.js → remote-access-hub-BdtF8Cvk.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BnMS50vK.js → runtime-tools-settings-panel-CT6HKczq.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-CDR1-q25.js → scenes-page-BmlI42OR.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-B4Xa8w8S.js → schema-form-DEcsbgne.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-Ymyg98G-.js → sessions-page-C_G8fZwV.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CDxdzwDs.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-CHZdpvkT.js → settings-page-P50kLPUz.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-HESfALIF.js → setup-status-panel-DtnwH0wN.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-CXEBo5YL.js → shares-settings-7Ak_MsJg.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-DYgcO7y0.js → skill-api-CcdHQhxd.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-Dx5v64jU.js → skills-page-ChjXDxdX.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-wXCBwYwE.js → system-settings-panel-DAR0w3Xi.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-hoIyr7tp.js → task-detail-page-DEx0kXDV.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-C0t8y3Mi.js → tunnel-api-CBy97LfF.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-A2DZAidl.js → usage-page-BdX6VPQC.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-C1jGTwjK.js → user-model-page-CRxiQnWG.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-xB0QpOFk.js → work-discovery-overlay-DvwmD9Ma.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-rM4U1FXc.js → workflow-run-setup-panel-BQ3fmhM-.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-QKC34FzQ.js → workflows-page-Bl8rd4fM.js} +1 -1
- package/dist/gateway/static/root/index.html +2 -2
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +3 -3
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/run-for-session.d.ts +1 -0
- package/dist/src/agent/embedded/run-for-session.js +2 -1
- package/dist/src/agent/embedded/run-turn.js +19 -1
- package/dist/src/agent/embedded/types.d.ts +1 -0
- 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/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/prompt/sections/messaging-runtime.js +2 -1
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -0
- package/dist/src/agent/service/direct-turn-helpers.js +1 -0
- package/dist/src/agent/service/process-direct-streaming.js +1 -0
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/tools/personal-preference-tool.d.ts +1 -1
- package/dist/src/agent/tools/personal-preference-tool.js +3 -2
- package/dist/src/agent/tools/personal-task-tool.d.ts +2 -1
- package/dist/src/agent/tools/personal-task-tool.js +26 -7
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-config/schema.d.ts +5 -1
- package/dist/src/agent-config/schema.js +2 -1
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/oauth-provider-lock.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.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/models.js +3 -3
- package/dist/src/cli/commands/onboard/model.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/personal-agent.js +16 -1
- 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/image-generation-setup.js +2 -2
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +41 -0
- package/dist/src/gateway/service/run-gateway-agent.js +2 -1
- package/dist/src/gateway/service.js +13 -13
- package/dist/src/gateway/xopc-cloud-capability-setup.d.ts +9 -0
- package/dist/src/gateway/xopc-cloud-capability-setup.js +43 -3
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/personal-agent/service.d.ts +1 -0
- package/dist/src/personal-agent/service.js +14 -2
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/task-main-update-delivery.js +5 -2
- package/dist/src/tasks/task-origin-repository.d.ts +4 -1
- package/dist/src/tasks/task-origin-repository.js +3 -3
- package/dist/src/tasks/task-run-coordinator.d.ts +1 -0
- package/dist/src/tasks/task-run-coordinator.js +13 -7
- package/dist/src/tasks/task-run-dispatcher.d.ts +1 -1
- package/dist/src/tasks/task-run-dispatcher.js +6 -4
- package/dist/src/tui/backends/embedded-backend.js +2 -2
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/personal-page-Cng583RH.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-wMZhxwTM.js +0 -1
|
@@ -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";
|
|
4
6
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
5
7
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
6
|
-
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
7
8
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
8
9
|
import { extractProfileAgentId, resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
9
10
|
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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
//#region src/agent/skills/hub-lock.ts
|
|
5
5
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
-
import { init_paths } from "../../config/paths.js";
|
|
5
4
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
5
|
+
import { init_paths } from "../../config/paths.js";
|
|
6
6
|
import { findInstallSpec, hasBinary, installSkill } from "./installer.js";
|
|
7
7
|
import { applySkillEnvOverrides, createSkillConfigManager, getSkillEnvironment, isSkillEnabled, resolveSkillConfig, validateSkillConfig } from "./config.js";
|
|
8
8
|
import { parseSkillToolConditions } from "./skill-tool-gating.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
1
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
|
+
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
3
3
|
import { loadSkillsLock } from "./hub-lock.js";
|
|
4
4
|
import { dirname, join, resolve, sep } from "node:path";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
1
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
|
+
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
3
3
|
import { resolveWorkspaceSkillsDir } from "./workspace-skills-dir.js";
|
|
4
4
|
import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
|
|
5
5
|
import { fuzzyFindText, normalizeForFuzzyMatch, normalizeToLF, restoreLineEndings } from "../tools/edit-diff.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
2
|
declare const PreferenceSchema: import("@sinclair/typebox").TObject<{
|
|
3
|
-
field: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"addressAs">, import("@sinclair/typebox").TLiteral<"warmth">, import("@sinclair/typebox").TLiteral<"humor">, import("@sinclair/typebox").TLiteral<"supportMode">, import("@sinclair/typebox").TLiteral<"detailLevel">, import("@sinclair/typebox").TLiteral<"proactivity">]>;
|
|
3
|
+
field: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"addressAs">, import("@sinclair/typebox").TLiteral<"warmth">, import("@sinclair/typebox").TLiteral<"humor">, import("@sinclair/typebox").TLiteral<"supportMode">, import("@sinclair/typebox").TLiteral<"detailLevel">, import("@sinclair/typebox").TLiteral<"proactivity">, import("@sinclair/typebox").TLiteral<"guidance">]>;
|
|
4
4
|
value: import("@sinclair/typebox").TString;
|
|
5
5
|
}>;
|
|
6
6
|
export declare function createPersonalPreferenceTool(deps: {
|
|
@@ -9,9 +9,10 @@ const PreferenceSchema = Type.Object({
|
|
|
9
9
|
Type.Literal("humor"),
|
|
10
10
|
Type.Literal("supportMode"),
|
|
11
11
|
Type.Literal("detailLevel"),
|
|
12
|
-
Type.Literal("proactivity")
|
|
12
|
+
Type.Literal("proactivity"),
|
|
13
|
+
Type.Literal("guidance")
|
|
13
14
|
]),
|
|
14
|
-
value: Type.String({ description: "Use the exact enum for
|
|
15
|
+
value: Type.String({ description: "Use the exact enum for warmth, humor, supportMode, detailLevel, or proactivity. addressAs is a name. guidance is free text for the user’s precise, explicitly requested lasting response preference; preserve their meaning. Do not store temporary mood or guesswork." })
|
|
15
16
|
});
|
|
16
17
|
function createPersonalPreferenceTool(deps) {
|
|
17
18
|
return {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
2
|
import { type XopcUseToolDeps } from './xopc-use-tool.js';
|
|
3
3
|
declare const PersonalTaskSchema: import("@sinclair/typebox").TObject<{
|
|
4
|
-
command: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"agents">, import("@sinclair/typebox").TLiteral<"create">, import("@sinclair/typebox").TLiteral<"list">, import("@sinclair/typebox").TLiteral<"get">, import("@sinclair/typebox").TLiteral<"instruct">]>;
|
|
4
|
+
command: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"agents">, import("@sinclair/typebox").TLiteral<"create">, import("@sinclair/typebox").TLiteral<"list">, import("@sinclair/typebox").TLiteral<"get">, import("@sinclair/typebox").TLiteral<"instruct">, import("@sinclair/typebox").TLiteral<"answer">]>;
|
|
5
5
|
title: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6
6
|
objective: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
7
7
|
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
8
|
agentId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
9
|
taskId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
10
|
instruction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11
|
+
questionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11
12
|
expectedOutputs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
12
13
|
acceptanceCriteria: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
13
14
|
constraints: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
@@ -2,6 +2,7 @@ import { resolveEffectiveAgentConfig } from "../../agent-config/resolver.js";
|
|
|
2
2
|
import { init_agent_config } from "../../agent-config/index.js";
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
4
4
|
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
|
+
import { init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
5
6
|
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
6
7
|
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
7
8
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
@@ -10,13 +11,15 @@ import { Type } from "@sinclair/typebox";
|
|
|
10
11
|
//#region src/agent/tools/personal-task-tool.ts
|
|
11
12
|
init_repository();
|
|
12
13
|
init_agent_config();
|
|
14
|
+
init_providers();
|
|
13
15
|
const PersonalTaskSchema = Type.Object({
|
|
14
16
|
command: Type.Union([
|
|
15
17
|
Type.Literal("agents"),
|
|
16
18
|
Type.Literal("create"),
|
|
17
19
|
Type.Literal("list"),
|
|
18
20
|
Type.Literal("get"),
|
|
19
|
-
Type.Literal("instruct")
|
|
21
|
+
Type.Literal("instruct"),
|
|
22
|
+
Type.Literal("answer")
|
|
20
23
|
]),
|
|
21
24
|
title: Type.Optional(Type.String({ description: "Short task title, ideally under 60 characters. Do not put the full instructions here." })),
|
|
22
25
|
objective: Type.Optional(Type.String({ description: "One-sentence outcome for a new delegated Task." })),
|
|
@@ -24,6 +27,7 @@ const PersonalTaskSchema = Type.Object({
|
|
|
24
27
|
agentId: Type.Optional(Type.String({ description: "Specialist Agent ID. Never use your own ID." })),
|
|
25
28
|
taskId: Type.Optional(Type.String()),
|
|
26
29
|
instruction: Type.Optional(Type.String({ description: "The user’s new direction for this delegated Task." })),
|
|
30
|
+
questionId: Type.Optional(Type.String({ description: "Collaboration question ID to answer." })),
|
|
27
31
|
expectedOutputs: Type.Optional(Type.Array(Type.String())),
|
|
28
32
|
acceptanceCriteria: Type.Optional(Type.Array(Type.String())),
|
|
29
33
|
constraints: Type.Optional(Type.Array(Type.String())),
|
|
@@ -52,6 +56,15 @@ const DISCOVERY_TOOLS = [
|
|
|
52
56
|
function availableAgentTools(config, deps) {
|
|
53
57
|
return (config.toolAllowlist ? [...new Set([...DISCOVERY_TOOLS, ...config.toolAllowlist])] : DISCOVERY_TOOLS).filter((name) => (name !== "browser_use" || deps.getConfig?.()?.browser?.enabled !== false) && (!config.toolAllowlist || config.toolAllowlist.includes(name)) && config.tools[name]?.mode !== "deny");
|
|
54
58
|
}
|
|
59
|
+
function agentModelAvailability(config) {
|
|
60
|
+
for (const ref of [config.models.chat.primary, ...config.models.chat.fallbacks]) try {
|
|
61
|
+
if (isProviderConfiguredSync(resolveModel(ref).provider)) return { available: true };
|
|
62
|
+
} catch {}
|
|
63
|
+
return {
|
|
64
|
+
available: false,
|
|
65
|
+
reason: "No configured chat model resolves to an available provider"
|
|
66
|
+
};
|
|
67
|
+
}
|
|
55
68
|
function buildPersonalTaskBrief(input) {
|
|
56
69
|
const fullObjective = input.objective.trim();
|
|
57
70
|
const titleSource = (input.title?.trim() || fullObjective).replace(/\s+/g, " ");
|
|
@@ -72,7 +85,7 @@ function createPersonalTaskTool(deps) {
|
|
|
72
85
|
return {
|
|
73
86
|
name: "personal_task",
|
|
74
87
|
label: "Personal Task",
|
|
75
|
-
description: "Find specialist Agents by role
|
|
88
|
+
description: "Find specialist Agents by role, availableTools, and model.available; delegate work, inspect Tasks, send instructions, or answer worker questions. Choose an Agent whose model.available is true. Before saying you cannot do a request, inspect another Agent. If a candidate fails, try another suitable Agent or approach within the user’s authorization. agents can filter by requiredTools; if none match, inspect unfiltered Agents. Return to the user quickly after creation.",
|
|
76
89
|
parameters: PersonalTaskSchema,
|
|
77
90
|
mutatesWorkspace: true,
|
|
78
91
|
mutationScope: "external",
|
|
@@ -95,7 +108,8 @@ function createPersonalTaskTool(deps) {
|
|
|
95
108
|
id: agent.id,
|
|
96
109
|
name: agent.profile?.name ?? agent.id,
|
|
97
110
|
description: agent.profile?.description ?? "",
|
|
98
|
-
availableTools
|
|
111
|
+
availableTools,
|
|
112
|
+
model: agentModelAvailability(config)
|
|
99
113
|
};
|
|
100
114
|
}).filter((agent) => requiredTools.every((tool) => agent.availableTools.includes(tool)));
|
|
101
115
|
return {
|
|
@@ -115,7 +129,10 @@ function createPersonalTaskTool(deps) {
|
|
|
115
129
|
if (agentId === ownAgentId || agentId.startsWith("personal-")) throw new Error("Delegate to a specialist Agent, not a personal Agent");
|
|
116
130
|
const specialist = new AgentCatalogRepository().get(agentId);
|
|
117
131
|
if (!specialist || specialist.enabled === false || specialist.provisioningState !== "ready") throw new Error(`Specialist Agent is unavailable: ${agentId}`);
|
|
118
|
-
const
|
|
132
|
+
const config = resolveEffectiveAgentConfigForAgent(agentId).config;
|
|
133
|
+
const model = agentModelAvailability(config);
|
|
134
|
+
if (!model.available) throw new Error(`Agent ${agentId} cannot start: ${model.reason}. Find another available Agent.`);
|
|
135
|
+
const availableTools = availableAgentTools(config, deps);
|
|
119
136
|
const missingTools = (input.requiredTools ?? []).filter((tool) => !availableTools.includes(tool));
|
|
120
137
|
if (missingTools.length > 0) throw new Error(`Agent ${agentId} lacks required tools: ${missingTools.join(", ")}. Find another Agent or approach.`);
|
|
121
138
|
args = {
|
|
@@ -139,14 +156,16 @@ function createPersonalTaskTool(deps) {
|
|
|
139
156
|
const taskId = input.taskId?.trim();
|
|
140
157
|
if (!taskId) throw new Error("taskId is required");
|
|
141
158
|
if (!new TaskOriginRepository().owns(taskId, conversationId)) throw new Error("Task does not belong to this personal conversation");
|
|
142
|
-
if (command === "instruct") {
|
|
159
|
+
if (command === "instruct" || command === "answer") {
|
|
143
160
|
const body = input.instruction?.trim();
|
|
144
161
|
if (!body) throw new Error("instruction is required");
|
|
162
|
+
if (command === "answer" && !input.questionId?.trim()) throw new Error("questionId is required");
|
|
145
163
|
command = "collaboration_post";
|
|
146
164
|
args = {
|
|
147
165
|
taskId,
|
|
148
|
-
kind: "instruction",
|
|
149
|
-
body
|
|
166
|
+
kind: input.command === "answer" ? "answer" : "instruction",
|
|
167
|
+
body,
|
|
168
|
+
...input.command === "answer" ? { causationId: input.questionId.trim() } : {}
|
|
150
169
|
};
|
|
151
170
|
} else args = { taskId };
|
|
152
171
|
}
|
|
@@ -10,10 +10,10 @@ import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
|
10
10
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
11
11
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
12
12
|
import "../../activity/index.js";
|
|
13
|
-
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
14
|
-
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
15
13
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
16
14
|
import "../../capabilities/runtime/dispatcher.js";
|
|
15
|
+
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
16
|
+
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
17
17
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
18
18
|
import "../../projects/index.js";
|
|
19
19
|
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 { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
5
|
-
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
6
4
|
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
7
5
|
import { defineAtomicCapability, defineReadCapability } from "../capabilities/runtime/dispatcher.js";
|
|
6
|
+
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
7
|
+
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
8
8
|
import { AgentCatalogService } from "./service.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/agent-catalog/capabilities.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const DEFAULT_AGENT_MODEL_REF = "deepseek/deepseek-
|
|
2
|
+
export declare const DEFAULT_AGENT_MODEL_REF = "deepseek/deepseek-flash";
|
|
3
3
|
export declare const DEFAULT_CORE_SKILLS: readonly ["doc-coauthoring", "define-task", "find-skills", "summarize"];
|
|
4
4
|
export declare const DEFAULT_SKILL_POLICY: {
|
|
5
5
|
mode: "selected";
|
|
@@ -261,6 +261,7 @@ export declare const AgentDefaultsSchema: z.ZodObject<{
|
|
|
261
261
|
}, z.core.$strict>;
|
|
262
262
|
export declare const ResponsePreferencesSchema: z.ZodObject<{
|
|
263
263
|
addressAs: z.ZodOptional<z.ZodString>;
|
|
264
|
+
guidance: z.ZodOptional<z.ZodString>;
|
|
264
265
|
warmth: z.ZodOptional<z.ZodEnum<{
|
|
265
266
|
balanced: "balanced";
|
|
266
267
|
reserved: "reserved";
|
|
@@ -297,6 +298,7 @@ export declare const AgentProfileSchema: z.ZodObject<{
|
|
|
297
298
|
avatar: z.ZodOptional<z.ZodString>;
|
|
298
299
|
responsePreferences: z.ZodOptional<z.ZodObject<{
|
|
299
300
|
addressAs: z.ZodOptional<z.ZodString>;
|
|
301
|
+
guidance: z.ZodOptional<z.ZodString>;
|
|
300
302
|
warmth: z.ZodOptional<z.ZodEnum<{
|
|
301
303
|
balanced: "balanced";
|
|
302
304
|
reserved: "reserved";
|
|
@@ -339,6 +341,7 @@ export declare const AgentEntrySchema: z.ZodObject<{
|
|
|
339
341
|
avatar: z.ZodOptional<z.ZodString>;
|
|
340
342
|
responsePreferences: z.ZodOptional<z.ZodObject<{
|
|
341
343
|
addressAs: z.ZodOptional<z.ZodString>;
|
|
344
|
+
guidance: z.ZodOptional<z.ZodString>;
|
|
342
345
|
warmth: z.ZodOptional<z.ZodEnum<{
|
|
343
346
|
balanced: "balanced";
|
|
344
347
|
reserved: "reserved";
|
|
@@ -471,6 +474,7 @@ export declare const EffectiveAgentConfigSchema: z.ZodObject<{
|
|
|
471
474
|
avatar: z.ZodOptional<z.ZodString>;
|
|
472
475
|
responsePreferences: z.ZodOptional<z.ZodObject<{
|
|
473
476
|
addressAs: z.ZodOptional<z.ZodString>;
|
|
477
|
+
guidance: z.ZodOptional<z.ZodString>;
|
|
474
478
|
warmth: z.ZodOptional<z.ZodEnum<{
|
|
475
479
|
balanced: "balanced";
|
|
476
480
|
reserved: "reserved";
|
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
//#region src/agent-config/schema.ts
|
|
4
4
|
var DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, AgentIdSchema, ModelRefSchema, ModelRouteSchema, ImageGenerationRouteSchema, ComputerModelRouteSchema, ModelIntentSchema, ModelIntentRoutesSchema, ModelIntentOverridesSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, ToolModeSchema, ToolPolicySchema, ToolPoliciesSchema, SkillDefaultsSchema, SkillOverrideSchema, WorkflowPolicySchema, RuntimePolicySchema, AgentDefaultsSchema, ResponsePreferencesSchema, AgentProfileSchema, AgentEntrySchema, EffectiveAgentConfigSchema;
|
|
5
5
|
var init_schema = __esmMin((() => {
|
|
6
|
-
DEFAULT_AGENT_MODEL_REF = "deepseek/deepseek-
|
|
6
|
+
DEFAULT_AGENT_MODEL_REF = "deepseek/deepseek-flash";
|
|
7
7
|
DEFAULT_CORE_SKILLS = [
|
|
8
8
|
"doc-coauthoring",
|
|
9
9
|
"define-task",
|
|
@@ -124,6 +124,7 @@ var init_schema = __esmMin((() => {
|
|
|
124
124
|
}).strict();
|
|
125
125
|
ResponsePreferencesSchema = z.object({
|
|
126
126
|
addressAs: z.string().trim().max(60).optional(),
|
|
127
|
+
guidance: z.string().trim().max(500).optional(),
|
|
127
128
|
warmth: z.enum([
|
|
128
129
|
"reserved",
|
|
129
130
|
"balanced",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
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
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
5
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
6
|
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 { setTimeout } from "node:timers/promises";
|
|
7
6
|
import { mkdir, open, readFile, rm, stat } from "node:fs/promises";
|
|
7
|
+
import { setTimeout } from "node:timers/promises";
|
|
8
8
|
//#region src/auth/oauth-provider-lock.ts
|
|
9
9
|
function lockPath(providerId) {
|
|
10
10
|
return `${resolveOAuthPath(providerId.toLowerCase())}.lock`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/auth/profiles/store.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";
|
|
7
6
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
7
|
import { ExternalEffectNotAppliedError } from "../../capabilities/runtime/external-operations.js";
|
|
9
8
|
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";
|
|
5
4
|
import { cutoverLegacyAgentConfig } from "../agent-catalog/migrations/legacy-config-cutover.js";
|
|
6
5
|
import "../agent-catalog/index.js";
|
|
6
|
+
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
7
7
|
import { migrateIdentityMarkdownToCatalog } from "../agent-catalog/migrations/identity-markdown-cutover.js";
|
|
8
8
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
9
9
|
//#region src/bootstrap/application-state.ts
|
|
@@ -2,8 +2,8 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
3
3
|
import { createLogger } from "../../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../../utils/logger.js";
|
|
5
|
-
import { init_paths, resolveBinDir, resolveConfigPath } from "../../config/paths.js";
|
|
6
5
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
6
|
+
import { init_paths, resolveBinDir, resolveConfigPath } from "../../config/paths.js";
|
|
7
7
|
import { assertCacheDir } from "../cache-dir-policy.js";
|
|
8
8
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "../extension-identity.js";
|
|
9
9
|
import "../native-messaging-host.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SqliteCommitEffectError, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
+
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
2
3
|
import { CapabilityError } from "./errors.js";
|
|
3
4
|
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,5 +1,6 @@
|
|
|
1
1
|
import { CapabilityError } from "./errors.js";
|
|
2
2
|
import { CapabilityDispatcher } from "./dispatcher.js";
|
|
3
|
+
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
3
4
|
import { registerLocalAppReadCapabilities } from "../../local-apps/capabilities/read.js";
|
|
4
5
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
5
6
|
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
@@ -18,7 +19,6 @@ import { registerSceneReadCapabilities } from "../../scenes/capabilities/read.js
|
|
|
18
19
|
import { registerSceneWriteCapabilities } from "../../scenes/capabilities/write.js";
|
|
19
20
|
import { registerSettingsCapability } from "./settings.js";
|
|
20
21
|
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 { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
3
|
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
|
+
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.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 { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
4
|
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
5
|
+
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
//#region src/cli/commands/agents.ts
|
|
8
8
|
init_repository();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
2
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
2
3
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
3
4
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
5
|
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";
|
|
@@ -106,7 +106,7 @@ async function runModelsList(options) {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
console.log("\nUsage:");
|
|
109
|
-
console.log(" xopc models set deepseek/deepseek-
|
|
109
|
+
console.log(" xopc models set deepseek/deepseek-flash");
|
|
110
110
|
console.log(" xopc models auth login --provider anthropic");
|
|
111
111
|
console.log(" xopc models auth paste-api-key --provider deepseek");
|
|
112
112
|
}
|
|
@@ -210,7 +210,7 @@ function createModelsCommand(_ctx) {
|
|
|
210
210
|
const cmd = new Command("models").description("List and manage models and model auth").addHelpText("after", formatExamples([
|
|
211
211
|
"xopc models list",
|
|
212
212
|
"xopc models status",
|
|
213
|
-
"xopc models set deepseek/deepseek-
|
|
213
|
+
"xopc models set deepseek/deepseek-flash",
|
|
214
214
|
"xopc models auth list",
|
|
215
215
|
"xopc models auth login --provider anthropic",
|
|
216
216
|
"xopc models auth paste-api-key --provider deepseek"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
2
|
+
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
2
3
|
import { getAgentDefaultModelRef, init_schema } from "../../../config/schema.js";
|
|
3
4
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
4
5
|
import { init_models_json, loadModelsJson, saveModelsJson } from "../../../config/models-json.js";
|
|
@@ -6,7 +7,6 @@ import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
|
6
7
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
7
8
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
8
9
|
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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
2
|
-
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
3
2
|
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
3
|
+
import { ConfigSchema, init_schema } from "../../config/schema.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,11 +1,11 @@
|
|
|
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";
|
|
2
5
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
3
6
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
4
7
|
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, 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";
|
|
5
8
|
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";
|
|
9
9
|
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
10
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";
|
|
@@ -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_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
3
4
|
import { ConfigSchema, init_schema } from "./schema.js";
|
|
4
5
|
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
5
6
|
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
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
2
3
|
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
3
4
|
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";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { ComputerConfigSchema, init_config } from "../computer/config.js";
|
|
3
2
|
import { AgentModelsOverrideSchema, ImageGenerationRouteSchema, ModelRouteSchema } from "../agent-config/schema.js";
|
|
4
3
|
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
5
4
|
import { init_agent_config } from "../agent-config/index.js";
|
|
6
5
|
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";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
2
2
|
import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { validateHeaderName, validateHeaderValue } from "node:http";
|
|
5
4
|
import yaml from "js-yaml";
|
|
5
|
+
import { validateHeaderName, validateHeaderValue } from "node:http";
|
|
6
6
|
//#region src/extensions/agent-plugins/validation.ts
|
|
7
7
|
const PLUGIN_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
|
|
8
8
|
const MCP_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json";
|
|
@@ -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, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
|
+
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync, lstatSync, readFileSync, readdirSync, readlinkSync } from "fs";
|
|
7
7
|
import { mkdir, readFile } from "fs/promises";
|
|
@@ -1,10 +1,10 @@
|
|
|
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, listAgentEntries, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath } from "../agent/agent-scope.js";
|
|
4
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
5
4
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
6
|
-
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
5
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
6
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
7
|
+
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
8
8
|
import { GATEWAY_BUILTIN_TOOL_IDS } from "./agent-builtin-tools.js";
|
|
9
9
|
import { resolve } from "node:path";
|
|
10
10
|
import { mkdir, readFile, realpath, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeAgentId } from "../../../agent-catalog/id.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
3
|
-
import { ContextPlanningConfigSchema, KnowledgeMemoryConfigSchema, UserModelConfigSchema, init_config } from "../../../user-context/config.js";
|
|
4
3
|
import { init_agent_scope, listAgentEntries, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
4
|
+
import { ContextPlanningConfigSchema, KnowledgeMemoryConfigSchema, UserModelConfigSchema, init_config } from "../../../user-context/config.js";
|
|
5
5
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
6
6
|
import { init_models_json, loadModelsJson } from "../../../config/models-json.js";
|
|
7
7
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ComputerConfigSchema, init_config } from "../../../../computer/config.js";
|
|
2
1
|
import { BindingsSchema, init_binding_schema } from "../../../../routing/binding-schema.js";
|
|
2
|
+
import { AgentCatalogService } from "../../../../agent-catalog/service.js";
|
|
3
|
+
import { ComputerConfigSchema, init_config } from "../../../../computer/config.js";
|
|
3
4
|
import { ContextPlanningConfigSchema, HomeIntelligenceConfigSchema, KnowledgeMemoryConfigSchema, UserContextConfigSchema, UserModelConfigSchema, init_config as init_config$1 } from "../../../../user-context/config.js";
|
|
4
5
|
import { BrowserConfigSchema, McpConfigSchema, VoiceConfigSchema, init_schema } from "../../../../config/schema.js";
|
|
5
6
|
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
6
7
|
import { canonicalizeConfiguredMcpServer } from "../../../../config/mcp-config-normalize.js";
|
|
7
|
-
import { AgentCatalogService } from "../../../../agent-catalog/service.js";
|
|
8
8
|
import { mergeGatewaySkillsMarketplacePatch, mergeSessionConfigPatch, mergeUpdateConfigPatch } from "../../../../config/web-patch.js";
|
|
9
9
|
import { assertGatewayAuthConfigured, resolveGatewayAuth } from "../../../auth.js";
|
|
10
10
|
import { isMaskedSecretPatchValue } from "../../lib/mask-secret-length.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NoteDeleteOutputSchema, NoteGetOutputSchema, ProductReadContracts } from "../../../../packages/gateway-contract/src/capabilities.js";
|
|
2
2
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { init_session_key, resolveConversationId } from "../../../routing/session-key.js";
|
|
4
|
-
import { agentExists, getDefaultAgentId, init_resolve_route } from "../../../routing/resolve-route.js";
|
|
5
3
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
6
4
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
5
|
+
import { init_session_key, resolveConversationId } from "../../../routing/session-key.js";
|
|
6
|
+
import { agentExists, getDefaultAgentId, init_resolve_route } from "../../../routing/resolve-route.js";
|
|
7
7
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
8
8
|
import { getShareStore } from "../../../share/share-store.js";
|
|
9
9
|
import { resolveShareUrl } from "../../../share/share-url.js";
|