mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
perf(session-history): answer Workspace and Project from their own sessions
Workspace and Project send scopeOnly. The scanner then skips listing and parsing cwd-bucket agents (Claude, Pi, CodeBuddy) outside the scope, keeps the recency pass for the other agents but returns only its in-scope rows, and checks name-matched Claude buckets file by file when their newest transcripts name no in-scope cwd. The tab move lookup and All keep the full scan.
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
"family": "aiVault.history",
|
||||
"namedDeltas": [],
|
||||
"values": {
|
||||
"2182656920b3": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"44a27dbf05e2": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 3,
|
||||
@@ -30,39 +35,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"7e8b2964ad63": {
|
||||
"name": "streams-registered-at-teardown",
|
||||
"ordinal": 8,
|
||||
"value": [
|
||||
{
|
||||
"cancelled": false,
|
||||
"method": "agentSession.subscribeStatus",
|
||||
"payload": "agentSession.subscribeStatus#1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"7f300f2af8fd": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"98ac9d409279": {
|
||||
"activeWorktreePath": "/repo/feature",
|
||||
"refreshing": false,
|
||||
"scope": "workspace",
|
||||
"screenState": {
|
||||
"issues": [],
|
||||
"kind": "ready",
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "pi",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"ad5b1230fc26": {
|
||||
"69310cf221d2": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
@@ -75,6 +48,7 @@
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
@@ -109,10 +83,81 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"b6a16cc83e18": {
|
||||
"7a3238411452": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"7bdbee10feca": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "pi",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"7e8b2964ad63": {
|
||||
"name": "streams-registered-at-teardown",
|
||||
"ordinal": 8,
|
||||
"value": [
|
||||
{
|
||||
"cancelled": false,
|
||||
"method": "agentSession.subscribeStatus",
|
||||
"payload": "agentSession.subscribeStatus#1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"98ac9d409279": {
|
||||
"activeWorktreePath": "/repo/feature",
|
||||
"refreshing": false,
|
||||
"scope": "workspace",
|
||||
"screenState": {
|
||||
"issues": [],
|
||||
"kind": "ready",
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "pi",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"daf52dc85a58": {
|
||||
"name": "status.get#1",
|
||||
@@ -160,49 +205,6 @@
|
||||
"value": {
|
||||
"$rpc": "undefined"
|
||||
}
|
||||
},
|
||||
"f562eb25b111": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "pi",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"recording": {
|
||||
@@ -211,8 +213,8 @@
|
||||
{
|
||||
"id": "ready",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "f562eb25b111"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18"],
|
||||
"sender": ["daf52dc85a58", "7bdbee10feca"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -223,8 +225,8 @@
|
||||
{
|
||||
"id": "associated",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "f562eb25b111", "ad5b1230fc26"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18", "7f300f2af8fd"],
|
||||
"sender": ["daf52dc85a58", "7bdbee10feca", "69310cf221d2"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3", "7a3238411452"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -235,8 +237,8 @@
|
||||
{
|
||||
"id": "cleanup",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "f562eb25b111", "ad5b1230fc26"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18", "7f300f2af8fd"],
|
||||
"sender": ["daf52dc85a58", "7bdbee10feca", "69310cf221d2"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3", "7a3238411452"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
|
||||
@@ -4,6 +4,55 @@
|
||||
"family": "aiVault.history",
|
||||
"namedDeltas": [],
|
||||
"values": {
|
||||
"03fd6edde488": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"2182656920b3": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"44a27dbf05e2": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 3,
|
||||
@@ -36,54 +85,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"b6a16cc83e18": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"cb5715e0f275": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"daf52dc85a58": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 2,
|
||||
@@ -138,8 +139,8 @@
|
||||
{
|
||||
"id": "ready",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -150,8 +151,8 @@
|
||||
{
|
||||
"id": "cleanup",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
|
||||
@@ -4,14 +4,9 @@
|
||||
"family": "aiVault.history",
|
||||
"namedDeltas": [],
|
||||
"values": {
|
||||
"33f381559396": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":true,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"3f412a6bee67": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 6,
|
||||
"03fd6edde488": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
@@ -20,8 +15,9 @@
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": true,
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
@@ -37,7 +33,7 @@
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-4",
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
@@ -45,13 +41,23 @@
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s2"
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"2182656920b3": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"422563aac194": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":true,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"44a27dbf05e2": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 3,
|
||||
@@ -84,14 +90,9 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"b6a16cc83e18": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"cb5715e0f275": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"c23f94d5e35f": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
@@ -100,8 +101,9 @@
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"force": true,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
@@ -117,7 +119,7 @@
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"id": "frame-4",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
@@ -125,7 +127,7 @@
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
"id": "s2"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -202,8 +204,8 @@
|
||||
{
|
||||
"id": "ready",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -214,8 +216,8 @@
|
||||
{
|
||||
"id": "refreshed",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275", "3f412a6bee67"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18", "33f381559396"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488", "c23f94d5e35f"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3", "422563aac194"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a",
|
||||
"refresh": "eb79a9b3682a"
|
||||
@@ -227,8 +229,8 @@
|
||||
{
|
||||
"id": "cleanup",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275", "3f412a6bee67"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18", "33f381559396"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488", "c23f94d5e35f"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3", "422563aac194"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a",
|
||||
"refresh": "eb79a9b3682a"
|
||||
|
||||
@@ -4,11 +4,94 @@
|
||||
"family": "aiVault.history",
|
||||
"namedDeltas": [],
|
||||
"values": {
|
||||
"03fd6edde488": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"2182656920b3": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"44a27dbf05e2": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 3,
|
||||
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
|
||||
},
|
||||
"74067e8858fa": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "pending",
|
||||
"startedAt": 31000
|
||||
}
|
||||
},
|
||||
"7a3238411452": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"7e8b2964ad63": {
|
||||
"name": "streams-registered-at-teardown",
|
||||
"ordinal": 8,
|
||||
@@ -20,11 +103,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"7f300f2af8fd": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"9aa0df31dc4d": {
|
||||
"activeWorktreePath": "/repo/feature",
|
||||
"refreshing": false,
|
||||
@@ -62,11 +140,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"b6a16cc83e18": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"c61a146bd377": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 31000,
|
||||
@@ -75,50 +148,7 @@
|
||||
"$rpc": "undefined"
|
||||
}
|
||||
},
|
||||
"cb5715e0f275": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"d3637311be53": {
|
||||
"c6add689704f": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
@@ -131,6 +161,7 @@
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
@@ -205,34 +236,6 @@
|
||||
"ordinal": 1,
|
||||
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"agentSession.subscribeStatus\",\"params\":{}}"
|
||||
},
|
||||
"e702c32cb3d5": {
|
||||
"name": "aiVault.listSessions#2",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "pending",
|
||||
"startedAt": 31000
|
||||
}
|
||||
},
|
||||
"eb79a9b3682a": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
@@ -248,8 +251,8 @@
|
||||
{
|
||||
"id": "ready",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -260,8 +263,8 @@
|
||||
{
|
||||
"id": "cached",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275", "e702c32cb3d5"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18", "7f300f2af8fd"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488", "74067e8858fa"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3", "7a3238411452"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a",
|
||||
"leave": "eb79a9b3682a",
|
||||
@@ -274,8 +277,8 @@
|
||||
{
|
||||
"id": "revalidated",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275", "d3637311be53"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18", "7f300f2af8fd"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488", "c6add689704f"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3", "7a3238411452"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a",
|
||||
"leave": "eb79a9b3682a",
|
||||
@@ -288,8 +291,8 @@
|
||||
{
|
||||
"id": "cleanup",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275", "d3637311be53"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18", "7f300f2af8fd"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488", "c6add689704f"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3", "7a3238411452"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a",
|
||||
"leave": "eb79a9b3682a",
|
||||
|
||||
@@ -4,6 +4,55 @@
|
||||
"family": "aiVault.history",
|
||||
"namedDeltas": [],
|
||||
"values": {
|
||||
"03fd6edde488": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"2182656920b3": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"44a27dbf05e2": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 3,
|
||||
@@ -36,54 +85,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"b6a16cc83e18": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"cb5715e0f275": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"daf52dc85a58": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 2,
|
||||
@@ -160,8 +161,8 @@
|
||||
{
|
||||
"id": "ready",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a",
|
||||
"worktrees-loaded": "eb79a9b3682a"
|
||||
@@ -173,8 +174,8 @@
|
||||
{
|
||||
"id": "cleanup",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a",
|
||||
"worktrees-loaded": "eb79a9b3682a"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"07299f73583f": {
|
||||
"27ef7c5c6263": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
@@ -43,6 +43,7 @@
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
@@ -58,11 +59,6 @@
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"595e6c3bbfed": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"7623e8b568b1": {
|
||||
"crash": {
|
||||
"$rpc": "null"
|
||||
@@ -95,42 +91,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"b7a7af14c8a5": {
|
||||
"crash": {
|
||||
"$rpc": "null"
|
||||
},
|
||||
"elements": {
|
||||
"ChevronLeft": 1,
|
||||
"Defs": 1,
|
||||
"LinearGradient": 1,
|
||||
"Pressable": 5,
|
||||
"Rect": 1,
|
||||
"RefreshCw": 1,
|
||||
"SafeAreaView": 1,
|
||||
"Search": 1,
|
||||
"SectionList": 1,
|
||||
"Stop": 2,
|
||||
"Svg": 1,
|
||||
"Text": 5,
|
||||
"TextInput": 1,
|
||||
"View": 14
|
||||
},
|
||||
"labels": [
|
||||
"Back",
|
||||
"Refresh agent sessions",
|
||||
"Workspace",
|
||||
"Project",
|
||||
"All",
|
||||
"Search sessions, repo:, path:"
|
||||
],
|
||||
"text": ["Agent Session History", "orca-history", "Workspace", "Project", "All"]
|
||||
},
|
||||
"d126597611a2": {
|
||||
"name": "worktree.ps#1",
|
||||
"ordinal": 3,
|
||||
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"supportsWorktreeVisibilitySourceDefaults\":true}}"
|
||||
},
|
||||
"df6890cb4985": {
|
||||
"a03eeea51ba8": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
@@ -143,6 +104,7 @@
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
@@ -194,6 +156,46 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"b7a7af14c8a5": {
|
||||
"crash": {
|
||||
"$rpc": "null"
|
||||
},
|
||||
"elements": {
|
||||
"ChevronLeft": 1,
|
||||
"Defs": 1,
|
||||
"LinearGradient": 1,
|
||||
"Pressable": 5,
|
||||
"Rect": 1,
|
||||
"RefreshCw": 1,
|
||||
"SafeAreaView": 1,
|
||||
"Search": 1,
|
||||
"SectionList": 1,
|
||||
"Stop": 2,
|
||||
"Svg": 1,
|
||||
"Text": 5,
|
||||
"TextInput": 1,
|
||||
"View": 14
|
||||
},
|
||||
"labels": [
|
||||
"Back",
|
||||
"Refresh agent sessions",
|
||||
"Workspace",
|
||||
"Project",
|
||||
"All",
|
||||
"Search sessions, repo:, path:"
|
||||
],
|
||||
"text": ["Agent Session History", "orca-history", "Workspace", "Project", "All"]
|
||||
},
|
||||
"d126597611a2": {
|
||||
"name": "worktree.ps#1",
|
||||
"ordinal": 3,
|
||||
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"supportsWorktreeVisibilitySourceDefaults\":true}}"
|
||||
},
|
||||
"dffc0668b556": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"e28c488ce6b2": {
|
||||
"name": "agentSession.subscribeStatus#1",
|
||||
"ordinal": 1,
|
||||
@@ -305,8 +307,8 @@
|
||||
{
|
||||
"id": "worktrees-listed",
|
||||
"observation": {
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "07299f73583f"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "595e6c3bbfed"],
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "27ef7c5c6263"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "dffc0668b556"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -317,8 +319,8 @@
|
||||
{
|
||||
"id": "ready",
|
||||
"observation": {
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "df6890cb4985"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "595e6c3bbfed"],
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "a03eeea51ba8"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "dffc0668b556"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -329,8 +331,8 @@
|
||||
{
|
||||
"id": "cleanup",
|
||||
"observation": {
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "df6890cb4985"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "595e6c3bbfed"],
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "a03eeea51ba8"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "dffc0668b556"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"07299f73583f": {
|
||||
"27ef7c5c6263": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
@@ -43,6 +43,7 @@
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
@@ -58,11 +59,6 @@
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"595e6c3bbfed": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"7623e8b568b1": {
|
||||
"crash": {
|
||||
"$rpc": "null"
|
||||
@@ -95,11 +91,51 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"a0b80301d553": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "rejected",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"error": {
|
||||
"category": "Error",
|
||||
"message": "Connection closed",
|
||||
"isRpcDeliveryUnknown": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"d126597611a2": {
|
||||
"name": "worktree.ps#1",
|
||||
"ordinal": 3,
|
||||
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"supportsWorktreeVisibilitySourceDefaults\":true}}"
|
||||
},
|
||||
"dffc0668b556": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"e28c488ce6b2": {
|
||||
"name": "agentSession.subscribeStatus#1",
|
||||
"ordinal": 1,
|
||||
@@ -191,40 +227,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"f13239f2c039": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "rejected",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"error": {
|
||||
"category": "Error",
|
||||
"message": "Connection closed",
|
||||
"isRpcDeliveryUnknown": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"recording": {
|
||||
@@ -245,8 +247,8 @@
|
||||
{
|
||||
"id": "worktrees-listed",
|
||||
"observation": {
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "07299f73583f"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "595e6c3bbfed"],
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "27ef7c5c6263"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "dffc0668b556"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -257,8 +259,8 @@
|
||||
{
|
||||
"id": "cleanup",
|
||||
"observation": {
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "f13239f2c039"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "595e6c3bbfed"],
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "a0b80301d553"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "dffc0668b556"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
|
||||
+509
-496
File diff suppressed because it is too large
Load Diff
@@ -30,34 +30,6 @@
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"07299f73583f": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "pending",
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"0cf3d278751b": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 4,
|
||||
@@ -192,6 +164,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"27ef7c5c6263": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "pending",
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"2ce0b0bdae00": {
|
||||
"name": "status.get#2",
|
||||
"ordinal": 6,
|
||||
@@ -259,11 +260,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"595e6c3bbfed": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"68435dd07fce": {
|
||||
"name": "status.get#2",
|
||||
"ordinal": 6,
|
||||
@@ -472,6 +468,41 @@
|
||||
"Retry"
|
||||
]
|
||||
},
|
||||
"a0b80301d553": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "rejected",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"error": {
|
||||
"category": "Error",
|
||||
"message": "Connection closed",
|
||||
"isRpcDeliveryUnknown": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"a24196eaf702": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 4,
|
||||
@@ -584,6 +615,11 @@
|
||||
"Update Orca on this host to browse agent session history."
|
||||
]
|
||||
},
|
||||
"dffc0668b556": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"e28c488ce6b2": {
|
||||
"name": "agentSession.subscribeStatus#1",
|
||||
"ordinal": 1,
|
||||
@@ -676,40 +712,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"f13239f2c039": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "rejected",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"error": {
|
||||
"category": "Error",
|
||||
"message": "Connection closed",
|
||||
"isRpcDeliveryUnknown": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"f975325adbf9": {
|
||||
"crash": {
|
||||
"$rpc": "null"
|
||||
@@ -800,8 +802,8 @@
|
||||
{
|
||||
"id": "aivault-history-screen-worktrees.normal:worktrees-listed",
|
||||
"observation": {
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "07299f73583f"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "595e6c3bbfed"],
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "27ef7c5c6263"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "dffc0668b556"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -812,8 +814,8 @@
|
||||
{
|
||||
"id": "aivault-history-screen-worktrees.normal:cleanup",
|
||||
"observation": {
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "f13239f2c039"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "595e6c3bbfed"],
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "a0b80301d553"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "dffc0668b556"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
|
||||
@@ -30,34 +30,6 @@
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"07299f73583f": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "pending",
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"111e9a5009ba": {
|
||||
"name": "streams-registered-at-teardown",
|
||||
"ordinal": 4,
|
||||
@@ -103,6 +75,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"27ef7c5c6263": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "pending",
|
||||
"startedAt": 0
|
||||
}
|
||||
},
|
||||
"519ce9879c6f": {
|
||||
"name": "worktree.ps#1",
|
||||
"ordinal": 2,
|
||||
@@ -138,11 +139,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"595e6c3bbfed": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"5a2900554f7f": {
|
||||
"name": "worktree.ps#1",
|
||||
"ordinal": 2,
|
||||
@@ -351,6 +347,41 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"a0b80301d553": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "rejected",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"error": {
|
||||
"category": "Error",
|
||||
"message": "Connection closed",
|
||||
"isRpcDeliveryUnknown": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"bdd2f2097a96": {
|
||||
"name": "worktree.ps#1",
|
||||
"ordinal": 2,
|
||||
@@ -455,6 +486,11 @@
|
||||
"ordinal": 3,
|
||||
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"supportsWorktreeVisibilitySourceDefaults\":true}}"
|
||||
},
|
||||
"dffc0668b556": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 7,
|
||||
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"e28c488ce6b2": {
|
||||
"name": "agentSession.subscribeStatus#1",
|
||||
"ordinal": 1,
|
||||
@@ -579,40 +615,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"f13239f2c039": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "rejected",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"error": {
|
||||
"category": "Error",
|
||||
"message": "Connection closed",
|
||||
"isRpcDeliveryUnknown": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"fe3fd26f3355": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 6,
|
||||
@@ -707,8 +709,8 @@
|
||||
{
|
||||
"id": "aivault-history-screen-worktrees.normal:worktrees-listed",
|
||||
"observation": {
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "07299f73583f"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "595e6c3bbfed"],
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "27ef7c5c6263"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "dffc0668b556"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -719,8 +721,8 @@
|
||||
{
|
||||
"id": "aivault-history-screen-worktrees.normal:cleanup",
|
||||
"observation": {
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "f13239f2c039"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "595e6c3bbfed"],
|
||||
"sender": ["ebc8d9683b5e", "e881d7dabb25", "a0b80301d553"],
|
||||
"payloads": ["e28c488ce6b2", "d126597611a2", "7c48e0564605", "dffc0668b556"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
|
||||
@@ -4,6 +4,50 @@
|
||||
"family": "aiVault.history",
|
||||
"namedDeltas": [],
|
||||
"values": {
|
||||
"03fd6edde488": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0753498763d5": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 2,
|
||||
@@ -58,6 +102,11 @@
|
||||
"kind": "unsupported"
|
||||
}
|
||||
},
|
||||
"2182656920b3": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"],\"scopeOnly\":true}}"
|
||||
},
|
||||
"2289d07f6bea": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 2,
|
||||
@@ -316,11 +365,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"b6a16cc83e18": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 5,
|
||||
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"aiVault.listSessions\",\"params\":{\"limit\":500,\"force\":false,\"scopePaths\":[\"/repo/feature\"]}}"
|
||||
},
|
||||
"b838b12acde6": {
|
||||
"activeWorktreePath": "/repo/feature",
|
||||
"refreshing": false,
|
||||
@@ -374,49 +418,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"cb5715e0f275": {
|
||||
"name": "aiVault.listSessions#1",
|
||||
"ordinal": 4,
|
||||
"args": [
|
||||
{
|
||||
"name": "method",
|
||||
"value": "aiVault.listSessions"
|
||||
},
|
||||
{
|
||||
"name": "params",
|
||||
"value": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": {
|
||||
"failWhenDisconnected": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"settlement": {
|
||||
"status": "fulfilled",
|
||||
"startedAt": 0,
|
||||
"settledAt": 0,
|
||||
"value": {
|
||||
"id": "frame-3",
|
||||
"ok": true,
|
||||
"result": {
|
||||
"issues": [],
|
||||
"sessions": [
|
||||
{
|
||||
"agent": "claude",
|
||||
"cwd": "/repo/feature",
|
||||
"id": "s1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"d0831ff38203": {
|
||||
"name": "status.get#1",
|
||||
"ordinal": 2,
|
||||
@@ -604,8 +605,8 @@
|
||||
{
|
||||
"id": "aivault-history-scan-fulfilled.normal:ready",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
@@ -616,8 +617,8 @@
|
||||
{
|
||||
"id": "aivault-history-scan-fulfilled.normal:cleanup",
|
||||
"observation": {
|
||||
"sender": ["daf52dc85a58", "cb5715e0f275"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "b6a16cc83e18"],
|
||||
"sender": ["daf52dc85a58", "03fd6edde488"],
|
||||
"payloads": ["e28c488ce6b2", "44a27dbf05e2", "2182656920b3"],
|
||||
"settlements": {
|
||||
"mount": "eb79a9b3682a"
|
||||
},
|
||||
|
||||
@@ -15597,6 +15597,7 @@
|
||||
"params": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
},
|
||||
"reply": {
|
||||
@@ -15684,6 +15685,7 @@
|
||||
"params": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
},
|
||||
"reply": {
|
||||
@@ -15733,6 +15735,7 @@
|
||||
"params": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
},
|
||||
"reply": {
|
||||
@@ -15771,6 +15774,7 @@
|
||||
"params": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
},
|
||||
"reply": {
|
||||
@@ -15825,6 +15829,7 @@
|
||||
"params": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
},
|
||||
"reply": {
|
||||
@@ -15853,6 +15858,7 @@
|
||||
"params": {
|
||||
"force": true,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
},
|
||||
"reply": {
|
||||
@@ -15902,6 +15908,7 @@
|
||||
"params": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
},
|
||||
"reply": {
|
||||
@@ -15952,6 +15959,7 @@
|
||||
"params": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
},
|
||||
"reply": {
|
||||
@@ -21336,6 +21344,7 @@
|
||||
"params": {
|
||||
"force": false,
|
||||
"limit": 500,
|
||||
"scopeOnly": true,
|
||||
"scopePaths": ["/repo/feature"]
|
||||
},
|
||||
"reply": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
deriveMobileAiVaultScopePaths,
|
||||
mobileAiVaultScanScopePaths
|
||||
mobileAiVaultScanScopeArgs
|
||||
} from './agent-history-scope-paths'
|
||||
|
||||
const worktree = (worktreeId: string, path: string) => ({ worktreeId, path, repoId: 'repo-1' })
|
||||
@@ -14,11 +14,13 @@ describe('mobile AI Vault scope paths', () => {
|
||||
|
||||
it('caps only the scan hints, so an older host accepts them and Project still shows every sibling', () => {
|
||||
const scopePaths = deriveMobileAiVaultScopePaths('project', active, [active, ...siblings])
|
||||
const scanPaths = mobileAiVaultScanScopePaths(scopePaths)
|
||||
const scan = mobileAiVaultScanScopeArgs('project', scopePaths)
|
||||
|
||||
expect(scopePaths).toHaveLength(201)
|
||||
expect(scanPaths).toHaveLength(64)
|
||||
expect(scan.scopePaths).toHaveLength(64)
|
||||
// Active worktree is seeded first, so it survives truncation.
|
||||
expect(scanPaths[0]).toBe('/Users/ada/repo/app')
|
||||
expect(scan.scopePaths?.[0]).toBe('/Users/ada/repo/app')
|
||||
// A capped scope can't answer alone, so the host keeps its recency scan.
|
||||
expect(scan.scopeOnly).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { deriveAiVaultScopeSessionPaths } from '../../../src/shared/ai-vault/scanning/ai-vault-scope-paths'
|
||||
import {
|
||||
AI_VAULT_SCOPE_PATHS_MAX_COUNT,
|
||||
boundedAiVaultScopeArgs,
|
||||
type AiVaultListArgs,
|
||||
type AiVaultScope
|
||||
} from '../../../src/shared/ai-vault/contracts/ai-vault-types'
|
||||
import type { Worktree } from '../worktree/workspace-list-types'
|
||||
@@ -23,9 +24,12 @@ export function deriveMobileAiVaultScopePaths(
|
||||
)
|
||||
}
|
||||
|
||||
/** The scan hints sent to the host; older hosts reject oversized scopePaths, and hints only widen discovery. */
|
||||
export function mobileAiVaultScanScopePaths(scopePaths: readonly string[]): string[] {
|
||||
return scopePaths.slice(0, AI_VAULT_SCOPE_PATHS_MAX_COUNT)
|
||||
/** The scope sent to the host: capped because older hosts reject oversized scopePaths; All keeps the recency scan. */
|
||||
export function mobileAiVaultScanScopeArgs(
|
||||
scope: AiVaultScope,
|
||||
scopePaths: readonly string[]
|
||||
): Pick<AiVaultListArgs, 'scopePaths' | 'scopeOnly'> {
|
||||
return boundedAiVaultScopeArgs(scopePaths, scope !== 'all')
|
||||
}
|
||||
|
||||
function toScopePathWorktree(worktree: ScopeWorktree) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import { defineHostQuery, readHostQueryLive, useHostQuery } from '../query/host-
|
||||
import { hostScreenState } from '../query/host-query-screen-state'
|
||||
import {
|
||||
deriveMobileAiVaultScopePaths,
|
||||
mobileAiVaultScanScopePaths
|
||||
mobileAiVaultScanScopeArgs
|
||||
} from './agent-history-scope-paths'
|
||||
import {
|
||||
agentHistoryCapabilityRead,
|
||||
@@ -65,6 +65,7 @@ type ScanScope = { scopeFilterPaths: string[]; activeWorktreePath: string | null
|
||||
|
||||
async function readAgentHistory(
|
||||
client: RpcClient,
|
||||
scope: AiVaultScope,
|
||||
scan: ScanScope,
|
||||
force: boolean,
|
||||
associationRevision: number
|
||||
@@ -81,7 +82,8 @@ async function readAgentHistory(
|
||||
const reply = await agentHistorySessionScan.request(client, {
|
||||
limit: MOBILE_AI_VAULT_SESSION_LIMIT,
|
||||
force,
|
||||
scopePaths: mobileAiVaultScanScopePaths(scan.scopeFilterPaths)
|
||||
// From the query's own scope key, so rows cached under Workspace are always Workspace-only ones.
|
||||
...mobileAiVaultScanScopeArgs(scope, scan.scopeFilterPaths)
|
||||
})
|
||||
const result = interpretOrThrowRefusalMessage(
|
||||
() => agentHistorySessionScan.interpret(reply),
|
||||
@@ -111,7 +113,7 @@ function agentHistoryQuery(
|
||||
// No desktop signal for new transcripts, so foreground revalidates once older than 30 s.
|
||||
refetchOnWindowFocus: true,
|
||||
fetch: (client, _target, input: { scope: AiVaultScope }) =>
|
||||
readAgentHistory(client, scan, force, startRevision(input.scope))
|
||||
readAgentHistory(client, input.scope, scan, force, startRevision(input.scope))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,9 @@ function runtimeScanArgs(
|
||||
if (listArgs?.scopePaths !== undefined) {
|
||||
scanArgs.scopePaths = listArgs.scopePaths
|
||||
}
|
||||
if (listArgs?.scopeOnly === true) {
|
||||
scanArgs.scopeOnly = true
|
||||
}
|
||||
if (listArgs?.includeAntigravityIdeSessions === true) {
|
||||
scanArgs.includeAntigravityIdeSessions = true
|
||||
}
|
||||
|
||||
@@ -180,6 +180,7 @@ export async function listAiVaultSessions(
|
||||
limit: args?.limit,
|
||||
unlimited: args?.unlimited,
|
||||
scopePaths: args?.scopePaths ? scope.scanScopePaths : undefined,
|
||||
scopeOnly: args?.scopeOnly,
|
||||
...roots
|
||||
},
|
||||
scanSignal,
|
||||
|
||||
@@ -4,6 +4,7 @@ import { z } from 'zod'
|
||||
import {
|
||||
AI_VAULT_AGENTS,
|
||||
AI_VAULT_SCOPE_PATHS_MAX_COUNT,
|
||||
boundedAiVaultScopeArgs,
|
||||
type AiVaultListArgs,
|
||||
type AiVaultListResult,
|
||||
type AiVaultSession
|
||||
@@ -87,7 +88,7 @@ export async function scanRuntimeAiVaultSessions(
|
||||
force: args.force,
|
||||
...(args.afterFingerprint !== undefined ? { afterFingerprint: args.afterFingerprint } : {}),
|
||||
// Cap paths for older hosts too; omitted scope paths lose deep-history coverage, not recent sessions.
|
||||
scopePaths: args.scopePaths?.slice(0, AI_VAULT_SCOPE_PATHS_MAX_COUNT),
|
||||
...boundedAiVaultScopeArgs(args.scopePaths, args.scopeOnly),
|
||||
executionHostId
|
||||
},
|
||||
options.timeoutMs
|
||||
|
||||
@@ -15,6 +15,7 @@ import type { FileWithMtime } from './session-scanner-types'
|
||||
import { extractString, parseJsonObject } from './session-scanner-values'
|
||||
import { scanIssueTextFromError } from './session-scan-issues'
|
||||
import { isMissingTranscriptPathError } from './session-scanner-discovery'
|
||||
import { noteAiVaultScanFileFound } from './ai-vault-scan-progress'
|
||||
|
||||
// Limit representative probing when a bucket contains transcripts without cwd records.
|
||||
const REPRESENTATIVE_CWD_LINE_LIMIT = 200
|
||||
@@ -233,6 +234,12 @@ export async function collectBucketFiles(args: {
|
||||
}
|
||||
const fileStat = await wslGatedStat(path, 'scan', args.signal)
|
||||
throwIfAiVaultScanCancelled(args.signal)
|
||||
// Scope-only scans don't list cwd-bucket agents recursively, so their file count comes from here.
|
||||
noteAiVaultScanFileFound(args.signal, args.agent, {
|
||||
path,
|
||||
dev: fileStat.dev,
|
||||
ino: fileStat.ino
|
||||
})
|
||||
addBoundedFile(args.collected, args.limit, {
|
||||
path,
|
||||
mtimeMs: fileStat.mtimeMs,
|
||||
|
||||
@@ -20,7 +20,10 @@ import {
|
||||
const TRANSCRIPT_EXTENSIONS = new Set(['.jsonl'])
|
||||
export type CwdBucketInventory = {
|
||||
layout: CwdBucketLayout
|
||||
directories: string[][]
|
||||
// With no recency pass behind it, a file whose first lines name no cwd is kept for the parse to place.
|
||||
scopeOnly: boolean
|
||||
// checkFiles: the bucket's newest transcripts named no in-scope cwd, so each file is checked on its own.
|
||||
directories: { paths: string[]; checkFiles: boolean }[]
|
||||
issues: { before: number; issue: AiVaultScanIssue }[]
|
||||
}
|
||||
|
||||
@@ -37,6 +40,7 @@ type InScopeDiscoveryArgs = {
|
||||
limit: number
|
||||
excludedFilePaths: ReadonlySet<string>
|
||||
issues: AiVaultScanIssue[]
|
||||
scopeOnly?: boolean
|
||||
signal?: AbortSignal
|
||||
}
|
||||
|
||||
@@ -54,7 +58,12 @@ export async function inventoryCwdBucketFiles(
|
||||
args: Omit<InScopeDiscoveryArgs, 'excludedFilePaths' | 'issues'>,
|
||||
issueLimit = SCAN_ISSUE_LIMIT
|
||||
): Promise<CwdBucketInventory> {
|
||||
const inventory: CwdBucketInventory = { layout, directories: [], issues: [] }
|
||||
const inventory: CwdBucketInventory = {
|
||||
layout,
|
||||
scopeOnly: args.scopeOnly === true,
|
||||
directories: [],
|
||||
issues: []
|
||||
}
|
||||
if (args.scopePaths.length === 0 || args.limit <= 0) {
|
||||
return inventory
|
||||
}
|
||||
@@ -82,10 +91,16 @@ export async function inventoryCwdBucketFiles(
|
||||
)
|
||||
for (const directory of directories) {
|
||||
await yieldScanInventory(index++, args.signal)
|
||||
let checkFiles = false
|
||||
if (layout.agent === 'claude') {
|
||||
const cwd = await cachedProjectDirCwd(directory, record, layout.agent, args.signal)
|
||||
// Scope-only has no recency pass behind it, so a name-matched bucket whose newest transcripts
|
||||
// name no cwd, or another folder sharing the lossy name, is checked file by file instead.
|
||||
if (!inScope(cwd, directory)) {
|
||||
continue
|
||||
if (!args.scopeOnly) {
|
||||
continue
|
||||
}
|
||||
checkFiles = true
|
||||
}
|
||||
}
|
||||
const paths: string[] = []
|
||||
@@ -101,7 +116,7 @@ export async function inventoryCwdBucketFiles(
|
||||
throwIfAiVaultScanCancelled(args.signal)
|
||||
recordRefusal(record, directory, err, layout.agent)
|
||||
}
|
||||
inventory.directories.push(paths)
|
||||
inventory.directories.push({ paths, checkFiles })
|
||||
}
|
||||
} finally {
|
||||
close()
|
||||
@@ -128,14 +143,20 @@ export async function selectCwdBucketFiles(
|
||||
while (inventory.issues[issueIndex]?.before === index) {
|
||||
record(inventory.issues[issueIndex++].issue)
|
||||
}
|
||||
const paths = inventory.directories[index]
|
||||
if (!paths) {
|
||||
const directory = inventory.directories[index]
|
||||
if (!directory) {
|
||||
break
|
||||
}
|
||||
await collectBucketFiles({
|
||||
paths,
|
||||
paths: directory.paths,
|
||||
agent: layout.agent,
|
||||
inScope: layout.agent !== 'claude' ? inScope : undefined,
|
||||
// Parsers keep a transcript's first recorded cwd, which is what this reads.
|
||||
inScope:
|
||||
layout.agent === 'claude' && !directory.checkFiles
|
||||
? undefined
|
||||
: inventory.scopeOnly
|
||||
? (cwd, path) => cwd === null || inScope(cwd, path)
|
||||
: inScope,
|
||||
issues: record,
|
||||
collected,
|
||||
limit: args.limit,
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
import { mkdtemp, mkdir, rm, utimes, writeFile } from 'node:fs/promises'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { join } from 'node:path'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import { scanAiVaultSessions } from './session-scanner'
|
||||
import { isolatedScanRoots } from './session-scanner-test-fixtures'
|
||||
import {
|
||||
aiVaultSessionInScope,
|
||||
createAiVaultScopeCwdMatcher
|
||||
} from '../../shared/ai-vault/scanning/ai-vault-scope-cwd-match'
|
||||
|
||||
let tempRoots: string[] = []
|
||||
|
||||
afterEach(async () => {
|
||||
await Promise.all(tempRoots.map((root) => rm(root, { recursive: true, force: true })))
|
||||
tempRoots = []
|
||||
})
|
||||
|
||||
async function writeClaudeSession(args: {
|
||||
claudeRoot: string
|
||||
dirName: string
|
||||
sessionId: string
|
||||
cwd: string
|
||||
iso: string
|
||||
// Records before the first cwd, like a long run of snapshot or summary lines.
|
||||
cwdlessLines?: number
|
||||
}): Promise<void> {
|
||||
const dir = join(args.claudeRoot, args.dirName)
|
||||
await mkdir(dir, { recursive: true })
|
||||
const records: unknown[] = Array.from({ length: args.cwdlessLines ?? 0 }, () => ({
|
||||
type: 'file-history-snapshot',
|
||||
sessionId: args.sessionId
|
||||
}))
|
||||
records.push({
|
||||
type: 'user',
|
||||
sessionId: args.sessionId,
|
||||
timestamp: args.iso,
|
||||
cwd: args.cwd,
|
||||
message: { role: 'user', content: `work in ${args.cwd}` }
|
||||
})
|
||||
const filePath = join(dir, `${args.sessionId}.jsonl`)
|
||||
await writeFile(filePath, records.map((record) => JSON.stringify(record)).join('\n'))
|
||||
const time = new Date(args.iso)
|
||||
await utimes(filePath, time, time)
|
||||
}
|
||||
|
||||
// What main's Workspace tab shows: the full scan, filtered to the scope as the renderer does.
|
||||
async function workspaceSessionIds(
|
||||
root: string,
|
||||
scopePaths: string[],
|
||||
options: { scopeOnly?: boolean; limit?: number }
|
||||
): Promise<string[]> {
|
||||
const result = await scanAiVaultSessions({
|
||||
...isolatedScanRoots(root),
|
||||
platform: 'darwin',
|
||||
scopePaths,
|
||||
...options
|
||||
})
|
||||
const inScope = createAiVaultScopeCwdMatcher(scopePaths)
|
||||
return result.sessions
|
||||
.filter((session) => aiVaultSessionInScope(inScope, session))
|
||||
.map((session) => session.sessionId)
|
||||
.sort()
|
||||
}
|
||||
|
||||
async function tempRoot(): Promise<string> {
|
||||
const root = await mkdtemp(join(tmpdir(), 'orca-ai-vault-scope-only-'))
|
||||
tempRoots.push(root)
|
||||
return root
|
||||
}
|
||||
|
||||
describe('scanAiVaultSessions scopeOnly', () => {
|
||||
it('keeps recent sessions whose bucket or first lines name no in-scope cwd', async () => {
|
||||
const root = await tempRoot()
|
||||
const claudeRoot = isolatedScanRoots(root).claudeProjectsDir
|
||||
// The bucket's only transcript records its cwd after the 200 lines the bucket probe reads.
|
||||
await writeClaudeSession({
|
||||
claudeRoot,
|
||||
dirName: '-repo-app',
|
||||
sessionId: 'late-cwd',
|
||||
cwd: '/repo/app',
|
||||
iso: '2026-06-01T00:00:00.000Z',
|
||||
cwdlessLines: 250
|
||||
})
|
||||
// `/repo/my-app` and `/repo/my/app` share one bucket name; the newest transcript is the other folder's.
|
||||
await writeClaudeSession({
|
||||
claudeRoot,
|
||||
dirName: '-repo-my-app',
|
||||
sessionId: 'shared-bucket',
|
||||
cwd: '/repo/my/app',
|
||||
iso: '2026-06-02T00:00:00.000Z'
|
||||
})
|
||||
await writeClaudeSession({
|
||||
claudeRoot,
|
||||
dirName: '-repo-my-app',
|
||||
sessionId: 'other-folder',
|
||||
cwd: '/repo/my-app',
|
||||
iso: '2026-06-03T00:00:00.000Z'
|
||||
})
|
||||
// CodeBuddy's transcripts are checked one by one; this one also records its cwd late.
|
||||
const codebuddyDir = join(isolatedScanRoots(root).codebuddyProjectsDir, 'repo-app')
|
||||
await mkdir(codebuddyDir, { recursive: true })
|
||||
await writeFile(
|
||||
join(codebuddyDir, 'codebuddy-late-cwd.jsonl'),
|
||||
[
|
||||
...Array.from({ length: 250 }, () => ({ type: 'file-history-snapshot' })),
|
||||
{
|
||||
type: 'message',
|
||||
timestamp: '2026-06-04T00:00:00.000Z',
|
||||
sessionId: 'codebuddy-late-cwd',
|
||||
cwd: '/repo/app',
|
||||
role: 'user',
|
||||
content: [{ type: 'input_text', text: 'work in /repo/app' }]
|
||||
}
|
||||
]
|
||||
.map((record) => JSON.stringify(record))
|
||||
.join('\n')
|
||||
)
|
||||
const scopePaths = ['/repo/app', '/repo/my/app']
|
||||
|
||||
const main = await workspaceSessionIds(root, scopePaths, {})
|
||||
expect(main).toEqual(['codebuddy-late-cwd', 'late-cwd', 'shared-bucket'])
|
||||
await expect(workspaceSessionIds(root, scopePaths, { scopeOnly: true })).resolves.toEqual(main)
|
||||
})
|
||||
|
||||
it('keeps every in-scope session main shows when the scope holds more than the limit', async () => {
|
||||
const root = await tempRoot()
|
||||
const claudeRoot = isolatedScanRoots(root).claudeProjectsDir
|
||||
for (let index = 0; index < 4; index++) {
|
||||
await writeClaudeSession({
|
||||
claudeRoot,
|
||||
dirName: '-repo-app',
|
||||
sessionId: `in-scope-${index}`,
|
||||
cwd: '/repo/app',
|
||||
iso: `2026-06-0${index + 1}T00:00:00.000Z`
|
||||
})
|
||||
}
|
||||
|
||||
// Main shows the recency pass's 2 plus the scope pass's 2 more.
|
||||
const main = await workspaceSessionIds(root, ['/repo/app'], { limit: 2 })
|
||||
expect(main).toHaveLength(4)
|
||||
await expect(
|
||||
workspaceSessionIds(root, ['/repo/app'], { limit: 2, scopeOnly: true })
|
||||
).resolves.toEqual(main)
|
||||
})
|
||||
|
||||
it('returns only in-scope rows', async () => {
|
||||
const root = await tempRoot()
|
||||
const claudeRoot = isolatedScanRoots(root).claudeProjectsDir
|
||||
await writeClaudeSession({
|
||||
claudeRoot,
|
||||
dirName: '-repo-app',
|
||||
sessionId: 'in-scope',
|
||||
cwd: '/repo/app',
|
||||
iso: '2026-06-01T00:00:00.000Z'
|
||||
})
|
||||
await writeClaudeSession({
|
||||
claudeRoot,
|
||||
dirName: '-elsewhere',
|
||||
sessionId: 'elsewhere',
|
||||
cwd: '/elsewhere',
|
||||
iso: '2026-06-02T00:00:00.000Z'
|
||||
})
|
||||
|
||||
const result = await scanAiVaultSessions({
|
||||
...isolatedScanRoots(root),
|
||||
platform: 'darwin',
|
||||
scopePaths: ['/repo/app'],
|
||||
scopeOnly: true
|
||||
})
|
||||
|
||||
expect(result.sessions.map((session) => session.sessionId)).toEqual(['in-scope'])
|
||||
})
|
||||
})
|
||||
@@ -33,7 +33,11 @@ import type {
|
||||
SessionFileCandidate,
|
||||
SessionFileDiscovery
|
||||
} from './session-scanner-types'
|
||||
import { AI_VAULT_SCOPE_CWD_SOURCES, scopeWalksAgentFiles } from './session-scope-cwd'
|
||||
import {
|
||||
AI_VAULT_SCOPE_CWD_SOURCES,
|
||||
scopeOnlyScan,
|
||||
scopeWalksAgentFiles
|
||||
} from './session-scope-cwd'
|
||||
import { sidecarUnchanged } from './parse-cache/session-sidecar-stat'
|
||||
import { prioritizeAntigravityTranscriptCandidates } from './scanners/antigravity/antigravity-transcript-candidates'
|
||||
|
||||
@@ -61,7 +65,8 @@ export async function scanInScopeSessions(args: ScopeScanArgs): Promise<AiVaultS
|
||||
for (const inventory of args.inventory) {
|
||||
const files = await selectCwdBucketFiles(inventory, {
|
||||
scopePaths,
|
||||
limit: args.limit,
|
||||
// Without the recency pass, cover what it and this pass show together: its kept rows plus `limit` more.
|
||||
limit: scopeOnlyScan(args.options) ? args.limit * 2 : args.limit,
|
||||
excludedFilePaths: args.alreadyParsedFilePaths,
|
||||
issues: args.issues,
|
||||
signal: args.options.signal
|
||||
@@ -213,6 +218,7 @@ export async function prepareScopeScan(
|
||||
.map((discovery) => discovery.rootDir),
|
||||
scopePaths,
|
||||
limit: args.limit,
|
||||
scopeOnly: scopeOnlyScan(args.options),
|
||||
signal: args.options.signal
|
||||
},
|
||||
issueLimit
|
||||
@@ -220,7 +226,7 @@ export async function prepareScopeScan(
|
||||
issueLimit -= inventory.issues.length
|
||||
inventories.push(inventory)
|
||||
if (workload) {
|
||||
for (const paths of inventory.directories) {
|
||||
for (const { paths } of inventory.directories) {
|
||||
for (const path of paths) {
|
||||
await yieldScanInventory(index++, args.options.signal)
|
||||
workload.registerPath(source.layout.agent, path, 'bucket')
|
||||
|
||||
@@ -7,7 +7,7 @@ import { antigravityDiscoveries } from './scanners/antigravity/session-scanner-a
|
||||
import { AI_VAULT_AGENT_SOURCES, type AiVaultAgentSource } from './session-scanner-agent-sources'
|
||||
import { normalizedWslHomeDirs } from './session-scanner-roots'
|
||||
import { configureOpenCodeWslReaders } from './scanners/opencode/reader-transport/session-scanner-opencode-wsl-client'
|
||||
import { scopeWalksAgentFiles } from './session-scope-cwd'
|
||||
import { scopeOnlyScan, scopeWalksAgentFiles } from './session-scope-cwd'
|
||||
import type { AiVaultScanOptions, SessionFileDiscovery } from './session-scanner-types'
|
||||
|
||||
export { DEFAULT_CODEX_HOME_DIR } from './session-scanner-agent-sources'
|
||||
@@ -51,6 +51,10 @@ function agentDiscoveries(
|
||||
issues: AiVaultScanIssue[]
|
||||
): Promise<SessionFileDiscovery>[] {
|
||||
const rootDirs = source.rootDirs(options, wslHomeDirs)
|
||||
// Scope-only scans read cwd-bucket agents through their bucket inventory and can't place cwd-less ones.
|
||||
if (scopeOnlyScan(options) && !scopeWalksAgentFiles(agent, options.scopePaths)) {
|
||||
return rootDirs.map(async (rootDir) => ({ agent, rootDir, files: [] }))
|
||||
}
|
||||
const discover = (rootDir: string): Promise<SessionFileDiscovery> =>
|
||||
discoverFiles({
|
||||
rootDir,
|
||||
|
||||
@@ -59,6 +59,8 @@ export type AiVaultScanOptions = {
|
||||
limitPerAgent?: number
|
||||
// Include sessions for these workspace paths beyond the recency cap (AI_VAULT_SCOPE_CWD_SOURCES).
|
||||
scopePaths?: readonly string[]
|
||||
// Return only scopePaths sessions, skipping the global recency pass (Workspace and Project).
|
||||
scopeOnly?: boolean
|
||||
platform?: NodeJS.Platform
|
||||
executionHostId?: ExecutionHostId
|
||||
signal?: AbortSignal
|
||||
|
||||
@@ -26,6 +26,11 @@ import {
|
||||
} from './scanners/cursor/session-scanner-cursor-chat-meta'
|
||||
import type { AiVaultScanOptions } from './session-scanner-types'
|
||||
import { clampPositiveInteger } from './session-scanner-values'
|
||||
import { scopeOnlyScan } from './session-scope-cwd'
|
||||
import {
|
||||
aiVaultSessionInScope,
|
||||
createAiVaultScopeCwdMatcher
|
||||
} from '../../shared/ai-vault/scanning/ai-vault-scope-cwd-match'
|
||||
import { throwIfAiVaultScanCancelled } from './ai-vault-scan-cancellation'
|
||||
import { DEFAULT_AI_VAULT_SCAN_LIMIT } from '../../shared/ai-vault/scanning/ai-vault-session-depth'
|
||||
import { withDevinSessionsDbScan } from './scanners/devin/session-scanner-devin-db'
|
||||
@@ -33,7 +38,7 @@ import { withOpenCodeSqliteScanScope } from './scanners/opencode/sqlite/session-
|
||||
|
||||
const SESSION_PARSE_CANDIDATE_MULTIPLIER = 2
|
||||
|
||||
/** Return recency-capped sessions plus recovered in-scope sessions, deduplicated and sorted. */
|
||||
/** Return recency-capped sessions plus recovered in-scope sessions (only those for scopeOnly), deduplicated and sorted. */
|
||||
export async function scanAiVaultSessions(
|
||||
options: AiVaultScanOptions = {}
|
||||
): Promise<AiVaultListResult> {
|
||||
@@ -92,16 +97,21 @@ async function scanAiVaultSessionStores(options: AiVaultScanOptions): Promise<Ai
|
||||
settled: (candidate, parsed) => workload?.settle(candidate, 'global', parsed)
|
||||
})
|
||||
|
||||
const cappedSessions = dedupeScannedSessions(parsedSessions)
|
||||
const recentSessions = dedupeScannedSessions(parsedSessions)
|
||||
.sort((left, right) => sessionSortTime(right) - sessionSortTime(left))
|
||||
.slice(0, limit)
|
||||
// Scope-only keeps the recency pass for agents without cwd buckets, but returns only its in-scope rows.
|
||||
const inScope = createAiVaultScopeCwdMatcher(options.scopePaths ?? [])
|
||||
const cappedSessions = scopeOnlyScan(options)
|
||||
? recentSessions.filter((session) => aiVaultSessionInScope(inScope, session))
|
||||
: recentSessions
|
||||
|
||||
const scopeSessions = await scanInScopeSessions({
|
||||
inventory,
|
||||
discoveries,
|
||||
options,
|
||||
limit,
|
||||
alreadyParsedFilePaths: new Set(cappedSessions.map((session) => session.filePath)),
|
||||
alreadyParsedFilePaths: new Set(recentSessions.map((session) => session.filePath)),
|
||||
platform,
|
||||
executionHostId,
|
||||
issues,
|
||||
|
||||
@@ -6,7 +6,11 @@ import {
|
||||
PI_CWD_BUCKET_LAYOUT,
|
||||
type CwdBucketLayout
|
||||
} from './session-cwd-bucket-layouts'
|
||||
import type { FileWithMtime, SessionFileCandidate } from './session-scanner-types'
|
||||
import type {
|
||||
AiVaultScanOptions,
|
||||
FileWithMtime,
|
||||
SessionFileCandidate
|
||||
} from './session-scanner-types'
|
||||
import { asRecord } from './session-scanner-record-value'
|
||||
import { extractString, parseJsonObject } from './session-scanner-values'
|
||||
import { clineManifestCwd } from './scanners/cline/session-scanner-cline-parser'
|
||||
@@ -146,6 +150,13 @@ export const AI_VAULT_SCOPE_CWD_SOURCES: Record<AiVaultAgent, SessionScopeCwdSou
|
||||
jcode: PARSE
|
||||
}
|
||||
|
||||
/** Answer from scope sources alone, without the global recency pass (Workspace and Project). */
|
||||
export function scopeOnlyScan(
|
||||
options: Pick<AiVaultScanOptions, 'scopePaths' | 'scopeOnly'>
|
||||
): boolean {
|
||||
return options.scopeOnly === true && (options.scopePaths?.length ?? 0) > 0
|
||||
}
|
||||
|
||||
export function scopeWalksAgentFiles(
|
||||
agent: AiVaultAgent,
|
||||
scopePaths: readonly string[] | undefined
|
||||
|
||||
@@ -117,7 +117,8 @@ async function listAiVaultSessions(
|
||||
? [...new Set(scopePaths)].sort()
|
||||
: scopePaths,
|
||||
executionHostScope,
|
||||
includeAntigravityIdeSessions: args?.includeAntigravityIdeSessions === true
|
||||
includeAntigravityIdeSessions: args?.includeAntigravityIdeSessions === true,
|
||||
...(args?.scopeOnly === true ? { scopeOnly: true } : {})
|
||||
})
|
||||
const depth = requestedAiVaultSessionDepth(args)
|
||||
const afterFingerprint =
|
||||
@@ -260,9 +261,7 @@ export function registerAiVaultHandlers(options: AiVaultHandlerOptions = {}): vo
|
||||
const controller = listCancellations.begin(event, requestToken)
|
||||
try {
|
||||
await handlerOptions.ensureStructuredSessionOwnership?.()
|
||||
const result = await listAiVaultSessions(args, {
|
||||
signal: controller?.signal
|
||||
})
|
||||
const result = await listAiVaultSessions(args, { signal: controller?.signal })
|
||||
return projectStructuredAiVaultSessions(result, OPENS_EVERY_STRUCTURED_CHAT)
|
||||
} catch (error) {
|
||||
// Expected cancellation is a result so Electron does not log rejected IPC as an error.
|
||||
|
||||
@@ -107,6 +107,7 @@ export const AI_VAULT_METHODS = [
|
||||
unlimited: params.unlimited,
|
||||
force: params.force,
|
||||
scopePaths: params.scopePaths,
|
||||
scopeOnly: params.scopeOnly,
|
||||
includeAntigravityIdeSessions: params.includeAntigravityIdeSessions
|
||||
},
|
||||
signal
|
||||
|
||||
@@ -157,7 +157,7 @@ export default function AiVaultPanel({
|
||||
scanResult,
|
||||
sessions: history,
|
||||
loadedSessionLimit
|
||||
} = useAiVaultSessionRefresh(scopePaths, executionHostScope, sessionLimit)
|
||||
} = useAiVaultSessionRefresh(scopePaths, executionHostScope, sessionLimit, scope !== 'all')
|
||||
// Send scope identity: the host owns project worktree enumeration, and hundreds of paths cannot fit a request.
|
||||
const searchWithin = useMemo(
|
||||
() =>
|
||||
@@ -176,6 +176,7 @@ export default function AiVaultPanel({
|
||||
)
|
||||
const requestedScanKey = aiVaultLocalScanKey({
|
||||
scopePaths,
|
||||
scopeOnly: scope !== 'all',
|
||||
includeAntigravityIdeSessions: true,
|
||||
limit: sessionLimit === 'unlimited' ? undefined : sessionLimit,
|
||||
unlimited: sessionLimit === 'unlimited'
|
||||
|
||||
+5
-1
@@ -8,6 +8,8 @@ export type AiVaultAppliedScan = {
|
||||
result: AiVaultListResult
|
||||
limit: AiVaultSessionLimit
|
||||
scopeKey: string
|
||||
/** Workspace and Project rows hold only that scope, so they never stand in for another one. */
|
||||
scopeOnly: boolean
|
||||
}
|
||||
|
||||
export function useAppliedAiVaultScan(): {
|
||||
@@ -16,6 +18,7 @@ export function useAppliedAiVaultScan(): {
|
||||
published: AiVaultListResult,
|
||||
limit: AiVaultSessionLimit,
|
||||
scopeKey: string,
|
||||
scopeOnly: boolean,
|
||||
onApplied?: (result: AiVaultListResult) => void
|
||||
) => void
|
||||
} {
|
||||
@@ -27,6 +30,7 @@ export function useAppliedAiVaultScan(): {
|
||||
published: AiVaultListResult,
|
||||
limit: AiVaultSessionLimit,
|
||||
scopeKey: string,
|
||||
scopeOnly: boolean,
|
||||
onApplied?: (result: AiVaultListResult) => void
|
||||
) => {
|
||||
const previous = acceptedScanRef.current
|
||||
@@ -37,7 +41,7 @@ export function useAppliedAiVaultScan(): {
|
||||
previous.limit === limit &&
|
||||
previous.scopeKey === scopeKey
|
||||
? previous
|
||||
: { result, limit, scopeKey }
|
||||
: { result, limit, scopeKey, scopeOnly }
|
||||
acceptedScanRef.current = next
|
||||
setScan(next)
|
||||
onApplied?.(result)
|
||||
|
||||
+6
-2
@@ -27,6 +27,7 @@ import {
|
||||
|
||||
type PanelRequest = {
|
||||
scopePaths: readonly string[]
|
||||
scopeOnly: boolean
|
||||
executionHostScope: string
|
||||
sessionLimit: number | 'unlimited'
|
||||
}
|
||||
@@ -53,9 +54,10 @@ vi.mock('./ai-vault-session-refresh', () => ({
|
||||
useAiVaultSessionRefresh: (
|
||||
scopePaths: PanelRequest['scopePaths'],
|
||||
executionHostScope: PanelRequest['executionHostScope'],
|
||||
sessionLimit: PanelRequest['sessionLimit']
|
||||
sessionLimit: PanelRequest['sessionLimit'],
|
||||
scopeOnly: PanelRequest['scopeOnly']
|
||||
) => {
|
||||
panelRequests.push({ scopePaths, executionHostScope, sessionLimit })
|
||||
panelRequests.push({ scopePaths, scopeOnly, executionHostScope, sessionLimit })
|
||||
return {
|
||||
error: null,
|
||||
loading: false,
|
||||
@@ -140,10 +142,12 @@ it.each([false, true])(
|
||||
returned.sessions = [session]
|
||||
const { default: AiVaultPanel } = await import('../panel/AiVaultPanel')
|
||||
render(<AiVaultPanel workspace={bound ? { worktreeId: folderId } : undefined} />)
|
||||
expect(panelRequests.at(-1)).toMatchObject({ scopeOnly: true })
|
||||
expect(panelRequests.at(-1)?.scopePaths).toContain('/var/example')
|
||||
expect(panelRows).toEqual([{ session, resume: { available: true, workspaceId: folderId } }])
|
||||
expect(panelRows[0].session).toBe(session)
|
||||
fireEvent.click(screen.getByRole('radio', { name: /^All$/ }))
|
||||
expect(panelRequests.at(-1)).toMatchObject({ scopeOnly: false })
|
||||
expect(panelRequests.at(-1)?.scopePaths).toContain('/var/example')
|
||||
expect(panelRows).toEqual([{ session, resume: { available: true, workspaceId: folderId } }])
|
||||
expect(panelRows[0].session.cwd).toBe('/private/var/example')
|
||||
|
||||
+13
-2
@@ -16,6 +16,8 @@ import {
|
||||
/** Match panel requests so readers share host/renderer caches instead of evicting one another. */
|
||||
export type AiVaultSessionListRequest = {
|
||||
scopePaths: readonly string[]
|
||||
/** Workspace and Project list only their own sessions; All and the tab move lookup leave it off. */
|
||||
scopeOnly?: boolean
|
||||
executionHostScope: ExecutionHostScope
|
||||
sessionLimit: AiVaultSessionLimit
|
||||
}
|
||||
@@ -29,6 +31,7 @@ export function aiVaultSessionListArgs(
|
||||
limit: request.sessionLimit === 'unlimited' ? undefined : request.sessionLimit,
|
||||
unlimited: request.sessionLimit === 'unlimited',
|
||||
scopePaths: request.scopePaths,
|
||||
...(request.scopeOnly === true ? { scopeOnly: true } : {}),
|
||||
executionHostScope: request.executionHostScope,
|
||||
force: options.force,
|
||||
requestToken: options.requestToken
|
||||
@@ -39,7 +42,11 @@ export function readCachedAiVaultSessionList(
|
||||
request: AiVaultSessionListRequest
|
||||
): AiVaultListResult | null {
|
||||
return readCachedAiVaultSessionResult({
|
||||
key: aiVaultSessionResultCacheKey(request.executionHostScope, request.scopePaths),
|
||||
key: aiVaultSessionResultCacheKey(
|
||||
request.executionHostScope,
|
||||
request.scopePaths,
|
||||
request.scopeOnly
|
||||
),
|
||||
limit: request.sessionLimit,
|
||||
scopePaths: request.scopePaths
|
||||
})
|
||||
@@ -51,7 +58,11 @@ export function cacheAiVaultSessionList(
|
||||
options: { replaceHostEntries: boolean }
|
||||
): void {
|
||||
cacheAiVaultSessionResult({
|
||||
key: aiVaultSessionResultCacheKey(request.executionHostScope, request.scopePaths),
|
||||
key: aiVaultSessionResultCacheKey(
|
||||
request.executionHostScope,
|
||||
request.scopePaths,
|
||||
request.scopeOnly
|
||||
),
|
||||
executionHostScope: request.executionHostScope,
|
||||
limit: request.sessionLimit,
|
||||
scopePaths: request.scopePaths,
|
||||
|
||||
+36
-5
@@ -41,11 +41,13 @@ function HookProbe(props: {
|
||||
scopePaths: readonly string[]
|
||||
executionHostScope?: ExecutionHostScope
|
||||
sessionLimit?: AiVaultSessionLimit
|
||||
scopeOnly?: boolean
|
||||
}): null {
|
||||
latest = useAiVaultSessionRefresh(
|
||||
props.scopePaths,
|
||||
props.executionHostScope ?? 'local',
|
||||
props.sessionLimit ?? DEFAULT_AI_VAULT_SESSION_LIMIT
|
||||
props.sessionLimit ?? DEFAULT_AI_VAULT_SESSION_LIMIT,
|
||||
props.scopeOnly ?? false
|
||||
)
|
||||
return null
|
||||
}
|
||||
@@ -53,28 +55,34 @@ function HookProbe(props: {
|
||||
async function renderHook(
|
||||
scopePaths: readonly string[] = [],
|
||||
executionHostScope: ExecutionHostScope = 'local',
|
||||
sessionLimit: AiVaultSessionLimit = DEFAULT_AI_VAULT_SESSION_LIMIT
|
||||
sessionLimit: AiVaultSessionLimit = DEFAULT_AI_VAULT_SESSION_LIMIT,
|
||||
scopeOnly = false
|
||||
): Promise<void> {
|
||||
const container = document.createElement('div')
|
||||
document.body.appendChild(container)
|
||||
const root = createRoot(container)
|
||||
roots.push(root)
|
||||
await act(async () => {
|
||||
root.render(createElement(HookProbe, { scopePaths, executionHostScope, sessionLimit }))
|
||||
root.render(
|
||||
createElement(HookProbe, { scopePaths, executionHostScope, sessionLimit, scopeOnly })
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
async function rerenderHook(
|
||||
scopePaths: readonly string[] = [],
|
||||
executionHostScope: ExecutionHostScope = 'local',
|
||||
sessionLimit: AiVaultSessionLimit = DEFAULT_AI_VAULT_SESSION_LIMIT
|
||||
sessionLimit: AiVaultSessionLimit = DEFAULT_AI_VAULT_SESSION_LIMIT,
|
||||
scopeOnly = false
|
||||
): Promise<void> {
|
||||
const root = roots.at(-1)
|
||||
if (!root) {
|
||||
throw new Error('renderHook must be called before rerenderHook')
|
||||
}
|
||||
await act(async () => {
|
||||
root.render(createElement(HookProbe, { scopePaths, executionHostScope, sessionLimit }))
|
||||
root.render(
|
||||
createElement(HookProbe, { scopePaths, executionHostScope, sessionLimit, scopeOnly })
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -198,6 +206,29 @@ describe('useAiVaultSessionRefresh refocus behavior', () => {
|
||||
expect(latest?.scanResult?.scannedAt).toBe('2026-07-01T00:00:02.000Z')
|
||||
})
|
||||
|
||||
it('does not show Workspace-only rows under All while All loads or after it fails', async () => {
|
||||
let failAll: (error: Error) => void = () => {}
|
||||
listSessionsMock.mockImplementation((args) =>
|
||||
args.scopeOnly
|
||||
? Promise.resolve({ ...EMPTY_RESULT, sessions: [makeVaultSession(1)] })
|
||||
: new Promise((_resolve, reject) => {
|
||||
failAll = reject
|
||||
})
|
||||
)
|
||||
await renderHook(['/repo'], 'local', 250, true)
|
||||
await flushMicrotasks()
|
||||
expect(latest?.sessions.map((session) => session.id)).toEqual(['session-1'])
|
||||
|
||||
await rerenderHook(['/repo'], 'local', 250, false)
|
||||
await flushMicrotasks()
|
||||
expect(latest?.sessions).toEqual([])
|
||||
expect(latest?.loading).toBe(true)
|
||||
|
||||
await act(async () => failAll(new Error('scan failed')))
|
||||
await flushMicrotasks()
|
||||
expect(latest?.sessions).toEqual([])
|
||||
})
|
||||
|
||||
it('replaces a stuck scan on manual Refresh without cancelling an automatic rescan', async () => {
|
||||
let resolveInitial: ((result: AiVaultListResult) => void) | null = null
|
||||
let resolveReplacement: ((result: AiVaultListResult) => void) | null = null
|
||||
|
||||
+23
-24
@@ -50,7 +50,8 @@ type AiVaultRefreshArgs = { force?: boolean; background?: boolean; reuseLoadedDe
|
||||
export function useAiVaultSessionRefresh(
|
||||
scopePaths: readonly string[],
|
||||
executionHostScope: ExecutionHostScope,
|
||||
sessionLimit: AiVaultSessionLimit
|
||||
sessionLimit: AiVaultSessionLimit,
|
||||
scopeOnly = false
|
||||
): {
|
||||
error: string | null
|
||||
loading: boolean
|
||||
@@ -64,8 +65,6 @@ export function useAiVaultSessionRefresh(
|
||||
const { scan, applyScan } = useAppliedAiVaultScan()
|
||||
const associations = useAiVaultAssociationObservation(executionHostScope)
|
||||
const associationsRef = useRef(associations)
|
||||
const scanResult = scan?.result ?? null
|
||||
const sessions = scanResult?.sessions ?? EMPTY_AI_VAULT_SESSIONS
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [failure, setFailure] = useState<{ scopeKey: string; cause: string } | null>(null)
|
||||
const [terminalScopeKey, setTerminalScopeKey] = useState<string | null>(null)
|
||||
@@ -82,24 +81,29 @@ export function useAiVaultSessionRefresh(
|
||||
const mountedRef = useRef(true)
|
||||
const publicationGateRef = useRef<AiVaultSessionPublicationGate>(undefined!)
|
||||
publicationGateRef.current ??= new AiVaultSessionPublicationGate()
|
||||
const scanScopeKey = `${aiVaultSessionResultCacheKey(executionHostScope, scopePaths)}\n${sessionLimit}`
|
||||
const scanScopeKey = `${aiVaultSessionResultCacheKey(executionHostScope, scopePaths, scopeOnly)}\n${sessionLimit}`
|
||||
// Another scope's scope-only rows would pass for this scope's list while it loads or after it fails.
|
||||
const shown = scan && (!scan.scopeOnly || scan.scopeKey === scanScopeKey) ? scan : null
|
||||
// Kept through rescans so a repeat failure doesn't blink; shown only for the scope that failed.
|
||||
const error = failure?.scopeKey === scanScopeKey ? aiVaultScanErrorText(failure.cause) : null
|
||||
const scopePathsRef = useRef<readonly string[]>(scopePaths)
|
||||
scopePathsRef.current = scopePaths
|
||||
const scopeOnlyRef = useRef(scopeOnly)
|
||||
const executionHostScopeRef = useRef<ExecutionHostScope>(executionHostScope)
|
||||
executionHostScopeRef.current = executionHostScope
|
||||
const sessionLimitRef = useRef(sessionLimit)
|
||||
// Keep render pure for React Doctor; layout effect still lands before refresh effects.
|
||||
useLayoutEffect(() => {
|
||||
sessionLimitRef.current = sessionLimit
|
||||
scopeOnlyRef.current = scopeOnly
|
||||
associationsRef.current = associations
|
||||
}, [associations, sessionLimit])
|
||||
}, [associations, scopeOnly, sessionLimit])
|
||||
const currentScanScopeKey = useCallback(
|
||||
() =>
|
||||
`${aiVaultSessionResultCacheKey(
|
||||
executionHostScopeRef.current,
|
||||
scopePathsRef.current
|
||||
scopePathsRef.current,
|
||||
scopeOnlyRef.current
|
||||
)}\n${sessionLimitRef.current}`,
|
||||
[]
|
||||
)
|
||||
@@ -111,15 +115,15 @@ export function useAiVaultSessionRefresh(
|
||||
observation === associationsRef.current && associationRevision === observation.getSnapshot()
|
||||
const hostScope = executionHostScopeRef.current
|
||||
const selectedLimit = sessionLimitRef.current
|
||||
const baseKey = aiVaultSessionResultCacheKey(hostScope, scopePathsRef.current)
|
||||
const request = {
|
||||
scopePaths: scopePathsRef.current,
|
||||
scopeOnly: scopeOnlyRef.current,
|
||||
executionHostScope: hostScope,
|
||||
sessionLimit: selectedLimit
|
||||
}
|
||||
const baseKey = aiVaultSessionResultCacheKey(hostScope, request.scopePaths, request.scopeOnly)
|
||||
const cachedResult =
|
||||
args.reuseLoadedDepth === true
|
||||
? readCachedAiVaultSessionList({
|
||||
scopePaths: scopePathsRef.current,
|
||||
executionHostScope: hostScope,
|
||||
sessionLimit: selectedLimit
|
||||
})
|
||||
: null
|
||||
args.reuseLoadedDepth === true ? readCachedAiVaultSessionList(request) : null
|
||||
if (cachedResult) {
|
||||
const scanKey = `${baseKey}\n${selectedLimit}`
|
||||
setFailure(null)
|
||||
@@ -128,7 +132,7 @@ export function useAiVaultSessionRefresh(
|
||||
if (!mountedRef.current || scanKey !== currentScanScopeKey() || !associationCurrent()) {
|
||||
return
|
||||
}
|
||||
applyScan(published, selectedLimit, scanKey, (applied) => {
|
||||
applyScan(published, selectedLimit, scanKey, request.scopeOnly, (applied) => {
|
||||
conditionalSnapshotRef.current = published.fingerprint
|
||||
? { scopeKey: scanKey, fingerprint: published.fingerprint, result: applied }
|
||||
: null
|
||||
@@ -167,11 +171,6 @@ export function useAiVaultSessionRefresh(
|
||||
refreshIdRef.current === refreshId &&
|
||||
scanKey === currentScanScopeKey() &&
|
||||
associationCurrent()
|
||||
const request = {
|
||||
scopePaths: scopePathsRef.current,
|
||||
executionHostScope: hostScope,
|
||||
sessionLimit: selectedLimit
|
||||
}
|
||||
try {
|
||||
const previous = conditionalSnapshotRef.current
|
||||
const result = await refreshAiVaultSessionList(
|
||||
@@ -191,7 +190,7 @@ export function useAiVaultSessionRefresh(
|
||||
cacheAiVaultSessionList(request, result, { replaceHostEntries: args.force === true })
|
||||
publicationGateRef.current.publish(result, (published) => {
|
||||
if (requestCurrent()) {
|
||||
applyScan(published, selectedLimit, scanKey, (applied) => {
|
||||
applyScan(published, selectedLimit, scanKey, request.scopeOnly, (applied) => {
|
||||
conditionalSnapshotRef.current = published.fingerprint
|
||||
? { scopeKey: scanKey, fingerprint: published.fingerprint, result: applied }
|
||||
: null
|
||||
@@ -322,8 +321,8 @@ export function useAiVaultSessionRefresh(
|
||||
loading: loading || scopePending,
|
||||
scopePending,
|
||||
refresh,
|
||||
scanResult,
|
||||
sessions,
|
||||
loadedSessionLimit: scan?.limit ?? null
|
||||
scanResult: shown?.result ?? null,
|
||||
sessions: shown?.result.sessions ?? EMPTY_AI_VAULT_SESSIONS,
|
||||
loadedSessionLimit: shown?.limit ?? null
|
||||
}
|
||||
}
|
||||
|
||||
+7
-2
@@ -18,10 +18,15 @@ const cachedSessionResults = new Map<string, CachedSessionResult>()
|
||||
|
||||
export function aiVaultSessionResultCacheKey(
|
||||
executionHostScope: ExecutionHostScope,
|
||||
scopePaths: readonly string[]
|
||||
scopePaths: readonly string[],
|
||||
scopeOnly = false
|
||||
): string {
|
||||
// JSON keeps the parts unambiguous: a path may legally contain any separator.
|
||||
return JSON.stringify([executionHostScope, ...[...new Set(scopePaths)].sort()])
|
||||
return JSON.stringify([
|
||||
executionHostScope,
|
||||
...(scopeOnly ? [{ scopeOnly }] : []),
|
||||
...[...new Set(scopePaths)].sort()
|
||||
])
|
||||
}
|
||||
|
||||
export function readCachedAiVaultSessionResult(args: {
|
||||
|
||||
@@ -76,6 +76,7 @@ export function createWebAiVaultApi(): NonNullable<Partial<PreloadApi>['aiVault'
|
||||
? { afterFingerprint: args.afterFingerprint }
|
||||
: {}),
|
||||
scopePaths: args?.scopePaths,
|
||||
...(args?.scopeOnly === true ? { scopeOnly: true } : {}),
|
||||
executionHostId
|
||||
}).then((result) =>
|
||||
// Fence later host mutations on these rows to the pairing that listed them.
|
||||
|
||||
@@ -237,10 +237,27 @@ export type AiVaultListArgs = {
|
||||
force?: boolean
|
||||
// Scope paths preserve older relevant sessions outside the globally recency-capped result.
|
||||
scopePaths?: readonly string[]
|
||||
/** Return only scopePaths sessions, without the global recency pass. Older hosts ignore it; clients still filter. */
|
||||
scopeOnly?: boolean
|
||||
executionHostScope?: ExecutionHostScope
|
||||
requestToken?: string
|
||||
}
|
||||
|
||||
/** Cap scope paths for a host; a capped scope can't answer alone, so it drops scopeOnly. */
|
||||
export function boundedAiVaultScopeArgs(
|
||||
scopePaths: readonly string[] | undefined,
|
||||
scopeOnly: boolean | undefined
|
||||
): Pick<AiVaultListArgs, 'scopePaths' | 'scopeOnly'> {
|
||||
if (!scopePaths) {
|
||||
return {}
|
||||
}
|
||||
return scopeOnly === true &&
|
||||
scopePaths.length > 0 &&
|
||||
scopePaths.length <= AI_VAULT_SCOPE_PATHS_MAX_COUNT
|
||||
? { scopePaths, scopeOnly: true }
|
||||
: { scopePaths: scopePaths.slice(0, AI_VAULT_SCOPE_PATHS_MAX_COUNT) }
|
||||
}
|
||||
|
||||
export type AiVaultListResult = {
|
||||
/** Local scan entry that produced this result; absent for remote and merged results. */
|
||||
scanId?: string
|
||||
|
||||
@@ -12,6 +12,8 @@ export function aiVaultLocalScanKey(args?: AiVaultListArgs): string {
|
||||
export function aiVaultLocalScanScopeKey(args?: AiVaultListArgs): string {
|
||||
return JSON.stringify({
|
||||
scopePaths: [...new Set(args?.scopePaths ?? [])].sort(),
|
||||
includeAntigravityIdeSessions: args?.includeAntigravityIdeSessions === true
|
||||
includeAntigravityIdeSessions: args?.includeAntigravityIdeSessions === true,
|
||||
// A scope-only result lacks the newest sessions elsewhere, so it never serves a full request.
|
||||
...(args?.scopeOnly === true ? { scopeOnly: true } : {})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { z } from 'zod'
|
||||
import { parseExecutionHostId } from '../execution-host'
|
||||
import {
|
||||
AI_VAULT_AGENTS,
|
||||
AI_VAULT_SCOPE_PATHS_MAX_COUNT
|
||||
} from '../ai-vault/contracts/ai-vault-types'
|
||||
import { AI_VAULT_AGENTS, boundedAiVaultScopeArgs } from '../ai-vault/contracts/ai-vault-types'
|
||||
import { OptionalBoolean } from './rpc-param-primitives'
|
||||
import { AI_VAULT_SESSION_TITLE_REQUEST_MAX_COUNT } from '../ai-vault/contracts/ai-vault-session-title'
|
||||
|
||||
@@ -41,11 +38,8 @@ export const AiVaultListSessionsParams = z
|
||||
.regex(/^[0-9a-f]{64}$/)
|
||||
.nullable()
|
||||
.optional(),
|
||||
scopePaths: z
|
||||
.array(z.string().min(1).max(AI_VAULT_SCOPE_PATH_MAX_LENGTH))
|
||||
// Clamp to preserve older uncapped clients; scopes only widen discovery.
|
||||
.transform((paths) => paths.slice(0, AI_VAULT_SCOPE_PATHS_MAX_COUNT))
|
||||
.optional(),
|
||||
scopePaths: z.array(z.string().min(1).max(AI_VAULT_SCOPE_PATH_MAX_LENGTH)).optional(),
|
||||
scopeOnly: OptionalBoolean,
|
||||
// Host ID only restamps cached results; desktop/web send it, mobile omits it. Scanning stays host-local.
|
||||
executionHostId: executionHostIdSchema.optional()
|
||||
})
|
||||
@@ -54,6 +48,11 @@ export const AiVaultListSessionsParams = z
|
||||
ctx.addIssue({ code: 'custom', path: ['limit'], message: 'Limit exceeds maximum' })
|
||||
}
|
||||
})
|
||||
// Clamp to preserve older uncapped clients; scopes only widen discovery.
|
||||
.transform(({ scopePaths, scopeOnly, ...params }) => ({
|
||||
...params,
|
||||
...boundedAiVaultScopeArgs(scopePaths, scopeOnly)
|
||||
}))
|
||||
|
||||
const AiVaultRowResumeParams = z
|
||||
.object({
|
||||
|
||||
Reference in New Issue
Block a user