oh-my-opencode 3.17.5 → 3.17.6

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 (35) hide show
  1. package/README.ja.md +1 -1
  2. package/README.ko.md +1 -1
  3. package/README.md +1 -1
  4. package/README.ru.md +1 -1
  5. package/README.zh-cn.md +1 -1
  6. package/dist/agents/agent-builder.d.ts +2 -3
  7. package/dist/agents/agent-skill-resolution.d.ts +7 -0
  8. package/dist/agents/frontier-tool-schema-guard.d.ts +3 -0
  9. package/dist/agents/hephaestus/agent.d.ts +1 -1
  10. package/dist/agents/hephaestus/gpt-5-5.d.ts +12 -0
  11. package/dist/agents/sisyphus/claude-opus-4-7.d.ts +20 -0
  12. package/dist/agents/sisyphus/gpt-5-5.d.ts +20 -0
  13. package/dist/agents/sisyphus/index.d.ts +5 -0
  14. package/dist/agents/sisyphus/kimi-k2-6.d.ts +32 -0
  15. package/dist/agents/sisyphus-junior/agent.d.ts +1 -1
  16. package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +14 -0
  17. package/dist/agents/sisyphus-junior/index.d.ts +2 -0
  18. package/dist/agents/sisyphus-junior/kimi-k2-6.d.ts +13 -0
  19. package/dist/agents/types.d.ts +17 -1
  20. package/dist/cli/doctor/checks/model-resolution.d.ts +4 -0
  21. package/dist/cli/index.js +132 -79
  22. package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +1 -6
  23. package/dist/hooks/ralph-loop/session-event-handler.d.ts +2 -6
  24. package/dist/hooks/ralph-loop/types.d.ts +5 -0
  25. package/dist/index.js +2576 -372
  26. package/dist/plugin/hooks/create-core-hooks.d.ts +2 -0
  27. package/dist/plugin/hooks/create-session-hooks.d.ts +2 -0
  28. package/dist/shared/agent-display-names.d.ts +7 -2
  29. package/dist/shared/agent-sort-shim.d.ts +28 -0
  30. package/dist/shared/file-reference-resolver.d.ts +1 -0
  31. package/dist/shared/posthog-activity-state.d.ts +5 -2
  32. package/dist/shared/posthog.d.ts +5 -0
  33. package/dist/tools/slashcommand/command-discovery-deps.d.ts +6 -0
  34. package/package.json +12 -12
  35. package/dist/hooks/ralph-loop/loop-session-recovery.d.ts +0 -7
package/dist/cli/index.js CHANGED
@@ -6204,7 +6204,8 @@ var init_model_versions = __esm(() => {
6204
6204
  "anthropic/claude-opus-4-5": "anthropic/claude-opus-4-7",
6205
6205
  "anthropic/claude-opus-4-6": "anthropic/claude-opus-4-7",
6206
6206
  "anthropic/claude-sonnet-4-5": "anthropic/claude-sonnet-4-6",
6207
- "openai/gpt-5.3-codex": "openai/gpt-5.4"
6207
+ "openai/gpt-5.3-codex": "openai/gpt-5.4",
6208
+ "openai/gpt-5.4": "openai/gpt-5.5"
6208
6209
  };
6209
6210
  });
6210
6211
 
