@sireai/optimus 0.1.8 → 0.1.10

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.
Files changed (106) hide show
  1. package/README.md +2 -1
  2. package/dist/cli/optimus.js +145 -81
  3. package/dist/cli/optimus.js.map +1 -1
  4. package/dist/cli/self-update.js +21 -2
  5. package/dist/cli/self-update.js.map +1 -1
  6. package/dist/config/load-config.js +3 -0
  7. package/dist/config/load-config.js.map +1 -1
  8. package/dist/integrations/feishu/feishu-auth-config.d.ts +7 -0
  9. package/dist/integrations/feishu/feishu-auth-config.js +37 -0
  10. package/dist/integrations/feishu/feishu-auth-config.js.map +1 -0
  11. package/dist/integrations/feishu/feishu-auth-service.d.ts +71 -0
  12. package/dist/integrations/feishu/feishu-auth-service.js +399 -0
  13. package/dist/integrations/feishu/feishu-auth-service.js.map +1 -0
  14. package/dist/integrations/feishu/feishu-auth-store.d.ts +29 -0
  15. package/dist/integrations/feishu/feishu-auth-store.js +113 -0
  16. package/dist/integrations/feishu/feishu-auth-store.js.map +1 -0
  17. package/dist/integrations/feishu/feishu-client.d.ts +52 -0
  18. package/dist/integrations/feishu/feishu-client.js +217 -0
  19. package/dist/integrations/feishu/feishu-client.js.map +1 -0
  20. package/dist/integrations/feishu/feishu-doc-service.d.ts +52 -0
  21. package/dist/integrations/feishu/feishu-doc-service.js +323 -0
  22. package/dist/integrations/feishu/feishu-doc-service.js.map +1 -0
  23. package/dist/integrations/feishu/feishu-token-store.d.ts +17 -0
  24. package/dist/integrations/feishu/feishu-token-store.js +34 -0
  25. package/dist/integrations/feishu/feishu-token-store.js.map +1 -0
  26. package/dist/integrations/feishu/feishu-user-service.d.ts +14 -0
  27. package/dist/integrations/feishu/feishu-user-service.js +60 -0
  28. package/dist/integrations/feishu/feishu-user-service.js.map +1 -0
  29. package/dist/integrations/jira/jira-auth-refresh.d.ts +12 -1
  30. package/dist/integrations/jira/jira-auth-refresh.js +76 -0
  31. package/dist/integrations/jira/jira-auth-refresh.js.map +1 -1
  32. package/dist/integrations/jira/jira-cli.js +25 -11
  33. package/dist/integrations/jira/jira-cli.js.map +1 -1
  34. package/dist/integrations/jira/jira-client.d.ts +26 -0
  35. package/dist/integrations/jira/jira-client.js +111 -0
  36. package/dist/integrations/jira/jira-client.js.map +1 -1
  37. package/dist/integrations/jira/jira-submit.d.ts +5 -1
  38. package/dist/integrations/jira/jira-submit.js +119 -12
  39. package/dist/integrations/jira/jira-submit.js.map +1 -1
  40. package/dist/problem-solving-core/codex/codex-runner.d.ts +2 -0
  41. package/dist/problem-solving-core/codex/codex-runner.js +78 -0
  42. package/dist/problem-solving-core/codex/codex-runner.js.map +1 -1
  43. package/dist/problem-solving-core/codex/evolution-skill-guard.js +0 -2
  44. package/dist/problem-solving-core/codex/evolution-skill-guard.js.map +1 -1
  45. package/dist/task-environment/delivery/commit-message/bugfix-commit-message-template.js +4 -1
  46. package/dist/task-environment/delivery/commit-message/bugfix-commit-message-template.js.map +1 -1
  47. package/dist/task-environment/delivery/feishu-analysis-doc-service.d.ts +7 -25
  48. package/dist/task-environment/delivery/feishu-analysis-doc-service.js +35 -336
  49. package/dist/task-environment/delivery/feishu-analysis-doc-service.js.map +1 -1
  50. package/dist/task-environment/delivery/feishu-card-renderer.js +2 -2
  51. package/dist/task-environment/delivery/feishu-card-renderer.js.map +1 -1
  52. package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.d.ts +7 -1
  53. package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.js +51 -2
  54. package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.js.map +1 -1
  55. package/dist/task-environment/delivery/feishu-notifier.js +7 -1
  56. package/dist/task-environment/delivery/feishu-notifier.js.map +1 -1
  57. package/dist/task-environment/delivery/feishu-templates/analysis-message-template.js +1 -1
  58. package/dist/task-environment/delivery/feishu-templates/analysis-message-template.js.map +1 -1
  59. package/dist/task-environment/delivery/feishu-templates/bugfix-message-template.js +27 -4
  60. package/dist/task-environment/delivery/feishu-templates/bugfix-message-template.js.map +1 -1
  61. package/dist/task-environment/delivery/feishu-templates/default-message-template.js +1 -1
  62. package/dist/task-environment/delivery/feishu-templates/default-message-template.js.map +1 -1
  63. package/dist/task-environment/delivery/feishu-templates/patch-message-template.js +27 -4
  64. package/dist/task-environment/delivery/feishu-templates/patch-message-template.js.map +1 -1
  65. package/dist/task-environment/delivery/feishu-templates/sentry-bugfix-message-template.js +27 -4
  66. package/dist/task-environment/delivery/feishu-templates/sentry-bugfix-message-template.js.map +1 -1
  67. package/dist/task-environment/delivery/feishu-templates/template-types.d.ts +7 -1
  68. package/dist/task-environment/delivery/sentry-feishu-card-renderer.js +1 -1
  69. package/dist/task-environment/delivery/sentry-feishu-card-renderer.js.map +1 -1
  70. package/dist/task-environment/delivery/task-delivery-service.d.ts +2 -0
  71. package/dist/task-environment/delivery/task-delivery-service.js +178 -6
  72. package/dist/task-environment/delivery/task-delivery-service.js.map +1 -1
  73. package/dist/task-environment/delivery/task-publication-service.d.ts +29 -2
  74. package/dist/task-environment/delivery/task-publication-service.js +139 -13
  75. package/dist/task-environment/delivery/task-publication-service.js.map +1 -1
  76. package/dist/task-environment/evidence/evidence-preparation-service.d.ts +36 -0
  77. package/dist/task-environment/evidence/evidence-preparation-service.js +341 -0
  78. package/dist/task-environment/evidence/evidence-preparation-service.js.map +1 -0
  79. package/dist/task-environment/execution-addresses.d.ts +8 -0
  80. package/dist/task-environment/execution-addresses.js +8 -0
  81. package/dist/task-environment/execution-addresses.js.map +1 -1
  82. package/dist/task-environment/intake/manual-problem-intake.js +15 -0
  83. package/dist/task-environment/intake/manual-problem-intake.js.map +1 -1
  84. package/dist/task-environment/intake/triage-rejection-feedback-service.d.ts +12 -0
  85. package/dist/task-environment/intake/triage-rejection-feedback-service.js +64 -11
  86. package/dist/task-environment/intake/triage-rejection-feedback-service.js.map +1 -1
  87. package/dist/task-environment/observability/logger.js +24 -0
  88. package/dist/task-environment/observability/logger.js.map +1 -1
  89. package/dist/task-environment/orchestration/execution-context-assembler.d.ts +19 -0
  90. package/dist/task-environment/orchestration/execution-context-assembler.js +422 -1
  91. package/dist/task-environment/orchestration/execution-context-assembler.js.map +1 -1
  92. package/dist/task-environment/orchestration/task-orchestrator.d.ts +3 -0
  93. package/dist/task-environment/orchestration/task-orchestrator.js +135 -6
  94. package/dist/task-environment/orchestration/task-orchestrator.js.map +1 -1
  95. package/dist/task-environment/orchestration/triage-runner.d.ts +2 -0
  96. package/dist/task-environment/orchestration/triage-runner.js +27 -1
  97. package/dist/task-environment/orchestration/triage-runner.js.map +1 -1
  98. package/dist/task-environment/runtime/optimus-runtime.js +4 -3
  99. package/dist/task-environment/runtime/optimus-runtime.js.map +1 -1
  100. package/dist/types.d.ts +22 -0
  101. package/embedded-skills/shared/video-keyframe-analyzer/SKILL.md +86 -0
  102. package/embedded-skills/shared/video-keyframe-analyzer/scripts/extract-keyframes.mjs +614 -0
  103. package/embedded-skills/shared/{repo-inspection → video-keyframe-analyzer}/skill.json +1 -1
  104. package/package.json +7 -3
  105. package/task-harnesses/bugfix/STANDARD.md +104 -31
  106. package/embedded-skills/shared/repo-inspection/SKILL.md +0 -9
