mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-18 21:00:49 +00:00
chore: recover bogota workspace state
This commit is contained in:
parent
5d65013aa5
commit
e08d1b4dca
436 changed files with 172093 additions and 455 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "@openhandoff/shared",
|
||||
"name": "@sandbox-agent/factory-shared",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
|
|
|||
88
factory/packages/shared/src/app-shell.ts
Normal file
88
factory/packages/shared/src/app-shell.ts
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
export type FactoryBillingPlanId = "free" | "team" | "enterprise";
|
||||
export type FactoryBillingStatus = "active" | "trialing" | "past_due" | "scheduled_cancel";
|
||||
export type FactoryRepoImportStatus = "ready" | "not_started" | "importing";
|
||||
export type FactoryGithubInstallationStatus = "connected" | "install_required" | "reconnect_required";
|
||||
export type FactoryOrganizationKind = "personal" | "organization";
|
||||
|
||||
export interface FactoryUser {
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
githubLogin: string;
|
||||
roleLabel: string;
|
||||
eligibleOrganizationIds: string[];
|
||||
}
|
||||
|
||||
export interface FactoryOrganizationMember {
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
role: "owner" | "admin" | "member";
|
||||
state: "active" | "invited";
|
||||
}
|
||||
|
||||
export interface FactoryInvoice {
|
||||
id: string;
|
||||
label: string;
|
||||
issuedAt: string;
|
||||
amountUsd: number;
|
||||
status: "paid" | "open";
|
||||
}
|
||||
|
||||
export interface FactoryBillingState {
|
||||
planId: FactoryBillingPlanId;
|
||||
status: FactoryBillingStatus;
|
||||
seatsIncluded: number;
|
||||
trialEndsAt: string | null;
|
||||
renewalAt: string | null;
|
||||
stripeCustomerId: string;
|
||||
paymentMethodLabel: string;
|
||||
invoices: FactoryInvoice[];
|
||||
}
|
||||
|
||||
export interface FactoryGithubState {
|
||||
connectedAccount: string;
|
||||
installationStatus: FactoryGithubInstallationStatus;
|
||||
importedRepoCount: number;
|
||||
lastSyncLabel: string;
|
||||
}
|
||||
|
||||
export interface FactoryOrganizationSettings {
|
||||
displayName: string;
|
||||
slug: string;
|
||||
primaryDomain: string;
|
||||
seatAccrualMode: "first_prompt";
|
||||
defaultModel: "claude-sonnet-4" | "claude-opus-4" | "gpt-4o" | "o3";
|
||||
autoImportRepos: boolean;
|
||||
}
|
||||
|
||||
export interface FactoryOrganization {
|
||||
id: string;
|
||||
workspaceId: string;
|
||||
kind: FactoryOrganizationKind;
|
||||
settings: FactoryOrganizationSettings;
|
||||
github: FactoryGithubState;
|
||||
billing: FactoryBillingState;
|
||||
members: FactoryOrganizationMember[];
|
||||
seatAssignments: string[];
|
||||
repoImportStatus: FactoryRepoImportStatus;
|
||||
repoCatalog: string[];
|
||||
}
|
||||
|
||||
export interface FactoryAppSnapshot {
|
||||
auth: {
|
||||
status: "signed_out" | "signed_in";
|
||||
currentUserId: string | null;
|
||||
};
|
||||
activeOrganizationId: string | null;
|
||||
users: FactoryUser[];
|
||||
organizations: FactoryOrganization[];
|
||||
}
|
||||
|
||||
export interface UpdateFactoryOrganizationProfileInput {
|
||||
organizationId: string;
|
||||
displayName: string;
|
||||
slug: string;
|
||||
primaryDomain: string;
|
||||
}
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ export const ConfigSchema = z.object({
|
|||
backend: z.object({
|
||||
host: z.string().default("127.0.0.1"),
|
||||
port: z.number().int().min(1).max(65535).default(7741),
|
||||
dbPath: z.string().default("~/.local/share/openhandoff/handoff.db"),
|
||||
dbPath: z.string().default("~/.local/share/sandbox-agent-factory/handoff.db"),
|
||||
opencode_poll_interval: z.number().default(2),
|
||||
github_poll_interval: z.number().default(30),
|
||||
backup_interval_secs: z.number().default(3600),
|
||||
|
|
@ -32,7 +32,7 @@ export const ConfigSchema = z.object({
|
|||
}).default({
|
||||
host: "127.0.0.1",
|
||||
port: 7741,
|
||||
dbPath: "~/.local/share/openhandoff/handoff.db",
|
||||
dbPath: "~/.local/share/sandbox-agent-factory/handoff.db",
|
||||
opencode_poll_interval: 2,
|
||||
github_poll_interval: 30,
|
||||
backup_interval_secs: 3600,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
export * from "./app-shell.js";
|
||||
export * from "./contracts.js";
|
||||
export * from "./config.js";
|
||||
export * from "./workbench.js";
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const cfg: AppConfig = ConfigSchema.parse({
|
|||
backend: {
|
||||
host: "127.0.0.1",
|
||||
port: 7741,
|
||||
dbPath: "~/.local/share/openhandoff/handoff.db",
|
||||
dbPath: "~/.local/share/sandbox-agent-factory/handoff.db",
|
||||
opencode_poll_interval: 2,
|
||||
github_poll_interval: 30,
|
||||
backup_interval_secs: 3600,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue