@openscout/scout 0.2.53 → 0.2.55
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/client/assets/{arc.es-DHqqknxg.js → arc.es-ChjXbrxY.js} +1 -1
- package/dist/client/assets/index-DUtTv5D0.css +1 -0
- package/dist/client/assets/index-kOG7gvZY.js +139 -0
- package/dist/client/index.html +3 -3
- package/dist/main.mjs +198 -29
- package/dist/pair-supervisor.mjs +125 -2
- package/dist/scout-control-plane-web.mjs +207 -91
- package/package.json +2 -2
- package/dist/client/assets/index-DYZld5kI.css +0 -1
- package/dist/client/assets/index-DzoSArBb.js +0 -139
package/dist/client/index.html
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
<title>Scout</title>
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Spectral:wght@500;600&display=swap" rel="stylesheet" />
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Spectral:wght@500;600&display=swap" rel="stylesheet" />
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-kOG7gvZY.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DUtTv5D0.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div id="root"></div>
|
package/dist/main.mjs
CHANGED
|
@@ -572,7 +572,14 @@ var init_options = __esm(() => {
|
|
|
572
572
|
init_errors();
|
|
573
573
|
SCOUT_MENTION_PATTERN = /(^|[\s([{'"`])@([A-Za-z0-9._:-]+)(?=$|[\s)\]}",.!?:;'"`])/g;
|
|
574
574
|
});
|
|
575
|
-
|
|
575
|
+
|
|
576
|
+
// ../protocol/dist/common.js
|
|
577
|
+
var init_common = () => {};
|
|
578
|
+
|
|
579
|
+
// ../protocol/dist/actors.js
|
|
580
|
+
var init_actors = () => {};
|
|
581
|
+
|
|
582
|
+
// ../protocol/dist/agent-identity.js
|
|
576
583
|
function trimIdentityPrefix(value) {
|
|
577
584
|
return value.trim().replace(/^@+/, "").replace(/[.,!?;)\]]+$/, "");
|
|
578
585
|
}
|
|
@@ -922,17 +929,17 @@ var init_agent_identity = __esm(() => {
|
|
|
922
929
|
resolveAgentSelector = resolveAgentIdentity;
|
|
923
930
|
});
|
|
924
931
|
|
|
925
|
-
// ../protocol/
|
|
932
|
+
// ../protocol/dist/agent-address.js
|
|
926
933
|
var init_agent_address = __esm(() => {
|
|
927
934
|
init_agent_identity();
|
|
928
935
|
});
|
|
929
936
|
|
|
930
|
-
// ../protocol/
|
|
937
|
+
// ../protocol/dist/agent-selectors.js
|
|
931
938
|
var init_agent_selectors = __esm(() => {
|
|
932
939
|
init_agent_address();
|
|
933
940
|
});
|
|
934
941
|
|
|
935
|
-
// ../protocol/
|
|
942
|
+
// ../protocol/dist/scout-agent-card.js
|
|
936
943
|
function buildScoutReturnAddress(input) {
|
|
937
944
|
const next = {
|
|
938
945
|
actorId: input.actorId,
|
|
@@ -967,11 +974,48 @@ function buildScoutReturnAddress(input) {
|
|
|
967
974
|
}
|
|
968
975
|
return next;
|
|
969
976
|
}
|
|
970
|
-
// ../protocol/
|
|
971
|
-
var
|
|
977
|
+
// ../protocol/dist/mesh.js
|
|
978
|
+
var init_mesh = () => {};
|
|
979
|
+
|
|
980
|
+
// ../protocol/dist/conversations.js
|
|
981
|
+
var init_conversations = () => {};
|
|
982
|
+
// ../protocol/dist/messages.js
|
|
983
|
+
var init_messages = () => {};
|
|
984
|
+
|
|
985
|
+
// ../protocol/dist/invocations.js
|
|
986
|
+
var init_invocations = () => {};
|
|
987
|
+
|
|
988
|
+
// ../protocol/dist/scout-dispatch.js
|
|
989
|
+
var init_scout_dispatch = () => {};
|
|
990
|
+
|
|
991
|
+
// ../protocol/dist/deliveries.js
|
|
992
|
+
var init_deliveries = () => {};
|
|
993
|
+
|
|
994
|
+
// ../protocol/dist/transports.js
|
|
995
|
+
var init_transports = () => {};
|
|
996
|
+
|
|
997
|
+
// ../protocol/dist/events.js
|
|
998
|
+
var init_events = () => {};
|
|
999
|
+
|
|
1000
|
+
// ../protocol/dist/thread-events.js
|
|
1001
|
+
var init_thread_events = () => {};
|
|
1002
|
+
|
|
1003
|
+
// ../protocol/dist/index.js
|
|
1004
|
+
var init_dist = __esm(() => {
|
|
1005
|
+
init_common();
|
|
1006
|
+
init_actors();
|
|
972
1007
|
init_agent_identity();
|
|
973
1008
|
init_agent_address();
|
|
974
1009
|
init_agent_selectors();
|
|
1010
|
+
init_mesh();
|
|
1011
|
+
init_conversations();
|
|
1012
|
+
init_messages();
|
|
1013
|
+
init_invocations();
|
|
1014
|
+
init_scout_dispatch();
|
|
1015
|
+
init_deliveries();
|
|
1016
|
+
init_transports();
|
|
1017
|
+
init_events();
|
|
1018
|
+
init_thread_events();
|
|
975
1019
|
});
|
|
976
1020
|
|
|
977
1021
|
// ../../node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/error.js
|
|
@@ -1926,7 +1970,7 @@ var init_stringify = __esm(() => {
|
|
|
1926
1970
|
});
|
|
1927
1971
|
|
|
1928
1972
|
// ../../node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/index.js
|
|
1929
|
-
var
|
|
1973
|
+
var init_dist2 = __esm(() => {
|
|
1930
1974
|
init_parse();
|
|
1931
1975
|
init_stringify();
|
|
1932
1976
|
init_date();
|
|
@@ -4400,8 +4444,8 @@ async function initializeOpenScoutSetup(options = {}) {
|
|
|
4400
4444
|
}
|
|
4401
4445
|
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;
|
|
4402
4446
|
var init_setup = __esm(() => {
|
|
4447
|
+
init_dist2();
|
|
4403
4448
|
init_dist();
|
|
4404
|
-
init_src();
|
|
4405
4449
|
init_harness_catalog();
|
|
4406
4450
|
init_support_paths();
|
|
4407
4451
|
init_user_project_hints();
|
|
@@ -4705,6 +4749,7 @@ class ClaudeStreamJsonSession {
|
|
|
4705
4749
|
await writeFile3(join5(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
|
|
4706
4750
|
this.claudeSessionId = await readOptionalFile(this.sessionStatePath);
|
|
4707
4751
|
const args = [
|
|
4752
|
+
"--verbose",
|
|
4708
4753
|
"--print",
|
|
4709
4754
|
"--input-format",
|
|
4710
4755
|
"stream-json",
|
|
@@ -4899,6 +4944,55 @@ class BaseAdapter {
|
|
|
4899
4944
|
this.emit("event", { event: "session:update", session: { ...this.session } });
|
|
4900
4945
|
}
|
|
4901
4946
|
}
|
|
4947
|
+
|
|
4948
|
+
// ../agent-sessions/src/protocol/approval-normalization.ts
|
|
4949
|
+
function defaultApprovalTitle(block) {
|
|
4950
|
+
switch (block.action.kind) {
|
|
4951
|
+
case "command":
|
|
4952
|
+
return "Approve Command";
|
|
4953
|
+
case "file_change":
|
|
4954
|
+
return "Approve File Change";
|
|
4955
|
+
case "tool_call":
|
|
4956
|
+
return "Approve Tool Call";
|
|
4957
|
+
case "subagent":
|
|
4958
|
+
return "Approve Subagent";
|
|
4959
|
+
}
|
|
4960
|
+
}
|
|
4961
|
+
function defaultApprovalDetail(block) {
|
|
4962
|
+
switch (block.action.kind) {
|
|
4963
|
+
case "command":
|
|
4964
|
+
return block.action.command?.trim() || null;
|
|
4965
|
+
case "file_change":
|
|
4966
|
+
return block.action.path?.trim() || null;
|
|
4967
|
+
case "tool_call":
|
|
4968
|
+
return block.action.toolName?.trim() || null;
|
|
4969
|
+
case "subagent":
|
|
4970
|
+
return block.action.agentName?.trim() || block.action.agentId?.trim() || null;
|
|
4971
|
+
}
|
|
4972
|
+
}
|
|
4973
|
+
function normalizeApprovalRequest(session, turnId, block) {
|
|
4974
|
+
if (block.action.status !== "awaiting_approval" || !block.action.approval) {
|
|
4975
|
+
return null;
|
|
4976
|
+
}
|
|
4977
|
+
const title = defaultApprovalTitle(block);
|
|
4978
|
+
const detail = defaultApprovalDetail(block);
|
|
4979
|
+
const description = block.action.approval.description?.trim() || detail || title;
|
|
4980
|
+
return {
|
|
4981
|
+
sessionId: session.id,
|
|
4982
|
+
sessionName: session.name,
|
|
4983
|
+
adapterType: session.adapterType,
|
|
4984
|
+
turnId,
|
|
4985
|
+
blockId: block.id,
|
|
4986
|
+
version: block.action.approval.version,
|
|
4987
|
+
risk: block.action.approval.risk ?? "medium",
|
|
4988
|
+
title,
|
|
4989
|
+
description,
|
|
4990
|
+
detail,
|
|
4991
|
+
actionKind: block.action.kind,
|
|
4992
|
+
actionStatus: block.action.status
|
|
4993
|
+
};
|
|
4994
|
+
}
|
|
4995
|
+
|
|
4902
4996
|
// ../agent-sessions/src/state.ts
|
|
4903
4997
|
class StateTracker {
|
|
4904
4998
|
states = new Map;
|
|
@@ -8547,7 +8641,7 @@ var init_echo = __esm(() => {
|
|
|
8547
8641
|
});
|
|
8548
8642
|
|
|
8549
8643
|
// ../agent-sessions/src/index.ts
|
|
8550
|
-
var
|
|
8644
|
+
var init_src = __esm(() => {
|
|
8551
8645
|
init_registry();
|
|
8552
8646
|
init_registry();
|
|
8553
8647
|
init_claude_code();
|
|
@@ -9339,7 +9433,7 @@ async function shutdownCodexAppServerAgent(options, shutdownOptions = {}) {
|
|
|
9339
9433
|
}
|
|
9340
9434
|
var sessions2;
|
|
9341
9435
|
var init_codex_app_server = __esm(() => {
|
|
9342
|
-
|
|
9436
|
+
init_src();
|
|
9343
9437
|
sessions2 = new Map;
|
|
9344
9438
|
});
|
|
9345
9439
|
|
|
@@ -11169,7 +11263,7 @@ async function ensureLocalAgentBindingOnline(agentId, nodeId, options = {}) {
|
|
|
11169
11263
|
}
|
|
11170
11264
|
var MODULE_DIRECTORY, OPENSCOUT_REPO_ROOT, DEFAULT_LOCAL_AGENT_CAPABILITIES, DEFAULT_LOCAL_AGENT_HARNESS = "claude", SUPPORTED_LOCAL_AGENT_HARNESSES;
|
|
11171
11265
|
var init_local_agents = __esm(async () => {
|
|
11172
|
-
|
|
11266
|
+
init_dist();
|
|
11173
11267
|
init_claude_stream_json();
|
|
11174
11268
|
init_codex_app_server();
|
|
11175
11269
|
init_setup();
|
|
@@ -13017,7 +13111,7 @@ function buildScoutEnrollmentPrompt(input) {
|
|
|
13017
13111
|
}
|
|
13018
13112
|
var BROKER_SHARED_CHANNEL_ID = "channel.shared", BROKER_VOICE_CHANNEL_ID = "channel.voice", BROKER_SYSTEM_CHANNEL_ID = "channel.system", OPERATOR_ID = "operator", DEFAULT_BROKER_HOST2 = "127.0.0.1", DEFAULT_BROKER_PORT2 = 65535;
|
|
13019
13113
|
var init_service = __esm(async () => {
|
|
13020
|
-
|
|
13114
|
+
init_dist();
|
|
13021
13115
|
init_setup();
|
|
13022
13116
|
init_support_paths();
|
|
13023
13117
|
init_user_config();
|
|
@@ -13543,7 +13637,7 @@ function buildScoutAgentCard(binding, options = {}) {
|
|
|
13543
13637
|
};
|
|
13544
13638
|
}
|
|
13545
13639
|
var init_scout_agent_cards = __esm(() => {
|
|
13546
|
-
|
|
13640
|
+
init_dist();
|
|
13547
13641
|
});
|
|
13548
13642
|
|
|
13549
13643
|
// ../../apps/desktop/src/core/agents/service.ts
|
|
@@ -44653,7 +44747,7 @@ var AGENT_STATE_VALUES, REGISTRATION_KIND_VALUES, RESOLVE_KIND_VALUES, MESSAGE_R
|
|
|
44653
44747
|
var init_scout_mcp = __esm(async () => {
|
|
44654
44748
|
init_mcp();
|
|
44655
44749
|
init_stdio2();
|
|
44656
|
-
|
|
44750
|
+
init_dist();
|
|
44657
44751
|
init_setup();
|
|
44658
44752
|
init_v4();
|
|
44659
44753
|
init_product();
|
|
@@ -45638,7 +45732,7 @@ Subcommands:
|
|
|
45638
45732
|
scout mesh discover Probe for remote mesh nodes
|
|
45639
45733
|
scout mesh ping <node> Ping a specific node by ID, name, or URL
|
|
45640
45734
|
`;
|
|
45641
|
-
var
|
|
45735
|
+
var init_mesh2 = __esm(async () => {
|
|
45642
45736
|
await init_service4();
|
|
45643
45737
|
});
|
|
45644
45738
|
|
|
@@ -48078,7 +48172,7 @@ class Bridge {
|
|
|
48078
48172
|
}
|
|
48079
48173
|
}
|
|
48080
48174
|
var init_bridge = __esm(() => {
|
|
48081
|
-
|
|
48175
|
+
init_src();
|
|
48082
48176
|
init_log();
|
|
48083
48177
|
});
|
|
48084
48178
|
|
|
@@ -49646,7 +49740,7 @@ function detectAgent(filePath) {
|
|
|
49646
49740
|
var MARKER_FILES;
|
|
49647
49741
|
var init_server3 = __esm(async () => {
|
|
49648
49742
|
init_log();
|
|
49649
|
-
|
|
49743
|
+
init_src();
|
|
49650
49744
|
init_config3();
|
|
49651
49745
|
init_security();
|
|
49652
49746
|
await init_service5();
|
|
@@ -50582,7 +50676,7 @@ If you want to call this function on the server, see https://trpc.io/docs/v11/se
|
|
|
50582
50676
|
});
|
|
50583
50677
|
|
|
50584
50678
|
// ../../node_modules/.bun/@trpc+server@11.16.0+1fb4c65d43e298b9/node_modules/@trpc/server/dist/index.mjs
|
|
50585
|
-
var
|
|
50679
|
+
var init_dist3 = __esm(() => {
|
|
50586
50680
|
init_getErrorShape_vC8mUXJD();
|
|
50587
50681
|
init_tracked_DiE3uR1B();
|
|
50588
50682
|
init_initTRPC_B1ggxyJl();
|
|
@@ -50795,6 +50889,68 @@ function getEventSessionId(event) {
|
|
|
50795
50889
|
function trackedSequencedEventId(event) {
|
|
50796
50890
|
return `${getEventSessionId(event) ?? "unknown"}:${event.seq}`;
|
|
50797
50891
|
}
|
|
50892
|
+
function approvalInboxItemId(sessionId, turnId, blockId, version2) {
|
|
50893
|
+
return `approval:${sessionId}:${turnId}:${blockId}:v${version2}`;
|
|
50894
|
+
}
|
|
50895
|
+
function projectApprovalInboxItem(snapshot, turn, block) {
|
|
50896
|
+
const normalized = normalizeApprovalRequest(snapshot.session, turn.id, block);
|
|
50897
|
+
if (!normalized) {
|
|
50898
|
+
return null;
|
|
50899
|
+
}
|
|
50900
|
+
return {
|
|
50901
|
+
id: approvalInboxItemId(normalized.sessionId, normalized.turnId, normalized.blockId, normalized.version),
|
|
50902
|
+
kind: "approval",
|
|
50903
|
+
createdAt: turn.startedAt,
|
|
50904
|
+
sessionId: normalized.sessionId,
|
|
50905
|
+
sessionName: normalized.sessionName,
|
|
50906
|
+
adapterType: normalized.adapterType,
|
|
50907
|
+
turnId: normalized.turnId,
|
|
50908
|
+
blockId: normalized.blockId,
|
|
50909
|
+
version: normalized.version,
|
|
50910
|
+
risk: normalized.risk,
|
|
50911
|
+
title: normalized.title,
|
|
50912
|
+
description: normalized.description,
|
|
50913
|
+
detail: normalized.detail,
|
|
50914
|
+
actionKind: normalized.actionKind,
|
|
50915
|
+
actionStatus: normalized.actionStatus
|
|
50916
|
+
};
|
|
50917
|
+
}
|
|
50918
|
+
function lookupMobileInboxApprovalItem(bridge, sessionId, turnId, blockId) {
|
|
50919
|
+
const snapshot = bridge.getSessionSnapshot(sessionId);
|
|
50920
|
+
if (!snapshot) {
|
|
50921
|
+
return null;
|
|
50922
|
+
}
|
|
50923
|
+
const turn = snapshot.turns.find((candidate) => candidate.id === turnId);
|
|
50924
|
+
if (!turn) {
|
|
50925
|
+
return null;
|
|
50926
|
+
}
|
|
50927
|
+
const blockState = turn.blocks.find((candidate) => candidate.block.id === blockId);
|
|
50928
|
+
if (!blockState || blockState.block.type !== "action") {
|
|
50929
|
+
return null;
|
|
50930
|
+
}
|
|
50931
|
+
return projectApprovalInboxItem(snapshot, turn, blockState.block);
|
|
50932
|
+
}
|
|
50933
|
+
function queryMobileInboxItems(bridge) {
|
|
50934
|
+
const items = [];
|
|
50935
|
+
for (const session of bridge.getSessionSummaries()) {
|
|
50936
|
+
const snapshot = bridge.getSessionSnapshot(session.sessionId);
|
|
50937
|
+
if (!snapshot) {
|
|
50938
|
+
continue;
|
|
50939
|
+
}
|
|
50940
|
+
for (const turn of snapshot.turns) {
|
|
50941
|
+
for (const blockState of turn.blocks) {
|
|
50942
|
+
if (blockState.block.type !== "action") {
|
|
50943
|
+
continue;
|
|
50944
|
+
}
|
|
50945
|
+
const item = projectApprovalInboxItem(snapshot, turn, blockState.block);
|
|
50946
|
+
if (item) {
|
|
50947
|
+
items.push(item);
|
|
50948
|
+
}
|
|
50949
|
+
}
|
|
50950
|
+
}
|
|
50951
|
+
}
|
|
50952
|
+
return items.sort((left, right) => right.createdAt - left.createdAt || left.id.localeCompare(right.id));
|
|
50953
|
+
}
|
|
50798
50954
|
function toTRPCRegistryError(error48) {
|
|
50799
50955
|
if (!isSessionRegistryError(error48)) {
|
|
50800
50956
|
return null;
|
|
@@ -50819,9 +50975,9 @@ function readSyncStatus2(bridge, sessionId) {
|
|
|
50819
50975
|
}
|
|
50820
50976
|
var t, logged, procedure, MARKER_FILES2, sessionRouter, mobileRouter, workspaceRouter, historyRouter, promptRouter, syncRouter, bridgeRouter;
|
|
50821
50977
|
var init_router = __esm(async () => {
|
|
50822
|
-
|
|
50978
|
+
init_dist3();
|
|
50823
50979
|
init_zod();
|
|
50824
|
-
|
|
50980
|
+
init_src();
|
|
50825
50981
|
init_log();
|
|
50826
50982
|
init_config3();
|
|
50827
50983
|
init_db_queries();
|
|
@@ -50919,6 +51075,9 @@ var init_router = __esm(async () => {
|
|
|
50919
51075
|
})
|
|
50920
51076
|
});
|
|
50921
51077
|
mobileRouter = t.router({
|
|
51078
|
+
inbox: procedure.query(({ ctx }) => ({
|
|
51079
|
+
items: queryMobileInboxItems(ctx.bridge)
|
|
51080
|
+
})),
|
|
50922
51081
|
home: procedure.input(exports_external.object({
|
|
50923
51082
|
workspaceLimit: exports_external.number().optional(),
|
|
50924
51083
|
agentLimit: exports_external.number().optional(),
|
|
@@ -51701,7 +51860,7 @@ function asStringPayload(raw) {
|
|
|
51701
51860
|
}
|
|
51702
51861
|
var INITIAL_BACKOFF_MS = 1000, MAX_BACKOFF_MS = 30000, BACKOFF_MULTIPLIER = 2, LEGACY_CLIENT_ID = "__legacy__";
|
|
51703
51862
|
var init_relay_client = __esm(async () => {
|
|
51704
|
-
|
|
51863
|
+
init_dist3();
|
|
51705
51864
|
init_log();
|
|
51706
51865
|
init_security();
|
|
51707
51866
|
await __promiseAll([
|
|
@@ -53311,7 +53470,7 @@ var init_hono = __esm(() => {
|
|
|
53311
53470
|
});
|
|
53312
53471
|
|
|
53313
53472
|
// ../../node_modules/.bun/hono@4.12.10/node_modules/hono/dist/index.js
|
|
53314
|
-
var
|
|
53473
|
+
var init_dist4 = __esm(() => {
|
|
53315
53474
|
init_hono();
|
|
53316
53475
|
});
|
|
53317
53476
|
|
|
@@ -55230,7 +55389,7 @@ var trpcServer = ({ endpoint, createContext, ...rest }) => {
|
|
|
55230
55389
|
});
|
|
55231
55390
|
};
|
|
55232
55391
|
};
|
|
55233
|
-
var
|
|
55392
|
+
var init_dist5 = __esm(() => {
|
|
55234
55393
|
init_fetch();
|
|
55235
55394
|
init_route();
|
|
55236
55395
|
});
|
|
@@ -55576,6 +55735,16 @@ function startBridgeServerTRPC(options) {
|
|
|
55576
55735
|
state.unsub = bridge.onEvent((sequenced) => {
|
|
55577
55736
|
logBridgeEvent(sequenced.event, sequenced.seq);
|
|
55578
55737
|
sendEvent(JSON.stringify({ seq: sequenced.seq, event: sequenced.event }));
|
|
55738
|
+
if (sequenced.event.event === "block:action:approval") {
|
|
55739
|
+
const item = lookupMobileInboxApprovalItem(bridge, sequenced.event.sessionId, sequenced.event.turnId, sequenced.event.blockId);
|
|
55740
|
+
if (item) {
|
|
55741
|
+
sendEvent(JSON.stringify({
|
|
55742
|
+
event: "operator:notify",
|
|
55743
|
+
tier: "interrupt",
|
|
55744
|
+
item
|
|
55745
|
+
}));
|
|
55746
|
+
}
|
|
55747
|
+
}
|
|
55579
55748
|
});
|
|
55580
55749
|
}
|
|
55581
55750
|
const server = Bun.serve({
|
|
@@ -55715,9 +55884,9 @@ function isAsyncIterable2(value) {
|
|
|
55715
55884
|
return !!value && typeof value === "object" && !Array.isArray(value) && typeof value[Symbol.asyncIterator] === "function";
|
|
55716
55885
|
}
|
|
55717
55886
|
var init_server_trpc = __esm(async () => {
|
|
55718
|
-
init_dist3();
|
|
55719
55887
|
init_dist4();
|
|
55720
|
-
|
|
55888
|
+
init_dist5();
|
|
55889
|
+
init_dist3();
|
|
55721
55890
|
init_rpc();
|
|
55722
55891
|
init_observable();
|
|
55723
55892
|
init_log();
|
|
@@ -55818,7 +55987,7 @@ async function autoStartConfiguredSessions(bridge, sessions3) {
|
|
|
55818
55987
|
}
|
|
55819
55988
|
}
|
|
55820
55989
|
var init_runtime = __esm(async () => {
|
|
55821
|
-
|
|
55990
|
+
init_src();
|
|
55822
55991
|
init_bridge();
|
|
55823
55992
|
init_config3();
|
|
55824
55993
|
init_fileserver();
|
|
@@ -56774,7 +56943,7 @@ function renderUnicodeCompact(data, options = {}) {
|
|
|
56774
56943
|
`);
|
|
56775
56944
|
}
|
|
56776
56945
|
var QrCodeDataType, LOW, MEDIUM, QUARTILE, HIGH, EccMap, NUMERIC_REGEX, ALPHANUMERIC_REGEX, ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", MIN_VERSION = 1, MAX_VERSION = 40, PENALTY_N1 = 3, PENALTY_N2 = 3, PENALTY_N3 = 40, PENALTY_N4 = 10, ECC_CODEWORDS_PER_BLOCK, NUM_ERROR_CORRECTION_BLOCKS, MODE_NUMERIC, MODE_ALPHANUMERIC, MODE_BYTE;
|
|
56777
|
-
var
|
|
56946
|
+
var init_dist6 = __esm(() => {
|
|
56778
56947
|
QrCodeDataType = /* @__PURE__ */ ((QrCodeDataType2) => {
|
|
56779
56948
|
QrCodeDataType2[QrCodeDataType2["Border"] = -1] = "Border";
|
|
56780
56949
|
QrCodeDataType2[QrCodeDataType2["Data"] = 0] = "Data";
|
|
@@ -56823,7 +56992,7 @@ function renderQRCode(payload) {
|
|
|
56823
56992
|
return qr;
|
|
56824
56993
|
}
|
|
56825
56994
|
var init_qr = __esm(() => {
|
|
56826
|
-
|
|
56995
|
+
init_dist6();
|
|
56827
56996
|
});
|
|
56828
56997
|
|
|
56829
56998
|
// ../../apps/desktop/src/core/pairing/runtime/index.ts
|
|
@@ -119197,7 +119366,7 @@ async function loadScoutCommandHandler(name) {
|
|
|
119197
119366
|
case "menu":
|
|
119198
119367
|
return (await Promise.resolve().then(() => (init_menu(), exports_menu))).runMenuCommand;
|
|
119199
119368
|
case "mesh":
|
|
119200
|
-
return (await
|
|
119369
|
+
return (await init_mesh2().then(() => exports_mesh)).runMeshCommand;
|
|
119201
119370
|
case "pair":
|
|
119202
119371
|
return (await init_pair().then(() => exports_pair)).runPairCommand;
|
|
119203
119372
|
case "ps":
|
package/dist/pair-supervisor.mjs
CHANGED
|
@@ -3420,6 +3420,53 @@ class BaseAdapter {
|
|
|
3420
3420
|
this.emit("event", { event: "session:update", session: { ...this.session } });
|
|
3421
3421
|
}
|
|
3422
3422
|
}
|
|
3423
|
+
// ../agent-sessions/src/protocol/approval-normalization.ts
|
|
3424
|
+
function defaultApprovalTitle(block) {
|
|
3425
|
+
switch (block.action.kind) {
|
|
3426
|
+
case "command":
|
|
3427
|
+
return "Approve Command";
|
|
3428
|
+
case "file_change":
|
|
3429
|
+
return "Approve File Change";
|
|
3430
|
+
case "tool_call":
|
|
3431
|
+
return "Approve Tool Call";
|
|
3432
|
+
case "subagent":
|
|
3433
|
+
return "Approve Subagent";
|
|
3434
|
+
}
|
|
3435
|
+
}
|
|
3436
|
+
function defaultApprovalDetail(block) {
|
|
3437
|
+
switch (block.action.kind) {
|
|
3438
|
+
case "command":
|
|
3439
|
+
return block.action.command?.trim() || null;
|
|
3440
|
+
case "file_change":
|
|
3441
|
+
return block.action.path?.trim() || null;
|
|
3442
|
+
case "tool_call":
|
|
3443
|
+
return block.action.toolName?.trim() || null;
|
|
3444
|
+
case "subagent":
|
|
3445
|
+
return block.action.agentName?.trim() || block.action.agentId?.trim() || null;
|
|
3446
|
+
}
|
|
3447
|
+
}
|
|
3448
|
+
function normalizeApprovalRequest(session, turnId, block) {
|
|
3449
|
+
if (block.action.status !== "awaiting_approval" || !block.action.approval) {
|
|
3450
|
+
return null;
|
|
3451
|
+
}
|
|
3452
|
+
const title = defaultApprovalTitle(block);
|
|
3453
|
+
const detail = defaultApprovalDetail(block);
|
|
3454
|
+
const description = block.action.approval.description?.trim() || detail || title;
|
|
3455
|
+
return {
|
|
3456
|
+
sessionId: session.id,
|
|
3457
|
+
sessionName: session.name,
|
|
3458
|
+
adapterType: session.adapterType,
|
|
3459
|
+
turnId,
|
|
3460
|
+
blockId: block.id,
|
|
3461
|
+
version: block.action.approval.version,
|
|
3462
|
+
risk: block.action.approval.risk ?? "medium",
|
|
3463
|
+
title,
|
|
3464
|
+
description,
|
|
3465
|
+
detail,
|
|
3466
|
+
actionKind: block.action.kind,
|
|
3467
|
+
actionStatus: block.action.status
|
|
3468
|
+
};
|
|
3469
|
+
}
|
|
3423
3470
|
// ../agent-sessions/src/state.ts
|
|
3424
3471
|
class StateTracker {
|
|
3425
3472
|
states = new Map;
|
|
@@ -8623,7 +8670,7 @@ function parse(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
|
|
|
8623
8670
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
8624
8671
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
8625
8672
|
*/
|
|
8626
|
-
// ../protocol/
|
|
8673
|
+
// ../protocol/dist/agent-identity.js
|
|
8627
8674
|
var DIMENSION_ALIASES = {
|
|
8628
8675
|
workspace: "workspace",
|
|
8629
8676
|
worktree: "workspace",
|
|
@@ -8872,7 +8919,7 @@ function diagnoseAgentIdentity(identity, candidates) {
|
|
|
8872
8919
|
var parseAgentSelector = parseAgentIdentity;
|
|
8873
8920
|
var formatAgentSelector = formatAgentIdentity;
|
|
8874
8921
|
var resolveAgentSelector = resolveAgentIdentity;
|
|
8875
|
-
// ../protocol/
|
|
8922
|
+
// ../protocol/dist/scout-agent-card.js
|
|
8876
8923
|
function buildScoutReturnAddress(input) {
|
|
8877
8924
|
const next = {
|
|
8878
8925
|
actorId: input.actorId,
|
|
@@ -11165,6 +11212,7 @@ class ClaudeStreamJsonSession {
|
|
|
11165
11212
|
await writeFile4(join12(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
|
|
11166
11213
|
this.claudeSessionId = await readOptionalFile2(this.sessionStatePath);
|
|
11167
11214
|
const args = [
|
|
11215
|
+
"--verbose",
|
|
11168
11216
|
"--print",
|
|
11169
11217
|
"--input-format",
|
|
11170
11218
|
"stream-json",
|
|
@@ -30357,6 +30405,68 @@ function getEventSessionId(event) {
|
|
|
30357
30405
|
function trackedSequencedEventId(event) {
|
|
30358
30406
|
return `${getEventSessionId(event) ?? "unknown"}:${event.seq}`;
|
|
30359
30407
|
}
|
|
30408
|
+
function approvalInboxItemId(sessionId, turnId, blockId, version2) {
|
|
30409
|
+
return `approval:${sessionId}:${turnId}:${blockId}:v${version2}`;
|
|
30410
|
+
}
|
|
30411
|
+
function projectApprovalInboxItem(snapshot, turn, block) {
|
|
30412
|
+
const normalized = normalizeApprovalRequest(snapshot.session, turn.id, block);
|
|
30413
|
+
if (!normalized) {
|
|
30414
|
+
return null;
|
|
30415
|
+
}
|
|
30416
|
+
return {
|
|
30417
|
+
id: approvalInboxItemId(normalized.sessionId, normalized.turnId, normalized.blockId, normalized.version),
|
|
30418
|
+
kind: "approval",
|
|
30419
|
+
createdAt: turn.startedAt,
|
|
30420
|
+
sessionId: normalized.sessionId,
|
|
30421
|
+
sessionName: normalized.sessionName,
|
|
30422
|
+
adapterType: normalized.adapterType,
|
|
30423
|
+
turnId: normalized.turnId,
|
|
30424
|
+
blockId: normalized.blockId,
|
|
30425
|
+
version: normalized.version,
|
|
30426
|
+
risk: normalized.risk,
|
|
30427
|
+
title: normalized.title,
|
|
30428
|
+
description: normalized.description,
|
|
30429
|
+
detail: normalized.detail,
|
|
30430
|
+
actionKind: normalized.actionKind,
|
|
30431
|
+
actionStatus: normalized.actionStatus
|
|
30432
|
+
};
|
|
30433
|
+
}
|
|
30434
|
+
function lookupMobileInboxApprovalItem(bridge, sessionId, turnId, blockId) {
|
|
30435
|
+
const snapshot = bridge.getSessionSnapshot(sessionId);
|
|
30436
|
+
if (!snapshot) {
|
|
30437
|
+
return null;
|
|
30438
|
+
}
|
|
30439
|
+
const turn = snapshot.turns.find((candidate) => candidate.id === turnId);
|
|
30440
|
+
if (!turn) {
|
|
30441
|
+
return null;
|
|
30442
|
+
}
|
|
30443
|
+
const blockState = turn.blocks.find((candidate) => candidate.block.id === blockId);
|
|
30444
|
+
if (!blockState || blockState.block.type !== "action") {
|
|
30445
|
+
return null;
|
|
30446
|
+
}
|
|
30447
|
+
return projectApprovalInboxItem(snapshot, turn, blockState.block);
|
|
30448
|
+
}
|
|
30449
|
+
function queryMobileInboxItems(bridge) {
|
|
30450
|
+
const items = [];
|
|
30451
|
+
for (const session of bridge.getSessionSummaries()) {
|
|
30452
|
+
const snapshot = bridge.getSessionSnapshot(session.sessionId);
|
|
30453
|
+
if (!snapshot) {
|
|
30454
|
+
continue;
|
|
30455
|
+
}
|
|
30456
|
+
for (const turn of snapshot.turns) {
|
|
30457
|
+
for (const blockState of turn.blocks) {
|
|
30458
|
+
if (blockState.block.type !== "action") {
|
|
30459
|
+
continue;
|
|
30460
|
+
}
|
|
30461
|
+
const item = projectApprovalInboxItem(snapshot, turn, blockState.block);
|
|
30462
|
+
if (item) {
|
|
30463
|
+
items.push(item);
|
|
30464
|
+
}
|
|
30465
|
+
}
|
|
30466
|
+
}
|
|
30467
|
+
}
|
|
30468
|
+
return items.sort((left, right) => right.createdAt - left.createdAt || left.id.localeCompare(right.id));
|
|
30469
|
+
}
|
|
30360
30470
|
function toTRPCRegistryError(error48) {
|
|
30361
30471
|
if (!isSessionRegistryError(error48)) {
|
|
30362
30472
|
return null;
|
|
@@ -30431,6 +30541,9 @@ var sessionRouter = t.router({
|
|
|
30431
30541
|
})
|
|
30432
30542
|
});
|
|
30433
30543
|
var mobileRouter = t.router({
|
|
30544
|
+
inbox: procedure.query(({ ctx }) => ({
|
|
30545
|
+
items: queryMobileInboxItems(ctx.bridge)
|
|
30546
|
+
})),
|
|
30434
30547
|
home: procedure.input(exports_external.object({
|
|
30435
30548
|
workspaceLimit: exports_external.number().optional(),
|
|
30436
30549
|
agentLimit: exports_external.number().optional(),
|
|
@@ -35006,6 +35119,16 @@ function startBridgeServerTRPC(options) {
|
|
|
35006
35119
|
state.unsub = bridge.onEvent((sequenced) => {
|
|
35007
35120
|
logBridgeEvent(sequenced.event, sequenced.seq);
|
|
35008
35121
|
sendEvent(JSON.stringify({ seq: sequenced.seq, event: sequenced.event }));
|
|
35122
|
+
if (sequenced.event.event === "block:action:approval") {
|
|
35123
|
+
const item = lookupMobileInboxApprovalItem(bridge, sequenced.event.sessionId, sequenced.event.turnId, sequenced.event.blockId);
|
|
35124
|
+
if (item) {
|
|
35125
|
+
sendEvent(JSON.stringify({
|
|
35126
|
+
event: "operator:notify",
|
|
35127
|
+
tier: "interrupt",
|
|
35128
|
+
item
|
|
35129
|
+
}));
|
|
35130
|
+
}
|
|
35131
|
+
}
|
|
35009
35132
|
});
|
|
35010
35133
|
}
|
|
35011
35134
|
const server = Bun.serve({
|