@@ -19,30 +19,45 @@
19
19
  ## Validation policy
20
20
 
21
21
  - A claimed fix requires validation.
22
- - Prefer stronger evidence before weaker evidence.
23
- - Report the strongest level reached and why stronger levels were unavailable.
22
+ - Prefer the highest-reliability validation that is feasible now, not the cheapest one.
23
+ - If a stronger level is blocked, state the blocker and downgrade explicitly.
24
+ - Report exactly one strongest token and keep the method/result details below it.
25
+ - Also report exactly one validation grade `V1` to `V5`.
24
26
 
25
- 1. `L4 functional`: real device, simulator, or another directly runnable environment
26
- 2. `L3 self-check`: local unit tests, targeted custom tests, lightweight scenario injection
27
- 3. `L2 build`: relevant compile target, module build, or targeted test task
28
- 4. `L1 code evidence`: static reasoning, call-chain review, diff review
27
+ Reliability and cost order:
29
28
 
30
- ### Android order
29
+ 1. `V5`: `device_verified` - highest confidence, highest cost
30
+ 2. `V4`: `simulator_verified`, `scenario_verified` - very high or high confidence, high or medium-high cost
31
+ 3. `V3`: `regression_tests_passed`, `unit_tests_passed` - medium-high or medium confidence, medium or medium-high cost
32
+ 4. `V2`: `module_build_passed`, `compile_passed`, `targeted_tests_passed` - partial executable proof, medium to lower confidence, low-medium to medium cost
33
+ 5. `V1`: `code_reviewed` - lowest confidence, lowest cost
31
34
 
