@xopcai/xopc 0.0.244 → 0.0.245
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/{activity-store-CAah-_8h.js → activity-store-BlxqErph.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BhXGsupm.js → agent-avatar-dicebear-DRQnogaU.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-Blzn2H6t.js → agent-defaults-settings-panel-CpOxGbMD.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-Cmp-z8Y_.js → agents-flnXZLaT.js} +1 -1
- package/dist/gateway/static/root/assets/{api-B2tKxbcz.js → api-BbXzyQMj.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CezjAP1K.js → app-management-settings-panel-CZl6n2xi.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-C-CfS05x.js → appearance-settings-Bglp-pn6.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-7Y13_bqZ.js → apps-page-CmsWarVB.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BmSx7wzY.js → archive-plugin-DD2SweEH.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DI4CoIga.js → attachment-load-G0HenUmG.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-D04Xceck.js → automations-page-B78bFjH2.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-wEO1OWk0.js → automations-workspace-BMQGmn50.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-BJQe8TRu.js → binary-plugins-BbSQmXqn.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BSzGjJC6.js → block-editor-DutTIH81.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-DjAZ_LF2.js → browser-settings-page-CALiFKm4.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-CRnkgZHI.js → browser-workflow-inputs-BAAc151l.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-CwbxA3B7.js → browser-workflows-page-DE5HPrHZ.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-jt9bqUMK.js → capabilities-settings-panel-Dts7XtP3.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-Cz_TWY3a.js → channels-settings-CWEd3wzh.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-status-swr-DuY4MGxe.js → channels-status-swr-CCBCtLDg.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-D3gj2D3U.js → chat-terminal-dock-Bp1fXQm1.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-Shs5vbzx.js → connectors-page-CQ6wVNLm.js} +1 -1
- package/dist/gateway/static/root/assets/{cron-expression-DgWHw0jX.js → cron-expression-B8HA5IRb.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-CKg-RPbs.js → date-picker-DD8b7oad.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-CVYkw-NN.js → dependency-picker-BC9zwIyH.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Bf46oXTY.js → desktop-pet-DsrsPZTW.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BJO_klc7.js → desktop-pet-settings-D7gp_HNA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-T2PmFFOW.js → extension-debug-page-BoKbOX7x.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-2wAE2RCe.js → extension-page-BegL4FW8.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Y9ZiCJ21.js → extension-settings-page-CjPqq57s.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-DaYY1Gkn.js → gateway-config-api-DaG57o4X.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BC3pgb_P.js → gateway-config-swr-826dipyU.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-eO3IzW_J.js → gateway-settings-DkJGpgm6.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-uMcSfLru.js → gateway-startup-retry-DyvcAIMm.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-BAgrkyHc.js → heartbeat-settings-BLZ48kSU.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-GTjKH7LK.js → home-page-Dtw7Ipt1.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-D1qlQA-A.js → image-generation-api-D7cyfks6.js} +1 -1
- package/dist/gateway/static/root/assets/{index-DUz0O54y.js → index-DG5CfYat.js} +10 -10
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CWGqL6o5.js → keyboard-shortcuts-settings-D2Has7-N.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-DKJ-rks0.js → local-app-workbench-page-BWidWY93.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-Bfidv29d.js → local-apps-page-Bkekjoxf.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CMZljTJx.js → locale-store-CBoCuIMx.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-DwAHrPbF.js → logs-page-C5zSSgvA.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-BG7j1I9f.js → management-settings-B8c62vRS.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-AnmmpLs6.js → markdown-split-3kxTTGO7.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-PPCLt7fu.js → markdown-view-BXsHghJd.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CGS-05cE.js → media-plugins-BW8J1nCG.js} +1 -1
- package/dist/gateway/static/root/assets/messages-BbdwoxVo.js +3 -0
- package/dist/gateway/static/root/assets/{mobile-pairing-wizard-DoKK5GfV.js → mobile-pairing-wizard-nwQ8iUcd.js} +1 -1
- package/dist/gateway/static/root/assets/models-hub-cache-88f4fzYS.js +1 -0
- package/dist/gateway/static/root/assets/{notes-page-Lr8rsFAR.js → notes-page-DdybD0QM.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-workbench-ISWnKLxO.js → notes-workbench-IYfpy2Jx.js} +2 -2
- package/dist/gateway/static/root/assets/{oauth-api-4VeMbkTJ.js → oauth-api-BjSUDIgq.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BU0HiZtv.js → product-open-page-CAJeUXeU.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-BZqr4yam.js → project-detail-page-4wjw-b7h.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-Dau8733A.js → projects-page-CCMj9PeL.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-CWOtPFrE.js → registry-api-BhGKnvLP.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DdChlvGP.js → remote-access-hub-DsBJqWIk.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CmZTNv1W.js → runtime-tools-settings-panel-B4IDcqx0.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-XlVPyiVQ.js → schema-form-DiGUUjO6.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-C3kADsd4.js → sessions-page-BwGj0t-2.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BJCfUghk.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-DblUeM3V.js → settings-page-CVQUsAhd.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-bDfRfSnq.js → setup-status-panel-CQACRh1i.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-DBMWFMN-.js → share-preview-page-DTP1dtuS.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-Bu6lIStj.js → shares-settings-D_YPh6Rw.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-B43xlJlX.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-CSOseeQe.js → skills-page-Czpn7Y28.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-CniRGhkJ.js → skills-page.utils-d39rm3hb.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-D0GqNpKy.js → system-settings-panel-CXXySCSp.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-BRCq-nR7.js → task-detail-page-DHiOqQMx.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-uxUwr10D.js → theme-store-hybK3oC9.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-BtjS2nrM.js → tunnel-api-BiBGK7O2.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-TwuAycG8.js → use-autosave-DjpzpeIm.js} +1 -1
- package/dist/gateway/static/root/assets/{user-context-page-CbqPu8xZ.js → user-context-page-1XBRV5gX.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-CzwG5plu.js → voice-api-key-field-CUIPNmOc.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-MqyI6cgq.js → voice-config-api-CBbiF1T3.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DS15FzQA.js → work-discovery-overlay-DVNxhb1x.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-C_boCemi.js → workflow-run-setup-panel-HxxFQFY7.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-CaI2ruyy.js → workflows-page-BCgL7PRm.js} +1 -1
- package/dist/gateway/static/root/index.html +11 -11
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/turn-outcome.js +3 -1
- package/dist/src/agent/agent-instance-gateway.d.ts +3 -1
- package/dist/src/agent/agent-manager.d.ts +2 -4
- package/dist/src/agent/agent-manager.js +28 -32
- package/dist/src/agent/background-review/coordinator.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +2 -2
- package/dist/src/agent/child-agent-factory.d.ts +10 -7
- package/dist/src/agent/child-agent-factory.js +112 -158
- package/dist/src/agent/coding/index.d.ts +1 -1
- package/dist/src/agent/coding/index.js +2 -2
- package/dist/src/agent/coding/repository-instructions.d.ts +12 -0
- package/dist/src/agent/coding/repository-instructions.js +76 -0
- package/dist/src/agent/coding/run-verification.d.ts +34 -0
- package/dist/src/agent/coding/run-verification.js +134 -0
- package/dist/src/agent/coding/verification-command.d.ts +3 -0
- package/dist/src/agent/coding/verification-command.js +50 -0
- package/dist/src/agent/coding/workspace-revision.d.ts +2 -0
- package/dist/src/agent/coding/workspace-revision.js +77 -0
- package/dist/src/agent/commands/command-isolation.d.ts +21 -0
- package/dist/src/agent/commands/command-isolation.js +71 -0
- package/dist/src/agent/commands/command-registry.d.ts +56 -0
- package/dist/src/agent/commands/command-registry.js +259 -0
- package/dist/src/agent/embedded/index.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +3 -2
- package/dist/src/agent/embedded/run-turn.js +88 -25
- package/dist/src/agent/embedded/session-tool-result-guard.js +2 -2
- package/dist/src/agent/embedded/subscribe-session.d.ts +2 -1
- package/dist/src/agent/embedded/subscribe-session.js +2 -1
- package/dist/src/agent/embedded/types.d.ts +3 -1
- package/dist/src/agent/embedded/xopc-tools-bridge.js +4 -1
- package/dist/src/agent/image/index.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/index.js +3 -3
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/memory/user-context-coordinator.js +1 -1
- package/dist/src/agent/middleware/index.d.ts +0 -5
- package/dist/src/agent/middleware/index.js +1 -2
- package/dist/src/agent/orchestration/agent-event-handler.d.ts +0 -5
- package/dist/src/agent/orchestration/agent-event-handler.js +1 -96
- package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
- package/dist/src/agent/orchestration/agent-turn-policy.js +5 -5
- package/dist/src/agent/orchestration/index.d.ts +1 -1
- package/dist/src/agent/orchestration/index.js +2 -2
- package/dist/src/agent/orchestration/loop-guard.d.ts +4 -31
- package/dist/src/agent/orchestration/loop-guard.js +14 -99
- package/dist/src/agent/prompt/sections/tooling.js +2 -4
- package/dist/src/agent/sandbox/types.d.ts +2 -2
- package/dist/src/agent/sandbox/types.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.d.ts +0 -2
- package/dist/src/agent/service.js +8 -25
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.d.ts +7 -0
- package/dist/src/agent/tasks/task-judge-service.js +27 -5
- package/dist/src/agent/tools/delegate-tool.d.ts +2 -1
- package/dist/src/agent/tools/delegate-tool.js +102 -124
- package/dist/src/agent/tools/exec-command.d.ts +8 -1
- package/dist/src/agent/tools/exec-command.js +77 -169
- package/dist/src/agent/tools/executor.js +9 -2
- package/dist/src/agent/tools/factory.js +50 -5
- package/dist/src/agent/tools/find.d.ts +10 -13
- package/dist/src/agent/tools/find.js +33 -80
- package/dist/src/agent/tools/grep.d.ts +14 -18
- package/dist/src/agent/tools/grep.js +56 -144
- package/dist/src/agent/tools/index.d.ts +0 -1
- package/dist/src/agent/tools/index.js +2 -3
- package/dist/src/agent/tools/language-diagnostics.d.ts +11 -0
- package/dist/src/agent/tools/language-diagnostics.js +62 -0
- package/dist/src/agent/tools/managed-job-tool.d.ts +2 -1
- package/dist/src/agent/tools/managed-job-tool.js +58 -118
- package/dist/src/agent/tools/read.js +24 -7
- package/dist/src/agent/tools/repository-search.d.ts +5 -0
- package/dist/src/agent/tools/repository-search.js +56 -0
- package/dist/src/agent/tools/review-workspace.d.ts +2 -0
- package/dist/src/agent/tools/review-workspace.js +103 -0
- package/dist/src/agent/tools/write.js +4 -4
- package/dist/src/agent/transcript/index.js +2 -2
- package/dist/src/agent/transcript/transcript-hygiene.js +2 -2
- package/dist/src/agent/workflow/subagent-runner.d.ts +0 -2
- package/dist/src/agent/workflow/subagent-runner.js +12 -31
- package/dist/src/agent-config/schema.d.ts +42 -0
- package/dist/src/agent-config/schema.js +5 -0
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/cli/commands/agent.js +2 -2
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/profile.js +1 -1
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +28 -0
- package/dist/src/execution-environments/local-worktree-manager.d.ts +3 -1
- package/dist/src/execution-environments/local-worktree-manager.js +8 -3
- package/dist/src/execution-environments/session-environment-service.js +5 -3
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +7 -0
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +4 -1
- package/dist/src/gateway/service.js +7 -7
- package/dist/src/gateway/session-reset-service.js +1 -1
- package/dist/src/gateway/workspace-ripgrep.d.ts +0 -6
- package/dist/src/gateway/workspace-ripgrep.js +2 -40
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/infra/ripgrep.d.ts +13 -0
- package/dist/src/infra/ripgrep.js +46 -0
- package/dist/src/infra/update-runner.js +1 -1
- package/dist/src/proactive/execution/agent-executor.js +1 -1
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/session/store.js +1 -1
- package/dist/src/session/turn-outcome-projector.js +26 -6
- package/dist/src/share/hosted-session-share.js +1 -1
- package/dist/src/tasks/task-run-coordinator.d.ts +2 -2
- package/dist/src/tasks/task-run-coordinator.js +14 -12
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/messages-CTSgFlE4.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-ZrbGRiGY.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CSYy6SUa.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BNMc4l04.js +0 -1
- package/dist/src/agent/coding/turn-diff-tracker.d.ts +0 -67
- package/dist/src/agent/coding/turn-diff-tracker.js +0 -231
- package/dist/src/agent/middleware/self-verify.d.ts +0 -136
- package/dist/src/agent/middleware/self-verify.js +0 -380
- package/dist/src/agent/tools/execute-code-tool.d.ts +0 -11
- package/dist/src/agent/tools/execute-code-tool.js +0 -208
|
@@ -90,11 +90,14 @@ async function* runGatewayAgent(deps, message, channel, chatId, origin, attachme
|
|
|
90
90
|
})));
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
|
+
if (event.type === "turn_outcome") {
|
|
94
|
+
taskRun?.captureOutcome(event.payload);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
93
97
|
if (event.type === "patch_applied") {
|
|
94
98
|
taskRun?.capturePatch(event.payload.added, event.payload.removed);
|
|
95
99
|
return;
|
|
96
100
|
}
|
|
97
|
-
if (event.type === "command_completed" && event.payload.exitCode === 0 && /(^|\s)(test|vitest|jest|pytest|lint|typecheck|build)(\s|$|:)/i.test(event.payload.command)) taskRun?.captureCommand(event.payload.command, event.payload.durationMs);
|
|
98
101
|
};
|
|
99
102
|
const emitAndYield = function* (events) {
|
|
100
103
|
for (const event of events) {
|
|
@@ -11,16 +11,16 @@ import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
|
11
11
|
import "../storage/sqlite/index.js";
|
|
12
12
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
13
13
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
14
|
-
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
15
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
16
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
17
14
|
import { init_paths, resolveAgentDir, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
15
|
+
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
18
16
|
import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
|
|
19
17
|
import { buildExtensionMetadataSnapshot } from "../extensions/extension-metadata-snapshot.js";
|
|
20
18
|
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, init_channel_catalog_service } from "../channels/catalog/channel-catalog-service.js";
|
|
21
19
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
22
|
-
import {
|
|
20
|
+
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
21
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
23
22
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
23
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
24
24
|
import { TaskRepository } from "../tasks/task-repository.js";
|
|
25
25
|
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
26
26
|
import { disposeAllSessionMcpRuntimes } from "../agent/mcp/bundle-mcp-runtime.js";
|
|
@@ -28,6 +28,7 @@ import { ProjectService } from "../projects/project-service.js";
|
|
|
28
28
|
import { resolveProjectAgentId } from "../projects/project-agent.js";
|
|
29
29
|
import "../projects/index.js";
|
|
30
30
|
import { resolveEffectiveGatewayPort } from "./host.js";
|
|
31
|
+
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
31
32
|
import { AutomationService } from "../automations/service/automation-service.js";
|
|
32
33
|
import { onAutomationProductEvent, publishAutomationProductEvent } from "../automations/product-events.js";
|
|
33
34
|
import "../automations/index.js";
|
|
@@ -38,7 +39,6 @@ import { TaskRunDispatcher } from "../tasks/task-run-dispatcher.js";
|
|
|
38
39
|
import { TaskSignalService } from "../tasks/task-signal-service.js";
|
|
39
40
|
import "../tasks/index.js";
|
|
40
41
|
import "../agent/mcp/bundle-mcp-tools.js";
|
|
41
|
-
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
42
42
|
import { SessionIndex } from "../session/manager.js";
|
|
43
43
|
import "../session/index.js";
|
|
44
44
|
import { ExtensionLoader } from "../extensions/loader.js";
|
|
@@ -59,14 +59,14 @@ import "../knowledge/index.js";
|
|
|
59
59
|
import { startConnectorLearningCoordinator } from "../connectors/learning-coordinator.js";
|
|
60
60
|
import { ConnectedSourceChangePublisher } from "../connectors/source-change-publisher.js";
|
|
61
61
|
import { startConnectorSupervisor } from "../connectors/supervisor.js";
|
|
62
|
-
import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
|
|
63
|
-
import "../endpoint-tools/index.js";
|
|
64
62
|
import { DiscussionService } from "../discussions/service.js";
|
|
65
63
|
import { DiscussionOrganizer } from "../discussions/organizer.js";
|
|
66
64
|
import { DiscussionLiveWorker } from "../discussions/live-worker.js";
|
|
67
65
|
import { DiscussionOrganizerWorker } from "../discussions/organizer-worker.js";
|
|
68
66
|
import { DiscussionSealer } from "../discussions/sealer.js";
|
|
69
67
|
import "../discussions/index.js";
|
|
68
|
+
import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
|
|
69
|
+
import "../endpoint-tools/index.js";
|
|
70
70
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
71
71
|
import { prepareAutomationAgentSession } from "./automation-agent-session.js";
|
|
72
72
|
import { stopTailscaleExposure } from "./tailscale-lifecycle.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { retireSessionMcpRuntimeForSessionKey } from "../agent/mcp/bundle-mcp-runtime.js";
|
|
4
|
-
import "../agent/mcp/bundle-mcp-tools.js";
|
|
5
4
|
import { abortEmbeddedRun } from "../agent/embedded/runs.js";
|
|
5
|
+
import "../agent/mcp/bundle-mcp-tools.js";
|
|
6
6
|
//#region src/gateway/session-reset-service.ts
|
|
7
7
|
init_logger();
|
|
8
8
|
const log = createLogger("SessionReset");
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/** Ripgrep binaries inside `app.asar` are not executable (spawn throws ENOTDIR). */
|
|
2
|
-
export declare function isAsarBundledPath(filePath: string): boolean;
|
|
3
|
-
/** True when `filePath` is a real on-disk executable candidate (not inside asar). */
|
|
4
|
-
export declare function isRunnableRipgrepPath(filePath: string): boolean;
|
|
5
|
-
/** @internal Test-only — clears memoized ripgrep path between cases. */
|
|
6
|
-
export declare function resetRipgrepBinaryCacheForTests(): void;
|
|
7
1
|
export interface WorkspaceSearchHit {
|
|
8
2
|
filePath: string;
|
|
9
3
|
lineNumber: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import {
|
|
3
|
+
import { resolveRipgrepBinary } from "../infra/ripgrep.js";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
5
|
//#region src/gateway/workspace-ripgrep.ts
|
|
6
6
|
init_logger();
|
|
@@ -8,44 +8,6 @@ const log = createLogger("WorkspaceRipgrep");
|
|
|
8
8
|
function isEnoent(err) {
|
|
9
9
|
return err !== null && typeof err === "object" && err.code === "ENOENT";
|
|
10
10
|
}
|
|
11
|
-
/** Ripgrep binaries inside `app.asar` are not executable (spawn throws ENOTDIR). */
|
|
12
|
-
function isAsarBundledPath(filePath) {
|
|
13
|
-
return filePath.includes(".asar");
|
|
14
|
-
}
|
|
15
|
-
/** True when `filePath` is a real on-disk executable candidate (not inside asar). */
|
|
16
|
-
function isRunnableRipgrepPath(filePath) {
|
|
17
|
-
const trimmed = filePath.trim();
|
|
18
|
-
if (!trimmed || isAsarBundledPath(trimmed)) return false;
|
|
19
|
-
return existsSync(trimmed);
|
|
20
|
-
}
|
|
21
|
-
let cachedRipgrepBin;
|
|
22
|
-
/** @internal Test-only — clears memoized ripgrep path between cases. */
|
|
23
|
-
function resetRipgrepBinaryCacheForTests() {
|
|
24
|
-
cachedRipgrepBin = void 0;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Resolve ripgrep binary:
|
|
28
|
-
* 1. `XOPC_RIPGREP_BIN` (Electron extraResources `bin/rg`)
|
|
29
|
-
* 2. `@vscode/ripgrep` postinstall path (dev / CLI)
|
|
30
|
-
* 3. `rg` on PATH
|
|
31
|
-
*/
|
|
32
|
-
async function resolveRipgrepBinary() {
|
|
33
|
-
if (cachedRipgrepBin) return cachedRipgrepBin;
|
|
34
|
-
const envBin = process.env.XOPC_RIPGREP_BIN?.trim();
|
|
35
|
-
if (envBin && isRunnableRipgrepPath(envBin)) {
|
|
36
|
-
cachedRipgrepBin = envBin;
|
|
37
|
-
return envBin;
|
|
38
|
-
}
|
|
39
|
-
let bin = "rg";
|
|
40
|
-
try {
|
|
41
|
-
const { rgPath } = await import("@vscode/ripgrep");
|
|
42
|
-
if (typeof rgPath === "string" && rgPath.length > 0) if (isRunnableRipgrepPath(rgPath)) bin = rgPath;
|
|
43
|
-
else if (isAsarBundledPath(rgPath)) log.debug({ rgPath }, "@vscode/ripgrep path is inside app.asar; will try rg on PATH or XOPC_RIPGREP_BIN");
|
|
44
|
-
else log.debug({ rgPath }, "@vscode/ripgrep binary not on disk; will try rg on PATH");
|
|
45
|
-
} catch {}
|
|
46
|
-
cachedRipgrepBin = bin;
|
|
47
|
-
return bin;
|
|
48
|
-
}
|
|
49
11
|
function spawnRipgrep(executable, args, options, context) {
|
|
50
12
|
try {
|
|
51
13
|
return spawn(executable, args, {
|
|
@@ -192,4 +154,4 @@ function runRipgrepListFiles(dirAbsPath) {
|
|
|
192
154
|
})();
|
|
193
155
|
}
|
|
194
156
|
//#endregion
|
|
195
|
-
export {
|
|
157
|
+
export { runRipgrepInDirectory, runRipgrepListFiles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, shouldSilence, stripHeartbeatToken } from "./tokens.js";
|
|
2
|
-
import { appendCronEventLines } from "./event-prompt.js";
|
|
3
2
|
import { isWithinActiveHours } from "./active-hours.js";
|
|
4
3
|
import { isHeartbeatContentEmpty } from "./content-check.js";
|
|
4
|
+
import { appendCronEventLines } from "./event-prompt.js";
|
|
5
5
|
import { createHeartbeatWake } from "./wake.js";
|
|
6
6
|
export { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, appendCronEventLines, createHeartbeatWake, isHeartbeatContentEmpty, isWithinActiveHours, shouldSilence, stripHeartbeatToken };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Ripgrep binaries inside `app.asar` are not executable (spawn throws ENOTDIR). */
|
|
2
|
+
export declare function isAsarBundledPath(filePath: string): boolean;
|
|
3
|
+
/** True when `filePath` is a real on-disk executable candidate (not inside asar). */
|
|
4
|
+
export declare function isRunnableRipgrepPath(filePath: string): boolean;
|
|
5
|
+
/** @internal Test-only — clears memoized ripgrep path between cases. */
|
|
6
|
+
export declare function resetRipgrepBinaryCacheForTests(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Resolve ripgrep binary:
|
|
9
|
+
* 1. `XOPC_RIPGREP_BIN` (Electron extraResources `bin/rg`)
|
|
10
|
+
* 2. `@vscode/ripgrep` postinstall path (dev / CLI)
|
|
11
|
+
* 3. `rg` on PATH
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveRipgrepBinary(): Promise<string>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
2
|
+
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
//#region src/infra/ripgrep.ts
|
|
5
|
+
init_logger();
|
|
6
|
+
const log = createLogger("WorkspaceRipgrep");
|
|
7
|
+
/** Ripgrep binaries inside `app.asar` are not executable (spawn throws ENOTDIR). */
|
|
8
|
+
function isAsarBundledPath(filePath) {
|
|
9
|
+
return filePath.includes(".asar");
|
|
10
|
+
}
|
|
11
|
+
/** True when `filePath` is a real on-disk executable candidate (not inside asar). */
|
|
12
|
+
function isRunnableRipgrepPath(filePath) {
|
|
13
|
+
const trimmed = filePath.trim();
|
|
14
|
+
if (!trimmed || isAsarBundledPath(trimmed)) return false;
|
|
15
|
+
return existsSync(trimmed);
|
|
16
|
+
}
|
|
17
|
+
let cachedRipgrepBin;
|
|
18
|
+
/** @internal Test-only — clears memoized ripgrep path between cases. */
|
|
19
|
+
function resetRipgrepBinaryCacheForTests() {
|
|
20
|
+
cachedRipgrepBin = void 0;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Resolve ripgrep binary:
|
|
24
|
+
* 1. `XOPC_RIPGREP_BIN` (Electron extraResources `bin/rg`)
|
|
25
|
+
* 2. `@vscode/ripgrep` postinstall path (dev / CLI)
|
|
26
|
+
* 3. `rg` on PATH
|
|
27
|
+
*/
|
|
28
|
+
async function resolveRipgrepBinary() {
|
|
29
|
+
if (cachedRipgrepBin) return cachedRipgrepBin;
|
|
30
|
+
const envBin = process.env.XOPC_RIPGREP_BIN?.trim();
|
|
31
|
+
if (envBin && isRunnableRipgrepPath(envBin)) {
|
|
32
|
+
cachedRipgrepBin = envBin;
|
|
33
|
+
return envBin;
|
|
34
|
+
}
|
|
35
|
+
let bin = "rg";
|
|
36
|
+
try {
|
|
37
|
+
const { rgPath } = await import("@vscode/ripgrep");
|
|
38
|
+
if (typeof rgPath === "string" && rgPath.length > 0) if (isRunnableRipgrepPath(rgPath)) bin = rgPath;
|
|
39
|
+
else if (isAsarBundledPath(rgPath)) log.debug({ rgPath }, "@vscode/ripgrep path is inside app.asar; will try rg on PATH or XOPC_RIPGREP_BIN");
|
|
40
|
+
else log.debug({ rgPath }, "@vscode/ripgrep binary not on disk; will try rg on PATH");
|
|
41
|
+
} catch {}
|
|
42
|
+
cachedRipgrepBin = bin;
|
|
43
|
+
return bin;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { isAsarBundledPath, isRunnableRipgrepPath, resetRipgrepBinaryCacheForTests, resolveRipgrepBinary };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { runPostUpdateExtensionSync } from "../extensions/update.js";
|
|
2
1
|
import "./update-channels.js";
|
|
3
2
|
import { compareSemver, resolveNpmChannelTag } from "./update-check.js";
|
|
3
|
+
import { runPostUpdateExtensionSync } from "../extensions/update.js";
|
|
4
4
|
import { readPackageName, readPackageVersion } from "./package-json.js";
|
|
5
5
|
import { createDefaultCommandRunner, runCommandWithTimeout } from "./run-command.js";
|
|
6
6
|
import { XOPC_PACKAGE_NAME, cleanupGlobalRenameDirs, createGlobalInstallEnv, detectGlobalInstallManagerForRoot, resolveGlobalInstallSpec, resolveGlobalInstallTarget } from "./update-global.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
2
2
|
import { getApiKeySync, getDefaultModelSync, init_providers, resolveModel } from "../../providers/index.js";
|
|
3
3
|
import { createExtensionAwareStreamFn } from "../../providers/extension-stream-bridge.js";
|
|
4
|
-
import { runAgentTurnWithTimeout } from "../../agent/orchestration/run-agent-turn-with-timeout.js";
|
|
5
4
|
import { isAssistantTurnAborted, isAssistantTurnFailed } from "../../agent/orchestration/llm-turn-retry.js";
|
|
5
|
+
import { runAgentTurnWithTimeout } from "../../agent/orchestration/run-agent-turn-with-timeout.js";
|
|
6
6
|
import { Agent } from "@earendil-works/pi-agent-core";
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
8
8
|
//#region src/proactive/execution/agent-executor.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
2
1
|
import { getApiKeyFromEnv, init_env_keys } from "../env-keys.js";
|
|
2
|
+
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
3
3
|
import { getDefaultAuthProfileStore } from "./auth-profile-store.js";
|
|
4
4
|
//#region src/providers/auth-runtime/resolve-auth.ts
|
|
5
5
|
init_env_keys();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __esmMin, __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
3
|
-
import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
4
|
-
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
5
3
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
6
4
|
import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
|
|
7
5
|
import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
|
|
6
|
+
import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
8
7
|
import { CredentialResolver, hasCredentials, init_credentials } from "../auth/credentials.js";
|
|
8
|
+
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
9
9
|
import { EXTENSION_PROVIDER_BASE_URL, init_constants } from "./constants.js";
|
|
10
10
|
import { applyOfficialModelMetadataCorrections, getSupplementalModels, init_model_supplements } from "./model-supplements.js";
|
|
11
11
|
import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { resolveModelsJsonPath } from "../config/paths.js";
|
|
5
4
|
import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
|
|
5
|
+
import { resolveModelsJsonPath } from "../config/paths.js";
|
|
6
6
|
import { getDefaultModelValues, init_models_json, validateModelsConfig } from "../config/models-json.js";
|
|
7
7
|
import { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
8
8
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
3
2
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
3
|
+
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
4
4
|
import { XOPC_CLOUD_PROVIDER_ID, init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
5
5
|
//#region src/providers/register-runtime-providers.ts
|
|
6
6
|
function registerRuntimeProvider(modelRuntime, source) {
|
|
@@ -12,8 +12,8 @@ import { appendCompactionBoundaryIfUnchanged, appendTranscriptEntry, listCompact
|
|
|
12
12
|
import { getSessionConfig, setSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
13
13
|
import "../storage/sqlite/index.js";
|
|
14
14
|
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
15
|
-
import { readPostCompactionContext } from "../agent/reply/post-compaction-context.js";
|
|
16
15
|
import { SessionCompactor } from "../agent/memory/compaction.js";
|
|
16
|
+
import { readPostCompactionContext } from "../agent/reply/post-compaction-context.js";
|
|
17
17
|
import { resolveCompactionPolicy } from "../agent/memory/compaction-policy.js";
|
|
18
18
|
import { promoteCompactionLedger } from "../agent/memory/compaction-promotion.js";
|
|
19
19
|
import { SlidingWindow } from "../agent/memory/window.js";
|
|
@@ -2,7 +2,6 @@ import { TurnOutcomeDeliverableSchema, fileResourceArtifactUri, mergeTurnOutcome
|
|
|
2
2
|
import { parseProductDeliveryEnvelope } from "../../packages/gateway-contract/src/product-delivery.js";
|
|
3
3
|
import { parseFileResourceId } from "../files/file-service.js";
|
|
4
4
|
//#region src/session/turn-outcome-projector.ts
|
|
5
|
-
const VERIFICATION_COMMAND = /(^|[\s:/_-])(test|vitest|jest|pytest|lint|typecheck|type-check|build)([\s:/_-]|$)/i;
|
|
6
5
|
const MAX_OUTCOME_DIFF_CHARS = 2e5;
|
|
7
6
|
function record(value) {
|
|
8
7
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
@@ -75,14 +74,16 @@ function projectTurnOutcome(params) {
|
|
|
75
74
|
let removed = 0;
|
|
76
75
|
let failedToolCount = 0;
|
|
77
76
|
let createdAtMs = 0;
|
|
77
|
+
let verificationSummary = null;
|
|
78
78
|
for (const source of params.rows) {
|
|
79
79
|
const row = source;
|
|
80
80
|
if (row.turnId !== params.turnId) continue;
|
|
81
|
+
if (row.type === "custom" && row.customType === "coding_verification") verificationSummary = record(row.data);
|
|
81
82
|
const timestamp = typeof row.timestamp === "number" ? row.timestamp : Date.parse(typeof row.timestamp === "string" ? row.timestamp : "");
|
|
82
83
|
if (Number.isFinite(timestamp)) createdAtMs = Math.max(createdAtMs, timestamp);
|
|
83
84
|
if (row.role !== "toolResult" && row.role !== "tool") continue;
|
|
84
|
-
if (row.isError === true) failedToolCount += 1;
|
|
85
85
|
const details = record(row.details) ?? {};
|
|
86
|
+
if (row.isError === true && record(details.verification)?.kind !== "check") failedToolCount += 1;
|
|
86
87
|
const explicit = Array.isArray(details.artifacts) ? details.artifacts.flatMap((value) => {
|
|
87
88
|
const parsed = TurnOutcomeDeliverableSchema.safeParse(value);
|
|
88
89
|
return parsed.success ? [parsed.data] : [];
|
|
@@ -111,23 +112,42 @@ function projectTurnOutcome(params) {
|
|
|
111
112
|
if (typeof details.added === "number") added += Math.max(0, details.added);
|
|
112
113
|
if (typeof details.removed === "number") removed += Math.max(0, details.removed);
|
|
113
114
|
}
|
|
114
|
-
|
|
115
|
+
const verification = record(details.verification);
|
|
116
|
+
if (verification?.kind === "check" && text(verification.command)) {
|
|
115
117
|
const toolCallId = text(row.toolCallId) ?? `check-${evidence.size + 1}`;
|
|
116
|
-
const command = text(
|
|
118
|
+
const command = text(verification.command);
|
|
117
119
|
evidence.set(toolCallId, {
|
|
118
120
|
evidenceId: `${params.turnId}:${toolCallId}:check`,
|
|
119
121
|
kind: "check",
|
|
120
122
|
label: command,
|
|
121
|
-
status:
|
|
123
|
+
status: verification.status === "failed" ? "failed" : "warning",
|
|
122
124
|
command,
|
|
123
125
|
...typeof details.durationMs === "number" ? { durationMs: Math.max(0, details.durationMs) } : {}
|
|
124
126
|
});
|
|
125
127
|
}
|
|
126
128
|
}
|
|
129
|
+
if (verificationSummary) {
|
|
130
|
+
evidence.clear();
|
|
131
|
+
for (const raw of Array.isArray(verificationSummary.evidence) ? verificationSummary.evidence : []) {
|
|
132
|
+
const item = record(raw);
|
|
133
|
+
if (item?.kind !== "check" || !text(item.command) || !text(item.toolCallId)) continue;
|
|
134
|
+
const id = `${params.turnId}:${item.toolCallId}:check`;
|
|
135
|
+
evidence.set(id, {
|
|
136
|
+
evidenceId: id,
|
|
137
|
+
kind: "check",
|
|
138
|
+
label: String(item.command),
|
|
139
|
+
command: String(item.command),
|
|
140
|
+
status: item.status === "passed" ? "passed" : item.status === "failed" ? "failed" : "warning",
|
|
141
|
+
...text(item.revision) ? { revision: text(item.revision) } : {},
|
|
142
|
+
...text(item.logPath) ? { logPath: text(item.logPath) } : {},
|
|
143
|
+
...typeof item.durationMs === "number" ? { durationMs: Math.max(0, item.durationMs) } : {}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
127
147
|
const evidenceItems = [...evidence.values()];
|
|
128
148
|
const collectedArtifacts = [...deliverables.values()];
|
|
129
149
|
const artifactItems = mergeTurnOutcomeDeliverables(collectedArtifacts);
|
|
130
|
-
const partial = failedToolCount > 0 || evidenceItems.some((item) => item.status === "
|
|
150
|
+
const partial = !verificationSummary && failedToolCount > 0 || evidenceItems.some((item) => item.status !== "passed") || verificationSummary?.required === true && verificationSummary.changed === true && !evidenceItems.some((item) => item.status === "passed") || collectedArtifacts.some((item) => item.availability !== "available");
|
|
131
151
|
const diff = diffs.join("\n");
|
|
132
152
|
const diffTruncated = diff.length > MAX_OUTCOME_DIFF_CHARS;
|
|
133
153
|
const createdAt = new Date(createdAtMs || Date.now()).toISOString();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { init_paths } from "../config/paths.js";
|
|
3
2
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
3
|
+
import { init_paths } from "../config/paths.js";
|
|
4
4
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
5
5
|
import { resolveMediaReference } from "../media/media-reference.js";
|
|
6
6
|
import { projectSessionShare } from "./session-share-projector.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TaskEvidence, TaskRunReceipt } from '@xopcai/gateway-contract';
|
|
1
|
+
import type { TaskEvidence, TaskRunReceipt, TurnOutcome } from '@xopcai/gateway-contract';
|
|
2
2
|
import type { ExecutionContext } from './execution-context.js';
|
|
3
3
|
export declare class TaskRunCoordinator {
|
|
4
4
|
#private;
|
|
@@ -14,8 +14,8 @@ export declare class TaskRunCoordinator {
|
|
|
14
14
|
title: string;
|
|
15
15
|
status: string;
|
|
16
16
|
}>): void;
|
|
17
|
+
captureOutcome(outcome: TurnOutcome): void;
|
|
17
18
|
capturePatch(added: number, removed: number): void;
|
|
18
|
-
captureCommand(command: string, durationMs?: number): void;
|
|
19
19
|
finalize(input: {
|
|
20
20
|
status: TaskRunReceipt['status'];
|
|
21
21
|
summary: string;
|
|
@@ -75,6 +75,19 @@ var TaskRunCoordinator = class TaskRunCoordinator {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
captureOutcome(outcome) {
|
|
79
|
+
for (const item of outcome.evidence) {
|
|
80
|
+
if (item.kind !== "check") continue;
|
|
81
|
+
this.addEvidence({
|
|
82
|
+
kind: "test",
|
|
83
|
+
title: item.label,
|
|
84
|
+
summary: `Final workspace check: ${item.status}`,
|
|
85
|
+
provenance: "tool",
|
|
86
|
+
strength: item.status === "passed" ? "verified" : "observed",
|
|
87
|
+
observedAt: Date.now()
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
78
91
|
capturePatch(added, removed) {
|
|
79
92
|
this.addEvidence({
|
|
80
93
|
kind: "state",
|
|
@@ -85,17 +98,6 @@ var TaskRunCoordinator = class TaskRunCoordinator {
|
|
|
85
98
|
observedAt: Date.now()
|
|
86
99
|
});
|
|
87
100
|
}
|
|
88
|
-
captureCommand(command, durationMs) {
|
|
89
|
-
if (!/(^|\s)(test|vitest|jest|pytest|lint|typecheck|build)(\s|$|:)/i.test(command)) return;
|
|
90
|
-
this.addEvidence({
|
|
91
|
-
kind: "test",
|
|
92
|
-
title: command.slice(0, 120),
|
|
93
|
-
summary: durationMs === void 0 ? "Command completed successfully" : `Command completed successfully in ${durationMs} ms`,
|
|
94
|
-
provenance: "tool",
|
|
95
|
-
strength: "verified",
|
|
96
|
-
observedAt: Date.now()
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
101
|
finalize(input) {
|
|
100
102
|
const run = this.#runs.get(this.runId);
|
|
101
103
|
if (!run || ![
|
|
@@ -118,7 +120,7 @@ var TaskRunCoordinator = class TaskRunCoordinator {
|
|
|
118
120
|
},
|
|
119
121
|
remainingWork: [],
|
|
120
122
|
needsUser: false,
|
|
121
|
-
completionVerdict: input.status === "succeeded" ? "
|
|
123
|
+
completionVerdict: input.status === "succeeded" ? "partial" : "not_achieved",
|
|
122
124
|
...input.status === "failed" ? { failure: {
|
|
123
125
|
code: "agent_run_failed",
|
|
124
126
|
phase: "execution",
|
|
@@ -13,8 +13,8 @@ import { ProjectService } from "../../projects/project-service.js";
|
|
|
13
13
|
import { inferSuggestedProjectDefaultAgentId } from "../../projects/project-agent-suggestion.js";
|
|
14
14
|
import "../../projects/index.js";
|
|
15
15
|
import { createCreateShareTool, isShareToolAvailable } from "../../agent/tools/create-share-tool.js";
|
|
16
|
-
import { setTuiDefaultAgentConfig } from "../../commands/agents.config.js";
|
|
17
16
|
import { evictEmbeddedSessionRunner } from "../../agent/embedded/session-runner.js";
|
|
17
|
+
import { setTuiDefaultAgentConfig } from "../../commands/agents.config.js";
|
|
18
18
|
import { buildSessionTimeline } from "../../session/transcript-outline.js";
|
|
19
19
|
import { transcriptRowsToClientHistory } from "../../session/client-history.js";
|
|
20
20
|
import { SessionIndex } from "../../session/manager.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
3
2
|
import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir } from "../config/paths.js";
|
|
3
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
4
4
|
import { resolveBootstrapFilesSync } from "../agent/bootstrap/bootstrap-files.js";
|
|
5
5
|
import { createSkillConfigManager, isSkillEnabled } from "../agent/skills/config.js";
|
|
6
6
|
import { loadSkills } from "../agent/skills/index.js";
|
package/dist/src/tui/tui.js
CHANGED
|
@@ -2,10 +2,10 @@ import { version } from "../../package.js";
|
|
|
2
2
|
import { resolveStateDir, resolveXopcDatabasePath } from "../config/paths-state.js";
|
|
3
3
|
import { parseAgentSessionKey } from "../routing/session-key-utils.js";
|
|
4
4
|
import { init_agent_session_key, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
5
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
6
5
|
import { init_paths } from "../config/paths.js";
|
|
7
6
|
import { loadConfig } from "../config/loader.js";
|
|
8
7
|
import { getAllModels, getAllProviders, getApiKey, init_providers, isProviderConfiguredSync } from "../providers/index.js";
|
|
8
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
9
9
|
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
10
10
|
import { renderWorkflowFinalSummary, renderWorkflowPanel } from "../agent/workflow/snapshot.js";
|
|
11
11
|
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
2
|
-
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
3
2
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
3
|
+
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
4
4
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
5
5
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
6
6
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.245",
|
|
4
4
|
"description": "Local-first personal AI assistant with reviewable user understanding, durable tasks, workflows, automations, and local or cloud models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|