gitx.do 0.1.1 → 0.1.3
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/README.md +40 -353
- package/dist/do/logger.d.ts +50 -0
- package/dist/do/logger.d.ts.map +1 -0
- package/dist/do/logger.js +122 -0
- package/dist/do/logger.js.map +1 -0
- package/dist/{durable-object → do}/schema.d.ts +3 -3
- package/dist/do/schema.d.ts.map +1 -0
- package/dist/{durable-object → do}/schema.js +4 -3
- package/dist/do/schema.js.map +1 -0
- package/dist/do/types.d.ts +267 -0
- package/dist/do/types.d.ts.map +1 -0
- package/dist/do/types.js +62 -0
- package/dist/do/types.js.map +1 -0
- package/dist/index.d.ts +15 -469
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -481
- package/dist/index.js.map +1 -1
- package/dist/mcp/auth.d.ts +77 -0
- package/dist/mcp/auth.d.ts.map +1 -0
- package/dist/mcp/auth.js +278 -0
- package/dist/mcp/auth.js.map +1 -0
- package/dist/mcp/index.d.ts +13 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +19 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +200 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +275 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tool-registry.d.ts +47 -0
- package/dist/mcp/tool-registry.d.ts.map +1 -0
- package/dist/mcp/tool-registry.js +284 -0
- package/dist/mcp/tool-registry.js.map +1 -0
- package/dist/mcp/tools.d.ts +103 -515
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +676 -3087
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/types.d.ts +124 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +9 -0
- package/dist/mcp/types.js.map +1 -0
- package/package.json +19 -21
- package/dist/cli/commands/add.d.ts +0 -176
- package/dist/cli/commands/add.d.ts.map +0 -1
- package/dist/cli/commands/add.js +0 -979
- package/dist/cli/commands/add.js.map +0 -1
- package/dist/cli/commands/blame.d.ts +0 -259
- package/dist/cli/commands/blame.d.ts.map +0 -1
- package/dist/cli/commands/blame.js +0 -609
- package/dist/cli/commands/blame.js.map +0 -1
- package/dist/cli/commands/branch.d.ts +0 -249
- package/dist/cli/commands/branch.d.ts.map +0 -1
- package/dist/cli/commands/branch.js +0 -693
- package/dist/cli/commands/branch.js.map +0 -1
- package/dist/cli/commands/checkout.d.ts +0 -73
- package/dist/cli/commands/checkout.d.ts.map +0 -1
- package/dist/cli/commands/checkout.js +0 -725
- package/dist/cli/commands/checkout.js.map +0 -1
- package/dist/cli/commands/commit.d.ts +0 -182
- package/dist/cli/commands/commit.d.ts.map +0 -1
- package/dist/cli/commands/commit.js +0 -457
- package/dist/cli/commands/commit.js.map +0 -1
- package/dist/cli/commands/diff.d.ts +0 -464
- package/dist/cli/commands/diff.d.ts.map +0 -1
- package/dist/cli/commands/diff.js +0 -959
- package/dist/cli/commands/diff.js.map +0 -1
- package/dist/cli/commands/log.d.ts +0 -239
- package/dist/cli/commands/log.d.ts.map +0 -1
- package/dist/cli/commands/log.js +0 -535
- package/dist/cli/commands/log.js.map +0 -1
- package/dist/cli/commands/merge.d.ts +0 -106
- package/dist/cli/commands/merge.d.ts.map +0 -1
- package/dist/cli/commands/merge.js +0 -852
- package/dist/cli/commands/merge.js.map +0 -1
- package/dist/cli/commands/review.d.ts +0 -457
- package/dist/cli/commands/review.d.ts.map +0 -1
- package/dist/cli/commands/review.js +0 -558
- package/dist/cli/commands/review.js.map +0 -1
- package/dist/cli/commands/stash.d.ts +0 -157
- package/dist/cli/commands/stash.d.ts.map +0 -1
- package/dist/cli/commands/stash.js +0 -655
- package/dist/cli/commands/stash.js.map +0 -1
- package/dist/cli/commands/status.d.ts +0 -269
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js +0 -492
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/web.d.ts +0 -199
- package/dist/cli/commands/web.d.ts.map +0 -1
- package/dist/cli/commands/web.js +0 -697
- package/dist/cli/commands/web.js.map +0 -1
- package/dist/cli/fs-adapter.d.ts +0 -656
- package/dist/cli/fs-adapter.d.ts.map +0 -1
- package/dist/cli/fs-adapter.js +0 -1177
- package/dist/cli/fs-adapter.js.map +0 -1
- package/dist/cli/fsx-cli-adapter.d.ts +0 -359
- package/dist/cli/fsx-cli-adapter.d.ts.map +0 -1
- package/dist/cli/fsx-cli-adapter.js +0 -619
- package/dist/cli/fsx-cli-adapter.js.map +0 -1
- package/dist/cli/index.d.ts +0 -387
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -579
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/ui/components/DiffView.d.ts +0 -12
- package/dist/cli/ui/components/DiffView.d.ts.map +0 -1
- package/dist/cli/ui/components/DiffView.js +0 -11
- package/dist/cli/ui/components/DiffView.js.map +0 -1
- package/dist/cli/ui/components/ErrorDisplay.d.ts +0 -10
- package/dist/cli/ui/components/ErrorDisplay.d.ts.map +0 -1
- package/dist/cli/ui/components/ErrorDisplay.js +0 -11
- package/dist/cli/ui/components/ErrorDisplay.js.map +0 -1
- package/dist/cli/ui/components/FuzzySearch.d.ts +0 -15
- package/dist/cli/ui/components/FuzzySearch.d.ts.map +0 -1
- package/dist/cli/ui/components/FuzzySearch.js +0 -12
- package/dist/cli/ui/components/FuzzySearch.js.map +0 -1
- package/dist/cli/ui/components/LoadingSpinner.d.ts +0 -10
- package/dist/cli/ui/components/LoadingSpinner.d.ts.map +0 -1
- package/dist/cli/ui/components/LoadingSpinner.js +0 -10
- package/dist/cli/ui/components/LoadingSpinner.js.map +0 -1
- package/dist/cli/ui/components/NavigationList.d.ts +0 -14
- package/dist/cli/ui/components/NavigationList.d.ts.map +0 -1
- package/dist/cli/ui/components/NavigationList.js +0 -11
- package/dist/cli/ui/components/NavigationList.js.map +0 -1
- package/dist/cli/ui/components/ScrollableContent.d.ts +0 -13
- package/dist/cli/ui/components/ScrollableContent.d.ts.map +0 -1
- package/dist/cli/ui/components/ScrollableContent.js +0 -11
- package/dist/cli/ui/components/ScrollableContent.js.map +0 -1
- package/dist/cli/ui/components/index.d.ts +0 -7
- package/dist/cli/ui/components/index.d.ts.map +0 -1
- package/dist/cli/ui/components/index.js +0 -9
- package/dist/cli/ui/components/index.js.map +0 -1
- package/dist/cli/ui/terminal-ui.d.ts +0 -85
- package/dist/cli/ui/terminal-ui.d.ts.map +0 -1
- package/dist/cli/ui/terminal-ui.js +0 -121
- package/dist/cli/ui/terminal-ui.js.map +0 -1
- package/dist/do/BashModule.d.ts +0 -871
- package/dist/do/BashModule.d.ts.map +0 -1
- package/dist/do/BashModule.js +0 -1143
- package/dist/do/BashModule.js.map +0 -1
- package/dist/do/FsModule.d.ts +0 -612
- package/dist/do/FsModule.d.ts.map +0 -1
- package/dist/do/FsModule.js +0 -1120
- package/dist/do/FsModule.js.map +0 -1
- package/dist/do/GitModule.d.ts +0 -635
- package/dist/do/GitModule.d.ts.map +0 -1
- package/dist/do/GitModule.js +0 -784
- package/dist/do/GitModule.js.map +0 -1
- package/dist/do/GitRepoDO.d.ts +0 -281
- package/dist/do/GitRepoDO.d.ts.map +0 -1
- package/dist/do/GitRepoDO.js +0 -479
- package/dist/do/GitRepoDO.js.map +0 -1
- package/dist/do/bash-ast.d.ts +0 -246
- package/dist/do/bash-ast.d.ts.map +0 -1
- package/dist/do/bash-ast.js +0 -888
- package/dist/do/bash-ast.js.map +0 -1
- package/dist/do/container-executor.d.ts +0 -491
- package/dist/do/container-executor.d.ts.map +0 -1
- package/dist/do/container-executor.js +0 -731
- package/dist/do/container-executor.js.map +0 -1
- package/dist/do/index.d.ts +0 -53
- package/dist/do/index.d.ts.map +0 -1
- package/dist/do/index.js +0 -91
- package/dist/do/index.js.map +0 -1
- package/dist/do/tiered-storage.d.ts +0 -403
- package/dist/do/tiered-storage.d.ts.map +0 -1
- package/dist/do/tiered-storage.js +0 -689
- package/dist/do/tiered-storage.js.map +0 -1
- package/dist/do/withBash.d.ts +0 -231
- package/dist/do/withBash.d.ts.map +0 -1
- package/dist/do/withBash.js +0 -244
- package/dist/do/withBash.js.map +0 -1
- package/dist/do/withFs.d.ts +0 -237
- package/dist/do/withFs.d.ts.map +0 -1
- package/dist/do/withFs.js +0 -387
- package/dist/do/withFs.js.map +0 -1
- package/dist/do/withGit.d.ts +0 -180
- package/dist/do/withGit.d.ts.map +0 -1
- package/dist/do/withGit.js +0 -271
- package/dist/do/withGit.js.map +0 -1
- package/dist/durable-object/object-store.d.ts +0 -633
- package/dist/durable-object/object-store.d.ts.map +0 -1
- package/dist/durable-object/object-store.js +0 -1164
- package/dist/durable-object/object-store.js.map +0 -1
- package/dist/durable-object/schema.d.ts.map +0 -1
- package/dist/durable-object/schema.js.map +0 -1
- package/dist/durable-object/wal.d.ts +0 -416
- package/dist/durable-object/wal.d.ts.map +0 -1
- package/dist/durable-object/wal.js +0 -445
- package/dist/durable-object/wal.js.map +0 -1
- package/dist/mcp/adapter.d.ts +0 -772
- package/dist/mcp/adapter.d.ts.map +0 -1
- package/dist/mcp/adapter.js +0 -895
- package/dist/mcp/adapter.js.map +0 -1
- package/dist/mcp/sandbox/miniflare-evaluator.d.ts +0 -22
- package/dist/mcp/sandbox/miniflare-evaluator.d.ts.map +0 -1
- package/dist/mcp/sandbox/miniflare-evaluator.js +0 -140
- package/dist/mcp/sandbox/miniflare-evaluator.js.map +0 -1
- package/dist/mcp/sandbox/object-store-proxy.d.ts +0 -32
- package/dist/mcp/sandbox/object-store-proxy.d.ts.map +0 -1
- package/dist/mcp/sandbox/object-store-proxy.js +0 -30
- package/dist/mcp/sandbox/object-store-proxy.js.map +0 -1
- package/dist/mcp/sandbox/template.d.ts +0 -17
- package/dist/mcp/sandbox/template.d.ts.map +0 -1
- package/dist/mcp/sandbox/template.js +0 -71
- package/dist/mcp/sandbox/template.js.map +0 -1
- package/dist/mcp/sandbox.d.ts +0 -764
- package/dist/mcp/sandbox.d.ts.map +0 -1
- package/dist/mcp/sandbox.js +0 -1362
- package/dist/mcp/sandbox.js.map +0 -1
- package/dist/mcp/sdk-adapter.d.ts +0 -835
- package/dist/mcp/sdk-adapter.d.ts.map +0 -1
- package/dist/mcp/sdk-adapter.js +0 -974
- package/dist/mcp/sdk-adapter.js.map +0 -1
- package/dist/mcp/tools/do.d.ts +0 -32
- package/dist/mcp/tools/do.d.ts.map +0 -1
- package/dist/mcp/tools/do.js +0 -117
- package/dist/mcp/tools/do.js.map +0 -1
- package/dist/ops/blame.d.ts +0 -551
- package/dist/ops/blame.d.ts.map +0 -1
- package/dist/ops/blame.js +0 -1037
- package/dist/ops/blame.js.map +0 -1
- package/dist/ops/branch.d.ts +0 -766
- package/dist/ops/branch.d.ts.map +0 -1
- package/dist/ops/branch.js +0 -950
- package/dist/ops/branch.js.map +0 -1
- package/dist/ops/commit-traversal.d.ts +0 -349
- package/dist/ops/commit-traversal.d.ts.map +0 -1
- package/dist/ops/commit-traversal.js +0 -821
- package/dist/ops/commit-traversal.js.map +0 -1
- package/dist/ops/commit.d.ts +0 -555
- package/dist/ops/commit.d.ts.map +0 -1
- package/dist/ops/commit.js +0 -826
- package/dist/ops/commit.js.map +0 -1
- package/dist/ops/merge-base.d.ts +0 -397
- package/dist/ops/merge-base.d.ts.map +0 -1
- package/dist/ops/merge-base.js +0 -691
- package/dist/ops/merge-base.js.map +0 -1
- package/dist/ops/merge.d.ts +0 -855
- package/dist/ops/merge.d.ts.map +0 -1
- package/dist/ops/merge.js +0 -1551
- package/dist/ops/merge.js.map +0 -1
- package/dist/ops/tag.d.ts +0 -247
- package/dist/ops/tag.d.ts.map +0 -1
- package/dist/ops/tag.js +0 -649
- package/dist/ops/tag.js.map +0 -1
- package/dist/ops/tree-builder.d.ts +0 -178
- package/dist/ops/tree-builder.d.ts.map +0 -1
- package/dist/ops/tree-builder.js +0 -271
- package/dist/ops/tree-builder.js.map +0 -1
- package/dist/ops/tree-diff.d.ts +0 -291
- package/dist/ops/tree-diff.d.ts.map +0 -1
- package/dist/ops/tree-diff.js +0 -705
- package/dist/ops/tree-diff.js.map +0 -1
- package/dist/pack/delta.d.ts +0 -248
- package/dist/pack/delta.d.ts.map +0 -1
- package/dist/pack/delta.js +0 -740
- package/dist/pack/delta.js.map +0 -1
- package/dist/pack/format.d.ts +0 -446
- package/dist/pack/format.d.ts.map +0 -1
- package/dist/pack/format.js +0 -572
- package/dist/pack/format.js.map +0 -1
- package/dist/pack/full-generation.d.ts +0 -612
- package/dist/pack/full-generation.d.ts.map +0 -1
- package/dist/pack/full-generation.js +0 -1378
- package/dist/pack/full-generation.js.map +0 -1
- package/dist/pack/generation.d.ts +0 -441
- package/dist/pack/generation.d.ts.map +0 -1
- package/dist/pack/generation.js +0 -707
- package/dist/pack/generation.js.map +0 -1
- package/dist/pack/index.d.ts +0 -502
- package/dist/pack/index.d.ts.map +0 -1
- package/dist/pack/index.js +0 -833
- package/dist/pack/index.js.map +0 -1
- package/dist/refs/branch.d.ts +0 -683
- package/dist/refs/branch.d.ts.map +0 -1
- package/dist/refs/branch.js +0 -881
- package/dist/refs/branch.js.map +0 -1
- package/dist/refs/storage.d.ts +0 -833
- package/dist/refs/storage.d.ts.map +0 -1
- package/dist/refs/storage.js +0 -1023
- package/dist/refs/storage.js.map +0 -1
- package/dist/refs/tag.d.ts +0 -860
- package/dist/refs/tag.d.ts.map +0 -1
- package/dist/refs/tag.js +0 -996
- package/dist/refs/tag.js.map +0 -1
- package/dist/storage/backend.d.ts +0 -425
- package/dist/storage/backend.d.ts.map +0 -1
- package/dist/storage/backend.js +0 -41
- package/dist/storage/backend.js.map +0 -1
- package/dist/storage/fsx-adapter.d.ts +0 -204
- package/dist/storage/fsx-adapter.d.ts.map +0 -1
- package/dist/storage/fsx-adapter.js +0 -518
- package/dist/storage/fsx-adapter.js.map +0 -1
- package/dist/storage/lru-cache.d.ts +0 -691
- package/dist/storage/lru-cache.d.ts.map +0 -1
- package/dist/storage/lru-cache.js +0 -813
- package/dist/storage/lru-cache.js.map +0 -1
- package/dist/storage/object-index.d.ts +0 -585
- package/dist/storage/object-index.d.ts.map +0 -1
- package/dist/storage/object-index.js +0 -532
- package/dist/storage/object-index.js.map +0 -1
- package/dist/storage/r2-pack.d.ts +0 -1257
- package/dist/storage/r2-pack.d.ts.map +0 -1
- package/dist/storage/r2-pack.js +0 -1773
- package/dist/storage/r2-pack.js.map +0 -1
- package/dist/tiered/cdc-pipeline.d.ts +0 -1888
- package/dist/tiered/cdc-pipeline.d.ts.map +0 -1
- package/dist/tiered/cdc-pipeline.js +0 -1880
- package/dist/tiered/cdc-pipeline.js.map +0 -1
- package/dist/tiered/migration.d.ts +0 -1104
- package/dist/tiered/migration.d.ts.map +0 -1
- package/dist/tiered/migration.js +0 -1217
- package/dist/tiered/migration.js.map +0 -1
- package/dist/tiered/parquet-writer.d.ts +0 -1145
- package/dist/tiered/parquet-writer.d.ts.map +0 -1
- package/dist/tiered/parquet-writer.js +0 -1183
- package/dist/tiered/parquet-writer.js.map +0 -1
- package/dist/tiered/read-path.d.ts +0 -835
- package/dist/tiered/read-path.d.ts.map +0 -1
- package/dist/tiered/read-path.js +0 -487
- package/dist/tiered/read-path.js.map +0 -1
- package/dist/types/capability.d.ts +0 -1385
- package/dist/types/capability.d.ts.map +0 -1
- package/dist/types/capability.js +0 -36
- package/dist/types/capability.js.map +0 -1
- package/dist/types/index.d.ts +0 -13
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -18
- package/dist/types/index.js.map +0 -1
- package/dist/types/interfaces.d.ts +0 -673
- package/dist/types/interfaces.d.ts.map +0 -1
- package/dist/types/interfaces.js +0 -26
- package/dist/types/interfaces.js.map +0 -1
- package/dist/types/objects.d.ts +0 -692
- package/dist/types/objects.d.ts.map +0 -1
- package/dist/types/objects.js +0 -837
- package/dist/types/objects.js.map +0 -1
- package/dist/types/storage.d.ts +0 -603
- package/dist/types/storage.d.ts.map +0 -1
- package/dist/types/storage.js +0 -191
- package/dist/types/storage.js.map +0 -1
- package/dist/types/worker-loader.d.ts +0 -60
- package/dist/types/worker-loader.d.ts.map +0 -1
- package/dist/types/worker-loader.js +0 -62
- package/dist/types/worker-loader.js.map +0 -1
- package/dist/utils/hash.d.ts +0 -198
- package/dist/utils/hash.d.ts.map +0 -1
- package/dist/utils/hash.js +0 -272
- package/dist/utils/hash.js.map +0 -1
- package/dist/utils/sha1.d.ts +0 -325
- package/dist/utils/sha1.d.ts.map +0 -1
- package/dist/utils/sha1.js +0 -635
- package/dist/utils/sha1.js.map +0 -1
- package/dist/wire/capabilities.d.ts +0 -1044
- package/dist/wire/capabilities.d.ts.map +0 -1
- package/dist/wire/capabilities.js +0 -941
- package/dist/wire/capabilities.js.map +0 -1
- package/dist/wire/path-security.d.ts +0 -157
- package/dist/wire/path-security.d.ts.map +0 -1
- package/dist/wire/path-security.js +0 -307
- package/dist/wire/path-security.js.map +0 -1
- package/dist/wire/pkt-line.d.ts +0 -345
- package/dist/wire/pkt-line.d.ts.map +0 -1
- package/dist/wire/pkt-line.js +0 -381
- package/dist/wire/pkt-line.js.map +0 -1
- package/dist/wire/receive-pack.d.ts +0 -1059
- package/dist/wire/receive-pack.d.ts.map +0 -1
- package/dist/wire/receive-pack.js +0 -1414
- package/dist/wire/receive-pack.js.map +0 -1
- package/dist/wire/smart-http.d.ts +0 -799
- package/dist/wire/smart-http.d.ts.map +0 -1
- package/dist/wire/smart-http.js +0 -945
- package/dist/wire/smart-http.js.map +0 -1
- package/dist/wire/upload-pack.d.ts +0 -727
- package/dist/wire/upload-pack.d.ts.map +0 -1
- package/dist/wire/upload-pack.js +0 -1141
- package/dist/wire/upload-pack.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,483 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview gitx.do -
|
|
2
|
+
* @fileoverview gitx.do - Git on Cloudflare Durable Objects
|
|
3
3
|
*
|
|
4
|
-
* This
|
|
5
|
-
*
|
|
6
|
-
* and R2 storage.
|
|
7
|
-
*
|
|
8
|
-
* **Architecture Overview**:
|
|
9
|
-
* - **Types**: Core Git object types (blob, tree, commit, tag)
|
|
10
|
-
* - **Pack Operations**: Packfile format handling and index management
|
|
11
|
-
* - **Git Operations**: Core commands (merge, blame, commit, branch)
|
|
12
|
-
* - **MCP Integration**: Model Context Protocol for AI assistant integration
|
|
13
|
-
* - **Wire Protocol**: Git Smart HTTP protocol implementation
|
|
14
|
-
* - **Storage**: R2 packfile storage and object indexing
|
|
15
|
-
* - **Tiered Storage**: Hot/Warm/Cold storage with migration
|
|
4
|
+
* This package provides the Cloudflare Workers/Durable Objects integration
|
|
5
|
+
* for gitx. It depends on @dotdo/gitx for the pure git implementation.
|
|
16
6
|
*
|
|
17
7
|
* @module gitx.do
|
|
18
8
|
*
|
|
19
9
|
* @example
|
|
20
10
|
* ```typescript
|
|
21
|
-
* import {
|
|
22
|
-
* // Types
|
|
23
|
-
* type CommitObject,
|
|
24
|
-
* parseCommit,
|
|
25
|
-
* serializeCommit,
|
|
26
|
-
*
|
|
27
|
-
* // Operations
|
|
28
|
-
* createCommit,
|
|
29
|
-
* merge,
|
|
30
|
-
* blame,
|
|
31
|
-
*
|
|
32
|
-
* // Storage
|
|
33
|
-
* R2PackStorage,
|
|
34
|
-
* ObjectIndex,
|
|
35
|
-
*
|
|
36
|
-
* // Wire Protocol
|
|
37
|
-
* handleInfoRefs,
|
|
38
|
-
* handleUploadPack,
|
|
39
|
-
* } from 'gitx.do'
|
|
40
|
-
*
|
|
41
|
-
* // Create a commit
|
|
42
|
-
* const commit = await createCommit(storage, {
|
|
43
|
-
* tree: treeSha,
|
|
44
|
-
* parents: [parentSha],
|
|
45
|
-
* message: 'Add new feature',
|
|
46
|
-
* author: { name: 'Alice', email: 'alice@example.com' }
|
|
47
|
-
* })
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
/**
|
|
51
|
-
* Git object types and serialization.
|
|
52
|
-
*
|
|
53
|
-
* @description
|
|
54
|
-
* Core types for Git objects (blob, tree, commit, tag) including:
|
|
55
|
-
* - Type definitions for each object type
|
|
56
|
-
* - Type guard functions for runtime type checking
|
|
57
|
-
* - Serialization functions for converting to Git format
|
|
58
|
-
* - Deserialization functions for parsing Git format
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```typescript
|
|
62
|
-
* import { isCommit, parseCommit, serializeCommit } from 'gitx.do'
|
|
63
|
-
*
|
|
64
|
-
* // Parse raw commit data
|
|
65
|
-
* const commit = parseCommit(rawData)
|
|
66
|
-
*
|
|
67
|
-
* // Check type at runtime
|
|
68
|
-
* if (isCommit(obj)) {
|
|
69
|
-
* console.log(obj.message)
|
|
70
|
-
* }
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
export { type ObjectType, type GitObject, type BlobObject, type TreeObject, type TreeEntry, type CommitObject, type TagObject, type Author, isBlob, isTree, isCommit, isTag, SHA_PATTERN, VALID_MODES, isValidSha, isValidObjectType, isValidMode, validateTreeEntry, validateAuthor, validateCommit, validateTag, serializeBlob, serializeTree, serializeCommit, serializeTag, parseBlob, parseTree, parseCommit, parseTag, } from './types/objects';
|
|
74
|
-
/**
|
|
75
|
-
* Storage interface types and validation.
|
|
76
|
-
*
|
|
77
|
-
* @description
|
|
78
|
-
* Core storage interfaces for Git object stores and commit providers:
|
|
79
|
-
* - {@link ObjectStore}: Full-featured object storage with refs
|
|
80
|
-
* - {@link BasicObjectStore}: Minimal object CRUD
|
|
81
|
-
* - {@link RefObjectStore}: Object store with ref management
|
|
82
|
-
* - {@link TreeDiffObjectStore}: Specialized for tree operations
|
|
83
|
-
* - {@link CommitProvider}: Commit retrieval interface
|
|
84
|
-
* - {@link BasicCommitProvider}: Minimal commit access
|
|
85
|
-
*
|
|
86
|
-
* Plus validation helpers for storage operations.
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* ```typescript
|
|
90
|
-
* import {
|
|
91
|
-
* type ObjectStore,
|
|
92
|
-
* validateRefName,
|
|
93
|
-
* assertValidSha
|
|
94
|
-
* } from 'gitx.do'
|
|
95
|
-
*
|
|
96
|
-
* // Validate before storing
|
|
97
|
-
* assertValidSha(treeSha, 'tree')
|
|
98
|
-
* const refResult = validateRefName('refs/heads/main')
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
export { type ValidationResult, validateRefName, validateRefUpdate, validateStoreParams, assertValidSha, assertValidRefName, type ObjectStore as StorageObjectStore, type BasicObjectStore, type RefObjectStore, type TreeDiffObjectStore, type CommitProvider, type BasicCommitProvider, } from './types/storage';
|
|
102
|
-
/**
|
|
103
|
-
* GitCapability types for DO integration.
|
|
104
|
-
*
|
|
105
|
-
* @description
|
|
106
|
-
* TypeScript interfaces for the git capability, designed for integration
|
|
107
|
-
* with Durable Objects as the $.git proxy. Provides type definitions for:
|
|
108
|
-
* - Repository operations: clone, init, fetch, pull, push
|
|
109
|
-
* - Working tree operations: add, commit, status, log, diff
|
|
110
|
-
* - Branch operations: branch, checkout, merge
|
|
111
|
-
* - Low-level operations: resolveRef, readObject
|
|
112
|
-
*
|
|
113
|
-
* @example
|
|
114
|
-
* ```typescript
|
|
115
|
-
* import type { GitCapability, GitStatus, Commit } from 'gitx.do'
|
|
116
|
-
*
|
|
117
|
-
* // Type your $.git proxy
|
|
118
|
-
* class MyDO {
|
|
119
|
-
* git: GitCapability = this.$.git
|
|
120
|
-
*
|
|
121
|
-
* async createFeature(name: string): Promise<Commit> {
|
|
122
|
-
* await this.git.checkout({ branch: `feature/${name}`, create: true })
|
|
123
|
-
* await this.git.add({ all: true })
|
|
124
|
-
* return await this.git.commit({ message: `feat: ${name}` })
|
|
125
|
-
* }
|
|
126
|
-
* }
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
export { type SHA, type RefName, type Commit as CapabilityCommit, type RawGitObject, type GitRef as CapabilityGitRef, type Branch, type Tag, type FileStatus, type GitStatus, type DiffHunk, type FileDiff, type DiffResult, type CloneOptions, type InitOptions, type FetchOptions, type PullOptions, type PushOptions, type AddOptions, type CommitOptions as CapabilityCommitOptions, type StatusOptions, type LogOptions, type DiffOptions, type BranchOptions as CapabilityBranchOptions, type CheckoutOptions as CapabilityCheckoutOptions, type MergeOptions as CapabilityMergeOptions, type AuthOptions, type ProgressCallback, type ProgressEvent, type MergeResult as CapabilityMergeResult, type PushResult as CapabilityPushResult, type FetchResult, type GitCapability, type TreePathResult, type Remote, } from './types/capability';
|
|
130
|
-
/**
|
|
131
|
-
* Consolidated interface types for DO integration.
|
|
132
|
-
*
|
|
133
|
-
* @description
|
|
134
|
-
* Common interface types used across the gitx.do codebase, including:
|
|
135
|
-
* - SQL storage interfaces
|
|
136
|
-
* - R2 bucket types
|
|
137
|
-
* - KV namespace types
|
|
138
|
-
* - Durable Object types
|
|
139
|
-
* - Workflow context interfaces
|
|
140
|
-
* - Module interfaces
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* ```typescript
|
|
144
|
-
* import type { SqlStorage, R2BucketLike, WorkflowContext } from 'gitx.do'
|
|
11
|
+
* import { GitRepoDO, GitModule, withGit } from 'gitx.do'
|
|
145
12
|
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* private r2: R2BucketLike
|
|
13
|
+
* // Use GitRepoDO for full repository management
|
|
14
|
+
* export { GitRepoDO }
|
|
149
15
|
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
16
|
+
* // Or use mixins for custom DOs
|
|
17
|
+
* class MyDO extends withGit(DurableObject) {
|
|
18
|
+
* async doSomething() {
|
|
19
|
+
* await this.git.clone('https://github.com/org/repo')
|
|
152
20
|
* }
|
|
153
21
|
* }
|
|
154
22
|
* ```
|
|
155
23
|
*/
|
|
156
|
-
export
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
* Functions for reading and writing Git packfiles including:
|
|
162
|
-
* - Pack header parsing and creation
|
|
163
|
-
* - Variable-length integer encoding/decoding
|
|
164
|
-
* - Object type and size encoding
|
|
165
|
-
*
|
|
166
|
-
* @example
|
|
167
|
-
* ```typescript
|
|
168
|
-
* import { createPackfile, parsePackHeader } from 'gitx.do'
|
|
169
|
-
*
|
|
170
|
-
* // Create a packfile from objects
|
|
171
|
-
* const packData = await createPackfile(objects)
|
|
172
|
-
*
|
|
173
|
-
* // Parse pack header
|
|
174
|
-
* const header = parsePackHeader(packData)
|
|
175
|
-
* console.log(`Pack contains ${header.objectCount} objects`)
|
|
176
|
-
* ```
|
|
177
|
-
*/
|
|
178
|
-
export { PACK_SIGNATURE, PACK_VERSION, PackObjectType, packObjectTypeToString, stringToPackObjectType, encodeVarint, decodeVarint, encodeTypeAndSize, decodeTypeAndSize, parsePackHeader, parsePackObject, createPackfile, type PackHeader, type ParsedPackObject, type PackableObject, } from './pack/format';
|
|
179
|
-
/**
|
|
180
|
-
* Pack index operations.
|
|
181
|
-
*
|
|
182
|
-
* @description
|
|
183
|
-
* Functions for reading and writing pack index files (.idx) including:
|
|
184
|
-
* - Index parsing and creation
|
|
185
|
-
* - Object lookup by SHA
|
|
186
|
-
* - CRC32 calculation for verification
|
|
187
|
-
*
|
|
188
|
-
* @example
|
|
189
|
-
* ```typescript
|
|
190
|
-
* import { createPackIndex, lookupObject } from 'gitx.do'
|
|
191
|
-
*
|
|
192
|
-
* // Create index for a packfile
|
|
193
|
-
* const index = await createPackIndex(packData)
|
|
194
|
-
*
|
|
195
|
-
* // Look up an object
|
|
196
|
-
* const result = lookupObject(index, sha)
|
|
197
|
-
* if (result) {
|
|
198
|
-
* console.log(`Object at offset ${result.offset}`)
|
|
199
|
-
* }
|
|
200
|
-
* ```
|
|
201
|
-
*/
|
|
202
|
-
export { PACK_INDEX_SIGNATURE, PACK_INDEX_MAGIC, PACK_INDEX_VERSION, LARGE_OFFSET_THRESHOLD, parsePackIndex, createPackIndex, lookupObject, verifyPackIndex, serializePackIndex, getFanoutRange, calculateCRC32, binarySearchObjectId, binarySearchSha, parseFanoutTable, readPackOffset, type PackIndexEntry, type PackIndex, type PackIndexLookupResult, type CreatePackIndexOptions, type PackedObject, } from './pack/index';
|
|
203
|
-
/**
|
|
204
|
-
* Merge operations.
|
|
205
|
-
*
|
|
206
|
-
* @description
|
|
207
|
-
* Functions for performing Git merges including:
|
|
208
|
-
* - Three-way merge algorithm
|
|
209
|
-
* - Merge base finding
|
|
210
|
-
* - Conflict detection and resolution
|
|
211
|
-
* - Content merging for text files
|
|
212
|
-
*
|
|
213
|
-
* @example
|
|
214
|
-
* ```typescript
|
|
215
|
-
* import { merge, findMergeBase, resolveConflict } from 'gitx.do'
|
|
216
|
-
*
|
|
217
|
-
* // Find merge base
|
|
218
|
-
* const base = await findMergeBase(storage, commit1, commit2)
|
|
219
|
-
*
|
|
220
|
-
* // Perform merge
|
|
221
|
-
* const result = await merge(storage, {
|
|
222
|
-
* ours: 'main',
|
|
223
|
-
* theirs: 'feature',
|
|
224
|
-
* strategy: 'recursive'
|
|
225
|
-
* })
|
|
226
|
-
*
|
|
227
|
-
* if (result.conflicts.length > 0) {
|
|
228
|
-
* // Handle conflicts
|
|
229
|
-
* }
|
|
230
|
-
* ```
|
|
231
|
-
*/
|
|
232
|
-
export { merge, findMergeBase, resolveConflict, abortMerge, continueMerge, getMergeState, isMergeInProgress, mergeContent, isBinaryFile, type ConflictType, type MergeStrategy, type MergeStatus, type ConflictMarker, type MergeConflict, type MergeOptions, type MergeStats, type MergeResult, type MergeState, type ResolveOptions, type ResolveResult, type MergeOperationResult, type MergeStorage, } from './ops/merge';
|
|
233
|
-
/**
|
|
234
|
-
* Blame operations.
|
|
235
|
-
*
|
|
236
|
-
* @description
|
|
237
|
-
* Functions for git blame functionality including:
|
|
238
|
-
* - Line-by-line attribution
|
|
239
|
-
* - Rename tracking across history
|
|
240
|
-
* - Range-based blame
|
|
241
|
-
* - Blame output formatting
|
|
242
|
-
*
|
|
243
|
-
* @example
|
|
244
|
-
* ```typescript
|
|
245
|
-
* import { blame, blameFile, formatBlame } from 'gitx.do'
|
|
246
|
-
*
|
|
247
|
-
* // Get blame for a file
|
|
248
|
-
* const result = await blameFile(storage, 'src/index.ts', { commit: 'HEAD' })
|
|
249
|
-
*
|
|
250
|
-
* // Format for display
|
|
251
|
-
* const output = formatBlame(result, { showEmail: true })
|
|
252
|
-
* ```
|
|
253
|
-
*/
|
|
254
|
-
export { blame, blameFile, blameLine, blameRange, getBlameForCommit, trackContentAcrossRenames, detectRenames, buildBlameHistory, formatBlame, parseBlameOutput, type BlameStorage, type BlameOptions, type BlameLineInfo, type BlameCommitInfo, type BlameEntry, type BlameResult, type BlameFormatOptions, type PathHistoryEntry, type BlameHistoryEntry, } from './ops/blame';
|
|
255
|
-
/**
|
|
256
|
-
* Commit operations.
|
|
257
|
-
*
|
|
258
|
-
* @description
|
|
259
|
-
* Functions for creating and working with commits including:
|
|
260
|
-
* - Commit creation and amendment
|
|
261
|
-
* - Commit message formatting and validation
|
|
262
|
-
* - Signature handling (GPG)
|
|
263
|
-
* - Author/timestamp utilities
|
|
264
|
-
*
|
|
265
|
-
* @example
|
|
266
|
-
* ```typescript
|
|
267
|
-
* import { createCommit, createAuthor, formatTimestamp } from 'gitx.do'
|
|
268
|
-
*
|
|
269
|
-
* const author = createAuthor('Alice', 'alice@example.com')
|
|
270
|
-
* const commit = await createCommit(storage, {
|
|
271
|
-
* tree: treeSha,
|
|
272
|
-
* parents: [parentSha],
|
|
273
|
-
* author,
|
|
274
|
-
* message: 'Add new feature'
|
|
275
|
-
* })
|
|
276
|
-
* ```
|
|
277
|
-
*/
|
|
278
|
-
export { createCommit, amendCommit, buildCommitObject, formatCommitMessage, parseCommitMessage, validateCommitMessage, isCommitSigned, extractCommitSignature, addSignatureToCommit, isEmptyCommit, getCurrentTimezone, formatTimestamp, parseTimestamp, createAuthor, type CommitAuthor, type SigningOptions, type CommitOptions, type AmendOptions, type FormatOptions, type CommitResult, type ObjectStore, } from './ops/commit';
|
|
279
|
-
/**
|
|
280
|
-
* Branch operations.
|
|
281
|
-
*
|
|
282
|
-
* @description
|
|
283
|
-
* Functions for branch management including:
|
|
284
|
-
* - Branch creation, deletion, and renaming
|
|
285
|
-
* - Branch listing and filtering
|
|
286
|
-
* - Upstream tracking configuration
|
|
287
|
-
* - Branch validation
|
|
288
|
-
*
|
|
289
|
-
* @example
|
|
290
|
-
* ```typescript
|
|
291
|
-
* import { createBranch, listBranches, getCurrentBranch } from 'gitx.do'
|
|
292
|
-
*
|
|
293
|
-
* // Create a new branch
|
|
294
|
-
* await createBranch(storage, 'feature/new-thing', { startPoint: 'main' })
|
|
295
|
-
*
|
|
296
|
-
* // List all branches
|
|
297
|
-
* const branches = await listBranches(storage, { includeRemotes: true })
|
|
298
|
-
*
|
|
299
|
-
* // Get current branch
|
|
300
|
-
* const current = await getCurrentBranch(storage)
|
|
301
|
-
* ```
|
|
302
|
-
*/
|
|
303
|
-
export { createBranch, deleteBranch, listBranches, renameBranch, checkoutBranch, getCurrentBranch, getBranchInfo, branchExists, setBranchTracking, getBranchTracking, removeBranchTracking, getDefaultBranch, setDefaultBranch, isValidBranchName, normalizeBranchName, type RefStore, type BranchOptions, type BranchCreateResult, type BranchDeleteOptions, type BranchDeleteResult, type BranchListOptions, type BranchInfo, type TrackingInfo, type BranchRenameOptions, type BranchRenameResult, type CheckoutOptions, type CheckoutResult, type SetTrackingResult, type RemoveTrackingResult, } from './ops/branch';
|
|
304
|
-
/**
|
|
305
|
-
* MCP tool definitions.
|
|
306
|
-
*
|
|
307
|
-
* @description
|
|
308
|
-
* Tools for integrating with AI assistants via MCP including:
|
|
309
|
-
* - Tool registration and discovery
|
|
310
|
-
* - Input validation
|
|
311
|
-
* - Tool invocation
|
|
312
|
-
*
|
|
313
|
-
* @example
|
|
314
|
-
* ```typescript
|
|
315
|
-
* import { gitTools, invokeTool, validateToolInput } from 'gitx.do'
|
|
316
|
-
*
|
|
317
|
-
* // List available tools
|
|
318
|
-
* const tools = gitTools
|
|
319
|
-
*
|
|
320
|
-
* // Validate and invoke a tool
|
|
321
|
-
* if (validateToolInput('git_status', input)) {
|
|
322
|
-
* const result = await invokeTool('git_status', input, context)
|
|
323
|
-
* }
|
|
324
|
-
* ```
|
|
325
|
-
*/
|
|
326
|
-
export { gitTools, registerTool, validateToolInput, invokeTool, listTools, getTool, type JSONSchema, type MCPToolResult, type MCPToolHandler, type MCPTool, } from './mcp/tools';
|
|
327
|
-
/**
|
|
328
|
-
* MCP adapter.
|
|
329
|
-
*
|
|
330
|
-
* @description
|
|
331
|
-
* Adapter for MCP protocol communication including:
|
|
332
|
-
* - Request/response handling
|
|
333
|
-
* - Capability negotiation
|
|
334
|
-
* - Error handling
|
|
335
|
-
*
|
|
336
|
-
* @example
|
|
337
|
-
* ```typescript
|
|
338
|
-
* import { createMCPAdapter, MCPError, MCPErrorCode } from 'gitx.do'
|
|
339
|
-
*
|
|
340
|
-
* const adapter = createMCPAdapter({
|
|
341
|
-
* name: 'gitx.do',
|
|
342
|
-
* version: '1.0.0'
|
|
343
|
-
* })
|
|
344
|
-
*
|
|
345
|
-
* const response = await adapter.handleRequest(request)
|
|
346
|
-
* ```
|
|
347
|
-
*/
|
|
348
|
-
export { MCPAdapter, createMCPAdapter, MCPError, MCPErrorCode, type MCPCapability, type MCPServerConfig, type MCPRequest, type MCPResponse, type MCPToolInfo, type MCPResourceInfo, type MCPPromptArgument, type MCPPromptInfo, } from './mcp/adapter';
|
|
349
|
-
/**
|
|
350
|
-
* Smart HTTP protocol handlers.
|
|
351
|
-
*
|
|
352
|
-
* @description
|
|
353
|
-
* Functions for handling Git Smart HTTP protocol including:
|
|
354
|
-
* - Info/refs endpoint handling
|
|
355
|
-
* - Upload-pack (fetch/clone)
|
|
356
|
-
* - Receive-pack (push)
|
|
357
|
-
* - Capability negotiation
|
|
358
|
-
*
|
|
359
|
-
* @example
|
|
360
|
-
* ```typescript
|
|
361
|
-
* import { handleInfoRefs, handleUploadPack, handleReceivePack } from 'gitx.do'
|
|
362
|
-
*
|
|
363
|
-
* // Handle info/refs request
|
|
364
|
-
* const refs = await handleInfoRefs(request, { service: 'git-upload-pack' })
|
|
365
|
-
*
|
|
366
|
-
* // Handle fetch request
|
|
367
|
-
* const pack = await handleUploadPack(request, storage)
|
|
368
|
-
* ```
|
|
369
|
-
*/
|
|
370
|
-
export { handleInfoRefs, handleUploadPack, handleReceivePack, formatRefAdvertisement, formatUploadPackResponse, formatReceivePackResponse, parseUploadPackRequest, parseReceivePackRequest, parseCapabilities, capabilitiesToStrings, validateContentType, createErrorResponse, CONTENT_TYPE_UPLOAD_PACK_ADVERTISEMENT, CONTENT_TYPE_RECEIVE_PACK_ADVERTISEMENT, CONTENT_TYPE_UPLOAD_PACK_REQUEST, CONTENT_TYPE_UPLOAD_PACK_RESULT, CONTENT_TYPE_RECEIVE_PACK_REQUEST, CONTENT_TYPE_RECEIVE_PACK_RESULT, ZERO_SHA, type GitService, type HTTPMethod, type GitRef, type ServerCapabilities, type SmartHTTPRequest, type SmartHTTPResponse, type SmartHTTPError, type RepositoryProvider, type RefUpdateCommand, type ReceivePackResult, } from './wire/smart-http';
|
|
371
|
-
/**
|
|
372
|
-
* Pkt-line encoding/decoding.
|
|
373
|
-
*
|
|
374
|
-
* @description
|
|
375
|
-
* Functions for Git pkt-line format handling including:
|
|
376
|
-
* - Line encoding/decoding
|
|
377
|
-
* - Flush and delimiter packets
|
|
378
|
-
* - Stream processing
|
|
379
|
-
*
|
|
380
|
-
* @example
|
|
381
|
-
* ```typescript
|
|
382
|
-
* import { encodePktLine, decodePktLine, FLUSH_PKT } from 'gitx.do'
|
|
383
|
-
*
|
|
384
|
-
* // Encode a line
|
|
385
|
-
* const encoded = encodePktLine('want abc123')
|
|
386
|
-
*
|
|
387
|
-
* // Decode a line
|
|
388
|
-
* const { line, remaining } = decodePktLine(data)
|
|
389
|
-
* ```
|
|
390
|
-
*/
|
|
391
|
-
export { encodePktLine, decodePktLine, encodeFlushPkt, encodeDelimPkt, pktLineStream, FLUSH_PKT, DELIM_PKT, MAX_PKT_LINE_DATA, } from './wire/pkt-line';
|
|
392
|
-
/**
|
|
393
|
-
* R2 pack storage.
|
|
394
|
-
*
|
|
395
|
-
* @description
|
|
396
|
-
* Functions for storing packfiles in Cloudflare R2 including:
|
|
397
|
-
* - Packfile upload/download
|
|
398
|
-
* - Multi-pack index management
|
|
399
|
-
* - Pack locking for concurrent access
|
|
400
|
-
*
|
|
401
|
-
* @example
|
|
402
|
-
* ```typescript
|
|
403
|
-
* import { R2PackStorage, uploadPackfile, listPackfiles } from 'gitx.do'
|
|
404
|
-
*
|
|
405
|
-
* const storage = new R2PackStorage(r2Bucket, { prefix: 'git/packs' })
|
|
406
|
-
*
|
|
407
|
-
* // Upload a packfile
|
|
408
|
-
* const result = await uploadPackfile(storage, packData, { withIndex: true })
|
|
409
|
-
*
|
|
410
|
-
* // List all packfiles
|
|
411
|
-
* const packs = await listPackfiles(storage)
|
|
412
|
-
* ```
|
|
413
|
-
*/
|
|
414
|
-
export { R2PackStorage, R2PackError, uploadPackfile, downloadPackfile, getPackfileMetadata, listPackfiles, deletePackfile, createMultiPackIndex, parseMultiPackIndex, lookupObjectInMultiPack, acquirePackLock, releasePackLock, type R2PackStorageOptions, type PackfileUploadResult, type PackfileMetadata, type DownloadPackfileOptions, type DownloadPackfileResult, type UploadPackfileOptions, type MultiPackIndexEntry, type MultiPackIndex, type PackLock, type AcquireLockOptions, type ListPackfilesResult, } from './storage/r2-pack';
|
|
415
|
-
/**
|
|
416
|
-
* Object index.
|
|
417
|
-
*
|
|
418
|
-
* @description
|
|
419
|
-
* Functions for tracking object locations across storage tiers including:
|
|
420
|
-
* - Location recording and lookup
|
|
421
|
-
* - Batch operations
|
|
422
|
-
* - Statistics
|
|
423
|
-
*
|
|
424
|
-
* @example
|
|
425
|
-
* ```typescript
|
|
426
|
-
* import { ObjectIndex, recordLocation, lookupLocation } from 'gitx.do'
|
|
427
|
-
*
|
|
428
|
-
* const index = new ObjectIndex(storage)
|
|
429
|
-
*
|
|
430
|
-
* // Record object location
|
|
431
|
-
* await recordLocation(index, sha, { tier: 'hot', location: 'local' })
|
|
432
|
-
*
|
|
433
|
-
* // Look up location
|
|
434
|
-
* const location = await lookupLocation(index, sha)
|
|
435
|
-
* ```
|
|
436
|
-
*/
|
|
437
|
-
export { ObjectIndex, recordLocation, lookupLocation, batchLookup, getStats, type StorageTier, type ObjectLocation, type ObjectIndexStats, type BatchLookupResult, type RecordLocationOptions, } from './storage/object-index';
|
|
438
|
-
/**
|
|
439
|
-
* Tier migration.
|
|
440
|
-
*
|
|
441
|
-
* @description
|
|
442
|
-
* Functions for managing object migration between storage tiers including:
|
|
443
|
-
* - Migration policies
|
|
444
|
-
* - Access tracking
|
|
445
|
-
* - Concurrent access handling
|
|
446
|
-
*
|
|
447
|
-
* @example
|
|
448
|
-
* ```typescript
|
|
449
|
-
* import { TierMigrator, AccessTracker } from 'gitx.do'
|
|
450
|
-
*
|
|
451
|
-
* const tracker = new AccessTracker(storage)
|
|
452
|
-
* await tracker.recordAccess(sha)
|
|
453
|
-
*
|
|
454
|
-
* const migrator = new TierMigrator(storage, { policy: 'lru' })
|
|
455
|
-
* await migrator.migrate(sha, 'hot', 'warm')
|
|
456
|
-
* ```
|
|
457
|
-
*/
|
|
458
|
-
export { TierMigrator, AccessTracker, MigrationError, MigrationRollback, ConcurrentAccessHandler, type MigrationPolicy, type MigrationState, type MigrationProgress, type MigrationJob, type MigrationResult, type BatchMigrationResult, type BatchMigrationOptions, type MigrateOptions, type MigrationHistoryEntry, type AccessPattern, type AccessStats, type ObjectIdentificationCriteria, type DecayOptions, type AccessMetrics, } from './tiered/migration';
|
|
459
|
-
/**
|
|
460
|
-
* Tiered read path.
|
|
461
|
-
*
|
|
462
|
-
* @description
|
|
463
|
-
* Functions for reading objects across storage tiers including:
|
|
464
|
-
* - Automatic tier traversal
|
|
465
|
-
* - Caching strategies
|
|
466
|
-
* - Read optimization
|
|
467
|
-
*
|
|
468
|
-
* @example
|
|
469
|
-
* ```typescript
|
|
470
|
-
* import { TieredReader, type TieredStorageConfig } from 'gitx.do'
|
|
471
|
-
*
|
|
472
|
-
* const config: TieredStorageConfig = {
|
|
473
|
-
* hot: { backend: hotBackend, maxSize: 1_000_000 },
|
|
474
|
-
* warm: { backend: warmBackend },
|
|
475
|
-
* cold: { backend: coldBackend }
|
|
476
|
-
* }
|
|
477
|
-
*
|
|
478
|
-
* const reader = new TieredReader(config)
|
|
479
|
-
* const result = await reader.read(sha)
|
|
480
|
-
* ```
|
|
481
|
-
*/
|
|
482
|
-
export { TieredReader, TieredObjectStoreStub, type StoredObject, type TierConfig, type TieredStorageConfig, type ReadResult, type TieredObjectStore, type HotTierBackend, type WarmTierBackend, type ColdTierBackend, } from './tiered/read-path';
|
|
24
|
+
export * from '@dotdo/gitx';
|
|
25
|
+
export { SchemaManager, SCHEMA_VERSION, SCHEMA_SQL, type DurableObjectStorage, } from './do/schema';
|
|
26
|
+
export { type DOState, type DOStorage, type ServiceBinding, type DONamespaceBinding, type DOStub, type R2Binding, type R2Object, type KVBinding, type PipelineBinding, type BaseEnv, type GitRepoDOEnv, type InitializeOptions, type ForkOptions, type ForkResult, type CompactResult, type WorkflowContext, type StoreAccessor, type TypedStoreAccessor, type FsCapability, GitRepoDOErrorCode, GitRepoDOError, LogLevel, type LogEntry, type Logger, type HealthCheckResponse, } from './do/types';
|
|
27
|
+
export { createLogger, createChildLogger, noopLogger, type LoggerOptions, } from './do/logger';
|
|
28
|
+
export { type McpToolResult, type McpToolSchema, type McpToolHandler, type McpTool, type ToolRegistry, type ToolContext, type ToolMiddleware, type InvokeToolOptions, registerTool, unregisterTool, invokeTool, getToolRegistry, clearToolRegistry, useMiddleware, clearMiddleware, gitTools, gitStatusToolSchema, gitLogToolSchema, gitDiffToolSchema, gitShowToolSchema, gitCommitToolSchema, gitBranchToolSchema, gitCheckoutToolSchema, gitAddToolSchema, gitResetToolSchema, gitMergeToolSchema, gitRebaseToolSchema, gitStashToolSchema, gitTagToolSchema, gitRemoteToolSchema, gitFetchToolSchema, gitPushToolSchema, gitPullToolSchema, gitCloneToolSchema, gitInitToolSchema, gitBlameToolSchema, gitAuthMiddleware, requireGitAuth, requireGitWrite, requireGitAdmin, type GitAuthContext, type GitAuthConfig, createGitMCPServer, type GitMCPServerOptions, } from './mcp/index';
|
|
483
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAMH,cAAc,aAAa,CAAA;AAM3B,OAAO,EACL,aAAa,EACb,cAAc,EACd,UAAU,EACV,KAAK,oBAAoB,GAC1B,MAAM,aAAa,CAAA;AAMpB,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,MAAM,EAGX,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,YAAY,EAGjB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAGlB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAGvB,KAAK,YAAY,EAGjB,kBAAkB,EAClB,cAAc,EAGd,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,MAAM,EAGX,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAA;AAMnB,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,KAAK,aAAa,GACnB,MAAM,aAAa,CAAA;AAMpB,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,YAAY,EACZ,cAAc,EACd,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,eAAe,EAEf,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAElB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,kBAAkB,EAClB,KAAK,mBAAmB,GACzB,MAAM,aAAa,CAAA"}
|