32
- 1. Prefer real-device or simulator validation when `adb` and runnable targets exist.
33
- 2. Otherwise prefer local tests or scenario injection.
34
- 3. Use device-side automated checks only when local validation cannot cover the behavior.
35
- 4. Fall back to compile validation such as `compileDebugKotlin` or relevant unit tests.
36
- 5. Use code-only validation only when all stronger forms are unavailable.
35
+ Token contract:
36
+
37
+ - `device_verified` -> `V5`: real device, real business path, fix behavior observed
38
+ - `simulator_verified` -> `V4`: simulator/emulator, real business path, fix behavior observed
39
+ - `scenario_verified` -> `V4`: directly runnable real path or end-to-end scenario executed in a near-real environment
40
+ - `regression_tests_passed` -> `V3`: multiple relevant existing regression/integration cases passed
41
+ - `unit_tests_passed` -> `V3`: real project unit tests passed
42
+ - `module_build_passed` -> `V2`: real module/package build passed
43
+ - `compile_passed` -> `V2`: real compile target passed
44
+ - `targeted_tests_passed` -> `V2`: targeted harness, stub, mock, injected script, minimal API-surface check, or one-off focused executable proof passed
45
+ - `code_reviewed` -> `V1`: no executable validation succeeded; conclusion relies on code/log/evidence review only
46
+
47
+ Never overstate:
48
+
49
+ - Stub, mock, temporary harness, minimal API surface, injected script, or ad hoc executable proof must be `targeted_tests_passed`, not `scenario_verified`.
50
+ - Real compile/build did not pass: do not claim `compile_passed` or `module_build_passed`.
51
+ - No real device/simulator path was exercised: do not claim `device_verified`, `simulator_verified`, or `scenario_verified`.
37
52
 
38
53
  ## Closure policy
39
54
 
40
55
  - Close as fix only when analysis, code changes, validation evidence, and residual-risk understanding are credible.
41
56
  - Close as analysis when information, environment, reproduction, or validation is insufficient for a trustworthy patch claim.
42
- - If code changed but validation reached only `L2` or `L1`, describe it as a repair candidate, not a verified fix.
43
- - If the issue is interaction, crash, device, integration, or resource related and validation stayed at `L2`, state what stronger environment or tooling was missing.
57
+ - If code changed but fix validation stayed at `V2` or `V1`, describe it as a repair candidate, not a verified fix.
58
+ - If the issue is interaction, crash, device, integration, or resource related and fix validation stayed at `V2`, state what stronger environment or tooling was missing.
44
59
  - If build or test failed for unrelated reasons, report the stage, failure reason, and why it is treated as noise or a pre-existing blocker.
45
- - If only `L1` evidence exists, do not submit a formal patch claim; close as analysis.
60
+ - If only `V1` evidence exists, do not submit a formal verified-fix claim; close as analysis unless a repair candidate is still justified.
46
61
  - Analysis closure must still provide root-cause judgment, fix direction, and either targeted local guidance or a module-level strategy.
47
62
 
48
63
  ## Runtime contract
@@ -81,7 +96,8 @@
81
96
  - Before writing `result.md`, determine `Closure Level`, then follow exactly one language mode:
