codesesh 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/{chunk-MOZLVHCC.js → chunk-2LXZFMSH.js} +10 -2
- package/dist/{chunk-MOZLVHCC.js.map → chunk-2LXZFMSH.js.map} +1 -1
- package/dist/{chunk-5YY675UR.js → chunk-543OWZIC.js} +2 -2
- package/dist/{chunk-CIMPLUT6.js → chunk-56FKVL5K.js} +5 -5
- package/dist/{chunk-QFG33PKR.js → chunk-CYZ6OC6J.js} +2 -2
- package/dist/{chunk-RDTQ2WPR.js → chunk-DWY4HWVI.js} +2 -2
- package/dist/{chunk-ZLU7ODBV.js → chunk-R6QKSHPH.js} +2 -2
- package/dist/{chunk-ZDH2BKQK.js → chunk-WRVILHZR.js} +366 -25
- package/dist/chunk-WRVILHZR.js.map +1 -0
- package/dist/{discovery-MS2ZSMZ5.js → discovery-NTMSA6UE.js} +5 -5
- package/dist/index.js +36 -9
- package/dist/index.js.map +1 -1
- package/dist/project-identity-worker.js +4 -4
- package/dist/scan-refresh-worker.js +6 -6
- package/dist/search-index-worker.js +6 -6
- package/dist/session-detail-worker.js +6 -6
- package/dist/smart-tag-worker.js +3 -3
- package/dist/web/assets/{DetailLanding-Dgb2Qg8H.js → DetailLanding-D1FLK4EW.js} +1 -1
- package/dist/web/assets/{InteractiveReceipt-SckXLiPB.js → InteractiveReceipt-C7FJhzdv.js} +1 -1
- package/dist/web/assets/{OverviewScreen-D44AMeDu.js → OverviewScreen-DX7F_6dH.js} +1 -1
- package/dist/web/assets/{PrismHighlighter-D7JLjKja.js → PrismHighlighter-DZ2CWVc0.js} +1 -1
- package/dist/web/assets/{Projects-DVHOqH2Z.js → Projects-B_7w5TDw.js} +1 -1
- package/dist/web/assets/{SearchResultsPanel-B1WEw9Q5.js → SearchResultsPanel-BMBhKuPS.js} +1 -1
- package/dist/web/assets/SessionDetail-wJYzzF0i.js +53 -0
- package/dist/web/assets/{index-BIpTq_7T.js → index-DUcpWdzX.js} +2 -2
- package/dist/web/icon/agent/minimax-code.svg +1 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZDH2BKQK.js.map +0 -1
- package/dist/web/assets/SessionDetail-J00I4QfE.js +0 -53
- /package/dist/{chunk-5YY675UR.js.map → chunk-543OWZIC.js.map} +0 -0
- /package/dist/{chunk-CIMPLUT6.js.map → chunk-56FKVL5K.js.map} +0 -0
- /package/dist/{chunk-QFG33PKR.js.map → chunk-CYZ6OC6J.js.map} +0 -0
- /package/dist/{chunk-RDTQ2WPR.js.map → chunk-DWY4HWVI.js.map} +0 -0
- /package/dist/{chunk-ZLU7ODBV.js.map → chunk-R6QKSHPH.js.map} +0 -0
- /package/dist/{discovery-MS2ZSMZ5.js.map → discovery-NTMSA6UE.js.map} +0 -0
|
@@ -46,15 +46,15 @@ import {
|
|
|
46
46
|
sortSessions,
|
|
47
47
|
syncSessionSearchIndex,
|
|
48
48
|
syncSessionSearchIndexChanges
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-56FKVL5K.js";
|
|
50
|
+
import "./chunk-DWY4HWVI.js";
|
|
51
|
+
import "./chunk-WRVILHZR.js";
|
|
52
52
|
import {
|
|
53
53
|
SMART_TAGS,
|
|
54
54
|
filterSessionTreeByActivityWindow,
|
|
55
55
|
isSmartTag,
|
|
56
56
|
mergeSortedSessions
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-2LXZFMSH.js";
|
|
58
58
|
export {
|
|
59
59
|
SMART_TAGS,
|
|
60
60
|
attachMissingProjectIdentities,
|
|
@@ -107,4 +107,4 @@ export {
|
|
|
107
107
|
syncSessionSearchIndex,
|
|
108
108
|
syncSessionSearchIndexChanges
|
|
109
109
|
};
|
|
110
|
-
//# sourceMappingURL=discovery-
|
|
110
|
+
//# sourceMappingURL=discovery-NTMSA6UE.js.map
|
package/dist/index.js
CHANGED
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
buildDashboard,
|
|
5
5
|
getSessionActivityTime,
|
|
6
6
|
summarizeProjects
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-543OWZIC.js";
|
|
8
8
|
import {
|
|
9
9
|
AGENT_UNAVAILABLE_DURING_SCAN_ERROR_CODE,
|
|
10
10
|
AgentUnavailableDuringScanError
|
|
11
11
|
} from "./chunk-RF3EEWPH.js";
|
|
12
12
|
import {
|
|
13
13
|
terminateWorkerAfterLogDrain
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R6QKSHPH.js";
|
|
15
15
|
import "./chunk-QH2HOXJH.js";
|
|
16
16
|
import {
|
|
17
17
|
appLogger,
|
|
18
18
|
logSearchIndexSync
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CYZ6OC6J.js";
|
|
20
20
|
import {
|
|
21
21
|
attachMissingProjectIdentities,
|
|
22
22
|
beginAgentRefresh,
|
|
@@ -51,18 +51,18 @@ import {
|
|
|
51
51
|
sessionMatchesSearchCost,
|
|
52
52
|
sessionSignature,
|
|
53
53
|
sortSessions
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-56FKVL5K.js";
|
|
55
55
|
import {
|
|
56
56
|
PROJECT_IDENTITY_RESOLVER_REVISION,
|
|
57
57
|
createProjectScopeMatcher,
|
|
58
58
|
createProjectScopeMatcherFromIdentity,
|
|
59
59
|
matchesProjectScope,
|
|
60
60
|
normalizeProjectDirectory
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-DWY4HWVI.js";
|
|
62
62
|
import {
|
|
63
63
|
createRegisteredAgents,
|
|
64
64
|
getAgentInfoMap
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-WRVILHZR.js";
|
|
66
66
|
import {
|
|
67
67
|
CODESESH_OPERATION_ID_HEADER,
|
|
68
68
|
CODESESH_REQUEST_ID_HEADER,
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
tableExists,
|
|
98
98
|
toPublicReferencedSessionHead,
|
|
99
99
|
toPublicSessionHead
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-2LXZFMSH.js";
|
|
101
101
|
|
|
102
102
|
// src/index.ts
|
|
103
103
|
import { defineCommand, runMain } from "citty";
|
|
@@ -5894,10 +5894,18 @@ var AgentSyncEngine = class {
|
|
|
5894
5894
|
};
|
|
5895
5895
|
|
|
5896
5896
|
// src/session-watcher.ts
|
|
5897
|
-
import {
|
|
5897
|
+
import {
|
|
5898
|
+
existsSync as existsSync3,
|
|
5899
|
+
readdirSync,
|
|
5900
|
+
statSync,
|
|
5901
|
+
watch,
|
|
5902
|
+
watchFile,
|
|
5903
|
+
unwatchFile
|
|
5904
|
+
} from "fs";
|
|
5898
5905
|
import { basename, dirname as dirname2, isAbsolute, join as join2, relative, resolve as resolve2 } from "path";
|
|
5899
5906
|
var WRITE_STABILITY_THRESHOLD_MS = 250;
|
|
5900
5907
|
var WRITE_STABILITY_POLL_MS = 100;
|
|
5908
|
+
var SOURCE_POLL_MS = 1e3;
|
|
5901
5909
|
function toAbsolutePath(path) {
|
|
5902
5910
|
return isAbsolute(path) ? path : resolve2(path);
|
|
5903
5911
|
}
|
|
@@ -5961,6 +5969,7 @@ function resolveWatchEventPath(watchPath, filename) {
|
|
|
5961
5969
|
}
|
|
5962
5970
|
var SessionWatcher = class {
|
|
5963
5971
|
watchers = [];
|
|
5972
|
+
pollingCleanups = [];
|
|
5964
5973
|
fallbackWatchScopes = /* @__PURE__ */ new Map();
|
|
5965
5974
|
stablePaths = /* @__PURE__ */ new Map();
|
|
5966
5975
|
listeners = /* @__PURE__ */ new Set();
|
|
@@ -5974,6 +5983,7 @@ var SessionWatcher = class {
|
|
|
5974
5983
|
/** Begin watching the session sources declared by each agent adapter. */
|
|
5975
5984
|
start(agents) {
|
|
5976
5985
|
const scopesByRoot = /* @__PURE__ */ new Map();
|
|
5986
|
+
const polledPaths = /* @__PURE__ */ new Map();
|
|
5977
5987
|
for (const agent of agents) {
|
|
5978
5988
|
const plan = agent.getSessionWatchPlan();
|
|
5979
5989
|
if (plan.status !== "supported") {
|
|
@@ -5989,6 +5999,13 @@ var SessionWatcher = class {
|
|
|
5989
5999
|
continue;
|
|
5990
6000
|
}
|
|
5991
6001
|
for (const target of plan.targets) {
|
|
6002
|
+
if (target.pollForChanges) {
|
|
6003
|
+
const path = toAbsolutePath(target.path);
|
|
6004
|
+
const names = polledPaths.get(path) ?? /* @__PURE__ */ new Set();
|
|
6005
|
+
names.add(agent.name);
|
|
6006
|
+
polledPaths.set(path, names);
|
|
6007
|
+
continue;
|
|
6008
|
+
}
|
|
5992
6009
|
const watchRootPath = closestWatchablePath(target.root ?? target.path);
|
|
5993
6010
|
if (!watchRootPath) continue;
|
|
5994
6011
|
let rootPath;
|
|
@@ -6010,6 +6027,14 @@ var SessionWatcher = class {
|
|
|
6010
6027
|
scopesByRoot.set(rootPath, scopes);
|
|
6011
6028
|
}
|
|
6012
6029
|
}
|
|
6030
|
+
for (const [path, names] of polledPaths) {
|
|
6031
|
+
const listener = (current, previous) => {
|
|
6032
|
+
if (current.nlink === 0 && previous.nlink === 0) return;
|
|
6033
|
+
this.waitForStablePath(path, names);
|
|
6034
|
+
};
|
|
6035
|
+
watchFile(path, { interval: SOURCE_POLL_MS, persistent: false }, listener);
|
|
6036
|
+
this.pollingCleanups.push(() => unwatchFile(path, listener));
|
|
6037
|
+
}
|
|
6013
6038
|
for (const [rootPath, scopes] of scopesByRoot.entries()) {
|
|
6014
6039
|
const agents2 = Array.from(new Set(scopes.map((scope) => scope.agentName)));
|
|
6015
6040
|
appLogger.info("watch.start", {
|
|
@@ -6031,6 +6056,8 @@ var SessionWatcher = class {
|
|
|
6031
6056
|
}
|
|
6032
6057
|
/** Stop all watchers and clear pending stability polls. */
|
|
6033
6058
|
async dispose() {
|
|
6059
|
+
for (const cleanup of this.pollingCleanups) cleanup();
|
|
6060
|
+
this.pollingCleanups = [];
|
|
6034
6061
|
for (const state of this.stablePaths.values()) {
|
|
6035
6062
|
if (state.timer) {
|
|
6036
6063
|
clearTimeout(state.timer);
|
|
@@ -6953,7 +6980,7 @@ var main = defineCommand({
|
|
|
6953
6980
|
log_path: appLogger.getLogPath()
|
|
6954
6981
|
});
|
|
6955
6982
|
if (clearCache) {
|
|
6956
|
-
const { clearCache: clear } = await import("./discovery-
|
|
6983
|
+
const { clearCache: clear } = await import("./discovery-NTMSA6UE.js");
|
|
6957
6984
|
clear();
|
|
6958
6985
|
appLogger.info("cache.clear");
|
|
6959
6986
|
console.log("Cache cleared.");
|