From 24ad6279eaa32d64a80e9f086393e55d465f19e3 Mon Sep 17 00:00:00 2001 From: elkaix Date: Thu, 27 Aug 2026 21:25:13 -0400 Subject: [PATCH 1/3] refactor(producers): declare inherited writable state on the invocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The macOS Seatbelt backend decided which host directories a Producer could write by sniffing basename(executable) and requiredEnv names — four producer-specific functions living inside src/platform/sandbox/. An adapter the sandbox failed to recognize silently ran with no state access, and every new lane had to edit the sandbox. ProducerInvocation.inheritedStateWritablePaths is now the declaration: each adapter states its own auth/config/state paths and the sandbox grants exactly those when no temporary home is in effect. The four OS-confined CLI probes also collapse into probeOsConfinedCli (resolve -> --version -> optional surface check -> confinement backend -> auth), with Pythinker's --help inspection supplied as a hook. Seatbelt tests now prove the seam (grants exactly the declared paths, ignores them under a temp home, never derives paths from identity or env names); each adapter test asserts its own declaration. The win32-separator HOME test moved with the join into the adapters, which never run on win32. --- CHANGELOG.md | 12 + runtime/server.mjs | 1108 ++++++++++------------- src/platform/sandbox/seatbelt.ts | 79 +- src/producers/agy-adapter.ts | 96 +- src/producers/cli-probe.ts | 123 +++ src/producers/opencode-adapter.ts | 102 +-- src/producers/pi-adapter.ts | 97 +- src/producers/producer-adapter.ts | 8 + src/producers/pythinker-adapter.ts | 132 +-- tests/runtime/agy-adapter.test.ts | 6 + tests/runtime/opencode-adapter.test.ts | 13 + tests/runtime/pi-adapter.test.ts | 6 + tests/runtime/pythinker-adapter.test.ts | 12 + tests/runtime/seatbelt.test.ts | 146 +-- 14 files changed, 742 insertions(+), 1198 deletions(-) create mode 100644 src/producers/cli-probe.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index ad8c8f1..ef45298 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to Claude Architect are recorded here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [semantic versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- Producers declare their own host state directories through + `ProducerInvocation.inheritedStateWritablePaths`; the macOS Seatbelt backend + grants exactly those paths instead of guessing a Producer's config directory + from its executable name or required environment variables. A new adapter + therefore touches only its adapter file and the registry. +- The four OS-confined CLI adapters share one probe (`probeOsConfinedCli`) + instead of four copies of the resolve → version → confinement → auth flow. + ## [0.49.0] - 2026-08-08 ### Changed diff --git a/runtime/server.mjs b/runtime/server.mjs index 20b51ff..a99c384 100644 --- a/runtime/server.mjs +++ b/runtime/server.mjs @@ -34,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge mod )); -// node_modules/ajv/dist/compile/codegen/code.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/code.js var require_code = __commonJS({ - "node_modules/ajv/dist/compile/codegen/code.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/code.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0; @@ -188,9 +188,9 @@ var require_code = __commonJS({ } }); -// node_modules/ajv/dist/compile/codegen/scope.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/scope.js var require_scope = __commonJS({ - "node_modules/ajv/dist/compile/codegen/scope.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/scope.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0; @@ -333,9 +333,9 @@ var require_scope = __commonJS({ } }); -// node_modules/ajv/dist/compile/codegen/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/index.js var require_codegen = __commonJS({ - "node_modules/ajv/dist/compile/codegen/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0; @@ -1053,9 +1053,9 @@ var require_codegen = __commonJS({ } }); -// node_modules/ajv/dist/compile/util.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/util.js var require_util = __commonJS({ - "node_modules/ajv/dist/compile/util.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/util.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; @@ -1220,9 +1220,9 @@ var require_util = __commonJS({ } }); -// node_modules/ajv/dist/compile/names.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/names.js var require_names = __commonJS({ - "node_modules/ajv/dist/compile/names.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/names.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -1259,9 +1259,9 @@ var require_names = __commonJS({ } }); -// node_modules/ajv/dist/compile/errors.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/errors.js var require_errors = __commonJS({ - "node_modules/ajv/dist/compile/errors.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/errors.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0; @@ -1381,9 +1381,9 @@ var require_errors = __commonJS({ } }); -// node_modules/ajv/dist/compile/validate/boolSchema.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/boolSchema.js var require_boolSchema = __commonJS({ - "node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0; @@ -1432,9 +1432,9 @@ var require_boolSchema = __commonJS({ } }); -// node_modules/ajv/dist/compile/rules.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/rules.js var require_rules = __commonJS({ - "node_modules/ajv/dist/compile/rules.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/rules.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getRules = exports.isJSONType = void 0; @@ -1463,9 +1463,9 @@ var require_rules = __commonJS({ } }); -// node_modules/ajv/dist/compile/validate/applicability.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/applicability.js var require_applicability = __commonJS({ - "node_modules/ajv/dist/compile/validate/applicability.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/applicability.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0; @@ -1486,9 +1486,9 @@ var require_applicability = __commonJS({ } }); -// node_modules/ajv/dist/compile/validate/dataType.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/dataType.js var require_dataType = __commonJS({ - "node_modules/ajv/dist/compile/validate/dataType.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/dataType.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0; @@ -1670,9 +1670,9 @@ var require_dataType = __commonJS({ } }); -// node_modules/ajv/dist/compile/validate/defaults.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/defaults.js var require_defaults = __commonJS({ - "node_modules/ajv/dist/compile/validate/defaults.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/defaults.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.assignDefaults = void 0; @@ -1707,9 +1707,9 @@ var require_defaults = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/code.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/code.js var require_code2 = __commonJS({ - "node_modules/ajv/dist/vocabularies/code.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/code.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; @@ -1840,9 +1840,9 @@ var require_code2 = __commonJS({ } }); -// node_modules/ajv/dist/compile/validate/keyword.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/keyword.js var require_keyword = __commonJS({ - "node_modules/ajv/dist/compile/validate/keyword.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/keyword.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0; @@ -1958,9 +1958,9 @@ var require_keyword = __commonJS({ } }); -// node_modules/ajv/dist/compile/validate/subschema.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/subschema.js var require_subschema = __commonJS({ - "node_modules/ajv/dist/compile/validate/subschema.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/subschema.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0; @@ -2041,9 +2041,9 @@ var require_subschema = __commonJS({ } }); -// node_modules/fast-deep-equal/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/fast-deep-equal/index.js var require_fast_deep_equal = __commonJS({ - "node_modules/fast-deep-equal/index.js"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/fast-deep-equal/index.js"(exports, module) { "use strict"; module.exports = function equal(a, b) { if (a === b) return true; @@ -2076,9 +2076,9 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/json-schema-traverse/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/json-schema-traverse/index.js var require_json_schema_traverse = __commonJS({ - "node_modules/json-schema-traverse/index.js"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/json-schema-traverse/index.js"(exports, module) { "use strict"; var traverse = module.exports = function(schema, opts, cb) { if (typeof opts == "function") { @@ -2164,9 +2164,9 @@ var require_json_schema_traverse = __commonJS({ } }); -// node_modules/ajv/dist/compile/resolve.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/resolve.js var require_resolve = __commonJS({ - "node_modules/ajv/dist/compile/resolve.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/resolve.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0; @@ -2320,9 +2320,9 @@ var require_resolve = __commonJS({ } }); -// node_modules/ajv/dist/compile/validate/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/index.js var require_validate = __commonJS({ - "node_modules/ajv/dist/compile/validate/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0; @@ -2828,9 +2828,9 @@ var require_validate = __commonJS({ } }); -// node_modules/ajv/dist/runtime/validation_error.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/validation_error.js var require_validation_error = __commonJS({ - "node_modules/ajv/dist/runtime/validation_error.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/validation_error.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ValidationError = class extends Error { @@ -2844,9 +2844,9 @@ var require_validation_error = __commonJS({ } }); -// node_modules/ajv/dist/compile/ref_error.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/ref_error.js var require_ref_error = __commonJS({ - "node_modules/ajv/dist/compile/ref_error.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/ref_error.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var resolve_1 = require_resolve(); @@ -2861,9 +2861,9 @@ var require_ref_error = __commonJS({ } }); -// node_modules/ajv/dist/compile/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/index.js var require_compile = __commonJS({ - "node_modules/ajv/dist/compile/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; @@ -3085,9 +3085,9 @@ var require_compile = __commonJS({ } }); -// node_modules/ajv/dist/refs/data.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/data.json var require_data = __commonJS({ - "node_modules/ajv/dist/refs/data.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/data.json"(exports, module) { module.exports = { $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", @@ -3104,9 +3104,9 @@ var require_data = __commonJS({ } }); -// node_modules/fast-uri/lib/utils.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/lib/utils.js var require_utils = __commonJS({ - "node_modules/fast-uri/lib/utils.js"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/lib/utils.js"(exports, module) { "use strict"; var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu); var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u); @@ -3417,9 +3417,9 @@ var require_utils = __commonJS({ } }); -// node_modules/fast-uri/lib/schemes.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/lib/schemes.js var require_schemes = __commonJS({ - "node_modules/fast-uri/lib/schemes.js"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/lib/schemes.js"(exports, module) { "use strict"; var { isUUID } = require_utils(); var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; @@ -3627,9 +3627,9 @@ var require_schemes = __commonJS({ } }); -// node_modules/fast-uri/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/index.js var require_fast_uri = __commonJS({ - "node_modules/fast-uri/index.js"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/index.js"(exports, module) { "use strict"; var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils(); var { SCHEMES, getSchemeHandler } = require_schemes(); @@ -3919,9 +3919,9 @@ var require_fast_uri = __commonJS({ } }); -// node_modules/ajv/dist/runtime/uri.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/uri.js var require_uri = __commonJS({ - "node_modules/ajv/dist/runtime/uri.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/uri.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var uri = require_fast_uri(); @@ -3930,9 +3930,9 @@ var require_uri = __commonJS({ } }); -// node_modules/ajv/dist/core.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/core.js var require_core = __commonJS({ - "node_modules/ajv/dist/core.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/core.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; @@ -4541,9 +4541,9 @@ var require_core = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/core/id.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/id.js var require_id = __commonJS({ - "node_modules/ajv/dist/vocabularies/core/id.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/id.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var def = { @@ -4556,9 +4556,9 @@ var require_id = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/core/ref.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/ref.js var require_ref = __commonJS({ - "node_modules/ajv/dist/vocabularies/core/ref.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/ref.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.callRef = exports.getValidate = void 0; @@ -4678,9 +4678,9 @@ var require_ref = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/core/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/index.js var require_core2 = __commonJS({ - "node_modules/ajv/dist/vocabularies/core/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var id_1 = require_id(); @@ -4699,9 +4699,9 @@ var require_core2 = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/limitNumber.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitNumber.js var require_limitNumber = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4731,9 +4731,9 @@ var require_limitNumber = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/multipleOf.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/multipleOf.js var require_multipleOf = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4759,9 +4759,9 @@ var require_multipleOf = __commonJS({ } }); -// node_modules/ajv/dist/runtime/ucs2length.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/ucs2length.js var require_ucs2length = __commonJS({ - "node_modules/ajv/dist/runtime/ucs2length.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/ucs2length.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function ucs2length(str) { @@ -4785,9 +4785,9 @@ var require_ucs2length = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/limitLength.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitLength.js var require_limitLength = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4817,9 +4817,9 @@ var require_limitLength = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/pattern.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/pattern.js var require_pattern = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -4854,9 +4854,9 @@ var require_pattern = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/limitProperties.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitProperties.js var require_limitProperties = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4883,9 +4883,9 @@ var require_limitProperties = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/required.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/required.js var require_required = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/required.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/required.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -4965,9 +4965,9 @@ var require_required = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/limitItems.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitItems.js var require_limitItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4994,9 +4994,9 @@ var require_limitItems = __commonJS({ } }); -// node_modules/ajv/dist/runtime/equal.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/equal.js var require_equal = __commonJS({ - "node_modules/ajv/dist/runtime/equal.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/equal.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var equal = require_fast_deep_equal(); @@ -5005,9 +5005,9 @@ var require_equal = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js var require_uniqueItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dataType_1 = require_dataType(); @@ -5072,9 +5072,9 @@ var require_uniqueItems = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/const.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/const.js var require_const = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/const.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/const.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5101,9 +5101,9 @@ var require_const = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/enum.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/enum.js var require_enum = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5150,9 +5150,9 @@ var require_enum = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/index.js var require_validation = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var limitNumber_1 = require_limitNumber(); @@ -5188,9 +5188,9 @@ var require_validation = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js var require_additionalItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateAdditionalItems = void 0; @@ -5241,9 +5241,9 @@ var require_additionalItems = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/items.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/items.js var require_items = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateTuple = void 0; @@ -5298,9 +5298,9 @@ var require_items = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js var require_prefixItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var items_1 = require_items(); @@ -5315,9 +5315,9 @@ var require_prefixItems = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/items2020.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/items2020.js var require_items2020 = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5350,9 +5350,9 @@ var require_items2020 = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/contains.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/contains.js var require_contains = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5444,9 +5444,9 @@ var require_contains = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/dependencies.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/dependencies.js var require_dependencies = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0; @@ -5538,9 +5538,9 @@ var require_dependencies = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js var require_propertyNames = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5581,9 +5581,9 @@ var require_propertyNames = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js var require_additionalProperties = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -5687,9 +5687,9 @@ var require_additionalProperties = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/properties.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/properties.js var require_properties = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var validate_1 = require_validate(); @@ -5745,9 +5745,9 @@ var require_properties = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js var require_patternProperties = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -5819,9 +5819,9 @@ var require_patternProperties = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/not.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/not.js var require_not = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util(); @@ -5850,9 +5850,9 @@ var require_not = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/anyOf.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/anyOf.js var require_anyOf = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -5867,9 +5867,9 @@ var require_anyOf = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/oneOf.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/oneOf.js var require_oneOf = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5925,9 +5925,9 @@ var require_oneOf = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/allOf.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/allOf.js var require_allOf = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util(); @@ -5952,9 +5952,9 @@ var require_allOf = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/if.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/if.js var require_if = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -6021,9 +6021,9 @@ var require_if = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/thenElse.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/thenElse.js var require_thenElse = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util(); @@ -6039,9 +6039,9 @@ var require_thenElse = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/index.js var require_applicator = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var additionalItems_1 = require_additionalItems(); @@ -6087,9 +6087,9 @@ var require_applicator = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/format/format.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/format/format.js var require_format = __commonJS({ - "node_modules/ajv/dist/vocabularies/format/format.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/format/format.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -6177,9 +6177,9 @@ var require_format = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/format/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/format/index.js var require_format2 = __commonJS({ - "node_modules/ajv/dist/vocabularies/format/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/format/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var format_1 = require_format(); @@ -6188,9 +6188,9 @@ var require_format2 = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/metadata.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/metadata.js var require_metadata = __commonJS({ - "node_modules/ajv/dist/vocabularies/metadata.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/metadata.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.contentVocabulary = exports.metadataVocabulary = void 0; @@ -6211,9 +6211,9 @@ var require_metadata = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/draft7.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/draft7.js var require_draft7 = __commonJS({ - "node_modules/ajv/dist/vocabularies/draft7.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/draft7.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require_core2(); @@ -6233,9 +6233,9 @@ var require_draft7 = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/discriminator/types.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/discriminator/types.js var require_types = __commonJS({ - "node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DiscrError = void 0; @@ -6247,9 +6247,9 @@ var require_types = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/discriminator/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/discriminator/index.js var require_discriminator = __commonJS({ - "node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -6352,9 +6352,9 @@ var require_discriminator = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-draft-07.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-draft-07.json var require_json_schema_draft_07 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) { module.exports = { $schema: "http://json-schema.org/draft-07/schema#", $id: "http://json-schema.org/draft-07/schema#", @@ -6509,9 +6509,9 @@ var require_json_schema_draft_07 = __commonJS({ } }); -// node_modules/ajv/dist/ajv.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/ajv.js var require_ajv = __commonJS({ - "node_modules/ajv/dist/ajv.js"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/ajv.js"(exports, module) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0; @@ -6579,9 +6579,9 @@ var require_ajv = __commonJS({ } }); -// node_modules/ajv-formats/dist/formats.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/formats.js var require_formats = __commonJS({ - "node_modules/ajv-formats/dist/formats.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/formats.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatNames = exports.fastFormats = exports.fullFormats = void 0; @@ -6782,9 +6782,9 @@ var require_formats = __commonJS({ } }); -// node_modules/ajv-formats/dist/limit.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/limit.js var require_limit = __commonJS({ - "node_modules/ajv-formats/dist/limit.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/limit.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatLimitDefinition = void 0; @@ -6854,9 +6854,9 @@ var require_limit = __commonJS({ } }); -// node_modules/ajv-formats/dist/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/index.js var require_dist = __commonJS({ - "node_modules/ajv-formats/dist/index.js"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/index.js"(exports, module) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var formats_1 = require_formats(); @@ -6896,9 +6896,9 @@ var require_dist = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js var require_dynamicAnchor = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dynamicAnchor = void 0; @@ -6931,9 +6931,9 @@ var require_dynamicAnchor = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js var require_dynamicRef = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dynamicRef = void 0; @@ -6977,9 +6977,9 @@ var require_dynamicRef = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js var require_recursiveAnchor = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dynamicAnchor_1 = require_dynamicAnchor(); @@ -6998,9 +6998,9 @@ var require_recursiveAnchor = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js var require_recursiveRef = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dynamicRef_1 = require_dynamicRef(); @@ -7013,9 +7013,9 @@ var require_recursiveRef = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/dynamic/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/index.js var require_dynamic = __commonJS({ - "node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dynamicAnchor_1 = require_dynamicAnchor(); @@ -7027,9 +7027,9 @@ var require_dynamic = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js var require_dependentRequired = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dependencies_1 = require_dependencies(); @@ -7044,9 +7044,9 @@ var require_dependentRequired = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js var require_dependentSchemas = __commonJS({ - "node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dependencies_1 = require_dependencies(); @@ -7060,9 +7060,9 @@ var require_dependentSchemas = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/validation/limitContains.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitContains.js var require_limitContains = __commonJS({ - "node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util(); @@ -7080,9 +7080,9 @@ var require_limitContains = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/next.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/next.js var require_next = __commonJS({ - "node_modules/ajv/dist/vocabularies/next.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/next.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dependentRequired_1 = require_dependentRequired(); @@ -7093,9 +7093,9 @@ var require_next = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js var require_unevaluatedProperties = __commonJS({ - "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -7159,9 +7159,9 @@ var require_unevaluatedProperties = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js var require_unevaluatedItems = __commonJS({ - "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -7203,9 +7203,9 @@ var require_unevaluatedItems = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/unevaluated/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/index.js var require_unevaluated = __commonJS({ - "node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var unevaluatedProperties_1 = require_unevaluatedProperties(); @@ -7215,9 +7215,9 @@ var require_unevaluated = __commonJS({ } }); -// node_modules/ajv/dist/vocabularies/draft2020.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/draft2020.js var require_draft2020 = __commonJS({ - "node_modules/ajv/dist/vocabularies/draft2020.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/draft2020.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require_core2(); @@ -7243,9 +7243,9 @@ var require_draft2020 = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json var require_schema = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/schema", @@ -7303,9 +7303,9 @@ var require_schema = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json var require_applicator2 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/applicator", @@ -7356,9 +7356,9 @@ var require_applicator2 = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json var require_unevaluated2 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/unevaluated", @@ -7376,9 +7376,9 @@ var require_unevaluated2 = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json var require_content = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/content", @@ -7397,9 +7397,9 @@ var require_content = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json var require_core3 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/core", @@ -7453,9 +7453,9 @@ var require_core3 = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json var require_format_annotation = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/format-annotation", @@ -7472,9 +7472,9 @@ var require_format_annotation = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json var require_meta_data = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/meta-data", @@ -7513,9 +7513,9 @@ var require_meta_data = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json var require_validation2 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/validation", @@ -7608,9 +7608,9 @@ var require_validation2 = __commonJS({ } }); -// node_modules/ajv/dist/refs/json-schema-2020-12/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/index.js var require_json_schema_2020_12 = __commonJS({ - "node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var metaSchema = require_schema(); @@ -7643,9 +7643,9 @@ var require_json_schema_2020_12 = __commonJS({ } }); -// node_modules/ajv/dist/2020.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/2020.js var require__ = __commonJS({ - "node_modules/ajv/dist/2020.js"(exports, module) { + "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/2020.js"(exports, module) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0; @@ -7723,7 +7723,7 @@ var require__ = __commonJS({ // src/index.ts import { pathToFileURL } from "node:url"; -// node_modules/zod/v3/helpers/util.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/helpers/util.js var util; (function(util2) { util2.assertEqual = (_) => { @@ -7857,7 +7857,7 @@ var getParsedType = (data) => { } }; -// node_modules/zod/v3/ZodError.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/ZodError.js var ZodIssueCode = util.arrayToEnum([ "invalid_type", "invalid_literal", @@ -7971,7 +7971,7 @@ ZodError.create = (issues) => { return error51; }; -// node_modules/zod/v3/locales/en.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/locales/en.js var errorMap = (issue2, _ctx) => { let message; switch (issue2.code) { @@ -8074,13 +8074,13 @@ var errorMap = (issue2, _ctx) => { }; var en_default = errorMap; -// node_modules/zod/v3/errors.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/errors.js var overrideErrorMap = en_default; function getErrorMap() { return overrideErrorMap; } -// node_modules/zod/v3/helpers/parseUtil.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/helpers/parseUtil.js var makeIssue = (params) => { const { data, path: path32, errorMaps, issueData } = params; const fullPath = [...path32, ...issueData.path || []]; @@ -8189,14 +8189,14 @@ var isDirty = (x) => x.status === "dirty"; var isValid = (x) => x.status === "valid"; var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise; -// node_modules/zod/v3/helpers/errorUtil.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/helpers/errorUtil.js var errorUtil; (function(errorUtil2) { errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {}; errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message; })(errorUtil || (errorUtil = {})); -// node_modules/zod/v3/types.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/types.js var ParseInputLazyPath = class { constructor(parent, value, path32, key) { this._cachedPath = []; @@ -11599,7 +11599,7 @@ var nullableType = ZodNullable.create; var preprocessType = ZodEffects.createWithPreprocess; var pipelineType = ZodPipeline.create; -// node_modules/zod/v4/core/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/index.js var core_exports2 = {}; __export(core_exports2, { $ZodAny: () => $ZodAny, @@ -11878,7 +11878,7 @@ __export(core_exports2, { version: () => version }); -// node_modules/zod/v4/core/core.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/core.js var _a; var NEVER = /* @__PURE__ */ Object.freeze({ status: "aborted" @@ -11955,7 +11955,7 @@ function config(newConfig) { return globalConfig; } -// node_modules/zod/v4/core/util.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/util.js var util_exports = {}; __export(util_exports, { BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, @@ -12651,7 +12651,7 @@ var Class = class { } }; -// node_modules/zod/v4/core/errors.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/errors.js var initializer = (inst, def) => { inst.name = "$ZodError"; Object.defineProperty(inst, "_zod", { @@ -12790,7 +12790,7 @@ function prettifyError(error51) { return lines.join("\n"); } -// node_modules/zod/v4/core/parse.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/parse.js var _parse = (_Err) => (schema, value, _ctx, _params) => { const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; const result = schema._zod.run({ value, issues: [] }, ctx); @@ -12878,7 +12878,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => { }; var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); -// node_modules/zod/v4/core/regexes.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/regexes.js var regexes_exports = {}; __export(regexes_exports, { base64: () => base64, @@ -13037,7 +13037,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/; var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); var sha512_base64url = /* @__PURE__ */ fixedBase64url(86); -// node_modules/zod/v4/core/checks.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/checks.js var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { var _a3; inst._zod ?? (inst._zod = {}); @@ -13585,7 +13585,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins }; }); -// node_modules/zod/v4/core/doc.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/doc.js var Doc = class { constructor(args = []) { this.content = []; @@ -13621,14 +13621,14 @@ var Doc = class { } }; -// node_modules/zod/v4/core/versions.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/versions.js var version = { major: 4, minor: 4, patch: 3 }; -// node_modules/zod/v4/core/schemas.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/schemas.js var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { var _a3; inst ?? (inst = {}); @@ -15721,7 +15721,7 @@ function handleRefineResult(result, payload, input, inst) { } } -// node_modules/zod/v4/locales/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/index.js var locales_exports = {}; __export(locales_exports, { ar: () => ar_default, @@ -15778,7 +15778,7 @@ __export(locales_exports, { zhTW: () => zh_TW_default }); -// node_modules/zod/v4/locales/ar.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ar.js var error = () => { const Sizable = { string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, @@ -15885,7 +15885,7 @@ function ar_default() { }; } -// node_modules/zod/v4/locales/az.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/az.js var error2 = () => { const Sizable = { string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, @@ -15991,7 +15991,7 @@ function az_default() { }; } -// node_modules/zod/v4/locales/be.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/be.js function getBelarusianPlural(count, one, few, many) { const absCount = Math.abs(count); const lastDigit = absCount % 10; @@ -16148,7 +16148,7 @@ function be_default() { }; } -// node_modules/zod/v4/locales/bg.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/bg.js var error4 = () => { const Sizable = { string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, @@ -16269,7 +16269,7 @@ function bg_default() { }; } -// node_modules/zod/v4/locales/ca.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ca.js var error5 = () => { const Sizable = { string: { unit: "car\xE0cters", verb: "contenir" }, @@ -16378,7 +16378,7 @@ function ca_default() { }; } -// node_modules/zod/v4/locales/cs.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/cs.js var error6 = () => { const Sizable = { string: { unit: "znak\u016F", verb: "m\xEDt" }, @@ -16490,7 +16490,7 @@ function cs_default() { }; } -// node_modules/zod/v4/locales/da.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/da.js var error7 = () => { const Sizable = { string: { unit: "tegn", verb: "havde" }, @@ -16606,7 +16606,7 @@ function da_default() { }; } -// node_modules/zod/v4/locales/de.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/de.js var error8 = () => { const Sizable = { string: { unit: "Zeichen", verb: "zu haben" }, @@ -16715,7 +16715,7 @@ function de_default() { }; } -// node_modules/zod/v4/locales/el.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/el.js var error9 = () => { const Sizable = { string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, @@ -16825,7 +16825,7 @@ function el_default() { }; } -// node_modules/zod/v4/locales/en.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/en.js var error10 = () => { const Sizable = { string: { unit: "characters", verb: "to have" }, @@ -16938,7 +16938,7 @@ function en_default2() { }; } -// node_modules/zod/v4/locales/eo.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/eo.js var error11 = () => { const Sizable = { string: { unit: "karaktrojn", verb: "havi" }, @@ -17048,7 +17048,7 @@ function eo_default() { }; } -// node_modules/zod/v4/locales/es.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/es.js var error12 = () => { const Sizable = { string: { unit: "caracteres", verb: "tener" }, @@ -17181,7 +17181,7 @@ function es_default() { }; } -// node_modules/zod/v4/locales/fa.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/fa.js var error13 = () => { const Sizable = { string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, @@ -17296,7 +17296,7 @@ function fa_default() { }; } -// node_modules/zod/v4/locales/fi.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/fi.js var error14 = () => { const Sizable = { string: { unit: "merkki\xE4", subject: "merkkijonon" }, @@ -17409,7 +17409,7 @@ function fi_default() { }; } -// node_modules/zod/v4/locales/fr.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/fr.js var error15 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -17535,7 +17535,7 @@ function fr_default() { }; } -// node_modules/zod/v4/locales/fr-CA.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/fr-CA.js var error16 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -17643,7 +17643,7 @@ function fr_CA_default() { }; } -// node_modules/zod/v4/locales/he.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/he.js var error17 = () => { const TypeNames = { string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, @@ -17838,7 +17838,7 @@ function he_default() { }; } -// node_modules/zod/v4/locales/hr.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/hr.js var error18 = () => { const Sizable = { string: { unit: "znakova", verb: "imati" }, @@ -17961,7 +17961,7 @@ function hr_default() { }; } -// node_modules/zod/v4/locales/hu.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/hu.js var error19 = () => { const Sizable = { string: { unit: "karakter", verb: "legyen" }, @@ -18070,7 +18070,7 @@ function hu_default() { }; } -// node_modules/zod/v4/locales/hy.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/hy.js function getArmenianPlural(count, one, many) { return Math.abs(count) === 1 ? one : many; } @@ -18218,7 +18218,7 @@ function hy_default() { }; } -// node_modules/zod/v4/locales/id.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/id.js var error21 = () => { const Sizable = { string: { unit: "karakter", verb: "memiliki" }, @@ -18325,7 +18325,7 @@ function id_default() { }; } -// node_modules/zod/v4/locales/is.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/is.js var error22 = () => { const Sizable = { string: { unit: "stafi", verb: "a\xF0 hafa" }, @@ -18435,7 +18435,7 @@ function is_default() { }; } -// node_modules/zod/v4/locales/it.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/it.js var error23 = () => { const Sizable = { string: { unit: "caratteri", verb: "avere" }, @@ -18544,7 +18544,7 @@ function it_default() { }; } -// node_modules/zod/v4/locales/ja.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ja.js var error24 = () => { const Sizable = { string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, @@ -18652,7 +18652,7 @@ function ja_default() { }; } -// node_modules/zod/v4/locales/ka.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ka.js var error25 = () => { const Sizable = { string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, @@ -18765,7 +18765,7 @@ function ka_default() { }; } -// node_modules/zod/v4/locales/km.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/km.js var error26 = () => { const Sizable = { string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, @@ -18876,12 +18876,12 @@ function km_default() { }; } -// node_modules/zod/v4/locales/kh.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/kh.js function kh_default() { return km_default(); } -// node_modules/zod/v4/locales/ko.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ko.js var error27 = () => { const Sizable = { string: { unit: "\uBB38\uC790", verb: "to have" }, @@ -18993,7 +18993,7 @@ function ko_default() { }; } -// node_modules/zod/v4/locales/lt.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/lt.js var capitalizeFirstCharacter = (text) => { return text.charAt(0).toUpperCase() + text.slice(1); }; @@ -19197,7 +19197,7 @@ function lt_default() { }; } -// node_modules/zod/v4/locales/mk.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/mk.js var error29 = () => { const Sizable = { string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, @@ -19307,7 +19307,7 @@ function mk_default() { }; } -// node_modules/zod/v4/locales/ms.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ms.js var error30 = () => { const Sizable = { string: { unit: "aksara", verb: "mempunyai" }, @@ -19415,7 +19415,7 @@ function ms_default() { }; } -// node_modules/zod/v4/locales/nl.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/nl.js var error31 = () => { const Sizable = { string: { unit: "tekens", verb: "heeft" }, @@ -19526,7 +19526,7 @@ function nl_default() { }; } -// node_modules/zod/v4/locales/no.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/no.js var error32 = () => { const Sizable = { string: { unit: "tegn", verb: "\xE5 ha" }, @@ -19635,7 +19635,7 @@ function no_default() { }; } -// node_modules/zod/v4/locales/ota.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ota.js var error33 = () => { const Sizable = { string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, @@ -19745,7 +19745,7 @@ function ota_default() { }; } -// node_modules/zod/v4/locales/ps.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ps.js var error34 = () => { const Sizable = { string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, @@ -19860,7 +19860,7 @@ function ps_default() { }; } -// node_modules/zod/v4/locales/pl.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/pl.js var error35 = () => { const Sizable = { string: { unit: "znak\xF3w", verb: "mie\u0107" }, @@ -19970,7 +19970,7 @@ function pl_default() { }; } -// node_modules/zod/v4/locales/pt.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/pt.js var error36 = () => { const Sizable = { string: { unit: "caracteres", verb: "ter" }, @@ -20079,7 +20079,7 @@ function pt_default() { }; } -// node_modules/zod/v4/locales/ro.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ro.js var error37 = () => { const Sizable = { string: { unit: "caractere", verb: "s\u0103 aib\u0103" }, @@ -20199,7 +20199,7 @@ function ro_default() { }; } -// node_modules/zod/v4/locales/ru.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ru.js function getRussianPlural(count, one, few, many) { const absCount = Math.abs(count); const lastDigit = absCount % 10; @@ -20356,7 +20356,7 @@ function ru_default() { }; } -// node_modules/zod/v4/locales/sl.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/sl.js var error39 = () => { const Sizable = { string: { unit: "znakov", verb: "imeti" }, @@ -20466,7 +20466,7 @@ function sl_default() { }; } -// node_modules/zod/v4/locales/sv.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/sv.js var error40 = () => { const Sizable = { string: { unit: "tecken", verb: "att ha" }, @@ -20577,7 +20577,7 @@ function sv_default() { }; } -// node_modules/zod/v4/locales/ta.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ta.js var error41 = () => { const Sizable = { string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, @@ -20688,7 +20688,7 @@ function ta_default() { }; } -// node_modules/zod/v4/locales/th.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/th.js var error42 = () => { const Sizable = { string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, @@ -20799,7 +20799,7 @@ function th_default() { }; } -// node_modules/zod/v4/locales/tr.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/tr.js var error43 = () => { const Sizable = { string: { unit: "karakter", verb: "olmal\u0131" }, @@ -20905,7 +20905,7 @@ function tr_default() { }; } -// node_modules/zod/v4/locales/uk.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/uk.js var error44 = () => { const Sizable = { string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, @@ -21014,12 +21014,12 @@ function uk_default() { }; } -// node_modules/zod/v4/locales/ua.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ua.js function ua_default() { return uk_default(); } -// node_modules/zod/v4/locales/ur.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ur.js var error45 = () => { const Sizable = { string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, @@ -21130,7 +21130,7 @@ function ur_default() { }; } -// node_modules/zod/v4/locales/uz.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/uz.js var error46 = () => { const Sizable = { string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, @@ -21241,7 +21241,7 @@ function uz_default() { }; } -// node_modules/zod/v4/locales/vi.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/vi.js var error47 = () => { const Sizable = { string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, @@ -21350,7 +21350,7 @@ function vi_default() { }; } -// node_modules/zod/v4/locales/zh-CN.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/zh-CN.js var error48 = () => { const Sizable = { string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, @@ -21460,7 +21460,7 @@ function zh_CN_default() { }; } -// node_modules/zod/v4/locales/zh-TW.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/zh-TW.js var error49 = () => { const Sizable = { string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, @@ -21568,7 +21568,7 @@ function zh_TW_default() { }; } -// node_modules/zod/v4/locales/yo.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/yo.js var error50 = () => { const Sizable = { string: { unit: "\xE0mi", verb: "n\xED" }, @@ -21676,7 +21676,7 @@ function yo_default() { }; } -// node_modules/zod/v4/core/registries.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/registries.js var _a2; var $output = /* @__PURE__ */ Symbol("ZodOutput"); var $input = /* @__PURE__ */ Symbol("ZodInput"); @@ -21726,7 +21726,7 @@ function registry() { (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry()); var globalRegistry = globalThis.__zod_globalRegistry; -// node_modules/zod/v4/core/api.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/api.js // @__NO_SIDE_EFFECTS__ function _string(Class2, params) { return new Class2({ @@ -22765,7 +22765,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) { return inst; } -// node_modules/zod/v4/core/to-json-schema.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/to-json-schema.js function initializeContext(params) { let target = params?.target ?? "draft-2020-12"; if (target === "draft-4") @@ -23124,7 +23124,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) = return finalize(ctx, schema); }; -// node_modules/zod/v4/core/json-schema-processors.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/json-schema-processors.js var formatMap = { guid: "uuid", url: "uri", @@ -23668,7 +23668,7 @@ function toJSONSchema(input, params) { return finalize(ctx, input); } -// node_modules/zod/v4/core/json-schema-generator.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/json-schema-generator.js var JSONSchemaGenerator = class { /** @deprecated Access via ctx instead */ get metadataRegistry() { @@ -23743,10 +23743,10 @@ var JSONSchemaGenerator = class { } }; -// node_modules/zod/v4/core/json-schema.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/json-schema.js var json_schema_exports = {}; -// node_modules/zod/v4/mini/schemas.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/mini/schemas.js var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => { if (!inst._zod) throw new Error("Uninitialized schema in ZodMiniType."); @@ -23792,7 +23792,7 @@ function object(shape, params) { return new ZodMiniObject(def); } -// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js function isZ4Schema(s) { const schema = s; return !!schema._zod; @@ -23952,7 +23952,7 @@ function getLiteralValue(schema) { return void 0; } -// node_modules/zod/v4/classic/external.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/external.js var external_exports = {}; __export(external_exports, { $brand: () => $brand, @@ -24195,7 +24195,7 @@ __export(external_exports, { xor: () => xor }); -// node_modules/zod/v4/classic/schemas.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/schemas.js var schemas_exports2 = {}; __export(schemas_exports2, { ZodAny: () => ZodAny2, @@ -24366,7 +24366,7 @@ __export(schemas_exports2, { xor: () => xor }); -// node_modules/zod/v4/classic/checks.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/checks.js var checks_exports2 = {}; __export(checks_exports2, { endsWith: () => _endsWith, @@ -24400,7 +24400,7 @@ __export(checks_exports2, { uppercase: () => _uppercase }); -// node_modules/zod/v4/classic/iso.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/iso.js var iso_exports2 = {}; __export(iso_exports2, { ZodISODate: () => ZodISODate, @@ -24441,7 +24441,7 @@ function duration2(params) { return _isoDuration(ZodISODuration, params); } -// node_modules/zod/v4/classic/errors.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/errors.js var initializer2 = (inst, issues) => { $ZodError.init(inst, issues); inst.name = "ZodError"; @@ -24481,7 +24481,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, { Parent: Error }); -// node_modules/zod/v4/classic/parse.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/parse.js var parse2 = /* @__PURE__ */ _parse(ZodRealError); var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); var safeParse3 = /* @__PURE__ */ _safeParse(ZodRealError); @@ -24495,7 +24495,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); -// node_modules/zod/v4/classic/schemas.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/schemas.js var _installedGroups = /* @__PURE__ */ new WeakMap(); function _installLazyMethods(inst, group, methods) { const proto = Object.getPrototypeOf(inst); @@ -25785,7 +25785,7 @@ function preprocess(fn, schema) { }); } -// node_modules/zod/v4/classic/compat.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/compat.js var ZodIssueCode2 = { invalid_type: "invalid_type", too_big: "too_big", @@ -25811,7 +25811,7 @@ var ZodFirstPartyTypeKind2; /* @__PURE__ */ (function(ZodFirstPartyTypeKind3) { })(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {})); -// node_modules/zod/v4/classic/from-json-schema.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/from-json-schema.js var z = { ...schemas_exports2, ...checks_exports2, @@ -26291,7 +26291,7 @@ function fromJSONSchema(schema, params) { return convertSchema(normalized, ctx); } -// node_modules/zod/v4/classic/coerce.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/coerce.js var coerce_exports2 = {}; __export(coerce_exports2, { bigint: () => bigint3, @@ -26316,10 +26316,10 @@ function date4(params) { return _coercedDate(ZodDate2, params); } -// node_modules/zod/v4/classic/external.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/external.js config(en_default2()); -// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js var LATEST_PROTOCOL_VERSION = "2025-11-25"; var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"]; var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task"; @@ -27850,12 +27850,12 @@ var UrlElicitationRequiredError = class extends McpError { } }; -// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js function isTerminal(status) { return status === "completed" || status === "failed" || status === "cancelled"; } -// node_modules/zod-to-json-schema/dist/esm/Options.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/Options.js var ignoreOverride = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use"); var defaultOptions = { name: void 0, @@ -27889,7 +27889,7 @@ var getDefaultOptions = (options) => typeof options === "string" ? { ...options }; -// node_modules/zod-to-json-schema/dist/esm/Refs.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/Refs.js var getRefs = (options) => { const _options = getDefaultOptions(options); const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath; @@ -27910,7 +27910,7 @@ var getRefs = (options) => { }; }; -// node_modules/zod-to-json-schema/dist/esm/errorMessages.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/errorMessages.js function addErrorMessage(res, key, errorMessage2, refs) { if (!refs?.errorMessages) return; @@ -27926,7 +27926,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage2, refs) { addErrorMessage(res, key, errorMessage2, refs); } -// node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js var getRelativePath = (pathA, pathB) => { let i = 0; for (; i < pathA.length && i < pathB.length; i++) { @@ -27936,7 +27936,7 @@ var getRelativePath = (pathA, pathB) => { return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/"); }; -// node_modules/zod-to-json-schema/dist/esm/parsers/any.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/any.js function parseAnyDef(refs) { if (refs.target !== "openAi") { return {}; @@ -27952,7 +27952,7 @@ function parseAnyDef(refs) { }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/array.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/array.js function parseArrayDef(def, refs) { const res = { type: "array" @@ -27976,7 +27976,7 @@ function parseArrayDef(def, refs) { return res; } -// node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js function parseBigintDef(def, refs) { const res = { type: "integer", @@ -28022,24 +28022,24 @@ function parseBigintDef(def, refs) { return res; } -// node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js function parseBooleanDef() { return { type: "boolean" }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js function parseBrandedDef(_def, refs) { return parseDef(_def.type._def, refs); } -// node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js var parseCatchDef = (def, refs) => { return parseDef(def.innerType._def, refs); }; -// node_modules/zod-to-json-schema/dist/esm/parsers/date.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/date.js function parseDateDef(def, refs, overrideDateStrategy) { const strategy = overrideDateStrategy ?? refs.dateStrategy; if (Array.isArray(strategy)) { @@ -28098,7 +28098,7 @@ var integerDateParser = (def, refs) => { return res; }; -// node_modules/zod-to-json-schema/dist/esm/parsers/default.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/default.js function parseDefaultDef(_def, refs) { return { ...parseDef(_def.innerType._def, refs), @@ -28106,12 +28106,12 @@ function parseDefaultDef(_def, refs) { }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js function parseEffectsDef(_def, refs) { return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs); } -// node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js function parseEnumDef(def) { return { type: "string", @@ -28119,7 +28119,7 @@ function parseEnumDef(def) { }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js var isJsonSchema7AllOfType = (type) => { if ("type" in type && type.type === "string") return false; @@ -28161,7 +28161,7 @@ function parseIntersectionDef(def, refs) { } : void 0; } -// node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js function parseLiteralDef(def, refs) { const parsedType2 = typeof def.value; if (parsedType2 !== "bigint" && parsedType2 !== "number" && parsedType2 !== "boolean" && parsedType2 !== "string") { @@ -28181,7 +28181,7 @@ function parseLiteralDef(def, refs) { }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/string.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/string.js var emojiRegex2 = void 0; var zodPatterns = { /** @@ -28506,7 +28506,7 @@ function stringifyRegExpWithFlags(regex, refs) { return pattern; } -// node_modules/zod-to-json-schema/dist/esm/parsers/record.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/record.js function parseRecordDef(def, refs) { if (refs.target === "openAi") { console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."); @@ -28558,7 +28558,7 @@ function parseRecordDef(def, refs) { return schema; } -// node_modules/zod-to-json-schema/dist/esm/parsers/map.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/map.js function parseMapDef(def, refs) { if (refs.mapStrategy === "record") { return parseRecordDef(def, refs); @@ -28583,7 +28583,7 @@ function parseMapDef(def, refs) { }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js function parseNativeEnumDef(def) { const object3 = def.values; const actualKeys = Object.keys(def.values).filter((key) => { @@ -28597,7 +28597,7 @@ function parseNativeEnumDef(def) { }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/never.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/never.js function parseNeverDef(refs) { return refs.target === "openAi" ? void 0 : { not: parseAnyDef({ @@ -28607,7 +28607,7 @@ function parseNeverDef(refs) { }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/null.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/null.js function parseNullDef(refs) { return refs.target === "openApi3" ? { enum: ["null"], @@ -28617,7 +28617,7 @@ function parseNullDef(refs) { }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/union.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/union.js var primitiveMappings = { ZodString: "string", ZodNumber: "number", @@ -28685,7 +28685,7 @@ var asAnyOf = (def, refs) => { return anyOf.length ? { anyOf } : void 0; }; -// node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js function parseNullableDef(def, refs) { if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) { if (refs.target === "openApi3") { @@ -28717,7 +28717,7 @@ function parseNullableDef(def, refs) { return base && { anyOf: [base, { type: "null" }] }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/number.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/number.js function parseNumberDef(def, refs) { const res = { type: "number" @@ -28766,7 +28766,7 @@ function parseNumberDef(def, refs) { return res; } -// node_modules/zod-to-json-schema/dist/esm/parsers/object.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/object.js function parseObjectDef(def, refs) { const forceOptionalIntoNullable = refs.target === "openAi"; const result = { @@ -28836,7 +28836,7 @@ function safeIsOptional(schema) { } } -// node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js var parseOptionalDef = (def, refs) => { if (refs.currentPath.toString() === refs.propertyPath?.toString()) { return parseDef(def.innerType._def, refs); @@ -28855,7 +28855,7 @@ var parseOptionalDef = (def, refs) => { } : parseAnyDef(refs); }; -// node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js var parsePipelineDef = (def, refs) => { if (refs.pipeStrategy === "input") { return parseDef(def.in._def, refs); @@ -28875,12 +28875,12 @@ var parsePipelineDef = (def, refs) => { }; }; -// node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js function parsePromiseDef(def, refs) { return parseDef(def.type._def, refs); } -// node_modules/zod-to-json-schema/dist/esm/parsers/set.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/set.js function parseSetDef(def, refs) { const items = parseDef(def.valueType._def, { ...refs, @@ -28900,7 +28900,7 @@ function parseSetDef(def, refs) { return schema; } -// node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js function parseTupleDef(def, refs) { if (def.rest) { return { @@ -28928,24 +28928,24 @@ function parseTupleDef(def, refs) { } } -// node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js function parseUndefinedDef(refs) { return { not: parseAnyDef(refs) }; } -// node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js function parseUnknownDef(refs) { return parseAnyDef(refs); } -// node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js var parseReadonlyDef = (def, refs) => { return parseDef(def.innerType._def, refs); }; -// node_modules/zod-to-json-schema/dist/esm/selectParser.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/selectParser.js var selectParser = (def, typeName, refs) => { switch (typeName) { case ZodFirstPartyTypeKind.ZodString: @@ -29021,7 +29021,7 @@ var selectParser = (def, typeName, refs) => { } }; -// node_modules/zod-to-json-schema/dist/esm/parseDef.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parseDef.js function parseDef(def, refs, forceResolution = false) { const seenItem = refs.seen.get(def); if (refs.override) { @@ -29077,7 +29077,7 @@ var addMeta = (def, refs, jsonSchema) => { return jsonSchema; }; -// node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js var zodToJsonSchema = (schema, options) => { const refs = getRefs(options); let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({ @@ -29139,7 +29139,7 @@ var zodToJsonSchema = (schema, options) => { return combined; }; -// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js function mapMiniTarget(t) { if (!t) return "draft-7"; @@ -29181,7 +29181,7 @@ function parseWithCompat(schema, data) { return result.data; } -// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4; var Protocol = class { constructor(_options) { @@ -30135,7 +30135,7 @@ function mergeCapabilities(base, additional) { return result; } -// node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js var import_ajv = __toESM(require_ajv(), 1); var import_ajv_formats = __toESM(require_dist(), 1); function createDefaultAjvInstance() { @@ -30203,7 +30203,7 @@ var AjvJsonSchemaValidator = class { } }; -// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js var ExperimentalServerTasks = class { constructor(_server) { this._server = _server; @@ -30416,7 +30416,7 @@ var ExperimentalServerTasks = class { } }; -// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js function assertToolsCallTaskCapability(requests, method, entityName) { if (!requests) { throw new Error(`${entityName} does not support task creation (required for ${method})`); @@ -30451,7 +30451,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) { } } -// node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js var Server = class extends Protocol { /** * Initializes this server with the given name and version information. @@ -30822,7 +30822,7 @@ var Server = class extends Protocol { } }; -// node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable"); function isCompletable(schema) { return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema; @@ -30836,7 +30836,7 @@ var McpZodTypeKind; McpZodTypeKind2["Completable"] = "McpCompletable"; })(McpZodTypeKind || (McpZodTypeKind = {})); -// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/; function validateToolName(name) { const warnings = []; @@ -30894,7 +30894,7 @@ function validateAndWarnToolName(name) { return result.isValid; } -// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js var ExperimentalMcpServerTasks = class { constructor(_mcpServer) { this._mcpServer = _mcpServer; @@ -30909,7 +30909,7 @@ var ExperimentalMcpServerTasks = class { } }; -// node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js var McpServer = class { constructor(serverInfo, options) { this._registeredResources = {}; @@ -31701,10 +31701,10 @@ var EMPTY_COMPLETION_RESULT = { } }; -// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js import process3 from "node:process"; -// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024; var ReadBuffer = class { constructor(options) { @@ -31741,7 +31741,7 @@ function serializeMessage(message) { return JSON.stringify(message) + "\n"; } -// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js var StdioServerTransport = class { constructor(_stdin = process3.stdin, _stdout = process3.stdout, options) { this._stdin = _stdin; @@ -36225,22 +36225,16 @@ function selectOsWriteConfinementBackend(ctx) { return backend?.id ?? null; } -// src/producers/agy-adapter.ts -var AGY_REQUIRED_ENV = ["GEMINI_API_KEY"]; +// src/producers/cli-probe.ts var VERSION_TIMEOUT_MS = 1e4; var VERSION_OUTPUT_LIMIT = 64 * 1024; -var TEXT_LIMIT = 8e3; -function isRecord3(value) { - return typeof value === "object" && value !== null && !Array.isArray(value); -} -function stringProperty(value, name) { - if (!isRecord3(value)) return void 0; - const property = value[name]; - return typeof property === "string" ? property : void 0; +function parseSemver(stdout) { + const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); + return match?.[1] ?? null; } -function unavailableReport(ctx, reason, resolvedExecutable = null) { +function unavailableCapabilityReport(ctx, producerId, structuredOutput, reason, resolvedExecutable = null) { return { - producerId: "agy", + producerId, available: false, reason, os: ctx.os, @@ -36250,14 +36244,71 @@ function unavailableReport(ctx, reason, resolvedExecutable = null) { version: null, authState: "unknown", executionModes: ["edit"], - structuredOutput: true, + structuredOutput, writeConfinementBackend: null, laneEligibility: { edit: false } }; } -function parseVersion(stdout) { - const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); - return match?.[1] ?? null; +async function runVersionProbe(ctx, executable, args) { + return supervise(ctx.ps, { + executable, + args, + cwd: process.cwd(), + env: {}, + timeoutMs: VERSION_TIMEOUT_MS, + maxOutputBytes: VERSION_OUTPUT_LIMIT + }, {}); +} +async function probeOsConfinedCli(ctx, probe) { + const unavailable = (reason, executable2 = null) => unavailableCapabilityReport(ctx, probe.producerId, probe.structuredOutput, reason, executable2); + if (ctx.os === "win32") return unavailable("unsupported-platform"); + let executable; + try { + executable = await normalizeNodeShim( + await ctx.ps.resolveExecutable({ name: probe.executableName }) + ); + } catch { + return unavailable("missing-executable"); + } + try { + const result = await runVersionProbe(ctx, executable, ["--version"]); + const version2 = result.spawnError === void 0 && result.exitCode === 0 ? (probe.parseVersion ?? parseSemver)(result.stdout) : null; + if (version2 === null) return unavailable("probe-failed", executable); + if (probe.inspectSurface !== void 0) { + const reason = await probe.inspectSurface(ctx, executable); + if (reason !== null) return unavailable(reason, executable); + } + const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); + return { + producerId: probe.producerId, + available: true, + reason: null, + os: ctx.os, + arch: ctx.arch, + environmentType: ctx.environmentType, + resolvedExecutable: executable, + version: version2, + authState: probe.isAuthenticated() ? "authenticated" : "unauthenticated", + executionModes: ["edit"], + structuredOutput: probe.structuredOutput, + writeConfinementBackend, + laneEligibility: { edit: writeConfinementBackend !== null } + }; + } catch { + return unavailable("probe-failed", executable); + } +} + +// src/producers/agy-adapter.ts +var AGY_REQUIRED_ENV = ["GEMINI_API_KEY"]; +var TEXT_LIMIT = 8e3; +function isRecord3(value) { + return typeof value === "object" && value !== null && !Array.isArray(value); +} +function stringProperty(value, name) { + if (!isRecord3(value)) return void 0; + const property = value[name]; + return typeof property === "string" ? property : void 0; } function formatPrintTimeout(timeoutMs) { return `${Math.ceil(timeoutMs / 1e3)}s`; @@ -36277,47 +36328,16 @@ var AgyAdapter = class { return (this.deps.hasAuthStore ?? ((store) => existsSync2(join(store, "settings.json"))))(directory); } async probe(ctx) { - if (ctx.os === "win32") return unavailableReport(ctx, "unsupported-platform"); - let executable; - try { - executable = await normalizeNodeShim( - await ctx.ps.resolveExecutable({ name: "agy" }) - ); - } catch { - return unavailableReport(ctx, "missing-executable"); - } - try { - const result = await supervise(ctx.ps, { - executable, - args: ["--version"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS, - maxOutputBytes: VERSION_OUTPUT_LIMIT - }, {}); - const version2 = result.spawnError === void 0 && result.exitCode === 0 ? parseVersion(result.stdout) : null; - if (version2 === null) return unavailableReport(ctx, "probe-failed", executable); - const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); - const authStore = join(this.deps.homeDirectory, ".gemini", "antigravity-cli"); - const authState = this.hasAuthStore(authStore) ? "authenticated" : "unauthenticated"; - return { - producerId: this.producerId, - available: true, - reason: null, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable: executable, - version: version2, - authState, - executionModes: [...this.executionModes], - structuredOutput: this.structuredOutput, - writeConfinementBackend, - laneEligibility: { edit: writeConfinementBackend !== null } - }; - } catch { - return unavailableReport(ctx, "probe-failed", executable); - } + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "agy", + structuredOutput: this.structuredOutput, + isAuthenticated: () => this.hasAuthStore(this.configDirectory()) + }); + } + /** agy's settings/auth store; the only host state an attempt must write. */ + configDirectory() { + return join(this.deps.env.HOME ?? this.deps.homeDirectory, ".gemini", "antigravity-cli"); } buildInvocation(spec, ctx) { const args = [ @@ -36342,6 +36362,7 @@ var AgyAdapter = class { executable: ctx.executable, args, requiredEnv: [...AGY_REQUIRED_ENV], + inheritedStateWritablePaths: [this.configDirectory()], // Model sessions must reach the provider API; write-protection remains the confinement goal. network: "allowed" }; @@ -36450,7 +36471,7 @@ function stringProperty2(value, name) { const property = value[name]; return typeof property === "string" ? property : void 0; } -function unavailableReport2(ctx, reason, resolvedExecutable = null) { +function unavailableReport(ctx, reason, resolvedExecutable = null) { return { producerId: "codex", available: false, @@ -36467,7 +36488,7 @@ function unavailableReport2(ctx, reason, resolvedExecutable = null) { laneEligibility: { edit: false } }; } -function parseVersion2(stdout) { +function parseVersion(stdout) { const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); return match?.[1] ?? null; } @@ -36560,14 +36581,14 @@ var CodexAdapter = class { return (this.deps.hasAuthStore ?? ((store) => existsSync3(join2(store, "auth.json"))))(directory); } async probe(ctx) { - if (ctx.os === "win32") return unavailableReport2(ctx, "unsupported-platform"); + if (ctx.os === "win32") return unavailableReport(ctx, "unsupported-platform"); let executable; try { executable = await normalizeCodexExecutable( await ctx.ps.resolveExecutable({ name: "codex" }) ); } catch { - return unavailableReport2(ctx, "missing-executable"); + return unavailableReport(ctx, "missing-executable"); } try { const result = await supervise(ctx.ps, { @@ -36578,8 +36599,8 @@ var CodexAdapter = class { timeoutMs: VERSION_TIMEOUT_MS2, maxOutputBytes: VERSION_OUTPUT_LIMIT2 }, {}); - const version2 = result.spawnError === void 0 && result.exitCode === 0 && result.signal === null && result.timedOut === false && result.cancelled === false ? parseVersion2(result.stdout) : null; - if (version2 === null) return unavailableReport2(ctx, "probe-failed", executable); + const version2 = result.spawnError === void 0 && result.exitCode === 0 && result.signal === null && result.timedOut === false && result.cancelled === false ? parseVersion(result.stdout) : null; + if (version2 === null) return unavailableReport(ctx, "probe-failed", executable); const writeConfinementBackend = selectCodexWriteConfinementBackend(ctx); const authState = this.hasAuthStore(resolveCodexStore(this.deps)) ? "authenticated" : "unauthenticated"; return { @@ -36598,7 +36619,7 @@ var CodexAdapter = class { laneEligibility: { edit: writeConfinementBackend !== null } }; } catch { - return unavailableReport2(ctx, "probe-failed", executable); + return unavailableReport(ctx, "probe-failed", executable); } } buildInvocation(spec, ctx) { @@ -36768,29 +36789,6 @@ import { existsSync as existsSync4 } from "node:fs"; import { homedir as homedir3 } from "node:os"; import { join as join3 } from "node:path"; var OPENCODE_REQUIRED_ENV = ["OPENCODE_CONFIG_DIR", "XDG_DATA_HOME"]; -var VERSION_TIMEOUT_MS3 = 1e4; -var VERSION_OUTPUT_LIMIT3 = 64 * 1024; -function unavailableReport3(ctx, reason, resolvedExecutable = null) { - return { - producerId: "opencode", - available: false, - reason, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable, - version: null, - authState: "unknown", - executionModes: ["edit"], - structuredOutput: false, - writeConfinementBackend: null, - laneEligibility: { edit: false } - }; -} -function parseVersion3(stdout) { - const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); - return match?.[1] ?? null; -} function defaultOpenCodeEnv(deps) { if (deps.env.XDG_DATA_HOME !== void 0) return {}; const dataHome = join3(deps.homeDirectory, ".local", "share"); @@ -36811,47 +36809,18 @@ var OpenCodeAdapter = class { return (this.deps.hasAuthStore ?? ((store) => existsSync4(join3(store, "auth.json"))))(directory); } async probe(ctx) { - if (ctx.os === "win32") return unavailableReport3(ctx, "unsupported-platform"); - let executable; - try { - executable = await normalizeNodeShim( - await ctx.ps.resolveExecutable({ name: "opencode" }) - ); - } catch { - return unavailableReport3(ctx, "missing-executable"); - } - try { - const result = await supervise(ctx.ps, { - executable, - args: ["--version"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS3, - maxOutputBytes: VERSION_OUTPUT_LIMIT3 - }, {}); - const version2 = result.spawnError === void 0 && result.exitCode === 0 ? parseVersion3(result.stdout) : null; - if (version2 === null) return unavailableReport3(ctx, "probe-failed", executable); - const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); - const authStore = join3(this.deps.homeDirectory, ".local", "share", "opencode"); - const authState = this.hasAuthStore(authStore) ? "authenticated" : "unauthenticated"; - return { - producerId: this.producerId, - available: true, - reason: null, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable: executable, - version: version2, - authState, - executionModes: [...this.executionModes], - structuredOutput: this.structuredOutput, - writeConfinementBackend, - laneEligibility: { edit: writeConfinementBackend !== null } - }; - } catch { - return unavailableReport3(ctx, "probe-failed", executable); - } + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "opencode", + structuredOutput: this.structuredOutput, + isAuthenticated: () => this.hasAuthStore(join3(this.deps.homeDirectory, ".local", "share", "opencode")) + }); + } + /** OpenCode's XDG data (auth) and state directories, honoring host overrides. */ + stateDirectories() { + const dataHome = this.deps.env.XDG_DATA_HOME ?? join3(this.deps.homeDirectory, ".local", "share"); + const stateHome = this.deps.env.XDG_STATE_HOME ?? join3(this.deps.homeDirectory, ".local", "state"); + return [join3(dataHome, "opencode"), join3(stateHome, "opencode")]; } buildInvocation(spec, ctx) { const args = [ @@ -36872,6 +36841,7 @@ var OpenCodeAdapter = class { args, stdin: renderProducerPrompt(spec, ctx.readOnly === true), requiredEnv: [...OPENCODE_REQUIRED_ENV], + inheritedStateWritablePaths: this.stateDirectories(), env: defaultOpenCodeEnv({ env: this.deps.env, homeDirectory: this.deps.homeDirectory, @@ -36901,29 +36871,6 @@ import { existsSync as existsSync5 } from "node:fs"; import { homedir as homedir4 } from "node:os"; import { join as join4 } from "node:path"; var PI_REQUIRED_ENV = ["PI_API_KEY"]; -var VERSION_TIMEOUT_MS4 = 1e4; -var VERSION_OUTPUT_LIMIT4 = 64 * 1024; -function unavailableReport4(ctx, reason, resolvedExecutable = null) { - return { - producerId: "pi", - available: false, - reason, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable, - version: null, - authState: "unknown", - executionModes: ["edit"], - structuredOutput: false, - writeConfinementBackend: null, - laneEligibility: { edit: false } - }; -} -function parseVersion4(stdout) { - const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); - return match?.[1] ?? null; -} function defaultPiEnv(deps) { if (deps.env.HOME !== void 0) return {}; return deps.hasConfigDir(join4(deps.homeDirectory, ".pi")) ? { HOME: deps.homeDirectory } : {}; @@ -36946,47 +36893,16 @@ var PiAdapter = class { return existsSync5(directory); } async probe(ctx) { - if (ctx.os === "win32") return unavailableReport4(ctx, "unsupported-platform"); - let executable; - try { - executable = await normalizeNodeShim( - await ctx.ps.resolveExecutable({ name: "pi" }) - ); - } catch { - return unavailableReport4(ctx, "missing-executable"); - } - try { - const result = await supervise(ctx.ps, { - executable, - args: ["--version"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS4, - maxOutputBytes: VERSION_OUTPUT_LIMIT4 - }, {}); - const version2 = result.spawnError === void 0 && result.exitCode === 0 ? parseVersion4(result.stdout) : null; - if (version2 === null) return unavailableReport4(ctx, "probe-failed", executable); - const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); - const authStore = join4(this.deps.homeDirectory, ".pi", "agent"); - const authState = this.hasAuthStore(authStore) ? "authenticated" : "unauthenticated"; - return { - producerId: this.producerId, - available: true, - reason: null, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable: executable, - version: version2, - authState, - executionModes: [...this.executionModes], - structuredOutput: this.structuredOutput, - writeConfinementBackend, - laneEligibility: { edit: writeConfinementBackend !== null } - }; - } catch { - return unavailableReport4(ctx, "probe-failed", executable); - } + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "pi", + structuredOutput: this.structuredOutput, + isAuthenticated: () => this.hasAuthStore(this.agentStateDirectory()) + }); + } + /** Pi's auth + settings store; the only host state an attempt must write. */ + agentStateDirectory() { + return join4(this.deps.env.HOME ?? this.deps.homeDirectory, ".pi", "agent"); } buildInvocation(spec, ctx) { if (spec.producerOverrides?.model !== void 0) { @@ -37009,6 +36925,7 @@ var PiAdapter = class { args, stdin: renderProducerPrompt(spec, ctx.readOnly === true), requiredEnv: [...PI_REQUIRED_ENV], + inheritedStateWritablePaths: [this.agentStateDirectory()], env: defaultPiEnv({ env: this.deps.env, homeDirectory: this.deps.homeDirectory, @@ -37037,30 +36954,7 @@ var PiAdapter = class { import { existsSync as existsSync6 } from "node:fs"; import { homedir as homedir5 } from "node:os"; import { join as join5 } from "node:path"; -var VERSION_TIMEOUT_MS5 = 1e4; -var VERSION_OUTPUT_LIMIT5 = 64 * 1024; var REQUIRED_LONG_OPTIONS = ["--prompt", "--model"]; -function unavailableReport5(ctx, reason, resolvedExecutable = null) { - return { - producerId: "pythinker", - available: false, - reason, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable, - version: null, - authState: "unknown", - executionModes: ["edit"], - structuredOutput: false, - writeConfinementBackend: null, - laneEligibility: { edit: false } - }; -} -function parseVersion5(stdout) { - const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); - return match?.[1] ?? /\d+\.\d+\.\d+(?:[-+][^\s]+)?/u.exec(stdout)?.[0] ?? null; -} function parseLongOptionTokens(helpText) { const options = /* @__PURE__ */ new Set(); for (const line of helpText.split(/\r?\n/u)) { @@ -37105,67 +36999,29 @@ var PythinkerAdapter = class { return existsSync6(directory); } async probe(ctx) { - if (ctx.os === "win32") return unavailableReport5(ctx, "unsupported-platform"); - let executable; + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "pythinker", + structuredOutput: this.structuredOutput, + parseVersion: (stdout) => parseSemver(stdout) ?? /\d+\.\d+\.\d+(?:[-+][^\s]+)?/u.exec(stdout)?.[0] ?? null, + inspectSurface: (probeCtx, executable) => this.inspectCliSurface(probeCtx, executable), + isAuthenticated: () => this.hasAuthStore(resolvePythinkerHome(this.deps)) + }); + } + /** The installed CLI must expose every long option this adapter emits. */ + async inspectCliSurface(ctx, executable) { + let helpResult; try { - executable = await normalizeNodeShim( - await ctx.ps.resolveExecutable({ name: "pythinker" }) - ); + helpResult = await runVersionProbe(ctx, executable, ["--help"]); } catch { - return unavailableReport5(ctx, "missing-executable"); + return "unsupported-cli-surface"; } - try { - const result = await supervise(ctx.ps, { - executable, - args: ["--version"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS5, - maxOutputBytes: VERSION_OUTPUT_LIMIT5 - }, {}); - const version2 = result.spawnError === void 0 && result.exitCode === 0 ? parseVersion5(result.stdout) : null; - if (version2 === null) return unavailableReport5(ctx, "probe-failed", executable); - let helpResult; - try { - helpResult = await supervise(ctx.ps, { - executable, - args: ["--help"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS5, - maxOutputBytes: VERSION_OUTPUT_LIMIT5 - }, {}); - } catch { - return unavailableReport5(ctx, "unsupported-cli-surface", executable); - } - const options = parseLongOptionTokens( - `${helpResult.stdout} -${helpResult.stderr}` - ); - if (helpResult.spawnError !== void 0 || helpResult.exitCode !== 0 || REQUIRED_LONG_OPTIONS.some((option) => !options.has(option))) { - return unavailableReport5(ctx, "unsupported-cli-surface", executable); - } - const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); - const authStore = resolvePythinkerHome(this.deps); - const authState = this.hasAuthStore(authStore) ? "authenticated" : "unauthenticated"; - return { - producerId: this.producerId, - available: true, - reason: null, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable: executable, - version: version2, - authState, - executionModes: [...this.executionModes], - structuredOutput: this.structuredOutput, - writeConfinementBackend, - laneEligibility: { edit: writeConfinementBackend !== null } - }; - } catch { - return unavailableReport5(ctx, "probe-failed", executable); + const options = parseLongOptionTokens(`${helpResult.stdout} +${helpResult.stderr}`); + if (helpResult.spawnError !== void 0 || helpResult.exitCode !== 0 || REQUIRED_LONG_OPTIONS.some((option) => !options.has(option))) { + return "unsupported-cli-surface"; } + return null; } buildInvocation(spec, ctx) { if (spec.producerOverrides?.reasoningEffort !== void 0) { @@ -37184,6 +37040,7 @@ ${helpResult.stderr}` executable: ctx.executable, args, requiredEnv: [...PYTHINKER_REQUIRED_ENV], + inheritedStateWritablePaths: [resolvePythinkerHome(this.deps)], env: defaultPythinkerEnv({ env: this.deps.env, homeDirectory: this.deps.homeDirectory, @@ -44076,8 +43933,6 @@ import { rm as rm6 } from "node:fs/promises"; // src/platform/sandbox/seatbelt.ts import { realpathSync as realpathSync2 } from "node:fs"; -import { homedir as homedir6 } from "node:os"; -import { basename, join as join6 } from "node:path/posix"; function buildReadOnlySeatbeltPolicy(args) { return { worktreePath: "", @@ -44106,35 +43961,9 @@ function sbPath(path32) { } return `"${path32.replace(/\\/gu, "\\\\").replace(/"/gu, '\\"')}"`; } -function openCodeWritablePaths(invocation, policy) { - if (policy.tempHome !== null || !invocation.requiredEnv.includes("OPENCODE_CONFIG_DIR")) return []; - const home = homedir6(); - const dataHome = invocation.env?.XDG_DATA_HOME ?? process.env.XDG_DATA_HOME ?? join6(home, ".local", "share"); - const stateHome = invocation.env?.XDG_STATE_HOME ?? process.env.XDG_STATE_HOME ?? join6(home, ".local", "state"); - return [join6(dataHome, "opencode"), join6(stateHome, "opencode")]; -} -function piWritablePaths(invocation, policy) { - if (policy.tempHome !== null || !invocation.requiredEnv.includes("PI_API_KEY")) return []; - const home = invocation.env?.HOME ?? process.env.HOME ?? homedir6(); - return [join6(home, ".pi", "agent")]; -} -function isPythinkerInvocation(invocation) { - return [invocation.executable.command, ...invocation.executable.prefixArgs].some((part) => basename(part) === "pythinker"); -} -function isAgyInvocation(invocation) { - return [invocation.executable.command, ...invocation.executable.prefixArgs].some((part) => basename(part) === "agy"); -} -function agyWritablePaths(invocation, policy) { - if (policy.tempHome !== null || !isAgyInvocation(invocation)) return []; - const home = invocation.env?.HOME ?? process.env.HOME ?? homedir6(); - return [join6(home, ".gemini", "antigravity-cli")]; -} -function pythinkerWritablePaths(invocation, policy) { - if (policy.tempHome !== null || !isPythinkerInvocation(invocation)) return []; - const configuredHome = invocation.env?.PYTHINKER_SHARE_DIR ?? process.env.PYTHINKER_SHARE_DIR; - if (configuredHome !== void 0 && configuredHome.length > 0) return [configuredHome]; - const home = invocation.env?.HOME ?? process.env.HOME ?? homedir6(); - return [join6(home, ".pythinker")]; +function inheritedStateWritablePaths(invocation, policy) { + if (policy.tempHome !== null) return []; + return [...invocation.inheritedStateWritablePaths ?? []]; } function buildProfile(policy, additionalWritable) { const writable = [...new Set([ @@ -44163,12 +43992,7 @@ function buildProfile(policy, additionalWritable) { return lines.join("\n"); } function wrapInvocationWithSeatbelt(invocation, policy) { - const profile = buildProfile(policy, [ - ...openCodeWritablePaths(invocation, policy), - ...piWritablePaths(invocation, policy), - ...pythinkerWritablePaths(invocation, policy), - ...agyWritablePaths(invocation, policy) - ]); + const profile = buildProfile(policy, inheritedStateWritablePaths(invocation, policy)); const inner = [ invocation.executable.command, ...invocation.executable.prefixArgs, @@ -49335,14 +49159,14 @@ async function freezeCandidate(args) { // src/verify/baseline-verifier.ts import { randomUUID as randomUUID9 } from "node:crypto"; import { readFile as readFile5 } from "node:fs/promises"; -import { basename as basename2 } from "node:path"; +import { basename } from "node:path"; import path24 from "node:path"; function throwIfAborted(signal) { if (!signal?.aborted) return; throw new DOMException("Baseline verification was cancelled", "AbortError"); } function executableName(value) { - return basename2(value).toLowerCase().replace(/\.(?:cmd|exe|mjs|cjs|js)$/u, ""); + return basename(value).toLowerCase().replace(/\.(?:cmd|exe|mjs|cjs|js)$/u, ""); } function firstPositional(args) { const optionsWithValues = /* @__PURE__ */ new Set([ @@ -53155,7 +52979,7 @@ function createHostingCommandRunner(platformServices = getPlatformServices()) { return toCommandResult(exit); }; } -function parseVersion6(output) { +function parseVersion2(output) { const firstLine = output.split(/\r?\n/u, 1)[0] ?? ""; const match = /^gh version (\d+)\.(\d+)\.(\d+)(?:\s|$)/u.exec(firstLine); if (match === null) return null; @@ -53376,7 +53200,7 @@ var GitHubCliAdapter = class { failCommand(error51, "preflight-gh-unavailable"); } requireCleanExit(version2, "preflight-gh-unavailable"); - const parsedVersion = parseVersion6(version2.stdout); + const parsedVersion = parseVersion2(version2.stdout); if (parsedVersion === null) fail3("preflight-gh-version-invalid"); if (!versionAtLeast(parsedVersion, MINIMUM_GH_VERSION)) { fail3("preflight-gh-version-unsupported"); diff --git a/src/platform/sandbox/seatbelt.ts b/src/platform/sandbox/seatbelt.ts index 951717f..bc5964c 100644 --- a/src/platform/sandbox/seatbelt.ts +++ b/src/platform/sandbox/seatbelt.ts @@ -1,6 +1,4 @@ import { realpathSync } from "node:fs"; -import { homedir } from "node:os"; -import { basename, join } from "node:path/posix"; import type { ProducerInvocation } from "../../producers/producer-adapter.js"; export interface SeatbeltPolicy { @@ -51,72 +49,16 @@ function sbPath(path: string): string { return `"${path.replace(/\\/gu, "\\\\").replace(/"/gu, '\\"')}"`; } -function openCodeWritablePaths( - invocation: ProducerInvocation, - policy: SeatbeltPolicy, -): string[] { - if ( - policy.tempHome !== null - || !invocation.requiredEnv.includes("OPENCODE_CONFIG_DIR") - ) return []; - - const home = homedir(); - const dataHome = invocation.env?.XDG_DATA_HOME - ?? process.env.XDG_DATA_HOME - ?? join(home, ".local", "share"); - const stateHome = invocation.env?.XDG_STATE_HOME - ?? process.env.XDG_STATE_HOME - ?? join(home, ".local", "state"); - return [join(dataHome, "opencode"), join(stateHome, "opencode")]; -} - -function piWritablePaths( - invocation: ProducerInvocation, - policy: SeatbeltPolicy, -): string[] { - if ( - policy.tempHome !== null - || !invocation.requiredEnv.includes("PI_API_KEY") - ) return []; - - const home = invocation.env?.HOME ?? process.env.HOME ?? homedir(); - return [join(home, ".pi", "agent")]; -} - -function isPythinkerInvocation(invocation: ProducerInvocation): boolean { - return [invocation.executable.command, ...invocation.executable.prefixArgs] - .some(part => basename(part) === "pythinker"); -} - -function isAgyInvocation(invocation: ProducerInvocation): boolean { - return [invocation.executable.command, ...invocation.executable.prefixArgs] - .some(part => basename(part) === "agy"); -} - -function agyWritablePaths( - invocation: ProducerInvocation, - policy: SeatbeltPolicy, -): string[] { - if (policy.tempHome !== null || !isAgyInvocation(invocation)) return []; - - const home = invocation.env?.HOME ?? process.env.HOME ?? homedir(); - return [join(home, ".gemini", "antigravity-cli")]; -} - -function pythinkerWritablePaths( +/** + * State the Producer declared it must write while running with the real HOME. + * A temporary home replaces that state wholesale, so the declaration is moot. + */ +function inheritedStateWritablePaths( invocation: ProducerInvocation, policy: SeatbeltPolicy, ): string[] { - if (policy.tempHome !== null || !isPythinkerInvocation(invocation)) return []; - - // Pythinker's real default data directory is `~/.pythinker`, overridable with - // `PYTHINKER_SHARE_DIR` — see the matching rationale in pythinker-adapter.ts. - const configuredHome = invocation.env?.PYTHINKER_SHARE_DIR - ?? process.env.PYTHINKER_SHARE_DIR; - if (configuredHome !== undefined && configuredHome.length > 0) return [configuredHome]; - - const home = invocation.env?.HOME ?? process.env.HOME ?? homedir(); - return [join(home, ".pythinker")]; + if (policy.tempHome !== null) return []; + return [...(invocation.inheritedStateWritablePaths ?? [])]; } function buildProfile(policy: SeatbeltPolicy, additionalWritable: string[]): string { @@ -156,12 +98,7 @@ export function wrapInvocationWithSeatbelt( invocation: ProducerInvocation, policy: SeatbeltPolicy, ): ProducerInvocation { - const profile = buildProfile(policy, [ - ...openCodeWritablePaths(invocation, policy), - ...piWritablePaths(invocation, policy), - ...pythinkerWritablePaths(invocation, policy), - ...agyWritablePaths(invocation, policy), - ]); + const profile = buildProfile(policy, inheritedStateWritablePaths(invocation, policy)); const inner = [ invocation.executable.command, ...invocation.executable.prefixArgs, diff --git a/src/producers/agy-adapter.ts b/src/producers/agy-adapter.ts index fb7fe03..47b1a7b 100644 --- a/src/producers/agy-adapter.ts +++ b/src/producers/agy-adapter.ts @@ -1,14 +1,9 @@ import { existsSync } from "node:fs"; import { homedir } from "node:os"; import { join } from "node:path"; -import { supervise } from "../platform/process-supervisor.js"; -import type { ResolvedExecutable } from "../platform/platform-services.js"; import type { DelegationSpec } from "../protocol/delegation-spec.js"; -import { - normalizeNodeShim, - renderProducerPrompt, - selectOsWriteConfinementBackend, -} from "./plain-text.js"; +import { probeOsConfinedCli } from "./cli-probe.js"; +import { renderProducerPrompt } from "./plain-text.js"; import type { AdapterEvent, CapabilityReport, @@ -20,8 +15,6 @@ import type { } from "./producer-adapter.js"; const AGY_REQUIRED_ENV = ["GEMINI_API_KEY"] as const; -const VERSION_TIMEOUT_MS = 10_000; -const VERSION_OUTPUT_LIMIT = 64 * 1024; const TEXT_LIMIT = 8_000; function isRecord(value: unknown): value is Record { @@ -34,33 +27,6 @@ function stringProperty(value: unknown, name: string): string | undefined { return typeof property === "string" ? property : undefined; } -function unavailableReport( - ctx: ProbeContext, - reason: string, - resolvedExecutable: ResolvedExecutable | null = null, -): CapabilityReport { - return { - producerId: "agy", - available: false, - reason, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable, - version: null, - authState: "unknown", - executionModes: ["edit"], - structuredOutput: true, - writeConfinementBackend: null, - laneEligibility: { edit: false }, - }; -} - -function parseVersion(stdout: string): string | null { - const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); - return match?.[1] ?? null; -} - /** Go time.ParseDuration accepts a bare seconds-magnitude unit; keep it simple. */ function formatPrintTimeout(timeoutMs: number): string { return `${Math.ceil(timeoutMs / 1000)}s`; @@ -87,54 +53,17 @@ export class AgyAdapter implements ProducerAdapter { } async probe(ctx: ProbeContext): Promise { - if (ctx.os === "win32") return unavailableReport(ctx, "unsupported-platform"); - - let executable: ResolvedExecutable; - try { - executable = await normalizeNodeShim( - await ctx.ps.resolveExecutable({ name: "agy" }), - ); - } catch { - return unavailableReport(ctx, "missing-executable"); - } + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "agy", + structuredOutput: this.structuredOutput, + isAuthenticated: () => this.hasAuthStore(this.configDirectory()), + }); + } - try { - const result = await supervise(ctx.ps, { - executable, - args: ["--version"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS, - maxOutputBytes: VERSION_OUTPUT_LIMIT, - }, {}); - const version = result.spawnError === undefined && result.exitCode === 0 - ? parseVersion(result.stdout) - : null; - if (version === null) return unavailableReport(ctx, "probe-failed", executable); - - const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); - const authStore = join(this.deps.homeDirectory, ".gemini", "antigravity-cli"); - const authState = this.hasAuthStore(authStore) - ? "authenticated" - : "unauthenticated"; - return { - producerId: this.producerId, - available: true, - reason: null, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable: executable, - version, - authState, - executionModes: [...this.executionModes], - structuredOutput: this.structuredOutput, - writeConfinementBackend, - laneEligibility: { edit: writeConfinementBackend !== null }, - }; - } catch { - return unavailableReport(ctx, "probe-failed", executable); - } + /** agy's settings/auth store; the only host state an attempt must write. */ + private configDirectory(): string { + return join(this.deps.env.HOME ?? this.deps.homeDirectory, ".gemini", "antigravity-cli"); } buildInvocation(spec: DelegationSpec, ctx: InvocationContext): ProducerInvocation { @@ -161,6 +90,7 @@ export class AgyAdapter implements ProducerAdapter { executable: ctx.executable, args, requiredEnv: [...AGY_REQUIRED_ENV], + inheritedStateWritablePaths: [this.configDirectory()], // Model sessions must reach the provider API; write-protection remains the confinement goal. network: "allowed", }; diff --git a/src/producers/cli-probe.ts b/src/producers/cli-probe.ts new file mode 100644 index 0000000..fbae93f --- /dev/null +++ b/src/producers/cli-probe.ts @@ -0,0 +1,123 @@ +import { supervise } from "../platform/process-supervisor.js"; +import type { ResolvedExecutable } from "../platform/platform-services.js"; +import { normalizeNodeShim, selectOsWriteConfinementBackend } from "./plain-text.js"; +import type { CapabilityReport, ProbeContext } from "./producer-adapter.js"; + +const VERSION_TIMEOUT_MS = 10_000; +const VERSION_OUTPUT_LIMIT = 64 * 1024; + +/** + * Probe contract for a CLI Producer whose write confinement is supplied by the + * host OS backend (macOS Seatbelt) rather than by the CLI itself. + */ +export interface OsConfinedCliProbe { + producerId: string; + executableName: string; + structuredOutput: boolean; + parseVersion?: (stdout: string) => string | null; + /** + * Extra surface checks after the version succeeds; return an unavailability + * reason to fail the probe, or null to continue. + */ + inspectSurface?: (ctx: ProbeContext, executable: ResolvedExecutable) => Promise; + isAuthenticated: () => boolean; +} + +export function parseSemver(stdout: string): string | null { + const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); + return match?.[1] ?? null; +} + +export function unavailableCapabilityReport( + ctx: ProbeContext, + producerId: string, + structuredOutput: boolean, + reason: string, + resolvedExecutable: ResolvedExecutable | null = null, +): CapabilityReport { + return { + producerId, + available: false, + reason, + os: ctx.os, + arch: ctx.arch, + environmentType: ctx.environmentType, + resolvedExecutable, + version: null, + authState: "unknown", + executionModes: ["edit"], + structuredOutput, + writeConfinementBackend: null, + laneEligibility: { edit: false }, + }; +} + +export async function runVersionProbe( + ctx: ProbeContext, + executable: ResolvedExecutable, + args: string[], +): Promise<{ stdout: string; stderr: string; exitCode: number | null; spawnError?: unknown }> { + return supervise(ctx.ps, { + executable, + args, + cwd: process.cwd(), + env: {}, + timeoutMs: VERSION_TIMEOUT_MS, + maxOutputBytes: VERSION_OUTPUT_LIMIT, + }, {}); +} + +/** + * Shared probe: unsupported on win32; resolve the executable; require a + * parseable `--version`; optionally inspect the CLI surface; then report edit + * eligibility honestly from the host confinement backend and auth state. + */ +export async function probeOsConfinedCli( + ctx: ProbeContext, + probe: OsConfinedCliProbe, +): Promise { + const unavailable = (reason: string, executable: ResolvedExecutable | null = null) => + unavailableCapabilityReport(ctx, probe.producerId, probe.structuredOutput, reason, executable); + if (ctx.os === "win32") return unavailable("unsupported-platform"); + + let executable: ResolvedExecutable; + try { + executable = await normalizeNodeShim( + await ctx.ps.resolveExecutable({ name: probe.executableName }), + ); + } catch { + return unavailable("missing-executable"); + } + + try { + const result = await runVersionProbe(ctx, executable, ["--version"]); + const version = result.spawnError === undefined && result.exitCode === 0 + ? (probe.parseVersion ?? parseSemver)(result.stdout) + : null; + if (version === null) return unavailable("probe-failed", executable); + + if (probe.inspectSurface !== undefined) { + const reason = await probe.inspectSurface(ctx, executable); + if (reason !== null) return unavailable(reason, executable); + } + + const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); + return { + producerId: probe.producerId, + available: true, + reason: null, + os: ctx.os, + arch: ctx.arch, + environmentType: ctx.environmentType, + resolvedExecutable: executable, + version, + authState: probe.isAuthenticated() ? "authenticated" : "unauthenticated", + executionModes: ["edit"], + structuredOutput: probe.structuredOutput, + writeConfinementBackend, + laneEligibility: { edit: writeConfinementBackend !== null }, + }; + } catch { + return unavailable("probe-failed", executable); + } +} diff --git a/src/producers/opencode-adapter.ts b/src/producers/opencode-adapter.ts index ded2b55..a594429 100644 --- a/src/producers/opencode-adapter.ts +++ b/src/producers/opencode-adapter.ts @@ -1,15 +1,9 @@ import { existsSync } from "node:fs"; import { homedir } from "node:os"; import { join } from "node:path"; -import { supervise } from "../platform/process-supervisor.js"; -import type { ResolvedExecutable } from "../platform/platform-services.js"; import type { DelegationSpec } from "../protocol/delegation-spec.js"; -import { - normalizeNodeShim, - normalizePlainText, - renderProducerPrompt, - selectOsWriteConfinementBackend, -} from "./plain-text.js"; +import { probeOsConfinedCli } from "./cli-probe.js"; +import { normalizePlainText, renderProducerPrompt } from "./plain-text.js"; import type { CapabilityReport, InvocationContext, @@ -20,35 +14,6 @@ import type { } from "./producer-adapter.js"; const OPENCODE_REQUIRED_ENV = ["OPENCODE_CONFIG_DIR", "XDG_DATA_HOME"] as const; -const VERSION_TIMEOUT_MS = 10_000; -const VERSION_OUTPUT_LIMIT = 64 * 1024; - -function unavailableReport( - ctx: ProbeContext, - reason: string, - resolvedExecutable: ResolvedExecutable | null = null, -): CapabilityReport { - return { - producerId: "opencode", - available: false, - reason, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable, - version: null, - authState: "unknown", - executionModes: ["edit"], - structuredOutput: false, - writeConfinementBackend: null, - laneEligibility: { edit: false }, - }; -} - -function parseVersion(stdout: string): string | null { - const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); - return match?.[1] ?? null; -} export interface OpenCodeAdapterDeps { env: Record; @@ -81,54 +46,22 @@ export class OpenCodeAdapter implements ProducerAdapter { } async probe(ctx: ProbeContext): Promise { - if (ctx.os === "win32") return unavailableReport(ctx, "unsupported-platform"); - - let executable: ResolvedExecutable; - try { - executable = await normalizeNodeShim( - await ctx.ps.resolveExecutable({ name: "opencode" }), - ); - } catch { - return unavailableReport(ctx, "missing-executable"); - } - - try { - const result = await supervise(ctx.ps, { - executable, - args: ["--version"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS, - maxOutputBytes: VERSION_OUTPUT_LIMIT, - }, {}); - const version = result.spawnError === undefined && result.exitCode === 0 - ? parseVersion(result.stdout) - : null; - if (version === null) return unavailableReport(ctx, "probe-failed", executable); + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "opencode", + structuredOutput: this.structuredOutput, + isAuthenticated: () => + this.hasAuthStore(join(this.deps.homeDirectory, ".local", "share", "opencode")), + }); + } - const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); - const authStore = join(this.deps.homeDirectory, ".local", "share", "opencode"); - const authState = this.hasAuthStore(authStore) - ? "authenticated" - : "unauthenticated"; - return { - producerId: this.producerId, - available: true, - reason: null, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable: executable, - version, - authState, - executionModes: [...this.executionModes], - structuredOutput: this.structuredOutput, - writeConfinementBackend, - laneEligibility: { edit: writeConfinementBackend !== null }, - }; - } catch { - return unavailableReport(ctx, "probe-failed", executable); - } + /** OpenCode's XDG data (auth) and state directories, honoring host overrides. */ + private stateDirectories(): string[] { + const dataHome = this.deps.env.XDG_DATA_HOME + ?? join(this.deps.homeDirectory, ".local", "share"); + const stateHome = this.deps.env.XDG_STATE_HOME + ?? join(this.deps.homeDirectory, ".local", "state"); + return [join(dataHome, "opencode"), join(stateHome, "opencode")]; } buildInvocation(spec: DelegationSpec, ctx: InvocationContext): ProducerInvocation { @@ -151,6 +84,7 @@ export class OpenCodeAdapter implements ProducerAdapter { args, stdin: renderProducerPrompt(spec, ctx.readOnly === true), requiredEnv: [...OPENCODE_REQUIRED_ENV], + inheritedStateWritablePaths: this.stateDirectories(), env: defaultOpenCodeEnv({ env: this.deps.env, homeDirectory: this.deps.homeDirectory, diff --git a/src/producers/pi-adapter.ts b/src/producers/pi-adapter.ts index 43b71b0..9af3fc1 100644 --- a/src/producers/pi-adapter.ts +++ b/src/producers/pi-adapter.ts @@ -1,15 +1,9 @@ import { existsSync } from "node:fs"; import { homedir } from "node:os"; import { join } from "node:path"; -import { supervise } from "../platform/process-supervisor.js"; -import type { ResolvedExecutable } from "../platform/platform-services.js"; import type { DelegationSpec } from "../protocol/delegation-spec.js"; -import { - normalizeNodeShim, - normalizePlainText, - renderProducerPrompt, - selectOsWriteConfinementBackend, -} from "./plain-text.js"; +import { probeOsConfinedCli } from "./cli-probe.js"; +import { normalizePlainText, renderProducerPrompt } from "./plain-text.js"; import type { CapabilityReport, InvocationContext, @@ -20,35 +14,6 @@ import type { } from "./producer-adapter.js"; const PI_REQUIRED_ENV = ["PI_API_KEY"] as const; -const VERSION_TIMEOUT_MS = 10_000; -const VERSION_OUTPUT_LIMIT = 64 * 1024; - -function unavailableReport( - ctx: ProbeContext, - reason: string, - resolvedExecutable: ResolvedExecutable | null = null, -): CapabilityReport { - return { - producerId: "pi", - available: false, - reason, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable, - version: null, - authState: "unknown", - executionModes: ["edit"], - structuredOutput: false, - writeConfinementBackend: null, - laneEligibility: { edit: false }, - }; -} - -function parseVersion(stdout: string): string | null { - const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); - return match?.[1] ?? null; -} export interface PiAdapterDeps { env: Record; @@ -86,54 +51,17 @@ export class PiAdapter implements ProducerAdapter { } async probe(ctx: ProbeContext): Promise { - if (ctx.os === "win32") return unavailableReport(ctx, "unsupported-platform"); - - let executable: ResolvedExecutable; - try { - executable = await normalizeNodeShim( - await ctx.ps.resolveExecutable({ name: "pi" }), - ); - } catch { - return unavailableReport(ctx, "missing-executable"); - } - - try { - const result = await supervise(ctx.ps, { - executable, - args: ["--version"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS, - maxOutputBytes: VERSION_OUTPUT_LIMIT, - }, {}); - const version = result.spawnError === undefined && result.exitCode === 0 - ? parseVersion(result.stdout) - : null; - if (version === null) return unavailableReport(ctx, "probe-failed", executable); + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "pi", + structuredOutput: this.structuredOutput, + isAuthenticated: () => this.hasAuthStore(this.agentStateDirectory()), + }); + } - const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); - const authStore = join(this.deps.homeDirectory, ".pi", "agent"); - const authState = this.hasAuthStore(authStore) - ? "authenticated" - : "unauthenticated"; - return { - producerId: this.producerId, - available: true, - reason: null, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable: executable, - version, - authState, - executionModes: [...this.executionModes], - structuredOutput: this.structuredOutput, - writeConfinementBackend, - laneEligibility: { edit: writeConfinementBackend !== null }, - }; - } catch { - return unavailableReport(ctx, "probe-failed", executable); - } + /** Pi's auth + settings store; the only host state an attempt must write. */ + private agentStateDirectory(): string { + return join(this.deps.env.HOME ?? this.deps.homeDirectory, ".pi", "agent"); } buildInvocation(spec: DelegationSpec, ctx: InvocationContext): ProducerInvocation { @@ -162,6 +90,7 @@ export class PiAdapter implements ProducerAdapter { args, stdin: renderProducerPrompt(spec, ctx.readOnly === true), requiredEnv: [...PI_REQUIRED_ENV], + inheritedStateWritablePaths: [this.agentStateDirectory()], env: defaultPiEnv({ env: this.deps.env, homeDirectory: this.deps.homeDirectory, diff --git a/src/producers/producer-adapter.ts b/src/producers/producer-adapter.ts index 9057393..6d28918 100644 --- a/src/producers/producer-adapter.ts +++ b/src/producers/producer-adapter.ts @@ -38,6 +38,14 @@ export interface ProducerInvocation { requiredEnv: string[]; /** Adapter-supplied defaults; never override a host-provided allowlisted value. */ env?: Record; + /** + * Absolute paths the Producer must be able to write when it runs with the + * host's real HOME (no temporary home): its own auth/config/state store. + * The OS write-confinement backend grants exactly these on top of the + * worktree; it never derives them from executable identity or env names. + * Ignored whenever a temporary home is in effect. + */ + inheritedStateWritablePaths?: string[]; network: "denied" | "allowed"; } diff --git a/src/producers/pythinker-adapter.ts b/src/producers/pythinker-adapter.ts index 51b79c0..7110fe9 100644 --- a/src/producers/pythinker-adapter.ts +++ b/src/producers/pythinker-adapter.ts @@ -1,15 +1,10 @@ import { existsSync } from "node:fs"; import { homedir } from "node:os"; import { join } from "node:path"; -import { supervise } from "../platform/process-supervisor.js"; import type { ResolvedExecutable } from "../platform/platform-services.js"; import type { DelegationSpec } from "../protocol/delegation-spec.js"; -import { - normalizeNodeShim, - normalizePlainText, - renderProducerPrompt, - selectOsWriteConfinementBackend, -} from "./plain-text.js"; +import { parseSemver, probeOsConfinedCli, runVersionProbe } from "./cli-probe.js"; +import { normalizePlainText, renderProducerPrompt } from "./plain-text.js"; import type { CapabilityReport, InvocationContext, @@ -19,37 +14,8 @@ import type { ProducerInvocation, } from "./producer-adapter.js"; -const VERSION_TIMEOUT_MS = 10_000; -const VERSION_OUTPUT_LIMIT = 64 * 1024; const REQUIRED_LONG_OPTIONS = ["--prompt", "--model"] as const; -function unavailableReport( - ctx: ProbeContext, - reason: string, - resolvedExecutable: ResolvedExecutable | null = null, -): CapabilityReport { - return { - producerId: "pythinker", - available: false, - reason, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable, - version: null, - authState: "unknown", - executionModes: ["edit"], - structuredOutput: false, - writeConfinementBackend: null, - laneEligibility: { edit: false }, - }; -} - -function parseVersion(stdout: string): string | null { - const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); - return match?.[1] ?? /\d+\.\d+\.\d+(?:[-+][^\s]+)?/u.exec(stdout)?.[0] ?? null; -} - function parseLongOptionTokens(helpText: string): Set { const options = new Set(); for (const line of helpText.split(/\r?\n/u)) { @@ -132,78 +98,37 @@ export class PythinkerAdapter implements ProducerAdapter { } async probe(ctx: ProbeContext): Promise { - if (ctx.os === "win32") return unavailableReport(ctx, "unsupported-platform"); + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "pythinker", + structuredOutput: this.structuredOutput, + parseVersion: stdout => + parseSemver(stdout) ?? /\d+\.\d+\.\d+(?:[-+][^\s]+)?/u.exec(stdout)?.[0] ?? null, + inspectSurface: (probeCtx, executable) => this.inspectCliSurface(probeCtx, executable), + isAuthenticated: () => this.hasAuthStore(resolvePythinkerHome(this.deps)), + }); + } - let executable: ResolvedExecutable; + /** The installed CLI must expose every long option this adapter emits. */ + private async inspectCliSurface( + ctx: ProbeContext, + executable: ResolvedExecutable, + ): Promise { + let helpResult; try { - executable = await normalizeNodeShim( - await ctx.ps.resolveExecutable({ name: "pythinker" }), - ); + helpResult = await runVersionProbe(ctx, executable, ["--help"]); } catch { - return unavailableReport(ctx, "missing-executable"); + return "unsupported-cli-surface"; } - - try { - const result = await supervise(ctx.ps, { - executable, - args: ["--version"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS, - maxOutputBytes: VERSION_OUTPUT_LIMIT, - }, {}); - const version = result.spawnError === undefined && result.exitCode === 0 - ? parseVersion(result.stdout) - : null; - if (version === null) return unavailableReport(ctx, "probe-failed", executable); - - let helpResult; - try { - helpResult = await supervise(ctx.ps, { - executable, - args: ["--help"], - cwd: process.cwd(), - env: {}, - timeoutMs: VERSION_TIMEOUT_MS, - maxOutputBytes: VERSION_OUTPUT_LIMIT, - }, {}); - } catch { - return unavailableReport(ctx, "unsupported-cli-surface", executable); - } - const options = parseLongOptionTokens( - `${helpResult.stdout}\n${helpResult.stderr}`, - ); - if ( - helpResult.spawnError !== undefined - || helpResult.exitCode !== 0 - || REQUIRED_LONG_OPTIONS.some(option => !options.has(option)) - ) { - return unavailableReport(ctx, "unsupported-cli-surface", executable); - } - - const writeConfinementBackend = selectOsWriteConfinementBackend(ctx); - const authStore = resolvePythinkerHome(this.deps); - const authState = this.hasAuthStore(authStore) - ? "authenticated" - : "unauthenticated"; - return { - producerId: this.producerId, - available: true, - reason: null, - os: ctx.os, - arch: ctx.arch, - environmentType: ctx.environmentType, - resolvedExecutable: executable, - version, - authState, - executionModes: [...this.executionModes], - structuredOutput: this.structuredOutput, - writeConfinementBackend, - laneEligibility: { edit: writeConfinementBackend !== null }, - }; - } catch { - return unavailableReport(ctx, "probe-failed", executable); + const options = parseLongOptionTokens(`${helpResult.stdout}\n${helpResult.stderr}`); + if ( + helpResult.spawnError !== undefined + || helpResult.exitCode !== 0 + || REQUIRED_LONG_OPTIONS.some(option => !options.has(option)) + ) { + return "unsupported-cli-surface"; } + return null; } buildInvocation(spec: DelegationSpec, ctx: InvocationContext): ProducerInvocation { @@ -224,6 +149,7 @@ export class PythinkerAdapter implements ProducerAdapter { executable: ctx.executable, args, requiredEnv: [...PYTHINKER_REQUIRED_ENV], + inheritedStateWritablePaths: [resolvePythinkerHome(this.deps)], env: defaultPythinkerEnv({ env: this.deps.env, homeDirectory: this.deps.homeDirectory, diff --git a/tests/runtime/agy-adapter.test.ts b/tests/runtime/agy-adapter.test.ts index f734fe0..e72ebbc 100644 --- a/tests/runtime/agy-adapter.test.ts +++ b/tests/runtime/agy-adapter.test.ts @@ -379,6 +379,12 @@ describe("AgyAdapter", () => { expect(new AgyAdapter().buildInvocation(spec, context).args).toContain("1800s"); }); + it("declares only ~/.gemini/antigravity-cli as inherited writable state", () => { + const adapter = new AgyAdapter({ env: {}, homeDirectory: "/Users/test" }); + const invocation = adapter.buildInvocation(sampleSpec(), invocationContext()); + expect(invocation.inheritedStateWritablePaths).toEqual(["/Users/test/.gemini/antigravity-cli"]); + }); + it("declares the agy configuration isolation profile", () => { expect(new AgyAdapter().configurationProfile()).toEqual({ isolationState: "inherited-config-only", diff --git a/tests/runtime/opencode-adapter.test.ts b/tests/runtime/opencode-adapter.test.ts index 2c516a1..a87b257 100644 --- a/tests/runtime/opencode-adapter.test.ts +++ b/tests/runtime/opencode-adapter.test.ts @@ -465,6 +465,19 @@ describe("OpenCodeAdapter", () => { }); }); + it("declares OpenCode's XDG data and state directories as inherited writable state", () => { + const adapter = new OpenCodeAdapter({ + env: { XDG_STATE_HOME: "/Users/test/.local/state" }, + homeDirectory: "/Users/test", + hasAuthStore: () => false, + }); + const invocation = adapter.buildInvocation(sampleSpec(), invocationContext()); + expect(invocation.inheritedStateWritablePaths).toEqual([ + "/Users/test/.local/share/opencode", + "/Users/test/.local/state/opencode", + ]); + }); + it("declares the OpenCode configuration isolation profile", () => { expect(new OpenCodeAdapter().configurationProfile()).toEqual({ isolationState: "controlled-config-with-copied-credentials", diff --git a/tests/runtime/pi-adapter.test.ts b/tests/runtime/pi-adapter.test.ts index 80daea9..977e665 100644 --- a/tests/runtime/pi-adapter.test.ts +++ b/tests/runtime/pi-adapter.test.ts @@ -442,6 +442,12 @@ describe("PiAdapter", () => { } }); + it("declares only ~/.pi/agent as inherited writable state, following HOME", () => { + const adapter = new PiAdapter({ env: { HOME: "/Users/test" }, homeDirectory: "/Users/other" }); + const invocation = adapter.buildInvocation(sampleSpec(), invocationContext()); + expect(invocation.inheritedStateWritablePaths).toEqual(["/Users/test/.pi/agent"]); + }); + it("declares the Pi configuration isolation profile", () => { expect(new PiAdapter().configurationProfile()).toEqual({ isolationState: "inherited-config-only", diff --git a/tests/runtime/pythinker-adapter.test.ts b/tests/runtime/pythinker-adapter.test.ts index cde5036..1b1fd3a 100644 --- a/tests/runtime/pythinker-adapter.test.ts +++ b/tests/runtime/pythinker-adapter.test.ts @@ -544,6 +544,18 @@ describe("PythinkerAdapter", () => { } }); + it("declares PYTHINKER_SHARE_DIR, else ~/.pythinker, as inherited writable state", () => { + const withOverride = new PythinkerAdapter({ + env: { PYTHINKER_SHARE_DIR: "/Users/test/custom-pythinker-home" }, + homeDirectory: "/Users/test", + }); + expect(withOverride.buildInvocation(sampleSpec(), invocationContext()).inheritedStateWritablePaths) + .toEqual(["/Users/test/custom-pythinker-home"]); + const withDefault = new PythinkerAdapter({ env: {}, homeDirectory: "/Users/test" }); + expect(withDefault.buildInvocation(sampleSpec(), invocationContext()).inheritedStateWritablePaths) + .toEqual(["/Users/test/.pythinker"]); + }); + it("declares the Pythinker configuration isolation profile", () => { expect(new PythinkerAdapter().configurationProfile()).toEqual({ isolationState: "inherited-config-only", diff --git a/tests/runtime/seatbelt.test.ts b/tests/runtime/seatbelt.test.ts index 9a5e9aa..f03ca6f 100644 --- a/tests/runtime/seatbelt.test.ts +++ b/tests/runtime/seatbelt.test.ts @@ -76,38 +76,10 @@ describe("seatbelt profile", () => { } }); - it("allowlists only OpenCode's XDG state directories without a temp home", () => { - const previousStateHome = process.env.XDG_STATE_HOME; - process.env.XDG_STATE_HOME = "/Users/test/.local/state"; - - try { - const wrapped = wrapInvocationWithSeatbelt({ - ...invocation, - requiredEnv: ["OPENCODE_CONFIG_DIR", "XDG_DATA_HOME"], - env: { XDG_DATA_HOME: "/Users/test/.local/share" }, - }, { - worktreePath: "/tmp/wt", - tempHome: null, - allowNetwork: false, - }); - const profile = wrapped.args[1] ?? ""; - - expect(profile).toContain('(subpath "/Users/test/.local/share/opencode")'); - expect(profile).toContain('(subpath "/Users/test/.local/state/opencode")'); - expect(profile).not.toContain('(subpath "/Users/test/.local/share")'); - expect(profile).not.toContain('(subpath "/Users/test/.local/state")'); - expect(profile).not.toContain('(subpath "/Users/test")'); - } finally { - if (previousStateHome === undefined) delete process.env.XDG_STATE_HOME; - else process.env.XDG_STATE_HOME = previousStateHome; - } - }); - - it("allowlists only Pi's agent state directory without a temp home", () => { + it("grants exactly the Producer's declared inherited-state paths without a temp home", () => { const wrapped = wrapInvocationWithSeatbelt({ ...invocation, - requiredEnv: ["PI_API_KEY"], - env: { HOME: "/Users/test" }, + inheritedStateWritablePaths: ["/Users/test/.pi/agent", "/Users/test/.local/state/opencode"], }, { worktreePath: "/tmp/wt", tempHome: null, @@ -116,80 +88,31 @@ describe("seatbelt profile", () => { const profile = wrapped.args[1] ?? ""; expect(profile).toContain('(subpath "/Users/test/.pi/agent")'); + expect(profile).toContain('(subpath "/Users/test/.local/state/opencode")'); expect(profile).not.toContain('(subpath "/Users/test/.pi")'); + expect(profile).not.toContain('(subpath "/Users/test/.local/state")'); expect(profile).not.toContain('(subpath "/Users/test")'); }); - it("detects Pythinker by resolved executable identity, not a --work-dir flag the installed CLI does not have", () => { - // PythinkerAdapter.buildInvocation() only ever sends ["--prompt", ...] (and - // optionally "--model"); it never sends "--work-dir". Detection keyed off - // that flag never fired, so real pythinker attempts always ran with zero - // writable paths and crashed with EPERM on their own session directory. - const wrapped = wrapInvocationWithSeatbelt({ - ...invocation, - executable: { - kind: "native", - command: "/usr/local/bin/pythinker", - prefixArgs: [], - resolvedFrom: "path:/usr/local/bin/pythinker", - }, - args: ["--prompt", "test"], - env: { HOME: "/Users/test" }, - }, { - worktreePath: "/tmp/wt", - tempHome: null, - allowNetwork: false, - }); - const profile = wrapped.args[1] ?? ""; - - expect(profile).toContain('(subpath "/Users/test/.pythinker")'); - }); - - it("allowlists only Pythinker's state directory (.pythinker) without a temp home", () => { - const wrapped = wrapInvocationWithSeatbelt({ - ...invocation, - executable: { - kind: "native", - command: "/usr/local/bin/pythinker", - prefixArgs: [], - resolvedFrom: "path:/usr/local/bin/pythinker", - }, - args: ["--prompt", "test"], - env: { HOME: "/Users/test" }, - }, { - worktreePath: "/tmp/wt", - tempHome: null, - allowNetwork: false, - }); - const profile = wrapped.args[1] ?? ""; - - expect(profile).toContain('(subpath "/Users/test/.pythinker")'); - expect(profile).not.toContain('(subpath "/Users/test")'); - }); - - it("grants Pythinker's PYTHINKER_SHARE_DIR override instead of the default when set", () => { + it("ignores declared inherited-state paths when a temp home replaces the real one", () => { const wrapped = wrapInvocationWithSeatbelt({ ...invocation, - executable: { - kind: "native", - command: "/usr/local/bin/pythinker", - prefixArgs: [], - resolvedFrom: "path:/usr/local/bin/pythinker", - }, - args: ["--prompt", "test"], - env: { HOME: "/Users/test", PYTHINKER_SHARE_DIR: "/Users/test/custom-pythinker-home" }, + inheritedStateWritablePaths: ["/Users/test/.pi/agent"], }, { worktreePath: "/tmp/wt", - tempHome: null, + tempHome: "/tmp/home", allowNetwork: false, }); const profile = wrapped.args[1] ?? ""; - expect(profile).toContain('(subpath "/Users/test/custom-pythinker-home")'); - expect(profile).not.toContain('(subpath "/Users/test/.pythinker")'); + expect(profile).toContain('(subpath "/tmp/home")'); + expect(profile).not.toContain('(subpath "/Users/test/.pi/agent")'); }); - it("allowlists only agy's config/state directory (~/.gemini/antigravity-cli), detected by executable identity", () => { + it("never derives writable state from executable identity or required env names", () => { + // Earlier revisions sniffed `basename(command)` and `requiredEnv` to guess a + // Producer's config directory; an adapter that forgot to be recognized ran + // with zero host-state access. Only the explicit declaration counts now. const wrapped = wrapInvocationWithSeatbelt({ ...invocation, executable: { @@ -198,24 +121,7 @@ describe("seatbelt profile", () => { prefixArgs: [], resolvedFrom: "path:/usr/local/bin/agy", }, - args: ["-p", "test"], - env: { HOME: "/Users/test" }, - }, { - worktreePath: "/tmp/wt", - tempHome: null, - allowNetwork: false, - }); - const profile = wrapped.args[1] ?? ""; - - expect(profile).toContain('(subpath "/Users/test/.gemini/antigravity-cli")'); - expect(profile).not.toContain('(subpath "/Users/test/.gemini")'); - expect(profile).not.toContain('(subpath "/Users/test")'); - }); - - it("does not allowlist agy's directory for an unrelated executable requiring GEMINI_API_KEY", () => { - const wrapped = wrapInvocationWithSeatbelt({ - ...invocation, - requiredEnv: ["GEMINI_API_KEY"], + requiredEnv: ["PI_API_KEY", "OPENCODE_CONFIG_DIR", "GEMINI_API_KEY"], env: { HOME: "/Users/test" }, }, { worktreePath: "/tmp/wt", @@ -224,29 +130,7 @@ describe("seatbelt profile", () => { }); const profile = wrapped.args[1] ?? ""; - expect(profile).not.toContain('(subpath "/Users/test/.gemini/antigravity-cli")'); - }); - - it("keeps joined subpaths POSIX even when HOME contains win32-style separators", () => { - const wrapped = wrapInvocationWithSeatbelt({ - ...invocation, - executable: { - kind: "native", - command: "/usr/local/bin/pythinker", - prefixArgs: [], - resolvedFrom: "path:/usr/local/bin/pythinker", - }, - args: ["--prompt", "test"], - env: { HOME: "C:\\Users\\test" }, - }, { - worktreePath: "/tmp/wt", - tempHome: null, - allowNetwork: false, - }); - const profile = wrapped.args[1] ?? ""; - - expect(profile).toContain('(subpath "C:\\\\Users\\\\test/.pythinker")'); - expect(profile).not.toContain('(subpath "C:\\\\Users\\\\test")'); + expect(profile).not.toContain("/Users/test"); }); it("escapes quotes and rejects control characters in paths", () => { From 64a5ada3c28f3407aa8a3710f5abb3ca7a846bde Mon Sep 17 00:00:00 2001 From: elkaix Date: Thu, 27 Aug 2026 21:25:13 -0400 Subject: [PATCH 2/3] feat: add headless Claude Code as a sixth delegation-lane Producer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit claude-implementer runs `claude -p --output-format json` as an untrusted Producer, so the architect can delegate implementation to Opus or Sonnet (producerOverrides.model) with an optional --effort override, under the same invariants as every other lane: fresh context, isolated worktree, frozen candidate, independent verification. Isolation is enforced by argv, each flag confirmed live against claude 2.1.250: --strict-mcp-config (no MCP servers, so no nested delegate tool), --tools without Agent (no nested subagents, no web), --setting-sources "" (no user/project/local settings, hooks, or CLAUDE.md discovery — the Producer sees only the rendered spec), --no-session-persistence, and --disable-slash-commands. Auth needs USER plus the real HOME (a temp HOME reports "Not logged in"), so the lane is inherited-config-only and declares ~/.claude and ~/.claude.json as its writable state. The result envelope can report is_error with exit 0, so normalizeEvents keys on both. darwin/arm64 only via the macos-seatbelt backend; a confined smoke run created a worktree file and got EPERM outside it. Opt-in real-CLI smoke test behind CLAUDE_ARCHITECT_CLAUDE_SMOKE=1. Design: docs/superpowers/specs/2026-08-27-claude-producer-adapter-design.md --- .claude-plugin/marketplace.json | 2 +- CHANGELOG.md | 12 + README.md | 6 +- docs/ARCHITECTURE.md | 2 +- docs/MARKETPLACE_REVIEW.md | 2 +- docs/PRIVACY.md | 2 +- ...26-08-27-claude-producer-adapter-design.md | 133 +++ runtime/server.mjs | 946 ++++++++++-------- skills/delegate/SKILL.md | 2 + src/producers/claude-adapter.ts | 203 ++++ src/producers/producer-registry.ts | 3 +- tests/delegate-routing.test.mjs | 4 +- tests/lane-launchers.test.sh | 2 +- tests/runtime/capability-probe.test.ts | 1 + tests/runtime/claude-adapter.test.ts | 598 +++++++++++ tests/runtime/plugin-wiring.test.mjs | 2 +- tests/runtime/tools.test.ts | 2 +- 17 files changed, 1517 insertions(+), 405 deletions(-) create mode 100644 docs/superpowers/specs/2026-08-27-claude-producer-adapter-design.md create mode 100644 src/producers/claude-adapter.ts create mode 100644 tests/runtime/claude-adapter.test.ts diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 766ccb6..16f8911 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -1,6 +1,6 @@ { "name": "claude-architect", - "description": "CLI coding-agent orchestration for Claude through Codex, OpenCode, Pi, and Pythinker Code, with a commitment-boundary advisor.", + "description": "CLI coding-agent orchestration for Claude through Codex, OpenCode, Pi, Pythinker Code, Antigravity CLI, and headless Claude Code, with a commitment-boundary advisor.", "owner": { "name": "elkaix" }, diff --git a/CHANGELOG.md b/CHANGELOG.md index ef45298..b460cd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ All notable changes to Claude Architect are recorded here. The format follows ## [Unreleased] +### Added + +- `claude-implementer`: a sixth delegation-lane Producer that runs a headless + Claude Code session (`claude -p --output-format json`) as an untrusted + Producer, so the architect can delegate implementation to Opus or Sonnet + (`producerOverrides.model`) with an optional `--effort` override. The attempt + runs with `--strict-mcp-config`, `--setting-sources ""`, + `--disable-slash-commands`, `--no-session-persistence`, and a built-in tool + allowlist without `Agent`, so it sees only the Delegation Spec, cannot load + this plugin's own MCP tools, and cannot nest subagents. darwin/arm64 only, + confined by the same host Seatbelt backend as the Pi, OpenCode, Pythinker, + and agy lanes. ### Changed - Producers declare their own host state directories through diff --git a/README.md b/README.md index de29537..9180c71 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ license