82
97
  - `Verified Fix` or `Repair Candidate`: Patch Closure Mode; all narrative sections are English
83
98
  - `Analysis Only`: Analysis Closure Mode; narrative sections are Chinese
84
- - `Validation Summary` stays a single English token in all cases.
99
+ - `Reproduction` / `复现情况` uses the compact form `<token> (R*)` when grade is known.
100
+ - `Fix Validation` / `修复验证` uses the compact form `<token> (V*)` when grade is known.
85
101
  - Use repository-relative code paths only; never use absolute local paths.
86
102
  - Commands, logs, stack traces, API errors, and identifiers may stay in their original language when needed.
87
103
  - If closure is patch-related and any narrative field is Chinese, the output is invalid and must be rewritten.
@@ -91,14 +107,25 @@
91
107
  Do not rename these downstream-consumed keys:
92
108
 
93
109
  - English patch-mode keys:
94
- - `Validation Summary`
110
+ - `Root Cause`
111
+ - `Fix`
112
+ - `Reproduction`
113
+ - `Fix Validation`
114
+ - `Impact Check`
115
+ - `Confidence`
116
+ - `Blocking Point`
95
117
  - `Strongest Current Conclusion`
96
- - `Analysis Summary`
97
118
  - `Key Evidence`
98
119
  - `Recommended Action`
99
120
  - `Analysis Doc URL`
100
121
  - Chinese analysis-mode keys:
101
- - `验证摘要`
122
+ - `根因摘要`
123
+ - `修复建议`
124
+ - `复现情况`
125
+ - `修复验证`
126
+ - `影响评估`
127
+ - `确定性`
128
+ - `阻塞点`
102
129
  - `当前最强结论`
103
130
  - `分析摘要`
104
131
  - `关键证据`
@@ -111,10 +138,25 @@ Keep exact capitalization and wording.
111
138
 
112
139
  At minimum, `result.md` must include:
113
140
 
141
+ - one compact summary block for downstream delivery consumers
142
+ Patch mode fields: `Root Cause`, `Fix`, `Reproduction`, `Fix Validation`, `Impact Check`, `Confidence`, `Blocking Point`
143
+ Analysis mode fields: `根因摘要`, `修复建议`, `复现情况`, `修复验证`, `影响评估`, `确定性`, `阻塞点`
144
+ Keep each summary value dense and short enough for comment/card reuse.
145
+ - a reproduction summary as one high-density English token
146
+ Allowed values: `naturally_reproduced`, `induced_reproduced`, `historical_evidence_matched`, `not_reproduced`
147
+ - a reproduction grade inside `Reproduction` / `复现情况`
148
+ Allowed values: `R1`, `R2`, `R3`, `R4`
114
149
  - a validation summary as one high-density English token
115
150
  Allowed values: `device_verified`, `simulator_verified`, `scenario_verified`, `unit_tests_passed`, `targeted_tests_passed`, `regression_tests_passed`, `compile_passed`, `module_build_passed`, `code_reviewed`
116
151
  Forbidden generic values: `validation_completed`, `tests_passed`, `verified`, `passed`, `done`
117
- If multiple validations were performed, report only the strongest one.
152
+ If multiple validations were performed, report only the strongest one by the reliability order above.
153
+ - a validation grade inside `Fix Validation` / `修复验证`
154
+ Allowed values: `V1`, `V2`, `V3`, `V4`, `V5`
155
+ It must match the selected validation token.
156
+ - an impact-check summary token
157
+ Allowed values: `neighbor_paths_checked`, `partial_neighbor_check`, `not_checked`
158
+ - a confidence token
159
+ Allowed values: `C1`, `C2`, `C3`, `C4`
118
160
  - problem summary and impact scope
119
161
  - category: functional, stability, performance, or compatibility
120
162
  - reproduction likelihood: always, high, low, or unknown
