fix: restore lint/build gates
parent
9ef24fd400
commit
34dd7324d9
|
|
@ -16,6 +16,7 @@
|
|||
"oxc/no-map-spread": "off",
|
||||
"typescript/no-explicit-any": "error",
|
||||
"typescript/no-extraneous-class": "off",
|
||||
"typescript/no-redundant-type-constituents": "off",
|
||||
"typescript/no-unsafe-type-assertion": "off",
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/require-post-message-target-origin": "off"
|
||||
|
|
|
|||
|
|
@ -105,9 +105,9 @@
|
|||
"ios:gen": "cd apps/ios && xcodegen generate",
|
||||
"ios:open": "cd apps/ios && xcodegen generate && open OpenClaw.xcodeproj",
|
||||
"ios:run": "bash -lc 'cd apps/ios && xcodegen generate && xcodebuild -project OpenClaw.xcodeproj -scheme OpenClaw -destination \"${IOS_DEST:-platform=iOS Simulator,name=iPhone 17}\" -configuration Debug build && xcrun simctl boot \"${IOS_SIM:-iPhone 17}\" || true && xcrun simctl launch booted ai.openclaw.ios'",
|
||||
"lint": "oxlint --type-aware",
|
||||
"lint": "oxlint --type-aware --tsconfig tsconfig.oxlint.json",
|
||||
"lint:all": "pnpm lint && pnpm lint:swift",
|
||||
"lint:fix": "oxlint --type-aware --fix && pnpm format:fix",
|
||||
"lint:fix": "oxlint --type-aware --tsconfig tsconfig.oxlint.json --fix && pnpm format:fix",
|
||||
"lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)",
|
||||
"mac:open": "open dist/OpenClaw.app",
|
||||
"mac:package": "bash scripts/package-mac-app.sh",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ const OAUTH_PROVIDER_IDS = new Set<OAuthProvider>(
|
|||
);
|
||||
|
||||
const isOAuthProvider = (provider: string): provider is OAuthProvider =>
|
||||
OAUTH_PROVIDER_IDS.has(provider);
|
||||
OAUTH_PROVIDER_IDS.has(provider as OAuthProvider);
|
||||
|
||||
const resolveOAuthProvider = (provider: string): OAuthProvider | null =>
|
||||
isOAuthProvider(provider) ? provider : null;
|
||||
|
|
|
|||
|
|
@ -74,8 +74,11 @@ export function buildEmbeddedSystemPrompt(params: {
|
|||
});
|
||||
}
|
||||
|
||||
export function createSystemPromptOverride(systemPrompt: string): string {
|
||||
return systemPrompt.trim();
|
||||
export function createSystemPromptOverride(
|
||||
systemPrompt: string,
|
||||
): (defaultPrompt?: string) => string {
|
||||
const override = systemPrompt.trim();
|
||||
return (_defaultPrompt?: string) => override;
|
||||
}
|
||||
|
||||
export function applySystemPromptOverrideToSession(session: AgentSession, override: string) {
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ export function toToolDefinitions(tools: AnyAgentTool[]): ToolDefinition[] {
|
|||
execute: async (
|
||||
toolCallId,
|
||||
params,
|
||||
signal,
|
||||
onUpdate: AgentToolUpdateCallback<unknown> | undefined,
|
||||
_ctx,
|
||||
signal,
|
||||
): Promise<AgentToolResult<unknown>> => {
|
||||
try {
|
||||
return await tool.execute(toolCallId, params, signal, onUpdate);
|
||||
|
|
@ -91,9 +91,9 @@ export function toClientToolDefinitions(
|
|||
execute: async (
|
||||
toolCallId,
|
||||
params,
|
||||
_signal,
|
||||
_onUpdate: AgentToolUpdateCallback<unknown> | undefined,
|
||||
_ctx,
|
||||
_signal,
|
||||
): Promise<AgentToolResult<unknown>> => {
|
||||
const outcome = await runBeforeToolCallHook({
|
||||
toolName: func.name,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"lib": ["DOM", "DOM.Iterable", "ES2023", "ScriptHost"],
|
||||
"noEmit": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"target": "es2023"
|
||||
},
|
||||
"include": ["src/**/*.ts", "extensions/**/*.ts"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
Loading…
Reference in New Issue