chatroom-cli 1.101.2 → 1.101.3
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Chatroom Daemon</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CItWAiNz.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-DKoewUK4.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/dist/index.js
CHANGED
|
@@ -84525,14 +84525,11 @@ var init_stop_agent_confirmed_adapter = __esm(() => {
|
|
|
84525
84525
|
});
|
|
84526
84526
|
|
|
84527
84527
|
// ../../services/backend/config/reliability.ts
|
|
84528
|
-
var HARNESS_SESSION_READY_TIMEOUT_MS = 5000, DAEMON_HEARTBEAT_INTERVAL_MS, DAEMON_HEARTBEAT_TTL_MS, AGENT_REQUEST_DEADLINE_MS = 120000, MACHINE_COMMAND_LEASE_RENEWAL_INTERVAL_MS = 20000, MACHINE_COMMAND_DAEMON_ROUTINE_TTL_MS,
|
|
84528
|
+
var HARNESS_SESSION_READY_TIMEOUT_MS = 5000, DAEMON_HEARTBEAT_INTERVAL_MS, DAEMON_HEARTBEAT_TTL_MS, AGENT_REQUEST_DEADLINE_MS = 120000, MACHINE_COMMAND_LEASE_RENEWAL_INTERVAL_MS = 20000, MACHINE_COMMAND_DAEMON_ROUTINE_TTL_MS, OBSERVATION_TTL_MS = 60000, OBSERVED_SAFETY_POLL_MS = 30000, WORKSPACE_LIST_RECONCILE_MS, AGENT_STOP_TERMINAL_RETENTION_MS, SCOPE_TARGET_STOP_TIMEOUT_MS = 1e4, CONNECTION_CLOSE_REQUEST_TTL_MS, ENHANCER_TERMINAL_JOB_RETENTION_MS;
|
|
84529
84529
|
var init_reliability = __esm(() => {
|
|
84530
84530
|
DAEMON_HEARTBEAT_INTERVAL_MS = 5 * 60000;
|
|
84531
84531
|
DAEMON_HEARTBEAT_TTL_MS = 6 * DAEMON_HEARTBEAT_INTERVAL_MS;
|
|
84532
84532
|
MACHINE_COMMAND_DAEMON_ROUTINE_TTL_MS = 5 * 60000;
|
|
84533
|
-
OBSERVED_FULL_PUSH_INTERVAL_MS = 5 * 60000;
|
|
84534
|
-
OBSERVED_SYNC_RECONCILE_MS = 15 * 60000;
|
|
84535
|
-
WORKSPACE_RECENCY_WINDOW_MS = 7 * 24 * 60 * 60 * 1000;
|
|
84536
84533
|
WORKSPACE_LIST_RECONCILE_MS = 60 * 60 * 1000;
|
|
84537
84534
|
AGENT_STOP_TERMINAL_RETENTION_MS = 30 * 24 * 60 * 60 * 1000;
|
|
84538
84535
|
CONNECTION_CLOSE_REQUEST_TTL_MS = 10 * 60000;
|
|
@@ -105019,7 +105016,10 @@ var init_capabilities_bridge = __esm(() => {
|
|
|
105019
105016
|
});
|
|
105020
105017
|
|
|
105021
105018
|
// ../../services/backend/config/featureFlags.ts
|
|
105022
|
-
function getAllowedSignupMethodsForEnvironment(nodeEnv, convexDeployment) {
|
|
105019
|
+
function getAllowedSignupMethodsForEnvironment(nodeEnv, convexDeployment, e2eSeedingEnabled) {
|
|
105020
|
+
if (e2eSeedingEnabled === "true") {
|
|
105021
|
+
return ["self", "invite"];
|
|
105022
|
+
}
|
|
105023
105023
|
if (convexDeployment?.startsWith("local:")) {
|
|
105024
105024
|
return ["self", "invite"];
|
|
105025
105025
|
}
|
|
@@ -105035,7 +105035,7 @@ var init_featureFlags = __esm(() => {
|
|
|
105035
105035
|
disableLogin: false,
|
|
105036
105036
|
directHarnessWorkers: true,
|
|
105037
105037
|
get allowedSignupMethods() {
|
|
105038
|
-
return getAllowedSignupMethodsForEnvironment("development", process.env.CONVEX_DEPLOYMENT);
|
|
105038
|
+
return getAllowedSignupMethodsForEnvironment("development", process.env.CONVEX_DEPLOYMENT, process.env.E2E_SEEDING_ENABLED);
|
|
105039
105039
|
}
|
|
105040
105040
|
};
|
|
105041
105041
|
});
|
|
@@ -108109,8 +108109,6 @@ async function pushAvailableGitState(ctx, workingDir, stateKey, branchResult) {
|
|
|
108109
108109
|
...pipeline2.toMutationArgs(values3, false)
|
|
108110
108110
|
});
|
|
108111
108111
|
ctx.lastPushedGitState.set(stateKey, stateHash);
|
|
108112
|
-
lastPushedBranch.set(stateKey, branch);
|
|
108113
|
-
lastFullPushMs.set(stateKey, Date.now());
|
|
108114
108112
|
console.log(`[${formatTimestamp()}] \uD83D\uDD00 Git state pushed: ${workingDir} (${branch}${values3.get("isDirty") ? ", dirty" : ", clean"})`);
|
|
108115
108113
|
}
|
|
108116
108114
|
if (ctx.lastPushedGitState.get(commitsKey) !== commitsHash) {
|
|
@@ -108128,17 +108126,13 @@ async function pushAvailableGitState(ctx, workingDir, stateKey, branchResult) {
|
|
|
108128
108126
|
}
|
|
108129
108127
|
}
|
|
108130
108128
|
}
|
|
108131
|
-
|
|
108132
|
-
await exports_Effect.runPromise(pushGitStateEffect.pipe(exports_Effect.provide(effectContext2)));
|
|
108133
|
-
}
|
|
108134
|
-
var lastFullPushMs, lastPushedBranch, branchField, GIT_STATE_FIELDS, pushGitStateEffect, pushSingleWorkspaceGitStateEffect = (workingDir) => exports_Effect.gen(function* () {
|
|
108129
|
+
var branchField, GIT_STATE_FIELDS, pushGitStateEffect, pushSingleWorkspaceGitStateEffect = (workingDir) => exports_Effect.gen(function* () {
|
|
108135
108130
|
const session2 = yield* DaemonSessionService;
|
|
108136
108131
|
const mutable = yield* DaemonMutableStateService;
|
|
108137
108132
|
const lastPushedGitState = yield* exports_Ref.get(mutable.lastPushedGitState);
|
|
108138
108133
|
yield* exports_Effect.promise(() => pushSingleWorkspaceGitStateImpl(buildGitStateDeps(session2, lastPushedGitState), workingDir));
|
|
108139
108134
|
});
|
|
108140
108135
|
var init_git_heartbeat = __esm(() => {
|
|
108141
|
-
init_reliability();
|
|
108142
108136
|
init_esm();
|
|
108143
108137
|
init_api3();
|
|
108144
108138
|
init_daemon_services();
|
|
@@ -108146,8 +108140,6 @@ var init_git_heartbeat = __esm(() => {
|
|
|
108146
108140
|
init_convex_error();
|
|
108147
108141
|
init_git_reader();
|
|
108148
108142
|
init_git_state_pipeline();
|
|
108149
|
-
lastFullPushMs = new Map;
|
|
108150
|
-
lastPushedBranch = new Map;
|
|
108151
108143
|
branchField = {
|
|
108152
108144
|
key: "branch",
|
|
108153
108145
|
includeInSlim: true,
|
|
@@ -108239,6 +108231,47 @@ var init_git_heartbeat = __esm(() => {
|
|
|
108239
108231
|
});
|
|
108240
108232
|
});
|
|
108241
108233
|
|
|
108234
|
+
// src/daemon/entry/workspace-git/workspace-list-subscription.ts
|
|
108235
|
+
function toSyncWorkspaces(workingDirs) {
|
|
108236
|
+
return workingDirs.map((workingDir) => ({ workingDir }));
|
|
108237
|
+
}
|
|
108238
|
+
async function reconcileWorkspaceList(session2) {
|
|
108239
|
+
const workspaces = await session2.backend.query(api.workspaces.listRecentlyObservedWorkspacesForMachine, {
|
|
108240
|
+
sessionId: session2.sessionId,
|
|
108241
|
+
machineId: session2.machineId,
|
|
108242
|
+
recencyWindowMs: OBSERVATION_TTL_MS
|
|
108243
|
+
});
|
|
108244
|
+
if (workspaces == null)
|
|
108245
|
+
return;
|
|
108246
|
+
if (!session2.workspaceListStore) {
|
|
108247
|
+
session2.workspaceListStore = { workspaces: [], updatedAt: 0 };
|
|
108248
|
+
}
|
|
108249
|
+
session2.workspaceListStore.workspaces = toSyncWorkspaces(workspaces);
|
|
108250
|
+
session2.workspaceListStore.updatedAt = Date.now();
|
|
108251
|
+
}
|
|
108252
|
+
var startWorkspaceListSubscriptionEffect = () => exports_Effect.gen(function* () {
|
|
108253
|
+
const session2 = yield* DaemonSessionService;
|
|
108254
|
+
session2.workspaceListStore = { workspaces: [], updatedAt: 0 };
|
|
108255
|
+
yield* exports_Effect.promise(() => reconcileWorkspaceList(session2));
|
|
108256
|
+
const interval = setInterval(() => {
|
|
108257
|
+
reconcileWorkspaceList(session2).catch(() => {
|
|
108258
|
+
return;
|
|
108259
|
+
});
|
|
108260
|
+
}, OBSERVED_SAFETY_POLL_MS);
|
|
108261
|
+
return {
|
|
108262
|
+
stop: () => {
|
|
108263
|
+
clearInterval(interval);
|
|
108264
|
+
session2.workspaceListStore = undefined;
|
|
108265
|
+
}
|
|
108266
|
+
};
|
|
108267
|
+
});
|
|
108268
|
+
var init_workspace_list_subscription = __esm(() => {
|
|
108269
|
+
init_reliability();
|
|
108270
|
+
init_esm();
|
|
108271
|
+
init_api3();
|
|
108272
|
+
init_daemon_services();
|
|
108273
|
+
});
|
|
108274
|
+
|
|
108242
108275
|
// src/daemon/entry/command-event-types.ts
|
|
108243
108276
|
function isDaemonCommandEventType(value) {
|
|
108244
108277
|
return DAEMON_COMMAND_EVENT_TYPES.includes(value);
|
|
@@ -108252,6 +108285,7 @@ var init_command_event_types = __esm(() => {
|
|
|
108252
108285
|
"agent.stopScope",
|
|
108253
108286
|
"daemon.ping",
|
|
108254
108287
|
"daemon.gitRefresh",
|
|
108288
|
+
"daemon.workspaceListChanged",
|
|
108255
108289
|
"daemon.localAction",
|
|
108256
108290
|
"daemon.pickFolder",
|
|
108257
108291
|
"daemon.refreshCapabilities"
|
|
@@ -110182,6 +110216,8 @@ function evictStaleDedupEntries(tracker) {
|
|
|
110182
110216
|
evictStaleEntries(tracker.capabilitiesRefreshIds, evictBefore);
|
|
110183
110217
|
evictStaleEntries(tracker.localActionIds, evictBefore);
|
|
110184
110218
|
evictStaleEntries(tracker.pickFolderIds, evictBefore);
|
|
110219
|
+
if (tracker.workspaceListChangedIds)
|
|
110220
|
+
evictStaleEntries(tracker.workspaceListChangedIds, evictBefore);
|
|
110185
110221
|
processManager.evictStalePendingStops();
|
|
110186
110222
|
}
|
|
110187
110223
|
function createDedupTracker() {
|
|
@@ -110191,9 +110227,21 @@ function createDedupTracker() {
|
|
|
110191
110227
|
gitRefreshIds: new Map,
|
|
110192
110228
|
capabilitiesRefreshIds: new Map,
|
|
110193
110229
|
localActionIds: new Map,
|
|
110194
|
-
pickFolderIds: new Map
|
|
110230
|
+
pickFolderIds: new Map,
|
|
110231
|
+
workspaceListChangedIds: new Map
|
|
110195
110232
|
};
|
|
110196
110233
|
}
|
|
110234
|
+
function handleWorkspaceListChangedCommandEffect(event, tracker) {
|
|
110235
|
+
return exports_Effect.gen(function* () {
|
|
110236
|
+
const eventId = String(event._id);
|
|
110237
|
+
if (tracker.workspaceListChangedIds?.has(eventId))
|
|
110238
|
+
return;
|
|
110239
|
+
const session2 = yield* DaemonSessionService;
|
|
110240
|
+
yield* exports_Effect.promise(() => reconcileWorkspaceList(session2));
|
|
110241
|
+
yield* pushGitStateEffect;
|
|
110242
|
+
(tracker.workspaceListChangedIds ??= new Map).set(eventId, Date.now());
|
|
110243
|
+
});
|
|
110244
|
+
}
|
|
110197
110245
|
function handleRequestStartEffect(event, tracker) {
|
|
110198
110246
|
return exports_Effect.gen(function* () {
|
|
110199
110247
|
const eventId = event._id.toString();
|
|
@@ -110363,6 +110411,7 @@ var init_command_dispatch = __esm(() => {
|
|
|
110363
110411
|
init_reliability();
|
|
110364
110412
|
init_esm();
|
|
110365
110413
|
init_git_heartbeat();
|
|
110414
|
+
init_workspace_list_subscription();
|
|
110366
110415
|
init_api3();
|
|
110367
110416
|
init_capabilities_bridge();
|
|
110368
110417
|
init_command_event_types();
|
|
@@ -110392,6 +110441,7 @@ var init_command_dispatch = __esm(() => {
|
|
|
110392
110441
|
}),
|
|
110393
110442
|
"daemon.ping": handlePingCommandEffect,
|
|
110394
110443
|
"daemon.gitRefresh": handleGitRefreshCommandEffect,
|
|
110444
|
+
"daemon.workspaceListChanged": handleWorkspaceListChangedCommandEffect,
|
|
110395
110445
|
"daemon.localAction": handleLocalActionCommandEffect,
|
|
110396
110446
|
"daemon.pickFolder": handlePickFolderCommandEffect,
|
|
110397
110447
|
"daemon.refreshCapabilities": handleRefreshCapabilitiesEffect
|
|
@@ -118420,41 +118470,6 @@ var init_git_subscription = __esm(() => {
|
|
|
118420
118470
|
init_daemon_services();
|
|
118421
118471
|
});
|
|
118422
118472
|
|
|
118423
|
-
// src/daemon/entry/workspace-git/workspace-list-subscription.ts
|
|
118424
|
-
function toSyncWorkspaces(workingDirs) {
|
|
118425
|
-
return workingDirs.map((workingDir) => ({ workingDir }));
|
|
118426
|
-
}
|
|
118427
|
-
async function reconcileWorkspaceList(session2) {
|
|
118428
|
-
const workspaces = await session2.backend.query(api.workspaces.listRecentlyObservedWorkspacesForMachine, {
|
|
118429
|
-
sessionId: session2.sessionId,
|
|
118430
|
-
machineId: session2.machineId,
|
|
118431
|
-
recencyWindowMs: WORKSPACE_RECENCY_WINDOW_MS
|
|
118432
|
-
});
|
|
118433
|
-
if (workspaces == null)
|
|
118434
|
-
return;
|
|
118435
|
-
if (!session2.workspaceListStore) {
|
|
118436
|
-
session2.workspaceListStore = { workspaces: [], updatedAt: 0 };
|
|
118437
|
-
}
|
|
118438
|
-
session2.workspaceListStore.workspaces = toSyncWorkspaces(workspaces);
|
|
118439
|
-
session2.workspaceListStore.updatedAt = Date.now();
|
|
118440
|
-
}
|
|
118441
|
-
var startWorkspaceListSubscriptionEffect = () => exports_Effect.gen(function* () {
|
|
118442
|
-
const session2 = yield* DaemonSessionService;
|
|
118443
|
-
session2.workspaceListStore = { workspaces: [], updatedAt: 0 };
|
|
118444
|
-
yield* exports_Effect.promise(() => reconcileWorkspaceList(session2));
|
|
118445
|
-
return {
|
|
118446
|
-
stop: () => {
|
|
118447
|
-
session2.workspaceListStore = undefined;
|
|
118448
|
-
}
|
|
118449
|
-
};
|
|
118450
|
-
});
|
|
118451
|
-
var init_workspace_list_subscription = __esm(() => {
|
|
118452
|
-
init_reliability();
|
|
118453
|
-
init_esm();
|
|
118454
|
-
init_api3();
|
|
118455
|
-
init_daemon_services();
|
|
118456
|
-
});
|
|
118457
|
-
|
|
118458
118473
|
// src/daemon/entry/workspace-git-inbound-registry.ts
|
|
118459
118474
|
function registerWorkspaceGitInboundHandler(h) {
|
|
118460
118475
|
handler6 = h;
|
|
@@ -118650,10 +118665,6 @@ function createDaemonRuntime(deps) {
|
|
|
118650
118665
|
workspaceListSubscriptionHandle = yield* startWorkspaceListSubscriptionEffect();
|
|
118651
118666
|
registerWorkspaceGitInboundHandler(async (event) => {
|
|
118652
118667
|
switch (event.type) {
|
|
118653
|
-
case "workspace.list-changed":
|
|
118654
|
-
await reconcileWorkspaceList(session2);
|
|
118655
|
-
await drainGitStateSync(effectContext2);
|
|
118656
|
-
break;
|
|
118657
118668
|
case "git.request":
|
|
118658
118669
|
if (gitHandle)
|
|
118659
118670
|
await gitHandle.drainPendingGitRequests();
|
|
@@ -118721,7 +118732,6 @@ var init_daemon_runtime = __esm(() => {
|
|
|
118721
118732
|
init_log_observer_sync();
|
|
118722
118733
|
init_init_daemon();
|
|
118723
118734
|
init_task_inbox_runtime();
|
|
118724
|
-
init_git_heartbeat();
|
|
118725
118735
|
init_git_subscription();
|
|
118726
118736
|
init_api3();
|
|
118727
118737
|
init_workspace_list_subscription();
|
|
@@ -119788,36 +119798,6 @@ var init_machine_command_inbox = __esm(() => {
|
|
|
119788
119798
|
init_api3();
|
|
119789
119799
|
});
|
|
119790
119800
|
|
|
119791
|
-
// src/daemon/infrastructure/convex/subscribers/workspace-list.ts
|
|
119792
|
-
function startWorkspaceListSubscriber(deps, onEvent) {
|
|
119793
|
-
let lastSnapshotKey = "";
|
|
119794
|
-
const queryArgs = {
|
|
119795
|
-
sessionId: deps.sessionId,
|
|
119796
|
-
machineId: deps.machineId,
|
|
119797
|
-
recencyWindowMs: WORKSPACE_RECENCY_WINDOW_MS
|
|
119798
|
-
};
|
|
119799
|
-
const unsub = deps.wsClient.onUpdate(api.workspaces.listRecentlyObservedWorkspacesForMachine, queryArgs, (workspaces) => {
|
|
119800
|
-
if (workspaces == null)
|
|
119801
|
-
return;
|
|
119802
|
-
const snapshotKey2 = JSON.stringify(workspaces);
|
|
119803
|
-
if (snapshotKey2 === lastSnapshotKey)
|
|
119804
|
-
return;
|
|
119805
|
-
lastSnapshotKey = snapshotKey2;
|
|
119806
|
-
onEvent({ type: "workspace.list-changed", machineId: deps.machineId });
|
|
119807
|
-
}, (err) => {
|
|
119808
|
-
console.warn(`[daemon] workspace-list subscriber error: ${err instanceof Error ? err.message : String(err)}`);
|
|
119809
|
-
});
|
|
119810
|
-
return {
|
|
119811
|
-
async stop() {
|
|
119812
|
-
unsub();
|
|
119813
|
-
}
|
|
119814
|
-
};
|
|
119815
|
-
}
|
|
119816
|
-
var init_workspace_list = __esm(() => {
|
|
119817
|
-
init_reliability();
|
|
119818
|
-
init_api3();
|
|
119819
|
-
});
|
|
119820
|
-
|
|
119821
119801
|
// src/daemon/entry/subscriber-registry.ts
|
|
119822
119802
|
function startAllSubscribers(deps) {
|
|
119823
119803
|
const onEvent = (event) => {
|
|
@@ -119834,7 +119814,6 @@ function startAllSubscribers(deps) {
|
|
|
119834
119814
|
});
|
|
119835
119815
|
});
|
|
119836
119816
|
const commandRun = startCommandRunSubscriber(deps, onEvent);
|
|
119837
|
-
const workspaceList = startWorkspaceListSubscriber(deps, onEvent);
|
|
119838
119817
|
const gitRequest = startGitRequestSubscriber(deps, onEvent);
|
|
119839
119818
|
const fileTree = startFileTreeRequestSubscriber(deps, onEvent);
|
|
119840
119819
|
const fileTreeRelease = startFileTreeReleaseRequestSubscriber(deps, onEvent);
|
|
@@ -119851,7 +119830,6 @@ function startAllSubscribers(deps) {
|
|
|
119851
119830
|
directHarnessCommand.stop(),
|
|
119852
119831
|
machineCommands.stop(),
|
|
119853
119832
|
commandRun.stop(),
|
|
119854
|
-
workspaceList.stop(),
|
|
119855
119833
|
gitRequest.stop(),
|
|
119856
119834
|
fileTree.stop(),
|
|
119857
119835
|
fileTreeRelease.stop(),
|
|
@@ -119879,7 +119857,6 @@ var init_subscriber_registry = __esm(() => {
|
|
|
119879
119857
|
init_file_write_request();
|
|
119880
119858
|
init_git_request();
|
|
119881
119859
|
init_machine_command_inbox();
|
|
119882
|
-
init_workspace_list();
|
|
119883
119860
|
});
|
|
119884
119861
|
|
|
119885
119862
|
// src/infrastructure/log-server/resolve-env-slug.ts
|
|
@@ -135639,4 +135616,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
135639
135616
|
});
|
|
135640
135617
|
program2.parse();
|
|
135641
135618
|
|
|
135642
|
-
//# debugId=
|
|
135619
|
+
//# debugId=7580EDAA7FA535CD64756E2164756E21
|