@sireai/optimus 0.1.37 → 0.1.39
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/cli/optimus.js +22 -41
- package/dist/cli/optimus.js.map +1 -1
- package/dist/integrations/jira/jira-access-manager.d.ts +0 -1
- package/dist/integrations/jira/jira-access-manager.js +0 -24
- package/dist/integrations/jira/jira-access-manager.js.map +1 -1
- package/dist/problem-solving-core/codex/codex-runner.d.ts +0 -2
- package/dist/problem-solving-core/codex/codex-runner.js +28 -43
- package/dist/problem-solving-core/codex/codex-runner.js.map +1 -1
- package/dist/task-environment/delivery/task-delivery-service.js +1 -3
- package/dist/task-environment/delivery/task-delivery-service.js.map +1 -1
- package/dist/task-environment/delivery/task-publication-service.js +5 -0
- package/dist/task-environment/delivery/task-publication-service.js.map +1 -1
- package/dist/task-environment/intake/manual-problem-intake.js +0 -30
- package/dist/task-environment/intake/manual-problem-intake.js.map +1 -1
- package/dist/task-environment/orchestration/execution-context-assembler.d.ts +0 -1
- package/dist/task-environment/orchestration/execution-context-assembler.js +0 -50
- package/dist/task-environment/orchestration/execution-context-assembler.js.map +1 -1
- package/dist/task-environment/orchestration/task-orchestrator.d.ts +0 -1
- package/dist/task-environment/orchestration/task-orchestrator.js +5 -27
- package/dist/task-environment/orchestration/task-orchestrator.js.map +1 -1
- package/dist/types.d.ts +0 -32
- package/embedded-skills/task/bugfix/android-hprof-analyzer/scripts/ensure-shark-runtime.mjs +1 -1
- package/package.json +1 -1
- package/task-harnesses/registry.json +0 -4
- package/dist/task-environment/orchestration/task-package-inputs.d.ts +0 -2
- package/dist/task-environment/orchestration/task-package-inputs.js +0 -38
- package/dist/task-environment/orchestration/task-package-inputs.js.map +0 -1
- package/dist/task-environment/orchestration/task-runtime-policy.d.ts +0 -4
- package/dist/task-environment/orchestration/task-runtime-policy.js +0 -38
- package/dist/task-environment/orchestration/task-runtime-policy.js.map +0 -1
- package/task-harnesses/pm/ACCEPT.md +0 -94
- package/task-harnesses/pm/CONSTRAINTS.md +0 -27
- package/task-harnesses/pm/CONTEXT.md +0 -26
- package/task-harnesses/pm/EVOLUTION.md +0 -35
- package/task-harnesses/pm/ROLE.md +0 -59
- package/task-harnesses/pm/STANDARD.md +0 -125
- package/task-harnesses/pm/manifest.json +0 -13
package/dist/cli/optimus.js
CHANGED
|
@@ -17,7 +17,6 @@ import { classifyCodexFailureCategory } from "../problem-solving-core/codex/code
|
|
|
17
17
|
import { createManualEventContent, createManualProblemEvent } from "../task-environment/intake/manual-problem-intake.js";
|
|
18
18
|
import { OptimusLogger } from "../task-environment/observability/logger.js";
|
|
19
19
|
import { TaskOrchestrator } from "../task-environment/orchestration/task-orchestrator.js";
|
|
20
|
-
import { getTaskRuntimePolicy } from "../task-environment/orchestration/task-runtime-policy.js";
|
|
21
20
|
import { TriageRunner } from "../task-environment/orchestration/triage-runner.js";
|
|
22
21
|
import { OptimusRuntime } from "../task-environment/runtime/optimus-runtime.js";
|
|
23
22
|
import { SQLiteTaskStore } from "../task-environment/storage/sqlite-task-store.js";
|
|
@@ -317,22 +316,23 @@ function renderCommandHelp(command) {
|
|
|
317
316
|
"",
|
|
318
317
|
"Usage:",
|
|
319
318
|
" optimus submit --title <title> --description <text> [options]",
|
|
320
|
-
" optimus submit --title <title> --file <path> [options]",
|
|
319
|
+
" optimus submit --title <title> --description-file <path> [options]",
|
|
320
|
+
" printf '%s' '<text>' | optimus submit --title <title> --description-stdin [options]",
|
|
321
321
|
"",
|
|
322
322
|
"Required:",
|
|
323
323
|
" --title <title> Task title",
|
|
324
|
-
" --description <text> Task
|
|
324
|
+
" --description <text> Task description",
|
|
325
325
|
"",
|
|
326
326
|
"Common options:",
|
|
327
|
-
" --file <path>
|
|
327
|
+
" --description-file <path> Read task description from a file",
|
|
328
|
+
" --description-stdin Read task description from stdin",
|
|
328
329
|
" --repo <alias> Target registered repository alias",
|
|
329
330
|
" --task-type <type> Task type, default bugfix",
|
|
330
331
|
" --source-ref <id> External issue key or source reference",
|
|
331
332
|
" --allow-duplicate Allow duplicate submission",
|
|
332
333
|
"",
|
|
333
334
|
"Example:",
|
|
334
|
-
" optimus submit --title \"Login crash\" --description \"Crash on startup\" --repo ohos-pre"
|
|
335
|
-
" optimus submit --title \"Onboarding prototype\" --file ./docs/onboarding-prd.md --task-type pm"
|
|
335
|
+
" optimus submit --title \"Login crash\" --description \"Crash on startup\" --repo ohos-pre"
|
|
336
336
|
].join("\n"),
|
|
337
337
|
feedback: [
|
|
338
338
|
"optimus feedback",
|
|
@@ -2110,7 +2110,6 @@ async function buildReplayExecutionContext(input) {
|
|
|
2110
2110
|
: undefined;
|
|
2111
2111
|
return {
|
|
2112
2112
|
taskRootDir,
|
|
2113
|
-
runtimePolicy: getTaskRuntimePolicy(input.taskType),
|
|
2114
2113
|
addresses: {
|
|
2115
2114
|
mode,
|
|
2116
2115
|
workspaceDir,
|
|
@@ -2261,41 +2260,28 @@ async function resolveLongTextArg(args, keys) {
|
|
|
2261
2260
|
return value;
|
|
2262
2261
|
}
|
|
2263
2262
|
}
|
|
2264
|
-
const
|
|
2265
|
-
|
|
2266
|
-
const
|
|
2267
|
-
if (
|
|
2268
|
-
|
|
2269
|
-
if (content) {
|
|
2270
|
-
return content;
|
|
2271
|
-
}
|
|
2263
|
+
const filePath = keys.file ? args[keys.file]?.trim() : undefined;
|
|
2264
|
+
if (filePath) {
|
|
2265
|
+
const content = (await readFile(filePath, "utf8")).trim();
|
|
2266
|
+
if (content) {
|
|
2267
|
+
return content;
|
|
2272
2268
|
}
|
|
2273
2269
|
}
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
if (
|
|
2277
|
-
|
|
2278
|
-
if (content) {
|
|
2279
|
-
return content;
|
|
2280
|
-
}
|
|
2270
|
+
if (keys.stdin && args[keys.stdin] === "true") {
|
|
2271
|
+
const content = (await readTextFromStdin()).trim();
|
|
2272
|
+
if (content) {
|
|
2273
|
+
return content;
|
|
2281
2274
|
}
|
|
2282
2275
|
}
|
|
2283
2276
|
return undefined;
|
|
2284
2277
|
}
|
|
2285
2278
|
function renderShellQuotingHint(command) {
|
|
2286
|
-
const requirementHint = command === "submit"
|
|
2287
|
-
? "Use single quotes, or pass the text with --file."
|
|
2288
|
-
: "Use single quotes, or pass the text with --description-file / --description-stdin.";
|
|
2289
2279
|
return [
|
|
2290
|
-
command
|
|
2291
|
-
? "submit requires both --title and task text."
|
|
2292
|
-
: "feedback requires both --title and --description.",
|
|
2280
|
+
`${command} requires both --title and --description.`,
|
|
2293
2281
|
"Tip: shell metacharacters like `...`, $(...), and $VAR may be expanded before Optimus starts.",
|
|
2294
|
-
|
|
2282
|
+
"Use single quotes, or pass the text with --description-file / --description-stdin.",
|
|
2295
2283
|
`Example: optimus ${command} --title "..." --description 'literal text with \`optimus setup\` inside'`,
|
|
2296
|
-
|
|
2297
|
-
? [`Example: optimus submit --title "..." --file ./task.md`]
|
|
2298
|
-
: [`Example: printf '%s' 'literal text with \`optimus setup\` inside' | optimus feedback --title "..." --description-stdin`])
|
|
2284
|
+
`Example: printf '%s' 'literal text with \`optimus setup\` inside' | optimus ${command} --title "..." --description-stdin`
|
|
2299
2285
|
].join("\n");
|
|
2300
2286
|
}
|
|
2301
2287
|
async function main() {
|
|
@@ -2489,10 +2475,10 @@ async function main() {
|
|
|
2489
2475
|
if (command === "submit") {
|
|
2490
2476
|
const args = parseArgs(commandArgs);
|
|
2491
2477
|
const title = args.title?.trim();
|
|
2492
|
-
const taskType = args["task-type"]?.trim() || "bugfix";
|
|
2493
2478
|
const description = await resolveLongTextArg(args, {
|
|
2494
2479
|
inline: ["desc", "description"],
|
|
2495
|
-
file: "file"
|
|
2480
|
+
file: "description-file",
|
|
2481
|
+
stdin: "description-stdin"
|
|
2496
2482
|
});
|
|
2497
2483
|
if (!title || !description) {
|
|
2498
2484
|
console.error(renderShellQuotingHint("submit"));
|
|
@@ -2500,7 +2486,7 @@ async function main() {
|
|
|
2500
2486
|
return;
|
|
2501
2487
|
}
|
|
2502
2488
|
await store.init();
|
|
2503
|
-
const repositorySelection = await resolveSubmissionRepositorySelector(
|
|
2489
|
+
const repositorySelection = await resolveSubmissionRepositorySelector(args, store, config);
|
|
2504
2490
|
if (!repositorySelection.ok) {
|
|
2505
2491
|
console.error(repositorySelection.reason);
|
|
2506
2492
|
process.exitCode = 1;
|
|
@@ -2508,7 +2494,6 @@ async function main() {
|
|
|
2508
2494
|
}
|
|
2509
2495
|
const event = createManualProblemEvent({
|
|
2510
2496
|
...args,
|
|
2511
|
-
description,
|
|
2512
2497
|
...(repositorySelection.repoSelector ? { repo: repositorySelection.repoSelector } : {}),
|
|
2513
2498
|
...(args["allow-duplicate"] === "true" ? { "allow-duplicate": "true" } : {})
|
|
2514
2499
|
});
|
|
@@ -3420,11 +3405,7 @@ async function inspectBuiltinSkills(config, skillSyncService) {
|
|
|
3420
3405
|
evolutionTaskLevelSkills
|
|
3421
3406
|
};
|
|
3422
3407
|
}
|
|
3423
|
-
async function resolveSubmissionRepositorySelector(
|
|
3424
|
-
const runtimePolicy = getTaskRuntimePolicy(taskType);
|
|
3425
|
-
if (!runtimePolicy.requiresRepository) {
|
|
3426
|
-
return { ok: true };
|
|
3427
|
-
}
|
|
3408
|
+
async function resolveSubmissionRepositorySelector(args, store, config) {
|
|
3428
3409
|
const candidates = await listCliRepositoryCandidates(store, config);
|
|
3429
3410
|
const requestedRepo = args.repo?.trim();
|
|
3430
3411
|
if (requestedRepo) {
|