@@ -145,30 +187,42 @@ At minimum, `result.md` must include:
145
187
  ```md
146
188
  # Bugfix Result
147
189
 
148
- ## Summary
190
+ ## Delivery Summary
191
+ - Root Cause:
192
+ - Fix:
193
+ - Reproduction:
194
+ - Fix Validation:
195
+ - Impact Check:
196
+ - Confidence:
197
+ - Blocking Point: `None` if not blocked
198
+
199
+ ## Detail
200
+
201
+ ### Summary
149
202
  - Problem:
150
203
  - Impact:
151
204
  - Category: Functional / Stability / Performance / Compatibility
152
205
  - Reproduction Likelihood: Always / High / Low / Unknown
153
206
 
154
- ## Root Cause
207
+ ### Root Cause
155
208
  - Strongest Current Conclusion:
156
209
  - Key Evidence:
157
210
  - Relevant Code Locations:
158
211
 
159
- ## Change
212
+ ### Change
160
213
  - Closure Level: Verified Fix / Repair Candidate
161
214
  - Patch Notes:
162
215
  - Fix Strategy:
163
216
  - Blocking Point: `None` if not blocked
164
217
 
165
- ## Validation
218
+ ### Validation
166
219
  - Validation Summary: exactly one short English token, strongest validation only
220
+ - Validation Grade: exactly one token, `V1` to `V5`, matching `Validation Summary`
167
221
  - Method:
168
222
  - Result:
169
223
  - Unverified Items:
170
224
 
171
- ## Risks
225
+ ### Risks
172
226
  - Residual Risk:
173
227
  - Recommended Action:
174
228
  ```
@@ -190,29 +244,41 @@ Use the following Chinese output structure exactly:
190
244
  ```md
191
245
  # 缺陷分析结果
192
246
 
193
- ## 问题概述
247
+ ## 交付摘要
248
+ - 根因摘要:
249
+ - 修复建议:
250
+ - 复现情况: `<token> (R*)` when grade is known
251
+ - 修复验证: `<token> (V*)` when grade is known
252
+ - 影响评估:
253
+ - 确定性:
254
+ - 阻塞点:
255
+
256
+ ## 详细分析
257
+
258
+ ### 问题概述
194
259
  - 问题:
195
260
  - 影响:
196
261
  - 分类: 功能 / 稳定性 / 性能 / 兼容性
197
262
  - 复现概率: 必现 / 高概率 / 低概率 / 未知
198
263
 
199
- ## 分析结论
264
+ ### 分析结论
200
265
  - 当前最强结论:
201
266
  - 分析摘要:
202
267
  - 关键证据:
203
268
  - 相关代码位置:
204
269
 
205
- ## 修复判断
270
+ ### 修复判断
206
271
  - Closure Level: Analysis Only
207
272
  - 阻塞点:
208
273
  - 建议动作:
209
274
 
210
- ## 验证情况
275
+ ### 验证情况
211
276
  - 验证摘要: exactly one short English token, strongest validation only
277
+ - 验证等级: exactly one token, `V1` to `V5`, matching `验证摘要`
212
278
  - 已验证内容:
213
279
  - 未验证内容:
214
280
 
215
- ## 风险
281
+ ### 风险
216
282
  - 主要风险:
217
283
  - 建议动作:
218
284
  - 分析文档链接:
@@ -236,6 +302,8 @@ Patch closure examples:
236
302
  - If code changed, ensure `result.md` and `patch.diff` do not contradict each other.
237
303
  - If important code changed, ensure explanatory comments are present.
238
304
  - If validation was performed, ensure claims are not overstated.
305
+ - Ensure validation token matches the strongest proof actually executed, not the intended proof.
306
+ - Ensure `Delivery Summary` / `交付摘要` is present and consistent with the detailed sections below it.
239
307
  - Distinguish confirmed facts from inference.
240
308
  - For patch closure, ensure `Strongest Current Conclusion`, `Key Evidence`, and `Recommended Action` are English before returning.
241
309
 
@@ -248,4 +316,9 @@ Patch closure examples:
248
316
  - required downstream field names are exact
249
317
  - patch closure does not emit `Analysis Summary`
250
318
  - analysis closure does not mix in patch-delivery sections
251
- - `Validation Summary` or `验证摘要` is exactly one strongest English token
319
+ - `Reproduction` or `复现情况` uses exactly one allowed token and an `R*` grade when grade is present
320
+ - `Fix Validation` or `修复验证` uses exactly one strongest allowed validation token and a matching `V*` grade when grade is present
321
+ - `Impact Check` or `影响评估` uses exactly one allowed token
322
+ - `Confidence` or `确定性` uses exactly one allowed token
323
+ - detailed validation section still contains `Validation Summary` / `验证摘要`
324
+ - detailed validation section still contains `Validation Grade` / `验证等级`
@@ -1,9 +0,0 @@
1
- # Repo Inspection
2
-
3
- Use this skill when the task requires quickly understanding repository layout, module boundaries, entrypoints, or key build and test commands before making changes.
4
-
5
- ## Workflow
6
- - Read the task package first and identify the suspected repository area.
7
- - Inspect repository structure, build files, and task-relevant docs before editing.
8
- - Summarize the likely execution chain and the files that matter most to the bug.
9
- - Prefer targeted searches and file reads over broad scans.