oh-my-openagent 5.1.70 → 5.1.71
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 +132 -89
- package/dist/cli/service-auth/protocol-request.d.ts +1 -0
- package/dist/cli/service-auth/protocol.d.ts +2 -2
- package/dist/cli-node/index.js +132 -89
- package/dist/features/team-mode/team-runtime/resolve-member-dependencies.d.ts +6 -3
- package/dist/hooks/legacy-plugin-toast/plugin-entry-migrator.d.ts +2 -1
- package/dist/index.js +1353 -1326
- package/dist/skills/browser/runtime/omowright/manifest.json +1 -1
- package/dist/tools/session-manager/constants.d.ts +1 -3
- package/dist/tui.js +30 -14
- package/package.json +14 -14
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +10 -0
- 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/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/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- 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/scripts/install-dist/install-local.mjs +12 -2
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2132,7 +2132,7 @@ var package_default;
|
|
|
2132
2132
|
var init_package = __esm(() => {
|
|
2133
2133
|
package_default = {
|
|
2134
2134
|
name: "oh-my-opencode",
|
|
2135
|
-
version: "5.1.
|
|
2135
|
+
version: "5.1.71",
|
|
2136
2136
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
2137
2137
|
main: "./dist/index.js",
|
|
2138
2138
|
types: "dist/index.d.ts",
|
|
@@ -2330,7 +2330,7 @@ var init_package = __esm(() => {
|
|
|
2330
2330
|
},
|
|
2331
2331
|
devDependencies: {
|
|
2332
2332
|
"@clack/prompts": "^1.8.1",
|
|
2333
|
-
"@code-yeongyu/senpi": "2026.11.
|
|
2333
|
+
"@code-yeongyu/senpi": "2026.11.15",
|
|
2334
2334
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
2335
2335
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
2336
2336
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
@@ -2403,18 +2403,18 @@ var init_package = __esm(() => {
|
|
|
2403
2403
|
typescript: "^7.0.2"
|
|
2404
2404
|
},
|
|
2405
2405
|
optionalDependencies: {
|
|
2406
|
-
"oh-my-opencode-darwin-arm64": "5.1.
|
|
2407
|
-
"oh-my-opencode-darwin-x64": "5.1.
|
|
2408
|
-
"oh-my-opencode-darwin-x64-baseline": "5.1.
|
|
2409
|
-
"oh-my-opencode-linux-arm64": "5.1.
|
|
2410
|
-
"oh-my-opencode-linux-arm64-musl": "5.1.
|
|
2411
|
-
"oh-my-opencode-linux-x64": "5.1.
|
|
2412
|
-
"oh-my-opencode-linux-x64-baseline": "5.1.
|
|
2413
|
-
"oh-my-opencode-linux-x64-musl": "5.1.
|
|
2414
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.1.
|
|
2415
|
-
"oh-my-opencode-windows-arm64": "5.1.
|
|
2416
|
-
"oh-my-opencode-windows-x64": "5.1.
|
|
2417
|
-
"oh-my-opencode-windows-x64-baseline": "5.1.
|
|
2406
|
+
"oh-my-opencode-darwin-arm64": "5.1.71",
|
|
2407
|
+
"oh-my-opencode-darwin-x64": "5.1.71",
|
|
2408
|
+
"oh-my-opencode-darwin-x64-baseline": "5.1.71",
|
|
2409
|
+
"oh-my-opencode-linux-arm64": "5.1.71",
|
|
2410
|
+
"oh-my-opencode-linux-arm64-musl": "5.1.71",
|
|
2411
|
+
"oh-my-opencode-linux-x64": "5.1.71",
|
|
2412
|
+
"oh-my-opencode-linux-x64-baseline": "5.1.71",
|
|
2413
|
+
"oh-my-opencode-linux-x64-musl": "5.1.71",
|
|
2414
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.1.71",
|
|
2415
|
+
"oh-my-opencode-windows-arm64": "5.1.71",
|
|
2416
|
+
"oh-my-opencode-windows-x64": "5.1.71",
|
|
2417
|
+
"oh-my-opencode-windows-x64-baseline": "5.1.71"
|
|
2418
2418
|
},
|
|
2419
2419
|
overrides: {
|
|
2420
2420
|
hono: "^4.13.8",
|
|
@@ -77756,6 +77756,16 @@ var init_provenance = __esm(() => {
|
|
|
77756
77756
|
}).strict();
|
|
77757
77757
|
});
|
|
77758
77758
|
|
|
77759
|
+
// packages/omo-config-core/src/schema/session-wake.ts
|
|
77760
|
+
var OmoSessionWakeSettingsSchema;
|
|
77761
|
+
var init_session_wake = __esm(() => {
|
|
77762
|
+
init_zod();
|
|
77763
|
+
OmoSessionWakeSettingsSchema = object({
|
|
77764
|
+
same_device: boolean2().optional(),
|
|
77765
|
+
wake_limit: number2().int().min(0).optional()
|
|
77766
|
+
}).strict();
|
|
77767
|
+
});
|
|
77768
|
+
|
|
77759
77769
|
// packages/omo-config-core/src/schema/config.ts
|
|
77760
77770
|
var OmoOpenCodeHarnessConfigSchema, OmoDisabledSkillsSchema, OmoExcludedModelsSchema, OmoTypedHarnessConfigSchema, OmoConfigProfileSchema, OmoConfigSchema, OmoConfigLayerSchema;
|
|
77761
77771
|
var init_config = __esm(() => {
|
|
@@ -77775,11 +77785,13 @@ var init_config = __esm(() => {
|
|
|
77775
77785
|
init_device_service();
|
|
77776
77786
|
init_format_on_mutation();
|
|
77777
77787
|
init_provenance();
|
|
77788
|
+
init_session_wake();
|
|
77778
77789
|
OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
|
|
77779
77790
|
OmoDisabledSkillsSchema = array(string2());
|
|
77780
77791
|
OmoExcludedModelsSchema = array(string2());
|
|
77781
77792
|
OmoTypedHarnessConfigSchema = object({
|
|
77782
77793
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
77794
|
+
session_wake: OmoSessionWakeSettingsSchema.optional(),
|
|
77783
77795
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
77784
77796
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
77785
77797
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -77800,6 +77812,7 @@ var init_config = __esm(() => {
|
|
|
77800
77812
|
}).strict();
|
|
77801
77813
|
OmoConfigProfileSchema = object({
|
|
77802
77814
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
77815
|
+
session_wake: OmoSessionWakeSettingsSchema.optional(),
|
|
77803
77816
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
77804
77817
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
77805
77818
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -77824,6 +77837,7 @@ var init_config = __esm(() => {
|
|
|
77824
77837
|
}).strict();
|
|
77825
77838
|
OmoConfigSchema = object({
|
|
77826
77839
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
77840
|
+
session_wake: OmoSessionWakeSettingsSchema.optional(),
|
|
77827
77841
|
formatOnMutation: OmoFormatOnMutationSchema.optional(),
|
|
77828
77842
|
$schema: string2().optional(),
|
|
77829
77843
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
@@ -77852,6 +77866,7 @@ var init_config = __esm(() => {
|
|
|
77852
77866
|
}).strict();
|
|
77853
77867
|
OmoConfigLayerSchema = object({
|
|
77854
77868
|
provenance: OmoProvenanceSettingsSchema.optional(),
|
|
77869
|
+
session_wake: OmoSessionWakeSettingsSchema.optional(),
|
|
77855
77870
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
77856
77871
|
$schema: string2().optional(),
|
|
77857
77872
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
@@ -78013,6 +78028,7 @@ var init_schema = __esm(() => {
|
|
|
78013
78028
|
init_model_profile();
|
|
78014
78029
|
init_model_ref();
|
|
78015
78030
|
init_provenance();
|
|
78031
|
+
init_session_wake();
|
|
78016
78032
|
init_side_panel();
|
|
78017
78033
|
init_task();
|
|
78018
78034
|
init_team();
|
|
@@ -92861,7 +92877,7 @@ var package_default2;
|
|
|
92861
92877
|
var init_package2 = __esm(() => {
|
|
92862
92878
|
package_default2 = {
|
|
92863
92879
|
name: "@oh-my-opencode/omo-codex",
|
|
92864
|
-
version: "5.1.
|
|
92880
|
+
version: "5.1.71",
|
|
92865
92881
|
type: "module",
|
|
92866
92882
|
private: true,
|
|
92867
92883
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -109648,14 +109664,15 @@ var package_default3 = {
|
|
|
109648
109664
|
},
|
|
109649
109665
|
dependencies: {
|
|
109650
109666
|
"@clack/prompts": "^1.8.1",
|
|
109651
|
-
"@code-yeongyu/senpi": "2026.11.
|
|
109652
|
-
"@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.11.
|
|
109667
|
+
"@code-yeongyu/senpi": "2026.11.15",
|
|
109668
|
+
"@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.11.15",
|
|
109653
109669
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
109654
109670
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
109655
109671
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
109656
109672
|
"@oh-my-opencode/claude-code-compat-core": "workspace:*",
|
|
109657
109673
|
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
|
109658
109674
|
"@oh-my-opencode/delegate-core": "workspace:*",
|
|
109675
|
+
"@oh-my-opencode/device-service-core": "workspace:*",
|
|
109659
109676
|
"@oh-my-opencode/hashline-core": "workspace:*",
|
|
109660
109677
|
"@oh-my-opencode/mcp-client-core": "workspace:*",
|
|
109661
109678
|
"@oh-my-opencode/model-core": "workspace:*",
|
|
@@ -112674,14 +112691,6 @@ class RequestFailure extends SignInError {
|
|
|
112674
112691
|
this.responseStatus = responseStatus;
|
|
112675
112692
|
}
|
|
112676
112693
|
}
|
|
112677
|
-
|
|
112678
|
-
class InvalidApiResponse extends SignInError {
|
|
112679
|
-
status;
|
|
112680
|
-
constructor(status) {
|
|
112681
|
-
super("The service returned an invalid error response.");
|
|
112682
|
-
this.status = status;
|
|
112683
|
-
}
|
|
112684
|
-
}
|
|
112685
112694
|
var platformSchema = _enum(["macos", "linux", "windows"]);
|
|
112686
112695
|
var nonempty = string2().min(1);
|
|
112687
112696
|
var timestamp = string2().datetime({ offset: true });
|
|
@@ -112713,15 +112722,6 @@ var deviceCodeSchema = object({
|
|
|
112713
112722
|
expiresAt: timestamp,
|
|
112714
112723
|
intervalSeconds: number2().int().min(1).max(60)
|
|
112715
112724
|
});
|
|
112716
|
-
var envelopeSchema = object({
|
|
112717
|
-
error: object({
|
|
112718
|
-
code: nonempty,
|
|
112719
|
-
message: string2(),
|
|
112720
|
-
retryable: boolean2(),
|
|
112721
|
-
requestId: string2(),
|
|
112722
|
-
detail: unknown().optional()
|
|
112723
|
-
})
|
|
112724
|
-
});
|
|
112725
112725
|
var limitSchema = object({
|
|
112726
112726
|
reason: literal("device_limit"),
|
|
112727
112727
|
managementToken: nonempty,
|
|
@@ -112858,59 +112858,6 @@ function serviceOrigin(value) {
|
|
|
112858
112858
|
}
|
|
112859
112859
|
return url.origin;
|
|
112860
112860
|
}
|
|
112861
|
-
async function requestApi(api, path, init, signal) {
|
|
112862
|
-
let response;
|
|
112863
|
-
let body;
|
|
112864
|
-
try {
|
|
112865
|
-
response = await fetch(`${api}${path}`, {
|
|
112866
|
-
...init,
|
|
112867
|
-
redirect: "error",
|
|
112868
|
-
signal: signal ? AbortSignal.any([signal, AbortSignal.timeout(30000)]) : AbortSignal.timeout(30000)
|
|
112869
|
-
});
|
|
112870
|
-
} catch (error) {
|
|
112871
|
-
const cause = error instanceof Error && error.cause instanceof Error ? error.cause : error;
|
|
112872
|
-
const code = cause instanceof Error ? Reflect.get(cause, "code") : undefined;
|
|
112873
|
-
throw new RequestFailure(typeof code === "string" && [
|
|
112874
|
-
"ENOTFOUND",
|
|
112875
|
-
"ECONNREFUSED",
|
|
112876
|
-
"ENETUNREACH",
|
|
112877
|
-
"EHOSTUNREACH",
|
|
112878
|
-
"EAI_AGAIN",
|
|
112879
|
-
"ConnectionRefused",
|
|
112880
|
-
"EADDRNOTAVAIL",
|
|
112881
|
-
"ENETDOWN",
|
|
112882
|
-
"EHOSTDOWN",
|
|
112883
|
-
"UND_ERR_CONNECT_TIMEOUT",
|
|
112884
|
-
"ERR_TLS_HANDSHAKE_TIMEOUT",
|
|
112885
|
-
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
112886
|
-
"CERT_HAS_EXPIRED",
|
|
112887
|
-
"ERR_TLS_CERT_ALTNAME_INVALID",
|
|
112888
|
-
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
112889
|
-
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
112890
|
-
"CERT_NOT_YET_VALID",
|
|
112891
|
-
"UNABLE_TO_GET_ISSUER_CERT",
|
|
112892
|
-
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
112893
|
-
"CERT_SIGNATURE_FAILURE",
|
|
112894
|
-
"CERT_UNTRUSTED",
|
|
112895
|
-
"CERT_REJECTED"
|
|
112896
|
-
].includes(code));
|
|
112897
|
-
}
|
|
112898
|
-
if (response.status === 204)
|
|
112899
|
-
return null;
|
|
112900
|
-
try {
|
|
112901
|
-
body = await response.json();
|
|
112902
|
-
} catch {
|
|
112903
|
-
throw new RequestFailure(false, response.status);
|
|
112904
|
-
}
|
|
112905
|
-
if (response.ok)
|
|
112906
|
-
return body;
|
|
112907
|
-
const envelope = envelopeSchema.safeParse(body);
|
|
112908
|
-
if (!envelope.success)
|
|
112909
|
-
throw new InvalidApiResponse(response.status);
|
|
112910
|
-
const error = envelope.data.error;
|
|
112911
|
-
const detail = limitSchema.safeParse(error.detail);
|
|
112912
|
-
throw new ApiRefusal(error.code, response.status, error.code === "entitlement_required" && detail.success ? detail.data : undefined, response.headers.get("retry-after"));
|
|
112913
|
-
}
|
|
112914
112861
|
var jsonRequest = (body) => ({
|
|
112915
112862
|
method: "POST",
|
|
112916
112863
|
headers: { "content-type": "application/json" },
|
|
@@ -115363,6 +115310,100 @@ ${key.name}`;
|
|
|
115363
115310
|
// packages/omo-opencode/src/cli/service-auth/session.ts
|
|
115364
115311
|
import { homedir as homedir34 } from "os";
|
|
115365
115312
|
|
|
115313
|
+
// packages/device-service-core/src/local-only.ts
|
|
115314
|
+
var KEY2 = Symbol.for("omo.local-only-process.v1");
|
|
115315
|
+
function state3() {
|
|
115316
|
+
const holder = globalThis;
|
|
115317
|
+
holder[KEY2] ??= { marked: false };
|
|
115318
|
+
return holder[KEY2];
|
|
115319
|
+
}
|
|
115320
|
+
|
|
115321
|
+
class LocalOnlyNetworkRefused extends Error {
|
|
115322
|
+
code = "local_only_network_refused";
|
|
115323
|
+
site;
|
|
115324
|
+
constructor(site) {
|
|
115325
|
+
super(`a local-only omo remote command reached the network at ${site}`);
|
|
115326
|
+
this.site = site;
|
|
115327
|
+
}
|
|
115328
|
+
}
|
|
115329
|
+
function refuseIfLocalOnly(site) {
|
|
115330
|
+
if (state3().marked)
|
|
115331
|
+
throw new LocalOnlyNetworkRefused(site);
|
|
115332
|
+
}
|
|
115333
|
+
|
|
115334
|
+
// packages/omo-opencode/src/cli/service-auth/protocol-request.ts
|
|
115335
|
+
init_zod();
|
|
115336
|
+
class InvalidApiResponse extends SignInError {
|
|
115337
|
+
status;
|
|
115338
|
+
constructor(status) {
|
|
115339
|
+
super("The service returned an invalid error response.");
|
|
115340
|
+
this.status = status;
|
|
115341
|
+
}
|
|
115342
|
+
}
|
|
115343
|
+
var envelopeSchema = object({
|
|
115344
|
+
error: object({
|
|
115345
|
+
code: nonempty,
|
|
115346
|
+
message: string2(),
|
|
115347
|
+
retryable: boolean2(),
|
|
115348
|
+
requestId: string2(),
|
|
115349
|
+
detail: unknown().optional()
|
|
115350
|
+
})
|
|
115351
|
+
});
|
|
115352
|
+
async function requestApi(api, path, init, signal) {
|
|
115353
|
+
refuseIfLocalOnly("service-auth/protocol-request.ts requestApi");
|
|
115354
|
+
let response;
|
|
115355
|
+
let body;
|
|
115356
|
+
try {
|
|
115357
|
+
response = await fetch(`${api}${path}`, {
|
|
115358
|
+
...init,
|
|
115359
|
+
redirect: "error",
|
|
115360
|
+
signal: signal ? AbortSignal.any([signal, AbortSignal.timeout(30000)]) : AbortSignal.timeout(30000)
|
|
115361
|
+
});
|
|
115362
|
+
} catch (error) {
|
|
115363
|
+
const cause = error instanceof Error && error.cause instanceof Error ? error.cause : error;
|
|
115364
|
+
const code = cause instanceof Error ? Reflect.get(cause, "code") : undefined;
|
|
115365
|
+
throw new RequestFailure(typeof code === "string" && [
|
|
115366
|
+
"ENOTFOUND",
|
|
115367
|
+
"ECONNREFUSED",
|
|
115368
|
+
"ENETUNREACH",
|
|
115369
|
+
"EHOSTUNREACH",
|
|
115370
|
+
"EAI_AGAIN",
|
|
115371
|
+
"ConnectionRefused",
|
|
115372
|
+
"EADDRNOTAVAIL",
|
|
115373
|
+
"ENETDOWN",
|
|
115374
|
+
"EHOSTDOWN",
|
|
115375
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
115376
|
+
"ERR_TLS_HANDSHAKE_TIMEOUT",
|
|
115377
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
115378
|
+
"CERT_HAS_EXPIRED",
|
|
115379
|
+
"ERR_TLS_CERT_ALTNAME_INVALID",
|
|
115380
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
115381
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
115382
|
+
"CERT_NOT_YET_VALID",
|
|
115383
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
115384
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
115385
|
+
"CERT_SIGNATURE_FAILURE",
|
|
115386
|
+
"CERT_UNTRUSTED",
|
|
115387
|
+
"CERT_REJECTED"
|
|
115388
|
+
].includes(code));
|
|
115389
|
+
}
|
|
115390
|
+
if (response.status === 204)
|
|
115391
|
+
return null;
|
|
115392
|
+
try {
|
|
115393
|
+
body = await response.json();
|
|
115394
|
+
} catch {
|
|
115395
|
+
throw new RequestFailure(false, response.status);
|
|
115396
|
+
}
|
|
115397
|
+
if (response.ok)
|
|
115398
|
+
return body;
|
|
115399
|
+
const envelope = envelopeSchema.safeParse(body);
|
|
115400
|
+
if (!envelope.success)
|
|
115401
|
+
throw new InvalidApiResponse(response.status);
|
|
115402
|
+
const error = envelope.data.error;
|
|
115403
|
+
const detail = limitSchema.safeParse(error.detail);
|
|
115404
|
+
throw new ApiRefusal(error.code, response.status, error.code === "entitlement_required" && detail.success ? detail.data : undefined, response.headers.get("retry-after"));
|
|
115405
|
+
}
|
|
115406
|
+
|
|
115366
115407
|
// packages/omo-opencode/src/cli/service-auth/signed-out-marker.ts
|
|
115367
115408
|
init_zod();
|
|
115368
115409
|
import { mkdir as mkdir13, readFile as readFile38, rename as rename10, rm as rm19, writeFile as writeFile18 } from "fs/promises";
|
|
@@ -115437,6 +115478,7 @@ function createSession(options) {
|
|
|
115437
115478
|
}
|
|
115438
115479
|
if (Date.parse(current.accessTokenExpiresAt) > now() + 30000)
|
|
115439
115480
|
return current;
|
|
115481
|
+
refuseIfLocalOnly("service-auth/session.ts refresh");
|
|
115440
115482
|
await store.write({ ...current, refreshState: "uncertain" });
|
|
115441
115483
|
try {
|
|
115442
115484
|
const tokens = parseReply(tokenSchema, await request("/v1/session/refresh", jsonRequest({ refreshToken: current.refreshToken })));
|
|
@@ -118795,7 +118837,7 @@ var NONE2 = Symbol("none registered");
|
|
|
118795
118837
|
// packages/omo-native/package.json
|
|
118796
118838
|
var package_default4 = {
|
|
118797
118839
|
name: "omo-ai",
|
|
118798
|
-
version: "5.1.
|
|
118840
|
+
version: "5.1.71",
|
|
118799
118841
|
type: "module",
|
|
118800
118842
|
description: "OmO Native - the standalone omo command with the OMO extension built in: bun add -g omo-ai",
|
|
118801
118843
|
bin: {
|
|
@@ -118812,7 +118854,7 @@ var package_default4 = {
|
|
|
118812
118854
|
postinstall: "node bin/senpi-patch.mjs"
|
|
118813
118855
|
},
|
|
118814
118856
|
dependencies: {
|
|
118815
|
-
"@code-yeongyu/senpi": "2026.11.
|
|
118857
|
+
"@code-yeongyu/senpi": "2026.11.15"
|
|
118816
118858
|
},
|
|
118817
118859
|
repository: {
|
|
118818
118860
|
type: "git",
|
|
@@ -118825,6 +118867,7 @@ var isRecord20 = (value) => typeof value === "object" && value !== null;
|
|
|
118825
118867
|
async function accountOf(api, credentials, doFetch) {
|
|
118826
118868
|
if (credentials.accountId !== undefined)
|
|
118827
118869
|
return credentials.accountId;
|
|
118870
|
+
refuseIfLocalOnly("omo-native/device-service-handoff.ts accountOf");
|
|
118828
118871
|
const response = await doFetch(`${api}/v1/me`, { headers: { authorization: `Bearer ${credentials.accessToken}` } });
|
|
118829
118872
|
if (!response.ok)
|
|
118830
118873
|
throw new Error(`the account read failed (${response.status})`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function requestApi(api: string, path: string, init: RequestInit, signal?: AbortSignal): Promise<unknown>;
|
|
@@ -15,6 +15,7 @@ export declare const platformSchema: z.ZodEnum<{
|
|
|
15
15
|
windows: "windows";
|
|
16
16
|
}>;
|
|
17
17
|
export type Platform = z.infer<typeof platformSchema>;
|
|
18
|
+
export declare const nonempty: z.ZodString;
|
|
18
19
|
export declare const tokenSchema: z.ZodObject<{
|
|
19
20
|
accessToken: z.ZodString;
|
|
20
21
|
accessTokenExpiresAt: z.ZodString;
|
|
@@ -73,7 +74,7 @@ export declare const deviceCodeSchema: z.ZodObject<{
|
|
|
73
74
|
expiresAt: z.ZodString;
|
|
74
75
|
intervalSeconds: z.ZodNumber;
|
|
75
76
|
}, z.core.$strip>;
|
|
76
|
-
declare const limitSchema: z.ZodObject<{
|
|
77
|
+
export declare const limitSchema: z.ZodObject<{
|
|
77
78
|
reason: z.ZodLiteral<"device_limit">;
|
|
78
79
|
managementToken: z.ZodString;
|
|
79
80
|
used: z.ZodNumber;
|
|
@@ -111,6 +112,5 @@ export declare class ApiRefusal extends SignInError {
|
|
|
111
112
|
}
|
|
112
113
|
export declare function parseReply<T>(schema: z.ZodType<T>, value: unknown): T;
|
|
113
114
|
export declare function serviceOrigin(value: string): string;
|
|
114
|
-
export declare function requestApi(api: string, path: string, init: RequestInit, signal?: AbortSignal): Promise<unknown>;
|
|
115
115
|
export declare const jsonRequest: (body: unknown) => RequestInit;
|
|
116
116
|
export {};
|