@sireai/optimus 0.1.25 → 0.1.27
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 +12 -24
- package/dist/cli/optimus.js.map +1 -1
- package/dist/cli/self-update.d.ts +0 -6
- package/dist/cli/self-update.js +1 -11
- package/dist/cli/self-update.js.map +1 -1
- package/dist/integrations/feishu/feishu-doc-service.d.ts +2 -0
- package/dist/integrations/feishu/feishu-doc-service.js +3 -2
- package/dist/integrations/feishu/feishu-doc-service.js.map +1 -1
- package/dist/integrations/jira/jira-access-manager.d.ts +3 -0
- package/dist/integrations/jira/jira-access-manager.js +43 -0
- package/dist/integrations/jira/jira-access-manager.js.map +1 -1
- package/dist/task-environment/delivery/feishu-analysis-doc-service.d.ts +3 -13
- package/dist/task-environment/delivery/feishu-analysis-doc-service.js +12 -89
- package/dist/task-environment/delivery/feishu-analysis-doc-service.js.map +1 -1
- package/dist/task-environment/observability/execution-metrics.js +15 -18
- package/dist/task-environment/observability/execution-metrics.js.map +1 -1
- package/dist/task-environment/orchestration/task-orchestrator.js +1 -2
- package/dist/task-environment/orchestration/task-orchestrator.js.map +1 -1
- package/package.json +1 -1
- package/task-harnesses/pm/ACCEPT.md +75 -0
- package/task-harnesses/pm/CONSTRAINTS.md +26 -0
- package/task-harnesses/pm/CONTEXT.md +26 -0
- package/task-harnesses/pm/EVOLUTION.md +35 -0
- package/task-harnesses/pm/ROLE.md +59 -0
- package/task-harnesses/pm/STANDARD.md +87 -0
- package/task-harnesses/pm/manifest.json +13 -0
package/dist/cli/optimus.js
CHANGED
|
@@ -32,7 +32,7 @@ import { FeishuUserService } from "../integrations/feishu/feishu-user-service.js
|
|
|
32
32
|
import { createFeedbackReport } from "./feedback.js";
|
|
33
33
|
import { DEFAULT_FEEDBACK_RECIPIENT_EMAIL, FeishuFeedbackDeliveryService, persistFeedbackDeliveryResult, resolveDefaultFeedbackRecipientFallbackOpenId } from "./feedback-delivery.js";
|
|
34
34
|
import { resolveDefaultConfigPath, resolveDefaultEnvPath } from "../config/optimus-paths.js";
|
|
35
|
-
import { checkForSelfUpdate, installSelfUpdate, recordSkippedSelfUpdate
|
|
35
|
+
import { checkForSelfUpdate, installSelfUpdate, recordSkippedSelfUpdate } from "./self-update.js";
|
|
36
36
|
const CLI_ROOT_DIR = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
37
37
|
const PACKAGE_JSON_PATH = join(CLI_ROOT_DIR, "package.json");
|
|
38
38
|
const execFileAsync = promisify(execFile);
|
|
@@ -837,12 +837,6 @@ async function maybeHandleStartupSelfUpdate(input) {
|
|
|
837
837
|
packageRoot: CLI_ROOT_DIR
|
|
838
838
|
});
|
|
839
839
|
const selfUpdateConfig = input.config.selfUpdate ?? buildDefaultConfig().selfUpdate;
|
|
840
|
-
const shouldPromptCachedUpdate = shouldPromptForCachedStartupUpdate({
|
|
841
|
-
command: input.command,
|
|
842
|
-
config: input.config,
|
|
843
|
-
check,
|
|
844
|
-
interactivePromptAllowed: isInteractiveSelfUpdatePromptAllowed()
|
|
845
|
-
});
|
|
846
840
|
if (!check.checked) {
|
|
847
841
|
if (check.reason === "cached") {
|
|
848
842
|
const intervalHours = Math.max(1, selfUpdateConfig.checkIntervalHours);
|
|
@@ -860,16 +854,10 @@ async function maybeHandleStartupSelfUpdate(input) {
|
|
|
860
854
|
intervalHours,
|
|
861
855
|
lastCheckedAt,
|
|
862
856
|
nextCheckAt,
|
|
863
|
-
|
|
864
|
-
promptPlanned: shouldPromptCachedUpdate
|
|
857
|
+
realtimeCheckSkipped: true
|
|
865
858
|
});
|
|
866
859
|
}
|
|
867
|
-
|
|
868
|
-
console.log(`[optimus] update available ${check.currentVersion} -> ${check.latestVersion}. Run \`optimus upgrade\`.`);
|
|
869
|
-
}
|
|
870
|
-
if (!shouldPromptCachedUpdate) {
|
|
871
|
-
return { handled: false };
|
|
872
|
-
}
|
|
860
|
+
return { handled: false };
|
|
873
861
|
}
|
|
874
862
|
if (check.reason === "check_failed") {
|
|
875
863
|
await input.logger.warn("self_update.check_failed", {
|
|
@@ -943,19 +931,18 @@ async function maybeHandleStartupSelfUpdate(input) {
|
|
|
943
931
|
console.log(`[optimus] update available ${check.currentVersion} -> ${check.latestVersion}. Run \`optimus upgrade\`.`);
|
|
944
932
|
return { handled: false };
|
|
945
933
|
}
|
|
946
|
-
console.log(`[optimus] upgrading ${check.currentVersion} -> ${check.latestVersion} before start...`);
|
|
947
934
|
await input.logger.info("self_update.install_started", {
|
|
948
935
|
command: input.command,
|
|
949
936
|
currentVersion: check.currentVersion,
|
|
950
937
|
latestVersion: check.latestVersion
|
|
951
938
|
});
|
|
952
|
-
const install = await installSelfUpdate({
|
|
939
|
+
const install = await runWithTerminalLoading(`Updating Optimus ${check.currentVersion} -> ${check.latestVersion}`, async () => await installSelfUpdate({
|
|
953
940
|
currentVersion: check.currentVersion,
|
|
954
941
|
packageName: PACKAGE_NAME,
|
|
955
942
|
packageRoot: CLI_ROOT_DIR,
|
|
956
943
|
channel: check.channel,
|
|
957
|
-
targetVersion: check.latestVersion
|
|
958
|
-
});
|
|
944
|
+
...(check.latestVersion ? { targetVersion: check.latestVersion } : {})
|
|
945
|
+
}));
|
|
959
946
|
if (!install.success) {
|
|
960
947
|
await input.logger.error("self_update.install_failed", {
|
|
961
948
|
command: input.command,
|
|
@@ -974,7 +961,7 @@ async function maybeHandleStartupSelfUpdate(input) {
|
|
|
974
961
|
currentVersion: check.currentVersion,
|
|
975
962
|
latestVersion: check.latestVersion
|
|
976
963
|
});
|
|
977
|
-
console.log(`[optimus]
|
|
964
|
+
console.log(`[optimus] update succeeded: ${check.currentVersion} -> ${check.latestVersion}. Please restart Optimus.`);
|
|
978
965
|
return {
|
|
979
966
|
handled: true,
|
|
980
967
|
exitCode: 0
|
|
@@ -2346,13 +2333,13 @@ async function main() {
|
|
|
2346
2333
|
process.exitCode = result.reason === "check_failed" ? 1 : 0;
|
|
2347
2334
|
return;
|
|
2348
2335
|
}
|
|
2349
|
-
const result = await installSelfUpdate({
|
|
2336
|
+
const result = await runWithTerminalLoading("Updating Optimus", async () => await installSelfUpdate({
|
|
2350
2337
|
currentVersion,
|
|
2351
2338
|
packageName: PACKAGE_NAME,
|
|
2352
2339
|
packageRoot: CLI_ROOT_DIR,
|
|
2353
2340
|
channel,
|
|
2354
2341
|
force: args.force === "true"
|
|
2355
|
-
});
|
|
2342
|
+
}));
|
|
2356
2343
|
if (result.reason === "already_latest") {
|
|
2357
2344
|
console.log(`Optimus is already up to date (${currentVersion}).`);
|
|
2358
2345
|
return;
|
|
@@ -2362,7 +2349,8 @@ async function main() {
|
|
|
2362
2349
|
process.exitCode = 1;
|
|
2363
2350
|
return;
|
|
2364
2351
|
}
|
|
2365
|
-
console.log(`Optimus
|
|
2352
|
+
console.log(`Optimus updated successfully: ${currentVersion} -> ${result.latestVersion ?? currentVersion}`);
|
|
2353
|
+
console.log("Please restart Optimus.");
|
|
2366
2354
|
return;
|
|
2367
2355
|
}
|
|
2368
2356
|
if (command === "setup") {
|
|
@@ -2764,7 +2752,7 @@ async function main() {
|
|
|
2764
2752
|
const deliveryService = new TaskDeliveryService({
|
|
2765
2753
|
jiraBaseUrl: config.jira.baseUrl
|
|
2766
2754
|
});
|
|
2767
|
-
const analysisDocService = new FeishuAnalysisDocService({ config
|
|
2755
|
+
const analysisDocService = new FeishuAnalysisDocService({ config });
|
|
2768
2756
|
const publicationService = new TaskPublicationService(logger);
|
|
2769
2757
|
const deliveryDispatcher = new TaskDeliveryDispatcher(config);
|
|
2770
2758
|
let deliveryBundle = mergeReplayBundle(await deliveryService.buildBundle({
|