@defai.digital/ax-cli 4.4.7 → 4.4.11
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/bin/ax-cli +1 -5
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +158 -9
- package/dist/index.js.map +1 -1
- package/dist/setup.d.ts +27 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +591 -0
- package/dist/setup.js.map +1 -0
- package/package.json +43 -135
- package/LICENSE +0 -22
- package/README.md +0 -420
- package/config-defaults/messages.yaml +0 -75
- package/config-defaults/models.yaml +0 -57
- package/config-defaults/prompts.yaml +0 -948
- package/config-defaults/settings.yaml +0 -157
- package/dist/agent/agent-executor.d.ts +0 -61
- package/dist/agent/agent-executor.js +0 -194
- package/dist/agent/agent-executor.js.map +0 -1
- package/dist/agent/agent-router.d.ts +0 -68
- package/dist/agent/agent-router.js +0 -242
- package/dist/agent/agent-router.js.map +0 -1
- package/dist/agent/context-manager.d.ts +0 -122
- package/dist/agent/context-manager.js +0 -406
- package/dist/agent/context-manager.js.map +0 -1
- package/dist/agent/core/index.d.ts +0 -8
- package/dist/agent/core/index.js +0 -9
- package/dist/agent/core/index.js.map +0 -1
- package/dist/agent/core/types.d.ts +0 -92
- package/dist/agent/core/types.js +0 -11
- package/dist/agent/core/types.js.map +0 -1
- package/dist/agent/dependency-resolver.d.ts +0 -90
- package/dist/agent/dependency-resolver.js +0 -366
- package/dist/agent/dependency-resolver.js.map +0 -1
- package/dist/agent/execution/index.d.ts +0 -9
- package/dist/agent/execution/index.js +0 -9
- package/dist/agent/execution/index.js.map +0 -1
- package/dist/agent/execution/tool-executor.d.ts +0 -93
- package/dist/agent/execution/tool-executor.js +0 -552
- package/dist/agent/execution/tool-executor.js.map +0 -1
- package/dist/agent/index.d.ts +0 -14
- package/dist/agent/index.js +0 -145
- package/dist/agent/index.js.map +0 -1
- package/dist/agent/llm-agent.d.ts +0 -368
- package/dist/agent/llm-agent.js +0 -1931
- package/dist/agent/llm-agent.js.map +0 -1
- package/dist/agent/loop-detector.d.ts +0 -72
- package/dist/agent/loop-detector.js +0 -335
- package/dist/agent/loop-detector.js.map +0 -1
- package/dist/agent/parallel-tools.d.ts +0 -69
- package/dist/agent/parallel-tools.js +0 -188
- package/dist/agent/parallel-tools.js.map +0 -1
- package/dist/agent/planning/index.d.ts +0 -9
- package/dist/agent/planning/index.js +0 -9
- package/dist/agent/planning/index.js.map +0 -1
- package/dist/agent/planning/plan-executor.d.ts +0 -79
- package/dist/agent/planning/plan-executor.js +0 -240
- package/dist/agent/planning/plan-executor.js.map +0 -1
- package/dist/agent/progress-tracker.d.ts +0 -94
- package/dist/agent/progress-tracker.js +0 -225
- package/dist/agent/progress-tracker.js.map +0 -1
- package/dist/agent/specialized/analysis-agent.d.ts +0 -11
- package/dist/agent/specialized/analysis-agent.js +0 -24
- package/dist/agent/specialized/analysis-agent.js.map +0 -1
- package/dist/agent/specialized/debug-agent.d.ts +0 -11
- package/dist/agent/specialized/debug-agent.js +0 -46
- package/dist/agent/specialized/debug-agent.js.map +0 -1
- package/dist/agent/specialized/documentation-agent.d.ts +0 -11
- package/dist/agent/specialized/documentation-agent.js +0 -24
- package/dist/agent/specialized/documentation-agent.js.map +0 -1
- package/dist/agent/specialized/index.d.ts +0 -11
- package/dist/agent/specialized/index.js +0 -12
- package/dist/agent/specialized/index.js.map +0 -1
- package/dist/agent/specialized/performance-agent.d.ts +0 -11
- package/dist/agent/specialized/performance-agent.js +0 -24
- package/dist/agent/specialized/performance-agent.js.map +0 -1
- package/dist/agent/specialized/refactoring-agent.d.ts +0 -11
- package/dist/agent/specialized/refactoring-agent.js +0 -24
- package/dist/agent/specialized/refactoring-agent.js.map +0 -1
- package/dist/agent/specialized/testing-agent.d.ts +0 -11
- package/dist/agent/specialized/testing-agent.js +0 -24
- package/dist/agent/specialized/testing-agent.js.map +0 -1
- package/dist/agent/status-reporter.d.ts +0 -114
- package/dist/agent/status-reporter.js +0 -335
- package/dist/agent/status-reporter.js.map +0 -1
- package/dist/agent/streaming/index.d.ts +0 -9
- package/dist/agent/streaming/index.js +0 -9
- package/dist/agent/streaming/index.js.map +0 -1
- package/dist/agent/streaming/stream-handler.d.ts +0 -62
- package/dist/agent/streaming/stream-handler.js +0 -217
- package/dist/agent/streaming/stream-handler.js.map +0 -1
- package/dist/agent/subagent-orchestrator.d.ts +0 -166
- package/dist/agent/subagent-orchestrator.js +0 -487
- package/dist/agent/subagent-orchestrator.js.map +0 -1
- package/dist/agent/subagent-types.d.ts +0 -261
- package/dist/agent/subagent-types.js +0 -257
- package/dist/agent/subagent-types.js.map +0 -1
- package/dist/agent/subagent.d.ts +0 -116
- package/dist/agent/subagent.js +0 -507
- package/dist/agent/subagent.js.map +0 -1
- package/dist/checkpoint/index.d.ts +0 -9
- package/dist/checkpoint/index.js +0 -11
- package/dist/checkpoint/index.js.map +0 -1
- package/dist/checkpoint/manager.d.ts +0 -101
- package/dist/checkpoint/manager.js +0 -407
- package/dist/checkpoint/manager.js.map +0 -1
- package/dist/checkpoint/storage.d.ts +0 -39
- package/dist/checkpoint/storage.js +0 -350
- package/dist/checkpoint/storage.js.map +0 -1
- package/dist/checkpoint/types.d.ts +0 -111
- package/dist/checkpoint/types.js +0 -17
- package/dist/checkpoint/types.js.map +0 -1
- package/dist/commands/cache.d.ts +0 -7
- package/dist/commands/cache.js +0 -284
- package/dist/commands/cache.js.map +0 -1
- package/dist/commands/custom-commands.d.ts +0 -77
- package/dist/commands/custom-commands.js +0 -251
- package/dist/commands/custom-commands.js.map +0 -1
- package/dist/commands/design.d.ts +0 -18
- package/dist/commands/design.js +0 -511
- package/dist/commands/design.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -6
- package/dist/commands/doctor.js +0 -773
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/frontend.d.ts +0 -9
- package/dist/commands/frontend.js +0 -645
- package/dist/commands/frontend.js.map +0 -1
- package/dist/commands/init/wizard.d.ts +0 -55
- package/dist/commands/init/wizard.js +0 -189
- package/dist/commands/init/wizard.js.map +0 -1
- package/dist/commands/init.d.ts +0 -8
- package/dist/commands/init.js +0 -195
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/mcp-migrate.d.ts +0 -9
- package/dist/commands/mcp-migrate.js +0 -175
- package/dist/commands/mcp-migrate.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -2
- package/dist/commands/mcp.js +0 -1292
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/memory.d.ts +0 -6
- package/dist/commands/memory.js +0 -555
- package/dist/commands/memory.js.map +0 -1
- package/dist/commands/models.d.ts +0 -5
- package/dist/commands/models.js +0 -213
- package/dist/commands/models.js.map +0 -1
- package/dist/commands/plan.d.ts +0 -43
- package/dist/commands/plan.js +0 -362
- package/dist/commands/plan.js.map +0 -1
- package/dist/commands/rewind.d.ts +0 -19
- package/dist/commands/rewind.js +0 -221
- package/dist/commands/rewind.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -14
- package/dist/commands/setup.js +0 -733
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/status.d.ts +0 -7
- package/dist/commands/status.js +0 -437
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/templates.d.ts +0 -5
- package/dist/commands/templates.js +0 -245
- package/dist/commands/templates.js.map +0 -1
- package/dist/commands/update.d.ts +0 -49
- package/dist/commands/update.js +0 -366
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/usage.d.ts +0 -8
- package/dist/commands/usage.js +0 -264
- package/dist/commands/usage.js.map +0 -1
- package/dist/commands/vscode.d.ts +0 -7
- package/dist/commands/vscode.js +0 -419
- package/dist/commands/vscode.js.map +0 -1
- package/dist/constants.d.ts +0 -236
- package/dist/constants.js +0 -288
- package/dist/constants.js.map +0 -1
- package/dist/design/figma-alias.d.ts +0 -170
- package/dist/design/figma-alias.js +0 -577
- package/dist/design/figma-alias.js.map +0 -1
- package/dist/design/figma-audit.d.ts +0 -40
- package/dist/design/figma-audit.js +0 -383
- package/dist/design/figma-audit.js.map +0 -1
- package/dist/design/figma-client.d.ts +0 -131
- package/dist/design/figma-client.js +0 -369
- package/dist/design/figma-client.js.map +0 -1
- package/dist/design/figma-map.d.ts +0 -29
- package/dist/design/figma-map.js +0 -346
- package/dist/design/figma-map.js.map +0 -1
- package/dist/design/figma-tokens.d.ts +0 -73
- package/dist/design/figma-tokens.js +0 -448
- package/dist/design/figma-tokens.js.map +0 -1
- package/dist/design/index.d.ts +0 -13
- package/dist/design/index.js +0 -20
- package/dist/design/index.js.map +0 -1
- package/dist/design/types.d.ts +0 -98
- package/dist/design/types.js +0 -9
- package/dist/design/types.js.map +0 -1
- package/dist/hooks/hook-runner.d.ts +0 -142
- package/dist/hooks/hook-runner.js +0 -436
- package/dist/hooks/hook-runner.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -9
- package/dist/hooks/index.js +0 -10
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/manager.d.ts +0 -84
- package/dist/hooks/manager.js +0 -348
- package/dist/hooks/manager.js.map +0 -1
- package/dist/hooks/types.d.ts +0 -134
- package/dist/hooks/types.js +0 -9
- package/dist/hooks/types.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/ipc/index.d.ts +0 -9
- package/dist/ipc/index.js +0 -10
- package/dist/ipc/index.js.map +0 -1
- package/dist/ipc/vscode-client.d.ts +0 -200
- package/dist/ipc/vscode-client.js +0 -495
- package/dist/ipc/vscode-client.js.map +0 -1
- package/dist/llm/client.d.ts +0 -205
- package/dist/llm/client.js +0 -735
- package/dist/llm/client.js.map +0 -1
- package/dist/llm/tools.d.ts +0 -102
- package/dist/llm/tools.js +0 -275
- package/dist/llm/tools.js.map +0 -1
- package/dist/llm/types.d.ts +0 -428
- package/dist/llm/types.js +0 -194
- package/dist/llm/types.js.map +0 -1
- package/dist/mcp/automatosx-auto-discovery.d.ts +0 -66
- package/dist/mcp/automatosx-auto-discovery.js +0 -169
- package/dist/mcp/automatosx-auto-discovery.js.map +0 -1
- package/dist/mcp/automatosx-loader.d.ts +0 -99
- package/dist/mcp/automatosx-loader.js +0 -250
- package/dist/mcp/automatosx-loader.js.map +0 -1
- package/dist/mcp/cancellation.d.ts +0 -182
- package/dist/mcp/cancellation.js +0 -275
- package/dist/mcp/cancellation.js.map +0 -1
- package/dist/mcp/client-v2.d.ts +0 -500
- package/dist/mcp/client-v2.js +0 -1433
- package/dist/mcp/client-v2.js.map +0 -1
- package/dist/mcp/client.d.ts +0 -170
- package/dist/mcp/client.js +0 -232
- package/dist/mcp/client.js.map +0 -1
- package/dist/mcp/config-detector.d.ts +0 -90
- package/dist/mcp/config-detector.js +0 -250
- package/dist/mcp/config-detector.js.map +0 -1
- package/dist/mcp/config-migrator.d.ts +0 -68
- package/dist/mcp/config-migrator.js +0 -291
- package/dist/mcp/config-migrator.js.map +0 -1
- package/dist/mcp/config.d.ts +0 -24
- package/dist/mcp/config.js +0 -273
- package/dist/mcp/config.js.map +0 -1
- package/dist/mcp/constants.d.ts +0 -66
- package/dist/mcp/constants.js +0 -85
- package/dist/mcp/constants.js.map +0 -1
- package/dist/mcp/content-length-transport.d.ts +0 -106
- package/dist/mcp/content-length-transport.js +0 -413
- package/dist/mcp/content-length-transport.js.map +0 -1
- package/dist/mcp/debug.d.ts +0 -211
- package/dist/mcp/debug.js +0 -404
- package/dist/mcp/debug.js.map +0 -1
- package/dist/mcp/error-formatter.d.ts +0 -40
- package/dist/mcp/error-formatter.js +0 -207
- package/dist/mcp/error-formatter.js.map +0 -1
- package/dist/mcp/error-remediation.d.ts +0 -45
- package/dist/mcp/error-remediation.js +0 -291
- package/dist/mcp/error-remediation.js.map +0 -1
- package/dist/mcp/health.d.ts +0 -120
- package/dist/mcp/health.js +0 -267
- package/dist/mcp/health.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -56
- package/dist/mcp/index.js +0 -89
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/invariants.d.ts +0 -141
- package/dist/mcp/invariants.js +0 -243
- package/dist/mcp/invariants.js.map +0 -1
- package/dist/mcp/mutex-safe.d.ts +0 -151
- package/dist/mcp/mutex-safe.js +0 -260
- package/dist/mcp/mutex-safe.js.map +0 -1
- package/dist/mcp/progress.d.ts +0 -155
- package/dist/mcp/progress.js +0 -252
- package/dist/mcp/progress.js.map +0 -1
- package/dist/mcp/prompts.d.ts +0 -68
- package/dist/mcp/prompts.js +0 -129
- package/dist/mcp/prompts.js.map +0 -1
- package/dist/mcp/provider-mcp-loader.d.ts +0 -130
- package/dist/mcp/provider-mcp-loader.js +0 -292
- package/dist/mcp/provider-mcp-loader.js.map +0 -1
- package/dist/mcp/reconnection.d.ts +0 -101
- package/dist/mcp/reconnection.js +0 -253
- package/dist/mcp/reconnection.js.map +0 -1
- package/dist/mcp/registry.d.ts +0 -75
- package/dist/mcp/registry.js +0 -276
- package/dist/mcp/registry.js.map +0 -1
- package/dist/mcp/resources.d.ts +0 -58
- package/dist/mcp/resources.js +0 -144
- package/dist/mcp/resources.js.map +0 -1
- package/dist/mcp/schema-validator.d.ts +0 -82
- package/dist/mcp/schema-validator.js +0 -161
- package/dist/mcp/schema-validator.js.map +0 -1
- package/dist/mcp/ssrf-protection.d.ts +0 -86
- package/dist/mcp/ssrf-protection.js +0 -311
- package/dist/mcp/ssrf-protection.js.map +0 -1
- package/dist/mcp/subscriptions.d.ts +0 -168
- package/dist/mcp/subscriptions.js +0 -248
- package/dist/mcp/subscriptions.js.map +0 -1
- package/dist/mcp/templates.d.ts +0 -52
- package/dist/mcp/templates.js +0 -627
- package/dist/mcp/templates.js.map +0 -1
- package/dist/mcp/transports.d.ts +0 -80
- package/dist/mcp/transports.js +0 -237
- package/dist/mcp/transports.js.map +0 -1
- package/dist/mcp/type-safety.d.ts +0 -225
- package/dist/mcp/type-safety.js +0 -237
- package/dist/mcp/type-safety.js.map +0 -1
- package/dist/mcp/validation.d.ts +0 -29
- package/dist/mcp/validation.js +0 -339
- package/dist/mcp/validation.js.map +0 -1
- package/dist/mcp/zai-detector.d.ts +0 -63
- package/dist/mcp/zai-detector.js +0 -193
- package/dist/mcp/zai-detector.js.map +0 -1
- package/dist/mcp/zai-templates.d.ts +0 -90
- package/dist/mcp/zai-templates.js +0 -157
- package/dist/mcp/zai-templates.js.map +0 -1
- package/dist/memory/context-generator.d.ts +0 -84
- package/dist/memory/context-generator.js +0 -546
- package/dist/memory/context-generator.js.map +0 -1
- package/dist/memory/context-injector.d.ts +0 -97
- package/dist/memory/context-injector.js +0 -159
- package/dist/memory/context-injector.js.map +0 -1
- package/dist/memory/context-store.d.ts +0 -103
- package/dist/memory/context-store.js +0 -264
- package/dist/memory/context-store.js.map +0 -1
- package/dist/memory/index.d.ts +0 -43
- package/dist/memory/index.js +0 -49
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/provider-context-store.d.ts +0 -127
- package/dist/memory/provider-context-store.js +0 -385
- package/dist/memory/provider-context-store.js.map +0 -1
- package/dist/memory/schemas.d.ts +0 -118
- package/dist/memory/schemas.js +0 -106
- package/dist/memory/schemas.js.map +0 -1
- package/dist/memory/stats-collector.d.ts +0 -73
- package/dist/memory/stats-collector.js +0 -170
- package/dist/memory/stats-collector.js.map +0 -1
- package/dist/memory/types.d.ts +0 -177
- package/dist/memory/types.js +0 -73
- package/dist/memory/types.js.map +0 -1
- package/dist/permissions/index.d.ts +0 -6
- package/dist/permissions/index.js +0 -7
- package/dist/permissions/index.js.map +0 -1
- package/dist/permissions/permission-manager.d.ts +0 -149
- package/dist/permissions/permission-manager.js +0 -410
- package/dist/permissions/permission-manager.js.map +0 -1
- package/dist/planner/dependency-resolver.d.ts +0 -72
- package/dist/planner/dependency-resolver.js +0 -272
- package/dist/planner/dependency-resolver.js.map +0 -1
- package/dist/planner/index.d.ts +0 -12
- package/dist/planner/index.js +0 -28
- package/dist/planner/index.js.map +0 -1
- package/dist/planner/plan-generator.d.ts +0 -74
- package/dist/planner/plan-generator.js +0 -244
- package/dist/planner/plan-generator.js.map +0 -1
- package/dist/planner/plan-storage.d.ts +0 -113
- package/dist/planner/plan-storage.js +0 -398
- package/dist/planner/plan-storage.js.map +0 -1
- package/dist/planner/prompts/planning-prompt.d.ts +0 -62
- package/dist/planner/prompts/planning-prompt.js +0 -414
- package/dist/planner/prompts/planning-prompt.js.map +0 -1
- package/dist/planner/task-planner.d.ts +0 -139
- package/dist/planner/task-planner.js +0 -532
- package/dist/planner/task-planner.js.map +0 -1
- package/dist/planner/token-estimator.d.ts +0 -63
- package/dist/planner/token-estimator.js +0 -295
- package/dist/planner/token-estimator.js.map +0 -1
- package/dist/planner/types.d.ts +0 -425
- package/dist/planner/types.js +0 -213
- package/dist/planner/types.js.map +0 -1
- package/dist/provider/config.d.ts +0 -227
- package/dist/provider/config.js +0 -430
- package/dist/provider/config.js.map +0 -1
- package/dist/schemas/api-schemas.d.ts +0 -45
- package/dist/schemas/api-schemas.js +0 -129
- package/dist/schemas/api-schemas.js.map +0 -1
- package/dist/schemas/confirmation-schemas.d.ts +0 -39
- package/dist/schemas/confirmation-schemas.js +0 -48
- package/dist/schemas/confirmation-schemas.js.map +0 -1
- package/dist/schemas/index-unified.d.ts +0 -12
- package/dist/schemas/index-unified.js +0 -17
- package/dist/schemas/index-unified.js.map +0 -1
- package/dist/schemas/index.d.ts +0 -83
- package/dist/schemas/index.js +0 -139
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/settings-schemas.d.ts +0 -186
- package/dist/schemas/settings-schemas.js +0 -324
- package/dist/schemas/settings-schemas.js.map +0 -1
- package/dist/schemas/tool-schemas.d.ts +0 -127
- package/dist/schemas/tool-schemas.js +0 -84
- package/dist/schemas/tool-schemas.js.map +0 -1
- package/dist/schemas/yaml-schemas.d.ts +0 -231
- package/dist/schemas/yaml-schemas.js +0 -199
- package/dist/schemas/yaml-schemas.js.map +0 -1
- package/dist/sdk/errors.d.ts +0 -100
- package/dist/sdk/errors.js +0 -138
- package/dist/sdk/errors.js.map +0 -1
- package/dist/sdk/index.d.ts +0 -901
- package/dist/sdk/index.js +0 -1272
- package/dist/sdk/index.js.map +0 -1
- package/dist/sdk/progress-reporter.d.ts +0 -123
- package/dist/sdk/progress-reporter.js +0 -220
- package/dist/sdk/progress-reporter.js.map +0 -1
- package/dist/sdk/testing.d.ts +0 -427
- package/dist/sdk/testing.js +0 -725
- package/dist/sdk/testing.js.map +0 -1
- package/dist/sdk/tool-registry.d.ts +0 -194
- package/dist/sdk/tool-registry.js +0 -326
- package/dist/sdk/tool-registry.js.map +0 -1
- package/dist/sdk/types.d.ts +0 -53
- package/dist/sdk/types.js +0 -8
- package/dist/sdk/types.js.map +0 -1
- package/dist/sdk/unified-logger.d.ts +0 -173
- package/dist/sdk/unified-logger.js +0 -327
- package/dist/sdk/unified-logger.js.map +0 -1
- package/dist/sdk/version.d.ts +0 -163
- package/dist/sdk/version.js +0 -205
- package/dist/sdk/version.js.map +0 -1
- package/dist/tools/ask-user.d.ts +0 -126
- package/dist/tools/ask-user.js +0 -290
- package/dist/tools/ask-user.js.map +0 -1
- package/dist/tools/ax-agent.d.ts +0 -71
- package/dist/tools/ax-agent.js +0 -283
- package/dist/tools/ax-agent.js.map +0 -1
- package/dist/tools/bash-output.d.ts +0 -25
- package/dist/tools/bash-output.js +0 -146
- package/dist/tools/bash-output.js.map +0 -1
- package/dist/tools/bash.d.ts +0 -67
- package/dist/tools/bash.js +0 -522
- package/dist/tools/bash.js.map +0 -1
- package/dist/tools/confirmation-tool.d.ts +0 -16
- package/dist/tools/confirmation-tool.js +0 -76
- package/dist/tools/confirmation-tool.js.map +0 -1
- package/dist/tools/definitions/ask-user.d.ts +0 -8
- package/dist/tools/definitions/ask-user.js +0 -168
- package/dist/tools/definitions/ask-user.js.map +0 -1
- package/dist/tools/definitions/ax-agent.d.ts +0 -8
- package/dist/tools/definitions/ax-agent.js +0 -276
- package/dist/tools/definitions/ax-agent.js.map +0 -1
- package/dist/tools/definitions/bash-output.d.ts +0 -7
- package/dist/tools/definitions/bash-output.js +0 -78
- package/dist/tools/definitions/bash-output.js.map +0 -1
- package/dist/tools/definitions/bash.d.ts +0 -8
- package/dist/tools/definitions/bash.js +0 -152
- package/dist/tools/definitions/bash.js.map +0 -1
- package/dist/tools/definitions/create-file.d.ts +0 -7
- package/dist/tools/definitions/create-file.js +0 -129
- package/dist/tools/definitions/create-file.js.map +0 -1
- package/dist/tools/definitions/design.d.ts +0 -12
- package/dist/tools/definitions/design.js +0 -368
- package/dist/tools/definitions/design.js.map +0 -1
- package/dist/tools/definitions/index.d.ts +0 -49
- package/dist/tools/definitions/index.js +0 -87
- package/dist/tools/definitions/index.js.map +0 -1
- package/dist/tools/definitions/multi-edit.d.ts +0 -7
- package/dist/tools/definitions/multi-edit.js +0 -123
- package/dist/tools/definitions/multi-edit.js.map +0 -1
- package/dist/tools/definitions/search.d.ts +0 -7
- package/dist/tools/definitions/search.js +0 -159
- package/dist/tools/definitions/search.js.map +0 -1
- package/dist/tools/definitions/str-replace-editor.d.ts +0 -7
- package/dist/tools/definitions/str-replace-editor.js +0 -145
- package/dist/tools/definitions/str-replace-editor.js.map +0 -1
- package/dist/tools/definitions/todo.d.ts +0 -8
- package/dist/tools/definitions/todo.js +0 -261
- package/dist/tools/definitions/todo.js.map +0 -1
- package/dist/tools/definitions/view-file.d.ts +0 -7
- package/dist/tools/definitions/view-file.js +0 -111
- package/dist/tools/definitions/view-file.js.map +0 -1
- package/dist/tools/design-tool.d.ts +0 -68
- package/dist/tools/design-tool.js +0 -299
- package/dist/tools/design-tool.js.map +0 -1
- package/dist/tools/format-generators.d.ts +0 -62
- package/dist/tools/format-generators.js +0 -291
- package/dist/tools/format-generators.js.map +0 -1
- package/dist/tools/index.d.ts +0 -8
- package/dist/tools/index.js +0 -11
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/priority-registry.d.ts +0 -124
- package/dist/tools/priority-registry.js +0 -401
- package/dist/tools/priority-registry.js.map +0 -1
- package/dist/tools/priority.d.ts +0 -158
- package/dist/tools/priority.js +0 -350
- package/dist/tools/priority.js.map +0 -1
- package/dist/tools/registry.d.ts +0 -146
- package/dist/tools/registry.js +0 -171
- package/dist/tools/registry.js.map +0 -1
- package/dist/tools/search.d.ts +0 -85
- package/dist/tools/search.js +0 -430
- package/dist/tools/search.js.map +0 -1
- package/dist/tools/text-editor.d.ts +0 -87
- package/dist/tools/text-editor.js +0 -1369
- package/dist/tools/text-editor.js.map +0 -1
- package/dist/tools/todo-tool.d.ts +0 -20
- package/dist/tools/todo-tool.js +0 -186
- package/dist/tools/todo-tool.js.map +0 -1
- package/dist/tools/types.d.ts +0 -175
- package/dist/tools/types.js +0 -11
- package/dist/tools/types.js.map +0 -1
- package/dist/types/index.d.ts +0 -30
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/types/project-analysis.d.ts +0 -84
- package/dist/types/project-analysis.js +0 -5
- package/dist/types/project-analysis.js.map +0 -1
- package/dist/types/template.d.ts +0 -53
- package/dist/types/template.js +0 -5
- package/dist/types/template.js.map +0 -1
- package/dist/ui/app.d.ts +0 -7
- package/dist/ui/app.js +0 -102
- package/dist/ui/app.js.map +0 -1
- package/dist/ui/components/api-key-input.d.ts +0 -7
- package/dist/ui/components/api-key-input.js +0 -92
- package/dist/ui/components/api-key-input.js.map +0 -1
- package/dist/ui/components/chat-history.d.ts +0 -12
- package/dist/ui/components/chat-history.js +0 -391
- package/dist/ui/components/chat-history.js.map +0 -1
- package/dist/ui/components/chat-input.d.ts +0 -13
- package/dist/ui/components/chat-input.js +0 -179
- package/dist/ui/components/chat-input.js.map +0 -1
- package/dist/ui/components/chat-interface.d.ts +0 -11
- package/dist/ui/components/chat-interface.js +0 -830
- package/dist/ui/components/chat-interface.js.map +0 -1
- package/dist/ui/components/collapsible-tool-result.d.ts +0 -42
- package/dist/ui/components/collapsible-tool-result.js +0 -216
- package/dist/ui/components/collapsible-tool-result.js.map +0 -1
- package/dist/ui/components/command-suggestions.d.ts +0 -29
- package/dist/ui/components/command-suggestions.js +0 -88
- package/dist/ui/components/command-suggestions.js.map +0 -1
- package/dist/ui/components/confirmation-dialog.d.ts +0 -11
- package/dist/ui/components/confirmation-dialog.js +0 -100
- package/dist/ui/components/confirmation-dialog.js.map +0 -1
- package/dist/ui/components/context-breakdown.d.ts +0 -23
- package/dist/ui/components/context-breakdown.js +0 -124
- package/dist/ui/components/context-breakdown.js.map +0 -1
- package/dist/ui/components/diff-renderer.d.ts +0 -13
- package/dist/ui/components/diff-renderer.js +0 -192
- package/dist/ui/components/diff-renderer.js.map +0 -1
- package/dist/ui/components/index.d.ts +0 -18
- package/dist/ui/components/index.js +0 -20
- package/dist/ui/components/index.js.map +0 -1
- package/dist/ui/components/keyboard-help.d.ts +0 -17
- package/dist/ui/components/keyboard-help.js +0 -122
- package/dist/ui/components/keyboard-help.js.map +0 -1
- package/dist/ui/components/keyboard-hints.d.ts +0 -35
- package/dist/ui/components/keyboard-hints.js +0 -142
- package/dist/ui/components/keyboard-hints.js.map +0 -1
- package/dist/ui/components/loading-spinner.d.ts +0 -9
- package/dist/ui/components/loading-spinner.js +0 -120
- package/dist/ui/components/loading-spinner.js.map +0 -1
- package/dist/ui/components/mcp-dashboard.d.ts +0 -15
- package/dist/ui/components/mcp-dashboard.js +0 -520
- package/dist/ui/components/mcp-dashboard.js.map +0 -1
- package/dist/ui/components/mcp-status.d.ts +0 -5
- package/dist/ui/components/mcp-status.js +0 -58
- package/dist/ui/components/mcp-status.js.map +0 -1
- package/dist/ui/components/model-selection.d.ts +0 -12
- package/dist/ui/components/model-selection.js +0 -17
- package/dist/ui/components/model-selection.js.map +0 -1
- package/dist/ui/components/phase-progress.d.ts +0 -21
- package/dist/ui/components/phase-progress.js +0 -185
- package/dist/ui/components/phase-progress.js.map +0 -1
- package/dist/ui/components/question-dialog.d.ts +0 -17
- package/dist/ui/components/question-dialog.js +0 -181
- package/dist/ui/components/question-dialog.js.map +0 -1
- package/dist/ui/components/quick-actions.d.ts +0 -12
- package/dist/ui/components/quick-actions.js +0 -171
- package/dist/ui/components/quick-actions.js.map +0 -1
- package/dist/ui/components/reasoning-display.d.ts +0 -36
- package/dist/ui/components/reasoning-display.js +0 -46
- package/dist/ui/components/reasoning-display.js.map +0 -1
- package/dist/ui/components/status-bar.d.ts +0 -47
- package/dist/ui/components/status-bar.js +0 -310
- package/dist/ui/components/status-bar.js.map +0 -1
- package/dist/ui/components/subagent-monitor.d.ts +0 -41
- package/dist/ui/components/subagent-monitor.js +0 -122
- package/dist/ui/components/subagent-monitor.js.map +0 -1
- package/dist/ui/components/toast-notification.d.ts +0 -197
- package/dist/ui/components/toast-notification.js +0 -190
- package/dist/ui/components/toast-notification.js.map +0 -1
- package/dist/ui/components/tool-group-display.d.ts +0 -19
- package/dist/ui/components/tool-group-display.js +0 -222
- package/dist/ui/components/tool-group-display.js.map +0 -1
- package/dist/ui/components/virtualized-chat-history.d.ts +0 -33
- package/dist/ui/components/virtualized-chat-history.js +0 -182
- package/dist/ui/components/virtualized-chat-history.js.map +0 -1
- package/dist/ui/components/welcome-panel.d.ts +0 -11
- package/dist/ui/components/welcome-panel.js +0 -225
- package/dist/ui/components/welcome-panel.js.map +0 -1
- package/dist/ui/hooks/use-chat-reducer.d.ts +0 -69
- package/dist/ui/hooks/use-chat-reducer.js +0 -118
- package/dist/ui/hooks/use-chat-reducer.js.map +0 -1
- package/dist/ui/hooks/use-enhanced-input.d.ts +0 -53
- package/dist/ui/hooks/use-enhanced-input.js +0 -1275
- package/dist/ui/hooks/use-enhanced-input.js.map +0 -1
- package/dist/ui/hooks/use-input-handler.d.ts +0 -79
- package/dist/ui/hooks/use-input-handler.js +0 -2251
- package/dist/ui/hooks/use-input-handler.js.map +0 -1
- package/dist/ui/hooks/use-input-history.d.ts +0 -9
- package/dist/ui/hooks/use-input-history.js +0 -168
- package/dist/ui/hooks/use-input-history.js.map +0 -1
- package/dist/ui/shared/max-sized-box.d.ts +0 -17
- package/dist/ui/shared/max-sized-box.js +0 -14
- package/dist/ui/shared/max-sized-box.js.map +0 -1
- package/dist/ui/themes/index.d.ts +0 -5
- package/dist/ui/themes/index.js +0 -5
- package/dist/ui/themes/index.js.map +0 -1
- package/dist/ui/themes/theme-registry.d.ts +0 -55
- package/dist/ui/themes/theme-registry.js +0 -202
- package/dist/ui/themes/theme-registry.js.map +0 -1
- package/dist/ui/utils/bracketed-paste-handler.d.ts +0 -97
- package/dist/ui/utils/bracketed-paste-handler.js +0 -322
- package/dist/ui/utils/bracketed-paste-handler.js.map +0 -1
- package/dist/ui/utils/change-summarizer.d.ts +0 -20
- package/dist/ui/utils/change-summarizer.js +0 -282
- package/dist/ui/utils/change-summarizer.js.map +0 -1
- package/dist/ui/utils/code-colorizer.d.ts +0 -9
- package/dist/ui/utils/code-colorizer.js +0 -13
- package/dist/ui/utils/code-colorizer.js.map +0 -1
- package/dist/ui/utils/colors.d.ts +0 -41
- package/dist/ui/utils/colors.js +0 -80
- package/dist/ui/utils/colors.js.map +0 -1
- package/dist/ui/utils/image-handler.d.ts +0 -29
- package/dist/ui/utils/image-handler.js +0 -129
- package/dist/ui/utils/image-handler.js.map +0 -1
- package/dist/ui/utils/markdown-renderer.d.ts +0 -4
- package/dist/ui/utils/markdown-renderer.js +0 -40
- package/dist/ui/utils/markdown-renderer.js.map +0 -1
- package/dist/ui/utils/semantic-action-detector.d.ts +0 -49
- package/dist/ui/utils/semantic-action-detector.js +0 -339
- package/dist/ui/utils/semantic-action-detector.js.map +0 -1
- package/dist/ui/utils/tool-grouper.d.ts +0 -94
- package/dist/ui/utils/tool-grouper.js +0 -618
- package/dist/ui/utils/tool-grouper.js.map +0 -1
- package/dist/utils/api-error.d.ts +0 -61
- package/dist/utils/api-error.js +0 -176
- package/dist/utils/api-error.js.map +0 -1
- package/dist/utils/audit-logger.d.ts +0 -206
- package/dist/utils/audit-logger.js +0 -286
- package/dist/utils/audit-logger.js.map +0 -1
- package/dist/utils/auto-accept-logger.d.ts +0 -175
- package/dist/utils/auto-accept-logger.js +0 -423
- package/dist/utils/auto-accept-logger.js.map +0 -1
- package/dist/utils/automatosx-detector.d.ts +0 -19
- package/dist/utils/automatosx-detector.js +0 -52
- package/dist/utils/automatosx-detector.js.map +0 -1
- package/dist/utils/background-task-manager.d.ts +0 -114
- package/dist/utils/background-task-manager.js +0 -470
- package/dist/utils/background-task-manager.js.map +0 -1
- package/dist/utils/cache.d.ts +0 -77
- package/dist/utils/cache.js +0 -180
- package/dist/utils/cache.js.map +0 -1
- package/dist/utils/command-security.d.ts +0 -85
- package/dist/utils/command-security.js +0 -210
- package/dist/utils/command-security.js.map +0 -1
- package/dist/utils/config-loader.d.ts +0 -190
- package/dist/utils/config-loader.js +0 -108
- package/dist/utils/config-loader.js.map +0 -1
- package/dist/utils/confirmation-service.d.ts +0 -51
- package/dist/utils/confirmation-service.js +0 -220
- package/dist/utils/confirmation-service.js.map +0 -1
- package/dist/utils/console-messenger.d.ts +0 -80
- package/dist/utils/console-messenger.js +0 -142
- package/dist/utils/console-messenger.js.map +0 -1
- package/dist/utils/custom-instructions.d.ts +0 -1
- package/dist/utils/custom-instructions.js +0 -24
- package/dist/utils/custom-instructions.js.map +0 -1
- package/dist/utils/encryption.d.ts +0 -86
- package/dist/utils/encryption.js +0 -236
- package/dist/utils/encryption.js.map +0 -1
- package/dist/utils/enhanced-error-messages.d.ts +0 -33
- package/dist/utils/enhanced-error-messages.js +0 -440
- package/dist/utils/enhanced-error-messages.js.map +0 -1
- package/dist/utils/error-handler.d.ts +0 -65
- package/dist/utils/error-handler.js +0 -148
- package/dist/utils/error-handler.js.map +0 -1
- package/dist/utils/error-translator.d.ts +0 -25
- package/dist/utils/error-translator.js +0 -203
- package/dist/utils/error-translator.js.map +0 -1
- package/dist/utils/external-editor.d.ts +0 -47
- package/dist/utils/external-editor.js +0 -179
- package/dist/utils/external-editor.js.map +0 -1
- package/dist/utils/file-cache.d.ts +0 -148
- package/dist/utils/file-cache.js +0 -413
- package/dist/utils/file-cache.js.map +0 -1
- package/dist/utils/file-lock.d.ts +0 -141
- package/dist/utils/file-lock.js +0 -554
- package/dist/utils/file-lock.js.map +0 -1
- package/dist/utils/file-mentions.d.ts +0 -68
- package/dist/utils/file-mentions.js +0 -225
- package/dist/utils/file-mentions.js.map +0 -1
- package/dist/utils/history-manager.d.ts +0 -52
- package/dist/utils/history-manager.js +0 -211
- package/dist/utils/history-manager.js.map +0 -1
- package/dist/utils/history-migration.d.ts +0 -9
- package/dist/utils/history-migration.js +0 -37
- package/dist/utils/history-migration.js.map +0 -1
- package/dist/utils/image-processor.d.ts +0 -33
- package/dist/utils/image-processor.js +0 -124
- package/dist/utils/image-processor.js.map +0 -1
- package/dist/utils/index.d.ts +0 -92
- package/dist/utils/index.js +0 -111
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/init-previewer.d.ts +0 -56
- package/dist/utils/init-previewer.js +0 -239
- package/dist/utils/init-previewer.js.map +0 -1
- package/dist/utils/init-validator.d.ts +0 -65
- package/dist/utils/init-validator.js +0 -252
- package/dist/utils/init-validator.js.map +0 -1
- package/dist/utils/input-sanitizer.d.ts +0 -210
- package/dist/utils/input-sanitizer.js +0 -362
- package/dist/utils/input-sanitizer.js.map +0 -1
- package/dist/utils/instruction-generator.d.ts +0 -21
- package/dist/utils/instruction-generator.js +0 -233
- package/dist/utils/instruction-generator.js.map +0 -1
- package/dist/utils/json-utils.d.ts +0 -72
- package/dist/utils/json-utils.js +0 -226
- package/dist/utils/json-utils.js.map +0 -1
- package/dist/utils/llm-optimized-instruction-generator.d.ts +0 -36
- package/dist/utils/llm-optimized-instruction-generator.js +0 -365
- package/dist/utils/llm-optimized-instruction-generator.js.map +0 -1
- package/dist/utils/message-optimizer.d.ts +0 -100
- package/dist/utils/message-optimizer.js +0 -297
- package/dist/utils/message-optimizer.js.map +0 -1
- package/dist/utils/onboarding-manager.d.ts +0 -45
- package/dist/utils/onboarding-manager.js +0 -131
- package/dist/utils/onboarding-manager.js.map +0 -1
- package/dist/utils/parallel-analyzer.d.ts +0 -123
- package/dist/utils/parallel-analyzer.js +0 -241
- package/dist/utils/parallel-analyzer.js.map +0 -1
- package/dist/utils/paste-utils.d.ts +0 -99
- package/dist/utils/paste-utils.js +0 -295
- package/dist/utils/paste-utils.js.map +0 -1
- package/dist/utils/path-helpers.d.ts +0 -8
- package/dist/utils/path-helpers.js +0 -35
- package/dist/utils/path-helpers.js.map +0 -1
- package/dist/utils/path-security.d.ts +0 -92
- package/dist/utils/path-security.js +0 -300
- package/dist/utils/path-security.js.map +0 -1
- package/dist/utils/path-utils.d.ts +0 -83
- package/dist/utils/path-utils.js +0 -122
- package/dist/utils/path-utils.js.map +0 -1
- package/dist/utils/path-validator.d.ts +0 -66
- package/dist/utils/path-validator.js +0 -141
- package/dist/utils/path-validator.js.map +0 -1
- package/dist/utils/performance.d.ts +0 -74
- package/dist/utils/performance.js +0 -133
- package/dist/utils/performance.js.map +0 -1
- package/dist/utils/process-pool.d.ts +0 -109
- package/dist/utils/process-pool.js +0 -332
- package/dist/utils/process-pool.js.map +0 -1
- package/dist/utils/progress-tracker.d.ts +0 -51
- package/dist/utils/progress-tracker.js +0 -152
- package/dist/utils/progress-tracker.js.map +0 -1
- package/dist/utils/project-analyzer.d.ts +0 -49
- package/dist/utils/project-analyzer.js +0 -396
- package/dist/utils/project-analyzer.js.map +0 -1
- package/dist/utils/prompt-builder.d.ts +0 -14
- package/dist/utils/prompt-builder.js +0 -100
- package/dist/utils/prompt-builder.js.map +0 -1
- package/dist/utils/provider-context.d.ts +0 -243
- package/dist/utils/provider-context.js +0 -421
- package/dist/utils/provider-context.js.map +0 -1
- package/dist/utils/provider-file-cache.d.ts +0 -91
- package/dist/utils/provider-file-cache.js +0 -165
- package/dist/utils/provider-file-cache.js.map +0 -1
- package/dist/utils/provider-settings.d.ts +0 -181
- package/dist/utils/provider-settings.js +0 -450
- package/dist/utils/provider-settings.js.map +0 -1
- package/dist/utils/rate-limiter.d.ts +0 -222
- package/dist/utils/rate-limiter.js +0 -338
- package/dist/utils/rate-limiter.js.map +0 -1
- package/dist/utils/retry-helper.d.ts +0 -81
- package/dist/utils/retry-helper.js +0 -244
- package/dist/utils/retry-helper.js.map +0 -1
- package/dist/utils/safety-rules.d.ts +0 -64
- package/dist/utils/safety-rules.js +0 -225
- package/dist/utils/safety-rules.js.map +0 -1
- package/dist/utils/settings-manager.d.ts +0 -256
- package/dist/utils/settings-manager.js +0 -967
- package/dist/utils/settings-manager.js.map +0 -1
- package/dist/utils/setup-validator.d.ts +0 -47
- package/dist/utils/setup-validator.js +0 -304
- package/dist/utils/setup-validator.js.map +0 -1
- package/dist/utils/string-utils.d.ts +0 -19
- package/dist/utils/string-utils.js +0 -28
- package/dist/utils/string-utils.js.map +0 -1
- package/dist/utils/template-manager.d.ts +0 -62
- package/dist/utils/template-manager.js +0 -366
- package/dist/utils/template-manager.js.map +0 -1
- package/dist/utils/text-utils.d.ts +0 -82
- package/dist/utils/text-utils.js +0 -203
- package/dist/utils/text-utils.js.map +0 -1
- package/dist/utils/token-counter.d.ts +0 -76
- package/dist/utils/token-counter.js +0 -231
- package/dist/utils/token-counter.js.map +0 -1
- package/dist/utils/usage-tracker.d.ts +0 -78
- package/dist/utils/usage-tracker.js +0 -126
- package/dist/utils/usage-tracker.js.map +0 -1
- package/dist/utils/version.d.ts +0 -14
- package/dist/utils/version.js +0 -70
- package/dist/utils/version.js.map +0 -1
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provider Context - Instance-based configuration for multi-provider support
|
|
3
|
-
*
|
|
4
|
-
* This module enables running ax-glm and ax-grok in parallel without conflicts.
|
|
5
|
-
* Each provider gets isolated:
|
|
6
|
-
* - Configuration files (~/.ax-glm/ vs ~/.ax-grok/)
|
|
7
|
-
* - Cache directories
|
|
8
|
-
* - Memory stores
|
|
9
|
-
* - History files
|
|
10
|
-
* - Session data
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* // CLI usage (automatic from runCLI)
|
|
15
|
-
* const ctx = ProviderContext.create('glm');
|
|
16
|
-
* ctx.activate(); // Sets as current context
|
|
17
|
-
*
|
|
18
|
-
* // SDK usage (explicit)
|
|
19
|
-
* const agent = await createAgent({
|
|
20
|
-
* provider: 'grok',
|
|
21
|
-
* // ... other options
|
|
22
|
-
* });
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* Supported provider types
|
|
27
|
-
*/
|
|
28
|
-
export type ProviderType = 'glm' | 'grok' | 'generic';
|
|
29
|
-
/**
|
|
30
|
-
* Provider-specific configuration
|
|
31
|
-
*/
|
|
32
|
-
export interface ProviderConfig {
|
|
33
|
-
/** Provider identifier */
|
|
34
|
-
name: ProviderType;
|
|
35
|
-
/** Display name for UI */
|
|
36
|
-
displayName: string;
|
|
37
|
-
/** CLI command name */
|
|
38
|
-
cliName: string;
|
|
39
|
-
/** npm package name */
|
|
40
|
-
package: string;
|
|
41
|
-
/** Default API base URL */
|
|
42
|
-
defaultBaseURL: string;
|
|
43
|
-
/** Default model */
|
|
44
|
-
defaultModel: string;
|
|
45
|
-
/** Environment variable for API key */
|
|
46
|
-
apiKeyEnvVar: string;
|
|
47
|
-
/** Provider website */
|
|
48
|
-
website: string;
|
|
49
|
-
/** Config directory name (e.g., '.ax-glm') */
|
|
50
|
-
configDirName: string;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Pre-defined provider configurations
|
|
54
|
-
*/
|
|
55
|
-
export declare const PROVIDER_CONFIGS: Record<ProviderType, ProviderConfig>;
|
|
56
|
-
/**
|
|
57
|
-
* File names used by the CLI
|
|
58
|
-
*/
|
|
59
|
-
export declare const PROVIDER_FILES: {
|
|
60
|
-
readonly CONFIG: "config.json";
|
|
61
|
-
readonly SETTINGS: "settings.json";
|
|
62
|
-
readonly CUSTOM_MD: "CUSTOM.md";
|
|
63
|
-
readonly MEMORY: "memory.json";
|
|
64
|
-
readonly HISTORY: "history.json";
|
|
65
|
-
readonly INDEX: "index.json";
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Directory names used by the CLI
|
|
69
|
-
*/
|
|
70
|
-
export declare const PROVIDER_DIRS: {
|
|
71
|
-
readonly CACHE: "cache";
|
|
72
|
-
readonly SESSIONS: "sessions";
|
|
73
|
-
readonly PLANS: "plans";
|
|
74
|
-
readonly TEMPLATES: "templates";
|
|
75
|
-
readonly CHECKPOINTS: "checkpoints";
|
|
76
|
-
readonly COMMANDS: "commands";
|
|
77
|
-
readonly BACKUPS: "backups";
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Provider Context - Manages provider-specific paths and configuration
|
|
81
|
-
*
|
|
82
|
-
* This class provides instance-based configuration to avoid global state conflicts
|
|
83
|
-
* when running multiple providers in parallel.
|
|
84
|
-
*/
|
|
85
|
-
export declare class ProviderContext {
|
|
86
|
-
private static currentContext;
|
|
87
|
-
private static contextStack;
|
|
88
|
-
readonly provider: ProviderType;
|
|
89
|
-
readonly config: ProviderConfig;
|
|
90
|
-
readonly userDir: string;
|
|
91
|
-
readonly projectDir: string;
|
|
92
|
-
private constructor();
|
|
93
|
-
/**
|
|
94
|
-
* Create a new provider context
|
|
95
|
-
*/
|
|
96
|
-
static create(provider: ProviderType, projectRoot?: string): ProviderContext;
|
|
97
|
-
/**
|
|
98
|
-
* Get the current active context
|
|
99
|
-
* Falls back to generic if no context is set
|
|
100
|
-
*/
|
|
101
|
-
static current(): ProviderContext;
|
|
102
|
-
/**
|
|
103
|
-
* Set this context as the current active context
|
|
104
|
-
*/
|
|
105
|
-
activate(): void;
|
|
106
|
-
/**
|
|
107
|
-
* Push this context onto the stack and activate it
|
|
108
|
-
* Useful for temporary context switches
|
|
109
|
-
*/
|
|
110
|
-
push(): void;
|
|
111
|
-
/**
|
|
112
|
-
* Pop the current context and restore the previous one
|
|
113
|
-
*/
|
|
114
|
-
static pop(): ProviderContext | null;
|
|
115
|
-
/**
|
|
116
|
-
* Reset to no active context (for testing)
|
|
117
|
-
*/
|
|
118
|
-
static reset(): void;
|
|
119
|
-
/** User config file path: ~/.ax-{provider}/config.json */
|
|
120
|
-
get userConfigPath(): string;
|
|
121
|
-
/** User history file path: ~/.ax-{provider}/history.json */
|
|
122
|
-
get userHistoryPath(): string;
|
|
123
|
-
/** User custom instructions: ~/.ax-{provider}/CUSTOM.md */
|
|
124
|
-
get userCustomMdPath(): string;
|
|
125
|
-
/** User cache directory: ~/.ax-{provider}/cache/ */
|
|
126
|
-
get userCacheDir(): string;
|
|
127
|
-
/** User sessions directory: ~/.ax-{provider}/sessions/ */
|
|
128
|
-
get userSessionsDir(): string;
|
|
129
|
-
/** User plans directory: ~/.ax-{provider}/plans/ */
|
|
130
|
-
get userPlansDir(): string;
|
|
131
|
-
/** User templates directory: ~/.ax-{provider}/templates/ */
|
|
132
|
-
get userTemplatesDir(): string;
|
|
133
|
-
/** User commands directory: ~/.ax-{provider}/commands/ */
|
|
134
|
-
get userCommandsDir(): string;
|
|
135
|
-
/** Project settings file: .ax-{provider}/settings.json */
|
|
136
|
-
get projectSettingsPath(): string;
|
|
137
|
-
/** Project custom instructions: .ax-{provider}/CUSTOM.md */
|
|
138
|
-
get projectCustomMdPath(): string;
|
|
139
|
-
/** Project memory file: .ax-{provider}/memory.json */
|
|
140
|
-
get projectMemoryPath(): string;
|
|
141
|
-
/** Project index file: .ax-{provider}/index.json */
|
|
142
|
-
get projectIndexPath(): string;
|
|
143
|
-
/** Project cache directory: .ax-{provider}/cache/ */
|
|
144
|
-
get projectCacheDir(): string;
|
|
145
|
-
/** Project checkpoints directory: .ax-{provider}/checkpoints/ */
|
|
146
|
-
get projectCheckpointsDir(): string;
|
|
147
|
-
/** Project commands directory: .ax-{provider}/commands/ */
|
|
148
|
-
get projectCommandsDir(): string;
|
|
149
|
-
/** Project plans directory: .ax-{provider}/plans/ */
|
|
150
|
-
get projectPlansDir(): string;
|
|
151
|
-
/**
|
|
152
|
-
* Ensure user directory exists with proper permissions
|
|
153
|
-
*/
|
|
154
|
-
ensureUserDir(): void;
|
|
155
|
-
/**
|
|
156
|
-
* Ensure project directory exists
|
|
157
|
-
*/
|
|
158
|
-
ensureProjectDir(): void;
|
|
159
|
-
/**
|
|
160
|
-
* Ensure a subdirectory exists in user dir
|
|
161
|
-
*/
|
|
162
|
-
ensureUserSubdir(subdir: string): string;
|
|
163
|
-
/**
|
|
164
|
-
* Ensure a subdirectory exists in project dir
|
|
165
|
-
*/
|
|
166
|
-
ensureProjectSubdir(subdir: string): string;
|
|
167
|
-
/**
|
|
168
|
-
* Get a namespaced cache key to avoid conflicts
|
|
169
|
-
*/
|
|
170
|
-
getCacheNamespace(baseName: string): string;
|
|
171
|
-
/**
|
|
172
|
-
* Get environment-based API key for this provider
|
|
173
|
-
*/
|
|
174
|
-
getEnvApiKey(): string | undefined;
|
|
175
|
-
/**
|
|
176
|
-
* Check if this provider is configured (has config file)
|
|
177
|
-
*/
|
|
178
|
-
isConfigured(): boolean;
|
|
179
|
-
/**
|
|
180
|
-
* Get the lock file path for a given file
|
|
181
|
-
*/
|
|
182
|
-
getLockPath(filePath: string): string;
|
|
183
|
-
/**
|
|
184
|
-
* Create a context for a specific project root
|
|
185
|
-
*/
|
|
186
|
-
withProjectRoot(projectRoot: string): ProviderContext;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Get the current provider context
|
|
190
|
-
* Shorthand for ProviderContext.current()
|
|
191
|
-
*/
|
|
192
|
-
export declare function getProviderContext(): ProviderContext;
|
|
193
|
-
/**
|
|
194
|
-
* Create and activate a provider context
|
|
195
|
-
*/
|
|
196
|
-
export declare function activateProvider(provider: ProviderType, projectRoot?: string): ProviderContext;
|
|
197
|
-
/**
|
|
198
|
-
* Run a function with a temporary provider context
|
|
199
|
-
*/
|
|
200
|
-
export declare function withProvider<T>(provider: ProviderType, fn: (ctx: ProviderContext) => T, projectRoot?: string): T;
|
|
201
|
-
/**
|
|
202
|
-
* Run an async function with a temporary provider context
|
|
203
|
-
*
|
|
204
|
-
* WARNING: This function uses a global stack which is NOT safe for concurrent
|
|
205
|
-
* async operations. If you need to run multiple providers in parallel, use
|
|
206
|
-
* ProviderContext.create() directly and pass the context explicitly.
|
|
207
|
-
*
|
|
208
|
-
* @example Safe usage (sequential):
|
|
209
|
-
* ```typescript
|
|
210
|
-
* await withProviderAsync('glm', async (ctx) => { ... });
|
|
211
|
-
* await withProviderAsync('grok', async (ctx) => { ... });
|
|
212
|
-
* ```
|
|
213
|
-
*
|
|
214
|
-
* @example UNSAFE - DON'T DO THIS:
|
|
215
|
-
* ```typescript
|
|
216
|
-
* await Promise.all([
|
|
217
|
-
* withProviderAsync('glm', async () => { ... }),
|
|
218
|
-
* withProviderAsync('grok', async () => { ... }),
|
|
219
|
-
* ]); // Race condition!
|
|
220
|
-
* ```
|
|
221
|
-
*
|
|
222
|
-
* @example Safe parallel usage:
|
|
223
|
-
* ```typescript
|
|
224
|
-
* const glmCtx = ProviderContext.create('glm');
|
|
225
|
-
* const grokCtx = ProviderContext.create('grok');
|
|
226
|
-
* await Promise.all([
|
|
227
|
-
* doWorkWith(glmCtx),
|
|
228
|
-
* doWorkWith(grokCtx),
|
|
229
|
-
* ]);
|
|
230
|
-
* ```
|
|
231
|
-
*
|
|
232
|
-
* @deprecated For parallel operations, use ProviderContext.create() directly
|
|
233
|
-
*/
|
|
234
|
-
export declare function withProviderAsync<T>(provider: ProviderType, fn: (ctx: ProviderContext) => Promise<T>, projectRoot?: string): Promise<T>;
|
|
235
|
-
/**
|
|
236
|
-
* Validate and normalize a provider string
|
|
237
|
-
* Returns the provider type or null if invalid
|
|
238
|
-
*/
|
|
239
|
-
export declare function validateProvider(value: string | undefined): ProviderType | null;
|
|
240
|
-
/**
|
|
241
|
-
* Detect provider from environment or fall back to generic
|
|
242
|
-
*/
|
|
243
|
-
export declare function detectProvider(): ProviderType;
|
|
@@ -1,421 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provider Context - Instance-based configuration for multi-provider support
|
|
3
|
-
*
|
|
4
|
-
* This module enables running ax-glm and ax-grok in parallel without conflicts.
|
|
5
|
-
* Each provider gets isolated:
|
|
6
|
-
* - Configuration files (~/.ax-glm/ vs ~/.ax-grok/)
|
|
7
|
-
* - Cache directories
|
|
8
|
-
* - Memory stores
|
|
9
|
-
* - History files
|
|
10
|
-
* - Session data
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* // CLI usage (automatic from runCLI)
|
|
15
|
-
* const ctx = ProviderContext.create('glm');
|
|
16
|
-
* ctx.activate(); // Sets as current context
|
|
17
|
-
*
|
|
18
|
-
* // SDK usage (explicit)
|
|
19
|
-
* const agent = await createAgent({
|
|
20
|
-
* provider: 'grok',
|
|
21
|
-
* // ... other options
|
|
22
|
-
* });
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
import { homedir } from 'os';
|
|
26
|
-
import { join, resolve } from 'path';
|
|
27
|
-
import { existsSync, mkdirSync } from 'fs';
|
|
28
|
-
/**
|
|
29
|
-
* Pre-defined provider configurations
|
|
30
|
-
*/
|
|
31
|
-
export const PROVIDER_CONFIGS = {
|
|
32
|
-
glm: {
|
|
33
|
-
name: 'glm',
|
|
34
|
-
displayName: 'GLM (Z.AI)',
|
|
35
|
-
cliName: 'ax-glm',
|
|
36
|
-
package: '@defai.digital/ax-glm',
|
|
37
|
-
defaultBaseURL: 'https://api.z.ai/api/coding/paas/v4',
|
|
38
|
-
defaultModel: 'glm-4.6',
|
|
39
|
-
apiKeyEnvVar: 'ZAI_API_KEY',
|
|
40
|
-
website: 'https://z.ai',
|
|
41
|
-
configDirName: '.ax-glm',
|
|
42
|
-
},
|
|
43
|
-
grok: {
|
|
44
|
-
name: 'grok',
|
|
45
|
-
displayName: 'Grok (xAI)',
|
|
46
|
-
cliName: 'ax-grok',
|
|
47
|
-
package: '@defai.digital/ax-grok',
|
|
48
|
-
defaultBaseURL: 'https://api.x.ai/v1',
|
|
49
|
-
defaultModel: 'grok-4-0709',
|
|
50
|
-
apiKeyEnvVar: 'XAI_API_KEY',
|
|
51
|
-
website: 'https://console.x.ai',
|
|
52
|
-
configDirName: '.ax-grok',
|
|
53
|
-
},
|
|
54
|
-
generic: {
|
|
55
|
-
name: 'generic',
|
|
56
|
-
displayName: 'AX CLI',
|
|
57
|
-
cliName: 'ax-cli',
|
|
58
|
-
package: '@defai.digital/ax-cli',
|
|
59
|
-
defaultBaseURL: '',
|
|
60
|
-
defaultModel: '',
|
|
61
|
-
apiKeyEnvVar: 'AI_API_KEY',
|
|
62
|
-
website: '',
|
|
63
|
-
configDirName: '.ax-cli',
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* File names used by the CLI
|
|
68
|
-
*/
|
|
69
|
-
export const PROVIDER_FILES = {
|
|
70
|
-
CONFIG: 'config.json',
|
|
71
|
-
SETTINGS: 'settings.json',
|
|
72
|
-
CUSTOM_MD: 'CUSTOM.md',
|
|
73
|
-
MEMORY: 'memory.json',
|
|
74
|
-
HISTORY: 'history.json',
|
|
75
|
-
INDEX: 'index.json',
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Directory names used by the CLI
|
|
79
|
-
*/
|
|
80
|
-
export const PROVIDER_DIRS = {
|
|
81
|
-
CACHE: 'cache',
|
|
82
|
-
SESSIONS: 'sessions',
|
|
83
|
-
PLANS: 'plans',
|
|
84
|
-
TEMPLATES: 'templates',
|
|
85
|
-
CHECKPOINTS: 'checkpoints',
|
|
86
|
-
COMMANDS: 'commands',
|
|
87
|
-
BACKUPS: 'backups',
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Provider Context - Manages provider-specific paths and configuration
|
|
91
|
-
*
|
|
92
|
-
* This class provides instance-based configuration to avoid global state conflicts
|
|
93
|
-
* when running multiple providers in parallel.
|
|
94
|
-
*/
|
|
95
|
-
export class ProviderContext {
|
|
96
|
-
static currentContext = null;
|
|
97
|
-
static contextStack = [];
|
|
98
|
-
provider;
|
|
99
|
-
config;
|
|
100
|
-
userDir;
|
|
101
|
-
projectDir;
|
|
102
|
-
constructor(provider, projectRoot = process.cwd()) {
|
|
103
|
-
this.provider = provider;
|
|
104
|
-
this.config = PROVIDER_CONFIGS[provider];
|
|
105
|
-
this.userDir = join(homedir(), this.config.configDirName);
|
|
106
|
-
this.projectDir = join(projectRoot, this.config.configDirName);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Create a new provider context
|
|
110
|
-
*/
|
|
111
|
-
static create(provider, projectRoot) {
|
|
112
|
-
return new ProviderContext(provider, projectRoot);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Get the current active context
|
|
116
|
-
* Falls back to generic if no context is set
|
|
117
|
-
*/
|
|
118
|
-
static current() {
|
|
119
|
-
if (!ProviderContext.currentContext) {
|
|
120
|
-
// Check environment variable for provider hint
|
|
121
|
-
const envProvider = process.env.AX_PROVIDER;
|
|
122
|
-
if (envProvider && PROVIDER_CONFIGS[envProvider]) {
|
|
123
|
-
ProviderContext.currentContext = new ProviderContext(envProvider);
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
// Default to generic
|
|
127
|
-
ProviderContext.currentContext = new ProviderContext('generic');
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return ProviderContext.currentContext;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Set this context as the current active context
|
|
134
|
-
*/
|
|
135
|
-
activate() {
|
|
136
|
-
ProviderContext.currentContext = this;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Push this context onto the stack and activate it
|
|
140
|
-
* Useful for temporary context switches
|
|
141
|
-
*/
|
|
142
|
-
push() {
|
|
143
|
-
if (ProviderContext.currentContext) {
|
|
144
|
-
ProviderContext.contextStack.push(ProviderContext.currentContext);
|
|
145
|
-
}
|
|
146
|
-
this.activate();
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Pop the current context and restore the previous one
|
|
150
|
-
*/
|
|
151
|
-
static pop() {
|
|
152
|
-
const previous = ProviderContext.contextStack.pop();
|
|
153
|
-
if (previous) {
|
|
154
|
-
previous.activate();
|
|
155
|
-
}
|
|
156
|
-
return previous || null;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Reset to no active context (for testing)
|
|
160
|
-
*/
|
|
161
|
-
static reset() {
|
|
162
|
-
ProviderContext.currentContext = null;
|
|
163
|
-
ProviderContext.contextStack = [];
|
|
164
|
-
}
|
|
165
|
-
// ============================================================================
|
|
166
|
-
// User-Level Paths (Home Directory)
|
|
167
|
-
// ============================================================================
|
|
168
|
-
/** User config file path: ~/.ax-{provider}/config.json */
|
|
169
|
-
get userConfigPath() {
|
|
170
|
-
return join(this.userDir, PROVIDER_FILES.CONFIG);
|
|
171
|
-
}
|
|
172
|
-
/** User history file path: ~/.ax-{provider}/history.json */
|
|
173
|
-
get userHistoryPath() {
|
|
174
|
-
return join(this.userDir, PROVIDER_FILES.HISTORY);
|
|
175
|
-
}
|
|
176
|
-
/** User custom instructions: ~/.ax-{provider}/CUSTOM.md */
|
|
177
|
-
get userCustomMdPath() {
|
|
178
|
-
return join(this.userDir, PROVIDER_FILES.CUSTOM_MD);
|
|
179
|
-
}
|
|
180
|
-
/** User cache directory: ~/.ax-{provider}/cache/ */
|
|
181
|
-
get userCacheDir() {
|
|
182
|
-
return join(this.userDir, PROVIDER_DIRS.CACHE);
|
|
183
|
-
}
|
|
184
|
-
/** User sessions directory: ~/.ax-{provider}/sessions/ */
|
|
185
|
-
get userSessionsDir() {
|
|
186
|
-
return join(this.userDir, PROVIDER_DIRS.SESSIONS);
|
|
187
|
-
}
|
|
188
|
-
/** User plans directory: ~/.ax-{provider}/plans/ */
|
|
189
|
-
get userPlansDir() {
|
|
190
|
-
return join(this.userDir, PROVIDER_DIRS.PLANS);
|
|
191
|
-
}
|
|
192
|
-
/** User templates directory: ~/.ax-{provider}/templates/ */
|
|
193
|
-
get userTemplatesDir() {
|
|
194
|
-
return join(this.userDir, PROVIDER_DIRS.TEMPLATES);
|
|
195
|
-
}
|
|
196
|
-
/** User commands directory: ~/.ax-{provider}/commands/ */
|
|
197
|
-
get userCommandsDir() {
|
|
198
|
-
return join(this.userDir, PROVIDER_DIRS.COMMANDS);
|
|
199
|
-
}
|
|
200
|
-
// ============================================================================
|
|
201
|
-
// Project-Level Paths (Current Working Directory)
|
|
202
|
-
// ============================================================================
|
|
203
|
-
/** Project settings file: .ax-{provider}/settings.json */
|
|
204
|
-
get projectSettingsPath() {
|
|
205
|
-
return join(this.projectDir, PROVIDER_FILES.SETTINGS);
|
|
206
|
-
}
|
|
207
|
-
/** Project custom instructions: .ax-{provider}/CUSTOM.md */
|
|
208
|
-
get projectCustomMdPath() {
|
|
209
|
-
return join(this.projectDir, PROVIDER_FILES.CUSTOM_MD);
|
|
210
|
-
}
|
|
211
|
-
/** Project memory file: .ax-{provider}/memory.json */
|
|
212
|
-
get projectMemoryPath() {
|
|
213
|
-
return join(this.projectDir, PROVIDER_FILES.MEMORY);
|
|
214
|
-
}
|
|
215
|
-
/** Project index file: .ax-{provider}/index.json */
|
|
216
|
-
get projectIndexPath() {
|
|
217
|
-
return join(this.projectDir, PROVIDER_FILES.INDEX);
|
|
218
|
-
}
|
|
219
|
-
/** Project cache directory: .ax-{provider}/cache/ */
|
|
220
|
-
get projectCacheDir() {
|
|
221
|
-
return join(this.projectDir, PROVIDER_DIRS.CACHE);
|
|
222
|
-
}
|
|
223
|
-
/** Project checkpoints directory: .ax-{provider}/checkpoints/ */
|
|
224
|
-
get projectCheckpointsDir() {
|
|
225
|
-
return join(this.projectDir, PROVIDER_DIRS.CHECKPOINTS);
|
|
226
|
-
}
|
|
227
|
-
/** Project commands directory: .ax-{provider}/commands/ */
|
|
228
|
-
get projectCommandsDir() {
|
|
229
|
-
return join(this.projectDir, PROVIDER_DIRS.COMMANDS);
|
|
230
|
-
}
|
|
231
|
-
/** Project plans directory: .ax-{provider}/plans/ */
|
|
232
|
-
get projectPlansDir() {
|
|
233
|
-
return join(this.projectDir, PROVIDER_DIRS.PLANS);
|
|
234
|
-
}
|
|
235
|
-
// ============================================================================
|
|
236
|
-
// Utility Methods
|
|
237
|
-
// ============================================================================
|
|
238
|
-
/**
|
|
239
|
-
* Ensure user directory exists with proper permissions
|
|
240
|
-
*/
|
|
241
|
-
ensureUserDir() {
|
|
242
|
-
if (!existsSync(this.userDir)) {
|
|
243
|
-
mkdirSync(this.userDir, { recursive: true, mode: 0o700 });
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Ensure project directory exists
|
|
248
|
-
*/
|
|
249
|
-
ensureProjectDir() {
|
|
250
|
-
if (!existsSync(this.projectDir)) {
|
|
251
|
-
mkdirSync(this.projectDir, { recursive: true });
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Ensure a subdirectory exists in user dir
|
|
256
|
-
*/
|
|
257
|
-
ensureUserSubdir(subdir) {
|
|
258
|
-
const fullPath = join(this.userDir, subdir);
|
|
259
|
-
if (!existsSync(fullPath)) {
|
|
260
|
-
mkdirSync(fullPath, { recursive: true, mode: 0o700 });
|
|
261
|
-
}
|
|
262
|
-
return fullPath;
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Ensure a subdirectory exists in project dir
|
|
266
|
-
*/
|
|
267
|
-
ensureProjectSubdir(subdir) {
|
|
268
|
-
const fullPath = join(this.projectDir, subdir);
|
|
269
|
-
if (!existsSync(fullPath)) {
|
|
270
|
-
mkdirSync(fullPath, { recursive: true });
|
|
271
|
-
}
|
|
272
|
-
return fullPath;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Get a namespaced cache key to avoid conflicts
|
|
276
|
-
*/
|
|
277
|
-
getCacheNamespace(baseName) {
|
|
278
|
-
return `${this.provider}_${baseName}`;
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Get environment-based API key for this provider
|
|
282
|
-
*/
|
|
283
|
-
getEnvApiKey() {
|
|
284
|
-
return process.env[this.config.apiKeyEnvVar];
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Check if this provider is configured (has config file)
|
|
288
|
-
*/
|
|
289
|
-
isConfigured() {
|
|
290
|
-
return existsSync(this.userConfigPath);
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Get the lock file path for a given file
|
|
294
|
-
*/
|
|
295
|
-
getLockPath(filePath) {
|
|
296
|
-
return `${filePath}.lock`;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Create a context for a specific project root
|
|
300
|
-
*/
|
|
301
|
-
withProjectRoot(projectRoot) {
|
|
302
|
-
return new ProviderContext(this.provider, resolve(projectRoot));
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
// ============================================================================
|
|
306
|
-
// Convenience Functions
|
|
307
|
-
// ============================================================================
|
|
308
|
-
/**
|
|
309
|
-
* Get the current provider context
|
|
310
|
-
* Shorthand for ProviderContext.current()
|
|
311
|
-
*/
|
|
312
|
-
export function getProviderContext() {
|
|
313
|
-
return ProviderContext.current();
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Create and activate a provider context
|
|
317
|
-
*/
|
|
318
|
-
export function activateProvider(provider, projectRoot) {
|
|
319
|
-
const ctx = ProviderContext.create(provider, projectRoot);
|
|
320
|
-
ctx.activate();
|
|
321
|
-
return ctx;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Run a function with a temporary provider context
|
|
325
|
-
*/
|
|
326
|
-
export function withProvider(provider, fn, projectRoot) {
|
|
327
|
-
const ctx = ProviderContext.create(provider, projectRoot);
|
|
328
|
-
ctx.push();
|
|
329
|
-
try {
|
|
330
|
-
return fn(ctx);
|
|
331
|
-
}
|
|
332
|
-
finally {
|
|
333
|
-
ProviderContext.pop();
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* Run an async function with a temporary provider context
|
|
338
|
-
*
|
|
339
|
-
* WARNING: This function uses a global stack which is NOT safe for concurrent
|
|
340
|
-
* async operations. If you need to run multiple providers in parallel, use
|
|
341
|
-
* ProviderContext.create() directly and pass the context explicitly.
|
|
342
|
-
*
|
|
343
|
-
* @example Safe usage (sequential):
|
|
344
|
-
* ```typescript
|
|
345
|
-
* await withProviderAsync('glm', async (ctx) => { ... });
|
|
346
|
-
* await withProviderAsync('grok', async (ctx) => { ... });
|
|
347
|
-
* ```
|
|
348
|
-
*
|
|
349
|
-
* @example UNSAFE - DON'T DO THIS:
|
|
350
|
-
* ```typescript
|
|
351
|
-
* await Promise.all([
|
|
352
|
-
* withProviderAsync('glm', async () => { ... }),
|
|
353
|
-
* withProviderAsync('grok', async () => { ... }),
|
|
354
|
-
* ]); // Race condition!
|
|
355
|
-
* ```
|
|
356
|
-
*
|
|
357
|
-
* @example Safe parallel usage:
|
|
358
|
-
* ```typescript
|
|
359
|
-
* const glmCtx = ProviderContext.create('glm');
|
|
360
|
-
* const grokCtx = ProviderContext.create('grok');
|
|
361
|
-
* await Promise.all([
|
|
362
|
-
* doWorkWith(glmCtx),
|
|
363
|
-
* doWorkWith(grokCtx),
|
|
364
|
-
* ]);
|
|
365
|
-
* ```
|
|
366
|
-
*
|
|
367
|
-
* @deprecated For parallel operations, use ProviderContext.create() directly
|
|
368
|
-
*/
|
|
369
|
-
export async function withProviderAsync(provider, fn, projectRoot) {
|
|
370
|
-
const ctx = ProviderContext.create(provider, projectRoot);
|
|
371
|
-
ctx.push();
|
|
372
|
-
try {
|
|
373
|
-
return await fn(ctx);
|
|
374
|
-
}
|
|
375
|
-
finally {
|
|
376
|
-
ProviderContext.pop();
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
/**
|
|
380
|
-
* Validate and normalize a provider string
|
|
381
|
-
* Returns the provider type or null if invalid
|
|
382
|
-
*/
|
|
383
|
-
export function validateProvider(value) {
|
|
384
|
-
if (!value)
|
|
385
|
-
return null;
|
|
386
|
-
const normalized = value.toLowerCase().trim();
|
|
387
|
-
if (PROVIDER_CONFIGS[normalized]) {
|
|
388
|
-
return normalized;
|
|
389
|
-
}
|
|
390
|
-
return null;
|
|
391
|
-
}
|
|
392
|
-
// Track if we've already warned about invalid provider
|
|
393
|
-
let invalidProviderWarned = false;
|
|
394
|
-
/**
|
|
395
|
-
* Detect provider from environment or fall back to generic
|
|
396
|
-
*/
|
|
397
|
-
export function detectProvider() {
|
|
398
|
-
// Check explicit environment variable
|
|
399
|
-
const envProvider = process.env.AX_PROVIDER;
|
|
400
|
-
if (envProvider) {
|
|
401
|
-
const validated = validateProvider(envProvider);
|
|
402
|
-
if (validated) {
|
|
403
|
-
return validated;
|
|
404
|
-
}
|
|
405
|
-
// Warn about invalid provider (only once)
|
|
406
|
-
if (process.env.NODE_ENV !== 'test' && !invalidProviderWarned) {
|
|
407
|
-
console.warn(`[ax-cli] Warning: Invalid AX_PROVIDER="${envProvider}". ` +
|
|
408
|
-
`Valid values: glm, grok, generic. Falling back to auto-detection.`);
|
|
409
|
-
invalidProviderWarned = true;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
// Check API key environment variables
|
|
413
|
-
if (process.env.ZAI_API_KEY) {
|
|
414
|
-
return 'glm';
|
|
415
|
-
}
|
|
416
|
-
if (process.env.XAI_API_KEY || process.env.GROK_API_KEY) {
|
|
417
|
-
return 'grok';
|
|
418
|
-
}
|
|
419
|
-
return 'generic';
|
|
420
|
-
}
|
|
421
|
-
//# sourceMappingURL=provider-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider-context.js","sourceRoot":"","sources":["../../src/utils/provider-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AA+B3C;;GAEG;AACH,MAAM,CAAC,MAA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