@dosu/cli 0.68.0 → 0.68.1
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 +6 -4
- package/bin/dosu.js +31 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -190,10 +190,12 @@ unanchored and reach topics immediately. Neither setup nor `enable` replaces a s
|
|
|
190
190
|
already have; they print the one-liner to add to your own script instead.
|
|
191
191
|
|
|
192
192
|
`incognito on` is a saved per-agent setting: none of that agent's sessions are studied until you
|
|
193
|
-
turn it off.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
turn it off. Turning it off resumes studying only new sessions going forward; sessions that
|
|
194
|
+
finished while incognito was on stay unstudied permanently, even if a later sync picks them up.
|
|
195
|
+
To keep a single chat out instead, type `/dosu-incognito` in it; setup installs that command with
|
|
196
|
+
the hook. It marks the session's transcript so studying skips it (the whole session, and for the
|
|
197
|
+
rest of it — start a new session to turn Dosu back on) and tells the model not to use Dosu
|
|
198
|
+
tools. See [docs/studying.md](docs/studying.md).
|
|
197
199
|
|
|
198
200
|
### Telemetry and privacy
|
|
199
201
|
|
package/bin/dosu.js
CHANGED
|
@@ -1128,7 +1128,7 @@ function isNpxInvocation(channel = INSTALL_CHANNEL, env = process.env) {
|
|
|
1128
1128
|
function getVersionString() {
|
|
1129
1129
|
return `v${VERSION}`;
|
|
1130
1130
|
}
|
|
1131
|
-
var VERSION = "0.68.
|
|
1131
|
+
var VERSION = "0.68.1", INSTALL_CHANNEL = "npm";
|
|
1132
1132
|
|
|
1133
1133
|
// src/debug/logger.ts
|
|
1134
1134
|
import {
|
|
@@ -2113,6 +2113,10 @@ function syncStatePath(configDir = getConfigDir()) {
|
|
|
2113
2113
|
function stringsOf(values) {
|
|
2114
2114
|
return values.filter((v) => typeof v === "string");
|
|
2115
2115
|
}
|
|
2116
|
+
function incognitoPeriodsOf(values) {
|
|
2117
|
+
const optionalString = (v) => v === undefined || typeof v === "string";
|
|
2118
|
+
return values.filter((v) => typeof v === "object" && v !== null && typeof v.agent === "string" && optionalString(v.from) && optionalString(v.to)).map(({ agent, from, to }) => ({ agent, ...from ? { from } : {}, ...to ? { to } : {} }));
|
|
2119
|
+
}
|
|
2116
2120
|
function loadSyncState(configDir = getConfigDir()) {
|
|
2117
2121
|
const empty = {
|
|
2118
2122
|
schema_version: STATE_SCHEMA_VERSION,
|
|
@@ -2149,6 +2153,7 @@ function loadSyncState(configDir = getConfigDir()) {
|
|
|
2149
2153
|
...run ? { run } : {},
|
|
2150
2154
|
...raw.paused === true ? { paused: true } : {},
|
|
2151
2155
|
...Array.isArray(raw.incognito_agents) ? { incognito_agents: stringsOf(raw.incognito_agents) } : {},
|
|
2156
|
+
...Array.isArray(raw.incognito_periods) ? { incognito_periods: incognitoPeriodsOf(raw.incognito_periods) } : {},
|
|
2152
2157
|
...Array.isArray(raw.repo_filter) ? { repo_filter: stringsOf(raw.repo_filter) } : {},
|
|
2153
2158
|
...Array.isArray(raw.project_filter) ? { project_filter: stringsOf(raw.project_filter) } : {}
|
|
2154
2159
|
};
|
|
@@ -2167,7 +2172,18 @@ function setSyncPaused(paused, configDir = getConfigDir()) {
|
|
|
2167
2172
|
function setAgentsIncognito(agentIds, incognito, configDir = getConfigDir()) {
|
|
2168
2173
|
const state = loadSyncState(configDir);
|
|
2169
2174
|
const current = new Set(state.incognito_agents ?? []);
|
|
2175
|
+
const periods = state.incognito_periods ?? [];
|
|
2176
|
+
const at = new Date().toISOString();
|
|
2170
2177
|
for (const id of agentIds) {
|
|
2178
|
+
if (incognito && !current.has(id))
|
|
2179
|
+
periods.push({ agent: id, from: at });
|
|
2180
|
+
if (!incognito && current.has(id)) {
|
|
2181
|
+
const open = periods.find((p) => p.agent === id && !p.to);
|
|
2182
|
+
if (open)
|
|
2183
|
+
open.to = at;
|
|
2184
|
+
else
|
|
2185
|
+
periods.push({ agent: id, to: at });
|
|
2186
|
+
}
|
|
2171
2187
|
if (incognito)
|
|
2172
2188
|
current.add(id);
|
|
2173
2189
|
else
|
|
@@ -2177,8 +2193,16 @@ function setAgentsIncognito(agentIds, incognito, configDir = getConfigDir()) {
|
|
|
2177
2193
|
state.incognito_agents = [...current].sort();
|
|
2178
2194
|
else
|
|
2179
2195
|
delete state.incognito_agents;
|
|
2196
|
+
if (periods.length > 0)
|
|
2197
|
+
state.incognito_periods = periods;
|
|
2180
2198
|
saveSyncState(state, configDir);
|
|
2181
2199
|
}
|
|
2200
|
+
function isAgentIncognito(state, session) {
|
|
2201
|
+
if (state.incognito_agents?.includes(session.harness))
|
|
2202
|
+
return true;
|
|
2203
|
+
const updated = Date.parse(session.updated);
|
|
2204
|
+
return (state.incognito_periods ?? []).some((p) => p.agent === session.harness && p.to !== undefined && (p.from === undefined || Date.parse(p.from) <= updated) && updated <= Date.parse(p.to));
|
|
2205
|
+
}
|
|
2182
2206
|
function resetSyncState(configDir = getConfigDir()) {
|
|
2183
2207
|
const previous = loadSyncState(configDir);
|
|
2184
2208
|
const fresh = {
|
|
@@ -2188,7 +2212,8 @@ function resetSyncState(configDir = getConfigDir()) {
|
|
|
2188
2212
|
...previous.repo_filter ? { repo_filter: previous.repo_filter } : {},
|
|
2189
2213
|
...previous.project_filter ? { project_filter: previous.project_filter } : {},
|
|
2190
2214
|
...previous.paused ? { paused: true } : {},
|
|
2191
|
-
...previous.incognito_agents ? { incognito_agents: previous.incognito_agents } : {}
|
|
2215
|
+
...previous.incognito_agents ? { incognito_agents: previous.incognito_agents } : {},
|
|
2216
|
+
...previous.incognito_periods ? { incognito_periods: previous.incognito_periods } : {}
|
|
2192
2217
|
};
|
|
2193
2218
|
saveSyncState(fresh, configDir);
|
|
2194
2219
|
}
|
|
@@ -13985,8 +14010,7 @@ function listSessionBacklog() {
|
|
|
13985
14010
|
const sessions = filterSessionsByRepo(scanned, filter, resolver.resolveRepo);
|
|
13986
14011
|
resolver.flush();
|
|
13987
14012
|
const gate = gateSessions(sessions, state.watermark);
|
|
13988
|
-
const
|
|
13989
|
-
const { kept, skipped } = partitionIncognitoSessions(gate.ready, (session) => incognitoAgents.has(session.harness) || isIncognitoSession(session));
|
|
14013
|
+
const { kept, skipped } = partitionIncognitoSessions(gate.ready, (session) => isAgentIncognito(state, session) || isIncognitoSession(session));
|
|
13990
14014
|
return { queued: kept.reverse(), open: gate.open.reverse(), incognito: skipped.reverse() };
|
|
13991
14015
|
} catch {
|
|
13992
14016
|
return { queued: [], open: [], incognito: [] };
|
|
@@ -14125,8 +14149,7 @@ async function runKnowledgeSync(options = {}) {
|
|
|
14125
14149
|
}
|
|
14126
14150
|
const worthStudying = deps.worthStudying ?? isWorthStudying;
|
|
14127
14151
|
const isIncognitoChat = deps.isIncognito ?? isIncognitoSession;
|
|
14128
|
-
const
|
|
14129
|
-
const isIncognito = (session) => incognitoAgents.has(session.harness) || isIncognitoChat(session);
|
|
14152
|
+
const isIncognito = (session) => isAgentIncognito(state, session) || isIncognitoChat(session);
|
|
14130
14153
|
const studiedSnapshot = lastStudiedSnapshot(state.mined_sessions);
|
|
14131
14154
|
const examined = [];
|
|
14132
14155
|
const batch = [];
|
|
@@ -14333,7 +14356,7 @@ var init_conflicts = __esm(() => {
|
|
|
14333
14356
|
});
|
|
14334
14357
|
|
|
14335
14358
|
// src/telemetry/debug-id.ts
|
|
14336
|
-
var BUNDLE_DEBUG_ID_PLACEHOLDER = "
|
|
14359
|
+
var BUNDLE_DEBUG_ID_PLACEHOLDER = "6315379c-189a-f368-6475-6e2164756e21";
|
|
14337
14360
|
|
|
14338
14361
|
// src/telemetry/telemetry.ts
|
|
14339
14362
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
@@ -69284,4 +69307,4 @@ main().catch((err) => {
|
|
|
69284
69307
|
process.exit(1);
|
|
69285
69308
|
});
|
|
69286
69309
|
|
|
69287
|
-
//# debugId=
|
|
69310
|
+
//# debugId=6315379c-189a-f368-6475-6e2164756e21
|