@legendapp/spark 0.0.1-next.4 → 0.0.1-next.5
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.md +1 -1
- package/customize.ts +2 -0
- package/html.ts +1 -0
- package/markdown.ts +1 -0
- package/package.json +22 -13
- package/patches/dependencies.json +10 -4
- package/patches/react-native-enriched-html@1.1.1.patch +854 -0
- package/patches/{react-native-enriched-markdown@1.0.2.patch → react-native-enriched-markdown@1.1.1.patch} +2560 -1983
- package/schema.json +104 -0
- package/skills/spark/SKILL.md +56 -0
- package/skills/spark/UPGRADING.md +246 -0
- package/vendor/node_modules/@legendapp/spark-ai/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-ai/src/invocation-command.cjs +11 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/invocation-command.d.cts +2 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/invocations.ts +2 -19
- package/vendor/node_modules/@legendapp/spark-audio/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-auth-session/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/add-desktop.js +4 -4
- package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/create.js +31 -11
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-ai.cjs +108 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-artifacts.js +315 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-cli.cjs +75 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-github.cjs +133 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-policy.cjs +102 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-provider.cjs +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-worker.cjs +273 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/dependency-pins.js +54 -29
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev-command.js +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/enriched-html-pins.js +128 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-patch.cjs +30 -1
- package/vendor/node_modules/@legendapp/spark-cli/dist/index.js +16 -7
- package/vendor/node_modules/@legendapp/spark-cli/dist/init-template.d.cts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/js-runtime.cjs +96 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.cjs +152 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.d.cts +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.cjs +184 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.d.cts +16 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/native-patch-preflight.js +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package-manager-config.js +41 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package-manager.js +13 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/project-version.js +12 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +40 -9
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +19 -19
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-bootstrap.ps1 +87 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-bootstrap.sh +107 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-downloads.tsv +13 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/sdk-install.js +8 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/upgrade.js +102 -0
- package/vendor/node_modules/@legendapp/spark-cli/package.json +6 -4
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/.claude/skills/spark/SKILL.md +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/AGENTS.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/CLAUDE.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/README.md +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/package.json +46 -2
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/.claude/skills/spark/SKILL.md +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/AGENTS.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/CLAUDE.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/README.md +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/package.json +45 -2
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/.claude/skills/spark/SKILL.md +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/AGENTS.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/CLAUDE.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/README.md +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/package.json +46 -2
- package/vendor/node_modules/@legendapp/spark-clipboard/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-codex/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-commands/package.json +6 -6
- package/vendor/node_modules/@legendapp/spark-context-menu/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/RNDesktopApp.mm +14 -1
- package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/customize-hooks.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/customize.ts +117 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.cjs +20 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.cjs +3 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.d.cts +14 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/customize-provider.cjs +16 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/customize.cjs +16 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-desktop-config/schema.json +104 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/SparkCustomize.mm +517 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +4 -3
- package/vendor/node_modules/@legendapp/spark-desktop-links/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/RNDesktopShortcuts.mm +3 -1
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/keyboard-manager/RNKeyboardManager.h +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/keyboard-manager/RNKeyboardManager.mm +1 -1
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.mm +5 -4
- package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/api.ts +62 -25
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/macos-adapter.ts +7 -5
- package/vendor/node_modules/@legendapp/spark-documents/package.json +8 -8
- package/vendor/node_modules/@legendapp/spark-drag-drop/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-file-system/macos/SparkFileMutations.h +1 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/SparkFileMutations.mm +11 -10
- package/vendor/node_modules/@legendapp/spark-file-system/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-html/package.json +24 -0
- package/vendor/node_modules/@legendapp/spark-html/src/Html.tsx +22 -0
- package/vendor/node_modules/@legendapp/spark-html/src/HtmlInput.tsx +102 -0
- package/vendor/node_modules/@legendapp/spark-html/src/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-html/src/types.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-markdown/package.json +24 -0
- package/vendor/node_modules/@legendapp/spark-markdown/src/Markdown.tsx +24 -0
- package/vendor/node_modules/@legendapp/spark-markdown/src/MarkdownInput.tsx +111 -0
- package/vendor/node_modules/@legendapp/spark-markdown/src/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-native-menu/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-notifications/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-processes/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-rich-text/package.json +18 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/components.tsx +52 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/types.ts +24 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/useInputShortcuts.macos.ts +55 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/useInputShortcuts.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/useInputValue.ts +14 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/value.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-settings/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-settings-ui/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-sqlite/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-system/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-tray/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-ui/macos/appkit-split-view/RNSidebarSplitViewComponent.mm +102 -14
- package/vendor/node_modules/@legendapp/spark-ui/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/SidebarSplitViewNativeComponent.ts +5 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/index.tsx +12 -4
- package/vendor/node_modules/@legendapp/spark-updates/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-webview/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-window-options/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-codex",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.5",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"react": "19.1.
|
|
8
|
+
"react": "^19.1.0",
|
|
9
9
|
"react-native": "0.81.6"
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@legendapp/spark-desktop-app": "0.0.1-next.
|
|
13
|
+
"@legendapp/spark-desktop-app": "0.0.1-next.5",
|
|
14
14
|
"react-native-nitro-modules": "0.37.0"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-commands",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.5",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.tsx",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"src"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@legendapp/spark-ui": "0.0.1-next.
|
|
12
|
-
"@legendapp/spark-desktop-shortcuts": "0.0.1-next.
|
|
13
|
-
"@legendapp/spark-settings": "0.0.1-next.
|
|
11
|
+
"@legendapp/spark-ui": "0.0.1-next.5",
|
|
12
|
+
"@legendapp/spark-desktop-shortcuts": "0.0.1-next.5",
|
|
13
|
+
"@legendapp/spark-settings": "0.0.1-next.5",
|
|
14
14
|
"@legendapp/state": "^3.0.0-beta.42",
|
|
15
|
-
"@legendapp/spark-desktop-app": "0.0.1-next.
|
|
15
|
+
"@legendapp/spark-desktop-app": "0.0.1-next.5"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"react": "19.1.
|
|
18
|
+
"react": "^19.1.0",
|
|
19
19
|
"react-native": "0.81.6"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-context-menu",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"react-native.config.js"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"react": "19.1.
|
|
15
|
+
"react": "^19.1.0",
|
|
16
16
|
"react-native": "0.81.6"
|
|
17
17
|
},
|
|
18
18
|
"codegenConfig": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@legendapp/spark-desktop-app": "0.0.1-next.
|
|
44
|
+
"@legendapp/spark-desktop-app": "0.0.1-next.5"
|
|
45
45
|
},
|
|
46
46
|
"private": true
|
|
47
47
|
}
|
|
@@ -13,7 +13,20 @@ RCT_EXPORT_MODULE(NativeDesktopApp)
|
|
|
13
13
|
- (void)call:(NSString *)method args:(NSString *)json resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
14
14
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
15
15
|
NSDictionary *args = SparkArgs(json);
|
|
16
|
-
if ([method
|
|
16
|
+
if ([method hasPrefix:@"customize."]) {
|
|
17
|
+
// Only opted-in hosts register this handler; keep the desktop module small.
|
|
18
|
+
__block BOOL handled = NO;
|
|
19
|
+
void (^claim)(void) = ^{ handled = YES; };
|
|
20
|
+
void (^reply)(NSString *, NSString *, NSString *) = ^(NSString *value, NSString *code, NSString *message) {
|
|
21
|
+
if (code) reject(code, message, nil); else resolve(value ?: @"null");
|
|
22
|
+
};
|
|
23
|
+
[NSNotificationCenter.defaultCenter postNotificationName:@"SparkCustomizeCall" object:nil userInfo:@{@"method":[method substringFromIndex:10], @"args":args, @"claim":claim, @"reply":reply}];
|
|
24
|
+
if (!handled) {
|
|
25
|
+
if ([method isEqual:@"customize.state"]) resolve(SparkJSON(@{@"enabled":@NO,@"busy":@NO,@"phase":@"idle",@"message":@"Customization is not enabled in this app",@"ready":@NO,@"customized":@NO,@"previewing":@NO,@"migrationAvailable":@NO}));
|
|
26
|
+
else reject(@"E_UNAVAILABLE", @"Customization is not enabled in this app", nil);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else if ([method isEqual:@"context"]) resolve(SparkJSON(SparkContext()));
|
|
17
30
|
else if ([method isEqual:@"initialURL"]) resolve(SparkJSON(SparkInitialURL()));
|
|
18
31
|
else if ([method isEqual:@"pendingURLs"]) resolve(SparkJSON(SparkPendingURLs()));
|
|
19
32
|
else if ([method isEqual:@"quit"]) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-desktop-app",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"react-native": "src/index",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"cpp"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"react": "19.1.
|
|
15
|
+
"react": "^19.1.0",
|
|
16
16
|
"react-native": "0.81.6"
|
|
17
17
|
},
|
|
18
18
|
"codegenConfig": {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { getCustomizeState, onCustomizeState, type CustomizeState } from "./customize";
|
|
3
|
+
|
|
4
|
+
export type CustomizeHookState = { status: "loading" } | { status: "ready"; state: CustomizeState } | { status: "error"; error: unknown };
|
|
5
|
+
/** Observes the app-owned customization session. Unmount removes observation, never cancels an operation. */
|
|
6
|
+
export function useCustomizeState(): CustomizeHookState {
|
|
7
|
+
const [current, setCurrent] = useState<CustomizeHookState>({ status: "loading" });
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
let active = true, receivedEvent = false;
|
|
10
|
+
try {
|
|
11
|
+
const subscription = onCustomizeState(state => { receivedEvent = true; setCurrent({ status: "ready", state }); });
|
|
12
|
+
getCustomizeState().then(state => { if (active && !receivedEvent) setCurrent({ status: "ready", state }); }, error => { if (active && !receivedEvent) setCurrent({ status: "error", error }); });
|
|
13
|
+
return () => { active = false; subscription.remove(); };
|
|
14
|
+
} catch (error) { setCurrent({ status: "error", error }); }
|
|
15
|
+
}, []);
|
|
16
|
+
return current;
|
|
17
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Platform, TurboModuleRegistry } from "react-native";
|
|
2
|
+
import type { Spec } from "./NativeDesktopApp";
|
|
3
|
+
import { SparkError, invokeNative, parseNativeResult } from "./contracts";
|
|
4
|
+
import { onDesktopEvent } from "./events";
|
|
5
|
+
|
|
6
|
+
export type CustomizeProvider =
|
|
7
|
+
| { kind: "cli"; tool: "codex" | "claude"; model?: string }
|
|
8
|
+
| { kind: "local"; endpoint: string; model: string }
|
|
9
|
+
| { kind: "remote"; endpoint: string; model: string; apiKey?: string };
|
|
10
|
+
export type CustomizePhase = "idle" | "preparing" | "generating" | "migrating" | "previewing" | "applying" | "authenticating" | "submitting" | "error";
|
|
11
|
+
export type CustomizeState = {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
busy: boolean;
|
|
14
|
+
phase: CustomizePhase;
|
|
15
|
+
message: string;
|
|
16
|
+
ready: boolean;
|
|
17
|
+
customized: boolean;
|
|
18
|
+
previewing: boolean;
|
|
19
|
+
migrationAvailable: boolean;
|
|
20
|
+
githubAuthenticated?: boolean;
|
|
21
|
+
repository?: string;
|
|
22
|
+
provider?: Exclude<CustomizeProvider, { kind: "remote" }> | { kind: "remote"; endpoint: string; model: string };
|
|
23
|
+
};
|
|
24
|
+
export type CustomizePromptOptions = {
|
|
25
|
+
provider?: CustomizeProvider;
|
|
26
|
+
/** Required for CLI and remote providers. Explain what source/context is shared. */
|
|
27
|
+
allowSourceSharing?: boolean;
|
|
28
|
+
migration?: boolean;
|
|
29
|
+
};
|
|
30
|
+
export type CustomizeResult = { candidate: string; summary: string; changedFiles: string[]; status: "needs-review" };
|
|
31
|
+
export type CustomizePrompt = { id?: string; prompt: string; baseRelease?: string; created?: string; model?: string; provider?: string; providerKind?: "cli" | "local" | "remote"; status?: string; summary?: string; error?: string };
|
|
32
|
+
export type CustomizeReview = { text: string; prompts: CustomizePrompt[]; candidate?: string };
|
|
33
|
+
export type CustomizeMigrationResult = { candidate?: string; from?: string; conflicts: string[]; status: "none" | "needs-review" };
|
|
34
|
+
export type CustomizeSubscription = { remove(): void };
|
|
35
|
+
export type CustomizeGitHubAuthorization = { userCode: string; verificationUri: string; expiresIn: number };
|
|
36
|
+
export type CustomizePullRequestOptions = { title: string };
|
|
37
|
+
export type CustomizePullRequest = { url: string; number: number; repository: string; branch: string };
|
|
38
|
+
|
|
39
|
+
const disabled: CustomizeState = { enabled: false, busy: false, phase: "idle", message: "Customization is not enabled in this app", ready: false, customized: false, previewing: false, migrationAvailable: false };
|
|
40
|
+
function native() {
|
|
41
|
+
return Platform.OS === "macos" ? TurboModuleRegistry.get<Spec>("NativeDesktopApp") : null;
|
|
42
|
+
}
|
|
43
|
+
function record(value: unknown): value is Record<string, unknown> { return !!value && typeof value === "object" && !Array.isArray(value); }
|
|
44
|
+
function options(value: unknown, allowed: string[]): asserts value is Record<string, unknown> {
|
|
45
|
+
if (!record(value)) throw new SparkError("E_INVALID_ARGUMENT", "Customize options must be an object");
|
|
46
|
+
if (Object.keys(value).some(key => !allowed.includes(key))) throw new SparkError("E_UNSUPPORTED_OPTION", "Unknown customize option");
|
|
47
|
+
}
|
|
48
|
+
function provider(value: unknown): asserts value is CustomizeProvider {
|
|
49
|
+
if (!record(value)) throw new SparkError("E_INVALID_ARGUMENT", "Invalid customize provider");
|
|
50
|
+
options(value, value.kind === "cli" ? ["kind", "tool", "model"] : ["kind", "endpoint", "model", "apiKey"]);
|
|
51
|
+
const valid = value.kind === "cli"
|
|
52
|
+
? ["codex", "claude"].includes(value.tool as string) && (value.model === undefined || (typeof value.model === "string" && !!value.model))
|
|
53
|
+
: ["local", "remote"].includes(value.kind as string) && typeof value.endpoint === "string" && typeof value.model === "string" && !!value.model && (value.apiKey === undefined || (value.kind === "remote" && typeof value.apiKey === "string"));
|
|
54
|
+
if (!valid) throw new SparkError("E_INVALID_ARGUMENT", "Invalid customize provider");
|
|
55
|
+
}
|
|
56
|
+
function state(value: unknown): value is CustomizeState {
|
|
57
|
+
return record(value) && ["enabled", "busy", "ready", "customized", "previewing", "migrationAvailable"].every(key => typeof value[key] === "boolean")
|
|
58
|
+
&& ["idle", "preparing", "generating", "migrating", "previewing", "applying", "authenticating", "submitting", "error"].includes(value.phase as string) && typeof value.message === "string";
|
|
59
|
+
}
|
|
60
|
+
const strings = (value: unknown): value is string[] => Array.isArray(value) && value.every(item => typeof item === "string");
|
|
61
|
+
const validators: Record<string, (value: unknown) => boolean> = {
|
|
62
|
+
state,
|
|
63
|
+
prompt: value => record(value) && typeof value.candidate === "string" && typeof value.summary === "string" && strings(value.changedFiles) && value.status === "needs-review",
|
|
64
|
+
review: value => record(value) && typeof value.text === "string" && Array.isArray(value.prompts) && value.prompts.every(item => record(item) && typeof item.prompt === "string") && (value.candidate === undefined || typeof value.candidate === "string"),
|
|
65
|
+
migrate: value => record(value) && ["none", "needs-review"].includes(value.status as string) && strings(value.conflicts),
|
|
66
|
+
githubBegin: value => record(value) && typeof value.userCode === "string" && value.userCode.length > 0 && value.verificationUri === "https://github.com/login/device" && typeof value.expiresIn === "number" && value.expiresIn > 0,
|
|
67
|
+
submitPR: value => record(value) && typeof value.url === "string" && /^https:\/\/github\.com\/[\w.-]+\/[\w.-]+\/pull\/\d+$/.test(value.url) && Number.isSafeInteger(value.number) && typeof value.repository === "string" && typeof value.branch === "string",
|
|
68
|
+
};
|
|
69
|
+
async function call<T>(method: string, args: object = {}): Promise<T> {
|
|
70
|
+
const module = native();
|
|
71
|
+
if (!module) throw new SparkError(Platform.OS === "macos" ? "E_MODULE_UNAVAILABLE" : "E_UNSUPPORTED_PLATFORM", "Customize requires a Spark macOS app");
|
|
72
|
+
const validate = validators[method] ?? (value => value === null);
|
|
73
|
+
const value = parseNativeResult(await invokeNative(() => module.call(`customize.${method}`, JSON.stringify(args))), (value): value is T => validate(value));
|
|
74
|
+
return value === null ? undefined as T : value;
|
|
75
|
+
}
|
|
76
|
+
/** Availability is safe on unsupported platforms and in apps that did not opt in. */
|
|
77
|
+
export async function getCustomizeState(): Promise<CustomizeState> {
|
|
78
|
+
return native() ? call<CustomizeState>("state") : { ...disabled };
|
|
79
|
+
}
|
|
80
|
+
/** Opens Spark's built-in editor, including when automatic entry points are disabled. */
|
|
81
|
+
export const showEditor = (): Promise<void> => call("show");
|
|
82
|
+
/** Saves provider settings; remote keys go to Keychain and are never returned in state. */
|
|
83
|
+
export async function configureCustomize(value: CustomizeProvider): Promise<void> { provider(value); return call("configure", { provider: value }); }
|
|
84
|
+
export async function generateEdit(prompt: string, value: CustomizePromptOptions = {}): Promise<CustomizeResult> {
|
|
85
|
+
if (typeof prompt !== "string" || !prompt.trim() || prompt.length > 32000) throw new SparkError("E_INVALID_ARGUMENT", "Enter a prompt of at most 32000 characters");
|
|
86
|
+
options(value, ["provider", "allowSourceSharing", "migration"]);
|
|
87
|
+
if (value.provider !== undefined) provider(value.provider);
|
|
88
|
+
for (const key of ["allowSourceSharing", "migration"] as const) if (value[key] !== undefined && typeof value[key] !== "boolean") throw new SparkError("E_INVALID_ARGUMENT", `${key} must be boolean`);
|
|
89
|
+
return call("prompt", { prompt, ...value });
|
|
90
|
+
}
|
|
91
|
+
export const getEditReview = (): Promise<CustomizeReview> => call("review");
|
|
92
|
+
/** Performs a three-way merge; conflicts can be resolved with generateEdit(..., { migration: true }). */
|
|
93
|
+
export const prepareEditMigration = (): Promise<CustomizeMigrationResult> => call("migrate");
|
|
94
|
+
/** Reloads the current app/data with the candidate for this session. */
|
|
95
|
+
export const previewEdit = (): Promise<void> => call("preview");
|
|
96
|
+
/** Accepts the candidate and reloads. The app owns its confirmation/save-work UI. */
|
|
97
|
+
export const applyEdit = (): Promise<void> => call("apply");
|
|
98
|
+
export const restoreOriginal = (): Promise<void> => call("original");
|
|
99
|
+
/** Stops current customization work. Partial candidates and prompt history are retained. */
|
|
100
|
+
export const cancelEdit = (): Promise<void> => call("cancel");
|
|
101
|
+
/** Starts GitHub's device flow; client ID comes from the developer's customize config. */
|
|
102
|
+
export const beginCustomizeGitHubAuth = (): Promise<CustomizeGitHubAuthorization> => call("githubBegin");
|
|
103
|
+
/** Waits for device authorization. The token stays in the app's macOS Keychain. cancelEdit stops waiting. */
|
|
104
|
+
export const completeCustomizeGitHubAuth = (): Promise<void> => call("githubComplete");
|
|
105
|
+
export const signOutCustomizeGitHub = (): Promise<void> => call("githubSignOut");
|
|
106
|
+
/** Publishes the reviewed candidate's cumulative patch and saved prompts to customize.repository. */
|
|
107
|
+
export async function submitEditPullRequest(value: CustomizePullRequestOptions): Promise<CustomizePullRequest> {
|
|
108
|
+
options(value, ["title"]);
|
|
109
|
+
if (typeof value.title !== "string" || !value.title.trim() || value.title.length > 256) throw new SparkError("E_INVALID_ARGUMENT", "Enter a PR title of at most 256 characters");
|
|
110
|
+
return call("submitPR", value);
|
|
111
|
+
}
|
|
112
|
+
/** Live events only: subscribe before requesting getCustomizeState() for an initial snapshot. */
|
|
113
|
+
export function onCustomizeState(listener: (state: CustomizeState) => void): CustomizeSubscription {
|
|
114
|
+
if (typeof listener !== "function") throw new SparkError("E_INVALID_ARGUMENT", "Customize state listener must be a function");
|
|
115
|
+
if (!native()) return { remove() {} };
|
|
116
|
+
return onDesktopEvent(event => { if (state(event.state)) listener(event.state); }, { types: ["customizeState"] });
|
|
117
|
+
}
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
withPodfile,
|
|
7
7
|
withInfoPlist,
|
|
8
8
|
withEntitlementsPlist,
|
|
9
|
+
withXcodeProject,
|
|
9
10
|
} = require("expo-desktop-config-plugins");
|
|
10
11
|
const { identity } = require("./identity.cjs");
|
|
11
12
|
const { resolveEntitlements } = require("./entitlements.cjs");
|
|
@@ -15,6 +16,12 @@ module.exports = function withSparkDesktop(config) {
|
|
|
15
16
|
if (config.platforms?.length === 1 && config.platforms[0] === "windows") return require("./windows.plugin.cjs")(config);
|
|
16
17
|
// The upstream base mod merges template entitlements into config before
|
|
17
18
|
// callbacks run. Capture the declared values before that mutation.
|
|
19
|
+
const customize = require("./customize.cjs").validateCustomize(config.extra?.spark?.customize);
|
|
20
|
+
if (customize && config.macos?.entitlements?.["com.apple.security.app-sandbox"]) throw new Error("Customizable apps require direct distribution without App Sandbox");
|
|
21
|
+
if (customize) config = withXcodeProject(config, mod => {
|
|
22
|
+
if (!mod.modResults.hasFile("Security.framework")) mod.modResults.addFramework("Security.framework", { target: mod.modResults.getFirstTarget().uuid });
|
|
23
|
+
return mod;
|
|
24
|
+
});
|
|
18
25
|
const declaredEntitlements = structuredClone(config.macos?.entitlements ?? {});
|
|
19
26
|
config = withEntitlementsPlist(config, (mod) => {
|
|
20
27
|
const selection = statePath(mod.modRequest.projectRoot, "native-selection.json", "macos");
|
|
@@ -28,7 +35,19 @@ module.exports = function withSparkDesktop(config) {
|
|
|
28
35
|
});
|
|
29
36
|
config = withAppDelegate(config, (mod) => {
|
|
30
37
|
// Own this adapter; application customizations belong in configuration/plugins.
|
|
31
|
-
mod.modResults.contents = fs.readFileSync(
|
|
38
|
+
mod.modResults.contents = fs.readFileSync(
|
|
39
|
+
require.resolve("@legendapp/spark-desktop-host/AppDelegate.mm"),
|
|
40
|
+
"utf8",
|
|
41
|
+
);
|
|
42
|
+
if (customize) {
|
|
43
|
+
const native = fs.readFileSync(require.resolve("@legendapp/spark-desktop-host/SparkCustomize.mm"), "utf8");
|
|
44
|
+
mod.modResults.contents = '#import <React/RCTReloadCommand.h>\n' + native + '\n' + mod.modResults.contents
|
|
45
|
+
.replace(' SparkMarkLaunchComplete();', ` SparkCustomizeStart();
|
|
46
|
+
[NSNotificationCenter.defaultCenter addObserverForName:@"SparkCustomizeReload" object:nil queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification *note) { RCTTriggerReloadCommandListeners(@"Spark customization"); }];
|
|
47
|
+
SparkMarkLaunchComplete();`)
|
|
48
|
+
.replace('return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];', 'return SparkCustomizeBundleURL();')
|
|
49
|
+
.replace('return SparkDockMenu;', 'return SparkCustomizeDockMenu(SparkDockMenu);');
|
|
50
|
+
}
|
|
32
51
|
return mod;
|
|
33
52
|
});
|
|
34
53
|
config = withInfoPlist(config, (mod) => {
|
|
@@ -88,7 +88,7 @@ function applySelection(root, expo) {
|
|
|
88
88
|
}
|
|
89
89
|
function toExpo(value, target) {
|
|
90
90
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Desktop config must be an object");
|
|
91
|
-
const allowed = ["$schema", "name", "projectId", "version", "window", "macos", "platforms", "scheme", "documentTypes", "menuBarOnly", "updates", "include", "signing", "helpers", "expo", "expoByPlatform"];
|
|
91
|
+
const allowed = ["$schema", "name", "projectId", "version", "window", "macos", "platforms", "scheme", "documentTypes", "menuBarOnly", "updates", "include", "signing", "helpers", "customize", "expo", "expoByPlatform"];
|
|
92
92
|
for (const key of Object.keys(value)) if (!allowed.includes(key)) throw new Error(`Unknown desktop configuration field: ${key}`);
|
|
93
93
|
for (const key of ["name", "projectId", "version"]) if (typeof value[key] !== "string" || !value[key].trim()) throw new Error(`Desktop config needs ${key}`);
|
|
94
94
|
const platforms = value.platforms ?? ["macos"];
|
|
@@ -99,8 +99,9 @@ function toExpo(value, target) {
|
|
|
99
99
|
validateWindow(value.window ?? {});
|
|
100
100
|
if (value.include !== undefined && (!Array.isArray(value.include) || value.include.some(x => typeof x !== "string"))) throw new Error("include must be a list of package names");
|
|
101
101
|
require("./helpers.cjs").validateHelpers(value.helpers);
|
|
102
|
+
require("./customize.cjs").validateCustomize(value.customize);
|
|
102
103
|
const extra = { projectId: value.projectId };
|
|
103
|
-
for (const key of ["window", "documentTypes", "menuBarOnly", "updates", "include", "signing", "helpers"]) if (value[key] !== undefined) extra[key] = value[key];
|
|
104
|
+
for (const key of ["window", "documentTypes", "menuBarOnly", "updates", "include", "signing", "helpers", "customize"]) if (value[key] !== undefined) extra[key] = value[key];
|
|
104
105
|
const overrides = value.expoByPlatform ?? {};
|
|
105
106
|
if (!overrides || typeof overrides !== "object" || Array.isArray(overrides) || Object.keys(overrides).some(p => !platforms.includes(p))) throw new Error("expoByPlatform keys must be supported platforms");
|
|
106
107
|
const backend = merge(value.expo ?? {}, overrides[selected] ?? {});
|
|
@@ -17,6 +17,19 @@ export interface MacOSConfiguration {
|
|
|
17
17
|
export interface SigningConfiguration {
|
|
18
18
|
macos?: { identity?: string; teamId?: string; entitlementsByPath?: Record<string, Record<string, JsonValue>> };
|
|
19
19
|
}
|
|
20
|
+
export type CustomizeProvider = { kind: 'cli'; tool: 'codex' | 'claude'; model?: string } | { kind: 'local' | 'remote'; endpoint: string; model: string };
|
|
21
|
+
export interface CustomizeConfiguration {
|
|
22
|
+
repository: string;
|
|
23
|
+
tag?: string;
|
|
24
|
+
/** Source snapshot root, relative to and an ancestor of the app project. files are relative to this root. */
|
|
25
|
+
sourceRoot?: string;
|
|
26
|
+
files: string[];
|
|
27
|
+
githubClientId?: string;
|
|
28
|
+
toolkitRepository?: string;
|
|
29
|
+
toolkitTag?: string;
|
|
30
|
+
ui?: 'default' | 'custom';
|
|
31
|
+
provider?: CustomizeProvider;
|
|
32
|
+
}
|
|
20
33
|
/** Spark-owned settings carried inside Expo's extra.spark. */
|
|
21
34
|
export interface SparkSettings {
|
|
22
35
|
projectId: string;
|
|
@@ -27,6 +40,7 @@ export interface SparkSettings {
|
|
|
27
40
|
include?: string[];
|
|
28
41
|
signing?: SigningConfiguration;
|
|
29
42
|
helpers?: Record<string, HelperConfiguration>;
|
|
43
|
+
customize?: false | CustomizeConfiguration;
|
|
30
44
|
supportedPlatforms?: SparkPlatform[];
|
|
31
45
|
}
|
|
32
46
|
/** Expo retains ownership of its configuration; Spark only adds desktop fields. */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Shared by release configuration and the downloaded customize worker.
|
|
2
|
+
function validateProvider(value) {
|
|
3
|
+
if (value?.kind === 'cli') {
|
|
4
|
+
if (!['codex', 'claude'].includes(value.tool) || (value.model !== undefined && (typeof value.model !== 'string' || (!value.model.trim() || /[\0\r\n]/.test(value.model)))) || Object.keys(value).some(key => !['kind', 'tool', 'model'].includes(key))) throw new Error('CLI customize provider requires codex or claude and an optional model');
|
|
5
|
+
return { kind: 'cli', tool: value.tool, ...(value.model ? { model: value.model } : {}) };
|
|
6
|
+
}
|
|
7
|
+
if (!value || !['local', 'remote'].includes(value.kind) || typeof value.model !== 'string' || (!value.model.trim() || /[\0\r\n]/.test(value.model))) throw new Error('Customize provider requires kind, endpoint and model');
|
|
8
|
+
if (Object.keys(value).some(key => !['kind', 'endpoint', 'model'].includes(key))) throw new Error('Unknown customize provider option; never publish API keys');
|
|
9
|
+
const url = new URL(value.endpoint);
|
|
10
|
+
const loopback = ['localhost', '127.0.0.1', '[::1]'].includes(url.hostname);
|
|
11
|
+
if (url.username || url.password || url.search || url.hash || (value.kind === 'local' ? !loopback || !['http:', 'https:'].includes(url.protocol) : url.protocol !== 'https:')) throw new Error('Remote customization requires HTTPS; local customization requires a loopback HTTP(S) endpoint without credentials, query or fragment');
|
|
12
|
+
// Do not resolve localhost through DNS or a modified hosts file.
|
|
13
|
+
if (value.kind === 'local' && url.hostname === 'localhost') url.hostname = '127.0.0.1';
|
|
14
|
+
return { kind: value.kind, endpoint: url.href, model: value.model };
|
|
15
|
+
}
|
|
16
|
+
module.exports = { validateProvider };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const path = require('node:path');
|
|
2
|
+
function validateCustomize(value) {
|
|
3
|
+
if (value === undefined || value === false) return undefined;
|
|
4
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) throw new Error('customize must be false or an object');
|
|
5
|
+
const allowed = ['repository', 'tag', 'files', 'sourceRoot', 'githubClientId', 'toolkitRepository', 'toolkitTag', 'ui', 'provider'];
|
|
6
|
+
for (const key of Object.keys(value)) if (!allowed.includes(key)) throw new Error(`Unknown customize option: ${key}`);
|
|
7
|
+
for (const key of ['repository', 'toolkitRepository']) if ((key === 'repository' || value[key] !== undefined) && !/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(value[key] ?? '')) throw new Error(`customize.${key} must be owner/repository`);
|
|
8
|
+
for (const key of ['tag', 'toolkitTag']) if (value[key] !== undefined && !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(value[key])) throw new Error(`customize.${key} must be a fixed release tag`);
|
|
9
|
+
if (!Array.isArray(value.files) || !value.files.length || value.files.some(file => typeof file !== 'string' || !file || path.isAbsolute(file) || file.split(/[\\/]/).some(part => !part || part === '..' || (part.startsWith('.') && !/^\.babelrc(?:\.[cm]?js|\.json)?$/.test(part)) || ['node_modules', 'macos', 'ios', 'android', 'windows'].includes(part)))) throw new Error('customize.files must explicitly list relative source files/directories, without hidden files or native projects');
|
|
10
|
+
if (value.sourceRoot !== undefined && (typeof value.sourceRoot !== 'string' || !value.sourceRoot || path.isAbsolute(value.sourceRoot) || value.sourceRoot.includes('\\') || value.sourceRoot.split('/').some(part => !part || (part !== '.' && part !== '..')))) throw new Error('customize.sourceRoot must be a relative ancestor of the app project (for example ../..)');
|
|
11
|
+
if (value.githubClientId !== undefined && (typeof value.githubClientId !== 'string' || !/^[A-Za-z0-9_]+$/.test(value.githubClientId))) throw new Error('customize.githubClientId must be a GitHub OAuth app client ID');
|
|
12
|
+
if (value.ui !== undefined && !['default', 'custom'].includes(value.ui)) throw new Error('customize.ui must be default or custom');
|
|
13
|
+
if (value.provider !== undefined) require('./customize-provider.cjs').validateProvider(value.provider);
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
module.exports = { validateCustomize };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-desktop-config",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "app.plugin.cjs",
|
|
6
6
|
"files": [
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"expo-desktop-config-plugins": "1.2.0",
|
|
14
|
-
"@legendapp/spark-desktop-host": "0.0.1-next.
|
|
15
|
-
"@legendapp/spark-window-options": "0.0.1-next.
|
|
14
|
+
"@legendapp/spark-desktop-host": "0.0.1-next.5",
|
|
15
|
+
"@legendapp/spark-window-options": "0.0.1-next.5",
|
|
16
16
|
"@expo/config-plugins": "54.0.5",
|
|
17
17
|
"@expo/config-types": "54.0.10",
|
|
18
|
-
"diff": "8.0.
|
|
18
|
+
"diff": "8.0.4"
|
|
19
19
|
},
|
|
20
20
|
"private": true
|
|
21
21
|
}
|
|
@@ -452,6 +452,110 @@
|
|
|
452
452
|
"extends": {
|
|
453
453
|
"const": "expo",
|
|
454
454
|
"description": "Compose desktop options onto the existing Expo configuration."
|
|
455
|
+
},
|
|
456
|
+
"customize": {
|
|
457
|
+
"oneOf": [
|
|
458
|
+
{
|
|
459
|
+
"const": false
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"type": "object",
|
|
463
|
+
"additionalProperties": false,
|
|
464
|
+
"required": [
|
|
465
|
+
"repository",
|
|
466
|
+
"files"
|
|
467
|
+
],
|
|
468
|
+
"properties": {
|
|
469
|
+
"repository": {
|
|
470
|
+
"type": "string",
|
|
471
|
+
"pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
|
|
472
|
+
},
|
|
473
|
+
"files": {
|
|
474
|
+
"type": "array",
|
|
475
|
+
"minItems": 1,
|
|
476
|
+
"items": {
|
|
477
|
+
"type": "string"
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"tag": {
|
|
481
|
+
"type": "string"
|
|
482
|
+
},
|
|
483
|
+
"toolkitRepository": {
|
|
484
|
+
"type": "string"
|
|
485
|
+
},
|
|
486
|
+
"toolkitTag": {
|
|
487
|
+
"type": "string"
|
|
488
|
+
},
|
|
489
|
+
"ui": {
|
|
490
|
+
"enum": [
|
|
491
|
+
"default",
|
|
492
|
+
"custom"
|
|
493
|
+
],
|
|
494
|
+
"default": "default"
|
|
495
|
+
},
|
|
496
|
+
"provider": {
|
|
497
|
+
"oneOf": [
|
|
498
|
+
{
|
|
499
|
+
"type": "object",
|
|
500
|
+
"additionalProperties": false,
|
|
501
|
+
"required": [
|
|
502
|
+
"kind",
|
|
503
|
+
"endpoint",
|
|
504
|
+
"model"
|
|
505
|
+
],
|
|
506
|
+
"properties": {
|
|
507
|
+
"kind": {
|
|
508
|
+
"enum": [
|
|
509
|
+
"local",
|
|
510
|
+
"remote"
|
|
511
|
+
]
|
|
512
|
+
},
|
|
513
|
+
"endpoint": {
|
|
514
|
+
"type": "string"
|
|
515
|
+
},
|
|
516
|
+
"model": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"minLength": 1
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"type": "object",
|
|
524
|
+
"additionalProperties": false,
|
|
525
|
+
"required": [
|
|
526
|
+
"kind",
|
|
527
|
+
"tool"
|
|
528
|
+
],
|
|
529
|
+
"properties": {
|
|
530
|
+
"kind": {
|
|
531
|
+
"const": "cli"
|
|
532
|
+
},
|
|
533
|
+
"tool": {
|
|
534
|
+
"enum": [
|
|
535
|
+
"codex",
|
|
536
|
+
"claude"
|
|
537
|
+
]
|
|
538
|
+
},
|
|
539
|
+
"model": {
|
|
540
|
+
"type": "string",
|
|
541
|
+
"minLength": 1
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
]
|
|
546
|
+
},
|
|
547
|
+
"sourceRoot": {
|
|
548
|
+
"type": "string",
|
|
549
|
+
"description": "Relative ancestor of the app project. files are relative to this source snapshot root."
|
|
550
|
+
},
|
|
551
|
+
"githubClientId": {
|
|
552
|
+
"type": "string",
|
|
553
|
+
"pattern": "^[A-Za-z0-9_]+$",
|
|
554
|
+
"description": "GitHub OAuth app client ID with device flow enabled."
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
]
|
|
455
559
|
}
|
|
456
560
|
},
|
|
457
561
|
"allOf": [
|