@@ -6289,12 +6290,15 @@ function migrateConfigFile(configPath, rawConfig) {
6289
6290
  const copy = JSON.parse(JSON.stringify(rawConfig));
6290
6291
  let needsWrite = false;
6291
6292
  const sidecarMigrations = readAppliedMigrations(configPath);
6292
- const inConfigMigrations = Array.isArray(copy._migrations) ? new Set(copy._migrations) : new Set;
6293
+ const inConfigMigrations = Array.isArray(copy._migrations) ? new Set(copy._migrations.filter((migration) => typeof migration === "string")) : new Set;
6294
+ const inlineAppliedMigrations = Array.isArray(copy.appliedMigrations) ? new Set(copy.appliedMigrations.filter((migration) => typeof migration === "string")) : new Set;
6293
6295
  const existingMigrations = new Set([
6294
6296
  ...sidecarMigrations,
6295
- ...inConfigMigrations
6297
+ ...inConfigMigrations,
6298
+ ...inlineAppliedMigrations
6296
6299
  ]);
6297
6300
  const hadLegacyInConfigMigrations = inConfigMigrations.size > 0;
6301
+ const hadInlineAppliedMigrations = inlineAppliedMigrations.size > 0;
6298
6302
  const allNewMigrations = [];
6299
6303
  if (copy.agents && typeof copy.agents === "object") {
6300
6304
  const { migrated, changed } = migrateAgentNames(copy.agents);
@@ -6326,11 +6330,12 @@ function migrateConfigFile(configPath, rawConfig) {
6326
6330
  ...existingMigrations,
6327
6331
  ...newMigrationsToRecord
6328
6332
  ]);
6329
- const shouldWriteSidecar = newMigrationsToRecord.length > 0 || hadLegacyInConfigMigrations;
6333
+ const shouldWriteSidecar = newMigrationsToRecord.length > 0 || hadLegacyInConfigMigrations || hadInlineAppliedMigrations;
6330
6334
  if (newMigrationsToRecord.length > 0) {
6331
6335
  needsWrite = true;
6332
6336
  }
6333
- if (hadLegacyInConfigMigrations) {
6337
+ if (hadLegacyInConfigMigrations || hadInlineAppliedMigrations) {
6338
+ delete copy.appliedMigrations;
6334
6339
  needsWrite = true;
6335
6340
  }
6336
6341
  if (shouldWriteSidecar) {
@@ -6701,11 +6706,6 @@ function stripInvisibleAgentCharacters(agentName) {
6701
6706
  function stripAgentListSortPrefix(agentName) {
6702
6707
  return stripInvisibleAgentCharacters(agentName);
6703
6708
  }
6704
- function getAgentRuntimeName(configKey) {
6705
- const displayName = getAgentDisplayName(configKey);
6706
- const prefix = AGENT_LIST_SORT_PREFIXES[configKey.toLowerCase()];
6707
- return prefix ? `${prefix}${displayName}` : displayName;
6708
- }
6709
6709
  function getAgentDisplayName(configKey) {
6710
6710
  const exactMatch = AGENT_DISPLAY_NAMES[configKey];
6711
6711
  if (exactMatch !== undefined)
@@ -6733,7 +6733,7 @@ function getAgentConfigKey(agentName) {
6733
6733
  const lower = stripAgentListSortPrefix(agentName).trim().toLowerCase();
6734
6734
  return resolveKnownAgentConfigKey(agentName) ?? lower;
6735
6735
  }
6736
- var AGENT_DISPLAY_NAMES, AGENT_LIST_SORT_PREFIXES, INVISIBLE_AGENT_CHARACTERS_REGEX, REVERSE_DISPLAY_NAMES, LEGACY_DISPLAY_NAMES;
6736
+ var AGENT_DISPLAY_NAMES, INVISIBLE_AGENT_CHARACTERS_REGEX, REVERSE_DISPLAY_NAMES, LEGACY_DISPLAY_NAMES;
6737
6737
  var init_agent_display_names = __esm(() => {
6738
6738
  AGENT_DISPLAY_NAMES = {
6739
6739
  sisyphus: "Sisyphus - Ultraworker",
@@ -6751,12 +6751,6 @@ var init_agent_display_names = __esm(() => {
6751
6751
  "multimodal-looker": "multimodal-looker",
6752
6752
  "council-member": "council-member"
6753
6753
  };
6754
- AGENT_LIST_SORT_PREFIXES = {
6755
- sisyphus: "\u200B",
6756
- hephaestus: "\u200B\u200B",
6757
- prometheus: "\u200B\u200B\u200B",
6758
- atlas: "\u200B\u200B\u200B\u200B"
6759
- };
6760
6754
  INVISIBLE_AGENT_CHARACTERS_REGEX = /[\u200B\u200C\u200D\uFEFF]/g;
6761
6755
  REVERSE_DISPLAY_NAMES = Object.fromEntries(Object.entries(AGENT_DISPLAY_NAMES).map(([key, displayName]) => [displayName.toLowerCase(), key]));
6762
6756
  LEGACY_DISPLAY_NAMES = {
@@ -6796,7 +6790,7 @@ var init_model_requirements = __esm(() => {
6796
6790
  ],
6797
6791
  model: "kimi-k2.5"
6798
6792
  },
6799
- { providers: ["openai", "github-copilot", "opencode", "vercel"], model: "gpt-5.4", variant: "medium" },
6793
+ { providers: ["openai", "github-copilot", "opencode", "vercel"], model: "gpt-5.5", variant: "medium" },
6800
6794
  { providers: ["zai-coding-plan", "opencode", "vercel"], model: "glm-5" },
6801
6795
  { providers: ["opencode"], model: "big-pickle" }
6802
6796
  ],
@@ -6806,7 +6800,7 @@ var init_model_requirements = __esm(() => {
6806
6800
  fallbackChain: [
6807
6801
  {
6808
6802
  providers: ["openai", "github-copilot", "venice", "opencode", "vercel"],
6809
- model: "gpt-5.4",
6803
+ model: "gpt-5.5",
6810
6804
  variant: "medium"
6811
6805
  }
6812
6806
  ],
@@ -6816,7 +6810,7 @@ var init_model_requirements = __esm(() => {
6816
6810
  fallbackChain: [
6817
6811
  {
6818
6812
  providers: ["openai", "github-copilot", "opencode", "vercel"],
6819
- model: "gpt-5.4",
6813
+ model: "gpt-5.5",
6820
6814
  variant: "high"
6821
6815
  },
6822
6816
  {
@@ -6852,7 +6846,7 @@ var init_model_requirements = __esm(() => {
6852
6846
  },
6853
6847
  "multimodal-looker": {
6854
6848
  fallbackChain: [
6855
- { providers: ["openai", "opencode", "vercel"], model: "gpt-5.4", variant: "medium" },
6849
+ { providers: ["openai", "opencode", "vercel"], model: "gpt-5.5", variant: "medium" },
6856
6850
  { providers: ["opencode-go", "vercel"], model: "kimi-k2.5" },
6857
6851
  { providers: ["zai-coding-plan", "vercel"], model: "glm-4.6v" },
6858
6852
  { providers: ["openai", "github-copilot", "opencode", "vercel"], model: "gpt-5-nano" }
@@ -6867,7 +6861,7 @@ var init_model_requirements = __esm(() => {
6867
6861
  },
6868
6862
  {
6869
6863
  providers: ["openai", "github-copilot", "opencode", "vercel"],
6870
- model: "gpt-5.4",
6864
+ model: "gpt-5.5",
6871
6865
  variant: "high"
6872
6866
  },
6873
6867
  { providers: ["opencode-go", "vercel"], model: "glm-5" },
@@ -6886,7 +6880,7 @@ var init_model_requirements = __esm(() => {
6886
6880
  },
6887
6881
  {
6888
6882
  providers: ["openai", "github-copilot", "opencode", "vercel"],
6889
- model: "gpt-5.4",
6883
+ model: "gpt-5.5",
6890
6884
  variant: "high"
6891
6885
  },
6892
6886
  { providers: ["opencode-go", "vercel"], model: "glm-5" },
@@ -6897,7 +6891,7 @@ var init_model_requirements = __esm(() => {
6897
6891
  fallbackChain: [
6898
6892
  {
6899
6893
  providers: ["openai", "github-copilot", "opencode", "vercel"],
6900
- model: "gpt-5.4",
6894
+ model: "gpt-5.5",
6901
6895
  variant: "xhigh"
6902
6896
  },
6903
6897
  {
@@ -6919,7 +6913,7 @@ var init_model_requirements = __esm(() => {
6919
6913
  { providers: ["opencode-go", "vercel"], model: "kimi-k2.5" },
6920
6914
  {
6921
6915
  providers: ["openai", "github-copilot", "opencode", "vercel"],
6922
- model: "gpt-5.4",
6916
+ model: "gpt-5.5",
6923
6917
  variant: "medium"
6924
6918
  },
6925
6919
  { providers: ["opencode-go", "vercel"], model: "minimax-m2.7" }
@@ -6931,7 +6925,7 @@ var init_model_requirements = __esm(() => {
6931
6925
  { providers: ["opencode-go", "vercel"], model: "kimi-k2.5" },
6932
6926
  {
6933
6927
  providers: ["openai", "github-copilot", "opencode", "vercel"],
6934
- model: "gpt-5.4",
6928
+ model: "gpt-5.5",
6935
6929
  variant: "medium"
6936
6930
  },
6937
6931
  { providers: ["opencode-go", "vercel"], model: "minimax-m2.7" },
@@ -6961,7 +6955,7 @@ var init_model_requirements = __esm(() => {
6961
6955
  fallbackChain: [
6962
6956
  {
6963
6957
  providers: ["openai", "opencode", "vercel"],
6964
- model: "gpt-5.4",
6958
+ model: "gpt-5.5",
6965
6959
  variant: "xhigh"
6966
6960
  },
6967
6961
  {
@@ -6981,7 +6975,7 @@ var init_model_requirements = __esm(() => {
6981
6975
  fallbackChain: [
6982
6976
  {
6983
6977
  providers: ["openai", "github-copilot", "venice", "opencode", "vercel"],
6984
- model: "gpt-5.4",
6978
+ model: "gpt-5.5",
6985
6979
  variant: "medium"
6986
6980
  },
6987
6981
  {
@@ -7008,7 +7002,7 @@ var init_model_requirements = __esm(() => {
7008
7002
  model: "claude-opus-4-7",
7009
7003
  variant: "max"
7010
7004
  },
7011
- { providers: ["openai", "github-copilot", "opencode", "vercel"], model: "gpt-5.4" }
7005
+ { providers: ["openai", "github-copilot", "opencode", "vercel"], model: "gpt-5.5" }
7012
7006
  ],
7013
7007
  requiresModel: "gemini-3.1-pro"
7014
7008
  },
@@ -7058,7 +7052,7 @@ var init_model_requirements = __esm(() => {
7058
7052
  },
7059
7053
  {
7060
7054
  providers: ["openai", "github-copilot", "opencode", "vercel"],
7061
- model: "gpt-5.4",
7055
+ model: "gpt-5.5",
7062
7056
  variant: "high"
7063
7057
  },
7064
7058
  { providers: ["zai-coding-plan", "opencode", "vercel"], model: "glm-5" },
@@ -49900,6 +49894,22 @@ var init_supplemental_entries = __esm(() => {
49900
49894
  input: 272000,
49901
49895
  output: 128000
49902
49896
  }
49897
+ },
49898
+ "gpt-5.5": {
49899
+ id: "gpt-5.5",
49900
+ family: "gpt",
49901
+ reasoning: true,
49902
+ temperature: false,
49903
+ toolCall: true,
49904
+ modalities: {
49905
+ input: ["text", "image", "pdf"],
49906
+ output: ["text"]
49907
+ },
49908
+ limit: {
49909
+ context: 400000,
49910
+ input: 272000,
49911
+ output: 128000
49912
+ }
49903
49913
  }
49904
49914
  };
49905
49915
  });
@@ -49979,6 +49989,18 @@ var init_model_capability_aliases = __esm(() => {
49979
49989
  ruleID: "gemini-3-pro-tier-alias",
49980
49990
  canonicalModelID: "gemini-3-pro-preview",
49981
49991
  rationale: "Legacy Gemini 3 tier suffixes still need to land on the canonical preview model."
49992
+ },
49993
+ {
49994
+ aliasModelID: "k2pb",
49995
+ ruleID: "kimi-k2pb-alias",
49996
+ canonicalModelID: "k2p5",
49997
+ rationale: "Kimi for Coding exposes k2pb while the bundled capabilities snapshot uses the canonical k2p5 ID."
49998
+ },
49999
+ {
50000
+ aliasModelID: "claude-opus-4.7",
50001
+ ruleID: "claude-opus-dotted-version-alias",
50002
+ canonicalModelID: "claude-opus-4-7",
50003
+ rationale: "GitHub Copilot exposes Claude Opus 4.7 with dotted version syntax while the snapshot uses dashed syntax."
49982
50004
  }
49983
50005
  ];
49984
50006
  EXACT_ALIAS_RULES_BY_MODEL = new Map(EXACT_ALIAS_RULES.map((rule) => [rule.aliasModelID, rule]));
@@ -50048,10 +50070,18 @@ var init_model_capability_heuristics = __esm(() => {
50048
50070
  includes: ["gemini"],
50049
50071
  variants: ["low", "medium", "high"]
50050
50072
  },
50073
+ {
50074
+ family: "kimi-thinking",
50075
+ includes: ["kimi-thinking", "k2-thinking", "k2-think"],
50076
+ pattern: /(?:kimi|k2).*-(?:thinking|think)/,
50077
+ variants: ["low", "medium", "high"],
50078
+ supportsThinking: true
50079
+ },
50051
50080
  {
50052
50081
  family: "kimi",
50053
50082
  includes: ["kimi", "k2"],
50054
- variants: ["low", "medium", "high"]
50083
+ variants: ["low", "medium", "high"],
50084
+ supportsThinking: false
50055
50085
  },
50056
50086
  {
50057
50087
  family: "glm",
@@ -50061,7 +50091,8 @@ var init_model_capability_heuristics = __esm(() => {
50061
50091
  {
50062
50092
  family: "minimax",
50063
50093
  includes: ["minimax"],
50064
- variants: ["low", "medium", "high"]
50094
+ variants: ["low", "medium", "high"],
50095
+ supportsThinking: false
50065
50096
  },
50066
50097
  {
50067
50098
  family: "deepseek",
@@ -51528,10 +51559,10 @@ var init_openai_only_model_catalog = __esm(() => {
51528
51559
  librarian: { model: "openai/gpt-5.4-mini-fast" }
51529
51560
  };
51530
51561
  OPENAI_ONLY_CATEGORY_OVERRIDES = {
51531
- artistry: { model: "openai/gpt-5.4", variant: "xhigh" },
51562
+ artistry: { model: "openai/gpt-5.5", variant: "xhigh" },
51532
51563
  quick: { model: "openai/gpt-5.4-mini" },
51533
- "visual-engineering": { model: "openai/gpt-5.4", variant: "high" },
51534
- writing: { model: "openai/gpt-5.4", variant: "medium" }
51564
+ "visual-engineering": { model: "openai/gpt-5.5", variant: "high" },
51565
+ writing: { model: "openai/gpt-5.5", variant: "medium" }
51535
51566
  };
51536
51567
  });
51537
51568
 
@@ -51854,6 +51885,30 @@ function archiveLegacyConfigFile(legacyPath) {
51854
51885
  }
51855
51886
  }
51856
51887
  }
51888
+ function migrateLegacySidecarFile(legacyPath, canonicalPath) {
51889
+ const legacySidecarPath = getSidecarPath(legacyPath);
51890
+ if (!existsSync14(legacySidecarPath))
51891
+ return true;
51892
+ const canonicalSidecarPath = getSidecarPath(canonicalPath);
51893
+ if (existsSync14(canonicalSidecarPath))
51894
+ return true;
51895
+ try {
51896
+ const content = readFileSync9(legacySidecarPath, "utf-8");
51897
+ writeFileAtomically(canonicalSidecarPath, content);
51898
+ log("[migrateLegacyConfigFile] Migrated legacy migration sidecar to canonical path", {
51899
+ from: legacySidecarPath,
51900
+ to: canonicalSidecarPath
51901
+ });
51902
+ return true;
51903
+ } catch (error) {
51904
+ log("[migrateLegacyConfigFile] Failed to migrate legacy migration sidecar", {
51905
+ legacySidecarPath,
51906
+ canonicalSidecarPath,
51907
+ error
51908
+ });
51909
+ return false;
51910
+ }
51911
+ }
51857
51912
  function migrateLegacyConfigFile(legacyPath) {
51858
51913
  if (!existsSync14(legacyPath))
51859
51914
  return false;
@@ -51865,10 +51920,12 @@ function migrateLegacyConfigFile(legacyPath) {
51865
51920
  try {
51866
51921
  const content = readFileSync9(legacyPath, "utf-8");
51867
51922
  writeFileAtomically(canonicalPath, content);
51923
+ const migratedSidecar = migrateLegacySidecarFile(legacyPath, canonicalPath);
51868
51924
  const archivedLegacyConfig = archiveLegacyConfigFile(legacyPath);
51869
51925
  log("[migrateLegacyConfigFile] Migrated legacy config to canonical path", {
51870
51926
  from: legacyPath,
51871
51927
  to: canonicalPath,
51928
+ migratedSidecar,
51872
51929
  archivedLegacyConfig
51873
51930
  });
51874
51931
  return true;
@@ -51879,6 +51936,7 @@ function migrateLegacyConfigFile(legacyPath) {
51879
51936
  }
51880
51937
  var init_migrate_legacy_config_file = __esm(() => {
51881
51938
  init_logger();
51939
+ init_migrations_sidecar();
51882
51940
  init_plugin_identity();
51883
51941
  init_write_file_atomically();
51884
51942
  });
@@ -53806,7 +53864,7 @@ var {
53806
53864
  // package.json
53807
53865
  var package_default = {
53808
53866
  name: "oh-my-opencode",
53809
- version: "3.17.5",
53867
+ version: "3.17.6",
53810
53868
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
53811
53869
  main: "./dist/index.js",
53812
53870
  types: "dist/index.d.ts",
@@ -53886,17 +53944,17 @@ var package_default = {
53886
53944
  zod: "^4.3.0"
53887
53945
  },
53888
53946
  optionalDependencies: {
53889
- "oh-my-opencode-darwin-arm64": "3.17.5",
53890
- "oh-my-opencode-darwin-x64": "3.17.5",
53891
- "oh-my-opencode-darwin-x64-baseline": "3.17.5",
53892
- "oh-my-opencode-linux-arm64": "3.17.5",
53893
- "oh-my-opencode-linux-arm64-musl": "3.17.5",
53894
- "oh-my-opencode-linux-x64": "3.17.5",
53895
- "oh-my-opencode-linux-x64-baseline": "3.17.5",
53896
- "oh-my-opencode-linux-x64-musl": "3.17.5",
53897
- "oh-my-opencode-linux-x64-musl-baseline": "3.17.5",
53898
- "oh-my-opencode-windows-x64": "3.17.5",
53899
- "oh-my-opencode-windows-x64-baseline": "3.17.5"
53947
+ "oh-my-opencode-darwin-arm64": "3.17.6",
53948
+ "oh-my-opencode-darwin-x64": "3.17.6",
53949
+ "oh-my-opencode-darwin-x64-baseline": "3.17.6",
53950
+ "oh-my-opencode-linux-arm64": "3.17.6",
53951
+ "oh-my-opencode-linux-arm64-musl": "3.17.6",
53952
+ "oh-my-opencode-linux-x64": "3.17.6",
53953
+ "oh-my-opencode-linux-x64-baseline": "3.17.6",
53954
+ "oh-my-opencode-linux-x64-musl": "3.17.6",
53955
+ "oh-my-opencode-linux-x64-musl-baseline": "3.17.6",
53956
+ "oh-my-opencode-windows-x64": "3.17.6",
53957
+ "oh-my-opencode-windows-x64-baseline": "3.17.6"
53900
53958
  },
53901
53959
  overrides: {},
53902
53960
  trustedDependencies: [
@@ -58576,9 +58634,6 @@ function getPostHogActivityStateFilePath() {
58576
58634
  function getUtcDayString(date) {
58577
58635
  return date.toISOString().slice(0, 10);
58578
58636
  }
58579
- function getUtcHourString(date) {
58580
- return date.toISOString().slice(0, 13);
58581
- }
58582
58637
  function isPostHogActivityState(value) {
58583
58638
  return value !== null && typeof value === "object" && !Array.isArray(value);
58584
58639
  }
@@ -58618,24 +58673,24 @@ function writePostHogActivityState(nextState) {
58618
58673
  function getPostHogActivityCaptureState(now = new Date) {
58619
58674
  const state = readPostHogActivityState();
58620
58675
  const dayUTC = getUtcDayString(now);
58621
- const hourUTC = getUtcHourString(now);
58622
58676
  const captureDaily = state.lastActiveDayUTC !== dayUTC;
58623
- const captureHourly = state.lastActiveHourUTC !== hourUTC;
58624
- if (captureDaily || captureHourly) {
58677
+ if (captureDaily) {
58625
58678
  writePostHogActivityState({
58626
- lastActiveDayUTC: captureDaily ? dayUTC : state.lastActiveDayUTC,
58627
- lastActiveHourUTC: captureHourly ? hourUTC : state.lastActiveHourUTC
58679
+ ...state,
58680
+ lastActiveDayUTC: dayUTC
58628
58681
  });
58629
58682
  }
58630
58683
  return {
58631
58684
  dayUTC,
58632
- hourUTC,
58633
- captureDaily,
58634
- captureHourly
58685
+ captureDaily
58635
58686
  };
58636
58687
  }
58637
58688
 
58638
58689
  // src/shared/posthog.ts
58690
+ var activityStateProviderOverride = null;
58691
+ function resolveActivityState() {
58692
+ return (activityStateProviderOverride ?? getPostHogActivityCaptureState)();
58693
+ }
58639
58694
  var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com";
58640
58695
  var DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
58641
58696
  var NO_OP_POSTHOG = {
@@ -58670,7 +58725,16 @@ function getPostHogApiKey() {
58670
58725
  function getPostHogHost() {
58671
58726
  return process.env.POSTHOG_HOST?.trim() || DEFAULT_POSTHOG_HOST;
58672
58727
  }
58728
+ function safeCpus() {
58729
+ try {
58730
+ const cpus = os3.cpus();
58731
+ return { length: cpus.length, model: cpus[0]?.model };
58732
+ } catch {
58733
+ return { length: 0, model: undefined };
58734
+ }
58735
+ }
58673
58736
  function getSharedProperties(source) {
58737
+ const cpus = safeCpus();
58674
58738
  return {
58675
58739
  platform: "oh-my-opencode",
58676
58740
  package_name: PUBLISHED_PACKAGE_NAME,
@@ -58683,8 +58747,8 @@ function getSharedProperties(source) {
58683
58747
  $os_version: os3.release(),
58684
58748
  os_arch: os3.arch(),
58685
58749
  os_type: os3.type(),
58686
- cpu_count: os3.cpus().length,
58687
- cpu_model: os3.cpus()[0]?.model,
58750
+ cpu_count: cpus.length,
58751
+ cpu_model: cpus.model,
58688
58752
  total_memory_gb: Math.round(os3.totalmem() / 1024 / 1024 / 1024),
58689
58753
  locale: Intl.DateTimeFormat().resolvedOptions().locale,
58690
58754
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
@@ -58725,7 +58789,7 @@ function createPostHogClient(source, options) {
58725
58789
  });
58726
58790
  },
58727
58791
  trackActive: (distinctId, reason) => {
58728
- const activityState = getPostHogActivityCaptureState();
58792
+ const activityState = resolveActivityState();
58729
58793
  if (activityState.captureDaily) {
58730
58794
  configuredClient.capture({
58731
58795
  distinctId,
@@ -58737,17 +58801,6 @@ function createPostHogClient(source, options) {
58737
58801
  }
58738
58802
  });
58739
58803
  }
58740
- if (activityState.captureHourly) {
58741
- configuredClient.capture({
58742
- distinctId,
58743
- event: "omo_hourly_active",
58744
- properties: {
58745
- ...sharedProperties,
58746
- hour_utc: activityState.hourUTC,
58747
- reason
58748
- }
58749
- });
58750
- }
58751
58804
  },
58752
58805
  shutdown: async () => configuredClient.shutdown()
58753
58806
  };
@@ -59530,7 +59583,7 @@ async function promptInstallConfig(detected) {
59530
59583
  message: "Do you have access to OpenCode Zen (opencode/ models)?",
59531
59584
  options: [
59532
59585
  { value: "no", label: "No", hint: "Will use other configured providers" },
59533
- { value: "yes", label: "Yes", hint: "opencode/claude-opus-4-7, opencode/gpt-5.4, etc." }
59586
+ { value: "yes", label: "Yes", hint: "opencode/claude-opus-4-7, opencode/gpt-5.5, etc." }
59534
59587
  ],
59535
59588
  initialValue: initial.opencodeZen
59536
59589
  });
@@ -76532,7 +76585,7 @@ var normalizeAgentName = (agent) => {
76532
76585
  return;
76533
76586
  const configKey = getAgentConfigKey(trimmed);
76534
76587
  const displayName = getAgentDisplayName(configKey);
76535
- const runtimeName = getAgentRuntimeName(configKey);
76588
+ const runtimeName = getAgentDisplayName(configKey);
76536
76589
  const isKnownAgent = displayName !== configKey;
76537
76590
  return {
76538
76591
  configKey,
@@ -76560,12 +76613,12 @@ var resolveRunAgent = (options, pluginConfig, env = process.env) => {
76560
76613
  const configAgent = normalizeAgentName(pluginConfig.default_run_agent);
76561
76614
  const resolved = cliAgent ?? envAgent ?? configAgent ?? {
76562
76615
  configKey: DEFAULT_AGENT,
76563
- resolvedName: getAgentRuntimeName(DEFAULT_AGENT)
76616
+ resolvedName: getAgentDisplayName(DEFAULT_AGENT)
76564
76617
  };
76565
76618
  if (isAgentDisabled(resolved.configKey, pluginConfig)) {
76566
76619
  const fallback = pickFallbackAgent(pluginConfig);
76567
76620
  const fallbackDisplayName = getAgentDisplayName(fallback);
76568
- const fallbackRuntimeName = getAgentRuntimeName(fallback);
76621
+ const fallbackRuntimeName = getAgentDisplayName(fallback);
76569
76622
  const fallbackDisabled = isAgentDisabled(fallback, pluginConfig);
76570
76623
  if (fallbackDisabled) {
76571
76624
  console.log(import_picocolors12.default.yellow(`Requested agent "${resolved.resolvedName}" is disabled and no enabled core agent was found. Proceeding with "${fallbackDisplayName}".`));
@@ -78316,7 +78369,7 @@ function buildEffectiveResolution(requirement, userOverride) {
78316
78369
 
78317
78370
  // src/cli/doctor/checks/model-resolution.ts
78318
78371
  function parseProviderModel(value) {
78319
- const slashIndex = value.lastIndexOf("/");
78372
+ const slashIndex = value.indexOf("/");
78320
78373
  if (slashIndex <= 0 || slashIndex === value.length - 1) {
78321
78374
  return null;
78322
78375
  }
@@ -78370,7 +78423,7 @@ function collectCapabilityResolutionIssues(info) {
78370
78423
  const allEntries = [...info.agents, ...info.categories];
78371
78424
  const fallbackEntries = allEntries.filter((entry) => {
78372
78425
  const mode = entry.capabilityDiagnostics?.resolutionMode;
78373
- return mode === "alias-backed" || mode === "heuristic-backed" || mode === "unknown";
78426
+ return mode === "unknown";
78374
78427
  });
78375
78428
  if (fallbackEntries.length === 0) {
78376
78429
  return issues;
@@ -80243,7 +80296,7 @@ Examples:
80243
80296
  $ bunx oh-my-opencode run --on-complete "notify-send Done" "Fix the bug"
80244
80297
  $ bunx oh-my-opencode run --session-id ses_abc123 "Continue the work"
80245
80298
  $ bunx oh-my-opencode run --model anthropic/claude-sonnet-4 "Fix the bug"
80246
- $ bunx oh-my-opencode run --agent Sisyphus --model openai/gpt-5.4 "Implement feature X"
80299
+ $ bunx oh-my-opencode run --agent Sisyphus --model openai/gpt-5.5 "Implement feature X"
80247
80300
 
80248
80301
  Agent resolution order:
80249
80302
  1) --agent flag
@@ -1,10 +1,5 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
2
  import type { RalphLoopOptions, RalphLoopState } from "./types";
3
- type SessionRecovery = {
4
- isRecovering: (sessionID: string) => boolean;
5
- markRecovering: (sessionID: string) => void;
6
- clear: (sessionID: string) => void;
7
- };
8
3
  type LoopStateController = {
9
4
  getState: () => RalphLoopState | null;
10
5
  clear: () => boolean;
@@ -19,7 +14,7 @@ type RalphLoopEventHandlerOptions = {
19
14
  apiTimeoutMs: number;
20
15
  getTranscriptPath: (sessionID: string) => string | undefined;
21
16
  checkSessionExists?: RalphLoopOptions["checkSessionExists"];
22
- sessionRecovery: SessionRecovery;
17
+ backgroundManager?: RalphLoopOptions["backgroundManager"];
23
18
  loopState: LoopStateController;
24
19
  };
25
20
  export declare function createRalphLoopEventHandler(ctx: PluginInput, options: RalphLoopEventHandlerOptions): ({ event }: {
@@ -3,10 +3,6 @@ type LoopStateController = {
3
3
  getState: () => RalphLoopState | null;
4
4
  clear: () => boolean;
5
5
  };
6
- type SessionRecovery = {
7
- clear: (sessionID: string) => void;
8
- markRecovering: (sessionID: string) => void;
9
- };
10
- export declare function handleDeletedLoopSession(props: Record<string, unknown> | undefined, loopState: LoopStateController, sessionRecovery: SessionRecovery): boolean;
11
- export declare function handleErroredLoopSession(props: Record<string, unknown> | undefined, loopState: LoopStateController, sessionRecovery: SessionRecovery): boolean;
6
+ export declare function handleDeletedLoopSession(props: Record<string, unknown> | undefined, loopState: LoopStateController): boolean;
7
+ export declare function handleErroredLoopSession(props: Record<string, unknown> | undefined, loopState: LoopStateController): boolean;
12
8
  export {};
@@ -20,4 +20,9 @@ export interface RalphLoopOptions {
20
20
  getTranscriptPath?: (sessionId: string) => string;
21
21
  apiTimeout?: number;
22
22
  checkSessionExists?: (sessionId: string) => Promise<boolean>;
23
+ backgroundManager?: {
24
+ getTasksByParentSession: (sessionId: string) => Array<{
25
+ status: string;
26
+ }>;
27
+ };
23
28
  }