copilot-operator 0.1.84 → 0.1.88
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 +113 -0
- package/dist/src/api/operator.service.js +329 -32
- package/dist/src/config/schema.js +32 -0
- package/dist/src/orchestrator/cardText.js +91 -0
- package/dist/src/orchestrator/kerriganRunner.js +914 -0
- package/dist/src/orchestrator/leadRunner.js +25 -15
- package/dist/src/orchestrator/planMode.js +6 -4
- package/dist/src/orchestrator/taskRunner.js +93 -40
- package/dist/src/plan/kerrigan.js +109 -4
- package/dist/src/plan/systemGuide.js +227 -4
- package/dist/src/protocol/kerriganSchema.js +175 -0
- package/dist/src/session/compose.js +5 -1
- package/dist/src/session/store.js +9 -0
- package/dist/src/transport/chatTransport.js +6 -2
- package/dist/src/transport/copilotTransport.js +226 -11
- package/dist/src/transport/keptWindow.js +247 -0
- package/dist/src/transport/locators.js +14 -4
- package/dist/src/vcs/git.js +72 -2
- package/dist/src/vcs/operatorGit.js +409 -0
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/chunks/1077.26ca37faa3726fff.js +1 -0
- package/dist/web/_next/static/chunks/1548.f5790cd11a91309f.js +1 -0
- package/dist/web/_next/static/chunks/2163.aa9d9b82fcde6caa.js +1 -0
- package/dist/web/_next/static/chunks/714.b7dbce98ba0b59a8.js +1 -0
- package/dist/web/_next/static/chunks/7220.0ca53eefec5d01ea.js +1 -0
- package/dist/web/_next/static/chunks/7921-8f6503aba840928a.js +1 -0
- package/dist/web/_next/static/chunks/8124-1dba8babfcfbc6e2.js +1 -0
- package/dist/web/_next/static/chunks/8584.9f3b058a8f67d3d7.js +1 -0
- package/dist/web/_next/static/chunks/9067.107f6164157e0aa1.js +1 -0
- package/dist/web/_next/static/chunks/9747.984a86f70f9cd973.js +1 -0
- package/dist/web/_next/static/chunks/app/layout-127e5af1ebf21876.js +1 -0
- package/dist/web/_next/static/chunks/app/page-b71841852e6b9ff5.js +1 -0
- package/dist/web/_next/static/chunks/app/settings/page-95069cb94d79e909.js +1 -0
- package/dist/web/_next/static/chunks/webpack-c015bbeb103c0856.js +1 -0
- package/dist/web/_next/static/css/0c5d6d5914aa3824.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 +176 -173
- package/prompts/kerrigan1.md +169 -0
- package/prompts/lead1.md +4 -1
- package/prompts/level1.md +8 -1
- package/dist/web/_next/static/chunks/1077.e0136d293069ccb8.js +0 -1
- package/dist/web/_next/static/chunks/1548.5cc0c57b00c2e44f.js +0 -1
- package/dist/web/_next/static/chunks/2163.2af0979126ae613a.js +0 -1
- package/dist/web/_next/static/chunks/714.410e2b61aa8c72b7.js +0 -1
- package/dist/web/_next/static/chunks/7220.2c4e5173a060769f.js +0 -1
- package/dist/web/_next/static/chunks/7921-3d21f385338afdf9.js +0 -1
- package/dist/web/_next/static/chunks/8124-1dc34be1646970a8.js +0 -1
- package/dist/web/_next/static/chunks/8584.61650a59d2bfa54d.js +0 -1
- package/dist/web/_next/static/chunks/9067.553056fc9b6cf80e.js +0 -1
- package/dist/web/_next/static/chunks/9747.d5826524bf4b714d.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-b8a1e0075a48b025.js +0 -1
- package/dist/web/_next/static/chunks/app/page-13147b69cf336831.js +0 -1
- package/dist/web/_next/static/chunks/app/settings/page-e3909ef6c2d8e321.js +0 -1
- package/dist/web/_next/static/chunks/webpack-19a2d7161f23b21d.js +0 -1
- package/dist/web/_next/static/css/f152f27d6afce55c.css +0 -1
- /package/dist/web/_next/static/{WU_J4Ke1d3xVfpW2acqqf → hLBBsG7Kn4vd0p_J-47BJ}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{WU_J4Ke1d3xVfpW2acqqf → hLBBsG7Kn4vd0p_J-47BJ}/_ssgManifest.js +0 -0
|
@@ -36,6 +36,15 @@ function fail(e) {
|
|
|
36
36
|
throw e;
|
|
37
37
|
throw new BadRequestException(e.message);
|
|
38
38
|
}
|
|
39
|
+
/** The files a stage or unstage names: `all`, or a list of paths as the Git view lists them. */
|
|
40
|
+
function stagedWhich(body) {
|
|
41
|
+
if (body?.all === true)
|
|
42
|
+
return 'all';
|
|
43
|
+
if (!Array.isArray(body?.paths) || body.paths.length === 0 || !body.paths.every((p) => typeof p === 'string' && p.length > 0 && p.length < 4096)) {
|
|
44
|
+
throw new BadRequestException('paths must be a list of the files to stage or unstage, or all: true');
|
|
45
|
+
}
|
|
46
|
+
return body.paths.slice(0, 5000);
|
|
47
|
+
}
|
|
39
48
|
/**
|
|
40
49
|
* `fail` for a route that writes its own response, as the downloads do: the request's own problem
|
|
41
50
|
* as plain text with a 400, and a settings file or a policy lock that cannot be used passed on to
|
|
@@ -304,6 +313,36 @@ let OperatorController = class OperatorController {
|
|
|
304
313
|
workspaceGitCounts(base) {
|
|
305
314
|
return this.ops.workspaceGitCounts(base || undefined).catch(fail);
|
|
306
315
|
}
|
|
316
|
+
/**
|
|
317
|
+
* The operator's own git from the Git view (2026-11-11, see `vcs/operatorGit.ts`): files of its lists staged or
|
|
318
|
+
* unstaged (`paths`, or `all`); a commit (`message`, `all` to commit everything) and a push, each started and then
|
|
319
|
+
* followed through `workspace/git/op`; `hooks: 'skip'` runs neither without the project's hooks, `trust` runs the ones
|
|
320
|
+
* named (path and hash, as the view showed them) although they are not the project's own. Refused while a task, the
|
|
321
|
+
* queue or another commit or push is at work in the folder.
|
|
322
|
+
*/
|
|
323
|
+
gitStage(body = {}) {
|
|
324
|
+
return this.ops.gitStage('stage', stagedWhich(body)).catch(fail);
|
|
325
|
+
}
|
|
326
|
+
gitUnstage(body = {}) {
|
|
327
|
+
return this.ops.gitStage('unstage', stagedWhich(body)).catch(fail);
|
|
328
|
+
}
|
|
329
|
+
gitCommit(body = {}) {
|
|
330
|
+
return this.ops.gitCommit(body ?? {}).catch(fail);
|
|
331
|
+
}
|
|
332
|
+
gitPush(body = {}) {
|
|
333
|
+
return this.ops.gitPush(body ?? {}).catch(fail);
|
|
334
|
+
}
|
|
335
|
+
/** The commit or push running now, or the last one: `{ op: null }` before the first. */
|
|
336
|
+
gitOp() {
|
|
337
|
+
return { op: this.ops.gitOpState() };
|
|
338
|
+
}
|
|
339
|
+
/** The operator's name and e-mail as git has them; and set, here (`global` false) or for every repository. */
|
|
340
|
+
gitIdentity() {
|
|
341
|
+
return this.ops.gitIdentity().catch(fail);
|
|
342
|
+
}
|
|
343
|
+
setGitIdentity(body = {}) {
|
|
344
|
+
return this.ops.setGitIdentity(body ?? {}).catch(fail);
|
|
345
|
+
}
|
|
307
346
|
workspaceCommit(sha) {
|
|
308
347
|
if (!sha)
|
|
309
348
|
throw new BadRequestException('sha is required');
|
|
@@ -345,6 +384,10 @@ let OperatorController = class OperatorController {
|
|
|
345
384
|
...(body.workerManualModel === true ? { workerManualModel: true } : {}),
|
|
346
385
|
// The skill chosen for this message (2026-10-21), by its name.
|
|
347
386
|
...(typeof body.skill === 'string' && body.skill.trim() ? { skill: body.skill } : {}),
|
|
387
|
+
// Kerrigan directs, for a new conversation (2026-11-12): the model of the chats she sends to, as chosen beside hers.
|
|
388
|
+
...(body.kerrigan === true ? { kerrigan: true } : {}),
|
|
389
|
+
...(typeof body.chatModel === 'string' && body.chatModel.trim() ? { chatModel: body.chatModel } : {}),
|
|
390
|
+
...(body.chatManualModel === true ? { chatManualModel: true } : {}),
|
|
348
391
|
})
|
|
349
392
|
.catch(fail);
|
|
350
393
|
}
|
|
@@ -397,6 +440,10 @@ let OperatorController = class OperatorController {
|
|
|
397
440
|
throw new BadRequestException(result.problem);
|
|
398
441
|
return result;
|
|
399
442
|
}
|
|
443
|
+
/** "Continue" (2026-11-13): the last message of a conversation, stopped before it was done, carried on from where it got to. */
|
|
444
|
+
chatContinue(id, taskId) {
|
|
445
|
+
return this.ops.chatContinue(id, taskId).catch(fail);
|
|
446
|
+
}
|
|
400
447
|
/** After a Stop (two chats, 2026-10-25): the stopped message carried on with one of its subtasks tried again first. */
|
|
401
448
|
chatRetrySubtask(id, taskId, body = {}) {
|
|
402
449
|
const n = Number(body?.n);
|
|
@@ -484,6 +531,10 @@ let OperatorController = class OperatorController {
|
|
|
484
531
|
setDefaultLeadModel(body) {
|
|
485
532
|
return this.ops.setDefaultLeadModel(body?.model ?? '').catch(fail);
|
|
486
533
|
}
|
|
534
|
+
/** The model Kerrigan's conversation starts on (2026-11-13). An empty name: the lead's, else the worker's. */
|
|
535
|
+
setDefaultKerriganModel(body) {
|
|
536
|
+
return this.ops.setDefaultKerriganModel(body?.model ?? '').catch(fail);
|
|
537
|
+
}
|
|
487
538
|
/** The model of the independent review. An empty name means "the session's own". */
|
|
488
539
|
setDefaultReviewModel(body) {
|
|
489
540
|
return this.ops.setDefaultReviewModel(body?.model ?? '').catch(fail);
|
|
@@ -753,6 +804,53 @@ __decorate([
|
|
|
753
804
|
__metadata("design:paramtypes", [String]),
|
|
754
805
|
__metadata("design:returntype", Promise)
|
|
755
806
|
], OperatorController.prototype, "workspaceGitCounts", null);
|
|
807
|
+
__decorate([
|
|
808
|
+
Post('workspace/git/stage'),
|
|
809
|
+
__param(0, Body()),
|
|
810
|
+
__metadata("design:type", Function),
|
|
811
|
+
__metadata("design:paramtypes", [Object]),
|
|
812
|
+
__metadata("design:returntype", Promise)
|
|
813
|
+
], OperatorController.prototype, "gitStage", null);
|
|
814
|
+
__decorate([
|
|
815
|
+
Post('workspace/git/unstage'),
|
|
816
|
+
__param(0, Body()),
|
|
817
|
+
__metadata("design:type", Function),
|
|
818
|
+
__metadata("design:paramtypes", [Object]),
|
|
819
|
+
__metadata("design:returntype", Promise)
|
|
820
|
+
], OperatorController.prototype, "gitUnstage", null);
|
|
821
|
+
__decorate([
|
|
822
|
+
Post('workspace/git/commit'),
|
|
823
|
+
__param(0, Body()),
|
|
824
|
+
__metadata("design:type", Function),
|
|
825
|
+
__metadata("design:paramtypes", [Object]),
|
|
826
|
+
__metadata("design:returntype", Promise)
|
|
827
|
+
], OperatorController.prototype, "gitCommit", null);
|
|
828
|
+
__decorate([
|
|
829
|
+
Post('workspace/git/push'),
|
|
830
|
+
__param(0, Body()),
|
|
831
|
+
__metadata("design:type", Function),
|
|
832
|
+
__metadata("design:paramtypes", [Object]),
|
|
833
|
+
__metadata("design:returntype", Promise)
|
|
834
|
+
], OperatorController.prototype, "gitPush", null);
|
|
835
|
+
__decorate([
|
|
836
|
+
Get('workspace/git/op'),
|
|
837
|
+
__metadata("design:type", Function),
|
|
838
|
+
__metadata("design:paramtypes", []),
|
|
839
|
+
__metadata("design:returntype", Object)
|
|
840
|
+
], OperatorController.prototype, "gitOp", null);
|
|
841
|
+
__decorate([
|
|
842
|
+
Get('workspace/git/identity'),
|
|
843
|
+
__metadata("design:type", Function),
|
|
844
|
+
__metadata("design:paramtypes", []),
|
|
845
|
+
__metadata("design:returntype", Promise)
|
|
846
|
+
], OperatorController.prototype, "gitIdentity", null);
|
|
847
|
+
__decorate([
|
|
848
|
+
Put('workspace/git/identity'),
|
|
849
|
+
__param(0, Body()),
|
|
850
|
+
__metadata("design:type", Function),
|
|
851
|
+
__metadata("design:paramtypes", [Object]),
|
|
852
|
+
__metadata("design:returntype", Promise)
|
|
853
|
+
], OperatorController.prototype, "setGitIdentity", null);
|
|
756
854
|
__decorate([
|
|
757
855
|
Get('workspace/git/commit'),
|
|
758
856
|
__param(0, Query('sha')),
|
|
@@ -853,6 +951,14 @@ __decorate([
|
|
|
853
951
|
__metadata("design:paramtypes", [String, Object]),
|
|
854
952
|
__metadata("design:returntype", Object)
|
|
855
953
|
], OperatorController.prototype, "answerRetry", null);
|
|
954
|
+
__decorate([
|
|
955
|
+
Post('chat/:id/tasks/:taskId/continue'),
|
|
956
|
+
__param(0, Param('id')),
|
|
957
|
+
__param(1, Param('taskId')),
|
|
958
|
+
__metadata("design:type", Function),
|
|
959
|
+
__metadata("design:paramtypes", [String, String]),
|
|
960
|
+
__metadata("design:returntype", Promise)
|
|
961
|
+
], OperatorController.prototype, "chatContinue", null);
|
|
856
962
|
__decorate([
|
|
857
963
|
Post('chat/:id/tasks/:taskId/retry-subtask'),
|
|
858
964
|
__param(0, Param('id')),
|
|
@@ -943,6 +1049,13 @@ __decorate([
|
|
|
943
1049
|
__metadata("design:paramtypes", [Object]),
|
|
944
1050
|
__metadata("design:returntype", Promise)
|
|
945
1051
|
], OperatorController.prototype, "setDefaultLeadModel", null);
|
|
1052
|
+
__decorate([
|
|
1053
|
+
Put('models/kerrigan-default'),
|
|
1054
|
+
__param(0, Body()),
|
|
1055
|
+
__metadata("design:type", Function),
|
|
1056
|
+
__metadata("design:paramtypes", [Object]),
|
|
1057
|
+
__metadata("design:returntype", Promise)
|
|
1058
|
+
], OperatorController.prototype, "setDefaultKerriganModel", null);
|
|
946
1059
|
__decorate([
|
|
947
1060
|
Put('models/review-default'),
|
|
948
1061
|
__param(0, Body()),
|