oh-my-opencode 5.1.12 → 5.1.13
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/index.js +43 -16
- package/dist/cli-node/index.js +43 -16
- package/dist/features/background-agent/fallback-provider-model-filter.d.ts +12 -0
- package/dist/features/background-agent/manager.d.ts +1 -0
- package/dist/features/background-agent/session-stopped-on-error.d.ts +9 -0
- package/dist/features/background-agent/types.d.ts +2 -0
- package/dist/index.js +171 -27
- package/dist/oh-my-opencode.schema.json +0 -107
- package/dist/shared/posthog.d.ts +1 -0
- package/dist/skills/browser/runtime/omowright/manifest.json +1 -1
- package/dist/tui.js +14 -14
- package/package.json +14 -14
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.5.md +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-6.md +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +89 -28
- package/packages/omo-codex/plugin/components/ulw-loop/dist/registered-agent-roles.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/registered-agent-roles.js +61 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-role-guard.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-role-guard.js +6 -2
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/registered-agent-roles.ts +60 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-role-guard.ts +8 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-role-matrix.test.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-role-registered.test.ts +128 -0
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +4 -3
- package/packages/omo-codex/plugin/test/aggregate.test.mjs +2 -2
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var package_default;
|
|
|
64
64
|
var init_package = __esm(() => {
|
|
65
65
|
package_default = {
|
|
66
66
|
name: "oh-my-opencode",
|
|
67
|
-
version: "5.1.
|
|
67
|
+
version: "5.1.13",
|
|
68
68
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
69
69
|
main: "./dist/index.js",
|
|
70
70
|
types: "dist/index.d.ts",
|
|
@@ -241,7 +241,7 @@ var init_package = __esm(() => {
|
|
|
241
241
|
},
|
|
242
242
|
devDependencies: {
|
|
243
243
|
"@clack/prompts": "^1.8.1",
|
|
244
|
-
"@code-yeongyu/senpi": "2026.10.
|
|
244
|
+
"@code-yeongyu/senpi": "2026.10.3",
|
|
245
245
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
246
246
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
247
247
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
@@ -299,18 +299,18 @@ var init_package = __esm(() => {
|
|
|
299
299
|
typescript: "^7.0.2"
|
|
300
300
|
},
|
|
301
301
|
optionalDependencies: {
|
|
302
|
-
"oh-my-opencode-darwin-arm64": "5.1.
|
|
303
|
-
"oh-my-opencode-darwin-x64": "5.1.
|
|
304
|
-
"oh-my-opencode-darwin-x64-baseline": "5.1.
|
|
305
|
-
"oh-my-opencode-linux-arm64": "5.1.
|
|
306
|
-
"oh-my-opencode-linux-arm64-musl": "5.1.
|
|
307
|
-
"oh-my-opencode-linux-x64": "5.1.
|
|
308
|
-
"oh-my-opencode-linux-x64-baseline": "5.1.
|
|
309
|
-
"oh-my-opencode-linux-x64-musl": "5.1.
|
|
310
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.1.
|
|
311
|
-
"oh-my-opencode-windows-arm64": "5.1.
|
|
312
|
-
"oh-my-opencode-windows-x64": "5.1.
|
|
313
|
-
"oh-my-opencode-windows-x64-baseline": "5.1.
|
|
302
|
+
"oh-my-opencode-darwin-arm64": "5.1.13",
|
|
303
|
+
"oh-my-opencode-darwin-x64": "5.1.13",
|
|
304
|
+
"oh-my-opencode-darwin-x64-baseline": "5.1.13",
|
|
305
|
+
"oh-my-opencode-linux-arm64": "5.1.13",
|
|
306
|
+
"oh-my-opencode-linux-arm64-musl": "5.1.13",
|
|
307
|
+
"oh-my-opencode-linux-x64": "5.1.13",
|
|
308
|
+
"oh-my-opencode-linux-x64-baseline": "5.1.13",
|
|
309
|
+
"oh-my-opencode-linux-x64-musl": "5.1.13",
|
|
310
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.1.13",
|
|
311
|
+
"oh-my-opencode-windows-arm64": "5.1.13",
|
|
312
|
+
"oh-my-opencode-windows-x64": "5.1.13",
|
|
313
|
+
"oh-my-opencode-windows-x64-baseline": "5.1.13"
|
|
314
314
|
},
|
|
315
315
|
overrides: {
|
|
316
316
|
hono: "^4.13.8",
|
|
@@ -89369,7 +89369,7 @@ var package_default2;
|
|
|
89369
89369
|
var init_package2 = __esm(() => {
|
|
89370
89370
|
package_default2 = {
|
|
89371
89371
|
name: "@oh-my-opencode/omo-codex",
|
|
89372
|
-
version: "5.1.
|
|
89372
|
+
version: "5.1.13",
|
|
89373
89373
|
type: "module",
|
|
89374
89374
|
private: true,
|
|
89375
89375
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -98701,6 +98701,7 @@ var REQUIRED_PLUGIN_ARTIFACTS = [
|
|
|
98701
98701
|
join63("extensions", "assets.generated.json"),
|
|
98702
98702
|
join63("extensions", "omo-member.js"),
|
|
98703
98703
|
join63("extensions", "memory-run-supervisor.mjs"),
|
|
98704
|
+
join63("extensions", "gateway-store-worker.mjs"),
|
|
98704
98705
|
...PERSONA_ASSET_FILES.map((filename) => join63("extensions", filename)),
|
|
98705
98706
|
join63("skills", "ast-grep", "SKILL.md"),
|
|
98706
98707
|
join63("skills", "browser", "SKILL.md"),
|
|
@@ -98723,6 +98724,7 @@ var REQUIRED_PLUGIN_ARTIFACTS = [
|
|
|
98723
98724
|
join63("skills", "visual-qa", "SKILL.md"),
|
|
98724
98725
|
join63("skills-conditional", "x-search", "SKILL.md"),
|
|
98725
98726
|
join63("runtime", "agent-toolkit-sdk", "sdk.js"),
|
|
98727
|
+
join63("runtime", "thread-sdk", "sdk.js"),
|
|
98726
98728
|
join63("runtime", "ast-grep-mcp", "cli.js"),
|
|
98727
98729
|
join63("runtime", "lsp-daemon", "dist", "cli.js"),
|
|
98728
98730
|
join63("runtime", "lsp-daemon", "dist", "index.js"),
|
|
@@ -105240,10 +105242,14 @@ function resolveOsProvider2() {
|
|
|
105240
105242
|
function resolveTransportFactory() {
|
|
105241
105243
|
return transportFactoryOverride2 ?? createDefaultPostHogTransport;
|
|
105242
105244
|
}
|
|
105245
|
+
var PLUGIN_TRANSPORT_OPTIONS = { flushAt: 20 };
|
|
105243
105246
|
var NO_OP_POSTHOG2 = {
|
|
105244
105247
|
trackActive: () => {
|
|
105245
105248
|
return;
|
|
105246
105249
|
},
|
|
105250
|
+
flush: async () => {
|
|
105251
|
+
return;
|
|
105252
|
+
},
|
|
105247
105253
|
shutdown: async () => {
|
|
105248
105254
|
return;
|
|
105249
105255
|
}
|
|
@@ -105280,6 +105286,16 @@ function logTelemetryDiagnostic(input) {
|
|
|
105280
105286
|
source: input.source
|
|
105281
105287
|
});
|
|
105282
105288
|
}
|
|
105289
|
+
function createProductConfig(source) {
|
|
105290
|
+
const product = createOpencodeTelemetryProductConfig();
|
|
105291
|
+
if (source !== "plugin") {
|
|
105292
|
+
return product;
|
|
105293
|
+
}
|
|
105294
|
+
return {
|
|
105295
|
+
...product,
|
|
105296
|
+
transportOptions: { ...product.transportOptions, ...PLUGIN_TRANSPORT_OPTIONS }
|
|
105297
|
+
};
|
|
105298
|
+
}
|
|
105283
105299
|
function createPostHogClient2(source, options = {}) {
|
|
105284
105300
|
const env = process.env;
|
|
105285
105301
|
if (shouldDisablePostHog(env, options.configEnabled)) {
|
|
@@ -105289,7 +105305,7 @@ function createPostHogClient2(source, options = {}) {
|
|
|
105289
105305
|
diagnostics: logTelemetryDiagnostic,
|
|
105290
105306
|
env: createCoreCompatibleTelemetryEnv(env),
|
|
105291
105307
|
osProvider: resolveOsProvider2(),
|
|
105292
|
-
product:
|
|
105308
|
+
product: createProductConfig(source),
|
|
105293
105309
|
source,
|
|
105294
105310
|
transportFactory: resolveTransportFactory()
|
|
105295
105311
|
});
|
|
@@ -105308,6 +105324,17 @@ function createPostHogClient2(source, options = {}) {
|
|
|
105308
105324
|
reason
|
|
105309
105325
|
});
|
|
105310
105326
|
},
|
|
105327
|
+
flush: async () => {
|
|
105328
|
+
try {
|
|
105329
|
+
await client.flush();
|
|
105330
|
+
} catch (error) {
|
|
105331
|
+
log2("[posthog] telemetry flush failed", {
|
|
105332
|
+
error: String(error),
|
|
105333
|
+
errorKind: error instanceof Error ? "error" : "non_error",
|
|
105334
|
+
source
|
|
105335
|
+
});
|
|
105336
|
+
}
|
|
105337
|
+
},
|
|
105311
105338
|
shutdown: async () => {
|
|
105312
105339
|
await client.shutdown();
|
|
105313
105340
|
}
|
package/dist/cli-node/index.js
CHANGED
|
@@ -65,7 +65,7 @@ var package_default;
|
|
|
65
65
|
var init_package = __esm(() => {
|
|
66
66
|
package_default = {
|
|
67
67
|
name: "oh-my-opencode",
|
|
68
|
-
version: "5.1.
|
|
68
|
+
version: "5.1.13",
|
|
69
69
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
70
70
|
main: "./dist/index.js",
|
|
71
71
|
types: "dist/index.d.ts",
|
|
@@ -242,7 +242,7 @@ var init_package = __esm(() => {
|
|
|
242
242
|
},
|
|
243
243
|
devDependencies: {
|
|
244
244
|
"@clack/prompts": "^1.8.1",
|
|
245
|
-
"@code-yeongyu/senpi": "2026.10.
|
|
245
|
+
"@code-yeongyu/senpi": "2026.10.3",
|
|
246
246
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
247
247
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
248
248
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
@@ -300,18 +300,18 @@ var init_package = __esm(() => {
|
|
|
300
300
|
typescript: "^7.0.2"
|
|
301
301
|
},
|
|
302
302
|
optionalDependencies: {
|
|
303
|
-
"oh-my-opencode-darwin-arm64": "5.1.
|
|
304
|
-
"oh-my-opencode-darwin-x64": "5.1.
|
|
305
|
-
"oh-my-opencode-darwin-x64-baseline": "5.1.
|
|
306
|
-
"oh-my-opencode-linux-arm64": "5.1.
|
|
307
|
-
"oh-my-opencode-linux-arm64-musl": "5.1.
|
|
308
|
-
"oh-my-opencode-linux-x64": "5.1.
|
|
309
|
-
"oh-my-opencode-linux-x64-baseline": "5.1.
|
|
310
|
-
"oh-my-opencode-linux-x64-musl": "5.1.
|
|
311
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.1.
|
|
312
|
-
"oh-my-opencode-windows-arm64": "5.1.
|
|
313
|
-
"oh-my-opencode-windows-x64": "5.1.
|
|
314
|
-
"oh-my-opencode-windows-x64-baseline": "5.1.
|
|
303
|
+
"oh-my-opencode-darwin-arm64": "5.1.13",
|
|
304
|
+
"oh-my-opencode-darwin-x64": "5.1.13",
|
|
305
|
+
"oh-my-opencode-darwin-x64-baseline": "5.1.13",
|
|
306
|
+
"oh-my-opencode-linux-arm64": "5.1.13",
|
|
307
|
+
"oh-my-opencode-linux-arm64-musl": "5.1.13",
|
|
308
|
+
"oh-my-opencode-linux-x64": "5.1.13",
|
|
309
|
+
"oh-my-opencode-linux-x64-baseline": "5.1.13",
|
|
310
|
+
"oh-my-opencode-linux-x64-musl": "5.1.13",
|
|
311
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.1.13",
|
|
312
|
+
"oh-my-opencode-windows-arm64": "5.1.13",
|
|
313
|
+
"oh-my-opencode-windows-x64": "5.1.13",
|
|
314
|
+
"oh-my-opencode-windows-x64-baseline": "5.1.13"
|
|
315
315
|
},
|
|
316
316
|
overrides: {
|
|
317
317
|
hono: "^4.13.8",
|
|
@@ -89448,7 +89448,7 @@ var package_default2;
|
|
|
89448
89448
|
var init_package2 = __esm(() => {
|
|
89449
89449
|
package_default2 = {
|
|
89450
89450
|
name: "@oh-my-opencode/omo-codex",
|
|
89451
|
-
version: "5.1.
|
|
89451
|
+
version: "5.1.13",
|
|
89452
89452
|
type: "module",
|
|
89453
89453
|
private: true,
|
|
89454
89454
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -98780,6 +98780,7 @@ var REQUIRED_PLUGIN_ARTIFACTS = [
|
|
|
98780
98780
|
join63("extensions", "assets.generated.json"),
|
|
98781
98781
|
join63("extensions", "omo-member.js"),
|
|
98782
98782
|
join63("extensions", "memory-run-supervisor.mjs"),
|
|
98783
|
+
join63("extensions", "gateway-store-worker.mjs"),
|
|
98783
98784
|
...PERSONA_ASSET_FILES.map((filename) => join63("extensions", filename)),
|
|
98784
98785
|
join63("skills", "ast-grep", "SKILL.md"),
|
|
98785
98786
|
join63("skills", "browser", "SKILL.md"),
|
|
@@ -98802,6 +98803,7 @@ var REQUIRED_PLUGIN_ARTIFACTS = [
|
|
|
98802
98803
|
join63("skills", "visual-qa", "SKILL.md"),
|
|
98803
98804
|
join63("skills-conditional", "x-search", "SKILL.md"),
|
|
98804
98805
|
join63("runtime", "agent-toolkit-sdk", "sdk.js"),
|
|
98806
|
+
join63("runtime", "thread-sdk", "sdk.js"),
|
|
98805
98807
|
join63("runtime", "ast-grep-mcp", "cli.js"),
|
|
98806
98808
|
join63("runtime", "lsp-daemon", "dist", "cli.js"),
|
|
98807
98809
|
join63("runtime", "lsp-daemon", "dist", "index.js"),
|
|
@@ -105319,10 +105321,14 @@ function resolveOsProvider2() {
|
|
|
105319
105321
|
function resolveTransportFactory() {
|
|
105320
105322
|
return transportFactoryOverride2 ?? createDefaultPostHogTransport;
|
|
105321
105323
|
}
|
|
105324
|
+
var PLUGIN_TRANSPORT_OPTIONS = { flushAt: 20 };
|
|
105322
105325
|
var NO_OP_POSTHOG2 = {
|
|
105323
105326
|
trackActive: () => {
|
|
105324
105327
|
return;
|
|
105325
105328
|
},
|
|
105329
|
+
flush: async () => {
|
|
105330
|
+
return;
|
|
105331
|
+
},
|
|
105326
105332
|
shutdown: async () => {
|
|
105327
105333
|
return;
|
|
105328
105334
|
}
|
|
@@ -105359,6 +105365,16 @@ function logTelemetryDiagnostic(input) {
|
|
|
105359
105365
|
source: input.source
|
|
105360
105366
|
});
|
|
105361
105367
|
}
|
|
105368
|
+
function createProductConfig(source) {
|
|
105369
|
+
const product = createOpencodeTelemetryProductConfig();
|
|
105370
|
+
if (source !== "plugin") {
|
|
105371
|
+
return product;
|
|
105372
|
+
}
|
|
105373
|
+
return {
|
|
105374
|
+
...product,
|
|
105375
|
+
transportOptions: { ...product.transportOptions, ...PLUGIN_TRANSPORT_OPTIONS }
|
|
105376
|
+
};
|
|
105377
|
+
}
|
|
105362
105378
|
function createPostHogClient2(source, options = {}) {
|
|
105363
105379
|
const env = process.env;
|
|
105364
105380
|
if (shouldDisablePostHog(env, options.configEnabled)) {
|
|
@@ -105368,7 +105384,7 @@ function createPostHogClient2(source, options = {}) {
|
|
|
105368
105384
|
diagnostics: logTelemetryDiagnostic,
|
|
105369
105385
|
env: createCoreCompatibleTelemetryEnv(env),
|
|
105370
105386
|
osProvider: resolveOsProvider2(),
|
|
105371
|
-
product:
|
|
105387
|
+
product: createProductConfig(source),
|
|
105372
105388
|
source,
|
|
105373
105389
|
transportFactory: resolveTransportFactory()
|
|
105374
105390
|
});
|
|
@@ -105387,6 +105403,17 @@ function createPostHogClient2(source, options = {}) {
|
|
|
105387
105403
|
reason
|
|
105388
105404
|
});
|
|
105389
105405
|
},
|
|
105406
|
+
flush: async () => {
|
|
105407
|
+
try {
|
|
105408
|
+
await client.flush();
|
|
105409
|
+
} catch (error) {
|
|
105410
|
+
log2("[posthog] telemetry flush failed", {
|
|
105411
|
+
error: String(error),
|
|
105412
|
+
errorKind: error instanceof Error ? "error" : "non_error",
|
|
105413
|
+
source
|
|
105414
|
+
});
|
|
105415
|
+
}
|
|
105416
|
+
},
|
|
105390
105417
|
shutdown: async () => {
|
|
105391
105418
|
await client.shutdown();
|
|
105392
105419
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ModelMetadata } from "../../shared/connected-providers-cache";
|
|
2
|
+
/**
|
|
3
|
+
* Drops connected providers whose cached model list is known and does not contain the model.
|
|
4
|
+
* Providers without a cached model list are kept, so an incomplete cache never blocks a fallback.
|
|
5
|
+
*/
|
|
6
|
+
export declare function filterProvidersServingModel(args: {
|
|
7
|
+
providers: string[];
|
|
8
|
+
model: string;
|
|
9
|
+
connectedSet: Set<string> | null;
|
|
10
|
+
modelsByProvider: Record<string, string[] | ModelMetadata[]> | undefined;
|
|
11
|
+
transformModelForProvider: (providerID: string, model: string) => string;
|
|
12
|
+
}): string[];
|
|
@@ -194,6 +194,7 @@ export declare class BackgroundManager {
|
|
|
194
194
|
* Prevents premature completion when session.idle fires before agent responds.
|
|
195
195
|
*/
|
|
196
196
|
private validateSessionHasOutput;
|
|
197
|
+
private readStoppedSessionError;
|
|
197
198
|
private clearNotificationsForTask;
|
|
198
199
|
/**
|
|
199
200
|
* Remove task from pending tracking for its parent session.
|
|
@@ -90,6 +90,8 @@ export interface BackgroundTask {
|
|
|
90
90
|
stablePolls?: number;
|
|
91
91
|
/** Number of consecutive polls where session was missing from status map */
|
|
92
92
|
consecutiveMissedPolls?: number;
|
|
93
|
+
/** Number of consecutive idle polls where the session still ended on an errored assistant turn */
|
|
94
|
+
consecutiveErroredIdlePolls?: number;
|
|
93
95
|
}
|
|
94
96
|
export interface BackgroundTaskSnapshot {
|
|
95
97
|
readonly title: string;
|
package/dist/index.js
CHANGED
|
@@ -4689,7 +4689,11 @@ var init_tool_name = __esm(() => {
|
|
|
4689
4689
|
|
|
4690
4690
|
// packages/utils/src/replace-tool-args.ts
|
|
4691
4691
|
function replaceToolArgs(output, patch) {
|
|
4692
|
-
output.args
|
|
4692
|
+
if (Object.isFrozen(output.args)) {
|
|
4693
|
+
output.args = { ...output.args, ...patch };
|
|
4694
|
+
return;
|
|
4695
|
+
}
|
|
4696
|
+
Object.assign(output.args, patch);
|
|
4693
4697
|
}
|
|
4694
4698
|
|
|
4695
4699
|
// packages/utils/src/format-duration.ts
|
|
@@ -98582,7 +98586,7 @@ function getCachedVersion(options = {}) {
|
|
|
98582
98586
|
// package.json
|
|
98583
98587
|
var package_default = {
|
|
98584
98588
|
name: "oh-my-opencode",
|
|
98585
|
-
version: "5.1.
|
|
98589
|
+
version: "5.1.13",
|
|
98586
98590
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
98587
98591
|
main: "./dist/index.js",
|
|
98588
98592
|
types: "dist/index.d.ts",
|
|
@@ -98759,7 +98763,7 @@ var package_default = {
|
|
|
98759
98763
|
},
|
|
98760
98764
|
devDependencies: {
|
|
98761
98765
|
"@clack/prompts": "^1.8.1",
|
|
98762
|
-
"@code-yeongyu/senpi": "2026.10.
|
|
98766
|
+
"@code-yeongyu/senpi": "2026.10.3",
|
|
98763
98767
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
98764
98768
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
98765
98769
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
@@ -98817,18 +98821,18 @@ var package_default = {
|
|
|
98817
98821
|
typescript: "^7.0.2"
|
|
98818
98822
|
},
|
|
98819
98823
|
optionalDependencies: {
|
|
98820
|
-
"oh-my-opencode-darwin-arm64": "5.1.
|
|
98821
|
-
"oh-my-opencode-darwin-x64": "5.1.
|
|
98822
|
-
"oh-my-opencode-darwin-x64-baseline": "5.1.
|
|
98823
|
-
"oh-my-opencode-linux-arm64": "5.1.
|
|
98824
|
-
"oh-my-opencode-linux-arm64-musl": "5.1.
|
|
98825
|
-
"oh-my-opencode-linux-x64": "5.1.
|
|
98826
|
-
"oh-my-opencode-linux-x64-baseline": "5.1.
|
|
98827
|
-
"oh-my-opencode-linux-x64-musl": "5.1.
|
|
98828
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.1.
|
|
98829
|
-
"oh-my-opencode-windows-arm64": "5.1.
|
|
98830
|
-
"oh-my-opencode-windows-x64": "5.1.
|
|
98831
|
-
"oh-my-opencode-windows-x64-baseline": "5.1.
|
|
98824
|
+
"oh-my-opencode-darwin-arm64": "5.1.13",
|
|
98825
|
+
"oh-my-opencode-darwin-x64": "5.1.13",
|
|
98826
|
+
"oh-my-opencode-darwin-x64-baseline": "5.1.13",
|
|
98827
|
+
"oh-my-opencode-linux-arm64": "5.1.13",
|
|
98828
|
+
"oh-my-opencode-linux-arm64-musl": "5.1.13",
|
|
98829
|
+
"oh-my-opencode-linux-x64": "5.1.13",
|
|
98830
|
+
"oh-my-opencode-linux-x64-baseline": "5.1.13",
|
|
98831
|
+
"oh-my-opencode-linux-x64-musl": "5.1.13",
|
|
98832
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.1.13",
|
|
98833
|
+
"oh-my-opencode-windows-arm64": "5.1.13",
|
|
98834
|
+
"oh-my-opencode-windows-x64": "5.1.13",
|
|
98835
|
+
"oh-my-opencode-windows-x64-baseline": "5.1.13"
|
|
98832
98836
|
},
|
|
98833
98837
|
overrides: {
|
|
98834
98838
|
hono: "^4.13.8",
|
|
@@ -107944,11 +107948,17 @@ var TOAST_MESSAGE = [
|
|
|
107944
107948
|
"For other GPT models, always use Hephaestus."
|
|
107945
107949
|
].join(`
|
|
107946
107950
|
`);
|
|
107947
|
-
|
|
107951
|
+
var HEPHAESTUS_UNAVAILABLE_TOAST_MESSAGE = [
|
|
107952
|
+
"Sisyphus is running with a GPT model it has no native prompt for.",
|
|
107953
|
+
"Hephaestus is not available in this session (disabled, or its configured model is not a supported GPT model), so the agent was not switched.",
|
|
107954
|
+
"Use a Claude, Kimi, or GLM model for Sisyphus, or enable Hephaestus with a supported GPT model."
|
|
107955
|
+
].join(`
|
|
107956
|
+
`);
|
|
107957
|
+
function showToast(ctx, sessionID, message) {
|
|
107948
107958
|
ctx.client.tui.showToast({
|
|
107949
107959
|
body: {
|
|
107950
107960
|
title: TOAST_TITLE,
|
|
107951
|
-
message
|
|
107961
|
+
message,
|
|
107952
107962
|
variant: "error",
|
|
107953
107963
|
duration: 1e4
|
|
107954
107964
|
}
|
|
@@ -107984,10 +107994,19 @@ function createNoSisyphusGptHook(ctx) {
|
|
|
107984
107994
|
}
|
|
107985
107995
|
}
|
|
107986
107996
|
if (agentKey === "sisyphus" && modelID && isGptModel(modelID) && !isGptNativeSisyphusModel(modelID) && !isGpt6Model(modelID)) {
|
|
107987
|
-
|
|
107988
|
-
|
|
107997
|
+
if (!isAgentRegistered("hephaestus")) {
|
|
107998
|
+
showToast(ctx, input.sessionID, HEPHAESTUS_UNAVAILABLE_TOAST_MESSAGE);
|
|
107999
|
+
log2("[no-sisyphus-gpt] Hephaestus is not registered; keeping Sisyphus instead of redirecting", {
|
|
108000
|
+
sessionID: input.sessionID,
|
|
108001
|
+
modelID
|
|
108002
|
+
});
|
|
108003
|
+
return;
|
|
108004
|
+
}
|
|
108005
|
+
const hephaestusAgent = resolveRegisteredAgentName("hephaestus") ?? "hephaestus";
|
|
108006
|
+
showToast(ctx, input.sessionID, TOAST_MESSAGE);
|
|
108007
|
+
input.agent = hephaestusAgent;
|
|
107989
108008
|
if (output?.message) {
|
|
107990
|
-
output.message.agent =
|
|
108009
|
+
output.message.agent = hephaestusAgent;
|
|
107991
108010
|
}
|
|
107992
108011
|
updateSessionAgent(input.sessionID, "hephaestus");
|
|
107993
108012
|
}
|
|
@@ -108472,11 +108491,18 @@ var SCOPE_PRIORITY = {
|
|
|
108472
108491
|
config: 1,
|
|
108473
108492
|
builtin: 1
|
|
108474
108493
|
};
|
|
108494
|
+
function compareCodeUnits(left, right) {
|
|
108495
|
+
if (left < right)
|
|
108496
|
+
return -1;
|
|
108497
|
+
if (left > right)
|
|
108498
|
+
return 1;
|
|
108499
|
+
return 0;
|
|
108500
|
+
}
|
|
108475
108501
|
function sortByScopePriority(items) {
|
|
108476
108502
|
return [...items].sort((left, right) => {
|
|
108477
108503
|
const leftPriority = SCOPE_PRIORITY[left.scope] || 0;
|
|
108478
108504
|
const rightPriority = SCOPE_PRIORITY[right.scope] || 0;
|
|
108479
|
-
return rightPriority - leftPriority;
|
|
108505
|
+
return rightPriority - leftPriority || compareCodeUnits(left.name, right.name);
|
|
108480
108506
|
});
|
|
108481
108507
|
}
|
|
108482
108508
|
|
|
@@ -129572,6 +129598,7 @@ function resolveModelAndFallbackChain(args) {
|
|
|
129572
129598
|
const agentOverride = agentOverrides?.[agentConfigKey] ?? (agentOverrides ? Object.entries(agentOverrides).find(([key]) => key.toLowerCase() === agentConfigKey)?.[1] : undefined);
|
|
129573
129599
|
const agentCategoryModel = agentOverride?.category ? userCategories?.[agentOverride.category]?.model : undefined;
|
|
129574
129600
|
const agentCategoryVariant = agentOverride?.category ? userCategories?.[agentOverride.category]?.variant : undefined;
|
|
129601
|
+
const hasExplicitUserModel = Boolean(agentOverride?.model ?? agentCategoryModel);
|
|
129575
129602
|
let model;
|
|
129576
129603
|
if (agentOverride?.model) {
|
|
129577
129604
|
const normalized = parseModelString(agentOverride.model);
|
|
@@ -129614,7 +129641,7 @@ function resolveModelAndFallbackChain(args) {
|
|
|
129614
129641
|
const configuredFallbackChain = buildFallbackChainFromModels(normalizedFallbackModels, defaultProviderID);
|
|
129615
129642
|
return {
|
|
129616
129643
|
model,
|
|
129617
|
-
fallbackChain: configuredFallbackChain ?? agentRequirement?.fallbackChain
|
|
129644
|
+
fallbackChain: configuredFallbackChain ?? (hasExplicitUserModel ? undefined : agentRequirement?.fallbackChain)
|
|
129618
129645
|
};
|
|
129619
129646
|
}
|
|
129620
129647
|
function createCallOmoAgent(ctx, backgroundManager, disabledAgents = [], agentOverrides, userCategories, modelFallbackControllerAccessor) {
|
|
@@ -137200,6 +137227,31 @@ function isEmptyNoProgressAssistantTurnInfo(info) {
|
|
|
137200
137227
|
return !!infoRecord && infoRecord.role === "assistant" && infoRecord.finish === "unknown" && allTokenCountsIndicateNoProgress(infoRecord.tokens);
|
|
137201
137228
|
}
|
|
137202
137229
|
|
|
137230
|
+
// packages/omo-opencode/src/features/background-agent/fallback-provider-model-filter.ts
|
|
137231
|
+
function canonicalizeModelID2(modelID) {
|
|
137232
|
+
return modelID.toLowerCase().replace(/\./g, "-");
|
|
137233
|
+
}
|
|
137234
|
+
function providerListsModel(providerModels, modelID) {
|
|
137235
|
+
const wanted = canonicalizeModelID2(modelID);
|
|
137236
|
+
return providerModels.some((entry) => {
|
|
137237
|
+
const id = typeof entry === "string" ? entry : entry.id;
|
|
137238
|
+
return canonicalizeModelID2(id) === wanted;
|
|
137239
|
+
});
|
|
137240
|
+
}
|
|
137241
|
+
function filterProvidersServingModel(args) {
|
|
137242
|
+
const { providers, model, connectedSet, modelsByProvider, transformModelForProvider } = args;
|
|
137243
|
+
if (!connectedSet || !modelsByProvider)
|
|
137244
|
+
return providers;
|
|
137245
|
+
return providers.filter((provider) => {
|
|
137246
|
+
if (!connectedSet.has(provider.toLowerCase()))
|
|
137247
|
+
return true;
|
|
137248
|
+
const providerModels = modelsByProvider[provider];
|
|
137249
|
+
if (!providerModels || providerModels.length === 0)
|
|
137250
|
+
return true;
|
|
137251
|
+
return providerListsModel(providerModels, transformModelForProvider(provider, model));
|
|
137252
|
+
});
|
|
137253
|
+
}
|
|
137254
|
+
|
|
137203
137255
|
// packages/omo-opencode/src/features/background-agent/fallback-retry-handler.ts
|
|
137204
137256
|
class TeamModeFallbackError extends Error {
|
|
137205
137257
|
constructor(message) {
|
|
@@ -137207,7 +137259,7 @@ class TeamModeFallbackError extends Error {
|
|
|
137207
137259
|
this.name = "TeamModeFallbackError";
|
|
137208
137260
|
}
|
|
137209
137261
|
}
|
|
137210
|
-
function
|
|
137262
|
+
function canonicalizeModelID3(modelID) {
|
|
137211
137263
|
return modelID.toLowerCase().replace(/\./g, "-");
|
|
137212
137264
|
}
|
|
137213
137265
|
var defaultFallbackRetryHandlerDeps = {
|
|
@@ -137255,9 +137307,25 @@ async function tryFallbackRetry(args) {
|
|
|
137255
137307
|
});
|
|
137256
137308
|
continue;
|
|
137257
137309
|
}
|
|
137258
|
-
const
|
|
137310
|
+
const servingProviders = filterProvidersServingModel({
|
|
137311
|
+
providers: candidate.providers,
|
|
137312
|
+
model: candidate.model,
|
|
137313
|
+
connectedSet,
|
|
137314
|
+
modelsByProvider: providerModelsCache?.models,
|
|
137315
|
+
transformModelForProvider: deps.transformModelForProvider
|
|
137316
|
+
});
|
|
137317
|
+
if (!isReachable({ ...candidate, providers: servingProviders })) {
|
|
137318
|
+
deps.log("[background-agent] Skipping fallback no connected provider serves:", {
|
|
137319
|
+
taskId: task.id,
|
|
137320
|
+
source,
|
|
137321
|
+
model: candidate.model,
|
|
137322
|
+
providers: candidate.providers
|
|
137323
|
+
});
|
|
137324
|
+
continue;
|
|
137325
|
+
}
|
|
137326
|
+
const candidateProviderID = deps.selectFallbackProvider(servingProviders, task.model?.providerID);
|
|
137259
137327
|
const candidateModelID = deps.transformModelForProvider(candidateProviderID, candidate.model);
|
|
137260
|
-
const isNoOpFallback = !!task.model && candidateProviderID.toLowerCase() === task.model.providerID.toLowerCase() &&
|
|
137328
|
+
const isNoOpFallback = !!task.model && candidateProviderID.toLowerCase() === task.model.providerID.toLowerCase() && canonicalizeModelID3(candidateModelID) === canonicalizeModelID3(task.model.modelID);
|
|
137261
137329
|
if (isNoOpFallback) {
|
|
137262
137330
|
deps.log("[background-agent] Skipping no-op fallback:", {
|
|
137263
137331
|
taskId: task.id,
|
|
@@ -138862,6 +138930,29 @@ async function verifySessionExists(client, sessionID, directory) {
|
|
|
138862
138930
|
return await checkSessionExistence(client, sessionID, directory) !== "missing";
|
|
138863
138931
|
}
|
|
138864
138932
|
|
|
138933
|
+
// packages/omo-opencode/src/features/background-agent/session-stopped-on-error.ts
|
|
138934
|
+
var MIN_ERRORED_IDLE_POLLS = 10;
|
|
138935
|
+
function describeSessionError(error) {
|
|
138936
|
+
if (!isRecord9(error)) {
|
|
138937
|
+
return String(error);
|
|
138938
|
+
}
|
|
138939
|
+
const data = isRecord9(error.data) ? error.data : undefined;
|
|
138940
|
+
const message = typeof data?.message === "string" ? data.message : typeof error.message === "string" ? error.message : undefined;
|
|
138941
|
+
const name = typeof error.name === "string" ? error.name : undefined;
|
|
138942
|
+
return [name, message].filter((value) => Boolean(value)).join(": ") || "unknown error";
|
|
138943
|
+
}
|
|
138944
|
+
function getStoppedSessionError(messages) {
|
|
138945
|
+
const latest = messages[messages.length - 1];
|
|
138946
|
+
if (latest?.info?.role !== "assistant") {
|
|
138947
|
+
return;
|
|
138948
|
+
}
|
|
138949
|
+
const error = latest.info.error;
|
|
138950
|
+
if (error === undefined || error === null) {
|
|
138951
|
+
return;
|
|
138952
|
+
}
|
|
138953
|
+
return describeSessionError(error);
|
|
138954
|
+
}
|
|
138955
|
+
|
|
138865
138956
|
// packages/omo-opencode/src/features/background-agent/session-idle-event-handler.ts
|
|
138866
138957
|
function handleSessionIdleBackgroundEvent(args) {
|
|
138867
138958
|
const {
|
|
@@ -141466,6 +141557,18 @@ The task was re-queued on a fallback model after a retryable failure.
|
|
|
141466
141557
|
return true;
|
|
141467
141558
|
}
|
|
141468
141559
|
}
|
|
141560
|
+
async readStoppedSessionError(sessionID) {
|
|
141561
|
+
try {
|
|
141562
|
+
const response = await messagesInDirectory(this.client, {
|
|
141563
|
+
path: { id: sessionID }
|
|
141564
|
+
}, this.directory);
|
|
141565
|
+
const messages = normalizeSDKResponse(response, [], { preferResponseOnMissingData: true });
|
|
141566
|
+
return getStoppedSessionError(messages);
|
|
141567
|
+
} catch (error) {
|
|
141568
|
+
log2("[background-agent] Error reading session messages for stopped-session check:", error);
|
|
141569
|
+
return;
|
|
141570
|
+
}
|
|
141571
|
+
}
|
|
141469
141572
|
clearNotificationsForTask(taskId) {
|
|
141470
141573
|
for (const [sessionID, tasks] of this.notifications.entries()) {
|
|
141471
141574
|
const filtered = tasks.filter((t) => t.id !== taskId);
|
|
@@ -142036,6 +142139,7 @@ The task was re-queued on a fallback model after a retryable failure.
|
|
|
142036
142139
|
}
|
|
142037
142140
|
}
|
|
142038
142141
|
if (sessionStatus && isActiveSessionStatus2(sessionStatus.type)) {
|
|
142142
|
+
task.consecutiveErroredIdlePolls = 0;
|
|
142039
142143
|
log2("[background-agent] Session still running, relying on event-based progress:", {
|
|
142040
142144
|
taskId: task.id,
|
|
142041
142145
|
sessionID,
|
|
@@ -142072,6 +142176,21 @@ The task was re-queued on a fallback model after a retryable failure.
|
|
|
142072
142176
|
}
|
|
142073
142177
|
task.consecutiveMissedPolls = 0;
|
|
142074
142178
|
}
|
|
142179
|
+
const stoppedError = await this.readStoppedSessionError(sessionID);
|
|
142180
|
+
if (stoppedError) {
|
|
142181
|
+
task.consecutiveErroredIdlePolls = (task.consecutiveErroredIdlePolls ?? 0) + 1;
|
|
142182
|
+
if (task.consecutiveErroredIdlePolls >= MIN_ERRORED_IDLE_POLLS) {
|
|
142183
|
+
log2("[background-agent] Session stopped on an error with no output and was not resumed, marking task as error:", {
|
|
142184
|
+
taskId: task.id,
|
|
142185
|
+
sessionID,
|
|
142186
|
+
error: stoppedError.slice(0, 200)
|
|
142187
|
+
});
|
|
142188
|
+
await this.failCrashedTask(task, `Subagent session stopped on an error without producing output: ${stoppedError}`);
|
|
142189
|
+
continue;
|
|
142190
|
+
}
|
|
142191
|
+
} else {
|
|
142192
|
+
task.consecutiveErroredIdlePolls = 0;
|
|
142193
|
+
}
|
|
142075
142194
|
log2("[background-agent] Polling idle/gone but no valid output yet, waiting:", task.id);
|
|
142076
142195
|
continue;
|
|
142077
142196
|
}
|
|
@@ -186629,10 +186748,14 @@ function resolveOsProvider() {
|
|
|
186629
186748
|
function resolveTransportFactory() {
|
|
186630
186749
|
return transportFactoryOverride ?? createDefaultPostHogTransport;
|
|
186631
186750
|
}
|
|
186751
|
+
var PLUGIN_TRANSPORT_OPTIONS = { flushAt: 20 };
|
|
186632
186752
|
var NO_OP_POSTHOG = {
|
|
186633
186753
|
trackActive: () => {
|
|
186634
186754
|
return;
|
|
186635
186755
|
},
|
|
186756
|
+
flush: async () => {
|
|
186757
|
+
return;
|
|
186758
|
+
},
|
|
186636
186759
|
shutdown: async () => {
|
|
186637
186760
|
return;
|
|
186638
186761
|
}
|
|
@@ -186669,6 +186792,16 @@ function logTelemetryDiagnostic(input) {
|
|
|
186669
186792
|
source: input.source
|
|
186670
186793
|
});
|
|
186671
186794
|
}
|
|
186795
|
+
function createProductConfig(source) {
|
|
186796
|
+
const product = createOpencodeTelemetryProductConfig();
|
|
186797
|
+
if (source !== "plugin") {
|
|
186798
|
+
return product;
|
|
186799
|
+
}
|
|
186800
|
+
return {
|
|
186801
|
+
...product,
|
|
186802
|
+
transportOptions: { ...product.transportOptions, ...PLUGIN_TRANSPORT_OPTIONS }
|
|
186803
|
+
};
|
|
186804
|
+
}
|
|
186672
186805
|
function createPostHogClient(source, options = {}) {
|
|
186673
186806
|
const env = process.env;
|
|
186674
186807
|
if (shouldDisablePostHog(env, options.configEnabled)) {
|
|
@@ -186678,7 +186811,7 @@ function createPostHogClient(source, options = {}) {
|
|
|
186678
186811
|
diagnostics: logTelemetryDiagnostic,
|
|
186679
186812
|
env: createCoreCompatibleTelemetryEnv(env),
|
|
186680
186813
|
osProvider: resolveOsProvider(),
|
|
186681
|
-
product:
|
|
186814
|
+
product: createProductConfig(source),
|
|
186682
186815
|
source,
|
|
186683
186816
|
transportFactory: resolveTransportFactory()
|
|
186684
186817
|
});
|
|
@@ -186697,6 +186830,17 @@ function createPostHogClient(source, options = {}) {
|
|
|
186697
186830
|
reason
|
|
186698
186831
|
});
|
|
186699
186832
|
},
|
|
186833
|
+
flush: async () => {
|
|
186834
|
+
try {
|
|
186835
|
+
await client.flush();
|
|
186836
|
+
} catch (error) {
|
|
186837
|
+
log2("[posthog] telemetry flush failed", {
|
|
186838
|
+
error: String(error),
|
|
186839
|
+
errorKind: error instanceof Error ? "error" : "non_error",
|
|
186840
|
+
source
|
|
186841
|
+
});
|
|
186842
|
+
}
|
|
186843
|
+
},
|
|
186700
186844
|
shutdown: async () => {
|
|
186701
186845
|
await client.shutdown();
|
|
186702
186846
|
}
|
|
@@ -186712,7 +186856,7 @@ function recordPluginTelemetry(input) {
|
|
|
186712
186856
|
const posthog = createPluginPostHog({ configEnabled: input.configEnabled });
|
|
186713
186857
|
const distinctId = getPostHogDistinctId();
|
|
186714
186858
|
posthog.trackActive(distinctId, "plugin_loaded");
|
|
186715
|
-
posthog.
|
|
186859
|
+
posthog.flush();
|
|
186716
186860
|
}
|
|
186717
186861
|
|
|
186718
186862
|
// packages/omo-opencode/src/testing/create-plugin-module.ts
|