larness 0.6.2 → 0.7.0
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/apps/server/dist/{address-DpgJ0siq.js → address-B-gPq4hH.js} +2 -2
- package/apps/server/dist/cli.js +6 -6
- package/apps/server/dist/{client-CoxHAiNW.js → client-DmQOZ_VJ.js} +1 -1
- package/apps/server/dist/{client-CBpatu1B.js → client-nSfUt-Xw.js} +1 -1
- package/apps/server/dist/{doctor-rpwPrkoS.js → doctor--QI8obs_.js} +1 -1
- package/apps/server/dist/doctor-BWQ8wPEo.js +1 -0
- package/apps/server/dist/doctor.js +1 -1
- package/apps/server/dist/index.js +52 -10
- package/apps/server/dist/{inspect-DUe_-Yma.js → inspect-Dz79med6.js} +6 -1
- package/apps/server/dist/{lifecycle-CAl_1GBj.js → lifecycle-0-9eT-gl.js} +4 -4
- package/apps/server/dist/{managed-CpNf_iJZ.js → managed-FpQ4FjRh.js} +1 -1
- package/apps/server/dist/{status-C0hriYPD.js → status-Bv7nxvzW.js} +2 -2
- package/apps/server/dist/{status-B6kiOT0f.js → status-E5SdreUc.js} +2 -2
- package/apps/server/dist/status.js +1 -1
- package/apps/server/dist/{supervisor-BvHyiN7Z.js → supervisor-eW8XSzXm.js} +3 -3
- package/apps/server/dist/tui.js +5 -5
- package/apps/server/dist/{unlock-hrRXYx4L.js → unlock-ik1568g3.js} +4 -4
- package/apps/server/drizzle/0001_auth.sql +109 -109
- package/apps/server/drizzle/0002_projects.sql +12 -12
- package/apps/server/drizzle/0003_workspace.sql +80 -80
- package/apps/server/drizzle/0004_models.sql +30 -30
- package/apps/server/drizzle/0005_resources.sql +54 -54
- package/apps/server/drizzle/0006_commands.sql +23 -23
- package/apps/server/drizzle/0007_terminals.sql +41 -41
- package/apps/server/drizzle/0008_resource_actions.sql +23 -23
- package/apps/server/drizzle/0010_services.sql +31 -31
- package/apps/web/dist/assets/{FileEditor-Do8GmXIr.js → FileEditor-DvUvGBju.js} +1 -1
- package/apps/web/dist/assets/{FileViewer-B8gY_ZI6.js → FileViewer-DuLi65JA.js} +1 -1
- package/apps/web/dist/assets/{cssMode-CS6aED9d.js → cssMode-BFtqV8eS.js} +1 -1
- package/apps/web/dist/assets/{editor.api-D6oPGpkQ.js → editor.api-B-Hf6DWT.js} +1 -1
- package/apps/web/dist/assets/{freemarker2-W5te7pKn.js → freemarker2-QsBG6rLF.js} +1 -1
- package/apps/web/dist/assets/{handlebars-FfsnqgOd.js → handlebars-BIDqo3ET.js} +1 -1
- package/apps/web/dist/assets/{html-B6aDARpM.js → html-BoeVeWBr.js} +1 -1
- package/apps/web/dist/assets/{htmlMode-DtVB7XbC.js → htmlMode-pBOumAql.js} +1 -1
- package/apps/web/dist/assets/{index-CoZNwLtg.js → index-BcXxWUCA.js} +2 -2
- package/apps/web/dist/assets/{javascript-DOCYuHY6.js → javascript-z49fO24y.js} +1 -1
- package/apps/web/dist/assets/{jsonMode-3TlHPyqo.js → jsonMode-CcjrUe-N.js} +1 -1
- package/apps/web/dist/assets/{liquid-Bto78Uut.js → liquid-Bel5uheg.js} +1 -1
- package/apps/web/dist/assets/{lspLanguageFeatures-DNfY34nV.js → lspLanguageFeatures-BqS1Q85I.js} +1 -1
- package/apps/web/dist/assets/main-B0YUBq2Q.js +157 -0
- package/apps/web/dist/assets/main-B6xFa89X.css +1 -0
- package/apps/web/dist/assets/{mdx-C7pB8lGC.js → mdx-m5Iaur5H.js} +1 -1
- package/apps/web/dist/assets/{monaco-C4Y-n5xH.js → monaco-b438wjl8.js} +3 -3
- package/apps/web/dist/assets/{python-BsYUorQU.js → python-tC-5HtXS.js} +1 -1
- package/apps/web/dist/assets/{razor-BD2nf1Tj.js → razor-DmUARTT5.js} +1 -1
- package/apps/web/dist/assets/{tsMode-CajpaWj3.js → tsMode-BUABwVTd.js} +1 -1
- package/apps/web/dist/assets/{typescript-CAwp5Hth.js → typescript-sTt0HE01.js} +1 -1
- package/apps/web/dist/assets/{workers-DQDsBekN.js → workers-D6L1Qkzp.js} +1 -1
- package/apps/web/dist/assets/{xml-VeRYpQOb.js → xml-asYBWpFY.js} +1 -1
- package/apps/web/dist/assets/{yaml-gvfBPNHx.js → yaml-DWoILemf.js} +1 -1
- package/apps/web/dist/favicon.svg +4 -4
- package/apps/web/dist/index.html +1 -1
- package/package.json +1 -1
- package/apps/server/dist/doctor-CGNZt_v3.js +0 -1
- package/apps/web/dist/assets/main-BQi_aSBl.js +0 -157
- package/apps/web/dist/assets/main-Dveg9bRJ.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hr as MAX_EDITABLE_FILE_BYTES, rr as FilePathSchema, zn as OriginUrlSchema } from "./inspect-
|
|
1
|
+
import { hr as MAX_EDITABLE_FILE_BYTES, rr as FilePathSchema, zn as OriginUrlSchema } from "./inspect-Dz79med6.js";
|
|
2
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
3
3
|
import { constants, createReadStream, statSync, watch } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1857,7 +1857,7 @@ async function listDirectory(root, input) {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
1859
|
function visibleEntry(entry, relative, directory, options) {
|
|
1860
|
-
return (entry.isFile() || entry.isDirectory()) && !isIgnoredFile(relative, entry.name, options.ignore ?? []) && !options.exclude?.(path.join(directory, entry.name));
|
|
1860
|
+
return (entry.isFile() || entry.isDirectory()) && ((options.includeIgnored ?? false) || !isIgnoredFile(relative, entry.name, options.ignore ?? [])) && !options.exclude?.(path.join(directory, entry.name));
|
|
1861
1861
|
}
|
|
1862
1862
|
function matchRank(query, name, relative) {
|
|
1863
1863
|
if (name === query || relative === query) return 0;
|
package/apps/server/dist/cli.js
CHANGED
|
@@ -288,7 +288,7 @@ async function runLogs(parsed, io) {
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
async function runDoctorCommand(io) {
|
|
291
|
-
const { runDoctor } = await import("./doctor-
|
|
291
|
+
const { runDoctor } = await import("./doctor-BWQ8wPEo.js");
|
|
292
292
|
const report = await runDoctor({ env: io.env });
|
|
293
293
|
io.stdout(`${JSON.stringify(report, null, 2)}\n`);
|
|
294
294
|
return report.checks.some((check) => check.status === "fail") ? 1 : 0;
|
|
@@ -322,23 +322,23 @@ async function runCli(argv, io) {
|
|
|
322
322
|
case "logs": return await runLogs(parsed, io);
|
|
323
323
|
case "doctor": return await runDoctorCommand(io);
|
|
324
324
|
case "start": {
|
|
325
|
-
const { startCommand } = await import("./lifecycle-
|
|
325
|
+
const { startCommand } = await import("./lifecycle-0-9eT-gl.js");
|
|
326
326
|
return await startCommand(io);
|
|
327
327
|
}
|
|
328
328
|
case "stop": {
|
|
329
|
-
const { stopCommand } = await import("./lifecycle-
|
|
329
|
+
const { stopCommand } = await import("./lifecycle-0-9eT-gl.js");
|
|
330
330
|
return await stopCommand(io);
|
|
331
331
|
}
|
|
332
332
|
case "restart": {
|
|
333
|
-
const { restartCommand } = await import("./lifecycle-
|
|
333
|
+
const { restartCommand } = await import("./lifecycle-0-9eT-gl.js");
|
|
334
334
|
return await restartCommand(io);
|
|
335
335
|
}
|
|
336
336
|
case "tui": {
|
|
337
|
-
const { tuiCommand } = await import("./lifecycle-
|
|
337
|
+
const { tuiCommand } = await import("./lifecycle-0-9eT-gl.js");
|
|
338
338
|
return await tuiCommand(io);
|
|
339
339
|
}
|
|
340
340
|
case "unlock": {
|
|
341
|
-
const { unlockCommand } = await import("./unlock-
|
|
341
|
+
const { unlockCommand } = await import("./unlock-ik1568g3.js");
|
|
342
342
|
return await unlockCommand(io, {
|
|
343
343
|
force: parsed.force,
|
|
344
344
|
allowLive: parsed.allowLive,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as IpcError, n as resolveIpcAddress, t as ipcTokenPath } from "./address-
|
|
1
|
+
import { c as IpcError, n as resolveIpcAddress, t as ipcTokenPath } from "./address-B-gPq4hH.js";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { connect } from "node:net";
|
|
4
4
|
// src/ipc/client.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as expectedMigrationCount, i as inspectInstanceLock, l as loadConfig, t as inspectDatabase } from "./inspect-
|
|
1
|
+
import { f as expectedMigrationCount, i as inspectInstanceLock, l as loadConfig, t as inspectDatabase } from "./inspect-Dz79med6.js";
|
|
2
2
|
import { r as resolveDataDir, t as DATA_SUBDIRS } from "./paths-BhVn34MT.js";
|
|
3
3
|
import { n as SUPPORTED_NODE_RANGE, t as SERVER_VERSION } from "./version-ui_X8H2k.js";
|
|
4
4
|
import { constants } from "node:fs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as runDoctor } from "./doctor--QI8obs_.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as canonicalDirectory, A as scanWatchPath, B as searchFiles, C as parseLog, D as snapshotOf, E as scopeStatusToPrefix, F as normalizeFilePath, G as editTextFile, H as DEFAULT_IGNORED, I as readEditableFile, J as listFiles, K as hashContent, L as readRawFile, M as encodeEditableContent, N as fileEntryVersion, O as validateGitPath, P as listDirectory, Q as PathGuardError, R as resolveFilePath, S as parseCommitFiles, T as runGit, U as FileError, V as writeUploadedFile, W as applyPatch, X as searchCode, Y as readTextFile, Z as writeTextFile, _ as errorResponse, _t as OutputRedactor, a as DeviceRevokeParamsSchema, at as stopCommandGroup, b as gitPrefix, c as IpcError, ct as processAlive, d as PairingApproveParamsSchema, dt as terminateProcessTree, et as isInsideRoot, f as PairingDenyParamsSchema, ft as windowsTcpListeners, g as ShutdownParamsSchema, gt as windowsPowerShell, h as SessionRevokeParamsSchema, ht as powerShellEncodedCommand, it as runCommand, j as FileManagerError, k as createDirectoryWatcher, l as LogsTailParamsSchema, lt as processCommandLine, m as RequestEnvelopeSchema, mt as powerShellArguments, n as resolveIpcAddress, o as HelloParamsSchema, ot as resolveWindowsExecutable, p as PairingListParamsSchema, pt as commandEnvironment, q as isIgnoredFile, r as AuditTailParamsSchema, rt as groupAlive, s as InitApplyParamsSchema, st as windowsLaunch, t as ipcTokenPath, tt as resolveInsideRoot, ut as processSnapshot$1, v as ManagedPty, w as parseStatus, x as parseBranches, y as GitError, z as saveEditableFile } from "./address-
|
|
2
|
-
import { $ as secrets, $n as normalizeCommandRequest, $t as DEFAULT_INPUT_TTL_MS, A as deploymentAuthorizations, An as DeploymentTargetRefSchema, At as TerminalInputSchema, B as modelCatalogCache, Bn as deriveWebAuthn, Bt as ProcessIdSchema, Cn as DeploymentAuthorizationContextSchema, Ct as ServiceRegisterInputSchema, D as credentialProfiles, Dn as DeploymentSpecSchema, Dt as TerminalCreateSchema, En as DeploymentSourceSchema, Et as TERMINAL_LEASE_TTL_MS, Fn as ServiceOpsSubscriptionSchema, Ft as TerminalResizeSchema, G as resourceActions, Gn as CommandOutputChunkSchema, Gt as MemoryKeySchema, H as modelProfiles, Ht as ProcessStatusSchema, I as inputRequests, In as hasControlCharacters, It as TerminalSubscriptionSchema, Jn as CommandRequestSchema, Jt as ReadMemoryInputSchema, Kn as CommandOutputQuerySchema, Kt as MemoryKindSchema, L as memories, Ln as AppConfigSchema, Lt as TerminalTakeoverSchema, M as deploymentPlans, Mn as ServiceActionScopeSchema, Mt as TerminalOutputChunkSchema, N as deploymentTargets, Nn as ServiceControlInputSchema, Nt as TerminalPayloadSchema, O as deploymentApprovals, On as DeploymentTargetIdSchema, Ot as TerminalDevSchema, P as deviceRequests, Pn as ServiceOpsEventPayloadSchema, Pt as TerminalRenameSchema, Qn as ShellCommandParamsSchema, Qt as AskUserParamsSchema, R as memoryRevisions, Rn as DEFAULT_APP_CONFIG, S as approvals, Sn as DeploymentArtifactManifestSchema, St as ServiceIdSchema, T as browserSessions, Tn as DeploymentPlanDocumentSchema, Tt as ServiceSubscriptionSchema, U as modelVisibility, Un as CommandCancelSchema, Ut as StartProcessParamsSchema, V as modelDefaults, Vn as COMMAND_OUTPUT_RETENTION_MS, Vt as ProcessOutputQuerySchema, W as projects, Wn as CommandIdSchema, Wt as PlanParamsSchema, X as scheduledJobRuns, Xn as CommandSubscriptionSchema, Xt as ScheduledJobInputSchema, Yn as CommandStatusPayloadSchema, Yt as RememberToolInputSchema, Z as scheduledJobs, Zt as ScheduledJobPatchSchema, _ as setMeta, _n as DEPLOYMENT_ARTIFACT_MAX_BYTES, _r as isAcceptedAttachmentName, _t as FileStreamIdSchema, an as GitActionSchema, ar as FileReadQuerySchema, at as sessionContextSummaries, b as WEB_SEARCH_REGIONS, bn as DEPLOYMENT_BUILD_LOG_MAX_BYTES, br as isSourceViewMime, bt as ResourceEventsQuerySchema, cn as GitCommitParamsSchema, cr as FileSaveSchema, d as appliedMigrationCount, dn as GitRemoteActionRequestSchema, dr as FileUploadResultSchema, dt as webSearchConnections, er as FileActionResultSchema, et as serviceActionAuthorizations, f as expectedMigrationCount, fn as WORKSPACE_JOBS_CHANGED, fr as FileVersionSchema, ft as webauthnChallenges, g as getMeta, gn as DEPLOYMENT_APPROVAL_TTL_MS, gr as MAX_UPLOAD_FILE_BYTES, gt as FileResyncPayloadSchema, h as ensureInstanceId, hn as DEFAULT_PROJECT_ID, ht as FileChangedPayloadSchema, in as GitActionDecisionSchema, ir as FileRawQuerySchema, it as sessionAttachments, j as deploymentBuilds, jn as ServiceActionAuthorizationDtoSchema, jt as TerminalLeaseSchema, k as deploymentArtifacts, kn as DeploymentTargetNameSchema, kt as TerminalIdSchema, l as loadConfig, ln as GitDiffQuerySchema, lr as FileScopeSchema, lt as trustedDevices, m as runMigrations, mn as WORKSPACE_SESSIONS_CHANGED, mr as MAX_DOWNLOAD_FILE_BYTES, mt as newId, nn as InputAnswersSchema, nr as FileListQuerySchema, nt as serviceOpsServices, o as releaseInstanceLock, on as GitBranchesQuerySchema, or as FileResultTargetSchema, ot as sessions, p as findServerRoot, pn as WORKSPACE_MEMORY_CHANGED, pt as webauthnCredentials, q as resourceLocks, qn as CommandParamsSchema, qt as MemoryStatusSchema, r as acquireInstanceLock, rn as MAX_INPUT_TTL_MS, rr as FilePathSchema, rt as services, s as recoverInitialization, sn as GitCommitDiffQuerySchema, sr as FileSaveResultSchema, tr as FileActionSchema, tt as serviceOpsDeployments, un as GitLogQuerySchema, ur as FileSearchQuerySchema, ut as turns, v as MODEL_PROVIDER_IDS, vn as DEPLOYMENT_ARTIFACT_MAX_FILES, vr as isBlockedAttachmentName, vt as FileSubscriptionSchema, w as authSettings, wn as DeploymentAuthorizationScopeSchema, wt as ServiceStatusSchema, x as agentEvents, xn as DEPLOYMENT_PLAN_TTL_MS, xt as ServiceEventPayloadSchema, y as WEB_SEARCH_PROVIDER_IDS, yr as isSecretAttachmentName, yt as RESOURCE_EVENT_RETENTION_MS, z as memorySuppressions, zn as OriginUrlSchema } from "./inspect-
|
|
3
|
-
import { $ as updateOperation, A as getResourceLockRow, B as rootIsQuarantined, C as commandRow, D as operationRow, E as oldCommands, F as rootHasWriter, G as deleteResourceActionsForProject, H as cacheFileVersion, I as updateResourceLockRow, J as insertOperation, K as findOperation, L as clearRootQuarantine, M as insertResourceLockRow, N as releaseResourceLockRow, O as unfinishedCommands, P as renewResourceLockRow, Q as resourceSequence, R as quarantineRoot, S as commandByOperation, T as insertCommand, U as deleteCachedFile, V as appendResourceEvent, W as deleteOperation, X as pruneResourceEvents, Y as pendingOperations, Z as readResourceEvents, _ as terminalByOperation, a as reconciledResultJson, b as updateTerminal, c as isFileOperationKind, d as deleteTerminal, et as immediateTransaction, f as insertTerminal, g as runningTerminalCounts, h as rootHasTerminal, i as lockOwnerIsActive, j as getResourceLockRowById, k as updateCommand, l as activeTerminals, m as oldTerminals, nt as listRecentAudit, o as retainedCount, p as leaseRow, q as getCachedFile, s as settleWriteBarriers, t as collectStatus, tt as appendAudit, u as allTerminals, v as terminalRow, w as deleteCommand, x as activeCommandClient, y as updateLease, z as quarantinedRoots } from "./status-
|
|
1
|
+
import { $ as canonicalDirectory, A as scanWatchPath, B as searchFiles, C as parseLog, D as snapshotOf, E as scopeStatusToPrefix, F as normalizeFilePath, G as editTextFile, H as DEFAULT_IGNORED, I as readEditableFile, J as listFiles, K as hashContent, L as readRawFile, M as encodeEditableContent, N as fileEntryVersion, O as validateGitPath, P as listDirectory, Q as PathGuardError, R as resolveFilePath, S as parseCommitFiles, T as runGit, U as FileError, V as writeUploadedFile, W as applyPatch, X as searchCode, Y as readTextFile, Z as writeTextFile, _ as errorResponse, _t as OutputRedactor, a as DeviceRevokeParamsSchema, at as stopCommandGroup, b as gitPrefix, c as IpcError, ct as processAlive, d as PairingApproveParamsSchema, dt as terminateProcessTree, et as isInsideRoot, f as PairingDenyParamsSchema, ft as windowsTcpListeners, g as ShutdownParamsSchema, gt as windowsPowerShell, h as SessionRevokeParamsSchema, ht as powerShellEncodedCommand, it as runCommand, j as FileManagerError, k as createDirectoryWatcher, l as LogsTailParamsSchema, lt as processCommandLine, m as RequestEnvelopeSchema, mt as powerShellArguments, n as resolveIpcAddress, o as HelloParamsSchema, ot as resolveWindowsExecutable, p as PairingListParamsSchema, pt as commandEnvironment, q as isIgnoredFile, r as AuditTailParamsSchema, rt as groupAlive, s as InitApplyParamsSchema, st as windowsLaunch, t as ipcTokenPath, tt as resolveInsideRoot, ut as processSnapshot$1, v as ManagedPty, w as parseStatus, x as parseBranches, y as GitError, z as saveEditableFile } from "./address-B-gPq4hH.js";
|
|
2
|
+
import { $ as secrets, $n as normalizeCommandRequest, $t as DEFAULT_INPUT_TTL_MS, A as deploymentAuthorizations, An as DeploymentTargetRefSchema, At as TerminalInputSchema, B as modelCatalogCache, Bn as deriveWebAuthn, Bt as ProcessIdSchema, Cn as DeploymentAuthorizationContextSchema, Ct as ServiceRegisterInputSchema, D as credentialProfiles, Dn as DeploymentSpecSchema, Dt as TerminalCreateSchema, En as DeploymentSourceSchema, Et as TERMINAL_LEASE_TTL_MS, Fn as ServiceOpsSubscriptionSchema, Ft as TerminalResizeSchema, G as resourceActions, Gn as CommandOutputChunkSchema, Gt as MemoryKeySchema, H as modelProfiles, Ht as ProcessStatusSchema, I as inputRequests, In as hasControlCharacters, It as TerminalSubscriptionSchema, Jn as CommandRequestSchema, Jt as ReadMemoryInputSchema, Kn as CommandOutputQuerySchema, Kt as MemoryKindSchema, L as memories, Ln as AppConfigSchema, Lt as TerminalTakeoverSchema, M as deploymentPlans, Mn as ServiceActionScopeSchema, Mt as TerminalOutputChunkSchema, N as deploymentTargets, Nn as ServiceControlInputSchema, Nt as TerminalPayloadSchema, O as deploymentApprovals, On as DeploymentTargetIdSchema, Ot as TerminalDevSchema, P as deviceRequests, Pn as ServiceOpsEventPayloadSchema, Pt as TerminalRenameSchema, Qn as ShellCommandParamsSchema, Qt as AskUserParamsSchema, R as memoryRevisions, Rn as DEFAULT_APP_CONFIG, S as approvals, Sn as DeploymentArtifactManifestSchema, St as ServiceIdSchema, T as browserSessions, Tn as DeploymentPlanDocumentSchema, Tt as ServiceSubscriptionSchema, U as modelVisibility, Un as CommandCancelSchema, Ut as StartProcessParamsSchema, V as modelDefaults, Vn as COMMAND_OUTPUT_RETENTION_MS, Vt as ProcessOutputQuerySchema, W as projects, Wn as CommandIdSchema, Wt as PlanParamsSchema, X as scheduledJobRuns, Xn as CommandSubscriptionSchema, Xt as ScheduledJobInputSchema, Yn as CommandStatusPayloadSchema, Yt as RememberToolInputSchema, Z as scheduledJobs, Zt as ScheduledJobPatchSchema, _ as setMeta, _n as DEPLOYMENT_ARTIFACT_MAX_BYTES, _r as isAcceptedAttachmentName, _t as FileStreamIdSchema, an as GitActionSchema, ar as FileReadQuerySchema, at as sessionContextSummaries, b as WEB_SEARCH_REGIONS, bn as DEPLOYMENT_BUILD_LOG_MAX_BYTES, br as isSourceViewMime, bt as ResourceEventsQuerySchema, cn as GitCommitParamsSchema, cr as FileSaveSchema, d as appliedMigrationCount, dn as GitRemoteActionRequestSchema, dr as FileUploadResultSchema, dt as webSearchConnections, er as FileActionResultSchema, et as serviceActionAuthorizations, f as expectedMigrationCount, fn as WORKSPACE_JOBS_CHANGED, fr as FileVersionSchema, ft as webauthnChallenges, g as getMeta, gn as DEPLOYMENT_APPROVAL_TTL_MS, gr as MAX_UPLOAD_FILE_BYTES, gt as FileResyncPayloadSchema, h as ensureInstanceId, hn as DEFAULT_PROJECT_ID, ht as FileChangedPayloadSchema, in as GitActionDecisionSchema, ir as FileRawQuerySchema, it as sessionAttachments, j as deploymentBuilds, jn as ServiceActionAuthorizationDtoSchema, jt as TerminalLeaseSchema, k as deploymentArtifacts, kn as DeploymentTargetNameSchema, kt as TerminalIdSchema, l as loadConfig, ln as GitDiffQuerySchema, lr as FileScopeSchema, lt as trustedDevices, m as runMigrations, mn as WORKSPACE_SESSIONS_CHANGED, mr as MAX_DOWNLOAD_FILE_BYTES, mt as newId, nn as InputAnswersSchema, nr as FileListQuerySchema, nt as serviceOpsServices, o as releaseInstanceLock, on as GitBranchesQuerySchema, or as FileResultTargetSchema, ot as sessions, p as findServerRoot, pn as WORKSPACE_MEMORY_CHANGED, pt as webauthnCredentials, q as resourceLocks, qn as CommandParamsSchema, qt as MemoryStatusSchema, r as acquireInstanceLock, rn as MAX_INPUT_TTL_MS, rr as FilePathSchema, rt as services, s as recoverInitialization, sn as GitCommitDiffQuerySchema, sr as FileSaveResultSchema, tr as FileActionSchema, tt as serviceOpsDeployments, un as GitLogQuerySchema, ur as FileSearchQuerySchema, ut as turns, v as MODEL_PROVIDER_IDS, vn as DEPLOYMENT_ARTIFACT_MAX_FILES, vr as isBlockedAttachmentName, vt as FileSubscriptionSchema, w as authSettings, wn as DeploymentAuthorizationScopeSchema, wt as ServiceStatusSchema, x as agentEvents, xn as DEPLOYMENT_PLAN_TTL_MS, xt as ServiceEventPayloadSchema, y as WEB_SEARCH_PROVIDER_IDS, yr as isSecretAttachmentName, yt as RESOURCE_EVENT_RETENTION_MS, z as memorySuppressions, zn as OriginUrlSchema } from "./inspect-Dz79med6.js";
|
|
3
|
+
import { $ as updateOperation, A as getResourceLockRow, B as rootIsQuarantined, C as commandRow, D as operationRow, E as oldCommands, F as rootHasWriter, G as deleteResourceActionsForProject, H as cacheFileVersion, I as updateResourceLockRow, J as insertOperation, K as findOperation, L as clearRootQuarantine, M as insertResourceLockRow, N as releaseResourceLockRow, O as unfinishedCommands, P as renewResourceLockRow, Q as resourceSequence, R as quarantineRoot, S as commandByOperation, T as insertCommand, U as deleteCachedFile, V as appendResourceEvent, W as deleteOperation, X as pruneResourceEvents, Y as pendingOperations, Z as readResourceEvents, _ as terminalByOperation, a as reconciledResultJson, b as updateTerminal, c as isFileOperationKind, d as deleteTerminal, et as immediateTransaction, f as insertTerminal, g as runningTerminalCounts, h as rootHasTerminal, i as lockOwnerIsActive, j as getResourceLockRowById, k as updateCommand, l as activeTerminals, m as oldTerminals, nt as listRecentAudit, o as retainedCount, p as leaseRow, q as getCachedFile, s as settleWriteBarriers, t as collectStatus, tt as appendAudit, u as allTerminals, v as terminalRow, w as deleteCommand, x as activeCommandClient, y as updateLease, z as quarantinedRoots } from "./status-Bv7nxvzW.js";
|
|
4
4
|
import { t as SERVER_VERSION } from "./version-ui_X8H2k.js";
|
|
5
5
|
import { a as generatePairingCode, n as PAIRING_CODE_TTL_MS, o as generateShortCode, r as PAIRING_REQUEST_TTL_MS, s as normalizePairingCode, t as ENROLLMENT_TTL_MS } from "./code-B2JBoV4x.js";
|
|
6
|
-
import { f as isDevPath, l as HMR_PATH, n as receiveDevWebTarget, o as DevWebTargetSchema, p as permittedPath, t as managedWebFiles, u as NONCE_MARKER } from "./managed-
|
|
7
|
-
import { t as openDatabase } from "./client-
|
|
8
|
-
import { t as runDoctor } from "./doctor
|
|
6
|
+
import { f as isDevPath, l as HMR_PATH, n as receiveDevWebTarget, o as DevWebTargetSchema, p as permittedPath, t as managedWebFiles, u as NONCE_MARKER } from "./managed-FpQ4FjRh.js";
|
|
7
|
+
import { t as openDatabase } from "./client-nSfUt-Xw.js";
|
|
8
|
+
import { t as runDoctor } from "./doctor--QI8obs_.js";
|
|
9
9
|
import { t as findMainLogFile } from "./log-files-CFOaEy6O.js";
|
|
10
10
|
import { n as ensureDataDirs, r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
11
11
|
import { createRequire } from "node:module";
|
|
@@ -8875,6 +8875,7 @@ async function getDirectory(options, scope, input) {
|
|
|
8875
8875
|
await authorizeFileTarget(resolved, input.path);
|
|
8876
8876
|
const result = await listDirectory(resolved.root, {
|
|
8877
8877
|
...input,
|
|
8878
|
+
includeIgnored: input.showIgnored === true,
|
|
8878
8879
|
ignore: resolved.ignore,
|
|
8879
8880
|
exclude: "projectId" in resolved.scope ? (target) => isInsideRoot(resolved.protectedRoot, target) : void 0
|
|
8880
8881
|
});
|
|
@@ -20306,6 +20307,44 @@ function getChallenge(db, id) {
|
|
|
20306
20307
|
function consumeChallenge(db, id, now = Date.now()) {
|
|
20307
20308
|
return db.update(webauthnChallenges).set({ consumedAt: now }).where(and(eq(webauthnChallenges.id, id), isNull(webauthnChallenges.consumedAt))).run().changes > 0;
|
|
20308
20309
|
}
|
|
20310
|
+
// src/webauthn/identity.ts
|
|
20311
|
+
const DISPLAY_LABEL_MAX = 40;
|
|
20312
|
+
const SLUG_MAX = 32;
|
|
20313
|
+
const SUFFIX_LENGTH = 4;
|
|
20314
|
+
const FALLBACK_SLUG = "larness";
|
|
20315
|
+
const FALLBACK_LABEL = "Larness";
|
|
20316
|
+
function sha256Hex(value) {
|
|
20317
|
+
return createHash("sha256").update(value, "utf8").digest("hex");
|
|
20318
|
+
}
|
|
20319
|
+
/** First four hex characters of sha256(instance_id). */
|
|
20320
|
+
function instanceSuffix(instanceId) {
|
|
20321
|
+
return sha256Hex(instanceId).slice(0, SUFFIX_LENGTH);
|
|
20322
|
+
}
|
|
20323
|
+
/**
|
|
20324
|
+
* Folds a normalized hostname into an ASCII slug. Hostnames are already
|
|
20325
|
+
* normalized by `serverHostInfo`; anything else becomes `-` so the name stays
|
|
20326
|
+
* readable in system password managers that dislike punctuation.
|
|
20327
|
+
*/
|
|
20328
|
+
function hostnameSlug(hostname) {
|
|
20329
|
+
const slug = Array.from(hostname).map((character) => /^[a-z0-9]$/i.test(character) ? character.toLowerCase() : "-").join("").replace(/-+/g, "-").replace(/^-+|-+$/g, "").slice(0, SLUG_MAX).replace(/-+$/, "");
|
|
20330
|
+
return slug.length === 0 ? FALLBACK_SLUG : slug;
|
|
20331
|
+
}
|
|
20332
|
+
/**
|
|
20333
|
+
* Derives the WebAuthn user entity for this workspace. The name only affects
|
|
20334
|
+
* what the authenticator displays; authorization still keys off the credential
|
|
20335
|
+
* ID, RP ID and origin.
|
|
20336
|
+
*/
|
|
20337
|
+
function passkeyUserIdentity(input) {
|
|
20338
|
+
const suffix = instanceSuffix(input.instanceId);
|
|
20339
|
+
const label = Array.from(input.hostname).slice(0, DISPLAY_LABEL_MAX).join("").trim() || FALLBACK_LABEL;
|
|
20340
|
+
return {
|
|
20341
|
+
userId: Uint8Array.from(createHash("sha256").update(input.instanceId, "utf8").digest()),
|
|
20342
|
+
userName: `operator@${hostnameSlug(input.hostname)}-${suffix}`,
|
|
20343
|
+
userDisplayName: `Larness · ${label} · ${suffix}`,
|
|
20344
|
+
label,
|
|
20345
|
+
suffix
|
|
20346
|
+
};
|
|
20347
|
+
}
|
|
20309
20348
|
// src/webauthn/service.ts
|
|
20310
20349
|
const CHALLENGE_TTL_MS = 3e5;
|
|
20311
20350
|
var DeviceAdminError = class extends Error {
|
|
@@ -20364,14 +20403,17 @@ async function registrationOptions(options, input) {
|
|
|
20364
20403
|
assertCanonicalOrigin(options.webAuthn, input.origin);
|
|
20365
20404
|
const now = nowOf(options);
|
|
20366
20405
|
const enrollment = requireEnrollment(options, input.enrollmentToken, now);
|
|
20367
|
-
const
|
|
20406
|
+
const identity = passkeyUserIdentity({
|
|
20407
|
+
instanceId: getMeta(options.db, "instance_id") ?? "larness-instance",
|
|
20408
|
+
hostname: serverHostInfo(options.hostname === void 0 ? {} : { hostname: options.hostname }).hostname
|
|
20409
|
+
});
|
|
20368
20410
|
const challenge = generateOpaqueToken();
|
|
20369
20411
|
const optionsJSON = await generateRegistrationOptions({
|
|
20370
20412
|
rpName: options.webAuthn.rpName,
|
|
20371
20413
|
rpID: options.webAuthn.rpId,
|
|
20372
|
-
userID:
|
|
20373
|
-
userName:
|
|
20374
|
-
userDisplayName:
|
|
20414
|
+
userID: identity.userId,
|
|
20415
|
+
userName: identity.userName,
|
|
20416
|
+
userDisplayName: identity.userDisplayName,
|
|
20375
20417
|
attestationType: "none",
|
|
20376
20418
|
authenticatorSelection: {
|
|
20377
20419
|
residentKey: "required",
|
|
@@ -345,7 +345,12 @@ const FileReadQuerySchema = z.union([
|
|
|
345
345
|
const FileListQuerySchema = z.object({
|
|
346
346
|
path: FilePathSchema.default("."),
|
|
347
347
|
limit: z.coerce.number().int().min(1).max(200).default(50),
|
|
348
|
-
cursor: z.string().min(1).max(2048).optional()
|
|
348
|
+
cursor: z.string().min(1).max(2048).optional(),
|
|
349
|
+
/**
|
|
350
|
+
* Web 文件树的「显示忽略项」开关。只影响目录枚举;Agent 工具与快速打开
|
|
351
|
+
* 始终使用默认忽略(specs/140)。
|
|
352
|
+
*/
|
|
353
|
+
showIgnored: z.enum(["true", "false"]).default("false").transform((value) => value === "true")
|
|
349
354
|
}).strict();
|
|
350
355
|
const FileSaveResultSchema = z.object({
|
|
351
356
|
path: z.string(),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as isProcessAlive, i as inspectInstanceLock, p as findServerRoot } from "./inspect-
|
|
2
|
-
import { t as ipcTokenPath } from "./address-
|
|
3
|
-
import { n as connectIpc } from "./client-
|
|
1
|
+
import { a as isProcessAlive, i as inspectInstanceLock, p as findServerRoot } from "./inspect-Dz79med6.js";
|
|
2
|
+
import { t as ipcTokenPath } from "./address-B-gPq4hH.js";
|
|
3
|
+
import { n as connectIpc } from "./client-DmQOZ_VJ.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
|
-
import { t as loadManagedConfig } from "./supervisor-
|
|
5
|
+
import { t as loadManagedConfig } from "./supervisor-eW8XSzXm.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as auditLogs, E as commandExecutions, F as fileVersions, G as resourceActions, J as resourceOperations, K as resourceEvents, T as browserSessions, Y as resourceStreams, ct as terminals, i as inspectInstanceLock, l as loadConfig, mt as newId, q as resourceLocks, st as terminalLeases, t as inspectDatabase, ut as turns } from "./inspect-
|
|
2
|
-
import { ct as processAlive, et as isInsideRoot, rt as groupAlive } from "./address-
|
|
1
|
+
import { C as auditLogs, E as commandExecutions, F as fileVersions, G as resourceActions, J as resourceOperations, K as resourceEvents, T as browserSessions, Y as resourceStreams, ct as terminals, i as inspectInstanceLock, l as loadConfig, mt as newId, q as resourceLocks, st as terminalLeases, t as inspectDatabase, ut as turns } from "./inspect-Dz79med6.js";
|
|
2
|
+
import { ct as processAlive, et as isInsideRoot, rt as groupAlive } from "./address-B-gPq4hH.js";
|
|
3
3
|
import { t as SERVER_VERSION } from "./version-ui_X8H2k.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
5
|
import { t as findMainLogFile } from "./log-files-CFOaEy6O.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as connectIpc } from "./client-
|
|
2
|
-
import { r as inspectBarriersFile, t as collectStatus } from "./status-
|
|
1
|
+
import { n as connectIpc } from "./client-DmQOZ_VJ.js";
|
|
2
|
+
import { r as inspectBarriersFile, t as collectStatus } from "./status-Bv7nxvzW.js";
|
|
3
3
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as completeStatus, n as readBarrierSummary, r as readStatus } from "./status-
|
|
1
|
+
export { t as completeStatus, n as readBarrierSummary, r as readStatus } from "./status-E5SdreUc.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dt as terminateProcessTree } from "./address-
|
|
2
|
-
import { c as configFilePath, l as loadConfig, n as inspectPendingInitialization, p as findServerRoot, u as resolveConfig } from "./inspect-
|
|
3
|
-
import { a as DevWebControl, c as EntryConfigError, d as devWebCache, i as DevWebAttachedSchema, r as waitChildMessage } from "./managed-
|
|
1
|
+
import { dt as terminateProcessTree } from "./address-B-gPq4hH.js";
|
|
2
|
+
import { c as configFilePath, l as loadConfig, n as inspectPendingInitialization, p as findServerRoot, u as resolveConfig } from "./inspect-Dz79med6.js";
|
|
3
|
+
import { a as DevWebControl, c as EntryConfigError, d as devWebCache, i as DevWebAttachedSchema, r as waitChildMessage } from "./managed-FpQ4FjRh.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
package/apps/server/dist/tui.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Bn as deriveWebAuthn, Rn as DEFAULT_APP_CONFIG, i as inspectInstanceLock } from "./inspect-
|
|
2
|
-
import { c as EntryConfigError, s as DevWebUnavailable } from "./managed-
|
|
3
|
-
import { n as connectIpc, t as IpcClientError } from "./client-
|
|
1
|
+
import { Bn as deriveWebAuthn, Rn as DEFAULT_APP_CONFIG, i as inspectInstanceLock } from "./inspect-Dz79med6.js";
|
|
2
|
+
import { c as EntryConfigError, s as DevWebUnavailable } from "./managed-FpQ4FjRh.js";
|
|
3
|
+
import { n as connectIpc, t as IpcClientError } from "./client-DmQOZ_VJ.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
5
|
import { t as SERVER_VERSION } from "./version-ui_X8H2k.js";
|
|
6
|
-
import { s as InitApplyParamsSchema } from "./address-
|
|
6
|
+
import { s as InitApplyParamsSchema } from "./address-B-gPq4hH.js";
|
|
7
7
|
import { i as formatPairingCode } from "./code-B2JBoV4x.js";
|
|
8
|
-
import { n as startManagedRuntime } from "./supervisor-
|
|
8
|
+
import { n as startManagedRuntime } from "./supervisor-eW8XSzXm.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { stripVTControlCharacters } from "node:util";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as inspectInstanceLock } from "./inspect-
|
|
2
|
-
import { t as openDatabase } from "./client-
|
|
3
|
-
import { n as barrierReasonLabel, s as settleWriteBarriers } from "./status-
|
|
1
|
+
import { i as inspectInstanceLock } from "./inspect-Dz79med6.js";
|
|
2
|
+
import { t as openDatabase } from "./client-nSfUt-Xw.js";
|
|
3
|
+
import { n as barrierReasonLabel, s as settleWriteBarriers } from "./status-Bv7nxvzW.js";
|
|
4
4
|
import { r as resolveDataDir } from "./paths-BhVn34MT.js";
|
|
5
|
-
import { n as readBarrierSummary } from "./status-
|
|
5
|
+
import { n as readBarrierSummary } from "./status-E5SdreUc.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
// src/cli/unlock.ts
|
|
8
8
|
function databasePath(dataDir) {
|
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
CREATE TABLE `app_meta` (
|
|
2
|
-
`key` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`value` text NOT NULL,
|
|
4
|
-
`updated_at` integer NOT NULL
|
|
5
|
-
);
|
|
6
|
-
--> statement-breakpoint
|
|
7
|
-
CREATE TABLE `audit_logs` (
|
|
8
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
9
|
-
`client_session_id` text,
|
|
10
|
-
`session_id` text,
|
|
11
|
-
`action` text NOT NULL,
|
|
12
|
-
`resource_type` text,
|
|
13
|
-
`resource_id` text,
|
|
14
|
-
`decision` text,
|
|
15
|
-
`details_json` text DEFAULT '{}' NOT NULL,
|
|
16
|
-
`created_at` integer NOT NULL
|
|
17
|
-
);
|
|
18
|
-
--> statement-breakpoint
|
|
19
|
-
CREATE INDEX `idx_audit_created` ON `audit_logs` (`created_at`);--> statement-breakpoint
|
|
20
|
-
CREATE INDEX `idx_audit_action` ON `audit_logs` (`action`,`created_at`);--> statement-breakpoint
|
|
21
|
-
CREATE TABLE `auth_settings` (
|
|
22
|
-
`id` integer PRIMARY KEY NOT NULL,
|
|
23
|
-
`admin_hash` text NOT NULL,
|
|
24
|
-
`admin_updated_at` integer NOT NULL,
|
|
25
|
-
`initialized_at` integer NOT NULL,
|
|
26
|
-
CONSTRAINT "auth_settings_single_row" CHECK("auth_settings"."id" = 1)
|
|
27
|
-
);
|
|
28
|
-
--> statement-breakpoint
|
|
29
|
-
CREATE TABLE `browser_sessions` (
|
|
30
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
31
|
-
`device_id` text,
|
|
32
|
-
`token_hash` text NOT NULL,
|
|
33
|
-
`kind` text NOT NULL,
|
|
34
|
-
`ip` text,
|
|
35
|
-
`user_agent` text,
|
|
36
|
-
`created_at` integer NOT NULL,
|
|
37
|
-
`last_seen_at` integer NOT NULL,
|
|
38
|
-
`expires_at` integer NOT NULL,
|
|
39
|
-
`revoked_at` integer,
|
|
40
|
-
FOREIGN KEY (`device_id`) REFERENCES `trusted_devices`(`id`) ON UPDATE no action ON DELETE no action
|
|
41
|
-
);
|
|
42
|
-
--> statement-breakpoint
|
|
43
|
-
CREATE UNIQUE INDEX `browser_sessions_token_hash_unique` ON `browser_sessions` (`token_hash`);--> statement-breakpoint
|
|
44
|
-
CREATE INDEX `idx_browser_sessions_device` ON `browser_sessions` (`device_id`);--> statement-breakpoint
|
|
45
|
-
CREATE TABLE `device_requests` (
|
|
46
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
47
|
-
`short_code` text NOT NULL,
|
|
48
|
-
`status` text NOT NULL,
|
|
49
|
-
`decision` text,
|
|
50
|
-
`client_label` text,
|
|
51
|
-
`user_agent` text,
|
|
52
|
-
`ip` text,
|
|
53
|
-
`client_origin` text,
|
|
54
|
-
`poll_token_hash` text NOT NULL,
|
|
55
|
-
`code_hash` text,
|
|
56
|
-
`code_expires_at` integer,
|
|
57
|
-
`attempts` integer DEFAULT 0 NOT NULL,
|
|
58
|
-
`enrollment_token_hash` text,
|
|
59
|
-
`enrollment_expires_at` integer,
|
|
60
|
-
`created_at` integer NOT NULL,
|
|
61
|
-
`expires_at` integer NOT NULL,
|
|
62
|
-
`decided_at` integer,
|
|
63
|
-
`redeemed_at` integer
|
|
64
|
-
);
|
|
65
|
-
--> statement-breakpoint
|
|
66
|
-
CREATE UNIQUE INDEX `device_requests_short_code_unique` ON `device_requests` (`short_code`);--> statement-breakpoint
|
|
67
|
-
CREATE INDEX `idx_device_requests_status` ON `device_requests` (`status`,`expires_at`);--> statement-breakpoint
|
|
68
|
-
CREATE TABLE `trusted_devices` (
|
|
69
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
70
|
-
`label` text NOT NULL,
|
|
71
|
-
`created_by_request_id` text,
|
|
72
|
-
`user_agent` text,
|
|
73
|
-
`created_at` integer NOT NULL,
|
|
74
|
-
`last_seen_at` integer,
|
|
75
|
-
`revoked_at` integer,
|
|
76
|
-
FOREIGN KEY (`created_by_request_id`) REFERENCES `device_requests`(`id`) ON UPDATE no action ON DELETE no action
|
|
77
|
-
);
|
|
78
|
-
--> statement-breakpoint
|
|
79
|
-
CREATE TABLE `webauthn_challenges` (
|
|
80
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
81
|
-
`type` text NOT NULL,
|
|
82
|
-
`challenge` text NOT NULL,
|
|
83
|
-
`request_id` text,
|
|
84
|
-
`device_id` text,
|
|
85
|
-
`created_at` integer NOT NULL,
|
|
86
|
-
`expires_at` integer NOT NULL,
|
|
87
|
-
`consumed_at` integer,
|
|
88
|
-
FOREIGN KEY (`request_id`) REFERENCES `device_requests`(`id`) ON UPDATE no action ON DELETE no action,
|
|
89
|
-
FOREIGN KEY (`device_id`) REFERENCES `trusted_devices`(`id`) ON UPDATE no action ON DELETE no action
|
|
90
|
-
);
|
|
91
|
-
--> statement-breakpoint
|
|
92
|
-
CREATE INDEX `idx_webauthn_challenges_expiry` ON `webauthn_challenges` (`expires_at`);--> statement-breakpoint
|
|
93
|
-
CREATE TABLE `webauthn_credentials` (
|
|
94
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
95
|
-
`device_id` text NOT NULL,
|
|
96
|
-
`credential_id` text NOT NULL,
|
|
97
|
-
`public_key` text NOT NULL,
|
|
98
|
-
`counter` integer DEFAULT 0 NOT NULL,
|
|
99
|
-
`transports_json` text DEFAULT '[]' NOT NULL,
|
|
100
|
-
`aaguid` text,
|
|
101
|
-
`backup_eligible` integer DEFAULT false NOT NULL,
|
|
102
|
-
`backup_state` integer DEFAULT false NOT NULL,
|
|
103
|
-
`created_at` integer NOT NULL,
|
|
104
|
-
`last_used_at` integer,
|
|
105
|
-
`revoked_at` integer,
|
|
106
|
-
FOREIGN KEY (`device_id`) REFERENCES `trusted_devices`(`id`) ON UPDATE no action ON DELETE no action
|
|
107
|
-
);
|
|
108
|
-
--> statement-breakpoint
|
|
109
|
-
CREATE UNIQUE INDEX `webauthn_credentials_credential_id_unique` ON `webauthn_credentials` (`credential_id`);--> statement-breakpoint
|
|
1
|
+
CREATE TABLE `app_meta` (
|
|
2
|
+
`key` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`value` text NOT NULL,
|
|
4
|
+
`updated_at` integer NOT NULL
|
|
5
|
+
);
|
|
6
|
+
--> statement-breakpoint
|
|
7
|
+
CREATE TABLE `audit_logs` (
|
|
8
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
9
|
+
`client_session_id` text,
|
|
10
|
+
`session_id` text,
|
|
11
|
+
`action` text NOT NULL,
|
|
12
|
+
`resource_type` text,
|
|
13
|
+
`resource_id` text,
|
|
14
|
+
`decision` text,
|
|
15
|
+
`details_json` text DEFAULT '{}' NOT NULL,
|
|
16
|
+
`created_at` integer NOT NULL
|
|
17
|
+
);
|
|
18
|
+
--> statement-breakpoint
|
|
19
|
+
CREATE INDEX `idx_audit_created` ON `audit_logs` (`created_at`);--> statement-breakpoint
|
|
20
|
+
CREATE INDEX `idx_audit_action` ON `audit_logs` (`action`,`created_at`);--> statement-breakpoint
|
|
21
|
+
CREATE TABLE `auth_settings` (
|
|
22
|
+
`id` integer PRIMARY KEY NOT NULL,
|
|
23
|
+
`admin_hash` text NOT NULL,
|
|
24
|
+
`admin_updated_at` integer NOT NULL,
|
|
25
|
+
`initialized_at` integer NOT NULL,
|
|
26
|
+
CONSTRAINT "auth_settings_single_row" CHECK("auth_settings"."id" = 1)
|
|
27
|
+
);
|
|
28
|
+
--> statement-breakpoint
|
|
29
|
+
CREATE TABLE `browser_sessions` (
|
|
30
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
31
|
+
`device_id` text,
|
|
32
|
+
`token_hash` text NOT NULL,
|
|
33
|
+
`kind` text NOT NULL,
|
|
34
|
+
`ip` text,
|
|
35
|
+
`user_agent` text,
|
|
36
|
+
`created_at` integer NOT NULL,
|
|
37
|
+
`last_seen_at` integer NOT NULL,
|
|
38
|
+
`expires_at` integer NOT NULL,
|
|
39
|
+
`revoked_at` integer,
|
|
40
|
+
FOREIGN KEY (`device_id`) REFERENCES `trusted_devices`(`id`) ON UPDATE no action ON DELETE no action
|
|
41
|
+
);
|
|
42
|
+
--> statement-breakpoint
|
|
43
|
+
CREATE UNIQUE INDEX `browser_sessions_token_hash_unique` ON `browser_sessions` (`token_hash`);--> statement-breakpoint
|
|
44
|
+
CREATE INDEX `idx_browser_sessions_device` ON `browser_sessions` (`device_id`);--> statement-breakpoint
|
|
45
|
+
CREATE TABLE `device_requests` (
|
|
46
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
47
|
+
`short_code` text NOT NULL,
|
|
48
|
+
`status` text NOT NULL,
|
|
49
|
+
`decision` text,
|
|
50
|
+
`client_label` text,
|
|
51
|
+
`user_agent` text,
|
|
52
|
+
`ip` text,
|
|
53
|
+
`client_origin` text,
|
|
54
|
+
`poll_token_hash` text NOT NULL,
|
|
55
|
+
`code_hash` text,
|
|
56
|
+
`code_expires_at` integer,
|
|
57
|
+
`attempts` integer DEFAULT 0 NOT NULL,
|
|
58
|
+
`enrollment_token_hash` text,
|
|
59
|
+
`enrollment_expires_at` integer,
|
|
60
|
+
`created_at` integer NOT NULL,
|
|
61
|
+
`expires_at` integer NOT NULL,
|
|
62
|
+
`decided_at` integer,
|
|
63
|
+
`redeemed_at` integer
|
|
64
|
+
);
|
|
65
|
+
--> statement-breakpoint
|
|
66
|
+
CREATE UNIQUE INDEX `device_requests_short_code_unique` ON `device_requests` (`short_code`);--> statement-breakpoint
|
|
67
|
+
CREATE INDEX `idx_device_requests_status` ON `device_requests` (`status`,`expires_at`);--> statement-breakpoint
|
|
68
|
+
CREATE TABLE `trusted_devices` (
|
|
69
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
70
|
+
`label` text NOT NULL,
|
|
71
|
+
`created_by_request_id` text,
|
|
72
|
+
`user_agent` text,
|
|
73
|
+
`created_at` integer NOT NULL,
|
|
74
|
+
`last_seen_at` integer,
|
|
75
|
+
`revoked_at` integer,
|
|
76
|
+
FOREIGN KEY (`created_by_request_id`) REFERENCES `device_requests`(`id`) ON UPDATE no action ON DELETE no action
|
|
77
|
+
);
|
|
78
|
+
--> statement-breakpoint
|
|
79
|
+
CREATE TABLE `webauthn_challenges` (
|
|
80
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
81
|
+
`type` text NOT NULL,
|
|
82
|
+
`challenge` text NOT NULL,
|
|
83
|
+
`request_id` text,
|
|
84
|
+
`device_id` text,
|
|
85
|
+
`created_at` integer NOT NULL,
|
|
86
|
+
`expires_at` integer NOT NULL,
|
|
87
|
+
`consumed_at` integer,
|
|
88
|
+
FOREIGN KEY (`request_id`) REFERENCES `device_requests`(`id`) ON UPDATE no action ON DELETE no action,
|
|
89
|
+
FOREIGN KEY (`device_id`) REFERENCES `trusted_devices`(`id`) ON UPDATE no action ON DELETE no action
|
|
90
|
+
);
|
|
91
|
+
--> statement-breakpoint
|
|
92
|
+
CREATE INDEX `idx_webauthn_challenges_expiry` ON `webauthn_challenges` (`expires_at`);--> statement-breakpoint
|
|
93
|
+
CREATE TABLE `webauthn_credentials` (
|
|
94
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
95
|
+
`device_id` text NOT NULL,
|
|
96
|
+
`credential_id` text NOT NULL,
|
|
97
|
+
`public_key` text NOT NULL,
|
|
98
|
+
`counter` integer DEFAULT 0 NOT NULL,
|
|
99
|
+
`transports_json` text DEFAULT '[]' NOT NULL,
|
|
100
|
+
`aaguid` text,
|
|
101
|
+
`backup_eligible` integer DEFAULT false NOT NULL,
|
|
102
|
+
`backup_state` integer DEFAULT false NOT NULL,
|
|
103
|
+
`created_at` integer NOT NULL,
|
|
104
|
+
`last_used_at` integer,
|
|
105
|
+
`revoked_at` integer,
|
|
106
|
+
FOREIGN KEY (`device_id`) REFERENCES `trusted_devices`(`id`) ON UPDATE no action ON DELETE no action
|
|
107
|
+
);
|
|
108
|
+
--> statement-breakpoint
|
|
109
|
+
CREATE UNIQUE INDEX `webauthn_credentials_credential_id_unique` ON `webauthn_credentials` (`credential_id`);--> statement-breakpoint
|
|
110
110
|
CREATE INDEX `idx_webauthn_credentials_device` ON `webauthn_credentials` (`device_id`);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
CREATE TABLE `projects` (
|
|
2
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`name` text NOT NULL,
|
|
4
|
-
`root_path` text NOT NULL,
|
|
5
|
-
`real_path` text NOT NULL,
|
|
6
|
-
`settings_json` text DEFAULT '{}' NOT NULL,
|
|
7
|
-
`git_detected` integer DEFAULT false NOT NULL,
|
|
8
|
-
`created_at` integer NOT NULL,
|
|
9
|
-
`updated_at` integer NOT NULL
|
|
10
|
-
);
|
|
11
|
-
--> statement-breakpoint
|
|
12
|
-
CREATE UNIQUE INDEX `projects_real_path_unique` ON `projects` (`real_path`);--> statement-breakpoint
|
|
1
|
+
CREATE TABLE `projects` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`name` text NOT NULL,
|
|
4
|
+
`root_path` text NOT NULL,
|
|
5
|
+
`real_path` text NOT NULL,
|
|
6
|
+
`settings_json` text DEFAULT '{}' NOT NULL,
|
|
7
|
+
`git_detected` integer DEFAULT false NOT NULL,
|
|
8
|
+
`created_at` integer NOT NULL,
|
|
9
|
+
`updated_at` integer NOT NULL
|
|
10
|
+
);
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
CREATE UNIQUE INDEX `projects_real_path_unique` ON `projects` (`real_path`);--> statement-breakpoint
|
|
13
13
|
CREATE INDEX `idx_projects_updated` ON `projects` (`updated_at`);
|