Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ts/config.defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,11 @@ azureOpenAI:
reasoning:
timeoutMs: 1200000
copilotModel: gpt-6-sol

decision:
provider: inherit
azure:
deploymentKey: decision_1
deploymentName: decision-1
copilot:
model: gpt-6-luna-decisions
14 changes: 14 additions & 0 deletions ts/config.sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
# It is NOT a sandbox. Missing or rejected authorization prevents execution.
# Remembered approvals last only for the current session and exact invocation.

# Native decision provider, independent of chat. "inherit" follows the active
# provider override, then modelProvider, then Azure; OpenAI/Ollama are unsupported.
decision:
provider: inherit
azure:
deploymentKey: decision_1 # existing azureOpenAI.deployments pool key
deploymentName: decision-1 # exact wire model; not inferred from the key
copilot:
model: gpt-6-luna-decisions

# ╔═══════════════════════════════════════════════════════════════════╗
# ║ Azure OpenAI ║
# ╚═══════════════════════════════════════════════════════════════════╝
Expand All @@ -42,6 +52,10 @@ azureOpenAI:
# Named model deployments. Each deployment has one or more regional
# endpoints that form a routing pool.
deployments:
decision_1:
endpoints:
- endpoint: https://my-resource-eastus.services.ai.azure.com/providers/microsoft/v1/systemone
region: eastus
gpt_6_luna:
# Per-deployment defaultCapacity overrides the section-level value.
# defaultCapacity: 200
Expand Down
4 changes: 3 additions & 1 deletion ts/packages/agents/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
"setup:aisearch": "node dist/agent/lookup/aiSearchSetup.mjs",
"test": "npm run test:local",
"test:local": "jest && npm run test:views:gateway && npm run test:views:client",
"test:crossword": "node --test test/crosswordDecisionHandler.spec.mjs test/crosswordDecisionIntegrated.spec.mjs test/crosswordHybrid2.spec.mjs",
"test:local": "jest && npm run test:crossword && npm run test:views:gateway && npm run test:views:client",
"test:pdf": "node --test test/pdf*.spec.mjs test/pdfExtraction/*.spec.mjs test/memoryImportHandlers.spec.mjs test/agentConnectionBoundary.spec.mjs",
"test:views:client": "jest --runInBand --testMatch \"**/views/client/**/*.test.ts\"",
"test:views:gateway": "node --test test/viewGateway.test.mjs test/viewDraftGateway.test.mjs test/viewLifecycle.test.mjs test/memoryHub.test.mjs test/memoryHubQuery.test.mjs test/memoryHubSourceDependencies.test.mjs test/memoryHubCapture.test.mjs test/browserCaptureRpc.test.mjs test/memoryHubRunbookImports.test.mjs test/memoryHubWebAnalytics.test.mjs",
Expand Down Expand Up @@ -93,6 +94,7 @@
"dompurify": "^3.4.17",
"express": "^4.22.0",
"express-rate-limit": "^7.5.0",
"gpt-tokenizer": "^2.9.0",
"graphology": "^0.25.4",
"graphology-communities-louvain": "^2.0.1",
"graphology-layout": "^0.6.1",
Expand Down
32 changes: 32 additions & 0 deletions ts/packages/agents/browser/src/agent/browserActionHandler.mts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
} from "./readiness.mjs";
import { extractPageComponent } from "./componentExtractor.mjs";
import { extractCrosswordSchema } from "./crosswordSchemaExtractor.mjs";
import { crosswordDecisionHandler } from "./crosswordDecisionHandler.mjs";
import { createTabTitleIndex } from "./tabTitleIndex.mjs";
import { ChildProcess, fork } from "child_process";
import {
Expand Down Expand Up @@ -746,6 +747,7 @@ async function updateBrowserContext(
void context.notifyReadinessChanged();
},
onClientDisconnected: (client: BrowserClient) => {
crosswordDecisionHandler.disconnect(client.id);
if (client.type === "extension") {
debug(`Extension client disconnected: ${client.id}`);
}
Expand All @@ -768,6 +770,36 @@ async function updateBrowserContext(
isBuiltInWebAgentRpcRequest(data.params)
) {
const { id, method, params } = data.params;
if (method === "cancelCrosswordDecision") {
crosswordDecisionHandler.cancel(client.id, params);
return;
}
if (
method === "getCrosswordDecisionCapabilities" ||
method === "resolveCrosswordClue"
) {
if (!id || id.length > 256) return;
const result =
method === "getCrosswordDecisionCapabilities"
? crosswordDecisionHandler.capabilities()
: await crosswordDecisionHandler.resolve(
client.id,
id,
params,
);
if (client.socket.readyState === 1) {
client.socket.send(
JSON.stringify({
source: "dispatcher",
method: "crosswordDecision/response",
type: "builtInRpcResponse",
id,
result,
}),
);
}
return;
}
const result = await handleWebAgentRpc(
method,
params,
Expand Down
Loading
Loading