opensteer 0.6.0 → 0.6.2
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/CHANGELOG.md +16 -1
- package/README.md +63 -0
- package/bin/opensteer.mjs +214 -3
- package/dist/browser-profile-client-CaL-mwqs.d.ts +168 -0
- package/dist/browser-profile-client-DK9qa_Dj.d.cts +168 -0
- package/dist/chunk-7RMY26CM.js +1130 -0
- package/dist/{chunk-SGZYTGY3.js → chunk-F2VDVOJO.js} +1890 -1520
- package/dist/chunk-WDRMHPWL.js +1320 -0
- package/dist/chunk-WJI7TGBQ.js +77 -0
- package/dist/cli/auth.cjs +1834 -0
- package/dist/cli/auth.d.cts +114 -0
- package/dist/cli/auth.d.ts +114 -0
- package/dist/cli/auth.js +15 -0
- package/dist/cli/profile.cjs +16222 -0
- package/dist/cli/profile.d.cts +79 -0
- package/dist/cli/profile.d.ts +79 -0
- package/dist/cli/profile.js +866 -0
- package/dist/cli/server.cjs +1816 -422
- package/dist/cli/server.js +310 -10
- package/dist/index.cjs +1772 -414
- package/dist/index.d.cts +141 -395
- package/dist/index.d.ts +141 -395
- package/dist/index.js +203 -8
- package/dist/types-BxiRblC7.d.cts +327 -0
- package/dist/types-BxiRblC7.d.ts +327 -0
- package/package.json +3 -2
- package/skills/opensteer/SKILL.md +34 -5
- package/skills/opensteer/references/cli-reference.md +10 -8
- package/skills/opensteer/references/sdk-reference.md +14 -3
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { O as OpensteerAuthScheme } from '../types-BxiRblC7.cjs';
|
|
2
|
+
import 'playwright';
|
|
3
|
+
|
|
4
|
+
interface StoredMachineCloudCredential {
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
scope: string[];
|
|
7
|
+
accessToken: string;
|
|
8
|
+
refreshToken: string;
|
|
9
|
+
obtainedAt: number;
|
|
10
|
+
expiresAt: number;
|
|
11
|
+
}
|
|
12
|
+
interface WriteMachineCloudCredentialArgs {
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
scope: string[];
|
|
15
|
+
accessToken: string;
|
|
16
|
+
refreshToken: string;
|
|
17
|
+
obtainedAt: number;
|
|
18
|
+
expiresAt: number;
|
|
19
|
+
}
|
|
20
|
+
interface CloudCredentialStoreTarget {
|
|
21
|
+
baseUrl: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type AuthFetchFn = (input: string, init?: RequestInit) => Promise<Response>;
|
|
25
|
+
type OpenExternalUrlFn = (url: string) => boolean | Promise<boolean>;
|
|
26
|
+
interface CloudCredentialStore {
|
|
27
|
+
readCloudCredential(target: CloudCredentialStoreTarget): StoredMachineCloudCredential | null;
|
|
28
|
+
writeCloudCredential(args: WriteMachineCloudCredentialArgs): void;
|
|
29
|
+
readActiveCloudTarget(): CloudCredentialStoreTarget | null;
|
|
30
|
+
writeActiveCloudTarget(target: CloudCredentialStoreTarget): void;
|
|
31
|
+
clearCloudCredential(target: CloudCredentialStoreTarget): void;
|
|
32
|
+
}
|
|
33
|
+
interface EnsuredCloudAuthContext {
|
|
34
|
+
token: string;
|
|
35
|
+
authScheme: OpensteerAuthScheme;
|
|
36
|
+
source: 'flag' | 'env' | 'saved';
|
|
37
|
+
kind: 'api-key' | 'access-token';
|
|
38
|
+
baseUrl: string;
|
|
39
|
+
}
|
|
40
|
+
interface EnsureCloudCredentialsOptions {
|
|
41
|
+
commandName: string;
|
|
42
|
+
env?: Record<string, string | undefined>;
|
|
43
|
+
store?: CloudCredentialStore;
|
|
44
|
+
apiKeyFlag?: string;
|
|
45
|
+
accessTokenFlag?: string;
|
|
46
|
+
baseUrl?: string;
|
|
47
|
+
interactive?: boolean;
|
|
48
|
+
autoLoginIfNeeded?: boolean;
|
|
49
|
+
writeProgress?: (message: string) => void;
|
|
50
|
+
writeStdout?: (message: string) => void;
|
|
51
|
+
writeStderr?: (message: string) => void;
|
|
52
|
+
fetchFn?: AuthFetchFn;
|
|
53
|
+
sleep?: (ms: number) => Promise<void>;
|
|
54
|
+
now?: () => number;
|
|
55
|
+
openExternalUrl?: OpenExternalUrlFn;
|
|
56
|
+
}
|
|
57
|
+
interface EnsureCloudCredentialsForOpenOptions {
|
|
58
|
+
scopeDir: string;
|
|
59
|
+
env?: Record<string, string | undefined>;
|
|
60
|
+
store?: CloudCredentialStore;
|
|
61
|
+
apiKeyFlag?: string;
|
|
62
|
+
accessTokenFlag?: string;
|
|
63
|
+
interactive?: boolean;
|
|
64
|
+
writeProgress?: (message: string) => void;
|
|
65
|
+
writeStderr?: (message: string) => void;
|
|
66
|
+
fetchFn?: AuthFetchFn;
|
|
67
|
+
sleep?: (ms: number) => Promise<void>;
|
|
68
|
+
now?: () => number;
|
|
69
|
+
openExternalUrl?: OpenExternalUrlFn;
|
|
70
|
+
}
|
|
71
|
+
interface AuthCliDeps {
|
|
72
|
+
env: Record<string, string | undefined>;
|
|
73
|
+
store: CloudCredentialStore;
|
|
74
|
+
fetchFn: AuthFetchFn;
|
|
75
|
+
writeStdout: (message: string) => void;
|
|
76
|
+
writeStderr: (message: string) => void;
|
|
77
|
+
isInteractive: () => boolean;
|
|
78
|
+
sleep: (ms: number) => Promise<void>;
|
|
79
|
+
now: () => number;
|
|
80
|
+
openExternalUrl: OpenExternalUrlFn;
|
|
81
|
+
}
|
|
82
|
+
interface AuthCommonArgs {
|
|
83
|
+
baseUrl?: string;
|
|
84
|
+
json?: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface AuthLoginArgs extends AuthCommonArgs {
|
|
87
|
+
openBrowser: boolean;
|
|
88
|
+
}
|
|
89
|
+
interface AuthStatusArgs extends AuthCommonArgs {
|
|
90
|
+
}
|
|
91
|
+
interface AuthLogoutArgs extends AuthCommonArgs {
|
|
92
|
+
}
|
|
93
|
+
type ParsedAuthArgs = {
|
|
94
|
+
mode: 'help';
|
|
95
|
+
} | {
|
|
96
|
+
mode: 'error';
|
|
97
|
+
error: string;
|
|
98
|
+
} | {
|
|
99
|
+
mode: 'login';
|
|
100
|
+
args: AuthLoginArgs;
|
|
101
|
+
} | {
|
|
102
|
+
mode: 'status';
|
|
103
|
+
args: AuthStatusArgs;
|
|
104
|
+
} | {
|
|
105
|
+
mode: 'logout';
|
|
106
|
+
args: AuthLogoutArgs;
|
|
107
|
+
};
|
|
108
|
+
declare function parseOpensteerAuthArgs(rawArgs: string[]): ParsedAuthArgs;
|
|
109
|
+
declare function isCloudModeEnabledForRootDir(rootDir: string, env?: Record<string, string | undefined>): boolean;
|
|
110
|
+
declare function ensureCloudCredentialsForOpenCommand(options: EnsureCloudCredentialsForOpenOptions): Promise<EnsuredCloudAuthContext | null>;
|
|
111
|
+
declare function ensureCloudCredentialsForCommand(options: EnsureCloudCredentialsOptions): Promise<EnsuredCloudAuthContext>;
|
|
112
|
+
declare function runOpensteerAuthCli(rawArgs: string[], overrideDeps?: Partial<AuthCliDeps>): Promise<number>;
|
|
113
|
+
|
|
114
|
+
export { type AuthFetchFn, type CloudCredentialStore, type EnsureCloudCredentialsForOpenOptions, type EnsureCloudCredentialsOptions, type EnsuredCloudAuthContext, type OpenExternalUrlFn, ensureCloudCredentialsForCommand, ensureCloudCredentialsForOpenCommand, isCloudModeEnabledForRootDir, parseOpensteerAuthArgs, runOpensteerAuthCli };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { O as OpensteerAuthScheme } from '../types-BxiRblC7.js';
|
|
2
|
+
import 'playwright';
|
|
3
|
+
|
|
4
|
+
interface StoredMachineCloudCredential {
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
scope: string[];
|
|
7
|
+
accessToken: string;
|
|
8
|
+
refreshToken: string;
|
|
9
|
+
obtainedAt: number;
|
|
10
|
+
expiresAt: number;
|
|
11
|
+
}
|
|
12
|
+
interface WriteMachineCloudCredentialArgs {
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
scope: string[];
|
|
15
|
+
accessToken: string;
|
|
16
|
+
refreshToken: string;
|
|
17
|
+
obtainedAt: number;
|
|
18
|
+
expiresAt: number;
|
|
19
|
+
}
|
|
20
|
+
interface CloudCredentialStoreTarget {
|
|
21
|
+
baseUrl: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type AuthFetchFn = (input: string, init?: RequestInit) => Promise<Response>;
|
|
25
|
+
type OpenExternalUrlFn = (url: string) => boolean | Promise<boolean>;
|
|
26
|
+
interface CloudCredentialStore {
|
|
27
|
+
readCloudCredential(target: CloudCredentialStoreTarget): StoredMachineCloudCredential | null;
|
|
28
|
+
writeCloudCredential(args: WriteMachineCloudCredentialArgs): void;
|
|
29
|
+
readActiveCloudTarget(): CloudCredentialStoreTarget | null;
|
|
30
|
+
writeActiveCloudTarget(target: CloudCredentialStoreTarget): void;
|
|
31
|
+
clearCloudCredential(target: CloudCredentialStoreTarget): void;
|
|
32
|
+
}
|
|
33
|
+
interface EnsuredCloudAuthContext {
|
|
34
|
+
token: string;
|
|
35
|
+
authScheme: OpensteerAuthScheme;
|
|
36
|
+
source: 'flag' | 'env' | 'saved';
|
|
37
|
+
kind: 'api-key' | 'access-token';
|
|
38
|
+
baseUrl: string;
|
|
39
|
+
}
|
|
40
|
+
interface EnsureCloudCredentialsOptions {
|
|
41
|
+
commandName: string;
|
|
42
|
+
env?: Record<string, string | undefined>;
|
|
43
|
+
store?: CloudCredentialStore;
|
|
44
|
+
apiKeyFlag?: string;
|
|
45
|
+
accessTokenFlag?: string;
|
|
46
|
+
baseUrl?: string;
|
|
47
|
+
interactive?: boolean;
|
|
48
|
+
autoLoginIfNeeded?: boolean;
|
|
49
|
+
writeProgress?: (message: string) => void;
|
|
50
|
+
writeStdout?: (message: string) => void;
|
|
51
|
+
writeStderr?: (message: string) => void;
|
|
52
|
+
fetchFn?: AuthFetchFn;
|
|
53
|
+
sleep?: (ms: number) => Promise<void>;
|
|
54
|
+
now?: () => number;
|
|
55
|
+
openExternalUrl?: OpenExternalUrlFn;
|
|
56
|
+
}
|
|
57
|
+
interface EnsureCloudCredentialsForOpenOptions {
|
|
58
|
+
scopeDir: string;
|
|
59
|
+
env?: Record<string, string | undefined>;
|
|
60
|
+
store?: CloudCredentialStore;
|
|
61
|
+
apiKeyFlag?: string;
|
|
62
|
+
accessTokenFlag?: string;
|
|
63
|
+
interactive?: boolean;
|
|
64
|
+
writeProgress?: (message: string) => void;
|
|
65
|
+
writeStderr?: (message: string) => void;
|
|
66
|
+
fetchFn?: AuthFetchFn;
|
|
67
|
+
sleep?: (ms: number) => Promise<void>;
|
|
68
|
+
now?: () => number;
|
|
69
|
+
openExternalUrl?: OpenExternalUrlFn;
|
|
70
|
+
}
|
|
71
|
+
interface AuthCliDeps {
|
|
72
|
+
env: Record<string, string | undefined>;
|
|
73
|
+
store: CloudCredentialStore;
|
|
74
|
+
fetchFn: AuthFetchFn;
|
|
75
|
+
writeStdout: (message: string) => void;
|
|
76
|
+
writeStderr: (message: string) => void;
|
|
77
|
+
isInteractive: () => boolean;
|
|
78
|
+
sleep: (ms: number) => Promise<void>;
|
|
79
|
+
now: () => number;
|
|
80
|
+
openExternalUrl: OpenExternalUrlFn;
|
|
81
|
+
}
|
|
82
|
+
interface AuthCommonArgs {
|
|
83
|
+
baseUrl?: string;
|
|
84
|
+
json?: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface AuthLoginArgs extends AuthCommonArgs {
|
|
87
|
+
openBrowser: boolean;
|
|
88
|
+
}
|
|
89
|
+
interface AuthStatusArgs extends AuthCommonArgs {
|
|
90
|
+
}
|
|
91
|
+
interface AuthLogoutArgs extends AuthCommonArgs {
|
|
92
|
+
}
|
|
93
|
+
type ParsedAuthArgs = {
|
|
94
|
+
mode: 'help';
|
|
95
|
+
} | {
|
|
96
|
+
mode: 'error';
|
|
97
|
+
error: string;
|
|
98
|
+
} | {
|
|
99
|
+
mode: 'login';
|
|
100
|
+
args: AuthLoginArgs;
|
|
101
|
+
} | {
|
|
102
|
+
mode: 'status';
|
|
103
|
+
args: AuthStatusArgs;
|
|
104
|
+
} | {
|
|
105
|
+
mode: 'logout';
|
|
106
|
+
args: AuthLogoutArgs;
|
|
107
|
+
};
|
|
108
|
+
declare function parseOpensteerAuthArgs(rawArgs: string[]): ParsedAuthArgs;
|
|
109
|
+
declare function isCloudModeEnabledForRootDir(rootDir: string, env?: Record<string, string | undefined>): boolean;
|
|
110
|
+
declare function ensureCloudCredentialsForOpenCommand(options: EnsureCloudCredentialsForOpenOptions): Promise<EnsuredCloudAuthContext | null>;
|
|
111
|
+
declare function ensureCloudCredentialsForCommand(options: EnsureCloudCredentialsOptions): Promise<EnsuredCloudAuthContext>;
|
|
112
|
+
declare function runOpensteerAuthCli(rawArgs: string[], overrideDeps?: Partial<AuthCliDeps>): Promise<number>;
|
|
113
|
+
|
|
114
|
+
export { type AuthFetchFn, type CloudCredentialStore, type EnsureCloudCredentialsForOpenOptions, type EnsureCloudCredentialsOptions, type EnsuredCloudAuthContext, type OpenExternalUrlFn, ensureCloudCredentialsForCommand, ensureCloudCredentialsForOpenCommand, isCloudModeEnabledForRootDir, parseOpensteerAuthArgs, runOpensteerAuthCli };
|
package/dist/cli/auth.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ensureCloudCredentialsForCommand,
|
|
3
|
+
ensureCloudCredentialsForOpenCommand,
|
|
4
|
+
isCloudModeEnabledForRootDir,
|
|
5
|
+
parseOpensteerAuthArgs,
|
|
6
|
+
runOpensteerAuthCli
|
|
7
|
+
} from "../chunk-7RMY26CM.js";
|
|
8
|
+
import "../chunk-WDRMHPWL.js";
|
|
9
|
+
export {
|
|
10
|
+
ensureCloudCredentialsForCommand,
|
|
11
|
+
ensureCloudCredentialsForOpenCommand,
|
|
12
|
+
isCloudModeEnabledForRootDir,
|
|
13
|
+
parseOpensteerAuthArgs,
|
|
14
|
+
runOpensteerAuthCli
|
|
15
|
+
};
|