omp-superagent 0.1.13 → 0.1.15
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/DESIGN.md +8 -5
- package/THIRD_PARTY_NOTICES.md +6 -0
- package/assets/architecture-dark.svg +4 -4
- package/assets/architecture.ko-dark.svg +4 -4
- package/assets/architecture.ko.svg +4 -4
- package/assets/architecture.mmd +5 -5
- package/assets/architecture.svg +4 -4
- package/config.example.json +1 -0
- package/docs/OPERATIONS.en.md +59 -23
- package/docs/OPERATIONS.md +53 -18
- package/docs/design/execution.md +161 -43
- package/docs/design/messaging.md +45 -9
- package/docs/releases/0.1.15.md +13 -0
- package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
- package/gateway/bin/omp-gateway-darwin-x64 +0 -0
- package/gateway/bin/omp-gateway-linux-arm64 +0 -0
- package/gateway/bin/omp-gateway-linux-x64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
- package/package.json +6 -3
- package/scripts/prepare-worker-memory.ts +37 -0
- package/skills/head/SKILL.md +22 -47
- package/skills/head/references/routing.md +11 -12
- package/skills/head/references/supervision.md +10 -14
- package/skills/lane/SKILL.md +14 -16
- package/skills/lane/references/workflow.md +14 -27
- package/src/cli.ts +56 -56
- package/src/config/config.ts +4 -0
- package/src/contracts.ts +34 -27
- package/src/cron/cron-jobs.ts +4 -3
- package/src/cron/cron-pr-intake.ts +1 -2
- package/src/extension.ts +57 -14
- package/src/gateway/gateway-client.ts +14 -12
- package/src/group/group-runner.ts +3 -2
- package/src/group-runner-extension.ts +7 -3
- package/src/host-extension.ts +109 -2
- package/src/host-sdk-helper.ts +6 -1
- package/src/lane/decision-tool.ts +2 -3
- package/src/lane/lane-report.ts +8 -30
- package/src/lane/lane-rows.ts +1 -1
- package/src/lane/workflow.ts +44 -3
- package/src/lane-extension.ts +5 -46
- package/src/messaging/discord-context.ts +8 -6
- package/src/omp/host-protocol.ts +4 -3
- package/src/omp/host.ts +24 -7
- package/src/omp/managed-super.ts +43 -27
- package/src/omp/native-sessions.ts +12 -0
- package/src/omp/worker-memory-import.ts +410 -0
- package/src/omp/worker-memory-sdk.ts +8 -0
- package/src/operator/setup.ts +8 -13
- package/src/pr/pr-github-schema.ts +9 -0
- package/src/pr/pr-github.ts +6 -2
- package/src/pr/pr-intake-automation.ts +11 -8
- package/src/pr/pr-intake-fix.ts +2 -5
- package/src/pr/pr-intake-review.ts +7 -7
- package/src/routing/topic-history.ts +2 -2
- package/src/runtime/controller.ts +444 -408
- package/src/runtime/head-recovery.ts +7 -7
- package/src/runtime/worker-memory.ts +156 -0
- package/src/storage/deferred-routing.ts +1 -7
- package/src/storage/store.ts +441 -375
- package/src/worker/worker-host.ts +3 -2
- package/src/worker/worker-ledger.ts +20 -11
- package/src/worker/worker-memory-page.ts +83 -0
- package/src/worker/worker-memory-proofs.ts +260 -0
- package/src/worker/worker-memory-source.ts +305 -0
- package/src/worker/worker-memory-storage.ts +130 -0
- package/src/worker/worker-profile.ts +2 -0
- package/src/worker/worker-repository.ts +92 -7
- package/src/worker/worker-request.ts +1 -0
- package/src/worker/worker-service.ts +25 -8
- package/src/worker/worker-wire.ts +20 -6
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { physicalRoute, routeKey, type Inbound, type InputRecord, type Lane, type Route, type StorePort } from "../contracts";
|
|
3
3
|
import { compareMessageIds } from "../routing/message-order";
|
|
4
|
-
import type { CronJobs } from "../cron/cron-jobs";
|
|
4
|
+
import type { CronJobs, CronPrJob } from "../cron/cron-jobs";
|
|
5
5
|
import type { CronPrCandidate, CronPrIntake } from "../cron/cron-pr-intake";
|
|
6
|
-
import type { CronPrJob } from "../cron/cron-jobs";
|
|
7
6
|
import { hasIntakeReplyRoute, intakeThreadKey, intakeStatusKey, intakeWorkId, intakeWorkPrefix } from "./pr-intake-work";
|
|
7
|
+
import { hasExactJsonPropertyCount } from "./pr-github-schema";
|
|
8
8
|
import { inspectIntakeMerge, mergeIntakePull } from "./pr-intake-github";
|
|
9
9
|
import { applyIntakeFix, intakeFixDigest, parseIntakeFix, reconcileIntakeFix } from "./pr-intake-fix";
|
|
10
10
|
import { readIntakeMaterial, readIntakeMaterialTarget } from "./pr-intake-material";
|
|
11
11
|
import { inspectIntakeComment, publishIntakeComment } from "./pr-intake-comment";
|
|
12
|
-
import { advancePrIntakeAutomation, prIntakeManualHold, readPrIntakeAutomation } from "./pr-intake-automation";
|
|
12
|
+
import { advancePrIntakeAutomation, hasUnresolvedIntakeWrites, prIntakeManualHold, readPrIntakeAutomation } from "./pr-intake-automation";
|
|
13
13
|
import type { PrIntakeMode } from "./pr-intake-mode";
|
|
14
14
|
|
|
15
15
|
export class PrControlError extends Error {}
|
|
@@ -51,7 +51,7 @@ function approved(text: string): boolean {
|
|
|
51
51
|
try {
|
|
52
52
|
const result: unknown = JSON.parse(text);
|
|
53
53
|
return typeof result === "object" && result !== null && Object.keys(result).length === 2
|
|
54
|
-
&&
|
|
54
|
+
&& hasExactJsonPropertyCount(text, 2)
|
|
55
55
|
&& "verdict" in result && result.verdict === "approve" && "summary" in result
|
|
56
56
|
&& typeof result.summary === "string" && result.summary.trim().length > 0;
|
|
57
57
|
} catch { return false; }
|
|
@@ -68,7 +68,7 @@ export class PrReviews {
|
|
|
68
68
|
|
|
69
69
|
needsReconciliation(scope: Pick<ReviewRound, "repositoryId" | "number">): boolean {
|
|
70
70
|
const state = readPrIntakeAutomation(this.store, scope);
|
|
71
|
-
return
|
|
71
|
+
return state !== null && hasUnresolvedIntakeWrites(state);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
laneRound(laneId: string): ReviewRound | null {
|
|
@@ -209,7 +209,7 @@ export class PrReviews {
|
|
|
209
209
|
// after the answer has been sent. It is not a later confirmation.
|
|
210
210
|
const event = command.messageId ?? command.interactionId;
|
|
211
211
|
if (!output?.remoteId || !event || compareMessageIds("discord", event, output.remoteId) !== 1) return null;
|
|
212
|
-
return digest(JSON.stringify([r.inputId, r.epoch, input?.requestId, input?.generation, output
|
|
212
|
+
return digest(JSON.stringify([r.inputId, r.epoch, input?.requestId, input?.generation, output.remoteId, answer]));
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
private next(r: ReviewRound): string {
|
|
@@ -314,7 +314,7 @@ export class PrReviews {
|
|
|
314
314
|
return "이전 GitHub 변경을 확인하지 못했습니다. GitHub PR과 커밋 이력을 직접 대조하세요. 이 등록에서는 모호한 쓰기를 다시 보내지 않습니다.";
|
|
315
315
|
}
|
|
316
316
|
if (effect?.state === "confirmed") {
|
|
317
|
-
if (action
|
|
317
|
+
if (action !== "pr-review" || effect.action === "pr-merge" || head === previous.head)
|
|
318
318
|
return `GitHub 확인: ${effect.action} ${effect.sha}. ${effect.action === "pr-fix" ? `이 스레드에서 /cron pr-review ${jobId} ${number} ${effect.sha} 로 새 HEAD를 다시 검토하세요.` : "종료되었습니다."}`;
|
|
319
319
|
}
|
|
320
320
|
if (action === "pr-status") {
|
|
@@ -204,7 +204,7 @@ function* excerptWindows(text: string): Iterable<string> {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
function visibleLine(text: string, limit
|
|
207
|
+
function visibleLine(text: string, limit?: number): string {
|
|
208
208
|
return ownerRoutingProse(text).slice(0, limit).replace(/[\s\p{Cc}\p{Cf}]+/gu, " ").trim();
|
|
209
209
|
}
|
|
210
210
|
|
|
@@ -235,7 +235,7 @@ export function pastTopicQuery(text: string): string | null {
|
|
|
235
235
|
|
|
236
236
|
function routingRequest(text: string) {
|
|
237
237
|
if (text.length > MAX_QUERY) return null;
|
|
238
|
-
const subject =
|
|
238
|
+
const subject = visibleLine(text);
|
|
239
239
|
// Past-topic aliases treat "fix" as a bug descriptor. In ordinary text an
|
|
240
240
|
// action alone should not make one otherwise ambiguous term a direct match.
|
|
241
241
|
const terms = new Set(wordTokens(subject.replace(/\b(?:fix(?:es|ed|ing)?|debug(?:s|ged|ging)?)\b/giu, " "))
|