codexgpt 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.example.md +20 -0
- package/CHANGELOG.md +342 -0
- package/CHATGPT_PROMPT.md +12 -0
- package/CLOUDFLARED_VERIFIED_INSTALL.md +94 -0
- package/CODEX_PROMPT.md +12 -0
- package/CONTRIBUTING.md +62 -0
- package/DOMAIN_SETUP.md +275 -0
- package/FAQ.md +366 -0
- package/FAQ_ZH.md +329 -0
- package/LICENSE +21 -0
- package/PUBLIC_LAUNCH_CHECKLIST.md +111 -0
- package/README.md +490 -0
- package/README_ZH.md +747 -0
- package/SECURITY.md +295 -0
- package/config.example.env +103 -0
- package/dist/access/fullAccessLease.js +148 -0
- package/dist/access/fullAccessLease.js.map +1 -0
- package/dist/access/protectedRoots.js +122 -0
- package/dist/access/protectedRoots.js.map +1 -0
- package/dist/access/rootAdmission.js +347 -0
- package/dist/access/rootAdmission.js.map +1 -0
- package/dist/analysis/cache.js +27 -0
- package/dist/analysis/cache.js.map +1 -0
- package/dist/analysis/classify.js +102 -0
- package/dist/analysis/classify.js.map +1 -0
- package/dist/analysis/extract.js +139 -0
- package/dist/analysis/extract.js.map +1 -0
- package/dist/analysis/graph.js +22 -0
- package/dist/analysis/graph.js.map +1 -0
- package/dist/analysis/impact.js +167 -0
- package/dist/analysis/impact.js.map +1 -0
- package/dist/analysis/index.js +215 -0
- package/dist/analysis/index.js.map +1 -0
- package/dist/analysis/inventory.js +51 -0
- package/dist/analysis/inventory.js.map +1 -0
- package/dist/analysis/providers.js +24 -0
- package/dist/analysis/providers.js.map +1 -0
- package/dist/analysis/rank.js +27 -0
- package/dist/analysis/rank.js.map +1 -0
- package/dist/analysis/types.js +8 -0
- package/dist/analysis/types.js.map +1 -0
- package/dist/audit/canonicalJson.js +79 -0
- package/dist/audit/canonicalJson.js.map +1 -0
- package/dist/audit/diagnostics.js +128 -0
- package/dist/audit/diagnostics.js.map +1 -0
- package/dist/audit/index.js +12 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/lifecycleV3.js +53 -0
- package/dist/audit/lifecycleV3.js.map +1 -0
- package/dist/audit/lifecycleV4.js +70 -0
- package/dist/audit/lifecycleV4.js.map +1 -0
- package/dist/audit/lock.js +195 -0
- package/dist/audit/lock.js.map +1 -0
- package/dist/audit/queryTool.js +120 -0
- package/dist/audit/queryTool.js.map +1 -0
- package/dist/audit/runtime.js +48 -0
- package/dist/audit/runtime.js.map +1 -0
- package/dist/audit/schemas.js +640 -0
- package/dist/audit/schemas.js.map +1 -0
- package/dist/audit/store.js +1309 -0
- package/dist/audit/store.js.map +1 -0
- package/dist/audit/transactionParticipant.js +45 -0
- package/dist/audit/transactionParticipant.js.map +1 -0
- package/dist/audit/types.js +11 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/auth/audit.js +44 -0
- package/dist/auth/audit.js.map +1 -0
- package/dist/auth/authorizationStore.js +333 -0
- package/dist/auth/authorizationStore.js.map +1 -0
- package/dist/auth/challenges.js +25 -0
- package/dist/auth/challenges.js.map +1 -0
- package/dist/auth/clientStore.js +469 -0
- package/dist/auth/clientStore.js.map +1 -0
- package/dist/auth/cloudflareConfig.js +112 -0
- package/dist/auth/cloudflareConfig.js.map +1 -0
- package/dist/auth/configuration.js +167 -0
- package/dist/auth/configuration.js.map +1 -0
- package/dist/auth/credentialStore.js +65 -0
- package/dist/auth/credentialStore.js.map +1 -0
- package/dist/auth/deploymentLock.js +220 -0
- package/dist/auth/deploymentLock.js.map +1 -0
- package/dist/auth/deploymentRegistry.js +149 -0
- package/dist/auth/deploymentRegistry.js.map +1 -0
- package/dist/auth/errors.js +26 -0
- package/dist/auth/errors.js.map +1 -0
- package/dist/auth/grantStore.js +307 -0
- package/dist/auth/grantStore.js.map +1 -0
- package/dist/auth/index.js +39 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/keyManager.js +148 -0
- package/dist/auth/keyManager.js.map +1 -0
- package/dist/auth/localAdminSession.js +173 -0
- package/dist/auth/localAdminSession.js.map +1 -0
- package/dist/auth/metadata.js +69 -0
- package/dist/auth/metadata.js.map +1 -0
- package/dist/auth/oauthProvider.js +589 -0
- package/dist/auth/oauthProvider.js.map +1 -0
- package/dist/auth/ownerApproval.js +51 -0
- package/dist/auth/ownerApproval.js.map +1 -0
- package/dist/auth/policyIdentity.js +189 -0
- package/dist/auth/policyIdentity.js.map +1 -0
- package/dist/auth/rateLimits.js +66 -0
- package/dist/auth/rateLimits.js.map +1 -0
- package/dist/auth/recovery.js +275 -0
- package/dist/auth/recovery.js.map +1 -0
- package/dist/auth/requestContext.js +34 -0
- package/dist/auth/requestContext.js.map +1 -0
- package/dist/auth/resourceMiddleware.js +147 -0
- package/dist/auth/resourceMiddleware.js.map +1 -0
- package/dist/auth/runtimeStatus.js +51 -0
- package/dist/auth/runtimeStatus.js.map +1 -0
- package/dist/auth/schemas.js +84 -0
- package/dist/auth/schemas.js.map +1 -0
- package/dist/auth/stateStore.js +468 -0
- package/dist/auth/stateStore.js.map +1 -0
- package/dist/auth/tokenService.js +631 -0
- package/dist/auth/tokenService.js.map +1 -0
- package/dist/auth/toolSecurity.js +108 -0
- package/dist/auth/toolSecurity.js.map +1 -0
- package/dist/auth/types.js +6 -0
- package/dist/auth/types.js.map +1 -0
- package/dist/auth/windowsDpapi.js +193 -0
- package/dist/auth/windowsDpapi.js.map +1 -0
- package/dist/bashOps.js +292 -0
- package/dist/bashOps.js.map +1 -0
- package/dist/capabilitiesOps.js +412 -0
- package/dist/capabilitiesOps.js.map +1 -0
- package/dist/changesets/crypto.js +92 -0
- package/dist/changesets/crypto.js.map +1 -0
- package/dist/changesets/index.js +9 -0
- package/dist/changesets/index.js.map +1 -0
- package/dist/changesets/moveStore.js +237 -0
- package/dist/changesets/moveStore.js.map +1 -0
- package/dist/changesets/moveUndo.js +386 -0
- package/dist/changesets/moveUndo.js.map +1 -0
- package/dist/changesets/schemas.js +234 -0
- package/dist/changesets/schemas.js.map +1 -0
- package/dist/changesets/store.js +573 -0
- package/dist/changesets/store.js.map +1 -0
- package/dist/changesets/types.js +9 -0
- package/dist/changesets/types.js.map +1 -0
- package/dist/changesets/undo.js +525 -0
- package/dist/changesets/undo.js.map +1 -0
- package/dist/changesets/unifiedUndo.js +31 -0
- package/dist/changesets/unifiedUndo.js.map +1 -0
- package/dist/cliEnvironment.js +85 -0
- package/dist/cliEnvironment.js.map +1 -0
- package/dist/codexSessions.js +733 -0
- package/dist/codexSessions.js.map +1 -0
- package/dist/codexgptSupertool.js +216 -0
- package/dist/codexgptSupertool.js.map +1 -0
- package/dist/codexproSupertool.js +204 -0
- package/dist/codexproSupertool.js.map +1 -0
- package/dist/config.js +733 -0
- package/dist/config.js.map +1 -0
- package/dist/control/localApprovalClient.js +287 -0
- package/dist/control/localApprovalClient.js.map +1 -0
- package/dist/control/localApprovalServer.js +466 -0
- package/dist/control/localApprovalServer.js.map +1 -0
- package/dist/control/runtime.js +178 -0
- package/dist/control/runtime.js.map +1 -0
- package/dist/control/schemas.js +184 -0
- package/dist/control/schemas.js.map +1 -0
- package/dist/control/windowsLocalControl.js +348 -0
- package/dist/control/windowsLocalControl.js.map +1 -0
- package/dist/fsOps.js +541 -0
- package/dist/fsOps.js.map +1 -0
- package/dist/git/admission.js +26 -0
- package/dist/git/admission.js.map +1 -0
- package/dist/git/branchService.js +51 -0
- package/dist/git/branchService.js.map +1 -0
- package/dist/git/capabilities.js +143 -0
- package/dist/git/capabilities.js.map +1 -0
- package/dist/git/commitService.js +344 -0
- package/dist/git/commitService.js.map +1 -0
- package/dist/git/durableState.js +151 -0
- package/dist/git/durableState.js.map +1 -0
- package/dist/git/execution.js +451 -0
- package/dist/git/execution.js.map +1 -0
- package/dist/git/fileTransaction.js +50 -0
- package/dist/git/fileTransaction.js.map +1 -0
- package/dist/git/indexService.js +421 -0
- package/dist/git/indexService.js.map +1 -0
- package/dist/git/integrations.js +653 -0
- package/dist/git/integrations.js.map +1 -0
- package/dist/git/locks.js +287 -0
- package/dist/git/locks.js.map +1 -0
- package/dist/git/mutationContext.js +92 -0
- package/dist/git/mutationContext.js.map +1 -0
- package/dist/git/mutationJournal.js +91 -0
- package/dist/git/mutationJournal.js.map +1 -0
- package/dist/git/mutationService.js +352 -0
- package/dist/git/mutationService.js.map +1 -0
- package/dist/git/normalization.js +57 -0
- package/dist/git/normalization.js.map +1 -0
- package/dist/git/objectQuarantine.js +243 -0
- package/dist/git/objectQuarantine.js.map +1 -0
- package/dist/git/opaqueRecordStore.js +187 -0
- package/dist/git/opaqueRecordStore.js.map +1 -0
- package/dist/git/operationStore.js +287 -0
- package/dist/git/operationStore.js.map +1 -0
- package/dist/git/parsers.js +311 -0
- package/dist/git/parsers.js.map +1 -0
- package/dist/git/privateIndex.js +79 -0
- package/dist/git/privateIndex.js.map +1 -0
- package/dist/git/productionBootstrap.js +39 -0
- package/dist/git/productionBootstrap.js.map +1 -0
- package/dist/git/readService.js +846 -0
- package/dist/git/readService.js.map +1 -0
- package/dist/git/recovery.js +417 -0
- package/dist/git/recovery.js.map +1 -0
- package/dist/git/repositoryIdentity.js +611 -0
- package/dist/git/repositoryIdentity.js.map +1 -0
- package/dist/git/repositoryStore.js +237 -0
- package/dist/git/repositoryStore.js.map +1 -0
- package/dist/git/resources.js +113 -0
- package/dist/git/resources.js.map +1 -0
- package/dist/git/restoreService.js +178 -0
- package/dist/git/restoreService.js.map +1 -0
- package/dist/git/reviewToken.js +86 -0
- package/dist/git/reviewToken.js.map +1 -0
- package/dist/git/stashService.js +566 -0
- package/dist/git/stashService.js.map +1 -0
- package/dist/git/stateToken.js +139 -0
- package/dist/git/stateToken.js.map +1 -0
- package/dist/gitOps.js +147 -0
- package/dist/gitOps.js.map +1 -0
- package/dist/guard.js +608 -0
- package/dist/guard.js.map +1 -0
- package/dist/guidance/diagnostics.js +14 -0
- package/dist/guidance/diagnostics.js.map +1 -0
- package/dist/guidance/instructions.js +167 -0
- package/dist/guidance/instructions.js.map +1 -0
- package/dist/guidance/mode.js +18 -0
- package/dist/guidance/mode.js.map +1 -0
- package/dist/guidance/openaiSkillMetadata.js +29 -0
- package/dist/guidance/openaiSkillMetadata.js.map +1 -0
- package/dist/guidance/safeTextReader.js +171 -0
- package/dist/guidance/safeTextReader.js.map +1 -0
- package/dist/guidance/skillCatalog.js +70 -0
- package/dist/guidance/skillCatalog.js.map +1 -0
- package/dist/guidance/skillDiscovery.js +353 -0
- package/dist/guidance/skillDiscovery.js.map +1 -0
- package/dist/guidance/skillMetadata.js +115 -0
- package/dist/guidance/skillMetadata.js.map +1 -0
- package/dist/guidance/skillResources.js +146 -0
- package/dist/guidance/skillResources.js.map +1 -0
- package/dist/handoffOps.js +449 -0
- package/dist/handoffOps.js.map +1 -0
- package/dist/http/localAdminApp.js +203 -0
- package/dist/http/localAdminApp.js.map +1 -0
- package/dist/http/oauthMcpRuntime.js +294 -0
- package/dist/http/oauthMcpRuntime.js.map +1 -0
- package/dist/http/publicApp.js +350 -0
- package/dist/http/publicApp.js.map +1 -0
- package/dist/http/securityHeaders.js +11 -0
- package/dist/http/securityHeaders.js.map +1 -0
- package/dist/http.js +2076 -0
- package/dist/http.js.map +1 -0
- package/dist/moves/engine.js +1079 -0
- package/dist/moves/engine.js.map +1 -0
- package/dist/moves/index.js +6 -0
- package/dist/moves/index.js.map +1 -0
- package/dist/moves/planner.js +270 -0
- package/dist/moves/planner.js.map +1 -0
- package/dist/moves/recovery.js +557 -0
- package/dist/moves/recovery.js.map +1 -0
- package/dist/moves/service.js +300 -0
- package/dist/moves/service.js.map +1 -0
- package/dist/moves/types.js +11 -0
- package/dist/moves/types.js.map +1 -0
- package/dist/mutations/index.js +4 -0
- package/dist/mutations/index.js.map +1 -0
- package/dist/mutations/lifecycle.js +165 -0
- package/dist/mutations/lifecycle.js.map +1 -0
- package/dist/mutations/localService.js +163 -0
- package/dist/mutations/localService.js.map +1 -0
- package/dist/mutations/runtime.js +322 -0
- package/dist/mutations/runtime.js.map +1 -0
- package/dist/mutations/types.js +2 -0
- package/dist/mutations/types.js.map +1 -0
- package/dist/mutations/writers.js +360 -0
- package/dist/mutations/writers.js.map +1 -0
- package/dist/patchOps.js +420 -0
- package/dist/patchOps.js.map +1 -0
- package/dist/policy/approval.js +306 -0
- package/dist/policy/approval.js.map +1 -0
- package/dist/policy/audit.js +88 -0
- package/dist/policy/audit.js.map +1 -0
- package/dist/policy/authorizationFacts.js +187 -0
- package/dist/policy/authorizationFacts.js.map +1 -0
- package/dist/policy/compat.js +104 -0
- package/dist/policy/compat.js.map +1 -0
- package/dist/policy/context.js +31 -0
- package/dist/policy/context.js.map +1 -0
- package/dist/policy/enforcement.js +46 -0
- package/dist/policy/enforcement.js.map +1 -0
- package/dist/policy/evaluator.js +338 -0
- package/dist/policy/evaluator.js.map +1 -0
- package/dist/policy/executionCapabilities.js +80 -0
- package/dist/policy/executionCapabilities.js.map +1 -0
- package/dist/policy/executionResources.js +192 -0
- package/dist/policy/executionResources.js.map +1 -0
- package/dist/policy/fullAccessResources.js +23 -0
- package/dist/policy/fullAccessResources.js.map +1 -0
- package/dist/policy/hardPolicy.js +50 -0
- package/dist/policy/hardPolicy.js.map +1 -0
- package/dist/policy/identity.js +142 -0
- package/dist/policy/identity.js.map +1 -0
- package/dist/policy/integration.js +331 -0
- package/dist/policy/integration.js.map +1 -0
- package/dist/policy/pendingApprovals.js +301 -0
- package/dist/policy/pendingApprovals.js.map +1 -0
- package/dist/policy/profileStore.js +367 -0
- package/dist/policy/profileStore.js.map +1 -0
- package/dist/policy/resources.js +249 -0
- package/dist/policy/resources.js.map +1 -0
- package/dist/policy/runtime.js +713 -0
- package/dist/policy/runtime.js.map +1 -0
- package/dist/policy/schemas.js +625 -0
- package/dist/policy/schemas.js.map +1 -0
- package/dist/policy/toolPolicy.js +141 -0
- package/dist/policy/toolPolicy.js.map +1 -0
- package/dist/policy/transport.js +10 -0
- package/dist/policy/transport.js.map +1 -0
- package/dist/policy/types.js +31 -0
- package/dist/policy/types.js.map +1 -0
- package/dist/proContext.js +675 -0
- package/dist/proContext.js.map +1 -0
- package/dist/process/authority.js +18 -0
- package/dist/process/authority.js.map +1 -0
- package/dist/process/backendDiscovery.js +83 -0
- package/dist/process/backendDiscovery.js.map +1 -0
- package/dist/process/commandCompiler.js +71 -0
- package/dist/process/commandCompiler.js.map +1 -0
- package/dist/process/outputCursor.js +67 -0
- package/dist/process/outputCursor.js.map +1 -0
- package/dist/process/outputQuota.js +94 -0
- package/dist/process/outputQuota.js.map +1 -0
- package/dist/process/outputRing.js +138 -0
- package/dist/process/outputRing.js.map +1 -0
- package/dist/process/processAuditCoordinator.js +52 -0
- package/dist/process/processAuditCoordinator.js.map +1 -0
- package/dist/process/processManager.js +311 -0
- package/dist/process/processManager.js.map +1 -0
- package/dist/process/runCommand.js +332 -0
- package/dist/process/runCommand.js.map +1 -0
- package/dist/process/streamingRedactor.js +105 -0
- package/dist/process/streamingRedactor.js.map +1 -0
- package/dist/process/types.js +2 -0
- package/dist/process/types.js.map +1 -0
- package/dist/process/windowsHostClient.js +604 -0
- package/dist/process/windowsHostClient.js.map +1 -0
- package/dist/process/windowsHostProtocol.js +270 -0
- package/dist/process/windowsHostProtocol.js.map +1 -0
- package/dist/process/windowsPersistentBackend.js +263 -0
- package/dist/process/windowsPersistentBackend.js.map +1 -0
- package/dist/productionRuntime.js +907 -0
- package/dist/productionRuntime.js.map +1 -0
- package/dist/profileStore.js +231 -0
- package/dist/profileStore.js.map +1 -0
- package/dist/redact.js +124 -0
- package/dist/redact.js.map +1 -0
- package/dist/searchOps.js +186 -0
- package/dist/searchOps.js.map +1 -0
- package/dist/selfTestOps.js +786 -0
- package/dist/selfTestOps.js.map +1 -0
- package/dist/semantic/budgets.js +12 -0
- package/dist/semantic/budgets.js.map +1 -0
- package/dist/semantic/builtin/typescriptAssets.js +68 -0
- package/dist/semantic/builtin/typescriptAssets.js.map +1 -0
- package/dist/semantic/builtin/typescriptProvider.js +211 -0
- package/dist/semantic/builtin/typescriptProvider.js.map +1 -0
- package/dist/semantic/builtin/typescriptWorker.js +365 -0
- package/dist/semantic/builtin/typescriptWorker.js.map +1 -0
- package/dist/semantic/diffPreview.js +36 -0
- package/dist/semantic/diffPreview.js.map +1 -0
- package/dist/semantic/index.js +11 -0
- package/dist/semantic/index.js.map +1 -0
- package/dist/semantic/manager.js +522 -0
- package/dist/semantic/manager.js.map +1 -0
- package/dist/semantic/positions.js +86 -0
- package/dist/semantic/positions.js.map +1 -0
- package/dist/semantic/previewStore.js +276 -0
- package/dist/semantic/previewStore.js.map +1 -0
- package/dist/semantic/projectResolver.js +309 -0
- package/dist/semantic/projectResolver.js.map +1 -0
- package/dist/semantic/sourceSnapshot.js +54 -0
- package/dist/semantic/sourceSnapshot.js.map +1 -0
- package/dist/semantic/status.js +46 -0
- package/dist/semantic/status.js.map +1 -0
- package/dist/semantic/types.js +2 -0
- package/dist/semantic/types.js.map +1 -0
- package/dist/server.js +8676 -0
- package/dist/server.js.map +1 -0
- package/dist/stdio.js +64 -0
- package/dist/stdio.js.map +1 -0
- package/dist/toolCardWidget.js +2000 -0
- package/dist/toolCardWidget.js.map +1 -0
- package/dist/tools/contracts/catalog.js +111 -0
- package/dist/tools/contracts/catalog.js.map +1 -0
- package/dist/tools/contracts/index.js +8 -0
- package/dist/tools/contracts/index.js.map +1 -0
- package/dist/tools/contracts/registration.js +27 -0
- package/dist/tools/contracts/registration.js.map +1 -0
- package/dist/tools/contracts/schemas.js +11 -0
- package/dist/tools/contracts/schemas.js.map +1 -0
- package/dist/tools/contracts/types.js +2 -0
- package/dist/tools/contracts/types.js.map +1 -0
- package/dist/tools/contracts/v3.js +76 -0
- package/dist/tools/contracts/v3.js.map +1 -0
- package/dist/tools/contracts/v4.js +39 -0
- package/dist/tools/contracts/v4.js.map +1 -0
- package/dist/tools/contracts/v5.js +20 -0
- package/dist/tools/contracts/v5.js.map +1 -0
- package/dist/tools/phase3dServer.js +350 -0
- package/dist/tools/phase3dServer.js.map +1 -0
- package/dist/tools/schemas/applyPatch.js +388 -0
- package/dist/tools/schemas/applyPatch.js.map +1 -0
- package/dist/tools/schemas/bash.js +202 -0
- package/dist/tools/schemas/bash.js.map +1 -0
- package/dist/tools/schemas/closeWorkspace.js +105 -0
- package/dist/tools/schemas/closeWorkspace.js.map +1 -0
- package/dist/tools/schemas/codexContext.js +402 -0
- package/dist/tools/schemas/codexContext.js.map +1 -0
- package/dist/tools/schemas/codexSessions.js +328 -0
- package/dist/tools/schemas/codexSessions.js.map +1 -0
- package/dist/tools/schemas/codexgpt.js +1068 -0
- package/dist/tools/schemas/codexgpt.js.map +1 -0
- package/dist/tools/schemas/codexgptInventory.js +359 -0
- package/dist/tools/schemas/codexgptInventory.js.map +1 -0
- package/dist/tools/schemas/codexgptSelfTest.js +563 -0
- package/dist/tools/schemas/codexgptSelfTest.js.map +1 -0
- package/dist/tools/schemas/codexpro.js +917 -0
- package/dist/tools/schemas/codexpro.js.map +1 -0
- package/dist/tools/schemas/codexproInventory.js +352 -0
- package/dist/tools/schemas/codexproInventory.js.map +1 -0
- package/dist/tools/schemas/codexproSelfTest.js +546 -0
- package/dist/tools/schemas/codexproSelfTest.js.map +1 -0
- package/dist/tools/schemas/common.js +21 -0
- package/dist/tools/schemas/common.js.map +1 -0
- package/dist/tools/schemas/createTaskWorktree.js +51 -0
- package/dist/tools/schemas/createTaskWorktree.js.map +1 -0
- package/dist/tools/schemas/edit.js +321 -0
- package/dist/tools/schemas/edit.js.map +1 -0
- package/dist/tools/schemas/execution.js +330 -0
- package/dist/tools/schemas/execution.js.map +1 -0
- package/dist/tools/schemas/exportProContext.js +370 -0
- package/dist/tools/schemas/exportProContext.js.map +1 -0
- package/dist/tools/schemas/getTaskWorktree.js +19 -0
- package/dist/tools/schemas/getTaskWorktree.js.map +1 -0
- package/dist/tools/schemas/gitBranch.js +42 -0
- package/dist/tools/schemas/gitBranch.js.map +1 -0
- package/dist/tools/schemas/gitCommit.js +40 -0
- package/dist/tools/schemas/gitCommit.js.map +1 -0
- package/dist/tools/schemas/gitCreateBranch.js +22 -0
- package/dist/tools/schemas/gitCreateBranch.js.map +1 -0
- package/dist/tools/schemas/gitDiff.js +222 -0
- package/dist/tools/schemas/gitDiff.js.map +1 -0
- package/dist/tools/schemas/gitLog.js +41 -0
- package/dist/tools/schemas/gitLog.js.map +1 -0
- package/dist/tools/schemas/gitRestore.js +47 -0
- package/dist/tools/schemas/gitRestore.js.map +1 -0
- package/dist/tools/schemas/gitStage.js +33 -0
- package/dist/tools/schemas/gitStage.js.map +1 -0
- package/dist/tools/schemas/gitStash.js +102 -0
- package/dist/tools/schemas/gitStash.js.map +1 -0
- package/dist/tools/schemas/gitStatus.js +226 -0
- package/dist/tools/schemas/gitStatus.js.map +1 -0
- package/dist/tools/schemas/gitV4Common.js +205 -0
- package/dist/tools/schemas/gitV4Common.js.map +1 -0
- package/dist/tools/schemas/guidance.js +40 -0
- package/dist/tools/schemas/guidance.js.map +1 -0
- package/dist/tools/schemas/handoffToAgent.js +276 -0
- package/dist/tools/schemas/handoffToAgent.js.map +1 -0
- package/dist/tools/schemas/handoffToCodex.js +137 -0
- package/dist/tools/schemas/handoffToCodex.js.map +1 -0
- package/dist/tools/schemas/inspectWorkspace.js +379 -0
- package/dist/tools/schemas/inspectWorkspace.js.map +1 -0
- package/dist/tools/schemas/listTaskWorktrees.js +21 -0
- package/dist/tools/schemas/listTaskWorktrees.js.map +1 -0
- package/dist/tools/schemas/listWorkspaces.js +134 -0
- package/dist/tools/schemas/listWorkspaces.js.map +1 -0
- package/dist/tools/schemas/loadSkill.js +619 -0
- package/dist/tools/schemas/loadSkill.js.map +1 -0
- package/dist/tools/schemas/mergeTaskWorktree.js +105 -0
- package/dist/tools/schemas/mergeTaskWorktree.js.map +1 -0
- package/dist/tools/schemas/movePaths.js +175 -0
- package/dist/tools/schemas/movePaths.js.map +1 -0
- package/dist/tools/schemas/openCurrentWorkspace.js +174 -0
- package/dist/tools/schemas/openCurrentWorkspace.js.map +1 -0
- package/dist/tools/schemas/openFullAccessWorkspace.js +81 -0
- package/dist/tools/schemas/openFullAccessWorkspace.js.map +1 -0
- package/dist/tools/schemas/openWorkspace.js +193 -0
- package/dist/tools/schemas/openWorkspace.js.map +1 -0
- package/dist/tools/schemas/queryAuditEvents.js +193 -0
- package/dist/tools/schemas/queryAuditEvents.js.map +1 -0
- package/dist/tools/schemas/read.js +199 -0
- package/dist/tools/schemas/read.js.map +1 -0
- package/dist/tools/schemas/readCodexSession.js +353 -0
- package/dist/tools/schemas/readCodexSession.js.map +1 -0
- package/dist/tools/schemas/readHandoff.js +446 -0
- package/dist/tools/schemas/readHandoff.js.map +1 -0
- package/dist/tools/schemas/removeTaskWorktree.js +40 -0
- package/dist/tools/schemas/removeTaskWorktree.js.map +1 -0
- package/dist/tools/schemas/search.js +235 -0
- package/dist/tools/schemas/search.js.map +1 -0
- package/dist/tools/schemas/semantic.js +195 -0
- package/dist/tools/schemas/semantic.js.map +1 -0
- package/dist/tools/schemas/serverConfig.js +157 -0
- package/dist/tools/schemas/serverConfig.js.map +1 -0
- package/dist/tools/schemas/showChanges.js +283 -0
- package/dist/tools/schemas/showChanges.js.map +1 -0
- package/dist/tools/schemas/transactionResult.js +11 -0
- package/dist/tools/schemas/transactionResult.js.map +1 -0
- package/dist/tools/schemas/tree.js +136 -0
- package/dist/tools/schemas/tree.js.map +1 -0
- package/dist/tools/schemas/undoChangeSet.js +152 -0
- package/dist/tools/schemas/undoChangeSet.js.map +1 -0
- package/dist/tools/schemas/waitForHandoff.js +462 -0
- package/dist/tools/schemas/waitForHandoff.js.map +1 -0
- package/dist/tools/schemas/workspaceSnapshot.js +145 -0
- package/dist/tools/schemas/workspaceSnapshot.js.map +1 -0
- package/dist/tools/schemas/write.js +285 -0
- package/dist/tools/schemas/write.js.map +1 -0
- package/dist/transactions/atomicFs.js +438 -0
- package/dist/transactions/atomicFs.js.map +1 -0
- package/dist/transactions/atomicStateFile.js +190 -0
- package/dist/transactions/atomicStateFile.js.map +1 -0
- package/dist/transactions/engine.js +574 -0
- package/dist/transactions/engine.js.map +1 -0
- package/dist/transactions/index.js +12 -0
- package/dist/transactions/index.js.map +1 -0
- package/dist/transactions/installation.js +158 -0
- package/dist/transactions/installation.js.map +1 -0
- package/dist/transactions/manifestV2Store.js +96 -0
- package/dist/transactions/manifestV2Store.js.map +1 -0
- package/dist/transactions/participantRecovery.js +98 -0
- package/dist/transactions/participantRecovery.js.map +1 -0
- package/dist/transactions/recovery.js +513 -0
- package/dist/transactions/recovery.js.map +1 -0
- package/dist/transactions/schemas.js +365 -0
- package/dist/transactions/schemas.js.map +1 -0
- package/dist/transactions/stateRoot.js +63 -0
- package/dist/transactions/stateRoot.js.map +1 -0
- package/dist/transactions/types.js +11 -0
- package/dist/transactions/types.js.map +1 -0
- package/dist/transactions/workspaceLock.js +201 -0
- package/dist/transactions/workspaceLock.js.map +1 -0
- package/dist/workspaceOps.js +924 -0
- package/dist/workspaceOps.js.map +1 -0
- package/dist/worktrees/candidateWorkspace.js +566 -0
- package/dist/worktrees/candidateWorkspace.js.map +1 -0
- package/dist/worktrees/manager.js +258 -0
- package/dist/worktrees/manager.js.map +1 -0
- package/dist/worktrees/materializer.js +60 -0
- package/dist/worktrees/materializer.js.map +1 -0
- package/dist/worktrees/mergeExecute.js +498 -0
- package/dist/worktrees/mergeExecute.js.map +1 -0
- package/dist/worktrees/mergePlanStore.js +247 -0
- package/dist/worktrees/mergePlanStore.js.map +1 -0
- package/dist/worktrees/mergePrepare.js +709 -0
- package/dist/worktrees/mergePrepare.js.map +1 -0
- package/dist/worktrees/recovery.js +294 -0
- package/dist/worktrees/recovery.js.map +1 -0
- package/dist/worktrees/remove.js +296 -0
- package/dist/worktrees/remove.js.map +1 -0
- package/dist/worktrees/remover.js +57 -0
- package/dist/worktrees/remover.js.map +1 -0
- package/dist/worktrees/root.js +47 -0
- package/dist/worktrees/root.js.map +1 -0
- package/dist/worktrees/service.js +245 -0
- package/dist/worktrees/service.js.map +1 -0
- package/dist/worktrees/store.js +156 -0
- package/dist/worktrees/store.js.map +1 -0
- package/dist/worktrees/treeManifest.js +106 -0
- package/dist/worktrees/treeManifest.js.map +1 -0
- package/dist/worktrees/verificationReceipts.js +215 -0
- package/dist/worktrees/verificationReceipts.js.map +1 -0
- package/dist/worktrees/verificationTerminal.js +23 -0
- package/dist/worktrees/verificationTerminal.js.map +1 -0
- package/dist/worktrees/workspaceAuthority.js +64 -0
- package/dist/worktrees/workspaceAuthority.js.map +1 -0
- package/docs/favicon.svg +5 -0
- package/docs/index.html +624 -0
- package/docs/og.svg +52 -0
- package/docs/script.js +33 -0
- package/docs/star.svg +11 -0
- package/docs/styles.css +1571 -0
- package/docs/zh.html +428 -0
- package/package.json +121 -0
- package/scripts/analysis-cli-smoke.mjs +81 -0
- package/scripts/analysis-smoke.mjs +179 -0
- package/scripts/atomic-file.mjs +137 -0
- package/scripts/ci-change-classifier.mjs +59 -0
- package/scripts/ci-failure-summary.mjs +92 -0
- package/scripts/cloudflared-installer.mjs +215 -0
- package/scripts/cloudflared-release.mjs +63 -0
- package/scripts/codexgpt-entry.mjs +235 -0
- package/scripts/codexgpt.mjs +4987 -0
- package/scripts/connector-auth-output-shim.cjs +66 -0
- package/scripts/doctor-smoke.mjs +90 -0
- package/scripts/doctor.mjs +165 -0
- package/scripts/exact-head-ci.mjs +126 -0
- package/scripts/execute-handoff-smoke-platform-compat.mjs +38 -0
- package/scripts/execute-handoff-smoke.mjs +1117 -0
- package/scripts/g8-u-live-probe.mjs +208 -0
- package/scripts/http-smoke-compat.mjs +151 -0
- package/scripts/http-smoke.mjs +776 -0
- package/scripts/long-task-runner.mjs +1037 -0
- package/scripts/oauth-admin.mjs +1608 -0
- package/scripts/output-bounds.mjs +29 -0
- package/scripts/owned-temp-root.d.mts +50 -0
- package/scripts/owned-temp-root.mjs +567 -0
- package/scripts/phase-4a-smoke.mjs +36 -0
- package/scripts/policy-windows-spike.mjs +135 -0
- package/scripts/pro-apply.mjs +152 -0
- package/scripts/pro-bundle.mjs +121 -0
- package/scripts/pro-smoke.mjs +97 -0
- package/scripts/process-identity.mjs +67 -0
- package/scripts/repository-policy.mjs +166 -0
- package/scripts/run-and-summarize.mjs +134 -0
- package/scripts/run-smoke.mjs +52 -0
- package/scripts/run-with-cleanup.mjs +98 -0
- package/scripts/settings-smoke-platform-compat.mjs +85 -0
- package/scripts/settings-smoke.mjs +769 -0
- package/scripts/smoke-platform-compat.mjs +302 -0
- package/scripts/smoke.mjs +1180 -0
- package/scripts/stress-contract-compat.mjs +94 -0
- package/scripts/stress.mjs +882 -0
- package/scripts/test-domains.mjs +247 -0
- package/scripts/test-execution-profile-manifest.mjs +273 -0
- package/scripts/test-execution-profiles.mjs +147 -0
- package/scripts/test-performance-reporter.mjs +291 -0
- package/scripts/toolchain-manager.mjs +266 -0
- package/scripts/toolchains.json +19 -0
- package/scripts/windows-conpty-probe-child.mjs +82 -0
- package/scripts/windows-conpty-worker.ps1 +24 -0
- package/scripts/windows-credential-host-manifest.json +16 -0
- package/scripts/windows-credential-host-protocol-v1.json +16 -0
- package/scripts/windows-credential-host.cs +256 -0
- package/scripts/windows-credential-host.ps1 +26 -0
- package/scripts/windows-local-control-manifest.json +23 -0
- package/scripts/windows-local-control-spike.cs +738 -0
- package/scripts/windows-local-control-spike.mjs +415 -0
- package/scripts/windows-local-control-spike.ps1 +35 -0
- package/scripts/windows-local-control.cs +738 -0
- package/scripts/windows-local-control.ps1 +35 -0
- package/scripts/windows-native-api-inventory-v1.json +90 -0
- package/scripts/windows-process-host-manifest.json +20 -0
- package/scripts/windows-process-host-protocol-v1.json +59 -0
- package/scripts/windows-process-host.cs +2385 -0
- package/scripts/windows-process-host.ps1 +59 -0
- package/scripts/windows-realpath-shim.cjs +78 -0
package/SECURITY.md
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
CodexGPT exposes a local workspace to an MCP client. Treat it like a developer tool with access to your source tree, not like a hosted SaaS app.
|
|
4
|
+
|
|
5
|
+
## Supported Version
|
|
6
|
+
|
|
7
|
+
Security fixes target the latest published version only until the project reaches `1.0.0`.
|
|
8
|
+
|
|
9
|
+
Feature-specific notes follow GitHub `main`; npm users should check the published version before relying on a new command.
|
|
10
|
+
|
|
11
|
+
## Reporting
|
|
12
|
+
|
|
13
|
+
Please report security issues privately before opening a public issue. If the repository has GitHub private vulnerability reporting enabled, use that. Otherwise contact the maintainer listed by the project owner.
|
|
14
|
+
|
|
15
|
+
Do not include secrets, private repository contents, tunnel tokens, or `.env` values in reports.
|
|
16
|
+
|
|
17
|
+
## Terms Boundary
|
|
18
|
+
|
|
19
|
+
CodexGPT is not designed to bypass, avoid, pool, resell, or modify ChatGPT, Codex, OpenAI, or third-party model limits. Do not market, deploy, or configure it that way.
|
|
20
|
+
|
|
21
|
+
Each user should connect their own ChatGPT account, use only product surfaces available to that account, and follow the limits, safety rules, and terms for ChatGPT, Codex, OpenAI, and any third-party model provider they connect.
|
|
22
|
+
|
|
23
|
+
## Threat Model
|
|
24
|
+
|
|
25
|
+
CodexGPT can expose:
|
|
26
|
+
|
|
27
|
+
- file metadata and selected file contents from allowed workspaces
|
|
28
|
+
- git status and diffs
|
|
29
|
+
- `.ai-bridge` planning files
|
|
30
|
+
- optional shell command execution through the `bash` tool, hidden when bash mode is off
|
|
31
|
+
- opt-in Contract V3 confirmed-root admission and trusted-code Windows process execution, each guarded by a separate local approval flow
|
|
32
|
+
- optional write/edit/apply_patch capability depending on `CODEXGPT_WRITE_MODE`, advertised only in workspace write mode
|
|
33
|
+
- optional local handoff execution through `codexgpt execute-handoff`, run from the user's terminal only
|
|
34
|
+
- optional local execute/review looping through `codexgpt loop-handoff`, run from the user's terminal only with a user-provided reviewer command and iteration limit
|
|
35
|
+
|
|
36
|
+
## Failure Model
|
|
37
|
+
|
|
38
|
+
Review changes against these failure modes before release:
|
|
39
|
+
|
|
40
|
+
| Failure mode | Expected control |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| Public tunnel reachable without a secret | Public/non-loopback HTTP fails closed unless a CodexGPT token is configured. |
|
|
43
|
+
| Raw CodexGPT or Cloudflare token appears in UI, logs, docs, or package output | Tokens are redacted in profile/status output and tunnel tokens use local files for persistence. |
|
|
44
|
+
| ChatGPT can edit outside the intended repo | Allowed roots are explicit; path resolution rejects escapes, blocked globs, and symlink traversal. |
|
|
45
|
+
| A copied workspace handle is reused from another MCP session | Workspace handles are random, server-session scoped, checked against the issuing lifecycle domain, and invalidated by close, idle expiry, transport teardown, or policy-revision change. |
|
|
46
|
+
| ChatGPT can run arbitrary shell by default | Bash defaults to safe mode, can be disabled, and full mode is a trusted-local-only choice. Safe mode can still run repo package scripts, so use `--no-bash` for untrusted repos. |
|
|
47
|
+
| Contract V3 `full_access` is mistaken for a sandbox | It is opt-in, requires an explicit V3 Permission Profile and a fresh local one-use approval, and reports ambient current-user filesystem, credential, registry, broker, device, and network authority. |
|
|
48
|
+
| A failed sandbox probe silently falls back to ambient execution | The reserved `workspace` profile remains unavailable and never falls back to `full_access`; retained Gate S evidence stays blocked and diagnostic only. |
|
|
49
|
+
| The Contract V4 Git capsule is mistaken for a sandbox | The capsule fixes executable identity, environment, arguments, prompts, network/lazy fetch, and integrations, but still runs as the current user and reports `execution_isolation: none`. |
|
|
50
|
+
| A task checkout is mistaken for process isolation | Managed worktrees separate workflow state only. They share repository metadata and provide no credential, registry, device, broker, or network isolation. |
|
|
51
|
+
| A clean task removal is mistaken for branch deletion | Removal deletes only the revalidated owned checkout and registration. The generated branch, commits, private stashes, and audit are retained. |
|
|
52
|
+
| Automatic temporary cleanup deletes unrelated system files | Cleanup requires the exact CodexGPT prefix, ownership marker, canonical direct-child path, directory identity, and a dead owner. Unmarked or malformed state is preserved, and explicit cleanup returns nonzero when validation or deletion is incomplete. |
|
|
53
|
+
| Merge preparation is mistaken for live-target execution | Preparation creates an immutable reviewed candidate; execution separately revalidates clean target state, normalization, OIDs, and CAS preconditions. |
|
|
54
|
+
| Handoff mode still exposes generic writes | Handoff/pro modes do not advertise generic `write`/`edit`/`apply_patch`; bounded handoff tools write `.ai-bridge` files only. |
|
|
55
|
+
| Local Codex history is treated as ChatGPT memory | Codex session access is opt-in metadata/read mode and never attaches to a live Codex app session. |
|
|
56
|
+
| Browser admin mutates live runtime unexpectedly | Admin profile changes apply on restart; active runtime policy stays stable for the current session. |
|
|
57
|
+
| Remote MCP tool runs Codex/OpenCode/Pi directly | Agent execution remains a user-started CLI/watch process on the local machine. |
|
|
58
|
+
| Autonomous loop drives ChatGPT Web or bypasses approvals | `loop-handoff` only runs local terminal commands over `.ai-bridge` files; it does not resume browser sessions, approve prompts, or expose a remote MCP executor. |
|
|
59
|
+
| Reviewer masks a failed external command | `loop-handoff` requires explicit reviewer verdict assignments and rejects reviewer `PASS` after failed executor, test, or reviewer commands unless the user opts into the supported executor/test override behavior. |
|
|
60
|
+
|
|
61
|
+
The main risks are:
|
|
62
|
+
|
|
63
|
+
- connecting an untrusted MCP client
|
|
64
|
+
- exposing the server through a public tunnel without auth
|
|
65
|
+
- running with `CODEXGPT_BASH_MODE=full`
|
|
66
|
+
- enabling Contract V3 `CODEXGPT_EXECUTION_PROFILE=full_access` for code, dependencies, or scripts you do not trust
|
|
67
|
+
- running with `CODEXGPT_WRITE_MODE=workspace` on an important repo
|
|
68
|
+
- executing an untrusted `.ai-bridge/current-plan.md` or custom `execute-handoff --command`
|
|
69
|
+
- running `loop-handoff` with an untrusted reviewer command or without a small `--max-iters`
|
|
70
|
+
- adding overly broad allowed roots
|
|
71
|
+
- leaking a `codexgpt_token` or Cloudflare tunnel token
|
|
72
|
+
- trusting a downloaded `cloudflared` binary without understanding where it came from
|
|
73
|
+
|
|
74
|
+
## Safer Defaults
|
|
75
|
+
|
|
76
|
+
Default daily mode:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
codexgpt start \
|
|
80
|
+
--root /path/to/repo \
|
|
81
|
+
--bash safe \
|
|
82
|
+
--tunnel cloudflare
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Safer planning-only mode:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
codexgpt start \
|
|
89
|
+
--root /path/to/repo \
|
|
90
|
+
--mode handoff \
|
|
91
|
+
--bash safe \
|
|
92
|
+
--tunnel cloudflare
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For stable public hostnames, keep the CodexGPT auth token stable but private:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
codexgpt start \
|
|
99
|
+
--root /path/to/repo \
|
|
100
|
+
--tunnel cloudflare-named \
|
|
101
|
+
--hostname codexgpt.example.com \
|
|
102
|
+
--tunnel-name codexgpt \
|
|
103
|
+
--token <long-random-token> \
|
|
104
|
+
--bash safe
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Policy Kernel Boundaries
|
|
108
|
+
|
|
109
|
+
Phase 2A introduces a compiled local Policy Kernel with `legacy`, `shadow`, and `enforce` rollout modes. The effective ceiling is the intersection of immutable hard policy, identity scopes, the selected Permission Profile, and demonstrated deployment capabilities. A SessionGrant or approval may narrow or temporarily satisfy a request inside that ceiling; it cannot exceed it.
|
|
110
|
+
|
|
111
|
+
The following distinctions are security requirements:
|
|
112
|
+
|
|
113
|
+
- Tool visibility is not authorization.
|
|
114
|
+
- A query-token or Bearer token is a shared-secret identity, not proof of a human owner.
|
|
115
|
+
- Runtime profiles do not contain permission rules; strict Permission Profile V1 documents live under `~/.codexgpt/permissions/`.
|
|
116
|
+
- Safe Bash is not an OS sandbox.
|
|
117
|
+
- With `CODEXGPT_INHERIT_ENV` unset, Bash excludes arbitrary parent variables and token variables. On Windows it supplies only the bounded user/configuration paths needed for normal CLI discovery, including GitHub CLI configuration and OS-keyring access. `CODEXGPT_INHERIT_ENV=1` disables that narrowing and exposes the complete parent environment to the child process.
|
|
118
|
+
- Environment narrowing is defense in depth, not filesystem or credential isolation: a same-user process may still access files and operating-system services allowed to that account.
|
|
119
|
+
- Contract V3 `full_access` uses a Windows Job Object only for recorded Job members. It does not isolate files, registry, credentials, devices, COM/WMI/service brokers, or network, and it does not prove that broker-created descendants remain controllable.
|
|
120
|
+
- ConPTY is terminal transport, not a sandbox.
|
|
121
|
+
- Cloudflare Tunnel is inbound transport infrastructure and does not enforce local policy or outbound egress.
|
|
122
|
+
- Project `AGENTS.md`, Skill metadata, Skill bodies, and Skill resources are untrusted context, never authority. They cannot grant a workspace root, enable a tool, approve a mutation, install a dependency, or execute a script.
|
|
123
|
+
- Phase 6 standard guidance uses bounded same-handle reads, rejects blocked/escaped/raced/hard-linked content, redacts secret-looking metadata and provenance, and excludes user/plugin Skills unless explicitly requested. Redaction is not DLP; blocked secret paths remain unreadable.
|
|
124
|
+
- `allow_implicit_invocation: false` and declared-but-unverified dependencies remove a Skill from automatic catalogs. An exact user-directed load remains read-only and does not verify or install dependencies.
|
|
125
|
+
- Any profile that claims blocked-path, credential, registry, device, destination-network, or sandbox enforcement against an ambient child fails closed before approval or spawn. `full_access` is admitted only when the selected profile explicitly accepts that those protections do not apply.
|
|
126
|
+
|
|
127
|
+
Contracts V1 and V2 retain their exact behavior and do not create pending approvals. Contract V3 adds a local-only approval and emergency-control surface, durable V3 lifecycle audit, and typed Windows process tools. It still does not claim OAuth-grade owner isolation, complete Windows sandboxing, elimination of all same-user TOCTOU or broker escapes, DLP, or safe arbitrary Git remote writes.
|
|
128
|
+
|
|
129
|
+
## Contract V4 Git and Task-Worktree Boundaries
|
|
130
|
+
|
|
131
|
+
Contract V4 is exact 51 and requires atomic state, durable audit, Policy Kernel `enforce`, stable session identity, verified native Git execution, and local approval support. `CODEXGPT_GIT_MODE=read` is the mutation-off default; `local` activates only the typed local operations admitted by policy and Gate R.
|
|
132
|
+
|
|
133
|
+
- The safe capsule binds one executable identity and uses direct argv, a clean bounded environment, fixed disabling config, no prompts, no lazy fetch, and no network protocol. It is not an OS sandbox.
|
|
134
|
+
- Safe stage, restore, stash, task materialization, divergent merge, and target integration use private indexes, raw blobs, object quarantine, and explicit file/index/ref participants. They do not invoke porcelain `git add`, `checkout`, `reset`, `clean`, `stash`, or live-checkout `merge`.
|
|
135
|
+
- Affected EOL, text, encoding, ident, clean/smudge/LFS, or other checkout transformations fail before effects. `CODEXGPT_GIT_INTEGRATIONS=off` executes no repository integration.
|
|
136
|
+
- Remote, credential, config mutation, force, branch/history deletion, shared `refs/stash`, GC, and caller-selected arbitrary Git arguments are absent from the typed surface. A separately approved unrestricted process remains ambient authority outside this guarantee.
|
|
137
|
+
- Gate R persists authorization before effects and terminal audit before success. It coordinates CodexGPT-owned locks and participants only; external Git processes are not excluded and simultaneous database visibility is not claimed. Unprovable restart state freezes the repository instead of guessing rollback or deletion.
|
|
138
|
+
- Public repository, task, branch, plan, review, receipt, and workspace values are opaque. Canonical task paths remain local-control information. Persistent task owner binding is versioned; session workspace handles are not revived after restart.
|
|
139
|
+
- Task create and remove are review/execute state machines. Create's review has no branch/root/admin effect. Remove requires a clean exact inventory and retains the branch, commits, and private stashes.
|
|
140
|
+
- Fast-forward merge preparation is effect-free. Divergent preparation computes/scans in quarantine under review authority; object/ref promotion requires a fresh candidate-bound R3 retry. Merge execute is a separate R3 CAS and may still fail after checks if external state changes.
|
|
141
|
+
- Same-binary rollback to V3 hides V4 tools but keeps compatible readers and recovery state. Configuration rollback never means deleting tasks, branches, stashes, candidates, or audit.
|
|
142
|
+
|
|
143
|
+
Repository integrations that require hooks, filters, signing, merge helpers, or similar programs are not run by the safe path. Enabling a configuration value never authorizes silent ambient execution; if an exact approved integration path is unavailable, the operation fails with an action-oriented error. Gate X requires explicit `approved_full_access`, local Git mode, one exact fresh R3 grant, and unchanged executable/repository/integration identities. It exposes only private-index stage, shadow-directory commit, quarantined object-only merge, and private-destination checkout; no caller-selected Git command or typed remote, credential, force, or config mutation exists. These four operations remain ambient current-user execution with no filesystem, credential, registry, network, or broker isolation, and both the local approval display and public result state that limit.
|
|
144
|
+
|
|
145
|
+
## Contract V5 Semantic Core Boundaries
|
|
146
|
+
|
|
147
|
+
Contract V5 is exact V4 inheritance plus one `semantic` tool and is available only in explicit Phase 7 `standard` mode. V1/V2/V3/V4 remain exact and do not accept the semantic-preview branch.
|
|
148
|
+
|
|
149
|
+
- Every workspace source, configuration, package metadata, and declaration read passes the canonical same-handle reader and requires `nlink === 1`. Canonical path, stable object identity, parent/path binding, content hash, and policy/workspace generation are retained for later validation.
|
|
150
|
+
- Builtin TypeScript compiler work runs in a bounded owned worker over server-created snapshots. The worker receives no caller-selected executable, command, environment, endpoint, package version, or project script authority. It still runs as the current user: `execution_isolation: none`, `filesystem_isolation: none`, and `network_isolation: none` are the truthful boundary.
|
|
151
|
+
- Definition, references, and diagnostics are read-only. Lexical fallback is explicitly labeled through `result_quality`; rename never falls back to lexical replacement.
|
|
152
|
+
- `rename_preview` creates one random, opaque, server-local, workspace- and policy-bound plan. It contains the complete edit and identity manifest but performs no mutation and grants no approval.
|
|
153
|
+
- V5 `apply_patch` may consume an exact `semantic_preview_id` once. The Policy Kernel binds the same `semanticFactsDigest` through pre-authorization, approval display, reservation, transaction request, lock-held second inspection, terminal audit, and change-set publication.
|
|
154
|
+
- Any drift, replay, foreign/expired token, provider generation change, workspace revocation, policy/access/worktree change, transaction attempt, or uncertain terminal state fails closed and burns the preview. The transaction path reopens and revalidates every target while holding the existing workspace lock.
|
|
155
|
+
- A Provider cannot grant workspace access, approve a mutation, write files, invoke Git or shell commands, install software, or bypass the existing transaction runtime. Only the server-owned prepared-batch mutation path can commit semantic edits.
|
|
156
|
+
- Persistent audit excludes preview-token values, source bodies, complete diffs, raw worker stderr, and absolute workspace paths. Public output exposes relative paths, bounded previews, counts, one manifest digest, and actionable safe errors.
|
|
157
|
+
- Serena and direct LSP are not bundled Core capabilities. Any future same-user Provider remains ambient authority unless a separately proven isolation boundary exists; protocol allowlisting alone is not a sandbox.
|
|
158
|
+
|
|
159
|
+
During the migration cycle, rollback is permitted only to reviewed legacy behavior, the exact generated compatibility profile, or a narrower read-only profile. Invalid policy configuration cannot fall through to an unguarded execution path.
|
|
160
|
+
|
|
161
|
+
## Phase 8 OAuth Core Boundaries
|
|
162
|
+
|
|
163
|
+
Tasks 8A1–8A9 provide the locally verified Phase 8 Core OAuth path in the source checkout, including setup, owner administration, recovery, package integration, synthetic end-to-end MCP coverage, and completed-runtime adversarial repairs. Authorized live Gate G8-U is accepted through Journeys U2–U7, and STEP-470 accepted local G8-X through post-repair managed Node 20/24 ordinary and protected Smoke. U6 passed dual-route service/protocol rollback, a real read through a recreated Legacy App, exact no-argument OAuth restoration, and a real post-return read through the existing OAuth App; continuity of the deleted original App identity is explicitly not claimed. U7 proved fail-early byte-preserving rejection of shared/unowned Tunnel configs, exact public-loopback ingress, local-admin exclusion, and fail-closed Host/forwarded-header handling. Exact-head CI/publication remains pending. Local, synthetic, or partial live evidence must not be described as published Phase 8 closure.
|
|
164
|
+
|
|
165
|
+
- The public OAuth/resource listener and loopback-only local-control listener are separate sockets and route tables. Forwarded Host is not authority, public routes cannot reach owner mutations, and Cloudflare ingress targets only the public listener.
|
|
166
|
+
- Public clients use constrained dynamic registration, exact redirect allowlists, authorization code + PKCE `S256`, RFC 8707 resource binding, and RFC 9207 issuer response. Client secrets and Basic client authentication are not accepted.
|
|
167
|
+
- Access tokens are short-lived ES256 `at+jwt` values with exact issuer, audience, subject, client, grant revision, scope, time, and key checks. A Bearer token is replayable until expiry or durable revocation; CodexGPT does not claim DPoP or mTLS sender-constrained tokens.
|
|
168
|
+
- Refresh tokens are authenticated opaque envelopes. The durable store retains only the current keyed hash and generation. Rotation is single-use; replay revokes the whole family, and public/local/client/owner revocation invalidates the next access request.
|
|
169
|
+
- Signing keys and refresh authority are protected with Windows DPAPI `CurrentUser`. Production has no plaintext, memory-only, non-Windows, or alternate-provider fallback. This protects stored material across profiles/offline access; it is not a defense against same-user malware or a compromised Windows account.
|
|
170
|
+
- Verified OAuth identity is request-local and MCP sessions bind stable owner/client/resource/deployment/grant references. Same-grant refresh may continue a session; cross-client, cross-grant, cross-resource, or cross-incarnation reuse fails without revealing session existence.
|
|
171
|
+
- Every inherited tool is checked against the intersection of token scopes and current deployment capability before existing hard policy, profile, approval, transaction, audit, Git, worktree, or execution gates. Disabled local capability returns a local configuration denial; a token-only scope deficit returns a bounded MCP step-up challenge.
|
|
172
|
+
- OAuth tool descriptors publish exact minimum `read`, `write`, or `execute` scopes without changing V1–V5 names, order, counts, or non-auth schemas. OAuth subject ownership remains stable across access/refresh/signing-key rotation, while grant revision remains a revocation and approval-staleness fact rather than owner identity.
|
|
173
|
+
- Browser owner administration is served only from the separate loopback listener and requires a one-use bootstrap, HttpOnly SameSite=Strict cookie, exact Origin/Host, loopback peer, and CSRF token. Public routes never expose owner mutations.
|
|
174
|
+
- `codexgpt auth setup --root <exact-root>` is Windows-only, journaled, and fail-closed. It accepts only a dedicated named Cloudflare Tunnel whose config and owner marker bind the exact profile, deployment, Tunnel id/name, and hostname. It probes public metadata, JWKS, and OAuth health before committing the profile to OAuth.
|
|
175
|
+
- Migration uses two separately retained ChatGPT Apps and two reviewed credential-free route selectors. `auth rollback` switches the complete active profile route to the retained Legacy hostname/Tunnel while preserving OAuth state, keys, grants, clients, audit, and the saved OAuth route; the operator must stop/restart the service and select the retained Legacy App. Returning through `auth setup --root <exact-root>` restores and revalidates the saved OAuth deployment before recommitting OAuth. Raw query tokens and OAuth/Cloudflare credentials are forbidden from the route selectors.
|
|
176
|
+
- Recovery restore and reinitialization are security resets: they rotate incarnation/key/pepper authority, revoke every old grant and token, and require relink. A backup is evidence, not a way to revive prior authority.
|
|
177
|
+
- The public resource-documentation page states exact discovery paths, PKCE/RFC 9207 behavior, unknown-extension handling, stable OAuth errors, and bounded public-work policy. Unknown DCR extension fields are ignored only after the closed security-sensitive fields and redirect/scope rules validate.
|
|
178
|
+
- Current OpenAI guidance recommends refresh tokens and, for OIDC providers, `offline_access`. CodexGPT is not an OIDC provider and does not claim `openid`/ID-token/userinfo support; it issues rotating OAuth refresh tokens. Current-client linking, cookie/navigation approval, scope step-up, tool-snapshot refresh, post-restart refresh continuity, and local revoke/relink passed Journeys U2–U4. Journey U5 proved live denial, query-credential rejection, copied-Bearer truthfulness, refresh replay revocation, bounded malformed-token/polling admission, environment-override repair, and verified-backup recovery. The recovery reset retained binding/hostname/Tunnel but rotated incarnation and invalidated all prior client/grant/token authority. U6 then passed credential-safe Legacy/OAuth protocol calls, exact OAuth schemes, query-token denial, complete route switching, unchanged binding/incarnation, a recreated Legacy App read, exact OAuth restoration, and an existing OAuth App read. This accepts rollback compatibility while explicitly excluding continuity of the deleted original Legacy App identity. U7 proved fail-early byte-preserving shared/unowned Tunnel refusal, exact public-loopback ingress, local-admin exclusion, and fail-closed Host/forwarded-header behavior. Gate G8-U and local G8-X are complete; exact-head CI/publication remains pending.
|
|
179
|
+
- OAuth does not add tool, write, shell, process, Git, or sandbox authority. Static ChatGPT Bearer setup, Cloudflare Access, mTLS, DPoP, multi-owner tenancy, and OS isolation are not claimed.
|
|
180
|
+
|
|
181
|
+
## Contract V3 Trusted-Code Execution Boundaries
|
|
182
|
+
|
|
183
|
+
Contract V3 is disabled by default. Enabling its non-minimal execution surface requires all of the following:
|
|
184
|
+
|
|
185
|
+
- `CODEXGPT_TOOL_CONTRACT_VERSION=3`;
|
|
186
|
+
- `CODEXGPT_FILE_TRANSACTIONS=atomic`;
|
|
187
|
+
- durable audit through `CODEXGPT_AUDIT_MODE=auto|required`;
|
|
188
|
+
- `CODEXGPT_POLICY_ENGINE=enforce`;
|
|
189
|
+
- a strict schema-3 Permission Profile;
|
|
190
|
+
- `CODEXGPT_EXECUTION_PROFILE=full_access` for ambient process execution, or `CODEXGPT_LOCAL_FILE_ACCESS=confirmed_roots` for brokered root admission;
|
|
191
|
+
- an available local approval runtime bound to the exact server lifecycle.
|
|
192
|
+
|
|
193
|
+
V3 R3 actions create a bounded pending request but do not execute. A separate local terminal must inspect and approve the exact action through `codexgpt approvals ...`; the resulting grant is one-use, context-bound, and consumed atomically. A retry with changed executable, arguments, working directory, backend, environment, policy, evidence, session, or root identity requires a new approval. The remote MCP client cannot approve its own request.
|
|
194
|
+
|
|
195
|
+
`run_command` and `start_process` under `full_access` run with the current Windows user's ambient authority. They may read, modify, delete, encode, or transmit anything that account can reach. The fixed clean child environment and known-pattern streaming redaction reduce accidental exposure but do not isolate account-readable files, keyrings, credentials, registry, devices, brokers, or network and do not provide DLP.
|
|
196
|
+
|
|
197
|
+
Process IDs are random owner-bound handles. Lifetime, timeout, interrupt, resize, input, output, termination, and server-close guarantees apply only to processes that remain members of the exact native Job. Local emergency commands can list or terminate those recorded processes even when the remote transport is unavailable. They do not kill unrelated processes and do not claim control over WMI, COM, service, scheduler, or other broker-created escapes.
|
|
198
|
+
|
|
199
|
+
`open_full_access_workspace` is a brokered confirmed-root admission path, not permission for an ambient child. It requires an exact local approval, stable Windows object identity, hard-link count 1 for ordinary confirmed-root files, fixed absolute lease expiry, PathGuard checks, atomic transactions for supported writes, and audit. It does not persistently widen global `allowedRoots`.
|
|
200
|
+
|
|
201
|
+
The reserved `CODEXGPT_EXECUTION_PROFILE=workspace` is not a reduced-security mode. The AppContainer/LPAC Gate S probe did not prove the required network and broker isolation on the tested host, so production registration and activation remain unavailable. Task 4B0 fixtures are diagnostic, package-excluded, non-persistent, and cannot activate a sandbox. There is no automatic fallback from `workspace` to `full_access`.
|
|
202
|
+
|
|
203
|
+
## Workspace Lifecycle Boundaries
|
|
204
|
+
|
|
205
|
+
A `workspace_id` is an opaque capability handle issued inside one MCP server lifecycle domain. It is not a stable repository identifier, path hash, bearer credential for other sessions, or proof of a human owner. Separate HTTP transport sessions and separate STDIO server processes receive separate handles even when they open the same canonical root.
|
|
206
|
+
|
|
207
|
+
`close_workspace` invalidates a handle immediately. Active handles also expire after the bounded idle TTL, and successful use refreshes that deadline. Foreign, closed, expired, transport-stale, or policy-stale handles return the same bounded unavailable result without disclosing the root, internal workspace key, identity binding, policy revision, or revocation reason.
|
|
208
|
+
|
|
209
|
+
For one compatibility cycle, an omitted `workspace_id` can select only the current server session's configured default root. This compatibility boundary must not be generalized into process-global workspace sharing.
|
|
210
|
+
|
|
211
|
+
## Atomic Transaction Kernel Boundaries
|
|
212
|
+
|
|
213
|
+
Phase 3 connects the transaction, recovery, participant, move, change-set, and persistent-audit kernels to every supported public workspace writer. `CODEXGPT_FILE_TRANSACTIONS` still defaults to the reviewed `legacy` compatibility path; selecting `atomic` makes those writers prepare and commit through the guarded runtime and never silently fall back to direct writes. Writable atomic operation requires persistent terminal audit, so `CODEXGPT_AUDIT_MODE=off` fails before tool registration. Contract V1 remains the default exact 28-tool surface. Explicit contract V2 requires atomic transactions, persistent audit, an available state root, and the move runtime; it defines exactly 31 child tools, with the three additions hidden in minimal and connection-test mode.
|
|
214
|
+
|
|
215
|
+
The atomic backend requires same-volume ordinary-file hard links for no-clobber creation, move installation, and rollback evidence. Unsupported filesystems or volumes return `ATOMIC_BACKEND_UNAVAILABLE`; CodexGPT does not fall back to direct writes, replacing rename, or copy/delete. Transaction manifests live in the local application-state directory, use opaque workspace references, and exclude canonical workspace roots, file bodies, complete diffs, and credentials. Reserved `.codexgpt-txn-*` path segments are blocked unconditionally from public path operations.
|
|
216
|
+
|
|
217
|
+
When atomic mode is connected, persisted recovery runs before a workspace handle is issued or refreshed. Participant-aware recovery completes commit when every required participant effect is durably present, restores before-state when none is present, compensates and correlates partial effects while restoring before-state, and freezes the workspace with `TRANSACTION_RECOVERY_REQUIRED` whenever ownership, participant, identity, hash, or artifact evidence cannot be proved. The root-keyed lock coordinates CodexGPT processes only; external editors and other applications remain outside it. Multi-file transactions provide staged execution, rollback, and process-crash recovery, not database-style simultaneous cross-file visibility or absolute power-loss durability.
|
|
218
|
+
|
|
219
|
+
The mutation runtime gives each prepared writer result a non-enumerable server-owned handle. Before any public atomic success, the wrapper installs the visible transaction, persists required terminal audit evidence, commits and probes the audit and authenticated change-set participants, records the durable commit decision, and proves the committed transaction manifest before cleanup. Missing or foreign handles, provider exceptions, audit failure, change-set failure, or mismatched transaction/change-set facts fail closed and trigger reconciliation or rollback. `write`, `edit`, multi-file `apply_patch`, bridge scaffold/export/handoff writers, self-test artifacts, and supported CLI workspace artifacts all use this path when atomic mode is selected. Exact V1 response schemas remain unchanged.
|
|
220
|
+
|
|
221
|
+
In contract V2 standard/full mode, `move_paths` and `undo_change_set` use the same guarded runtime and policy boundary as direct tools and the `codexgpt` supertool. `move_paths` accepts at most 64 ordinary files, requires a caller-supplied lowercase SHA-256 for every source, remains inside one canonical workspace and volume, and never overwrites an unrelated target. Chains, cycles, duplicate-object hard links, and Windows case-only renames use no-clobber hard-link staging. Preview performs current policy/path/hash/device validation but cannot guarantee that a later execution-time link will succeed. Undo is owner- and retention-bound, complete-preflight, no-clobber, all-or-nothing, and has no force or redo mode.
|
|
222
|
+
|
|
223
|
+
The static mutation closure gate enumerates filesystem write primitives in all TypeScript sources and shipped runtime scripts. Each reviewed occurrence is fixed to its path, line, column, call digest, and one narrow purpose: transaction backend, atomic application state, persistent audit maintenance, or installer/runtime state outside authorized workspaces. Test and smoke fixtures are excluded by an exact file set rather than a broad pattern. The remaining direct workspace primitives in `fsOps.ts` and `handoffOps.ts` are retained only for the explicit `fileTransactions=legacy` compatibility path; the configured atomic path must prepare and commit through the transaction runtime and cannot fall back to them. Any new primitive or source drift fails the gate until it is removed or independently reviewed.
|
|
224
|
+
|
|
225
|
+
## Persistent Audit Boundaries
|
|
226
|
+
|
|
227
|
+
Phase 3B adds a local persistent audit backend under the application-state directory, outside authorized workspaces and Git. It stores separate immutable authorization and terminal execution events plus bounded recovery and administrative events. Records use project-owned canonical JSON, monotonic sequence numbers, cross-segment HMAC-SHA-256 chaining, and keys derived from the Phase 3 installation master key with dedicated labels.
|
|
228
|
+
|
|
229
|
+
Audit records intentionally exclude file bodies, complete diffs, raw command output, canonical workspace roots, Authorization/Cookie values, credential-bearing URLs, private keys, and `.env` contents. Workspace references are keyed opaque identifiers. Queries are exact-filter only, default to the latest 24 hours, are limited to seven days and 100 records, and use authenticated expiring cursors. Raw segment export, regex search, and full-text search are not exposed.
|
|
230
|
+
|
|
231
|
+
The HMAC chain detects accidental damage and untrusted modification that does not also control the installation key. It is not legal WORM storage, remote attestation, or protection against an attacker running as the same OS account with access to both state and key material. Only an incomplete final line is automatically quarantined and truncated after the preceding chain and index relation verify; any non-tail break fails closed and preserves the original evidence.
|
|
232
|
+
|
|
233
|
+
`CODEXGPT_AUDIT_MODE=auto` is best-effort for ordinary legacy/shadow operation and becomes required for enforce-mode R2+ mutations. Writable atomic operation always requires durable terminal evidence, including when the configured Policy mode is `legacy`; the internal compatibility wrapper observes rather than enforces Policy decisions while preserving the required audit/transaction commit ordering. Required authorization evidence must be durable before execution where Policy requires it. A required terminal append failure triggers participant-aware reconciliation or rollback, and an unprovable result becomes `TRANSACTION_RECOVERY_REQUIRED`. The production runtime is injected when atomic or non-legacy Policy/audit configuration requires it. In contract V2 full mode, `query_audit_events` is an installation-level `audit:read` operation with exact bounded filters and authenticated cursor pagination; it remains hidden in standard, minimal, and connection-test modes.
|
|
234
|
+
|
|
235
|
+
## Hard Rules
|
|
236
|
+
|
|
237
|
+
- Do not run public tunnels with `--no-auth`.
|
|
238
|
+
- Public tunnel mode and non-loopback binds fail closed if `CODEXGPT_HTTP_TOKEN` is missing.
|
|
239
|
+
- Legacy mode uses the personal query-token compatibility flow when `CODEXGPT_ALLOW_QUERY_TOKEN` is unset. OAuth mode forces query-token acceptance off and exposes a token-free Server URL.
|
|
240
|
+
- The copied Server URL contains `codexgpt_token`; select `Authentication: None / No Authentication` in ChatGPT for this personal compatibility flow.
|
|
241
|
+
- Public startup logs keep the credential-bearing Server URL hidden by default. Display it only through an explicit local action such as pressing `u` or printing the Create App fields.
|
|
242
|
+
- Treat that URL as a password-equivalent secret. It can leak through browser history, clipboard contents, screenshots, logs, and copied links.
|
|
243
|
+
- In legacy mode, set `CODEXGPT_ALLOW_QUERY_TOKEN=0` only for compatible clients that can send an `Authorization: Bearer` header. Server-side Bearer support remains available for compatible clients, but ChatGPT Web manual static-Bearer setup is not claimed or documented. In OAuth mode this setting is forced off.
|
|
244
|
+
- Direct unsupported server launches still keep query authentication disabled unless `CODEXGPT_ALLOW_QUERY_TOKEN=1` is explicit.
|
|
245
|
+
- Do not commit printed connector URLs that include `codexgpt_token`.
|
|
246
|
+
- Do not commit Cloudflare tunnel tokens.
|
|
247
|
+
- Never route the OAuth local-admin port through Cloudflare, reverse proxies, port forwarding, or a non-loopback bind. Public and local-admin ports must remain distinct.
|
|
248
|
+
- Use only a stable named Tunnel for OAuth. Quick Tunnels change issuer/resource identity and are rejected by the supported setup path.
|
|
249
|
+
- Every OAuth administration command must target one exact workspace with `--root`; do not infer a different workspace from a copied profile or stale terminal.
|
|
250
|
+
- Do not paste raw Cloudflare tunnel tokens into browser pages or screenshots. Use `--cloudflare-token-file` or the local page's Cloudflare token file field instead.
|
|
251
|
+
- Use `--mode handoff` for planning workflows where ChatGPT should not edit source files. Handoff mode does not advertise generic `write`/`edit` tools.
|
|
252
|
+
- Preview local handoff execution with `codexgpt execute-handoff --dry-run` before running an unfamiliar adapter or custom command.
|
|
253
|
+
- Preview autonomous local loops with `codexgpt loop-handoff --dry-run`, keep `--max-iters` small, and prefer `--require-human-confirmation` until you trust the reviewer command.
|
|
254
|
+
- Keep `execute-handoff` local. Do not wrap it in a remote MCP tool unless you add a stronger approval and sandbox story.
|
|
255
|
+
- Keep `loop-handoff` local. Do not use it to automate ChatGPT Web, Codex approvals, account access, third-party Pro sites, quota limits, or product safety prompts.
|
|
256
|
+
- Use default agent mode only with trusted ChatGPT sessions and repo-specific roots.
|
|
257
|
+
- Use `--no-bash` when ChatGPT should never trigger shell commands in the workspace.
|
|
258
|
+
- Use `--bash-session <id> --require-bash-session` when bash should be enabled only for calls that explicitly target this local CodexGPT terminal label.
|
|
259
|
+
- Keep Codex session history access off unless needed. `--codex-sessions metadata` only lists local Codex JSONL metadata; `--codex-sessions read` allows bounded transcript reads.
|
|
260
|
+
- Keep `CODEXGPT_CONTEXT_DIR` as a workspace-relative hidden directory such as `.ai-bridge`; CodexGPT rejects source, build, dependency, credential, and absolute context directories.
|
|
261
|
+
- Use `--bash full` only for trusted local repos.
|
|
262
|
+
- Enable Contract V3 `full_access` only for repositories, package scripts, dependencies, compilers, and executables you trust under the current Windows account.
|
|
263
|
+
- Review V3 approvals locally with `codexgpt approvals list --server <server_id>`; do not approve an action whose displayed executable, arguments, working directory, authority, or lifetime is unexpected.
|
|
264
|
+
- Keep `CODEXGPT_EXECUTION_PROFILE=workspace` unavailable. Do not relabel the retained AppContainer capability probe as a production sandbox or weaken its blocked evidence.
|
|
265
|
+
- Do not treat MCP session ids or bash session labels as Codex conversation ids. CodexGPT does not execute inside a Codex app session.
|
|
266
|
+
- Prefer a repo-specific `--root` instead of `--allow-home`.
|
|
267
|
+
- Use `--no-install-cloudflared --cloudflared <path>` if your organization requires a managed Cloudflare Tunnel binary.
|
|
268
|
+
|
|
269
|
+
## Cloudflare Binary Install
|
|
270
|
+
|
|
271
|
+
The supported public `codexgpt` entry uses the repository-managed verified installer for Cloudflare start paths: default/start, `stable`, explicit Cloudflare tunnel starts, and `connection-test` whenever its effective tunnel is `cloudflare` or `cloudflare-named`. It selects the platform asset from `scripts/cloudflared-release.mjs`, downloads the pinned release, rejects files larger than 100 MiB, verifies the pinned SHA-256 digest, checks the reported version, and installs the result into `~/.codexgpt/bin`. It does not install a system service, use sudo/admin rights, or modify shell startup files.
|
|
272
|
+
|
|
273
|
+
Managed-start flow:
|
|
274
|
+
|
|
275
|
+
```text
|
|
276
|
+
1. an explicit --cloudflared <path> remains a manual override
|
|
277
|
+
2. otherwise ensure the pinned managed binary exists and verifies correctly
|
|
278
|
+
3. pass its exact path with --cloudflared <managed-path>
|
|
279
|
+
4. pass --no-install-cloudflared so the legacy CLI cannot select or download another binary
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Use `npm run cloudflared:install`, `npm run cloudflared:upgrade`, and `npm run cloudflared:status` for the managed binary. Directly invoking `node scripts/codexgpt.mjs` bypasses the verified public entry and is not the supported public launch path.
|
|
283
|
+
|
|
284
|
+
## Built-In Guards
|
|
285
|
+
|
|
286
|
+
CodexGPT blocks common sensitive paths by default:
|
|
287
|
+
|
|
288
|
+
- `.env` and `.env.*`
|
|
289
|
+
- `.git` internals
|
|
290
|
+
- `node_modules`
|
|
291
|
+
- common private key names
|
|
292
|
+
- build/cache folders such as `dist`, `build`, `.next`, `coverage`, `.cache`
|
|
293
|
+
- symlinks that resolve outside the workspace or into blocked paths
|
|
294
|
+
|
|
295
|
+
These guards reduce risk. They are not an OS sandbox.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Copy to .envrc or source manually before running npm run start:http.
|
|
2
|
+
CODEXGPT_ROOT=/absolute/path/to/your/repo
|
|
3
|
+
CODEXGPT_ALLOWED_ROOTS=/absolute/path/to
|
|
4
|
+
CODEXGPT_HOST=127.0.0.1
|
|
5
|
+
CODEXGPT_PORT=8787
|
|
6
|
+
# Comma-separated Host header allowlist. Add your Cloudflare hostname for a named tunnel.
|
|
7
|
+
CODEXGPT_ALLOWED_HOSTS=127.0.0.1,localhost,mcp.example.com
|
|
8
|
+
# Optional comma-separated cross-origin browser callers. Same-origin requests need no entry.
|
|
9
|
+
# CODEXGPT_ALLOWED_ORIGINS=https://client.example.com
|
|
10
|
+
CODEXGPT_BASH_MODE=safe
|
|
11
|
+
# Default 0 keeps a narrow child environment. Set 1 only for trusted local repositories;
|
|
12
|
+
# it exposes the complete parent environment, including any credential variables, to Bash.
|
|
13
|
+
# CODEXGPT_INHERIT_ENV=0
|
|
14
|
+
# Optional local bash session guard. If required, bash tool calls must include the matching session_id.
|
|
15
|
+
# CODEXGPT_BASH_SESSION_ID=main
|
|
16
|
+
# CODEXGPT_REQUIRE_BASH_SESSION=1
|
|
17
|
+
CODEXGPT_WRITE_MODE=handoff
|
|
18
|
+
# legacy remains the compatibility default. Set atomic to route every supported
|
|
19
|
+
# workspace writer through guarded transactions; atomic never falls back to direct writes.
|
|
20
|
+
CODEXGPT_FILE_TRANSACTIONS=legacy
|
|
21
|
+
# Public contract V1 remains the compatibility default. Explicit V2 requires
|
|
22
|
+
# atomic transactions plus persistent audit and exposes the exact 31-tool universe.
|
|
23
|
+
# Explicit V3 additionally requires Policy enforce, durable audit, a stable session,
|
|
24
|
+
# and a schema-3 Permission Profile; it exposes the exact 39-tool universe without bash.
|
|
25
|
+
# Explicit V4 exposes the exact 51-tool universe and adds verified typed local Git plus
|
|
26
|
+
# owner-bound managed task worktrees. It requires native Windows Git capability and local approval.
|
|
27
|
+
CODEXGPT_TOOL_CONTRACT_VERSION=1
|
|
28
|
+
# V4 safe defaults. `read` disables all Git mutation. `local` additionally requires
|
|
29
|
+
# exact Permission Profile scopes, Gate R recovery, and a disjoint local managed root.
|
|
30
|
+
# CODEXGPT_GIT_MODE=read
|
|
31
|
+
# `approved_full_access` additionally requires CODEXGPT_EXECUTION_PROFILE=full_access
|
|
32
|
+
# and exposes only four exact R3-bound operations: private stage, shadow commit,
|
|
33
|
+
# quarantined object merge, and private checkout. It is ambient current-user execution,
|
|
34
|
+
# not filesystem, credential, registry, network, or broker isolation.
|
|
35
|
+
# CODEXGPT_GIT_INTEGRATIONS=off
|
|
36
|
+
# CODEXGPT_TASK_WORKTREE_ROOT=D:\CodexGPTTasks
|
|
37
|
+
# CODEXGPT_TASK_WORKTREE_MAX_COUNT=32
|
|
38
|
+
# CODEXGPT_TASK_WORKTREE_MAX_FILES=100000
|
|
39
|
+
# CODEXGPT_TASK_WORKTREE_MAX_BYTES=1073741824
|
|
40
|
+
# V3-only authority settings. Keep all defaults for normal V1/V2 operation.
|
|
41
|
+
# CODEXGPT_LOCAL_FILE_ACCESS=configured_roots
|
|
42
|
+
# CODEXGPT_EXECUTION_PROFILE=off
|
|
43
|
+
# CODEXGPT_EXECUTION_DEPENDENCIES=off
|
|
44
|
+
# V2 move_paths limits: 64 MiB/file and 256 MiB/batch by default; hard ceilings
|
|
45
|
+
# are 1 GiB/file and 4 GiB/batch. Hash concurrency accepts 1-16 workers.
|
|
46
|
+
CODEXGPT_MOVE_MAX_FILE_BYTES=67108864
|
|
47
|
+
CODEXGPT_MOVE_MAX_TOTAL_BYTES=268435456
|
|
48
|
+
CODEXGPT_MOVE_HASH_CONCURRENCY=4
|
|
49
|
+
# Encrypted change-set rollback retention for atomic mutations and V2 undo.
|
|
50
|
+
CODEXGPT_CHANGE_SET_MAX_PLAINTEXT_BYTES=8388608
|
|
51
|
+
CODEXGPT_CHANGE_SET_MAX_INSTALLATION_BYTES=134217728
|
|
52
|
+
CODEXGPT_CHANGE_SET_MAX_ACTIVE_PER_WORKSPACE=20
|
|
53
|
+
CODEXGPT_CHANGE_SET_RETENTION_MS=86400000
|
|
54
|
+
CODEXGPT_CHANGE_SET_TOMBSTONE_RETENTION_MS=2592000000
|
|
55
|
+
# One returned read payload remains bounded at 250000 bytes by default. Explicit line ranges
|
|
56
|
+
# may scan text files up to the separate internal 8 MiB ceiling without returning the whole file.
|
|
57
|
+
# Raising output limits to work around connector 502 responses is not recommended.
|
|
58
|
+
CODEXGPT_MAX_READ_BYTES=250000
|
|
59
|
+
CODEXGPT_TOOL_MODE=standard
|
|
60
|
+
# Phase 6 project guidance defaults to standard. Restart with explicit legacy for
|
|
61
|
+
# one-step rollback or compatibility diagnosis.
|
|
62
|
+
# CODEXGPT_GUIDANCE_MODE=legacy
|
|
63
|
+
# CODEXGPT_INSTRUCTION_FALLBACKS=agents.md,.agents.md
|
|
64
|
+
# CODEXGPT_MAX_INSTRUCTION_TOTAL_BYTES=32768
|
|
65
|
+
# CODEXGPT_MAX_SKILL_CANDIDATES=1000
|
|
66
|
+
# CODEXGPT_MAX_SKILL_CATALOG_CHARS=8000
|
|
67
|
+
# Policy migration mode. legacy preserves current execution, shadow compares safely,
|
|
68
|
+
# and enforce makes Policy Kernel decisions authoritative and fail-closed.
|
|
69
|
+
CODEXGPT_POLICY_ENGINE=legacy
|
|
70
|
+
# Persistent local audit. auto is best-effort for ordinary legacy/shadow operation,
|
|
71
|
+
# required for enforce-mode R2+ mutations, and mandatory for writable atomic V1.
|
|
72
|
+
# Audit data remains outside workspaces.
|
|
73
|
+
CODEXGPT_AUDIT_MODE=auto
|
|
74
|
+
CODEXGPT_AUDIT_RETENTION_DAYS=30
|
|
75
|
+
CODEXGPT_AUDIT_RETENTION_BYTES=104857600
|
|
76
|
+
# Optional exact local profile id under ~/.codexgpt/permissions/<id>.json.
|
|
77
|
+
# Contract V3 full_access requires a schema-3 profile that explicitly accepts ambient authority.
|
|
78
|
+
# CODEXGPT_PERMISSION_PROFILE=review
|
|
79
|
+
# Dedicated HTTPS origin for ChatGPT widget iframes. Required for app submission.
|
|
80
|
+
CODEXGPT_WIDGET_DOMAIN=https://rebel0789.github.io
|
|
81
|
+
|
|
82
|
+
# Disabled by default so ChatGPT receives plain MCP tool descriptors.
|
|
83
|
+
# Set to 1 only if you want CodexGPT's custom ChatGPT cards.
|
|
84
|
+
CODEXGPT_TOOL_CARDS=0
|
|
85
|
+
CODEXGPT_HTTP_TOKEN=[REDACTED_SECRET]
|
|
86
|
+
# The supported public CLI uses the personal ChatGPT query-token compatibility flow when this is unset.
|
|
87
|
+
# Set to 0 only for an advanced compatible client that can send Authorization: Bearer headers.
|
|
88
|
+
# CODEXGPT_ALLOW_QUERY_TOKEN=0
|
|
89
|
+
# Require a token even for loopback binds. Non-loopback and tunnel mode require one unless explicitly overridden.
|
|
90
|
+
# CODEXGPT_REQUIRE_HTTP_TOKEN=1
|
|
91
|
+
# CODEXGPT_ALLOW_NO_HTTP_TOKEN=1
|
|
92
|
+
CODEXGPT_CONTEXT_DIR=.ai-bridge
|
|
93
|
+
# Idle lifetime for session-scoped workspace handles. Defaults to CODEXGPT_HTTP_SESSION_TTL_MS (30 minutes).
|
|
94
|
+
# Minimum 60000, maximum 86400000. Successful use refreshes the idle deadline.
|
|
95
|
+
# CODEXGPT_WORKSPACE_TTL_MS=1800000
|
|
96
|
+
# Optional stable public URL mode. Quick tunnels do not keep the same hostname.
|
|
97
|
+
# CODEXGPT_TUNNEL=cloudflare-named
|
|
98
|
+
# CODEXGPT_PUBLIC_HOSTNAME=codexgpt.example.com
|
|
99
|
+
# CLOUDFLARE_TUNNEL_NAME=codexgpt
|
|
100
|
+
# Or use a dashboard-managed tunnel token:
|
|
101
|
+
# CLOUDFLARE_TUNNEL_TOKEN_FILE=[REDACTED_SECRET]
|
|
102
|
+
# Optional comma-separated extra block list:
|
|
103
|
+
# CODEXGPT_BLOCKED_GLOBS=**/secrets/**,**/*.sqlite,**/*.db
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { createHash, randomBytes as nodeRandomBytes } from "node:crypto";
|
|
2
|
+
const IDLE_MS = 10 * 60_000;
|
|
3
|
+
const ABSOLUTE_MAX_MS = 30 * 60_000;
|
|
4
|
+
function timestamp(value) {
|
|
5
|
+
return new Date(value).toISOString();
|
|
6
|
+
}
|
|
7
|
+
export class FullAccessLeaseManager {
|
|
8
|
+
#records = new Map();
|
|
9
|
+
#now;
|
|
10
|
+
#randomBytes;
|
|
11
|
+
#quarantine;
|
|
12
|
+
#terminate;
|
|
13
|
+
#cleanup;
|
|
14
|
+
#revocationTail = Promise.resolve();
|
|
15
|
+
constructor(options = {}) {
|
|
16
|
+
this.#now = options.now ?? Date.now;
|
|
17
|
+
this.#randomBytes = options.randomBytes ?? nodeRandomBytes;
|
|
18
|
+
this.#quarantine = options.quarantineProcessInput ?? (() => undefined);
|
|
19
|
+
this.#terminate = options.terminateBoundJobs ?? (() => undefined);
|
|
20
|
+
this.#cleanup = options.cleanupAuthorization ?? (() => undefined);
|
|
21
|
+
}
|
|
22
|
+
create(input) {
|
|
23
|
+
if (!Number.isSafeInteger(input.requestedLeaseMs) || input.requestedLeaseMs < 60_000 || input.requestedLeaseMs > ABSOLUTE_MAX_MS) {
|
|
24
|
+
throw new Error("Confirmed-root lease duration must be between one and thirty minutes.");
|
|
25
|
+
}
|
|
26
|
+
const now = this.#now();
|
|
27
|
+
const absoluteDeadline = now + input.requestedLeaseMs;
|
|
28
|
+
const workspaceId = this.#nextId("ws");
|
|
29
|
+
const leaseId = this.#nextId("lease");
|
|
30
|
+
const leaseKey = `confirmed_${createHash("sha256").update(JSON.stringify({
|
|
31
|
+
root: input.rootIdentity.comparisonKey,
|
|
32
|
+
access: input.access,
|
|
33
|
+
leaseId,
|
|
34
|
+
binding: input.bindingFingerprint
|
|
35
|
+
})).digest("hex").slice(0, 32)}`;
|
|
36
|
+
const idleDeadline = Math.min(now + IDLE_MS, absoluteDeadline);
|
|
37
|
+
const lease = Object.freeze({
|
|
38
|
+
schemaVersion: 1,
|
|
39
|
+
workspaceId,
|
|
40
|
+
leaseId,
|
|
41
|
+
leaseKey,
|
|
42
|
+
accessClass: "confirmed_root",
|
|
43
|
+
access: input.access,
|
|
44
|
+
rootIdentity: structuredClone(input.rootIdentity),
|
|
45
|
+
bindingFingerprint: input.bindingFingerprint,
|
|
46
|
+
approvalId: input.approvalId,
|
|
47
|
+
grantId: input.grantId,
|
|
48
|
+
openedAt: timestamp(now),
|
|
49
|
+
idleExpiresAt: timestamp(idleDeadline),
|
|
50
|
+
absoluteExpiresAt: timestamp(absoluteDeadline)
|
|
51
|
+
});
|
|
52
|
+
this.#records.set(workspaceId, { lease, idleDeadline, absoluteDeadline });
|
|
53
|
+
return structuredClone(lease);
|
|
54
|
+
}
|
|
55
|
+
get(workspaceId, touch = true) {
|
|
56
|
+
const record = this.#records.get(workspaceId);
|
|
57
|
+
if (!record)
|
|
58
|
+
throw new Error("Unknown confirmed-root workspace.");
|
|
59
|
+
const now = this.#now();
|
|
60
|
+
if (now >= record.idleDeadline || now >= record.absoluteDeadline) {
|
|
61
|
+
this.#revoke(record, "expired");
|
|
62
|
+
throw new Error("Confirmed-root lease expired.");
|
|
63
|
+
}
|
|
64
|
+
if (touch) {
|
|
65
|
+
record.idleDeadline = Math.min(now + IDLE_MS, record.absoluteDeadline);
|
|
66
|
+
record.lease = Object.freeze({ ...record.lease, idleExpiresAt: timestamp(record.idleDeadline) });
|
|
67
|
+
}
|
|
68
|
+
return structuredClone(record.lease);
|
|
69
|
+
}
|
|
70
|
+
assertWrite(workspaceId) {
|
|
71
|
+
const lease = this.get(workspaceId);
|
|
72
|
+
if (lease.access !== "read_write")
|
|
73
|
+
throw new Error("Confirmed-root lease is read-only.");
|
|
74
|
+
return lease;
|
|
75
|
+
}
|
|
76
|
+
list() {
|
|
77
|
+
this.prune();
|
|
78
|
+
return [...this.#records.values()].map((record) => structuredClone(record.lease));
|
|
79
|
+
}
|
|
80
|
+
close(workspaceId, reason = "closed") {
|
|
81
|
+
const record = this.#records.get(workspaceId);
|
|
82
|
+
if (record)
|
|
83
|
+
this.#revoke(record, reason);
|
|
84
|
+
}
|
|
85
|
+
revokeWhere(predicate, reason) {
|
|
86
|
+
let count = 0;
|
|
87
|
+
for (const record of [...this.#records.values()]) {
|
|
88
|
+
if (!predicate(record.lease))
|
|
89
|
+
continue;
|
|
90
|
+
this.#revoke(record, reason);
|
|
91
|
+
count += 1;
|
|
92
|
+
}
|
|
93
|
+
return count;
|
|
94
|
+
}
|
|
95
|
+
prune() {
|
|
96
|
+
const now = this.#now();
|
|
97
|
+
return this.revokeWhere((lease) => now >= Date.parse(lease.idleExpiresAt) || now >= Date.parse(lease.absoluteExpiresAt), "expired");
|
|
98
|
+
}
|
|
99
|
+
async drainRevocations() {
|
|
100
|
+
await this.#revocationTail;
|
|
101
|
+
}
|
|
102
|
+
#revoke(record, reason) {
|
|
103
|
+
this.#records.delete(record.lease.workspaceId);
|
|
104
|
+
const previous = this.#revocationTail;
|
|
105
|
+
this.#revocationTail = previous.then(async () => {
|
|
106
|
+
let failure;
|
|
107
|
+
try {
|
|
108
|
+
await this.#quarantine(record.lease.workspaceId, reason);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
failure = error;
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
await this.#terminate(record.lease.workspaceId, reason);
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
failure ??= error;
|
|
118
|
+
}
|
|
119
|
+
try {
|
|
120
|
+
await this.#cleanup(record.lease.workspaceId, reason);
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
failure ??= error;
|
|
124
|
+
}
|
|
125
|
+
if (failure)
|
|
126
|
+
throw failure;
|
|
127
|
+
}, async () => {
|
|
128
|
+
await this.#quarantine(record.lease.workspaceId, reason);
|
|
129
|
+
await this.#terminate(record.lease.workspaceId, reason);
|
|
130
|
+
await this.#cleanup(record.lease.workspaceId, reason);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
#nextId(prefix) {
|
|
134
|
+
for (let attempt = 0; attempt < 8; attempt += 1) {
|
|
135
|
+
const value = this.#randomBytes(16);
|
|
136
|
+
if (!Buffer.isBuffer(value) || value.length !== 16)
|
|
137
|
+
throw new Error("Confirmed-root random source returned an invalid value.");
|
|
138
|
+
const id = `${prefix}_${value.toString("hex")}`;
|
|
139
|
+
if (![...this.#records.values()].some((record) => record.lease.workspaceId === id || record.lease.leaseId === id))
|
|
140
|
+
return id;
|
|
141
|
+
}
|
|
142
|
+
throw new Error("Confirmed-root identifier collision.");
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
export function fullAccessWarning(access) {
|
|
146
|
+
return `This ${access === "read_write" ? "read-write" : "read-only"} root requires local confirmation. It is a brokered file boundary, not a sandbox, and does not sandbox or automatically authorize current-user processes.`;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=fullAccessLease.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullAccessLease.js","sourceRoot":"","sources":["../../src/access/fullAccessLease.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC;AAoCzE,MAAM,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC;AAC5B,MAAM,eAAe,GAAG,EAAE,GAAG,MAAM,CAAC;AAEpC,SAAS,SAAS,CAAC,KAAa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