copilot-operator 0.1.47 → 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.
Files changed (34) hide show
  1. package/dist/src/api/operator.controller.js +21 -0
  2. package/dist/src/api/operator.service.js +19 -0
  3. package/dist/src/plan/systemGuide.js +14 -6
  4. package/dist/src/session/taskExchange.js +230 -0
  5. package/dist/web/404.html +2 -2
  6. package/dist/web/_next/static/chunks/{549-8732dd2c1339bc5d.js → 549-a4473e9519a97026.js} +1 -1
  7. package/dist/web/_next/static/chunks/867-b159f25612da5cbc.js +1 -0
  8. package/dist/web/_next/static/chunks/app/page-3caf0b02046754a1.js +1 -0
  9. package/dist/web/_next/static/css/{70ceb261074b139c.css → ddb518572ea43e30.css} +1 -1
  10. package/dist/web/appearance.html +2 -2
  11. package/dist/web/appearance.txt +10 -10
  12. package/dist/web/defaults.html +2 -2
  13. package/dist/web/defaults.txt +10 -10
  14. package/dist/web/history.html +2 -2
  15. package/dist/web/history.txt +10 -10
  16. package/dist/web/import.html +2 -2
  17. package/dist/web/import.txt +10 -10
  18. package/dist/web/index.html +2 -2
  19. package/dist/web/index.txt +10 -10
  20. package/dist/web/level1.html +2 -2
  21. package/dist/web/level1.txt +10 -10
  22. package/dist/web/presets.html +2 -2
  23. package/dist/web/presets.txt +10 -10
  24. package/dist/web/sessions/view.html +2 -2
  25. package/dist/web/sessions/view.txt +10 -10
  26. package/dist/web/sessions.html +2 -2
  27. package/dist/web/sessions.txt +10 -10
  28. package/dist/web/system.html +2 -2
  29. package/dist/web/system.txt +10 -10
  30. package/package.json +1 -1
  31. package/dist/web/_next/static/chunks/867-7fb52be342fa64e5.js +0 -1
  32. package/dist/web/_next/static/chunks/app/page-ed6a5a2ff1b6285e.js +0 -1
  33. /package/dist/web/_next/static/{HT6yqFoDPOXChAZVDxshC → nLLy7-v8M5YRGIMtuTvMJ}/_buildManifest.js +0 -0
  34. /package/dist/web/_next/static/{HT6yqFoDPOXChAZVDxshC → 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
  *
@@ -1244,10 +1244,10 @@ export const SYSTEM_GUIDE = [
1244
1244
  {
1245
1245
  key: 'chat.newChat',
1246
1246
  kind: 'button',
1247
- en: 'New conversation',
1248
- bg: 'Нов разговор',
1249
- doesEn: 'The + beside the list: starts a new conversation.',
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): "As in Settings" or one the chat\'s picker offered when last read; it is chosen in Copilot when the next message runs.',
1282
- doesBg: 'Моделът на този разговор (или на следващия): „Както е в Настройки“ или някой, предложен от избора в чата при последното четене; избира се в Copilot, когато тръгне следващото съобщение.',
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
+ }
package/dist/web/404.html CHANGED
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><!--HT6yqFoDPOXChAZVDxshC--><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/70ceb261074b139c.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-7fb52be342fa64e5.js" async=""></script><script src="/_next/static/chunks/549-8732dd2c1339bc5d.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>
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,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;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\":\"HT6yqFoDPOXChAZVDxshC\",\"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,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;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>
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[549],{5549:(t,o,e)=>{e.d(o,{AV:()=>a,Dh:()=>u,FH:()=>m,FZ:()=>r,Zm:()=>h,aT:()=>s,c5:()=>f,dK:()=>l,nC:()=>n,rt:()=>d,ub:()=>i,zi:()=>y});let n="/api";function s(t,o){return"/sessions/view?id=".concat(encodeURIComponent(t)).concat(o?"#".concat(o):"")}let c="cop-api-token";function a(){try{let t=/(?:^#|&)token=([0-9a-f]{16,})/i.exec(window.location.hash);if(t)return window.localStorage.setItem(c,t[1]),window.history.replaceState(null,"",window.location.pathname+window.location.search),t[1];return window.localStorage.getItem(c)||""}catch(t){return""}}function i(t){let o=a();return o?"".concat(t).concat(t.includes("?")?"&":"?","token=").concat(encodeURIComponent(o)):t}let r=["exit-zero","exit-nonzero","output-contains","output-omits","output-matches","file-exists","file-missing","file-contains"];function d(t){return t.startsWith("exit-")||t.startsWith("output-")}function l(t){return"output-contains"===t||"output-omits"===t||"output-matches"===t||"file-contains"===t}function h(t){return"limit-reached"===t.status||"aborted"===t.status||!!t.limit&&("failed"===t.status||"blocked"===t.status)}function u(t){return("failed"===t.status||"blocked"===t.status)&&"contract-conflict"!==t.stopCode}async function p(t,o){let e,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=void 0===s.timeoutMs?3e4:s.timeoutMs;try{var i;e=await fetch("".concat(n).concat(t),{...o,...null!==c&&!(null==o?void 0:o.signal)?{signal:AbortSignal.timeout(c)}:{},headers:{"content-type":"application/json",...a()?{"x-cop-token":a()}:{},...null!=(i=null==o?void 0:o.headers)?i:{}}})}catch(o){if("TimeoutError"===o.name)throw Error("The API did not answer within ".concat(Math.round((null!=c?c:0)/1e3)," s (").concat(t.split("?")[0],"). It may be busy; try again."));throw o}if(!e.ok){let t="".concat(e.status," ").concat(e.statusText);try{let o=await e.json();(null==o?void 0:o.message)&&(t=Array.isArray(o.message)?o.message.join("; "):o.message)}catch(t){}throw Error(t)}let r=await e.text();return r?JSON.parse(r):void 0}let m={health:()=>p("/health"),doctor:()=>p("/doctor"),settings:()=>p("/settings"),saveSettings:t=>p("/settings",{method:"PUT",body:JSON.stringify(t)}),level1:()=>p("/level1"),setLevel1:t=>p("/level1",{method:"PUT",body:JSON.stringify({content:t})}),resetLevel1:()=>p("/level1",{method:"DELETE"}),presets:()=>p("/presets"),savePreset:(t,o)=>p("/presets/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:o})}),deletePreset:t=>p("/presets/".concat(encodeURIComponent(t)),{method:"DELETE"}),personas:()=>p("/personas"),savePersona:(t,o)=>p("/personas/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:o})}),deletePersona:t=>p("/personas/".concat(encodeURIComponent(t)),{method:"DELETE"}),sessions:()=>p("/sessions"),reorderSessions:t=>p("/sessions-order",{method:"PUT",body:JSON.stringify({ids:t})}),metrics:()=>p("/metrics"),preparePreview:function(t){let o=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return p("/repo/prepare/preview",{method:"POST",body:JSON.stringify({dir:t,fetch:o})},{timeoutMs:33e4})},prepareProject:function(t,o){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p("/repo/prepare",{method:"POST",body:JSON.stringify({dir:t,fingerprint:o,...e})})},session:t=>p("/sessions/".concat(t)),createSession:(t,o)=>p("/sessions",{method:"POST",body:JSON.stringify({name:t,projectDir:o})}),updateSession:(t,o)=>p("/sessions/".concat(t),{method:"PUT",body:JSON.stringify(o)}),deleteSession:t=>p("/sessions/".concat(t),{method:"DELETE"}),addTask:(t,o)=>p("/sessions/".concat(t,"/tasks"),{method:"POST",body:JSON.stringify(o)}),updateTask:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o),{method:"PUT",body:JSON.stringify(e)}),deleteTask:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o),{method:"DELETE"}),continueTask:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/continue"),{method:"POST",body:JSON.stringify((null==e?void 0:e.trim())?{instruction:e}:{})}),rerunTask:function(t,o){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p("/sessions/".concat(t,"/tasks/").concat(o,"/rerun"),{method:"POST",body:JSON.stringify({...e,...n.buildOnFinished?{buildOnFinished:!0}:{}})})},taskChanges:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/changes").concat(e?"?run=".concat(encodeURIComponent(e)):"")),taskChangeFile:(t,o,e,n)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/changes/file?path=").concat(encodeURIComponent(e)).concat(n?"&run=".concat(encodeURIComponent(n)):"")),taskStory:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/story").concat(e?"?run=".concat(encodeURIComponent(e)):"")),taskFiles:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/files").concat(e?"?run=".concat(encodeURIComponent(e)):"")),taskLogUrl:(t,o,e)=>"".concat(n,"/sessions/").concat(t,"/tasks/").concat(o,"/log").concat(e?"?run=".concat(encodeURIComponent(e)):""),taskFileUrl:(t,o,e,s,c)=>"".concat(n,"/sessions/").concat(t,"/tasks/").concat(o,"/files/").concat(e,"/").concat(encodeURIComponent(s)).concat(c?"?run=".concat(encodeURIComponent(c)):""),saveTaskLog:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/log").concat(e?"?run=".concat(encodeURIComponent(e)):""),{method:"POST",body:"{}"}),saveTaskFile:(t,o,e,n,s)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/files/").concat(e,"/").concat(encodeURIComponent(n)).concat(s?"?run=".concat(encodeURIComponent(s)):""),{method:"POST",body:"{}"}),start:(t,o,e,n)=>p("/sessions/".concat(t,"/start"),{method:"POST",body:JSON.stringify({mode:o,name:e,starts:n})},{timeoutMs:12e4}),startOptions:t=>p("/start/options?sessions=".concat(encodeURIComponent(t.join(",")))),startFetch:(t,o,e)=>p("/start/fetch",{method:"POST",body:JSON.stringify({dir:t,remote:o,...e?{branches:e}:{}})},{timeoutMs:33e4}),startFailures:function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return p("/start/failures".concat(t?"?unanswered=1":""))},startFailureUrl:t=>i("".concat(n,"/start/failures/").concat(encodeURIComponent(t),"/report")),terminalUrl:()=>i("".concat(n,"/terminal")),stop:t=>p("/sessions/".concat(t,"/stop"),{method:"POST",body:"{}"}),approvals:t=>p("/approvals".concat(t?"?session=".concat(encodeURIComponent(t)):"")),undoPreview:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/undo")),undoTask:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/undo"),{method:"POST",body:JSON.stringify({how:e})}),acceptTask:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/accept"),{method:"POST",body:JSON.stringify((null==e?void 0:e.trim())?{note:e}:{})}),addTaskNote:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/notes"),{method:"POST",body:JSON.stringify({text:e})}),kerriganReport:t=>p("/kerrigan/report",{method:"POST",body:JSON.stringify(t)}),checkChanges:t=>p("/changes/check",{method:"POST",body:JSON.stringify({text:t})}),applyChanges:t=>p("/changes/apply",{method:"POST",body:JSON.stringify({text:t})}),workspace:()=>p("/workspace"),workspaceFiles:()=>p("/workspace/files"),workspaceFile:t=>p("/workspace/file?path=".concat(encodeURIComponent(t))),chatThreads:()=>p("/chat/threads"),chatSend:(t,o,e,n)=>p("/chat",{method:"POST",body:JSON.stringify({text:t,...o?{threadId:o}:{},...e?{model:e}:{},...n?{manualModel:!0}:{}})}),chatRewind:(t,o)=>p("/chat/".concat(t,"/rewind"),{method:"POST",body:JSON.stringify({taskId:o})}),repoTree:function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0;return p("/sessions/".concat(t,"/repo/tree?path=").concat(encodeURIComponent(o)).concat(e?"&task=".concat(encodeURIComponent(e)):""))},repoFile:(t,o,e)=>p("/sessions/".concat(t,"/repo/file?path=").concat(encodeURIComponent(o)).concat(e?"&task=".concat(encodeURIComponent(e)):"")),repoLog:t=>p("/sessions/".concat(t,"/repo/log")),sessionEvents:t=>p("/sessions/".concat(t,"/events")),decidePlan:(t,o,e)=>p("/approvals/".concat(t,"/plan"),{method:"POST",body:JSON.stringify({action:o,...(null==e?void 0:e.trim())?{note:e}:{}})}),decide:(t,o)=>p("/approvals/".concat(t),{method:"POST",body:JSON.stringify({action:o})}),setRunMode:(t,o)=>p("/sessions/".concat(t,"/mode"),{method:"POST",body:JSON.stringify({mode:o})}),streamUrl:t=>i("".concat(n,"/sessions/").concat(t,"/stream")),batch:()=>p("/batch").then(t=>null!=t?t:null),startBatch:(t,o,e,n,s,c,a,i)=>p("/batch/start",{method:"POST",body:JSON.stringify({sessionIds:t,mode:o,onFailure:e,model:n,reviewModel:s,name:c,taskIds:a,starts:i})},{timeoutMs:12e4}),suggestedRunName:t=>p("/batch/name?sessions=".concat(encodeURIComponent(t.join(",")))),stopBatch:()=>p("/batch/stop",{method:"POST",body:"{}"}),pauseBatch:()=>p("/batch/pause",{method:"POST",body:"{}"}),resumeBatch:()=>p("/batch/resume",{method:"POST",body:"{}"}),planBrief:t=>p("/plan/brief?lang=".concat(encodeURIComponent(t))),context:(t,o)=>p("/context/".concat(t,"?lang=").concat(encodeURIComponent(o))),setContext:(t,o)=>p("/context/".concat(t),{method:"PUT",body:JSON.stringify({content:o})}),resetContext:(t,o)=>p("/context/".concat(t,"?lang=").concat(encodeURIComponent(o)),{method:"DELETE"}),checkPlan:t=>p("/plan/check",{method:"POST",body:JSON.stringify({text:t})}),importPlan:t=>p("/plan/import",{method:"POST",body:JSON.stringify({text:t})}),browseFolder:t=>p("/browse-folder",{method:"POST",body:JSON.stringify({start:t})},{timeoutMs:null}),tasks:()=>p("/tasks"),activity:()=>p("/activity"),downloadBundle:async t=>{var o,e,s;let c=await fetch("".concat(n,"/export/bundle"),{method:"POST",headers:{"content-type":"application/json",...a()?{"x-cop-token":a()}:{}},body:JSON.stringify({tasks:t})});if(!c.ok)throw Error(await c.text()||"".concat(c.status," ").concat(c.statusText));let i=null!=(s=c.headers.get("content-disposition"))?s:"",r=null==(o=/filename\*=UTF-8''([^;]+)/i.exec(i))?void 0:o[1],d=null==(e=/filename="([^"]+)"/i.exec(i))?void 0:e[1],l=null!=d?d:"copilot-operator-bundle.json";if(r)try{l=decodeURIComponent(r)}catch(t){}let h=URL.createObjectURL(await c.blob()),u=document.createElement("a");return u.href=h,u.download=l,document.body.appendChild(u),u.click(),u.remove(),setTimeout(()=>URL.revokeObjectURL(h),1e4),l},exportUrl:(t,o)=>{let e=new URLSearchParams;return o.run&&e.set("run",o.run),o.session&&e.set("session",o.session),o.task&&e.set("task",o.task),i("".concat(n,"/export/").concat(t,"?").concat(e.toString()))},debugExportUrl:t=>i("".concat(n,"/debug/export").concat(t.length>0?"?sessions=".concat(encodeURIComponent(t.join(","))):"")),vcsStatus:t=>p("/sessions/".concat(t,"/vcs")),runVcs:t=>p("/batch/vcs?ids=".concat(encodeURIComponent(t.join(",")))),runVcsPrepare:function(t,o,e){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p("/batch/vcs/prepare",{method:"POST",body:JSON.stringify({sessionIds:t,repoDir:o,action:e,choices:n})})},vcsSnapshot:(t,o)=>p("/sessions/".concat(t,"/vcs/snapshot"),{method:"POST",body:JSON.stringify({choices:o})}),restorePreview:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/restore")),restore:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/restore"),{method:"POST",body:"{}"}),contractCheck:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/contract")),applyContractFix:(t,o,e,n)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/contract-fix"),{method:"POST",body:JSON.stringify({choices:e,expect:n})}),restartPlan:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/restart")),restartFrom:function(t,o){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p("/sessions/".concat(t,"/tasks/").concat(o,"/restart"),{method:"POST",body:JSON.stringify(e)})},repoCheck:t=>p("/repo?dir=".concat(encodeURIComponent(t))),project:()=>p("/project"),setProject:t=>p("/project",{method:"PUT",body:JSON.stringify(t)}),models:()=>p("/models"),setDefaultModel:t=>p("/models/default",{method:"PUT",body:JSON.stringify({model:t})}),setDefaultReviewModel:t=>p("/models/review-default",{method:"PUT",body:JSON.stringify({model:t})}),refreshModels:()=>p("/models/refresh",{method:"POST",body:"{}"},{timeoutMs:null}),login:t=>p("/login",{method:"POST",body:JSON.stringify({account:(null==t?void 0:t.trim())||void 0})},{timeoutMs:null})};function y(t){return t<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):"".concat((t/1048576).toFixed(1)," MB")}function f(t){if(void 0===t)return"";let o=Math.round(t/1e3);if(o<60)return"".concat(o,"s");let e=Math.floor(o/60);return e<60?"".concat(e,"m ").concat(o%60,"s"):"".concat(Math.floor(e/60),"h ").concat(e%60,"m")}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[549],{5549:(t,o,e)=>{e.d(o,{AV:()=>a,Dh:()=>u,FH:()=>m,FZ:()=>r,Zm:()=>h,aT:()=>s,c5:()=>f,dK:()=>l,nC:()=>n,rt:()=>d,ub:()=>i,zi:()=>y});let n="/api";function s(t,o){return"/sessions/view?id=".concat(encodeURIComponent(t)).concat(o?"#".concat(o):"")}let c="cop-api-token";function a(){try{let t=/(?:^#|&)token=([0-9a-f]{16,})/i.exec(window.location.hash);if(t)return window.localStorage.setItem(c,t[1]),window.history.replaceState(null,"",window.location.pathname+window.location.search),t[1];return window.localStorage.getItem(c)||""}catch(t){return""}}function i(t){let o=a();return o?"".concat(t).concat(t.includes("?")?"&":"?","token=").concat(encodeURIComponent(o)):t}let r=["exit-zero","exit-nonzero","output-contains","output-omits","output-matches","file-exists","file-missing","file-contains"];function d(t){return t.startsWith("exit-")||t.startsWith("output-")}function l(t){return"output-contains"===t||"output-omits"===t||"output-matches"===t||"file-contains"===t}function h(t){return"limit-reached"===t.status||"aborted"===t.status||!!t.limit&&("failed"===t.status||"blocked"===t.status)}function u(t){return("failed"===t.status||"blocked"===t.status)&&"contract-conflict"!==t.stopCode}async function p(t,o){let e,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=void 0===s.timeoutMs?3e4:s.timeoutMs;try{var i;e=await fetch("".concat(n).concat(t),{...o,...null!==c&&!(null==o?void 0:o.signal)?{signal:AbortSignal.timeout(c)}:{},headers:{"content-type":"application/json",...a()?{"x-cop-token":a()}:{},...null!=(i=null==o?void 0:o.headers)?i:{}}})}catch(o){if("TimeoutError"===o.name)throw Error("The API did not answer within ".concat(Math.round((null!=c?c:0)/1e3)," s (").concat(t.split("?")[0],"). It may be busy; try again."));throw o}if(!e.ok){let t="".concat(e.status," ").concat(e.statusText);try{let o=await e.json();(null==o?void 0:o.message)&&(t=Array.isArray(o.message)?o.message.join("; "):o.message)}catch(t){}throw Error(t)}let r=await e.text();return r?JSON.parse(r):void 0}let m={health:()=>p("/health"),doctor:()=>p("/doctor"),settings:()=>p("/settings"),saveSettings:t=>p("/settings",{method:"PUT",body:JSON.stringify(t)}),level1:()=>p("/level1"),setLevel1:t=>p("/level1",{method:"PUT",body:JSON.stringify({content:t})}),resetLevel1:()=>p("/level1",{method:"DELETE"}),presets:()=>p("/presets"),savePreset:(t,o)=>p("/presets/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:o})}),deletePreset:t=>p("/presets/".concat(encodeURIComponent(t)),{method:"DELETE"}),personas:()=>p("/personas"),savePersona:(t,o)=>p("/personas/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:o})}),deletePersona:t=>p("/personas/".concat(encodeURIComponent(t)),{method:"DELETE"}),sessions:()=>p("/sessions"),reorderSessions:t=>p("/sessions-order",{method:"PUT",body:JSON.stringify({ids:t})}),metrics:()=>p("/metrics"),preparePreview:function(t){let o=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return p("/repo/prepare/preview",{method:"POST",body:JSON.stringify({dir:t,fetch:o})},{timeoutMs:33e4})},prepareProject:function(t,o){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p("/repo/prepare",{method:"POST",body:JSON.stringify({dir:t,fingerprint:o,...e})})},session:t=>p("/sessions/".concat(t)),createSession:(t,o)=>p("/sessions",{method:"POST",body:JSON.stringify({name:t,projectDir:o})}),updateSession:(t,o)=>p("/sessions/".concat(t),{method:"PUT",body:JSON.stringify(o)}),deleteSession:t=>p("/sessions/".concat(t),{method:"DELETE"}),addTask:(t,o)=>p("/sessions/".concat(t,"/tasks"),{method:"POST",body:JSON.stringify(o)}),updateTask:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o),{method:"PUT",body:JSON.stringify(e)}),deleteTask:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o),{method:"DELETE"}),continueTask:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/continue"),{method:"POST",body:JSON.stringify((null==e?void 0:e.trim())?{instruction:e}:{})}),rerunTask:function(t,o){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p("/sessions/".concat(t,"/tasks/").concat(o,"/rerun"),{method:"POST",body:JSON.stringify({...e,...n.buildOnFinished?{buildOnFinished:!0}:{}})})},taskChanges:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/changes").concat(e?"?run=".concat(encodeURIComponent(e)):"")),taskChangeFile:(t,o,e,n)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/changes/file?path=").concat(encodeURIComponent(e)).concat(n?"&run=".concat(encodeURIComponent(n)):"")),taskStory:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/story").concat(e?"?run=".concat(encodeURIComponent(e)):"")),taskFiles:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/files").concat(e?"?run=".concat(encodeURIComponent(e)):"")),taskLogUrl:(t,o,e)=>"".concat(n,"/sessions/").concat(t,"/tasks/").concat(o,"/log").concat(e?"?run=".concat(encodeURIComponent(e)):""),taskFileUrl:(t,o,e,s,c)=>"".concat(n,"/sessions/").concat(t,"/tasks/").concat(o,"/files/").concat(e,"/").concat(encodeURIComponent(s)).concat(c?"?run=".concat(encodeURIComponent(c)):""),saveTaskLog:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/log").concat(e?"?run=".concat(encodeURIComponent(e)):""),{method:"POST",body:"{}"}),saveTaskFile:(t,o,e,n,s)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/files/").concat(e,"/").concat(encodeURIComponent(n)).concat(s?"?run=".concat(encodeURIComponent(s)):""),{method:"POST",body:"{}"}),start:(t,o,e,n)=>p("/sessions/".concat(t,"/start"),{method:"POST",body:JSON.stringify({mode:o,name:e,starts:n})},{timeoutMs:12e4}),startOptions:t=>p("/start/options?sessions=".concat(encodeURIComponent(t.join(",")))),startFetch:(t,o,e)=>p("/start/fetch",{method:"POST",body:JSON.stringify({dir:t,remote:o,...e?{branches:e}:{}})},{timeoutMs:33e4}),startFailures:function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return p("/start/failures".concat(t?"?unanswered=1":""))},startFailureUrl:t=>i("".concat(n,"/start/failures/").concat(encodeURIComponent(t),"/report")),terminalUrl:()=>i("".concat(n,"/terminal")),stop:t=>p("/sessions/".concat(t,"/stop"),{method:"POST",body:"{}"}),approvals:t=>p("/approvals".concat(t?"?session=".concat(encodeURIComponent(t)):"")),undoPreview:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/undo")),undoTask:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/undo"),{method:"POST",body:JSON.stringify({how:e})}),acceptTask:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/accept"),{method:"POST",body:JSON.stringify((null==e?void 0:e.trim())?{note:e}:{})}),addTaskNote:(t,o,e)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/notes"),{method:"POST",body:JSON.stringify({text:e})}),kerriganReport:t=>p("/kerrigan/report",{method:"POST",body:JSON.stringify(t)}),checkChanges:t=>p("/changes/check",{method:"POST",body:JSON.stringify({text:t})}),applyChanges:t=>p("/changes/apply",{method:"POST",body:JSON.stringify({text:t})}),workspace:()=>p("/workspace"),workspaceFiles:()=>p("/workspace/files"),workspaceFile:t=>p("/workspace/file?path=".concat(encodeURIComponent(t))),chatThreads:()=>p("/chat/threads"),chatSend:(t,o,e,n)=>p("/chat",{method:"POST",body:JSON.stringify({text:t,...o?{threadId:o}:{},...e?{model:e}:{},...n?{manualModel:!0}:{}})}),chatRewind:(t,o)=>p("/chat/".concat(t,"/rewind"),{method:"POST",body:JSON.stringify({taskId:o})}),repoTree:function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0;return p("/sessions/".concat(t,"/repo/tree?path=").concat(encodeURIComponent(o)).concat(e?"&task=".concat(encodeURIComponent(e)):""))},repoFile:(t,o,e)=>p("/sessions/".concat(t,"/repo/file?path=").concat(encodeURIComponent(o)).concat(e?"&task=".concat(encodeURIComponent(e)):"")),repoLog:t=>p("/sessions/".concat(t,"/repo/log")),sessionEvents:t=>p("/sessions/".concat(t,"/events")),decidePlan:(t,o,e)=>p("/approvals/".concat(t,"/plan"),{method:"POST",body:JSON.stringify({action:o,...(null==e?void 0:e.trim())?{note:e}:{}})}),decide:(t,o)=>p("/approvals/".concat(t),{method:"POST",body:JSON.stringify({action:o})}),setRunMode:(t,o)=>p("/sessions/".concat(t,"/mode"),{method:"POST",body:JSON.stringify({mode:o})}),streamUrl:t=>i("".concat(n,"/sessions/").concat(t,"/stream")),batch:()=>p("/batch").then(t=>null!=t?t:null),startBatch:(t,o,e,n,s,c,a,i)=>p("/batch/start",{method:"POST",body:JSON.stringify({sessionIds:t,mode:o,onFailure:e,model:n,reviewModel:s,name:c,taskIds:a,starts:i})},{timeoutMs:12e4}),suggestedRunName:t=>p("/batch/name?sessions=".concat(encodeURIComponent(t.join(",")))),stopBatch:()=>p("/batch/stop",{method:"POST",body:"{}"}),pauseBatch:()=>p("/batch/pause",{method:"POST",body:"{}"}),resumeBatch:()=>p("/batch/resume",{method:"POST",body:"{}"}),planBrief:t=>p("/plan/brief?lang=".concat(encodeURIComponent(t))),context:(t,o)=>p("/context/".concat(t,"?lang=").concat(encodeURIComponent(o))),setContext:(t,o)=>p("/context/".concat(t),{method:"PUT",body:JSON.stringify({content:o})}),resetContext:(t,o)=>p("/context/".concat(t,"?lang=").concat(encodeURIComponent(o)),{method:"DELETE"}),checkPlan:t=>p("/plan/check",{method:"POST",body:JSON.stringify({text:t})}),importPlan:t=>p("/plan/import",{method:"POST",body:JSON.stringify({text:t})}),browseFolder:t=>p("/browse-folder",{method:"POST",body:JSON.stringify({start:t})},{timeoutMs:null}),tasks:()=>p("/tasks"),activity:()=>p("/activity"),downloadBundle:async t=>{var o,e,s;let c=await fetch("".concat(n,"/export/bundle"),{method:"POST",headers:{"content-type":"application/json",...a()?{"x-cop-token":a()}:{}},body:JSON.stringify({tasks:t})});if(!c.ok)throw Error(await c.text()||"".concat(c.status," ").concat(c.statusText));let i=null!=(s=c.headers.get("content-disposition"))?s:"",r=null==(o=/filename\*=UTF-8''([^;]+)/i.exec(i))?void 0:o[1],d=null==(e=/filename="([^"]+)"/i.exec(i))?void 0:e[1],l=null!=d?d:"copilot-operator-bundle.json";if(r)try{l=decodeURIComponent(r)}catch(t){}let h=URL.createObjectURL(await c.blob()),u=document.createElement("a");return u.href=h,u.download=l,document.body.appendChild(u),u.click(),u.remove(),setTimeout(()=>URL.revokeObjectURL(h),1e4),l},exportUrl:(t,o)=>{let e=new URLSearchParams;return o.run&&e.set("run",o.run),o.session&&e.set("session",o.session),o.task&&e.set("task",o.task),i("".concat(n,"/export/").concat(t,"?").concat(e.toString()))},taskExchangeUrl:(t,o)=>i("".concat(n,"/sessions/").concat(encodeURIComponent(t),"/tasks/").concat(encodeURIComponent(o),"/exchange")),debugExportUrl:t=>i("".concat(n,"/debug/export").concat(t.length>0?"?sessions=".concat(encodeURIComponent(t.join(","))):"")),vcsStatus:t=>p("/sessions/".concat(t,"/vcs")),runVcs:t=>p("/batch/vcs?ids=".concat(encodeURIComponent(t.join(",")))),runVcsPrepare:function(t,o,e){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p("/batch/vcs/prepare",{method:"POST",body:JSON.stringify({sessionIds:t,repoDir:o,action:e,choices:n})})},vcsSnapshot:(t,o)=>p("/sessions/".concat(t,"/vcs/snapshot"),{method:"POST",body:JSON.stringify({choices:o})}),restorePreview:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/restore")),restore:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/restore"),{method:"POST",body:"{}"}),contractCheck:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/contract")),applyContractFix:(t,o,e,n)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/contract-fix"),{method:"POST",body:JSON.stringify({choices:e,expect:n})}),restartPlan:(t,o)=>p("/sessions/".concat(t,"/tasks/").concat(o,"/restart")),restartFrom:function(t,o){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p("/sessions/".concat(t,"/tasks/").concat(o,"/restart"),{method:"POST",body:JSON.stringify(e)})},repoCheck:t=>p("/repo?dir=".concat(encodeURIComponent(t))),project:()=>p("/project"),setProject:t=>p("/project",{method:"PUT",body:JSON.stringify(t)}),models:()=>p("/models"),setDefaultModel:t=>p("/models/default",{method:"PUT",body:JSON.stringify({model:t})}),setDefaultReviewModel:t=>p("/models/review-default",{method:"PUT",body:JSON.stringify({model:t})}),refreshModels:()=>p("/models/refresh",{method:"POST",body:"{}"},{timeoutMs:null}),login:t=>p("/login",{method:"POST",body:JSON.stringify({account:(null==t?void 0:t.trim())||void 0})},{timeoutMs:null})};function y(t){return t<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):"".concat((t/1048576).toFixed(1)," MB")}function f(t){if(void 0===t)return"";let o=Math.round(t/1e3);if(o<60)return"".concat(o,"s");let e=Math.floor(o/60);return e<60?"".concat(e,"m ").concat(o%60,"s"):"".concat(Math.floor(e/60),"h ").concat(e%60,"m")}}}]);