@openscout/scout 0.2.39 → 0.2.40
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/control-plane-client/assets/arc.es-C-s36DjK.js +188 -0
- package/dist/control-plane-client/assets/index--5UC57U9.css +1 -0
- package/dist/control-plane-client/assets/index-B2VbvZaM.js +9 -0
- package/dist/control-plane-client/index.html +2 -2
- package/dist/main.mjs +32 -22
- package/dist/pair-supervisor.mjs +16 -13
- package/dist/scout-control-plane-web.mjs +16 -13
- package/dist/scout-web-server.mjs +30 -24
- package/package.json +2 -2
- package/dist/control-plane-client/assets/index-CafSuiif.js +0 -9
- package/dist/control-plane-client/assets/index-X47yO2a-.css +0 -1
|
@@ -1233,7 +1233,7 @@ function diagnoseAgentIdentity(identity, candidates) {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
return { kind: "ambiguous", candidates: matches };
|
|
1235
1235
|
}
|
|
1236
|
-
var DIMENSION_ALIASES, normalizeAgentSelectorSegment, SCOUT_DISPATCHER_AGENT_ID = "scout", RESERVED_AGENT_DEFINITION_IDS, parseAgentSelector, formatAgentSelector, extractAgentSelectors, resolveAgentSelector;
|
|
1236
|
+
var DIMENSION_ALIASES, normalizeAgentSelectorSegment, SCOUT_DISPATCHER_AGENT_ID = "scout", BUILT_IN_AGENT_DEFINITION_IDS, RESERVED_AGENT_DEFINITION_IDS, parseAgentSelector, formatAgentSelector, extractAgentSelectors, resolveAgentSelector;
|
|
1237
1237
|
var init_agent_identity = __esm(() => {
|
|
1238
1238
|
DIMENSION_ALIASES = {
|
|
1239
1239
|
workspace: "workspace",
|
|
@@ -1247,6 +1247,12 @@ var init_agent_identity = __esm(() => {
|
|
|
1247
1247
|
host: "node"
|
|
1248
1248
|
};
|
|
1249
1249
|
normalizeAgentSelectorSegment = normalizeAgentIdentitySegment;
|
|
1250
|
+
BUILT_IN_AGENT_DEFINITION_IDS = new Set([
|
|
1251
|
+
SCOUT_DISPATCHER_AGENT_ID,
|
|
1252
|
+
"builder",
|
|
1253
|
+
"reviewer",
|
|
1254
|
+
"research"
|
|
1255
|
+
]);
|
|
1250
1256
|
RESERVED_AGENT_DEFINITION_IDS = new Set([
|
|
1251
1257
|
SCOUT_DISPATCHER_AGENT_ID
|
|
1252
1258
|
]);
|
|
@@ -2989,7 +2995,7 @@ async function readRelayAgentOverrides() {
|
|
|
2989
2995
|
return Object.fromEntries(Object.entries(agents).map(([agentId, record]) => {
|
|
2990
2996
|
const definitionId = normalizeAgentId(record.definitionId || record.agentId || agentId);
|
|
2991
2997
|
const projectRoot = normalizePath(record.projectRoot);
|
|
2992
|
-
const concreteAgentId =
|
|
2998
|
+
const concreteAgentId = buildRelayAgentInstance(definitionId, projectRoot).id;
|
|
2993
2999
|
const defaultHarness = normalizeManagedHarness(typeof record.defaultHarness === "string" ? record.defaultHarness : record.runtime?.harness, "claude");
|
|
2994
3000
|
const harnessProfiles = buildHarnessProfiles({
|
|
2995
3001
|
projectRoot,
|
|
@@ -3024,7 +3030,7 @@ async function writeRelayAgentOverrides(overrides) {
|
|
|
3024
3030
|
const normalizedAgents = Object.fromEntries(Object.entries(overrides).map(([agentId, record]) => {
|
|
3025
3031
|
const definitionId = normalizeAgentId(record.definitionId || record.agentId || agentId);
|
|
3026
3032
|
const projectRoot = normalizePath(record.projectRoot);
|
|
3027
|
-
const concreteAgentId =
|
|
3033
|
+
const concreteAgentId = buildRelayAgentInstance(definitionId, projectRoot).id;
|
|
3028
3034
|
const defaultHarness = normalizeManagedHarness(typeof record.defaultHarness === "string" ? record.defaultHarness : record.runtime?.harness, "claude");
|
|
3029
3035
|
const harnessProfiles = buildHarnessProfiles({
|
|
3030
3036
|
projectRoot,
|
|
@@ -3602,14 +3608,14 @@ async function loadResolvedRelayAgents(options = {}) {
|
|
|
3602
3608
|
const manifest = await readProjectConfig(projectRoot);
|
|
3603
3609
|
const override = overrideByRoot.get(projectRoot);
|
|
3604
3610
|
const resolvedAgent = manifest ? await resolveManifestBackedAgent(projectRoot, manifest, settings, override) : await resolveInferredAgent(projectRoot, settings, override);
|
|
3605
|
-
if (!resolvedAgent.agentId ||
|
|
3611
|
+
if (!resolvedAgent.agentId || BUILT_IN_AGENT_DEFINITION_IDS.has(resolvedAgent.definitionId)) {
|
|
3606
3612
|
continue;
|
|
3607
3613
|
}
|
|
3608
3614
|
resolvedAgents.push(resolvedAgent);
|
|
3609
3615
|
}
|
|
3610
3616
|
const dedupedResolvedAgents = await dedupeResolvedAgentsByCanonicalProjectRoot(resolvedAgents);
|
|
3611
3617
|
const configuredAgents = dedupedResolvedAgents.filter((agent) => agent.registrationKind === "configured");
|
|
3612
|
-
const builtInOverrides = Object.fromEntries(Object.entries(overrides).filter(([
|
|
3618
|
+
const builtInOverrides = Object.fromEntries(Object.entries(overrides).filter(([, record]) => record.definitionId ? BUILT_IN_AGENT_DEFINITION_IDS.has(record.definitionId) : false));
|
|
3613
3619
|
const nextOverrides = {
|
|
3614
3620
|
...builtInOverrides,
|
|
3615
3621
|
...Object.fromEntries(configuredAgents.map((agent) => [
|
|
@@ -3701,11 +3707,12 @@ async function ensureRelayAgentConfigured(value, options = {}) {
|
|
|
3701
3707
|
async function ensureScoutRelayAgentConfigured(options = {}) {
|
|
3702
3708
|
const settings = await readOpenScoutSettings({ currentDirectory: options.currentDirectory });
|
|
3703
3709
|
const overrides = await readRelayAgentOverrides();
|
|
3704
|
-
const existing = overrides[SCOUT_AGENT_ID];
|
|
3705
3710
|
const resolvedProjectRoot = options.projectRoot ? normalizePath(options.projectRoot) : options.currentDirectory ? await findNearestProjectRoot(options.currentDirectory) ?? normalizePath(options.currentDirectory) : normalizePath(process.cwd());
|
|
3711
|
+
const qualifiedAgentId = buildRelayAgentInstance(SCOUT_AGENT_ID, resolvedProjectRoot).id;
|
|
3712
|
+
const existing = overrides[qualifiedAgentId] ?? overrides[SCOUT_AGENT_ID];
|
|
3706
3713
|
const nextOverride = {
|
|
3707
3714
|
...existing,
|
|
3708
|
-
agentId:
|
|
3715
|
+
agentId: qualifiedAgentId,
|
|
3709
3716
|
definitionId: SCOUT_AGENT_ID,
|
|
3710
3717
|
displayName: "Scout",
|
|
3711
3718
|
projectName: "OpenScout",
|
|
@@ -3718,7 +3725,7 @@ async function ensureScoutRelayAgentConfigured(options = {}) {
|
|
|
3718
3725
|
defaultHarness: "claude",
|
|
3719
3726
|
harnessProfiles: buildHarnessProfiles({
|
|
3720
3727
|
projectRoot: resolvedProjectRoot,
|
|
3721
|
-
sessionKey:
|
|
3728
|
+
sessionKey: qualifiedAgentId,
|
|
3722
3729
|
sessionPrefix: settings.agents.sessionPrefix,
|
|
3723
3730
|
defaultHarness: "claude",
|
|
3724
3731
|
profiles: existing?.harnessProfiles,
|
|
@@ -3734,13 +3741,16 @@ async function ensureScoutRelayAgentConfigured(options = {}) {
|
|
|
3734
3741
|
}
|
|
3735
3742
|
};
|
|
3736
3743
|
nextOverride.launchArgs = nextOverride.harnessProfiles?.claude?.launchArgs ?? [];
|
|
3737
|
-
if (
|
|
3738
|
-
overrides[SCOUT_AGENT_ID]
|
|
3744
|
+
if (overrides[SCOUT_AGENT_ID]) {
|
|
3745
|
+
delete overrides[SCOUT_AGENT_ID];
|
|
3746
|
+
}
|
|
3747
|
+
if (JSON.stringify(overrides[qualifiedAgentId]) !== JSON.stringify(nextOverride)) {
|
|
3748
|
+
overrides[qualifiedAgentId] = nextOverride;
|
|
3739
3749
|
await writeRelayAgentOverrides(overrides);
|
|
3740
3750
|
}
|
|
3741
3751
|
return nextOverride;
|
|
3742
3752
|
}
|
|
3743
|
-
var SCOUT_AGENT_ID = "scout", SCOUT_PRIMARY_CONVERSATION_ID = "dm.scout.primary", MANAGED_AGENT_HARNESSES, DEFAULT_OPERATOR_NAME, DEFAULT_CAPABILITIES, DEFAULT_TRANSPORT = "claude_stream_json", DEFAULT_TELEGRAM_MODE = "polling", LEGACY_DEFAULT_TELEGRAM_CONVERSATION_ID = "channel.shared", DEFAULT_TELEGRAM_CONVERSATION_ID, SETTINGS_VERSION = 1, PROJECT_CONFIG_VERSION = 1,
|
|
3753
|
+
var SCOUT_AGENT_ID = "scout", SCOUT_PRIMARY_CONVERSATION_ID = "dm.scout.primary", MANAGED_AGENT_HARNESSES, DEFAULT_OPERATOR_NAME, DEFAULT_CAPABILITIES, DEFAULT_TRANSPORT = "claude_stream_json", DEFAULT_TELEGRAM_MODE = "polling", LEGACY_DEFAULT_TELEGRAM_CONVERSATION_ID = "channel.shared", DEFAULT_TELEGRAM_CONVERSATION_ID, SETTINGS_VERSION = 1, PROJECT_CONFIG_VERSION = 1, PROJECT_SCAN_SKIP_DIRECTORIES, PROJECT_STRONG_MARKERS, PROJECT_WEAK_MARKERS, PROJECT_HARNESS_MARKERS, PROJECT_STRONG_MARKERS_FLAT_NESTED, PROJECT_WEAK_MARKERS_FLAT_NESTED, GIT_BRANCH_CACHE_TTL_MS = 15000, gitBranchCache, SCOUT_SKILL_FILE_NAME = "SKILL.md", SETUP_MODULE_DIRECTORY, SCOUT_SKILL_REPO_ROOT, SCOUT_SKILL_INSTALL_PATHS, PROJECT_SCAN_MAX_DEPTH = 64;
|
|
3744
3754
|
var init_setup = __esm(() => {
|
|
3745
3755
|
init_dist();
|
|
3746
3756
|
init_src();
|
|
@@ -3751,7 +3761,6 @@ var init_setup = __esm(() => {
|
|
|
3751
3761
|
DEFAULT_OPERATOR_NAME = guessedOperatorName();
|
|
3752
3762
|
DEFAULT_CAPABILITIES = ["chat", "invoke", "deliver"];
|
|
3753
3763
|
DEFAULT_TELEGRAM_CONVERSATION_ID = SCOUT_PRIMARY_CONVERSATION_ID;
|
|
3754
|
-
BUILT_IN_AGENT_IDS = new Set(["scout", "builder", "reviewer", "research"]);
|
|
3755
3764
|
PROJECT_SCAN_SKIP_DIRECTORIES = new Set([
|
|
3756
3765
|
".git",
|
|
3757
3766
|
".hg",
|
|
@@ -6243,7 +6252,7 @@ async function startLocalAgent(input) {
|
|
|
6243
6252
|
const findMatchForRoot = (root) => {
|
|
6244
6253
|
let fallback = null;
|
|
6245
6254
|
for (const [id, override] of Object.entries(overrides)) {
|
|
6246
|
-
if (
|
|
6255
|
+
if (BUILT_IN_AGENT_DEFINITION_IDS.has(id))
|
|
6247
6256
|
continue;
|
|
6248
6257
|
if (!override.projectRoot)
|
|
6249
6258
|
continue;
|
|
@@ -6483,7 +6492,7 @@ async function loadRegisteredLocalAgentBindings(nodeId, options = {}) {
|
|
|
6483
6492
|
return results;
|
|
6484
6493
|
}
|
|
6485
6494
|
async function inferLocalAgentBinding(agentId, nodeId) {
|
|
6486
|
-
if (!agentId ||
|
|
6495
|
+
if (!agentId || BUILT_IN_AGENT_DEFINITION_IDS.has(agentId)) {
|
|
6487
6496
|
return null;
|
|
6488
6497
|
}
|
|
6489
6498
|
const overrides = await readRelayAgentOverrides();
|
|
@@ -6506,7 +6515,7 @@ async function ensureLocalAgentBindingOnline(agentId, nodeId, options = {}) {
|
|
|
6506
6515
|
if (registeredBinding) {
|
|
6507
6516
|
return registeredBinding;
|
|
6508
6517
|
}
|
|
6509
|
-
if (
|
|
6518
|
+
if (BUILT_IN_AGENT_DEFINITION_IDS.has(agentId)) {
|
|
6510
6519
|
return null;
|
|
6511
6520
|
}
|
|
6512
6521
|
if (options.includeDiscovered) {
|
|
@@ -6529,7 +6538,7 @@ async function ensureLocalAgentBindingOnline(agentId, nodeId, options = {}) {
|
|
|
6529
6538
|
const onlineRecord = await ensureLocalAgentOnline(agentId, recordForHarness(localAgentRecordFromRelayAgentOverride(agentId, override), options.harness));
|
|
6530
6539
|
return buildLocalAgentBinding(agentId, onlineRecord, isLocalAgentRecordOnline(agentId, onlineRecord), nodeId, "relay-agent-registry");
|
|
6531
6540
|
}
|
|
6532
|
-
var
|
|
6541
|
+
var MODULE_DIRECTORY, OPENSCOUT_REPO_ROOT, DEFAULT_LOCAL_AGENT_CAPABILITIES, DEFAULT_LOCAL_AGENT_HARNESS = "claude", SUPPORTED_LOCAL_AGENT_HARNESSES;
|
|
6533
6542
|
var init_local_agents = __esm(async () => {
|
|
6534
6543
|
init_src();
|
|
6535
6544
|
init_claude_stream_json();
|
|
@@ -6538,7 +6547,6 @@ var init_local_agents = __esm(async () => {
|
|
|
6538
6547
|
init_support_paths();
|
|
6539
6548
|
init_local_agent_template();
|
|
6540
6549
|
await init_broker_service();
|
|
6541
|
-
BUILT_IN_LOCAL_AGENT_IDS = new Set(["scout", "builder", "reviewer", "research"]);
|
|
6542
6550
|
MODULE_DIRECTORY = dirname6(fileURLToPath5(import.meta.url));
|
|
6543
6551
|
OPENSCOUT_REPO_ROOT = resolve4(MODULE_DIRECTORY, "..", "..", "..");
|
|
6544
6552
|
DEFAULT_LOCAL_AGENT_CAPABILITIES = ["chat", "invoke", "deliver"];
|
|
@@ -8131,6 +8139,7 @@ function resolveScoutSurfaceCapabilities(surface) {
|
|
|
8131
8139
|
}
|
|
8132
8140
|
|
|
8133
8141
|
// apps/desktop/src/app/desktop/shell.ts
|
|
8142
|
+
init_src();
|
|
8134
8143
|
init_setup();
|
|
8135
8144
|
import { readFile as readFile6, readdir as readdir3, stat as stat4 } from "fs/promises";
|
|
8136
8145
|
import { performance } from "perf_hooks";
|
|
@@ -8342,7 +8351,6 @@ var BROKER_SHARED_CHANNEL_ID = "channel.shared";
|
|
|
8342
8351
|
var OPERATOR_ID = "operator";
|
|
8343
8352
|
var DEFAULT_BROKER_HOST2 = "127.0.0.1";
|
|
8344
8353
|
var DEFAULT_BROKER_PORT2 = 65535;
|
|
8345
|
-
var BUILT_IN_SCOUT_AGENT_IDS = new Set([SCOUT_AGENT_ID, "builder", "reviewer", "research"]);
|
|
8346
8354
|
function buildScoutBrokerUrlFromEnv() {
|
|
8347
8355
|
const host = process.env.OPENSCOUT_BROKER_HOST ?? DEFAULT_BROKER_HOST2;
|
|
8348
8356
|
const port = Number.parseInt(process.env.OPENSCOUT_BROKER_PORT ?? String(DEFAULT_BROKER_PORT2), 10);
|
|
@@ -9019,7 +9027,6 @@ function readProjectGitActivity(projectRoot) {
|
|
|
9019
9027
|
|
|
9020
9028
|
// apps/desktop/src/app/desktop/shell.ts
|
|
9021
9029
|
var OPERATOR_ID2 = "operator";
|
|
9022
|
-
var BUILT_IN_ROLE_AGENT_IDS = new Set(["scout", "builder", "reviewer", "research"]);
|
|
9023
9030
|
var RECENT_AGENT_ACTIVITY_WINDOW_SECONDS = 60 * 60 * 24 * 30;
|
|
9024
9031
|
var RECONCILE_OFFLINE_WAIT_SECONDS = 60 * 3;
|
|
9025
9032
|
var RECONCILE_NO_FOLLOW_UP_SECONDS = 60 * 10;
|
|
@@ -9230,7 +9237,7 @@ function interAgentThreadKey(participantIds) {
|
|
|
9230
9237
|
function visibleRelayAgentIds(snapshot, configuredAgentIds, messagesByConversation, directActivity) {
|
|
9231
9238
|
const visible = new Set([
|
|
9232
9239
|
...configuredAgentIds,
|
|
9233
|
-
...Array.from(
|
|
9240
|
+
...Array.from(BUILT_IN_AGENT_DEFINITION_IDS)
|
|
9234
9241
|
]);
|
|
9235
9242
|
const cutoff = Math.floor(Date.now() / 1000) - RECENT_AGENT_ACTIVITY_WINDOW_SECONDS;
|
|
9236
9243
|
for (const [agentId, activity] of directActivity.entries()) {
|
|
@@ -11279,7 +11286,6 @@ var SCOUT_BROKER_OPERATOR_ID = "operator";
|
|
|
11279
11286
|
var SCOUT_SHARED_CHANNEL_ID = "channel.shared";
|
|
11280
11287
|
var SCOUT_VOICE_CHANNEL_ID = "channel.voice";
|
|
11281
11288
|
var SCOUT_SYSTEM_CHANNEL_ID = "channel.system";
|
|
11282
|
-
var SCOUT_AGENT_ID2 = "scout";
|
|
11283
11289
|
function resolveCurrentDirectory(input) {
|
|
11284
11290
|
return input?.trim() || process.cwd();
|
|
11285
11291
|
}
|
|
@@ -11515,14 +11521,14 @@ async function ensureDirectConversation(baseUrl, snapshot, nodeId, agentId, oper
|
|
|
11515
11521
|
const definition = {
|
|
11516
11522
|
id: conversationId,
|
|
11517
11523
|
kind: "direct",
|
|
11518
|
-
title: agentId ===
|
|
11524
|
+
title: agentId === SCOUT_AGENT_ID ? "Scout" : actorDisplayName2(snapshot, agentId, operatorName),
|
|
11519
11525
|
visibility: "private",
|
|
11520
11526
|
shareMode: nextShareMode,
|
|
11521
11527
|
authorityNodeId: nodeId,
|
|
11522
11528
|
participantIds: [SCOUT_BROKER_OPERATOR_ID, agentId].sort(),
|
|
11523
11529
|
metadata: {
|
|
11524
11530
|
surface: "scout-desktop",
|
|
11525
|
-
...agentId ===
|
|
11531
|
+
...agentId === SCOUT_AGENT_ID ? { role: "partner" } : {}
|
|
11526
11532
|
}
|
|
11527
11533
|
};
|
|
11528
11534
|
await postBrokerJson(baseUrl, "/v1/conversations", definition);
|
|
@@ -11729,7 +11735,7 @@ async function sendScoutDesktopRelayMessage(input, options = {}) {
|
|
|
11729
11735
|
await ensureCoreConversation(broker.baseUrl, broker.snapshot, broker.node.id, SCOUT_SYSTEM_CHANNEL_ID);
|
|
11730
11736
|
const directTarget = input.destinationKind === "direct" ? input.destinationId : null;
|
|
11731
11737
|
if (directTarget) {
|
|
11732
|
-
if (directTarget ===
|
|
11738
|
+
if (directTarget === SCOUT_AGENT_ID) {
|
|
11733
11739
|
await ensureScoutRelayAgentConfigured({ currentDirectory });
|
|
11734
11740
|
}
|
|
11735
11741
|
await ensureBrokerAgentBinding(broker.baseUrl, broker.snapshot, broker.node.id, directTarget, currentDirectory);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openscout/scout",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.40",
|
|
4
4
|
"description": "Published Scout package that installs the `scout` command",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@openscout/runtime": "0.2.
|
|
26
|
+
"@openscout/runtime": "0.2.40"
|
|
27
27
|
}
|
|
28
28
|
}
|