oh-my-opencode 5.1.29 → 5.1.32
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/README.ja.md +2 -0
- package/README.ko.md +2 -0
- package/README.md +2 -0
- package/README.ru.md +2 -0
- package/README.zh-cn.md +2 -0
- package/dist/cli/cli-program.d.ts +1 -20
- package/dist/cli/index.js +950 -51
- package/dist/cli/install-command-options.d.ts +20 -0
- package/dist/cli/service-auth/browser.d.ts +3 -0
- package/dist/cli/service-auth/cli-keystore.fixture.d.ts +7 -0
- package/dist/cli/service-auth/commands.d.ts +19 -0
- package/dist/cli/service-auth/device-flow.d.ts +15 -0
- package/dist/cli/service-auth/device-keys.d.ts +10 -0
- package/dist/cli/service-auth/device-name.d.ts +3 -0
- package/dist/cli/service-auth/keystore.d.ts +20 -0
- package/dist/cli/service-auth/loopback.d.ts +11 -0
- package/dist/cli/service-auth/protocol.d.ts +86 -0
- package/dist/cli/service-auth/refresh-child.fixture.d.ts +1 -0
- package/dist/cli/service-auth/session.d.ts +17 -0
- package/dist/cli/service-auth/terminal-text.d.ts +1 -0
- package/dist/cli/service-auth/test-support.d.ts +43 -0
- package/dist/cli/service-auth/tls-test-certificate.d.ts +4 -0
- package/dist/cli-node/index.js +950 -51
- package/dist/features/background-agent/task-poller.d.ts +3 -0
- package/dist/features/opencode-skill-loader/opencode-shell-skill-content.d.ts +8 -0
- package/dist/features/opencode-skill-loader/skill-content.d.ts +1 -0
- package/dist/features/team-mode/tools/lifecycle-inline-spec.d.ts +1 -0
- package/dist/hooks/keyword-detector/constants.d.ts +1 -0
- package/dist/hooks/non-interactive-env/non-interactive-env-hook.d.ts +5 -1
- package/dist/index.js +40791 -40412
- package/dist/shared/disabled-agents.d.ts +1 -0
- package/dist/shared/opencode-shell.d.ts +27 -0
- package/dist/skills/browser/SKILL.md +1 -1
- package/dist/skills/browser/runtime/omowright/manifest.json +1 -1
- package/dist/skills/ultimate-browsing/SKILL.md +14 -16
- package/dist/skills/ulw-execute/SKILL.md +2 -2
- package/dist/skills/ulw-research/SKILL.md +17 -18
- package/dist/skills/ulw-research/scripts/cli-support.test.ts +5 -3
- package/dist/skills/ulw-research/scripts/outcome.test.ts +10 -4
- package/dist/skills/ulw-research/scripts/report-tools.test.ts +3 -2
- package/dist/skills/visual-qa/scripts/cli.test.ts +5 -3
- package/dist/tools/delegate-task/executor-types.d.ts +1 -0
- package/dist/tools/delegate-task/sync-session-creator.d.ts +1 -0
- package/dist/tools/delegate-task/types.d.ts +2 -0
- package/dist/tools/session-manager/sdk-storage.d.ts +15 -2
- package/dist/tools/session-manager/session-error.d.ts +7 -0
- package/dist/tools/session-manager/storage.d.ts +4 -2
- package/dist/tui.js +89 -21
- package/package.json +15 -14
- package/packages/git-bash-mcp/dist/cli.js +1 -1
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +90 -0
- package/packages/lsp-core/src/lsp/client.ts +3 -1
- package/packages/lsp-core/src/lsp/workspace-apply-edit-test-support.ts +5 -2
- package/packages/lsp-daemon/dist/cli.js +1 -1
- package/packages/lsp-daemon/dist/client.js +1 -1
- package/packages/lsp-daemon/dist/index.js +1 -1
- package/packages/lsp-tools-mcp/dist/cli.js +1 -1
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +1 -1
- package/packages/lsp-tools-mcp/dist/mcp.js +1 -1
- package/packages/lsp-tools-mcp/dist/tools.js +1 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +7 -4
- 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/lcx/skills/lcx-contribute-bug-fix/SKILL.md +7 -4
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +1 -1
- 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/teammode/skills/teammode/SKILL.md +3 -3
- 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/dist/cli.js +18 -15
- 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/ultrawork/src/directive-content.ts +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/directive.md +18 -15
- 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/skills/ulw-loop/SKILL.md +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +2 -2
- 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/scripts/auto-update-plan.mjs +2 -0
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +2 -0
- package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +2 -0
- package/packages/omo-codex/plugin/scripts/build-components.mjs +1 -0
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +42 -10
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +2 -2
- package/packages/omo-codex/plugin/skills/browser/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/SKILL.md +7 -4
- package/packages/omo-codex/plugin/skills/teammode/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +14 -16
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +18 -15
- package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +17 -18
- package/packages/omo-codex/plugin/test/materialize-shared-upstreams.test.mjs +179 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -2
- package/packages/omo-codex/plugin/test/windows-console-hide.test.mjs +150 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +11 -6
- package/packages/prompts-core/prompts/ultrawork/codex.md +18 -15
- package/packages/shared-skills/skills/browser/SKILL.md +1 -1
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +14 -16
- package/packages/shared-skills/skills/ulw-execute/SKILL.md +2 -2
- package/packages/shared-skills/skills/ulw-research/SKILL.md +17 -18
- package/packages/shared-skills/skills/ulw-research/scripts/cli-support.test.ts +5 -3
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.test.ts +10 -4
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools.test.ts +3 -2
- package/packages/shared-skills/skills/visual-qa/scripts/cli.test.ts +5 -3
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InstallArgs } from "./types";
|
|
2
|
+
export type InstallCommandOptions = {
|
|
3
|
+
readonly tui?: boolean;
|
|
4
|
+
readonly claude?: InstallArgs["claude"];
|
|
5
|
+
readonly openai?: InstallArgs["openai"];
|
|
6
|
+
readonly gemini?: InstallArgs["gemini"];
|
|
7
|
+
readonly copilot?: InstallArgs["copilot"];
|
|
8
|
+
readonly platform?: InstallArgs["platform"];
|
|
9
|
+
readonly opencodeZen?: InstallArgs["opencodeZen"];
|
|
10
|
+
readonly zaiCodingPlan?: InstallArgs["zaiCodingPlan"];
|
|
11
|
+
readonly kimiForCoding?: InstallArgs["kimiForCoding"];
|
|
12
|
+
readonly opencodeGo?: InstallArgs["opencodeGo"];
|
|
13
|
+
readonly bailianCodingPlan?: InstallArgs["bailianCodingPlan"];
|
|
14
|
+
readonly minimaxCnCodingPlan?: InstallArgs["minimaxCnCodingPlan"];
|
|
15
|
+
readonly minimaxCodingPlan?: InstallArgs["minimaxCodingPlan"];
|
|
16
|
+
readonly vercelAiGateway?: InstallArgs["vercelAiGateway"];
|
|
17
|
+
readonly codexAutonomous?: InstallArgs["codexAutonomous"];
|
|
18
|
+
readonly skipAuth?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function resolveInstallArgs(options: InstallCommandOptions, invocationName?: string | undefined): InstallArgs;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
type BrowserExec = (file: string, args: readonly string[], env: NodeJS.ProcessEnv) => Promise<boolean>;
|
|
2
|
+
export declare function openSignInBrowser(url: string, executeBrowser?: BrowserExec, platform?: NodeJS.Platform, environment?: NodeJS.ProcessEnv): Promise<boolean>;
|
|
3
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const fakeStoreUrl: string | undefined;
|
|
2
|
+
declare const get: () => Promise<string | null>;
|
|
3
|
+
declare const set: ({ value }: {
|
|
4
|
+
readonly value: string;
|
|
5
|
+
}) => Promise<void>;
|
|
6
|
+
declare const remove: () => Promise<boolean>;
|
|
7
|
+
declare const failure: string | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { type ListedDevice } from "./protocol";
|
|
3
|
+
type Options = {
|
|
4
|
+
readonly api?: string;
|
|
5
|
+
readonly accounts?: string;
|
|
6
|
+
readonly device?: boolean;
|
|
7
|
+
readonly browser?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function deviceChoices(devices: readonly ListedDevice[]): {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
/** The OmO sign-in page. `accounts.omo.dev` is the identity provider's own account portal (#9965). */
|
|
14
|
+
export declare const DEFAULT_ACCOUNTS_ORIGIN = "https://signin.omo.dev";
|
|
15
|
+
/** The sign-in origin: the `--accounts` flag, then `OMO_SERVICE_ACCOUNTS_URL`, then the default. */
|
|
16
|
+
export declare function accountsOrigin(options: Pick<Options, "accounts">, env: Record<string, string | undefined>): string;
|
|
17
|
+
export declare function configureServiceAuthCommands(program: Command): void;
|
|
18
|
+
export declare function runServiceAuthCommand(args: readonly string[]): Promise<void>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ChooseDevice, type Platform } from "./protocol";
|
|
2
|
+
import type { Session } from "./session";
|
|
3
|
+
export type DisplayCode = {
|
|
4
|
+
readonly verificationUri: string;
|
|
5
|
+
readonly userCode: string;
|
|
6
|
+
readonly matchingCode: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function loginDevice(session: Session, options: {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly platform: Platform;
|
|
11
|
+
readonly show: (code: DisplayCode) => void;
|
|
12
|
+
readonly chooseDevice: ChooseDevice;
|
|
13
|
+
readonly now?: () => number;
|
|
14
|
+
readonly sleep?: (ms: number) => Promise<void>;
|
|
15
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Credentials } from "./protocol";
|
|
2
|
+
type SecretKey = {
|
|
3
|
+
readonly service: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
};
|
|
6
|
+
export type SecretApi = {
|
|
7
|
+
readonly get: (key: SecretKey) => Promise<string | null>;
|
|
8
|
+
readonly set: (key: SecretKey & {
|
|
9
|
+
readonly value: string;
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
readonly delete: (key: SecretKey) => Promise<boolean>;
|
|
12
|
+
};
|
|
13
|
+
export type CredentialStore = {
|
|
14
|
+
readonly read: () => Promise<Credentials | null>;
|
|
15
|
+
readonly write: (value: Credentials) => Promise<void>;
|
|
16
|
+
readonly clear: () => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export declare function credentialId(api: string): string;
|
|
19
|
+
export declare function createCredentialStore(api: string, secrets?: SecretApi | null, platform?: NodeJS.Platform): CredentialStore;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ChooseDevice, type Platform, SignInError } from "./protocol";
|
|
2
|
+
import type { Session } from "./session";
|
|
3
|
+
export declare class BrowserUnavailable extends SignInError {
|
|
4
|
+
}
|
|
5
|
+
export declare function loginLoopback(session: Session, options: {
|
|
6
|
+
readonly accounts: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly platform: Platform;
|
|
9
|
+
readonly open: (url: string) => Promise<boolean>;
|
|
10
|
+
readonly chooseDevice: ChooseDevice;
|
|
11
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare class SignInError extends Error {
|
|
3
|
+
readonly retryable: boolean;
|
|
4
|
+
readonly name = "SignInError";
|
|
5
|
+
constructor(message: string, retryable?: boolean);
|
|
6
|
+
}
|
|
7
|
+
export declare class RequestFailure extends SignInError {
|
|
8
|
+
readonly notSent: boolean;
|
|
9
|
+
constructor(notSent: boolean);
|
|
10
|
+
}
|
|
11
|
+
export declare const platformSchema: z.ZodEnum<{
|
|
12
|
+
linux: "linux";
|
|
13
|
+
macos: "macos";
|
|
14
|
+
windows: "windows";
|
|
15
|
+
}>;
|
|
16
|
+
export type Platform = z.infer<typeof platformSchema>;
|
|
17
|
+
export declare const tokenSchema: z.ZodObject<{
|
|
18
|
+
accessToken: z.ZodString;
|
|
19
|
+
accessTokenExpiresAt: z.ZodString;
|
|
20
|
+
refreshToken: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const grantSchema: z.ZodObject<{
|
|
23
|
+
accessToken: z.ZodString;
|
|
24
|
+
accessTokenExpiresAt: z.ZodString;
|
|
25
|
+
refreshToken: z.ZodString;
|
|
26
|
+
device: z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
offlineGrant: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export declare const credentialSchema: z.ZodObject<{
|
|
33
|
+
accessToken: z.ZodString;
|
|
34
|
+
accessTokenExpiresAt: z.ZodString;
|
|
35
|
+
refreshToken: z.ZodString;
|
|
36
|
+
device: z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
offlineGrant: z.ZodOptional<z.ZodString>;
|
|
41
|
+
signingPrivateKey: z.ZodString;
|
|
42
|
+
sealingPrivateKey: z.ZodString;
|
|
43
|
+
refreshState: z.ZodOptional<z.ZodLiteral<"uncertain">>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export type Credentials = z.infer<typeof credentialSchema>;
|
|
46
|
+
export declare const deviceCodeSchema: z.ZodObject<{
|
|
47
|
+
deviceCode: z.ZodString;
|
|
48
|
+
userCode: z.ZodString;
|
|
49
|
+
matchingCode: z.ZodString;
|
|
50
|
+
verificationUri: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
51
|
+
expiresAt: z.ZodString;
|
|
52
|
+
intervalSeconds: z.ZodNumber;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
declare const limitSchema: z.ZodObject<{
|
|
55
|
+
reason: z.ZodLiteral<"device_limit">;
|
|
56
|
+
managementToken: z.ZodString;
|
|
57
|
+
used: z.ZodNumber;
|
|
58
|
+
limit: z.ZodNumber;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export declare const deviceListSchema: z.ZodObject<{
|
|
61
|
+
devices: z.ZodArray<z.ZodObject<{
|
|
62
|
+
id: z.ZodString;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
revokedAt: z.ZodNullable<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export type ListedDevice = z.infer<typeof deviceListSchema>["devices"][number];
|
|
68
|
+
export type ChooseDevice = (devices: readonly ListedDevice[]) => Promise<string | null>;
|
|
69
|
+
export declare class ApiRefusal extends SignInError {
|
|
70
|
+
#private;
|
|
71
|
+
readonly status: number;
|
|
72
|
+
readonly code: string;
|
|
73
|
+
constructor(code: string, status: number, detail?: z.infer<typeof limitSchema>, retryAfter?: string | null);
|
|
74
|
+
get detail(): {
|
|
75
|
+
reason: "device_limit";
|
|
76
|
+
managementToken: string;
|
|
77
|
+
used: number;
|
|
78
|
+
limit: number;
|
|
79
|
+
} | undefined;
|
|
80
|
+
retryDelay(now: number, fallback: number): number;
|
|
81
|
+
}
|
|
82
|
+
export declare function parseReply<T>(schema: z.ZodType<T>, value: unknown): T;
|
|
83
|
+
export declare function serviceOrigin(value: string): string;
|
|
84
|
+
export declare function requestApi(api: string, path: string, init: RequestInit, signal?: AbortSignal): Promise<unknown>;
|
|
85
|
+
export declare const jsonRequest: (body: unknown) => RequestInit;
|
|
86
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type CredentialStore } from "./keystore";
|
|
2
|
+
import { type ChooseDevice, type Credentials } from "./protocol";
|
|
3
|
+
export declare function createSession(options: {
|
|
4
|
+
readonly api: string;
|
|
5
|
+
readonly store: CredentialStore;
|
|
6
|
+
readonly home?: string;
|
|
7
|
+
readonly signal?: AbortSignal;
|
|
8
|
+
}): {
|
|
9
|
+
request: (path: string, init: RequestInit) => Promise<unknown>;
|
|
10
|
+
signal: AbortSignal | undefined;
|
|
11
|
+
ready(): Promise<void>;
|
|
12
|
+
save(value: Credentials): Promise<void>;
|
|
13
|
+
logout(): Promise<boolean>;
|
|
14
|
+
accessToken(): Promise<string>;
|
|
15
|
+
removeForLimit(error: unknown, choose: ChooseDevice): Promise<boolean>;
|
|
16
|
+
};
|
|
17
|
+
export type Session = ReturnType<typeof createSession>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function terminalText(value: string): string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { SecretApi } from "./keystore";
|
|
2
|
+
export declare const grant: {
|
|
3
|
+
accessToken: string;
|
|
4
|
+
accessTokenExpiresAt: string;
|
|
5
|
+
refreshToken: string;
|
|
6
|
+
offlineGrant: string;
|
|
7
|
+
device: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const privateKeys: {
|
|
13
|
+
signingPrivateKey: string;
|
|
14
|
+
sealingPrivateKey: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const refusal: (code: string, detail?: unknown, status?: number) => Response;
|
|
17
|
+
export declare const limitDetail: {
|
|
18
|
+
reason: string;
|
|
19
|
+
managementToken: string;
|
|
20
|
+
used: number;
|
|
21
|
+
limit: number;
|
|
22
|
+
};
|
|
23
|
+
export declare function temporaryHome(): Promise<string>;
|
|
24
|
+
export declare function fakeApi(handler: (request: Request) => Response | Promise<Response>): string;
|
|
25
|
+
export declare function memorySecrets(): {
|
|
26
|
+
api: SecretApi;
|
|
27
|
+
values: Map<string, string>;
|
|
28
|
+
writes: string[];
|
|
29
|
+
store: (origin: string) => import("./keystore").CredentialStore;
|
|
30
|
+
};
|
|
31
|
+
export declare function clock(): {
|
|
32
|
+
now: () => number;
|
|
33
|
+
delays: number[];
|
|
34
|
+
sleep: (ms: number) => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
export declare const minted: {
|
|
37
|
+
deviceCode: string;
|
|
38
|
+
userCode: string;
|
|
39
|
+
matchingCode: string;
|
|
40
|
+
verificationUri: string;
|
|
41
|
+
expiresAt: string;
|
|
42
|
+
intervalSeconds: number;
|
|
43
|
+
};
|