repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx
packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx
import { json, query, action, useParams, createAsync, useSubmission } from "@solidjs/router" import { createEffect, createSignal, For, Show } from "solid-js" import { IconCopy, IconCheck } from "~/component/icon" import { Key } from "@opencode-ai/console-core/key.js" import { withActor } from "~/context/auth.withActor"...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/workspace/[id]/keys/index.tsx
packages/console/app/src/routes/workspace/[id]/keys/index.tsx
import { KeySection } from "./key-section" export default function () { return ( <div data-page="workspace-[id]"> <div data-slot="sections"> <KeySection /> </div> </div> ) }
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/workspace/[id]/members/member-section.tsx
packages/console/app/src/routes/workspace/[id]/members/member-section.tsx
import { json, query, action, useParams, createAsync, useSubmission } from "@solidjs/router" import { createEffect, For, Show } from "solid-js" import { withActor } from "~/context/auth.withActor" import { createStore } from "solid-js/store" import styles from "./member-section.module.css" import { UserRole } from "@op...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/workspace/[id]/members/role-dropdown.tsx
packages/console/app/src/routes/workspace/[id]/members/role-dropdown.tsx
import { createSignal } from "solid-js" import { Dropdown } from "~/component/dropdown" import "./role-dropdown.css" interface RoleOption { value: string description: string } interface RoleDropdownProps { value: string options: RoleOption[] onChange: (value: string) => void } export function RoleDropdown(...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/workspace/[id]/members/index.tsx
packages/console/app/src/routes/workspace/[id]/members/index.tsx
import { MemberSection } from "./member-section" export default function () { return ( <div data-page="workspace-[id]"> <div data-slot="sections"> <MemberSection /> </div> </div> ) }
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/stripe/webhook.ts
packages/console/app/src/routes/stripe/webhook.ts
import { Billing } from "@opencode-ai/console-core/billing.js" import type { APIEvent } from "@solidjs/start/server" import { and, Database, eq, sql } from "@opencode-ai/console-core/drizzle/index.js" import { BillingTable, PaymentTable } from "@opencode-ai/console-core/schema/billing.sql.js" import { Identifier } from...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/api/enterprise.ts
packages/console/app/src/routes/api/enterprise.ts
import type { APIEvent } from "@solidjs/start/server" import { AWS } from "@opencode-ai/console-core/aws.js" interface EnterpriseFormData { name: string role: string email: string message: string } export async function POST(event: APIEvent) { try { const body = (await event.request.json()) as Enterpris...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/docs/[...path].ts
packages/console/app/src/routes/docs/[...path].ts
import type { APIEvent } from "@solidjs/start/server" async function handler(evt: APIEvent) { const req = evt.request.clone() const url = new URL(req.url) const targetUrl = `https://docs.opencode.ai${url.pathname}${url.search}` const response = await fetch(targetUrl, { method: req.method, headers: req....
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/docs/index.ts
packages/console/app/src/routes/docs/index.ts
import type { APIEvent } from "@solidjs/start/server" async function handler(evt: APIEvent) { const req = evt.request.clone() const url = new URL(req.url) const targetUrl = `https://docs.opencode.ai${url.pathname}${url.search}` const response = await fetch(targetUrl, { method: req.method, headers: req....
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/legal/terms-of-service/index.tsx
packages/console/app/src/routes/legal/terms-of-service/index.tsx
import "../../brand/index.css" import "./index.css" import { Title, Meta, Link } from "@solidjs/meta" import { Header } from "~/component/header" import { config } from "~/config" import { Footer } from "~/component/footer" import { Legal } from "~/component/legal" export default function TermsOfService() { return (...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
true
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/legal/privacy-policy/index.tsx
packages/console/app/src/routes/legal/privacy-policy/index.tsx
import "../../brand/index.css" import "./index.css" import { Title, Meta, Link } from "@solidjs/meta" import { Header } from "~/component/header" import { config } from "~/config" import { Footer } from "~/component/footer" import { Legal } from "~/component/legal" export default function PrivacyPolicy() { return ( ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
true
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/t/[...path].tsx
packages/console/app/src/routes/t/[...path].tsx
import type { APIEvent } from "@solidjs/start/server" async function handler(evt: APIEvent) { const req = evt.request.clone() const url = new URL(req.url) const targetUrl = `https://enterprise.opencode.ai/${url.pathname}${url.search}` const response = await fetch(targetUrl, { method: req.method, header...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/index.tsx
packages/console/app/src/routes/zen/index.tsx
import "./index.css" import { createAsync, query, redirect } from "@solidjs/router" import { Title, Meta, Link } from "@solidjs/meta" //import { HttpHeader } from "@solidjs/start" import zenLogoLight from "../../asset/zen-ornate-light.svg" import { config } from "~/config" import zenLogoDark from "../../asset/zen-ornat...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/stickyProviderTracker.ts
packages/console/app/src/routes/zen/util/stickyProviderTracker.ts
import { Resource } from "@opencode-ai/console-resource" export function createStickyTracker(stickyProvider: boolean, session: string) { if (!stickyProvider) return if (!session) return const key = `sticky:${session}` return { get: async () => { return await Resource.GatewayKv.get(key) }, se...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/trialLimiter.ts
packages/console/app/src/routes/zen/util/trialLimiter.ts
import { Database, eq, sql } from "@opencode-ai/console-core/drizzle/index.js" import { IpTable } from "@opencode-ai/console-core/schema/ip.sql.js" import { UsageInfo } from "./provider/provider" import { ZenData } from "@opencode-ai/console-core/model.js" export function createTrialLimiter(trial: ZenData.Trial | unde...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/logger.ts
packages/console/app/src/routes/zen/util/logger.ts
import { Resource } from "@opencode-ai/console-resource" export const logger = { metric: (values: Record<string, any>) => { console.log(`_metric:${JSON.stringify(values)}`) }, log: console.log, debug: (message: string) => { if (Resource.App.stage === "production") return console.debug(message) },...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/dataDumper.ts
packages/console/app/src/routes/zen/util/dataDumper.ts
import { Resource, waitUntil } from "@opencode-ai/console-resource" export function createDataDumper(sessionId: string, requestId: string, projectId: string) { if (Resource.App.stage !== "production") return if (sessionId === "") return let data: Record<string, any> = { sessionId, requestId, projectId } let m...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/handler.ts
packages/console/app/src/routes/zen/util/handler.ts
import type { APIEvent } from "@solidjs/start/server" import { and, Database, eq, isNull, lt, or, sql } from "@opencode-ai/console-core/drizzle/index.js" import { KeyTable } from "@opencode-ai/console-core/schema/key.sql.js" import { BillingTable, UsageTable } from "@opencode-ai/console-core/schema/billing.sql.js" impo...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/rateLimiter.ts
packages/console/app/src/routes/zen/util/rateLimiter.ts
import { Resource } from "@opencode-ai/console-resource" import { RateLimitError } from "./error" import { logger } from "./logger" export function createRateLimiter(model: string, limit: number | undefined, ip: string) { if (!limit) return const now = Date.now() const currKey = `usage:${ip}:${model}:${buildYYY...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/error.ts
packages/console/app/src/routes/zen/util/error.ts
export class AuthError extends Error {} export class CreditsError extends Error {} export class MonthlyLimitError extends Error {} export class UserLimitError extends Error {} export class ModelError extends Error {} export class RateLimitError extends Error {}
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/provider/anthropic.ts
packages/console/app/src/routes/zen/util/provider/anthropic.ts
import { ProviderHelper, CommonRequest, CommonResponse, CommonChunk } from "./provider" type Usage = { cache_creation?: { ephemeral_5m_input_tokens?: number ephemeral_1h_input_tokens?: number } cache_creation_input_tokens?: number cache_read_input_tokens?: number input_tokens?: number output_tokens...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/provider/google.ts
packages/console/app/src/routes/zen/util/provider/google.ts
import { ProviderHelper } from "./provider" /* { promptTokenCount: 11453, candidatesTokenCount: 71, totalTokenCount: 11625, cachedContentTokenCount: 8100, promptTokensDetails: [ {modality: "TEXT",tokenCount: 11453} ], cacheTokensDetails: [ {modality: "TEXT",tokenCount: 8100} ], thoughtsTokenC...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/provider/openai.ts
packages/console/app/src/routes/zen/util/provider/openai.ts
import { ProviderHelper, CommonRequest, CommonResponse, CommonChunk } from "./provider" type Usage = { input_tokens?: number input_tokens_details?: { cached_tokens?: number } output_tokens?: number output_tokens_details?: { reasoning_tokens?: number } total_tokens?: number } export const openaiH...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/provider/provider.ts
packages/console/app/src/routes/zen/util/provider/provider.ts
import { ZenData } from "@opencode-ai/console-core/model.js" import { fromAnthropicChunk, fromAnthropicRequest, fromAnthropicResponse, toAnthropicChunk, toAnthropicRequest, toAnthropicResponse, } from "./anthropic" import { fromOpenaiChunk, fromOpenaiRequest, fromOpenaiResponse, toOpenaiChunk, toO...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/util/provider/openai-compatible.ts
packages/console/app/src/routes/zen/util/provider/openai-compatible.ts
import { ProviderHelper, CommonRequest, CommonResponse, CommonChunk } from "./provider" type Usage = { prompt_tokens?: number completion_tokens?: number total_tokens?: number // used by moonshot cached_tokens?: number // used by xai prompt_tokens_details?: { text_tokens?: number audio_tokens?: nu...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/v1/models.ts
packages/console/app/src/routes/zen/v1/models.ts
import type { APIEvent } from "@solidjs/start/server" import { and, Database, eq, isNull } from "@opencode-ai/console-core/drizzle/index.js" import { KeyTable } from "@opencode-ai/console-core/schema/key.sql.js" import { WorkspaceTable } from "@opencode-ai/console-core/schema/workspace.sql.js" import { ModelTable } fro...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/v1/responses.ts
packages/console/app/src/routes/zen/v1/responses.ts
import type { APIEvent } from "@solidjs/start/server" import { handler } from "~/routes/zen/util/handler" export function POST(input: APIEvent) { return handler(input, { format: "openai", parseApiKey: (headers: Headers) => headers.get("authorization")?.split(" ")[1], parseModel: (url: string, body: any) ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/v1/messages.ts
packages/console/app/src/routes/zen/v1/messages.ts
import type { APIEvent } from "@solidjs/start/server" import { handler } from "~/routes/zen/util/handler" export function POST(input: APIEvent) { return handler(input, { format: "anthropic", parseApiKey: (headers: Headers) => headers.get("x-api-key") ?? undefined, parseModel: (url: string, body: any) => ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/v1/chat/completions.ts
packages/console/app/src/routes/zen/v1/chat/completions.ts
import type { APIEvent } from "@solidjs/start/server" import { handler } from "~/routes/zen/util/handler" export function POST(input: APIEvent) { return handler(input, { format: "oa-compat", parseApiKey: (headers: Headers) => headers.get("authorization")?.split(" ")[1], parseModel: (url: string, body: an...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/zen/v1/models/[model].ts
packages/console/app/src/routes/zen/v1/models/[model].ts
import type { APIEvent } from "@solidjs/start/server" import { handler } from "~/routes/zen/util/handler" export function POST(input: APIEvent) { return handler(input, { format: "google", parseApiKey: (headers: Headers) => headers.get("x-goog-api-key") ?? undefined, parseModel: (url: string, body: any) =...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/download/[platform].ts
packages/console/app/src/routes/download/[platform].ts
import { APIEvent } from "@solidjs/start" import { DownloadPlatform } from "./types" const assetNames: Record<string, string> = { "darwin-aarch64-dmg": "opencode-desktop-darwin-aarch64.dmg", "darwin-x64-dmg": "opencode-desktop-darwin-x64.dmg", "windows-x64-nsis": "opencode-desktop-windows-x64.exe", "linux-x64-...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/download/index.tsx
packages/console/app/src/routes/download/index.tsx
import "./index.css" import { Title, Meta, Link } from "@solidjs/meta" import { A, createAsync, query } from "@solidjs/router" import { Header } from "~/component/header" import { Footer } from "~/component/footer" import { IconCopy, IconCheck } from "~/component/icon" import { Faq } from "~/component/faq" import deskt...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
true
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/download/types.ts
packages/console/app/src/routes/download/types.ts
export type DownloadPlatform = | `darwin-${"x64" | "aarch64"}-dmg` | "windows-x64-nsis" | `linux-x64-${"deb" | "rpm" | "appimage"}`
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/enterprise/index.tsx
packages/console/app/src/routes/enterprise/index.tsx
import "./index.css" import { Title, Meta, Link } from "@solidjs/meta" import { createSignal, Show } from "solid-js" import { config } from "~/config" import { Header } from "~/component/header" import { Footer } from "~/component/footer" import { Legal } from "~/component/legal" import { Faq } from "~/component/faq" ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/routes/debug/index.ts
packages/console/app/src/routes/debug/index.ts
import type { APIEvent } from "@solidjs/start/server" import { json } from "@solidjs/router" import { Database } from "@opencode-ai/console-core/drizzle/index.js" import { UserTable } from "@opencode-ai/console-core/schema/user.sql.js" export async function GET(evt: APIEvent) { return json({ data: await Database...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/lib/github.ts
packages/console/app/src/lib/github.ts
import { query } from "@solidjs/router" import { config } from "~/config" export const github = query(async () => { "use server" const headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36", } const apiBaseUrl ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/component/dropdown.tsx
packages/console/app/src/component/dropdown.tsx
import { JSX, Show, createEffect, onCleanup } from "solid-js" import { createStore } from "solid-js/store" import { IconChevron } from "./icon" import "./dropdown.css" interface DropdownProps { trigger: JSX.Element | string children: JSX.Element open?: boolean onOpenChange?: (open: boolean) => void align?: "...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/component/legal.tsx
packages/console/app/src/component/legal.tsx
import { A } from "@solidjs/router" export function Legal() { return ( <div data-component="legal"> <span> ©{new Date().getFullYear()} <a href="https://anoma.ly">Anomaly</a> </span> <span> <A href="/brand">Brand</A> </span> <span> <A href="/legal/privacy-poli...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/component/footer.tsx
packages/console/app/src/component/footer.tsx
import { createAsync } from "@solidjs/router" import { createMemo } from "solid-js" import { github } from "~/lib/github" import { config } from "~/config" export function Footer() { const githubData = createAsync(() => github()) const starCount = createMemo(() => githubData()?.stars ? new Intl.NumberFor...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/component/faq.tsx
packages/console/app/src/component/faq.tsx
import { Collapsible } from "@kobalte/core/collapsible" import { ParentProps } from "solid-js" export function Faq(props: ParentProps & { question: string }) { return ( <Collapsible data-slot="faq-item"> <Collapsible.Trigger data-slot="faq-question"> <svg data-slot="faq-icon-plus" ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/component/modal.tsx
packages/console/app/src/component/modal.tsx
import { JSX, Show } from "solid-js" import "./modal.css" interface ModalProps { open: boolean onClose: () => void title?: string children: JSX.Element } export function Modal(props: ModalProps) { return ( <Show when={props.open}> <div data-component="modal" data-slot="overlay" onClick={props.onCl...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/component/header.tsx
packages/console/app/src/component/header.tsx
import logoLight from "../asset/logo-ornate-light.svg" import logoDark from "../asset/logo-ornate-dark.svg" import copyLogoLight from "../asset/lander/logo-light.svg" import copyLogoDark from "../asset/lander/logo-dark.svg" import copyWordmarkLight from "../asset/lander/wordmark-light.svg" import copyWordmarkDark from ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/component/icon.tsx
packages/console/app/src/component/icon.tsx
import { JSX } from "solid-js" export function IconLogo(props: JSX.SvgSVGAttributes<SVGSVGElement>) { return ( <svg width="64" height="32" viewBox="0 0 64 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0 9.14333V4.5719H4.57143V9.14333H0Z" fill="currentColor" /> <path d="M4.57178 9.1433...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/component/email-signup.tsx
packages/console/app/src/component/email-signup.tsx
import { action, useSubmission } from "@solidjs/router" import dock from "../asset/lander/dock.png" import { Resource } from "@opencode-ai/console-resource" import { Show } from "solid-js" const emailSignup = action(async (formData: FormData) => { "use server" const emailAddress = formData.get("email")! const li...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/context/auth.ts
packages/console/app/src/context/auth.ts
import { getRequestEvent } from "solid-js/web" import { and, Database, eq, inArray, isNull, sql } from "@opencode-ai/console-core/drizzle/index.js" import { UserTable } from "@opencode-ai/console-core/schema/user.sql.js" import { redirect } from "@solidjs/router" import { Actor } from "@opencode-ai/console-core/actor.j...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/context/auth.withActor.ts
packages/console/app/src/context/auth.withActor.ts
import { Actor } from "@opencode-ai/console-core/actor.js" import { getActor } from "./auth" export async function withActor<T>(fn: () => T, workspace?: string) { const actor = await getActor(workspace) return Actor.provide(actor.type, actor.properties, fn) }
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/src/context/auth.session.ts
packages/console/app/src/context/auth.session.ts
import { useSession } from "@solidjs/start/http" export interface AuthSession { account?: Record< string, { id: string email: string } > current?: string } export function useAuthSession() { return useSession<AuthSession>({ password: "0".repeat(32), name: "auth", maxAge: 60...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/app/script/generate-sitemap.ts
packages/console/app/script/generate-sitemap.ts
#!/usr/bin/env bun import { readdir, writeFile } from "fs/promises" import { join, dirname } from "path" import { fileURLToPath } from "url" import { config } from "../src/config.js" const __dirname = dirname(fileURLToPath(import.meta.url)) const BASE_URL = config.baseUrl const PUBLIC_DIR = join(__dirname, "../public"...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/mail/sst-env.d.ts
packages/console/mail/sst-env.d.ts
/* This file is auto-generated by SST. Do not edit. */ /* tslint:disable */ /* eslint-disable */ /* deno-fmt-ignore-file */ /// <reference path="../../../sst-env.d.ts" /> import "sst" export {}
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/mail/emails/styles.ts
packages/console/mail/emails/styles.ts
// @ts-nocheck export const unit = 12 export const PRIMARY_COLOR = "#211E1E" export const TEXT_COLOR = "#656363" export const LINK_COLOR = "#007AFF" export const LINK_BACKGROUND_COLOR = "#F9F8F8" export const BACKGROUND_COLOR = "#F0F0F1" export const SURFACE_DIVIDER_COLOR = "#D5D5D9" export const body = { background...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/mail/emails/components.tsx
packages/console/mail/emails/components.tsx
// @ts-nocheck import React from "react" import { Font, Text as JEText, type TextProps } from "@jsx-email/all" import { baseText } from "./styles" export function Text(props: TextProps) { return <JEText {...props} style={{ ...baseText, ...props.style }} /> } export function Title({ children }: TitleProps) { retur...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/mail/emails/templates/InviteEmail.tsx
packages/console/mail/emails/templates/InviteEmail.tsx
// @ts-nocheck import React from "react" import { Img, Row, Html, Link, Body, Head, Button, Column, Preview, Section, Container } from "@jsx-email/all" import { Text, Fonts, Title, A, Span } from "../components" import { unit, body, frame, headingText, container, contentText, button, contentHighlightTex...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/sst-env.d.ts
packages/console/core/sst-env.d.ts
/* This file is auto-generated by SST. Do not edit. */ /* tslint:disable */ /* eslint-disable */ /* deno-fmt-ignore-file */ import "sst" declare module "sst" { export interface Resource { "ADMIN_SECRET": { "type": "sst.sst.Secret" "value": string } "AUTH_API_URL": { "type": "sst.sst.Lin...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/drizzle.config.ts
packages/console/core/drizzle.config.ts
import { Resource } from "sst" import { defineConfig } from "drizzle-kit" export default defineConfig({ out: "./migrations/", strict: true, schema: ["./src/**/*.sql.ts"], verbose: true, dialect: "mysql", dbCredentials: { database: Resource.Database.database, host: Resource.Database.host, user: ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/actor.ts
packages/console/core/src/actor.ts
import { Context } from "./context" import { UserRole } from "./schema/user.sql" import { Log } from "./util/log" export namespace Actor { interface Account { type: "account" properties: { accountID: string email: string } } interface Public { type: "public" properties: {} } ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/model.ts
packages/console/core/src/model.ts
import { z } from "zod" import { eq, and } from "drizzle-orm" import { Database } from "./drizzle" import { ModelTable } from "./schema/model.sql" import { Identifier } from "./identifier" import { fn } from "./util/fn" import { Actor } from "./actor" import { Resource } from "@opencode-ai/console-resource" export nam...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/key.ts
packages/console/core/src/key.ts
import { z } from "zod" import { fn } from "./util/fn" import { Actor } from "./actor" import { and, Database, eq, isNull, sql } from "./drizzle" import { Identifier } from "./identifier" import { KeyTable } from "./schema/key.sql" import { UserTable } from "./schema/user.sql" import { AuthTable } from "./schema/auth.s...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/billing.ts
packages/console/core/src/billing.ts
import { Stripe } from "stripe" import { Database, eq, sql } from "./drizzle" import { BillingTable, PaymentTable, UsageTable } from "./schema/billing.sql" import { Actor } from "./actor" import { fn } from "./util/fn" import { z } from "zod" import { Resource } from "@opencode-ai/console-resource" import { Identifier ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/provider.ts
packages/console/core/src/provider.ts
import { z } from "zod" import { fn } from "./util/fn" import { Actor } from "./actor" import { and, Database, eq, isNull } from "./drizzle" import { Identifier } from "./identifier" import { ProviderTable } from "./schema/provider.sql" export namespace Provider { export const list = fn(z.void(), () => Database....
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/identifier.ts
packages/console/core/src/identifier.ts
import { ulid } from "ulid" import { z } from "zod" export namespace Identifier { const prefixes = { account: "acc", auth: "aut", benchmark: "ben", billing: "bil", key: "key", model: "mod", payment: "pay", provider: "prv", usage: "usg", user: "usr", workspace: "wrk", } a...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/workspace.ts
packages/console/core/src/workspace.ts
import { z } from "zod" import { fn } from "./util/fn" import { Actor } from "./actor" import { Database } from "./drizzle" import { Identifier } from "./identifier" import { UserTable } from "./schema/user.sql" import { BillingTable } from "./schema/billing.sql" import { WorkspaceTable } from "./schema/workspace.sql" ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/user.ts
packages/console/core/src/user.ts
import { z } from "zod" import { and, eq, getTableColumns, isNull, sql } from "drizzle-orm" import { fn } from "./util/fn" import { Database } from "./drizzle" import { UserRole, UserTable } from "./schema/user.sql" import { Actor } from "./actor" import { Identifier } from "./identifier" import { render } from "@jsx-e...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/context.ts
packages/console/core/src/context.ts
import { AsyncLocalStorage } from "node:async_hooks" export namespace Context { export class NotFound extends Error {} export function create<T>() { const storage = new AsyncLocalStorage<T>() return { use() { const result = storage.getStore() if (!result) { throw new NotFou...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/account.ts
packages/console/core/src/account.ts
import { z } from "zod" import { eq } from "drizzle-orm" import { fn } from "./util/fn" import { Database } from "./drizzle" import { Identifier } from "./identifier" import { AccountTable } from "./schema/account.sql" export namespace Account { export const create = fn( z.object({ id: z.string().optional(...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/aws.ts
packages/console/core/src/aws.ts
import { z } from "zod" import { Resource } from "@opencode-ai/console-resource" import { AwsClient } from "aws4fetch" import { fn } from "./util/fn" export namespace AWS { let client: AwsClient const createClient = () => { if (!client) { client = new AwsClient({ accessKeyId: Resource.AWS_SES_AC...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/util/fn.ts
packages/console/core/src/util/fn.ts
import { z } from "zod" export function fn<T extends z.ZodType, Result>(schema: T, cb: (input: z.infer<T>) => Result) { const result = (input: z.infer<T>) => { const parsed = schema.parse(input) return cb(parsed) } result.force = (input: z.infer<T>) => cb(input) result.schema = schema return result }...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/util/price.ts
packages/console/core/src/util/price.ts
export function centsToMicroCents(amount: number) { return Math.round(amount * 1000000) }
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/util/log.ts
packages/console/core/src/util/log.ts
import { Context } from "../context" export namespace Log { const ctx = Context.create<{ tags: Record<string, any> }>() export function create(tags?: Record<string, any>) { tags = tags || {} const result = { info(message?: any, extra?: Record<string, any>) { const prefix = Object.entr...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/util/memo.ts
packages/console/core/src/util/memo.ts
export function memo<T>(fn: () => T, cleanup?: (input: T) => Promise<void>) { let value: T | undefined let loaded = false const result = (): T => { if (loaded) return value as T loaded = true value = fn() return value as T } result.reset = async () => { if (cleanup && value) await cleanup...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/util/env.cloudflare.ts
packages/console/core/src/util/env.cloudflare.ts
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/drizzle/types.ts
packages/console/core/src/drizzle/types.ts
import { sql } from "drizzle-orm" import { bigint, timestamp, varchar } from "drizzle-orm/mysql-core" export const ulid = (name: string) => varchar(name, { length: 30 }) export const workspaceColumns = { get id() { return ulid("id").notNull() }, get workspaceID() { return ulid("workspace_id").notNull() ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/drizzle/index.ts
packages/console/core/src/drizzle/index.ts
import { drizzle } from "drizzle-orm/planetscale-serverless" import { Resource } from "@opencode-ai/console-resource" export * from "drizzle-orm" import { Client } from "@planetscale/database" import { MySqlTransaction, type MySqlTransactionConfig } from "drizzle-orm/mysql-core" import type { ExtractTablesWithRelation...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/provider.sql.ts
packages/console/core/src/schema/provider.sql.ts
import { mysqlTable, text, uniqueIndex, varchar } from "drizzle-orm/mysql-core" import { timestamps, workspaceColumns } from "../drizzle/types" import { workspaceIndexes } from "./workspace.sql" export const ProviderTable = mysqlTable( "provider", { ...workspaceColumns, ...timestamps, provider: varchar...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/model.sql.ts
packages/console/core/src/schema/model.sql.ts
import { mysqlTable, varchar, uniqueIndex } from "drizzle-orm/mysql-core" import { timestamps, workspaceColumns } from "../drizzle/types" import { workspaceIndexes } from "./workspace.sql" export const ModelTable = mysqlTable( "model", { ...workspaceColumns, ...timestamps, model: varchar("model", { len...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/benchmark.sql.ts
packages/console/core/src/schema/benchmark.sql.ts
import { index, mediumtext, mysqlTable, primaryKey, varchar } from "drizzle-orm/mysql-core" import { id, timestamps } from "../drizzle/types" export const BenchmarkTable = mysqlTable( "benchmark", { id: id(), ...timestamps, model: varchar("model", { length: 64 }).notNull(), agent: varchar("agent", ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/billing.sql.ts
packages/console/core/src/schema/billing.sql.ts
import { bigint, boolean, int, mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core" import { timestamps, ulid, utc, workspaceColumns } from "../drizzle/types" import { workspaceIndexes } from "./workspace.sql" export const BillingTable = mysqlTable( "billing", { ...workspaceColumns, ...timestam...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/auth.sql.ts
packages/console/core/src/schema/auth.sql.ts
import { index, mysqlEnum, mysqlTable, primaryKey, uniqueIndex, varchar } from "drizzle-orm/mysql-core" import { id, timestamps, ulid } from "../drizzle/types" export const AuthProvider = ["email", "github", "google"] as const export const AuthTable = mysqlTable( "auth", { id: id(), ...timestamps, pro...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/key.sql.ts
packages/console/core/src/schema/key.sql.ts
import { mysqlTable, varchar, uniqueIndex } from "drizzle-orm/mysql-core" import { timestamps, ulid, utc, workspaceColumns } from "../drizzle/types" import { workspaceIndexes } from "./workspace.sql" export const KeyTable = mysqlTable( "key", { ...workspaceColumns, ...timestamps, name: varchar("name", ...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/account.sql.ts
packages/console/core/src/schema/account.sql.ts
import { mysqlTable, primaryKey } from "drizzle-orm/mysql-core" import { id, timestamps } from "../drizzle/types" export const AccountTable = mysqlTable( "account", { id: id(), ...timestamps, }, (table) => [primaryKey({ columns: [table.id] })], )
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/ip.sql.ts
packages/console/core/src/schema/ip.sql.ts
import { mysqlTable, int, primaryKey, varchar } from "drizzle-orm/mysql-core" import { timestamps } from "../drizzle/types" export const IpTable = mysqlTable( "ip", { ip: varchar("ip", { length: 45 }).notNull(), ...timestamps, usage: int("usage"), }, (table) => [primaryKey({ columns: [table.ip] })]...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/workspace.sql.ts
packages/console/core/src/schema/workspace.sql.ts
import { primaryKey, mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core" import { timestamps, ulid } from "../drizzle/types" export const WorkspaceTable = mysqlTable( "workspace", { id: ulid("id").notNull().primaryKey(), slug: varchar("slug", { length: 255 }), name: varchar("name", { lengt...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/src/schema/user.sql.ts
packages/console/core/src/schema/user.sql.ts
import { mysqlTable, uniqueIndex, varchar, int, mysqlEnum, index, bigint } from "drizzle-orm/mysql-core" import { timestamps, ulid, utc, workspaceColumns } from "../drizzle/types" import { workspaceIndexes } from "./workspace.sql" export const UserRole = ["admin", "member"] as const export const UserTable = mysqlTabl...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/script/promote-models.ts
packages/console/core/script/promote-models.ts
#!/usr/bin/env bun import { $ } from "bun" import path from "path" import { ZenData } from "../src/model" const stage = process.argv[2] if (!stage) throw new Error("Stage is required") const root = path.resolve(process.cwd(), "..", "..", "..") // read the secret const ret = await $`bun sst secret list`.cwd(root).te...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/script/pull-models.ts
packages/console/core/script/pull-models.ts
#!/usr/bin/env bun import { $ } from "bun" import path from "path" import { ZenData } from "../src/model" const stage = process.argv[2] if (!stage) throw new Error("Stage is required") const root = path.resolve(process.cwd(), "..", "..", "..") // read the secret const ret = await $`bun sst secret list --stage ${sta...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/script/lookup-user.ts
packages/console/core/script/lookup-user.ts
import { Database, eq } from "../src/drizzle/index.js" import { AuthTable } from "../src/schema/auth.sql" // get input from command line const email = process.argv[2] if (!email) { console.error("Usage: bun lookup-user.ts <email>") process.exit(1) } const authData = await printTable("Auth", (tx) => tx.select().fr...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/script/update-models.ts
packages/console/core/script/update-models.ts
#!/usr/bin/env bun import { $ } from "bun" import path from "path" import os from "os" import { ZenData } from "../src/model" const root = path.resolve(process.cwd(), "..", "..", "..") const models = await $`bun sst secret list`.cwd(root).text() // read the line starting with "ZEN_MODELS" const lines = models.split(...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/core/script/reset-db.ts
packages/console/core/script/reset-db.ts
import { Resource } from "@opencode-ai/console-resource" import { Database } from "../src/drizzle/index.js" import { UserTable } from "../src/schema/user.sql.js" import { AccountTable } from "../src/schema/account.sql.js" import { WorkspaceTable } from "../src/schema/workspace.sql.js" import { BillingTable, PaymentTabl...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/function/sst-env.d.ts
packages/console/function/sst-env.d.ts
/* This file is auto-generated by SST. Do not edit. */ /* tslint:disable */ /* eslint-disable */ /* deno-fmt-ignore-file */ import "sst" declare module "sst" { export interface Resource { "ADMIN_SECRET": { "type": "sst.sst.Secret" "value": string } "AUTH_API_URL": { "type": "sst.sst.Lin...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/function/src/log-processor.ts
packages/console/function/src/log-processor.ts
import { Resource } from "@opencode-ai/console-resource" import type { TraceItem } from "@cloudflare/workers-types" export default { async tail(events: TraceItem[]) { for (const event of events) { if (!event.event) continue if (!("request" in event.event)) continue if (event.event.request.metho...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/console/function/src/auth.ts
packages/console/function/src/auth.ts
import type { KVNamespace } from "@cloudflare/workers-types" import { z } from "zod" import { issuer } from "@openauthjs/openauth" import type { Theme } from "@openauthjs/openauth/ui/theme" import { createSubjects } from "@openauthjs/openauth/subject" import { THEME_OPENAUTH } from "@openauthjs/openauth/ui/theme" impor...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/script/sst-env.d.ts
packages/script/sst-env.d.ts
/* This file is auto-generated by SST. Do not edit. */ /* tslint:disable */ /* eslint-disable */ /* deno-fmt-ignore-file */ /// <reference path="../../sst-env.d.ts" /> import "sst" export {}
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/script/src/index.ts
packages/script/src/index.ts
import { $ } from "bun" import path from "path" const rootPkgPath = path.resolve(import.meta.dir, "../../../package.json") const rootPkg = await Bun.file(rootPkgPath).json() const expectedBunVersion = rootPkg.packageManager?.split("@")[1] if (!expectedBunVersion) { throw new Error("packageManager field not found in...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/function/sst-env.d.ts
packages/function/sst-env.d.ts
/* This file is auto-generated by SST. Do not edit. */ /* tslint:disable */ /* eslint-disable */ /* deno-fmt-ignore-file */ import "sst" declare module "sst" { export interface Resource { "ADMIN_SECRET": { "type": "sst.sst.Secret" "value": string } "AUTH_API_URL": { "type": "sst.sst.Lin...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/function/src/api.ts
packages/function/src/api.ts
import { Hono } from "hono" import { DurableObject } from "cloudflare:workers" import { randomUUID } from "node:crypto" import { jwtVerify, createRemoteJWKSet } from "jose" import { createAppAuth } from "@octokit/auth-app" import { Octokit } from "@octokit/rest" import { Resource } from "sst" type Env = { SYNC_SERVE...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/ui/sst-env.d.ts
packages/ui/sst-env.d.ts
/* This file is auto-generated by SST. Do not edit. */ /* tslint:disable */ /* eslint-disable */ /* deno-fmt-ignore-file */ /// <reference path="../../sst-env.d.ts" /> import "sst" export {}
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/ui/vite.config.ts
packages/ui/vite.config.ts
import { defineConfig } from "vite" import solidPlugin from "vite-plugin-solid" import { iconsSpritesheet } from "vite-plugin-icons-spritesheet" import fs from "fs" export default defineConfig({ plugins: [ solidPlugin(), providerIconsPlugin(), iconsSpritesheet([ { withTypes: true, i...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/ui/src/custom-elements.d.ts
packages/ui/src/custom-elements.d.ts
import { DIFFS_TAG_NAME } from "@pierre/diffs" /** * TypeScript declaration for the <diffs-container> custom element. * This tells TypeScript that <diffs-container> is a valid JSX element in SolidJS. * Required for using the @pierre/diffs web component in .tsx files. */ declare module "solid-js" { namespace JSX...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/ui/src/hooks/create-auto-scroll.tsx
packages/ui/src/hooks/create-auto-scroll.tsx
import { createEffect, on, onCleanup } from "solid-js" import { createStore } from "solid-js/store" import { createResizeObserver } from "@solid-primitives/resize-observer" export interface AutoScrollOptions { working: () => boolean onUserInteracted?: () => void } export function createAutoScroll(options: AutoScr...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/ui/src/hooks/index.ts
packages/ui/src/hooks/index.ts
export * from "./use-filtered-list" export * from "./create-auto-scroll"
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false
anomalyco/opencode
https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/ui/src/hooks/use-filtered-list.tsx
packages/ui/src/hooks/use-filtered-list.tsx
import fuzzysort from "fuzzysort" import { entries, flatMap, groupBy, map, pipe } from "remeda" import { createMemo, createResource } from "solid-js" import { createStore } from "solid-js/store" import { createList } from "solid-list" export interface FilteredListProps<T> { items: T[] | ((filter: string) => T[] | Pr...
typescript
MIT
0f9130b649f65a8f5d08492e764f47b38f441dca
2026-01-04T15:39:55.906013Z
false