copilot-operator 0.1.64 → 0.1.67
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 +56 -1
- package/dist/src/api/operator.service.js +418 -54
- package/dist/src/cli.js +1 -0
- package/dist/src/config/schema.js +7 -0
- package/dist/src/exec/authorizer.js +26 -6
- package/dist/src/exec/commandHeads.js +30 -6
- package/dist/src/exec/dangerous.js +12 -0
- package/dist/src/exec/platforms.js +13 -2
- package/dist/src/exec/policy.js +31 -4
- package/dist/src/exec/policyManifest.js +9 -0
- package/dist/src/exec/readOnly.js +158 -0
- package/dist/src/exec/runner.js +75 -2
- package/dist/src/exec/stepEnv.js +13 -2
- package/dist/src/orchestrator/taskRunner.js +16 -3
- package/dist/src/plan/kerrigan.js +34 -6
- package/dist/src/plan/systemGuide.js +199 -0
- package/dist/src/queue/queue.js +65 -4
- package/dist/src/queue/queueBranch.js +66 -0
- package/dist/src/session/compose.js +15 -0
- package/dist/src/session/store.js +4 -0
- package/dist/src/vcs/newBranch.js +241 -0
- package/dist/src/vcs/remoteAuth.js +119 -0
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/chunks/1024-5f630cbb54e7346f.js +1 -0
- package/dist/web/_next/static/chunks/1077.3b82a837cf810f8b.js +1 -0
- package/dist/web/_next/static/chunks/1548.52bfcd01c16aaafe.js +1 -0
- package/dist/web/_next/static/chunks/2163.e60d3be9bb3f8b3f.js +1 -0
- package/dist/web/_next/static/chunks/6262-d074473db83ee798.js +1 -0
- package/dist/web/_next/static/chunks/714.b452ef814760b5a5.js +1 -0
- package/dist/web/_next/static/chunks/7220.96b18052ed9c06c7.js +1 -0
- package/dist/web/_next/static/chunks/7921-dd201ce7aa02c12d.js +1 -0
- package/dist/web/_next/static/chunks/8124-c27ce7bd781f4c56.js +1 -0
- package/dist/web/_next/static/chunks/8584.ab8d406781cdd45c.js +1 -0
- package/dist/web/_next/static/chunks/9067.5b8abc40104d51d9.js +1 -0
- package/dist/web/_next/static/chunks/9747.cf0353e7ffec2ee4.js +1 -0
- package/dist/web/_next/static/chunks/app/{layout-9201c637ca24b2c9.js → layout-5e0e7601702723bb.js} +1 -1
- package/dist/web/_next/static/chunks/app/page-ab73d1b3ba9181c2.js +1 -0
- package/dist/web/_next/static/chunks/app/queue/page-fb49cb2d3dc6d14c.js +1 -0
- package/dist/web/_next/static/chunks/app/settings/page-7d120feb5af0ace9.js +1 -0
- package/dist/web/_next/static/chunks/{webpack-d85f02ecd2903252.js → webpack-23ace264f775d98a.js} +1 -1
- package/dist/web/_next/static/css/532df8667473c4fc.css +1 -0
- package/dist/web/defaults.html +2 -2
- package/dist/web/defaults.txt +8 -8
- package/dist/web/index.html +3 -3
- package/dist/web/index.txt +9 -9
- package/dist/web/queue.html +2 -2
- package/dist/web/queue.txt +9 -9
- package/dist/web/settings.html +2 -2
- package/dist/web/settings.txt +9 -9
- package/dist/web/system.html +2 -2
- package/dist/web/system.txt +9 -9
- package/package.json +5 -2
- package/dist/web/_next/static/chunks/1077.32bfff8490ea3d67.js +0 -1
- package/dist/web/_next/static/chunks/1548.2bbbbb4759fd5073.js +0 -1
- package/dist/web/_next/static/chunks/2163.147b0ca65a65d5dd.js +0 -1
- package/dist/web/_next/static/chunks/714.16070ca6426f260c.js +0 -1
- package/dist/web/_next/static/chunks/7220.f71047baa16e6be0.js +0 -1
- package/dist/web/_next/static/chunks/7921-90ed63bfdf7162f3.js +0 -1
- package/dist/web/_next/static/chunks/8124-5458b17433987fab.js +0 -1
- package/dist/web/_next/static/chunks/8584.abc09920f03375b1.js +0 -1
- package/dist/web/_next/static/chunks/9067.538dec4d8ec0b04e.js +0 -1
- package/dist/web/_next/static/chunks/9747.9d15583d6ebafba3.js +0 -1
- package/dist/web/_next/static/chunks/app/page-185efe80d6e8dd05.js +0 -1
- package/dist/web/_next/static/chunks/app/queue/page-d4155eb6ab172c03.js +0 -1
- package/dist/web/_next/static/chunks/app/settings/page-9a83381087178f80.js +0 -1
- package/dist/web/_next/static/css/d107848da2f006af.css +0 -1
- /package/dist/web/_next/static/{vU04zVwJyicqgtWQsApuV → JpBxrjYpw2xowWbFoiPjO}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{vU04zVwJyicqgtWQsApuV → JpBxrjYpw2xowWbFoiPjO}/_ssgManifest.js +0 -0
|
@@ -26,6 +26,8 @@ import { PolicyLockUnusableError } from '../config/lockedPolicy.js';
|
|
|
26
26
|
import { CHANGED_ON_DISK } from '../session/workspace.js';
|
|
27
27
|
import { join } from 'node:path';
|
|
28
28
|
import { DefaultPickerLocators } from '../transport/locators.js';
|
|
29
|
+
import { platformTools } from '../exec/platforms.js';
|
|
30
|
+
import { readOnlyCapable } from '../exec/readOnly.js';
|
|
29
31
|
function fail(e) {
|
|
30
32
|
// A settings file or a policy lock that cannot be used is not the request's fault, and every route
|
|
31
33
|
// that reads the settings meets it, wrapped here or not: it is passed on as it is, for the server
|
|
@@ -83,7 +85,12 @@ let OperatorController = class OperatorController {
|
|
|
83
85
|
* pictures of a choice are kept — a run's beside its browser's other files, a reading of the list in its own.
|
|
84
86
|
*/
|
|
85
87
|
const picker = { defaults: DefaultPickerLocators, dirs: { run: join(resolved.resolved.runsDir, '_browser'), read: join(resolved.resolved.runsDir, '_models') } };
|
|
86
|
-
|
|
88
|
+
/*
|
|
89
|
+
* The programs the bot may start (2026-10-26): which of them reach a platform with the operator's access, which can
|
|
90
|
+
* be set to read only, and the list in force, which a policy lock may have narrowed.
|
|
91
|
+
*/
|
|
92
|
+
const programs = { platforms: platformTools(), readOnly: readOnlyCapable(), inForce: resolved.execution.allowedPrograms };
|
|
93
|
+
return { raw, defaults, resolved: resolved.resolved, picker, programs };
|
|
87
94
|
}
|
|
88
95
|
async saveSettings(body) {
|
|
89
96
|
await this.ops.settings.save(body).catch(fail);
|
|
@@ -275,6 +282,17 @@ let OperatorController = class OperatorController {
|
|
|
275
282
|
workspaceGit() {
|
|
276
283
|
return this.ops.workspaceGit().catch(fail);
|
|
277
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* A new branch from main, from the chat (2026-10-26): what it would start from — `fetch` true fetches the remote's
|
|
287
|
+
* main first, through Git's own password window when it asks — and then the branch made, the uncommitted changes
|
|
288
|
+
* taken to it (`carry: take`) or put aside (`carry: aside`), after checking the folder is what the preview read.
|
|
289
|
+
*/
|
|
290
|
+
newBranchPreview(body = {}) {
|
|
291
|
+
return this.ops.newBranchPreview(body?.fetch !== false).catch(fail);
|
|
292
|
+
}
|
|
293
|
+
newBranchCreate(body = {}) {
|
|
294
|
+
return this.ops.newBranchCreate(body ?? {}).catch(fail);
|
|
295
|
+
}
|
|
278
296
|
/** Everything the branch changed against `base` (a branch of the list it gives), as a pull request shows it. Read-only. */
|
|
279
297
|
workspaceBranch(base) {
|
|
280
298
|
return this.ops.workspaceBranch(base || undefined).catch(fail);
|
|
@@ -338,6 +356,14 @@ let OperatorController = class OperatorController {
|
|
|
338
356
|
stopQueue() {
|
|
339
357
|
return this.ops.stopQueue().catch(fail);
|
|
340
358
|
}
|
|
359
|
+
/** The queue's own settings (2026-10-26): how long a task may wait for the operator before it is set aside. */
|
|
360
|
+
setQueueSettings(body = {}) {
|
|
361
|
+
return this.ops.setQueueSettings(body ?? {}).catch(fail);
|
|
362
|
+
}
|
|
363
|
+
/** The operator's answer to a task the queue set aside while it waited (2026-10-26); `{ stop: true }` stops it. */
|
|
364
|
+
answerParked(id, body = {}) {
|
|
365
|
+
return this.ops.answerParked(id, body ?? {}).catch(fail);
|
|
366
|
+
}
|
|
341
367
|
/** Back to before a message: the folder as it was then, that message and the ones after it taken out. */
|
|
342
368
|
async chatRewind(id, body = {}) {
|
|
343
369
|
if (typeof body?.taskId !== 'string' || !body.taskId)
|
|
@@ -689,6 +715,20 @@ __decorate([
|
|
|
689
715
|
__metadata("design:paramtypes", []),
|
|
690
716
|
__metadata("design:returntype", Promise)
|
|
691
717
|
], OperatorController.prototype, "workspaceGit", null);
|
|
718
|
+
__decorate([
|
|
719
|
+
Post('workspace/new-branch/preview'),
|
|
720
|
+
__param(0, Body()),
|
|
721
|
+
__metadata("design:type", Function),
|
|
722
|
+
__metadata("design:paramtypes", [Object]),
|
|
723
|
+
__metadata("design:returntype", Promise)
|
|
724
|
+
], OperatorController.prototype, "newBranchPreview", null);
|
|
725
|
+
__decorate([
|
|
726
|
+
Post('workspace/new-branch'),
|
|
727
|
+
__param(0, Body()),
|
|
728
|
+
__metadata("design:type", Function),
|
|
729
|
+
__metadata("design:paramtypes", [Object]),
|
|
730
|
+
__metadata("design:returntype", Promise)
|
|
731
|
+
], OperatorController.prototype, "newBranchCreate", null);
|
|
692
732
|
__decorate([
|
|
693
733
|
Get('workspace/git/branch'),
|
|
694
734
|
__param(0, Query('base')),
|
|
@@ -750,6 +790,21 @@ __decorate([
|
|
|
750
790
|
__metadata("design:paramtypes", []),
|
|
751
791
|
__metadata("design:returntype", Promise)
|
|
752
792
|
], OperatorController.prototype, "stopQueue", null);
|
|
793
|
+
__decorate([
|
|
794
|
+
Put('queue/settings'),
|
|
795
|
+
__param(0, Body()),
|
|
796
|
+
__metadata("design:type", Function),
|
|
797
|
+
__metadata("design:paramtypes", [Object]),
|
|
798
|
+
__metadata("design:returntype", Promise)
|
|
799
|
+
], OperatorController.prototype, "setQueueSettings", null);
|
|
800
|
+
__decorate([
|
|
801
|
+
Post('queue/items/:id/answer'),
|
|
802
|
+
__param(0, Param('id')),
|
|
803
|
+
__param(1, Body()),
|
|
804
|
+
__metadata("design:type", Function),
|
|
805
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
806
|
+
__metadata("design:returntype", Promise)
|
|
807
|
+
], OperatorController.prototype, "answerParked", null);
|
|
753
808
|
__decorate([
|
|
754
809
|
Post('chat/:id/rewind'),
|
|
755
810
|
__param(0, Param('id')),
|