copilot-operator 0.1.46 → 0.1.48
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/dist/src/api/operator.controller.js +21 -0
- package/dist/src/api/operator.service.js +19 -0
- package/dist/src/orchestrator/taskRunner.js +12 -7
- package/dist/src/plan/systemGuide.js +14 -6
- package/dist/src/session/taskExchange.js +230 -0
- package/dist/src/transport/chatSession.js +37 -0
- package/dist/src/transport/copilotTransport.js +60 -7
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/chunks/{549-8732dd2c1339bc5d.js → 549-a4473e9519a97026.js} +1 -1
- package/dist/web/_next/static/chunks/867-b159f25612da5cbc.js +1 -0
- package/dist/web/_next/static/chunks/app/page-3caf0b02046754a1.js +1 -0
- package/dist/web/_next/static/css/{70ceb261074b139c.css → ddb518572ea43e30.css} +1 -1
- package/dist/web/appearance.html +2 -2
- package/dist/web/appearance.txt +10 -10
- package/dist/web/defaults.html +2 -2
- package/dist/web/defaults.txt +10 -10
- package/dist/web/history.html +2 -2
- package/dist/web/history.txt +10 -10
- package/dist/web/import.html +2 -2
- package/dist/web/import.txt +10 -10
- package/dist/web/index.html +2 -2
- package/dist/web/index.txt +10 -10
- package/dist/web/level1.html +2 -2
- package/dist/web/level1.txt +10 -10
- package/dist/web/presets.html +2 -2
- package/dist/web/presets.txt +10 -10
- package/dist/web/sessions/view.html +2 -2
- package/dist/web/sessions/view.txt +10 -10
- package/dist/web/sessions.html +2 -2
- package/dist/web/sessions.txt +10 -10
- package/dist/web/system.html +2 -2
- package/dist/web/system.txt +10 -10
- package/package.json +1 -1
- package/dist/web/_next/static/chunks/867-7fb52be342fa64e5.js +0 -1
- package/dist/web/_next/static/chunks/app/page-ed6a5a2ff1b6285e.js +0 -1
- /package/dist/web/_next/static/{uAYbk9CSKPZe3-jWXmPOP → nLLy7-v8M5YRGIMtuTvMJ}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{uAYbk9CSKPZe3-jWXmPOP → nLLy7-v8M5YRGIMtuTvMJ}/_ssgManifest.js +0 -0
|
@@ -382,6 +382,18 @@ let OperatorController = class OperatorController {
|
|
|
382
382
|
* format that imports again), `domain` (what happened to the work) or `bot` (what the runner
|
|
383
383
|
* did). Exactly one of `run`, `session` or `session`+`task` names the scope.
|
|
384
384
|
*/
|
|
385
|
+
/** One task's whole exchange with Copilot, as a JSON file (see `taskExchange.ts`). */
|
|
386
|
+
async taskExchange(id, taskId, res) {
|
|
387
|
+
try {
|
|
388
|
+
const { fileName, content } = await this.ops.taskExchange(id, taskId);
|
|
389
|
+
res.type('application/json; charset=utf-8');
|
|
390
|
+
res.setHeader('content-disposition', contentDisposition(fileName));
|
|
391
|
+
res.send(content);
|
|
392
|
+
}
|
|
393
|
+
catch (e) {
|
|
394
|
+
failText(res, e);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
385
397
|
async exportView(kind, res, run, session, task) {
|
|
386
398
|
if (kind !== 'plan' && kind !== 'domain' && kind !== 'bot') {
|
|
387
399
|
res.status(400).send('kind must be plan, domain or bot');
|
|
@@ -1103,6 +1115,15 @@ __decorate([
|
|
|
1103
1115
|
__metadata("design:paramtypes", [Object, Object]),
|
|
1104
1116
|
__metadata("design:returntype", Promise)
|
|
1105
1117
|
], OperatorController.prototype, "exportBundle", null);
|
|
1118
|
+
__decorate([
|
|
1119
|
+
Get('sessions/:id/tasks/:taskId/exchange'),
|
|
1120
|
+
__param(0, Param('id')),
|
|
1121
|
+
__param(1, Param('taskId')),
|
|
1122
|
+
__param(2, Res()),
|
|
1123
|
+
__metadata("design:type", Function),
|
|
1124
|
+
__metadata("design:paramtypes", [String, String, Object]),
|
|
1125
|
+
__metadata("design:returntype", Promise)
|
|
1126
|
+
], OperatorController.prototype, "taskExchange", null);
|
|
1106
1127
|
__decorate([
|
|
1107
1128
|
Get('export/:kind'),
|
|
1108
1129
|
__param(0, Param('kind')),
|
|
@@ -27,6 +27,8 @@ import { buildDebugExport } from '../session/debugExport.js';
|
|
|
27
27
|
import { buildPlanExport, buildDomainExport, buildBotExport, buildBundleExport, exportFileName, exportMachine, runScope, taskAtAttempt, taskInRun, withTask, writeAttemptRecord } from '../session/exports.js';
|
|
28
28
|
import { suggestRunName } from '../session/runName.js';
|
|
29
29
|
import { buildStory } from '../session/story.js';
|
|
30
|
+
import { buildTaskExchange } from '../session/taskExchange.js';
|
|
31
|
+
import { chatCode } from '../transport/chatSession.js';
|
|
30
32
|
import { checkPlan } from '../plan/schema.js';
|
|
31
33
|
import { planBrief } from '../plan/brief.js';
|
|
32
34
|
/**
|
|
@@ -985,6 +987,23 @@ let OperatorService = class OperatorService {
|
|
|
985
987
|
: await buildBotExport(scope, cfg.resolved.runsDir, exportMachine(cfg));
|
|
986
988
|
return { fileName: exportFileName(kind, scope.label), content: JSON.stringify(document, null, 2) };
|
|
987
989
|
}
|
|
990
|
+
/**
|
|
991
|
+
* Everything that passed between the bot and Copilot for one task — every message sent, every reply, every
|
|
992
|
+
* command with its whole output — every attempt of it and nothing of the tasks around it (2026-10-18: one JSON per
|
|
993
|
+
* message of the chat). See `taskExchange.ts`.
|
|
994
|
+
*/
|
|
995
|
+
async taskExchange(sessionId, taskId) {
|
|
996
|
+
await this.init();
|
|
997
|
+
const session = await this.store.getSession(sessionId);
|
|
998
|
+
const task = session?.tasks.find((t) => t.id === taskId);
|
|
999
|
+
if (!session || !task)
|
|
1000
|
+
throw new Error('No such task.');
|
|
1001
|
+
const cfg = await this.settings.load();
|
|
1002
|
+
const document = await buildTaskExchange(cfg.resolved.runsDir, session, task);
|
|
1003
|
+
// The conversation's code and the message's place in it, then its first words: findable among a day's files.
|
|
1004
|
+
const label = `${chatCode(session.id)}-${String(session.tasks.indexOf(task) + 1).padStart(2, '0')}-${task.title}`;
|
|
1005
|
+
return { fileName: exportFileName('exchange', label), content: JSON.stringify(document, null, 2) };
|
|
1006
|
+
}
|
|
988
1007
|
/**
|
|
989
1008
|
* All three views of a set of tasks the operator picked by hand, in one file.
|
|
990
1009
|
*
|
|
@@ -759,17 +759,19 @@ export async function runTask(transport, session, task, deps) {
|
|
|
759
759
|
if ((await target.currentChatId().catch(() => null)) !== chat.chatId)
|
|
760
760
|
return;
|
|
761
761
|
nameTries += 1;
|
|
762
|
-
const
|
|
763
|
-
if (!
|
|
762
|
+
const saved = await target.nameChat(chat.chatId, chat.name, { waitMs: 5_000 }).catch(() => false);
|
|
763
|
+
if (!saved)
|
|
764
764
|
return;
|
|
765
|
-
|
|
765
|
+
// The name Copilot took, which may be a shorter form of the one asked for: it is what the chat is found by.
|
|
766
|
+
const { named: _was, ...rest } = chat;
|
|
767
|
+
const done = { ...rest, name: saved };
|
|
766
768
|
session.chat = done;
|
|
767
769
|
await store.updateSession(session.id, (s) => {
|
|
768
770
|
if (s.chat?.chatId === chat.chatId)
|
|
769
|
-
s.chat = { ...s.chat, named: undefined };
|
|
771
|
+
s.chat = { ...s.chat, named: undefined, name: saved };
|
|
770
772
|
}).catch(() => undefined);
|
|
771
773
|
await savePointer(log.path('chat.json'), done).catch(() => undefined);
|
|
772
|
-
sink.event('chat-named-later', { chatId: chat.chatId, name:
|
|
774
|
+
sink.event('chat-named-later', { chatId: chat.chatId, name: saved, tries: nameTries }, `chat named "${saved}" in Copilot's sidebar, now that it is there`);
|
|
773
775
|
};
|
|
774
776
|
const chatOf = transport;
|
|
775
777
|
transport = new Proxy(chatOf, {
|
|
@@ -1583,8 +1585,11 @@ export async function runTask(transport, session, task, deps) {
|
|
|
1583
1585
|
if (chatId) {
|
|
1584
1586
|
// A fresh-chat retry, or any later attempt, says so in the name: the abandoned chat had the same one (live run 2026-10-03).
|
|
1585
1587
|
// Only a retry in a fresh chat is named apart; a first conversation is not, whatever the attempt number.
|
|
1586
|
-
const
|
|
1587
|
-
const
|
|
1588
|
+
const asked = buildChatName(`${chatCode(session.id)}${task.freshRetry ? `/a${attempt}` : ''}`, session.name);
|
|
1589
|
+
const saved = await transport.nameChat(chatId, asked).catch(() => false);
|
|
1590
|
+
const named = saved !== false;
|
|
1591
|
+
// The name Copilot took, which may be a shorter form of the one asked for (see `chatNameForms`).
|
|
1592
|
+
const name = saved || asked;
|
|
1588
1593
|
const chat = {
|
|
1589
1594
|
chatId,
|
|
1590
1595
|
url: `${cfg.copilot.url.replace(/\/chat.*$/, '')}/chat/conversation/${chatId}?es=SSR`,
|
|
@@ -1244,10 +1244,10 @@ export const SYSTEM_GUIDE = [
|
|
|
1244
1244
|
{
|
|
1245
1245
|
key: 'chat.newChat',
|
|
1246
1246
|
kind: 'button',
|
|
1247
|
-
en: 'New
|
|
1248
|
-
bg: 'Нов
|
|
1249
|
-
doesEn: '
|
|
1250
|
-
doesBg: '
|
|
1247
|
+
en: 'New chat',
|
|
1248
|
+
bg: 'Нов чат',
|
|
1249
|
+
doesEn: 'Beside the list: the next message starts a new conversation, in a new Copilot conversation with nothing of this one in it; this one stays in the list.',
|
|
1250
|
+
doesBg: 'До списъка: следващото съобщение започва нов разговор, в нов разговор в Copilot без нищо от този; този остава в списъка.',
|
|
1251
1251
|
},
|
|
1252
1252
|
{
|
|
1253
1253
|
key: 'chat.welcome',
|
|
@@ -1278,8 +1278,8 @@ export const SYSTEM_GUIDE = [
|
|
|
1278
1278
|
kind: 'select',
|
|
1279
1279
|
en: 'Model',
|
|
1280
1280
|
bg: 'Модел',
|
|
1281
|
-
doesEn: 'The model of this conversation (or of the next one): "
|
|
1282
|
-
doesBg: 'Моделът на този разговор (или на следващия): „Както е в Настройки“ или някой, предложен от избора в чата при последното
|
|
1281
|
+
doesEn: 'The model of this conversation (or of the next one): "Set the model by hand" (the run waits after signing in until it is chosen in the Copilot window and "Ready" is pressed, once per conversation), "As in Settings", or one the chat\'s picker offered when last read.',
|
|
1282
|
+
doesBg: 'Моделът на този разговор (или на следващия): „Ръчно задаване на модел“ (след входа пускането чака, докато моделът бъде избран в прозореца на Copilot и се натисне „Готово“, веднъж на разговор), „Както е в Настройки“ или някой, предложен от избора в чата при последното четене.',
|
|
1283
1283
|
},
|
|
1284
1284
|
{
|
|
1285
1285
|
key: 'chat.readModels',
|
|
@@ -1289,6 +1289,14 @@ export const SYSTEM_GUIDE = [
|
|
|
1289
1289
|
doesEn: 'The ↻ beside the model: reads the models Copilot\'s own picker offers now (the browser opens for a moment; not while a conversation works).',
|
|
1290
1290
|
doesBg: '↻ до модела: прочита моделите, които изборът в Copilot предлага сега (браузърът се отваря за момент; не и докато разговор работи).',
|
|
1291
1291
|
},
|
|
1292
|
+
{
|
|
1293
|
+
key: 'chat.exchange',
|
|
1294
|
+
kind: 'link',
|
|
1295
|
+
en: '⤓ JSON',
|
|
1296
|
+
bg: '⤓ JSON',
|
|
1297
|
+
doesEn: 'Under a message: saves everything between the bot and Copilot for that message alone, as a JSON file — every message sent with its files, every reply, every command with its whole output and exit code, every attempt.',
|
|
1298
|
+
doesBg: 'Под съобщение: запазва всичко между бота и Copilot само за това съобщение, като JSON файл — всяко изпратено съобщение с файловете му, всеки отговор, всяка команда с целия ѝ изход и изходен код, всеки опит.',
|
|
1299
|
+
},
|
|
1292
1300
|
{
|
|
1293
1301
|
key: 'chat.rewind',
|
|
1294
1302
|
kind: 'button',
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Everything that passed between the bot and Copilot for one task, as one JSON document.
|
|
3
|
+
*
|
|
4
|
+
* Asked for on 2026-10-18 for the workbench's chat: "a JSON with the whole communication between the bot and
|
|
5
|
+
* Copilot, every terminal command that ran and every response from them — one per task the user gives, not for
|
|
6
|
+
* the whole chat session, only what happened since that message". A task here is one message of the chat (or one
|
|
7
|
+
* task of a session), with every attempt of it in order: the retries in a fresh conversation, the continuations.
|
|
8
|
+
* Nothing from the messages before it or after it.
|
|
9
|
+
*
|
|
10
|
+
* Read from the attempt's run folder, file by file, and nothing is clipped or inferred:
|
|
11
|
+
*
|
|
12
|
+
* - `messages/NN.md` is every message the bot sent into the conversation, in the order it went out, the opening
|
|
13
|
+
* included; the files attached to it are named by the transcript and read from `reports/`;
|
|
14
|
+
* - `replies/NN-<label>.md` is every reply, as it was copied from the chat;
|
|
15
|
+
* - `steps/<iteration>-<step>.log` is every command that ran, with its shell, its folder, its whole output, its
|
|
16
|
+
* exit code and how long it took; the command itself is the one the transcript recorded as proposed, since a
|
|
17
|
+
* command of several lines spills into the log's output;
|
|
18
|
+
* - a step that was not run (refused, skipped) is in the transcript only, and is listed with why;
|
|
19
|
+
* - `checks/` holds the runner's own checks after "done", in the same form as a step;
|
|
20
|
+
* - `review/N/` holds a review round's conversation, in the same form again;
|
|
21
|
+
* - `transcript.jsonl` is the run's own record of everything, kept whole beside the rest as `events`.
|
|
22
|
+
*
|
|
23
|
+
* Each entry's time is its file's creation time (when the runner wrote it, which is when it happened; see
|
|
24
|
+
* `story.ts`), or the transcript's time for what has no file. Entries are in time order.
|
|
25
|
+
*/
|
|
26
|
+
import { readFile, readdir, stat } from 'node:fs/promises';
|
|
27
|
+
import { join } from 'node:path';
|
|
28
|
+
async function createdAt(path) {
|
|
29
|
+
const info = await stat(path).catch(() => null);
|
|
30
|
+
if (!info)
|
|
31
|
+
return undefined;
|
|
32
|
+
return new Date(info.birthtimeMs > 0 ? info.birthtimeMs : info.mtimeMs).toISOString();
|
|
33
|
+
}
|
|
34
|
+
const names = async (dir) => (await readdir(dir).catch(() => [])).sort((a, b) => a.localeCompare(b, undefined, { numeric: true }));
|
|
35
|
+
const text = async (path) => await readFile(path, 'utf8').catch(() => null);
|
|
36
|
+
async function eventsOf(dir) {
|
|
37
|
+
const out = [];
|
|
38
|
+
for (const line of ((await text(join(dir, 'transcript.jsonl'))) ?? '').split('\n')) {
|
|
39
|
+
if (!line.trim())
|
|
40
|
+
continue;
|
|
41
|
+
try {
|
|
42
|
+
out.push(JSON.parse(line));
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
/* a line cut off by a crash */
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A step's or a check's log: `# step <id> shell=<s> exe=<path> cwd=<dir>`, `# <command>`, the output, and the footer
|
|
52
|
+
* `# outcome=<o> exit=<n> durationMs=<ms>`. With the command as proposed, the lines of a command of several lines
|
|
53
|
+
* are taken off the front of the output, where the log put them.
|
|
54
|
+
*/
|
|
55
|
+
export function readStepLog(log, proposed) {
|
|
56
|
+
const lines = log.replace(/\r\n/g, '\n').split('\n');
|
|
57
|
+
const head = /^# step \S+ shell=(\S+) exe=.*? cwd=(.*)$/.exec(lines[0] ?? '');
|
|
58
|
+
let command = (lines[1] ?? '').replace(/^# /, '');
|
|
59
|
+
let body = lines.slice(2);
|
|
60
|
+
const more = proposed?.replace(/\r\n/g, '\n').split('\n') ?? [];
|
|
61
|
+
if (more.length > 1 && more[0] === command && more.slice(1).every((l, i) => body[i] === l)) {
|
|
62
|
+
command = more.join('\n');
|
|
63
|
+
body = body.slice(more.length - 1);
|
|
64
|
+
}
|
|
65
|
+
const footerAt = body.map((l) => /^# outcome=(\S+) exit=(-?\d+) durationMs=(\d+)/.test(l)).lastIndexOf(true);
|
|
66
|
+
const footer = footerAt >= 0 ? /^# outcome=(\S+) exit=(-?\d+) durationMs=(\d+)/.exec(body[footerAt]) : null;
|
|
67
|
+
if (footerAt >= 0)
|
|
68
|
+
body = body.slice(0, footerAt);
|
|
69
|
+
return {
|
|
70
|
+
...(head ? { shell: head[1], cwd: head[2].trim() } : {}),
|
|
71
|
+
command,
|
|
72
|
+
output: body.join('\n').replace(/^\n+|\n+$/g, ''),
|
|
73
|
+
...(footer ? { outcome: footer[1], exitCode: Number(footer[2]), durationMs: Number(footer[3]) } : {}),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/** The commands the transcript recorded as proposed, by step number, in order: `[shell] command` taken apart. */
|
|
77
|
+
function proposals(events) {
|
|
78
|
+
return events
|
|
79
|
+
.filter((e) => e.type === 'step-proposed' && typeof e.description === 'string')
|
|
80
|
+
.map((e) => {
|
|
81
|
+
const m = /^\[([^\]]+)\] ([\s\S]*)$/.exec(e.description);
|
|
82
|
+
return { at: e.at, step: Number(e.id), ...(m ? { shell: m[1], command: m[2] } : { command: e.description }) };
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/** The commands of a folder of step logs, each with the command as proposed when the transcript has it. */
|
|
86
|
+
async function commandsIn(dir, proposed) {
|
|
87
|
+
const out = [];
|
|
88
|
+
for (const name of await names(dir)) {
|
|
89
|
+
const m = /^(\d+)-(\d+)\.log$/.exec(name);
|
|
90
|
+
if (!m)
|
|
91
|
+
continue;
|
|
92
|
+
const at = await createdAt(join(dir, name));
|
|
93
|
+
const step = Number(m[2]);
|
|
94
|
+
// The latest proposal of this step number before its log was opened: step numbers start again each round.
|
|
95
|
+
const before = proposed.filter((p) => p.step === step && (!at || !p.at || p.at <= at)).at(-1);
|
|
96
|
+
out.push({ kind: 'command', at, iteration: Number(m[1]), step, ...readStepLog((await text(join(dir, name))) ?? '', before?.command) });
|
|
97
|
+
}
|
|
98
|
+
return out;
|
|
99
|
+
}
|
|
100
|
+
/** The steps that were not run, from the transcript: refused by the runner or the operator, or skipped after one was. */
|
|
101
|
+
function notRun(events, proposed) {
|
|
102
|
+
return events
|
|
103
|
+
.filter((e) => e.type === 'step-skipped')
|
|
104
|
+
.map((e) => {
|
|
105
|
+
const step = Number(e.id);
|
|
106
|
+
const at = e.at;
|
|
107
|
+
const before = proposed.filter((p) => p.step === step && (!at || !p.at || p.at <= at)).at(-1);
|
|
108
|
+
return { kind: 'not-run', at, step, ...(before ? { command: before.command } : {}), reason: String(e.reason ?? ''), ...(e.by ? { by: String(e.by) } : {}) };
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async function checksIn(dir, under = '') {
|
|
112
|
+
const out = [];
|
|
113
|
+
for (const name of await names(dir)) {
|
|
114
|
+
const path = join(dir, name);
|
|
115
|
+
if ((await stat(path).catch(() => null))?.isDirectory()) {
|
|
116
|
+
out.push(...(await checksIn(path, `${under}${name}/`)));
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
if (!name.endsWith('.txt') && !name.endsWith('.log'))
|
|
120
|
+
continue;
|
|
121
|
+
out.push({ kind: 'check', at: await createdAt(path), file: `${under}${name}`, ...readStepLog((await text(path)) ?? '') });
|
|
122
|
+
}
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
const byTime = (a, b) => (a.at ?? '').localeCompare(b.at ?? '');
|
|
126
|
+
/** A review round's own conversation: the brief and the results it was sent, its replies, the commands it ran. */
|
|
127
|
+
async function reviewRound(dir, round) {
|
|
128
|
+
const entries = [];
|
|
129
|
+
let n = 0;
|
|
130
|
+
for (const name of await names(dir)) {
|
|
131
|
+
const path = join(dir, name);
|
|
132
|
+
if (name === '00-brief.md' || /^iteration-\d+\.txt$/.test(name) || name === 'findings-sent.md') {
|
|
133
|
+
n += 1;
|
|
134
|
+
entries.push({ kind: 'sent', at: await createdAt(path), n, text: (await text(path)) ?? '', attachments: [] });
|
|
135
|
+
}
|
|
136
|
+
else if (name === '00-opening.md' || /^\d+-review\.md$/.test(name)) {
|
|
137
|
+
entries.push({ kind: 'reply', at: await createdAt(path), n: entries.filter((e) => e.kind === 'reply').length + 1, label: name.replace(/\.md$/, ''), text: (await text(path)) ?? '' });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
entries.push(...(await commandsIn(join(dir, 'steps'), [])));
|
|
141
|
+
entries.sort(byTime);
|
|
142
|
+
return { kind: 'review', at: entries[0]?.at, round, entries };
|
|
143
|
+
}
|
|
144
|
+
/** One attempt, from its run folder. */
|
|
145
|
+
export async function readAttempt(runsDir, runId) {
|
|
146
|
+
const dir = join(runsDir, runId);
|
|
147
|
+
const events = await eventsOf(dir);
|
|
148
|
+
const proposed = proposals(events);
|
|
149
|
+
const entries = [];
|
|
150
|
+
// The files each message carried, by the number the transcript gives the message.
|
|
151
|
+
const attachedTo = new Map();
|
|
152
|
+
for (const e of events) {
|
|
153
|
+
if (e.type === 'message-sent' && typeof e.n === 'number' && Array.isArray(e.attachments))
|
|
154
|
+
attachedTo.set(e.n, e.attachments.map(String));
|
|
155
|
+
}
|
|
156
|
+
for (const name of await names(join(dir, 'messages'))) {
|
|
157
|
+
const m = /^(\d+)\.md$/.exec(name);
|
|
158
|
+
if (!m)
|
|
159
|
+
continue;
|
|
160
|
+
const n = Number(m[1]);
|
|
161
|
+
const attachments = [];
|
|
162
|
+
for (const file of attachedTo.get(n) ?? []) {
|
|
163
|
+
attachments.push({ name: file, text: (await text(join(dir, 'reports', file))) ?? (await text(join(dir, file))) });
|
|
164
|
+
}
|
|
165
|
+
entries.push({ kind: 'sent', at: await createdAt(join(dir, 'messages', name)), n, text: (await text(join(dir, 'messages', name))) ?? '', attachments });
|
|
166
|
+
}
|
|
167
|
+
let replies = 0;
|
|
168
|
+
for (const name of await names(join(dir, 'replies'))) {
|
|
169
|
+
const m = /^(\d+)-(.+)\.md$/.exec(name);
|
|
170
|
+
if (!m)
|
|
171
|
+
continue;
|
|
172
|
+
replies += 1;
|
|
173
|
+
entries.push({ kind: 'reply', at: await createdAt(join(dir, 'replies', name)), n: Number(m[1]), label: m[2], text: (await text(join(dir, 'replies', name))) ?? '' });
|
|
174
|
+
}
|
|
175
|
+
const commands = await commandsIn(join(dir, 'steps'), proposed);
|
|
176
|
+
entries.push(...commands, ...notRun(events, proposed), ...(await checksIn(join(dir, 'checks'))));
|
|
177
|
+
for (const name of await names(join(dir, 'review'))) {
|
|
178
|
+
if (/^\d+$/.test(name))
|
|
179
|
+
entries.push(await reviewRound(join(dir, 'review', name), Number(name)));
|
|
180
|
+
}
|
|
181
|
+
entries.sort(byTime);
|
|
182
|
+
const pointer = JSON.parse((await text(join(dir, 'chat.json'))) ?? 'null');
|
|
183
|
+
return {
|
|
184
|
+
runId,
|
|
185
|
+
conversation: pointer?.chatId ? { chatId: pointer.chatId, ...(pointer.name ? { name: pointer.name } : {}), ...(pointer.url ? { url: pointer.url } : {}) } : null,
|
|
186
|
+
counts: {
|
|
187
|
+
sent: entries.filter((e) => e.kind === 'sent').length,
|
|
188
|
+
replies,
|
|
189
|
+
commands: commands.length,
|
|
190
|
+
failed: commands.filter((c) => c.outcome !== undefined && (c.outcome !== 'completed' || c.exitCode !== 0)).length,
|
|
191
|
+
notRun: entries.filter((e) => e.kind === 'not-run').length,
|
|
192
|
+
checks: entries.filter((e) => e.kind === 'check').length,
|
|
193
|
+
},
|
|
194
|
+
entries,
|
|
195
|
+
events,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
/** Every attempt of the task, oldest first, each read from its own run folder. */
|
|
199
|
+
export async function buildTaskExchange(runsDir, session, task, now = new Date()) {
|
|
200
|
+
const attempts = [];
|
|
201
|
+
const earlier = task.attempts ?? [];
|
|
202
|
+
for (const [i, a] of earlier.entries()) {
|
|
203
|
+
if (!a.runId)
|
|
204
|
+
continue;
|
|
205
|
+
attempts.push({ attempt: i + 1, status: a.status, startedAt: a.startedAt, finishedAt: a.finishedAt, summary: a.summary, reason: a.reason, ...(await readAttempt(runsDir, a.runId)) });
|
|
206
|
+
}
|
|
207
|
+
if (task.runId && !earlier.some((a) => a.runId === task.runId)) {
|
|
208
|
+
attempts.push({ attempt: task.attempt ?? earlier.length + 1, status: task.status, startedAt: task.startedAt, finishedAt: task.finishedAt, summary: task.summary, reason: task.reason, ...(await readAttempt(runsDir, task.runId)) });
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
format: 'copilot-operator.task-exchange',
|
|
212
|
+
version: 1,
|
|
213
|
+
exportedAt: now.toISOString(),
|
|
214
|
+
session: { id: session.id, name: session.name, ...(session.kind ? { kind: session.kind } : {}), ...(session.projectDir ? { projectDir: session.projectDir } : {}) },
|
|
215
|
+
task: {
|
|
216
|
+
id: task.id,
|
|
217
|
+
title: task.title,
|
|
218
|
+
message: task.prompt,
|
|
219
|
+
status: task.status,
|
|
220
|
+
...(task.reason ? { reason: task.reason } : {}),
|
|
221
|
+
...(task.summary ? { summary: task.summary } : {}),
|
|
222
|
+
createdAt: task.createdAt,
|
|
223
|
+
...(task.startedAt ? { startedAt: task.startedAt } : {}),
|
|
224
|
+
...(task.finishedAt ? { finishedAt: task.finishedAt } : {}),
|
|
225
|
+
notes: (task.notes ?? []).map((x) => ({ text: x.text, at: x.at, ...(x.sentAt ? { sentAt: x.sentAt } : {}) })),
|
|
226
|
+
changedFiles: (task.vcs?.files ?? []).map((f) => f.path),
|
|
227
|
+
},
|
|
228
|
+
attempts,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
@@ -60,6 +60,43 @@ export function buildChatName(runId, label) {
|
|
|
60
60
|
.slice(0, room);
|
|
61
61
|
return (prefix + clean).replace(/\/$/, '').slice(0, MAX_CHAT_NAME);
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* The forms of a chat name to offer Copilot's rename dialog, longest first, each shorter than the one before.
|
|
65
|
+
*
|
|
66
|
+
* The dialog refuses a name it counts as longer than 50 characters, and its count is not always this file's: the
|
|
67
|
+
* operator saw the bot try to save a longer one (2026-09-30, again 2026-10-17), while every name made here is 50
|
|
68
|
+
* UTF-16 units at most. A counter of UTF-8 bytes takes a Cyrillic letter as two, so a Bulgarian session's name of 50
|
|
69
|
+
* letters is a hundred to it. Rather than guess which count the page keeps, the dialog is offered these in turn and
|
|
70
|
+
* the first it takes is the chat's name (see `nameChat`): 50 letters, cut whole (a letter outside the BMP is not
|
|
71
|
+
* split in two); 50 bytes of UTF-8; the same in ASCII alone; the prefix and the session code alone, `op/<code>`,
|
|
72
|
+
* which is what makes the chat findable and which every count agrees is short.
|
|
73
|
+
*/
|
|
74
|
+
export function chatNameForms(name) {
|
|
75
|
+
const forms = [];
|
|
76
|
+
const add = (form) => {
|
|
77
|
+
const tidy = form.replace(/[-._/]+$/, '');
|
|
78
|
+
if (tidy && !forms.includes(tidy))
|
|
79
|
+
forms.push(tidy);
|
|
80
|
+
};
|
|
81
|
+
const letters = (s, n) => Array.from(s).slice(0, n).join('');
|
|
82
|
+
const bytes = (s, n) => {
|
|
83
|
+
let out = '';
|
|
84
|
+
for (const ch of s) {
|
|
85
|
+
if (Buffer.byteLength(out + ch, 'utf8') > n)
|
|
86
|
+
break;
|
|
87
|
+
out += ch;
|
|
88
|
+
}
|
|
89
|
+
return out;
|
|
90
|
+
};
|
|
91
|
+
const ascii = name.normalize('NFKD').replace(/[^\x20-\x7e]/g, '').replace(/-{2,}/g, '-').replace(/\/-+/g, '/');
|
|
92
|
+
add(letters(name, MAX_CHAT_NAME));
|
|
93
|
+
add(bytes(name, MAX_CHAT_NAME));
|
|
94
|
+
add(bytes(ascii, MAX_CHAT_NAME));
|
|
95
|
+
const code = /^op\/[a-z0-9]+(?:\/a\d+)?/i.exec(name)?.[0];
|
|
96
|
+
if (code)
|
|
97
|
+
add(code);
|
|
98
|
+
return forms;
|
|
99
|
+
}
|
|
63
100
|
/** Compact run id, e.g. `20260917-1912`. Stable, sortable, short enough to fit the name. */
|
|
64
101
|
export function makeRunId(now = new Date()) {
|
|
65
102
|
const p = (n) => String(n).padStart(2, '0');
|
|
@@ -18,7 +18,7 @@ import { findRecentCrash, describeCrash } from './edgeCrash.js';
|
|
|
18
18
|
import { landed } from './acceptance.js';
|
|
19
19
|
import { Blocker, Css, Label, Model, ModelPicking, OperatorModelLocators, Rename, Sidebar, Signal, Surface, TestId, Upload, Url } from './locators.js';
|
|
20
20
|
import { acquireProfileLock } from './profileLock.js';
|
|
21
|
-
import { parseChatId } from './chatSession.js';
|
|
21
|
+
import { chatNameForms, parseChatId } from './chatSession.js';
|
|
22
22
|
/**
|
|
23
23
|
* The chat did not finish a reply within `copilot.replyTimeoutSec`.
|
|
24
24
|
*
|
|
@@ -558,6 +558,10 @@ Current URL: ${url}`);
|
|
|
558
558
|
* Renames the current conversation. The sidebar row's overflow menu holds "Rename", the
|
|
559
559
|
* dialog holds an input and a Save button, and Enter does not submit it.
|
|
560
560
|
*/
|
|
561
|
+
/**
|
|
562
|
+
* Renames the conversation in Copilot's sidebar. Returns the name it now has — the one asked for, or a shorter form
|
|
563
|
+
* of it when Copilot's dialog refused that one (see `chatNameForms`) — or false when it could not be renamed.
|
|
564
|
+
*/
|
|
561
565
|
async nameChat(chatId, name, opts = {}) {
|
|
562
566
|
const row = this.p.locator(`${Sidebar.conversationLink}[href*="${chatId}"]`).first();
|
|
563
567
|
// Waited for, like everything below: a new chat's row appears in the sidebar some seconds after the
|
|
@@ -604,10 +608,33 @@ Current URL: ${url}`);
|
|
|
604
608
|
opened = false;
|
|
605
609
|
const input = this.p.locator(Rename.input);
|
|
606
610
|
await input.waitFor({ state: 'visible', timeout: 10_000 });
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
+
const save = this.p.getByRole('button', { name: Rename.saveText, exact: true }).first();
|
|
612
|
+
/*
|
|
613
|
+
* Offered in shorter forms until the dialog takes one. Copilot refuses a name it counts as longer than 50
|
|
614
|
+
* characters, by a count that is not always ours, and its dialog then stays open over the chat (2026-10-17: "the
|
|
615
|
+
* bot tries to save a chat name longer than 50 characters, and it breaks its logic"). A dialog that takes none is
|
|
616
|
+
* closed with Cancel, never left standing.
|
|
617
|
+
*/
|
|
618
|
+
let wanted = null;
|
|
619
|
+
const refused = [];
|
|
620
|
+
for (const form of chatNameForms(name)) {
|
|
621
|
+
await input.fill(form);
|
|
622
|
+
await this.press(save);
|
|
623
|
+
if (await this.renameTaken(input, save)) {
|
|
624
|
+
wanted = form;
|
|
625
|
+
break;
|
|
626
|
+
}
|
|
627
|
+
refused.push(form);
|
|
628
|
+
this.emit('chat-name-refused', { chatId, name: form, says: await this.renameSays(input) });
|
|
629
|
+
}
|
|
630
|
+
if (wanted === null) {
|
|
631
|
+
await this.press(this.p.getByRole('button', { name: Rename.cancelText, exact: true }).first()).catch(() => undefined);
|
|
632
|
+
await input.waitFor({ state: 'detached', timeout: 3_000 }).catch(async () => {
|
|
633
|
+
await this.p.keyboard.press('Escape').catch(() => undefined);
|
|
634
|
+
});
|
|
635
|
+
this.emit('chat-name-failed', { chatId, name, error: `Copilot's rename dialog took none of ${refused.map((f) => `"${f}"`).join(', ')}; it was closed with Cancel` });
|
|
636
|
+
return false;
|
|
637
|
+
}
|
|
611
638
|
// Named only when the sidebar says so: its row's label is the chat's name.
|
|
612
639
|
const shows = async () => ((await row.getAttribute('aria-label').catch(() => null)) ?? '').trim();
|
|
613
640
|
const deadline = Date.now() + 8_000;
|
|
@@ -617,8 +644,8 @@ Current URL: ${url}`);
|
|
|
617
644
|
this.emit('chat-name-failed', { chatId, name, error: `the sidebar still shows "${await shows()}"` });
|
|
618
645
|
return false;
|
|
619
646
|
}
|
|
620
|
-
this.emit('chat-named', { chatId, name });
|
|
621
|
-
return
|
|
647
|
+
this.emit('chat-named', { chatId, name: wanted, ...(wanted !== name ? { asked: name } : {}) });
|
|
648
|
+
return wanted;
|
|
622
649
|
}
|
|
623
650
|
catch (e) {
|
|
624
651
|
this.emit('chat-name-failed', { chatId, name, error: e.message });
|
|
@@ -631,6 +658,32 @@ Current URL: ${url}`);
|
|
|
631
658
|
await this.dismissOpenMenu();
|
|
632
659
|
}
|
|
633
660
|
}
|
|
661
|
+
/**
|
|
662
|
+
* Whether the rename dialog took the name it was given: it closes. A refusal it shows — the input marked invalid,
|
|
663
|
+
* an alert in the dialog, the Save button disabled — ends the wait at once; one it does not show, after ten seconds.
|
|
664
|
+
*/
|
|
665
|
+
async renameTaken(input, save) {
|
|
666
|
+
const deadline = Date.now() + 10_000;
|
|
667
|
+
while (Date.now() < deadline) {
|
|
668
|
+
if ((await input.count().catch(() => 0)) === 0 || !(await input.isVisible().catch(() => false)))
|
|
669
|
+
return true;
|
|
670
|
+
const shown = await input
|
|
671
|
+
.evaluate((el) => {
|
|
672
|
+
const box = el.closest('[role="dialog"]') ?? el.parentElement;
|
|
673
|
+
return el.getAttribute('aria-invalid') === 'true' || !!box?.querySelector('[role="alert"]');
|
|
674
|
+
})
|
|
675
|
+
.catch(() => false);
|
|
676
|
+
if (shown || (await save.isDisabled().catch(() => false)))
|
|
677
|
+
return false;
|
|
678
|
+
await this.p.waitForTimeout(250);
|
|
679
|
+
}
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
682
|
+
/** What the rename dialog says, for the record of a refusal. */
|
|
683
|
+
async renameSays(input) {
|
|
684
|
+
const text = await input.evaluate((el) => (el.closest('[role="dialog"]') ?? el.parentElement)?.textContent ?? '').catch(() => '');
|
|
685
|
+
return text.replace(/\s+/g, ' ').trim().slice(0, 300);
|
|
686
|
+
}
|
|
634
687
|
/**
|
|
635
688
|
* Clicks an element: with the mouse when it can reach it, else on the element itself. A short wait
|
|
636
689
|
* for the mouse, not the page's minute: in the sidebar another element lies over the target and
|
package/dist/web/404.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--nLLy7_v8M5YRGIMtuTvMJ--><html lang="en" data-theme="light" data-textsize="normal" data-contrast="normal" data-motion="normal" data-links="plain" data-focus="normal"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/ddb518572ea43e30.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js"/><script src="/_next/static/chunks/c7879cf7-b5ab1053c1d9a2e7.js" async=""></script><script src="/_next/static/chunks/131-bae98f790a541679.js" async=""></script><script src="/_next/static/chunks/main-app-e3a5f713ba31557e.js" async=""></script><script src="/_next/static/chunks/197-f7c33a0114fc3db3.js" async=""></script><script src="/_next/static/chunks/867-b159f25612da5cbc.js" async=""></script><script src="/_next/static/chunks/549-a4473e9519a97026.js" async=""></script><script src="/_next/static/chunks/499-751e0be9d4f86e2d.js" async=""></script><script src="/_next/static/chunks/app/layout-485ce9395cb17998.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>copilot-operator</title><meta name="description" content="Runs task loops with Microsoft 365 Copilot on this machine."/><script>
|
|
2
2
|
(function () {
|
|
3
3
|
try {
|
|
4
4
|
var d = document.documentElement;
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
d.dataset.focus = a.strongFocus ? 'strong' : 'normal';
|
|
14
14
|
} catch (e) {}
|
|
15
15
|
})();
|
|
16
|
-
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M3 4h18v16H3zM9 4v16M3 15h6" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Workbench</span></a><a href="/sessions"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8078,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fb52be342fa64e5.js\",\"549\",\"static/chunks/549-8732dd2c1339bc5d.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"AppearanceProvider\"]\n3:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fb52be342fa64e5.js\",\"549\",\"static/chunks/549-8732dd2c1339bc5d.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"LanguageProvider\"]\n4:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fb52be342fa64e5.js\",\"549\",\"static/chunks/549-8732dd2c1339bc5d.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"DialogHost\"]\n5:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fb52be342fa64e5.js\",\"549\",\"static/chunks/549-8732dd2c1339bc5d.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"SkipLink\"]\n6:I[966,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fb52be342fa64e5.js\",\"549\",\"static/chunks/549-8732dd2c1339bc5d.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"Shell\"]\n7:I[5204,[],\"\"]\n8:I[2642,[],\"\"]\n9:I[7712,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fb52be342fa64e5.js\",\"549\",\"static/chunks/549-8732dd2c1339bc5d.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"ScrollJump\"]\na:I[1701,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fb52be342fa64e5.js\",\"549\",\"static/chunks/549-8732dd2c1339bc5d.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"StartDialogHost\"]\nb:I[433,[],\"OutletBoundary\"]\nd:I[9884,[],\"AsyncMetadataOutlet\"]\nf:I[433,[],\"ViewportBoundary\"]\n11:I[433,[],\"MetadataBoundary\"]\n12:\"$Sreact.suspense\"\n14"])</script><script>self.__next_f.push([1,":I[3536,[],\"\"]\n:HL[\"/_next/static/css/70ceb261074b139c.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"uAYbk9CSKPZe3-jWXmPOP\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/70ceb261074b139c.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n(function () {\\n try {\\n var d = document.documentElement;\\n var raw = localStorage.getItem('cop.appearance');\\n var a = raw ? JSON.parse(raw) : {};\\n if (!a || typeof a !== 'object') a = {};\\n d.dataset.theme = a.theme === 'dark' ? 'dark' : 'light';\\n d.dataset.textsize = [\\\"small\\\",\\\"normal\\\",\\\"large\\\",\\\"huge\\\",\\\"giant\\\"].indexOf(a.textSize) \u003e= 0 ? a.textSize : 'normal';\\n d.dataset.contrast = a.highContrast ? 'high' : 'normal';\\n d.dataset.motion = a.reduceMotion ? 'reduced' : 'normal';\\n d.dataset.links = a.underlineLinks ? 'underline' : 'plain';\\n d.dataset.focus = a.strongFocus ? 'strong' : 'normal';\\n } catch (e) {}\\n})();\\n\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{}],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"$L9\",null,{}],[\"$\",\"$La\",null,{}]]}]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Lb\",null,{\"children\":[\"$Lc\",[\"$\",\"$Ld\",null,{\"promise\":\"$@e\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],null],[\"$\",\"$L11\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$12\",null,{\"fallback\":null,\"children\":\"$L13\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$14\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nc:null\n"])</script><script>self.__next_f.push([1,"e:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"13:\"$e:metadata\"\n"])</script></body></html>
|
|
16
|
+
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M3 4h18v16H3zM9 4v16M3 15h6" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Workbench</span></a><a href="/sessions"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8078,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-b159f25612da5cbc.js\",\"549\",\"static/chunks/549-a4473e9519a97026.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"AppearanceProvider\"]\n3:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-b159f25612da5cbc.js\",\"549\",\"static/chunks/549-a4473e9519a97026.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"LanguageProvider\"]\n4:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-b159f25612da5cbc.js\",\"549\",\"static/chunks/549-a4473e9519a97026.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"DialogHost\"]\n5:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-b159f25612da5cbc.js\",\"549\",\"static/chunks/549-a4473e9519a97026.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"SkipLink\"]\n6:I[966,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-b159f25612da5cbc.js\",\"549\",\"static/chunks/549-a4473e9519a97026.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"Shell\"]\n7:I[5204,[],\"\"]\n8:I[2642,[],\"\"]\n9:I[7712,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-b159f25612da5cbc.js\",\"549\",\"static/chunks/549-a4473e9519a97026.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"ScrollJump\"]\na:I[1701,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-b159f25612da5cbc.js\",\"549\",\"static/chunks/549-a4473e9519a97026.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-485ce9395cb17998.js\"],\"StartDialogHost\"]\nb:I[433,[],\"OutletBoundary\"]\nd:I[9884,[],\"AsyncMetadataOutlet\"]\nf:I[433,[],\"ViewportBoundary\"]\n11:I[433,[],\"MetadataBoundary\"]\n12:\"$Sreact.suspense\"\n14"])</script><script>self.__next_f.push([1,":I[3536,[],\"\"]\n:HL[\"/_next/static/css/ddb518572ea43e30.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"nLLy7-v8M5YRGIMtuTvMJ\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/ddb518572ea43e30.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n(function () {\\n try {\\n var d = document.documentElement;\\n var raw = localStorage.getItem('cop.appearance');\\n var a = raw ? JSON.parse(raw) : {};\\n if (!a || typeof a !== 'object') a = {};\\n d.dataset.theme = a.theme === 'dark' ? 'dark' : 'light';\\n d.dataset.textsize = [\\\"small\\\",\\\"normal\\\",\\\"large\\\",\\\"huge\\\",\\\"giant\\\"].indexOf(a.textSize) \u003e= 0 ? a.textSize : 'normal';\\n d.dataset.contrast = a.highContrast ? 'high' : 'normal';\\n d.dataset.motion = a.reduceMotion ? 'reduced' : 'normal';\\n d.dataset.links = a.underlineLinks ? 'underline' : 'plain';\\n d.dataset.focus = a.strongFocus ? 'strong' : 'normal';\\n } catch (e) {}\\n})();\\n\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{}],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"$L9\",null,{}],[\"$\",\"$La\",null,{}]]}]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Lb\",null,{\"children\":[\"$Lc\",[\"$\",\"$Ld\",null,{\"promise\":\"$@e\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],null],[\"$\",\"$L11\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$12\",null,{\"fallback\":null,\"children\":\"$L13\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$14\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nc:null\n"])</script><script>self.__next_f.push([1,"e:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"13:\"$e:metadata\"\n"])</script></body></html>
|