aws-runtime-bridge 1.9.134 → 1.9.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/AcodeSdkAdapter.d.ts +8 -0
- package/dist/adapter/AcodeSdkAdapter.js +5 -5
- package/dist/config.d.ts +4 -0
- package/dist/config.js +2 -2
- package/dist/index.js +1 -1
- package/dist/routes/ai-sources.js +1 -1
- package/dist/routes/capabilities.d.ts +2 -0
- package/dist/routes/capabilities.js +2 -0
- package/dist/routes/instance.d.ts +0 -1
- package/dist/routes/instance.js +1 -1
- package/dist/routes/mcp-extra.d.ts +2 -0
- package/dist/routes/mcp-extra.js +3 -0
- package/dist/routes/mcp.d.ts +1 -0
- package/dist/routes/mcp.js +1 -1
- package/dist/routes/plugins.d.ts +2 -0
- package/dist/routes/plugins.js +2 -0
- package/dist/routes/skills.d.ts +1 -0
- package/dist/routes/skills.js +1 -1
- package/dist/routes/terminal.js +25 -25
- package/dist/services/agent-capability-sync.d.ts +7 -0
- package/dist/services/agent-capability-sync.js +2 -0
- package/{package/cc-switch-sdk/dist → dist}/services/ai-config-service.d.ts +3 -0
- package/dist/services/ai-config-service.js +4 -0
- package/dist/services/ai-source-apply.d.ts +1 -1
- package/dist/services/ai-source-apply.js +1 -1
- package/dist/services/capability-config.d.ts +21 -0
- package/dist/services/capability-config.js +3 -0
- package/dist/services/instance-ai-config-service.d.ts +1 -0
- package/dist/services/instance-ai-config-service.js +1 -1
- package/dist/services/instance-features.d.ts +21 -0
- package/dist/services/instance-features.js +1 -1
- package/dist/services/instance-init-service.d.ts +7 -4
- package/dist/services/instance-init-service.js +1 -1
- package/dist/services/instance-state.js +1 -1
- package/dist/services/legacy-path-migration.d.ts +2 -0
- package/dist/services/legacy-path-migration.js +1 -1
- package/dist/services/mcp-deploy.d.ts +49 -0
- package/dist/services/mcp-deploy.js +4 -0
- package/dist/services/plugin-event-buffer.d.ts +49 -0
- package/dist/services/plugin-event-buffer.js +2 -0
- package/dist/services/plugin-manager.d.ts +240 -0
- package/dist/services/plugin-manager.js +10 -0
- package/dist/services/plugin-package.d.ts +8 -0
- package/dist/services/plugin-package.js +2 -0
- package/dist/services/skill-manager.d.ts +41 -0
- package/dist/services/skill-manager.js +3 -0
- package/dist/types.d.ts +11 -61
- package/dist/utils/file-utils.d.ts +9 -6
- package/dist/utils/file-utils.js +2 -2
- package/dist/utils/mcp-utils.d.ts +1 -37
- package/dist/utils/mcp-utils.js +1 -1
- package/package/acode/dist/built-in-file-tools.js +2 -2
- package/package/acode/dist/commands/commandRegistry.d.ts +2 -0
- package/package/acode/dist/commands/commandRegistry.js +1 -1
- package/package/acode/dist/index.d.ts +2 -0
- package/package/acode/dist/index.js +1 -1
- package/package/acode/dist/plugin-tools.d.ts +14 -0
- package/package/acode/dist/plugin-tools.js +14 -0
- package/package/acode/dist/plugin-types.d.ts +109 -0
- package/package/acode/dist/runtime.d.ts +2 -0
- package/package/acode/dist/runtime.js +14 -14
- package/package/acode/dist/sub-agent-manager.js +1 -1
- package/package/acode/dist/types.d.ts +3 -0
- package/package/aws-client-agent-mcp/dist/agent-client.d.ts +9 -1
- package/package/aws-client-agent-mcp/dist/agent-client.js +1 -1
- package/package/aws-client-agent-mcp/dist/mcp-server.d.ts +11 -0
- package/package/aws-client-agent-mcp/dist/mcp-server.js +21 -21
- package/package/aws-client-agent-mcp/dist/mcp-tools.js +2 -4
- package/package/aws-client-agent-mcp/dist/memory-tools.js +8 -10
- package/package/aws-client-agent-mcp/dist/types.d.ts +21 -0
- package/package.json +4 -10
- package/dist/adapters/cc-switch/common.d.ts +0 -41
- package/dist/adapters/cc-switch/common.js +0 -2
- package/dist/adapters/cc-switch/index.d.ts +0 -19
- package/dist/adapters/cc-switch/index.js +0 -2
- package/dist/adapters/cc-switch/mcp-acode.d.ts +0 -10
- package/dist/adapters/cc-switch/mcp-acode.js +0 -2
- package/dist/adapters/cc-switch/mcp-claude.d.ts +0 -10
- package/dist/adapters/cc-switch/mcp-claude.js +0 -2
- package/dist/adapters/cc-switch/mcp-claudecode.d.ts +0 -10
- package/dist/adapters/cc-switch/mcp-claudecode.js +0 -2
- package/dist/adapters/cc-switch/mcp-codex.d.ts +0 -10
- package/dist/adapters/cc-switch/mcp-codex.js +0 -11
- package/dist/adapters/cc-switch/mcp-opencode.d.ts +0 -14
- package/dist/adapters/cc-switch/mcp-opencode.js +0 -2
- package/dist/adapters/cc-switch/mcp-placeholder.d.ts +0 -9
- package/dist/adapters/cc-switch/mcp-placeholder.js +0 -2
- package/dist/adapters/cc-switch/skill-acode.d.ts +0 -5
- package/dist/adapters/cc-switch/skill-acode.js +0 -2
- package/dist/adapters/cc-switch/skill-claude.d.ts +0 -5
- package/dist/adapters/cc-switch/skill-claude.js +0 -2
- package/dist/adapters/cc-switch/skill-claudecode.d.ts +0 -5
- package/dist/adapters/cc-switch/skill-claudecode.js +0 -2
- package/dist/adapters/cc-switch/skill-codex.d.ts +0 -4
- package/dist/adapters/cc-switch/skill-codex.js +0 -2
- package/dist/adapters/cc-switch/skill-directory.d.ts +0 -9
- package/dist/adapters/cc-switch/skill-directory.js +0 -3
- package/dist/adapters/cc-switch/skill-opencode.d.ts +0 -5
- package/dist/adapters/cc-switch/skill-opencode.js +0 -2
- package/dist/adapters/cc-switch/skill-placeholder.d.ts +0 -9
- package/dist/adapters/cc-switch/skill-placeholder.js +0 -2
- package/dist/services/cc-switch-sdk.d.ts +0 -17
- package/dist/services/cc-switch-sdk.js +0 -2
- package/dist/services/instance-service.d.ts +0 -78
- package/dist/services/instance-service.js +0 -2
- package/node_modules/@cc-switch/sdk/README.md +0 -541
- package/node_modules/@cc-switch/sdk/dist/constants.d.ts +0 -8
- package/node_modules/@cc-switch/sdk/dist/constants.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/errors.d.ts +0 -5
- package/node_modules/@cc-switch/sdk/dist/errors.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/index.d.ts +0 -5
- package/node_modules/@cc-switch/sdk/dist/index.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/schemas.d.ts +0 -7
- package/node_modules/@cc-switch/sdk/dist/schemas.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/sdk.d.ts +0 -59
- package/node_modules/@cc-switch/sdk/dist/sdk.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/services/ai-config-service.d.ts +0 -81
- package/node_modules/@cc-switch/sdk/dist/services/ai-config-service.js +0 -4
- package/node_modules/@cc-switch/sdk/dist/services/mcp-model.d.ts +0 -16
- package/node_modules/@cc-switch/sdk/dist/services/mcp-model.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/services/mcp-service.d.ts +0 -17
- package/node_modules/@cc-switch/sdk/dist/services/mcp-service.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/services/skill-model.d.ts +0 -16
- package/node_modules/@cc-switch/sdk/dist/services/skill-model.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/services/skill-service.d.ts +0 -16
- package/node_modules/@cc-switch/sdk/dist/services/skill-service.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/state.d.ts +0 -3
- package/node_modules/@cc-switch/sdk/dist/state.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/types.d.ts +0 -78
- package/node_modules/@cc-switch/sdk/dist/utils/fs.d.ts +0 -10
- package/node_modules/@cc-switch/sdk/dist/utils/fs.js +0 -3
- package/node_modules/@cc-switch/sdk/dist/utils/id.d.ts +0 -3
- package/node_modules/@cc-switch/sdk/dist/utils/id.js +0 -2
- package/node_modules/@cc-switch/sdk/package.json +0 -31
- package/node_modules/zod/LICENSE +0 -21
- package/node_modules/zod/README.md +0 -208
- package/node_modules/zod/index.cjs +0 -33
- package/node_modules/zod/index.d.cts +0 -4
- package/node_modules/zod/index.d.ts +0 -4
- package/node_modules/zod/index.js +0 -4
- package/node_modules/zod/locales/index.cjs +0 -17
- package/node_modules/zod/locales/index.d.cts +0 -1
- package/node_modules/zod/locales/index.d.ts +0 -1
- package/node_modules/zod/locales/index.js +0 -1
- package/node_modules/zod/locales/package.json +0 -6
- package/node_modules/zod/mini/index.cjs +0 -17
- package/node_modules/zod/mini/index.d.cts +0 -1
- package/node_modules/zod/mini/index.d.ts +0 -1
- package/node_modules/zod/mini/index.js +0 -1
- package/node_modules/zod/mini/package.json +0 -6
- package/node_modules/zod/package.json +0 -135
- package/node_modules/zod/src/index.ts +0 -4
- package/node_modules/zod/src/locales/index.ts +0 -1
- package/node_modules/zod/src/mini/index.ts +0 -1
- package/node_modules/zod/src/v3/ZodError.ts +0 -330
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
- package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
- package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
- package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
- package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
- package/node_modules/zod/src/v3/errors.ts +0 -13
- package/node_modules/zod/src/v3/external.ts +0 -6
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
- package/node_modules/zod/src/v3/helpers/util.ts +0 -224
- package/node_modules/zod/src/v3/index.ts +0 -4
- package/node_modules/zod/src/v3/locales/en.ts +0 -124
- package/node_modules/zod/src/v3/standard-schema.ts +0 -113
- package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
- package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
- package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
- package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
- package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
- package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
- package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
- package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
- package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
- package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/function.test.ts +0 -257
- package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
- package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
- package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
- package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
- package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
- package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
- package/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
- package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
- package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
- package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
- package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
- package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
- package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
- package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
- package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
- package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
- package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
- package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
- package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
- package/node_modules/zod/src/v3/types.ts +0 -5138
- package/node_modules/zod/src/v4/classic/checks.ts +0 -31
- package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
- package/node_modules/zod/src/v4/classic/compat.ts +0 -70
- package/node_modules/zod/src/v4/classic/errors.ts +0 -82
- package/node_modules/zod/src/v4/classic/external.ts +0 -50
- package/node_modules/zod/src/v4/classic/index.ts +0 -5
- package/node_modules/zod/src/v4/classic/iso.ts +0 -90
- package/node_modules/zod/src/v4/classic/parse.ts +0 -82
- package/node_modules/zod/src/v4/classic/schemas.ts +0 -2197
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -276
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -573
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -562
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -302
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -365
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -661
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -595
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -308
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -844
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -117
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -270
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -609
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -136
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -340
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -282
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -356
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -582
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -605
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -181
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1080
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -106
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -763
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2622
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -361
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -181
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
- package/node_modules/zod/src/v4/core/api.ts +0 -1621
- package/node_modules/zod/src/v4/core/checks.ts +0 -1287
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/zod/src/v4/core/core.ts +0 -115
- package/node_modules/zod/src/v4/core/doc.ts +0 -44
- package/node_modules/zod/src/v4/core/errors.ts +0 -413
- package/node_modules/zod/src/v4/core/index.ts +0 -14
- package/node_modules/zod/src/v4/core/json-schema.ts +0 -147
- package/node_modules/zod/src/v4/core/parse.ts +0 -195
- package/node_modules/zod/src/v4/core/regexes.ts +0 -177
- package/node_modules/zod/src/v4/core/registries.ts +0 -97
- package/node_modules/zod/src/v4/core/schemas.ts +0 -4317
- package/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -18
- package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -181
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
- package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -1044
- package/node_modules/zod/src/v4/core/util.ts +0 -910
- package/node_modules/zod/src/v4/core/versions.ts +0 -5
- package/node_modules/zod/src/v4/core/zsf.ts +0 -323
- package/node_modules/zod/src/v4/index.ts +0 -4
- package/node_modules/zod/src/v4/locales/ar.ts +0 -125
- package/node_modules/zod/src/v4/locales/az.ts +0 -121
- package/node_modules/zod/src/v4/locales/be.ts +0 -184
- package/node_modules/zod/src/v4/locales/bg.ts +0 -136
- package/node_modules/zod/src/v4/locales/ca.ts +0 -127
- package/node_modules/zod/src/v4/locales/cs.ts +0 -142
- package/node_modules/zod/src/v4/locales/da.ts +0 -141
- package/node_modules/zod/src/v4/locales/de.ts +0 -124
- package/node_modules/zod/src/v4/locales/en.ts +0 -127
- package/node_modules/zod/src/v4/locales/eo.ts +0 -125
- package/node_modules/zod/src/v4/locales/es.ts +0 -159
- package/node_modules/zod/src/v4/locales/fa.ts +0 -134
- package/node_modules/zod/src/v4/locales/fi.ts +0 -131
- package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
- package/node_modules/zod/src/v4/locales/fr.ts +0 -124
- package/node_modules/zod/src/v4/locales/he.ts +0 -125
- package/node_modules/zod/src/v4/locales/hu.ts +0 -126
- package/node_modules/zod/src/v4/locales/id.ts +0 -125
- package/node_modules/zod/src/v4/locales/index.ts +0 -47
- package/node_modules/zod/src/v4/locales/is.ts +0 -127
- package/node_modules/zod/src/v4/locales/it.ts +0 -125
- package/node_modules/zod/src/v4/locales/ja.ts +0 -122
- package/node_modules/zod/src/v4/locales/ka.ts +0 -138
- package/node_modules/zod/src/v4/locales/kh.ts +0 -7
- package/node_modules/zod/src/v4/locales/km.ts +0 -126
- package/node_modules/zod/src/v4/locales/ko.ts +0 -131
- package/node_modules/zod/src/v4/locales/lt.ts +0 -265
- package/node_modules/zod/src/v4/locales/mk.ts +0 -127
- package/node_modules/zod/src/v4/locales/ms.ts +0 -124
- package/node_modules/zod/src/v4/locales/nl.ts +0 -126
- package/node_modules/zod/src/v4/locales/no.ts +0 -124
- package/node_modules/zod/src/v4/locales/ota.ts +0 -125
- package/node_modules/zod/src/v4/locales/pl.ts +0 -126
- package/node_modules/zod/src/v4/locales/ps.ts +0 -133
- package/node_modules/zod/src/v4/locales/pt.ts +0 -123
- package/node_modules/zod/src/v4/locales/ru.ts +0 -184
- package/node_modules/zod/src/v4/locales/sl.ts +0 -126
- package/node_modules/zod/src/v4/locales/sv.ts +0 -127
- package/node_modules/zod/src/v4/locales/ta.ts +0 -125
- package/node_modules/zod/src/v4/locales/th.ts +0 -126
- package/node_modules/zod/src/v4/locales/tr.ts +0 -121
- package/node_modules/zod/src/v4/locales/ua.ts +0 -7
- package/node_modules/zod/src/v4/locales/uk.ts +0 -126
- package/node_modules/zod/src/v4/locales/ur.ts +0 -126
- package/node_modules/zod/src/v4/locales/vi.ts +0 -125
- package/node_modules/zod/src/v4/locales/yo.ts +0 -131
- package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
- package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
- package/node_modules/zod/src/v4/mini/checks.ts +0 -32
- package/node_modules/zod/src/v4/mini/coerce.ts +0 -22
- package/node_modules/zod/src/v4/mini/external.ts +0 -40
- package/node_modules/zod/src/v4/mini/index.ts +0 -3
- package/node_modules/zod/src/v4/mini/iso.ts +0 -62
- package/node_modules/zod/src/v4/mini/parse.ts +0 -14
- package/node_modules/zod/src/v4/mini/schemas.ts +0 -1725
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -529
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -899
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -200
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -315
- package/node_modules/zod/src/v4-mini/index.ts +0 -1
- package/node_modules/zod/v3/ZodError.cjs +0 -138
- package/node_modules/zod/v3/ZodError.d.cts +0 -164
- package/node_modules/zod/v3/ZodError.d.ts +0 -164
- package/node_modules/zod/v3/ZodError.js +0 -133
- package/node_modules/zod/v3/errors.cjs +0 -17
- package/node_modules/zod/v3/errors.d.cts +0 -5
- package/node_modules/zod/v3/errors.d.ts +0 -5
- package/node_modules/zod/v3/errors.js +0 -9
- package/node_modules/zod/v3/external.cjs +0 -22
- package/node_modules/zod/v3/external.d.cts +0 -6
- package/node_modules/zod/v3/external.d.ts +0 -6
- package/node_modules/zod/v3/external.js +0 -6
- package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
- package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
- package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
- package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
- package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/node_modules/zod/v3/helpers/util.cjs +0 -137
- package/node_modules/zod/v3/helpers/util.d.cts +0 -85
- package/node_modules/zod/v3/helpers/util.d.ts +0 -85
- package/node_modules/zod/v3/helpers/util.js +0 -133
- package/node_modules/zod/v3/index.cjs +0 -33
- package/node_modules/zod/v3/index.d.cts +0 -4
- package/node_modules/zod/v3/index.d.ts +0 -4
- package/node_modules/zod/v3/index.js +0 -4
- package/node_modules/zod/v3/locales/en.cjs +0 -112
- package/node_modules/zod/v3/locales/en.d.cts +0 -3
- package/node_modules/zod/v3/locales/en.d.ts +0 -3
- package/node_modules/zod/v3/locales/en.js +0 -109
- package/node_modules/zod/v3/package.json +0 -6
- package/node_modules/zod/v3/standard-schema.cjs +0 -2
- package/node_modules/zod/v3/standard-schema.d.cts +0 -102
- package/node_modules/zod/v3/standard-schema.d.ts +0 -102
- package/node_modules/zod/v3/standard-schema.js +0 -1
- package/node_modules/zod/v3/types.cjs +0 -3777
- package/node_modules/zod/v3/types.d.cts +0 -1034
- package/node_modules/zod/v3/types.d.ts +0 -1034
- package/node_modules/zod/v3/types.js +0 -3695
- package/node_modules/zod/v4/classic/checks.cjs +0 -32
- package/node_modules/zod/v4/classic/checks.d.cts +0 -1
- package/node_modules/zod/v4/classic/checks.d.ts +0 -1
- package/node_modules/zod/v4/classic/checks.js +0 -1
- package/node_modules/zod/v4/classic/coerce.cjs +0 -47
- package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
- package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
- package/node_modules/zod/v4/classic/coerce.js +0 -17
- package/node_modules/zod/v4/classic/compat.cjs +0 -61
- package/node_modules/zod/v4/classic/compat.d.cts +0 -50
- package/node_modules/zod/v4/classic/compat.d.ts +0 -50
- package/node_modules/zod/v4/classic/compat.js +0 -31
- package/node_modules/zod/v4/classic/errors.cjs +0 -74
- package/node_modules/zod/v4/classic/errors.d.cts +0 -30
- package/node_modules/zod/v4/classic/errors.d.ts +0 -30
- package/node_modules/zod/v4/classic/errors.js +0 -48
- package/node_modules/zod/v4/classic/external.cjs +0 -70
- package/node_modules/zod/v4/classic/external.d.cts +0 -13
- package/node_modules/zod/v4/classic/external.d.ts +0 -13
- package/node_modules/zod/v4/classic/external.js +0 -18
- package/node_modules/zod/v4/classic/index.cjs +0 -33
- package/node_modules/zod/v4/classic/index.d.cts +0 -4
- package/node_modules/zod/v4/classic/index.d.ts +0 -4
- package/node_modules/zod/v4/classic/index.js +0 -4
- package/node_modules/zod/v4/classic/iso.cjs +0 -60
- package/node_modules/zod/v4/classic/iso.d.cts +0 -22
- package/node_modules/zod/v4/classic/iso.d.ts +0 -22
- package/node_modules/zod/v4/classic/iso.js +0 -30
- package/node_modules/zod/v4/classic/package.json +0 -6
- package/node_modules/zod/v4/classic/parse.cjs +0 -41
- package/node_modules/zod/v4/classic/parse.d.cts +0 -31
- package/node_modules/zod/v4/classic/parse.d.ts +0 -31
- package/node_modules/zod/v4/classic/parse.js +0 -15
- package/node_modules/zod/v4/classic/schemas.cjs +0 -1151
- package/node_modules/zod/v4/classic/schemas.d.cts +0 -673
- package/node_modules/zod/v4/classic/schemas.d.ts +0 -673
- package/node_modules/zod/v4/classic/schemas.js +0 -1040
- package/node_modules/zod/v4/core/api.cjs +0 -1060
- package/node_modules/zod/v4/core/api.d.cts +0 -295
- package/node_modules/zod/v4/core/api.d.ts +0 -295
- package/node_modules/zod/v4/core/api.js +0 -925
- package/node_modules/zod/v4/core/checks.cjs +0 -595
- package/node_modules/zod/v4/core/checks.d.cts +0 -278
- package/node_modules/zod/v4/core/checks.d.ts +0 -278
- package/node_modules/zod/v4/core/checks.js +0 -569
- package/node_modules/zod/v4/core/core.cjs +0 -74
- package/node_modules/zod/v4/core/core.d.cts +0 -52
- package/node_modules/zod/v4/core/core.d.ts +0 -52
- package/node_modules/zod/v4/core/core.js +0 -67
- package/node_modules/zod/v4/core/doc.cjs +0 -39
- package/node_modules/zod/v4/core/doc.d.cts +0 -14
- package/node_modules/zod/v4/core/doc.d.ts +0 -14
- package/node_modules/zod/v4/core/doc.js +0 -35
- package/node_modules/zod/v4/core/errors.cjs +0 -213
- package/node_modules/zod/v4/core/errors.d.cts +0 -210
- package/node_modules/zod/v4/core/errors.d.ts +0 -210
- package/node_modules/zod/v4/core/errors.js +0 -182
- package/node_modules/zod/v4/core/index.cjs +0 -43
- package/node_modules/zod/v4/core/index.d.cts +0 -14
- package/node_modules/zod/v4/core/index.d.ts +0 -14
- package/node_modules/zod/v4/core/index.js +0 -14
- package/node_modules/zod/v4/core/json-schema.cjs +0 -2
- package/node_modules/zod/v4/core/json-schema.d.cts +0 -88
- package/node_modules/zod/v4/core/json-schema.d.ts +0 -88
- package/node_modules/zod/v4/core/json-schema.js +0 -1
- package/node_modules/zod/v4/core/package.json +0 -6
- package/node_modules/zod/v4/core/parse.cjs +0 -131
- package/node_modules/zod/v4/core/parse.d.cts +0 -49
- package/node_modules/zod/v4/core/parse.d.ts +0 -49
- package/node_modules/zod/v4/core/parse.js +0 -93
- package/node_modules/zod/v4/core/regexes.cjs +0 -136
- package/node_modules/zod/v4/core/regexes.d.cts +0 -78
- package/node_modules/zod/v4/core/regexes.d.ts +0 -78
- package/node_modules/zod/v4/core/regexes.js +0 -127
- package/node_modules/zod/v4/core/registries.cjs +0 -57
- package/node_modules/zod/v4/core/registries.d.cts +0 -35
- package/node_modules/zod/v4/core/registries.d.ts +0 -35
- package/node_modules/zod/v4/core/registries.js +0 -52
- package/node_modules/zod/v4/core/schemas.cjs +0 -1986
- package/node_modules/zod/v4/core/schemas.d.cts +0 -1113
- package/node_modules/zod/v4/core/schemas.d.ts +0 -1113
- package/node_modules/zod/v4/core/schemas.js +0 -1955
- package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
- package/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
- package/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
- package/node_modules/zod/v4/core/standard-schema.js +0 -1
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -920
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -90
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -90
- package/node_modules/zod/v4/core/to-json-schema.js +0 -915
- package/node_modules/zod/v4/core/util.cjs +0 -658
- package/node_modules/zod/v4/core/util.d.cts +0 -197
- package/node_modules/zod/v4/core/util.d.ts +0 -197
- package/node_modules/zod/v4/core/util.js +0 -601
- package/node_modules/zod/v4/core/versions.cjs +0 -8
- package/node_modules/zod/v4/core/versions.d.cts +0 -5
- package/node_modules/zod/v4/core/versions.d.ts +0 -5
- package/node_modules/zod/v4/core/versions.js +0 -5
- package/node_modules/zod/v4/index.cjs +0 -22
- package/node_modules/zod/v4/index.d.cts +0 -3
- package/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/zod/v4/index.js +0 -3
- package/node_modules/zod/v4/locales/ar.cjs +0 -143
- package/node_modules/zod/v4/locales/ar.d.cts +0 -5
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/ar.js +0 -116
- package/node_modules/zod/v4/locales/az.cjs +0 -142
- package/node_modules/zod/v4/locales/az.d.cts +0 -5
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.js +0 -115
- package/node_modules/zod/v4/locales/be.cjs +0 -191
- package/node_modules/zod/v4/locales/be.d.cts +0 -5
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.js +0 -164
- package/node_modules/zod/v4/locales/bg.cjs +0 -156
- package/node_modules/zod/v4/locales/bg.d.cts +0 -5
- package/node_modules/zod/v4/locales/bg.d.ts +0 -5
- package/node_modules/zod/v4/locales/bg.js +0 -128
- package/node_modules/zod/v4/locales/ca.cjs +0 -145
- package/node_modules/zod/v4/locales/ca.d.cts +0 -5
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.js +0 -118
- package/node_modules/zod/v4/locales/cs.cjs +0 -162
- package/node_modules/zod/v4/locales/cs.d.cts +0 -5
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.js +0 -135
- package/node_modules/zod/v4/locales/da.cjs +0 -158
- package/node_modules/zod/v4/locales/da.d.cts +0 -5
- package/node_modules/zod/v4/locales/da.d.ts +0 -4
- package/node_modules/zod/v4/locales/da.js +0 -131
- package/node_modules/zod/v4/locales/de.cjs +0 -143
- package/node_modules/zod/v4/locales/de.d.cts +0 -5
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.js +0 -116
- package/node_modules/zod/v4/locales/en.cjs +0 -145
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -5
- package/node_modules/zod/v4/locales/en.js +0 -117
- package/node_modules/zod/v4/locales/eo.cjs +0 -144
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -5
- package/node_modules/zod/v4/locales/eo.js +0 -116
- package/node_modules/zod/v4/locales/es.cjs +0 -176
- package/node_modules/zod/v4/locales/es.d.cts +0 -5
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/es.js +0 -149
- package/node_modules/zod/v4/locales/fa.cjs +0 -149
- package/node_modules/zod/v4/locales/fa.d.cts +0 -5
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.js +0 -122
- package/node_modules/zod/v4/locales/fi.cjs +0 -149
- package/node_modules/zod/v4/locales/fi.d.cts +0 -5
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.js +0 -122
- package/node_modules/zod/v4/locales/fr-CA.cjs +0 -144
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.js +0 -117
- package/node_modules/zod/v4/locales/fr.cjs +0 -143
- package/node_modules/zod/v4/locales/fr.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.js +0 -116
- package/node_modules/zod/v4/locales/he.cjs +0 -144
- package/node_modules/zod/v4/locales/he.d.cts +0 -5
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.js +0 -117
- package/node_modules/zod/v4/locales/hu.cjs +0 -144
- package/node_modules/zod/v4/locales/hu.d.cts +0 -5
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.js +0 -117
- package/node_modules/zod/v4/locales/id.cjs +0 -143
- package/node_modules/zod/v4/locales/id.d.cts +0 -5
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.js +0 -116
- package/node_modules/zod/v4/locales/index.cjs +0 -100
- package/node_modules/zod/v4/locales/index.d.cts +0 -47
- package/node_modules/zod/v4/locales/index.d.ts +0 -47
- package/node_modules/zod/v4/locales/index.js +0 -47
- package/node_modules/zod/v4/locales/is.cjs +0 -145
- package/node_modules/zod/v4/locales/is.d.cts +0 -5
- package/node_modules/zod/v4/locales/is.d.ts +0 -5
- package/node_modules/zod/v4/locales/is.js +0 -117
- package/node_modules/zod/v4/locales/it.cjs +0 -144
- package/node_modules/zod/v4/locales/it.d.cts +0 -5
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/it.js +0 -117
- package/node_modules/zod/v4/locales/ja.cjs +0 -142
- package/node_modules/zod/v4/locales/ja.d.cts +0 -5
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.js +0 -115
- package/node_modules/zod/v4/locales/ka.cjs +0 -153
- package/node_modules/zod/v4/locales/ka.d.cts +0 -5
- package/node_modules/zod/v4/locales/ka.d.ts +0 -5
- package/node_modules/zod/v4/locales/ka.js +0 -125
- package/node_modules/zod/v4/locales/kh.cjs +0 -12
- package/node_modules/zod/v4/locales/kh.d.cts +0 -5
- package/node_modules/zod/v4/locales/kh.d.ts +0 -5
- package/node_modules/zod/v4/locales/kh.js +0 -5
- package/node_modules/zod/v4/locales/km.cjs +0 -144
- package/node_modules/zod/v4/locales/km.d.cts +0 -5
- package/node_modules/zod/v4/locales/km.d.ts +0 -4
- package/node_modules/zod/v4/locales/km.js +0 -117
- package/node_modules/zod/v4/locales/ko.cjs +0 -148
- package/node_modules/zod/v4/locales/ko.d.cts +0 -5
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.js +0 -121
- package/node_modules/zod/v4/locales/lt.cjs +0 -258
- package/node_modules/zod/v4/locales/lt.d.cts +0 -5
- package/node_modules/zod/v4/locales/lt.d.ts +0 -5
- package/node_modules/zod/v4/locales/lt.js +0 -230
- package/node_modules/zod/v4/locales/mk.cjs +0 -145
- package/node_modules/zod/v4/locales/mk.d.cts +0 -5
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.js +0 -118
- package/node_modules/zod/v4/locales/ms.cjs +0 -143
- package/node_modules/zod/v4/locales/ms.d.cts +0 -5
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.js +0 -116
- package/node_modules/zod/v4/locales/nl.cjs +0 -144
- package/node_modules/zod/v4/locales/nl.d.cts +0 -5
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.js +0 -117
- package/node_modules/zod/v4/locales/no.cjs +0 -143
- package/node_modules/zod/v4/locales/no.d.cts +0 -5
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.js +0 -116
- package/node_modules/zod/v4/locales/ota.cjs +0 -144
- package/node_modules/zod/v4/locales/ota.d.cts +0 -5
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.js +0 -117
- package/node_modules/zod/v4/locales/package.json +0 -6
- package/node_modules/zod/v4/locales/pl.cjs +0 -144
- package/node_modules/zod/v4/locales/pl.d.cts +0 -5
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.js +0 -117
- package/node_modules/zod/v4/locales/ps.cjs +0 -149
- package/node_modules/zod/v4/locales/ps.d.cts +0 -5
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.js +0 -122
- package/node_modules/zod/v4/locales/pt.cjs +0 -143
- package/node_modules/zod/v4/locales/pt.d.cts +0 -5
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.js +0 -116
- package/node_modules/zod/v4/locales/ru.cjs +0 -191
- package/node_modules/zod/v4/locales/ru.d.cts +0 -5
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.js +0 -164
- package/node_modules/zod/v4/locales/sl.cjs +0 -144
- package/node_modules/zod/v4/locales/sl.d.cts +0 -5
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.js +0 -117
- package/node_modules/zod/v4/locales/sv.cjs +0 -145
- package/node_modules/zod/v4/locales/sv.d.cts +0 -5
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.js +0 -118
- package/node_modules/zod/v4/locales/ta.cjs +0 -144
- package/node_modules/zod/v4/locales/ta.d.cts +0 -5
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.js +0 -117
- package/node_modules/zod/v4/locales/th.cjs +0 -144
- package/node_modules/zod/v4/locales/th.d.cts +0 -5
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.js +0 -117
- package/node_modules/zod/v4/locales/tr.cjs +0 -143
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -5
- package/node_modules/zod/v4/locales/tr.js +0 -115
- package/node_modules/zod/v4/locales/ua.cjs +0 -12
- package/node_modules/zod/v4/locales/ua.d.cts +0 -5
- package/node_modules/zod/v4/locales/ua.d.ts +0 -5
- package/node_modules/zod/v4/locales/ua.js +0 -5
- package/node_modules/zod/v4/locales/uk.cjs +0 -144
- package/node_modules/zod/v4/locales/uk.d.cts +0 -5
- package/node_modules/zod/v4/locales/uk.d.ts +0 -4
- package/node_modules/zod/v4/locales/uk.js +0 -117
- package/node_modules/zod/v4/locales/ur.cjs +0 -144
- package/node_modules/zod/v4/locales/ur.d.cts +0 -5
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.js +0 -117
- package/node_modules/zod/v4/locales/vi.cjs +0 -143
- package/node_modules/zod/v4/locales/vi.d.cts +0 -5
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.js +0 -116
- package/node_modules/zod/v4/locales/yo.cjs +0 -142
- package/node_modules/zod/v4/locales/yo.d.cts +0 -5
- package/node_modules/zod/v4/locales/yo.d.ts +0 -4
- package/node_modules/zod/v4/locales/yo.js +0 -115
- package/node_modules/zod/v4/locales/zh-CN.cjs +0 -143
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.js +0 -116
- package/node_modules/zod/v4/locales/zh-TW.cjs +0 -144
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.js +0 -117
- package/node_modules/zod/v4/mini/checks.cjs +0 -34
- package/node_modules/zod/v4/mini/checks.d.cts +0 -1
- package/node_modules/zod/v4/mini/checks.d.ts +0 -1
- package/node_modules/zod/v4/mini/checks.js +0 -1
- package/node_modules/zod/v4/mini/coerce.cjs +0 -47
- package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
- package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
- package/node_modules/zod/v4/mini/coerce.js +0 -17
- package/node_modules/zod/v4/mini/external.cjs +0 -62
- package/node_modules/zod/v4/mini/external.d.cts +0 -11
- package/node_modules/zod/v4/mini/external.d.ts +0 -11
- package/node_modules/zod/v4/mini/external.js +0 -13
- package/node_modules/zod/v4/mini/index.cjs +0 -32
- package/node_modules/zod/v4/mini/index.d.cts +0 -3
- package/node_modules/zod/v4/mini/index.d.ts +0 -3
- package/node_modules/zod/v4/mini/index.js +0 -3
- package/node_modules/zod/v4/mini/iso.cjs +0 -60
- package/node_modules/zod/v4/mini/iso.d.cts +0 -22
- package/node_modules/zod/v4/mini/iso.d.ts +0 -22
- package/node_modules/zod/v4/mini/iso.js +0 -30
- package/node_modules/zod/v4/mini/package.json +0 -6
- package/node_modules/zod/v4/mini/parse.cjs +0 -16
- package/node_modules/zod/v4/mini/parse.d.cts +0 -1
- package/node_modules/zod/v4/mini/parse.d.ts +0 -1
- package/node_modules/zod/v4/mini/parse.js +0 -1
- package/node_modules/zod/v4/mini/schemas.cjs +0 -892
- package/node_modules/zod/v4/mini/schemas.d.cts +0 -407
- package/node_modules/zod/v4/mini/schemas.d.ts +0 -407
- package/node_modules/zod/v4/mini/schemas.js +0 -775
- package/node_modules/zod/v4/package.json +0 -6
- package/node_modules/zod/v4-mini/index.cjs +0 -17
- package/node_modules/zod/v4-mini/index.d.cts +0 -1
- package/node_modules/zod/v4-mini/index.d.ts +0 -1
- package/node_modules/zod/v4-mini/index.js +0 -1
- package/node_modules/zod/v4-mini/package.json +0 -6
- package/package/cc-switch-sdk/README.md +0 -541
- package/package/cc-switch-sdk/dist/constants.d.ts +0 -8
- package/package/cc-switch-sdk/dist/constants.js +0 -2
- package/package/cc-switch-sdk/dist/errors.d.ts +0 -5
- package/package/cc-switch-sdk/dist/errors.js +0 -2
- package/package/cc-switch-sdk/dist/index.d.ts +0 -5
- package/package/cc-switch-sdk/dist/index.js +0 -2
- package/package/cc-switch-sdk/dist/schemas.d.ts +0 -7
- package/package/cc-switch-sdk/dist/schemas.js +0 -2
- package/package/cc-switch-sdk/dist/sdk.d.ts +0 -59
- package/package/cc-switch-sdk/dist/sdk.js +0 -2
- package/package/cc-switch-sdk/dist/services/ai-config-service.js +0 -4
- package/package/cc-switch-sdk/dist/services/mcp-model.d.ts +0 -16
- package/package/cc-switch-sdk/dist/services/mcp-model.js +0 -2
- package/package/cc-switch-sdk/dist/services/mcp-service.d.ts +0 -17
- package/package/cc-switch-sdk/dist/services/mcp-service.js +0 -2
- package/package/cc-switch-sdk/dist/services/skill-model.d.ts +0 -16
- package/package/cc-switch-sdk/dist/services/skill-model.js +0 -2
- package/package/cc-switch-sdk/dist/services/skill-service.d.ts +0 -16
- package/package/cc-switch-sdk/dist/services/skill-service.js +0 -2
- package/package/cc-switch-sdk/dist/state.d.ts +0 -3
- package/package/cc-switch-sdk/dist/state.js +0 -2
- package/package/cc-switch-sdk/dist/types.d.ts +0 -78
- package/package/cc-switch-sdk/dist/types.js +0 -1
- package/package/cc-switch-sdk/dist/utils/fs.d.ts +0 -10
- package/package/cc-switch-sdk/dist/utils/fs.js +0 -3
- package/package/cc-switch-sdk/dist/utils/id.d.ts +0 -3
- package/package/cc-switch-sdk/dist/utils/id.js +0 -2
- package/package/cc-switch-sdk/package.json +0 -31
- /package/{node_modules/@cc-switch/sdk/dist/types.js → package/acode/dist/plugin-types.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ClaudeCodeConfig, type CodexConfig, type OpenCodeConfig } from '
|
|
1
|
+
import { type ClaudeCodeConfig, type CodexConfig, type OpenCodeConfig } from './ai-config-service.js';
|
|
2
2
|
import type { ToolInstallStatus } from '../types.js';
|
|
3
3
|
export interface AiSourceTemplateInput {
|
|
4
4
|
baseUrl?: unknown;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{buildToolSpecificAiConfig as S}from"
|
|
1
|
+
import{buildToolSpecificAiConfig as S}from"./ai-config-service.js";function b(e){return{baseUrl:String(e?.baseUrl||""),apiKey:String(e?.apiKey||""),model:String(e?.model||""),models:Array.isArray(e?.models)?e.models.map(o=>String(o||"").trim()).filter(Boolean):void 0}}function n(e,o){return!!e[o]?.installed}function x(e){return n(e,"claude")||n(e,"claudecode")}function q(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function A(e){return Object.keys(e).length>0}function r(e){return!q(e)||!A(e)?null:e}async function j(e){const o=e.template?S(b(e.template)):null,C=r(e.requestedSources?.acode),g=r(e.requestedSources?.claudecode),m=r(e.requestedSources?.codex),y=r(e.requestedSources?.opencode),d=o?.acode||C,c=o?.claudecode||g,t=o?.codex||m,l=o?.opencode||y,p=Object.values(e.toolStatus).filter(s=>!s.installed).map(s=>s.tool);let a=null,i=null,u=null,f=null;return d&&n(e.toolStatus,"acode")&&(a=await e.aiConfigService.applyAcodeConfig(d)),c&&x(e.toolStatus)&&(i=await e.aiConfigService.applyClaudeCodeConfig(c)),t&&n(e.toolStatus,"codex")&&(u=await e.aiConfigService.applyCodexConfig(t)),l&&n(e.toolStatus,"opencode")&&(f=await e.aiConfigService.applyOpenCodeConfig(l)),{generatedFromUnifiedTemplate:!!o,applied:{acode:d&&a?Object.keys(d):[],claudecode:c&&i?Object.keys(c):[],codex:t&&u?Object.keys(t):[],opencode:l&&f?Object.keys(l):[]},skippedTools:p,merged:{acode:a,claudecode:i,codex:u,opencode:f}}}export{j as applyCurrentAiConfigToInstalledTools};
|
|
2
2
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type CapabilityType = "skills" | "mcp" | "plugins";
|
|
2
|
+
export declare const CAPABILITY_TYPES: readonly CapabilityType[];
|
|
3
|
+
export declare function setDeployedDefaultsProvider(type: CapabilityType, provider: (() => Record<string, boolean>) | null): void;
|
|
4
|
+
|
|
5
|
+
export declare function getDefaults(type: CapabilityType): Record<string, boolean>;
|
|
6
|
+
|
|
7
|
+
export declare function getOverrides(agentId: string, type: CapabilityType): Record<string, boolean>;
|
|
8
|
+
|
|
9
|
+
export declare function getEffective(agentId: string, type: CapabilityType, name: string, fallback?: boolean): boolean;
|
|
10
|
+
|
|
11
|
+
export declare function setDefault(type: CapabilityType, name: string, value: boolean | null): boolean;
|
|
12
|
+
|
|
13
|
+
export declare function setOverride(agentId: string, type: CapabilityType, name: string, value: boolean | null): boolean;
|
|
14
|
+
|
|
15
|
+
export declare function listOverrideAgents(type: CapabilityType): string[];
|
|
16
|
+
|
|
17
|
+
export declare function reconcileDefaultsFromDeployed(type: CapabilityType): number;
|
|
18
|
+
|
|
19
|
+
export declare function hasAnyDefault(type: CapabilityType): boolean;
|
|
20
|
+
|
|
21
|
+
export declare function getEffectiveMap(agentId: string, type: CapabilityType, names: Iterable<string>): Record<string, boolean>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{existsSync as m,readFileSync as S,readdirSync as h}from"node:fs";import f from"node:path";import{getAcodeDataHome as x,getAcodePluginDataHome as A,getAcodeSkillDataHome as v}from"../config.js";import{atomicWriteFileSync as J,sanitizeAgentId as b}from"../utils/file-utils.js";const T=["skills","mcp","plugins"];function d(e){switch(e){case"skills":return f.join(v(),"skills");case"mcp":return f.join(x(),"mcp-deployed");case"plugins":return f.join(A(),"plugins");default:throw new Error(`\u672A\u77E5\u80FD\u529B\u7C7B\u578B: ${String(e)}`)}}const l=new Map;function W(e,t){t?l.set(e,t):l.delete(e)}function w(e,t){const r=l.get(e);if(r)try{return r()[t]}catch{return}}function a(e){try{if(!m(e))return{};const t=JSON.parse(S(e,"utf8"));return!t||typeof t!="object"||Array.isArray(t)?{}:t}catch{return{}}}function y(e,t){J(e,`${JSON.stringify(t,null,2)}
|
|
2
|
+
`)}function s(e,t){const r=t[e];if(!r||typeof r!="object"||Array.isArray(r))return{};const o={};for(const[n,i]of Object.entries(r))n.trim()&&typeof i=="boolean"&&(o[n.trim()]=i);return o}function j(e,t,r,o){const n={...s(t,e)};o==null?delete n[r]:n[r]=o,e[t]=n}function D(e){return f.join(d(e),"config.json")}function O(e,t){return f.join(d(e),"agents",`${b(t)}.json`)}function p(e){return s(e,a(D(e)))}function F(e,t){return e?s(t,a(O(t,e))):{}}function k(e,t,r,o){const i=F(e,t)[r];if(i!==void 0)return i;const c=p(t)[r];if(c!==void 0)return c;if(o!==void 0)return o;const g=w(t,r);return g!==void 0?g:!1}function N(e,t,r){const o=D(e),n=a(o),i=s(e,n);j(n,e,t,r);const u=s(e,n);return JSON.stringify(i)===JSON.stringify(u)?!1:(y(o,n),!0)}function $(e,t,r,o){if(!e)return!1;const n=O(t,e),i=a(n),u=s(t,i);j(i,t,r,o);const c=s(t,i);return JSON.stringify(u)===JSON.stringify(c)?!1:(y(n,i),!0)}function V(e){const t=f.join(d(e),"agents");try{return m(t)?h(t).filter(r=>r.endsWith(".json")&&!r.startsWith(".")).map(r=>r.slice(0,-5)):[]}catch{return[]}}function Y(e){const t=l.get(e);if(!t)return 0;let r=0;const o=p(e),n=t()??{};for(const i of Object.keys(n))i in o||n[i]===!0&&(N(e,i,!1),r++);return r}function z(e){return Object.keys(p(e)).length>0}function B(e,t,r){const o={};for(const n of r)o[n]=k(e,t,n);return o}export{T as CAPABILITY_TYPES,p as getDefaults,k as getEffective,B as getEffectiveMap,F as getOverrides,z as hasAnyDefault,V as listOverrideAgents,Y as reconcileDefaultsFromDeployed,N as setDefault,W as setDeployedDefaultsProvider,$ as setOverride};
|
|
3
|
+
|
|
@@ -27,5 +27,6 @@ interface PrepareResult {
|
|
|
27
27
|
|
|
28
28
|
export declare function redactForLog(obj: Record<string, unknown>): Record<string, unknown>;
|
|
29
29
|
|
|
30
|
+
export declare function getAgentMcpExtraFilePath(agentId: string): string;
|
|
30
31
|
export declare function prepareAcodeInstanceConfig(options: PrepareOptions): Promise<PrepareResult>;
|
|
31
32
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l from"node:fs/promises";import v from"node:path";import{getAcodeConfigFile as w,getRuntimeHomeDir as A}from"../config.js";import{getInstanceAiConfigDebugLogger as _}from"../utils/instance-ai-config-debug-logger.js";import{sanitizeAgentId as K}from"../utils/file-utils.js";import{mcpDeployManager as D}from"./mcp-deploy.js";const j=new Set(["apiKey","api_key","apikey","key","secret","token","password"]);function F(e){const o={...e};for(const r of Object.keys(o))if(j.has(r)){const n=o[r];typeof n=="string"&&n.length>0&&(o[r]=n.length>8?`${n.slice(0,4)}...${n.slice(-4)}`:"***")}else typeof o[r]=="object"&&o[r]!==null&&(o[r]=F(o[r]));return o}function h(){return{...process.env.ACODE_MODEL?{model:process.env.ACODE_MODEL}:{},...process.env.ACODE_BASE_URL?{baseURL:process.env.ACODE_BASE_URL}:{},...process.env.ACODE_API_KEY?{apiKey:process.env.ACODE_API_KEY}:{},...process.env.ACODE_EFFORT?{effort:process.env.ACODE_EFFORT}:{}}}async function x(e){try{const o=await l.readFile(e,"utf-8"),s=JSON.parse(o).provider?.default,t=s?.options;return{...s?.model?{model:s.model}:{},...t?.baseURL||t?.baseUrl?{baseURL:t.baseURL||t.baseUrl}:{},...t?.apiKey?{apiKey:t.apiKey}:{}}}catch{return{}}}function b(e,o,r,n){return o!==void 0?"api":r!==void 0?"env":n!==void 0?"file":"default"}function M(e){return v.join(A(),".aws-bridge","instances",K(e),"mcp-extra.json")}async function k(e){try{const o=await l.readFile(v.join(e,"mcp-extra.json"),"utf-8"),r=JSON.parse(o);return r.servers&&typeof r.servers=="object"?r.servers:{}}catch{return{}}}function B(e){return M(e)}async function z(e){const o=w(),r=v.join(A(),".aws-bridge","instances",K(e.agentId)),n=v.join(r,"acode.json"),s=e.apiOverrides??{},t=h(),c=await x(o),g=s.model??t.model??c.model,y=s.baseURL??t.baseURL??c.baseURL,u=s.apiKey??t.apiKey??c.apiKey,m=s.effort??t.effort,d={};g&&(d.model=g),y&&(d.baseURL=y),u&&(d.apiKey=u),m&&(d.effort=m);const O={model:b("model",s.model,t.model,c.model),baseURL:b("baseURL",s.baseURL,t.baseURL,c.baseURL),apiKey:b("apiKey",s.apiKey,t.apiKey,c.apiKey),effort:b("effort",s.effort,t.effort,void 0)},L=_();try{await l.mkdir(r,{recursive:!0});let f={};try{const i=await l.readFile(o,"utf-8");f=JSON.parse(i)}catch{}const a=JSON.parse(JSON.stringify(f)),E=a.provider??{},I=E.default??{},p=I.options??{};g&&(p.model=g),y&&(p.baseURL=y),u&&(p.apiKey=u),m&&(p.effort=m),I.options=p,E.default=I,a.provider=E;try{const i=a.mcpServers??{};let R=D.resolveEnabledMcp(e.agentId,i);const U=await k(r);for(const[C,S]of Object.entries(U))R[C]=S;a.mcpServers=R}catch(i){L.log({level:"error",category:"apply",message:`MCP \u80FD\u529B\u8FC7\u6EE4/\u79C1\u6709\u5408\u5E76\u5931\u8D25\uFF08fail-open\uFF0C\u4FDD\u6301\u539F\u914D\u7F6E\uFF09: ${i instanceof Error?i.message:String(i)}`,source:"bridge",agentId:e.agentId,sessionId:e.sessionId})}await l.writeFile(n,JSON.stringify(a,null,2),"utf-8"),L.log({level:"info",category:"apply",message:"per-instance acode.json \u5DF2\u5199\u5165",source:"bridge",agentId:e.agentId,sessionId:e.sessionId,details:{perInstanceConfigPath:n,source:O}})}catch(f){const a=f instanceof Error?f.message:String(f);L.log({level:"error",category:"apply",message:`per-instance acode.json \u5199\u5165\u5931\u8D25: ${a}`,source:"bridge",agentId:e.agentId})}return{instanceConfig:{config:d,source:O},perInstanceConfigPath:n}}export{B as getAgentMcpExtraFilePath,z as prepareAcodeInstanceConfig,F as redactForLog};
|
|
2
2
|
|
|
@@ -20,4 +20,25 @@ export declare function getAgentToolPermissions(agentId: string): ToolPermission
|
|
|
20
20
|
|
|
21
21
|
export declare function resolveAgentToolPermissions(agentId: string): ToolPermissionPolicy;
|
|
22
22
|
|
|
23
|
+
export interface AgentCapabilities {
|
|
24
|
+
skills?: Record<string, boolean>;
|
|
25
|
+
mcp?: Record<string, boolean>;
|
|
26
|
+
plugins?: Record<string, boolean>;
|
|
27
|
+
}
|
|
28
|
+
export declare const CAPABILITY_TYPES: readonly ["skills", "mcp", "plugins"];
|
|
29
|
+
export type CapabilityType = (typeof CAPABILITY_TYPES)[number];
|
|
30
|
+
|
|
31
|
+
export interface AgentPluginSource {
|
|
32
|
+
url?: string;
|
|
33
|
+
sha256?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare function setAgentCapabilities(agentId: string, raw: unknown): void;
|
|
37
|
+
|
|
38
|
+
export declare function getAgentCapabilities(agentId: string): AgentCapabilities | null;
|
|
39
|
+
|
|
40
|
+
export declare function getAgentPluginSources(agentId: string): Record<string, AgentPluginSource> | null;
|
|
41
|
+
|
|
42
|
+
export declare function isCapabilityEnabled(agentId: string, type: CapabilityType, name: string): boolean;
|
|
43
|
+
|
|
23
44
|
export declare function instanceFeaturesCacheSize(): number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{getEffective as _,hasAnyDefault as x}from"./capability-config.js";const E={},C="desktop",F="browser",D="agentSys.launchItem",N="agentSys.hire",h=new Set([F]),O=new Set,y=new Map,c=new Map,R=["fileReadOutside","commandExecution","fileModification"],P=new Set(["allow","ask","deny"]);function M(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const t=e,n={};let o=!1;for(const r of R){const s=t[r];typeof s=="string"&&P.has(s)?(n[r]=s,o=!0):n[r]="allow"}return o?n:null}function j(e){if(e==null)return{...E};let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch{t=null}if(typeof t!="object"||t===null||Array.isArray(t))return{...E};const n={};for(const[o,r]of Object.entries(t))O.has(o)||typeof r=="boolean"&&(n[o]=r);return n}function z(e,t){if(!e)return;y.set(e,j(t));let n=t;if(typeof t=="string")try{n=JSON.parse(t)}catch{n=null}if(typeof n=="object"&&n!==null&&!Array.isArray(n)){const o=M(n.toolPermissions);o?c.set(e,o):c.delete(e)}else c.delete(e)}function L(e){return y.get(e)??{...E}}function Y(e,t){const n=L(e)[t];return n!==void 0?n:h.has(t)}function K(e){y.delete(e),c.delete(e),u.delete(e),A.delete(e)}function k(e){return c.get(e)??null}function H(e){return c.get(e)??{fileReadOutside:"allow",commandExecution:"allow",fileModification:"allow"}}const U=["skills","mcp","plugins"],u=new Map,A=new Map;function v(e){if(typeof e!="object"||e===null||Array.isArray(e))return;const t={};for(const[n,o]of Object.entries(e))n.trim()&&typeof o=="boolean"&&(t[n.trim()]=o);return t}function J(e,t){if(!e)return;if(t==null){u.delete(e);return}let n=t;if(typeof t=="string")try{n=JSON.parse(t)}catch{n=null}if(typeof n!="object"||n===null||Array.isArray(n)){u.delete(e);return}const o=n,r={};let s=!1;for(const a of U){const i=v(o[a]);i&&(r[a]=i,s=!0)}s?u.set(e,r):u.delete(e);const f=o.plugins,d={};let g=!1;if(typeof f=="object"&&f!==null&&!Array.isArray(f))for(const[a,i]of Object.entries(f)){const p=a.trim();if(p){if(typeof i=="boolean"){const l=r.plugins??{};l[p]=i,r.plugins=l,s=!0;continue}if(i!==null&&typeof i=="object"&&!Array.isArray(i)){const l=i,S=l.enabled!==!1,b=typeof l.url=="string"?l.url:void 0,T=typeof l.sha256=="string"?l.sha256:void 0,m=r.plugins??{};m[p]=S,r.plugins=m,s=!0,b&&(d[p]={url:b,sha256:T},g=!0)}}}g?A.set(e,d):A.delete(e)}function V(e){return u.get(e)??null}function W(e){return A.get(e)??null}function q(e,t,n){if(x(t))return _(e,t,n);const o=u.get(e);if(!o)return!0;const r=o[t];if(!r)return!0;const s=r[n];return s===void 0?!0:s}function w(){return y.size}export{F as BROWSER_FEATURE_KEY,U as CAPABILITY_TYPES,C as DESKTOP_FEATURE_KEY,N as HIRE_FEATURE_KEY,D as LAUNCH_ITEM_FEATURE_KEY,K as clearAgentFeatures,V as getAgentCapabilities,L as getAgentFeatures,W as getAgentPluginSources,k as getAgentToolPermissions,w as instanceFeaturesCacheSize,q as isCapabilityEnabled,Y as isFeatureEnabled,H as resolveAgentToolPermissions,J as setAgentCapabilities,z as setAgentFeatures};
|
|
2
2
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AdapterResult, InitLogEntry, LegacyMcpStateItem, LegacySkillStateItem, McpPayload, SkillPackage, SyncStateResult } from '../types.js';
|
|
3
|
-
export declare function syncLegacyStateFromSdk(agentId: string, sdk: CcSwitchSdk): Promise<SyncStateResult>;
|
|
1
|
+
import type { InitLogEntry, LegacyMcpStateItem, LegacySkillStateItem, McpPayload, PluginPackage, SkillPackage } from '../types.js';
|
|
4
2
|
export declare function initInstance(agentId: string, workspacePath: string, options: {
|
|
5
3
|
skillEnabled?: boolean;
|
|
6
4
|
mcpEnabled?: boolean;
|
|
7
5
|
ccSwitchEnabledTools?: string[];
|
|
8
6
|
skillPackage?: SkillPackage;
|
|
9
7
|
skillPackages?: SkillPackage[];
|
|
8
|
+
pluginPackages?: PluginPackage[];
|
|
10
9
|
mcpServers?: McpPayload[];
|
|
11
10
|
}): Promise<{
|
|
12
11
|
ok: boolean;
|
|
@@ -26,7 +25,11 @@ export declare function initInstance(agentId: string, workspacePath: string, opt
|
|
|
26
25
|
configPath: string | null;
|
|
27
26
|
installedCount?: number;
|
|
28
27
|
};
|
|
29
|
-
|
|
28
|
+
plugin?: {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
packagePresent: boolean;
|
|
31
|
+
installedCount?: number;
|
|
32
|
+
};
|
|
30
33
|
installed?: {
|
|
31
34
|
skills: LegacySkillStateItem[];
|
|
32
35
|
mcpServers: LegacyMcpStateItem[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{promises as
|
|
1
|
+
import{promises as P}from"node:fs";import w from"node:path";import{downloadPluginZip as A,downloadSkillZip as D,ensureDir as y}from"../utils/file-utils.js";import{createLogger as O}from"../utils/logger.js";import{normalizeMcpPayload as j}from"../utils/mcp-utils.js";import{ensureEnabledTools as z,parseBoolean as T}from"../utils/validation.js";import{getAgentInitRoot as I,loadInstanceState as F,saveInstanceState as $}from"./instance-state.js";import{mcpDeployManager as B}from"./mcp-deploy.js";import{reconcileMcpDefaultsFromDeployed as R}from"./mcp-deploy.js";import{reconcileSkillsDefaultsFromDeployed as L}from"./skill-manager.js";import{reconcilePluginsDefaultsFromDeployed as Z}from"./plugin-manager.js";import{pluginManager as q}from"./plugin-manager.js";import{skillManager as x}from"./skill-manager.js";import{detectToolStatuses as U}from"./tool-installer.js";const W=O("instance-init");function G(i,p){const s=new Set(Object.values(p).filter(o=>o.installed).map(o=>o.tool));return i.filter(o=>s.has(o))}async function H(i,p){try{const s=await D(i,p);if(!s)return null;const o=await P.readFile(s.outputPath),c=i.defaultEnabled!==!1,g=String(i.skillName||"").trim()||void 0,e=await x.saveSharedSkill(o,s.fileName,c,i.sha256,g);return!e.ok||!e.skillName?null:{id:e.skillName,name:e.skillName,fileName:s.fileName,filePath:"",bytes:s.bytes,installedAt:new Date().toISOString()}}catch(s){return W.warn("\u6280\u80FD\u5305\u90E8\u7F72\u5230 bridge \u5931\u8D25\uFF08\u6309\u8DF3\u8FC7\u5904\u7406\uFF09: %s. %s",i.skillName||i.fileName||"(\u672A\u547D\u540D)",s instanceof Error?s.message:String(s)),null}}async function re(i,p,s){const o=w.resolve(p),c=I(i),g=[];function e(t,l,n,a){g.push({step:t,status:l,message:n,timestamp:new Date().toISOString(),details:a})}e("prepare","running","\u5F00\u59CB\u521D\u59CB\u5316\u5B9E\u4F8B",{agentId:String(i),workspacePath:o}),await y(c),e("prepare","success","\u521D\u59CB\u5316\u76EE\u5F55\u5DF2\u5C31\u7EEA",{initRoot:c});const d=z(s.ccSwitchEnabledTools);e("detect-tools","running","\u5F00\u59CB\u68C0\u6D4B\u5DE5\u5177\u5B89\u88C5\u72B6\u6001",{tools:d});const u=await U(d);e("detect-tools","success","\u5DE5\u5177\u5B89\u88C5\u72B6\u6001\u68C0\u6D4B\u5B8C\u6210",{installedTools:Object.values(u).filter(t=>t.installed).map(t=>t.tool),missingTools:Object.values(u).filter(t=>!t.installed).map(t=>t.tool)});const C=G(d,u),b=Object.values(u).filter(t=>!t.installed),r={ok:!0,agentId:String(i),workspacePath:o,initRoot:c,enabledTools:d,toolStatus:u,logs:g,skill:{enabled:T(s.skillEnabled,!0),packagePresent:!1},mcp:{enabled:T(s.mcpEnabled,!0),configPath:null}},m=await F(i);if(b.length>0&&e("skip-uninstalled-tools","skipped","\u5DF2\u8DF3\u8FC7\u672A\u5B89\u88C5\u5DE5\u5177",{skippedTools:b.map(t=>({tool:t.tool,error:t.error}))}),e("select-installed-tools","success","\u5DF2\u9009\u62E9\u53EF\u521D\u59CB\u5316\u5DE5\u5177",{enabledTools:d,installedTools:C}),e("load-sdk","running","\u5F00\u59CB\u90E8\u7F72\u6280\u80FD/MCP \u6A21\u677F\u5230\u672C bridge"),e("load-sdk","success","\u6280\u80FD/MCP \u6A21\u677F\u90E8\u7F72\u51C6\u5907\u5B8C\u6210",{tools:d}),r.skill.enabled){e("install-skills","running","\u5F00\u59CB\u90E8\u7F72\u6280\u80FD\u5305",{count:Array.isArray(s.skillPackages)?s.skillPackages.length:s.skillPackage?1:0});const t=await y(w.join(c,"skills")),l=Array.isArray(s.skillPackages)&&s.skillPackages.length>0?s.skillPackages:s.skillPackage?[s.skillPackage]:[],n=[];for(const a of l){const S=await H(a,t);S&&n.push(S)}n.length>0?(r.skill.packagePresent=!0,r.skill.installedCount=n.length,r.skill.installed=n,e("install-skills","success","\u6280\u80FD\u5305\u90E8\u7F72\u5B8C\u6210",{installedCount:n.length,skills:n.map(a=>a.name)})):e("install-skills","skipped","\u6CA1\u6709\u53EF\u90E8\u7F72\u7684\u6280\u80FD\u5305")}else e("install-skills","skipped","\u5DF2\u8DF3\u8FC7\u6280\u80FD\u5305\u90E8\u7F72\uFF08skillEnabled=false\uFF09");const k=Array.isArray(s.pluginPackages)?s.pluginPackages:[];if(k.length>0){e("install-plugins","running","\u5F00\u59CB\u90E8\u7F72\u63D2\u4EF6\u6A21\u677F\u5305",{count:k.length});const t=await y(w.join(c,"plugins-tmp"));let l=0;for(const n of k)if(!(!n||!String(n.downloadUrl||"").trim()))try{const a=await A(n,t);if(!a)continue;const S=await P.readFile(a.outputPath),E=n.defaultEnabled!==!1,h=await q.saveSharedPlugin(S,a.fileName,E,n.sha256);h.ok?(l++,e("install-plugins","success",`\u63D2\u4EF6 ${h.pluginName||a.fileName} \u5DF2\u90E8\u7F72\u5230\u672C bridge`)):e("install-plugins","error",`\u63D2\u4EF6 ${a.fileName} \u90E8\u7F72\u5931\u8D25: ${h.error||"\u672A\u77E5\u9519\u8BEF"}`)}catch(a){e("install-plugins","error",`\u63D2\u4EF6 ${n.fileName||"(\u672A\u547D\u540D)"} \u90E8\u7F72\u5931\u8D25: ${a instanceof Error?a.message:String(a)}`)}r.plugin={enabled:!0,packagePresent:k.length>0,installedCount:l},l>0?e("install-plugins","success","\u63D2\u4EF6\u6A21\u677F\u5305\u90E8\u7F72\u5B8C\u6210",{installedCount:l}):e("install-plugins","skipped","\u6CA1\u6709\u53EF\u90E8\u7F72\u7684\u63D2\u4EF6\u5305"),await P.rm(t,{recursive:!0,force:!0}).catch(()=>{})}const f=[];if(r.mcp.enabled){e("install-mcp","running","\u5F00\u59CB\u90E8\u7F72 MCP \u6A21\u677F",{count:Array.isArray(s.mcpServers)?s.mcpServers.length:0});const t=(Array.isArray(s.mcpServers)?s.mcpServers:[]).map(l=>j(l)).filter(l=>l!==null);for(const l of t){const n={type:l.transport||"stdio",command:l.command||void 0,url:l.url||void 0,args:l.args||void 0,env:l.env||void 0};B.saveMcp(l.name,n,l.enabled!==!1).ok&&f.push({id:l.id||"",name:l.name,transport:l.transport||"stdio",command:l.command||"",url:l.url||"",args:l.args||[],env:l.env||{},enabled:l.enabled!==!1,installedAt:new Date().toISOString()})}r.mcp.installedCount=f.length,e("install-mcp","success","MCP \u6A21\u677F\u90E8\u7F72\u5B8C\u6210",{installedCount:f.length,mcpServers:f.map(l=>l.name)})}else e("install-mcp","skipped","\u5DF2\u8DF3\u8FC7 MCP \u6A21\u677F\uFF08mcpEnabled=false\uFF09");e("persist-state","running","\u5F00\u59CB\u4FDD\u5B58\u5B9E\u4F8B\u72B6\u6001"),m.initialized=!0,m.enabledTools=d,m.toolStatus=u,m.skillEnabled=r.skill.enabled,m.mcpEnabled=r.mcp.enabled,await $(i,m),e("persist-state","success","\u5B9E\u4F8B\u72B6\u6001\u4FDD\u5B58\u5B8C\u6210");const v=L(),M=R(),N=Z();return(v||M||N)&&e("sync-state","success","\u80FD\u529B\u9ED8\u8BA4\u5F00\u5173\u5DF2\u5BF9\u8D26\uFF08\u65B0\u589E\u9879\u9ED8\u8BA4\u5173\u95ED\uFF09",{reconciledSkills:v,reconciledMcp:M,reconciledPlugins:N}),e("sync-state","success","\u6280\u80FD/MCP \u6A21\u677F\u90E8\u7F72\u72B6\u6001\u5DF2\u5C31\u7EEA"),e("complete","success",b.length>0?"\u5B9E\u4F8B\u521D\u59CB\u5316\u5B8C\u6210\uFF0C\u672A\u5B89\u88C5\u5DE5\u5177\u5DF2\u8DF3\u8FC7":"\u5B9E\u4F8B\u521D\u59CB\u5316\u5B8C\u6210"),{...r,installed:{skills:r.skill.installed||[],mcpServers:f}}}export{re as initInstance};
|
|
2
2
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{promises as
|
|
1
|
+
import{promises as s}from"node:fs";import p from"node:os";import a from"node:path";import{getRuntimeHomeDir as l}from"../config.js";import{atomicWriteJsonFile as c,ensureDir as m,sanitizeAgentId as o}from"../utils/file-utils.js";import{ensureEnabledTools as S,parseBoolean as u}from"../utils/validation.js";function f(e){return a.join(p.tmpdir(),"agentswork-runtime-init",o(String(e)),"state.json")}function g(){return{initialized:!1,skills:[],mcpServers:[],enabledTools:["acode","claude","opencode","codex"],toolStatus:{},skillEnabled:!0,mcpEnabled:!0,updatedAt:null}}function d(e){return a.join(l(),".aws-bridge","instances",o(String(e)),"state.json")}async function I(e){const t=d(e),r=f(e);try{const n=await s.readFile(t,"utf-8");return JSON.parse(n)}catch{try{const n=await s.readFile(r,"utf-8"),i=JSON.parse(n);return await c(t,i),i}catch{return g()}}}async function h(e,t){const r=d(e);await m(a.dirname(r));const n={initialized:!!t?.initialized,skills:Array.isArray(t?.skills)?t.skills:[],mcpServers:Array.isArray(t?.mcpServers)?t.mcpServers:[],enabledTools:S(t?.enabledTools),toolStatus:t?.toolStatus&&typeof t.toolStatus=="object"&&!Array.isArray(t.toolStatus)?t.toolStatus:{},skillEnabled:u(t?.skillEnabled,!0),mcpEnabled:u(t?.mcpEnabled,!0),updatedAt:new Date().toISOString()};return await c(r,n),n}function j(e){return a.join(l(),".aws-bridge","instances",o(String(e)))}export{j as getAgentInitRoot,d as getInstanceStateFile,I as loadInstanceState,h as saveInstanceState};
|
|
2
2
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{existsSync as
|
|
1
|
+
import{existsSync as o,mkdirSync as g,copyFileSync as m,readdirSync as d,cpSync as p}from"node:fs";import e from"node:path";import{getAcodeDataHome as h,getAcodeSkillDataHome as y,getRuntimeHomeDir as a}from"../config.js";import{createLogger as S}from"../utils/logger.js";import{migrateOldBindingDir as k}from"./runtime-binding.js";const r=S("legacy-path-migration");function j(){return e.join(a(),".agentswork","runtime-bridge")}function u(){return e.join(a(),".aws-bridge")}function w(){const n=e.join(j(),"lifecycle-state.json"),t=e.join(u(),"lifecycle-state.json");o(n)&&!o(t)&&(g(u(),{recursive:!0}),m(n,t),r.info(`[runtime-bridge] \u5DF2\u8FC1\u79FB lifecycle-state.json \u2192 ${t}`))}function b(){const n=e.join(a(),".agentswork","snapshots"),t=e.join(u(),"snapshots");if(o(n)&&!o(t)){g(t,{recursive:!0});try{const s=d(n);for(const i of s){const l=e.join(n,i),c=e.join(t,i);m(l,c)}r.info(`[runtime-bridge] \u5DF2\u8FC1\u79FB snapshots/ \u5230 ${t}`)}catch{r.warn("[runtime-bridge] snapshots/ \u8FC1\u79FB\u5931\u8D25\uFF08\u90E8\u5206\u6587\u4EF6\u53EF\u80FD\u88AB\u8DF3\u8FC7\uFF09")}}}function O(){D();const n=j();if(!o(n)){const t=e.join(a(),".agentswork","snapshots");if(!o(t))return}r.info("[runtime-bridge] \u68C0\u6D4B\u5230\u65E7\u8DEF\u5F84 ~/.agentswork/\uFF0C\u6B63\u5728\u8FC1\u79FB\u5230 ~/.aws-bridge/ ..."),k(),w(),b()}function D(){const n=e.join(y(),"skills","deployed"),t=e.join(y(),"skills-runtime");R(n),v(t)}function $(n,t,s){if(!(!o(n)||o(t)))try{p(n,t,{recursive:!0}),r.info(`[runtime-bridge] \u5DF2\u8FC1\u79FB ${s} \u2192 ${t}`)}catch(i){r.warn(`[runtime-bridge] ${s} \u8FC1\u79FB\u5931\u8D25: ${i instanceof Error?i.message:String(i)}`)}}function R(n){const t=e.join(h(),"skills-deployed");$(t,n,"\u6280\u80FD\u90E8\u7F72\u533A")}function v(n){const t=e.join(a(),".aws-bridge","instances");if(!o(t))return;let s=[];try{s=d(t).filter(i=>!i.startsWith("."))}catch{return}for(const i of s){const l=e.join(t,i,"skills");if(!o(l))continue;const c=e.join(n,i);if(!o(c))try{p(l,c,{recursive:!0}),r.info(`[runtime-bridge] \u5DF2\u8FC1\u79FB\u5B9E\u4F8B\u6280\u80FD\u519C\u573A ${i} \u2192 ${c}`)}catch(f){r.warn(`[runtime-bridge] \u5B9E\u4F8B\u6280\u80FD\u519C\u573A ${i} \u8FC1\u79FB\u5931\u8D25: ${f instanceof Error?f.message:String(f)}`)}}}export{O as migrateOldPathsOnStartup,D as migrateSkillPaths};
|
|
2
2
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
export interface DeployedMcpEntry {
|
|
3
|
+
name: string;
|
|
4
|
+
fileName: string;
|
|
5
|
+
defaultEnabled: boolean;
|
|
6
|
+
sha256?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface McpDeployResult {
|
|
9
|
+
ok: boolean;
|
|
10
|
+
error?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface McpDeploySpec {
|
|
15
|
+
type: string;
|
|
16
|
+
command?: string;
|
|
17
|
+
url?: string;
|
|
18
|
+
args?: string[];
|
|
19
|
+
env?: Record<string, string>;
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
}
|
|
22
|
+
export declare class McpDeployManager {
|
|
23
|
+
private readonly rootDir;
|
|
24
|
+
private static _instance;
|
|
25
|
+
static getInstance(): McpDeployManager;
|
|
26
|
+
private constructor();
|
|
27
|
+
private manifestFile;
|
|
28
|
+
private specFile;
|
|
29
|
+
private isHealthy;
|
|
30
|
+
private readManifest;
|
|
31
|
+
private writeManifest;
|
|
32
|
+
|
|
33
|
+
saveMcp(name: string, spec: McpDeploySpec, defaultEnabled?: boolean, sha256?: string): McpDeployResult;
|
|
34
|
+
|
|
35
|
+
removeMcp(name: string): {
|
|
36
|
+
ok: boolean;
|
|
37
|
+
error?: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
listDeployed(): DeployedMcpEntry[];
|
|
41
|
+
|
|
42
|
+
getSpec(name: string): McpDeploySpec | null;
|
|
43
|
+
|
|
44
|
+
resolveEnabledMcp(agentId: string, globalMcpServers: Record<string, unknown>): Record<string, unknown>;
|
|
45
|
+
|
|
46
|
+
deployedDefaultEnabled(): Record<string, boolean>;
|
|
47
|
+
}
|
|
48
|
+
export declare const mcpDeployManager: McpDeployManager;
|
|
49
|
+
export declare const reconcileMcpDefaultsFromDeployed: () => number;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{existsSync as h,mkdirSync as a,readFileSync as l,rmSync as m,writeFileSync as f}from"node:fs";import n from"node:path";import{getAcodeDataHome as y}from"../config.js";import{createLogger as d}from"../utils/logger.js";import{isCapabilityEnabled as p}from"./instance-features.js";import{setDeployedDefaultsProvider as M,reconcileDefaultsFromDeployed as g}from"./capability-config.js";const u=d("mcp-deploy"),D=1;class c{static getInstance(){return this._instance||(this._instance=new c(n.join(y(),"mcp-deployed"))),this._instance}constructor(e){this.rootDir=e}manifestFile(){return n.join(this.rootDir,"manifest.json")}specFile(e){const t=n.join(this.rootDir,`${e}.json`),r=n.resolve(this.rootDir);if(n.resolve(t)!==n.join(r,`${e}.json`))throw new Error(`MCP \u6A21\u677F\u6587\u4EF6\u8D8A\u51FA\u90E8\u7F72\u533A: ${e}`);return t}isHealthy(e){return h(this.specFile(e))}readManifest(){try{const e=JSON.parse(l(this.manifestFile(),"utf8"));return Array.isArray(e.servers)?e.servers.filter(t=>t&&t.name):[]}catch{return[]}}writeManifest(e){a(this.rootDir,{recursive:!0}),f(this.manifestFile(),`${JSON.stringify({version:D,servers:e},null,2)}
|
|
2
|
+
`,"utf8")}saveMcp(e,t,r=!0,i){if(!e||!/^[a-zA-Z0-9_.-]+$/.test(e))return{ok:!1,error:`MCP \u540D\u975E\u6CD5: ${JSON.stringify(e)}`};a(this.rootDir,{recursive:!0});try{f(this.specFile(e),`${JSON.stringify(t,null,2)}
|
|
3
|
+
`,"utf8")}catch(o){return{ok:!1,error:`MCP \u6A21\u677F\u5199\u5165\u5931\u8D25: ${o instanceof Error?o.message:String(o)}`}}const s=this.readManifest().filter(o=>o.name!==e);return s.push({name:e,fileName:`${e}.json`,defaultEnabled:r,sha256:i}),this.writeManifest(s),u.info("[mcp] MCP \u6A21\u677F\u5DF2\u90E8\u7F72\u5230 bridge: %s",e),{ok:!0,name:e}}removeMcp(e){if(!e||!/^[a-zA-Z0-9_.-]+$/.test(e))return{ok:!1,error:"name \u975E\u6CD5"};const t=this.readManifest().filter(r=>r.name!==e);this.writeManifest(t);try{m(this.specFile(e),{force:!0})}catch(r){return{ok:!1,error:`\u6A21\u677F\u6587\u4EF6\u6E05\u7406\u5931\u8D25: ${r instanceof Error?r.message:String(r)}`}}return u.info("[mcp] MCP \u6A21\u677F\u5DF2\u4ECE bridge \u79FB\u9664\u90E8\u7F72: %s",e),{ok:!0}}listDeployed(){return this.readManifest().map(e=>({...e,deployed:this.isHealthy(e.name)}))}getSpec(e){if(!this.isHealthy(e))return null;try{return JSON.parse(l(this.specFile(e),"utf8"))}catch{return null}}resolveEnabledMcp(e,t){const r={};for(const i of this.readManifest()){if(!p(e,"mcp",i.name)||!this.isHealthy(i.name))continue;const s=this.getSpec(i.name);s&&(r[i.name]={...s,type:s.type||"stdio"})}for(const[i,s]of Object.entries(t))p(e,"mcp",i)&&(r[i]||(r[i]=s));return r}deployedDefaultEnabled(){const e={};for(const t of this.readManifest())e[t.name]=t.defaultEnabled;return e}}c._instance=null;const S=c.getInstance();M("mcp",()=>S.deployedDefaultEnabled());const w=()=>g("mcp");export{c as McpDeployManager,S as mcpDeployManager,w as reconcileMcpDefaultsFromDeployed};
|
|
4
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
export type PluginEventPriority = "urgent" | "normal" | "low";
|
|
3
|
+
|
|
4
|
+
export interface PluginEventMessage {
|
|
5
|
+
msgId: string;
|
|
6
|
+
|
|
7
|
+
channel?: string;
|
|
8
|
+
senderId: string;
|
|
9
|
+
senderName: string;
|
|
10
|
+
receiverId?: string;
|
|
11
|
+
content: string;
|
|
12
|
+
requireReply: boolean;
|
|
13
|
+
role?: "system" | "user" | "assistant";
|
|
14
|
+
timestamp: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PluginEventRecord {
|
|
17
|
+
plugin: string;
|
|
18
|
+
event: string;
|
|
19
|
+
priority: PluginEventPriority;
|
|
20
|
+
dedupKey?: string;
|
|
21
|
+
receivedAt: number;
|
|
22
|
+
message: PluginEventMessage;
|
|
23
|
+
}
|
|
24
|
+
export interface PluginEventDrainOptions {
|
|
25
|
+
|
|
26
|
+
maxPerKey?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface PluginEventDrainResult {
|
|
29
|
+
|
|
30
|
+
revision: number;
|
|
31
|
+
events: PluginEventMessage[];
|
|
32
|
+
}
|
|
33
|
+
export declare class PluginEventBuffer {
|
|
34
|
+
private readonly agentId;
|
|
35
|
+
private revision;
|
|
36
|
+
private records;
|
|
37
|
+
private dedup;
|
|
38
|
+
private nextSeq;
|
|
39
|
+
constructor(agentId: string);
|
|
40
|
+
get currentRevision(): number;
|
|
41
|
+
|
|
42
|
+
push(record: PluginEventRecord): boolean;
|
|
43
|
+
|
|
44
|
+
drain(opts?: PluginEventDrainOptions): PluginEventDrainResult;
|
|
45
|
+
|
|
46
|
+
private dropOldestLowestPriority;
|
|
47
|
+
|
|
48
|
+
private pruneDedup;
|
|
49
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const D=6e4,_=2e3,m=500,u={urgent:0,normal:1,low:2};class v{constructor(i){this.agentId=i,this.revision=0,this.records=[],this.dedup=new Map,this.nextSeq=1}get currentRevision(){return this.revision}push(i){const n=i.dedupKey||i.message.msgId,t=Date.now();if(n){const e=this.dedup.get(n);if(e!==void 0&&t-e<6e4)return!1;this.dedup.set(n,t)}for(this.pruneDedup(t),this.records.push({seq:this.nextSeq++,record:i});this.records.length>500;)this.dropOldestLowestPriority();return this.revision++,!0}drain(i={}){const n=Math.max(1,i.maxPerKey??10),t=this.revision;if(this.records.length===0)return{revision:t,events:[]};const e=[...this.records].sort((s,o)=>{const r=u[s.record.priority]-u[o.record.priority];return r!==0?r:s.seq-o.seq}),d=[],p=new Map,c=new Map;for(const s of e){const o=s.record,r=`${o.plugin}:${o.event}`,l=p.get(r)??0;if(l<n)p.set(r,l+1),d.push(s);else{const a=c.get(r);a?a.count++:c.set(r,{count:1,sample:o})}}const f=new Set(d.map(s=>s.seq));this.records=this.records.filter(s=>!f.has(s.seq));const h=d.map(s=>s.record.message);for(const[s,{count:o,sample:r}]of c)h.push({msgId:`plugin-collapse-${s}-${t}`,channel:"plugin-event",senderId:`plugin:${r.plugin}`,senderName:`\u63D2\u4EF6[${r.plugin}]`,receiverId:this.agentId||void 0,content:`\u3010\u63D2\u4EF6\u4E8B\u4EF6\u6298\u53E0\u3011\u63D2\u4EF6 ${r.plugin} \u7684 ${r.event} \u4E8B\u4EF6\u8FD8\u6709 ${o} \u6761\u5F85\u5904\u7406\uFF08\u672C\u6279\u6B21\u6BCF\u4E2A\u4E8B\u4EF6\u952E\u6700\u591A\u4EA4\u4ED8 ${n} \u6761\uFF0C\u5176\u4F59\u5DF2\u6298\u53E0\uFF1B\u7EE7\u7EED\u8C03\u7528\u63D2\u4EF6\u5DE5\u5177\u6216\u7B49\u5F85\u4E0B\u6279 poll \u4EA4\u4ED8\uFF09\u3002`,requireReply:!1,role:"system",timestamp:new Date(r.receivedAt).toISOString()});return{revision:t,events:h}}dropOldestLowestPriority(){if(this.records.length===0)return;let i=0,n=-1;for(let t=0;t<this.records.length;t++){const e=u[this.records[t].record.priority];if(e>n&&(n=e,i=t,e===2))break}this.records.splice(i,1)}pruneDedup(i){if(this.dedup.size<=2e3)return;for(const[e,d]of this.dedup)i-d>=6e4&&this.dedup.delete(e);if(this.dedup.size<=2e3)return;const n=[...this.dedup.entries()].sort((e,d)=>e[1]-d[1]),t=this.dedup.size-2e3;for(let e=0;e<t;e++)this.dedup.delete(n[e][0])}}export{v as PluginEventBuffer};
|
|
2
|
+
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
|
|
2
|
+
import { type ACodeCommandSpec, type ACodePluginBridge, type PluginCatalogSnapshot, type PluginInvokeContext, type PluginManageRequest, type PluginManageResult, type PluginSummary, type PluginToolInvocationResult, type PluginToolSchema, type JsonObject } from "@agentswork/acode";
|
|
3
|
+
import { type PluginEventMessage, type PluginEventPriority } from "./plugin-event-buffer.js";
|
|
4
|
+
export interface PluginUserConfigField {
|
|
5
|
+
key: string;
|
|
6
|
+
type?: "string" | "number" | "boolean";
|
|
7
|
+
required?: boolean;
|
|
8
|
+
sensitive?: boolean;
|
|
9
|
+
description?: string;
|
|
10
|
+
default?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PluginHandlerDef {
|
|
13
|
+
type: "process" | "module" | "mcp";
|
|
14
|
+
|
|
15
|
+
command?: string;
|
|
16
|
+
|
|
17
|
+
shell?: boolean;
|
|
18
|
+
|
|
19
|
+
stdin?: "none" | "params";
|
|
20
|
+
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
|
|
23
|
+
module?: string;
|
|
24
|
+
|
|
25
|
+
export?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface PluginToolDef {
|
|
28
|
+
name: string;
|
|
29
|
+
title?: string;
|
|
30
|
+
description: string;
|
|
31
|
+
inputSchema?: Record<string, unknown>;
|
|
32
|
+
handler: PluginHandlerDef;
|
|
33
|
+
}
|
|
34
|
+
export interface PluginTransportDef {
|
|
35
|
+
type: "command-stream" | "poll-command" | "http-callback";
|
|
36
|
+
|
|
37
|
+
command?: string;
|
|
38
|
+
|
|
39
|
+
intervalMs?: number;
|
|
40
|
+
|
|
41
|
+
restartBackoffMs?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface PluginListenerDef {
|
|
44
|
+
event: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
transport: PluginTransportDef;
|
|
47
|
+
|
|
48
|
+
delivery?: "poll" | "force" | "wake";
|
|
49
|
+
priority?: PluginEventPriority;
|
|
50
|
+
|
|
51
|
+
matcher?: Record<string, string | number | boolean | Array<string | number | boolean>>;
|
|
52
|
+
|
|
53
|
+
dedupKey?: string;
|
|
54
|
+
|
|
55
|
+
toolHints?: string[];
|
|
56
|
+
|
|
57
|
+
promptTemplate?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface PluginManifest {
|
|
60
|
+
name: string;
|
|
61
|
+
version?: string;
|
|
62
|
+
description?: string;
|
|
63
|
+
author?: Record<string, unknown>;
|
|
64
|
+
tools?: string;
|
|
65
|
+
listeners?: string;
|
|
66
|
+
commands?: string;
|
|
67
|
+
userConfig?: PluginUserConfigField[];
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
}
|
|
70
|
+
export declare function validateAgainstSchema(schema: unknown, value: unknown, path?: string): string[];
|
|
71
|
+
export interface PluginManagerOptions {
|
|
72
|
+
|
|
73
|
+
rootDir?: string;
|
|
74
|
+
|
|
75
|
+
runtimeRootDir?: string;
|
|
76
|
+
}
|
|
77
|
+
export declare class PluginManager {
|
|
78
|
+
private agents;
|
|
79
|
+
private readonly rootDir;
|
|
80
|
+
private readonly runtimeRootDir;
|
|
81
|
+
constructor(options?: PluginManagerOptions);
|
|
82
|
+
forAgent(agentId: string): ACodePluginBridge;
|
|
83
|
+
|
|
84
|
+
setOnPluginsChanged(cb: (agentId: string) => void): void;
|
|
85
|
+
private onPluginsChanged?;
|
|
86
|
+
private notifyPluginsChanged;
|
|
87
|
+
|
|
88
|
+
getCommandDirs(agentId: string): Promise<string[]>;
|
|
89
|
+
|
|
90
|
+
getPluginCommands(agentId: string): Promise<ACodeCommandSpec[]>;
|
|
91
|
+
private parsePluginCommandDir;
|
|
92
|
+
list(agentId: string): Promise<PluginSummary[]>;
|
|
93
|
+
|
|
94
|
+
private deployedPluginVersion;
|
|
95
|
+
getCatalog(agentId: string): Promise<PluginCatalogSnapshot>;
|
|
96
|
+
getToolSchema(agentId: string, qualifiedName: string): Promise<PluginToolSchema | null>;
|
|
97
|
+
invokeTool(agentId: string, pluginName: string, toolName: string, params: JsonObject, ctx?: PluginInvokeContext): Promise<PluginToolInvocationResult>;
|
|
98
|
+
private executeHandler;
|
|
99
|
+
private invokeProcessHandler;
|
|
100
|
+
private invokeModuleHandler;
|
|
101
|
+
|
|
102
|
+
private buildPluginEnv;
|
|
103
|
+
manage(agentId: string, request: PluginManageRequest): Promise<PluginManageResult>;
|
|
104
|
+
private doManage;
|
|
105
|
+
private installPlugin;
|
|
106
|
+
|
|
107
|
+
installFromZip(agentId: string, zipBuffer: Buffer, originalName: string, config?: Record<string, string>): Promise<PluginManageResult>;
|
|
108
|
+
|
|
109
|
+
private installFromDirectory;
|
|
110
|
+
private uninstallPlugin;
|
|
111
|
+
private reloadPlugin;
|
|
112
|
+
private setEnabled;
|
|
113
|
+
private deployedDir;
|
|
114
|
+
private deployedManifestFile;
|
|
115
|
+
|
|
116
|
+
private deployedPluginDir;
|
|
117
|
+
|
|
118
|
+
private legacySharedDir;
|
|
119
|
+
private readSharedManifest;
|
|
120
|
+
private writeSharedManifest;
|
|
121
|
+
|
|
122
|
+
private migrateLegacySharedIfNeeded;
|
|
123
|
+
|
|
124
|
+
private deployedPluginHealthy;
|
|
125
|
+
|
|
126
|
+
private runtimeDirFor;
|
|
127
|
+
private runtimeLinkPath;
|
|
128
|
+
|
|
129
|
+
private ensureRuntimeLink;
|
|
130
|
+
|
|
131
|
+
private removeRuntimeLink;
|
|
132
|
+
|
|
133
|
+
saveSharedPlugin(zipBuffer: Buffer, originalName: string, defaultEnabled?: boolean, sha256?: string): Promise<{
|
|
134
|
+
ok: boolean;
|
|
135
|
+
error?: string;
|
|
136
|
+
pluginName?: string;
|
|
137
|
+
}>;
|
|
138
|
+
|
|
139
|
+
private deployPluginZipToPersistentDir;
|
|
140
|
+
|
|
141
|
+
private suspendDeployedPluginAcrossAgents;
|
|
142
|
+
|
|
143
|
+
applySharedToKnownAgents(): Promise<Array<{
|
|
144
|
+
agentId: string;
|
|
145
|
+
installed: string[];
|
|
146
|
+
}>>;
|
|
147
|
+
|
|
148
|
+
private syncSharedIntoStateQueued;
|
|
149
|
+
|
|
150
|
+
private effectiveSharedEnabled;
|
|
151
|
+
|
|
152
|
+
private templatePullInFlight;
|
|
153
|
+
|
|
154
|
+
private backgroundTemplatePulls;
|
|
155
|
+
|
|
156
|
+
private pullTemplatePluginsFromCapabilities;
|
|
157
|
+
|
|
158
|
+
private queueTemplatePull;
|
|
159
|
+
|
|
160
|
+
private syncSharedIntoState;
|
|
161
|
+
|
|
162
|
+
private cleanupRuntimeDir;
|
|
163
|
+
|
|
164
|
+
applyCapabilities(agentId: string): Promise<void>;
|
|
165
|
+
drainEvents(agentId: string, opts?: {
|
|
166
|
+
maxPerKey?: number;
|
|
167
|
+
}): Promise<{
|
|
168
|
+
revision: number;
|
|
169
|
+
events: PluginEventMessage[];
|
|
170
|
+
catalog: PluginCatalogSnapshot;
|
|
171
|
+
|
|
172
|
+
compactionSeq: number;
|
|
173
|
+
}>;
|
|
174
|
+
|
|
175
|
+
markAgentCompacted(agentId: string): void;
|
|
176
|
+
|
|
177
|
+
enqueueExternalEvent(agentId: string, pluginName: string, payload: Record<string, unknown>): Promise<{
|
|
178
|
+
ok: boolean;
|
|
179
|
+
error?: string;
|
|
180
|
+
}>;
|
|
181
|
+
private agentState;
|
|
182
|
+
|
|
183
|
+
private hydrate;
|
|
184
|
+
private installedFile;
|
|
185
|
+
private persistInstalled;
|
|
186
|
+
private readJsonFile;
|
|
187
|
+
private loadManifestOnly;
|
|
188
|
+
private loadPluginFromDir;
|
|
189
|
+
|
|
190
|
+
private ensureListenersRunning;
|
|
191
|
+
private startAllListeners;
|
|
192
|
+
private stopAllListeners;
|
|
193
|
+
private startListener;
|
|
194
|
+
private spawnListenerChild;
|
|
195
|
+
private scheduleListenerRestart;
|
|
196
|
+
|
|
197
|
+
private pollListenerOnce;
|
|
198
|
+
private stopListener;
|
|
199
|
+
private handleListenerLine;
|
|
200
|
+
private enqueueEvent;
|
|
201
|
+
private requiredParamsOf;
|
|
202
|
+
private toSummary;
|
|
203
|
+
getLogs(agentId: string, pluginName: string): Promise<{
|
|
204
|
+
ok: boolean;
|
|
205
|
+
error?: string;
|
|
206
|
+
logs: string[];
|
|
207
|
+
}>;
|
|
208
|
+
|
|
209
|
+
stopAgent(agentId: string): Promise<void>;
|
|
210
|
+
|
|
211
|
+
stopAll(): Promise<void>;
|
|
212
|
+
|
|
213
|
+
listDeployed(): Promise<Array<{
|
|
214
|
+
pluginName: string;
|
|
215
|
+
version?: string;
|
|
216
|
+
fileName: string;
|
|
217
|
+
defaultEnabled: boolean;
|
|
218
|
+
sha256?: string;
|
|
219
|
+
deployed: boolean;
|
|
220
|
+
}>>;
|
|
221
|
+
|
|
222
|
+
deployedDefaultEnabled(): Record<string, boolean>;
|
|
223
|
+
|
|
224
|
+
removeDeployedPlugin(pluginName: string): Promise<{
|
|
225
|
+
ok: boolean;
|
|
226
|
+
error?: string;
|
|
227
|
+
}>;
|
|
228
|
+
}
|
|
229
|
+
export declare function splitQualifiedName(qualifiedName: string): {
|
|
230
|
+
plugin: string;
|
|
231
|
+
tool: string;
|
|
232
|
+
} | null;
|
|
233
|
+
|
|
234
|
+
export declare function isValidPluginName(name: unknown): name is string;
|
|
235
|
+
export declare function validateManifest(manifest: Record<string, unknown>): string | null;
|
|
236
|
+
|
|
237
|
+
export declare function renderCommandArgv(command: string, lookup: Record<string, unknown>): string[];
|
|
238
|
+
|
|
239
|
+
export declare const pluginManager: PluginManager;
|
|
240
|
+
export declare const reconcilePluginsDefaultsFromDeployed: () => number;
|