@enbox/gitd 0.0.1
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 +177 -0
- package/README.md +134 -0
- package/dist/esm/ci.js +76 -0
- package/dist/esm/ci.js.map +1 -0
- package/dist/esm/cli/agent.js +86 -0
- package/dist/esm/cli/agent.js.map +1 -0
- package/dist/esm/cli/commands/ci.js +278 -0
- package/dist/esm/cli/commands/ci.js.map +1 -0
- package/dist/esm/cli/commands/clone.js +77 -0
- package/dist/esm/cli/commands/clone.js.map +1 -0
- package/dist/esm/cli/commands/daemon.js +132 -0
- package/dist/esm/cli/commands/daemon.js.map +1 -0
- package/dist/esm/cli/commands/github-api.js +36 -0
- package/dist/esm/cli/commands/github-api.js.map +1 -0
- package/dist/esm/cli/commands/init.js +69 -0
- package/dist/esm/cli/commands/init.js.map +1 -0
- package/dist/esm/cli/commands/issue.js +293 -0
- package/dist/esm/cli/commands/issue.js.map +1 -0
- package/dist/esm/cli/commands/log.js +90 -0
- package/dist/esm/cli/commands/log.js.map +1 -0
- package/dist/esm/cli/commands/migrate.js +444 -0
- package/dist/esm/cli/commands/migrate.js.map +1 -0
- package/dist/esm/cli/commands/notification.js +141 -0
- package/dist/esm/cli/commands/notification.js.map +1 -0
- package/dist/esm/cli/commands/org.js +353 -0
- package/dist/esm/cli/commands/org.js.map +1 -0
- package/dist/esm/cli/commands/patch.js +375 -0
- package/dist/esm/cli/commands/patch.js.map +1 -0
- package/dist/esm/cli/commands/registry.js +501 -0
- package/dist/esm/cli/commands/registry.js.map +1 -0
- package/dist/esm/cli/commands/release.js +197 -0
- package/dist/esm/cli/commands/release.js.map +1 -0
- package/dist/esm/cli/commands/repo.js +148 -0
- package/dist/esm/cli/commands/repo.js.map +1 -0
- package/dist/esm/cli/commands/serve.js +148 -0
- package/dist/esm/cli/commands/serve.js.map +1 -0
- package/dist/esm/cli/commands/setup.js +92 -0
- package/dist/esm/cli/commands/setup.js.map +1 -0
- package/dist/esm/cli/commands/shim.js +75 -0
- package/dist/esm/cli/commands/shim.js.map +1 -0
- package/dist/esm/cli/commands/social.js +206 -0
- package/dist/esm/cli/commands/social.js.map +1 -0
- package/dist/esm/cli/commands/web.js +36 -0
- package/dist/esm/cli/commands/web.js.map +1 -0
- package/dist/esm/cli/commands/wiki.js +185 -0
- package/dist/esm/cli/commands/wiki.js.map +1 -0
- package/dist/esm/cli/flags.js +29 -0
- package/dist/esm/cli/flags.js.map +1 -0
- package/dist/esm/cli/main.js +331 -0
- package/dist/esm/cli/main.js.map +1 -0
- package/dist/esm/cli/repo-context.js +53 -0
- package/dist/esm/cli/repo-context.js.map +1 -0
- package/dist/esm/daemon/adapter.js +18 -0
- package/dist/esm/daemon/adapter.js.map +1 -0
- package/dist/esm/daemon/adapters/github.js +112 -0
- package/dist/esm/daemon/adapters/github.js.map +1 -0
- package/dist/esm/daemon/adapters/go.js +51 -0
- package/dist/esm/daemon/adapters/go.js.map +1 -0
- package/dist/esm/daemon/adapters/index.js +32 -0
- package/dist/esm/daemon/adapters/index.js.map +1 -0
- package/dist/esm/daemon/adapters/npm.js +51 -0
- package/dist/esm/daemon/adapters/npm.js.map +1 -0
- package/dist/esm/daemon/adapters/oci.js +62 -0
- package/dist/esm/daemon/adapters/oci.js.map +1 -0
- package/dist/esm/daemon/index.js +12 -0
- package/dist/esm/daemon/index.js.map +1 -0
- package/dist/esm/daemon/server.js +167 -0
- package/dist/esm/daemon/server.js.map +1 -0
- package/dist/esm/git-remote/credential-helper.js +106 -0
- package/dist/esm/git-remote/credential-helper.js.map +1 -0
- package/dist/esm/git-remote/credential-main.js +109 -0
- package/dist/esm/git-remote/credential-main.js.map +1 -0
- package/dist/esm/git-remote/index.js +10 -0
- package/dist/esm/git-remote/index.js.map +1 -0
- package/dist/esm/git-remote/main.js +78 -0
- package/dist/esm/git-remote/main.js.map +1 -0
- package/dist/esm/git-remote/parse-url.js +60 -0
- package/dist/esm/git-remote/parse-url.js.map +1 -0
- package/dist/esm/git-remote/resolve.js +175 -0
- package/dist/esm/git-remote/resolve.js.map +1 -0
- package/dist/esm/git-remote/service.js +82 -0
- package/dist/esm/git-remote/service.js.map +1 -0
- package/dist/esm/git-server/auth.js +211 -0
- package/dist/esm/git-server/auth.js.map +1 -0
- package/dist/esm/git-server/bundle-restore.js +180 -0
- package/dist/esm/git-server/bundle-restore.js.map +1 -0
- package/dist/esm/git-server/bundle-sync.js +233 -0
- package/dist/esm/git-server/bundle-sync.js.map +1 -0
- package/dist/esm/git-server/did-service.js +73 -0
- package/dist/esm/git-server/did-service.js.map +1 -0
- package/dist/esm/git-server/git-backend.js +186 -0
- package/dist/esm/git-server/git-backend.js.map +1 -0
- package/dist/esm/git-server/http-handler.js +295 -0
- package/dist/esm/git-server/http-handler.js.map +1 -0
- package/dist/esm/git-server/index.js +16 -0
- package/dist/esm/git-server/index.js.map +1 -0
- package/dist/esm/git-server/push-authorizer.js +62 -0
- package/dist/esm/git-server/push-authorizer.js.map +1 -0
- package/dist/esm/git-server/ref-sync.js +132 -0
- package/dist/esm/git-server/ref-sync.js.map +1 -0
- package/dist/esm/git-server/server.js +185 -0
- package/dist/esm/git-server/server.js.map +1 -0
- package/dist/esm/git-server/verify.js +109 -0
- package/dist/esm/git-server/verify.js.map +1 -0
- package/dist/esm/github-shim/helpers.js +273 -0
- package/dist/esm/github-shim/helpers.js.map +1 -0
- package/dist/esm/github-shim/index.js +13 -0
- package/dist/esm/github-shim/index.js.map +1 -0
- package/dist/esm/github-shim/issues.js +318 -0
- package/dist/esm/github-shim/issues.js.map +1 -0
- package/dist/esm/github-shim/pulls.js +423 -0
- package/dist/esm/github-shim/pulls.js.map +1 -0
- package/dist/esm/github-shim/releases.js +154 -0
- package/dist/esm/github-shim/releases.js.map +1 -0
- package/dist/esm/github-shim/repos.js +86 -0
- package/dist/esm/github-shim/repos.js.map +1 -0
- package/dist/esm/github-shim/server.js +351 -0
- package/dist/esm/github-shim/server.js.map +1 -0
- package/dist/esm/github-shim/users.js +61 -0
- package/dist/esm/github-shim/users.js.map +1 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/indexer/api.js +132 -0
- package/dist/esm/indexer/api.js.map +1 -0
- package/dist/esm/indexer/crawler.js +256 -0
- package/dist/esm/indexer/crawler.js.map +1 -0
- package/dist/esm/indexer/index.js +9 -0
- package/dist/esm/indexer/index.js.map +1 -0
- package/dist/esm/indexer/main.js +76 -0
- package/dist/esm/indexer/main.js.map +1 -0
- package/dist/esm/indexer/store.js +334 -0
- package/dist/esm/indexer/store.js.map +1 -0
- package/dist/esm/issues.js +133 -0
- package/dist/esm/issues.js.map +1 -0
- package/dist/esm/notifications.js +47 -0
- package/dist/esm/notifications.js.map +1 -0
- package/dist/esm/org.js +90 -0
- package/dist/esm/org.js.map +1 -0
- package/dist/esm/patches.js +136 -0
- package/dist/esm/patches.js.map +1 -0
- package/dist/esm/refs.js +54 -0
- package/dist/esm/refs.js.map +1 -0
- package/dist/esm/registry.js +81 -0
- package/dist/esm/registry.js.map +1 -0
- package/dist/esm/releases.js +78 -0
- package/dist/esm/releases.js.map +1 -0
- package/dist/esm/repo.js +150 -0
- package/dist/esm/repo.js.map +1 -0
- package/dist/esm/resolver/index.js +10 -0
- package/dist/esm/resolver/index.js.map +1 -0
- package/dist/esm/resolver/resolve.js +189 -0
- package/dist/esm/resolver/resolve.js.map +1 -0
- package/dist/esm/resolver/trust-chain.js +155 -0
- package/dist/esm/resolver/trust-chain.js.map +1 -0
- package/dist/esm/resolver/verify.js +186 -0
- package/dist/esm/resolver/verify.js.map +1 -0
- package/dist/esm/shims/go/index.js +9 -0
- package/dist/esm/shims/go/index.js.map +1 -0
- package/dist/esm/shims/go/proxy.js +275 -0
- package/dist/esm/shims/go/proxy.js.map +1 -0
- package/dist/esm/shims/go/server.js +70 -0
- package/dist/esm/shims/go/server.js.map +1 -0
- package/dist/esm/shims/index.js +15 -0
- package/dist/esm/shims/index.js.map +1 -0
- package/dist/esm/shims/npm/index.js +9 -0
- package/dist/esm/shims/npm/index.js.map +1 -0
- package/dist/esm/shims/npm/registry.js +234 -0
- package/dist/esm/shims/npm/registry.js.map +1 -0
- package/dist/esm/shims/npm/server.js +72 -0
- package/dist/esm/shims/npm/server.js.map +1 -0
- package/dist/esm/shims/oci/index.js +9 -0
- package/dist/esm/shims/oci/index.js.map +1 -0
- package/dist/esm/shims/oci/registry.js +276 -0
- package/dist/esm/shims/oci/registry.js.map +1 -0
- package/dist/esm/shims/oci/server.js +82 -0
- package/dist/esm/shims/oci/server.js.map +1 -0
- package/dist/esm/social.js +70 -0
- package/dist/esm/social.js.map +1 -0
- package/dist/esm/web/html.js +123 -0
- package/dist/esm/web/html.js.map +1 -0
- package/dist/esm/web/index.js +7 -0
- package/dist/esm/web/index.js.map +1 -0
- package/dist/esm/web/routes.js +420 -0
- package/dist/esm/web/routes.js.map +1 -0
- package/dist/esm/web/server.js +225 -0
- package/dist/esm/web/server.js.map +1 -0
- package/dist/esm/wiki.js +63 -0
- package/dist/esm/wiki.js.map +1 -0
- package/dist/types/ci.d.ts +203 -0
- package/dist/types/ci.d.ts.map +1 -0
- package/dist/types/cli/agent.d.ts +59 -0
- package/dist/types/cli/agent.d.ts.map +1 -0
- package/dist/types/cli/commands/ci.d.ts +16 -0
- package/dist/types/cli/commands/ci.d.ts.map +1 -0
- package/dist/types/cli/commands/clone.d.ts +13 -0
- package/dist/types/cli/commands/clone.d.ts.map +1 -0
- package/dist/types/cli/commands/daemon.d.ts +29 -0
- package/dist/types/cli/commands/daemon.d.ts.map +1 -0
- package/dist/types/cli/commands/github-api.d.ts +14 -0
- package/dist/types/cli/commands/github-api.d.ts.map +1 -0
- package/dist/types/cli/commands/init.d.ts +11 -0
- package/dist/types/cli/commands/init.d.ts.map +1 -0
- package/dist/types/cli/commands/issue.d.ts +16 -0
- package/dist/types/cli/commands/issue.d.ts.map +1 -0
- package/dist/types/cli/commands/log.d.ts +13 -0
- package/dist/types/cli/commands/log.d.ts.map +1 -0
- package/dist/types/cli/commands/migrate.d.ts +19 -0
- package/dist/types/cli/commands/migrate.d.ts.map +1 -0
- package/dist/types/cli/commands/notification.d.ts +16 -0
- package/dist/types/cli/commands/notification.d.ts.map +1 -0
- package/dist/types/cli/commands/org.d.ts +19 -0
- package/dist/types/cli/commands/org.d.ts.map +1 -0
- package/dist/types/cli/commands/patch.d.ts +17 -0
- package/dist/types/cli/commands/patch.d.ts.map +1 -0
- package/dist/types/cli/commands/registry.d.ts +25 -0
- package/dist/types/cli/commands/registry.d.ts.map +1 -0
- package/dist/types/cli/commands/release.d.ts +13 -0
- package/dist/types/cli/commands/release.d.ts.map +1 -0
- package/dist/types/cli/commands/repo.d.ts +15 -0
- package/dist/types/cli/commands/repo.d.ts.map +1 -0
- package/dist/types/cli/commands/serve.d.ts +22 -0
- package/dist/types/cli/commands/serve.d.ts.map +1 -0
- package/dist/types/cli/commands/setup.d.ts +16 -0
- package/dist/types/cli/commands/setup.d.ts.map +1 -0
- package/dist/types/cli/commands/shim.d.ts +16 -0
- package/dist/types/cli/commands/shim.d.ts.map +1 -0
- package/dist/types/cli/commands/social.d.ts +19 -0
- package/dist/types/cli/commands/social.d.ts.map +1 -0
- package/dist/types/cli/commands/web.d.ts +14 -0
- package/dist/types/cli/commands/web.d.ts.map +1 -0
- package/dist/types/cli/commands/wiki.d.ts +14 -0
- package/dist/types/cli/commands/wiki.d.ts.map +1 -0
- package/dist/types/cli/flags.d.ts +16 -0
- package/dist/types/cli/flags.d.ts.map +1 -0
- package/dist/types/cli/main.d.ts +69 -0
- package/dist/types/cli/main.d.ts.map +1 -0
- package/dist/types/cli/repo-context.d.ts +30 -0
- package/dist/types/cli/repo-context.d.ts.map +1 -0
- package/dist/types/daemon/adapter.d.ts +74 -0
- package/dist/types/daemon/adapter.d.ts.map +1 -0
- package/dist/types/daemon/adapters/github.d.ts +10 -0
- package/dist/types/daemon/adapters/github.d.ts.map +1 -0
- package/dist/types/daemon/adapters/go.d.ts +10 -0
- package/dist/types/daemon/adapters/go.d.ts.map +1 -0
- package/dist/types/daemon/adapters/index.d.ts +22 -0
- package/dist/types/daemon/adapters/index.d.ts.map +1 -0
- package/dist/types/daemon/adapters/npm.d.ts +10 -0
- package/dist/types/daemon/adapters/npm.d.ts.map +1 -0
- package/dist/types/daemon/adapters/oci.d.ts +10 -0
- package/dist/types/daemon/adapters/oci.d.ts.map +1 -0
- package/dist/types/daemon/index.d.ts +14 -0
- package/dist/types/daemon/index.d.ts.map +1 -0
- package/dist/types/daemon/server.d.ts +55 -0
- package/dist/types/daemon/server.d.ts.map +1 -0
- package/dist/types/git-remote/credential-helper.d.ts +49 -0
- package/dist/types/git-remote/credential-helper.d.ts.map +1 -0
- package/dist/types/git-remote/credential-main.d.ts +24 -0
- package/dist/types/git-remote/credential-main.d.ts.map +1 -0
- package/dist/types/git-remote/index.d.ts +10 -0
- package/dist/types/git-remote/index.d.ts.map +1 -0
- package/dist/types/git-remote/main.d.ts +23 -0
- package/dist/types/git-remote/main.d.ts.map +1 -0
- package/dist/types/git-remote/parse-url.d.ts +32 -0
- package/dist/types/git-remote/parse-url.d.ts.map +1 -0
- package/dist/types/git-remote/resolve.d.ts +30 -0
- package/dist/types/git-remote/resolve.d.ts.map +1 -0
- package/dist/types/git-remote/service.d.ts +75 -0
- package/dist/types/git-remote/service.d.ts.map +1 -0
- package/dist/types/git-server/auth.d.ts +129 -0
- package/dist/types/git-server/auth.d.ts.map +1 -0
- package/dist/types/git-server/bundle-restore.d.ts +48 -0
- package/dist/types/git-server/bundle-restore.d.ts.map +1 -0
- package/dist/types/git-server/bundle-sync.d.ts +90 -0
- package/dist/types/git-server/bundle-sync.d.ts.map +1 -0
- package/dist/types/git-server/did-service.d.ts +26 -0
- package/dist/types/git-server/did-service.d.ts.map +1 -0
- package/dist/types/git-server/git-backend.d.ts +84 -0
- package/dist/types/git-server/git-backend.d.ts.map +1 -0
- package/dist/types/git-server/http-handler.d.ts +73 -0
- package/dist/types/git-server/http-handler.d.ts.map +1 -0
- package/dist/types/git-server/index.d.ts +16 -0
- package/dist/types/git-server/index.d.ts.map +1 -0
- package/dist/types/git-server/push-authorizer.d.ts +38 -0
- package/dist/types/git-server/push-authorizer.d.ts.map +1 -0
- package/dist/types/git-server/ref-sync.d.ts +52 -0
- package/dist/types/git-server/ref-sync.d.ts.map +1 -0
- package/dist/types/git-server/server.d.ts +70 -0
- package/dist/types/git-server/server.d.ts.map +1 -0
- package/dist/types/git-server/verify.d.ts +12 -0
- package/dist/types/git-server/verify.d.ts.map +1 -0
- package/dist/types/github-shim/helpers.d.ts +108 -0
- package/dist/types/github-shim/helpers.d.ts.map +1 -0
- package/dist/types/github-shim/index.d.ts +15 -0
- package/dist/types/github-shim/index.d.ts.map +1 -0
- package/dist/types/github-shim/issues.d.ts +24 -0
- package/dist/types/github-shim/issues.d.ts.map +1 -0
- package/dist/types/github-shim/pulls.d.ts +31 -0
- package/dist/types/github-shim/pulls.d.ts.map +1 -0
- package/dist/types/github-shim/releases.d.ts +18 -0
- package/dist/types/github-shim/releases.d.ts.map +1 -0
- package/dist/types/github-shim/repos.d.ts +21 -0
- package/dist/types/github-shim/repos.d.ts.map +1 -0
- package/dist/types/github-shim/server.d.ts +53 -0
- package/dist/types/github-shim/server.d.ts.map +1 -0
- package/dist/types/github-shim/users.d.ts +17 -0
- package/dist/types/github-shim/users.d.ts.map +1 -0
- package/dist/types/index.d.ts +26 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/indexer/api.d.ts +32 -0
- package/dist/types/indexer/api.d.ts.map +1 -0
- package/dist/types/indexer/crawler.d.ts +72 -0
- package/dist/types/indexer/crawler.d.ts.map +1 -0
- package/dist/types/indexer/index.d.ts +12 -0
- package/dist/types/indexer/index.d.ts.map +1 -0
- package/dist/types/indexer/main.d.ts +21 -0
- package/dist/types/indexer/main.d.ts.map +1 -0
- package/dist/types/indexer/store.d.ts +168 -0
- package/dist/types/indexer/store.d.ts.map +1 -0
- package/dist/types/issues.d.ts +395 -0
- package/dist/types/issues.d.ts.map +1 -0
- package/dist/types/notifications.d.ts +93 -0
- package/dist/types/notifications.d.ts.map +1 -0
- package/dist/types/org.d.ts +232 -0
- package/dist/types/org.d.ts.map +1 -0
- package/dist/types/patches.d.ts +410 -0
- package/dist/types/patches.d.ts.map +1 -0
- package/dist/types/refs.d.ts +114 -0
- package/dist/types/refs.d.ts.map +1 -0
- package/dist/types/registry.d.ts +212 -0
- package/dist/types/registry.d.ts.map +1 -0
- package/dist/types/releases.d.ts +204 -0
- package/dist/types/releases.d.ts.map +1 -0
- package/dist/types/repo.d.ts +450 -0
- package/dist/types/repo.d.ts.map +1 -0
- package/dist/types/resolver/index.d.ts +13 -0
- package/dist/types/resolver/index.d.ts.map +1 -0
- package/dist/types/resolver/resolve.d.ts +80 -0
- package/dist/types/resolver/resolve.d.ts.map +1 -0
- package/dist/types/resolver/trust-chain.d.ts +54 -0
- package/dist/types/resolver/trust-chain.d.ts.map +1 -0
- package/dist/types/resolver/verify.d.ts +62 -0
- package/dist/types/resolver/verify.d.ts.map +1 -0
- package/dist/types/shims/go/index.d.ts +11 -0
- package/dist/types/shims/go/index.d.ts.map +1 -0
- package/dist/types/shims/go/proxy.d.ts +51 -0
- package/dist/types/shims/go/proxy.d.ts.map +1 -0
- package/dist/types/shims/go/server.d.ts +23 -0
- package/dist/types/shims/go/server.d.ts.map +1 -0
- package/dist/types/shims/index.d.ts +18 -0
- package/dist/types/shims/index.d.ts.map +1 -0
- package/dist/types/shims/npm/index.d.ts +11 -0
- package/dist/types/shims/npm/index.d.ts.map +1 -0
- package/dist/types/shims/npm/registry.d.ts +46 -0
- package/dist/types/shims/npm/registry.d.ts.map +1 -0
- package/dist/types/shims/npm/server.d.ts +23 -0
- package/dist/types/shims/npm/server.d.ts.map +1 -0
- package/dist/types/shims/oci/index.d.ts +11 -0
- package/dist/types/shims/oci/index.d.ts.map +1 -0
- package/dist/types/shims/oci/registry.d.ts +56 -0
- package/dist/types/shims/oci/registry.d.ts.map +1 -0
- package/dist/types/shims/oci/server.d.ts +23 -0
- package/dist/types/shims/oci/server.d.ts.map +1 -0
- package/dist/types/social.d.ts +162 -0
- package/dist/types/social.d.ts.map +1 -0
- package/dist/types/web/html.d.ts +23 -0
- package/dist/types/web/html.d.ts.map +1 -0
- package/dist/types/web/index.d.ts +8 -0
- package/dist/types/web/index.d.ts.map +1 -0
- package/dist/types/web/routes.d.ts +21 -0
- package/dist/types/web/routes.d.ts.map +1 -0
- package/dist/types/web/server.d.ts +38 -0
- package/dist/types/web/server.d.ts.map +1 -0
- package/dist/types/wiki.d.ts +143 -0
- package/dist/types/wiki.d.ts.map +1 -0
- package/package.json +108 -0
- package/schemas/ci/check-run.json +23 -0
- package/schemas/ci/check-suite.json +23 -0
- package/schemas/issues/assignment.json +17 -0
- package/schemas/issues/comment.json +14 -0
- package/schemas/issues/issue.json +20 -0
- package/schemas/issues/label.json +17 -0
- package/schemas/issues/reaction.json +14 -0
- package/schemas/issues/status-change.json +14 -0
- package/schemas/notifications/notification.json +20 -0
- package/schemas/org/org-member.json +17 -0
- package/schemas/org/org.json +26 -0
- package/schemas/org/team-member.json +17 -0
- package/schemas/org/team.json +17 -0
- package/schemas/patches/merge-result.json +14 -0
- package/schemas/patches/patch-status-change.json +14 -0
- package/schemas/patches/patch.json +20 -0
- package/schemas/patches/review-comment.json +17 -0
- package/schemas/patches/review.json +14 -0
- package/schemas/patches/revision.json +30 -0
- package/schemas/refs/git-ref.json +32 -0
- package/schemas/registry/attestation.json +23 -0
- package/schemas/registry/package-version.json +23 -0
- package/schemas/registry/package.json +32 -0
- package/schemas/releases/release.json +17 -0
- package/schemas/repo/collaborator.json +17 -0
- package/schemas/repo/repo.json +35 -0
- package/schemas/repo/settings.json +39 -0
- package/schemas/repo/topic.json +14 -0
- package/schemas/repo/webhook.json +26 -0
- package/schemas/social/activity.json +23 -0
- package/schemas/social/follow.json +17 -0
- package/schemas/social/star.json +20 -0
- package/schemas/wiki/wiki-history.json +20 -0
- package/schemas/wiki/wiki-page.json +17 -0
- package/src/ci.ts +118 -0
- package/src/cli/agent.ts +117 -0
- package/src/cli/commands/ci.ts +300 -0
- package/src/cli/commands/clone.ts +78 -0
- package/src/cli/commands/daemon.ts +129 -0
- package/src/cli/commands/github-api.ts +30 -0
- package/src/cli/commands/init.ts +69 -0
- package/src/cli/commands/issue.ts +321 -0
- package/src/cli/commands/log.ts +106 -0
- package/src/cli/commands/migrate.ts +525 -0
- package/src/cli/commands/notification.ts +148 -0
- package/src/cli/commands/org.ts +381 -0
- package/src/cli/commands/patch.ts +413 -0
- package/src/cli/commands/registry.ts +542 -0
- package/src/cli/commands/release.ts +189 -0
- package/src/cli/commands/repo.ts +160 -0
- package/src/cli/commands/serve.ts +153 -0
- package/src/cli/commands/setup.ts +97 -0
- package/src/cli/commands/shim.ts +79 -0
- package/src/cli/commands/social.ts +221 -0
- package/src/cli/commands/web.ts +30 -0
- package/src/cli/commands/wiki.ts +199 -0
- package/src/cli/flags.ts +28 -0
- package/src/cli/main.ts +350 -0
- package/src/cli/repo-context.ts +55 -0
- package/src/daemon/adapter.ts +95 -0
- package/src/daemon/adapters/github.ts +86 -0
- package/src/daemon/adapters/go.ts +47 -0
- package/src/daemon/adapters/index.ts +36 -0
- package/src/daemon/adapters/npm.ts +47 -0
- package/src/daemon/adapters/oci.ts +59 -0
- package/src/daemon/index.ts +16 -0
- package/src/daemon/server.ts +204 -0
- package/src/git-remote/credential-helper.ts +114 -0
- package/src/git-remote/credential-main.ts +118 -0
- package/src/git-remote/index.ts +10 -0
- package/src/git-remote/main.ts +74 -0
- package/src/git-remote/parse-url.ts +81 -0
- package/src/git-remote/resolve.ts +207 -0
- package/src/git-remote/service.ts +126 -0
- package/src/git-server/auth.ts +308 -0
- package/src/git-server/bundle-restore.ts +217 -0
- package/src/git-server/bundle-sync.ts +300 -0
- package/src/git-server/did-service.ts +77 -0
- package/src/git-server/git-backend.ts +222 -0
- package/src/git-server/http-handler.ts +386 -0
- package/src/git-server/index.ts +16 -0
- package/src/git-server/push-authorizer.ts +77 -0
- package/src/git-server/ref-sync.ts +166 -0
- package/src/git-server/server.ts +236 -0
- package/src/git-server/verify.ts +116 -0
- package/src/github-shim/helpers.ts +311 -0
- package/src/github-shim/index.ts +35 -0
- package/src/github-shim/issues.ts +389 -0
- package/src/github-shim/pulls.ts +500 -0
- package/src/github-shim/releases.ts +185 -0
- package/src/github-shim/repos.ts +95 -0
- package/src/github-shim/server.ts +334 -0
- package/src/github-shim/users.ts +63 -0
- package/src/index.ts +26 -0
- package/src/indexer/api.ts +162 -0
- package/src/indexer/crawler.ts +290 -0
- package/src/indexer/index.ts +22 -0
- package/src/indexer/main.ts +83 -0
- package/src/indexer/store.ts +408 -0
- package/src/issues.ts +200 -0
- package/src/notifications.ts +80 -0
- package/src/org.ts +147 -0
- package/src/patches.ts +203 -0
- package/src/refs.ts +94 -0
- package/src/registry.ts +132 -0
- package/src/releases.ts +124 -0
- package/src/repo.ts +234 -0
- package/src/resolver/index.ts +42 -0
- package/src/resolver/resolve.ts +244 -0
- package/src/resolver/trust-chain.ts +217 -0
- package/src/resolver/verify.ts +237 -0
- package/src/shims/go/index.ts +14 -0
- package/src/shims/go/proxy.ts +336 -0
- package/src/shims/go/server.ts +82 -0
- package/src/shims/index.ts +20 -0
- package/src/shims/npm/index.ts +14 -0
- package/src/shims/npm/registry.ts +288 -0
- package/src/shims/npm/server.ts +84 -0
- package/src/shims/oci/index.ts +14 -0
- package/src/shims/oci/registry.ts +334 -0
- package/src/shims/oci/server.ts +94 -0
- package/src/social.ts +116 -0
- package/src/web/html.ts +120 -0
- package/src/web/index.ts +8 -0
- package/src/web/routes.ts +449 -0
- package/src/web/server.ts +256 -0
- package/src/wiki.ts +102 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# gitd
|
|
2
|
+
|
|
3
|
+
> **Research preview** — this project is under active development and not yet ready for production use. APIs, protocols, and CLI commands may change without notice.
|
|
4
|
+
|
|
5
|
+
A decentralized forge (GitHub alternative) built on [DWN](https://github.com/enboxorg/enbox) protocols. Git is already decentralized — `gitd` decentralizes the rest: issues, pull requests, code review, CI status, releases, package registry, and social features.
|
|
6
|
+
|
|
7
|
+
## Why
|
|
8
|
+
|
|
9
|
+
GitHub centralizes the social layer around git: identity, access control, issue tracking, code review, package hosting, and discovery all depend on a single provider. `gitd` replaces that layer with DWN protocols, where:
|
|
10
|
+
|
|
11
|
+
- **Identity is self-sovereign** — DIDs replace GitHub usernames. Portable across providers.
|
|
12
|
+
- **Every user owns their data** — your issues, stars, and contributions live on your DWN, not a central server.
|
|
13
|
+
- **Access control is protocol-level** — roles (maintainer, triager, contributor) are DWN records with cryptographic authorization.
|
|
14
|
+
- **Git transport is DID-addressed** — `git clone did::did:dht:abc123/my-repo` resolves via the DID document.
|
|
15
|
+
- **Packages are DID-scoped** — no global namespace squatting, cryptographic provenance by default.
|
|
16
|
+
- **Repos are self-healing** — git bundles stored as DWN records enable any host to restore a repo on demand.
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
curl -fsSL https://gitd.sh/install | bash
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Installs prebuilt binaries for Linux, macOS, and Windows (Git Bash/WSL). Three binaries are installed:
|
|
25
|
+
|
|
26
|
+
| Binary | Purpose |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `gitd` | Main CLI — forge commands, servers, shims |
|
|
29
|
+
| `git-remote-did` | Git remote helper — resolves `did::` URLs to git endpoints |
|
|
30
|
+
| `git-remote-did-credential` | Git credential helper — generates DID-signed push tokens |
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Or install via bun/npm
|
|
34
|
+
bun add -g @enbox/gitd
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## CLI
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Setup & transport
|
|
41
|
+
gitd setup # Configure git for DID-based remotes
|
|
42
|
+
gitd clone did:dht:abc/repo # Clone via DID resolution
|
|
43
|
+
gitd init my-repo # Create a repo record + bare git repo
|
|
44
|
+
gitd serve # Start git transport server
|
|
45
|
+
|
|
46
|
+
# Issues
|
|
47
|
+
gitd issue create "Bug report"
|
|
48
|
+
gitd issue show 1
|
|
49
|
+
gitd issue comment 1 "On it"
|
|
50
|
+
gitd issue close 1
|
|
51
|
+
gitd issue list
|
|
52
|
+
|
|
53
|
+
# Patches (pull requests)
|
|
54
|
+
gitd patch create "Add feature"
|
|
55
|
+
gitd patch show 1
|
|
56
|
+
gitd patch comment 1 "LGTM"
|
|
57
|
+
gitd patch merge 1
|
|
58
|
+
gitd patch list
|
|
59
|
+
|
|
60
|
+
# Releases
|
|
61
|
+
gitd release create v1.0.0
|
|
62
|
+
gitd release show v1.0.0
|
|
63
|
+
gitd release list
|
|
64
|
+
|
|
65
|
+
# CI / Check suites
|
|
66
|
+
gitd ci create <commit>
|
|
67
|
+
gitd ci run <suite-id> lint
|
|
68
|
+
gitd ci update <run-id> --status completed --conclusion success
|
|
69
|
+
gitd ci status
|
|
70
|
+
|
|
71
|
+
# Package registry
|
|
72
|
+
gitd registry publish my-pkg 1.0.0 ./pkg.tgz
|
|
73
|
+
gitd registry info my-pkg
|
|
74
|
+
gitd registry verify my-pkg 1.0.0 --trusted did:jwk:build-svc
|
|
75
|
+
|
|
76
|
+
# Wiki, orgs, social, notifications
|
|
77
|
+
gitd wiki create getting-started "Getting Started"
|
|
78
|
+
gitd org create my-org
|
|
79
|
+
gitd social star <did>
|
|
80
|
+
gitd notification list
|
|
81
|
+
|
|
82
|
+
# GitHub migration
|
|
83
|
+
gitd migrate all owner/repo # Import repo, issues, PRs, releases
|
|
84
|
+
|
|
85
|
+
# Web UI & services
|
|
86
|
+
gitd web # Read-only web UI
|
|
87
|
+
gitd indexer # Repo discovery + search service
|
|
88
|
+
gitd daemon # Unified shim daemon (GitHub API, npm, Go, OCI)
|
|
89
|
+
gitd whoami # Show connected DID
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Git Transport
|
|
93
|
+
|
|
94
|
+
- **Smart HTTP server** — `git clone` and `git push` via native git protocol
|
|
95
|
+
- **DID-signed push auth** — pushers prove DID ownership, server checks DWN role records
|
|
96
|
+
- **Ref mirroring** — branch/tag refs sync to DWN records after each push
|
|
97
|
+
- **Bundle sync** — git bundles sync to DWN records after each push (full, incremental, and squash)
|
|
98
|
+
- **Cold-start restore** — repos auto-restore from DWN bundles when a host has no local copy
|
|
99
|
+
|
|
100
|
+
## Web UI
|
|
101
|
+
|
|
102
|
+
Server-rendered HTML interface for browsing any DWN-enabled git repo. Enter a DID to browse their repos, issues, patches, releases, and wiki pages. No client-side JavaScript.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
gitd web --port 3000
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Compatibility Shims
|
|
109
|
+
|
|
110
|
+
Local proxy servers that translate native tool protocols into DWN queries, so existing tools work without modification:
|
|
111
|
+
|
|
112
|
+
- **GitHub API** (`gitd github-api`) — GitHub REST API v3 compatible; works with `gh` CLI, VS Code extensions, CI systems
|
|
113
|
+
- **npm** (`gitd shim npm`) — `npm install --registry=http://localhost:4873 @did:dht:abc/my-pkg`
|
|
114
|
+
- **Go** (`gitd shim go`) — `GOPROXY=http://localhost:4874 go get did.enbox.org/did:dht:abc/my-mod`
|
|
115
|
+
- **OCI/Docker** (`gitd shim oci`) — `docker pull localhost:5555/did:dht:abc/my-image:v1.0.0`
|
|
116
|
+
|
|
117
|
+
Run all shims in one process with `gitd daemon`, or start them individually.
|
|
118
|
+
|
|
119
|
+
## Architecture
|
|
120
|
+
|
|
121
|
+
See [ARCHITECTURE.md](./ARCHITECTURE.md) for a high-level overview of protocols, transport, and system design. See [PLAN.md](./PLAN.md) for the full implementation plan with detailed protocol definitions and roadmap.
|
|
122
|
+
|
|
123
|
+
## Development
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
bun install # Install dependencies
|
|
127
|
+
bun run build # Build (clean + tsc)
|
|
128
|
+
bun run lint # Lint (ESLint, zero warnings)
|
|
129
|
+
bun test .spec.ts # Run all tests
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
Apache-2.0
|
package/dist/esm/ci.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forge CI/CD Protocol — check suites, check runs, and build artifacts.
|
|
3
|
+
*
|
|
4
|
+
* CI bots are DID-bearing agents added as maintainers to the repository.
|
|
5
|
+
* Check runs are mutable (status transitions: queued -> in_progress -> completed).
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import { defineProtocol } from '@enbox/api';
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
// Protocol definition
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
export const ForgeCiDefinition = {
|
|
14
|
+
protocol: 'https://enbox.org/protocols/forge/ci',
|
|
15
|
+
published: true,
|
|
16
|
+
uses: {
|
|
17
|
+
repo: 'https://enbox.org/protocols/forge/repo',
|
|
18
|
+
},
|
|
19
|
+
types: {
|
|
20
|
+
checkSuite: {
|
|
21
|
+
schema: 'https://enbox.org/schemas/forge/check-suite',
|
|
22
|
+
dataFormats: ['application/json'],
|
|
23
|
+
},
|
|
24
|
+
checkRun: {
|
|
25
|
+
schema: 'https://enbox.org/schemas/forge/check-run',
|
|
26
|
+
dataFormats: ['application/json'],
|
|
27
|
+
},
|
|
28
|
+
artifact: {
|
|
29
|
+
dataFormats: ['application/octet-stream', 'application/gzip'],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
structure: {
|
|
33
|
+
repo: {
|
|
34
|
+
$ref: 'repo:repo',
|
|
35
|
+
checkSuite: {
|
|
36
|
+
$actions: [
|
|
37
|
+
{ role: 'repo:repo/contributor', can: ['read'] },
|
|
38
|
+
{ role: 'repo:repo/maintainer', can: ['create', 'update'] },
|
|
39
|
+
],
|
|
40
|
+
$tags: {
|
|
41
|
+
$requiredTags: ['commitSha', 'status'],
|
|
42
|
+
$allowUndefinedTags: false,
|
|
43
|
+
commitSha: { type: 'string' },
|
|
44
|
+
status: { type: 'string', enum: ['queued', 'in_progress', 'completed'] },
|
|
45
|
+
conclusion: { type: 'string', enum: ['success', 'failure', 'cancelled', 'skipped'] },
|
|
46
|
+
branch: { type: 'string' },
|
|
47
|
+
},
|
|
48
|
+
checkRun: {
|
|
49
|
+
$actions: [
|
|
50
|
+
{ role: 'repo:repo/contributor', can: ['read'] },
|
|
51
|
+
{ who: 'author', of: 'repo/checkSuite', can: ['create', 'update'] },
|
|
52
|
+
],
|
|
53
|
+
$tags: {
|
|
54
|
+
$requiredTags: ['name', 'status'],
|
|
55
|
+
$allowUndefinedTags: false,
|
|
56
|
+
name: { type: 'string' },
|
|
57
|
+
status: { type: 'string', enum: ['queued', 'in_progress', 'completed'] },
|
|
58
|
+
conclusion: { type: 'string', enum: ['success', 'failure', 'cancelled', 'skipped'] },
|
|
59
|
+
},
|
|
60
|
+
artifact: {
|
|
61
|
+
$actions: [
|
|
62
|
+
{ role: 'repo:repo/contributor', can: ['read'] },
|
|
63
|
+
{ who: 'author', of: 'repo/checkSuite', can: ['create'] },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
// Typed protocol export
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
/** Typed Forge CI protocol for use with `dwn.using()`. */
|
|
75
|
+
export const ForgeCiProtocol = defineProtocol(ForgeCiDefinition, {});
|
|
76
|
+
//# sourceMappingURL=ci.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci.js","sourceRoot":"","sources":["../../src/ci.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAgC5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAI,sCAAsC;IAClD,SAAS,EAAG,IAAI;IAChB,IAAI,EAAQ;QACV,IAAI,EAAE,wCAAwC;KAC/C;IACD,KAAK,EAAE;QACL,UAAU,EAAE;YACV,MAAM,EAAQ,6CAA6C;YAC3D,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,QAAQ,EAAE;YACR,MAAM,EAAQ,2CAA2C;YACzD,WAAW,EAAG,CAAC,k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AAE,QAAQ,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE;wBACtF,UAAU,EAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE;qBAC/F;oBAED,QAAQ,EAAE;wBACR,QAAQ,EAAE;4BACR,EAAE,IAAI,EAAE,uBAAuB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE;4BAChD,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,iBAAiB,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE;yBAC1D;qBACF;iBACF;aACF;SACF;KACF;CACoC,CAAC;AAExC,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,0DAA0D;AAC1D,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAC3C,iBAAiB,EACjB,EAAsB,CACvB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent bootstrapping — connects to (or creates) a local Web5 agent.
|
|
3
|
+
*
|
|
4
|
+
* On first run the agent vault is initialized with a password, a DID is
|
|
5
|
+
* created, and the forge protocols are installed. Subsequent runs unlock
|
|
6
|
+
* the existing vault and return a ready-to-use `TypedWeb5` instance for
|
|
7
|
+
* each protocol.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
import { Web5 } from '@enbox/api';
|
|
21
|
+
import { ForgeCiProtocol } from '../ci.js';
|
|
22
|
+
import { ForgeIssuesProtocol } from '../issues.js';
|
|
23
|
+
import { ForgeNotificationsProtocol } from '../notifications.js';
|
|
24
|
+
import { ForgeOrgProtocol } from '../org.js';
|
|
25
|
+
import { ForgePatchesProtocol } from '../patches.js';
|
|
26
|
+
import { ForgeRefsProtocol } from '../refs.js';
|
|
27
|
+
import { ForgeRegistryProtocol } from '../registry.js';
|
|
28
|
+
import { ForgeReleasesProtocol } from '../releases.js';
|
|
29
|
+
import { ForgeRepoProtocol } from '../repo.js';
|
|
30
|
+
import { ForgeSocialProtocol } from '../social.js';
|
|
31
|
+
import { ForgeWikiProtocol } from '../wiki.js';
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
// Agent bootstrap
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
/**
|
|
36
|
+
* Connect to the local Web5 agent, initializing on first launch.
|
|
37
|
+
*
|
|
38
|
+
* The agent's persistent data lives under `dataPath` (default:
|
|
39
|
+
* `~/.gitd/agent`). Sync is disabled — the CLI operates against
|
|
40
|
+
* the local DWN only.
|
|
41
|
+
*/
|
|
42
|
+
export function connectAgent(password) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
const { web5, did, recoveryPhrase } = yield Web5.connect({
|
|
45
|
+
password,
|
|
46
|
+
sync: 'off',
|
|
47
|
+
});
|
|
48
|
+
if (recoveryPhrase) {
|
|
49
|
+
console.log('');
|
|
50
|
+
console.log(' Recovery phrase (save this — it cannot be shown again):');
|
|
51
|
+
console.log(` ${recoveryPhrase}`);
|
|
52
|
+
console.log('');
|
|
53
|
+
}
|
|
54
|
+
// Bind typed protocol handles.
|
|
55
|
+
const repo = web5.using(ForgeRepoProtocol);
|
|
56
|
+
const refs = web5.using(ForgeRefsProtocol);
|
|
57
|
+
const issues = web5.using(ForgeIssuesProtocol);
|
|
58
|
+
const patches = web5.using(ForgePatchesProtocol);
|
|
59
|
+
const ci = web5.using(ForgeCiProtocol);
|
|
60
|
+
const releases = web5.using(ForgeReleasesProtocol);
|
|
61
|
+
const registry = web5.using(ForgeRegistryProtocol);
|
|
62
|
+
const social = web5.using(ForgeSocialProtocol);
|
|
63
|
+
const notifications = web5.using(ForgeNotificationsProtocol);
|
|
64
|
+
const wiki = web5.using(ForgeWikiProtocol);
|
|
65
|
+
const org = web5.using(ForgeOrgProtocol);
|
|
66
|
+
// Install / verify all protocols (idempotent).
|
|
67
|
+
// Repo protocol requires encryption: webhook has encryptionRequired: true,
|
|
68
|
+
// and bundle records are optionally encrypted based on repo visibility.
|
|
69
|
+
yield repo.configure({ encryption: true });
|
|
70
|
+
yield refs.configure();
|
|
71
|
+
yield issues.configure();
|
|
72
|
+
yield patches.configure();
|
|
73
|
+
yield ci.configure();
|
|
74
|
+
yield releases.configure();
|
|
75
|
+
yield registry.configure();
|
|
76
|
+
yield social.configure();
|
|
77
|
+
yield notifications.configure();
|
|
78
|
+
yield wiki.configure();
|
|
79
|
+
yield org.configure();
|
|
80
|
+
return {
|
|
81
|
+
did, repo, refs, issues, patches, ci, releases,
|
|
82
|
+
registry, social, notifications, wiki, org, web5,
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/cli/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;;;;;;;;;;AAIH,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAclC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,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