@vite-hub/workspace 0.0.3 → 0.1.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/LICENSE +201 -0
- package/README.md +236 -58
- package/dist/{ai-nmHdzjCM.d.ts → ai-BW2ZhizI.d.ts} +22 -7
- package/dist/{ai-Ce3PtWFW.js → ai-BZyLwULx.js} +147 -66
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +1 -1
- package/dist/{asset-registry-CaG9b7tf.js → asset-registry-DfBV5kmw.js} +3 -2
- package/dist/association-Cm0dUTDU-CDDhJnIh-Cv3bWnVb.js +19 -0
- package/dist/blob-database.d.ts +521 -0
- package/dist/blob-database.js +601 -0
- package/dist/cloudflare.d.ts +5 -6
- package/dist/cloudflare.js +1 -1
- package/dist/config-B7dmzDX3.js +1112 -0
- package/dist/{config-3I1BnsdO.d.ts → config-DLKdaFWN.d.ts} +1 -2
- package/dist/error-diagnostics-A_8Kp-48.js +116 -0
- package/dist/error-diagnostics-DY5GP47p.js +96 -0
- package/dist/events-7EBoeIPd-A2RUkJi5-BxrICQ17.js +354 -0
- package/dist/events-CRaLy7U3-3PNNp5WZ-Gv9nd0cH.js +214 -0
- package/dist/events-CeChclTf-CX-gD8oy-4aL2j6V-.js +527 -0
- package/dist/feed-DsC7Vws1-M_de2nSK-tKc0Pwo8.js +248 -0
- package/dist/feed-Dyf730Ys-D0HgBba6-BUnCa5gS.js +179 -0
- package/dist/file-C0_aPWSS.js +26 -0
- package/dist/file-metadata-CxDy-E2H.js +58 -0
- package/dist/{files-QRV55OCx.js → files-C7Px8uaC.js} +21 -10
- package/dist/forgejo-BN8ItCfl-Bbn4vhDd.js +2278 -0
- package/dist/{github-CfA5vpJ5.js → github-CPxHtFB7.js} +36 -34
- package/dist/github-DtncTfmv-Du2S8lGF.js +4159 -0
- package/dist/gitlab-BoDm8-BC-xzZsW9eW.js +2530 -0
- package/dist/glob--XcLlcml.js +22 -0
- package/dist/glob--kNYDbfU.js +30 -0
- package/dist/graphql-DG5aJBT3-DceyFYdM-C4saqX37.js +489 -0
- package/dist/host-CFnrTXTK.js +1086 -0
- package/dist/{hosted-C1-tTTTf.js → hosted-acMA5XyL.js} +216 -43
- package/dist/hosted-vercel-blob-DKntsHaf.js +12603 -0
- package/dist/hosted-vercel-blob.d.ts +5 -6
- package/dist/hosted-vercel-blob.js +1 -1
- package/dist/hosted.d.ts +6 -7
- package/dist/hosted.js +1 -1
- package/dist/index.d.ts +76 -64
- package/dist/index.js +162 -457
- package/dist/inspect-BoObD2cJ.js +167 -0
- package/dist/internal/path.d.ts +2 -0
- package/dist/internal/path.js +2 -0
- package/dist/lifecycle-BwZ7c9hb.js +596 -0
- package/dist/loader.d.ts +5 -6
- package/dist/loader.js +3 -2
- package/dist/mcp-resources-BREFCmtn.js +39 -0
- package/dist/memory-BbwOqDXl.js +248 -0
- package/dist/metadata-target-DZEZQGHA.js +1588 -0
- package/dist/mountx.d.ts +4 -6
- package/dist/mountx.js +10 -8
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +1 -1
- package/dist/nuxt.d.ts +13 -12
- package/dist/nuxt.js +10 -8
- package/dist/operations-BcpWr41m.js +159 -0
- package/dist/operations-CGqY1XeG.js +965 -0
- package/dist/operations-DnOwKsJT.d.ts +136 -0
- package/dist/operations.d.ts +53 -0
- package/dist/operations.js +2 -0
- package/dist/{path-CNI6wKIU.js → path-CNAwN7pw.js} +34 -35
- package/dist/path-DrSIenjj.js +59 -0
- package/dist/path-zHxQUbqa.d.ts +9 -0
- package/dist/plugins-DqQ8b4T5.d.ts +10 -0
- package/dist/provider-kXjfli9u.js +1457 -0
- package/dist/providers/github/store.d.ts +3 -5
- package/dist/providers/github/store.js +1 -1
- package/dist/registry-Bp-8UUfG.js +129 -0
- package/dist/{registry-BIQVCBWI.d.ts → registry-Cg1TJVVZ.d.ts} +3 -4
- package/dist/{request-execution-u9mgUXKX.js → request-execution-Dk9rY-Yh.js} +24 -20
- package/dist/rolldown-runtime-B4iAMlE-.js +35 -0
- package/dist/runtime/assets.d.ts +3 -5
- package/dist/runtime/assets.js +9 -6
- package/dist/runtime/empty-assets-registry.d.ts +1 -2
- package/dist/runtime/empty-registry.d.ts +1 -2
- package/dist/runtime/state.d.ts +4 -4
- package/dist/runtime/state.js +10 -7
- package/dist/runtime/workspace.d.ts +1 -1
- package/dist/runtime/workspace.js +1 -1
- package/dist/runtime.d.ts +84 -15
- package/dist/runtime.js +561 -108
- package/dist/{search-C4REyHj9.js → search-CrTmXj5h.js} +10 -9
- package/dist/server-BNQ-Nbjj.js +290 -0
- package/dist/server.d.ts +22 -34
- package/dist/server.js +2 -355
- package/dist/shared-DalXdP0i.js +2158 -0
- package/dist/source-metadata.d.ts +7 -1
- package/dist/source-metadata.js +34 -2
- package/dist/{state-TTqa3x3Y.d.ts → state-B8zbLi5t.d.ts} +14 -13
- package/dist/store-CXgmu-uw.js +1729 -0
- package/dist/{sync-DiuDmSGk.js → sync-CN6ec-5M.js} +62 -41
- package/dist/templates-Bn8a-pd2-D9DhJEVD-CBfXNRzz.js +125 -0
- package/dist/test.d.ts +1 -1
- package/dist/test.js +1 -1
- package/dist/token-CO62GglH.js +61 -0
- package/dist/{types-60Yn149G.d.ts → types-DeK9GIxy.d.ts} +348 -49
- package/dist/{use-CsV3oIxH.js → use-BQj7nSz6.js} +200 -45
- package/dist/{use-CUFSnFCS.d.ts → use-DhwhbAVV.d.ts} +34 -12
- package/dist/utils-Blrh4N2n.js +545 -0
- package/dist/vite-BEvgU2GY.js +20909 -0
- package/dist/vite-CcZmMQ7S.d.ts +476 -0
- package/dist/vite.d.ts +2 -50
- package/dist/vite.js +2 -2
- package/dist/webhooks-DgHwxxYz-D1V2LOr1-azofFOiP.js +1565 -0
- package/dist/workspace-6pxkOuxr.js +1286 -0
- package/dist/workspace-BWJQBK1u.d.ts +7 -0
- package/package.json +90 -59
- package/dist/chunk-8H4AJuhK.js +0 -14
- package/dist/collections/client.d.ts +0 -39
- package/dist/collections/client.js +0 -137
- package/dist/collections.d.ts +0 -59
- package/dist/collections.js +0 -159
- package/dist/config-CDoyls2X.js +0 -30
- package/dist/config-CZLO0m9h.js +0 -7811
- package/dist/file-CHfsZpso.js +0 -23
- package/dist/glob-D0vD_wRY.js +0 -17
- package/dist/host-CAnbugpI.js +0 -370
- package/dist/hosted-vercel-blob-CWBILDVo.js +0 -257
- package/dist/lifecycle-BYoa9hVb.js +0 -176
- package/dist/provider-C3_elpEh.js +0 -599
- package/dist/publish.d.ts +0 -35
- package/dist/publish.js +0 -112
- package/dist/registry-CqyDTW9Y.js +0 -74
- package/dist/runtime-options-BsPSv5O7.js +0 -13
- package/dist/shared-jfogBrd5.js +0 -273
- package/dist/store-Bs1SLh55.js +0 -414
- package/dist/vite-tbfDxtlu.js +0 -2191
- package/dist/workspace-66SKyiec.d.ts +0 -6
- package/dist/workspace-C4k92Ow8.js +0 -1460
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { v as ResolvedWorkspaceModuleOptions, w as VercelBlobWorkspaceStoreOptions } from "./types-
|
|
2
|
-
|
|
1
|
+
import { v as ResolvedWorkspaceModuleOptions, w as VercelBlobWorkspaceStoreOptions } from "./types-DeK9GIxy.js";
|
|
3
2
|
//#region src/hosted-vercel-blob.d.ts
|
|
4
|
-
interface HostedVercelBlobWorkspaceRuntimeOptions {
|
|
3
|
+
export interface HostedVercelBlobWorkspaceRuntimeOptions {
|
|
5
4
|
assets?: boolean | string[];
|
|
6
5
|
env?: Record<string, string | undefined>;
|
|
7
6
|
root?: string;
|
|
@@ -9,7 +8,7 @@ interface HostedVercelBlobWorkspaceRuntimeOptions {
|
|
|
9
8
|
provider: "vercel-blob";
|
|
10
9
|
};
|
|
11
10
|
}
|
|
12
|
-
declare function installHostedVercelBlobWorkspaceRuntime(): void;
|
|
13
|
-
declare function configureHostedVercelBlobWorkspaceRuntime(options?: HostedVercelBlobWorkspaceRuntimeOptions): ResolvedWorkspaceModuleOptions;
|
|
11
|
+
export declare function installHostedVercelBlobWorkspaceRuntime(): void;
|
|
12
|
+
export declare function configureHostedVercelBlobWorkspaceRuntime(options?: HostedVercelBlobWorkspaceRuntimeOptions): ResolvedWorkspaceModuleOptions;
|
|
14
13
|
//#endregion
|
|
15
|
-
export {
|
|
14
|
+
export type { VercelBlobWorkspaceStoreOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as installHostedVercelBlobWorkspaceRuntime, t as configureHostedVercelBlobWorkspaceRuntime } from "./hosted-vercel-blob-
|
|
1
|
+
import { n as installHostedVercelBlobWorkspaceRuntime, t as configureHostedVercelBlobWorkspaceRuntime } from "./hosted-vercel-blob-DKntsHaf.js";
|
|
2
2
|
export { configureHostedVercelBlobWorkspaceRuntime, installHostedVercelBlobWorkspaceRuntime };
|
package/dist/hosted.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { s as GitHubWorkspaceStoreOptions, t as CloudflareArtifactsWorkspaceStoreOptions, v as ResolvedWorkspaceModuleOptions, w as VercelBlobWorkspaceStoreOptions } from "./types-DeK9GIxy.js";
|
|
3
2
|
//#region src/hosted.d.ts
|
|
4
|
-
type HostedWorkspaceRuntimeStoreOptions = Partial<CloudflareArtifactsWorkspaceStoreOptions> | (Partial<GitHubWorkspaceStoreOptions> & {
|
|
3
|
+
export type HostedWorkspaceRuntimeStoreOptions = Partial<CloudflareArtifactsWorkspaceStoreOptions> | (Partial<GitHubWorkspaceStoreOptions> & {
|
|
5
4
|
provider: "github";
|
|
6
5
|
}) | (Partial<VercelBlobWorkspaceStoreOptions> & {
|
|
7
6
|
provider: "vercel-blob";
|
|
8
7
|
});
|
|
9
|
-
interface HostedWorkspaceRuntimeOptions {
|
|
8
|
+
export interface HostedWorkspaceRuntimeOptions {
|
|
10
9
|
assets?: boolean | string[];
|
|
11
10
|
env?: Record<string, string | undefined>;
|
|
12
11
|
root?: string;
|
|
13
12
|
store?: HostedWorkspaceRuntimeStoreOptions;
|
|
14
13
|
}
|
|
15
|
-
declare function installHostedWorkspaceRuntime(): void;
|
|
16
|
-
declare function configureHostedWorkspaceRuntime(options?: HostedWorkspaceRuntimeOptions): ResolvedWorkspaceModuleOptions;
|
|
14
|
+
export declare function installHostedWorkspaceRuntime(): void;
|
|
15
|
+
export declare function configureHostedWorkspaceRuntime(options?: HostedWorkspaceRuntimeOptions): ResolvedWorkspaceModuleOptions;
|
|
17
16
|
//#endregion
|
|
18
|
-
export {
|
|
17
|
+
export type { CloudflareArtifactsWorkspaceStoreOptions, GitHubWorkspaceStoreOptions, VercelBlobWorkspaceStoreOptions };
|
package/dist/hosted.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as installHostedWorkspaceRuntime, t as configureHostedWorkspaceRuntime } from "./hosted-
|
|
1
|
+
import { n as installHostedWorkspaceRuntime, t as configureHostedWorkspaceRuntime } from "./hosted-acMA5XyL.js";
|
|
2
2
|
export { configureHostedWorkspaceRuntime, installHostedWorkspaceRuntime };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as WorkspaceReadOperations, c as WorkspaceToolOptions, d as WorkspaceWriteToolMap, f as createWorkspaceTools, i as WorkspacePathResult, l as WorkspaceTools, n as ShellEnabled, o as WorkspaceShellResult, r as WorkspaceMoveResult, s as WorkspaceToolOperations, t as EnabledReadCapability, u as WorkspaceWriteOperations } from "./ai-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
1
|
+
import { $ as WorkspaceHistoryFilesCommitOptions, $t as WorkspaceSourceMount, A as WorkspaceCacheOptions, An as WorkspaceWriteHook, At as WorkspaceRevision, B as WorkspaceFetchSourceInput, Bt as WorkspaceSessionHostFileEntry, C as SourceContextWorkspaceFiles, Cn as WorkspaceStoreOptions, Ct as WorkspaceNameMap, D as WorkspaceAssets, Dn as WorkspaceSyncSnapshotOptions, Dt as WorkspacePullRequest, E as WorkspaceAssetPath, En as WorkspaceSyncResultDetails, Et as WorkspacePrepareSessionProgressEvent, F as WorkspaceDefinition, Fn as WorkspaceWriteValidatorResult, Ft as WorkspaceSearchHit, G as WorkspaceGlobSourceInput, Gt as WorkspaceSource, H as WorkspaceFile, Ht as WorkspaceSessionOptions, I as WorkspaceDefinitionInput, In as WriteFileOptions, It as WorkspaceSearchQuery, J as WorkspaceHistoryCommitBase, Jt as WorkspaceSourceInput, K as WorkspaceHistoryChanges, Kt as WorkspaceSourceBindingInput, L as WorkspaceDiff, Lt as WorkspaceSelectedScope, M as WorkspaceContent, Mn as WorkspaceWriteMode, Mt as WorkspaceRule, N as WorkspaceContentStream, Nn as WorkspaceWriteOperation, Nt as WorkspaceRules, O as WorkspaceAssetsRegistry, On as WorkspaceValidateMode, Ot as WorkspaceRebaseOptions, P as WorkspaceCustomSourceInput, Pn as WorkspaceWriteValidator, Pt as WorkspaceScopeName, Q as WorkspaceHistoryFileInput, Qt as WorkspaceSourceMaterializationStatus, R as WorkspaceDiffEntry, Rt as WorkspaceSession, S as SourceContext, Sn as WorkspaceStoreHistoryCommitOptions, St as WorkspaceName, T as Workspace, Tn as WorkspaceSyncOptions, Tt as WorkspacePlugin, U as WorkspaceFileSourceInput, Ut as WorkspaceSessionWriteFileOptions, V as WorkspaceFetchSourceRequestOptions, Vt as WorkspaceSessionHostFiles, W as WorkspaceGitHubSourceInput, Wt as WorkspaceSnapshot, X as WorkspaceHistoryExtensions, Xt as WorkspaceSourceMaterializationCounts, Y as WorkspaceHistoryCommitOptions, Yt as WorkspaceSourceItem, Z as WorkspaceHistoryFile, Zt as WorkspaceSourceMaterializationPathResult, _ as ReadFileResult, _n as WorkspaceSourceSyncResult, _t as WorkspaceMergeConflict, a as GitHubWorkspaceOption, an as WorkspaceSourceRequestMethod, at as WorkspaceHookContext, b as RmOptions, bn as WorkspaceStore, bt as WorkspaceMergeResolution, c as GlobOptions, cn as WorkspaceSourceResolutionContextValueReader, ct as WorkspaceInstructionBindingValue, d as LocalWorkspaceStoreOptions, dn as WorkspaceSourceResolver, dt as WorkspaceMaterializeMode, en as WorkspaceSourceMountOptions, et as WorkspaceHistoryListOptions, f as Logger, fn as WorkspaceSourceSelection, ft as WorkspaceMaterializeSourcesOptions, g as ReadFileOptions, gn as WorkspaceSourceSyncPolicy, gt as WorkspaceMergeCommit, h as MkdirOptions, hn as WorkspaceSourceSyncPathResult, ht as WorkspaceMcpResourcesSourceInput, i as ExecResult, in as WorkspaceSourceRequestExecutor, it as WorkspaceHistoryRefOptions, j as WorkspaceCapabilities, jn as WorkspaceWriteInput, jt as WorkspaceRevisionView, k as WorkspaceAutoCommitPlan, kn as WorkspaceWriteErrorHook, kt as WorkspaceRetainedHistory, l as ListOptions, ln as WorkspaceSourceResolutionInvocation, lt as WorkspaceLoader, m as MemoryWorkspaceStoreOptions, mn as WorkspaceSourceSyncCounts, mt as WorkspaceMaterializeSourcesResult, n as DiffOptions, nn as WorkspaceSourceRequestExecutionInput, nt as WorkspaceHistoryReader, o as GitHubWorkspaceRefs, on as WorkspaceSourceResolutionContext, ot as WorkspaceHooks, p as MaybePromise, pn as WorkspaceSourceSyncConfig, pt as WorkspaceMaterializeSourcesProgressEvent, q as WorkspaceHistoryChangesCommitOptions, qt as WorkspaceSourceDefinition, r as ExecOptions, rn as WorkspaceSourceRequestExecutionResult, rt as WorkspaceHistoryRef, s as GitHubWorkspaceStoreOptions, sn as WorkspaceSourceResolutionContextMap, st as WorkspaceInstructionBinding, t as CloudflareArtifactsWorkspaceStoreOptions, tn as WorkspaceSourceRequestDescriptor, tt as WorkspaceHistoryListResult, u as LoaderContext, un as WorkspaceSourceResolutionResult, ut as WorkspaceLoaderSource, v as ResolvedWorkspaceModuleOptions, vn as WorkspaceSourceSyncStatus, vt as WorkspaceMergeConflictContext, w as VercelBlobWorkspaceStoreOptions, wn as WorkspaceStreamFile, wt as WorkspaceOpenPullRequestOptions, x as SnapshotOptions, xn as WorkspaceStoreHistory, xt as WorkspaceModuleOptions, y as ResolvedWorkspaceRule, yn as WorkspaceStat, yt as WorkspaceMergeOptions, z as WorkspaceEntry, zt as WorkspaceSessionHost } from "./types-DeK9GIxy.js";
|
|
2
|
+
import { a as WorkspaceReadOperations, c as WorkspaceToolOptions, d as WorkspaceWriteToolMap, f as createWorkspaceTools, i as WorkspacePathResult, l as WorkspaceTools, n as ShellEnabled, o as WorkspaceShellResult, r as WorkspaceMoveResult, s as WorkspaceToolOperations, t as EnabledReadCapability, u as WorkspaceWriteOperations } from "./ai-BW2ZhizI.js";
|
|
3
|
+
import { t as createWorkspace } from "./workspace-BWJQBK1u.js";
|
|
4
|
+
import { _ as useWorkspace, a as ReadonlyWorkspaceFs, c as WorkspaceFacadeToolOptions, d as WorkspaceReadTools, f as WorkspaceWriteToolSet, g as WritableWorkspaceFs, h as WritableWorkspaceFacadeToolOptions, i as ReadonlyWorkspaceFacade, l as WorkspaceHistory, m as WritableWorkspaceFacade, n as HistoryCheckpoint, o as UseWorkspaceOptions, p as WorkspaceWriteTools, r as HistoryCheckpointOptions, s as WorkspaceFacade, t as History, u as WorkspaceReadToolSet } from "./use-DhwhbAVV.js";
|
|
5
|
+
import { n as normalizeSafeWorkspacePath } from "./path-zHxQUbqa.js";
|
|
6
|
+
import { r as resolveRegisteredWorkspaceDefinition } from "./registry-Cg1TJVVZ.js";
|
|
7
|
+
import { t as invalidateWorkspaceStore } from "./state-B8zbLi5t.js";
|
|
8
|
+
import { t as registerWorkspacePlugin } from "./plugins-DqQ8b4T5.js";
|
|
6
9
|
import { ViteHubError } from "@vite-hub/runtime";
|
|
7
|
-
import {
|
|
8
|
-
|
|
10
|
+
import { ArrayCollectionOptions, ArrayCollectionQuery, ArrayCollectionQueryInput, ProviderCollectionSource, sourceIgnores } from "@vite-hub/source";
|
|
11
|
+
import { FileSourceOptions as FileSourceOptions$1 } from "@vite-hub/source/file";
|
|
12
|
+
import { GitHubSourceOptions as GitHubSourceOptions$1 } from "@vite-hub/source/github";
|
|
13
|
+
import { GlobSourceOptions as GlobSourceOptions$1 } from "@vite-hub/source/glob";
|
|
14
|
+
import { McpResourceContent, McpResourceDescriptor, McpResourcesClient, McpResourcesClientConfig, McpResourcesRequestOptions, McpResourcesServer, McpResourcesSourceOptions as McpResourcesSourceOptions$1 } from "@vite-hub/source/mcp";
|
|
15
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
9
16
|
//#region src/core/define.d.ts
|
|
10
|
-
declare function defineWorkspace(definition: WorkspaceDefinitionInput): WorkspaceDefinitionInput;
|
|
17
|
+
export declare function defineWorkspace(definition: WorkspaceDefinitionInput): WorkspaceDefinitionInput;
|
|
11
18
|
//#endregion
|
|
12
19
|
//#region src/sources/runtime-options.d.ts
|
|
13
20
|
type ExactOptions$1<TInput, TShape> = TInput & Record<Exclude<keyof TInput, keyof TShape>, never>;
|
|
@@ -21,14 +28,14 @@ type CustomWorkspaceSourceFile = Omit<WorkspaceSourceItem, "content" | "contentS
|
|
|
21
28
|
type CustomWorkspaceSourceFiles = WorkspaceSourceRuntimeOptions & Pick<WorkspaceSource, "probeKeys"> & {
|
|
22
29
|
files: readonly CustomWorkspaceSourceFile[];
|
|
23
30
|
};
|
|
24
|
-
declare function custom<const TSource extends CustomWorkspaceSourceFiles>(source: ExactOptions$1<TSource, CustomWorkspaceSourceFiles>): WorkspaceSource;
|
|
25
|
-
declare function custom<const TSource extends WorkspaceSource>(source: ExactOptions$1<TSource, WorkspaceSource>): WorkspaceSource;
|
|
31
|
+
export declare function custom<const TSource extends CustomWorkspaceSourceFiles>(source: ExactOptions$1<TSource, CustomWorkspaceSourceFiles>): WorkspaceSource;
|
|
32
|
+
export declare function custom<const TSource extends WorkspaceSource>(source: ExactOptions$1<TSource, WorkspaceSource>): WorkspaceSource;
|
|
26
33
|
//#endregion
|
|
27
34
|
//#region src/sources/file.d.ts
|
|
28
35
|
type FileWorkspaceSourceRuntimeOptions = WorkspaceSourceRuntimeOptions & Pick<WorkspaceSource, "probeKeys">;
|
|
29
36
|
type FileSourceOptions<TKey extends string = string> = FileSourceOptions$1<TKey> & FileWorkspaceSourceRuntimeOptions;
|
|
30
|
-
declare function file<const TKey extends string>(input: TKey): WorkspaceSource;
|
|
31
|
-
declare function file<const TKey extends string = string, const TOptions extends FileSourceOptions<TKey> = FileSourceOptions<TKey>>(input: ExactOptions$1<TOptions, FileSourceOptions<TKey>>): WorkspaceSource;
|
|
37
|
+
export declare function file<const TKey extends string>(input: TKey): WorkspaceSource;
|
|
38
|
+
export declare function file<const TKey extends string = string, const TOptions extends FileSourceOptions<TKey> = FileSourceOptions<TKey>>(input: ExactOptions$1<TOptions, FileSourceOptions<TKey>>): WorkspaceSource;
|
|
32
39
|
//#endregion
|
|
33
40
|
//#region src/sources/fetch.d.ts
|
|
34
41
|
type FetchSourceMethod = "GET" | "HEAD" | "POST";
|
|
@@ -59,6 +66,7 @@ type ExactOptions<TInput, TShape> = TInput & Record<Exclude<keyof TInput, keyof
|
|
|
59
66
|
interface FetchSourceCredentialOptions {
|
|
60
67
|
cookies?: Record<string, string>;
|
|
61
68
|
headers?: Record<string, string>;
|
|
69
|
+
maxResponseBytes?: number;
|
|
62
70
|
timeout?: number;
|
|
63
71
|
}
|
|
64
72
|
type FetchSourceRequestOptions = FetchSourceCredentialOptions;
|
|
@@ -86,6 +94,7 @@ interface FetchSourceOptions<TResponse = unknown, TOutput = TResponse> extends S
|
|
|
86
94
|
cookies?: Record<string, string>;
|
|
87
95
|
headers?: Record<string, string>;
|
|
88
96
|
method?: FetchSourceMethod;
|
|
97
|
+
maxResponseBytes?: number;
|
|
89
98
|
query?: Record<string, unknown>;
|
|
90
99
|
querySchema?: FetchSourceStandardJsonSchemaV1<Record<string, unknown>>;
|
|
91
100
|
request?: FetchSourceRequest;
|
|
@@ -97,81 +106,84 @@ interface FetchSourceOptions<TResponse = unknown, TOutput = TResponse> extends S
|
|
|
97
106
|
}
|
|
98
107
|
type FetchSourceResolver<TResponse = unknown, TOutput = TResponse> = (context: WorkspaceSourceResolutionContext) => MaybePromise<FetchSourceOptions<TResponse, TOutput> | false | null | undefined>;
|
|
99
108
|
type FetchSourceInput<TResponse = unknown, TOutput = TResponse> = FetchSourceOptions<TResponse, TOutput> | FetchSourceResolver<TResponse, TOutput>;
|
|
100
|
-
declare function fetch<TResponse = unknown, TOutput = TResponse>(options: ExactOptions<FetchSourceOptions<TResponse, TOutput>, FetchSourceOptions<TResponse, TOutput>>): WorkspaceSource;
|
|
101
|
-
declare function fetch<const TOptions extends FetchSourceOptions<any, any>>(options: ExactOptions<TOptions, FetchSourceOptions<any, any>>): WorkspaceSource;
|
|
102
|
-
declare function fetch<TResponse = unknown, TOutput = TResponse>(resolve: FetchSourceResolver<TResponse, TOutput>): WorkspaceSource;
|
|
109
|
+
export declare function fetch<TResponse = unknown, TOutput = TResponse>(options: ExactOptions<FetchSourceOptions<TResponse, TOutput>, FetchSourceOptions<TResponse, TOutput>>): WorkspaceSource;
|
|
110
|
+
export declare function fetch<const TOptions extends FetchSourceOptions<any, any>>(options: ExactOptions<TOptions, FetchSourceOptions<any, any>>): WorkspaceSource;
|
|
111
|
+
export declare function fetch<TResponse = unknown, TOutput = TResponse>(resolve: FetchSourceResolver<TResponse, TOutput>): WorkspaceSource;
|
|
103
112
|
//#endregion
|
|
104
113
|
//#region src/sources/github.d.ts
|
|
105
114
|
type GitHubAuth = NonNullable<GitHubSourceOptions$1["auth"]>;
|
|
106
115
|
type GitHubResolvedSourceOptions = Omit<GitHubSourceOptions, "repo"> & Partial<Pick<GitHubSourceOptions, "repo">>;
|
|
107
|
-
interface GitHubSourceOptions extends Omit<GitHubSourceOptions$1, "auth">, WorkspaceSourceRuntimeOptions {
|
|
116
|
+
interface GitHubSourceOptions extends Omit<GitHubSourceOptions$1, "auth" | "ignore">, WorkspaceSourceRuntimeOptions {
|
|
108
117
|
auth?: GitHubAuth;
|
|
118
|
+
/** Adds to the default Source ignores. Set to false to include every matched path. */
|
|
119
|
+
ignore?: false | string | readonly string[];
|
|
109
120
|
}
|
|
110
121
|
type GitHubSourceResolver = (context: WorkspaceSourceResolutionContext) => MaybePromise<GitHubResolvedSourceOptions | false | null | undefined>;
|
|
111
122
|
type GitHubSourceInput = GitHubSourceOptions | GitHubSourceResolver;
|
|
112
|
-
declare function github<const TOptions extends GitHubSourceOptions>(options: ExactOptions$1<TOptions, GitHubSourceOptions>): WorkspaceSource;
|
|
113
|
-
declare function github(resolve: GitHubSourceResolver): WorkspaceSource;
|
|
123
|
+
export declare function github<const TOptions extends GitHubSourceOptions>(options: ExactOptions$1<TOptions, GitHubSourceOptions>): WorkspaceSource;
|
|
124
|
+
export declare function github(resolve: GitHubSourceResolver): WorkspaceSource;
|
|
114
125
|
//#endregion
|
|
115
126
|
//#region src/sources/glob.d.ts
|
|
116
127
|
type GlobSourceOptions = GlobSourceOptions$1 & WorkspaceSourceRuntimeOptions;
|
|
117
|
-
declare function glob<const TOptions extends GlobSourceOptions>(options: ExactOptions$1<TOptions, GlobSourceOptions>): WorkspaceSource;
|
|
128
|
+
export declare function glob<const TOptions extends GlobSourceOptions>(options: ExactOptions$1<TOptions, GlobSourceOptions>): WorkspaceSource;
|
|
118
129
|
//#endregion
|
|
119
130
|
//#region src/sources/markdown.d.ts
|
|
120
|
-
declare function markdown(options: FileSourceOptions): WorkspaceSource;
|
|
131
|
+
export declare function markdown(options: FileSourceOptions): WorkspaceSource;
|
|
121
132
|
//#endregion
|
|
122
133
|
//#region src/sources/mcp-resources.d.ts
|
|
123
134
|
interface McpResourcesSourceOptions<TKey extends string = string> extends Omit<McpResourcesSourceOptions$1<TKey>, "cache">, WorkspaceSourceRuntimeOptions {}
|
|
124
|
-
declare function mcpResources<const TKey extends string = string, const TOptions extends McpResourcesSourceOptions<TKey> = McpResourcesSourceOptions<TKey>>(options: ExactOptions$1<TOptions, McpResourcesSourceOptions<TKey>>): WorkspaceSource;
|
|
135
|
+
export declare function mcpResources<const TKey extends string = string, const TOptions extends McpResourcesSourceOptions<TKey> = McpResourcesSourceOptions<TKey>>(options: ExactOptions$1<TOptions, McpResourcesSourceOptions<TKey>>): WorkspaceSource;
|
|
125
136
|
declare namespace index_d_exports {
|
|
126
137
|
export { FetchSourceInput, FetchSourceOptions, FetchSourceRequest, FetchSourceRequestOptions, FetchSourceResolver, FileSourceOptions, GitHubSourceInput, GitHubSourceOptions, GitHubSourceResolver, GlobSourceOptions, McpResourceContent, McpResourceDescriptor, McpResourcesClient, McpResourcesClientConfig, McpResourcesRequestOptions, McpResourcesServer, McpResourcesSourceOptions, custom, fetch, file, github, glob, markdown, mcpResources };
|
|
127
138
|
}
|
|
128
139
|
//#endregion
|
|
129
|
-
//#region src/
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
abortSignal?: AbortSignal;
|
|
137
|
-
command: string;
|
|
138
|
-
workingDirectory?: string;
|
|
139
|
-
}): PromiseLike<{
|
|
140
|
-
exitCode: number;
|
|
141
|
-
stderr: string;
|
|
142
|
-
stdout: string;
|
|
143
|
-
}>;
|
|
144
|
-
writeBinaryFile(options: {
|
|
145
|
-
abortSignal?: AbortSignal;
|
|
146
|
-
content: Uint8Array;
|
|
147
|
-
path: string;
|
|
148
|
-
}): PromiseLike<void>;
|
|
149
|
-
}
|
|
150
|
-
interface HarnessWorkspaceSession {
|
|
151
|
-
close(error?: unknown): Promise<void>;
|
|
152
|
-
refreshGitBaseline(): Promise<void>;
|
|
153
|
-
}
|
|
154
|
-
interface PrepareHarnessWorkspaceSessionOptions {
|
|
155
|
-
abortSignal?: AbortSignal;
|
|
156
|
-
commit?: (diff: WorkspaceDiff) => {
|
|
157
|
-
message?: string;
|
|
158
|
-
} | false | null | undefined;
|
|
159
|
-
definition?: WorkspaceDefinition;
|
|
160
|
-
ignoreWriteBackPaths?: readonly string[];
|
|
161
|
-
onMaterializeProgress?: WorkspaceMaterializeSourcesOptions["onProgress"];
|
|
162
|
-
onProgress?: (event: WorkspacePrepareSessionProgressEvent) => void | Promise<void>;
|
|
163
|
-
onWriteBack?: (diff: WorkspaceDiff) => void | Promise<void>;
|
|
164
|
-
paths?: readonly string[];
|
|
165
|
-
session: HarnessSandboxSession;
|
|
166
|
-
sessionWorkDir: string;
|
|
140
|
+
//#region src/collection.d.ts
|
|
141
|
+
type WorkspaceFacade$1<Name extends WorkspaceName> = ReadonlyWorkspaceFacade<Name> | WritableWorkspaceFacade<Name>;
|
|
142
|
+
interface WorkspaceFileCollectionOptions<Name extends WorkspaceName = WorkspaceName, TFilter extends string = string> extends ArrayCollectionOptions<TFilter> {
|
|
143
|
+
/** Workspace-relative path of a JSON file that contains one array. */
|
|
144
|
+
path: string;
|
|
145
|
+
/** Workspace name, an open Workspace, or a function that opens one per request. */
|
|
146
|
+
workspace: Name | WorkspaceFacade$1<Name> | (() => WorkspaceFacade$1<Name> | Promise<WorkspaceFacade$1<Name>>);
|
|
167
147
|
}
|
|
168
|
-
|
|
169
|
-
|
|
148
|
+
/**
|
|
149
|
+
* A Collection source over a JSON array stored in a Workspace file.
|
|
150
|
+
*
|
|
151
|
+
* Every request reads the file and queries it in memory with `array()`. The file's Workspace digest binds cursors,
|
|
152
|
+
* so a write to the file makes older cursors stale. Pass `schema` to validate and type the items.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* export const articles = defineCollection({
|
|
156
|
+
* source: workspaceFile({ workspace: 'catalog', path: 'data/articles.json', filters: ['category'], search: ['title'] }),
|
|
157
|
+
* })
|
|
158
|
+
*/
|
|
159
|
+
export declare function workspaceFile<TSchema extends StandardSchemaV1, Name extends WorkspaceName = WorkspaceName, const TFilter extends string = never>(options: WorkspaceFileCollectionOptions<Name, TFilter> & {
|
|
160
|
+
schema: TSchema;
|
|
161
|
+
}): ProviderCollectionSource<StandardSchemaV1.InferOutput<TSchema>, ArrayCollectionQuery<TFilter>, ArrayCollectionQueryInput<TFilter>>;
|
|
162
|
+
export declare function workspaceFile<Name extends WorkspaceName = WorkspaceName, const TFilter extends string = never>(options: WorkspaceFileCollectionOptions<Name, TFilter> & {
|
|
163
|
+
schema?: undefined;
|
|
164
|
+
}): ProviderCollectionSource<Record<string, unknown>, ArrayCollectionQuery<TFilter>, ArrayCollectionQueryInput<TFilter>>;
|
|
170
165
|
//#endregion
|
|
171
166
|
//#region src/core/rules.d.ts
|
|
172
|
-
declare function resolveWorkspaceAutoCommit(definition: WorkspaceDefinition, diff: WorkspaceDiff): WorkspaceAutoCommitPlan | undefined;
|
|
167
|
+
export declare function resolveWorkspaceAutoCommit(definition: WorkspaceDefinition, diff: WorkspaceDiff): WorkspaceAutoCommitPlan | undefined;
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/core/glob-pattern.d.ts
|
|
170
|
+
interface WorkspaceGlobPatternLimits {
|
|
171
|
+
maxBytes: number;
|
|
172
|
+
maxComplexity: number;
|
|
173
|
+
maxPatterns: number;
|
|
174
|
+
}
|
|
175
|
+
export declare const modelWorkspaceGlobPatternLimits: Readonly<WorkspaceGlobPatternLimits>;
|
|
176
|
+
export declare function assertModelWorkspaceGlobPattern(pattern: string | readonly string[], limits?: Readonly<WorkspaceGlobPatternLimits>): void;
|
|
173
177
|
//#endregion
|
|
174
178
|
//#region src/core/errors.d.ts
|
|
175
|
-
type WorkspaceErrorCode = "
|
|
179
|
+
type WorkspaceErrorCode = "WORKSPACE_CONFLICT" | "WORKSPACE_FAILED" | "WORKSPACE_NOT_FOUND" | "WORKSPACE_PATH_INVALID";
|
|
180
|
+
export declare function isWorkspaceConflict(value: unknown): boolean;
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/storage/target.d.ts
|
|
183
|
+
interface WorkspaceStoreTarget {
|
|
184
|
+
provider: string;
|
|
185
|
+
containsPath?(ancestor: string, path: string): Promise<boolean>;
|
|
186
|
+
}
|
|
187
|
+
export declare function resolveWorkspaceStoreTarget(source: unknown): Promise<WorkspaceStoreTarget | undefined>;
|
|
176
188
|
//#endregion
|
|
177
|
-
export { type CloudflareArtifactsWorkspaceStoreOptions, type DiffOptions, type EnabledReadCapability, type ExecOptions, type ExecResult, type FetchSourceInput, type FetchSourceOptions, type FetchSourceRequest, type FetchSourceRequestOptions, type FetchSourceResolver, type FileSourceOptions, type GitHubSourceInput, type GitHubSourceOptions, type GitHubSourceResolver, type GitHubWorkspaceOption, type GitHubWorkspaceStoreOptions, type GlobOptions, type GlobSourceOptions, type
|
|
189
|
+
export { type CloudflareArtifactsWorkspaceStoreOptions, type DiffOptions, type EnabledReadCapability, type ExecOptions, type ExecResult, type FetchSourceInput, type FetchSourceOptions, type FetchSourceRequest, type FetchSourceRequestOptions, type FetchSourceResolver, type FileSourceOptions, type GitHubSourceInput, type GitHubSourceOptions, type GitHubSourceResolver, type GitHubWorkspaceOption, type GitHubWorkspaceRefs, type GitHubWorkspaceStoreOptions, type GlobOptions, type GlobSourceOptions, type History, type HistoryCheckpoint, type HistoryCheckpointOptions, type ListOptions, type LoaderContext, type LocalWorkspaceStoreOptions, type Logger, type MaybePromise, type McpResourceContent, type McpResourceDescriptor, type McpResourcesClient, type McpResourcesClientConfig, type McpResourcesRequestOptions, type McpResourcesServer, type McpResourcesSourceOptions, type MemoryWorkspaceStoreOptions, type MkdirOptions, type ReadFileOptions, type ReadFileResult, type ReadonlyWorkspaceFacade, type ReadonlyWorkspaceFs, type ResolvedWorkspaceModuleOptions, type ResolvedWorkspaceRule, type RmOptions, type ShellEnabled, type SnapshotOptions, type SourceContext, type SourceContextWorkspaceFiles, type UseWorkspaceOptions, type VercelBlobWorkspaceStoreOptions, type Workspace, type WorkspaceAssetPath, type WorkspaceAssets, type WorkspaceAssetsRegistry, type WorkspaceAutoCommitPlan, type WorkspaceCacheOptions, type WorkspaceCapabilities, type WorkspaceContent, type WorkspaceContentStream, type WorkspaceCustomSourceInput, type WorkspaceDefinition, type WorkspaceDefinitionInput, type WorkspaceDiff, type WorkspaceDiffEntry, type WorkspaceEntry, type WorkspaceErrorCode, type WorkspaceFacade, type WorkspaceFacadeToolOptions, type WorkspaceFetchSourceInput, type WorkspaceFetchSourceRequestOptions, type WorkspaceFile, type WorkspaceFileCollectionOptions, type WorkspaceFileSourceInput, type WorkspaceGitHubSourceInput, type WorkspaceGlobPatternLimits, type WorkspaceGlobSourceInput, type WorkspaceHistory, type WorkspaceHistoryChanges, type WorkspaceHistoryChangesCommitOptions, type WorkspaceHistoryCommitBase, type WorkspaceHistoryCommitOptions, type WorkspaceHistoryExtensions, type WorkspaceHistoryFile, type WorkspaceHistoryFileInput, type WorkspaceHistoryFilesCommitOptions, type WorkspaceHistoryListOptions, type WorkspaceHistoryListResult, type WorkspaceHistoryReader, type WorkspaceHistoryRef, type WorkspaceHistoryRefOptions, type WorkspaceHookContext, type WorkspaceHooks, type WorkspaceInstructionBinding, type WorkspaceInstructionBindingValue, type WorkspaceLoader, type WorkspaceLoaderSource, type WorkspaceMaterializeMode, type WorkspaceMaterializeSourcesOptions, type WorkspaceMaterializeSourcesProgressEvent, type WorkspaceMaterializeSourcesResult, type WorkspaceMcpResourcesSourceInput, type WorkspaceMergeCommit, type WorkspaceMergeConflict, type WorkspaceMergeConflictContext, type WorkspaceMergeOptions, type WorkspaceMergeResolution, type WorkspaceModuleOptions, type WorkspaceMoveResult, type WorkspaceName, type WorkspaceNameMap, type WorkspaceOpenPullRequestOptions, type WorkspacePathResult, type WorkspacePlugin, type WorkspacePrepareSessionProgressEvent, type WorkspacePullRequest, type WorkspaceReadOperations, type WorkspaceReadToolSet, type WorkspaceReadTools, type WorkspaceRebaseOptions, type WorkspaceRetainedHistory, type WorkspaceRevision, type WorkspaceRevisionView, type WorkspaceRule, type WorkspaceRules, type WorkspaceScopeName, type WorkspaceSearchHit, type WorkspaceSearchQuery, type WorkspaceSelectedScope, type WorkspaceSession, type WorkspaceSessionHost, type WorkspaceSessionHostFileEntry, type WorkspaceSessionHostFiles, type WorkspaceSessionOptions, type WorkspaceSessionWriteFileOptions, type WorkspaceShellResult, type WorkspaceSnapshot, type WorkspaceSource, type WorkspaceSourceBindingInput, type WorkspaceSourceDefinition, type WorkspaceSourceInput, type WorkspaceSourceItem, type WorkspaceSourceMaterializationCounts, type WorkspaceSourceMaterializationPathResult, type WorkspaceSourceMaterializationStatus, type WorkspaceSourceMount, type WorkspaceSourceMountOptions, type WorkspaceSourceRequestDescriptor, type WorkspaceSourceRequestExecutionInput, type WorkspaceSourceRequestExecutionResult, type WorkspaceSourceRequestExecutor, type WorkspaceSourceRequestMethod, type WorkspaceSourceResolutionContext, type WorkspaceSourceResolutionContextMap, type WorkspaceSourceResolutionContextValueReader, type WorkspaceSourceResolutionInvocation, type WorkspaceSourceResolutionResult, type WorkspaceSourceResolver, type WorkspaceSourceSelection, type WorkspaceSourceSyncConfig, type WorkspaceSourceSyncCounts, type WorkspaceSourceSyncPathResult, type WorkspaceSourceSyncPolicy, type WorkspaceSourceSyncResult, type WorkspaceSourceSyncStatus, type WorkspaceStat, type WorkspaceStore, type WorkspaceStoreHistory, type WorkspaceStoreHistoryCommitOptions, type WorkspaceStoreOptions, type WorkspaceStoreTarget, type WorkspaceStreamFile, type WorkspaceSyncOptions, type WorkspaceSyncResultDetails, type WorkspaceSyncSnapshotOptions, type WorkspaceToolOperations, type WorkspaceToolOptions, type WorkspaceTools, type WorkspaceValidateMode, type WorkspaceWriteErrorHook, type WorkspaceWriteHook, type WorkspaceWriteInput, type WorkspaceWriteMode, type WorkspaceWriteOperation, type WorkspaceWriteOperations, type WorkspaceWriteToolMap, type WorkspaceWriteToolSet, type WorkspaceWriteTools, type WorkspaceWriteValidator, type WorkspaceWriteValidatorResult, type WritableWorkspaceFacade, type WritableWorkspaceFacadeToolOptions, type WritableWorkspaceFs, type WriteFileOptions, createWorkspace, createWorkspaceTools, invalidateWorkspaceStore, normalizeSafeWorkspacePath, registerWorkspacePlugin, resolveRegisteredWorkspaceDefinition, index_d_exports as source, sourceIgnores, useWorkspace };
|