-**Verified coding-agent delegation for Claude Code.** Claude stays the architect and reviewer — it writes the spec, judges the evidence, and reports what landed. Implementation is delegated to fresh-context subagent implementers running on the coding CLI you choose — **Codex, OpenCode, Pi, Pythinker, or Antigravity CLI** — each invocation starting clean with no inherited conversation state, inside an isolated Git worktree. The work comes back as a frozen, hash-anchored candidate that Claude reviews against independent verification evidence before a single byte can reach your checkout. +**Verified coding-agent delegation for Claude Code.** Claude stays the architect and reviewer — it writes the spec, judges the evidence, and reports what landed. Implementation is delegated to fresh-context subagent implementers running on the coding CLI you choose — **Codex, OpenCode, Pi, Pythinker, Antigravity CLI, or a headless Claude Code session (Opus/Sonnet)** — each invocation starting clean with no inherited conversation state, inside an isolated Git worktree. The work comes back as a frozen, hash-anchored candidate that Claude reviews against independent verification evidence before a single byte can reach your checkout. In practice that means three guarantees the plugin enforces in host code, not in prompts: @@ -57,7 +57,7 @@ claude plugin install claude-architect@claude-architect claude plugin list --json ``` -Restart Claude Code after installing or updating. Install and authenticate at least one supported Producer CLI (`codex`, `opencode`, `pi`, or `pythinker`); Claude Architect reports unavailable lanes rather than silently substituting another agent. +Restart Claude Code after installing or updating. Install and authenticate at least one supported Producer CLI (`codex`, `opencode`, `pi`, `pythinker`, `agy`, or `claude`); Claude Architect reports unavailable lanes rather than silently substituting another agent. ## Quick start @@ -67,7 +67,7 @@ Open Claude Code in a Git repository and name the Producer you want: /claude-architect:delegate Use Codex to add rate limiting to the public API, run the tests, and show me the independently reviewed candidate before integration. ``` -If no Producer is named, the skill asks you to choose Codex, OpenCode, Pi, Pythinker, or Antigravity CLI. OpenCode, Pythinker, and Antigravity CLI are harnesses that accept optional model and thinking/variant/effort overrides; model selection within a harness lane is optional and otherwise defers to that CLI's configured default. The Pi lane has no model override: it always runs the model configured in Pi, and a requested override fails the lane rather than silently substituting another model. For non-trivial work it uses the fresh-context review pipeline. Read the exact patch, findings, and verification output before deciding whether to accept. +If no Producer is named, the skill asks you to choose Codex, OpenCode, Pi, Pythinker, Antigravity CLI, or Claude Code. OpenCode, Pythinker, Antigravity CLI, and Claude Code are harnesses that accept optional model and thinking/variant/effort overrides; model selection within a harness lane is optional and otherwise defers to that CLI's configured default. The Pi lane has no model override: it always runs the model configured in Pi, and a requested override fails the lane rather than silently substituting another model. For non-trivial work it uses the fresh-context review pipeline. Read the exact patch, findings, and verification output before deciding whether to accept. ### Direct Codex CLI diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 0180892..68b9093 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -25,7 +25,7 @@ The normal MCP flow is: The Codex adapter uses Codex's native sandbox, requests `workspace-write`, disables network, constrains shell environment inclusion, disables multi-agent delegation, and uses ephemeral configuration. The backend table in `src/platform/sandbox/backends.ts` marks native macOS arm64 Codex as certified, native Linux as tested, and native Windows as unsupported for the edit lane. The macOS Seatbelt backend is used by other MCP adapters where eligible. Linux confinement fails closed when the required backend is unavailable. Windows process supervision uses the packaged watchdog/helper, but this is not a certified Windows Codex edit sandbox. -OpenCode, Pi, Pythinker, and Antigravity CLI (`agy`) use the same validated MCP attempt lifecycle and remain subject to adapter and platform eligibility checks. A requested Producer with no eligible confinement backend is unavailable: the runtime fails closed instead of selecting an unconfined path or substituting a different Producer. Certification claims remain specific to the Producer, platform, and backend reported by the capability registry. +OpenCode, Pi, Pythinker, Antigravity CLI (`agy`), and headless Claude Code (`claude -p`) use the same validated MCP attempt lifecycle and remain subject to adapter and platform eligibility checks. A requested Producer with no eligible confinement backend is unavailable: the runtime fails closed instead of selecting an unconfined path or substituting a different Producer. Certification claims remain specific to the Producer, platform, and backend reported by the capability registry. ## State and recovery diff --git a/docs/MARKETPLACE_REVIEW.md b/docs/MARKETPLACE_REVIEW.md index ac8bce4..0d2e7a7 100644 --- a/docs/MARKETPLACE_REVIEW.md +++ b/docs/MARKETPLACE_REVIEW.md @@ -27,7 +27,7 @@ The plugin is designed for macOS, Linux, and Windows process/runtime operation. ## Network destinations -There is no plugin-maintained fixed destination list. A cloud Producer CLI contacts the provider configured by that CLI: Codex normally uses its configured OpenAI service; OpenCode, Pi, and Pythinker can use various cloud or local endpoints. Claude Code separately contacts its configured Anthropic/model service. Verification commands may contact destinations only when their spec allows network, subject to effective platform enforcement. Codex's coding sandbox is configured with network disabled. Provider authentication, telemetry, transport, and retention are governed by the selected CLI/provider. +There is no plugin-maintained fixed destination list. A cloud Producer CLI contacts the provider configured by that CLI: Codex normally uses its configured OpenAI service; OpenCode, Pi, Pythinker, Antigravity CLI, and headless Claude Code can use various cloud or local endpoints. Claude Code separately contacts its configured Anthropic/model service. Verification commands may contact destinations only when their spec allows network, subject to effective platform enforcement. Codex's coding sandbox is configured with network disabled. Provider authentication, telemetry, transport, and retention are governed by the selected CLI/provider. ## Persistent state locations diff --git a/docs/PRIVACY.md b/docs/PRIVACY.md index b7e671e..d483d92 100644 --- a/docs/PRIVACY.md +++ b/docs/PRIVACY.md @@ -19,7 +19,7 @@ Archives use restrictive creation modes, reject symlink/path escapes, bound indi The initial Producer receives the objective, relevant context, success criteria, authorized/forbidden paths, and verification instructions. Because it can read files exposed within its sandbox, a CLI may include source code or other repository content in requests to its configured model. Pipeline reviewers receive at least the delegation spec, baseline and candidate identifiers, the candidate diff, and test evidence. Fixers additionally receive consolidated findings. The Claude architect session itself is governed by the privacy terms of the Claude Code/model configuration. -Codex normally contacts the OpenAI service configured by the Codex CLI. OpenCode, Pi, Pythinker, and Antigravity CLI (`agy`) are model harnesses and may contact whichever cloud or local provider the user's configuration selects; possible providers are not a fixed plugin-controlled list. A local provider may keep traffic on the machine, but that depends on its endpoint and configuration. Claude Architect does not inspect TLS, pin destinations, or override provider telemetry/retention. +Codex normally contacts the OpenAI service configured by the Codex CLI. OpenCode, Pi, Pythinker, Antigravity CLI (`agy`), and headless Claude Code (`claude`) are model harnesses and may contact whichever cloud or local provider the user's configuration selects; possible providers are not a fixed plugin-controlled list. A local provider may keep traffic on the machine, but that depends on its endpoint and configuration. Claude Architect does not inspect TLS, pin destinations, or override provider telemetry/retention. Verification commands run locally in a clean worktree. A command whose spec allows network may transmit repository or test data to destinations chosen by that command. Network-denied commands are only as private as the effective platform enforcement reported in verification evidence. diff --git a/docs/superpowers/specs/2026-08-27-claude-producer-adapter-design.md b/docs/superpowers/specs/2026-08-27-claude-producer-adapter-design.md new file mode 100644 index 0000000..2de7c63 --- /dev/null +++ b/docs/superpowers/specs/2026-08-27-claude-producer-adapter-design.md @@ -0,0 +1,133 @@ +# Claude Code (`claude`) Producer adapter — design + +Date: 2026-08-27 +Status: implemented in the same change + +## Goal + +Add a headless Claude Code session as a sixth delegation-lane Producer so the +architect (any model, including Fable) can delegate implementation to Opus or +Sonnet under the same trust invariants as every other lane: fresh context, +isolated worktree, frozen candidate, independent verification. `claude-implementer` +is a selectable lane in `skills/delegate/SKILL.md`; no protocol bump; no +changes to `src/pipeline/`, `src/verify/`, or `src/integrate/`. + +This change also deepens the Producer seam so the adapter is self-contained +(see "Seam change" below). Adding this lane touched `src/producers/` and the +registry only — the sandbox was not edited. + +## Evidence base + +Every claim below is grounded in the installed binary (`claude` 2.1.250) — +`--help` output plus live `claude -p --output-format json` invocations run from +a scratch directory during this session. Nothing is taken from secondary docs. + +### 1. Auth needs `USER` and the real HOME — not HOME-redirectable + +| Environment | Result | +| --- | --- | +| `env -i HOME PATH` | `is_error:true`, `"Not logged in · Please run /login"` (exit 1) | +| `env -i HOME PATH USER` | `OK` | +| `env -i HOME= PATH USER` | `Not logged in`; the CLI created `/.claude/` and `/.claude.json` | + +The OAuth credential is resolved through the login keychain (keyed by user +name) together with the `oauthAccount` record in `~/.claude.json`. So the lane +is `inherited-config-only` (same class as Pi, Pythinker, agy): real HOME, with +`USER`, `CLAUDE_CONFIG_DIR`, and `ANTHROPIC_API_KEY` forwarded by declared +policy, and `~/.claude` + `~/.claude.json` granted as writable state because +the CLI rewrites both on every run. + +### 2. Nested-delegation and hidden-instruction surface — closed by argv + +The obvious hazard of a Claude Producer inside a Claude session: the child +loads the user's MCP servers (including this plugin's runtime, i.e. a nested +`delegate` tool), user/project hooks, plugins, and can spawn `Agent` +subagents. Live checks: + +- `--strict-mcp-config` with no `--mcp-config`: zero MCP servers. +- `--tools "Read,Edit,Write,Bash,Grep,Glob"`: the model reports exactly + `Bash, Edit, Glob, Grep, Read, Write` — no `Agent`, no web, no artifacts. +- `--setting-sources ""`: a project `UserPromptSubmit` hook that touches a + marker file did **not** run (it did run with `--setting-sources project` and + with no flag); the user-level hooks did not run either (they did with + `--setting-sources user`). It also disables `CLAUDE.md`/`AGENTS.md` + discovery: a project `CLAUDE.md` declaring a "secret fruit" was not seen. + The Producer therefore sees only the rendered Delegation Spec — + `repositoryInstructionSources: []`. +- `--bare` and `CLAUDE_CODE_SIMPLE=1` would give the same isolation but force + API-key auth (`Not logged in` under OAuth), so they are not used. +- `--no-session-persistence`: nothing resumable; `--continue`/`--resume` are + never passed. +- The host runtime's environment policy already forwards only allowlisted + variables, so `CLAUDECODE`, `CLAUDE_CODE_SESSION_ID`, and the messaging + socket/token of the parent session never reach the child. + +### 3. Structured output, confirmed live + +`--output-format json` prints one envelope: `{"type":"result","subtype": +"success"|…, "is_error":bool, "result":string, …}`. Observed: an API-level +failure exits **1** but some paths report `is_error:true` with a `result` +message — `normalizeEvents` therefore keys on `exitCode === 0 && !is_error && +subtype === "success" && typeof result === "string"`, and surfaces the +`result` text on failure. Warning lines can precede the envelope on the +combined stream, so the parser starts at the first `{`. + +### 4. Seatbelt confinement, confirmed live + +Under `sandbox-exec` with the worktree, `~/.claude`, `~/.claude.json`, and +TMPDIR writable, a `haiku` run created `made.txt` in the worktree and got +`EPERM` writing `$HOME/escape-probe.txt`. Platform ceiling: darwin/arm64 via +`macos-seatbelt`, same as Pi/OpenCode/Pythinker/agy; win32 unsupported. + +### 5. Prompt on stdin + +`echo | claude -p …` works; the prompt travels on stdin like Pi and +OpenCode, keeping argv free of spec text. + +## Overrides + +- `producerOverrides.model` → `--model ` (`opus`, `sonnet`, + `fable`, `haiku`). Absent: the CLI's configured default. +- `producerOverrides.reasoningEffort` → `--effort low|medium|high|xhigh|max`; + any other value throws before spawn (the CLI would reject it after burning + the attempt window). + +## Seam change (producers module) + +Before this change the Seatbelt backend decided which host directories a +Producer could write by sniffing `basename(executable)` and `requiredEnv` +names — four producer-specific functions inside `src/platform/sandbox/`. An +adapter the sandbox did not recognize silently ran with no state access, and +every new lane had to edit the sandbox. + +Now `ProducerInvocation.inheritedStateWritablePaths` is the declaration: each +adapter states its own auth/config/state paths, and the sandbox grants exactly +those when no temporary home is in effect. Depth moved to the right side of the +seam — the sandbox knows nothing about Producers, and the adapter is the single +place that knows where its CLI keeps state. The four OS-confined CLI probes +also collapsed into `probeOsConfinedCli` (resolve → `--version` → optional +surface check → confinement backend → auth), with Pythinker's `--help` +inspection supplied as a hook. + +## Architect-side Claude subagents (not Producers) + +Separately, the delegate skill now states which roles a Claude subagent +dispatched through the host `Agent` tool (Opus or Sonnet) may take: scout, +spec drafter, candidate reviewer (`agents/candidate-reviewer.md`, read-only + +`reviewCandidate`), and advisor. None of them edit the checkout or call +`decideCandidate`/`integrateCandidate`; an Opus/Sonnet *implementer* is the +`claude-implementer` lane, never a bare subagent. + +## Verification + +- `tests/runtime/claude-adapter.test.ts`: probe, auth resolution (OAuth file, + `CLAUDE_CONFIG_DIR`, API key), exact argv, tool allowlist, read-only tools, + overrides, writable-state declaration, Seatbelt wrap, envelope parsing + (success, `is_error` with exit 0, non-success subtype, non-zero exit, + truncation, non-envelope JSON), configuration profile. +- Opt-in real smoke (`CLAUDE_ARCHITECT_CLAUDE_SMOKE=1`, darwin/arm64): a + confined headless attempt on `haiku` creates `smoke.txt` in an isolated + worktree. +- Seatbelt tests now prove the declaration seam (grants exactly the declared + paths; ignores them under a temp home; never derives paths from executable + identity or env names); each adapter test asserts its own declaration. diff --git a/runtime/server.mjs b/runtime/server.mjs index a99c384..6588cf5 100644 --- a/runtime/server.mjs +++ b/runtime/server.mjs @@ -34,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge mod )); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/code.js +// node_modules/ajv/dist/compile/codegen/code.js var require_code = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/code.js"(exports) { + "node_modules/ajv/dist/compile/codegen/code.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0; @@ -188,9 +188,9 @@ var require_code = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/scope.js +// node_modules/ajv/dist/compile/codegen/scope.js var require_scope = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/scope.js"(exports) { + "node_modules/ajv/dist/compile/codegen/scope.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0; @@ -333,9 +333,9 @@ var require_scope = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/index.js +// node_modules/ajv/dist/compile/codegen/index.js var require_codegen = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/codegen/index.js"(exports) { + "node_modules/ajv/dist/compile/codegen/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0; @@ -1053,9 +1053,9 @@ var require_codegen = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/util.js +// node_modules/ajv/dist/compile/util.js var require_util = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/util.js"(exports) { + "node_modules/ajv/dist/compile/util.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; @@ -1220,9 +1220,9 @@ var require_util = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/names.js +// node_modules/ajv/dist/compile/names.js var require_names = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/names.js"(exports) { + "node_modules/ajv/dist/compile/names.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -1259,9 +1259,9 @@ var require_names = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/errors.js +// node_modules/ajv/dist/compile/errors.js var require_errors = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/errors.js"(exports) { + "node_modules/ajv/dist/compile/errors.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0; @@ -1381,9 +1381,9 @@ var require_errors = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/boolSchema.js +// node_modules/ajv/dist/compile/validate/boolSchema.js var require_boolSchema = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) { + "node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0; @@ -1432,9 +1432,9 @@ var require_boolSchema = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/rules.js +// node_modules/ajv/dist/compile/rules.js var require_rules = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/rules.js"(exports) { + "node_modules/ajv/dist/compile/rules.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getRules = exports.isJSONType = void 0; @@ -1463,9 +1463,9 @@ var require_rules = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/applicability.js +// node_modules/ajv/dist/compile/validate/applicability.js var require_applicability = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/applicability.js"(exports) { + "node_modules/ajv/dist/compile/validate/applicability.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0; @@ -1486,9 +1486,9 @@ var require_applicability = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/dataType.js +// node_modules/ajv/dist/compile/validate/dataType.js var require_dataType = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/dataType.js"(exports) { + "node_modules/ajv/dist/compile/validate/dataType.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0; @@ -1670,9 +1670,9 @@ var require_dataType = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/defaults.js +// node_modules/ajv/dist/compile/validate/defaults.js var require_defaults = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/defaults.js"(exports) { + "node_modules/ajv/dist/compile/validate/defaults.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.assignDefaults = void 0; @@ -1707,9 +1707,9 @@ var require_defaults = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/code.js +// node_modules/ajv/dist/vocabularies/code.js var require_code2 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/code.js"(exports) { + "node_modules/ajv/dist/vocabularies/code.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; @@ -1840,9 +1840,9 @@ var require_code2 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/keyword.js +// node_modules/ajv/dist/compile/validate/keyword.js var require_keyword = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/keyword.js"(exports) { + "node_modules/ajv/dist/compile/validate/keyword.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0; @@ -1958,9 +1958,9 @@ var require_keyword = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/subschema.js +// node_modules/ajv/dist/compile/validate/subschema.js var require_subschema = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/subschema.js"(exports) { + "node_modules/ajv/dist/compile/validate/subschema.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0; @@ -2041,9 +2041,9 @@ var require_subschema = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/fast-deep-equal/index.js +// node_modules/fast-deep-equal/index.js var require_fast_deep_equal = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/fast-deep-equal/index.js"(exports, module) { + "node_modules/fast-deep-equal/index.js"(exports, module) { "use strict"; module.exports = function equal(a, b) { if (a === b) return true; @@ -2076,9 +2076,9 @@ var require_fast_deep_equal = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/json-schema-traverse/index.js +// node_modules/json-schema-traverse/index.js var require_json_schema_traverse = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/json-schema-traverse/index.js"(exports, module) { + "node_modules/json-schema-traverse/index.js"(exports, module) { "use strict"; var traverse = module.exports = function(schema, opts, cb) { if (typeof opts == "function") { @@ -2164,9 +2164,9 @@ var require_json_schema_traverse = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/resolve.js +// node_modules/ajv/dist/compile/resolve.js var require_resolve = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/resolve.js"(exports) { + "node_modules/ajv/dist/compile/resolve.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0; @@ -2320,9 +2320,9 @@ var require_resolve = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/index.js +// node_modules/ajv/dist/compile/validate/index.js var require_validate = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/validate/index.js"(exports) { + "node_modules/ajv/dist/compile/validate/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0; @@ -2828,9 +2828,9 @@ var require_validate = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/validation_error.js +// node_modules/ajv/dist/runtime/validation_error.js var require_validation_error = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/validation_error.js"(exports) { + "node_modules/ajv/dist/runtime/validation_error.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ValidationError = class extends Error { @@ -2844,9 +2844,9 @@ var require_validation_error = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/ref_error.js +// node_modules/ajv/dist/compile/ref_error.js var require_ref_error = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/ref_error.js"(exports) { + "node_modules/ajv/dist/compile/ref_error.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var resolve_1 = require_resolve(); @@ -2861,9 +2861,9 @@ var require_ref_error = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/index.js +// node_modules/ajv/dist/compile/index.js var require_compile = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/compile/index.js"(exports) { + "node_modules/ajv/dist/compile/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; @@ -3085,9 +3085,9 @@ var require_compile = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/data.json +// node_modules/ajv/dist/refs/data.json var require_data = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/data.json"(exports, module) { + "node_modules/ajv/dist/refs/data.json"(exports, module) { module.exports = { $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", @@ -3104,9 +3104,9 @@ var require_data = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/lib/utils.js +// node_modules/fast-uri/lib/utils.js var require_utils = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/lib/utils.js"(exports, module) { + "node_modules/fast-uri/lib/utils.js"(exports, module) { "use strict"; var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu); var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u); @@ -3417,9 +3417,9 @@ var require_utils = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/lib/schemes.js +// node_modules/fast-uri/lib/schemes.js var require_schemes = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/lib/schemes.js"(exports, module) { + "node_modules/fast-uri/lib/schemes.js"(exports, module) { "use strict"; var { isUUID } = require_utils(); var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; @@ -3627,9 +3627,9 @@ var require_schemes = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/index.js +// node_modules/fast-uri/index.js var require_fast_uri = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/fast-uri/index.js"(exports, module) { + "node_modules/fast-uri/index.js"(exports, module) { "use strict"; var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils(); var { SCHEMES, getSchemeHandler } = require_schemes(); @@ -3919,9 +3919,9 @@ var require_fast_uri = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/uri.js +// node_modules/ajv/dist/runtime/uri.js var require_uri = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/uri.js"(exports) { + "node_modules/ajv/dist/runtime/uri.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var uri = require_fast_uri(); @@ -3930,9 +3930,9 @@ var require_uri = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/core.js +// node_modules/ajv/dist/core.js var require_core = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/core.js"(exports) { + "node_modules/ajv/dist/core.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; @@ -4541,9 +4541,9 @@ var require_core = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/id.js +// node_modules/ajv/dist/vocabularies/core/id.js var require_id = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/id.js"(exports) { + "node_modules/ajv/dist/vocabularies/core/id.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var def = { @@ -4556,9 +4556,9 @@ var require_id = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/ref.js +// node_modules/ajv/dist/vocabularies/core/ref.js var require_ref = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/ref.js"(exports) { + "node_modules/ajv/dist/vocabularies/core/ref.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.callRef = exports.getValidate = void 0; @@ -4678,9 +4678,9 @@ var require_ref = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/index.js +// node_modules/ajv/dist/vocabularies/core/index.js var require_core2 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/core/index.js"(exports) { + "node_modules/ajv/dist/vocabularies/core/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var id_1 = require_id(); @@ -4699,9 +4699,9 @@ var require_core2 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +// node_modules/ajv/dist/vocabularies/validation/limitNumber.js var require_limitNumber = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4731,9 +4731,9 @@ var require_limitNumber = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +// node_modules/ajv/dist/vocabularies/validation/multipleOf.js var require_multipleOf = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4759,9 +4759,9 @@ var require_multipleOf = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/ucs2length.js +// node_modules/ajv/dist/runtime/ucs2length.js var require_ucs2length = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/ucs2length.js"(exports) { + "node_modules/ajv/dist/runtime/ucs2length.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function ucs2length(str) { @@ -4785,9 +4785,9 @@ var require_ucs2length = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitLength.js +// node_modules/ajv/dist/vocabularies/validation/limitLength.js var require_limitLength = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4817,9 +4817,9 @@ var require_limitLength = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/pattern.js +// node_modules/ajv/dist/vocabularies/validation/pattern.js var require_pattern = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -4854,9 +4854,9 @@ var require_pattern = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +// node_modules/ajv/dist/vocabularies/validation/limitProperties.js var require_limitProperties = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4883,9 +4883,9 @@ var require_limitProperties = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/required.js +// node_modules/ajv/dist/vocabularies/validation/required.js var require_required = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/required.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/required.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -4965,9 +4965,9 @@ var require_required = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitItems.js +// node_modules/ajv/dist/vocabularies/validation/limitItems.js var require_limitItems = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -4994,9 +4994,9 @@ var require_limitItems = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/equal.js +// node_modules/ajv/dist/runtime/equal.js var require_equal = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/runtime/equal.js"(exports) { + "node_modules/ajv/dist/runtime/equal.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var equal = require_fast_deep_equal(); @@ -5005,9 +5005,9 @@ var require_equal = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js var require_uniqueItems = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dataType_1 = require_dataType(); @@ -5072,9 +5072,9 @@ var require_uniqueItems = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/const.js +// node_modules/ajv/dist/vocabularies/validation/const.js var require_const = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/const.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/const.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5101,9 +5101,9 @@ var require_const = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/enum.js +// node_modules/ajv/dist/vocabularies/validation/enum.js var require_enum = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5150,9 +5150,9 @@ var require_enum = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/index.js +// node_modules/ajv/dist/vocabularies/validation/index.js var require_validation = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/index.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var limitNumber_1 = require_limitNumber(); @@ -5188,9 +5188,9 @@ var require_validation = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js var require_additionalItems = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateAdditionalItems = void 0; @@ -5241,9 +5241,9 @@ var require_additionalItems = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/items.js +// node_modules/ajv/dist/vocabularies/applicator/items.js var require_items = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateTuple = void 0; @@ -5298,9 +5298,9 @@ var require_items = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js var require_prefixItems = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var items_1 = require_items(); @@ -5315,9 +5315,9 @@ var require_prefixItems = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/items2020.js +// node_modules/ajv/dist/vocabularies/applicator/items2020.js var require_items2020 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5350,9 +5350,9 @@ var require_items2020 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/contains.js +// node_modules/ajv/dist/vocabularies/applicator/contains.js var require_contains = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5444,9 +5444,9 @@ var require_contains = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +// node_modules/ajv/dist/vocabularies/applicator/dependencies.js var require_dependencies = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0; @@ -5538,9 +5538,9 @@ var require_dependencies = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js var require_propertyNames = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5581,9 +5581,9 @@ var require_propertyNames = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js var require_additionalProperties = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -5687,9 +5687,9 @@ var require_additionalProperties = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/properties.js +// node_modules/ajv/dist/vocabularies/applicator/properties.js var require_properties = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var validate_1 = require_validate(); @@ -5745,9 +5745,9 @@ var require_properties = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js var require_patternProperties = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -5819,9 +5819,9 @@ var require_patternProperties = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/not.js +// node_modules/ajv/dist/vocabularies/applicator/not.js var require_not = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util(); @@ -5850,9 +5850,9 @@ var require_not = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +// node_modules/ajv/dist/vocabularies/applicator/anyOf.js var require_anyOf = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var code_1 = require_code2(); @@ -5867,9 +5867,9 @@ var require_anyOf = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +// node_modules/ajv/dist/vocabularies/applicator/oneOf.js var require_oneOf = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -5925,9 +5925,9 @@ var require_oneOf = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/allOf.js +// node_modules/ajv/dist/vocabularies/applicator/allOf.js var require_allOf = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util(); @@ -5952,9 +5952,9 @@ var require_allOf = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/if.js +// node_modules/ajv/dist/vocabularies/applicator/if.js var require_if = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -6021,9 +6021,9 @@ var require_if = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +// node_modules/ajv/dist/vocabularies/applicator/thenElse.js var require_thenElse = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util(); @@ -6039,9 +6039,9 @@ var require_thenElse = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/index.js +// node_modules/ajv/dist/vocabularies/applicator/index.js var require_applicator = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var additionalItems_1 = require_additionalItems(); @@ -6087,9 +6087,9 @@ var require_applicator = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/format/format.js +// node_modules/ajv/dist/vocabularies/format/format.js var require_format = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/format/format.js"(exports) { + "node_modules/ajv/dist/vocabularies/format/format.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -6177,9 +6177,9 @@ var require_format = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/format/index.js +// node_modules/ajv/dist/vocabularies/format/index.js var require_format2 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/format/index.js"(exports) { + "node_modules/ajv/dist/vocabularies/format/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var format_1 = require_format(); @@ -6188,9 +6188,9 @@ var require_format2 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/metadata.js +// node_modules/ajv/dist/vocabularies/metadata.js var require_metadata = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/metadata.js"(exports) { + "node_modules/ajv/dist/vocabularies/metadata.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.contentVocabulary = exports.metadataVocabulary = void 0; @@ -6211,9 +6211,9 @@ var require_metadata = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/draft7.js +// node_modules/ajv/dist/vocabularies/draft7.js var require_draft7 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/draft7.js"(exports) { + "node_modules/ajv/dist/vocabularies/draft7.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require_core2(); @@ -6233,9 +6233,9 @@ var require_draft7 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/discriminator/types.js +// node_modules/ajv/dist/vocabularies/discriminator/types.js var require_types = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) { + "node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DiscrError = void 0; @@ -6247,9 +6247,9 @@ var require_types = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/discriminator/index.js +// node_modules/ajv/dist/vocabularies/discriminator/index.js var require_discriminator = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) { + "node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -6352,9 +6352,9 @@ var require_discriminator = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-draft-07.json +// node_modules/ajv/dist/refs/json-schema-draft-07.json var require_json_schema_draft_07 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) { + "node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) { module.exports = { $schema: "http://json-schema.org/draft-07/schema#", $id: "http://json-schema.org/draft-07/schema#", @@ -6509,9 +6509,9 @@ var require_json_schema_draft_07 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/ajv.js +// node_modules/ajv/dist/ajv.js var require_ajv = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/ajv.js"(exports, module) { + "node_modules/ajv/dist/ajv.js"(exports, module) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0; @@ -6579,9 +6579,9 @@ var require_ajv = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/formats.js +// node_modules/ajv-formats/dist/formats.js var require_formats = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/formats.js"(exports) { + "node_modules/ajv-formats/dist/formats.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatNames = exports.fastFormats = exports.fullFormats = void 0; @@ -6782,9 +6782,9 @@ var require_formats = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/limit.js +// node_modules/ajv-formats/dist/limit.js var require_limit = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/limit.js"(exports) { + "node_modules/ajv-formats/dist/limit.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatLimitDefinition = void 0; @@ -6854,9 +6854,9 @@ var require_limit = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/index.js +// node_modules/ajv-formats/dist/index.js var require_dist = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv-formats/dist/index.js"(exports, module) { + "node_modules/ajv-formats/dist/index.js"(exports, module) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var formats_1 = require_formats(); @@ -6896,9 +6896,9 @@ var require_dist = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +// node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js var require_dynamicAnchor = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) { + "node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dynamicAnchor = void 0; @@ -6931,9 +6931,9 @@ var require_dynamicAnchor = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +// node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js var require_dynamicRef = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) { + "node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dynamicRef = void 0; @@ -6977,9 +6977,9 @@ var require_dynamicRef = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +// node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js var require_recursiveAnchor = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) { + "node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dynamicAnchor_1 = require_dynamicAnchor(); @@ -6998,9 +6998,9 @@ var require_recursiveAnchor = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +// node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js var require_recursiveRef = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) { + "node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dynamicRef_1 = require_dynamicRef(); @@ -7013,9 +7013,9 @@ var require_recursiveRef = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/index.js +// node_modules/ajv/dist/vocabularies/dynamic/index.js var require_dynamic = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports) { + "node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dynamicAnchor_1 = require_dynamicAnchor(); @@ -7027,9 +7027,9 @@ var require_dynamic = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +// node_modules/ajv/dist/vocabularies/validation/dependentRequired.js var require_dependentRequired = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dependencies_1 = require_dependencies(); @@ -7044,9 +7044,9 @@ var require_dependentRequired = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +// node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js var require_dependentSchemas = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) { + "node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dependencies_1 = require_dependencies(); @@ -7060,9 +7060,9 @@ var require_dependentSchemas = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitContains.js +// node_modules/ajv/dist/vocabularies/validation/limitContains.js var require_limitContains = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports) { + "node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util(); @@ -7080,9 +7080,9 @@ var require_limitContains = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/next.js +// node_modules/ajv/dist/vocabularies/next.js var require_next = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/next.js"(exports) { + "node_modules/ajv/dist/vocabularies/next.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dependentRequired_1 = require_dependentRequired(); @@ -7093,9 +7093,9 @@ var require_next = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +// node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js var require_unevaluatedProperties = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) { + "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -7159,9 +7159,9 @@ var require_unevaluatedProperties = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +// node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js var require_unevaluatedItems = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) { + "node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var codegen_1 = require_codegen(); @@ -7203,9 +7203,9 @@ var require_unevaluatedItems = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/index.js +// node_modules/ajv/dist/vocabularies/unevaluated/index.js var require_unevaluated = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) { + "node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var unevaluatedProperties_1 = require_unevaluatedProperties(); @@ -7215,9 +7215,9 @@ var require_unevaluated = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/draft2020.js +// node_modules/ajv/dist/vocabularies/draft2020.js var require_draft2020 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/vocabularies/draft2020.js"(exports) { + "node_modules/ajv/dist/vocabularies/draft2020.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require_core2(); @@ -7243,9 +7243,9 @@ var require_draft2020 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +// node_modules/ajv/dist/refs/json-schema-2020-12/schema.json var require_schema = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module) { + "node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/schema", @@ -7303,9 +7303,9 @@ var require_schema = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json var require_applicator2 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module) { + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/applicator", @@ -7356,9 +7356,9 @@ var require_applicator2 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json var require_unevaluated2 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module) { + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/unevaluated", @@ -7376,9 +7376,9 @@ var require_unevaluated2 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json var require_content = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module) { + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/content", @@ -7397,9 +7397,9 @@ var require_content = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json var require_core3 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module) { + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/core", @@ -7453,9 +7453,9 @@ var require_core3 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json var require_format_annotation = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) { + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/format-annotation", @@ -7472,9 +7472,9 @@ var require_format_annotation = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json var require_meta_data = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) { + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/meta-data", @@ -7513,9 +7513,9 @@ var require_meta_data = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +// node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json var require_validation2 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) { + "node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) { module.exports = { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "https://json-schema.org/draft/2020-12/meta/validation", @@ -7608,9 +7608,9 @@ var require_validation2 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +// node_modules/ajv/dist/refs/json-schema-2020-12/index.js var require_json_schema_2020_12 = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports) { + "node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var metaSchema = require_schema(); @@ -7643,9 +7643,9 @@ var require_json_schema_2020_12 = __commonJS({ } }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/2020.js +// node_modules/ajv/dist/2020.js var require__ = __commonJS({ - "../../../Users/panda/Projects/active/claude-architect/node_modules/ajv/dist/2020.js"(exports, module) { + "node_modules/ajv/dist/2020.js"(exports, module) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0; @@ -7723,7 +7723,7 @@ var require__ = __commonJS({ // src/index.ts import { pathToFileURL } from "node:url"; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/helpers/util.js +// node_modules/zod/v3/helpers/util.js var util; (function(util2) { util2.assertEqual = (_) => { @@ -7857,7 +7857,7 @@ var getParsedType = (data) => { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/ZodError.js +// node_modules/zod/v3/ZodError.js var ZodIssueCode = util.arrayToEnum([ "invalid_type", "invalid_literal", @@ -7971,7 +7971,7 @@ ZodError.create = (issues) => { return error51; }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/locales/en.js +// node_modules/zod/v3/locales/en.js var errorMap = (issue2, _ctx) => { let message; switch (issue2.code) { @@ -8074,13 +8074,13 @@ var errorMap = (issue2, _ctx) => { }; var en_default = errorMap; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/errors.js +// node_modules/zod/v3/errors.js var overrideErrorMap = en_default; function getErrorMap() { return overrideErrorMap; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/helpers/parseUtil.js +// node_modules/zod/v3/helpers/parseUtil.js var makeIssue = (params) => { const { data, path: path32, errorMaps, issueData } = params; const fullPath = [...path32, ...issueData.path || []]; @@ -8189,14 +8189,14 @@ var isDirty = (x) => x.status === "dirty"; var isValid = (x) => x.status === "valid"; var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/helpers/errorUtil.js +// node_modules/zod/v3/helpers/errorUtil.js var errorUtil; (function(errorUtil2) { errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {}; errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message; })(errorUtil || (errorUtil = {})); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v3/types.js +// node_modules/zod/v3/types.js var ParseInputLazyPath = class { constructor(parent, value, path32, key) { this._cachedPath = []; @@ -11599,7 +11599,7 @@ var nullableType = ZodNullable.create; var preprocessType = ZodEffects.createWithPreprocess; var pipelineType = ZodPipeline.create; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/index.js +// node_modules/zod/v4/core/index.js var core_exports2 = {}; __export(core_exports2, { $ZodAny: () => $ZodAny, @@ -11878,7 +11878,7 @@ __export(core_exports2, { version: () => version }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/core.js +// node_modules/zod/v4/core/core.js var _a; var NEVER = /* @__PURE__ */ Object.freeze({ status: "aborted" @@ -11955,7 +11955,7 @@ function config(newConfig) { return globalConfig; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/util.js +// node_modules/zod/v4/core/util.js var util_exports = {}; __export(util_exports, { BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, @@ -12651,7 +12651,7 @@ var Class = class { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/errors.js +// node_modules/zod/v4/core/errors.js var initializer = (inst, def) => { inst.name = "$ZodError"; Object.defineProperty(inst, "_zod", { @@ -12790,7 +12790,7 @@ function prettifyError(error51) { return lines.join("\n"); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/parse.js +// node_modules/zod/v4/core/parse.js var _parse = (_Err) => (schema, value, _ctx, _params) => { const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; const result = schema._zod.run({ value, issues: [] }, ctx); @@ -12878,7 +12878,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => { }; var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/regexes.js +// node_modules/zod/v4/core/regexes.js var regexes_exports = {}; __export(regexes_exports, { base64: () => base64, @@ -13037,7 +13037,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/; var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); var sha512_base64url = /* @__PURE__ */ fixedBase64url(86); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/checks.js +// node_modules/zod/v4/core/checks.js var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { var _a3; inst._zod ?? (inst._zod = {}); @@ -13585,7 +13585,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins }; }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/doc.js +// node_modules/zod/v4/core/doc.js var Doc = class { constructor(args = []) { this.content = []; @@ -13621,14 +13621,14 @@ var Doc = class { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/versions.js +// node_modules/zod/v4/core/versions.js var version = { major: 4, minor: 4, patch: 3 }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/schemas.js +// node_modules/zod/v4/core/schemas.js var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { var _a3; inst ?? (inst = {}); @@ -15721,7 +15721,7 @@ function handleRefineResult(result, payload, input, inst) { } } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/index.js +// node_modules/zod/v4/locales/index.js var locales_exports = {}; __export(locales_exports, { ar: () => ar_default, @@ -15778,7 +15778,7 @@ __export(locales_exports, { zhTW: () => zh_TW_default }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ar.js +// node_modules/zod/v4/locales/ar.js var error = () => { const Sizable = { string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, @@ -15885,7 +15885,7 @@ function ar_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/az.js +// node_modules/zod/v4/locales/az.js var error2 = () => { const Sizable = { string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, @@ -15991,7 +15991,7 @@ function az_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/be.js +// node_modules/zod/v4/locales/be.js function getBelarusianPlural(count, one, few, many) { const absCount = Math.abs(count); const lastDigit = absCount % 10; @@ -16148,7 +16148,7 @@ function be_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/bg.js +// node_modules/zod/v4/locales/bg.js var error4 = () => { const Sizable = { string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, @@ -16269,7 +16269,7 @@ function bg_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ca.js +// node_modules/zod/v4/locales/ca.js var error5 = () => { const Sizable = { string: { unit: "car\xE0cters", verb: "contenir" }, @@ -16378,7 +16378,7 @@ function ca_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/cs.js +// node_modules/zod/v4/locales/cs.js var error6 = () => { const Sizable = { string: { unit: "znak\u016F", verb: "m\xEDt" }, @@ -16490,7 +16490,7 @@ function cs_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/da.js +// node_modules/zod/v4/locales/da.js var error7 = () => { const Sizable = { string: { unit: "tegn", verb: "havde" }, @@ -16606,7 +16606,7 @@ function da_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/de.js +// node_modules/zod/v4/locales/de.js var error8 = () => { const Sizable = { string: { unit: "Zeichen", verb: "zu haben" }, @@ -16715,7 +16715,7 @@ function de_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/el.js +// node_modules/zod/v4/locales/el.js var error9 = () => { const Sizable = { string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, @@ -16825,7 +16825,7 @@ function el_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/en.js +// node_modules/zod/v4/locales/en.js var error10 = () => { const Sizable = { string: { unit: "characters", verb: "to have" }, @@ -16938,7 +16938,7 @@ function en_default2() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/eo.js +// node_modules/zod/v4/locales/eo.js var error11 = () => { const Sizable = { string: { unit: "karaktrojn", verb: "havi" }, @@ -17048,7 +17048,7 @@ function eo_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/es.js +// node_modules/zod/v4/locales/es.js var error12 = () => { const Sizable = { string: { unit: "caracteres", verb: "tener" }, @@ -17181,7 +17181,7 @@ function es_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/fa.js +// node_modules/zod/v4/locales/fa.js var error13 = () => { const Sizable = { string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, @@ -17296,7 +17296,7 @@ function fa_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/fi.js +// node_modules/zod/v4/locales/fi.js var error14 = () => { const Sizable = { string: { unit: "merkki\xE4", subject: "merkkijonon" }, @@ -17409,7 +17409,7 @@ function fi_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/fr.js +// node_modules/zod/v4/locales/fr.js var error15 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -17535,7 +17535,7 @@ function fr_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/fr-CA.js +// node_modules/zod/v4/locales/fr-CA.js var error16 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -17643,7 +17643,7 @@ function fr_CA_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/he.js +// node_modules/zod/v4/locales/he.js var error17 = () => { const TypeNames = { string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, @@ -17838,7 +17838,7 @@ function he_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/hr.js +// node_modules/zod/v4/locales/hr.js var error18 = () => { const Sizable = { string: { unit: "znakova", verb: "imati" }, @@ -17961,7 +17961,7 @@ function hr_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/hu.js +// node_modules/zod/v4/locales/hu.js var error19 = () => { const Sizable = { string: { unit: "karakter", verb: "legyen" }, @@ -18070,7 +18070,7 @@ function hu_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/hy.js +// node_modules/zod/v4/locales/hy.js function getArmenianPlural(count, one, many) { return Math.abs(count) === 1 ? one : many; } @@ -18218,7 +18218,7 @@ function hy_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/id.js +// node_modules/zod/v4/locales/id.js var error21 = () => { const Sizable = { string: { unit: "karakter", verb: "memiliki" }, @@ -18325,7 +18325,7 @@ function id_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/is.js +// node_modules/zod/v4/locales/is.js var error22 = () => { const Sizable = { string: { unit: "stafi", verb: "a\xF0 hafa" }, @@ -18435,7 +18435,7 @@ function is_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/it.js +// node_modules/zod/v4/locales/it.js var error23 = () => { const Sizable = { string: { unit: "caratteri", verb: "avere" }, @@ -18544,7 +18544,7 @@ function it_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ja.js +// node_modules/zod/v4/locales/ja.js var error24 = () => { const Sizable = { string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, @@ -18652,7 +18652,7 @@ function ja_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ka.js +// node_modules/zod/v4/locales/ka.js var error25 = () => { const Sizable = { string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, @@ -18765,7 +18765,7 @@ function ka_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/km.js +// node_modules/zod/v4/locales/km.js var error26 = () => { const Sizable = { string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, @@ -18876,12 +18876,12 @@ function km_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/kh.js +// node_modules/zod/v4/locales/kh.js function kh_default() { return km_default(); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ko.js +// node_modules/zod/v4/locales/ko.js var error27 = () => { const Sizable = { string: { unit: "\uBB38\uC790", verb: "to have" }, @@ -18993,7 +18993,7 @@ function ko_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/lt.js +// node_modules/zod/v4/locales/lt.js var capitalizeFirstCharacter = (text) => { return text.charAt(0).toUpperCase() + text.slice(1); }; @@ -19197,7 +19197,7 @@ function lt_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/mk.js +// node_modules/zod/v4/locales/mk.js var error29 = () => { const Sizable = { string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, @@ -19307,7 +19307,7 @@ function mk_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ms.js +// node_modules/zod/v4/locales/ms.js var error30 = () => { const Sizable = { string: { unit: "aksara", verb: "mempunyai" }, @@ -19415,7 +19415,7 @@ function ms_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/nl.js +// node_modules/zod/v4/locales/nl.js var error31 = () => { const Sizable = { string: { unit: "tekens", verb: "heeft" }, @@ -19526,7 +19526,7 @@ function nl_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/no.js +// node_modules/zod/v4/locales/no.js var error32 = () => { const Sizable = { string: { unit: "tegn", verb: "\xE5 ha" }, @@ -19635,7 +19635,7 @@ function no_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ota.js +// node_modules/zod/v4/locales/ota.js var error33 = () => { const Sizable = { string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, @@ -19745,7 +19745,7 @@ function ota_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ps.js +// node_modules/zod/v4/locales/ps.js var error34 = () => { const Sizable = { string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, @@ -19860,7 +19860,7 @@ function ps_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/pl.js +// node_modules/zod/v4/locales/pl.js var error35 = () => { const Sizable = { string: { unit: "znak\xF3w", verb: "mie\u0107" }, @@ -19970,7 +19970,7 @@ function pl_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/pt.js +// node_modules/zod/v4/locales/pt.js var error36 = () => { const Sizable = { string: { unit: "caracteres", verb: "ter" }, @@ -20079,7 +20079,7 @@ function pt_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ro.js +// node_modules/zod/v4/locales/ro.js var error37 = () => { const Sizable = { string: { unit: "caractere", verb: "s\u0103 aib\u0103" }, @@ -20199,7 +20199,7 @@ function ro_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ru.js +// node_modules/zod/v4/locales/ru.js function getRussianPlural(count, one, few, many) { const absCount = Math.abs(count); const lastDigit = absCount % 10; @@ -20356,7 +20356,7 @@ function ru_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/sl.js +// node_modules/zod/v4/locales/sl.js var error39 = () => { const Sizable = { string: { unit: "znakov", verb: "imeti" }, @@ -20466,7 +20466,7 @@ function sl_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/sv.js +// node_modules/zod/v4/locales/sv.js var error40 = () => { const Sizable = { string: { unit: "tecken", verb: "att ha" }, @@ -20577,7 +20577,7 @@ function sv_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ta.js +// node_modules/zod/v4/locales/ta.js var error41 = () => { const Sizable = { string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, @@ -20688,7 +20688,7 @@ function ta_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/th.js +// node_modules/zod/v4/locales/th.js var error42 = () => { const Sizable = { string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, @@ -20799,7 +20799,7 @@ function th_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/tr.js +// node_modules/zod/v4/locales/tr.js var error43 = () => { const Sizable = { string: { unit: "karakter", verb: "olmal\u0131" }, @@ -20905,7 +20905,7 @@ function tr_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/uk.js +// node_modules/zod/v4/locales/uk.js var error44 = () => { const Sizable = { string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, @@ -21014,12 +21014,12 @@ function uk_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ua.js +// node_modules/zod/v4/locales/ua.js function ua_default() { return uk_default(); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/ur.js +// node_modules/zod/v4/locales/ur.js var error45 = () => { const Sizable = { string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, @@ -21130,7 +21130,7 @@ function ur_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/uz.js +// node_modules/zod/v4/locales/uz.js var error46 = () => { const Sizable = { string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, @@ -21241,7 +21241,7 @@ function uz_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/vi.js +// node_modules/zod/v4/locales/vi.js var error47 = () => { const Sizable = { string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, @@ -21350,7 +21350,7 @@ function vi_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/zh-CN.js +// node_modules/zod/v4/locales/zh-CN.js var error48 = () => { const Sizable = { string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, @@ -21460,7 +21460,7 @@ function zh_CN_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/zh-TW.js +// node_modules/zod/v4/locales/zh-TW.js var error49 = () => { const Sizable = { string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, @@ -21568,7 +21568,7 @@ function zh_TW_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/locales/yo.js +// node_modules/zod/v4/locales/yo.js var error50 = () => { const Sizable = { string: { unit: "\xE0mi", verb: "n\xED" }, @@ -21676,7 +21676,7 @@ function yo_default() { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/registries.js +// node_modules/zod/v4/core/registries.js var _a2; var $output = /* @__PURE__ */ Symbol("ZodOutput"); var $input = /* @__PURE__ */ Symbol("ZodInput"); @@ -21726,7 +21726,7 @@ function registry() { (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry()); var globalRegistry = globalThis.__zod_globalRegistry; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/api.js +// node_modules/zod/v4/core/api.js // @__NO_SIDE_EFFECTS__ function _string(Class2, params) { return new Class2({ @@ -22765,7 +22765,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) { return inst; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/to-json-schema.js +// node_modules/zod/v4/core/to-json-schema.js function initializeContext(params) { let target = params?.target ?? "draft-2020-12"; if (target === "draft-4") @@ -23124,7 +23124,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) = return finalize(ctx, schema); }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/json-schema-processors.js +// node_modules/zod/v4/core/json-schema-processors.js var formatMap = { guid: "uuid", url: "uri", @@ -23668,7 +23668,7 @@ function toJSONSchema(input, params) { return finalize(ctx, input); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/json-schema-generator.js +// node_modules/zod/v4/core/json-schema-generator.js var JSONSchemaGenerator = class { /** @deprecated Access via ctx instead */ get metadataRegistry() { @@ -23743,10 +23743,10 @@ var JSONSchemaGenerator = class { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/core/json-schema.js +// node_modules/zod/v4/core/json-schema.js var json_schema_exports = {}; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/mini/schemas.js +// node_modules/zod/v4/mini/schemas.js var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => { if (!inst._zod) throw new Error("Uninitialized schema in ZodMiniType."); @@ -23792,7 +23792,7 @@ function object(shape, params) { return new ZodMiniObject(def); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js function isZ4Schema(s) { const schema = s; return !!schema._zod; @@ -23952,7 +23952,7 @@ function getLiteralValue(schema) { return void 0; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/external.js +// node_modules/zod/v4/classic/external.js var external_exports = {}; __export(external_exports, { $brand: () => $brand, @@ -24195,7 +24195,7 @@ __export(external_exports, { xor: () => xor }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/schemas.js +// node_modules/zod/v4/classic/schemas.js var schemas_exports2 = {}; __export(schemas_exports2, { ZodAny: () => ZodAny2, @@ -24366,7 +24366,7 @@ __export(schemas_exports2, { xor: () => xor }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/checks.js +// node_modules/zod/v4/classic/checks.js var checks_exports2 = {}; __export(checks_exports2, { endsWith: () => _endsWith, @@ -24400,7 +24400,7 @@ __export(checks_exports2, { uppercase: () => _uppercase }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/iso.js +// node_modules/zod/v4/classic/iso.js var iso_exports2 = {}; __export(iso_exports2, { ZodISODate: () => ZodISODate, @@ -24441,7 +24441,7 @@ function duration2(params) { return _isoDuration(ZodISODuration, params); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/errors.js +// node_modules/zod/v4/classic/errors.js var initializer2 = (inst, issues) => { $ZodError.init(inst, issues); inst.name = "ZodError"; @@ -24481,7 +24481,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, { Parent: Error }); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/parse.js +// node_modules/zod/v4/classic/parse.js var parse2 = /* @__PURE__ */ _parse(ZodRealError); var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); var safeParse3 = /* @__PURE__ */ _safeParse(ZodRealError); @@ -24495,7 +24495,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/schemas.js +// node_modules/zod/v4/classic/schemas.js var _installedGroups = /* @__PURE__ */ new WeakMap(); function _installLazyMethods(inst, group, methods) { const proto = Object.getPrototypeOf(inst); @@ -25785,7 +25785,7 @@ function preprocess(fn, schema) { }); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/compat.js +// node_modules/zod/v4/classic/compat.js var ZodIssueCode2 = { invalid_type: "invalid_type", too_big: "too_big", @@ -25811,7 +25811,7 @@ var ZodFirstPartyTypeKind2; /* @__PURE__ */ (function(ZodFirstPartyTypeKind3) { })(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {})); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/from-json-schema.js +// node_modules/zod/v4/classic/from-json-schema.js var z = { ...schemas_exports2, ...checks_exports2, @@ -26291,7 +26291,7 @@ function fromJSONSchema(schema, params) { return convertSchema(normalized, ctx); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/coerce.js +// node_modules/zod/v4/classic/coerce.js var coerce_exports2 = {}; __export(coerce_exports2, { bigint: () => bigint3, @@ -26316,10 +26316,10 @@ function date4(params) { return _coercedDate(ZodDate2, params); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod/v4/classic/external.js +// node_modules/zod/v4/classic/external.js config(en_default2()); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js var LATEST_PROTOCOL_VERSION = "2025-11-25"; var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"]; var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task"; @@ -27850,12 +27850,12 @@ var UrlElicitationRequiredError = class extends McpError { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js function isTerminal(status) { return status === "completed" || status === "failed" || status === "cancelled"; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/Options.js +// node_modules/zod-to-json-schema/dist/esm/Options.js var ignoreOverride = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use"); var defaultOptions = { name: void 0, @@ -27889,7 +27889,7 @@ var getDefaultOptions = (options) => typeof options === "string" ? { ...options }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/Refs.js +// node_modules/zod-to-json-schema/dist/esm/Refs.js var getRefs = (options) => { const _options = getDefaultOptions(options); const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath; @@ -27910,7 +27910,7 @@ var getRefs = (options) => { }; }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +// node_modules/zod-to-json-schema/dist/esm/errorMessages.js function addErrorMessage(res, key, errorMessage2, refs) { if (!refs?.errorMessages) return; @@ -27926,7 +27926,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage2, refs) { addErrorMessage(res, key, errorMessage2, refs); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +// node_modules/zod-to-json-schema/dist/esm/getRelativePath.js var getRelativePath = (pathA, pathB) => { let i = 0; for (; i < pathA.length && i < pathB.length; i++) { @@ -27936,7 +27936,7 @@ var getRelativePath = (pathA, pathB) => { return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/"); }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +// node_modules/zod-to-json-schema/dist/esm/parsers/any.js function parseAnyDef(refs) { if (refs.target !== "openAi") { return {}; @@ -27952,7 +27952,7 @@ function parseAnyDef(refs) { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +// node_modules/zod-to-json-schema/dist/esm/parsers/array.js function parseArrayDef(def, refs) { const res = { type: "array" @@ -27976,7 +27976,7 @@ function parseArrayDef(def, refs) { return res; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +// node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js function parseBigintDef(def, refs) { const res = { type: "integer", @@ -28022,24 +28022,24 @@ function parseBigintDef(def, refs) { return res; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +// node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js function parseBooleanDef() { return { type: "boolean" }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +// node_modules/zod-to-json-schema/dist/esm/parsers/branded.js function parseBrandedDef(_def, refs) { return parseDef(_def.type._def, refs); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +// node_modules/zod-to-json-schema/dist/esm/parsers/catch.js var parseCatchDef = (def, refs) => { return parseDef(def.innerType._def, refs); }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +// node_modules/zod-to-json-schema/dist/esm/parsers/date.js function parseDateDef(def, refs, overrideDateStrategy) { const strategy = overrideDateStrategy ?? refs.dateStrategy; if (Array.isArray(strategy)) { @@ -28098,7 +28098,7 @@ var integerDateParser = (def, refs) => { return res; }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +// node_modules/zod-to-json-schema/dist/esm/parsers/default.js function parseDefaultDef(_def, refs) { return { ...parseDef(_def.innerType._def, refs), @@ -28106,12 +28106,12 @@ function parseDefaultDef(_def, refs) { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +// node_modules/zod-to-json-schema/dist/esm/parsers/effects.js function parseEffectsDef(_def, refs) { return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +// node_modules/zod-to-json-schema/dist/esm/parsers/enum.js function parseEnumDef(def) { return { type: "string", @@ -28119,7 +28119,7 @@ function parseEnumDef(def) { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +// node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js var isJsonSchema7AllOfType = (type) => { if ("type" in type && type.type === "string") return false; @@ -28161,7 +28161,7 @@ function parseIntersectionDef(def, refs) { } : void 0; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +// node_modules/zod-to-json-schema/dist/esm/parsers/literal.js function parseLiteralDef(def, refs) { const parsedType2 = typeof def.value; if (parsedType2 !== "bigint" && parsedType2 !== "number" && parsedType2 !== "boolean" && parsedType2 !== "string") { @@ -28181,7 +28181,7 @@ function parseLiteralDef(def, refs) { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +// node_modules/zod-to-json-schema/dist/esm/parsers/string.js var emojiRegex2 = void 0; var zodPatterns = { /** @@ -28506,7 +28506,7 @@ function stringifyRegExpWithFlags(regex, refs) { return pattern; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +// node_modules/zod-to-json-schema/dist/esm/parsers/record.js function parseRecordDef(def, refs) { if (refs.target === "openAi") { console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."); @@ -28558,7 +28558,7 @@ function parseRecordDef(def, refs) { return schema; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +// node_modules/zod-to-json-schema/dist/esm/parsers/map.js function parseMapDef(def, refs) { if (refs.mapStrategy === "record") { return parseRecordDef(def, refs); @@ -28583,7 +28583,7 @@ function parseMapDef(def, refs) { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +// node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js function parseNativeEnumDef(def) { const object3 = def.values; const actualKeys = Object.keys(def.values).filter((key) => { @@ -28597,7 +28597,7 @@ function parseNativeEnumDef(def) { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +// node_modules/zod-to-json-schema/dist/esm/parsers/never.js function parseNeverDef(refs) { return refs.target === "openAi" ? void 0 : { not: parseAnyDef({ @@ -28607,7 +28607,7 @@ function parseNeverDef(refs) { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +// node_modules/zod-to-json-schema/dist/esm/parsers/null.js function parseNullDef(refs) { return refs.target === "openApi3" ? { enum: ["null"], @@ -28617,7 +28617,7 @@ function parseNullDef(refs) { }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +// node_modules/zod-to-json-schema/dist/esm/parsers/union.js var primitiveMappings = { ZodString: "string", ZodNumber: "number", @@ -28685,7 +28685,7 @@ var asAnyOf = (def, refs) => { return anyOf.length ? { anyOf } : void 0; }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +// node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js function parseNullableDef(def, refs) { if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) { if (refs.target === "openApi3") { @@ -28717,7 +28717,7 @@ function parseNullableDef(def, refs) { return base && { anyOf: [base, { type: "null" }] }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +// node_modules/zod-to-json-schema/dist/esm/parsers/number.js function parseNumberDef(def, refs) { const res = { type: "number" @@ -28766,7 +28766,7 @@ function parseNumberDef(def, refs) { return res; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +// node_modules/zod-to-json-schema/dist/esm/parsers/object.js function parseObjectDef(def, refs) { const forceOptionalIntoNullable = refs.target === "openAi"; const result = { @@ -28836,7 +28836,7 @@ function safeIsOptional(schema) { } } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +// node_modules/zod-to-json-schema/dist/esm/parsers/optional.js var parseOptionalDef = (def, refs) => { if (refs.currentPath.toString() === refs.propertyPath?.toString()) { return parseDef(def.innerType._def, refs); @@ -28855,7 +28855,7 @@ var parseOptionalDef = (def, refs) => { } : parseAnyDef(refs); }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +// node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js var parsePipelineDef = (def, refs) => { if (refs.pipeStrategy === "input") { return parseDef(def.in._def, refs); @@ -28875,12 +28875,12 @@ var parsePipelineDef = (def, refs) => { }; }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +// node_modules/zod-to-json-schema/dist/esm/parsers/promise.js function parsePromiseDef(def, refs) { return parseDef(def.type._def, refs); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +// node_modules/zod-to-json-schema/dist/esm/parsers/set.js function parseSetDef(def, refs) { const items = parseDef(def.valueType._def, { ...refs, @@ -28900,7 +28900,7 @@ function parseSetDef(def, refs) { return schema; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +// node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js function parseTupleDef(def, refs) { if (def.rest) { return { @@ -28928,24 +28928,24 @@ function parseTupleDef(def, refs) { } } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +// node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js function parseUndefinedDef(refs) { return { not: parseAnyDef(refs) }; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +// node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js function parseUnknownDef(refs) { return parseAnyDef(refs); } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +// node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js var parseReadonlyDef = (def, refs) => { return parseDef(def.innerType._def, refs); }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/selectParser.js +// node_modules/zod-to-json-schema/dist/esm/selectParser.js var selectParser = (def, typeName, refs) => { switch (typeName) { case ZodFirstPartyTypeKind.ZodString: @@ -29021,7 +29021,7 @@ var selectParser = (def, typeName, refs) => { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/parseDef.js +// node_modules/zod-to-json-schema/dist/esm/parseDef.js function parseDef(def, refs, forceResolution = false) { const seenItem = refs.seen.get(def); if (refs.override) { @@ -29077,7 +29077,7 @@ var addMeta = (def, refs, jsonSchema) => { return jsonSchema; }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +// node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js var zodToJsonSchema = (schema, options) => { const refs = getRefs(options); let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({ @@ -29139,7 +29139,7 @@ var zodToJsonSchema = (schema, options) => { return combined; }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js function mapMiniTarget(t) { if (!t) return "draft-7"; @@ -29181,7 +29181,7 @@ function parseWithCompat(schema, data) { return result.data; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4; var Protocol = class { constructor(_options) { @@ -30135,7 +30135,7 @@ function mergeCapabilities(base, additional) { return result; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js var import_ajv = __toESM(require_ajv(), 1); var import_ajv_formats = __toESM(require_dist(), 1); function createDefaultAjvInstance() { @@ -30203,7 +30203,7 @@ var AjvJsonSchemaValidator = class { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js var ExperimentalServerTasks = class { constructor(_server) { this._server = _server; @@ -30416,7 +30416,7 @@ var ExperimentalServerTasks = class { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js function assertToolsCallTaskCapability(requests, method, entityName) { if (!requests) { throw new Error(`${entityName} does not support task creation (required for ${method})`); @@ -30451,7 +30451,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) { } } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js var Server = class extends Protocol { /** * Initializes this server with the given name and version information. @@ -30822,7 +30822,7 @@ var Server = class extends Protocol { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable"); function isCompletable(schema) { return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema; @@ -30836,7 +30836,7 @@ var McpZodTypeKind; McpZodTypeKind2["Completable"] = "McpCompletable"; })(McpZodTypeKind || (McpZodTypeKind = {})); -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/; function validateToolName(name) { const warnings = []; @@ -30894,7 +30894,7 @@ function validateAndWarnToolName(name) { return result.isValid; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js var ExperimentalMcpServerTasks = class { constructor(_mcpServer) { this._mcpServer = _mcpServer; @@ -30909,7 +30909,7 @@ var ExperimentalMcpServerTasks = class { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js var McpServer = class { constructor(serverInfo, options) { this._registeredResources = {}; @@ -31701,10 +31701,10 @@ var EMPTY_COMPLETION_RESULT = { } }; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js import process3 from "node:process"; -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024; var ReadBuffer = class { constructor(options) { @@ -31741,7 +31741,7 @@ function serializeMessage(message) { return JSON.stringify(message) + "\n"; } -// ../../../Users/panda/Projects/active/claude-architect/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js var StdioServerTransport = class { constructor(_stdin = process3.stdin, _stdout = process3.stdout, options) { this._stdin = _stdin; @@ -36416,12 +36416,172 @@ var AgyAdapter = class { } }; +// src/producers/claude-adapter.ts +import { existsSync as existsSync3, readFileSync } from "node:fs"; +import { homedir as homedir2 } from "node:os"; +import { join as join2 } from "node:path"; +var CLAUDE_REQUIRED_ENV = ["USER", "CLAUDE_CONFIG_DIR", "ANTHROPIC_API_KEY"]; +var EDIT_TOOLS = "Read,Edit,Write,Bash,Grep,Glob"; +var READ_ONLY_TOOLS = "Read,Grep,Glob"; +var EFFORT_LEVELS = /* @__PURE__ */ new Set(["low", "medium", "high", "xhigh", "max"]); +var TEXT_LIMIT2 = 8e3; +function isRecord4(value) { + return typeof value === "object" && value !== null && !Array.isArray(value); +} +function parseVersion(stdout) { + return /^(\d+\.\d+\.\d+(?:[-+][^\s]+)?)\b/u.exec(stdout.trim())?.[1] ?? null; +} +function parseEnvelope(stdout) { + const trimmed = stdout.trim(); + const start2 = trimmed.indexOf("{"); + if (start2 < 0) return null; + try { + const parsed = JSON.parse(trimmed.slice(start2)); + return isRecord4(parsed) && parsed.type === "result" ? parsed : null; + } catch { + return null; + } +} +function defaultHasOauthAccount(accountFile) { + if (!existsSync3(accountFile)) return false; + try { + const parsed = JSON.parse(readFileSync(accountFile, "utf8")); + return isRecord4(parsed) && isRecord4(parsed.oauthAccount); + } catch { + return false; + } +} +var ClaudeAdapter = class { + constructor(deps = { + env: process.env, + homeDirectory: homedir2() + }) { + this.deps = deps; + } + deps; + producerId = "claude"; + structuredOutput = true; + executionModes = ["edit"]; + /** `~/.claude` (or CLAUDE_CONFIG_DIR): settings, sessions, and local state. */ + configDirectory() { + const configured = this.deps.env.CLAUDE_CONFIG_DIR; + if (configured !== void 0 && configured.length > 0) return configured; + return join2(this.deps.env.HOME ?? this.deps.homeDirectory, ".claude"); + } + /** `~/.claude.json`: the account record the CLI rewrites on every run. */ + accountFile() { + const configured = this.deps.env.CLAUDE_CONFIG_DIR; + if (configured !== void 0 && configured.length > 0) return join2(configured, ".claude.json"); + return join2(this.deps.env.HOME ?? this.deps.homeDirectory, ".claude.json"); + } + isAuthenticated() { + const apiKey = this.deps.env.ANTHROPIC_API_KEY; + if (apiKey !== void 0 && apiKey.length > 0) return true; + return (this.deps.hasOauthAccount ?? defaultHasOauthAccount)(this.accountFile()); + } + async probe(ctx) { + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "claude", + structuredOutput: this.structuredOutput, + parseVersion, + isAuthenticated: () => this.isAuthenticated() + }); + } + buildInvocation(spec, ctx) { + const effort = spec.producerOverrides?.reasoningEffort; + if (effort !== void 0 && !EFFORT_LEVELS.has(effort)) { + throw new Error( + `Claude effort override ${JSON.stringify(effort)} is unsupported; use one of ${[...EFFORT_LEVELS].join("|")}.` + ); + } + const readOnly = ctx.readOnly === true; + const args = [ + "-p", + "--output-format", + "json", + // Fresh context per attempt is a trust invariant: nothing is resumable. + "--no-session-persistence", + // No MCP servers at all — in particular not this plugin's own runtime, + // which would otherwise hand the Producer a nested `delegate` tool. + "--strict-mcp-config", + // Skip user, project, and local settings: their hooks and permission + // grants are host-side behavior that must not run inside an attempt. + "--setting-sources", + "", + "--disable-slash-commands", + // Write confinement is the host Seatbelt profile, not the permission prompt. + "--dangerously-skip-permissions", + // Built-ins only: no Agent (no nested subagents), no web, no artifacts. + "--tools", + readOnly ? READ_ONLY_TOOLS : EDIT_TOOLS + ]; + if (spec.producerOverrides?.model !== void 0) { + args.push("--model", spec.producerOverrides.model); + } + if (effort !== void 0) { + args.push("--effort", effort); + } + return { + executable: ctx.executable, + args, + stdin: renderProducerPrompt(spec, readOnly), + requiredEnv: [...CLAUDE_REQUIRED_ENV], + inheritedStateWritablePaths: [this.configDirectory(), this.accountFile()], + // Model sessions must reach the provider API; write-protection remains the confinement goal. + network: "allowed" + }; + } + normalizeEvents(raw) { + if (raw.exit.truncated.stdout) { + return { events: [], producerSummary: null, ok: false }; + } + const envelope = parseEnvelope(raw.stdout); + if (envelope === null) { + return { + events: [{ kind: "error", text: raw.stderr.slice(-TEXT_LIMIT2) }], + producerSummary: null, + ok: false + }; + } + const result = typeof envelope.result === "string" ? envelope.result : void 0; + const ok = raw.exit.exitCode === 0 && envelope.is_error === false && envelope.subtype === "success" && result !== void 0; + if (ok) { + const events2 = [{ kind: "final", text: result, raw: envelope }]; + return { events: events2, producerSummary: result, ok: true }; + } + const events = [{ + kind: "error", + ...result === void 0 ? {} : { text: result.slice(-TEXT_LIMIT2) }, + raw: envelope + }]; + return { events, producerSummary: null, ok: false }; + } + configurationProfile() { + return { + isolationState: "inherited-config-only", + credentialSources: [ + '~/.claude.json oauthAccount + macOS login keychain ("Claude Code-credentials")', + "ANTHROPIC_API_KEY (optional)" + ], + behavioralConfigSources: [ + "explicit invocation argv (user/project/local settings, hooks, MCP servers, and skills are all disabled)" + ], + // `--setting-sources ""` also turns off CLAUDE.md/AGENTS.md discovery + // (confirmed live): the Producer sees only the rendered spec. + repositoryInstructionSources: [], + environmentDependencies: [...CLAUDE_REQUIRED_ENV], + temporaryHomeStrategy: "real HOME inherited by declared policy (OAuth state in ~/.claude.json is not HOME-redirectable); reduced reproducibility recorded in the Run Manifest" + }; + } +}; + // src/producers/codex-adapter.ts import { execFileSync } from "node:child_process"; -import { existsSync as existsSync3, realpathSync } from "node:fs"; +import { existsSync as existsSync4, realpathSync } from "node:fs"; import { open as open4 } from "node:fs/promises"; -import { homedir as homedir2, tmpdir as tmpdir4 } from "node:os"; -import { join as join2 } from "node:path"; +import { homedir as homedir3, tmpdir as tmpdir4 } from "node:os"; +import { join as join3 } from "node:path"; var CODEX_REQUIRED_ENV = [ "CODEX_HOME", "CODEX_API_KEY", @@ -36463,11 +36623,11 @@ function sandboxSupportWritableRoots(platform) { } var VERSION_TIMEOUT_MS2 = 1e4; var VERSION_OUTPUT_LIMIT2 = 64 * 1024; -function isRecord4(value) { +function isRecord5(value) { return typeof value === "object" && value !== null && !Array.isArray(value); } function stringProperty2(value, name) { - if (!isRecord4(value)) return void 0; + if (!isRecord5(value)) return void 0; const property = value[name]; return typeof property === "string" ? property : void 0; } @@ -36488,7 +36648,7 @@ function unavailableReport(ctx, reason, resolvedExecutable = null) { laneEligibility: { edit: false } }; } -function parseVersion(stdout) { +function parseVersion2(stdout) { const match = /(?:^|\s)(\d+\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/u.exec(stdout.trim()); return match?.[1] ?? null; } @@ -36561,7 +36721,7 @@ ${renderSkillBootstrap()} ${prompt}`; } function resolveCodexStore(deps) { - return deps.env.CODEX_HOME ?? join2(deps.homeDirectory, ".codex"); + return deps.env.CODEX_HOME ?? join3(deps.homeDirectory, ".codex"); } function defaultCodexEnv(deps) { if (deps.env.CODEX_HOME !== void 0) return {}; @@ -36571,14 +36731,14 @@ function defaultCodexEnv(deps) { var CodexAdapter = class { constructor(deps = { env: process.env, - homeDirectory: homedir2() + homeDirectory: homedir3() }) { this.deps = deps; } deps; producerId = "codex"; hasAuthStore(directory) { - return (this.deps.hasAuthStore ?? ((store) => existsSync3(join2(store, "auth.json"))))(directory); + return (this.deps.hasAuthStore ?? ((store) => existsSync4(join3(store, "auth.json"))))(directory); } async probe(ctx) { if (ctx.os === "win32") return unavailableReport(ctx, "unsupported-platform"); @@ -36599,7 +36759,7 @@ var CodexAdapter = class { timeoutMs: VERSION_TIMEOUT_MS2, maxOutputBytes: VERSION_OUTPUT_LIMIT2 }, {}); - const version2 = result.spawnError === void 0 && result.exitCode === 0 && result.signal === null && result.timedOut === false && result.cancelled === false ? parseVersion(result.stdout) : null; + const version2 = result.spawnError === void 0 && result.exitCode === 0 && result.signal === null && result.timedOut === false && result.cancelled === false ? parseVersion2(result.stdout) : null; if (version2 === null) return unavailableReport(ctx, "probe-failed", executable); const writeConfinementBackend = selectCodexWriteConfinementBackend(ctx); const authState = this.hasAuthStore(resolveCodexStore(this.deps)) ? "authenticated" : "unauthenticated"; @@ -36729,7 +36889,7 @@ var CodexAdapter = class { try { for (const line of lines) { const parsed = JSON.parse(line); - if (!isRecord4(parsed) || typeof parsed.type !== "string") { + if (!isRecord5(parsed) || typeof parsed.type !== "string") { return { events: [], producerSummary: null, ok: false }; } if (parsed.type === "turn.completed") { @@ -36785,19 +36945,19 @@ var CodexAdapter = class { }; // src/producers/opencode-adapter.ts -import { existsSync as existsSync4 } from "node:fs"; -import { homedir as homedir3 } from "node:os"; -import { join as join3 } from "node:path"; +import { existsSync as existsSync5 } from "node:fs"; +import { homedir as homedir4 } from "node:os"; +import { join as join4 } from "node:path"; var OPENCODE_REQUIRED_ENV = ["OPENCODE_CONFIG_DIR", "XDG_DATA_HOME"]; function defaultOpenCodeEnv(deps) { if (deps.env.XDG_DATA_HOME !== void 0) return {}; - const dataHome = join3(deps.homeDirectory, ".local", "share"); - return deps.hasAuthStore(join3(dataHome, "opencode")) ? { XDG_DATA_HOME: dataHome } : {}; + const dataHome = join4(deps.homeDirectory, ".local", "share"); + return deps.hasAuthStore(join4(dataHome, "opencode")) ? { XDG_DATA_HOME: dataHome } : {}; } var OpenCodeAdapter = class { constructor(deps = { env: process.env, - homeDirectory: homedir3() + homeDirectory: homedir4() }) { this.deps = deps; } @@ -36806,21 +36966,21 @@ var OpenCodeAdapter = class { structuredOutput = false; executionModes = ["edit"]; hasAuthStore(directory) { - return (this.deps.hasAuthStore ?? ((store) => existsSync4(join3(store, "auth.json"))))(directory); + return (this.deps.hasAuthStore ?? ((store) => existsSync5(join4(store, "auth.json"))))(directory); } async probe(ctx) { return probeOsConfinedCli(ctx, { producerId: this.producerId, executableName: "opencode", structuredOutput: this.structuredOutput, - isAuthenticated: () => this.hasAuthStore(join3(this.deps.homeDirectory, ".local", "share", "opencode")) + isAuthenticated: () => this.hasAuthStore(join4(this.deps.homeDirectory, ".local", "share", "opencode")) }); } /** OpenCode's XDG data (auth) and state directories, honoring host overrides. */ stateDirectories() { - const dataHome = this.deps.env.XDG_DATA_HOME ?? join3(this.deps.homeDirectory, ".local", "share"); - const stateHome = this.deps.env.XDG_STATE_HOME ?? join3(this.deps.homeDirectory, ".local", "state"); - return [join3(dataHome, "opencode"), join3(stateHome, "opencode")]; + const dataHome = this.deps.env.XDG_DATA_HOME ?? join4(this.deps.homeDirectory, ".local", "share"); + const stateHome = this.deps.env.XDG_STATE_HOME ?? join4(this.deps.homeDirectory, ".local", "state"); + return [join4(dataHome, "opencode"), join4(stateHome, "opencode")]; } buildInvocation(spec, ctx) { const args = [ @@ -36867,18 +37027,18 @@ var OpenCodeAdapter = class { }; // src/producers/pi-adapter.ts -import { existsSync as existsSync5 } from "node:fs"; -import { homedir as homedir4 } from "node:os"; -import { join as join4 } from "node:path"; +import { existsSync as existsSync6 } from "node:fs"; +import { homedir as homedir5 } from "node:os"; +import { join as join5 } from "node:path"; var PI_REQUIRED_ENV = ["PI_API_KEY"]; function defaultPiEnv(deps) { if (deps.env.HOME !== void 0) return {}; - return deps.hasConfigDir(join4(deps.homeDirectory, ".pi")) ? { HOME: deps.homeDirectory } : {}; + return deps.hasConfigDir(join5(deps.homeDirectory, ".pi")) ? { HOME: deps.homeDirectory } : {}; } var PiAdapter = class { constructor(deps = { env: process.env, - homeDirectory: homedir4() + homeDirectory: homedir5() }) { this.deps = deps; } @@ -36887,10 +37047,10 @@ var PiAdapter = class { structuredOutput = false; executionModes = ["edit"]; hasAuthStore(directory) { - return (this.deps.hasAuthStore ?? ((store) => existsSync5(join4(store, "auth.json"))))(directory); + return (this.deps.hasAuthStore ?? ((store) => existsSync6(join5(store, "auth.json"))))(directory); } hasConfigDir(directory) { - return existsSync5(directory); + return existsSync6(directory); } async probe(ctx) { return probeOsConfinedCli(ctx, { @@ -36902,7 +37062,7 @@ var PiAdapter = class { } /** Pi's auth + settings store; the only host state an attempt must write. */ agentStateDirectory() { - return join4(this.deps.env.HOME ?? this.deps.homeDirectory, ".pi", "agent"); + return join5(this.deps.env.HOME ?? this.deps.homeDirectory, ".pi", "agent"); } buildInvocation(spec, ctx) { if (spec.producerOverrides?.model !== void 0) { @@ -36951,9 +37111,9 @@ var PiAdapter = class { }; // src/producers/pythinker-adapter.ts -import { existsSync as existsSync6 } from "node:fs"; -import { homedir as homedir5 } from "node:os"; -import { join as join5 } from "node:path"; +import { existsSync as existsSync7 } from "node:fs"; +import { homedir as homedir6 } from "node:os"; +import { join as join6 } from "node:path"; var REQUIRED_LONG_OPTIONS = ["--prompt", "--model"]; function parseLongOptionTokens(helpText) { const options = /* @__PURE__ */ new Set(); @@ -36967,7 +37127,7 @@ var PYTHINKER_NO_AUTO_UPDATE_ENV = "PYTHINKER_CLI_NO_AUTO_UPDATE"; var PYTHINKER_REQUIRED_ENV = ["PYTHINKER_SHARE_DIR", PYTHINKER_NO_AUTO_UPDATE_ENV]; function resolvePythinkerHome(deps) { const configuredHome = deps.env.PYTHINKER_SHARE_DIR; - return configuredHome !== void 0 && configuredHome.length > 0 ? configuredHome : join5(deps.homeDirectory, ".pythinker"); + return configuredHome !== void 0 && configuredHome.length > 0 ? configuredHome : join6(deps.homeDirectory, ".pythinker"); } function defaultPythinkerEnv(deps) { const env = {}; @@ -36982,7 +37142,7 @@ function defaultPythinkerEnv(deps) { var PythinkerAdapter = class { constructor(deps = { env: process.env, - homeDirectory: homedir5() + homeDirectory: homedir6() }) { this.deps = deps; } @@ -36991,12 +37151,12 @@ var PythinkerAdapter = class { structuredOutput = false; executionModes = ["edit"]; hasAuthStore(directory) { - return (this.deps.hasAuthStore ?? ((store) => existsSync6( - join5(store, "credentials", "pythinker-code.json") + return (this.deps.hasAuthStore ?? ((store) => existsSync7( + join6(store, "credentials", "pythinker-code.json") )))(directory); } hasConfigDir(directory) { - return existsSync6(directory); + return existsSync7(directory); } async probe(ctx) { return probeOsConfinedCli(ctx, { @@ -37082,7 +37242,7 @@ var ProducerRegistry = class { return [...this.adapters]; } }; -var registry2 = new ProducerRegistry([new CodexAdapter(), new OpenCodeAdapter(), new PiAdapter(), new PythinkerAdapter(), new AgyAdapter()]); +var registry2 = new ProducerRegistry([new CodexAdapter(), new OpenCodeAdapter(), new PiAdapter(), new PythinkerAdapter(), new AgyAdapter(), new ClaudeAdapter()]); // src/producers/capability-probe.ts async function probeAll(ctx, producerRegistry = registry2) { @@ -37090,8 +37250,8 @@ async function probeAll(ctx, producerRegistry = registry2) { } // src/producers/producer-adapter.ts -import { readFileSync } from "node:fs"; -function detectEnvironmentType(readProcVersion = () => readFileSync("/proc/version", "utf8")) { +import { readFileSync as readFileSync2 } from "node:fs"; +function detectEnvironmentType(readProcVersion = () => readFileSync2("/proc/version", "utf8")) { if (process.platform !== "linux") return "native"; try { const version2 = readProcVersion().trim().toLowerCase(); @@ -38152,7 +38312,7 @@ function validateSpec(input) { }); return { ok: false, errors: validationErrors }; } -function isRecord5(value) { +function isRecord6(value) { return typeof value === "object" && value !== null && !Array.isArray(value); } function escapeJsonPointerSegment(value) { @@ -38179,9 +38339,9 @@ function isSafeCommitMessage(message) { } function taskIdForDelegationPath(input, instancePath) { const match = /^\/tasks\/(\d+)\/delegation(?:\/|$)/u.exec(instancePath); - if (match === null || !isRecord5(input) || !Array.isArray(input.tasks)) return void 0; + if (match === null || !isRecord6(input) || !Array.isArray(input.tasks)) return void 0; const task = input.tasks[Number(match[1])]; - if (!isRecord5(task) || typeof task.id !== "string") return void 0; + if (!isRecord6(task) || typeof task.id !== "string") return void 0; const idLength = [...task.id].length; return idLength >= 1 && idLength <= 128 ? task.id : void 0; } @@ -38192,9 +38352,9 @@ function validateAutopilotSpec(input) { message: error51.message ?? "invalid" })); const ids = /* @__PURE__ */ new Set(); - const tasks = isRecord5(input) && Array.isArray(input.tasks) ? input.tasks : []; + const tasks = isRecord6(input) && Array.isArray(input.tasks) ? input.tasks : []; for (const task of tasks) { - if (!isRecord5(task) || typeof task.id !== "string") continue; + if (!isRecord6(task) || typeof task.id !== "string") continue; const taskId = task.id; if (ids.has(taskId)) { errors.push({ path: "#/tasks", message: `duplicate task id: ${taskId}` }); @@ -38344,7 +38504,7 @@ var IGNORED_PATHS_LIMIT = 50; function reviewError(message, toolError) { return new RuntimeError(message, { toolError }); } -function isRecord6(value) { +function isRecord7(value) { return value !== null && typeof value === "object" && !Array.isArray(value); } function hasExactKeys(value, expected) { @@ -38372,14 +38532,14 @@ function canonicalJsonValue(value) { if (Array.isArray(value)) { return `[${value.map((item) => canonicalJsonValue(item)).join(",")}]`; } - if (!isRecord6(value)) throw new RuntimeError("review snapshot contains a non-JSON value"); + if (!isRecord7(value)) throw new RuntimeError("review snapshot contains a non-JSON value"); return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJsonValue(value[key])}`).join(",")}}`; } function validateChangedPath(value) { - return isRecord6(value) && hasExactKeys(value, ["path", "changeType", "mode", "contentHash"]) && typeof value.path === "string" && ["added", "modified", "deleted"].includes(value.changeType) && typeof value.mode === "string" && (value.contentHash === null || typeof value.contentHash === "string"); + return isRecord7(value) && hasExactKeys(value, ["path", "changeType", "mode", "contentHash"]) && typeof value.path === "string" && ["added", "modified", "deleted"].includes(value.changeType) && typeof value.mode === "string" && (value.contentHash === null || typeof value.contentHash === "string"); } function validateCommandOutcome(value) { - return isRecord6(value) && hasExactKeys(value, [ + return isRecord7(value) && hasExactKeys(value, [ "id", "executable", "args", @@ -38391,7 +38551,7 @@ function validateCommandOutcome(value) { ]) && typeof value.id === "string" && typeof value.executable === "string" && Array.isArray(value.args) && value.args.every((arg) => typeof arg === "string") && (value.exitCode === null || typeof value.exitCode === "number" && Number.isInteger(value.exitCode)) && typeof value.timedOut === "boolean" && typeof value.durationMs === "number" && Number.isFinite(value.durationMs) && value.durationMs >= 0 && typeof value.stdoutRef === "string" && typeof value.stderrRef === "string"; } function validateReviewSnapshot(value, expectedRunId) { - if (!isRecord6(value) || !hasExactKeys(value, [ + if (!isRecord7(value) || !hasExactKeys(value, [ "runId", "baseCommitOid", "candidateCommitOid", @@ -38401,7 +38561,7 @@ function validateReviewSnapshot(value, expectedRunId) { "changedPaths", "evidence", "executedVerification" - ]) || typeof value.runId !== "string" || expectedRunId !== void 0 && value.runId !== expectedRunId || typeof value.baseCommitOid !== "string" || !GIT_OID.test(value.baseCommitOid) || typeof value.candidateCommitOid !== "string" || !GIT_OID.test(value.candidateCommitOid) || typeof value.candidateTreeOid !== "string" || !GIT_OID.test(value.candidateTreeOid) || typeof value.manifestHash !== "string" || !SHA256.test(value.manifestHash) || typeof value.patch !== "string" || !Array.isArray(value.changedPaths) || !value.changedPaths.every(validateChangedPath) || !isRecord6(value.evidence) || !Array.isArray(value.executedVerification) || !value.executedVerification.every(validateCommandOutcome)) { + ]) || typeof value.runId !== "string" || expectedRunId !== void 0 && value.runId !== expectedRunId || typeof value.baseCommitOid !== "string" || !GIT_OID.test(value.baseCommitOid) || typeof value.candidateCommitOid !== "string" || !GIT_OID.test(value.candidateCommitOid) || typeof value.candidateTreeOid !== "string" || !GIT_OID.test(value.candidateTreeOid) || typeof value.manifestHash !== "string" || !SHA256.test(value.manifestHash) || typeof value.patch !== "string" || !Array.isArray(value.changedPaths) || !value.changedPaths.every(validateChangedPath) || !isRecord7(value.evidence) || !Array.isArray(value.executedVerification) || !value.executedVerification.every(validateCommandOutcome)) { throw new RuntimeError("archived review snapshot is malformed"); } const snapshot = value; @@ -42291,11 +42451,11 @@ function withManifestHash(body) { manifestHash: sha2562(stableJson(sanitized)) }; } -function isRecord7(value) { +function isRecord8(value) { return value !== null && typeof value === "object" && !Array.isArray(value); } function hasExactKeys2(value, expected) { - if (!isRecord7(value)) return false; + if (!isRecord8(value)) return false; const actual = Object.keys(value); return actual.length === expected.length && expected.every((key) => actual.includes(key)); } @@ -42332,7 +42492,7 @@ function assertManifestShape(value) { "schemaVersions", "packagedVerifier", "manifestHash" - ]) || value.manifestVersion !== "1" || typeof value.runId !== "string" || typeof value.repoRoot !== "string" || !isObjectId(value.baseCommitOid) || value.candidateManifestHash !== null && !isSha256(value.candidateManifestHash) || !hasExactKeys2(value.producer, ["id", "version", "model"]) || !isNullableString(value.producer.id) || !isNullableString(value.producer.version) || !isNullableString(value.producer.model) || !isRecord7(value.effectivePolicy) || !Array.isArray(value.repositoryInstructions) || !value.repositoryInstructions.every((instruction) => hasExactKeys2(instruction, ["path", "hash"]) && typeof instruction.path === "string" && isSha256(instruction.hash)) || !isSha256(value.promptHash) || !isRecord7(value.executionPolicy) || !Array.isArray(value.environment) || !value.environment.every((entry) => hasExactKeys2(entry, ["name", "source"]) && typeof entry.name === "string" && typeof entry.source === "string") || typeof value.runtimeVersion !== "string" || typeof value.protocolVersion !== "string" || !hasExactKeys2(value.schemaVersions, ["delegationSpec", "attemptResult"]) || typeof value.schemaVersions.delegationSpec !== "string" || typeof value.schemaVersions.attemptResult !== "string" || !hasExactKeys2(value.packagedVerifier, ["version", "hash"]) || typeof value.packagedVerifier.version !== "string" || !isSha256(value.packagedVerifier.hash) || !isSha256(value.manifestHash)) { + ]) || value.manifestVersion !== "1" || typeof value.runId !== "string" || typeof value.repoRoot !== "string" || !isObjectId(value.baseCommitOid) || value.candidateManifestHash !== null && !isSha256(value.candidateManifestHash) || !hasExactKeys2(value.producer, ["id", "version", "model"]) || !isNullableString(value.producer.id) || !isNullableString(value.producer.version) || !isNullableString(value.producer.model) || !isRecord8(value.effectivePolicy) || !Array.isArray(value.repositoryInstructions) || !value.repositoryInstructions.every((instruction) => hasExactKeys2(instruction, ["path", "hash"]) && typeof instruction.path === "string" && isSha256(instruction.hash)) || !isSha256(value.promptHash) || !isRecord8(value.executionPolicy) || !Array.isArray(value.environment) || !value.environment.every((entry) => hasExactKeys2(entry, ["name", "source"]) && typeof entry.name === "string" && typeof entry.source === "string") || typeof value.runtimeVersion !== "string" || typeof value.protocolVersion !== "string" || !hasExactKeys2(value.schemaVersions, ["delegationSpec", "attemptResult"]) || typeof value.schemaVersions.delegationSpec !== "string" || typeof value.schemaVersions.attemptResult !== "string" || !hasExactKeys2(value.packagedVerifier, ["version", "hash"]) || typeof value.packagedVerifier.version !== "string" || !isSha256(value.packagedVerifier.hash) || !isSha256(value.manifestHash)) { throw new RuntimeError("archived run manifest is malformed"); } } @@ -44212,7 +44372,7 @@ function withRunStartPidRecording(ps, context) { } // src/pipeline/role-prompts.ts -import { readFileSync as readFileSync2 } from "node:fs"; +import { readFileSync as readFileSync3 } from "node:fs"; function readSchemaText(name) { const candidates = [ new URL(`../../runtime/schemas/${name}`, import.meta.url), @@ -44221,7 +44381,7 @@ function readSchemaText(name) { let lastError; for (const candidate of candidates) { try { - return readFileSync2(candidate, "utf8"); + return readFileSync3(candidate, "utf8"); } catch (error51) { lastError = error51; } @@ -52979,7 +53139,7 @@ function createHostingCommandRunner(platformServices = getPlatformServices()) { return toCommandResult(exit); }; } -function parseVersion2(output) { +function parseVersion3(output) { const firstLine = output.split(/\r?\n/u, 1)[0] ?? ""; const match = /^gh version (\d+)\.(\d+)\.(\d+)(?:\s|$)/u.exec(firstLine); if (match === null) return null; @@ -53200,7 +53360,7 @@ var GitHubCliAdapter = class { failCommand(error51, "preflight-gh-unavailable"); } requireCleanExit(version2, "preflight-gh-unavailable"); - const parsedVersion = parseVersion2(version2.stdout); + const parsedVersion = parseVersion3(version2.stdout); if (parsedVersion === null) fail3("preflight-gh-version-invalid"); if (!versionAtLeast(parsedVersion, MINIMUM_GH_VERSION)) { fail3("preflight-gh-version-unsupported"); @@ -53937,7 +54097,7 @@ async function handleAutopilotResume(checkoutPath, workflowId, deps = {}) { return autopilotErrorResult(error51); } } -function isRecord8(value) { +function isRecord9(value) { return value !== null && typeof value === "object" && !Array.isArray(value); } async function loadArchivedRun(runId, deps) { @@ -54040,7 +54200,7 @@ function unknownProducerErrors(preferences) { }]); } function schemaCompatibility(input) { - if (isRecord8(input) && input.specVersion !== void 0 && input.specVersion !== DELEGATION_SPEC_VERSION) { + if (isRecord9(input) && input.specVersion !== void 0 && input.specVersion !== DELEGATION_SPEC_VERSION) { return { ok: false, diagnostic: `delegation spec version mismatch: request declares ${String(input.specVersion)}, runtime expects ${DELEGATION_SPEC_VERSION}` @@ -54311,12 +54471,12 @@ function decisionAdvisoryForRun(run) { const incomplete = run.result.evidence.pipelineReviewIncomplete; const cleared = run.result.evidence.pipelineGateCleared; const warnings = []; - if (isRecord8(refused) && Array.isArray(refused.reasons)) { + if (isRecord9(refused) && Array.isArray(refused.reasons)) { warnings.push( `the pipeline gate did NOT clear this candidate: ${refused.reasons.filter((r) => typeof r === "string").join("; ")}` ); } - if (isRecord8(incomplete) && typeof incomplete.reason === "string") { + if (isRecord9(incomplete) && typeof incomplete.reason === "string") { warnings.push(`the pipeline could not complete its own review: ${incomplete.reason}`); } const plainDelegate = run.result.evidence.plainDelegate === true && refused === void 0 && incomplete === void 0 && cleared === void 0; @@ -54327,7 +54487,7 @@ function decisionAdvisoryForRun(run) { if (warnings.length === 0) { warnings.push("the pipeline gate clearance record is missing"); } - } else if (!isRecord8(cleared) || typeof cleared.candidateCommitOid !== "string" || typeof cleared.requiresHumanDecision !== "boolean") { + } else if (!isRecord9(cleared) || typeof cleared.candidateCommitOid !== "string" || typeof cleared.requiresHumanDecision !== "boolean") { warnings.push("the pipeline gate clearance record is malformed"); } else if (cleared.requiresHumanDecision === true) { warnings.push("the pipeline gate clearance record requires a human decision"); diff --git a/skills/delegate/SKILL.md b/skills/delegate/SKILL.md index ecf27b9..92dd5e9 100644 --- a/skills/delegate/SKILL.md +++ b/skills/delegate/SKILL.md @@ -38,6 +38,7 @@ The delegated CLIs are the architect's **implementation agents** — the same su | `pi-implementer` | Pi configured model | optional `--thinking` | | `pythinker-implementer` | Pythinker provider/model | the installed pythinker-code CLI exposes no reasoning override; the configured default always applies | | `agy-implementer` | Antigravity CLI (`agy`) configured model | optional `--effort low\|medium\|high` | +| `claude-implementer` | Claude Code headless (`claude -p`) — Opus, Sonnet, or the configured default | optional `--model opus\|sonnet\|fable\|haiku`, optional `--effort low\|medium\|high\|xhigh\|max` | If the user invokes `/claude-architect:delegate` without naming a CLI, implementer, or agent, use the host's structured question tool when available, ask this question, and wait for the answer. Include the producer and reasoning control in each option so the user knows what the lane will run: @@ -50,6 +51,7 @@ Offer exactly these choices: - **Pi** - `pi-implementer`; always uses the model configured in Pi — a spec naming a model override fails the lane rather than substituting one — with optional `--thinking off|minimal|low|medium|high|xhigh|max`. - **Pythinker** - `pythinker-implementer`; configured provider/model unless overridden; the installed pythinker-code CLI exposes no reasoning override, so the Pythinker configured default always applies. - **Antigravity CLI** - `agy-implementer`; configured model unless overridden, with optional `--effort low|medium|high`; darwin/arm64 only until a Linux/Windows write-confinement backend exists. +- **Claude Code** - `claude-implementer`; a second Claude session run headless as an untrusted Producer — the configured default model unless overridden with `--model opus|sonnet|fable|haiku`, with optional `--effort low|medium|high|xhigh|max`; darwin/arm64 only, same Seatbelt backend. The attempt runs with settings, hooks, MCP servers, skills, and CLAUDE.md discovery disabled, so it sees only the Delegation Spec and cannot reach this plugin's own tools. There is no implicit lane default. If the answer names a supported model or reasoning override, include it in the delegation spec; otherwise let the selected Producer use its configured default. The Pi lane accepts no model override: it always runs the model configured in Pi. diff --git a/src/producers/claude-adapter.ts b/src/producers/claude-adapter.ts new file mode 100644 index 0000000..30f16d6 --- /dev/null +++ b/src/producers/claude-adapter.ts @@ -0,0 +1,203 @@ +import { existsSync, readFileSync } from "node:fs"; +import { homedir } from "node:os"; +import { join } from "node:path"; +import type { DelegationSpec } from "../protocol/delegation-spec.js"; +import { probeOsConfinedCli } from "./cli-probe.js"; +import { renderProducerPrompt } from "./plain-text.js"; +import type { + AdapterEvent, + CapabilityReport, + InvocationContext, + ProbeContext, + ProducerAdapter, + ProducerConfigurationProfile, + ProducerInvocation, +} from "./producer-adapter.js"; + +// USER: the CLI resolves its OAuth credential through the login keychain, which +// it looks up by user name — without it a logged-in host reports "Not logged in". +// CLAUDE_CONFIG_DIR: relocated config/auth store must reach the process, or the +// adapter would report auth state from one directory while the CLI read another. +// ANTHROPIC_API_KEY: the API-key auth path, forwarded by declared policy exactly +// as the Pi and agy lanes forward theirs. +const CLAUDE_REQUIRED_ENV = ["USER", "CLAUDE_CONFIG_DIR", "ANTHROPIC_API_KEY"] as const; +const EDIT_TOOLS = "Read,Edit,Write,Bash,Grep,Glob"; +const READ_ONLY_TOOLS = "Read,Grep,Glob"; +const EFFORT_LEVELS = new Set(["low", "medium", "high", "xhigh", "max"]); +const TEXT_LIMIT = 8_000; + +function isRecord(value: unknown): value is Record { + return typeof value === "object" && value !== null && !Array.isArray(value); +} + +/** Claude Code emits `--version` as ` (Claude Code)`. */ +function parseVersion(stdout: string): string | null { + return /^(\d+\.\d+\.\d+(?:[-+][^\s]+)?)\b/u.exec(stdout.trim())?.[1] ?? null; +} + +/** stderr warnings can precede the envelope when both land on one stream. */ +function parseEnvelope(stdout: string): Record | null { + const trimmed = stdout.trim(); + const start = trimmed.indexOf("{"); + if (start < 0) return null; + try { + const parsed: unknown = JSON.parse(trimmed.slice(start)); + return isRecord(parsed) && parsed.type === "result" ? parsed : null; + } catch { + return null; + } +} + +export interface ClaudeAdapterDeps { + env: Record; + homeDirectory: string; + /** Whether the account file at the given path records a logged-in OAuth account. */ + hasOauthAccount?: (accountFile: string) => boolean; +} + +function defaultHasOauthAccount(accountFile: string): boolean { + if (!existsSync(accountFile)) return false; + try { + const parsed: unknown = JSON.parse(readFileSync(accountFile, "utf8")); + return isRecord(parsed) && isRecord(parsed.oauthAccount); + } catch { + return false; + } +} + +export class ClaudeAdapter implements ProducerAdapter { + readonly producerId = "claude"; + readonly structuredOutput = true; + readonly executionModes = ["edit"]; + + constructor(private readonly deps: ClaudeAdapterDeps = { + env: process.env, + homeDirectory: homedir(), + }) {} + + /** `~/.claude` (or CLAUDE_CONFIG_DIR): settings, sessions, and local state. */ + private configDirectory(): string { + const configured = this.deps.env.CLAUDE_CONFIG_DIR; + if (configured !== undefined && configured.length > 0) return configured; + return join(this.deps.env.HOME ?? this.deps.homeDirectory, ".claude"); + } + + /** `~/.claude.json`: the account record the CLI rewrites on every run. */ + private accountFile(): string { + const configured = this.deps.env.CLAUDE_CONFIG_DIR; + if (configured !== undefined && configured.length > 0) return join(configured, ".claude.json"); + return join(this.deps.env.HOME ?? this.deps.homeDirectory, ".claude.json"); + } + + private isAuthenticated(): boolean { + const apiKey = this.deps.env.ANTHROPIC_API_KEY; + if (apiKey !== undefined && apiKey.length > 0) return true; + return (this.deps.hasOauthAccount ?? defaultHasOauthAccount)(this.accountFile()); + } + + async probe(ctx: ProbeContext): Promise { + return probeOsConfinedCli(ctx, { + producerId: this.producerId, + executableName: "claude", + structuredOutput: this.structuredOutput, + parseVersion, + isAuthenticated: () => this.isAuthenticated(), + }); + } + + buildInvocation(spec: DelegationSpec, ctx: InvocationContext): ProducerInvocation { + const effort = spec.producerOverrides?.reasoningEffort; + if (effort !== undefined && !EFFORT_LEVELS.has(effort)) { + throw new Error( + `Claude effort override ${JSON.stringify(effort)} is unsupported; use one of ${[...EFFORT_LEVELS].join("|")}.`, + ); + } + const readOnly = ctx.readOnly === true; + const args = [ + "-p", + "--output-format", + "json", + // Fresh context per attempt is a trust invariant: nothing is resumable. + "--no-session-persistence", + // No MCP servers at all — in particular not this plugin's own runtime, + // which would otherwise hand the Producer a nested `delegate` tool. + "--strict-mcp-config", + // Skip user, project, and local settings: their hooks and permission + // grants are host-side behavior that must not run inside an attempt. + "--setting-sources", + "", + "--disable-slash-commands", + // Write confinement is the host Seatbelt profile, not the permission prompt. + "--dangerously-skip-permissions", + // Built-ins only: no Agent (no nested subagents), no web, no artifacts. + "--tools", + readOnly ? READ_ONLY_TOOLS : EDIT_TOOLS, + ]; + if (spec.producerOverrides?.model !== undefined) { + args.push("--model", spec.producerOverrides.model); + } + if (effort !== undefined) { + args.push("--effort", effort); + } + + return { + executable: ctx.executable, + args, + stdin: renderProducerPrompt(spec, readOnly), + requiredEnv: [...CLAUDE_REQUIRED_ENV], + inheritedStateWritablePaths: [this.configDirectory(), this.accountFile()], + // Model sessions must reach the provider API; write-protection remains the confinement goal. + network: "allowed", + }; + } + + normalizeEvents( + raw: Parameters[0], + ): ReturnType { + if (raw.exit.truncated.stdout) { + return { events: [], producerSummary: null, ok: false }; + } + const envelope = parseEnvelope(raw.stdout); + if (envelope === null) { + return { + events: [{ kind: "error", text: raw.stderr.slice(-TEXT_LIMIT) }], + producerSummary: null, + ok: false, + }; + } + const result = typeof envelope.result === "string" ? envelope.result : undefined; + const ok = raw.exit.exitCode === 0 + && envelope.is_error === false + && envelope.subtype === "success" + && result !== undefined; + if (ok) { + const events: AdapterEvent[] = [{ kind: "final", text: result, raw: envelope }]; + return { events, producerSummary: result, ok: true }; + } + const events: AdapterEvent[] = [{ + kind: "error", + ...(result === undefined ? {} : { text: result.slice(-TEXT_LIMIT) }), + raw: envelope, + }]; + return { events, producerSummary: null, ok: false }; + } + + configurationProfile(): ProducerConfigurationProfile { + return { + isolationState: "inherited-config-only", + credentialSources: [ + "~/.claude.json oauthAccount + macOS login keychain (\"Claude Code-credentials\")", + "ANTHROPIC_API_KEY (optional)", + ], + behavioralConfigSources: [ + "explicit invocation argv (user/project/local settings, hooks, MCP servers, and skills are all disabled)", + ], + // `--setting-sources ""` also turns off CLAUDE.md/AGENTS.md discovery + // (confirmed live): the Producer sees only the rendered spec. + repositoryInstructionSources: [], + environmentDependencies: [...CLAUDE_REQUIRED_ENV], + temporaryHomeStrategy: + "real HOME inherited by declared policy (OAuth state in ~/.claude.json is not HOME-redirectable); reduced reproducibility recorded in the Run Manifest", + }; + } +} diff --git a/src/producers/producer-registry.ts b/src/producers/producer-registry.ts index 98f21c4..a042c1b 100644 --- a/src/producers/producer-registry.ts +++ b/src/producers/producer-registry.ts @@ -1,4 +1,5 @@ import { AgyAdapter } from "./agy-adapter.js"; +import { ClaudeAdapter } from "./claude-adapter.js"; import { CodexAdapter } from "./codex-adapter.js"; import { OpenCodeAdapter } from "./opencode-adapter.js"; import { PiAdapter } from "./pi-adapter.js"; @@ -21,4 +22,4 @@ export class ProducerRegistry { } } -export const registry = new ProducerRegistry([new CodexAdapter(), new OpenCodeAdapter(), new PiAdapter(), new PythinkerAdapter(), new AgyAdapter()]); +export const registry = new ProducerRegistry([new CodexAdapter(), new OpenCodeAdapter(), new PiAdapter(), new PythinkerAdapter(), new AgyAdapter(), new ClaudeAdapter()]); diff --git a/tests/delegate-routing.test.mjs b/tests/delegate-routing.test.mjs index 5d3a796..afd573a 100644 --- a/tests/delegate-routing.test.mjs +++ b/tests/delegate-routing.test.mjs @@ -6,7 +6,7 @@ const skill = fs.readFileSync(new URL("../skills/delegate/SKILL.md", import.meta assert.match(skill, /If the user invokes `\/claude-architect:delegate` without naming a CLI, implementer, or agent, use the host's structured question tool when available, ask this question, and wait for the answer\./); assert.match(skill, /Which CLI should handle this delegation\?.*Use a custom answer to name a different supported reasoning level\./); -for (const lane of ["codex-implementer", "opencode-implementer", "pi-implementer", "pythinker-implementer", "agy-implementer"]) { +for (const lane of ["codex-implementer", "opencode-implementer", "pi-implementer", "pythinker-implementer", "agy-implementer", "claude-implementer"]) { assert.ok(skill.includes(`\`${lane}\``), `delegate question must offer ${lane}`); } @@ -18,6 +18,8 @@ assert.match(skill, /The Pi lane accepts no model override: it always runs the m assert.doesNotMatch(skill, /--thinking-effort/); assert.match(skill, /the installed pythinker-code CLI exposes no reasoning override, so the Pythinker configured default always applies/); assert.match(skill, /`--effort low\|medium\|high`/); +assert.match(skill, /`--model opus\|sonnet\|fable\|haiku`/); +assert.match(skill, /`--effort low\|medium\|high\|xhigh\|max`/); assert.match(skill, /include it in the delegation spec/); assert.doesNotMatch(skill, /Use Codex by default|default implementation lane/); diff --git a/tests/lane-launchers.test.sh b/tests/lane-launchers.test.sh index ac1afef..fbc1989 100644 --- a/tests/lane-launchers.test.sh +++ b/tests/lane-launchers.test.sh @@ -39,7 +39,7 @@ fi [[ -f "$ROOT/runtime/server.mjs" ]] || fail 'missing packaged MCP server runtime' [[ -f "$ROOT/src/mcp/server.ts" ]] || fail 'missing MCP server source' -for producer in codex opencode pi pythinker; do +for producer in codex opencode pi pythinker agy claude; do [[ -f "$ROOT/src/producers/$producer-adapter.ts" ]] || fail "missing MCP Producer adapter: src/producers/$producer-adapter.ts" done diff --git a/tests/runtime/capability-probe.test.ts b/tests/runtime/capability-probe.test.ts index 78e4cb6..5e00b7d 100644 --- a/tests/runtime/capability-probe.test.ts +++ b/tests/runtime/capability-probe.test.ts @@ -73,6 +73,7 @@ describe("ProducerRegistry", () => { "pi", "pythinker", "agy", + "claude", ]); }); }); diff --git a/tests/runtime/claude-adapter.test.ts b/tests/runtime/claude-adapter.test.ts new file mode 100644 index 0000000..29b0786 --- /dev/null +++ b/tests/runtime/claude-adapter.test.ts @@ -0,0 +1,598 @@ +import { execFile } from "node:child_process"; +import { mkdir, mkdtemp, readFile, rm } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { Readable } from "node:stream"; +import { promisify } from "node:util"; +import { describe, expect, it } from "vitest"; +import type { + PlatformServices, + ResolvedExecutable, + SupervisedExit, +} from "../../src/platform/platform-services.js"; +import { PosixPlatformServices } from "../../src/platform/posix-platform-services.js"; +import { supervise } from "../../src/platform/process-supervisor.js"; +import { wrapInvocationWithSeatbelt } from "../../src/platform/sandbox/seatbelt.js"; +import type { DelegationSpec } from "../../src/protocol/delegation-spec.js"; +import { ClaudeAdapter } from "../../src/producers/claude-adapter.js"; +import { renderProducerPrompt } from "../../src/producers/plain-text.js"; +import { renderSkillBootstrap } from "../../src/producers/skill-bootstrap.js"; +import type { + CapabilityReport, + InvocationContext, + ProbeContext, +} from "../../src/producers/producer-adapter.js"; +import { buildEnvironment } from "../../src/runtime/environment-policy.js"; + +const execFileAsync = promisify(execFile); +const executable: ResolvedExecutable = { + kind: "native", + command: "/usr/local/bin/claude", + prefixArgs: [], + resolvedFrom: "test", +}; + +function exit(overrides: Partial = {}): SupervisedExit { + return { + exitCode: 0, + signal: null, + timedOut: false, + cancelled: false, + stdout: "", + stderr: "", + truncated: { stdout: false, stderr: false }, + ...overrides, + }; +} + +function unavailablePlatformServices(): PlatformServices { + return { + os: "darwin", + async resolveExecutable() { + throw new Error("not installed"); + }, + async spawnSupervised() { + throw new Error("unexpected spawn"); + }, + async requestCooperativeCancellation() {}, + async terminateProcessTree() {}, + async getProcessStartToken() { + return null; + }, + async terminateProcessTreeByPid() {}, + async acquireCheckoutLock() { + throw new Error("unexpected lock"); + }, + async acquireCleanupJournalLock() { + throw new Error("unexpected cleanup journal lock"); + }, + async createSecureTempDirectory() { + throw new Error("unexpected temp directory"); + }, + async canonicalizePath() { + throw new Error("unexpected canonicalization"); + }, + }; +} + +function versionPlatformServices( + resolvedExecutable: ResolvedExecutable, + spawned: ResolvedExecutable[] = [], + stdout = "2.1.250 (Claude Code)\n", +): PlatformServices { + return { + os: "darwin", + async resolveExecutable() { + return resolvedExecutable; + }, + async spawnSupervised(request) { + spawned.push(request.executable); + return { + pid: 42, + stdout: Readable.from([]), + stderr: Readable.from([]), + done: Promise.resolve(exit({ stdout })), + }; + }, + async requestCooperativeCancellation() {}, + async terminateProcessTree() {}, + async getProcessStartToken() { + return null; + }, + async terminateProcessTreeByPid() {}, + async acquireCheckoutLock() { + throw new Error("unexpected lock"); + }, + async acquireCleanupJournalLock() { + throw new Error("unexpected cleanup journal lock"); + }, + async createSecureTempDirectory() { + throw new Error("unexpected temp directory"); + }, + async canonicalizePath() { + throw new Error("unexpected canonicalization"); + }, + }; +} + +function capabilityReport(): CapabilityReport { + return { + producerId: "claude", + available: true, + reason: null, + os: "darwin", + arch: "arm64", + environmentType: "native", + resolvedExecutable: executable, + version: "2.1.250", + authState: "unknown", + executionModes: ["edit"], + structuredOutput: true, + writeConfinementBackend: null, + laneEligibility: { edit: false }, + }; +} + +function sampleSpec(): DelegationSpec { + return { + specVersion: "1", + objective: "Update the greeting without changing any other behavior.", + context: "The greeting is rendered from src/greeting.ts.", + writeAllowlist: ["src/greeting.ts"], + forbiddenScope: ["secrets/**"], + successCriteria: ["The greeting says hello."], + verification: [{ + id: "check", + executable: "node", + args: ["-e", "process.exit(0)"], + cwd: ".", + timeoutMs: 60_000, + network: "denied", + expectedExitCodes: [0], + }], + executionMode: "edit", + timeoutMs: 60_000, + producerPreferences: ["claude"], + expectedOutput: "candidate-patch", + }; +} + +function invocationContext(worktreePath = "/tmp/attempt-worktree"): InvocationContext { + return { + worktreePath, + runId: "run-claude", + tempHome: "/tmp/attempt-home", + capabilityReport: capabilityReport(), + executable, + }; +} + +function probeContext(ps: PlatformServices): ProbeContext { + return { + ps, + os: "darwin", + arch: "arm64", + environmentType: "native", + }; +} + +const ISOLATION_ARGS = [ + "-p", + "--output-format", + "json", + "--no-session-persistence", + "--strict-mcp-config", + "--setting-sources", + "", + "--disable-slash-commands", + "--dangerously-skip-permissions", +]; + +function envelope(overrides: Record = {}): string { + return JSON.stringify({ + type: "result", + subtype: "success", + is_error: false, + result: "done", + num_turns: 3, + session_id: "s", + ...overrides, + }); +} + +function testAdapter(overrides: Partial[0]> = {}): ClaudeAdapter { + return new ClaudeAdapter({ + env: {}, + homeDirectory: "/Users/test", + hasOauthAccount: () => false, + ...overrides, + }); +} + +describe("ClaudeAdapter", () => { + it("reports a missing executable without spawning or guessing auth state", async () => { + const report = await testAdapter().probe(probeContext(unavailablePlatformServices())); + + expect(report).toMatchObject({ + producerId: "claude", + available: false, + reason: "missing-executable", + resolvedExecutable: null, + version: null, + authState: "unknown", + structuredOutput: true, + writeConfinementBackend: null, + laneEligibility: { edit: false }, + }); + }); + + it("reports win32 as unsupported without resolving an executable", async () => { + const report = await testAdapter().probe({ + ...probeContext(unavailablePlatformServices()), + os: "win32", + }); + + expect(report.available).toBe(false); + expect(report.reason).toBe("unsupported-platform"); + expect(report.resolvedExecutable).toBeNull(); + }); + + it("parses the Claude Code version banner and honestly gates edit eligibility", async () => { + const report = await testAdapter().probe(probeContext(versionPlatformServices(executable))); + + expect(report.available).toBe(true); + expect(report.version).toBe("2.1.250"); + expect(report.structuredOutput).toBe(true); + expect(report.writeConfinementBackend).toBe( + process.platform === "darwin" && process.arch === "arm64" ? "macos-seatbelt" : null, + ); + expect(report.laneEligibility).toEqual({ edit: report.writeConfinementBackend !== null }); + }); + + it("reports probe-failed when version output cannot be parsed", async () => { + const report = await testAdapter().probe( + probeContext(versionPlatformServices(executable, [], "Claude Code\n")), + ); + + expect(report.available).toBe(false); + expect(report.reason).toBe("probe-failed"); + expect(report.resolvedExecutable).toEqual(executable); + }); + + it("reports authenticated when ~/.claude.json records an OAuth account", async () => { + const checked: string[] = []; + const adapter = testAdapter({ + hasOauthAccount: file => { + checked.push(file); + return true; + }, + }); + const report = await adapter.probe(probeContext(versionPlatformServices(executable))); + + expect(report.authState).toBe("authenticated"); + expect(checked).toEqual(["/Users/test/.claude.json"]); + }); + + it("reads the account record from CLAUDE_CONFIG_DIR when the host relocated it", async () => { + const checked: string[] = []; + const adapter = testAdapter({ + env: { CLAUDE_CONFIG_DIR: "/Users/test/relocated" }, + hasOauthAccount: file => { + checked.push(file); + return false; + }, + }); + const report = await adapter.probe(probeContext(versionPlatformServices(executable))); + + expect(report.authState).toBe("unauthenticated"); + expect(checked).toEqual(["/Users/test/relocated/.claude.json"]); + }); + + it("reports authenticated from ANTHROPIC_API_KEY without reading the account file", async () => { + const adapter = testAdapter({ + env: { ANTHROPIC_API_KEY: "sk-test" }, + hasOauthAccount: () => { + throw new Error("must not read the account file"); + }, + }); + const report = await adapter.probe(probeContext(versionPlatformServices(executable))); + + expect(report.authState).toBe("authenticated"); + }); + + it("builds an isolated headless invocation and sends the prompt on stdin", () => { + const spec = sampleSpec(); + const invocation = testAdapter().buildInvocation(spec, invocationContext()); + + expect(invocation.args).toEqual([...ISOLATION_ARGS, "--tools", "Read,Edit,Write,Bash,Grep,Glob"]); + expect(invocation.stdin).toBe(renderProducerPrompt(spec)); + expect(invocation.requiredEnv).toEqual(["USER", "CLAUDE_CONFIG_DIR", "ANTHROPIC_API_KEY"]); + expect(invocation.network).toBe("allowed"); + expect(invocation.env).toBeUndefined(); + }); + + it("never exposes Agent, MCP, or web tools to the Producer", () => { + const invocation = testAdapter().buildInvocation(sampleSpec(), invocationContext()); + const tools = invocation.args[invocation.args.indexOf("--tools") + 1] ?? ""; + + expect(tools.split(",")).not.toContain("Agent"); + expect(tools.split(",")).not.toContain("WebFetch"); + expect(invocation.args).toContain("--strict-mcp-config"); + expect(invocation.args).not.toContain("--mcp-config"); + expect(invocation.args).not.toContain("--continue"); + expect(invocation.args).not.toContain("--resume"); + }); + + it("restricts read-only roles to non-mutating built-in tools", () => { + const invocation = testAdapter().buildInvocation(sampleSpec(), { + ...invocationContext(), + readOnly: true, + }); + + expect(invocation.args).toEqual([...ISOLATION_ARGS, "--tools", "Read,Grep,Glob"]); + expect(invocation.stdin).toBe(renderProducerPrompt(sampleSpec(), true)); + }); + + it("omits the delegated skill bootstrap from read-only prompts", () => { + const invocation = testAdapter().buildInvocation(sampleSpec(), { + ...invocationContext(), + readOnly: true, + }); + + expect(invocation.stdin).not.toContain(renderSkillBootstrap()); + }); + + it("includes the delegated skill bootstrap in edit prompts", () => { + const invocation = testAdapter().buildInvocation(sampleSpec(), invocationContext()); + + expect(invocation.stdin).toContain(renderSkillBootstrap()); + }); + + it("appends a model override so the lane can run Opus or Sonnet", () => { + const spec = { ...sampleSpec(), producerOverrides: { model: "opus" } }; + const invocation = testAdapter().buildInvocation(spec, invocationContext()); + + expect(invocation.args.slice(-2)).toEqual(["--model", "opus"]); + expect(invocation.args).not.toContain("--effort"); + }); + + it("appends model then effort overrides to the invocation argv", () => { + const spec = { + ...sampleSpec(), + producerOverrides: { model: "sonnet", reasoningEffort: "high" }, + }; + const invocation = testAdapter().buildInvocation(spec, invocationContext()); + + expect(invocation.args.slice(-4)).toEqual(["--model", "sonnet", "--effort", "high"]); + }); + + it("rejects an effort level the CLI does not accept before spawning", () => { + const spec = { ...sampleSpec(), producerOverrides: { reasoningEffort: "ultra" } }; + + expect(() => testAdapter().buildInvocation(spec, invocationContext())) + .toThrow(/effort override "ultra" is unsupported/u); + }); + + it("declares ~/.claude and ~/.claude.json as inherited writable state, following HOME", () => { + const invocation = testAdapter({ env: { HOME: "/Users/real" } }) + .buildInvocation(sampleSpec(), invocationContext()); + + expect(invocation.inheritedStateWritablePaths).toEqual([ + "/Users/real/.claude", + "/Users/real/.claude.json", + ]); + }); + + it("declares the relocated CLAUDE_CONFIG_DIR instead of ~/.claude when set", () => { + const invocation = testAdapter({ env: { CLAUDE_CONFIG_DIR: "/Users/test/relocated" } }) + .buildInvocation(sampleSpec(), invocationContext()); + + expect(invocation.inheritedStateWritablePaths).toEqual([ + "/Users/test/relocated", + "/Users/test/relocated/.claude.json", + ]); + }); + + it("wraps a Claude edit invocation with provider network and write confinement", () => { + const invocation = testAdapter().buildInvocation(sampleSpec(), invocationContext()); + const wrapped = wrapInvocationWithSeatbelt(invocation, { + worktreePath: "/tmp/attempt-worktree", + tempHome: null, + allowNetwork: true, + }); + const profile = wrapped.args[1] ?? ""; + + expect(wrapped.executable.command).toBe("/usr/bin/sandbox-exec"); + expect(profile).toContain('(allow file-write* (subpath "/tmp/attempt-worktree"))'); + expect(profile).toContain('(subpath "/Users/test/.claude")'); + expect(profile).toContain('(subpath "/Users/test/.claude.json")'); + expect(profile).not.toContain('(subpath "/Users/test")'); + expect(profile).not.toContain("(deny network*)"); + expect(wrapped.args.slice(2)).toEqual([executable.command, ...invocation.args]); + }); + + it("declares the Claude Code configuration isolation profile", () => { + const profile = testAdapter().configurationProfile(); + + expect(profile.isolationState).toBe("inherited-config-only"); + expect(profile.environmentDependencies).toEqual(["USER", "CLAUDE_CONFIG_DIR", "ANTHROPIC_API_KEY"]); + expect(profile.repositoryInstructionSources).toEqual([]); + expect(profile.temporaryHomeStrategy).toMatch(/real HOME inherited/u); + }); + + it("normalizes a successful result envelope", () => { + const stdout = envelope({ result: "Updated the greeting." }); + const normalized = testAdapter().normalizeEvents({ stdout, stderr: "", exit: exit({ stdout }) }); + + expect(normalized.ok).toBe(true); + expect(normalized.producerSummary).toBe("Updated the greeting."); + expect(normalized.events).toEqual([ + { kind: "final", text: "Updated the greeting.", raw: JSON.parse(stdout) }, + ]); + }); + + it("tolerates a warning line printed before the envelope", () => { + const stdout = `Warning: Advisor disabled\n${envelope()}`; + const normalized = testAdapter().normalizeEvents({ stdout, stderr: "", exit: exit({ stdout }) }); + + expect(normalized.ok).toBe(true); + expect(normalized.producerSummary).toBe("done"); + }); + + it("reports failure for an is_error envelope even on exit code 0 and surfaces its text", () => { + // Observed live: `claude -p` exits 0 for some API-level failures and + // reports them only inside the envelope. + const stdout = envelope({ is_error: true, result: "Not logged in · Please run /login" }); + const normalized = testAdapter().normalizeEvents({ stdout, stderr: "", exit: exit({ stdout }) }); + + expect(normalized.ok).toBe(false); + expect(normalized.producerSummary).toBeNull(); + expect(normalized.events).toEqual([ + { kind: "error", text: "Not logged in · Please run /login", raw: JSON.parse(stdout) }, + ]); + }); + + it("reports failure for a non-success subtype", () => { + const stdout = envelope({ subtype: "error_max_turns" }); + const normalized = testAdapter().normalizeEvents({ stdout, stderr: "", exit: exit({ stdout }) }); + + expect(normalized.ok).toBe(false); + }); + + it("reports failure for a non-zero exit even when the envelope claims success", () => { + const stdout = envelope(); + const normalized = testAdapter().normalizeEvents({ + stdout, + stderr: "", + exit: exit({ stdout, exitCode: 1 }), + }); + + expect(normalized.ok).toBe(false); + expect(normalized.producerSummary).toBeNull(); + }); + + it("reports failure from stderr when no envelope is present", () => { + const normalized = testAdapter().normalizeEvents({ + stdout: "", + stderr: "error: unknown option", + exit: exit({ exitCode: 1 }), + }); + + expect(normalized).toEqual({ + events: [{ kind: "error", text: "error: unknown option" }], + producerSummary: null, + ok: false, + }); + }); + + it("reports failure when stdout is truncated", () => { + const normalized = testAdapter().normalizeEvents({ + stdout: "{\"type\":\"result\"", + stderr: "", + exit: exit({ truncated: { stdout: true, stderr: false } }), + }); + + expect(normalized).toEqual({ events: [], producerSummary: null, ok: false }); + }); + + it("ignores JSON that is not a result envelope", () => { + const stdout = JSON.stringify({ type: "assistant", message: {} }); + const normalized = testAdapter().normalizeEvents({ stdout, stderr: "", exit: exit({ stdout }) }); + + expect(normalized.ok).toBe(false); + }); + + it("reports failure when a success envelope carries no result string", () => { + const stdout = envelope({ result: undefined }); + const normalized = testAdapter().normalizeEvents({ stdout, stderr: "", exit: exit({ stdout }) }); + + expect(normalized.ok).toBe(false); + expect(normalized.producerSummary).toBeNull(); + }); +}); + +describe("ClaudeAdapter macOS smoke", () => { + const enabled = process.platform === "darwin" + && process.arch === "arm64" + && process.env.CLAUDE_ARCHITECT_CLAUDE_SMOKE === "1"; + + it.runIf(enabled)( + "runs a real confined headless Claude Code attempt in an isolated worktree", + async () => { + const root = await mkdtemp(join(tmpdir(), "claude-smoke-")); + const worktreePath = join(root, "worktree"); + const smokePath = join(worktreePath, "smoke.txt"); + let builtEnvironment: ReturnType | undefined; + + try { + await mkdir(worktreePath); + await execFileAsync("git", ["init", "-q"], { cwd: worktreePath }); + const ps = new PosixPlatformServices(); + const adapter = new ClaudeAdapter(); + const report = await adapter.probe({ + ps, + os: "darwin", + arch: process.arch, + environmentType: "native", + }); + if (!report.available) { + expect(typeof report.reason).toBe("string"); + expect(report.reason).not.toBe(""); + return; + } + expect(report.resolvedExecutable).not.toBeNull(); + expect(typeof report.version).toBe("string"); + if (report.resolvedExecutable === null) return; + console.info(`claude smoke probe version: ${report.version}`); + + const spec = sampleSpec(); + spec.objective = "Create a file named smoke.txt containing ok."; + spec.context = "This is an opt-in macOS arm64 adapter smoke test."; + spec.writeAllowlist = ["smoke.txt"]; + spec.forbiddenScope = []; + spec.successCriteria = ["smoke.txt exists and contains ok."]; + spec.timeoutMs = 300_000; + spec.producerOverrides = { model: "haiku" }; + const invocation = wrapInvocationWithSeatbelt(adapter.buildInvocation(spec, { + worktreePath, + runId: "run-claude-smoke", + capabilityReport: report, + executable: report.resolvedExecutable, + }), { + worktreePath, + tempHome: null, + allowNetwork: true, + }); + builtEnvironment = buildEnvironment({ + os: "darwin", + adapterAllowlist: invocation.requiredEnv, + ...(invocation.env === undefined ? {} : { adapterValues: invocation.env }), + }); + const supervisedExit = await supervise(ps, { + executable: invocation.executable, + args: invocation.args, + cwd: worktreePath, + env: builtEnvironment.env, + timeoutMs: 300_000, + ...(invocation.stdin === undefined ? {} : { stdin: invocation.stdin }), + maxOutputBytes: 1_000_000, + }, {}); + const normalized = adapter.normalizeEvents({ + stdout: supervisedExit.stdout, + stderr: supervisedExit.stderr, + exit: supervisedExit, + }); + + expect( + normalized.ok, + `stdout:\n${supervisedExit.stdout}\nstderr:\n${supervisedExit.stderr}`, + ).toBe(true); + expect((await readFile(smokePath, "utf8")).trim()).toBe("ok"); + } finally { + builtEnvironment?.secretRegistration.dispose(); + await rm(root, { recursive: true, force: true }); + } + }, + 330_000, + ); +}); diff --git a/tests/runtime/plugin-wiring.test.mjs b/tests/runtime/plugin-wiring.test.mjs index 4e629f8..18e0630 100644 --- a/tests/runtime/plugin-wiring.test.mjs +++ b/tests/runtime/plugin-wiring.test.mjs @@ -138,7 +138,7 @@ describe("P0-A plugin wiring", () => { /hash you computed/u, "review correlation must retain the runtime digest rather than reintroducing caller hashing", ); - for (const rosterName of ["codex-implementer", "opencode-implementer", "pi-implementer", "pythinker-implementer"]) { + for (const rosterName of ["codex-implementer", "opencode-implementer", "pi-implementer", "pythinker-implementer", "agy-implementer", "claude-implementer"]) { assert.ok(skill.includes(`\`${rosterName}\``), `delegate skill must retain ${rosterName} in its selection roster`); } const trustedLifecycleHeading = skill.indexOf("## Trusted MCP lifecycle"); diff --git a/tests/runtime/tools.test.ts b/tests/runtime/tools.test.ts index 2ed81d7..73661d2 100644 --- a/tests/runtime/tools.test.ts +++ b/tests/runtime/tools.test.ts @@ -661,7 +661,7 @@ describe("MCP tool handlers", () => { const output = await handleDelegate( "/repo", - { ...validSpec, producerPreferences: ["codex", "opencode", "pi", "pythinker", "agy"] }, + { ...validSpec, producerPreferences: ["codex", "opencode", "pi", "pythinker", "agy", "claude"] }, deps, ); From de4784c6d10fb94914ff970136c3f7e5c4ef1fa7 Mon Sep 17 00:00:00 2001 From: elkaix Date: Thu, 27 Aug 2026 21:25:13 -0400 Subject: [PATCH 3/3] docs(delegate): name the architect-side roles a Claude subagent may take MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The delegate skill now states that the architect session — whatever model it runs, Fable included — may dispatch Opus or Sonnet subagents through the host Agent tool for non-writing roles: scout, spec drafter, candidate reviewer, and advisor. A new read-only candidate-reviewer agent (opus; Read/Grep/Glob + reviewCandidate) reviews one frozen candidate without Producer context and returns two verdicts plus a recommendation; it never decides or integrates. An Opus/Sonnet implementer is the claude-implementer lane, never a bare subagent: the skill says so explicitly so the roster and the subagent roles cannot be confused. --- CHANGELOG.md | 5 +++++ README.md | 1 + agents/candidate-reviewer.md | 17 +++++++++++++++++ skills/delegate/SKILL.md | 11 +++++++++++ skills/subagent-driven-delegation/SKILL.md | 2 +- 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 agents/candidate-reviewer.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b460cd5..d57f609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,11 @@ All notable changes to Claude Architect are recorded here. The format follows this plugin's own MCP tools, and cannot nest subagents. darwin/arm64 only, confined by the same host Seatbelt backend as the Pi, OpenCode, Pythinker, and agy lanes. +- The delegate skill now names the architect-side roles a Claude subagent + (Opus or Sonnet) may take — scouting, spec drafting, and independent candidate + review through the new read-only `candidate-reviewer` agent — and the one it + never takes: editing the checkout. + ### Changed - Producers declare their own host state directories through diff --git a/README.md b/README.md index 9180c71..6786269 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ What this does not relax: independent verification still decides what may be acc | Skill | `/claude-architect:codex` | Runs Codex CLI directly against the current checkout without the verified delegation lifecycle. | | Skill | `/claude-architect:subagent-driven-delegation` | Executes a multi-task plan with the Superpowers subagent-driven-development loop, using a verified Producer as the implementer for every task. | | Agent | `advisor` | Current strictly read-only commitment-boundary advisor. | +| Agent | `candidate-reviewer` | Read-only Opus reviewer for one frozen candidate: reads the exact bytes through `reviewCandidate`, returns two verdicts and a recommendation, never decides or integrates. | | MCP | `validateDelegationSpec` | Validates a spec without starting a Producer and returns its canonical correlation digest. | | MCP | `delegate` | Runs one validated, isolated, independently verified attempt. | | MCP | `delegatePipeline` | Runs the fresh-context implement/review/repair pipeline. | diff --git a/agents/candidate-reviewer.md b/agents/candidate-reviewer.md new file mode 100644 index 0000000..ffdd280 --- /dev/null +++ b/agents/candidate-reviewer.md @@ -0,0 +1,17 @@ +--- +name: candidate-reviewer +description: Independent read-only reviewer for ONE frozen Candidate Artifact. Input is a checkoutPath, runId, protocolVersion, and the review brief (spec, success criteria, findings to re-check); output is a structured verdict. Reads the exact anchored bytes through reviewCandidate and never edits, decides, or integrates. +tools: Read, Grep, Glob, mcp__plugin_claude-architect_runtime__reviewCandidate +model: opus +--- + +You review exactly one frozen candidate. You share no context with the Producer that made it: your only inputs are the fields in your prompt and the runtime's own evidence. Ignore repository lore, CLAUDE.md content, and git status injected into your context. + +Your prompt provides: `checkoutPath`, `runId`, `protocolVersion`, the Delegation Spec's objective, success criteria, and `review.focus`, and — on a re-review — the numbered findings list from the previous round. + +1. Call `reviewCandidate` with `checkoutPath`, `runId`, and `protocolVersion` exactly as given. Read the unredacted patch, the changed-path manifest, and the verification evidence it returns. That is the entire candidate; the Producer's summary is a correlation aid, never evidence. +2. Use `Read`/`Grep`/`Glob` only to understand code the patch touches or depends on. Never modify anything. +3. Give two verdicts, each with the evidence that decides it: **spec compliance** (every success criterion met, scope honored, nothing outside the allowlist) and **quality** (Critical / Important / Minor findings with file and line). On a re-review, mark each prior finding ADDRESSED or NOT ADDRESSED, then list new breakage in this candidate only. +4. End with a single line: `RECOMMEND accept` or `RECOMMEND revision-requested`. It is a recommendation: only the architect calls `decideCandidate`, and only the configured decision authority records the decision. + +Never call `decideCandidate` or `integrateCandidate`, never re-run the Producer, never propose patching the candidate yourself. diff --git a/skills/delegate/SKILL.md b/skills/delegate/SKILL.md index 92dd5e9..b2e3c05 100644 --- a/skills/delegate/SKILL.md +++ b/skills/delegate/SKILL.md @@ -57,6 +57,17 @@ There is no implicit lane default. If the answer names a supported model or reas P0-A certifies the MCP implementation path only for Codex on macOS arm64 when its capability report names `codex-native-sandbox` and marks the edit Lane eligible. +### Architect-side Claude subagents + +The architect session — whatever model it runs, including Fable — may dispatch Claude subagents through the host's `Agent` tool with a `model` of `opus` or `sonnet` for **non-writing** roles, and it may do so in parallel with a running lane: + +- **Scout** (`sonnet`, or `Explore`): read-only reconnaissance before a spec is frozen — call sites, nearby patterns, which files an allowlist must cover. +- **Spec drafter** (`sonnet`): turn an agreed design into candidate `successCriteria` and verification commands for the architect to review; the architect still owns and freezes the spec. +- **Candidate reviewer** (`candidate-reviewer`, `opus`): an independent review of the frozen bytes through `reviewCandidate`, with no Producer context. Use it for the per-task review and for the whole-branch final review, then let the architect weigh the verdict and call `decideCandidate`. +- **Advisor** (`claude-advisor`, `fable`): commitment-boundary second opinion. + +A Claude subagent is never an implementer. It edits nothing in the checkout, calls neither `decideCandidate` nor `integrateCandidate`, and never dispatches a lane on its own; only the `delegation-lane` courier calls `delegate`/`delegatePipeline`. When the work is implementation and the model you want is Opus or Sonnet, that is the `claude-implementer` lane above: the same model, but run as an untrusted Producer inside an isolated worktree, frozen, and independently verified. + ## Build the Delegation Spec Construct a candidate spec with every required field: diff --git a/skills/subagent-driven-delegation/SKILL.md b/skills/subagent-driven-delegation/SKILL.md index 78b35cc..266354f 100644 --- a/skills/subagent-driven-delegation/SKILL.md +++ b/skills/subagent-driven-delegation/SKILL.md @@ -118,7 +118,7 @@ Then append `Task : complete (run , manifest , review clean)` ## Final review -After the last task, review the **whole candidate branch and the cumulative attempts**, not just the final diff — a defect introduced in Task 2 and papered over in Task 6 is only visible across the range. Dispatch the final review on the most capable available model, point it at the ledger's deferred-minor and parked lines, and give it the branch range from the merge base. +After the last task, review the **whole candidate branch and the cumulative attempts**, not just the final diff — a defect introduced in Task 2 and papered over in Task 6 is only visible across the range. Dispatch the final review on the most capable available model — the `candidate-reviewer` agent on `opus`, or `claude-advisor` on `fable` — point it at the ledger's deferred-minor and parked lines, and give it the branch range from the merge base. If it returns findings, handle them as one fix wave — a single revised delegation carrying the complete findings list, not one delegation per finding — then exactly one scoped re-review. Residual findings are adjudicated as at the breaker.