visualproof 0.10.0 → 0.11.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 -3
- package/dist/mcp/visualproof-mcp.mjs +12 -7
- package/dist/server/agent.js +7 -1
- package/dist/server/agententry.js +18 -7
- package/dist/server/agenttalk.js +46 -4
- package/dist/server/app.js +4 -3
- package/dist/server/appagent.js +7 -1
- package/dist/server/appshare.js +22 -117
- package/dist/server/apptalk.js +39 -25
- package/dist/server/children.js +1 -1
- package/dist/server/doctor.js +4 -3
- package/dist/server/hosted.js +475 -260
- package/dist/server/live.js +49 -24
- package/dist/server/main.js +26 -9
- package/dist/server/mcptools.js +2 -2
- package/dist/server/options.js +38 -14
- package/dist/server/prompt.js +19 -11
- package/dist/server/serveragent.js +117 -0
- package/dist/server/talk.js +39 -3
- package/dist/server/tokens.js +12 -2
- package/dist/shared/collab.js +12 -5
- package/dist/web/bundle/app.js +305 -133
- package/dist/web/index.html +1 -1
- package/dist/web/style.css +45 -11
- package/docs/agent-api/mcp.md +4 -3
- package/docs/agent-api/talking.md +23 -6
- package/package.json +1 -1
- package/dist/server/claudetokens.js +0 -113
package/dist/server/tokens.js
CHANGED
|
@@ -94,8 +94,8 @@ export class AgentTokens {
|
|
|
94
94
|
* checked by the caller (server/appshare.ts); the name is used as given, numbered when an agent in
|
|
95
95
|
* force has it already; `by` is a person's name, and `person` their personal link's id where an
|
|
96
96
|
* invited person makes it (`makerPerson`: who its maker is, AgentSpec decision 7). `runs: "server"`
|
|
97
|
-
* makes the token of
|
|
98
|
-
* `days` is not read. */
|
|
97
|
+
* makes the token of the server's own agent (AgentSpec decision 10; `by` the server,
|
|
98
|
+
* server/serveragent.ts), which has no expiry: `days` is not read. */
|
|
99
99
|
create(o) {
|
|
100
100
|
const now = o.now ?? Date.now();
|
|
101
101
|
this.expire(now);
|
|
@@ -156,6 +156,16 @@ export class AgentTokens {
|
|
|
156
156
|
get(id) {
|
|
157
157
|
return this.records.find((r) => r.id === id);
|
|
158
158
|
}
|
|
159
|
+
/** The level of the server's agent's token, which follows the server's --agents from one start to
|
|
160
|
+
* the next (server/serveragent.ts); no other token's level changes after it is made. */
|
|
161
|
+
setLevel(id, level) {
|
|
162
|
+
const r = this.records.find((x) => x.id === id);
|
|
163
|
+
if (!r || r.level === level)
|
|
164
|
+
return;
|
|
165
|
+
r.level = level;
|
|
166
|
+
this.save();
|
|
167
|
+
this.onChanged();
|
|
168
|
+
}
|
|
159
169
|
/** Revoke a token in force: it lets nothing in from now on, and its agent's wait ends. False when
|
|
160
170
|
* there is no such token in force. */
|
|
161
171
|
revoke(id, by, now = Date.now()) {
|
package/dist/shared/collab.js
CHANGED
|
@@ -216,8 +216,8 @@ export const BOARD_SCHEMES = ["kind", "status", "mine"];
|
|
|
216
216
|
/** Activity's filters: the kind of event, and whose (web/src/activity.ts). */
|
|
217
217
|
export const ACTIVITY_KINDS = ["all", "review", "build", "change"];
|
|
218
218
|
export const ACTIVITY_WHO = ["all", "agents", "people"];
|
|
219
|
-
/** The expiry of a token that
|
|
220
|
-
*
|
|
219
|
+
/** The expiry of a token that never expires: the server's own agent's (AgentSpec decision 10). Far
|
|
220
|
+
* enough to never come, and still a date every reader of `expires` can parse. */
|
|
221
221
|
export const UNTIL_STOPPED = "9999-12-31T23:59:59.000Z";
|
|
222
222
|
/** Whether `who` made the token `t` (AgentSpec decision 7): the personal link that made it, where an
|
|
223
223
|
* invited person did; else the name it was made under, as names are compared. Its private channel
|
|
@@ -273,12 +273,19 @@ export function cleanView(v) {
|
|
|
273
273
|
const activity = av && typeof av.open === "boolean" && kind && who ? { open: av.open, kind, who, ...(typeof av.mine === "string" && validName(av.mine) ? { mine: av.mine } : {}) } : null;
|
|
274
274
|
const lost = o.lostFound && typeof o.lostFound === "object" ? o.lostFound.open : undefined;
|
|
275
275
|
const scheme = one(BOARD_SCHEMES, o.scheme);
|
|
276
|
-
// the InfoView's caret: a declaration's name, a place within any file's
|
|
276
|
+
// the InfoView's caret: a declaration's name or a file window's module, a place within any file's
|
|
277
|
+
// bounds
|
|
277
278
|
const cv = o.caret && typeof o.caret === "object" ? o.caret : null;
|
|
278
279
|
const place = (n, max) => Number.isInteger(n) && n >= 0 && n <= max;
|
|
279
280
|
const caretDecl = cv ? str(cv.decl) : null;
|
|
280
|
-
const
|
|
281
|
-
|
|
281
|
+
const caretFile = cv && !caretDecl ? str(cv.file, 300) : null;
|
|
282
|
+
const caret = cv && (caretDecl || caretFile) && place(cv.line, 10_000_000) && place(cv.character, 100_000)
|
|
283
|
+
? {
|
|
284
|
+
...(caretDecl ? { decl: caretDecl, ...(cv.pinned === true ? { pinned: true } : {}) } : { file: caretFile }),
|
|
285
|
+
line: cv.line,
|
|
286
|
+
character: cv.character,
|
|
287
|
+
...(cv.after === true ? { after: true } : {}),
|
|
288
|
+
}
|
|
282
289
|
: null;
|
|
283
290
|
const pinned = Array.isArray(o.pinned)
|
|
284
291
|
? o.pinned
|