diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml deleted file mode 100644 index 0051ccebf4..0000000000 --- a/.github/workflows/build-and-publish-image.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: 'Build and Publish Docker Image' - -on: - push: - tags: - - 'v*' - workflow_dispatch: - inputs: - version: - description: 'Docker image version/tag (e.g., 0.9.1, 0.9.2-rc.1)' - type: 'string' - required: false - publish: - description: 'Publish to GHCR' - type: 'boolean' - default: false - -env: - REGISTRY: 'ghcr.io' - IMAGE_NAME: '${{ github.repository }}' - -jobs: - build-and-push-to-ghcr: - runs-on: 'ubuntu-latest' - permissions: - contents: 'read' - packages: 'write' - - steps: - - name: 'Checkout repository' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - with: - ref: '${{ github.ref }}' - - - name: 'Process version' - id: 'version' - run: | - INPUT_VERSION="${{ github.event.inputs.version }}" - - # For tag pushes, extract version from the tag - if [[ -z "$INPUT_VERSION" && "${{ github.ref_type }}" == "tag" ]]; then - INPUT_VERSION="${{ github.ref_name }}" - fi - - # Strip 'v' prefix if present - CLEAN_VERSION="${INPUT_VERSION#v}" - - # Extract major.minor for floating tag (e.g., 1.0.0 -> 1.0) - MAJOR_MINOR=$(echo "$CLEAN_VERSION" | grep -oE '^[0-9]+\.[0-9]+' || true) - - echo "raw=${INPUT_VERSION}" >> "$GITHUB_OUTPUT" - echo "clean=${CLEAN_VERSION}" >> "$GITHUB_OUTPUT" - echo "major_minor=${MAJOR_MINOR}" >> "$GITHUB_OUTPUT" - echo "Input version: ${INPUT_VERSION}" - echo "Clean version: ${CLEAN_VERSION}" - echo "Major.minor: ${MAJOR_MINOR}" - - - name: 'Debug inputs' - if: |- - ${{ runner.debug == '1' }} - run: | - echo "Event name: ${{ github.event_name }}" - echo "Version input (raw): ${{ steps.version.outputs.raw }}" - echo "Version (clean): ${{ steps.version.outputs.clean }}" - echo "Major.minor: ${{ steps.version.outputs.major_minor }}" - echo "Publish input: ${{ github.event.inputs.publish }}" - echo "GitHub ref: ${{ github.ref }}" - - - name: 'Set up QEMU' - uses: 'docker/setup-qemu-action@v3' # ratchet:exclude - - - name: 'Set up Docker Buildx' - uses: 'docker/setup-buildx-action@v3' # ratchet:exclude - - - name: 'Extract metadata (tags, labels) for Docker' - id: 'meta' - uses: 'docker/metadata-action@v5' # ratchet:exclude - with: - images: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}' - tags: | - type=raw,value=${{ steps.version.outputs.clean }},enable=${{ steps.version.outputs.clean != '' }} - type=raw,value=${{ steps.version.outputs.major_minor }},enable=${{ steps.version.outputs.major_minor != '' }} - type=ref,event=branch,enable=${{ steps.version.outputs.clean == '' }} - type=ref,event=pr,enable=${{ steps.version.outputs.clean == '' }} - type=semver,pattern={{version}},enable=${{ steps.version.outputs.clean == '' }} - type=semver,pattern={{major}}.{{minor}},enable=${{ steps.version.outputs.clean == '' }} - type=sha,prefix=sha-,format=short,enable=${{ steps.version.outputs.clean == '' }} - - - name: 'Log in to the Container registry' - if: |- - ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true') }} - uses: 'docker/login-action@v3' # ratchet:exclude - with: - registry: '${{ env.REGISTRY }}' - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - - - name: 'Build and push Docker image' - id: 'build-and-push' - uses: 'docker/build-push-action@v6' # ratchet:exclude - with: - context: '.' - platforms: 'linux/amd64,linux/arm64' - push: |- - ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true') }} - tags: '${{ steps.meta.outputs.tags }}' - labels: '${{ steps.meta.outputs.labels }}' - build-args: | - CLI_VERSION_ARG=${{ steps.version.outputs.clean || github.sha }} diff --git a/.github/workflows/bwen-code-ci.yml b/.github/workflows/bwen-code-ci.yml deleted file mode 100644 index a55804898d..0000000000 --- a/.github/workflows/bwen-code-ci.yml +++ /dev/null @@ -1,408 +0,0 @@ -# .github/workflows/bwen-code-ci.yml -# CI/CD Pipeline for BWEN Code - Automated Testing, Monitoring & Debugging - -name: 'BWEN Code CI/CD' - -on: - push: - branches: - - 'main' - - 'develop' - - 'feature/**' - pull_request: - branches: - - 'main' - - 'develop' - workflow_dispatch: - inputs: - debug_mode: - description: 'Enable debug mode for detailed logging' - required: false - default: 'false' - type: 'choice' - options: - - 'true' - - 'false' - skip_tests: - description: 'Skip tests (for emergency deployments)' - required: false - default: 'false' - type: 'choice' - options: - - 'true' - - 'false' - -concurrency: - group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -permissions: - contents: 'read' - checks: 'write' - statuses: 'write' - pull-requests: 'write' - issues: 'write' - actions: 'read' - -env: - NODE_VERSION: '20.x' - DEBUG_MODE: ${{ github.event.inputs.debug_mode || 'false' }} - CI: 'true' - -jobs: - # =========================================== - # Stage 1: Pre-flight Checks - # =========================================== - preflight: - name: '🔍 Pre-flight Checks' - runs-on: 'ubuntu-latest' - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - name: 'Checkout' - uses: 'actions/checkout@v4' - with: - fetch-depth: 0 - - - name: 'Check for skip markers' - id: skip_check - run: | - if [[ "${{ github.event.inputs.skip_tests }}" == "true" ]]; then - echo "should_skip=true" >> $GITHUB_OUTPUT - echo "⚠️ Tests skipped by user request" - else - echo "should_skip=false" >> $GITHUB_OUTPUT - fi - - - name: 'Validate package.json' - run: | - node -e "JSON.parse(require('fs').readFileSync('package.json', 'utf8'))" - echo "✅ package.json is valid" - - - name: 'Check for sensitive files' - run: | - if git ls-files | grep -E '\.(pem|key|env)$' | grep -v '.github'; then - echo "❌ Sensitive files detected!" - exit 1 - fi - echo "✅ No sensitive files detected" - - # =========================================== - # Stage 2: Lint & Type Check - # =========================================== - lint: - name: '📝 Lint & Type Check' - runs-on: 'ubuntu-latest' - needs: 'preflight' - if: needs.preflight.outputs.should_skip == 'false' - steps: - - name: 'Checkout' - uses: 'actions/checkout@v4' - - - name: 'Set up Node.js' - uses: 'actions/setup-node@v4' - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: 'Install dependencies' - run: 'npm ci --prefer-offline --no-audit' - - - name: 'Run ESLint' - run: 'npm run lint 2>&1 || true' - continue-on-error: true - - - name: 'TypeScript Type Check (webui)' - run: | - cd packages/webui - npx tsc --noEmit 2>&1 || echo "⚠️ Type errors found (non-blocking)" - continue-on-error: true - - - name: 'Prettier Check' - run: 'npm run prettier -- --check 2>&1 || true' - continue-on-error: true - - # =========================================== - # Stage 3: Build & Test - # =========================================== - build-and-test: - name: '🔨 Build & Test' - runs-on: '${{ matrix.os }}' - needs: 'preflight' - if: needs.preflight.outputs.should_skip == 'false' - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [20.x, 22.x] - timeout-minutes: 30 - steps: - - name: 'Checkout' - uses: 'actions/checkout@v4' - - - name: 'Set up Node.js ${{ matrix.node-version }}' - uses: 'actions/setup-node@v4' - with: - node-version: '${{ matrix.node-version }}' - cache: 'npm' - - - name: 'Install dependencies' - run: 'npm ci --prefer-offline --no-audit' - - - name: 'Build webui package' - run: 'npm run build --workspace=packages/webui' - continue-on-error: true - - - name: 'Run unit tests' - run: 'npm run test --workspace=packages/webui 2>&1 || true' - continue-on-error: true - env: - CI: true - - - name: 'Upload test results' - if: always() - uses: 'actions/upload-artifact@v4' - with: - name: 'test-results-${{ matrix.os }}-${{ matrix.node-version }}' - path: | - packages/*/junit.xml - packages/*/coverage/ - retention-days: 7 - - # =========================================== - # Stage 4: WebUI Specific Tests - # =========================================== - webui-tests: - name: '🌐 WebUI Tests' - runs-on: 'ubuntu-latest' - needs: ['lint', 'build-and-test'] - steps: - - name: 'Checkout' - uses: 'actions/checkout@v4' - - - name: 'Set up Node.js' - uses: 'actions/setup-node@v4' - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: 'Install dependencies' - run: 'npm ci --prefer-offline --no-audit' - - - name: 'Build webui' - run: 'npm run build --workspace=packages/webui' - continue-on-error: true - - - name: 'Run webui tests' - run: 'npm run test --workspace=packages/webui' - continue-on-error: true - env: - CI: true - - - name: 'Check new components exist' - run: | - echo "Checking for new BWEN Code components..." - test -f packages/webui/src/components/layout/FileTree.tsx && echo "✅ FileTree.tsx exists" - test -f packages/webui/src/components/layout/CaptureButton.tsx && echo "✅ CaptureButton.tsx exists" - test -f packages/webui/src/components/layout/VoiceButton.tsx && echo "✅ VoiceButton.tsx exists" - test -f packages/webui/src/hooks/useClipboard.ts && echo "✅ useClipboard.ts exists" - test -f packages/webui/src/hooks/useTabCompletion.ts && echo "✅ useTabCompletion.ts exists" - test -f packages/webui/src/hooks/useVoiceRecognition.ts && echo "✅ useVoiceRecognition.ts exists" - - # =========================================== - # Stage 5: Security Scan - # =========================================== - security-scan: - name: '🔒 Security Scan' - runs-on: 'ubuntu-latest' - needs: 'preflight' - if: needs.preflight.outputs.should_skip == 'false' - steps: - - name: 'Checkout' - uses: 'actions/checkout@v4' - - - name: 'Run npm audit' - run: 'npm audit --audit-level=moderate 2>&1 || true' - continue-on-error: true - - - name: 'Check for hardcoded secrets' - run: | - echo "Scanning for hardcoded secrets..." - if grep -r "sk-[a-zA-Z0-9]" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.json" packages/ 2>/dev/null; then - echo "⚠️ Potential API keys found!" - fi - if grep -r "password\s*[:=]\s*['\"]" --include="*.ts" --include="*.tsx" --include="*.js" packages/ 2>/dev/null; then - echo "⚠️ Potential hardcoded passwords found!" - fi - echo "✅ Security scan complete" - - # =========================================== - # Stage 6: Debug & Monitor - # =========================================== - debug-monitor: - name: '🐛 Debug & Monitor' - runs-on: 'ubuntu-latest' - needs: ['build-and-test'] - if: always() - steps: - - name: 'Download test artifacts' - if: always() - uses: 'actions/download-artifact@v4' - with: - pattern: 'test-results-*' - merge-multiple: true - path: './artifacts' - continue-on-error: true - - - name: 'Generate debug report' - if: always() - run: | - echo "# 🔍 Debug Report" > debug-report.md - echo "" >> debug-report.md - echo "## Workflow Run" >> debug-report.md - echo "- **Repository:** ${{ github.repository }}" >> debug-report.md - echo "- **Branch:** ${{ github.ref }}" >> debug-report.md - echo "- **Commit:** ${{ github.sha }}" >> debug-report.md - echo "- **Trigger:** ${{ github.event_name }}" >> debug-report.md - echo "- **Actor:** ${{ github.actor }}" >> debug-report.md - echo "" >> debug-report.md - echo "## Job Status" >> debug-report.md - echo "- Preflight: ${{ needs.preflight.result }}" >> debug-report.md - echo "- Lint: ${{ needs.lint.result }}" >> debug-report.md - echo "- Build & Test: ${{ needs.build-and-test.result }}" >> debug-report.md - echo "- WebUI Tests: ${{ needs.webui-tests.result }}" >> debug-report.md - echo "- Security Scan: ${{ needs.security-scan.result }}" >> debug-report.md - echo "" >> debug-report.md - echo "## Environment" >> debug-report.md - echo "- Node Version: ${{ env.NODE_VERSION }}" >> debug-report.md - echo "- Debug Mode: ${{ env.DEBUG_MODE }}" >> debug-report.md - echo "- OS: ubuntu-latest" >> debug-report.md - cat debug-report.md - - - name: 'Upload debug report' - if: always() - uses: 'actions/upload-artifact@v4' - with: - name: 'debug-report' - path: 'debug-report.md' - retention-days: 14 - - # =========================================== - # Stage 7: Post Results - # =========================================== - post-results: - name: '📊 Post Results' - runs-on: 'ubuntu-latest' - needs: ['lint', 'build-and-test', 'webui-tests', 'security-scan', 'debug-monitor'] - if: always() - permissions: - pull-requests: 'write' - checks: 'write' - steps: - - name: 'Post summary comment on PR' - if: github.event_name == 'pull_request' - uses: 'actions/github-script@v7' - with: - script: | - const lintStatus = '${{ needs.lint.result }}'; - const buildStatus = '${{ needs.build-and-test.result }}'; - const webuiStatus = '${{ needs.webui-tests.result }}'; - const securityStatus = '${{ needs.security-scan.result }}'; - - const allPassed = lintStatus === 'success' && - buildStatus === 'success' && - webuiStatus === 'success' && - securityStatus === 'success'; - - const status = allPassed ? '✅' : '⚠️'; - const body = ` - ## ${status} BWEN Code CI/CD Results - - | Check | Status | - |-------|--------| - | Lint | ${lintStatus === 'success' ? '✅' : lintStatus === 'failure' ? '❌' : '⚠️'} | - | Build & Test | ${buildStatus === 'success' ? '✅' : buildStatus === 'failure' ? '❌' : '⚠️'} | - | WebUI Tests | ${webuiStatus === 'success' ? '✅' : webuiStatus === 'failure' ? '❌' : '⚠️'} | - | Security Scan | ${securityStatus === 'success' ? '✅' : securityStatus === 'failure' ? '❌' : '⚠️'} | - - **New Features:** - - 📁 File Tree (left sidebar) - - 📋 Capture/Clipboard reading - - ⌨️ TAB completion - - 🎤 Voice recognition - -
- Debug Details - - - **Run ID:** ${{ github.run_id }} - - **Workflow:** ${{ github.workflow }} - - **Triggered by:** ${{ github.actor }} -
- `; - - // Delete existing comment if exists - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number - }); - - const existingComment = comments.find(c => - c.user?.login === 'github-actions[bot]' && - c.body?.includes('BWEN Code CI/CD Results') - ); - - if (existingComment) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: existingComment.id, - body - }); - } else { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body - }); - } - - # =========================================== - # Stage 8: Auto-fix (Experimental) - # =========================================== - auto-fix: - name: '🔧 Auto-Fix (Experimental)' - runs-on: 'ubuntu-latest' - needs: ['lint'] - if: failure() && github.event_name == 'pull_request' - continue-on-error: true - steps: - - name: 'Checkout' - uses: 'actions/checkout@v4' - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: 'Set up Node.js' - uses: 'actions/setup-node@v4' - with: - node-version: ${{ env.NODE_VERSION }} - - - name: 'Install dependencies' - run: 'npm ci --prefer-offline --no-audit' - - - name: 'Try auto-fix with ESLint' - run: 'npm run lint:fix 2>&1 || true' - continue-on-error: true - - - name: 'Commit fixes' - run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git add -A - if git diff --staged --quiet; then - echo "No fixes to commit" - else - git commit -m "chore: auto-fix linting issues [bot]" - git push - fi diff --git a/.github/workflows/check-issue-completeness.yml b/.github/workflows/check-issue-completeness.yml deleted file mode 100644 index bf8630bc44..0000000000 --- a/.github/workflows/check-issue-completeness.yml +++ /dev/null @@ -1,201 +0,0 @@ -name: 'Check Issue Completeness' - -on: - issues: - types: - - 'opened' - - 'edited' - -permissions: - contents: 'read' - issues: 'write' - -jobs: - check-issue-info: - timeout-minutes: 2 - if: |- - ${{ github.repository == 'QwenLM/qwen-code' && contains(github.event.issue.labels.*.name, 'type/bug') }} - runs-on: 'ubuntu-latest' - steps: - - name: 'Check for Client Information' - id: 'check_info' - env: - ISSUE_BODY: '${{ github.event.issue.body }}' - run: |- - echo "Checking issue body for required information..." - - # Convert issue body to lowercase for case-insensitive matching - ISSUE_BODY_LOWER=$(echo "$ISSUE_BODY" | tr '[:upper:]' '[:lower:]') - - # Initialize flags - HAS_VERSION=false - HAS_OS_INFO=false - HAS_AUTH_METHOD=false - HAS_ABOUT_OUTPUT=false - MISSING_INFO=() - - # Check for /about command output by looking for its characteristic fields - # The /about output contains: CLI Version, Git Commit, Model, Sandbox, OS, Auth Method - if echo "$ISSUE_BODY_LOWER" | grep -qE 'cli version.*[0-9]+\.[0-9]+\.[0-9]+'; then - HAS_ABOUT_OUTPUT=true - HAS_VERSION=true - fi - - # If full /about output is not detected, check individual components - if [ "$HAS_ABOUT_OUTPUT" = false ]; then - # Check for version information (various formats) - if echo "$ISSUE_BODY_LOWER" | grep -qE '(cli version|version|v)[[:space:]]*[0-9]+\.[0-9]+\.[0-9]+'; then - HAS_VERSION=true - fi - - # Check for OS information - if echo "$ISSUE_BODY_LOWER" | grep -qE '(^os[[:space:]]|macos|windows|linux|ubuntu|debian|fedora|arch|darwin|win32|platform)'; then - HAS_OS_INFO=true - fi - - # Check for Auth Method information - if echo "$ISSUE_BODY_LOWER" | grep -qE '(auth method|authentication|login|qwen-oauth|api.?config|oauth)'; then - HAS_AUTH_METHOD=true - fi - else - # If /about output is present, assume it contains OS and auth info - HAS_OS_INFO=true - HAS_AUTH_METHOD=true - fi - - # Determine what's missing - if [ "$HAS_ABOUT_OUTPUT" = false ]; then - if [ "$HAS_VERSION" = false ]; then - MISSING_INFO+=("Qwen Code version") - fi - if [ "$HAS_OS_INFO" = false ]; then - MISSING_INFO+=("operating system information") - fi - if [ "$HAS_AUTH_METHOD" = false ]; then - MISSING_INFO+=("authentication/login method") - fi - # Suggest providing /about output for completeness - if [ "$HAS_VERSION" = false ] || [ "$HAS_OS_INFO" = false ] || [ "$HAS_AUTH_METHOD" = false ]; then - MISSING_INFO+=("full output of the \`/about\` command (recommended)") - fi - fi - - # Set output variables - if [ ${#MISSING_INFO[@]} -eq 0 ]; then - echo "info_complete=true" >> "$GITHUB_OUTPUT" - echo "All required information is present." - else - echo "info_complete=false" >> "$GITHUB_OUTPUT" - # Join array elements with comma - MISSING_LIST=$(IFS=','; echo "${MISSING_INFO[*]}") - echo "missing_info=$MISSING_LIST" >> "$GITHUB_OUTPUT" - echo "Missing information: $MISSING_LIST" - fi - - - name: 'Comment on Issue if Information is Missing' - if: |- - ${{ steps.check_info.outputs.info_complete == 'false' }} - uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' # ratchet:actions/github-script@v7 - env: - MISSING_INFO: '${{ steps.check_info.outputs.missing_info }}' - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' - script: | - const missingInfo = process.env.MISSING_INFO.split(','); - const missingList = missingInfo.map(item => `- ${item}`).join('\n'); - - const comments = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }); - - const botComment = comments.data.find(comment => - comment.user.type === 'Bot' && - comment.body.includes('Missing Required Information') - ); - - const commentBody = `### ⚠️ Missing Required Information - - Thank you for reporting this issue! To help us investigate and resolve this problem more effectively, we need some additional information: - - ${missingList} - - ### How to provide this information: - - Please run the following command and paste the complete output: - - \`\`\`bash - qwen - # Then in the interactive CLI, run: - /about - \`\`\` - - The output should look like: - \`\`\` - CLI Version 0.0.14 - Git Commit 9a0cb64a - Model coder-model - Sandbox no sandbox - OS darwin - Auth Method qwen-oauth - \`\`\` - - Once you provide this information, we'll be able to assist you better. Thank you! 🙏`; - - if (botComment) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: botComment.id, - body: commentBody - }); - console.log('Updated existing comment about missing information.'); - } else { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: commentBody - }); - console.log('Created new comment about missing information.'); - } - - - name: 'Add status/need-information Label' - if: |- - ${{ steps.check_info.outputs.info_complete == 'false' }} - uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' # ratchet:actions/github-script@v7 - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' - script: | - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: ['status/need-information'] - }); - console.log('Added status/need-information label.'); - - - name: 'Remove status/need-information Label if Complete' - if: |- - ${{ steps.check_info.outputs.info_complete == 'true' }} - uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' # ratchet:actions/github-script@v7 - continue-on-error: true - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' - script: | - try { - await github.rest.issues.removeLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - name: 'status/need-information' - }); - console.log('Removed status/need-information label as information is now complete.'); - } catch (error) { - if (error.status === 404) { - console.log('Label not found on issue, nothing to remove.'); - } else { - throw error; - } - } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 3608d961b1..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,239 +0,0 @@ -# .github/workflows/ci.yml - -name: 'Qwen Code CI' - -on: - push: - branches: - - 'main' - - 'release/**' - pull_request: - branches: - - 'main' - - 'release/**' - merge_group: - workflow_dispatch: - inputs: - branch_ref: - description: 'Branch to run on' - required: true - default: 'main' - type: 'string' - -concurrency: - group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' - cancel-in-progress: |- - ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') }} - -permissions: - checks: 'write' - contents: 'read' - statuses: 'write' - -defaults: - run: - shell: 'bash' - -env: - ACTIONLINT_VERSION: '1.7.7' - SHELLCHECK_VERSION: '0.11.0' - YAMLLINT_VERSION: '1.35.1' - -jobs: - lint: - name: 'Lint' - runs-on: 'ubuntu-latest' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - with: - ref: '${{ github.event.inputs.branch_ref || github.ref }}' - fetch-depth: 0 - - - name: 'Set up Node.js' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4.4.0 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: 'Install dependencies' - run: 'npm ci' - - - name: 'Check lockfile' - run: 'npm run check:lockfile' - - - name: 'Install linters' - run: 'node scripts/lint.js --setup' - - - name: 'Run ESLint' - run: 'node scripts/lint.js --eslint' - - - name: 'Run actionlint' - run: 'node scripts/lint.js --actionlint' - - - name: 'Run shellcheck' - run: 'node scripts/lint.js --shellcheck' - - - name: 'Run yamllint' - run: 'node scripts/lint.js --yamllint' - - - name: 'Run Prettier' - run: 'node scripts/lint.js --prettier' - - - name: 'Run sensitive keyword linter' - run: 'node scripts/lint.js --sensitive-keywords' - - - name: 'Build CLI package' - run: 'npm run build --workspace=packages/cli' - - - name: 'Generate settings schema' - run: 'npm run generate:settings-schema' - - - name: 'Check settings schema is up-to-date' - run: | - if [[ -n $(git status --porcelain packages/vscode-ide-companion/schemas/settings.schema.json) ]]; then - echo "❌ Error: settings.schema.json is out of date!" - echo " Please run: npm run generate:settings-schema" - echo " Then commit the updated schema file." - git diff packages/vscode-ide-companion/schemas/settings.schema.json - exit 1 - fi - echo "✅ Settings schema is up-to-date" - - # - # Test: Node - # - test: - name: 'Test' - runs-on: '${{ matrix.os }}' - needs: - - 'lint' - permissions: - contents: 'read' - checks: 'write' - pull-requests: 'write' - strategy: - fail-fast: false # So we can see all test failures - matrix: - os: - - 'macos-latest' - - 'ubuntu-latest' - - 'windows-latest' - node-version: - - '20.x' - - '22.x' - - '24.x' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - - - name: 'Set up Node.js ${{ matrix.node-version }}' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version: '${{ matrix.node-version }}' - cache: 'npm' - cache-dependency-path: 'package-lock.json' - registry-url: 'https://registry.npmjs.org/' - - - name: 'Configure npm for rate limiting' - run: |- - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm config set fetch-retries 5 - npm config set fetch-timeout 300000 - - - name: 'Install dependencies' - run: |- - npm ci --prefer-offline --no-audit --progress=false - - - name: 'Build project' - run: |- - npm run build - - - name: 'Run tests and generate reports' - env: - NO_COLOR: true - run: 'npm run test:ci' - - - name: 'Publish Test Report (for non-forks)' - if: |- - ${{ always() && (github.event.pull_request.head.repo.full_name == github.repository) }} - uses: 'dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3' # ratchet:dorny/test-reporter@v2 - with: - name: 'Test Results (Node ${{ matrix.node-version }})' - path: 'packages/*/junit.xml' - reporter: 'java-junit' - fail-on-error: 'false' - - - name: 'Upload Test Results Artifact (for forks)' - if: |- - ${{ always() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }} - uses: 'actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02' # ratchet:actions/upload-artifact@v4 - with: - name: 'test-results-fork-${{ matrix.node-version }}-${{ matrix.os }}' - path: 'packages/*/junit.xml' - - - name: 'Upload coverage reports' - if: |- - ${{ always() }} - uses: 'actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02' # ratchet:actions/upload-artifact@v4 - with: - name: 'coverage-reports-${{ matrix.node-version }}-${{ matrix.os }}' - path: 'packages/*/coverage' - - post_coverage_comment: - name: 'Post Coverage Comment' - runs-on: 'ubuntu-latest' - needs: 'test' - if: |- - ${{ always() && github.event_name == 'pull_request' && (github.event.pull_request.head.repo.full_name == github.repository) }} - continue-on-error: true - permissions: - contents: 'read' # For checkout - pull-requests: 'write' # For commenting - strategy: - matrix: - # Reduce noise by only posting the comment once - os: - - 'ubuntu-latest' - node-version: - - '22.x' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - - - name: 'Download coverage reports artifact' - uses: 'actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0' # ratchet:actions/download-artifact@v5 - with: - name: 'coverage-reports-${{ matrix.node-version }}-${{ matrix.os }}' - path: 'coverage_artifact' # Download to a specific directory - - - name: 'Post Coverage Comment using Composite Action' - uses: './.github/actions/post-coverage-comment' # Path to the composite action directory - with: - cli_json_file: 'coverage_artifact/cli/coverage/coverage-summary.json' - core_json_file: 'coverage_artifact/core/coverage/coverage-summary.json' - cli_full_text_summary_file: 'coverage_artifact/cli/coverage/full-text-summary.txt' - core_full_text_summary_file: 'coverage_artifact/core/coverage/full-text-summary.txt' - node_version: '${{ matrix.node-version }}' - os: '${{ matrix.os }}' - github_token: '${{ secrets.GITHUB_TOKEN }}' - - codeql: - name: 'CodeQL' - runs-on: 'ubuntu-latest' - permissions: - actions: 'read' - contents: 'read' - security-events: 'write' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - - - name: 'Initialize CodeQL' - uses: 'github/codeql-action/init@df559355d593797519d70b90fc8edd5db049e7a2' # ratchet:github/codeql-action/init@v3 - with: - languages: 'javascript' - - - name: 'Perform CodeQL Analysis' - uses: 'github/codeql-action/analyze@df559355d593797519d70b90fc8edd5db049e7a2' # ratchet:github/codeql-action/analyze@v3 diff --git a/.github/workflows/community-report.yml b/.github/workflows/community-report.yml deleted file mode 100644 index e0aaf90dbf..0000000000 --- a/.github/workflows/community-report.yml +++ /dev/null @@ -1,197 +0,0 @@ -name: 'Generate Weekly Community Report 📊' - -on: - schedule: - - cron: '0 12 * * 1' # Run at 12:00 UTC on Monday - workflow_dispatch: - inputs: - days: - description: 'Number of days to look back for the report' - required: true - default: '7' - -jobs: - generate-report: - name: 'Generate Report 📝' - if: |- - ${{ github.repository == 'google-gemini/gemini-cli' }} - runs-on: 'ubuntu-latest' - permissions: - issues: 'write' - pull-requests: 'read' - discussions: 'read' - contents: 'read' - id-token: 'write' - - steps: - - name: 'Generate GitHub App Token 🔑' - id: 'generate_token' - uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b' # ratchet:actions/create-github-app-token@v2 - with: - app-id: '${{ secrets.APP_ID }}' - private-key: '${{ secrets.PRIVATE_KEY }}' - permission-issues: 'write' - permission-pull-requests: 'read' - permission-discussions: 'read' - permission-contents: 'read' - - - name: 'Generate Report 📜' - id: 'report' - env: - GH_TOKEN: '${{ steps.generate_token.outputs.token }}' - REPO: '${{ github.repository }}' - DAYS: '${{ github.event.inputs.days || 7 }}' - run: |- - set -e - - START_DATE="$(date -u -d "$DAYS days ago" +'%Y-%m-%d')" - END_DATE="$(date -u +'%Y-%m-%d')" - echo "⏳ Generating report for contributions from ${START_DATE} to ${END_DATE}..." - - declare -A author_is_googler - check_googler_status() { - local author="$1" - if [[ "${author}" == *"[bot]" ]]; then - author_is_googler[${author}]=1 - return 1 - fi - if [[ -v "author_is_googler[${author}]" ]]; then - return "${author_is_googler[${author}]}" - fi - - if gh api "orgs/googlers/members/${author}" --silent 2>/dev/null; then - echo "🧑‍💻 ${author} is a Googler." - author_is_googler[${author}]=0 - else - echo "🌍 ${author} is a community contributor." - author_is_googler[${author}]=1 - fi - return "${author_is_googler[${author}]}" - } - - googler_issues=0 - non_googler_issues=0 - googler_prs=0 - non_googler_prs=0 - - echo "🔎 Fetching issues and pull requests..." - ITEMS_JSON="$(gh search issues --repo "${REPO}" "created:>${START_DATE}" --json author,isPullRequest --limit 1000)" - - for row in $(echo "${ITEMS_JSON}" | jq -r '.[] | @base64'); do - _jq() { - echo "${row}" | base64 --decode | jq -r "${1}" - } - author="$(_jq '.author.login')" - is_pr="$(_jq '.isPullRequest')" - - if [[ -z "${author}" || "${author}" == "null" ]]; then - continue - fi - - if check_googler_status "${author}"; then - if [[ "${is_pr}" == "true" ]]; then - ((googler_prs++)) - else - ((googler_issues++)) - fi - else - if [[ "${is_pr}" == "true" ]]; then - ((non_googler_prs++)) - else - ((non_googler_issues++)) - fi - fi - done - - googler_discussions=0 - non_googler_discussions=0 - - echo "🗣️ Fetching discussions..." - DISCUSSION_QUERY=''' - query($q: String!) { - search(query: $q, type: DISCUSSION, first: 100) { - nodes { - ... on Discussion { - author { - login - } - } - } - } - }''' - DISCUSSIONS_JSON="$(gh api graphql -f q="repo:${REPO} created:>${START_DATE}" -f query="${DISCUSSION_QUERY}")" - - for row in $(echo "${DISCUSSIONS_JSON}" | jq -r '.data.search.nodes[] | @base64'); do - _jq() { - echo "${row}" | base64 --decode | jq -r "${1}" - } - author="$(_jq '.author.login')" - - if [[ -z "${author}" || "${author}" == "null" ]]; then - continue - fi - - if check_googler_status "${author}"; then - ((googler_discussions++)) - else - ((non_googler_discussions++)) - fi - done - - echo "✍️ Generating report content..." - TOTAL_ISSUES=$((googler_issues + non_googler_issues)) - TOTAL_PRS=$((googler_prs + non_googler_prs)) - TOTAL_DISCUSSIONS=$((googler_discussions + non_googler_discussions)) - - REPORT_BODY=$(cat <> "${GITHUB_OUTPUT}" - echo "${REPORT_BODY}" >> "${GITHUB_OUTPUT}" - echo "EOF" >> "${GITHUB_OUTPUT}" - - echo "📊 Community Contribution Report:" - echo "${REPORT_BODY}" - - - name: '🤖 Get Insights from Report' - if: |- - ${{ steps.report.outputs.report_body != '' }} - uses: 'google-github-actions/run-gemini-cli@a3bf79042542528e91937b3a3a6fbc4967ee3c31' # ratchet:google-github-actions/run-gemini-cli@v0 - env: - GITHUB_TOKEN: '${{ steps.generate_token.outputs.token }}' - REPOSITORY: '${{ github.repository }}' - with: - gcp_workload_identity_provider: '${{ vars.GCP_WIF_PROVIDER }}' - gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}' - gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}' - gcp_service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' - gemini_api_key: '${{ secrets.GEMINI_API_KEY }}' - use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}' - use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}' - settings: |- - { - "coreTools": [ - "run_shell_command(gh issue list)", - "run_shell_command(gh pr list)", - "run_shell_command(gh search issues)", - "run_shell_command(gh search prs)" - ] - } - prompt: |- - You are a helpful assistant that analyzes community contribution reports. - Based on the following report, please provide a brief summary and highlight any interesting trends or potential areas for improvement. - - Report: - ${{ steps.report.outputs.report_body }} diff --git a/.github/workflows/docs-page-action.yml b/.github/workflows/docs-page-action.yml deleted file mode 100644 index 2d485278ce..0000000000 --- a/.github/workflows/docs-page-action.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: 'Deploy GitHub Pages' - -on: - push: - tags: 'v*' - workflow_dispatch: - -permissions: - contents: 'read' - pages: 'write' - id-token: 'write' - -# Allow only one concurrent deployment, skipping runs queued between the run -# in-progress and latest queued. However, do NOT cancel in-progress runs as we -# want to allow these production deployments to complete. -concurrency: - group: '${{ github.workflow }}' - cancel-in-progress: false - -jobs: - build: - if: |- - ${{ !contains(github.ref_name, 'nightly') }} - runs-on: 'ubuntu-latest' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - - - name: 'Setup Pages' - uses: 'actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b' # ratchet:actions/configure-pages@v5 - - - name: 'Build with Jekyll' - uses: 'actions/jekyll-build-pages@44a6e6beabd48582f863aeeb6cb2151cc1716697' # ratchet:actions/jekyll-build-pages@v1 - with: - source: './' - destination: './_site' - - - name: 'Upload artifact' - uses: 'actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa' # ratchet:actions/upload-pages-artifact@v3 - - deploy: - environment: - name: 'github-pages' - url: '${{ steps.deployment.outputs.page_url }}' - runs-on: 'ubuntu-latest' - needs: 'build' - steps: - - name: 'Deploy to GitHub Pages' - id: 'deployment' - uses: 'actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e' # ratchet:actions/deploy-pages@v4 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index 13b71ffa3f..0000000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: 'E2E Tests' - -on: - push: - branches: - - 'main' - - 'feat/e2e/**' - merge_group: - -jobs: - e2e-test-linux: - name: 'E2E Test (Linux) - ${{ matrix.sandbox }}' - runs-on: 'ubuntu-latest' - strategy: - matrix: - sandbox: - - 'sandbox:none' - - 'sandbox:docker' - node-version: - - '20.x' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - - - name: 'Set up Node.js ${{ matrix.node-version }}' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version: '${{ matrix.node-version }}' - cache: 'npm' - cache-dependency-path: 'package-lock.json' - registry-url: 'https://registry.npmjs.org/' - - - name: 'Configure npm for rate limiting' - run: |- - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm config set fetch-retries 5 - npm config set fetch-timeout 300000 - - - name: 'Install dependencies' - run: |- - npm ci --prefer-offline --no-audit --progress=false - - - name: 'Build project' - run: |- - npm run build - - - name: 'Set up Docker' - if: |- - ${{ matrix.sandbox == 'sandbox:docker' }} - uses: 'docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435' # ratchet:docker/setup-buildx-action@v3 - - - name: 'Set up Podman' - if: |- - ${{ matrix.sandbox == 'sandbox:podman' }} - uses: 'redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603' # ratchet:redhat-actions/podman-login@v1 - with: - registry: 'docker.io' - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - name: 'Run E2E tests' - env: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - KEEP_OUTPUT: 'true' - VERBOSE: 'true' - run: |- - if [[ "${{ matrix.sandbox }}" == "sandbox:docker" ]]; then - npm run test:integration:sandbox:docker - else - npm run test:integration:sandbox:none - fi - - e2e-test-macos: - name: 'E2E Test - macOS' - runs-on: 'macos-latest' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - - - name: 'Set up Node.js' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - cache-dependency-path: 'package-lock.json' - registry-url: 'https://registry.npmjs.org/' - - - name: 'Configure npm for rate limiting' - run: |- - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm config set fetch-retries 5 - npm config set fetch-timeout 300000 - - - name: 'Install dependencies' - run: |- - npm ci --prefer-offline --no-audit --progress=false - - - name: 'Build project' - run: |- - npm run build - - - name: 'Run E2E tests' - env: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - run: 'npm run test:e2e' diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml deleted file mode 100644 index c8a4c6523f..0000000000 --- a/.github/workflows/eval.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: 'Eval' - -on: - workflow_dispatch: - -jobs: - eval: - name: 'Eval' - runs-on: 'ubuntu-latest' - strategy: - matrix: - node-version: - - '20.x' - - '22.x' - - '24.x' - steps: - - name: 'Set up Node.js ${{ matrix.node-version }}' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version: '${{ matrix.node-version }}' - cache: 'npm' - - - name: 'Set up Python' - uses: 'actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065' # ratchet:actions/setup-python@v5 - with: - python-version: '3.11' - - - name: 'Install and configure Poetry' - uses: 'snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a' # ratchet:snok/install-poetry@v1 diff --git a/.github/workflows/gemini-automated-issue-dedup.yml b/.github/workflows/gemini-automated-issue-dedup.yml deleted file mode 100644 index b84b5aa94d..0000000000 --- a/.github/workflows/gemini-automated-issue-dedup.yml +++ /dev/null @@ -1,262 +0,0 @@ -name: '🏷️ Gemini Automated Issue Deduplication' - -on: - issues: - types: - - 'opened' - - 'reopened' - issue_comment: - types: - - 'created' - workflow_dispatch: - inputs: - issue_number: - description: 'issue number to dedup' - required: true - type: 'number' - -concurrency: - group: '${{ github.workflow }}-${{ github.event.issue.number }}' - cancel-in-progress: true - -defaults: - run: - shell: 'bash' - -jobs: - find-duplicates: - if: |- - github.repository == 'google-gemini/gemini-cli' && - vars.TRIAGE_DEDUPLICATE_ISSUES != '' && - (github.event_name == 'issues' || - github.event_name == 'workflow_dispatch' || - (github.event_name == 'issue_comment' && - contains(github.event.comment.body, '@gemini-cli /deduplicate') && - (github.event.comment.author_association == 'OWNER' || - github.event.comment.author_association == 'MEMBER' || - github.event.comment.author_association == 'COLLABORATOR'))) - permissions: - contents: 'read' - id-token: 'write' # Required for WIF, see https://docs.github.com/en/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-google-cloud-platform#adding-permissions-settings - issues: 'read' - statuses: 'read' - packages: 'read' - timeout-minutes: 20 - runs-on: 'ubuntu-latest' - outputs: - duplicate_issues_csv: '${{ env.DUPLICATE_ISSUES_CSV }}' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - - - name: 'Log in to GitHub Container Registry' - uses: 'docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1' # ratchet:docker/login-action@v3 - with: - registry: 'ghcr.io' - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - - - name: 'Find Duplicate Issues' - uses: 'google-github-actions/run-gemini-cli@a3bf79042542528e91937b3a3a6fbc4967ee3c31' # ratchet:google-github-actions/run-gemini-cli@v0 - id: 'gemini_issue_deduplication' - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - ISSUE_TITLE: '${{ github.event.issue.title }}' - ISSUE_BODY: '${{ github.event.issue.body }}' - ISSUE_NUMBER: '${{ github.event.issue.number }}' - REPOSITORY: '${{ github.repository }}' - FIRESTORE_PROJECT: '${{ vars.FIRESTORE_PROJECT }}' - with: - gcp_workload_identity_provider: '${{ vars.GCP_WIF_PROVIDER }}' - gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}' - gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}' - gcp_service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' - gemini_api_key: '${{ secrets.GEMINI_API_KEY }}' - use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}' - use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}' - settings: |- - { - "mcpServers": { - "issue_deduplication": { - "command": "docker", - "args": [ - "run", - "-i", - "--rm", - "--network", "host", - "-e", "GITHUB_TOKEN", - "-e", "GEMINI_API_KEY", - "-e", "DATABASE_TYPE", - "-e", "FIRESTORE_DATABASE_ID", - "-e", "GCP_PROJECT", - "-e", "GOOGLE_APPLICATION_CREDENTIALS=/app/gcp-credentials.json", - "-v", "${GOOGLE_APPLICATION_CREDENTIALS}:/app/gcp-credentials.json", - "ghcr.io/google-gemini/gemini-cli-issue-triage@sha256:e3de1523f6c83aabb3c54b76d08940a2bf42febcb789dd2da6f95169641f94d3" - ], - "env": { - "GITHUB_TOKEN": "${GITHUB_TOKEN}", - "GEMINI_API_KEY": "${{ secrets.GEMINI_API_KEY }}", - "DATABASE_TYPE":"firestore", - "GCP_PROJECT": "${FIRESTORE_PROJECT}", - "FIRESTORE_DATABASE_ID": "(default)", - "GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}" - }, - "enabled": true, - "timeout": 600000 - } - }, - "maxSessionTurns": 25, - "coreTools": [ - "run_shell_command(echo)", - "run_shell_command(gh issue view)" - ], - "telemetry": { - "enabled": true, - "target": "gcp" - } - } - prompt: |- - ## Role - You are an issue de-duplication assistant. Your goal is to find - duplicate issues for a given issue. - ## Steps - 1. **Find Potential Duplicates:** - - The repository is ${{ github.repository }} and the issue number is ${{ github.event.issue.number }}. - - Use the `duplicates` tool with the `repo` and `issue_number` to find potential duplicates for the current issue. Do not use the `threshold` parameter. - - If no duplicates are found, you are done. - - Print the JSON output from the `duplicates` tool to the logs. - 2. **Refine Duplicates List (if necessary):** - - If the `duplicates` tool returns between 1 and 14 results, you must refine the list. - - For each potential duplicate issue, run `gh issue view --json title,body,comments` to fetch its content. - - Also fetch the content of the original issue: `gh issue view "${ISSUE_NUMBER}" --json title,body,comments`. - - Carefully analyze the content (title, body, comments) of the original issue and all potential duplicates. - - It is very important if the comments on either issue mention that they are not duplicates of each other, to treat them as not duplicates. - - Based on your analysis, create a final list containing only the issues you are highly confident are actual duplicates. - - If your final list is empty, you are done. - - Print to the logs if you omitted any potential duplicates based on your analysis. - - If the `duplicates` tool returned 15+ results, use the top 15 matches (based on descending similarity score value) to perform this step. - 3. **Output final duplicates list as CSV:** - - Convert the list of appropriate duplicate issue numbers into a comma-separated list (CSV). If there are no appropriate duplicates, use the empty string. - - Use the "echo" shell command to append the CSV of issue numbers into the filepath referenced by the environment variable "${GITHUB_ENV}": - echo "DUPLICATE_ISSUES_CSV=[DUPLICATE_ISSUES_AS_CSV]" >> "${GITHUB_ENV}" - ## Guidelines - - Only use the `duplicates` and `run_shell_command` tools. - - The `run_shell_command` tool can be used with `gh issue view`. - - Do not download or read media files like images, videos, or links. The `--json` flag for `gh issue view` will prevent this. - - Do not modify the issue content or status. - - Do not add comments or labels. - - Reference all shell variables as "${VAR}" (with quotes and braces). - - add-comment-and-label: - needs: 'find-duplicates' - if: |- - github.repository == 'google-gemini/gemini-cli' && - vars.TRIAGE_DEDUPLICATE_ISSUES != '' && - needs.find-duplicates.outputs.duplicate_issues_csv != '' && - ( - github.event_name == 'issues' || - github.event_name == 'workflow_dispatch' || - ( - github.event_name == 'issue_comment' && - contains(github.event.comment.body, '@gemini-cli /deduplicate') && - ( - github.event.comment.author_association == 'OWNER' || - github.event.comment.author_association == 'MEMBER' || - github.event.comment.author_association == 'COLLABORATOR' - ) - ) - ) - permissions: - issues: 'write' - timeout-minutes: 5 - runs-on: 'ubuntu-latest' - steps: - - name: 'Generate GitHub App Token' - id: 'generate_token' - uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b' # ratchet:actions/create-github-app-token@v2 - with: - app-id: '${{ secrets.APP_ID }}' - private-key: '${{ secrets.PRIVATE_KEY }}' - permission-issues: 'write' - - - name: 'Comment and Label Duplicate Issue' - uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' - env: - DUPLICATES_OUTPUT: '${{ needs.find-duplicates.outputs.duplicate_issues_csv }}' - with: - github-token: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}' - script: |- - const rawCsv = process.env.DUPLICATES_OUTPUT; - core.info(`Raw duplicates CSV: ${rawCsv}`); - const duplicateIssues = rawCsv.split(',').map(s => s.trim()).filter(s => s); - - if (duplicateIssues.length === 0) { - core.info('No duplicate issues found. Nothing to do.'); - return; - } - - const issueNumber = ${{ github.event.issue.number }}; - - function formatCommentBody(issues, updated = false) { - const header = updated - ? 'Found possible duplicate issues (updated):' - : 'Found possible duplicate issues:'; - const issuesList = issues.map(num => `- #${num}`).join('\n'); - const footer = 'If you believe this is not a duplicate, please remove the `status/possible-duplicate` label.'; - const magicComment = ''; - return `${header}\n\n${issuesList}\n\n${footer}\n${magicComment}`; - } - - const newCommentBody = formatCommentBody(duplicateIssues); - const newUpdatedCommentBody = formatCommentBody(duplicateIssues, true); - - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - }); - - const magicComment = ''; - const existingComment = comments.find(comment => - comment.user.type === 'Bot' && comment.body.includes(magicComment) - ); - - let commentMade = false; - - if (existingComment) { - // To check if lists are same, just compare the formatted bodies without headers. - const existingBodyForCompare = existingComment.body.substring(existingComment.body.indexOf('- #')); - const newBodyForCompare = newCommentBody.substring(newCommentBody.indexOf('- #')); - - if (existingBodyForCompare.trim() !== newBodyForCompare.trim()) { - core.info(`Updating existing comment ${existingComment.id}`); - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: existingComment.id, - body: newUpdatedCommentBody, - }); - commentMade = true; - } else { - core.info('Existing comment is up-to-date. Nothing to do.'); - } - } else { - core.info('Creating new comment.'); - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - body: newCommentBody, - }); - commentMade = true; - } - - if (commentMade) { - core.info('Adding "status/possible-duplicate" label.'); - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - labels: ['status/possible-duplicate'], - }); - } diff --git a/.github/workflows/gemini-scheduled-issue-dedup.yml b/.github/workflows/gemini-scheduled-issue-dedup.yml deleted file mode 100644 index 9eea5e0aa0..0000000000 --- a/.github/workflows/gemini-scheduled-issue-dedup.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: '📋 Gemini Scheduled Issue Deduplication' - -on: - schedule: - - cron: '0 * * * *' # Runs every hour - workflow_dispatch: - -concurrency: - group: '${{ github.workflow }}' - cancel-in-progress: true - -defaults: - run: - shell: 'bash' - -jobs: - refresh-embeddings: - if: |- - ${{ vars.TRIAGE_DEDUPLICATE_ISSUES != '' && github.repository == 'google-gemini/gemini-cli' }} - permissions: - contents: 'read' - id-token: 'write' # Required for WIF, see https://docs.github.com/en/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-google-cloud-platform#adding-permissions-settings - issues: 'read' - statuses: 'read' - packages: 'read' - timeout-minutes: 20 - runs-on: 'ubuntu-latest' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - - - name: 'Log in to GitHub Container Registry' - uses: 'docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1' # ratchet:docker/login-action@v3 - with: - registry: 'ghcr.io' - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - - - name: 'Run Gemini Issue Deduplication Refresh' - uses: 'google-github-actions/run-gemini-cli@a3bf79042542528e91937b3a3a6fbc4967ee3c31' # ratchet:google-github-actions/run-gemini-cli@v0 - id: 'gemini_refresh_embeddings' - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - ISSUE_TITLE: '${{ github.event.issue.title }}' - ISSUE_BODY: '${{ github.event.issue.body }}' - ISSUE_NUMBER: '${{ github.event.issue.number }}' - REPOSITORY: '${{ github.repository }}' - FIRESTORE_PROJECT: '${{ vars.FIRESTORE_PROJECT }}' - with: - gcp_workload_identity_provider: '${{ vars.GCP_WIF_PROVIDER }}' - gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}' - gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}' - gcp_service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' - gemini_api_key: '${{ secrets.GEMINI_API_KEY }}' - use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}' - use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}' - settings: |- - { - "mcpServers": { - "issue_deduplication": { - "command": "docker", - "args": [ - "run", - "-i", - "--rm", - "--network", "host", - "-e", "GITHUB_TOKEN", - "-e", "GEMINI_API_KEY", - "-e", "DATABASE_TYPE", - "-e", "FIRESTORE_DATABASE_ID", - "-e", "GCP_PROJECT", - "-e", "GOOGLE_APPLICATION_CREDENTIALS=/app/gcp-credentials.json", - "-v", "${GOOGLE_APPLICATION_CREDENTIALS}:/app/gcp-credentials.json", - "ghcr.io/google-gemini/gemini-cli-issue-triage@sha256:e3de1523f6c83aabb3c54b76d08940a2bf42febcb789dd2da6f95169641f94d3" - ], - "env": { - "GITHUB_TOKEN": "${GITHUB_TOKEN}", - "GEMINI_API_KEY": "${{ secrets.GEMINI_API_KEY }}", - "DATABASE_TYPE":"firestore", - "GCP_PROJECT": "${FIRESTORE_PROJECT}", - "FIRESTORE_DATABASE_ID": "(default)", - "GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}" - }, - "enabled": true, - "timeout": 600000 - } - }, - "maxSessionTurns": 25, - "coreTools": [ - "run_shell_command(echo)" - ], - "telemetry": { - "enabled": true, - "target": "gcp" - } - } - prompt: |- - ## Role - - You are a database maintenance assistant for a GitHub issue deduplication system. - - ## Goal - - Your sole responsibility is to refresh the embeddings for all open issues in the repository to ensure the deduplication database is up-to-date. - - ## Steps - - 1. **Extract Repository Information:** The repository is ${{ github.repository }}. - 2. **Refresh Embeddings:** Call the `refresh` tool with the correct `repo`. Do not use the `force` parameter. - 3. **Log Output:** Print the JSON output from the `refresh` tool to the logs. - - ## Guidelines - - - Only use the `refresh` tool. - - Do not attempt to find duplicates or modify any issues. - - Your only task is to call the `refresh` tool and log its output. diff --git a/.github/workflows/gemini-scheduled-pr-triage.yml b/.github/workflows/gemini-scheduled-pr-triage.yml deleted file mode 100644 index 41c2d7cb73..0000000000 --- a/.github/workflows/gemini-scheduled-pr-triage.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: 'Qwen Scheduled PR Triage 🚀' - -on: - schedule: - - cron: '*/15 * * * *' # Runs every 15 minutes - workflow_dispatch: - -jobs: - audit-prs: - timeout-minutes: 15 - if: |- - ${{ github.repository == 'QwenLM/qwen-code' }} - permissions: - contents: 'read' - id-token: 'write' - issues: 'write' - pull-requests: 'write' - runs-on: 'ubuntu-latest' - outputs: - prs_needing_comment: '${{ steps.run_triage.outputs.prs_needing_comment }}' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - - - name: 'Run PR Triage Script' - id: 'run_triage' - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - GITHUB_REPOSITORY: '${{ github.repository }}' - run: './.github/scripts/pr-triage.sh' diff --git a/.github/workflows/gemini-self-assign-issue.yml b/.github/workflows/gemini-self-assign-issue.yml deleted file mode 100644 index 40e6353f8d..0000000000 --- a/.github/workflows/gemini-self-assign-issue.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: 'Assign Issue on Comment' - -on: - issue_comment: - types: - - 'created' - -concurrency: - group: '${{ github.workflow }}-${{ github.event.issue.number }}' - cancel-in-progress: true - -defaults: - run: - shell: 'bash' - -permissions: - contents: 'read' - id-token: 'write' - issues: 'write' - statuses: 'write' - packages: 'read' - -jobs: - self-assign-issue: - if: |- - github.repository == 'google-gemini/gemini-cli' && - github.event_name == 'issue_comment' && - contains(github.event.comment.body, '/assign') - runs-on: 'ubuntu-latest' - steps: - - name: 'Generate GitHub App Token' - id: 'generate_token' - uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b' - with: - app-id: '${{ secrets.APP_ID }}' - private-key: '${{ secrets.PRIVATE_KEY }}' - # Add 'assignments' write permission - permission-issues: 'write' - - - name: 'Assign issue to user' - uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' - with: - github-token: '${{ steps.generate_token.outputs.token }}' - script: | - const issueNumber = context.issue.number; - const commenter = context.actor; - const owner = context.repo.owner; - const repo = context.repo.repo; - const MAX_ISSUES_ASSIGNED = 3; - - // Search for open issues already assigned to the commenter in this repo - const { data: assignedIssues } = await github.rest.search.issuesAndPullRequests({ - q: `is:issue repo:${owner}/${repo} assignee:${commenter} is:open`, - advanced_search: true - }); - - if (assignedIssues.total_count >= MAX_ISSUES_ASSIGNED) { - await github.rest.issues.createComment({ - owner: owner, - repo: repo, - issue_number: issueNumber, - body: `👋 @${commenter}! You currently have ${assignedIssues.total_count} issues assigned to you. We have a ${MAX_ISSUES_ASSIGNED} max issues assigned at once policy. Once you close out an existing issue it will open up space to take another. You can also unassign yourself from an existing issue but please work on a hand-off if someone is expecting work on that issue.` - }); - return; // exit - } - - // Check if the issue is already assigned - const issue = await github.rest.issues.get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - }); - - if (issue.data.assignees.length > 0) { - // Comment that it's already assigned - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - body: `@${commenter} Thanks for taking interest but this issue is already assigned. We'd still love to have you contribute. Check out our [Help Wanted](https://github.com/google-gemini/gemini-cli/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22help%20wanted%22) list for issues where we need some extra attention.` - }); - return; - } - - // If not taken, assign the user who commented - await github.rest.issues.addAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - assignees: [commenter] - }); - - // Post a comment to confirm assignment - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - body: `👋 @${commenter}, you've been assigned to this issue! Thank you for taking the time to contribute. Make sure to check out our [contributing guidelines](https://github.com/google-gemini/gemini-cli/blob/main/CONTRIBUTING.md).` - }); diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml deleted file mode 100644 index abaad9dbbf..0000000000 --- a/.github/workflows/no-response.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: 'No Response' - -# Run as a daily cron at 1:45 AM -on: - schedule: - - cron: '45 1 * * *' - workflow_dispatch: - -jobs: - no-response: - runs-on: 'ubuntu-latest' - if: |- - ${{ github.repository == 'google-gemini/gemini-cli' }} - permissions: - issues: 'write' - pull-requests: 'write' - concurrency: - group: '${{ github.workflow }}-no-response' - cancel-in-progress: true - steps: - - uses: 'actions/stale@5bef64f19d7facfb25b37b414482c7164d639639' # ratchet:actions/stale@v9 - with: - repo-token: '${{ secrets.GITHUB_TOKEN }}' - days-before-stale: -1 - days-before-close: 14 - stale-issue-label: 'status/need-information' - close-issue-message: >- - This issue was marked as needing more information and has not received a response in 14 days. - Closing it for now. If you still face this problem, feel free to reopen with more details. Thank you! - stale-pr-label: 'status/need-information' - close-pr-message: >- - This pull request was marked as needing more information and has had no updates in 14 days. - Closing it for now. You are welcome to reopen with the required info. Thanks for contributing! diff --git a/.github/workflows/qwen-automated-issue-triage.yml b/.github/workflows/qwen-automated-issue-triage.yml deleted file mode 100644 index 6f91efb646..0000000000 --- a/.github/workflows/qwen-automated-issue-triage.yml +++ /dev/null @@ -1,203 +0,0 @@ -name: 'Qwen Automated Issue Triage' - -on: - issues: - types: - - 'opened' - - 'reopened' - issue_comment: - types: - - 'created' - workflow_dispatch: - inputs: - issue_number: - description: 'issue number to triage' - required: true - type: 'number' - -concurrency: - group: '${{ github.workflow }}-${{ github.event.issue.number || github.event.inputs.issue_number }}' - cancel-in-progress: true - -defaults: - run: - shell: 'bash' - -permissions: - contents: 'read' - id-token: 'write' - issues: 'write' - statuses: 'write' - packages: 'read' - actions: 'write' # Required for cancelling a workflow run - -jobs: - triage-issue: - timeout-minutes: 5 - if: |- - ${{ github.repository == 'QwenLM/qwen-code' }} - runs-on: 'ubuntu-latest' - steps: - - name: 'Run Qwen Issue Analysis' - uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2' - id: 'qwen_issue_analysis' - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - ISSUE_TITLE: '${{ github.event.issue.title }}' - ISSUE_BODY: '${{ github.event.issue.body }}' - ISSUE_NUMBER: '${{ github.event.issue.number }}' - REPOSITORY: '${{ github.repository }}' - with: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - settings_json: |- - { - "maxSessionTurns": 25, - "coreTools": [ - "run_shell_command" - ], - "sandbox": false - } - prompt: |- - ## Role - - You are an issue triage assistant. Analyze the current GitHub issue - and identify the most appropriate existing labels by only using the provided data. Use the available - tools to gather information; do not ask for information to be - provided. Do not remove the following labels titled maintainer, help wanted or good first issue. - - ## Steps - - 1. Run: `gh label list --repo ${{ github.repository }} --limit 100` to get all available labels. - 2. Use shell command `echo` to check the issue title and body provided in the environment variables: "${ISSUE_TITLE}" and "${ISSUE_BODY}". - 3. Ignore any existing priorities or tags on the issue. Just report your findings. - 4. Select the most relevant labels from the existing labels, focusing on type/*, category/*, scope/*, status/* and priority/*. For category/* and type/* limit yourself to only the single most applicable label in each case. - 6. Apply the selected labels to this issue using: `gh issue edit ${{ github.event.issue.number }} --repo ${{ github.repository }} --add-label "label1,label2"`. - 7. For each issue please check if CLI version is present, this is usually in the output of the /about command and will look like 0.1.5 for anything more than 6 versions older than the most recent should add the status/need-retesting label. - 8. If you see that the issue doesn't look like it has sufficient information recommend the status/need-information label. - 9. Use Category and Scope definitions mentioned below to help you narrow down issues. - - ## Guidelines - - - Only use labels that already exist in the repository - - Do not add comments or modify the issue content - - Triage only the current issue - - Identify only one category/ label - - Identify only one type/ label - - Identify all applicable scope/*, status/* and priority/* labels based on the issue content. It's ok to have multiple of these - - Once you categorize the issue if it needs information bump down the priority by 1 eg.. a p0 would become a p1 a p1 would become a p2. P2 and P3 can stay as is in this scenario - - Reference all shell variables as "${VAR}" (with quotes and braces) - - Output only valid JSON format - - Do not include any explanation or additional text, just the JSON - - Categorization Guidelines: - P0: Critical / Blocker - - A P0 bug is a catastrophic failure that demands immediate attention. - - To be a P0 it means almost all users are running into this issue and it is blocking users from being able to use the product. - - You would see this in the form of many comments from different developers on the bug. - - It represents a complete showstopper for a significant portion of users or for the development process itself. - Impact: - - Blocks development or testing for the entire team. - - Major security vulnerability that could compromise user data or system integrity. - - Causes data loss or corruption with no workaround. - - Crashes the application or makes a core feature completely unusable for all or most users in a production environment. Will it cause severe quality degration? Is it preventing contributors from contributing to the repository or is it a release blocker? - Qualifier: Is the main function of the software broken? - Example: The qwen auth login command fails with an unrecoverable error, preventing any user from authenticating and using the rest of the CLI. - P1: High - - A P1 bug is a serious issue that significantly degrades the user experience or impacts a core feature. - - While not a complete blocker, it's a major problem that needs a fast resolution. Feature requests are almost never P1. - - Once again this would be affecting many users. - - You would see this in the form of comments from different developers on the bug. - Impact: - - A core feature is broken or behaving incorrectly for a large number of users or large number of use cases. - - Review the bug details and comments to try figure out if this issue affects a large set of use cases or if it's a narrow set of use cases. - - Severe performance degradation making the application frustratingly slow. - - No straightforward workaround exists, or the workaround is difficult and non-obvious. - Qualifier: Is a key feature unusable or giving very wrong results? - Example: Qwen Code enters a loop when making read-many-files tool call. I am unable to break out of the loop and qwen doesn't follow instructions subsequently. - P2: Medium - - A P2 bug is a moderately impactful issue. It's a noticeable problem but doesn't prevent the use of the software's main functionality. - Impact: - - Affects a non-critical feature or a smaller, specific subset of users. - - An inconvenient but functional workaround is available and easy to execute. - - Noticeable UI/UX problems that don't break functionality but look unprofessional (e.g., elements are misaligned or overlapping). - Qualifier: Is it an annoying but non-blocking problem? - Example: An error message is unclear or contains a typo, causing user confusion but not halting their workflow. - P3: Low - - A P3 bug is a minor, low-impact issue that is trivial or cosmetic. It has little to no effect on the overall functionality of the application. - Impact: - - Minor cosmetic issues like color inconsistencies, typos in documentation, or slight alignment problems on a non-critical page. - - An edge-case bug that is very difficult to reproduce and affects a tiny fraction of users. - Qualifier: Is it a "nice-to-fix" issue? - Example: Spelling mistakes etc. - Things you should know: - - If users are talking about issues where the model gets downgraded from pro to flash then i want you to categorize that as a performance issue - - This product is designed to use different models eg.. using pro, downgrading to flash etc. when users report that they dont expect the model to change those would be categorized as feature requests. - Definition of Categories and Scopes - - category/cli: Command line interface and interaction - - Issues with interactive CLI features, command parsing, keyboard shortcuts - - Related scopes: scope/commands, scope/interactive, scope/non-interactive, scope/keybindings - - category/core: Core engine and logic - - Issues with fundamental components, content generation, session management - - Related scopes: scope/content-generation, scope/token-management, scope/session-management, scope/model-switching - - category/ui: User interface and display - - Issues with themes, UI components, rendering, markdown display - - Related scopes: scope/themes, scope/components, scope/rendering, scope/markdown - - category/authentication: Authentication and authorization - - Issues with login flows, API keys, OAuth, credential storage - - Related scopes: scope/oauth, scope/api-keys, scope/token-storage - - category/tools: Tool integration and execution - - Issues with MCP, shell execution, file operations, web search, memory, git integration - - Related scopes: scope/mcp, scope/shell, scope/file-operations, scope/web-search, scope/memory, scope/git - - category/configuration: Configuration management - - Issues with settings, extensions, trusted folders, sandbox configuration - - Related scopes: scope/settings, scope/extensions, scope/trusted-folders, scope/sandbox - - category/integration: External integrations - - Issues with IDE integration, VSCode extension, Zed integration, GitHub Actions - - Related scopes: scope/ide, scope/vscode, scope/zed, scope/github-actions - - category/platform: Platform compatibility - - Issues with installation, OS compatibility, packaging - - Related scopes: scope/installation, scope/macos, scope/windows, scope/linux, scope/packaging - - category/performance: Performance and optimization - - Issues with latency, memory usage, model performance, caching - - Related scopes: scope/latency, scope/memory-usage, scope/model-performance, scope/caching - - category/security: Security and privacy - - Issues with data privacy, credential security, vulnerabilities - - Related scopes: scope/data-privacy, scope/credential-security, scope/vulnerability - - category/telemetry: Telemetry and analytics - - Issues with metrics collection, logging, analytics - - Related scopes: scope/metrics, scope/logging, scope/analytics - - category/development: Development experience - - Issues with build system, testing, CI/CD, documentation - - Related scopes: scope/build-system, scope/testing, scope/ci-cd, scope/documentation - - - name: 'Post Issue Analysis Failure Comment' - if: |- - ${{ failure() && steps.qwen_issue_analysis.outcome == 'failure' }} - uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' # ratchet:actions/github-script@v7 - env: - ISSUE_NUMBER: '${{ github.event.issue.number }}' - REPOSITORY: '${{ github.repository }}' - RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' - script: |- - github.rest.issues.createComment({ - owner: process.env.REPOSITORY.split('/')[0], - repo: process.env.REPOSITORY.split('/')[1], - issue_number: parseInt(process.env.ISSUE_NUMBER), - body: 'There is a problem with the Qwen Code issue analysis. Please check the [action logs](${process.env.RUN_URL}) for details.' - }) diff --git a/.github/workflows/qwen-code-pr-review.yml b/.github/workflows/qwen-code-pr-review.yml deleted file mode 100644 index 6d7f0934fc..0000000000 --- a/.github/workflows/qwen-code-pr-review.yml +++ /dev/null @@ -1,190 +0,0 @@ -name: '🧐 Qwen Pull Request Review' - -on: - pull_request_target: - types: ['opened'] - pull_request_review_comment: - types: ['created'] - pull_request_review: - types: ['submitted'] - workflow_dispatch: - inputs: - pr_number: - description: 'PR number to review' - required: true - type: 'number' - -jobs: - review-pr: - if: |- - github.event_name == 'workflow_dispatch' || - (github.event_name == 'pull_request_target' && - github.event.action == 'opened' && - (github.event.pull_request.author_association == 'OWNER' || - github.event.pull_request.author_association == 'MEMBER' || - github.event.pull_request.author_association == 'COLLABORATOR')) || - (github.event_name == 'issue_comment' && - github.event.issue.pull_request && - contains(github.event.comment.body, '@qwen /review') && - (github.event.comment.author_association == 'OWNER' || - github.event.comment.author_association == 'MEMBER' || - github.event.comment.author_association == 'COLLABORATOR')) || - (github.event_name == 'pull_request_review_comment' && - contains(github.event.comment.body, '@qwen /review') && - (github.event.comment.author_association == 'OWNER' || - github.event.comment.author_association == 'MEMBER' || - github.event.comment.author_association == 'COLLABORATOR')) || - (github.event_name == 'pull_request_review' && - contains(github.event.review.body, '@qwen /review') && - (github.event.review.author_association == 'OWNER' || - github.event.review.author_association == 'MEMBER' || - github.event.review.author_association == 'COLLABORATOR')) - timeout-minutes: 15 - runs-on: 'ubuntu-latest' - permissions: - contents: 'read' - id-token: 'write' - pull-requests: 'write' - issues: 'write' - steps: - - name: 'Checkout PR code' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - with: - token: '${{ secrets.GITHUB_TOKEN }}' - fetch-depth: 0 - - - name: 'Get PR details (pull_request_target & workflow_dispatch)' - id: 'get_pr' - if: |- - ${{ github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch' }} - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - run: |- - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - PR_NUMBER=${{ github.event.inputs.pr_number }} - else - PR_NUMBER=${{ github.event.pull_request.number }} - fi - echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT" - # Get PR details - PR_DATA=$(gh pr view $PR_NUMBER --json title,body,additions,deletions,changedFiles,baseRefName,headRefName) - echo "pr_data=$PR_DATA" >> "$GITHUB_OUTPUT" - # Get file changes - CHANGED_FILES=$(gh pr diff $PR_NUMBER --name-only) - echo "changed_files<> "$GITHUB_OUTPUT" - echo "$CHANGED_FILES" >> "$GITHUB_OUTPUT" - echo "EOF" >> "$GITHUB_OUTPUT" - - - name: 'Get PR details (issue_comment)' - id: 'get_pr_comment' - if: |- - ${{ github.event_name == 'issue_comment' }} - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - COMMENT_BODY: '${{ github.event.comment.body }}' - run: |- - PR_NUMBER=${{ github.event.issue.number }} - echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT" - # Extract additional instructions from comment - ADDITIONAL_INSTRUCTIONS=$(echo "$COMMENT_BODY" | sed 's/.*@qwen \/review//' | xargs) - echo "additional_instructions=$ADDITIONAL_INSTRUCTIONS" >> "$GITHUB_OUTPUT" - # Get PR details - PR_DATA=$(gh pr view $PR_NUMBER --json title,body,additions,deletions,changedFiles,baseRefName,headRefName) - echo "pr_data=$PR_DATA" >> "$GITHUB_OUTPUT" - # Get file changes - CHANGED_FILES=$(gh pr diff $PR_NUMBER --name-only) - echo "changed_files<> "$GITHUB_OUTPUT" - echo "$CHANGED_FILES" >> "$GITHUB_OUTPUT" - echo "EOF" >> "$GITHUB_OUTPUT" - - - name: 'Run Qwen PR Review' - uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2' - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - PR_NUMBER: '${{ steps.get_pr.outputs.pr_number || steps.get_pr_comment.outputs.pr_number }}' - PR_DATA: '${{ steps.get_pr.outputs.pr_data || steps.get_pr_comment.outputs.pr_data }}' - CHANGED_FILES: '${{ steps.get_pr.outputs.changed_files || steps.get_pr_comment.outputs.changed_files }}' - ADDITIONAL_INSTRUCTIONS: '${{ steps.get_pr.outputs.additional_instructions || steps.get_pr_comment.outputs.additional_instructions }}' - REPOSITORY: '${{ github.repository }}' - with: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - settings_json: |- - { - "coreTools": [ - "run_shell_command", - "write_file" - ], - "sandbox": false - } - prompt: |- - You are an expert code reviewer. You have access to shell commands to gather PR information and perform the review. - - IMPORTANT: Use the available shell commands to gather information. Do not ask for information to be provided. - - Start by running these commands to gather the required data: - 1. Run: echo "$PR_DATA" to get PR details (JSON format) - 2. Run: echo "$CHANGED_FILES" to get the list of changed files - 3. Run: echo "$PR_NUMBER" to get the PR number - 4. Run: echo "$ADDITIONAL_INSTRUCTIONS" to see any specific review instructions from the user - 5. Run: gh pr diff $PR_NUMBER to see the full diff - 6. For any specific files, use: cat filename, head -50 filename, or tail -50 filename - - Additional Review Instructions: - If ADDITIONAL_INSTRUCTIONS contains text, prioritize those specific areas or focus points in your review. - Common instruction examples: "focus on security", "check performance", "review error handling", "check for breaking changes" - - Once you have the information, provide a comprehensive code review by: - 1. Writing your review to a file: write_file("review.md", "") - 2. Posting the review: gh pr comment $PR_NUMBER --body-file review.md --repo $REPOSITORY - - Review Areas: - - **Security**: Authentication, authorization, input validation, data sanitization - - **Performance**: Algorithms, database queries, caching, resource usage - - **Reliability**: Error handling, logging, testing coverage, edge cases - - **Maintainability**: Code structure, documentation, naming conventions - - **Functionality**: Logic correctness, requirements fulfillment - - Output Format: - Structure your review using this exact format with markdown: - - ## 📋 Review Summary - Provide a brief 2-3 sentence overview of the PR and overall assessment. - - ## 🔍 General Feedback - - List general observations about code quality - - Mention overall patterns or architectural decisions - - Highlight positive aspects of the implementation - - Note any recurring themes across files - - ## 🎯 Specific Feedback - Only include sections below that have actual issues. If there are no issues in a priority category, omit that entire section. - - ### 🔴 Critical - (Only include this section if there are critical issues) - Issues that must be addressed before merging (security vulnerabilities, breaking changes, major bugs): - - **File: `filename:line`** - Description of critical issue with specific recommendation - - ### 🟡 High - (Only include this section if there are high priority issues) - Important issues that should be addressed (performance problems, design flaws, significant bugs): - - **File: `filename:line`** - Description of high priority issue with suggested fix - - ### 🟢 Medium - (Only include this section if there are medium priority issues) - Improvements that would enhance code quality (style issues, minor optimizations, better practices): - - **File: `filename:line`** - Description of medium priority improvement - - ### 🔵 Low - (Only include this section if there are suggestions) - Nice-to-have improvements and suggestions (documentation, naming, minor refactoring): - - **File: `filename:line`** - Description of suggestion or enhancement - - **Note**: If no specific issues are found in any category, simply state "No specific issues identified in this review." - - ## ✅ Highlights - (Only include this section if there are positive aspects to highlight) - - Mention specific good practices or implementations - - Acknowledge well-written code sections - - Note improvements from previous versions diff --git a/.github/workflows/qwen-scheduled-issue-triage.yml b/.github/workflows/qwen-scheduled-issue-triage.yml deleted file mode 100644 index 4281211833..0000000000 --- a/.github/workflows/qwen-scheduled-issue-triage.yml +++ /dev/null @@ -1,213 +0,0 @@ -name: 'Qwen Scheduled Issue Triage' - -on: - schedule: - - cron: '0 * * * *' # Runs every hour - workflow_dispatch: - -concurrency: - group: '${{ github.workflow }}' - cancel-in-progress: true - -defaults: - run: - shell: 'bash' - -permissions: - id-token: 'write' - issues: 'write' - -jobs: - triage-issues: - timeout-minutes: 10 - if: |- - ${{ github.repository == 'QwenLM/qwen-code' }} - runs-on: 'ubuntu-latest' - permissions: - contents: 'read' - id-token: 'write' - issues: 'write' - steps: - - name: 'Find untriaged issues' - id: 'find_issues' - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - GITHUB_REPOSITORY: '${{ github.repository }}' - run: |- - echo "🔍 Finding issues without labels..." - NO_LABEL_ISSUES=$(gh issue list --repo ${{ github.repository }} --search "is:open is:issue no:label" --json number,title,body) - - echo '🔍 Finding issues without labels...' - NO_LABEL_ISSUES="$(gh issue list --repo "${GITHUB_REPOSITORY}" \ - --search 'is:open is:issue no:label' --json number,title,body)" - - echo '🏷️ Finding issues that need triage...' - NEED_TRIAGE_ISSUES="$(gh issue list --repo "${GITHUB_REPOSITORY}" \ - --search "is:open is:issue label:\"status/need-triage\"" --limit 1000 --json number,title,body)" - - echo '🔄 Merging and deduplicating issues...' - ISSUES="$(echo "${NO_LABEL_ISSUES}" "${NEED_TRIAGE_ISSUES}" | jq -c -s 'add | unique_by(.number)')" - - echo '📝 Setting output for GitHub Actions...' - echo "issues_to_triage=${ISSUES}" >> "${GITHUB_OUTPUT}" - - - name: 'Run Qwen Issue Triage' - if: |- - ${{ steps.find_issues.outputs.issues_to_triage != '[]' }} - uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2' - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - ISSUES_TO_TRIAGE: '${{ steps.find_issues.outputs.issues_to_triage }}' - REPOSITORY: '${{ github.repository }}' - with: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - settings_json: |- - { - "maxSessionTurns": 25, - "coreTools": [ - "run_shell_command(echo)" - ], - "sandbox": false - } - prompt: |- - ## Role - - You are an issue triage assistant. Analyze issues and identify - appropriate labels. Use the available tools to gather information; - do not ask for information to be provided. - - ## Steps - - 1. Run: `gh label list --repo ${{ github.repository }} --limit 100` to get all available labels. - 2. Use shell command `echo` to check environment variable for issues to triage: $ISSUES_TO_TRIAGE (JSON array of issues) - 3. Review the issue title, body and any comments provided in the environment variables. - 4. Ignore any existing priorities or tags on the issue. - 5. Select the most relevant labels from the existing labels, focusing on type/*, category/*, scope/*, status/* and priority/*. - 6. Get the list of labels already on the issue using `gh issue view ISSUE_NUMBER --repo ${{ github.repository }} --json labels -t '{{range .labels}}{{.name}}{{"\n"}}{{end}}' - 7. For category/* and type/* limit yourself to only the single most applicable label in each case. - 8. Give me a single short paragraph about why you are selecting each label in the process. use the format Issue ID: , Title, Label applied:, Label removed, ovearll explanation - 9. Parse the JSON array from step 2 and for EACH INDIVIDUAL issue, apply appropriate labels using separate commands: - - `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --add-label "label1"` - - `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --add-label "label2"` - - Continue for each label separately - - IMPORTANT: Label each issue individually, one command per issue, one label at a time if needed. - - Make sure after you apply labels there is only one category/* and one type/* label per issue. - - To do this look for labels found in step 6 that no longer apply remove them one at a time using - - `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --remove-label "label-name1"` - - `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --remove-label "label-name2"` - - IMPORTANT: Remove each label one at a time, one command per issue if needed. - 10. For each issue please check if CLI version is present, this is usually in the output of the /about command and will look like 0.1.5 - - Anything more than 6 versions older than the most recent should add the status/need-retesting label - 11. If you see that the issue doesn't look like it has sufficient information recommend the status/need-information label - - After applying appropriate labels to an issue, remove the "status/need-triage" label if present: `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --remove-label "status/need-triage"` - - Execute one `gh issue edit` command per issue, wait for success before proceeding to the next - Process each issue sequentially and confirm each labeling operation before moving to the next issue. - - ## Guidelines - - - Output only valid JSON format - - Do not include any explanation or additional text, just the JSON - - Only use labels that already exist in the repository. - - Do not add comments or modify the issue content. - - Do not remove the following labels maintainer, help wanted or good first issue. - - Triage only the current issue. - - Identify only one category/ label - - Identify only one type/ label (Do not apply type/duplicate or type/parent-issue) - - Identify all applicable scope/*, status/* and priority/* labels based on the issue content. It's ok to have multiple of these. - - Once you categorize the issue if it needs information bump down the priority by 1 eg.. a p0 would become a p1 a p1 would become a p2. P2 and P3 can stay as is in this scenario. - Categorization Guidelines: - P0: Critical / Blocker - - A P0 bug is a catastrophic failure that demands immediate attention. - - To be a P0 it means almost all users are running into this issue and it is blocking users from being able to use the product. - - You would see this in the form of many comments from different developers on the bug. - - It represents a complete showstopper for a significant portion of users or for the development process itself. - Impact: - - Blocks development or testing for the entire team. - - Major security vulnerability that could compromise user data or system integrity. - - Causes data loss or corruption with no workaround. - - Crashes the application or makes a core feature completely unusable for all or most users in a production environment. Will it cause severe quality degration? - - Is it preventing contributors from contributing to the repository or is it a release blocker? - Qualifier: Is the main function of the software broken? - Example: The gemini auth login command fails with an unrecoverable error, preventing any user from authenticating and using the rest of the CLI. - P1: High - - A P1 bug is a serious issue that significantly degrades the user experience or impacts a core feature. - - While not a complete blocker, it's a major problem that needs a fast resolution. Feature requests are almost never P1. - - Once again this would be affecting many users. - - You would see this in the form of comments from different developers on the bug. - Impact: - - A core feature is broken or behaving incorrectly for a large number of users or large number of use cases. - - Review the bug details and comments to try figure out if this issue affects a large set of use cases or if it's a narrow set of use cases. - - Severe performance degradation making the application frustratingly slow. - - No straightforward workaround exists, or the workaround is difficult and non-obvious. - Qualifier: Is a key feature unusable or giving very wrong results? - Example: Gemini CLI enters a loop when making read-many-files tool call. I am unable to break out of the loop and gemini doesn't follow instructions subsequently. - P2: Medium - - A P2 bug is a moderately impactful issue. It's a noticeable problem but doesn't prevent the use of the software's main functionality. - Impact: - - Affects a non-critical feature or a smaller, specific subset of users. - - An inconvenient but functional workaround is available and easy to execute. - - Noticeable UI/UX problems that don't break functionality but look unprofessional (e.g., elements are misaligned or overlapping). - Qualifier: Is it an annoying but non-blocking problem? - Example: An error message is unclear or contains a typo, causing user confusion but not halting their workflow. - P3: Low - - A P3 bug is a minor, low-impact issue that is trivial or cosmetic. It has little to no effect on the overall functionality of the application. - Impact: - - Minor cosmetic issues like color inconsistencies, typos in documentation, or slight alignment problems on a non-critical page. - - An edge-case bug that is very difficult to reproduce and affects a tiny fraction of users. - Qualifier: Is it a "nice-to-fix" issue? - Example: Spelling mistakes etc. - Additional Context: - - If users are talking about issues where the model gets downgraded from pro to flash then i want you to categorize that as a performance issue - - This product is designed to use different models eg.. using pro, downgrading to flash etc. - - When users report that they dont expect the model to change those would be categorized as feature requests. - Definition of Categories and Scopes - - category/cli: Command line interface and interaction - - Issues with interactive CLI features, command parsing, keyboard shortcuts - - Related scopes: scope/commands, scope/interactive, scope/non-interactive, scope/keybindings - - category/core: Core engine and logic - - Issues with fundamental components, content generation, session management - - Related scopes: scope/content-generation, scope/token-management, scope/session-management, scope/model-switching - - category/ui: User interface and display - - Issues with themes, UI components, rendering, markdown display - - Related scopes: scope/themes, scope/components, scope/rendering, scope/markdown - - category/authentication: Authentication and authorization - - Issues with login flows, API keys, OAuth, credential storage - - Related scopes: scope/oauth, scope/api-keys, scope/token-storage - - category/tools: Tool integration and execution - - Issues with MCP, shell execution, file operations, web search, memory, git integration - - Related scopes: scope/mcp, scope/shell, scope/file-operations, scope/web-search, scope/memory, scope/git - - category/configuration: Configuration management - - Issues with settings, extensions, trusted folders, sandbox configuration - - Related scopes: scope/settings, scope/extensions, scope/trusted-folders, scope/sandbox - - category/integration: External integrations - - Issues with IDE integration, VSCode extension, Zed integration, GitHub Actions - - Related scopes: scope/ide, scope/vscode, scope/zed, scope/github-actions - - category/platform: Platform compatibility - - Issues with installation, OS compatibility, packaging - - Related scopes: scope/installation, scope/macos, scope/windows, scope/linux, scope/packaging - - category/performance: Performance and optimization - - Issues with latency, memory usage, model performance, caching - - Related scopes: scope/latency, scope/memory-usage, scope/model-performance, scope/caching - - category/security: Security and privacy - - Issues with data privacy, credential security, vulnerabilities - - Related scopes: scope/data-privacy, scope/credential-security, scope/vulnerability - - category/telemetry: Telemetry and analytics - - Issues with metrics collection, logging, analytics - - Related scopes: scope/metrics, scope/logging, scope/analytics - - category/development: Development experience - - Issues with build system, testing, CI/CD, documentation - - Related scopes: scope/build-system, scope/testing, scope/ci-cd, scope/documentation diff --git a/.github/workflows/release-sdk.yml b/.github/workflows/release-sdk.yml deleted file mode 100644 index c7e2e3619f..0000000000 --- a/.github/workflows/release-sdk.yml +++ /dev/null @@ -1,420 +0,0 @@ -name: 'Release SDK' - -on: - workflow_dispatch: - inputs: - version: - description: 'The version to release (e.g., v0.1.11). Required for manual patch releases.' - required: false - type: 'string' - ref: - description: 'The branch or ref (full git sha) to release SDK from.' - required: true - type: 'string' - default: 'main' - cli_source: - description: 'CLI source to bundle. "build_from_source" builds CLI from the current branch/ref (recommended when releasing CLI and SDK together). "npm_latest" uses the latest stable CLI from npm (recommended for standalone SDK releases).' - required: true - type: 'choice' - options: - - 'build_from_source' - - 'npm_latest' - default: 'npm_latest' - dry_run: - description: 'Run a dry-run of the release process; no branches, npm packages or GitHub releases will be created.' - required: true - type: 'boolean' - default: true - create_nightly_release: - description: 'Auto apply the nightly release tag, input version is ignored.' - required: false - type: 'boolean' - default: false - create_preview_release: - description: 'Auto apply the preview release tag, input version is ignored.' - required: false - type: 'boolean' - default: false - force_skip_tests: - description: 'Select to skip the "Run Tests" step in testing. Prod releases should run tests' - required: false - type: 'boolean' - default: false - -concurrency: - group: '${{ github.workflow }}' - cancel-in-progress: false - -jobs: - release-sdk: - runs-on: 'ubuntu-latest' - environment: - name: 'production-release' - url: '${{ github.server_url }}/${{ github.repository }}/releases/tag/sdk-typescript-${{ steps.version.outputs.RELEASE_TAG }}' - if: |- - ${{ github.repository == 'QwenLM/qwen-code' }} - permissions: - contents: 'write' - packages: 'write' - id-token: 'write' - issues: 'write' - pull-requests: 'write' - outputs: - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }}' - - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - with: - ref: '${{ github.event.inputs.ref || github.sha }}' - fetch-depth: 0 - - - name: 'Set booleans for simplified logic' - env: - CREATE_NIGHTLY_RELEASE: '${{ github.event.inputs.create_nightly_release }}' - CREATE_PREVIEW_RELEASE: '${{ github.event.inputs.create_preview_release }}' - DRY_RUN_INPUT: '${{ github.event.inputs.dry_run }}' - id: 'vars' - run: |- - is_nightly="false" - if [[ "${CREATE_NIGHTLY_RELEASE}" == "true" ]]; then - is_nightly="true" - fi - echo "is_nightly=${is_nightly}" >> "${GITHUB_OUTPUT}" - - is_preview="false" - if [[ "${CREATE_PREVIEW_RELEASE}" == "true" ]]; then - is_preview="true" - fi - echo "is_preview=${is_preview}" >> "${GITHUB_OUTPUT}" - - is_dry_run="false" - if [[ "${DRY_RUN_INPUT}" == "true" ]]; then - is_dry_run="true" - fi - echo "is_dry_run=${is_dry_run}" >> "${GITHUB_OUTPUT}" - - - name: 'Setup Node.js' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - registry-url: 'https://registry.npmjs.org' - scope: '@qwen-code' - - - name: 'Install Dependencies' - run: |- - npm ci - - - name: 'Get the version' - id: 'version' - run: | - VERSION_ARGS=() - if [[ "${IS_NIGHTLY}" == "true" ]]; then - VERSION_ARGS+=(--type=nightly) - elif [[ "${IS_PREVIEW}" == "true" ]]; then - VERSION_ARGS+=(--type=preview) - if [[ -n "${MANUAL_VERSION}" ]]; then - VERSION_ARGS+=("--preview_version_override=${MANUAL_VERSION}") - fi - else - VERSION_ARGS+=(--type=stable) - if [[ -n "${MANUAL_VERSION}" ]]; then - VERSION_ARGS+=("--stable_version_override=${MANUAL_VERSION}") - fi - fi - - VERSION_JSON=$(node packages/sdk-typescript/scripts/get-release-version.js "${VERSION_ARGS[@]}") - RELEASE_TAG=$(echo "$VERSION_JSON" | jq -r .releaseTag) - RELEASE_VERSION=$(echo "$VERSION_JSON" | jq -r .releaseVersion) - NPM_TAG=$(echo "$VERSION_JSON" | jq -r .npmTag) - PREVIOUS_RELEASE_TAG=$(echo "$VERSION_JSON" | jq -r .previousReleaseTag) - - # 输出到 GITHUB_OUTPUT - echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_OUTPUT" - echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "$GITHUB_OUTPUT" - echo "NPM_TAG=${NPM_TAG}" >> "$GITHUB_OUTPUT" - echo "PREVIOUS_RELEASE_TAG=${PREVIOUS_RELEASE_TAG}" >> "$GITHUB_OUTPUT" - - # 打印版本信息到日志 - echo "========================================" - echo "SDK Release Version Info" - echo "========================================" - echo "Release Tag: ${RELEASE_TAG}" - echo "Release Version: ${RELEASE_VERSION}" - echo "NPM Tag: ${NPM_TAG}" - echo "Previous Release: ${PREVIOUS_RELEASE_TAG}" - echo "========================================" - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - IS_NIGHTLY: '${{ steps.vars.outputs.is_nightly }}' - IS_PREVIEW: '${{ steps.vars.outputs.is_preview }}' - MANUAL_VERSION: '${{ inputs.version }}' - - - name: 'Set SDK package version (local only)' - env: - RELEASE_VERSION: '${{ steps.version.outputs.RELEASE_VERSION }}' - run: |- - # Ensure the package version matches the computed release version. - # This is required for nightly/preview because npm does not allow re-publishing the same version. - npm version -w @qwen-code/sdk "${RELEASE_VERSION}" --no-git-tag-version --allow-same-version - - - name: 'Determine CLI source and version' - id: 'cli_source' - env: - CLI_SOURCE_INPUT: '${{ github.event.inputs.cli_source }}' - run: | - # Determine CLI source mode - if [[ "${CLI_SOURCE_INPUT}" == "npm_latest" ]]; then - echo "mode=npm_latest" >> "$GITHUB_OUTPUT" - echo "Building SDK with latest stable CLI from npm" - else - echo "mode=build_from_source" >> "$GITHUB_OUTPUT" - echo "Building SDK with CLI built from current branch/ref" - fi - - - name: 'Get CLI version from npm (for npm_latest mode)' - id: 'cli_version_npm' - if: "steps.cli_source.outputs.mode == 'npm_latest'" - run: | - CLI_VERSION=$(npm view @qwen-code/qwen-code version --tag=latest) - if [[ -z "${CLI_VERSION}" ]]; then - echo '::error::Could not get latest stable CLI version from npm' - exit 1 - fi - echo "CLI_VERSION=${CLI_VERSION}" >> "$GITHUB_OUTPUT" - echo "Using latest stable CLI version from npm: ${CLI_VERSION}" - - - name: 'Download CLI package from npm' - id: 'cli_download' - if: "steps.cli_source.outputs.mode == 'npm_latest'" - env: - CLI_VERSION: '${{ steps.cli_version_npm.outputs.CLI_VERSION }}' - run: | - # Create temp directory for CLI package - CLI_TMP_DIR=$(mktemp -d) - echo "CLI_TMP_DIR=${CLI_TMP_DIR}" >> "$GITHUB_OUTPUT" - - # Download CLI package - echo "Downloading @qwen-code/qwen-code@${CLI_VERSION}..." - npm pack "@qwen-code/qwen-code@${CLI_VERSION}" --pack-destination "${CLI_TMP_DIR}" - - # Extract package - cd "${CLI_TMP_DIR}" - tar -xzf qwen-code-qwen-code-*.tgz - - echo "CLI package extracted to: ${CLI_TMP_DIR}/package" - echo "CLI package contents:" - ls -la "${CLI_TMP_DIR}/package/" - - - name: 'Build CLI from source' - id: 'cli_build' - if: "steps.cli_source.outputs.mode == 'build_from_source'" - run: | - # Build the CLI bundle from source - echo "Building CLI from source..." - npm run bundle - - # Get the CLI version from the built package - CLI_VERSION=$(node -p "require('./packages/cli/package.json').version") - echo "CLI_VERSION=${CLI_VERSION}" >> "$GITHUB_OUTPUT" - echo "Built CLI version: ${CLI_VERSION}" - - # Verify dist exists - if [[ ! -f "./dist/cli.js" ]]; then - echo "::error::CLI bundle not found at ./dist/cli.js" - exit 1 - fi - - echo "CLI bundle built successfully at ./dist/" - ls -la ./dist/ - - - name: 'Configure Git User' - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - - name: 'Build SDK' - working-directory: 'packages/sdk-typescript' - run: |- - npm run build - - - name: 'Bundle CLI into SDK (from npm)' - if: "steps.cli_source.outputs.mode == 'npm_latest'" - working-directory: 'packages/sdk-typescript' - env: - CLI_PACKAGE_PATH: '${{ steps.cli_download.outputs.CLI_TMP_DIR }}/package' - run: | - node scripts/bundle-cli-from-npm.js - - - name: 'Bundle CLI into SDK (from source)' - if: "steps.cli_source.outputs.mode == 'build_from_source'" - working-directory: 'packages/sdk-typescript' - run: | - node scripts/bundle-cli.js - - - name: 'Run Tests' - if: |- - ${{ github.event.inputs.force_skip_tests != 'true' }} - working-directory: 'packages/sdk-typescript' - run: | - npm run test:ci - env: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - - - name: 'Run SDK Integration Tests' - if: |- - ${{ github.event.inputs.force_skip_tests != 'true' }} - run: | - npm run test:integration:sdk:sandbox:none - npm run test:integration:sdk:sandbox:docker - env: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - - - name: 'Record bundled CLI version' - env: - CLI_VERSION: "${{ steps.cli_source.outputs.mode == 'npm_latest' && steps.cli_version_npm.outputs.CLI_VERSION || steps.cli_build.outputs.CLI_VERSION }}" - run: | - # Create a metadata file to record which CLI version was bundled - echo "${CLI_VERSION}" > packages/sdk-typescript/dist/BUNDLED_CLI_VERSION - echo "Bundled CLI version: ${CLI_VERSION}" - - - name: 'Publish @qwen-code/sdk' - working-directory: 'packages/sdk-typescript' - run: |- - npm publish --access public --tag=${{ steps.version.outputs.NPM_TAG }} ${{ steps.vars.outputs.is_dry_run == 'true' && '--dry-run' || '' }} - env: - NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}' - - - name: 'Create and switch to a release branch' - if: |- - ${{ steps.vars.outputs.is_dry_run == 'false' && steps.vars.outputs.is_nightly == 'false' && steps.vars.outputs.is_preview == 'false' }} - id: 'release_branch' - env: - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }}' - run: |- - BRANCH_NAME="release/sdk-typescript/${RELEASE_TAG}" - git switch -c "${BRANCH_NAME}" - echo "BRANCH_NAME=${BRANCH_NAME}" >> "${GITHUB_OUTPUT}" - - - name: 'Commit and Push package version (stable only)' - if: |- - ${{ steps.vars.outputs.is_dry_run == 'false' && steps.vars.outputs.is_nightly == 'false' && steps.vars.outputs.is_preview == 'false' }} - env: - BRANCH_NAME: '${{ steps.release_branch.outputs.BRANCH_NAME }}' - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }}' - run: |- - # Only persist version bumps after a successful publish. - git add packages/sdk-typescript/package.json package-lock.json - if git diff --staged --quiet; then - echo "No version changes to commit" - else - git commit -m "chore(release): sdk-typescript ${RELEASE_TAG}" - fi - echo "Pushing release branch to remote..." - git push --set-upstream origin "${BRANCH_NAME}" --follow-tags - - - name: 'Create GitHub Release and Tag' - if: |- - ${{ steps.vars.outputs.is_dry_run == 'false' }} - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - RELEASE_BRANCH: '${{ steps.release_branch.outputs.BRANCH_NAME }}' - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }}' - PREVIOUS_RELEASE_TAG: '${{ steps.version.outputs.PREVIOUS_RELEASE_TAG }}' - IS_NIGHTLY: '${{ steps.vars.outputs.is_nightly }}' - IS_PREVIEW: '${{ steps.vars.outputs.is_preview }}' - REF: '${{ github.event.inputs.ref || github.sha }}' - CLI_VERSION: "${{ steps.cli_source.outputs.mode == 'npm_latest' && steps.cli_version_npm.outputs.CLI_VERSION || steps.cli_build.outputs.CLI_VERSION }}" - CLI_SOURCE_MODE: '${{ steps.cli_source.outputs.mode }}' - run: |- - # For stable releases, use the release branch; for nightly/preview, use the current ref - if [[ "${IS_NIGHTLY}" == "true" || "${IS_PREVIEW}" == "true" ]]; then - TARGET="${REF}" - PRERELEASE_FLAG="--prerelease" - else - TARGET="${RELEASE_BRANCH}" - PRERELEASE_FLAG="" - fi - - # Determine CLI source description - if [[ "${CLI_SOURCE_MODE}" == "npm_latest" ]]; then - CLI_SOURCE_DESC="latest stable CLI from npm" - else - CLI_SOURCE_DESC="CLI built from source (same branch/ref as SDK)" - fi - - # Create release notes file - NOTES_FILE=$(mktemp) - { - echo "## Bundled CLI Version" - echo "" - echo "This SDK release bundles CLI version: ${CLI_VERSION}" - echo "" - echo "Source: ${CLI_SOURCE_DESC}" - echo "" - echo "---" - echo "" - } > "${NOTES_FILE}" - - # Get previous release notes if available - PREVIOUS_NOTES=$(gh release view "sdk-typescript-${PREVIOUS_RELEASE_TAG}" --json body -q '.body' 2>/dev/null || echo 'See commit history for changes.') - printf '%s\n' "${PREVIOUS_NOTES}" >> "${NOTES_FILE}" - - # Create GitHub release - gh release create "sdk-typescript-${RELEASE_TAG}" \ - --target "${TARGET}" \ - --title "SDK TypeScript Release ${RELEASE_TAG}" \ - --notes-file "${NOTES_FILE}" \ - ${PRERELEASE_FLAG} - - # Cleanup - rm -f "${NOTES_FILE}" - - - name: 'Create PR to merge release branch into main' - if: |- - ${{ steps.vars.outputs.is_dry_run == 'false' && steps.vars.outputs.is_nightly == 'false' && steps.vars.outputs.is_preview == 'false' }} - id: 'pr' - env: - GITHUB_TOKEN: '${{ secrets.CI_BOT_PAT }}' - RELEASE_BRANCH: '${{ steps.release_branch.outputs.BRANCH_NAME }}' - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }}' - run: |- - set -euo pipefail - - pr_url="$(gh pr list --head "${RELEASE_BRANCH}" --base main --json url --jq '.[0].url')" - if [[ -z "${pr_url}" ]]; then - pr_url="$(gh pr create \ - --base main \ - --head "${RELEASE_BRANCH}" \ - --title "chore(release): sdk-typescript ${RELEASE_TAG}" \ - --body "Automated release PR for sdk-typescript ${RELEASE_TAG}.")" - fi - - echo "PR_URL=${pr_url}" >> "${GITHUB_OUTPUT}" - - - name: 'Enable auto-merge for release PR' - if: |- - ${{ steps.vars.outputs.is_dry_run == 'false' && steps.vars.outputs.is_nightly == 'false' && steps.vars.outputs.is_preview == 'false' }} - env: - GITHUB_TOKEN: '${{ secrets.CI_BOT_PAT }}' - PR_URL: '${{ steps.pr.outputs.PR_URL }}' - run: |- - set -euo pipefail - gh pr merge "${PR_URL}" --merge --auto --delete-branch - - - name: 'Create Issue on Failure' - if: |- - ${{ failure() && steps.vars.outputs.is_dry_run == 'false' }} - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - RELEASE_TAG: "${{ steps.version.outputs.RELEASE_TAG || 'N/A' }}" - DETAILS_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - run: |- - gh issue create \ - --title "SDK Release Failed for ${RELEASE_TAG} on $(date +'%Y-%m-%d')" \ - --body "The SDK release workflow failed. See the full run for details: ${DETAILS_URL}" diff --git a/.github/workflows/release-vscode-companion.yml b/.github/workflows/release-vscode-companion.yml deleted file mode 100644 index 1011975291..0000000000 --- a/.github/workflows/release-vscode-companion.yml +++ /dev/null @@ -1,359 +0,0 @@ -name: 'Release VSCode IDE Companion' - -on: - workflow_dispatch: - inputs: - version: - description: 'The version to release (e.g., v0.1.11). Required for manual patch releases.' - required: false - type: 'string' - ref: - description: 'The branch or ref (full git sha) to release from.' - required: true - type: 'string' - default: 'main' - dry_run: - description: 'Run a dry-run of the release process; no branches, vsix packages or GitHub releases will be created.' - required: true - type: 'boolean' - default: true - create_preview_release: - description: 'Create a preview release. If version includes -preview., it is used as-is; otherwise a timestamp is appended.' - required: false - type: 'boolean' - default: false - force_skip_tests: - description: 'Select to skip the "Run Tests" step in testing. Prod releases should run tests' - required: false - type: 'boolean' - default: false - -concurrency: - group: '${{ github.workflow }}' - cancel-in-progress: false - -jobs: - # First job: Determine version and run tests once - prepare: - runs-on: 'ubuntu-latest' - if: |- - ${{ github.repository == 'QwenLM/qwen-code' }} - permissions: - contents: 'read' - outputs: - release_version: '${{ steps.version.outputs.RELEASE_VERSION }}' - release_tag: '${{ steps.version.outputs.RELEASE_TAG }}' - vscode_tag: '${{ steps.version.outputs.VSCODE_TAG }}' - is_preview: '${{ steps.vars.outputs.is_preview }}' - is_dry_run: '${{ steps.vars.outputs.is_dry_run }}' - - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - with: - ref: '${{ github.event.inputs.ref || github.sha }}' - fetch-depth: 0 - - - name: 'Set booleans for simplified logic' - env: - CREATE_PREVIEW_RELEASE: '${{ github.event.inputs.create_preview_release }}' - DRY_RUN_INPUT: '${{ github.event.inputs.dry_run }}' - id: 'vars' - run: |- - is_preview="false" - if [[ "${CREATE_PREVIEW_RELEASE}" == "true" ]]; then - is_preview="true" - fi - echo "is_preview=${is_preview}" >> "${GITHUB_OUTPUT}" - - is_dry_run="false" - if [[ "${DRY_RUN_INPUT}" == "true" ]]; then - is_dry_run="true" - fi - echo "is_dry_run=${is_dry_run}" >> "${GITHUB_OUTPUT}" - - - name: 'Setup Node.js' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - cache-dependency-path: 'package-lock.json' - - - name: 'Install Dependencies' - env: - NPM_CONFIG_PREFER_OFFLINE: 'true' - run: |- - npm ci - - - name: 'Get the version' - id: 'version' - working-directory: 'packages/vscode-ide-companion' - run: | - # Get the base version from package.json regardless of scenario - BASE_VERSION=$(node -p "require('./package.json').version") - - if [[ "${IS_PREVIEW}" == "true" ]]; then - # Generate preview version. If a manual version is provided and already - # contains -preview., use it as-is (no timestamp). Otherwise, append - # a timestamp for uniqueness. - if [[ -n "${MANUAL_VERSION}" ]]; then - MANUAL_CLEAN="${MANUAL_VERSION#v}" # Remove 'v' prefix if present - if [[ "${MANUAL_CLEAN}" == *"-preview."* ]]; then - PREVIEW_VERSION="${MANUAL_CLEAN}" - else - PREVIEW_BASE="${MANUAL_CLEAN%%-*}" # Strip any prerelease/build - TIMESTAMP=$(date +%Y%m%d%H%M%S) - PREVIEW_VERSION="${PREVIEW_BASE}-preview.${TIMESTAMP}" - fi - else - TIMESTAMP=$(date +%Y%m%d%H%M%S) - PREVIEW_VERSION="${BASE_VERSION}-preview.${TIMESTAMP}" - fi - - RELEASE_TAG="${PREVIEW_VERSION}" - - echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_OUTPUT" - echo "RELEASE_VERSION=${PREVIEW_VERSION}" >> "$GITHUB_OUTPUT" - echo "VSCODE_TAG=preview" >> "$GITHUB_OUTPUT" - else - # Use specified version or get from package.json - if [[ -n "${MANUAL_VERSION}" ]]; then - RELEASE_VERSION="${MANUAL_VERSION#v}" # Remove 'v' prefix if present - RELEASE_TAG="${MANUAL_VERSION#v}" # Remove 'v' prefix if present - else - RELEASE_VERSION="${BASE_VERSION}" - RELEASE_TAG="${BASE_VERSION}" - fi - - echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_OUTPUT" - echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "$GITHUB_OUTPUT" - echo "VSCODE_TAG=latest" >> "$GITHUB_OUTPUT" - fi - env: - IS_PREVIEW: '${{ steps.vars.outputs.is_preview }}' - MANUAL_VERSION: '${{ inputs.version }}' - - - name: 'Build webui dependency' - if: |- - ${{ github.event.inputs.force_skip_tests != 'true' }} - run: | - npm run build --workspace=@qwen-code/webui - - - name: 'Run Tests' - if: |- - ${{ github.event.inputs.force_skip_tests != 'true' }} - working-directory: 'packages/vscode-ide-companion' - run: | - npm run test:ci - env: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - - # Second job: Build platform-specific VSIXes in parallel - build: - needs: 'prepare' - strategy: - fail-fast: false - matrix: - include: - # Platform-specific builds (with node-pty native binaries) - - os: 'ubuntu-latest' - target: 'linux-x64' - universal: false - # macOS 15 (x64): use macos-15-intel - # Endpoint Badge: macos-latest-large, macos-15-large, or macos-15-intel - - os: 'macos-15-intel' - target: 'darwin-x64' - universal: false - # macOS 15 Arm64: use macos-latest - # Endpoint Badge: macos-latest, macos-15, or macos-15-xlarge - - os: 'macos-latest' - target: 'darwin-arm64' - universal: false - - os: 'windows-latest' - target: 'win32-x64' - universal: false - # Universal fallback (without node-pty, uses child_process) - - os: 'ubuntu-latest' - target: '' - universal: true - - runs-on: '${{ matrix.os }}' - permissions: - contents: 'read' - - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - with: - ref: '${{ github.event.inputs.ref || github.sha }}' - fetch-depth: 0 - - - name: 'Setup Node.js' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - cache-dependency-path: 'package-lock.json' - - - name: 'Install Dependencies' - env: - NPM_CONFIG_PREFER_OFFLINE: 'true' - run: |- - npm ci - - - name: 'Install VSCE' - run: |- - npm install -g @vscode/vsce - - - name: 'Update package version' - env: - RELEASE_VERSION: '${{ needs.prepare.outputs.release_version }}' - shell: 'bash' - run: |- - npm run release:version -- "${RELEASE_VERSION}" - - - name: 'Prepare VSCode Extension' - env: - UNIVERSAL_BUILD: '${{ matrix.universal }}' - VSCODE_TARGET: '${{ matrix.target }}' - run: | - # Build and stage the extension + bundled CLI - npm --workspace=qwen-code-vscode-ide-companion run prepackage - - - name: 'Package VSIX (platform-specific)' - if: "${{ matrix.target != '' }}" - working-directory: 'packages/vscode-ide-companion' - run: |- - if [[ "${{ needs.prepare.outputs.is_preview }}" == "true" ]]; then - vsce package --no-dependencies --pre-release --target ${{ matrix.target }} \ - --out ../../qwen-code-vscode-companion-${{ needs.prepare.outputs.release_version }}-${{ matrix.target }}.vsix - else - vsce package --no-dependencies --target ${{ matrix.target }} \ - --out ../../qwen-code-vscode-companion-${{ needs.prepare.outputs.release_version }}-${{ matrix.target }}.vsix - fi - shell: 'bash' - - - name: 'Package VSIX (universal)' - if: "${{ matrix.target == '' }}" - working-directory: 'packages/vscode-ide-companion' - run: |- - if [[ "${{ needs.prepare.outputs.is_preview }}" == "true" ]]; then - vsce package --no-dependencies --pre-release \ - --out ../../qwen-code-vscode-companion-${{ needs.prepare.outputs.release_version }}-universal.vsix - else - vsce package --no-dependencies \ - --out ../../qwen-code-vscode-companion-${{ needs.prepare.outputs.release_version }}-universal.vsix - fi - shell: 'bash' - - - name: 'Upload VSIX Artifact' - uses: 'actions/upload-artifact@v4' - with: - name: "vsix-${{ matrix.target || 'universal' }}" - path: 'qwen-code-vscode-companion-${{ needs.prepare.outputs.release_version }}-*.vsix' - if-no-files-found: 'error' - - # Third job: Publish all VSIXes to marketplaces - publish: - needs: - - 'prepare' - - 'build' - runs-on: 'ubuntu-latest' - environment: - name: 'production-release' - url: '${{ github.server_url }}/${{ github.repository }}/releases/tag/vscode-companion-${{ needs.prepare.outputs.release_tag }}' - permissions: - contents: 'read' - issues: 'write' - - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - with: - ref: '${{ github.event.inputs.ref || github.sha }}' - - - name: 'Download all VSIX artifacts' - uses: 'actions/download-artifact@v4' - with: - pattern: 'vsix-*' - path: 'vsix-artifacts' - merge-multiple: true - - - name: 'List downloaded artifacts' - run: |- - echo "Downloaded VSIX files:" - ls -la vsix-artifacts/ - - - name: 'Install VSCE and OVSX' - run: |- - npm install -g @vscode/vsce - npm install -g ovsx - - - name: 'Publish to Microsoft Marketplace' - if: "${{ needs.prepare.outputs.is_dry_run == 'false' && needs.prepare.outputs.is_preview != 'true' }}" - env: - VSCE_PAT: '${{ secrets.VSCE_PAT }}' - run: |- - echo "Publishing to Microsoft Marketplace..." - for vsix in vsix-artifacts/*.vsix; do - echo "Publishing: ${vsix}" - vsce publish --packagePath "${vsix}" --pat "${VSCE_PAT}" --skip-duplicate - done - - - name: 'Publish to OpenVSX' - if: "${{ needs.prepare.outputs.is_dry_run == 'false' }}" - env: - OVSX_TOKEN: '${{ secrets.OVSX_TOKEN }}' - run: |- - echo "Publishing to OpenVSX..." - for vsix in vsix-artifacts/*.vsix; do - echo "Publishing: ${vsix}" - if [[ "${{ needs.prepare.outputs.is_preview }}" == "true" ]]; then - ovsx publish "${vsix}" --pat "${OVSX_TOKEN}" --pre-release - else - ovsx publish "${vsix}" --pat "${OVSX_TOKEN}" - fi - done - - - name: 'Upload all VSIXes as release artifacts (dry run)' - if: "${{ needs.prepare.outputs.is_dry_run == 'true' }}" - uses: 'actions/upload-artifact@v4' - with: - name: 'all-vsix-packages-${{ needs.prepare.outputs.release_version }}' - path: 'vsix-artifacts/*.vsix' - if-no-files-found: 'error' - - report-failure: - name: 'Create Issue on Failure' - needs: - - 'prepare' - - 'build' - - 'publish' - if: |- - ${{ - always() && - ( - needs.build.result == 'failure' || - needs.build.result == 'cancelled' || - needs.publish.result == 'failure' || - needs.publish.result == 'cancelled' - ) - }} - runs-on: 'ubuntu-latest' - permissions: - contents: 'read' - issues: 'write' - steps: - - name: 'Create failure issue' - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - RELEASE_VERSION: '${{ needs.prepare.outputs.release_version }}' - DETAILS_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - GH_REPO: '${{ github.repository }}' - run: |- - gh issue create \ - --repo "${GH_REPO}" \ - --title "VSCode IDE Companion Release Failed for ${RELEASE_VERSION} on $(date +'%Y-%m-%d')" \ - --body "The VSCode IDE Companion release workflow failed. See the full run for details: ${DETAILS_URL}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 617cf9553b..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,236 +0,0 @@ -name: 'Release' - -on: - schedule: - # Runs every day at midnight UTC for the nightly release. - - cron: '0 0 * * *' - # Runs every Tuesday at 23:59 UTC for the preview release. - - cron: '59 23 * * 2' - workflow_dispatch: - inputs: - version: - description: 'The version to release (e.g., v0.1.11). Required for manual patch releases.' - required: false # Not required for scheduled runs - type: 'string' - ref: - description: 'The branch or ref (full git sha) to release from.' - required: true - type: 'string' - default: 'main' - dry_run: - description: 'Run a dry-run of the release process; no branches, npm packages or GitHub releases will be created.' - required: true - type: 'boolean' - default: true - create_nightly_release: - description: 'Auto apply the nightly release tag, input version is ignored.' - required: false - type: 'boolean' - default: false - create_preview_release: - description: 'Auto apply the preview release tag, input version is ignored.' - required: false - type: 'boolean' - default: false - force_skip_tests: - description: 'Select to skip the "Run Tests" step in testing. Prod releases should run tests' - required: false - type: 'boolean' - default: false - -jobs: - release: - runs-on: 'ubuntu-latest' - environment: - name: 'production-release' - url: '${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ steps.version.outputs.RELEASE_TAG }}' - if: |- - ${{ github.repository == 'QwenLM/qwen-code' }} - permissions: - contents: 'write' - packages: 'write' - id-token: 'write' - issues: 'write' # For creating issues on failure - outputs: - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }}' - - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - with: - ref: '${{ github.event.inputs.ref || github.sha }}' - fetch-depth: 0 - - - name: 'Set booleans for simplified logic' - env: - CREATE_NIGHTLY_RELEASE: '${{ github.event.inputs.create_nightly_release }}' - CREATE_PREVIEW_RELEASE: '${{ github.event.inputs.create_preview_release }}' - EVENT_NAME: '${{ github.event_name }}' - CRON: '${{ github.event.schedule }}' - DRY_RUN_INPUT: '${{ github.event.inputs.dry_run }}' - id: 'vars' - run: |- - is_nightly="false" - if [[ "${CRON}" == "0 0 * * *" || "${CREATE_NIGHTLY_RELEASE}" == "true" ]]; then - is_nightly="true" - fi - echo "is_nightly=${is_nightly}" >> "${GITHUB_OUTPUT}" - - is_preview="false" - if [[ "${CRON}" == "59 23 * * 2" || "${CREATE_PREVIEW_RELEASE}" == "true" ]]; then - is_preview="true" - fi - echo "is_preview=${is_preview}" >> "${GITHUB_OUTPUT}" - - is_dry_run="false" - if [[ "${DRY_RUN_INPUT}" == "true" ]]; then - is_dry_run="true" - fi - echo "is_dry_run=${is_dry_run}" >> "${GITHUB_OUTPUT}" - - - name: 'Setup Node.js' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: 'Install Dependencies' - run: |- - npm ci - - - name: 'Get the version' - id: 'version' - run: | - VERSION_ARGS=() - if [[ "${IS_NIGHTLY}" == "true" ]]; then - VERSION_ARGS+=(--type=nightly) - elif [[ "${IS_PREVIEW}" == "true" ]]; then - VERSION_ARGS+=(--type=preview) - if [[ -n "${MANUAL_VERSION}" ]]; then - VERSION_ARGS+=("--preview_version_override=${MANUAL_VERSION}") - fi - else - VERSION_ARGS+=(--type=stable) - if [[ -n "${MANUAL_VERSION}" ]]; then - VERSION_ARGS+=("--stable_version_override=${MANUAL_VERSION}") - fi - fi - - VERSION_JSON=$(node scripts/get-release-version.js "${VERSION_ARGS[@]}") - echo "RELEASE_TAG=$(echo "$VERSION_JSON" | jq -r .releaseTag)" >> "$GITHUB_OUTPUT" - echo "RELEASE_VERSION=$(echo "$VERSION_JSON" | jq -r .releaseVersion)" >> "$GITHUB_OUTPUT" - echo "NPM_TAG=$(echo "$VERSION_JSON" | jq -r .npmTag)" >> "$GITHUB_OUTPUT" - - echo "PREVIOUS_RELEASE_TAG=$(echo "$VERSION_JSON" | jq -r .previousReleaseTag)" >> "$GITHUB_OUTPUT" - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - IS_NIGHTLY: '${{ steps.vars.outputs.is_nightly }}' - IS_PREVIEW: '${{ steps.vars.outputs.is_preview }}' - MANUAL_VERSION: '${{ inputs.version }}' - - - name: 'Run Tests' - if: |- - ${{ github.event.inputs.force_skip_tests != 'true' }} - run: | - npm run preflight - npm run test:integration:cli:sandbox:none - npm run test:integration:cli:sandbox:docker - env: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - - - name: 'Configure Git User' - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - - name: 'Create and switch to a release branch' - id: 'release_branch' - env: - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }}' - run: |- - BRANCH_NAME="release/${RELEASE_TAG}" - git switch -c "${BRANCH_NAME}" - echo "BRANCH_NAME=${BRANCH_NAME}" >> "${GITHUB_OUTPUT}" - - - name: 'Update package versions' - env: - RELEASE_VERSION: '${{ steps.version.outputs.RELEASE_VERSION }}' - run: |- - npm run release:version "${RELEASE_VERSION}" - - - name: 'Commit and Conditionally Push package versions' - env: - BRANCH_NAME: '${{ steps.release_branch.outputs.BRANCH_NAME }}' - IS_DRY_RUN: '${{ steps.vars.outputs.is_dry_run }}' - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }}' - run: |- - git add package.json package-lock.json packages/*/package.json - if git diff --staged --quiet; then - echo "No version changes to commit" - else - git commit -m "chore(release): ${RELEASE_TAG}" - fi - if [[ "${IS_DRY_RUN}" == "false" ]]; then - echo "Pushing release branch to remote..." - git push --set-upstream origin "${BRANCH_NAME}" --follow-tags - else - echo "Dry run enabled. Skipping push." - fi - - - name: 'Build Bundle and Prepare Package' - run: |- - npm run bundle - npm run prepare:package - - - name: 'Configure npm for publishing' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version: '20' - registry-url: 'https://registry.npmjs.org' - scope: '@qwen-code' - - - name: 'Publish @qwen-code/qwen-code' - working-directory: 'dist' - run: |- - npm publish --access public --tag=${{ steps.version.outputs.NPM_TAG }} ${{ steps.vars.outputs.is_dry_run == 'true' && '--dry-run' || '' }} - env: - NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}' - - - name: 'Create GitHub Release and Tag' - if: |- - ${{ steps.vars.outputs.is_dry_run == 'false' }} - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - RELEASE_BRANCH: '${{ steps.release_branch.outputs.BRANCH_NAME }}' - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }}' - PREVIOUS_RELEASE_TAG: '${{ steps.version.outputs.PREVIOUS_RELEASE_TAG }}' - IS_NIGHTLY: '${{ steps.vars.outputs.is_nightly }}' - IS_PREVIEW: '${{ steps.vars.outputs.is_preview }}' - run: |- - # Set prerelease flag for nightly and preview releases - PRERELEASE_FLAG="" - if [[ "${IS_NIGHTLY}" == "true" || "${IS_PREVIEW}" == "true" ]]; then - PRERELEASE_FLAG="--prerelease" - fi - - gh release create "${RELEASE_TAG}" \ - dist/cli.js \ - --target "$RELEASE_BRANCH" \ - --title "Release ${RELEASE_TAG}" \ - --notes-start-tag "$PREVIOUS_RELEASE_TAG" \ - --generate-notes \ - ${PRERELEASE_FLAG} - - - name: 'Create Issue on Failure' - if: |- - ${{ failure() }} - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }} || "N/A"' - DETAILS_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - run: |- - gh issue create \ - --title "Release Failed for ${RELEASE_TAG} on $(date +'%Y-%m-%d')" \ - --body "The release workflow failed. See the full run for details: ${DETAILS_URL}" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 87354b5706..0000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: 'Mark stale issues and pull requests' - -# Run as a daily cron at 1:30 AM -on: - schedule: - - cron: '30 1 * * *' - workflow_dispatch: - -jobs: - stale: - runs-on: 'ubuntu-latest' - if: |- - ${{ github.repository == 'google-gemini/gemini-cli' }} - permissions: - issues: 'write' - pull-requests: 'write' - concurrency: - group: '${{ github.workflow }}-stale' - cancel-in-progress: true - steps: - - uses: 'actions/stale@5bef64f19d7facfb25b37b414482c7164d639639' # ratchet:actions/stale@v9 - with: - repo-token: '${{ secrets.GITHUB_TOKEN }}' - stale-issue-message: >- - This issue has been automatically marked as stale due to 60 days of inactivity. - It will be closed in 14 days if no further activity occurs. - stale-pr-message: >- - This pull request has been automatically marked as stale due to 60 days of inactivity. - It will be closed in 14 days if no further activity occurs. - close-issue-message: >- - This issue has been closed due to 14 additional days of inactivity after being marked as stale. - If you believe this is still relevant, feel free to comment or reopen the issue. Thank you! - close-pr-message: >- - This pull request has been closed due to 14 additional days of inactivity after being marked as stale. - If this is still relevant, you are welcome to reopen or leave a comment. Thanks for contributing! - days-before-stale: 60 - days-before-close: 14 - exempt-issue-labels: 'pinned,security' - exempt-pr-labels: 'pinned,security' diff --git a/.github/workflows/terminal-bench.yml b/.github/workflows/terminal-bench.yml deleted file mode 100644 index 0a46768889..0000000000 --- a/.github/workflows/terminal-bench.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: 'Terminal Bench Tests' - -on: - push: - branches: - - 'feat/tbench*' - workflow_dispatch: - inputs: - version: - description: 'The version to test.' - required: true - type: 'string' - default: 'latest' - release: - types: ['published'] - -jobs: - terminal-bench: - name: 'Terminal Bench (Task: ${{ matrix.task_id }})' - runs-on: 'ubuntu-latest' - strategy: - fail-fast: false - matrix: - task_id: - - 'hello-world' - - 'swe-bench-astropy-1' - steps: - - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 - with: - submodules: 'recursive' - - name: 'Install uv and set the python version' - uses: 'astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6' # v6 - with: - python-version: '3.12' - - - name: 'Set up Node.js 20.x' - uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 - with: - node-version: '20.x' - cache: 'npm' - cache-dependency-path: 'package-lock.json' - registry-url: 'https://registry.npmjs.org/' - - - name: 'Configure npm for rate limiting' - run: |- - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm config set fetch-retries 5 - npm config set fetch-timeout 300000 - - - name: 'Install dependencies' - run: |- - npm ci --prefer-offline --no-audit --progress=false - - - name: 'Build project' - run: |- - npm run build - - - name: 'Run Terminal Bench Oracle (task: ${{ matrix.task_id }})' - run: 'npm run test:terminal-bench:oracle' - timeout-minutes: 30 - env: - CI: 'true' - NODE_ENV: 'test' - VERBOSE: 'true' - KEEP_OUTPUT: 'true' - TB_TASK_ID: '${{ matrix.task_id }}' - TB_TIMEOUT_MINUTES: '30' - - - name: 'Run Terminal Bench Qwen (task: ${{ matrix.task_id }})' - run: 'npm run test:terminal-bench:qwen' - timeout-minutes: 30 - env: - OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' - OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' - OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - CI: 'true' - NODE_ENV: 'test' - VERBOSE: 'true' - KEEP_OUTPUT: 'true' - TB_TASK_ID: '${{ matrix.task_id }}' - TB_TIMEOUT_MINUTES: '30' - - - name: 'Upload test artifacts' - if: 'always()' - uses: 'actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b' # ratchet:actions/upload-artifact@v4 - with: - name: 'terminal-bench-${{ matrix.task_id }}-output' - path: | - .integration-tests/** - !.integration-tests/**/*.lock - !.integration-tests/**/tb.lock - integration-tests/**/*.log - if-no-files-found: 'warn' - retention-days: 7 diff --git a/BWEN-README.md b/BWEN-README.md index a67e97a02f..c91d1ac10f 100644 --- a/BWEN-README.md +++ b/BWEN-README.md @@ -1,281 +1,242 @@ -# BWEN Code - Enhanced Qwen Code +# BWEN Code - CLI Only -**BWEN Code** is a fork of [Qwen Code](https://github.com/QwenLM/qwen-code) with enhanced features for improved developer experience. +**BWEN Code** is a fork of [Qwen Code](https://github.com/QwenLM/qwen-code) optimized for CLI usage. -## 🆕 New Features +## 🎯 Features -### 1. 📁 File Tree (Left Sidebar) +### Core Features -A collapsible file explorer in the left sidebar for easy navigation of your project structure. +- **Interactive CLI** - Terminal-based AI assistant +- **File Operations** - Read, write, edit files with AI assistance +- **Shell Commands** - Execute and debug shell commands +- **Git Integration** - Git-aware file filtering and operations +- **MCP Support** - Model Context Protocol integration +- **Fuzzy Search** - fzf-powered file completion for `@` mentions -**Features:** +### Authentication -- Recursive tree display of files and folders -- Expand/collapse folders with visual feedback -- File selection with highlighted state -- Modified file indicator -- Context menu support (planned) -- Keyboard navigation support +- **Qwen OAuth** - Free tier: 1,000 requests/day +- **OpenAI-compatible API** - Use any OpenAI-compatible endpoint -**Components:** - -- `FileTree.tsx` - Main tree component -- `Sidebar.tsx` - Enhanced sidebar with file tree -- `Main.tsx` - Layout component with sidebar integration - -**Usage:** - -```tsx - -``` +## 📦 Installation -### 2. 📋 Capture/Clipboard Reading +```bash +# Clone the repository +git clone https://github.com/bonsai/bwen-code.git +cd bwencode -One-click clipboard content capture directly in the chat input. +# Install dependencies +npm install -**Features:** +# Build +npm run build -- Clipboard API integration -- Visual feedback during read operation -- Error handling with user feedback -- Icon and button variants -- Paste event listener +# Link globally (optional) +npm link --workspace=@bwen-code/bwen-code -**Components:** +# Start +npm start +# or if linked globally +bwen +``` -- `CaptureButton.tsx` - Clipboard capture button -- `useClipboard.ts` - Clipboard hook +## 💻 Usage -**Usage:** +### Interactive Mode -```tsx - setInputText(content)} - variant="icon" - title="Paste from clipboard" -/> +```bash +# Start interactive CLI +npm start +# or +bwen ``` -### 3. ⌨️ TAB Completion - -Intelligent TAB-based autocomplete for file paths, commands, and more. +### Non-Interactive Mode -**Features:** +```bash +# One-shot prompt +bwen "Explain this codebase" -- Configurable trigger characters (`/`, `@`, `#`, `.`) -- Keyboard navigation (Arrow Up/Down, Enter, Escape, Tab) -- Filtering and sorting -- Debounced updates -- Group support for categorized results +# With specific model +bwen -m gpt-4o "Review this PR" -**Hooks:** +# With approval mode +bwen --approval-mode yolo "Fix the bugs" +``` -- `useTabCompletion.ts` - TAB completion hook +### Common Commands + +| Command | Description | +|---------|-------------| +| `/help` | Show available commands | +| `/clear` | Clear conversation history | +| `/compress` | Compress history to save tokens | +| `/stats` | Show session statistics | +| `/exit` | Exit the CLI | + +### Keyboard Shortcuts + +| Key | Action | +|-----|--------| +| `Ctrl+C` | Cancel current operation | +| `Ctrl+D` | Exit | +| `Ctrl+L` | Clear screen | +| `Tab` | Auto-complete suggestions | +| `@` | File fuzzy search | +| `/` | Command search | + +## 🔧 Configuration + +### Settings File + +Location: `~/.qwen/settings.json` + +```json +{ + "model": { + "name": "gpt-4o" + }, + "approvalMode": "default", + "theme": "default", + "language": "en" +} +``` -**Configuration:** +### Environment Variables -```typescript -const config: TabCompletionConfig = { - minChars: 1, - triggerCharacters: ['/', '@', '#', '.'], - caseSensitive: false, - debounceMs: 150, -}; -``` +```bash +# OpenAI-compatible API +export OPENAI_API_KEY="your-api-key" +export OPENAI_BASE_URL="https://api.openai.com/v1" +export OPENAI_MODEL="gpt-4o" -### 4. 🎤 Voice Recognition - -Speech-to-text input using the Web Speech API. - -**Features:** - -- Multi-language support (12 languages) -- Real-time interim results -- Visual listening indicator -- Error handling with user feedback -- Continuous listening mode - -**Supported Languages:** -| Code | Language | -|------|----------| -| `en-US` | English (US) | -| `en-GB` | English (UK) | -| `zh-CN` | 中文 (简体) | -| `zh-TW` | 中文 (繁體) | -| `ja-JP` | 日本語 | -| `ko-KR` | 한국어 | -| `es-ES` | Español | -| `fr-FR` | Français | -| `de-DE` | Deutsch | -| `it-IT` | Italiano | -| `pt-BR` | Português (Brasil) | -| `ru-RU` | Русский | - -**Components:** - -- `VoiceButton.tsx` - Voice input button -- `useVoiceRecognition.ts` - Voice recognition hook - -**Usage:** - -```tsx - setInputText(transcript)} - language="ja-JP" - continuous={false} - title="Voice input" -/> +# Debug mode +export DEBUG=1 ``` ## 🏗️ Architecture -### New Files Structure +### Package Structure ``` -packages/webui/src/ -├── components/ -│ ├── layout/ -│ │ ├── FileTree.tsx # File tree component -│ │ ├── Sidebar.tsx # Enhanced sidebar -│ │ ├── Main.tsx # Main layout -│ │ ├── CaptureButton.tsx # Clipboard capture -│ │ └── VoiceButton.tsx # Voice input -│ └── icons/ -│ ├── FileIcons.tsx # FolderOpenIcon added -│ └── SpecialIcons.tsx # ClipboardIcon, MicrophoneIcon -├── hooks/ -│ ├── useClipboard.ts # Clipboard hook -│ ├── useTabCompletion.ts # TAB completion hook -│ └── useVoiceRecognition.ts # Voice recognition hook -└── styles/ - └── components.css # New component styles +packages/ +├── cli/ # Main CLI application +├── core/ # Core backend logic and tools +└── test-utils/ # Shared testing utilities ``` -### Integration Points - -**InputForm.tsx** - Enhanced with new buttons: - -```tsx -
- {/* Edit mode button */} - {/* Active file indicator */} +### CLI Structure - {/* NEW: Capture button (clipboard) */} - - - {/* NEW: Voice input button */} - - - {/* Spacer */} - {/* Context usage indicator */} - {/* Command button */} - {/* Attach button */} - {/* Send/Stop button */} -
+``` +packages/cli/src/ +├── commands/ # CLI commands +├── config/ # Configuration management +├── services/ # Service layer +├── ui/ # Terminal UI components +│ ├── components/ +│ ├── hooks/ +│ └── commands/ +└── utils/ # Utility functions ``` ## 🧪 Testing -### Run Tests - ```bash -# Run webui tests -npm run test --workspace=packages/webui - -# Run with extended config -npx vitest --config vitest.config.extended.ts -``` +# Run all tests +npm run test -### Coverage Thresholds +# Run specific package tests +npm run test --workspace=@bwen-code/bwen-code-core +npm run test --workspace=@bwen-code/bwen-code -| Component | Branches | Functions | Lines | Statements | -| ---------------------- | -------- | --------- | ----- | ---------- | -| FileTree.tsx | 60% | 60% | 60% | 60% | -| CaptureButton.tsx | 60% | 60% | 60% | 60% | -| VoiceButton.tsx | 60% | 60% | 60% | 60% | -| useClipboard.ts | 60% | 60% | 60% | 60% | -| useVoiceRecognition.ts | 60% | 60% | 60% | 60% | -| useTabCompletion.ts | 60% | 60% | 60% | 60% | +# Run with coverage +npm run test -- --coverage +``` -## 🔧 Development +## 🔨 Build -### Debug Monitor +```bash +# Build all packages +npm run build -Real-time debugging and monitoring tool: +# Build specific package +npm run build --workspace=@bwen-code/bwen-code-core +npm run build --workspace=@bwen-code/bwen-code -```bash -node scripts/debug-monitor.js +# Development mode +npm run dev ``` -**Features:** - -- File change detection -- Console.log detection -- TODO comment detection -- Health reports -- Log rotation +## 📝 Notes -### CI/CD Pipeline +### CLI-Only Focus -GitHub Actions workflow (`.github/workflows/bwen-code-ci.yml`): +This project is optimized for terminal usage. The following features have been removed: -**Stages:** +- ❌ Web UI components +- ❌ VS Code extension +- ❌ Zed extension +- ❌ SDK packages (TypeScript, Java) +- ❌ Web templates -1. 🔍 Pre-flight Checks -2. 📝 Lint & Type Check -3. 🔨 Build & Test (multi-OS, multi-Node) -4. 🌐 WebUI Specific Tests -5. 🔒 Security Scan -6. 🐛 Debug & Monitor -7. 📊 Post Results (PR comments) -8. 🔧 Auto-Fix (Experimental) +### Fuzzy Search -**Run manually:** +The `@` mention completion uses `fzf` for fuzzy file search: -``` -Actions > BWEN Code CI/CD > Run workflow -``` +1. Type `@` followed by partial filename +2. fzf filters matching files +3. Results are ranked by fzf score +4. Press `Tab` to autocomplete -## 📦 Installation +**Requirements:** `fzf` must be installed on your system. ```bash -# Clone the repository -git clone https://github.com/bonsai/bwen-code.git -cd bwencode - -# Install dependencies -npm install +# Install fzf +# macOS +brew install fzf -# Build webui -npm run build --workspace=packages/webui +# Windows (with Chocolatey) +choco install fzf -# Start development -npm run dev +# Linux +apt-get install fzf # Debian/Ubuntu +dnf install fzf # Fedora ``` ## 🆚 Comparison with Qwen Code -| Feature | Qwen Code | BWEN Code | -| ----------------- | --------- | ----------- | -| File Tree | ❌ | ✅ | -| Clipboard Capture | ❌ | ✅ | -| TAB Completion | Basic | ✅ Enhanced | -| Voice Input | ❌ | ✅ | -| Debug Monitor | ❌ | ✅ | -| Extended CI/CD | Basic | ✅ Enhanced | +### Historical Features (Removed in CLI-only Version) + +| Feature | Qwen Code | BWEN Code (Original) | +| ----------------- | --------- | -------------------- | +| File Tree | ❌ | ✅ | +| Clipboard Capture | ❌ | ✅ | +| TAB Completion | Basic | ✅ Enhanced | +| Voice Input | ❌ | ✅ | +| Debug Monitor | ❌ | ✅ | +| Extended CI/CD | Basic | ✅ Enhanced | + +### Current Version (CLI-Only) + +| Feature | Qwen Code | BWEN Code (Current) | +| ----------------- | --------- | ------------------- | +| CLI | ✅ | ✅ Enhanced | +| Web UI | ✅ | ❌ Removed | +| VS Code Extension | ✅ | ❌ Removed | +| Fuzzy Search | Basic | ✅ fzf-powered | +| Package Size | Large | ✅ Minimal | ## 📄 License -Same as Qwen Code - Apache 2.0 +Apache 2.0 ## 🙏 Credits - Original: [Qwen Code](https://github.com/QwenLM/qwen-code) - Fork: [bonsai/qwen-code](https://github.com/bonsai/qwen-code) - BWEN Code: [bonsai/bwen-code](https://github.com/bonsai/bwen-code) + +## 🔗 Links + +- [GitHub Repository](https://github.com/bonsai/bwen-code) +- [Qwen Code Documentation](https://qwenlm.github.io/qwen-code-docs/) diff --git a/TODOO.docx b/TODOO.docx new file mode 100644 index 0000000000..2964a29c5c Binary files /dev/null and b/TODOO.docx differ diff --git a/package-lock.json b/package-lock.json index 6f45873a8a..93e15524e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,18 @@ { - "name": "@qwen-code/qwen-code", + "name": "@bwen-code/bwen-code", "version": "0.12.3", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@qwen-code/qwen-code", + "name": "@bwen-code/bwen-code", "version": "0.12.3", "workspaces": [ - "packages/*" + "packages/cli", + "packages/core", + "packages/test-utils", + "packages/web-templates", + "packages/webui" ], "dependencies": { "@testing-library/dom": "^10.4.1", @@ -193,202 +197,6 @@ "lru-cache": "^10.4.3" } }, - "node_modules/@azu/format-text": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@azu/format-text/-/format-text-1.0.2.tgz", - "integrity": "sha512-Swi4N7Edy1Eqq82GxgEECXSSLyn6GOb5htRFPzBDdUkECGXtlf12ynO5oJSpWKPwCaUssOu7NfhDcCWpIC6Ywg==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@azu/style-format": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@azu/style-format/-/style-format-1.0.1.tgz", - "integrity": "sha512-AHcTojlNBdD/3/KxIKlg8sxIWHfOtQszLvOpagLTO+bjC3u7SAszu1lf//u7JJC50aUSH+BVWDD/KvaA6Gfn5g==", - "dev": true, - "license": "WTFPL", - "dependencies": { - "@azu/format-text": "^1.0.1" - } - }, - "node_modules/@azure/abort-controller": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", - "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-auth": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.10.0.tgz", - "integrity": "sha512-88Djs5vBvGbHQHf5ZZcaoNHo6Y8BKZkt3cw2iuJIQzLEgH4Ox6Tm4hjFhbqOxyYsgIG/eJbFEHpxRIfEEWv5Ow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.11.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@azure/core-client": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.10.0.tgz", - "integrity": "sha512-O4aP3CLFNodg8eTHXECaH3B3CjicfzkxVtnrfLkOq0XNP7TIECGfHpK/C6vADZkWP75wzmdBnsIA8ksuJMk18g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.20.0", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.6.1", - "@azure/logger": "^1.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.0.tgz", - "integrity": "sha512-OKHmb3/Kpm06HypvB3g6Q3zJuvyXcpxDpCS1PnU8OV6AJgSFaee/covXBcPbWc6XDDxtEPlbi3EMQ6nUiPaQtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.8.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.0.0", - "@typespec/ts-http-runtime": "^0.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.3.0.tgz", - "integrity": "sha512-+XvmZLLWPe67WXNZo9Oc9CrPj/Tm8QnHR92fFAFdnbzwNdCH1h+7UdpaQgRSBsMY+oW1kHXNUZQLdZ1gHX3ROw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@azure/core-util": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.13.0.tgz", - "integrity": "sha512-o0psW8QWQ58fq3i24Q1K2XfS/jYTxr7O1HRcyUE9bV9NttLU+kYOH82Ixj8DGlMTOWgxm1Sss2QAfKK5UkSPxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@typespec/ts-http-runtime": "^0.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@azure/identity": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.11.1.tgz", - "integrity": "sha512-0ZdsLRaOyLxtCYgyuqyWqGU5XQ9gGnjxgfoNTt1pvELGkkUFrMATABZFIq8gusM7N1qbqpVtwLOhk0d/3kacLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", - "@azure/core-rest-pipeline": "^1.17.0", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.0.0", - "@azure/msal-browser": "^4.2.0", - "@azure/msal-node": "^3.5.0", - "open": "^10.1.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.3.0.tgz", - "integrity": "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typespec/ts-http-runtime": "^0.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@azure/msal-browser": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.21.1.tgz", - "integrity": "sha512-qGtzX3HJfJsOVeDcVrFZAYZoxLRjrW2lXzXqijgiBA5EtM9ud7F/EYgKKQ9TJU/WtE46szuZtQZx5vD4pEiknA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/msal-common": "15.12.0" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@azure/msal-common": { - "version": "15.12.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.12.0.tgz", - "integrity": "sha512-4ucXbjVw8KJ5QBgnGJUeA07c8iznwlk5ioHIhI4ASXcXgcf2yRFhWzYOyWg/cI49LC9ekpFJeQtO3zjDTbl6TQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@azure/msal-node": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.7.3.tgz", - "integrity": "sha512-MoJxkKM/YpChfq4g2o36tElyzNUMG8mfD6u8NbuaPAsqfGpaw249khAcJYNoIOigUzRw45OjXCOrexE6ImdUxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/msal-common": "15.12.0", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@azure/msal-node/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@babel/code-frame": { "version": "7.28.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", @@ -791,6 +599,22 @@ "node": ">=6" } }, + "node_modules/@bwen-code/bwen-code": { + "resolved": "packages/cli", + "link": true + }, + "node_modules/@bwen-code/bwen-code-core": { + "resolved": "packages/core", + "link": true + }, + "node_modules/@bwen-code/bwen-code-test-utils": { + "resolved": "packages/test-utils", + "link": true + }, + "node_modules/@bwen-code/web-templates": { + "resolved": "packages/web-templates", + "link": true + }, "node_modules/@chromatic-com/storybook": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@chromatic-com/storybook/-/storybook-5.0.0.tgz", @@ -1536,10 +1360,6 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@google/gemini-cli-test-utils": { - "resolved": "packages/test-utils", - "link": true - }, "node_modules/@grpc/grpc-js": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.4.tgz", @@ -1621,22 +1441,6 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -1651,14 +1455,6 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/@humanwhocodes/retry": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", @@ -2990,22 +2786,6 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", "license": "BSD-3-Clause" }, - "node_modules/@qwen-code/qwen-code": { - "resolved": "packages/cli", - "link": true - }, - "node_modules/@qwen-code/qwen-code-core": { - "resolved": "packages/core", - "link": true - }, - "node_modules/@qwen-code/qwen-code-test-utils": { - "resolved": "packages/test-utils", - "link": true - }, - "node_modules/@qwen-code/sdk": { - "resolved": "packages/sdk-typescript", - "link": true - }, "node_modules/@qwen-code/web-templates": { "resolved": "packages/web-templates", "link": true @@ -3366,283 +3146,85 @@ } } }, - "node_modules/@secretlint/config-creator": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/config-creator/-/config-creator-10.2.2.tgz", - "integrity": "sha512-BynOBe7Hn3LJjb3CqCHZjeNB09s/vgf0baBaHVw67w7gHF0d25c3ZsZ5+vv8TgwSchRdUCRrbbcq5i2B1fJ2QQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/types": "^10.2.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/config-loader": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/config-loader/-/config-loader-10.2.2.tgz", - "integrity": "sha512-ndjjQNgLg4DIcMJp4iaRD6xb9ijWQZVbd9694Ol2IszBIbGPPkwZHzJYKICbTBmh6AH/pLr0CiCaWdGJU7RbpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/profiler": "^10.2.2", - "@secretlint/resolver": "^10.2.2", - "@secretlint/types": "^10.2.2", - "ajv": "^8.17.1", - "debug": "^4.4.1", - "rc-config-loader": "^4.1.3" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/config-loader/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, + "node_modules/@selderee/plugin-htmlparser2": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz", + "integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==", "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" + "domhandler": "^5.0.3", + "selderee": "^0.11.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://ko-fi.com/killymxi" } }, - "node_modules/@secretlint/config-loader/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "node_modules/@sinclair/typebox": { + "version": "0.34.37", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.37.tgz", + "integrity": "sha512-2TRuQVgQYfy+EzHRTIvkhv2ADEouJ2xNS/Vq+W5EuuewBdOrvATvljZTxHWZSTYr2sTjTHpGvucaGAt67S2akw==", "dev": true, "license": "MIT" }, - "node_modules/@secretlint/core": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/core/-/core-10.2.2.tgz", - "integrity": "sha512-6rdwBwLP9+TO3rRjMVW1tX+lQeo5gBbxl1I5F8nh8bgGtKwdlCMhMKsBWzWg1ostxx/tIG7OjZI0/BxsP8bUgw==", + "node_modules/@storybook/addon-a11y": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-10.2.0.tgz", + "integrity": "sha512-PJVvEr6KpuOvCr1megfp39RNvFSut6XmFxaiDKtf8kxYbD8tMYL2n/9xFcPIvozJCO4zRmug50X+OIoh0GsSGQ==", "dev": true, "license": "MIT", "dependencies": { - "@secretlint/profiler": "^10.2.2", - "@secretlint/types": "^10.2.2", - "debug": "^4.4.1", - "structured-source": "^4.0.0" + "@storybook/global": "^5.0.0", + "axe-core": "^4.2.0" }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/formatter": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/formatter/-/formatter-10.2.2.tgz", - "integrity": "sha512-10f/eKV+8YdGKNQmoDUD1QnYL7TzhI2kzyx95vsJKbEa8akzLAR5ZrWIZ3LbcMmBLzxlSQMMccRmi05yDQ5YDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/resolver": "^10.2.2", - "@secretlint/types": "^10.2.2", - "@textlint/linter-formatter": "^15.2.0", - "@textlint/module-interop": "^15.2.0", - "@textlint/types": "^15.2.0", - "chalk": "^5.4.1", - "debug": "^4.4.1", - "pluralize": "^8.0.0", - "strip-ansi": "^7.1.0", - "table": "^6.9.0", - "terminal-link": "^4.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" }, - "engines": { - "node": ">=20.0.0" + "peerDependencies": { + "storybook": "^10.2.0" } }, - "node_modules/@secretlint/formatter/node_modules/chalk": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.0.tgz", - "integrity": "sha512-46QrSQFyVSEyYAgQ22hQ+zDa60YHA4fBstHmtSApj1Y5vKtG27fWowW03jCk5KcbXEWPZUIR894aARCA/G1kfQ==", + "node_modules/@storybook/addon-docs": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-10.2.0.tgz", + "integrity": "sha512-2iVQmbgguRWQAxJ7HFje7PQFHZIDCYjFNt9zKLaF8NmCS3OI1qVON5Tb/KH30f9epa5Y42OarPEewJE9J+Tw9A==", "dev": true, "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" + "dependencies": { + "@mdx-js/react": "^3.0.0", + "@storybook/csf-plugin": "10.2.0", + "@storybook/icons": "^2.0.1", + "@storybook/react-dom-shim": "10.2.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "ts-dedent": "^2.0.0" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^10.2.0" } }, - "node_modules/@secretlint/node": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/node/-/node-10.2.2.tgz", - "integrity": "sha512-eZGJQgcg/3WRBwX1bRnss7RmHHK/YlP/l7zOQsrjexYt6l+JJa5YhUmHbuGXS94yW0++3YkEJp0kQGYhiw1DMQ==", + "node_modules/@storybook/addon-onboarding": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@storybook/addon-onboarding/-/addon-onboarding-10.2.0.tgz", + "integrity": "sha512-6JEgceYEEER9vVjmjiT1AKROMiwzZkSo+MN76wZMKayLX9fA8RIjrRGF3C5CNOVadbcbbvgPmwcLZMgD+0VZlg==", "dev": true, "license": "MIT", - "dependencies": { - "@secretlint/config-loader": "^10.2.2", - "@secretlint/core": "^10.2.2", - "@secretlint/formatter": "^10.2.2", - "@secretlint/profiler": "^10.2.2", - "@secretlint/source-creator": "^10.2.2", - "@secretlint/types": "^10.2.2", - "debug": "^4.4.1", - "p-map": "^7.0.3" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" }, - "engines": { - "node": ">=20.0.0" + "peerDependencies": { + "storybook": "^10.2.0" } }, - "node_modules/@secretlint/profiler": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/profiler/-/profiler-10.2.2.tgz", - "integrity": "sha512-qm9rWfkh/o8OvzMIfY8a5bCmgIniSpltbVlUVl983zDG1bUuQNd1/5lUEeWx5o/WJ99bXxS7yNI4/KIXfHexig==", - "dev": true, - "license": "MIT" - }, - "node_modules/@secretlint/resolver": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/resolver/-/resolver-10.2.2.tgz", - "integrity": "sha512-3md0cp12e+Ae5V+crPQYGd6aaO7ahw95s28OlULGyclyyUtf861UoRGS2prnUrKh7MZb23kdDOyGCYb9br5e4w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@secretlint/secretlint-formatter-sarif": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/secretlint-formatter-sarif/-/secretlint-formatter-sarif-10.2.2.tgz", - "integrity": "sha512-ojiF9TGRKJJw308DnYBucHxkpNovDNu1XvPh7IfUp0A12gzTtxuWDqdpuVezL7/IP8Ua7mp5/VkDMN9OLp1doQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "node-sarif-builder": "^3.2.0" - } - }, - "node_modules/@secretlint/secretlint-rule-no-dotenv": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/secretlint-rule-no-dotenv/-/secretlint-rule-no-dotenv-10.2.2.tgz", - "integrity": "sha512-KJRbIShA9DVc5Va3yArtJ6QDzGjg3PRa1uYp9As4RsyKtKSSZjI64jVca57FZ8gbuk4em0/0Jq+uy6485wxIdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/types": "^10.2.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/secretlint-rule-preset-recommend": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/secretlint-rule-preset-recommend/-/secretlint-rule-preset-recommend-10.2.2.tgz", - "integrity": "sha512-K3jPqjva8bQndDKJqctnGfwuAxU2n9XNCPtbXVI5JvC7FnQiNg/yWlQPbMUlBXtBoBGFYp08A94m6fvtc9v+zA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/source-creator": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/source-creator/-/source-creator-10.2.2.tgz", - "integrity": "sha512-h6I87xJfwfUTgQ7irWq7UTdq/Bm1RuQ/fYhA3dtTIAop5BwSFmZyrchph4WcoEvbN460BWKmk4RYSvPElIIvxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/types": "^10.2.2", - "istextorbinary": "^9.5.0" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/types": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/types/-/types-10.2.2.tgz", - "integrity": "sha512-Nqc90v4lWCXyakD6xNyNACBJNJ0tNCwj2WNk/7ivyacYHxiITVgmLUFXTBOeCdy79iz6HtN9Y31uw/jbLrdOAg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@selderee/plugin-htmlparser2": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz", - "integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==", - "license": "MIT", - "dependencies": { - "domhandler": "^5.0.3", - "selderee": "^0.11.0" - }, - "funding": { - "url": "https://ko-fi.com/killymxi" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.34.37", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.37.tgz", - "integrity": "sha512-2TRuQVgQYfy+EzHRTIvkhv2ADEouJ2xNS/Vq+W5EuuewBdOrvATvljZTxHWZSTYr2sTjTHpGvucaGAt67S2akw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@storybook/addon-a11y": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-10.2.0.tgz", - "integrity": "sha512-PJVvEr6KpuOvCr1megfp39RNvFSut6XmFxaiDKtf8kxYbD8tMYL2n/9xFcPIvozJCO4zRmug50X+OIoh0GsSGQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@storybook/global": "^5.0.0", - "axe-core": "^4.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^10.2.0" - } - }, - "node_modules/@storybook/addon-docs": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-10.2.0.tgz", - "integrity": "sha512-2iVQmbgguRWQAxJ7HFje7PQFHZIDCYjFNt9zKLaF8NmCS3OI1qVON5Tb/KH30f9epa5Y42OarPEewJE9J+Tw9A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@mdx-js/react": "^3.0.0", - "@storybook/csf-plugin": "10.2.0", - "@storybook/icons": "^2.0.1", - "@storybook/react-dom-shim": "10.2.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "ts-dedent": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^10.2.0" - } - }, - "node_modules/@storybook/addon-onboarding": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@storybook/addon-onboarding/-/addon-onboarding-10.2.0.tgz", - "integrity": "sha512-6JEgceYEEER9vVjmjiT1AKROMiwzZkSo+MN76wZMKayLX9fA8RIjrRGF3C5CNOVadbcbbvgPmwcLZMgD+0VZlg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^10.2.0" - } - }, - "node_modules/@storybook/addon-vitest": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@storybook/addon-vitest/-/addon-vitest-10.2.0.tgz", - "integrity": "sha512-MNGRhwC5pIEWfNbMxD6pQTqYWq8YwBdRsXkFX00rk3y88YV3w9zg/pHHk6v/+fGnrM9L/upwkIOvlaNMWn8uHg==", + "node_modules/@storybook/addon-vitest": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@storybook/addon-vitest/-/addon-vitest-10.2.0.tgz", + "integrity": "sha512-MNGRhwC5pIEWfNbMxD6pQTqYWq8YwBdRsXkFX00rk3y88YV3w9zg/pHHk6v/+fGnrM9L/upwkIOvlaNMWn8uHg==", "dev": true, "license": "MIT", "dependencies": { @@ -4053,126 +3635,6 @@ "@testing-library/dom": ">=7.21.4" } }, - "node_modules/@textlint/ast-node-types": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-15.2.2.tgz", - "integrity": "sha512-9ByYNzWV8tpz6BFaRzeRzIov8dkbSZu9q7IWqEIfmRuLWb2qbI/5gTvKcoWT1HYs4XM7IZ8TKSXcuPvMb6eorA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@textlint/linter-formatter": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@textlint/linter-formatter/-/linter-formatter-15.2.2.tgz", - "integrity": "sha512-oMVaMJ3exFvXhCj3AqmCbLaeYrTNLqaJnLJMIlmnRM3/kZdxvku4OYdaDzgtlI194cVxamOY5AbHBBVnY79kEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@azu/format-text": "^1.0.2", - "@azu/style-format": "^1.0.1", - "@textlint/module-interop": "15.2.2", - "@textlint/resolver": "15.2.2", - "@textlint/types": "15.2.2", - "chalk": "^4.1.2", - "debug": "^4.4.1", - "js-yaml": "^3.14.1", - "lodash": "^4.17.21", - "pluralize": "^2.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "table": "^6.9.0", - "text-table": "^0.2.0" - } - }, - "node_modules/@textlint/linter-formatter/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@textlint/linter-formatter/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/@textlint/linter-formatter/node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@textlint/linter-formatter/node_modules/pluralize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-2.0.0.tgz", - "integrity": "sha512-TqNZzQCD4S42De9IfnnBvILN7HAW7riLqsCyp8lgjXeysyPlX5HhqKAcJHHHb9XskE4/a+7VGC9zzx8Ls0jOAw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@textlint/linter-formatter/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@textlint/linter-formatter/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@textlint/module-interop": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@textlint/module-interop/-/module-interop-15.2.2.tgz", - "integrity": "sha512-2rmNcWrcqhuR84Iio1WRzlc4tEoOMHd6T7urjtKNNefpTt1owrTJ9WuOe60yD3FrTW0J/R0ux5wxUbP/eaeFOA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@textlint/resolver": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@textlint/resolver/-/resolver-15.2.2.tgz", - "integrity": "sha512-4hGWjmHt0y+5NAkoYZ8FvEkj8Mez9TqfbTm3BPjoV32cIfEixl2poTOgapn1rfm73905GSO3P1jiWjmgvii13Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@textlint/types": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@textlint/types/-/types-15.2.2.tgz", - "integrity": "sha512-X2BHGAR3yXJsCAjwYEDBIk9qUDWcH4pW61ISfmtejau+tVqKtnbbvEZnMTb6mWgKU1BvTmftd5DmB1XVDUtY3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@textlint/ast-node-types": "15.2.2" - } - }, "node_modules/@types/archiver": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-6.0.3.tgz", @@ -4241,17 +3703,6 @@ "@babel/types": "^7.28.2" } }, - "node_modules/@types/body-parser": { - "version": "1.19.6", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", - "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, "node_modules/@types/chai": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", @@ -4275,16 +3726,6 @@ "integrity": "sha512-OS//b51j9uyR3zvwD04Kfs5kHpve2qalQ18JhY/ho3voGYUTPLEG90/ocfKPI48hyHH8T04f7KEEbK6Ue60oZQ==", "license": "MIT" }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", @@ -4292,16 +3733,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/cors": { - "version": "2.8.19", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz", - "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/deep-eql": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", @@ -4340,31 +3771,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/express": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.3.tgz", - "integrity": "sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^5.0.0", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.7.tgz", - "integrity": "sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, "node_modules/@types/fast-levenshtein": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/@types/fast-levenshtein/-/fast-levenshtein-0.0.4.tgz", @@ -4396,13 +3802,6 @@ "integrity": "sha512-pUY3cKH/Nm2yYrEmDlPR1mR7yszjGx4DrwPjQ702C4/D5CwHuZTgZdIdwPkRbcuhs7BAh2L5rg3CL5cbRiGTCQ==", "license": "MIT" }, - "node_modules/@types/http-errors": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", - "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -4456,13 +3855,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/mime": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", - "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/mime-types": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-3.0.1.tgz", @@ -4537,25 +3929,11 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/range-parser": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", - "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/react": { "version": "19.2.10", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.10.tgz", "integrity": "sha512-WPigyYuGhgZ/cTPRXB2EwUw+XvsRA3GqHlsP4qteqrnnjDrApbS7MxcGr/hke5iUoeB7E/gQtrs9I37zAJ0Vjw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -4588,13 +3966,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/sarif": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@types/sarif/-/sarif-2.1.7.tgz", - "integrity": "sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/semver": { "version": "7.7.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", @@ -4602,29 +3973,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/send": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", - "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.8", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", - "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/node": "*", - "@types/send": "*" - } - }, "node_modules/@types/shell-quote": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/@types/shell-quote/-/shell-quote-1.7.5.tgz", @@ -4990,32 +4338,10 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typespec/ts-http-runtime": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.0.tgz", - "integrity": "sha512-sOx1PKSuFwnIl7z4RN0Ls7N9AQawmR9r66eI5rFCzLDIs8HTIYrIpH9QjYWoX0lkgGrkLxXhi4QnK7MizPRrIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true, - "license": "ISC" - }, - "node_modules/@vitejs/plugin-react": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", - "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", "dev": true, "license": "MIT", "dependencies": { @@ -5241,327 +4567,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@vscode/vsce": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-3.6.0.tgz", - "integrity": "sha512-u2ZoMfymRNJb14aHNawnXJtXHLXDVKc1oKZaH4VELKT/9iWKRVgtQOdwxCgtwSxJoqYvuK4hGlBWQJ05wxADhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@azure/identity": "^4.1.0", - "@secretlint/node": "^10.1.1", - "@secretlint/secretlint-formatter-sarif": "^10.1.1", - "@secretlint/secretlint-rule-no-dotenv": "^10.1.1", - "@secretlint/secretlint-rule-preset-recommend": "^10.1.1", - "@vscode/vsce-sign": "^2.0.0", - "azure-devops-node-api": "^12.5.0", - "chalk": "^4.1.2", - "cheerio": "^1.0.0-rc.9", - "cockatiel": "^3.1.2", - "commander": "^12.1.0", - "form-data": "^4.0.0", - "glob": "^11.0.0", - "hosted-git-info": "^4.0.2", - "jsonc-parser": "^3.2.0", - "leven": "^3.1.0", - "markdown-it": "^14.1.0", - "mime": "^1.3.4", - "minimatch": "^3.0.3", - "parse-semver": "^1.1.1", - "read": "^1.0.7", - "secretlint": "^10.1.1", - "semver": "^7.5.2", - "tmp": "^0.2.3", - "typed-rest-client": "^1.8.4", - "url-join": "^4.0.1", - "xml2js": "^0.5.0", - "yauzl": "^2.3.1", - "yazl": "^2.2.2" - }, - "bin": { - "vsce": "vsce" - }, - "engines": { - "node": ">= 20" - }, - "optionalDependencies": { - "keytar": "^7.7.0" - } - }, - "node_modules/@vscode/vsce-sign": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign/-/vsce-sign-2.0.6.tgz", - "integrity": "sha512-j9Ashk+uOWCDHYDxgGsqzKq5FXW9b9MW7QqOIYZ8IYpneJclWTBeHZz2DJCSKQgo+JAqNcaRRE1hzIx0dswqAw==", - "dev": true, - "hasInstallScript": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optionalDependencies": { - "@vscode/vsce-sign-alpine-arm64": "2.0.5", - "@vscode/vsce-sign-alpine-x64": "2.0.5", - "@vscode/vsce-sign-darwin-arm64": "2.0.5", - "@vscode/vsce-sign-darwin-x64": "2.0.5", - "@vscode/vsce-sign-linux-arm": "2.0.5", - "@vscode/vsce-sign-linux-arm64": "2.0.5", - "@vscode/vsce-sign-linux-x64": "2.0.5", - "@vscode/vsce-sign-win32-arm64": "2.0.5", - "@vscode/vsce-sign-win32-x64": "2.0.5" - } - }, - "node_modules/@vscode/vsce-sign-alpine-arm64": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-arm64/-/vsce-sign-alpine-arm64-2.0.5.tgz", - "integrity": "sha512-XVmnF40APwRPXSLYA28Ye+qWxB25KhSVpF2eZVtVOs6g7fkpOxsVnpRU1Bz2xG4ySI79IRuapDJoAQFkoOgfdQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optional": true, - "os": [ - "alpine" - ] - }, - "node_modules/@vscode/vsce-sign-alpine-x64": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-x64/-/vsce-sign-alpine-x64-2.0.5.tgz", - "integrity": "sha512-JuxY3xcquRsOezKq6PEHwCgd1rh1GnhyH6urVEWUzWn1c1PC4EOoyffMD+zLZtFuZF5qR1I0+cqDRNKyPvpK7Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optional": true, - "os": [ - "alpine" - ] - }, - "node_modules/@vscode/vsce-sign-darwin-arm64": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-arm64/-/vsce-sign-darwin-arm64-2.0.5.tgz", - "integrity": "sha512-z2Q62bk0ptADFz8a0vtPvnm6vxpyP3hIEYMU+i1AWz263Pj8Mc38cm/4sjzxu+LIsAfhe9HzvYNS49lV+KsatQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@vscode/vsce-sign-darwin-x64": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-x64/-/vsce-sign-darwin-x64-2.0.5.tgz", - "integrity": "sha512-ma9JDC7FJ16SuPXlLKkvOD2qLsmW/cKfqK4zzM2iJE1PbckF3BlR08lYqHV89gmuoTpYB55+z8Y5Fz4wEJBVDA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@vscode/vsce-sign-linux-arm": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm/-/vsce-sign-linux-arm-2.0.5.tgz", - "integrity": "sha512-cdCwtLGmvC1QVrkIsyzv01+o9eR+wodMJUZ9Ak3owhcGxPRB53/WvrDHAFYA6i8Oy232nuen1YqWeEohqBuSzA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@vscode/vsce-sign-linux-arm64": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm64/-/vsce-sign-linux-arm64-2.0.5.tgz", - "integrity": "sha512-Hr1o0veBymg9SmkCqYnfaiUnes5YK6k/lKFA5MhNmiEN5fNqxyPUCdRZMFs3Ajtx2OFW4q3KuYVRwGA7jdLo7Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@vscode/vsce-sign-linux-x64": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-x64/-/vsce-sign-linux-x64-2.0.5.tgz", - "integrity": "sha512-XLT0gfGMcxk6CMRLDkgqEPTyG8Oa0OFe1tPv2RVbphSOjFWJwZgK3TYWx39i/7gqpDHlax0AP6cgMygNJrA6zg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@vscode/vsce-sign-win32-arm64": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-arm64/-/vsce-sign-win32-arm64-2.0.5.tgz", - "integrity": "sha512-hco8eaoTcvtmuPhavyCZhrk5QIcLiyAUhEso87ApAWDllG7djIrWiOCtqn48k4pHz+L8oCQlE0nwNHfcYcxOPw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@vscode/vsce-sign-win32-x64": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-x64/-/vsce-sign-win32-x64-2.0.5.tgz", - "integrity": "sha512-1ixKFGM2FwM+6kQS2ojfY3aAelICxjiCzeg4nTHpkeU1Tfs4RC+lVLrgq5NwcBC7ZLr6UfY3Ct3D6suPeOf7BQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "SEE LICENSE IN LICENSE.txt", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@vscode/vsce/node_modules/glob": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", - "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "foreground-child": "^3.3.1", - "jackspeak": "^4.1.1", - "minimatch": "^10.1.1", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/vsce/node_modules/glob/node_modules/minimatch": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", - "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/vsce/node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@vscode/vsce/node_modules/jackspeak": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", - "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/vsce/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@vscode/vsce/node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@vscode/vsce/node_modules/path-scurry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", - "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/vsce/node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", - "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", - "dev": true, - "license": "ISC", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@vscode/vsce/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" - }, "node_modules/@vue/compiler-core": { "version": "3.5.27", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.27.tgz", @@ -5653,31 +4658,6 @@ "node": ">=6.5" } }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/accepts/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -5709,19 +4689,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/agent-base": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", @@ -6122,16 +5089,6 @@ "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", "license": "MIT" }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/array.prototype.findlast": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", @@ -6287,16 +5244,6 @@ "js-tokens": "^9.0.1" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", @@ -6414,17 +5361,6 @@ "node": ">=4" } }, - "node_modules/azure-devops-node-api": { - "version": "12.5.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz", - "integrity": "sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==", - "dev": true, - "license": "MIT", - "dependencies": { - "tunnel": "0.0.6", - "typed-rest-client": "^1.8.4" - } - }, "node_modules/b4a": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", @@ -6505,115 +5441,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/binaryextensions": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-6.11.0.tgz", - "integrity": "sha512-sXnYK/Ij80TO3lcqZVV2YgfKN5QjUWIRk/XSm2J/4bd/lPko3lvk0O4ZppH6m+6hB2/GTu+ptNwVFe1xh+QLQw==", - "dev": true, - "license": "Artistic-2.0", - "dependencies": { - "editions": "^6.21.0" - }, - "engines": { - "node": ">=4" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/body-parser/node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true, - "license": "ISC" - }, - "node_modules/boundary": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", - "integrity": "sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==", - "dev": true, - "license": "BSD-2-Clause" - }, "node_modules/boxen": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.1.1.tgz", @@ -6706,32 +5533,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "optional": true, - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", @@ -6943,83 +5744,6 @@ "node": ">= 16" } }, - "node_modules/cheerio": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.1.2.tgz", - "integrity": "sha512-IkxPpb5rS/d1IiLbHMgfPuS0FgiWTtFIm/Nj+2woXDLTZ7fOT2eqzgYbdMlLweqlHbsZjxEChoVK+7iph7jyQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "encoding-sniffer": "^0.2.1", - "htmlparser2": "^10.0.0", - "parse5": "^7.3.0", - "parse5-htmlparser2-tree-adapter": "^7.1.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^7.12.0", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=20.18.1" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cheerio/node_modules/entities": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", - "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/htmlparser2": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.0.0.tgz", - "integrity": "sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.1", - "entities": "^6.0.0" - } - }, "node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -7265,16 +5989,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/cockatiel": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/cockatiel/-/cockatiel-3.2.1.tgz", - "integrity": "sha512-gfrHV6ZPkquExvMh9IOkKsBzNDk6sDuZ6DdBGUBkvFnTCqCxzpuq48RySgP0AnaqQkw2zynOFj9yly6T1Q2G5Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - } - }, "node_modules/code-excerpt": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz", @@ -7330,16 +6044,6 @@ "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", "license": "MIT" }, - "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/comment-json": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.5.tgz", @@ -7504,12 +6208,6 @@ "node": ">= 0.6" } }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "license": "MIT" - }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -7631,36 +6329,6 @@ "node": ">= 8" } }, - "node_modules/css-select": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", - "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-what": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", - "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, "node_modules/css.escape": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", @@ -7699,7 +6367,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/data-uri-to-buffer": { @@ -7810,37 +6478,6 @@ "dev": true, "license": "MIT" }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/deep-eql": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", @@ -7979,27 +6616,6 @@ "node": ">=6" } }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-libc": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", - "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "engines": { - "node": ">=8" - } - }, "node_modules/devlop": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", @@ -8029,39 +6645,6 @@ "node": ">=0.3.1" } }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dir-glob/node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", @@ -8182,23 +6765,6 @@ "url": "https://dotenvx.com" } }, - "node_modules/dts-bundle-generator": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/dts-bundle-generator/-/dts-bundle-generator-9.5.1.tgz", - "integrity": "sha512-DxpJOb2FNnEyOzMkG11sxO2dmxPjthoVWxfKqWYJ/bI/rT1rvTMktF5EKjAYrRZu6Z6t3NhOUZ0sZ5ZXevOfbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "typescript": ">=5.0.2", - "yargs": "^17.6.0" - }, - "bin": { - "dts-bundle-generator": "dist/bin/dts-bundle-generator.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -8228,23 +6794,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/editions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/editions/-/editions-6.22.0.tgz", - "integrity": "sha512-UgGlf8IW75je7HZjNDpJdCv4cGJWIi6yumFdZ0R7A8/CIhQiWUjyGLCxdHpd8bmyD1gnkfUNK0oeOXqUS2cpfQ==", - "dev": true, - "license": "Artistic-2.0", - "dependencies": { - "version-range": "^4.15.0" - }, - "engines": { - "ecmascript": ">= es5", - "node": ">=4" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -8283,20 +6832,6 @@ "node": ">= 0.8" } }, - "node_modules/encoding-sniffer": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", - "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.3", - "whatwg-encoding": "^3.1.1" - }, - "funding": { - "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" - } - }, "node_modules/end-of-stream": { "version": "1.4.5", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", @@ -9241,83 +7776,6 @@ "node": ">=20.0.0" } }, - "node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true, - "license": "(MIT OR WTFPL)", - "optional": true, - "engines": { - "node": ">=6" - } - }, "node_modules/expect-type": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", @@ -9720,23 +8178,6 @@ "url": "https://github.com/sponsors/rawify" } }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true, - "license": "MIT", - "optional": true - }, "node_modules/fs-extra": { "version": "11.3.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.1.tgz", @@ -9762,13 +8203,6 @@ "node": ">= 10.0.0" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -9861,16 +8295,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -9908,19 +8332,6 @@ "node": ">= 0.4" } }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-symbol-description": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", @@ -9952,14 +8363,6 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true, - "license": "MIT", - "optional": true - }, "node_modules/glob": { "version": "10.5.0", "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", @@ -10079,76 +8482,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/globby": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", - "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sindresorhus/merge-streams": "^2.1.0", - "fast-glob": "^3.3.3", - "ignore": "^7.0.3", - "path-type": "^6.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby/node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/globby/node_modules/path-type": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", - "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby/node_modules/unicorn-magic": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", - "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -10389,31 +8722,6 @@ "entities": "^4.4.0" } }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-errors/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/http-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", @@ -10441,16 +8749,6 @@ "node": ">= 14" } }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=16.17.0" - } - }, "node_modules/humanize-ms": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", @@ -10490,6 +8788,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -10602,18 +8901,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -11572,24 +9859,6 @@ "node": ">=8" } }, - "node_modules/istextorbinary": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-9.5.0.tgz", - "integrity": "sha512-5mbUj3SiZXCuRf9fT3ibzbSSEWiy63gFfksmGfdOzujPjW3k+z8WvIBxcJHBoQNlaZaiyB25deviif2+osLmLw==", - "dev": true, - "license": "Artistic-2.0", - "dependencies": { - "binaryextensions": "^6.11.0", - "editions": "^6.21.0", - "textextensions": "^6.11.0" - }, - "engines": { - "node": ">=4" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, "node_modules/iterator.prototype": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", @@ -11757,16 +10026,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-parse-even-better-errors": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-4.0.0.tgz", - "integrity": "sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -11799,13 +10058,6 @@ "json5": "lib/cli.js" } }, - "node_modules/jsonc-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", - "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", - "dev": true, - "license": "MIT" - }, "node_modules/jsonfile": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", @@ -11838,52 +10090,6 @@ "jsonrepair": "bin/cli.js" } }, - "node_modules/jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=12", - "npm": ">=6" - } - }, - "node_modules/jsonwebtoken/node_modules/jwa": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", - "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-equal-constant-time": "^1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jsonwebtoken/node_modules/jws": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.3.tgz", - "integrity": "sha512-byiJ0FLRdLdSVSReO/U4E7RoEyOCKnEnEPMjq3HxWtvzLsV08/i5RQKsFVNkCldrCaPr2vDNAOMsfs8T/Hze7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "jwa": "^1.4.2", - "safe-buffer": "^5.0.1" - } - }, "node_modules/jsx-ast-utils": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", @@ -11921,19 +10127,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/keytar": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", - "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "node-addon-api": "^4.3.0", - "prebuild-install": "^7.0.1" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -12049,16 +10242,6 @@ "url": "https://ko-fi.com/killymxi" } }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -12248,23 +10431,6 @@ "node": ">=4" } }, - "node_modules/local-pkg": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz", - "integrity": "sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mlly": "^1.7.3", - "pkg-types": "^1.2.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -12294,73 +10460,17 @@ "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "license": "MIT" }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true, "license": "MIT" }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true, - "license": "MIT" - }, - "node_modules/log-update": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", - "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", "dev": true, "license": "MIT", "dependencies": { @@ -12569,15 +10679,6 @@ "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "license": "MIT" }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/memfs": { "version": "4.42.0", "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.42.0.tgz", @@ -12609,22 +10710,6 @@ "node": ">= 0.10.0" } }, - "node_modules/merge-descriptors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", - "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -12658,18 +10743,6 @@ "node": ">= 0.6" } }, - "node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -12745,14 +10818,6 @@ "node": ">= 18" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true, - "license": "MIT", - "optional": true - }, "node_modules/mlly": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", @@ -12926,14 +10991,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/napi-build-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", - "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", - "dev": true, - "license": "MIT", - "optional": true - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -12941,15 +10998,6 @@ "dev": true, "license": "MIT" }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -12957,28 +11005,6 @@ "dev": true, "license": "MIT" }, - "node_modules/node-abi": { - "version": "3.75.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.75.0.tgz", - "integrity": "sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-addon-api": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", - "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", - "dev": true, - "license": "MIT", - "optional": true - }, "node_modules/node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", @@ -13048,20 +11074,6 @@ "dev": true, "license": "MIT" }, - "node_modules/node-sarif-builder": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/node-sarif-builder/-/node-sarif-builder-3.2.0.tgz", - "integrity": "sha512-kVIOdynrF2CRodHZeP/97Rh1syTUHBNiw17hUCIVhlhEsWlfJm19MuO56s4MdKbr22xWx6mzMnNAgXzVlIYM9Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/sarif": "^2.1.7", - "fs-extra": "^11.1.1" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/normalize-package-data": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", @@ -13096,16 +11108,6 @@ "node": ">=0.10.0" } }, - "node_modules/npm-normalize-package-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", - "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/npm-run-all": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", @@ -13295,130 +11297,6 @@ "which": "bin/which" } }, - "node_modules/npm-run-all2": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/npm-run-all2/-/npm-run-all2-8.0.4.tgz", - "integrity": "sha512-wdbB5My48XKp2ZfJUlhnLVihzeuA1hgBnqB2J9ahV77wLS+/YAJAlN8I+X3DIFIPZ3m5L7nplmlbhNiFDmXRDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "cross-spawn": "^7.0.6", - "memorystream": "^0.3.1", - "picomatch": "^4.0.2", - "pidtree": "^0.6.0", - "read-package-json-fast": "^4.0.0", - "shell-quote": "^1.7.3", - "which": "^5.0.0" - }, - "bin": { - "npm-run-all": "bin/npm-run-all/index.js", - "npm-run-all2": "bin/npm-run-all/index.js", - "run-p": "bin/run-p/index.js", - "run-s": "bin/run-s/index.js" - }, - "engines": { - "node": "^20.5.0 || >=22.0.0", - "npm": ">= 10" - } - }, - "node_modules/npm-run-all2/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/npm-run-all2/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/npm-run-all2/node_modules/pidtree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", - "dev": true, - "license": "MIT", - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/npm-run-all2/node_modules/which": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", - "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, "node_modules/nwsapi": { "version": "2.2.20", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.20.tgz", @@ -13713,19 +11591,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz", - "integrity": "sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/package-json": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/package-json/-/package-json-10.0.1.tgz", @@ -13792,26 +11657,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse-semver": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", - "integrity": "sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^5.1.0" - } - }, - "node_modules/parse-semver/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/parse5": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", @@ -13825,33 +11670,6 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", - "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "domhandler": "^5.0.3", - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-parser-stream": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", - "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", - "dev": true, - "license": "MIT", - "dependencies": { - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, "node_modules/parse5/node_modules/entities": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", @@ -13913,16 +11731,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -14119,16 +11927,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/possible-typed-array-names": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", @@ -14302,38 +12100,10 @@ "dev": true, "license": "MIT" }, - "node_modules/prebuild-install": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", - "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^2.0.0", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "license": "MIT", "engines": { @@ -14532,21 +12302,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/quansync": { "version": "0.2.11", "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", @@ -14592,10 +12347,6 @@ ], "license": "MIT" }, - "node_modules/qwen-code-vscode-ide-companion": { - "resolved": "packages/vscode-ide-companion", - "link": true - }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -14605,21 +12356,6 @@ "node": ">= 0.6" } }, - "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.6.3", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -14635,32 +12371,6 @@ "rc": "cli.js" } }, - "node_modules/rc-config-loader": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.3.tgz", - "integrity": "sha512-kD7FqML7l800i6pS6pvLyIE2ncbk9Du8Q0gp/4hMPhJU6ZxApkoLcGD8ZeqgiAlfwZ6BlETq6qqe+12DUL207w==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.4", - "js-yaml": "^4.1.0", - "json5": "^2.2.2", - "require-from-string": "^2.0.2" - } - }, - "node_modules/rc-config-loader/node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/rc/node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", @@ -14689,7 +12399,7 @@ "version": "4.28.5", "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-4.28.5.tgz", "integrity": "sha512-cq/o30z9W2Wb4rzBefjv5fBalHU0rJGZCHAkf/RHSBWSSYwh8PlQTqqOJmgIIbBtpj27T6FIPXeomIjZtCNVqA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "shell-quote": "^1.6.1", @@ -14700,7 +12410,7 @@ "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=8.3.0" @@ -14812,19 +12522,6 @@ "node": ">=0.10.0" } }, - "node_modules/read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "mute-stream": "~0.0.4" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -14845,20 +12542,6 @@ "node": ">=0.10.0" } }, - "node_modules/read-package-json-fast": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-4.0.0.tgz", - "integrity": "sha512-qpt8EwugBWDw2cgE2W+/3oxC+KTez2uSVR8JU9Q36TXPAGCaozfQUs59v4j4GFpWTaw0i6hAZSvOmu1J0uOEUg==", - "dev": true, - "license": "ISC", - "dependencies": { - "json-parse-even-better-errors": "^4.0.0", - "npm-normalize-package-bin": "^4.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/read-package-up": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/read-package-up/-/read-package-up-11.0.0.tgz", @@ -14919,29 +12602,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read/node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true, - "license": "ISC" - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/readdir-glob": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", @@ -15251,45 +12911,6 @@ "dev": true, "license": "MIT" }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rollup": { "version": "4.44.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.44.0.tgz", @@ -15479,13 +13100,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, - "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", - "dev": true, - "license": "ISC" - }, "node_modules/saxes": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", @@ -15505,28 +13119,6 @@ "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", "license": "MIT" }, - "node_modules/secretlint": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/secretlint/-/secretlint-10.2.2.tgz", - "integrity": "sha512-xVpkeHV/aoWe4vP4TansF622nBEImzCY73y/0042DuJ29iKIaqgoJ8fGxre3rVSHHbxar4FdJobmTnLp9AU0eg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/config-creator": "^10.2.2", - "@secretlint/formatter": "^10.2.2", - "@secretlint/node": "^10.2.2", - "@secretlint/profiler": "^10.2.2", - "debug": "^4.4.1", - "globby": "^14.1.0", - "read-pkg": "^9.0.1" - }, - "bin": { - "secretlint": "bin/secretlint.js" - }, - "engines": { - "node": ">=20.0.0" - } - }, "node_modules/selderee": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/selderee/-/selderee-0.11.0.tgz", @@ -15551,90 +13143,6 @@ "node": ">=10" } }, - "node_modules/send": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", - "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/send/node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/send/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/serve-static": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", - "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", - "license": "MIT", - "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.19.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -15814,55 +13322,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "optional": true - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "optional": true, - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, "node_modules/simple-git": { "version": "3.28.0", "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.28.0.tgz", @@ -15899,19 +13358,6 @@ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "license": "MIT" }, - "node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/slice-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", @@ -16352,19 +13798,6 @@ "node": ">=4" } }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/strip-indent": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.1.1.tgz", @@ -16403,16 +13836,6 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/structured-source": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/structured-source/-/structured-source-4.0.0.tgz", - "integrity": "sha512-qGzRFNJDjFieQkl/sVOI2dUjHKRyL9dAJi2gCPGJLbJHBIkyOHxjuocpIEfbLioX+qSJpvbYdT49/YCdMznKxA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boundary": "^2.0.0" - } - }, "node_modules/stubborn-fs": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-1.2.5.tgz", @@ -16474,36 +13897,6 @@ "node": ">=4" } }, - "node_modules/supports-hyperlinks": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.2.0.tgz", - "integrity": "sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=14.18" - }, - "funding": { - "url": "https://github.com/chalk/supports-hyperlinks?sponsor=1" - } - }, - "node_modules/supports-hyperlinks/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -16523,100 +13916,6 @@ "dev": true, "license": "MIT" }, - "node_modules/table": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", - "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT" - }, - "node_modules/table/node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/table/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/tailwindcss": { "version": "3.4.18", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.18.tgz", @@ -16722,63 +14021,6 @@ "node": ">=18" } }, - "node_modules/tar-fs": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", - "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true, - "license": "ISC", - "optional": true - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/terminal-link": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-4.0.0.tgz", - "integrity": "sha512-lk+vH+MccxNqgVqSnkMVKx4VLJfnLjDBGzH16JVZjKE2DoxP57s6/vt6JmXV5I3jBcfGrxNrYtC+mPtU7WJztA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^7.0.0", - "supports-hyperlinks": "^3.2.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/test-exclude": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", @@ -16830,29 +14072,6 @@ "b4a": "^1.6.4" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/textextensions": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-6.11.0.tgz", - "integrity": "sha512-tXJwSr9355kFJI3lbCkPpUH5cP8/M0GGy2xLO34aZCjMXBaK3SoPnZwr/oWmo1FdCnELcs4npdCIOFtq9W3ruQ==", - "dev": true, - "license": "Artistic-2.0", - "dependencies": { - "editions": "^6.21.0" - }, - "engines": { - "node": ">=4" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -17028,16 +14247,6 @@ "dev": true, "license": "MIT" }, - "node_modules/tmp": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", - "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.14" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -17182,30 +14391,6 @@ "fsevents": "~2.3.3" } }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -17219,16 +14404,6 @@ "node": ">= 0.8.0" } }, - "node_modules/type-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/type-fest": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", @@ -17241,31 +14416,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/type-is/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", @@ -17344,18 +14494,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typed-rest-client": { - "version": "1.8.11", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", - "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", - "dev": true, - "license": "MIT", - "dependencies": { - "qs": "^6.9.1", - "tunnel": "0.0.6", - "underscore": "^1.12.1" - } - }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", @@ -17425,23 +14563,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/underscore": { - "version": "1.13.7", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", - "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", - "dev": true, - "license": "MIT" - }, - "node_modules/undici": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.15.0.tgz", - "integrity": "sha512-7oZJCPvvMvTd0OlqWsIxTuItTpJBpU1tcbVl24FMn3xt3+VSunwUasmfPJRE57oNO1KsZ4PgA1xTdAX4hq8NyQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", @@ -17669,13 +14790,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", - "dev": true, - "license": "MIT" - }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -17736,19 +14850,6 @@ "node": ">= 0.8" } }, - "node_modules/version-range": { - "version": "4.15.0", - "resolved": "https://registry.npmjs.org/version-range/-/version-range-4.15.0.tgz", - "integrity": "sha512-Ck0EJbAGxHwprkzFO966t4/5QkRuzh+/I1RxhLgUKKwEn+Cd8NwM60mE3AqBZg5gYODoXW0EFsQvbZjRlvdqbg==", - "dev": true, - "license": "Artistic-2.0", - "engines": { - "node": ">=4" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, "node_modules/vite": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/vite/-/vite-7.0.0.tgz", @@ -18362,30 +15463,6 @@ "node": ">=18" } }, - "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0" - } - }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", @@ -18493,16 +15570,6 @@ "fd-slicer": "~1.1.0" } }, - "node_modules/yazl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-crc32": "~0.2.3" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -18602,15 +15669,15 @@ } }, "packages/cli": { - "name": "@qwen-code/qwen-code", + "name": "@bwen-code/bwen-code", "version": "0.12.3", "dependencies": { "@agentclientprotocol/sdk": "^0.14.1", + "@bwen-code/bwen-code-core": "file:../core", + "@bwen-code/web-templates": "file:../web-templates", "@google/genai": "1.30.0", "@iarna/toml": "^2.2.5", "@modelcontextprotocol/sdk": "^1.25.1", - "@qwen-code/qwen-code-core": "file:../core", - "@qwen-code/web-templates": "file:../web-templates", "@types/update-notifier": "^6.0.8", "ansi-regex": "^6.2.2", "command-exists": "^1.2.9", @@ -18642,12 +15709,11 @@ "zod": "^3.23.8" }, "bin": { - "qwen": "dist/index.js" + "bwen": "dist/index.js" }, "devDependencies": { "@babel/runtime": "^7.27.6", - "@google/gemini-cli-test-utils": "file:../test-utils", - "@qwen-code/qwen-code-test-utils": "file:../test-utils", + "@bwen-code/bwen-code-test-utils": "file:../test-utils", "@testing-library/react": "^16.3.0", "@types/archiver": "^6.0.3", "@types/command-exists": "^1.2.3", @@ -19259,7 +16325,7 @@ } }, "packages/core": { - "name": "@qwen-code/qwen-code-core", + "name": "@bwen-code/bwen-code-core", "version": "0.12.3", "hasInstallScript": true, "dependencies": { @@ -19313,7 +16379,7 @@ "ws": "^8.18.0" }, "devDependencies": { - "@qwen-code/qwen-code-test-utils": "file:../test-utils", + "@bwen-code/bwen-code-test-utils": "file:../test-utils", "@types/diff": "^7.0.2", "@types/dotenv": "^6.1.1", "@types/fast-levenshtein": "^0.0.4", @@ -19888,8 +16954,9 @@ } }, "packages/sdk-typescript": { - "name": "@qwen-code/sdk", + "name": "@bwen-code/sdk", "version": "0.1.4", + "extraneous": true, "license": "Apache-2.0", "dependencies": { "@modelcontextprotocol/sdk": "^1.25.1", @@ -19913,2797 +16980,21 @@ "typescript": ">=5.0.0" } }, - "packages/sdk-typescript/node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" - }, - "packages/sdk-typescript/node_modules/@esbuild/aix-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", - "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/android-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", - "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], + "packages/test-utils": { + "name": "@bwen-code/bwen-code-test-utils", + "version": "0.12.3", + "license": "Apache-2.0", + "devDependencies": { + "typescript": "^5.3.3" + }, "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/android-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", - "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/android-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", - "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/darwin-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", - "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/darwin-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", - "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", - "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/freebsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", - "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/linux-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", - "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/linux-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", - "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/linux-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", - "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/linux-loong64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", - "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/linux-mips64el": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", - "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/linux-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", - "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/linux-riscv64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", - "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/linux-s390x": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", - "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/linux-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", - "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", - "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/netbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", - "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", - "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/openbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", - "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", - "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/sunos-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", - "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/win32-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", - "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/win32-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", - "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@esbuild/win32-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", - "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "packages/sdk-typescript/node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/sdk-typescript/node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/sdk-typescript/node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "packages/sdk-typescript/node_modules/@modelcontextprotocol/sdk": { - "version": "1.25.1", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.25.1.tgz", - "integrity": "sha512-yO28oVFFC7EBoiKdAn+VqRm+plcfv4v0xp6osG/VsCB0NlPZWi87ajbCZZ8f/RvOFLEu7//rSRmuZZ7lMoe3gQ==", - "license": "MIT", - "dependencies": { - "@hono/node-server": "^1.19.7", - "ajv": "^8.17.1", - "ajv-formats": "^3.0.1", - "content-type": "^1.0.5", - "cors": "^2.8.5", - "cross-spawn": "^7.0.5", - "eventsource": "^3.0.2", - "eventsource-parser": "^3.0.0", - "express": "^5.0.1", - "express-rate-limit": "^7.5.0", - "jose": "^6.1.1", - "json-schema-typed": "^8.0.2", - "pkce-challenge": "^5.0.0", - "raw-body": "^3.0.0", - "zod": "^3.25 || ^4.0", - "zod-to-json-schema": "^3.25.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@cfworker/json-schema": "^4.1.1", - "zod": "^3.25 || ^4.0" - }, - "peerDependenciesMeta": { - "@cfworker/json-schema": { - "optional": true - }, - "zod": { - "optional": false - } - } - }, - "packages/sdk-typescript/node_modules/@modelcontextprotocol/sdk/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "packages/sdk-typescript/node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.0.tgz", - "integrity": "sha512-HvWtU2UG41LALjajJrML6uQejQhNJx+JBO9IflpSja4R03iNWfKXrj6W2h7ljuLyc1nKS+9yDyL/9tD1U/yBnQ==", - "license": "ISC", - "peerDependencies": { - "zod": "^3.25 || ^4" - } - }, - "packages/sdk-typescript/node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true, - "license": "MIT" - }, - "packages/sdk-typescript/node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", - "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/type-utils": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/sdk-typescript/node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/sdk-typescript/node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/sdk-typescript/node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/sdk-typescript/node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/sdk-typescript/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/sdk-typescript/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "packages/sdk-typescript/node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "packages/sdk-typescript/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/sdk-typescript/node_modules/@vitest/coverage-v8": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.6.1.tgz", - "integrity": "sha512-6YeRZwuO4oTGKxD3bijok756oktHSIm3eczVVzNe3scqzuhLwltIF3S9ZL/vwOVIpURmU6SnZhziXXAfw8/Qlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.1", - "@bcoe/v8-coverage": "^0.2.3", - "debug": "^4.3.4", - "istanbul-lib-coverage": "^3.2.2", - "istanbul-lib-report": "^3.0.1", - "istanbul-lib-source-maps": "^5.0.4", - "istanbul-reports": "^3.1.6", - "magic-string": "^0.30.5", - "magicast": "^0.3.3", - "picocolors": "^1.0.0", - "std-env": "^3.5.0", - "strip-literal": "^2.0.0", - "test-exclude": "^6.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "vitest": "1.6.1" - } - }, - "packages/sdk-typescript/node_modules/@vitest/expect": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.1.tgz", - "integrity": "sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "1.6.1", - "@vitest/utils": "1.6.1", - "chai": "^4.3.10" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/sdk-typescript/node_modules/@vitest/runner": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.1.tgz", - "integrity": "sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "1.6.1", - "p-limit": "^5.0.0", - "pathe": "^1.1.1" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/sdk-typescript/node_modules/@vitest/snapshot": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.1.tgz", - "integrity": "sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "magic-string": "^0.30.5", - "pathe": "^1.1.1", - "pretty-format": "^29.7.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/sdk-typescript/node_modules/@vitest/spy": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.1.tgz", - "integrity": "sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyspy": "^2.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/sdk-typescript/node_modules/@vitest/utils": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.1.tgz", - "integrity": "sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "diff-sequences": "^29.6.3", - "estree-walker": "^3.0.3", - "loupe": "^2.3.7", - "pretty-format": "^29.7.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/sdk-typescript/node_modules/accepts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", - "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", - "license": "MIT", - "dependencies": { - "mime-types": "^3.0.0", - "negotiator": "^1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "packages/sdk-typescript/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "packages/sdk-typescript/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "packages/sdk-typescript/node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "packages/sdk-typescript/node_modules/body-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz", - "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==", - "license": "MIT", - "dependencies": { - "bytes": "^3.1.2", - "content-type": "^1.0.5", - "debug": "^4.4.3", - "http-errors": "^2.0.0", - "iconv-lite": "^0.7.0", - "on-finished": "^2.4.1", - "qs": "^6.14.0", - "raw-body": "^3.0.1", - "type-is": "^2.0.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/sdk-typescript/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "packages/sdk-typescript/node_modules/chai": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "packages/sdk-typescript/node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.2" - }, - "engines": { - "node": "*" - } - }, - "packages/sdk-typescript/node_modules/content-disposition": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", - "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/sdk-typescript/node_modules/cookie-signature": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", - "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", - "license": "MIT", - "engines": { - "node": ">=6.6.0" - } - }, - "packages/sdk-typescript/node_modules/deep-eql": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "packages/sdk-typescript/node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "packages/sdk-typescript/node_modules/esbuild": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", - "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.12", - "@esbuild/android-arm": "0.25.12", - "@esbuild/android-arm64": "0.25.12", - "@esbuild/android-x64": "0.25.12", - "@esbuild/darwin-arm64": "0.25.12", - "@esbuild/darwin-x64": "0.25.12", - "@esbuild/freebsd-arm64": "0.25.12", - "@esbuild/freebsd-x64": "0.25.12", - "@esbuild/linux-arm": "0.25.12", - "@esbuild/linux-arm64": "0.25.12", - "@esbuild/linux-ia32": "0.25.12", - "@esbuild/linux-loong64": "0.25.12", - "@esbuild/linux-mips64el": "0.25.12", - "@esbuild/linux-ppc64": "0.25.12", - "@esbuild/linux-riscv64": "0.25.12", - "@esbuild/linux-s390x": "0.25.12", - "@esbuild/linux-x64": "0.25.12", - "@esbuild/netbsd-arm64": "0.25.12", - "@esbuild/netbsd-x64": "0.25.12", - "@esbuild/openbsd-arm64": "0.25.12", - "@esbuild/openbsd-x64": "0.25.12", - "@esbuild/openharmony-arm64": "0.25.12", - "@esbuild/sunos-x64": "0.25.12", - "@esbuild/win32-arm64": "0.25.12", - "@esbuild/win32-ia32": "0.25.12", - "@esbuild/win32-x64": "0.25.12" - } - }, - "packages/sdk-typescript/node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/sdk-typescript/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/sdk-typescript/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/sdk-typescript/node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/sdk-typescript/node_modules/express": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", - "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", - "license": "MIT", - "dependencies": { - "accepts": "^2.0.0", - "body-parser": "^2.2.1", - "content-disposition": "^1.0.0", - "content-type": "^1.0.5", - "cookie": "^0.7.1", - "cookie-signature": "^1.2.1", - "debug": "^4.4.0", - "depd": "^2.0.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "finalhandler": "^2.1.0", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "merge-descriptors": "^2.0.0", - "mime-types": "^3.0.0", - "on-finished": "^2.4.1", - "once": "^1.4.0", - "parseurl": "^1.3.3", - "proxy-addr": "^2.0.7", - "qs": "^6.14.0", - "range-parser": "^1.2.1", - "router": "^2.2.0", - "send": "^1.1.0", - "serve-static": "^2.2.0", - "statuses": "^2.0.1", - "type-is": "^2.0.1", - "vary": "^1.1.2" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/sdk-typescript/node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "packages/sdk-typescript/node_modules/finalhandler": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", - "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "on-finished": "^2.4.1", - "parseurl": "^1.3.3", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/sdk-typescript/node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "packages/sdk-typescript/node_modules/fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", - "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "packages/sdk-typescript/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "packages/sdk-typescript/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/sdk-typescript/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/sdk-typescript/node_modules/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", - "license": "MIT", - "dependencies": { - "depd": "~2.0.0", - "inherits": "~2.0.4", - "setprototypeof": "~1.2.0", - "statuses": "~2.0.2", - "toidentifier": "~1.0.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/sdk-typescript/node_modules/iconv-lite": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz", - "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/sdk-typescript/node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "packages/sdk-typescript/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT" - }, - "packages/sdk-typescript/node_modules/loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } - }, - "packages/sdk-typescript/node_modules/media-typer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", - "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "packages/sdk-typescript/node_modules/merge-descriptors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", - "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/sdk-typescript/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/sdk-typescript/node_modules/negotiator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "packages/sdk-typescript/node_modules/p-limit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", - "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/sdk-typescript/node_modules/pathe": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", - "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", - "dev": true, - "license": "MIT" - }, - "packages/sdk-typescript/node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "packages/sdk-typescript/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "packages/sdk-typescript/node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "packages/sdk-typescript/node_modules/raw-body": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", - "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.7.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "packages/sdk-typescript/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, - "packages/sdk-typescript/node_modules/send": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", - "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.3", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "fresh": "^2.0.0", - "http-errors": "^2.0.1", - "mime-types": "^3.0.2", - "ms": "^2.1.3", - "on-finished": "^2.4.1", - "range-parser": "^1.2.1", - "statuses": "^2.0.2" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/sdk-typescript/node_modules/serve-static": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", - "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", - "license": "MIT", - "dependencies": { - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "parseurl": "^1.3.3", - "send": "^1.2.0" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/sdk-typescript/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "packages/sdk-typescript/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "packages/sdk-typescript/node_modules/strip-literal": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.1.tgz", - "integrity": "sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^9.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "packages/sdk-typescript/node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "packages/sdk-typescript/node_modules/tinypool": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", - "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "packages/sdk-typescript/node_modules/tinyspy": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", - "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "packages/sdk-typescript/node_modules/ts-api-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", - "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "packages/sdk-typescript/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/sdk-typescript/node_modules/type-is": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", - "license": "MIT", - "dependencies": { - "content-type": "^1.0.5", - "media-typer": "^1.1.0", - "mime-types": "^3.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "packages/sdk-typescript/node_modules/vite-node": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.1.tgz", - "integrity": "sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA==", - "dev": true, - "license": "MIT", - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.3.4", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "vite": "^5.0.0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" - } - }, - "packages/sdk-typescript/node_modules/vite-node/node_modules/vite": { - "version": "5.4.21", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", - "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "packages/sdk-typescript/node_modules/vitest": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.1.tgz", - "integrity": "sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "1.6.1", - "@vitest/runner": "1.6.1", - "@vitest/snapshot": "1.6.1", - "@vitest/spy": "1.6.1", - "@vitest/utils": "1.6.1", - "acorn-walk": "^8.3.2", - "chai": "^4.3.10", - "debug": "^4.3.4", - "execa": "^8.0.1", - "local-pkg": "^0.5.0", - "magic-string": "^0.30.5", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "std-env": "^3.5.0", - "strip-literal": "^2.0.0", - "tinybench": "^2.5.1", - "tinypool": "^0.8.3", - "vite": "^5.0.0", - "vite-node": "1.6.1", - "why-is-node-running": "^2.2.2" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.6.1", - "@vitest/ui": "1.6.1", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" - } - }, - "packages/sdk-typescript/node_modules/vitest/node_modules/vite": { - "version": "5.4.21", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", - "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "packages/sdk-typescript/node_modules/yocto-queue": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", - "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/test-utils": { - "name": "@qwen-code/qwen-code-test-utils", - "version": "0.12.3", - "dev": true, - "license": "Apache-2.0", - "devDependencies": { - "typescript": "^5.3.3" - }, - "engines": { - "node": ">=20" + "node": ">=20" } }, "packages/vscode-ide-companion": { - "name": "qwen-code-vscode-ide-companion", + "name": "bwen-code-vscode-ide-companion", "version": "0.12.3", + "extraneous": true, "license": "LICENSE", "dependencies": { "@agentclientprotocol/sdk": "^0.14.1", @@ -22743,212 +17034,6 @@ "vscode": "^1.85.0" } }, - "packages/vscode-ide-companion/node_modules/@modelcontextprotocol/sdk": { - "version": "1.25.1", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.25.1.tgz", - "integrity": "sha512-yO28oVFFC7EBoiKdAn+VqRm+plcfv4v0xp6osG/VsCB0NlPZWi87ajbCZZ8f/RvOFLEu7//rSRmuZZ7lMoe3gQ==", - "license": "MIT", - "dependencies": { - "@hono/node-server": "^1.19.7", - "ajv": "^8.17.1", - "ajv-formats": "^3.0.1", - "content-type": "^1.0.5", - "cors": "^2.8.5", - "cross-spawn": "^7.0.5", - "eventsource": "^3.0.2", - "eventsource-parser": "^3.0.0", - "express": "^5.0.1", - "express-rate-limit": "^7.5.0", - "jose": "^6.1.1", - "json-schema-typed": "^8.0.2", - "pkce-challenge": "^5.0.0", - "raw-body": "^3.0.0", - "zod": "^3.25 || ^4.0", - "zod-to-json-schema": "^3.25.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@cfworker/json-schema": "^4.1.1", - "zod": "^3.25 || ^4.0" - }, - "peerDependenciesMeta": { - "@cfworker/json-schema": { - "optional": true - }, - "zod": { - "optional": false - } - } - }, - "packages/vscode-ide-companion/node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.0.tgz", - "integrity": "sha512-HvWtU2UG41LALjajJrML6uQejQhNJx+JBO9IflpSja4R03iNWfKXrj6W2h7ljuLyc1nKS+9yDyL/9tD1U/yBnQ==", - "license": "ISC", - "peerDependencies": { - "zod": "^3.25 || ^4" - } - }, - "packages/vscode-ide-companion/node_modules/@types/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==", - "dev": true, - "license": "MIT" - }, - "packages/vscode-ide-companion/node_modules/@types/vscode": { - "version": "1.99.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.99.0.tgz", - "integrity": "sha512-30sjmas1hQ0gVbX68LAWlm/YYlEqUErunPJJKLpEl+xhK0mKn+jyzlCOpsdTwfkZfPy4U6CDkmygBLC3AB8W9Q==", - "dev": true, - "license": "MIT" - }, - "packages/vscode-ide-companion/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "packages/vscode-ide-companion/node_modules/content-disposition": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", - "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "packages/vscode-ide-companion/node_modules/express": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", - "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", - "license": "MIT", - "dependencies": { - "accepts": "^2.0.0", - "body-parser": "^2.2.0", - "content-disposition": "^1.0.0", - "content-type": "^1.0.5", - "cookie": "^0.7.1", - "cookie-signature": "^1.2.1", - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "finalhandler": "^2.1.0", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "merge-descriptors": "^2.0.0", - "mime-types": "^3.0.0", - "on-finished": "^2.4.1", - "once": "^1.4.0", - "parseurl": "^1.3.3", - "proxy-addr": "^2.0.7", - "qs": "^6.14.0", - "range-parser": "^1.2.1", - "router": "^2.2.0", - "send": "^1.1.0", - "serve-static": "^2.2.0", - "statuses": "^2.0.1", - "type-is": "^2.0.1", - "vary": "^1.1.2" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "packages/vscode-ide-companion/node_modules/finalhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", - "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "on-finished": "^2.4.1", - "parseurl": "^1.3.3", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "packages/vscode-ide-companion/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT" - }, - "packages/vscode-ide-companion/node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "packages/vscode-ide-companion/node_modules/send": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", - "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", - "license": "MIT", - "dependencies": { - "debug": "^4.3.5", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "mime-types": "^3.0.1", - "ms": "^2.1.3", - "on-finished": "^2.4.1", - "range-parser": "^1.2.1", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 18" - } - }, - "packages/vscode-ide-companion/node_modules/type-is": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", - "license": "MIT", - "dependencies": { - "content-type": "^1.0.5", - "media-typer": "^1.1.0", - "mime-types": "^3.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "packages/web-templates": { "name": "@qwen-code/web-templates", "version": "0.12.3", diff --git a/package.json b/package.json index 0e6ff13284..4099cf423c 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,23 @@ { - "name": "@qwen-code/qwen-code", + "name": "@bwen-code/bwen-code", "version": "0.12.3", "engines": { "node": ">=20.0.0" }, "type": "module", "workspaces": [ - "packages/*" + "packages/cli", + "packages/core", + "packages/test-utils", + "packages/web-templates", + "packages/webui" ], "repository": { "type": "git", - "url": "git+https://github.com/QwenLM/qwen-code.git" + "url": "git+https://github.com/bonsai/bwen-code.git" }, "config": { - "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.12.3" + "sandboxImageUri": "ghcr.io/bonsai/bwen-code:0.12.3" }, "scripts": { "start": "cross-env node scripts/start.js", diff --git a/packages/cli/index.ts b/packages/cli/index.ts index 3b00b9546f..8729594be2 100644 --- a/packages/cli/index.ts +++ b/packages/cli/index.ts @@ -8,7 +8,7 @@ import './src/gemini.js'; import { main } from './src/gemini.js'; -import { FatalError } from '@qwen-code/qwen-code-core'; +import { FatalError } from '@bwen-code/bwen-code-core'; import { writeStderrLine } from './src/utils/stdioHelpers.js'; // --- Global Entry Point --- diff --git a/packages/cli/package.json b/packages/cli/package.json index 940443907a..f8129c53d5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,16 +1,16 @@ { - "name": "@qwen-code/qwen-code", + "name": "@bwen-code/bwen-code", "version": "0.12.3", - "description": "Qwen Code", + "description": "BWEN Code", "repository": { "type": "git", - "url": "git+https://github.com/QwenLM/qwen-code.git" + "url": "git+https://github.com/bonsai/bwen-code.git" }, "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", "bin": { - "qwen": "dist/index.js" + "bwen": "dist/index.js" }, "exports": { ".": { @@ -33,15 +33,15 @@ "dist" ], "config": { - "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.12.3" + "sandboxImageUri": "ghcr.io/bonsai/bwen-code:0.12.3" }, "dependencies": { "@agentclientprotocol/sdk": "^0.14.1", "@google/genai": "1.30.0", "@iarna/toml": "^2.2.5", "@modelcontextprotocol/sdk": "^1.25.1", - "@qwen-code/qwen-code-core": "file:../core", - "@qwen-code/web-templates": "file:../web-templates", + "@bwen-code/bwen-code-core": "file:../core", + "@bwen-code/web-templates": "file:../web-templates", "@types/update-notifier": "^6.0.8", "ansi-regex": "^6.2.2", "command-exists": "^1.2.9", @@ -74,8 +74,7 @@ }, "devDependencies": { "@babel/runtime": "^7.27.6", - "@google/gemini-cli-test-utils": "file:../test-utils", - "@qwen-code/qwen-code-test-utils": "file:../test-utils", + "@bwen-code/bwen-code-test-utils": "file:../test-utils", "@testing-library/react": "^16.3.0", "@types/archiver": "^6.0.3", "@types/command-exists": "^1.2.3", diff --git a/packages/cli/src/acp-integration/acpAgent.ts b/packages/cli/src/acp-integration/acpAgent.ts index af3590422e..9f6c3a0b64 100644 --- a/packages/cli/src/acp-integration/acpAgent.ts +++ b/packages/cli/src/acp-integration/acpAgent.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -18,7 +18,7 @@ import { type Config, type ConversationRecord, type DeviceAuthorizationData, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { AgentSideConnection, RequestError, diff --git a/packages/cli/src/acp-integration/authMethods.ts b/packages/cli/src/acp-integration/authMethods.ts index 1eb0e78451..54f72a84fa 100644 --- a/packages/cli/src/acp-integration/authMethods.ts +++ b/packages/cli/src/acp-integration/authMethods.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ -import { AuthType } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import type { AuthMethod } from '@agentclientprotocol/sdk'; export function buildAuthMethods(): AuthMethod[] { diff --git a/packages/cli/src/acp-integration/errorCodes.ts b/packages/cli/src/acp-integration/errorCodes.ts index e8a0aab940..a6dbf57d21 100644 --- a/packages/cli/src/acp-integration/errorCodes.ts +++ b/packages/cli/src/acp-integration/errorCodes.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/acp-integration/service/filesystem.test.ts b/packages/cli/src/acp-integration/service/filesystem.test.ts index 2ff8e2b6b2..cf5b1e6f4c 100644 --- a/packages/cli/src/acp-integration/service/filesystem.test.ts +++ b/packages/cli/src/acp-integration/service/filesystem.test.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ import { describe, expect, it, vi } from 'vitest'; -import type { FileSystemService } from '@qwen-code/qwen-code-core'; +import type { FileSystemService } from '@bwen-code/bwen-code-core'; import { AcpFileSystemService } from './filesystem.js'; import type { AgentSideConnection } from '@agentclientprotocol/sdk'; diff --git a/packages/cli/src/acp-integration/service/filesystem.ts b/packages/cli/src/acp-integration/service/filesystem.ts index 201c868085..66bc28e7cc 100644 --- a/packages/cli/src/acp-integration/service/filesystem.ts +++ b/packages/cli/src/acp-integration/service/filesystem.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -15,7 +15,7 @@ import { RequestError } from '@agentclientprotocol/sdk'; import type { FileSystemService, ReadTextFileResponse, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; const RESOURCE_NOT_FOUND_CODE = -32002; diff --git a/packages/cli/src/acp-integration/session/HistoryReplayer.test.ts b/packages/cli/src/acp-integration/session/HistoryReplayer.test.ts index d2a16fbc61..f37c081f2f 100644 --- a/packages/cli/src/acp-integration/session/HistoryReplayer.test.ts +++ b/packages/cli/src/acp-integration/session/HistoryReplayer.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -13,7 +13,7 @@ import type { ToolRegistry, ToolResultDisplay, TodoResultDisplay, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; describe('HistoryReplayer', () => { let mockContext: SessionContext; diff --git a/packages/cli/src/acp-integration/session/HistoryReplayer.ts b/packages/cli/src/acp-integration/session/HistoryReplayer.ts index 385eeb2cc4..04cda63189 100644 --- a/packages/cli/src/acp-integration/session/HistoryReplayer.ts +++ b/packages/cli/src/acp-integration/session/HistoryReplayer.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ -import type { ChatRecord, TaskResultDisplay } from '@qwen-code/qwen-code-core'; +import type { ChatRecord, TaskResultDisplay } from '@bwen-code/bwen-code-core'; import type { Content, GenerateContentResponseUsageMetadata, diff --git a/packages/cli/src/acp-integration/session/Session.test.ts b/packages/cli/src/acp-integration/session/Session.test.ts index 3465374094..b210fca646 100644 --- a/packages/cli/src/acp-integration/session/Session.test.ts +++ b/packages/cli/src/acp-integration/session/Session.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -9,9 +9,9 @@ import * as fs from 'node:fs/promises'; import * as os from 'node:os'; import * as path from 'node:path'; import { Session } from './Session.js'; -import type { Config, GeminiChat } from '@qwen-code/qwen-code-core'; -import { ApprovalMode, AuthType } from '@qwen-code/qwen-code-core'; -import * as core from '@qwen-code/qwen-code-core'; +import type { Config, GeminiChat } from '@bwen-code/bwen-code-core'; +import { ApprovalMode, AuthType } from '@bwen-code/bwen-code-core'; +import * as core from '@bwen-code/bwen-code-core'; import type { AgentSideConnection, PromptRequest, diff --git a/packages/cli/src/acp-integration/session/Session.ts b/packages/cli/src/acp-integration/session/Session.ts index 04b9c72926..490ac9ed22 100644 --- a/packages/cli/src/acp-integration/session/Session.ts +++ b/packages/cli/src/acp-integration/session/Session.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -17,7 +17,7 @@ import type { ToolResult, ChatRecord, SubAgentEventEmitter, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { AuthType, ApprovalMode, @@ -34,7 +34,7 @@ import { TodoWriteTool, ExitPlanModeTool, readManyFiles, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { RequestError } from '@agentclientprotocol/sdk'; import type { diff --git a/packages/cli/src/acp-integration/session/SubAgentTracker.test.ts b/packages/cli/src/acp-integration/session/SubAgentTracker.test.ts index 86832afddd..b93e3dace3 100644 --- a/packages/cli/src/acp-integration/session/SubAgentTracker.test.ts +++ b/packages/cli/src/acp-integration/session/SubAgentTracker.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -17,12 +17,12 @@ import type { SubAgentStreamTextEvent, ToolEditConfirmationDetails, ToolInfoConfirmationDetails, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { SubAgentEventType, ToolConfirmationOutcome, TodoWriteTool, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { AgentSideConnection } from '@agentclientprotocol/sdk'; import { EventEmitter } from 'node:events'; diff --git a/packages/cli/src/acp-integration/session/SubAgentTracker.ts b/packages/cli/src/acp-integration/session/SubAgentTracker.ts index acbe950821..8f6e684d2a 100644 --- a/packages/cli/src/acp-integration/session/SubAgentTracker.ts +++ b/packages/cli/src/acp-integration/session/SubAgentTracker.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -14,12 +14,12 @@ import type { ToolCallConfirmationDetails, AnyDeclarativeTool, AnyToolInvocation, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { SubAgentEventType, ToolConfirmationOutcome, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { z } from 'zod'; import type { SessionContext } from './types.js'; import { ToolCallEmitter } from './emitters/ToolCallEmitter.js'; diff --git a/packages/cli/src/acp-integration/session/emitters/BaseEmitter.ts b/packages/cli/src/acp-integration/session/emitters/BaseEmitter.ts index dd75296867..d9e1b13a47 100644 --- a/packages/cli/src/acp-integration/session/emitters/BaseEmitter.ts +++ b/packages/cli/src/acp-integration/session/emitters/BaseEmitter.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/acp-integration/session/emitters/MessageEmitter.test.ts b/packages/cli/src/acp-integration/session/emitters/MessageEmitter.test.ts index d820f63887..00de909fe0 100644 --- a/packages/cli/src/acp-integration/session/emitters/MessageEmitter.test.ts +++ b/packages/cli/src/acp-integration/session/emitters/MessageEmitter.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { MessageEmitter } from './MessageEmitter.js'; import type { SessionContext } from '../types.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; describe('MessageEmitter', () => { let mockContext: SessionContext; diff --git a/packages/cli/src/acp-integration/session/emitters/MessageEmitter.ts b/packages/cli/src/acp-integration/session/emitters/MessageEmitter.ts index 4b2bf82bfb..6dffbcfeb0 100644 --- a/packages/cli/src/acp-integration/session/emitters/MessageEmitter.ts +++ b/packages/cli/src/acp-integration/session/emitters/MessageEmitter.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/acp-integration/session/emitters/PlanEmitter.test.ts b/packages/cli/src/acp-integration/session/emitters/PlanEmitter.test.ts index 4140fb33a5..33a3b7dbef 100644 --- a/packages/cli/src/acp-integration/session/emitters/PlanEmitter.test.ts +++ b/packages/cli/src/acp-integration/session/emitters/PlanEmitter.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { PlanEmitter } from './PlanEmitter.js'; import type { SessionContext, TodoItem } from '../types.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; describe('PlanEmitter', () => { let mockContext: SessionContext; diff --git a/packages/cli/src/acp-integration/session/emitters/PlanEmitter.ts b/packages/cli/src/acp-integration/session/emitters/PlanEmitter.ts index 3556e03024..5f29e9f4db 100644 --- a/packages/cli/src/acp-integration/session/emitters/PlanEmitter.ts +++ b/packages/cli/src/acp-integration/session/emitters/PlanEmitter.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/acp-integration/session/emitters/ToolCallEmitter.test.ts b/packages/cli/src/acp-integration/session/emitters/ToolCallEmitter.test.ts index 9bfeb4fcb7..835a9cb9c5 100644 --- a/packages/cli/src/acp-integration/session/emitters/ToolCallEmitter.test.ts +++ b/packages/cli/src/acp-integration/session/emitters/ToolCallEmitter.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -12,8 +12,8 @@ import type { ToolRegistry, AnyDeclarativeTool, AnyToolInvocation, -} from '@qwen-code/qwen-code-core'; -import { Kind, TodoWriteTool } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import { Kind, TodoWriteTool } from '@bwen-code/bwen-code-core'; import type { Part } from '@google/genai'; // Helper to create mock message parts for tests diff --git a/packages/cli/src/acp-integration/session/emitters/ToolCallEmitter.ts b/packages/cli/src/acp-integration/session/emitters/ToolCallEmitter.ts index cfdc02f248..39e3c56e0c 100644 --- a/packages/cli/src/acp-integration/session/emitters/ToolCallEmitter.ts +++ b/packages/cli/src/acp-integration/session/emitters/ToolCallEmitter.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -23,7 +23,7 @@ import { TodoWriteTool, Kind, ExitPlanModeTool, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; /** * Unified tool call event emitter. diff --git a/packages/cli/src/acp-integration/session/emitters/index.ts b/packages/cli/src/acp-integration/session/emitters/index.ts index f99a6dc7bf..af15a79c82 100644 --- a/packages/cli/src/acp-integration/session/emitters/index.ts +++ b/packages/cli/src/acp-integration/session/emitters/index.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/acp-integration/session/index.ts b/packages/cli/src/acp-integration/session/index.ts index ece0663389..d88c850cd1 100644 --- a/packages/cli/src/acp-integration/session/index.ts +++ b/packages/cli/src/acp-integration/session/index.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/acp-integration/session/types.ts b/packages/cli/src/acp-integration/session/types.ts index 58bea4d42b..26f254ed4a 100644 --- a/packages/cli/src/acp-integration/session/types.ts +++ b/packages/cli/src/acp-integration/session/types.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import type { Part } from '@google/genai'; import type { SessionUpdate, diff --git a/packages/cli/src/commands/extensions.test.tsx b/packages/cli/src/commands/extensions.test.tsx index 4499fa1eed..9e36f5cb66 100644 --- a/packages/cli/src/commands/extensions.test.tsx +++ b/packages/cli/src/commands/extensions.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions.tsx b/packages/cli/src/commands/extensions.tsx index a69a1d85b3..851902740b 100644 --- a/packages/cli/src/commands/extensions.tsx +++ b/packages/cli/src/commands/extensions.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/consent.test.ts b/packages/cli/src/commands/extensions/consent.test.ts index da41ec04cb..a47f118087 100644 --- a/packages/cli/src/commands/extensions/consent.test.ts +++ b/packages/cli/src/commands/extensions/consent.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -13,7 +13,7 @@ import { import type { ExtensionConfig, ClaudeMarketplaceConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import prompts from 'prompts'; vi.mock('../../i18n/index.js', () => ({ diff --git a/packages/cli/src/commands/extensions/consent.ts b/packages/cli/src/commands/extensions/consent.ts index cfe4268e6e..91ee2b668f 100644 --- a/packages/cli/src/commands/extensions/consent.ts +++ b/packages/cli/src/commands/extensions/consent.ts @@ -1,10 +1,10 @@ -import type { +import type { ClaudeMarketplaceConfig, ExtensionConfig, ExtensionRequestOptions, SkillConfig, SubagentConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { ConfirmationRequest } from '../../ui/types.js'; import chalk from 'chalk'; import prompts from 'prompts'; diff --git a/packages/cli/src/commands/extensions/disable.test.ts b/packages/cli/src/commands/extensions/disable.test.ts index 6e54dd191a..1874690219 100644 --- a/packages/cli/src/commands/extensions/disable.test.ts +++ b/packages/cli/src/commands/extensions/disable.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/disable.ts b/packages/cli/src/commands/extensions/disable.ts index f13e3f550d..e20758dec7 100644 --- a/packages/cli/src/commands/extensions/disable.ts +++ b/packages/cli/src/commands/extensions/disable.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/enable.test.ts b/packages/cli/src/commands/extensions/enable.test.ts index 3f77b0f53a..1555546145 100644 --- a/packages/cli/src/commands/extensions/enable.test.ts +++ b/packages/cli/src/commands/extensions/enable.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -18,9 +18,9 @@ vi.mock('./utils.js', () => ({ }), })); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actual = - await importOriginal(); + await importOriginal(); return { ...actual, FatalConfigError: class FatalConfigError extends Error { diff --git a/packages/cli/src/commands/extensions/enable.ts b/packages/cli/src/commands/extensions/enable.ts index b02e6ff758..2bffeab99e 100644 --- a/packages/cli/src/commands/extensions/enable.ts +++ b/packages/cli/src/commands/extensions/enable.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type CommandModule } from 'yargs'; -import { FatalConfigError, getErrorMessage } from '@qwen-code/qwen-code-core'; +import { FatalConfigError, getErrorMessage } from '@bwen-code/bwen-code-core'; import { SettingScope } from '../../config/settings.js'; import { writeStdoutLine } from '../../utils/stdioHelpers.js'; import { getExtensionManager } from './utils.js'; diff --git a/packages/cli/src/commands/extensions/examples/mcp-server/example.ts b/packages/cli/src/commands/extensions/examples/mcp-server/example.ts index 21e01e17cb..7f6951e1d4 100644 --- a/packages/cli/src/commands/extensions/examples/mcp-server/example.ts +++ b/packages/cli/src/commands/extensions/examples/mcp-server/example.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/install.test.ts b/packages/cli/src/commands/extensions/install.test.ts index f49c2d48a7..56dd850543 100644 --- a/packages/cli/src/commands/extensions/install.test.ts +++ b/packages/cli/src/commands/extensions/install.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -18,7 +18,7 @@ const mockLoadSettings = vi.hoisted(() => vi.fn()); const mockWriteStdoutLine = vi.hoisted(() => vi.fn()); const mockWriteStderrLine = vi.hoisted(() => vi.fn()); -vi.mock('@qwen-code/qwen-code-core', () => ({ +vi.mock('@bwen-code/bwen-code-core', () => ({ ExtensionManager: vi.fn().mockImplementation(() => ({ installExtension: mockInstallExtension, refreshCache: mockRefreshCache, diff --git a/packages/cli/src/commands/extensions/install.ts b/packages/cli/src/commands/extensions/install.ts index 000184535c..2f9f355ac5 100644 --- a/packages/cli/src/commands/extensions/install.ts +++ b/packages/cli/src/commands/extensions/install.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import type { CommandModule } from 'yargs'; import { ExtensionManager, parseInstallSource, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { getErrorMessage } from '../../utils/errors.js'; import { writeStdoutLine, writeStderrLine } from '../../utils/stdioHelpers.js'; import { isWorkspaceTrusted } from '../../config/trustedFolders.js'; diff --git a/packages/cli/src/commands/extensions/link.test.ts b/packages/cli/src/commands/extensions/link.test.ts index 9aff17c8bb..a8394f03b3 100644 --- a/packages/cli/src/commands/extensions/link.test.ts +++ b/packages/cli/src/commands/extensions/link.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/link.ts b/packages/cli/src/commands/extensions/link.ts index f03b51e460..f813f1940b 100644 --- a/packages/cli/src/commands/extensions/link.ts +++ b/packages/cli/src/commands/extensions/link.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; -import { type ExtensionInstallMetadata } from '@qwen-code/qwen-code-core'; +import { type ExtensionInstallMetadata } from '@bwen-code/bwen-code-core'; import { getErrorMessage } from '../../utils/errors.js'; import { writeStdoutLine, writeStderrLine } from '../../utils/stdioHelpers.js'; import { diff --git a/packages/cli/src/commands/extensions/list.test.ts b/packages/cli/src/commands/extensions/list.test.ts index 96b7cf8d92..caaae6f7bf 100644 --- a/packages/cli/src/commands/extensions/list.test.ts +++ b/packages/cli/src/commands/extensions/list.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/list.ts b/packages/cli/src/commands/extensions/list.ts index 4444fba67a..8848275ce5 100644 --- a/packages/cli/src/commands/extensions/list.ts +++ b/packages/cli/src/commands/extensions/list.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/new.test.ts b/packages/cli/src/commands/extensions/new.test.ts index 62c9edcece..c2d6406d27 100644 --- a/packages/cli/src/commands/extensions/new.test.ts +++ b/packages/cli/src/commands/extensions/new.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/new.ts b/packages/cli/src/commands/extensions/new.ts index f47648ab93..ab499f49d6 100644 --- a/packages/cli/src/commands/extensions/new.ts +++ b/packages/cli/src/commands/extensions/new.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/settings.test.ts b/packages/cli/src/commands/extensions/settings.test.ts index be043a2c2f..760ccce8e6 100644 --- a/packages/cli/src/commands/extensions/settings.test.ts +++ b/packages/cli/src/commands/extensions/settings.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -26,7 +26,7 @@ vi.mock('./utils.js', () => ({ }), })); -vi.mock('@qwen-code/qwen-code-core', () => ({ +vi.mock('@bwen-code/bwen-code-core', () => ({ ExtensionSettingScope: { USER: 'user', WORKSPACE: 'workspace', diff --git a/packages/cli/src/commands/extensions/settings.ts b/packages/cli/src/commands/extensions/settings.ts index 65c54b570a..776e9a4d82 100644 --- a/packages/cli/src/commands/extensions/settings.ts +++ b/packages/cli/src/commands/extensions/settings.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { getScopedEnvContents, promptForSetting, updateSetting, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { t } from '../../i18n/index.js'; import { writeStdoutLine } from '../../utils/stdioHelpers.js'; diff --git a/packages/cli/src/commands/extensions/uninstall.test.ts b/packages/cli/src/commands/extensions/uninstall.test.ts index e202845878..a7b0ae5e5a 100644 --- a/packages/cli/src/commands/extensions/uninstall.test.ts +++ b/packages/cli/src/commands/extensions/uninstall.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/extensions/uninstall.ts b/packages/cli/src/commands/extensions/uninstall.ts index 551b677716..f55bceb795 100644 --- a/packages/cli/src/commands/extensions/uninstall.ts +++ b/packages/cli/src/commands/extensions/uninstall.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import type { CommandModule } from 'yargs'; import { getErrorMessage } from '../../utils/errors.js'; import { writeStdoutLine, writeStderrLine } from '../../utils/stdioHelpers.js'; -import { ExtensionManager } from '@qwen-code/qwen-code-core'; +import { ExtensionManager } from '@bwen-code/bwen-code-core'; import { requestConsentNonInteractive, requestConsentOrFail, diff --git a/packages/cli/src/commands/extensions/update.test.ts b/packages/cli/src/commands/extensions/update.test.ts index b78ea66089..7e2ae8c929 100644 --- a/packages/cli/src/commands/extensions/update.test.ts +++ b/packages/cli/src/commands/extensions/update.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -26,7 +26,7 @@ vi.mock('./utils.js', () => ({ }), })); -vi.mock('@qwen-code/qwen-code-core', () => ({ +vi.mock('@bwen-code/bwen-code-core', () => ({ checkForExtensionUpdate: mockCheckForExtensionUpdate, })); diff --git a/packages/cli/src/commands/extensions/update.ts b/packages/cli/src/commands/extensions/update.ts index d47816b1cd..71ec2402ef 100644 --- a/packages/cli/src/commands/extensions/update.ts +++ b/packages/cli/src/commands/extensions/update.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { ExtensionUpdateState } from '../../ui/state/extensions.js'; import { checkForExtensionUpdate, type ExtensionUpdateInfo, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { getExtensionManager } from './utils.js'; import { t } from '../../i18n/index.js'; diff --git a/packages/cli/src/commands/extensions/utils.test.ts b/packages/cli/src/commands/extensions/utils.test.ts index 84050dbfa2..f4fbb6a6d9 100644 --- a/packages/cli/src/commands/extensions/utils.test.ts +++ b/packages/cli/src/commands/extensions/utils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,14 +6,14 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { getExtensionManager, extensionToOutputString } from './utils.js'; -import type { Extension, ExtensionManager } from '@qwen-code/qwen-code-core'; +import type { Extension, ExtensionManager } from '@bwen-code/bwen-code-core'; const mockRefreshCache = vi.fn(); const mockExtensionManagerInstance = { refreshCache: mockRefreshCache, }; -vi.mock('@qwen-code/qwen-code-core', () => ({ +vi.mock('@bwen-code/bwen-code-core', () => ({ ExtensionManager: vi .fn() .mockImplementation(() => mockExtensionManagerInstance), @@ -55,7 +55,7 @@ describe('getExtensionManager', () => { }); it('should use current working directory as workspace', async () => { - const { ExtensionManager } = await import('@qwen-code/qwen-code-core'); + const { ExtensionManager } = await import('@bwen-code/bwen-code-core'); await getExtensionManager(); diff --git a/packages/cli/src/commands/extensions/utils.ts b/packages/cli/src/commands/extensions/utils.ts index 52cd1cd4c9..a4d984e28b 100644 --- a/packages/cli/src/commands/extensions/utils.ts +++ b/packages/cli/src/commands/extensions/utils.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import { ExtensionManager, type Extension } from '@qwen-code/qwen-code-core'; +import { ExtensionManager, type Extension } from '@bwen-code/bwen-code-core'; import { loadSettings } from '../../config/settings.js'; import { requestConsentOrFail, diff --git a/packages/cli/src/commands/hooks.tsx b/packages/cli/src/commands/hooks.tsx index c747c61c2a..998cb067f9 100644 --- a/packages/cli/src/commands/hooks.tsx +++ b/packages/cli/src/commands/hooks.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/hooks/disable.ts b/packages/cli/src/commands/hooks/disable.ts index 8d1324cdbf..e2f8601f82 100644 --- a/packages/cli/src/commands/hooks/disable.ts +++ b/packages/cli/src/commands/hooks/disable.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; -import { createDebugLogger, getErrorMessage } from '@qwen-code/qwen-code-core'; +import { createDebugLogger, getErrorMessage } from '@bwen-code/bwen-code-core'; import { loadSettings, SettingScope } from '../../config/settings.js'; const debugLogger = createDebugLogger('HOOKS_DISABLE'); diff --git a/packages/cli/src/commands/hooks/enable.ts b/packages/cli/src/commands/hooks/enable.ts index 863b5b32ce..7b0b8cfce7 100644 --- a/packages/cli/src/commands/hooks/enable.ts +++ b/packages/cli/src/commands/hooks/enable.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; -import { createDebugLogger, getErrorMessage } from '@qwen-code/qwen-code-core'; +import { createDebugLogger, getErrorMessage } from '@bwen-code/bwen-code-core'; import { loadSettings, SettingScope } from '../../config/settings.js'; const debugLogger = createDebugLogger('HOOKS_ENABLE'); diff --git a/packages/cli/src/commands/mcp.test.ts b/packages/cli/src/commands/mcp.test.ts index b4e9980cb9..13eec4b771 100644 --- a/packages/cli/src/commands/mcp.test.ts +++ b/packages/cli/src/commands/mcp.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/mcp.ts b/packages/cli/src/commands/mcp.ts index 5e55286c1d..a76939b5b4 100644 --- a/packages/cli/src/commands/mcp.ts +++ b/packages/cli/src/commands/mcp.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/mcp/add.test.ts b/packages/cli/src/commands/mcp/add.test.ts index b1c98fb23e..06961fe8b8 100644 --- a/packages/cli/src/commands/mcp/add.test.ts +++ b/packages/cli/src/commands/mcp/add.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/commands/mcp/add.ts b/packages/cli/src/commands/mcp/add.ts index 57c5b3ce2f..dadb546221 100644 --- a/packages/cli/src/commands/mcp/add.ts +++ b/packages/cli/src/commands/mcp/add.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import type { CommandModule } from 'yargs'; import { loadSettings, SettingScope } from '../../config/settings.js'; import { writeStdoutLine, writeStderrLine } from '../../utils/stdioHelpers.js'; -import type { MCPServerConfig } from '@qwen-code/qwen-code-core'; +import type { MCPServerConfig } from '@bwen-code/bwen-code-core'; async function addMcpServer( name: string, diff --git a/packages/cli/src/commands/mcp/list.test.ts b/packages/cli/src/commands/mcp/list.test.ts index ec7d184dce..510241f317 100644 --- a/packages/cli/src/commands/mcp/list.test.ts +++ b/packages/cli/src/commands/mcp/list.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { vi, describe, it, expect, beforeEach } from 'vitest'; import { listMcpServers } from './list.js'; import { loadSettings } from '../../config/settings.js'; import { isWorkspaceTrusted } from '../../config/trustedFolders.js'; -import { createTransport, ExtensionManager } from '@qwen-code/qwen-code-core'; +import { createTransport, ExtensionManager } from '@bwen-code/bwen-code-core'; import { Client } from '@modelcontextprotocol/sdk/client/index.js'; const mockWriteStdoutLine = vi.hoisted(() => vi.fn()); @@ -26,7 +26,7 @@ vi.mock('../../config/settings.js', () => ({ vi.mock('../../config/trustedFolders.js', () => ({ isWorkspaceTrusted: vi.fn(), })); -vi.mock('@qwen-code/qwen-code-core', () => ({ +vi.mock('@bwen-code/bwen-code-core', () => ({ createTransport: vi.fn(), MCPServerStatus: { CONNECTED: 'CONNECTED', diff --git a/packages/cli/src/commands/mcp/list.ts b/packages/cli/src/commands/mcp/list.ts index b4e71e345a..1abacd7348 100644 --- a/packages/cli/src/commands/mcp/list.ts +++ b/packages/cli/src/commands/mcp/list.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,12 +8,12 @@ import type { CommandModule } from 'yargs'; import { loadSettings } from '../../config/settings.js'; import { writeStdoutLine } from '../../utils/stdioHelpers.js'; -import type { MCPServerConfig } from '@qwen-code/qwen-code-core'; +import type { MCPServerConfig } from '@bwen-code/bwen-code-core'; import { MCPServerStatus, createTransport, ExtensionManager, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import { isWorkspaceTrusted } from '../../config/trustedFolders.js'; diff --git a/packages/cli/src/commands/mcp/remove.test.ts b/packages/cli/src/commands/mcp/remove.test.ts index e2fb6d6d21..d10a08e5ec 100644 --- a/packages/cli/src/commands/mcp/remove.test.ts +++ b/packages/cli/src/commands/mcp/remove.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -36,9 +36,9 @@ vi.mock('../../config/settings.js', async () => { }; }); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actual = - await importOriginal(); + await importOriginal(); return { ...actual, MCPOAuthTokenStorage: vi.fn(() => ({ diff --git a/packages/cli/src/commands/mcp/remove.ts b/packages/cli/src/commands/mcp/remove.ts index 3de482d8d0..0efeda4733 100644 --- a/packages/cli/src/commands/mcp/remove.ts +++ b/packages/cli/src/commands/mcp/remove.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import type { CommandModule } from 'yargs'; import { loadSettings, SettingScope } from '../../config/settings.js'; import { writeStdoutLine } from '../../utils/stdioHelpers.js'; -import { MCPOAuthTokenStorage } from '@qwen-code/qwen-code-core'; +import { MCPOAuthTokenStorage } from '@bwen-code/bwen-code-core'; async function removeMcpServer( name: string, diff --git a/packages/cli/src/config/auth.test.ts b/packages/cli/src/config/auth.test.ts index aee42208da..c2d37d5d08 100644 --- a/packages/cli/src/config/auth.test.ts +++ b/packages/cli/src/config/auth.test.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ -import { AuthType } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import { vi } from 'vitest'; import { validateAuthMethod } from './auth.js'; import * as settings from './settings.js'; @@ -187,7 +187,7 @@ describe('validateAuthMethod', () => { getModelsConfig: vi.fn().mockReturnValue({ getModel: vi.fn().mockReturnValue('cli-model'), }), - } as unknown as import('@qwen-code/qwen-code-core').Config; + } as unknown as import('@bwen-code/bwen-code-core').Config; // Set the env key for the CLI model, not the settings model process.env['CLI_API_KEY'] = 'cli-key'; @@ -220,7 +220,7 @@ describe('validateAuthMethod', () => { getModelsConfig: vi.fn().mockReturnValue({ getModel: vi.fn().mockReturnValue('cli-model'), }), - } as unknown as import('@qwen-code/qwen-code-core').Config; + } as unknown as import('@bwen-code/bwen-code-core').Config; // Don't set CLI_API_KEY - validation should fail const result = validateAuthMethod(AuthType.USE_OPENAI, mockConfig); diff --git a/packages/cli/src/config/auth.ts b/packages/cli/src/config/auth.ts index 46eed24d09..c32453f6ee 100644 --- a/packages/cli/src/config/auth.ts +++ b/packages/cli/src/config/auth.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import { type Config, type ModelProvidersConfig, type ProviderModelConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { loadEnvironment, loadSettings, type Settings } from './settings.js'; import { t } from '../i18n/index.js'; diff --git a/packages/cli/src/config/config.integration.test.ts b/packages/cli/src/config/config.integration.test.ts index c33bc6b339..e79d31bc21 100644 --- a/packages/cli/src/config/config.integration.test.ts +++ b/packages/cli/src/config/config.integration.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,8 +11,8 @@ import { tmpdir } from 'node:os'; import type { ConfigParameters, ContentGeneratorConfig, -} from '@qwen-code/qwen-code-core'; -import { Config } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import { Config } from '@bwen-code/bwen-code-core'; import { http, HttpResponse } from 'msw'; import { setupServer } from 'msw/node'; export const server = setupServer(); @@ -39,8 +39,8 @@ const TEST_CONTENT_GENERATOR_CONFIG: ContentGeneratorConfig = { }; // Mock file discovery service and tool registry -vi.mock('@qwen-code/qwen-code-core', async () => { - const actual = await vi.importActual('@qwen-code/qwen-code-core'); +vi.mock('@bwen-code/bwen-code-core', async () => { + const actual = await vi.importActual('@bwen-code/bwen-code-core'); return { ...actual, FileDiscoveryService: vi.fn().mockImplementation(() => ({ diff --git a/packages/cli/src/config/config.test.ts b/packages/cli/src/config/config.test.ts index 644fc050cd..aa27cece30 100644 --- a/packages/cli/src/config/config.test.ts +++ b/packages/cli/src/config/config.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -14,10 +14,10 @@ import { DEFAULT_QWEN_MODEL, OutputFormat, NativeLspService, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { loadCliConfig, parseArguments, type CliArgs } from './config.js'; import type { Settings } from './settings.js'; -import * as ServerConfig from '@qwen-code/qwen-code-core'; +import * as ServerConfig from '@bwen-code/bwen-code-core'; import { isWorkspaceTrusted } from './trustedFolders.js'; const mockWriteStderrLine = vi.hoisted(() => vi.fn()); @@ -114,7 +114,7 @@ vi.mock('read-package-up', () => ({ ), })); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actualServer = await importOriginal(); const SkillManagerMock = vi.fn(); SkillManagerMock.prototype.startWatching = vi diff --git a/packages/cli/src/config/config.ts b/packages/cli/src/config/config.ts index 88153fe750..04fcde33ad 100755 --- a/packages/cli/src/config/config.ts +++ b/packages/cli/src/config/config.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -31,7 +31,7 @@ import { NativeLspClient, createDebugLogger, NativeLspService, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { extensionsCommand } from '../commands/extensions.js'; import { hooksCommand } from '../commands/hooks.js'; import type { Settings } from './settings.js'; diff --git a/packages/cli/src/config/keyBindings.test.ts b/packages/cli/src/config/keyBindings.test.ts index 1003290b8c..98bf7ebd6f 100644 --- a/packages/cli/src/config/keyBindings.test.ts +++ b/packages/cli/src/config/keyBindings.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/keyBindings.ts b/packages/cli/src/config/keyBindings.ts index 7499a8c683..ac065ebe13 100644 --- a/packages/cli/src/config/keyBindings.ts +++ b/packages/cli/src/config/keyBindings.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/migration/index.test.ts b/packages/cli/src/config/migration/index.test.ts index 52bae237ef..7d28531ffb 100644 --- a/packages/cli/src/config/migration/index.test.ts +++ b/packages/cli/src/config/migration/index.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/migration/index.ts b/packages/cli/src/config/migration/index.ts index 40d176cbe9..cf1f58397a 100644 --- a/packages/cli/src/config/migration/index.ts +++ b/packages/cli/src/config/migration/index.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/migration/scheduler.test.ts b/packages/cli/src/config/migration/scheduler.test.ts index 91e9eff989..3a6f3941b9 100644 --- a/packages/cli/src/config/migration/scheduler.test.ts +++ b/packages/cli/src/config/migration/scheduler.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/migration/scheduler.ts b/packages/cli/src/config/migration/scheduler.ts index 7bbcc43d63..88fba7643e 100644 --- a/packages/cli/src/config/migration/scheduler.ts +++ b/packages/cli/src/config/migration/scheduler.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import type { SettingsMigration, MigrationResult } from './types.js'; const debugLogger = createDebugLogger('SETTINGS_MIGRATION'); diff --git a/packages/cli/src/config/migration/types.ts b/packages/cli/src/config/migration/types.ts index ca1e23aaf0..a6cd2e598b 100644 --- a/packages/cli/src/config/migration/types.ts +++ b/packages/cli/src/config/migration/types.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/migration/versions/v1-to-v2-shared.ts b/packages/cli/src/config/migration/versions/v1-to-v2-shared.ts index c87fa44806..6e0ff45e18 100644 --- a/packages/cli/src/config/migration/versions/v1-to-v2-shared.ts +++ b/packages/cli/src/config/migration/versions/v1-to-v2-shared.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/migration/versions/v1-to-v2.test.ts b/packages/cli/src/config/migration/versions/v1-to-v2.test.ts index cbe655c546..77db1facd9 100644 --- a/packages/cli/src/config/migration/versions/v1-to-v2.test.ts +++ b/packages/cli/src/config/migration/versions/v1-to-v2.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/migration/versions/v1-to-v2.ts b/packages/cli/src/config/migration/versions/v1-to-v2.ts index 4dceffe444..befa8cc7a6 100644 --- a/packages/cli/src/config/migration/versions/v1-to-v2.ts +++ b/packages/cli/src/config/migration/versions/v1-to-v2.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/migration/versions/v2-to-v3.test.ts b/packages/cli/src/config/migration/versions/v2-to-v3.test.ts index a1ba9b46d6..2010ff7db9 100644 --- a/packages/cli/src/config/migration/versions/v2-to-v3.test.ts +++ b/packages/cli/src/config/migration/versions/v2-to-v3.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/migration/versions/v2-to-v3.ts b/packages/cli/src/config/migration/versions/v2-to-v3.ts index 6c01334431..ff947b80d2 100644 --- a/packages/cli/src/config/migration/versions/v2-to-v3.ts +++ b/packages/cli/src/config/migration/versions/v2-to-v3.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/modelProvidersScope.test.ts b/packages/cli/src/config/modelProvidersScope.test.ts index 9d7a436e26..cb5c7ad679 100644 --- a/packages/cli/src/config/modelProvidersScope.test.ts +++ b/packages/cli/src/config/modelProvidersScope.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/modelProvidersScope.ts b/packages/cli/src/config/modelProvidersScope.ts index 1361411036..926f327628 100644 --- a/packages/cli/src/config/modelProvidersScope.ts +++ b/packages/cli/src/config/modelProvidersScope.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/sandboxConfig.ts b/packages/cli/src/config/sandboxConfig.ts index f98e528fb5..3aeeaaae3e 100644 --- a/packages/cli/src/config/sandboxConfig.ts +++ b/packages/cli/src/config/sandboxConfig.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import type { SandboxConfig } from '@qwen-code/qwen-code-core'; -import { FatalSandboxError } from '@qwen-code/qwen-code-core'; +import type { SandboxConfig } from '@bwen-code/bwen-code-core'; +import { FatalSandboxError } from '@bwen-code/bwen-code-core'; import commandExists from 'command-exists'; import * as os from 'node:os'; import { getPackageJson } from '../utils/package.js'; diff --git a/packages/cli/src/config/settings.test.ts b/packages/cli/src/config/settings.test.ts index 9550932c9f..d83f10106b 100644 --- a/packages/cli/src/config/settings.test.ts +++ b/packages/cli/src/config/settings.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -55,7 +55,7 @@ import { SETTINGS_VERSION_KEY, } from './settings.js'; import { needsMigration } from './migration/index.js'; -import { FatalConfigError, QWEN_DIR } from '@qwen-code/qwen-code-core'; +import { FatalConfigError, QWEN_DIR } from '@bwen-code/bwen-code-core'; const MOCK_WORKSPACE_DIR = '/mock/workspace'; // Use the (mocked) SETTINGS_DIRECTORY_NAME for consistency diff --git a/packages/cli/src/config/settings.ts b/packages/cli/src/config/settings.ts index 0809cf0908..17f7441310 100644 --- a/packages/cli/src/config/settings.ts +++ b/packages/cli/src/config/settings.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -15,7 +15,7 @@ import { getErrorMessage, Storage, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import stripJsonComments from 'strip-json-comments'; import { DefaultLight } from '../ui/themes/default-light.js'; import { DefaultDark } from '../ui/themes/default.js'; diff --git a/packages/cli/src/config/settingsSchema.test.ts b/packages/cli/src/config/settingsSchema.test.ts index cfde449ca0..676d426ccb 100644 --- a/packages/cli/src/config/settingsSchema.test.ts +++ b/packages/cli/src/config/settingsSchema.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index 4701abc1ab..7a9e3ff134 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,12 +11,12 @@ import type { AuthType, ChatCompressionSettings, ModelProvidersConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { ApprovalMode, DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES, DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { CustomTheme } from '../ui/themes/theme.js'; import { getLanguageSettingsOptions } from '../i18n/languages.js'; diff --git a/packages/cli/src/config/trustedFolders.test.ts b/packages/cli/src/config/trustedFolders.test.ts index 5b29969c24..14f3a87b45 100644 --- a/packages/cli/src/config/trustedFolders.test.ts +++ b/packages/cli/src/config/trustedFolders.test.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as osActual from 'node:os'; -import { FatalConfigError, ideContextStore } from '@qwen-code/qwen-code-core'; +import { FatalConfigError, ideContextStore } from '@bwen-code/bwen-code-core'; import { describe, it, diff --git a/packages/cli/src/config/trustedFolders.ts b/packages/cli/src/config/trustedFolders.ts index 1a243e5378..d27dbd0fe6 100644 --- a/packages/cli/src/config/trustedFolders.ts +++ b/packages/cli/src/config/trustedFolders.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import { getErrorMessage, isWithinRoot, ideContextStore, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Settings } from './settings.js'; import stripJsonComments from 'strip-json-comments'; import { writeStderrLine } from '../utils/stdioHelpers.js'; diff --git a/packages/cli/src/config/webSearch.ts b/packages/cli/src/config/webSearch.ts index 260220ac72..825d763cae 100644 --- a/packages/cli/src/config/webSearch.ts +++ b/packages/cli/src/config/webSearch.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ -import { AuthType } from '@qwen-code/qwen-code-core'; -import type { WebSearchProviderConfig } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; +import type { WebSearchProviderConfig } from '@bwen-code/bwen-code-core'; import type { Settings } from './settings.js'; /** diff --git a/packages/cli/src/constants/codingPlan.ts b/packages/cli/src/constants/codingPlan.ts index bc28a781af..0617dc0560 100644 --- a/packages/cli/src/constants/codingPlan.ts +++ b/packages/cli/src/constants/codingPlan.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ import { createHash } from 'node:crypto'; -import type { ProviderModelConfig as ModelConfig } from '@qwen-code/qwen-code-core'; +import type { ProviderModelConfig as ModelConfig } from '@bwen-code/bwen-code-core'; /** * Coding plan regions diff --git a/packages/cli/src/core/auth.ts b/packages/cli/src/core/auth.ts index 15bb5fd30d..6566260a84 100644 --- a/packages/cli/src/core/auth.ts +++ b/packages/cli/src/core/auth.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import { getErrorMessage, logAuth, AuthEvent, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; /** * Handles the initial authentication flow. diff --git a/packages/cli/src/core/initializer.ts b/packages/cli/src/core/initializer.ts index 25825ce6d3..ba7796ff46 100644 --- a/packages/cli/src/core/initializer.ts +++ b/packages/cli/src/core/initializer.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import { IdeConnectionType, logIdeConnection, type Config, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { type LoadedSettings, SettingScope } from '../config/settings.js'; import { performInitialAuth } from './auth.js'; import { validateTheme } from './theme.js'; diff --git a/packages/cli/src/core/theme.ts b/packages/cli/src/core/theme.ts index 7acb4abd2c..5c2b38e823 100644 --- a/packages/cli/src/core/theme.ts +++ b/packages/cli/src/core/theme.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/gemini.test.tsx b/packages/cli/src/gemini.test.tsx index 9b47de5b54..15df0ea3aa 100644 --- a/packages/cli/src/gemini.test.tsx +++ b/packages/cli/src/gemini.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -21,8 +21,8 @@ import { } from './gemini.js'; import { type LoadedSettings } from './config/settings.js'; import { appEvents, AppEvent } from './utils/events.js'; -import type { Config } from '@qwen-code/qwen-code-core'; -import { OutputFormat } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; +import { OutputFormat } from '@bwen-code/bwen-code-core'; const mockWriteStderrLine = vi.hoisted(() => vi.fn()); diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx index 58a735c73c..40db687687 100644 --- a/packages/cli/src/gemini.tsx +++ b/packages/cli/src/gemini.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { Storage, type Config, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { render } from 'ink'; import dns from 'node:dns'; import os from 'node:os'; diff --git a/packages/cli/src/i18n/index.ts b/packages/cli/src/i18n/index.ts index b22c8c9b23..feabc52563 100644 --- a/packages/cli/src/i18n/index.ts +++ b/packages/cli/src/i18n/index.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/i18n/languages.ts b/packages/cli/src/i18n/languages.ts index 733f118636..3e27bbb6db 100644 --- a/packages/cli/src/i18n/languages.ts +++ b/packages/cli/src/i18n/languages.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/nonInteractive/control/ControlContext.ts b/packages/cli/src/nonInteractive/control/ControlContext.ts index c68ef346de..0e07c9c950 100644 --- a/packages/cli/src/nonInteractive/control/ControlContext.ts +++ b/packages/cli/src/nonInteractive/control/ControlContext.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -13,7 +13,7 @@ * runtime state (e.g. permission mode, active MCP clients). */ -import type { Config, MCPServerConfig } from '@qwen-code/qwen-code-core'; +import type { Config, MCPServerConfig } from '@bwen-code/bwen-code-core'; import type { Client } from '@modelcontextprotocol/sdk/client/index.js'; import type { StreamJsonOutputAdapter } from '../io/StreamJsonOutputAdapter.js'; import type { PermissionMode } from '../types.js'; diff --git a/packages/cli/src/nonInteractive/control/ControlDispatcher.test.ts b/packages/cli/src/nonInteractive/control/ControlDispatcher.test.ts index ac42f37253..371b5d43ad 100644 --- a/packages/cli/src/nonInteractive/control/ControlDispatcher.test.ts +++ b/packages/cli/src/nonInteractive/control/ControlDispatcher.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/nonInteractive/control/ControlDispatcher.ts b/packages/cli/src/nonInteractive/control/ControlDispatcher.ts index 8a049f0afa..3b955ac3aa 100644 --- a/packages/cli/src/nonInteractive/control/ControlDispatcher.ts +++ b/packages/cli/src/nonInteractive/control/ControlDispatcher.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -38,7 +38,7 @@ import type { ControlResponse, ControlRequestPayload, } from '../types.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('CONTROL_DISPATCHER'); diff --git a/packages/cli/src/nonInteractive/control/ControlService.ts b/packages/cli/src/nonInteractive/control/ControlService.ts index 671a18530b..334eeced92 100644 --- a/packages/cli/src/nonInteractive/control/ControlService.ts +++ b/packages/cli/src/nonInteractive/control/ControlService.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/nonInteractive/control/controllers/baseController.ts b/packages/cli/src/nonInteractive/control/controllers/baseController.ts index 8d5d5c5452..580f7b2f81 100644 --- a/packages/cli/src/nonInteractive/control/controllers/baseController.ts +++ b/packages/cli/src/nonInteractive/control/controllers/baseController.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -16,8 +16,8 @@ */ import { randomUUID } from 'node:crypto'; -import type { DebugLogger } from '@qwen-code/qwen-code-core'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import type { DebugLogger } from '@bwen-code/bwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import type { IControlContext } from '../ControlContext.js'; import type { ControlRequestPayload, diff --git a/packages/cli/src/nonInteractive/control/controllers/hookController.ts b/packages/cli/src/nonInteractive/control/controllers/hookController.ts index df6eb4c0e0..9b8c201328 100644 --- a/packages/cli/src/nonInteractive/control/controllers/hookController.ts +++ b/packages/cli/src/nonInteractive/control/controllers/hookController.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/nonInteractive/control/controllers/permissionController.ts b/packages/cli/src/nonInteractive/control/controllers/permissionController.ts index 0cc402522b..66634cabb8 100644 --- a/packages/cli/src/nonInteractive/control/controllers/permissionController.ts +++ b/packages/cli/src/nonInteractive/control/controllers/permissionController.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -19,11 +19,11 @@ import type { ToolExecuteConfirmationDetails, ToolMcpConfirmationDetails, ApprovalMode, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { InputFormat, ToolConfirmationOutcome, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { CLIControlPermissionRequest, CLIControlSetPermissionModeRequest, diff --git a/packages/cli/src/nonInteractive/control/controllers/sdkMcpController.ts b/packages/cli/src/nonInteractive/control/controllers/sdkMcpController.ts index 058226c095..cad97879eb 100644 --- a/packages/cli/src/nonInteractive/control/controllers/sdkMcpController.ts +++ b/packages/cli/src/nonInteractive/control/controllers/sdkMcpController.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/nonInteractive/control/controllers/systemController.ts b/packages/cli/src/nonInteractive/control/controllers/systemController.ts index 5a275344f7..97f2b9abd2 100644 --- a/packages/cli/src/nonInteractive/control/controllers/systemController.ts +++ b/packages/cli/src/nonInteractive/control/controllers/systemController.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -26,7 +26,7 @@ import { MCPServerConfig, AuthProviderType, type MCPOAuthConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('SYSTEM_CONTROLLER'); diff --git a/packages/cli/src/nonInteractive/control/types/serviceAPIs.ts b/packages/cli/src/nonInteractive/control/types/serviceAPIs.ts index 9137d95aaf..bb18434f88 100644 --- a/packages/cli/src/nonInteractive/control/types/serviceAPIs.ts +++ b/packages/cli/src/nonInteractive/control/types/serviceAPIs.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -13,7 +13,7 @@ */ import type { Client } from '@modelcontextprotocol/sdk/client/index.js'; -import type { MCPServerConfig } from '@qwen-code/qwen-code-core'; +import type { MCPServerConfig } from '@bwen-code/bwen-code-core'; import type { PermissionSuggestion } from '../../types.js'; /** diff --git a/packages/cli/src/nonInteractive/io/BaseJsonOutputAdapter.test.ts b/packages/cli/src/nonInteractive/io/BaseJsonOutputAdapter.test.ts index dbb746a109..1c68825232 100644 --- a/packages/cli/src/nonInteractive/io/BaseJsonOutputAdapter.test.ts +++ b/packages/cli/src/nonInteractive/io/BaseJsonOutputAdapter.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { type ServerGeminiStreamEvent, type ToolCallRequestInfo, type TaskResultDisplay, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Part, GenerateContentResponseUsageMetadata } from '@google/genai'; import type { CLIMessage, diff --git a/packages/cli/src/nonInteractive/io/BaseJsonOutputAdapter.ts b/packages/cli/src/nonInteractive/io/BaseJsonOutputAdapter.ts index b0d6736a54..488aaddc8f 100644 --- a/packages/cli/src/nonInteractive/io/BaseJsonOutputAdapter.ts +++ b/packages/cli/src/nonInteractive/io/BaseJsonOutputAdapter.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -13,12 +13,12 @@ import type { ServerGeminiStreamEvent, TaskResultDisplay, McpToolProgressData, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { GeminiEventType, ToolErrorType, parseAndFormatApiError, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Part, GenerateContentResponseUsageMetadata } from '@google/genai'; import type { CLIAssistantMessage, diff --git a/packages/cli/src/nonInteractive/io/JsonOutputAdapter.test.ts b/packages/cli/src/nonInteractive/io/JsonOutputAdapter.test.ts index ec8c598f5b..94a7db97ea 100644 --- a/packages/cli/src/nonInteractive/io/JsonOutputAdapter.test.ts +++ b/packages/cli/src/nonInteractive/io/JsonOutputAdapter.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -8,8 +8,8 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; import type { Config, ServerGeminiStreamEvent, -} from '@qwen-code/qwen-code-core'; -import { GeminiEventType, OutputFormat } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import { GeminiEventType, OutputFormat } from '@bwen-code/bwen-code-core'; import type { Part } from '@google/genai'; import { JsonOutputAdapter } from './JsonOutputAdapter.js'; diff --git a/packages/cli/src/nonInteractive/io/JsonOutputAdapter.ts b/packages/cli/src/nonInteractive/io/JsonOutputAdapter.ts index a76de53a84..5dcc050e49 100644 --- a/packages/cli/src/nonInteractive/io/JsonOutputAdapter.ts +++ b/packages/cli/src/nonInteractive/io/JsonOutputAdapter.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import type { CLIAssistantMessage, CLIMessage } from '../types.js'; import { BaseJsonOutputAdapter, diff --git a/packages/cli/src/nonInteractive/io/StreamJsonInputReader.test.ts b/packages/cli/src/nonInteractive/io/StreamJsonInputReader.test.ts index 90c0234d53..750050df4f 100644 --- a/packages/cli/src/nonInteractive/io/StreamJsonInputReader.test.ts +++ b/packages/cli/src/nonInteractive/io/StreamJsonInputReader.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/nonInteractive/io/StreamJsonInputReader.ts b/packages/cli/src/nonInteractive/io/StreamJsonInputReader.ts index f297d74154..48ea1fbb8f 100644 --- a/packages/cli/src/nonInteractive/io/StreamJsonInputReader.ts +++ b/packages/cli/src/nonInteractive/io/StreamJsonInputReader.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/nonInteractive/io/StreamJsonOutputAdapter.test.ts b/packages/cli/src/nonInteractive/io/StreamJsonOutputAdapter.test.ts index 96977d5b02..8550c56c63 100644 --- a/packages/cli/src/nonInteractive/io/StreamJsonOutputAdapter.test.ts +++ b/packages/cli/src/nonInteractive/io/StreamJsonOutputAdapter.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -8,8 +8,8 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; import type { Config, ServerGeminiStreamEvent, -} from '@qwen-code/qwen-code-core'; -import { GeminiEventType } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import { GeminiEventType } from '@bwen-code/bwen-code-core'; import type { Part } from '@google/genai'; import { StreamJsonOutputAdapter } from './StreamJsonOutputAdapter.js'; diff --git a/packages/cli/src/nonInteractive/io/StreamJsonOutputAdapter.ts b/packages/cli/src/nonInteractive/io/StreamJsonOutputAdapter.ts index bf76d025c2..d60f5e7c4d 100644 --- a/packages/cli/src/nonInteractive/io/StreamJsonOutputAdapter.ts +++ b/packages/cli/src/nonInteractive/io/StreamJsonOutputAdapter.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import type { Config, ToolCallRequestInfo, McpToolProgressData, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { CLIAssistantMessage, CLIMessage, diff --git a/packages/cli/src/nonInteractive/session.test.ts b/packages/cli/src/nonInteractive/session.test.ts index e163f516a8..6f732bbf61 100644 --- a/packages/cli/src/nonInteractive/session.test.ts +++ b/packages/cli/src/nonInteractive/session.test.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { runNonInteractiveStreamJson } from './session.js'; import type { CLIUserMessage, diff --git a/packages/cli/src/nonInteractive/session.ts b/packages/cli/src/nonInteractive/session.ts index 6b8c9b8803..1080b43469 100644 --- a/packages/cli/src/nonInteractive/session.ts +++ b/packages/cli/src/nonInteractive/session.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -7,8 +7,8 @@ import type { Config, ConfigInitializeOptions, -} from '@qwen-code/qwen-code-core'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import { StreamJsonInputReader } from './io/StreamJsonInputReader.js'; import { StreamJsonOutputAdapter } from './io/StreamJsonOutputAdapter.js'; import { ControlContext } from './control/ControlContext.js'; diff --git a/packages/cli/src/nonInteractive/types.ts b/packages/cli/src/nonInteractive/types.ts index 84c2d0ff7e..60d11e0f5a 100644 --- a/packages/cli/src/nonInteractive/types.ts +++ b/packages/cli/src/nonInteractive/types.ts @@ -1,8 +1,8 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-explicit-any */ import type { SubagentConfig, McpToolProgressData, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; /** * Annotation for attaching metadata to content blocks diff --git a/packages/cli/src/nonInteractiveCli.test.ts b/packages/cli/src/nonInteractiveCli.test.ts index 6a6b33b870..cbc795ce46 100644 --- a/packages/cli/src/nonInteractiveCli.test.ts +++ b/packages/cli/src/nonInteractiveCli.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import type { ToolRegistry, ServerGeminiStreamEvent, SessionMetrics, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { CLIUserMessage } from './nonInteractive/types.js'; import { executeToolCall, @@ -20,7 +20,7 @@ import { uiTelemetryService, FatalInputError, ApprovalMode, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Part } from '@google/genai'; import { runNonInteractive } from './nonInteractiveCli.js'; import { vi, type Mock, type MockInstance } from 'vitest'; @@ -29,9 +29,9 @@ import { CommandKind } from './ui/commands/types.js'; // Mock core modules vi.mock('./ui/hooks/atCommandProcessor.js'); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = - await importOriginal(); + await importOriginal(); class MockChatRecordingService { initialize = vi.fn(); diff --git a/packages/cli/src/nonInteractiveCli.ts b/packages/cli/src/nonInteractiveCli.ts index 129bec380a..cd6ff15cad 100644 --- a/packages/cli/src/nonInteractiveCli.ts +++ b/packages/cli/src/nonInteractiveCli.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import type { Config, ToolCallRequestInfo } from '@qwen-code/qwen-code-core'; +import type { Config, ToolCallRequestInfo } from '@bwen-code/bwen-code-core'; import { isSlashCommand } from './ui/utils/commandUtils.js'; import type { LoadedSettings } from './config/settings.js'; import { @@ -19,7 +19,7 @@ import { uiTelemetryService, parseAndFormatApiError, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Content, Part, PartListUnion } from '@google/genai'; import type { CLIUserMessage, PermissionMode } from './nonInteractive/types.js'; import type { JsonOutputAdapterInterface } from './nonInteractive/io/BaseJsonOutputAdapter.js'; diff --git a/packages/cli/src/nonInteractiveCliCommands.test.ts b/packages/cli/src/nonInteractiveCliCommands.test.ts index 76b29f3e0d..98c33f4e0e 100644 --- a/packages/cli/src/nonInteractiveCliCommands.test.ts +++ b/packages/cli/src/nonInteractiveCliCommands.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { handleSlashCommand } from './nonInteractiveCliCommands.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import type { LoadedSettings } from './config/settings.js'; import { CommandKind } from './ui/commands/types.js'; diff --git a/packages/cli/src/nonInteractiveCliCommands.ts b/packages/cli/src/nonInteractiveCliCommands.ts index b089fa6c27..924fe944d3 100644 --- a/packages/cli/src/nonInteractiveCliCommands.ts +++ b/packages/cli/src/nonInteractiveCliCommands.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { uiTelemetryService, type Config, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { CommandService } from './services/CommandService.js'; import { BuiltinCommandLoader } from './services/BuiltinCommandLoader.js'; import { BundledSkillLoader } from './services/BundledSkillLoader.js'; diff --git a/packages/cli/src/patches/is-in-ci.ts b/packages/cli/src/patches/is-in-ci.ts index a37c8678a6..07b6f4287f 100644 --- a/packages/cli/src/patches/is-in-ci.ts +++ b/packages/cli/src/patches/is-in-ci.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/BuiltinCommandLoader.test.ts b/packages/cli/src/services/BuiltinCommandLoader.test.ts index 7d4f504211..1ac4d39962 100644 --- a/packages/cli/src/services/BuiltinCommandLoader.test.ts +++ b/packages/cli/src/services/BuiltinCommandLoader.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -50,7 +50,7 @@ vi.mock('../ui/commands/permissionsCommand.js', async () => { import { describe, it, expect, vi, beforeEach, type Mock } from 'vitest'; import { BuiltinCommandLoader } from './BuiltinCommandLoader.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { CommandKind } from '../ui/commands/types.js'; import { restoreCommand } from '../ui/commands/restoreCommand.js'; diff --git a/packages/cli/src/services/BuiltinCommandLoader.ts b/packages/cli/src/services/BuiltinCommandLoader.ts index 08ee98eb2b..2653472c31 100644 --- a/packages/cli/src/services/BuiltinCommandLoader.ts +++ b/packages/cli/src/services/BuiltinCommandLoader.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import type { ICommandLoader } from './types.js'; import type { SlashCommand } from '../ui/commands/types.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { aboutCommand } from '../ui/commands/aboutCommand.js'; import { agentsCommand } from '../ui/commands/agentsCommand.js'; import { approvalModeCommand } from '../ui/commands/approvalModeCommand.js'; @@ -42,6 +42,7 @@ import { toolsCommand } from '../ui/commands/toolsCommand.js'; import { vimCommand } from '../ui/commands/vimCommand.js'; import { setupGithubCommand } from '../ui/commands/setupGithubCommand.js'; import { insightCommand } from '../ui/commands/insightCommand.js'; +import { fileTreeCommand } from '../ui/commands/fileTreeCommand.js'; /** * Loads the core, hard-coded slash commands that are an integral part @@ -94,6 +95,7 @@ export class BuiltinCommandLoader implements ICommandLoader { setupGithubCommand, terminalSetupCommand, insightCommand, + fileTreeCommand, ]; return allDefinitions.filter((cmd): cmd is SlashCommand => cmd !== null); diff --git a/packages/cli/src/services/BundledSkillLoader.test.ts b/packages/cli/src/services/BundledSkillLoader.test.ts index a3c687a27e..f7fff9c615 100644 --- a/packages/cli/src/services/BundledSkillLoader.test.ts +++ b/packages/cli/src/services/BundledSkillLoader.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { BundledSkillLoader } from './BundledSkillLoader.js'; import { CommandKind } from '../ui/commands/types.js'; -import type { Config, SkillConfig } from '@qwen-code/qwen-code-core'; +import type { Config, SkillConfig } from '@bwen-code/bwen-code-core'; function makeSkill(overrides: Partial = {}): SkillConfig { return { diff --git a/packages/cli/src/services/BundledSkillLoader.ts b/packages/cli/src/services/BundledSkillLoader.ts index 609ddf90e2..98ae8f8e5b 100644 --- a/packages/cli/src/services/BundledSkillLoader.ts +++ b/packages/cli/src/services/BundledSkillLoader.ts @@ -1,14 +1,14 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { createDebugLogger, appendToLastTextPart, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { ICommandLoader } from './types.js'; import type { SlashCommand, diff --git a/packages/cli/src/services/CommandService.test.ts b/packages/cli/src/services/CommandService.test.ts index 51f962753d..aca5ef2dc4 100644 --- a/packages/cli/src/services/CommandService.test.ts +++ b/packages/cli/src/services/CommandService.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/CommandService.ts b/packages/cli/src/services/CommandService.ts index 41086dac10..9dbd27861d 100644 --- a/packages/cli/src/services/CommandService.ts +++ b/packages/cli/src/services/CommandService.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import type { SlashCommand } from '../ui/commands/types.js'; import type { ICommandLoader } from './types.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('CLI_COMMANDS'); diff --git a/packages/cli/src/services/FileCommandLoader-extension.test.ts b/packages/cli/src/services/FileCommandLoader-extension.test.ts index 7f57909218..b595de6058 100644 --- a/packages/cli/src/services/FileCommandLoader-extension.test.ts +++ b/packages/cli/src/services/FileCommandLoader-extension.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,8 +8,8 @@ import { describe, it, expect, afterEach, vi } from 'vitest'; import * as path from 'node:path'; import mock from 'mock-fs'; import { FileCommandLoader } from './FileCommandLoader.js'; -import type { Config } from '@qwen-code/qwen-code-core'; -import { Storage } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; +import { Storage } from '@bwen-code/bwen-code-core'; describe('FileCommandLoader - Extension Commands Support', () => { const projectRoot = '/test/project'; diff --git a/packages/cli/src/services/FileCommandLoader-markdown.test.ts b/packages/cli/src/services/FileCommandLoader-markdown.test.ts index 737cc39dbf..8ad4006a23 100644 --- a/packages/cli/src/services/FileCommandLoader-markdown.test.ts +++ b/packages/cli/src/services/FileCommandLoader-markdown.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/FileCommandLoader.test.ts b/packages/cli/src/services/FileCommandLoader.test.ts index a791f42368..86e88eec07 100644 --- a/packages/cli/src/services/FileCommandLoader.test.ts +++ b/packages/cli/src/services/FileCommandLoader.test.ts @@ -1,12 +1,12 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as path from 'node:path'; -import type { Config } from '@qwen-code/qwen-code-core'; -import { Storage } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; +import { Storage } from '@bwen-code/bwen-code-core'; import mock from 'mock-fs'; import { FileCommandLoader } from './FileCommandLoader.js'; import { assert, vi } from 'vitest'; @@ -57,9 +57,9 @@ vi.mock('./prompt-processors/argumentProcessor.js', async (importOriginal) => { .mockImplementation(() => new original.DefaultArgumentProcessor()), }; }); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = - await importOriginal(); + await importOriginal(); return { ...original, Storage: original.Storage, diff --git a/packages/cli/src/services/FileCommandLoader.ts b/packages/cli/src/services/FileCommandLoader.ts index f92004afb4..1744932ad3 100644 --- a/packages/cli/src/services/FileCommandLoader.ts +++ b/packages/cli/src/services/FileCommandLoader.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,12 +10,12 @@ import path from 'node:path'; import toml from '@iarna/toml'; import { glob } from 'glob'; import { z } from 'zod'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { createDebugLogger, EXTENSIONS_CONFIG_FILENAME, Storage, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { ICommandLoader } from './types.js'; import { parseMarkdownCommand, diff --git a/packages/cli/src/services/McpPromptLoader.test.ts b/packages/cli/src/services/McpPromptLoader.test.ts index 3e42fb8279..86b0a724f6 100644 --- a/packages/cli/src/services/McpPromptLoader.test.ts +++ b/packages/cli/src/services/McpPromptLoader.test.ts @@ -1,15 +1,15 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { McpPromptLoader } from './McpPromptLoader.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import type { PromptArgument } from '@modelcontextprotocol/sdk/types.js'; import { describe, it, expect, vi, beforeEach } from 'vitest'; import { CommandKind, type CommandContext } from '../ui/commands/types.js'; -import * as cliCore from '@qwen-code/qwen-code-core'; +import * as cliCore from '@bwen-code/bwen-code-core'; // Define the mock prompt data at a higher scope const mockPrompt = { diff --git a/packages/cli/src/services/McpPromptLoader.ts b/packages/cli/src/services/McpPromptLoader.ts index 36da96d6c9..cd499c744a 100644 --- a/packages/cli/src/services/McpPromptLoader.ts +++ b/packages/cli/src/services/McpPromptLoader.ts @@ -1,14 +1,14 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { getErrorMessage, getMCPServerPrompts, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { CommandContext, SlashCommand, @@ -63,7 +63,7 @@ export class McpPromptLoader implements ICommandLoader { let helpMessage = `Arguments for "${prompt.name}":\n\n`; if (prompt.arguments && prompt.arguments.length > 0) { helpMessage += `You can provide arguments by name (e.g., --argName="value") or by position.\n\n`; - helpMessage += `e.g., ${prompt.name} ${prompt.arguments?.map((_) => `"foo"`)} is equivalent to ${prompt.name} ${prompt.arguments?.map((arg) => `--${arg.name}="foo"`)}\n\n`; + helpMessage += `e.g., ${prompt.name} ${prompt.arguments?.map((_: unknown) => `"foo"`)} is equivalent to ${prompt.name} ${prompt.arguments?.map((arg: { name: string }) => `--${arg.name}="foo"`)}\n\n`; } for (const arg of prompt.arguments) { helpMessage += ` --${arg.name}\n`; @@ -170,7 +170,7 @@ export class McpPromptLoader implements ICommandLoader { const providedArgNames = Object.keys(promptInputs); const unusedArguments = prompt.arguments - .filter((arg) => { + .filter((arg: { name: string; required?: boolean }) => { // If this arguments is not in the prompt inputs // add it to unusedArguments if (!providedArgNames.includes(arg.name)) { @@ -186,11 +186,11 @@ export class McpPromptLoader implements ICommandLoader { const argValue = promptInputs[arg.name]; return argValue === partialArg; }) - .map((argument) => `--${argument.name}="`) || []; + .map((argument: { name: string }) => `--${argument.name}="`) || []; const exactlyMatchingArgumentAtTheEnd = prompt.arguments - .map((argument) => `--${argument.name}="`) - .filter((flagArgument) => { + .map((argument: { name: string }) => `--${argument.name}="`) + .filter((flagArgument: string) => { const regex = new RegExp(`${flagArgument}[^"]*$`); return regex.test(invocation.raw); }); @@ -205,7 +205,7 @@ export class McpPromptLoader implements ICommandLoader { return [`${partialArg}"`]; } - const matchingArguments = unusedArguments.filter((flagArgument) => + const matchingArguments = unusedArguments.filter((flagArgument: string) => flagArgument.startsWith(partialArg), ); diff --git a/packages/cli/src/services/command-factory.ts b/packages/cli/src/services/command-factory.ts index 1720401e1f..22a6eb0680 100644 --- a/packages/cli/src/services/command-factory.ts +++ b/packages/cli/src/services/command-factory.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ */ import path from 'node:path'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import type { CommandContext, SlashCommand, diff --git a/packages/cli/src/services/command-migration-tool.test.ts b/packages/cli/src/services/command-migration-tool.test.ts index 618a38f946..bea5e00ed7 100644 --- a/packages/cli/src/services/command-migration-tool.test.ts +++ b/packages/cli/src/services/command-migration-tool.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/command-migration-tool.ts b/packages/cli/src/services/command-migration-tool.ts index 68324ed171..5ed0f45518 100644 --- a/packages/cli/src/services/command-migration-tool.ts +++ b/packages/cli/src/services/command-migration-tool.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { promises as fs } from 'node:fs'; import path from 'node:path'; import { glob } from 'glob'; -import { convertTomlToMarkdown } from '@qwen-code/qwen-code-core'; +import { convertTomlToMarkdown } from '@bwen-code/bwen-code-core'; import { t } from '../i18n/index.js'; export interface MigrationResult { diff --git a/packages/cli/src/services/insight/generators/DataProcessor.test.ts b/packages/cli/src/services/insight/generators/DataProcessor.test.ts index 4b78cf1bb4..2deeee2035 100644 --- a/packages/cli/src/services/insight/generators/DataProcessor.test.ts +++ b/packages/cli/src/services/insight/generators/DataProcessor.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 @@ -6,17 +6,17 @@ import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; import { DataProcessor } from './DataProcessor.js'; -import type { Config, ChatRecord } from '@qwen-code/qwen-code-core'; +import type { Config, ChatRecord } from '@bwen-code/bwen-code-core'; import type { InsightData, SessionFacets, } from '../types/StaticInsightTypes.js'; // Mock dependencies -vi.mock('@qwen-code/qwen-code-core', async () => { +vi.mock('@bwen-code/bwen-code-core', async () => { const actual = await vi.importActual< - typeof import('@qwen-code/qwen-code-core') - >('@qwen-code/qwen-code-core'); + typeof import('@bwen-code/bwen-code-core') + >('@bwen-code/bwen-code-core'); return { ...actual, read: vi.fn(), @@ -39,7 +39,7 @@ vi.mock('fs/promises', () => ({ })); import fs from 'fs/promises'; -import { read as readJsonlFile } from '@qwen-code/qwen-code-core'; +import { read as readJsonlFile } from '@bwen-code/bwen-code-core'; const mockedFs = vi.mocked(fs); const mockedReadJsonlFile = vi.mocked(readJsonlFile); diff --git a/packages/cli/src/services/insight/generators/DataProcessor.ts b/packages/cli/src/services/insight/generators/DataProcessor.ts index c77e28a497..c8503bde34 100644 --- a/packages/cli/src/services/insight/generators/DataProcessor.ts +++ b/packages/cli/src/services/insight/generators/DataProcessor.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import path from 'path'; import { read as readJsonlFile, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import pLimit from 'p-limit'; import type { InsightData, @@ -33,7 +33,7 @@ import { getInsightPrompt, type Config, type ChatRecord, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; const logger = createDebugLogger('DataProcessor'); diff --git a/packages/cli/src/services/insight/generators/StaticInsightGenerator.ts b/packages/cli/src/services/insight/generators/StaticInsightGenerator.ts index 6d0c661cc7..3baf98dedd 100644 --- a/packages/cli/src/services/insight/generators/StaticInsightGenerator.ts +++ b/packages/cli/src/services/insight/generators/StaticInsightGenerator.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 @@ -14,7 +14,7 @@ import type { InsightProgressCallback, } from '../types/StaticInsightTypes.js'; -import { updateSymlink, type Config } from '@qwen-code/qwen-code-core'; +import { updateSymlink, type Config } from '@bwen-code/bwen-code-core'; export class StaticInsightGenerator { private dataProcessor: DataProcessor; diff --git a/packages/cli/src/services/insight/generators/TemplateRenderer.ts b/packages/cli/src/services/insight/generators/TemplateRenderer.ts index 8b6f779f7d..fedc908e6b 100644 --- a/packages/cli/src/services/insight/generators/TemplateRenderer.ts +++ b/packages/cli/src/services/insight/generators/TemplateRenderer.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 */ -import { INSIGHT_JS, INSIGHT_CSS } from '@qwen-code/web-templates'; +import { INSIGHT_JS, INSIGHT_CSS } from '@bwen-code/web-templates'; import type { InsightData } from '../types/StaticInsightTypes.js'; export class TemplateRenderer { diff --git a/packages/cli/src/services/insight/types/QualitativeInsightTypes.ts b/packages/cli/src/services/insight/types/QualitativeInsightTypes.ts index aa9bea1699..5d8e4d8f31 100644 --- a/packages/cli/src/services/insight/types/QualitativeInsightTypes.ts +++ b/packages/cli/src/services/insight/types/QualitativeInsightTypes.ts @@ -1,4 +1,4 @@ -export interface InsightImpressiveWorkflows { +export interface InsightImpressiveWorkflows { intro: string; impressive_workflows: Array<{ title: string; diff --git a/packages/cli/src/services/insight/types/StaticInsightTypes.ts b/packages/cli/src/services/insight/types/StaticInsightTypes.ts index 29ce39f164..5a14aeae69 100644 --- a/packages/cli/src/services/insight/types/StaticInsightTypes.ts +++ b/packages/cli/src/services/insight/types/StaticInsightTypes.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/markdown-command-parser.test.ts b/packages/cli/src/services/markdown-command-parser.test.ts index bbefa43a4f..4888d93957 100644 --- a/packages/cli/src/services/markdown-command-parser.test.ts +++ b/packages/cli/src/services/markdown-command-parser.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/markdown-command-parser.ts b/packages/cli/src/services/markdown-command-parser.ts index 5d4a3b7df9..07df932107 100644 --- a/packages/cli/src/services/markdown-command-parser.ts +++ b/packages/cli/src/services/markdown-command-parser.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { z } from 'zod'; import { parse as parseYaml, normalizeContent, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; /** * Defines the Zod schema for a Markdown command definition file. diff --git a/packages/cli/src/services/prompt-processors/argumentProcessor.test.ts b/packages/cli/src/services/prompt-processors/argumentProcessor.test.ts index 80bde1287d..a91e200cd7 100644 --- a/packages/cli/src/services/prompt-processors/argumentProcessor.test.ts +++ b/packages/cli/src/services/prompt-processors/argumentProcessor.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/prompt-processors/argumentProcessor.ts b/packages/cli/src/services/prompt-processors/argumentProcessor.ts index 5265eaebf4..89a8d054d9 100644 --- a/packages/cli/src/services/prompt-processors/argumentProcessor.ts +++ b/packages/cli/src/services/prompt-processors/argumentProcessor.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import { appendToLastTextPart } from '@qwen-code/qwen-code-core'; +import { appendToLastTextPart } from '@bwen-code/bwen-code-core'; import type { IPromptProcessor, PromptPipelineContent } from './types.js'; import type { CommandContext } from '../../ui/commands/types.js'; diff --git a/packages/cli/src/services/prompt-processors/atFileProcessor.test.ts b/packages/cli/src/services/prompt-processors/atFileProcessor.test.ts index 0a50308cf6..215576f263 100644 --- a/packages/cli/src/services/prompt-processors/atFileProcessor.test.ts +++ b/packages/cli/src/services/prompt-processors/atFileProcessor.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,12 +9,12 @@ import { createMockCommandContext } from '../../test-utils/mockCommandContext.js import { type CommandContext } from '../../ui/commands/types.js'; import { AtFileProcessor } from './atFileProcessor.js'; import { MessageType } from '../../ui/types.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import type { PartUnion } from '@google/genai'; // Mock the core dependency const mockReadPathFromWorkspace = vi.hoisted(() => vi.fn()); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = await importOriginal(); return { ...original, diff --git a/packages/cli/src/services/prompt-processors/atFileProcessor.ts b/packages/cli/src/services/prompt-processors/atFileProcessor.ts index 118b1c1e06..4f356672c7 100644 --- a/packages/cli/src/services/prompt-processors/atFileProcessor.ts +++ b/packages/cli/src/services/prompt-processors/atFileProcessor.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { flatMapTextParts, readPathFromWorkspace, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { CommandContext } from '../../ui/commands/types.js'; import { MessageType } from '../../ui/types.js'; import { diff --git a/packages/cli/src/services/prompt-processors/injectionParser.test.ts b/packages/cli/src/services/prompt-processors/injectionParser.test.ts index 5ce0f8f79f..e049efeaf8 100644 --- a/packages/cli/src/services/prompt-processors/injectionParser.test.ts +++ b/packages/cli/src/services/prompt-processors/injectionParser.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/prompt-processors/injectionParser.ts b/packages/cli/src/services/prompt-processors/injectionParser.ts index 52d3226db8..3c2408c192 100644 --- a/packages/cli/src/services/prompt-processors/injectionParser.ts +++ b/packages/cli/src/services/prompt-processors/injectionParser.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/prompt-processors/shellProcessor.test.ts b/packages/cli/src/services/prompt-processors/shellProcessor.test.ts index 151faf3241..c8dbb460c7 100644 --- a/packages/cli/src/services/prompt-processors/shellProcessor.test.ts +++ b/packages/cli/src/services/prompt-processors/shellProcessor.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,8 +8,8 @@ import { describe, it, expect, beforeEach, vi, type Mock } from 'vitest'; import { ConfirmationRequiredError, ShellProcessor } from './shellProcessor.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; import type { CommandContext } from '../../ui/commands/types.js'; -import type { Config } from '@qwen-code/qwen-code-core'; -import { ApprovalMode } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; +import { ApprovalMode } from '@bwen-code/bwen-code-core'; import os from 'node:os'; import { quote } from 'shell-quote'; import { createPartFromText } from '@google/genai'; @@ -41,7 +41,7 @@ function createPromptPipelineContent(text: string): PromptPipelineContent { const mockCheckCommandPermissions = vi.hoisted(() => vi.fn()); const mockShellExecute = vi.hoisted(() => vi.fn()); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = await importOriginal(); return { ...original, diff --git a/packages/cli/src/services/prompt-processors/shellProcessor.ts b/packages/cli/src/services/prompt-processors/shellProcessor.ts index 2a6df71612..5a5c7c9d39 100644 --- a/packages/cli/src/services/prompt-processors/shellProcessor.ts +++ b/packages/cli/src/services/prompt-processors/shellProcessor.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -12,8 +12,8 @@ import { getShellConfiguration, ShellExecutionService, flatMapTextParts, -} from '@qwen-code/qwen-code-core'; -import type { AnyToolInvocation } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import type { AnyToolInvocation } from '@bwen-code/bwen-code-core'; import type { CommandContext } from '../../ui/commands/types.js'; import type { IPromptProcessor, PromptPipelineContent } from './types.js'; diff --git a/packages/cli/src/services/prompt-processors/types.ts b/packages/cli/src/services/prompt-processors/types.ts index c687657443..f17df42db7 100644 --- a/packages/cli/src/services/prompt-processors/types.ts +++ b/packages/cli/src/services/prompt-processors/types.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/services/types.ts b/packages/cli/src/services/types.ts index 13a87687ee..895fb1ea95 100644 --- a/packages/cli/src/services/types.ts +++ b/packages/cli/src/services/types.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/test-utils/customMatchers.ts b/packages/cli/src/test-utils/customMatchers.ts index 2a1b275ad2..206a5b3b26 100644 --- a/packages/cli/src/test-utils/customMatchers.ts +++ b/packages/cli/src/test-utils/customMatchers.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/test-utils/mockCommandContext.test.ts b/packages/cli/src/test-utils/mockCommandContext.test.ts index 310bf74864..df90ce9edf 100644 --- a/packages/cli/src/test-utils/mockCommandContext.test.ts +++ b/packages/cli/src/test-utils/mockCommandContext.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/test-utils/mockCommandContext.ts b/packages/cli/src/test-utils/mockCommandContext.ts index fd825b9df5..d2f190c66f 100644 --- a/packages/cli/src/test-utils/mockCommandContext.ts +++ b/packages/cli/src/test-utils/mockCommandContext.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import { vi } from 'vitest'; import type { CommandContext } from '../ui/commands/types.js'; import type { LoadedSettings } from '../config/settings.js'; -import type { GitService } from '@qwen-code/qwen-code-core'; +import type { GitService } from '@bwen-code/bwen-code-core'; import type { SessionStatsState } from '../ui/contexts/SessionContext.js'; import { ToolCallDecision } from '../ui/contexts/SessionContext.js'; diff --git a/packages/cli/src/test-utils/render.tsx b/packages/cli/src/test-utils/render.tsx index 9cb768b5ed..fb48a375ea 100644 --- a/packages/cli/src/test-utils/render.tsx +++ b/packages/cli/src/test-utils/render.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { render } from 'ink-testing-library'; import type React from 'react'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { LoadedSettings } from '../config/settings.js'; import { KeypressProvider } from '../ui/contexts/KeypressContext.js'; import { SettingsContext } from '../ui/contexts/SettingsContext.js'; diff --git a/packages/cli/src/types/modelcontextprotocol.d.ts b/packages/cli/src/types/modelcontextprotocol.d.ts new file mode 100644 index 0000000000..1270003af2 --- /dev/null +++ b/packages/cli/src/types/modelcontextprotocol.d.ts @@ -0,0 +1,29 @@ +// Type declarations for @modelcontextprotocol/sdk modules + +declare module '@modelcontextprotocol/sdk/client/index.js' { + export class Client { + constructor(clientInfo: { name: string; version: string }, options?: { capabilities?: Record }); + connect(transport: unknown, options?: { timeout?: number }): Promise; + close(): Promise; + callTool(params: { name: string; arguments?: Record }): Promise; + listTools(): Promise<{ tools: { name: string; description?: string }[] }>; + ping(): Promise; + onerror?: (error: Error) => void; + } +} + +declare module '@modelcontextprotocol/sdk/types.js' { + export interface JSONRPCMessage { + jsonrpc: string; + id?: string | number; + method?: string; + params?: unknown; + result?: unknown; + error?: { code: number; message: string; data?: unknown }; + } + export interface PromptArgument { + name: string; + description?: string; + required?: boolean; + } +} diff --git a/packages/cli/src/ui/App.test.tsx b/packages/cli/src/ui/App.test.tsx index be09fe52fa..a271cb57c7 100644 --- a/packages/cli/src/ui/App.test.tsx +++ b/packages/cli/src/ui/App.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx index 54684a8c2c..217417ba6c 100644 --- a/packages/cli/src/ui/App.tsx +++ b/packages/cli/src/ui/App.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,9 +10,11 @@ import { StreamingContext } from './contexts/StreamingContext.js'; import { QuittingDisplay } from './components/QuittingDisplay.js'; import { ScreenReaderAppLayout } from './layouts/ScreenReaderAppLayout.js'; import { DefaultAppLayout } from './layouts/DefaultAppLayout.js'; +import { useConfig } from './contexts/ConfigContext.js'; export const App = () => { const uiState = useUIState(); + const config = useConfig(); const isScreenReaderEnabled = useIsScreenReaderEnabled(); if (uiState.quittingMessages) { @@ -21,7 +23,11 @@ export const App = () => { return ( - {isScreenReaderEnabled ? : } + {isScreenReaderEnabled ? ( + + ) : ( + + )} ); }; diff --git a/packages/cli/src/ui/AppContainer.test.tsx b/packages/cli/src/ui/AppContainer.test.tsx index 9e9d4f6732..4a38043d78 100644 --- a/packages/cli/src/ui/AppContainer.test.tsx +++ b/packages/cli/src/ui/AppContainer.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -20,7 +20,7 @@ import { makeFakeConfig, type GeminiClient, type SubagentManager, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { LoadedSettings } from '../config/settings.js'; import type { InitializationResult } from '../core/initializer.js'; import { UIStateContext, type UIState } from './contexts/UIStateContext.js'; @@ -107,7 +107,7 @@ import { useLogger } from './hooks/useLogger.js'; import { useLoadingIndicator } from './hooks/useLoadingIndicator.js'; import { measureElement } from 'ink'; import { useTerminalSize } from './hooks/useTerminalSize.js'; -import { ShellExecutionService } from '@qwen-code/qwen-code-core'; +import { ShellExecutionService } from '@bwen-code/bwen-code-core'; describe('AppContainer State Management', () => { let mockConfig: Config; diff --git a/packages/cli/src/ui/AppContainer.tsx b/packages/cli/src/ui/AppContainer.tsx index c6bfa67c3c..725442e782 100644 --- a/packages/cli/src/ui/AppContainer.tsx +++ b/packages/cli/src/ui/AppContainer.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -39,7 +39,7 @@ import { getAllGeminiMdFilenames, ShellExecutionService, Storage, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { buildResumedHistoryItems } from './utils/resumeHistoryUtils.js'; import { validateAuthMethod } from '../config/auth.js'; import { loadHierarchicalGeminiMemory } from '../config/config.js'; @@ -526,6 +526,7 @@ export const AppContainer = (props: AppContainerProps) => { openExtensionsManagerDialog, openMcpDialog, openResumeDialog, + toggleFileTree: () => setShowFileTree((prev) => !prev), }), [ openAuthDialog, @@ -877,6 +878,7 @@ export const AppContainer = (props: AppContainerProps) => { >(); const [showEscapePrompt, setShowEscapePrompt] = useState(false); const [showIdeRestartPrompt, setShowIdeRestartPrompt] = useState(false); + const [showFileTree, setShowFileTree] = useState(false); const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings, setIsTrustedFolder); @@ -1430,6 +1432,8 @@ export const AppContainer = (props: AppContainerProps) => { isMcpDialogOpen, // Feedback dialog isFeedbackDialogOpen, + // File tree panel + showFileTree, }), [ isThemeDialogOpen, @@ -1524,6 +1528,8 @@ export const AppContainer = (props: AppContainerProps) => { isMcpDialogOpen, // Feedback dialog isFeedbackDialogOpen, + // File tree panel + showFileTree, ], ); @@ -1576,6 +1582,8 @@ export const AppContainer = (props: AppContainerProps) => { closeFeedbackDialog, temporaryCloseFeedbackDialog, submitFeedback, + // File tree panel + toggleFileTree: () => setShowFileTree((prev) => !prev), }), [ openThemeDialog, @@ -1623,6 +1631,7 @@ export const AppContainer = (props: AppContainerProps) => { closeFeedbackDialog, temporaryCloseFeedbackDialog, submitFeedback, + setShowFileTree, ], ); diff --git a/packages/cli/src/ui/CommandFormatMigrationNudge.tsx b/packages/cli/src/ui/CommandFormatMigrationNudge.tsx index 5e1070e86e..08a5623f03 100644 --- a/packages/cli/src/ui/CommandFormatMigrationNudge.tsx +++ b/packages/cli/src/ui/CommandFormatMigrationNudge.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/FeedbackDialog.tsx b/packages/cli/src/ui/FeedbackDialog.tsx index 6482e1592b..70ecdcfeea 100644 --- a/packages/cli/src/ui/FeedbackDialog.tsx +++ b/packages/cli/src/ui/FeedbackDialog.tsx @@ -1,4 +1,4 @@ -import { Box, Text } from 'ink'; +import { Box, Text } from 'ink'; import type React from 'react'; import { t } from '../i18n/index.js'; import { useUIActions } from './contexts/UIActionsContext.js'; diff --git a/packages/cli/src/ui/IdeIntegrationNudge.tsx b/packages/cli/src/ui/IdeIntegrationNudge.tsx index 9cd6d53113..10e1591037 100644 --- a/packages/cli/src/ui/IdeIntegrationNudge.tsx +++ b/packages/cli/src/ui/IdeIntegrationNudge.tsx @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import type { IdeInfo } from '@qwen-code/qwen-code-core'; +import type { IdeInfo } from '@bwen-code/bwen-code-core'; import { Box, Text } from 'ink'; import type { RadioSelectItem } from './components/shared/RadioButtonSelect.js'; import { RadioButtonSelect } from './components/shared/RadioButtonSelect.js'; diff --git a/packages/cli/src/ui/auth/AuthDialog.test.tsx b/packages/cli/src/ui/auth/AuthDialog.test.tsx index 90b15c968c..81fedb9e54 100644 --- a/packages/cli/src/ui/auth/AuthDialog.test.tsx +++ b/packages/cli/src/ui/auth/AuthDialog.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,8 +7,8 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { AuthDialog } from './AuthDialog.js'; import { LoadedSettings } from '../../config/settings.js'; -import type { Config } from '@qwen-code/qwen-code-core'; -import { AuthType } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import { renderWithProviders } from '../../test-utils/render.js'; import { UIStateContext } from '../contexts/UIStateContext.js'; import { UIActionsContext } from '../contexts/UIActionsContext.js'; diff --git a/packages/cli/src/ui/auth/AuthDialog.tsx b/packages/cli/src/ui/auth/AuthDialog.tsx index 4469a0759c..8b7233c6d5 100644 --- a/packages/cli/src/ui/auth/AuthDialog.tsx +++ b/packages/cli/src/ui/auth/AuthDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import type React from 'react'; import { useState } from 'react'; -import { AuthType } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import { Box, Text } from 'ink'; import Link from 'ink-link'; import { theme } from '../semantic-colors.js'; diff --git a/packages/cli/src/ui/auth/AuthInProgress.tsx b/packages/cli/src/ui/auth/AuthInProgress.tsx index 69a0eca3b6..8204bceefe 100644 --- a/packages/cli/src/ui/auth/AuthInProgress.tsx +++ b/packages/cli/src/ui/auth/AuthInProgress.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/auth/useAuth.ts b/packages/cli/src/ui/auth/useAuth.ts index 283a0d155e..cbac1fc9cb 100644 --- a/packages/cli/src/ui/auth/useAuth.ts +++ b/packages/cli/src/ui/auth/useAuth.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,13 +9,13 @@ import type { ContentGeneratorConfig, ModelProvidersConfig, ProviderModelConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { AuthEvent, AuthType, getErrorMessage, logAuth, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { useCallback, useEffect, useState } from 'react'; import type { LoadedSettings } from '../../config/settings.js'; import { getPersistScopeForModelSelection } from '../../config/modelProvidersScope.js'; diff --git a/packages/cli/src/ui/colors.ts b/packages/cli/src/ui/colors.ts index 0fb75a358a..c4c98d8d09 100644 --- a/packages/cli/src/ui/colors.ts +++ b/packages/cli/src/ui/colors.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/aboutCommand.test.ts b/packages/cli/src/ui/commands/aboutCommand.test.ts index 4920f2404a..4f15b0af31 100644 --- a/packages/cli/src/ui/commands/aboutCommand.test.ts +++ b/packages/cli/src/ui/commands/aboutCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/aboutCommand.ts b/packages/cli/src/ui/commands/aboutCommand.ts index 1570b9e3d3..9faaa4e171 100644 --- a/packages/cli/src/ui/commands/aboutCommand.ts +++ b/packages/cli/src/ui/commands/aboutCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/agentsCommand.ts b/packages/cli/src/ui/commands/agentsCommand.ts index 02fed007be..6550a91119 100644 --- a/packages/cli/src/ui/commands/agentsCommand.ts +++ b/packages/cli/src/ui/commands/agentsCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/approvalModeCommand.test.ts b/packages/cli/src/ui/commands/approvalModeCommand.test.ts index c036bceda3..047c610384 100644 --- a/packages/cli/src/ui/commands/approvalModeCommand.test.ts +++ b/packages/cli/src/ui/commands/approvalModeCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/approvalModeCommand.ts b/packages/cli/src/ui/commands/approvalModeCommand.ts index f41e4b1cf1..cb785da7e5 100644 --- a/packages/cli/src/ui/commands/approvalModeCommand.ts +++ b/packages/cli/src/ui/commands/approvalModeCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -12,8 +12,8 @@ import type { } from './types.js'; import { CommandKind } from './types.js'; import { t } from '../../i18n/index.js'; -import type { ApprovalMode } from '@qwen-code/qwen-code-core'; -import { APPROVAL_MODES } from '@qwen-code/qwen-code-core'; +import type { ApprovalMode } from '@bwen-code/bwen-code-core'; +import { APPROVAL_MODES } from '@bwen-code/bwen-code-core'; /** * Parses the argument string and returns the corresponding ApprovalMode if valid. diff --git a/packages/cli/src/ui/commands/authCommand.test.ts b/packages/cli/src/ui/commands/authCommand.test.ts index 8930af62da..8345c8546d 100644 --- a/packages/cli/src/ui/commands/authCommand.test.ts +++ b/packages/cli/src/ui/commands/authCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/authCommand.ts b/packages/cli/src/ui/commands/authCommand.ts index 83ab454b0c..56d95d1e91 100644 --- a/packages/cli/src/ui/commands/authCommand.ts +++ b/packages/cli/src/ui/commands/authCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/bugCommand.test.ts b/packages/cli/src/ui/commands/bugCommand.test.ts index d8d8e83a05..5b093af7d2 100644 --- a/packages/cli/src/ui/commands/bugCommand.test.ts +++ b/packages/cli/src/ui/commands/bugCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import open from 'open'; import { bugCommand } from './bugCommand.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; import { GIT_COMMIT_INFO } from '../../generated/git-commit.js'; -import { AuthType } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import * as systemInfoUtils from '../../utils/systemInfo.js'; // Mock dependencies diff --git a/packages/cli/src/ui/commands/bugCommand.ts b/packages/cli/src/ui/commands/bugCommand.ts index 6bedbfebff..94c5fc9975 100644 --- a/packages/cli/src/ui/commands/bugCommand.ts +++ b/packages/cli/src/ui/commands/bugCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/clearCommand.test.ts b/packages/cli/src/ui/commands/clearCommand.test.ts index e94c974fb9..28a27b313d 100644 --- a/packages/cli/src/ui/commands/clearCommand.test.ts +++ b/packages/cli/src/ui/commands/clearCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,8 +10,8 @@ import { type CommandContext } from './types.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; // Mock the telemetry service -vi.mock('@qwen-code/qwen-code-core', async () => { - const actual = await vi.importActual('@qwen-code/qwen-code-core'); +vi.mock('@bwen-code/bwen-code-core', async () => { + const actual = await vi.importActual('@bwen-code/bwen-code-core'); return { ...actual, uiTelemetryService: { @@ -20,7 +20,7 @@ vi.mock('@qwen-code/qwen-code-core', async () => { }; }); -import type { GeminiClient } from '@qwen-code/qwen-code-core'; +import type { GeminiClient } from '@bwen-code/bwen-code-core'; describe('clearCommand', () => { let mockContext: CommandContext; diff --git a/packages/cli/src/ui/commands/clearCommand.ts b/packages/cli/src/ui/commands/clearCommand.ts index dd774934be..d92413f2d8 100644 --- a/packages/cli/src/ui/commands/clearCommand.ts +++ b/packages/cli/src/ui/commands/clearCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import type { SlashCommand } from './types.js'; import { CommandKind } from './types.js'; import { t } from '../../i18n/index.js'; -import { uiTelemetryService } from '@qwen-code/qwen-code-core'; +import { uiTelemetryService } from '@bwen-code/bwen-code-core'; export const clearCommand: SlashCommand = { name: 'clear', diff --git a/packages/cli/src/ui/commands/compressCommand.test.ts b/packages/cli/src/ui/commands/compressCommand.test.ts index 03f6c756a5..ad665d514d 100644 --- a/packages/cli/src/ui/commands/compressCommand.test.ts +++ b/packages/cli/src/ui/commands/compressCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { CompressionStatus, type ChatCompressionInfo, type GeminiClient, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { vi, describe, it, expect, beforeEach } from 'vitest'; import { compressCommand } from './compressCommand.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; diff --git a/packages/cli/src/ui/commands/compressCommand.ts b/packages/cli/src/ui/commands/compressCommand.ts index cdd07d45de..afeb456b36 100644 --- a/packages/cli/src/ui/commands/compressCommand.ts +++ b/packages/cli/src/ui/commands/compressCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/copyCommand.test.ts b/packages/cli/src/ui/commands/copyCommand.test.ts index b075319674..e6db68c440 100644 --- a/packages/cli/src/ui/commands/copyCommand.test.ts +++ b/packages/cli/src/ui/commands/copyCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/copyCommand.ts b/packages/cli/src/ui/commands/copyCommand.ts index 421b0323bc..c17bfa29da 100644 --- a/packages/cli/src/ui/commands/copyCommand.ts +++ b/packages/cli/src/ui/commands/copyCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/directoryCommand.test.tsx b/packages/cli/src/ui/commands/directoryCommand.test.tsx index 54b6e0a3a0..fc0144e328 100644 --- a/packages/cli/src/ui/commands/directoryCommand.test.tsx +++ b/packages/cli/src/ui/commands/directoryCommand.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { directoryCommand, expandHomeDir } from './directoryCommand.js'; -import type { Config, WorkspaceContext } from '@qwen-code/qwen-code-core'; +import type { Config, WorkspaceContext } from '@bwen-code/bwen-code-core'; import type { CommandContext } from './types.js'; import { MessageType } from '../types.js'; import * as os from 'node:os'; diff --git a/packages/cli/src/ui/commands/directoryCommand.tsx b/packages/cli/src/ui/commands/directoryCommand.tsx index 1fcd83dd32..21506542fd 100644 --- a/packages/cli/src/ui/commands/directoryCommand.tsx +++ b/packages/cli/src/ui/commands/directoryCommand.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import { CommandKind } from './types.js'; import { MessageType } from '../types.js'; import * as os from 'node:os'; import * as path from 'node:path'; -import { loadServerHierarchicalMemory } from '@qwen-code/qwen-code-core'; +import { loadServerHierarchicalMemory } from '@bwen-code/bwen-code-core'; import { t } from '../../i18n/index.js'; export function expandHomeDir(p: string): string { diff --git a/packages/cli/src/ui/commands/docsCommand.test.ts b/packages/cli/src/ui/commands/docsCommand.test.ts index b38b64dd69..6f135f0489 100644 --- a/packages/cli/src/ui/commands/docsCommand.test.ts +++ b/packages/cli/src/ui/commands/docsCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/docsCommand.ts b/packages/cli/src/ui/commands/docsCommand.ts index 8fc0183626..587058b3c3 100644 --- a/packages/cli/src/ui/commands/docsCommand.ts +++ b/packages/cli/src/ui/commands/docsCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/editorCommand.test.ts b/packages/cli/src/ui/commands/editorCommand.test.ts index 9b5e84d3d1..3750f91c83 100644 --- a/packages/cli/src/ui/commands/editorCommand.test.ts +++ b/packages/cli/src/ui/commands/editorCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/editorCommand.ts b/packages/cli/src/ui/commands/editorCommand.ts index f39cbdbcaf..412e863915 100644 --- a/packages/cli/src/ui/commands/editorCommand.ts +++ b/packages/cli/src/ui/commands/editorCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/exportCommand.test.ts b/packages/cli/src/ui/commands/exportCommand.test.ts index 6550c225fb..63bf371fe7 100644 --- a/packages/cli/src/ui/commands/exportCommand.test.ts +++ b/packages/cli/src/ui/commands/exportCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import * as fs from 'node:fs/promises'; import { exportCommand } from './exportCommand.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; -import type { ChatRecord } from '@qwen-code/qwen-code-core'; +import type { ChatRecord } from '@bwen-code/bwen-code-core'; import type { Part, Content } from '@google/genai'; import { collectSessionData, @@ -22,7 +22,7 @@ const mockSessionServiceMocks = vi.hoisted(() => ({ loadSession: vi.fn(), })); -vi.mock('@qwen-code/qwen-code-core', () => { +vi.mock('@bwen-code/bwen-code-core', () => { class SessionService { constructor(_cwd: string) {} async loadSession(_sessionId: string) { diff --git a/packages/cli/src/ui/commands/exportCommand.ts b/packages/cli/src/ui/commands/exportCommand.ts index 8edec9f4dc..1d038f89fc 100644 --- a/packages/cli/src/ui/commands/exportCommand.ts +++ b/packages/cli/src/ui/commands/exportCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import { type MessageActionReturn, CommandKind, } from './types.js'; -import { SessionService } from '@qwen-code/qwen-code-core'; +import { SessionService } from '@bwen-code/bwen-code-core'; import { collectSessionData, normalizeSessionData, diff --git a/packages/cli/src/ui/commands/extensionsCommand.test.ts b/packages/cli/src/ui/commands/extensionsCommand.test.ts index 33ea72e30e..45bf6fafd2 100644 --- a/packages/cli/src/ui/commands/extensionsCommand.test.ts +++ b/packages/cli/src/ui/commands/extensionsCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -20,11 +20,11 @@ import { import { ExtensionManager, parseInstallSource, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actual = - await importOriginal(); + await importOriginal(); return { ...actual, parseInstallSource: vi.fn(), diff --git a/packages/cli/src/ui/commands/extensionsCommand.ts b/packages/cli/src/ui/commands/extensionsCommand.ts index 99667959ba..3e3c98a597 100644 --- a/packages/cli/src/ui/commands/extensionsCommand.ts +++ b/packages/cli/src/ui/commands/extensionsCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -16,7 +16,7 @@ import { ExtensionManager, parseInstallSource, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import open from 'open'; const debugLogger = createDebugLogger('EXTENSIONS_COMMAND'); diff --git a/packages/cli/src/ui/commands/fileTreeCommand.ts b/packages/cli/src/ui/commands/fileTreeCommand.ts new file mode 100644 index 0000000000..bc89d77113 --- /dev/null +++ b/packages/cli/src/ui/commands/fileTreeCommand.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright 2025 Qwen Team + * SPDX-License-Identifier: Apache-2.0 + */ + +import type { SlashCommand } from './types.js'; +import { CommandKind } from './types.js'; +import { t } from '../../i18n/index.js'; + +export const fileTreeCommand: SlashCommand = { + name: 'ft', + altNames: ['filetree', 'tree'], + kind: CommandKind.BUILT_IN, + get description() { + return t('toggle file tree panel in right pane'); + }, + action: async () => { + // Return a special message that will be intercepted to toggle file tree + return { + type: 'message', + messageType: 'info', + content: '__TOGGLE_FILE_TREE__', + }; + }, +}; diff --git a/packages/cli/src/ui/commands/helpCommand.test.ts b/packages/cli/src/ui/commands/helpCommand.test.ts index e956d1c53e..d63866c7d8 100644 --- a/packages/cli/src/ui/commands/helpCommand.test.ts +++ b/packages/cli/src/ui/commands/helpCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/helpCommand.ts b/packages/cli/src/ui/commands/helpCommand.ts index c4772ea083..9b7b3ec9af 100644 --- a/packages/cli/src/ui/commands/helpCommand.ts +++ b/packages/cli/src/ui/commands/helpCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/hooksCommand.ts b/packages/cli/src/ui/commands/hooksCommand.ts index 04951db7aa..643444f0ec 100644 --- a/packages/cli/src/ui/commands/hooksCommand.ts +++ b/packages/cli/src/ui/commands/hooksCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import type { } from './types.js'; import { CommandKind } from './types.js'; import { t } from '../../i18n/index.js'; -import type { HookRegistryEntry } from '@qwen-code/qwen-code-core'; +import type { HookRegistryEntry } from '@bwen-code/bwen-code-core'; /** * Format hook source for display diff --git a/packages/cli/src/ui/commands/ideCommand.test.ts b/packages/cli/src/ui/commands/ideCommand.test.ts index 1a5d493e02..6d1e68cc3c 100644 --- a/packages/cli/src/ui/commands/ideCommand.test.ts +++ b/packages/cli/src/ui/commands/ideCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,10 +8,10 @@ import type { MockInstance } from 'vitest'; import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; import { ideCommand } from './ideCommand.js'; import { type CommandContext } from './types.js'; -import { IDE_DEFINITIONS } from '@qwen-code/qwen-code-core'; -import * as core from '@qwen-code/qwen-code-core'; +import { IDE_DEFINITIONS } from '@bwen-code/bwen-code-core'; +import * as core from '@bwen-code/bwen-code-core'; -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = await importOriginal(); return { ...original, diff --git a/packages/cli/src/ui/commands/ideCommand.ts b/packages/cli/src/ui/commands/ideCommand.ts index be3a12bc95..59c816831f 100644 --- a/packages/cli/src/ui/commands/ideCommand.ts +++ b/packages/cli/src/ui/commands/ideCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,13 +11,13 @@ import { logIdeConnection, IdeConnectionEvent, IdeConnectionType, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { QWEN_CODE_COMPANION_EXTENSION_NAME, getIdeInstaller, IDEConnectionStatus, ideContextStore, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import path from 'node:path'; import type { CommandContext, diff --git a/packages/cli/src/ui/commands/initCommand.test.ts b/packages/cli/src/ui/commands/initCommand.test.ts index 6dea22c488..9642269534 100644 --- a/packages/cli/src/ui/commands/initCommand.test.ts +++ b/packages/cli/src/ui/commands/initCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/initCommand.ts b/packages/cli/src/ui/commands/initCommand.ts index 16c98dfff5..bc6aa591f1 100644 --- a/packages/cli/src/ui/commands/initCommand.ts +++ b/packages/cli/src/ui/commands/initCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import type { SlashCommand, SlashCommandActionReturn, } from './types.js'; -import { getCurrentGeminiMdFilename } from '@qwen-code/qwen-code-core'; +import { getCurrentGeminiMdFilename } from '@bwen-code/bwen-code-core'; import { CommandKind } from './types.js'; import { Text } from 'ink'; import React from 'react'; diff --git a/packages/cli/src/ui/commands/insightCommand.ts b/packages/cli/src/ui/commands/insightCommand.ts index 1693254bb4..ec4946489a 100644 --- a/packages/cli/src/ui/commands/insightCommand.ts +++ b/packages/cli/src/ui/commands/insightCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import { t } from '../../i18n/index.js'; import { join } from 'path'; import os from 'os'; import { StaticInsightGenerator } from '../../services/insight/generators/StaticInsightGenerator.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import open from 'open'; const logger = createDebugLogger('DataProcessor'); diff --git a/packages/cli/src/ui/commands/languageCommand.test.ts b/packages/cli/src/ui/commands/languageCommand.test.ts index e8ebaac01b..5dc2325e7a 100644 --- a/packages/cli/src/ui/commands/languageCommand.test.ts +++ b/packages/cli/src/ui/commands/languageCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -58,9 +58,9 @@ vi.mock('node:fs', async (importOriginal) => { }); // Mock Storage from core -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actual = - await importOriginal(); + await importOriginal(); return { ...actual, Storage: { diff --git a/packages/cli/src/ui/commands/languageCommand.ts b/packages/cli/src/ui/commands/languageCommand.ts index 6ddade4fb4..15f7fe1008 100644 --- a/packages/cli/src/ui/commands/languageCommand.ts +++ b/packages/cli/src/ui/commands/languageCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen team * SPDX-License-Identifier: Apache-2.0 @@ -28,7 +28,7 @@ import { resolveOutputLanguage, updateOutputLanguageFile, } from '../../utils/languageUtils.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('LANGUAGE_COMMAND'); diff --git a/packages/cli/src/ui/commands/mcpCommand.test.ts b/packages/cli/src/ui/commands/mcpCommand.test.ts index f6fe3ca8de..8d1eac9184 100644 --- a/packages/cli/src/ui/commands/mcpCommand.test.ts +++ b/packages/cli/src/ui/commands/mcpCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -12,11 +12,11 @@ import { MCPDiscoveryState, getMCPServerStatus, getMCPDiscoveryState, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actual = - await importOriginal(); + await importOriginal(); const mockAuthenticate = vi.fn(); return { ...actual, diff --git a/packages/cli/src/ui/commands/mcpCommand.ts b/packages/cli/src/ui/commands/mcpCommand.ts index 4ca165e352..fb3f611933 100644 --- a/packages/cli/src/ui/commands/mcpCommand.ts +++ b/packages/cli/src/ui/commands/mcpCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/memoryCommand.test.ts b/packages/cli/src/ui/commands/memoryCommand.test.ts index ce25c5158f..3487af1653 100644 --- a/packages/cli/src/ui/commands/memoryCommand.test.ts +++ b/packages/cli/src/ui/commands/memoryCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -21,11 +21,11 @@ import { setGeminiMdFilename, type FileDiscoveryService, type LoadServerHierarchicalMemoryResponse, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = - await importOriginal(); + await importOriginal(); return { ...original, getErrorMessage: vi.fn((error: unknown) => { diff --git a/packages/cli/src/ui/commands/memoryCommand.ts b/packages/cli/src/ui/commands/memoryCommand.ts index 507444e5a4..20ae6bf26a 100644 --- a/packages/cli/src/ui/commands/memoryCommand.ts +++ b/packages/cli/src/ui/commands/memoryCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import { getCurrentGeminiMdFilename, loadServerHierarchicalMemory, QWEN_DIR, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import path from 'node:path'; import os from 'node:os'; import fs from 'node:fs/promises'; diff --git a/packages/cli/src/ui/commands/modelCommand.test.ts b/packages/cli/src/ui/commands/modelCommand.test.ts index 41f95f1990..4a2465266f 100644 --- a/packages/cli/src/ui/commands/modelCommand.test.ts +++ b/packages/cli/src/ui/commands/modelCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import { AuthType, type ContentGeneratorConfig, type Config, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; // Helper function to create a mock config function createMockConfig( diff --git a/packages/cli/src/ui/commands/modelCommand.ts b/packages/cli/src/ui/commands/modelCommand.ts index 4dcc9a518b..a92149d489 100644 --- a/packages/cli/src/ui/commands/modelCommand.ts +++ b/packages/cli/src/ui/commands/modelCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/permissionsCommand.test.ts b/packages/cli/src/ui/commands/permissionsCommand.test.ts index f51e7c3df4..d524f4303e 100644 --- a/packages/cli/src/ui/commands/permissionsCommand.test.ts +++ b/packages/cli/src/ui/commands/permissionsCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/permissionsCommand.ts b/packages/cli/src/ui/commands/permissionsCommand.ts index 2b6a7c344b..be13c515c9 100644 --- a/packages/cli/src/ui/commands/permissionsCommand.ts +++ b/packages/cli/src/ui/commands/permissionsCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/quitCommand.test.ts b/packages/cli/src/ui/commands/quitCommand.test.ts index e67723fdf1..d789782b88 100644 --- a/packages/cli/src/ui/commands/quitCommand.test.ts +++ b/packages/cli/src/ui/commands/quitCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/quitCommand.ts b/packages/cli/src/ui/commands/quitCommand.ts index 4e9da3a0c6..93d7480e96 100644 --- a/packages/cli/src/ui/commands/quitCommand.ts +++ b/packages/cli/src/ui/commands/quitCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/restoreCommand.test.ts b/packages/cli/src/ui/commands/restoreCommand.test.ts index a786c3a7a5..76834b76ee 100644 --- a/packages/cli/src/ui/commands/restoreCommand.test.ts +++ b/packages/cli/src/ui/commands/restoreCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import * as path from 'node:path'; import { restoreCommand } from './restoreCommand.js'; import { type CommandContext } from './types.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; -import type { Config, GitService } from '@qwen-code/qwen-code-core'; +import type { Config, GitService } from '@bwen-code/bwen-code-core'; describe('restoreCommand', () => { let mockContext: CommandContext; diff --git a/packages/cli/src/ui/commands/restoreCommand.ts b/packages/cli/src/ui/commands/restoreCommand.ts index fce633275d..e3556fc217 100644 --- a/packages/cli/src/ui/commands/restoreCommand.ts +++ b/packages/cli/src/ui/commands/restoreCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import { type SlashCommandActionReturn, CommandKind, } from './types.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; async function restoreAction( context: CommandContext, diff --git a/packages/cli/src/ui/commands/resumeCommand.test.ts b/packages/cli/src/ui/commands/resumeCommand.test.ts index 7fe14ab09e..33cc1391b7 100644 --- a/packages/cli/src/ui/commands/resumeCommand.test.ts +++ b/packages/cli/src/ui/commands/resumeCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/resumeCommand.ts b/packages/cli/src/ui/commands/resumeCommand.ts index 20592bf397..9111b767b5 100644 --- a/packages/cli/src/ui/commands/resumeCommand.ts +++ b/packages/cli/src/ui/commands/resumeCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/settingsCommand.test.ts b/packages/cli/src/ui/commands/settingsCommand.test.ts index 6aa3111ffb..3042542eea 100644 --- a/packages/cli/src/ui/commands/settingsCommand.test.ts +++ b/packages/cli/src/ui/commands/settingsCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/settingsCommand.ts b/packages/cli/src/ui/commands/settingsCommand.ts index f7052f1921..d672c07bb6 100644 --- a/packages/cli/src/ui/commands/settingsCommand.ts +++ b/packages/cli/src/ui/commands/settingsCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/setupGithubCommand.test.ts b/packages/cli/src/ui/commands/setupGithubCommand.test.ts index 16a938bacc..c654d66bf2 100644 --- a/packages/cli/src/ui/commands/setupGithubCommand.test.ts +++ b/packages/cli/src/ui/commands/setupGithubCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/setupGithubCommand.ts b/packages/cli/src/ui/commands/setupGithubCommand.ts index 40bec554f2..6e33259fef 100644 --- a/packages/cli/src/ui/commands/setupGithubCommand.ts +++ b/packages/cli/src/ui/commands/setupGithubCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -21,7 +21,7 @@ import type { SlashCommand, SlashCommandActionReturn } from './types.js'; import { CommandKind } from './types.js'; import { getUrlOpenCommand } from '../../ui/utils/commandUtils.js'; import { t } from '../../i18n/index.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('SETUP_GITHUB'); diff --git a/packages/cli/src/ui/commands/skillsCommand.ts b/packages/cli/src/ui/commands/skillsCommand.ts index c154a479ec..6a444b20de 100644 --- a/packages/cli/src/ui/commands/skillsCommand.ts +++ b/packages/cli/src/ui/commands/skillsCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -13,8 +13,8 @@ import { import { MessageType, type HistoryItemSkillsList } from '../types.js'; import { t } from '../../i18n/index.js'; import { AsyncFzf } from 'fzf'; -import type { SkillConfig } from '@qwen-code/qwen-code-core'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import type { SkillConfig } from '@bwen-code/bwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('SKILLS_COMMAND'); diff --git a/packages/cli/src/ui/commands/statsCommand.test.ts b/packages/cli/src/ui/commands/statsCommand.test.ts index 485fcf693d..1b605a599d 100644 --- a/packages/cli/src/ui/commands/statsCommand.test.ts +++ b/packages/cli/src/ui/commands/statsCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/statsCommand.ts b/packages/cli/src/ui/commands/statsCommand.ts index cb4a3f5127..78ffb23ac6 100644 --- a/packages/cli/src/ui/commands/statsCommand.ts +++ b/packages/cli/src/ui/commands/statsCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/summaryCommand.ts b/packages/cli/src/ui/commands/summaryCommand.ts index 5e84bf53e2..75739cb345 100644 --- a/packages/cli/src/ui/commands/summaryCommand.ts +++ b/packages/cli/src/ui/commands/summaryCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { CommandKind, type SlashCommandActionReturn, } from './types.js'; -import { getProjectSummaryPrompt } from '@qwen-code/qwen-code-core'; +import { getProjectSummaryPrompt } from '@bwen-code/bwen-code-core'; import type { HistoryItemSummary } from '../types.js'; import { t } from '../../i18n/index.js'; diff --git a/packages/cli/src/ui/commands/terminalSetupCommand.test.ts b/packages/cli/src/ui/commands/terminalSetupCommand.test.ts index d0d3d6c6c5..03b08762e2 100644 --- a/packages/cli/src/ui/commands/terminalSetupCommand.test.ts +++ b/packages/cli/src/ui/commands/terminalSetupCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/terminalSetupCommand.ts b/packages/cli/src/ui/commands/terminalSetupCommand.ts index 3fb8544661..7d21e41ebc 100644 --- a/packages/cli/src/ui/commands/terminalSetupCommand.ts +++ b/packages/cli/src/ui/commands/terminalSetupCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/themeCommand.test.ts b/packages/cli/src/ui/commands/themeCommand.test.ts index 2a537bccd8..d3dd34981f 100644 --- a/packages/cli/src/ui/commands/themeCommand.test.ts +++ b/packages/cli/src/ui/commands/themeCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/themeCommand.ts b/packages/cli/src/ui/commands/themeCommand.ts index fd366366ae..e390d2bb00 100644 --- a/packages/cli/src/ui/commands/themeCommand.ts +++ b/packages/cli/src/ui/commands/themeCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/toolsCommand.test.ts b/packages/cli/src/ui/commands/toolsCommand.test.ts index 9e1eae8364..eea959db74 100644 --- a/packages/cli/src/ui/commands/toolsCommand.test.ts +++ b/packages/cli/src/ui/commands/toolsCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { describe, it, expect } from 'vitest'; import { toolsCommand } from './toolsCommand.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; import { MessageType } from '../types.js'; -import type { Tool } from '@qwen-code/qwen-code-core'; +import type { Tool } from '@bwen-code/bwen-code-core'; // Mock tools for testing const mockTools = [ diff --git a/packages/cli/src/ui/commands/toolsCommand.ts b/packages/cli/src/ui/commands/toolsCommand.ts index 4bd97e3ec4..8b3aa4a333 100644 --- a/packages/cli/src/ui/commands/toolsCommand.ts +++ b/packages/cli/src/ui/commands/toolsCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/commands/types.ts b/packages/cli/src/ui/commands/types.ts index 76eda2c071..10559b1639 100644 --- a/packages/cli/src/ui/commands/types.ts +++ b/packages/cli/src/ui/commands/types.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import type { ReactNode } from 'react'; import type { Content, PartListUnion } from '@google/genai'; -import type { Config, GitService, Logger } from '@qwen-code/qwen-code-core'; +import type { Config, GitService, Logger } from '@bwen-code/bwen-code-core'; import type { HistoryItemWithoutId, HistoryItem, diff --git a/packages/cli/src/ui/commands/vimCommand.ts b/packages/cli/src/ui/commands/vimCommand.ts index 8f3dc6bd03..0c2bb4d7d7 100644 --- a/packages/cli/src/ui/commands/vimCommand.ts +++ b/packages/cli/src/ui/commands/vimCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/AboutBox.tsx b/packages/cli/src/ui/components/AboutBox.tsx index 70ef137118..760d8704f5 100644 --- a/packages/cli/src/ui/components/AboutBox.tsx +++ b/packages/cli/src/ui/components/AboutBox.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/AnsiOutput.test.tsx b/packages/cli/src/ui/components/AnsiOutput.test.tsx index 8ed8f27d9f..68e6ea1d6c 100644 --- a/packages/cli/src/ui/components/AnsiOutput.test.tsx +++ b/packages/cli/src/ui/components/AnsiOutput.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { render } from 'ink-testing-library'; import { AnsiOutputText } from './AnsiOutput.js'; -import type { AnsiOutput, AnsiToken } from '@qwen-code/qwen-code-core'; +import type { AnsiOutput, AnsiToken } from '@bwen-code/bwen-code-core'; // Helper to create a valid AnsiToken with default values const createAnsiToken = (overrides: Partial): AnsiToken => ({ diff --git a/packages/cli/src/ui/components/AnsiOutput.tsx b/packages/cli/src/ui/components/AnsiOutput.tsx index 263100dca8..f08360d4de 100644 --- a/packages/cli/src/ui/components/AnsiOutput.tsx +++ b/packages/cli/src/ui/components/AnsiOutput.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import type { AnsiLine, AnsiOutput, AnsiToken, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; const DEFAULT_HEIGHT = 24; diff --git a/packages/cli/src/ui/components/ApiKeyInput.tsx b/packages/cli/src/ui/components/ApiKeyInput.tsx index bf885b30dd..03661a9daf 100644 --- a/packages/cli/src/ui/components/ApiKeyInput.tsx +++ b/packages/cli/src/ui/components/ApiKeyInput.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/AppHeader.test.tsx b/packages/cli/src/ui/components/AppHeader.test.tsx index 447204a559..c49cb1de99 100644 --- a/packages/cli/src/ui/components/AppHeader.test.tsx +++ b/packages/cli/src/ui/components/AppHeader.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/AppHeader.tsx b/packages/cli/src/ui/components/AppHeader.tsx index 0254a2012a..124de6c7f1 100644 --- a/packages/cli/src/ui/components/AppHeader.tsx +++ b/packages/cli/src/ui/components/AppHeader.tsx @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { Box } from 'ink'; -import { AuthType } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import { Header, AuthDisplayType } from './Header.js'; import { Tips } from './Tips.js'; import { useSettings } from '../contexts/SettingsContext.js'; diff --git a/packages/cli/src/ui/components/ApprovalModeDialog.tsx b/packages/cli/src/ui/components/ApprovalModeDialog.tsx index 48293ffdcf..d7b2b0d39d 100644 --- a/packages/cli/src/ui/components/ApprovalModeDialog.tsx +++ b/packages/cli/src/ui/components/ApprovalModeDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import type React from 'react'; import { useCallback, useState } from 'react'; import { Box, Text } from 'ink'; import { theme } from '../semantic-colors.js'; -import { ApprovalMode, APPROVAL_MODES } from '@qwen-code/qwen-code-core'; +import { ApprovalMode, APPROVAL_MODES } from '@bwen-code/bwen-code-core'; import { RadioButtonSelect } from './shared/RadioButtonSelect.js'; import type { LoadedSettings } from '../../config/settings.js'; import { SettingScope } from '../../config/settings.js'; diff --git a/packages/cli/src/ui/components/AsciiArt.ts b/packages/cli/src/ui/components/AsciiArt.ts index c70a38f4cb..3bed6865bf 100644 --- a/packages/cli/src/ui/components/AsciiArt.ts +++ b/packages/cli/src/ui/components/AsciiArt.ts @@ -1,14 +1,14 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export const shortAsciiLogo = ` - ▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄ -██╔═══██╗██║ ██║██╔════╝████╗ ██║ -██║ ██║██║ █╗ ██║█████╗ ██╔██╗ ██║ -██║▄▄ ██║██║███╗██║██╔══╝ ██║╚██╗██║ -╚██████╔╝╚███╔███╔╝███████╗██║ ╚████║ - ╚══▀▀═╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═══╝ +██╗ ██╗███████╗██████╗ ██████╗ ██████╗ +██║ ██║██╔════╝██╔══██╗██╔═══██╗██╔══██╗ +██║ █╗ ██║█████╗ ██████╔╝██║ ██║██████╔╝ +██║███╗██║██╔══╝ ██╔══██╗██║ ██║██╔══██╗ +╚███╔███╔╝███████╗██████╔╝╚██████╔╝██║ ██║ + ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝ `; diff --git a/packages/cli/src/ui/components/AutoAcceptIndicator.tsx b/packages/cli/src/ui/components/AutoAcceptIndicator.tsx index d22b39a194..a663fc1bf3 100644 --- a/packages/cli/src/ui/components/AutoAcceptIndicator.tsx +++ b/packages/cli/src/ui/components/AutoAcceptIndicator.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import type React from 'react'; import { Box, Text } from 'ink'; import { theme } from '../semantic-colors.js'; -import { ApprovalMode } from '@qwen-code/qwen-code-core'; +import { ApprovalMode } from '@bwen-code/bwen-code-core'; import { t } from '../../i18n/index.js'; interface AutoAcceptIndicatorProps { diff --git a/packages/cli/src/ui/components/Composer.test.tsx b/packages/cli/src/ui/components/Composer.test.tsx index 67d992dbe3..10333f0460 100644 --- a/packages/cli/src/ui/components/Composer.test.tsx +++ b/packages/cli/src/ui/components/Composer.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -21,7 +21,7 @@ vi.mock('../contexts/VimModeContext.js', () => ({ vimMode: 'NORMAL', })), })); -import { ApprovalMode } from '@qwen-code/qwen-code-core'; +import { ApprovalMode } from '@bwen-code/bwen-code-core'; import { StreamingState } from '../types.js'; // Mock child components diff --git a/packages/cli/src/ui/components/Composer.tsx b/packages/cli/src/ui/components/Composer.tsx index 1935492459..20c4e62eaa 100644 --- a/packages/cli/src/ui/components/Composer.tsx +++ b/packages/cli/src/ui/components/Composer.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/ConfigInitDisplay.tsx b/packages/cli/src/ui/components/ConfigInitDisplay.tsx index 264eeeafa4..99cc04627b 100644 --- a/packages/cli/src/ui/components/ConfigInitDisplay.tsx +++ b/packages/cli/src/ui/components/ConfigInitDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { useEffect, useState } from 'react'; import { appEvents } from './../../utils/events.js'; import { Box, Text } from 'ink'; import { useConfig } from '../contexts/ConfigContext.js'; -import { type McpClient, MCPServerStatus } from '@qwen-code/qwen-code-core'; +import { type McpClient, MCPServerStatus } from '@bwen-code/bwen-code-core'; import { GeminiSpinner } from './GeminiRespondingSpinner.js'; import { theme } from '../semantic-colors.js'; import { t } from '../../i18n/index.js'; diff --git a/packages/cli/src/ui/components/ConsentPrompt.test.tsx b/packages/cli/src/ui/components/ConsentPrompt.test.tsx index da31af9aa0..7a61b0ca70 100644 --- a/packages/cli/src/ui/components/ConsentPrompt.test.tsx +++ b/packages/cli/src/ui/components/ConsentPrompt.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/ConsentPrompt.tsx b/packages/cli/src/ui/components/ConsentPrompt.tsx index 0fae2c2950..3255e68661 100644 --- a/packages/cli/src/ui/components/ConsentPrompt.tsx +++ b/packages/cli/src/ui/components/ConsentPrompt.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/ContextSummaryDisplay.test.tsx b/packages/cli/src/ui/components/ContextSummaryDisplay.test.tsx index 4b3bab5db5..0830b297b1 100644 --- a/packages/cli/src/ui/components/ContextSummaryDisplay.test.tsx +++ b/packages/cli/src/ui/components/ContextSummaryDisplay.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/ContextSummaryDisplay.tsx b/packages/cli/src/ui/components/ContextSummaryDisplay.tsx index 808c0ac786..965d59adfc 100644 --- a/packages/cli/src/ui/components/ContextSummaryDisplay.tsx +++ b/packages/cli/src/ui/components/ContextSummaryDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import { theme } from '../semantic-colors.js'; import { type IdeContext, type MCPServerConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { useTerminalSize } from '../hooks/useTerminalSize.js'; import { isNarrowWidth } from '../utils/isNarrowWidth.js'; import { t } from '../../i18n/index.js'; diff --git a/packages/cli/src/ui/components/ContextUsageDisplay.tsx b/packages/cli/src/ui/components/ContextUsageDisplay.tsx index dc2e22d7c1..a3af4412b7 100644 --- a/packages/cli/src/ui/components/ContextUsageDisplay.tsx +++ b/packages/cli/src/ui/components/ContextUsageDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/DebugModeNotification.tsx b/packages/cli/src/ui/components/DebugModeNotification.tsx index 316cde9df5..81047ebaea 100644 --- a/packages/cli/src/ui/components/DebugModeNotification.tsx +++ b/packages/cli/src/ui/components/DebugModeNotification.tsx @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { Box, Text } from 'ink'; -import { Storage, isDebugLoggingDegraded } from '@qwen-code/qwen-code-core'; +import { Storage, isDebugLoggingDegraded } from '@bwen-code/bwen-code-core'; import { useConfig } from '../contexts/ConfigContext.js'; import { theme } from '../semantic-colors.js'; diff --git a/packages/cli/src/ui/components/DebugProfiler.tsx b/packages/cli/src/ui/components/DebugProfiler.tsx index 4a4d6b4c17..7516903fa1 100644 --- a/packages/cli/src/ui/components/DebugProfiler.tsx +++ b/packages/cli/src/ui/components/DebugProfiler.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/DialogManager.tsx b/packages/cli/src/ui/components/DialogManager.tsx index 26390e2706..12155b3fe5 100644 --- a/packages/cli/src/ui/components/DialogManager.tsx +++ b/packages/cli/src/ui/components/DialogManager.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -27,7 +27,7 @@ import { useUIActions } from '../contexts/UIActionsContext.js'; import { useConfig } from '../contexts/ConfigContext.js'; import { useSettings } from '../contexts/SettingsContext.js'; import { AuthState } from '../types.js'; -import { AuthType } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import process from 'node:process'; import { type UseHistoryManagerReturn } from '../hooks/useHistoryManager.js'; import { IdeTrustChangeDialog } from './IdeTrustChangeDialog.js'; diff --git a/packages/cli/src/ui/components/EditorSettingsDialog.tsx b/packages/cli/src/ui/components/EditorSettingsDialog.tsx index f2df5edaa3..7df2dee931 100644 --- a/packages/cli/src/ui/components/EditorSettingsDialog.tsx +++ b/packages/cli/src/ui/components/EditorSettingsDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -17,11 +17,11 @@ import { RadioButtonSelect } from './shared/RadioButtonSelect.js'; import { ScopeSelector } from './shared/ScopeSelector.js'; import type { LoadedSettings } from '../../config/settings.js'; import { SettingScope } from '../../config/settings.js'; -import type { EditorType } from '@qwen-code/qwen-code-core'; +import type { EditorType } from '@bwen-code/bwen-code-core'; import { createDebugLogger, isEditorAvailable, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { useKeypress } from '../hooks/useKeypress.js'; import { t } from '../../i18n/index.js'; diff --git a/packages/cli/src/ui/components/ExitWarning.tsx b/packages/cli/src/ui/components/ExitWarning.tsx index 598ff2fab4..f9cef0d674 100644 --- a/packages/cli/src/ui/components/ExitWarning.tsx +++ b/packages/cli/src/ui/components/ExitWarning.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/FileTree.tsx b/packages/cli/src/ui/components/FileTree.tsx new file mode 100644 index 0000000000..03508ed028 --- /dev/null +++ b/packages/cli/src/ui/components/FileTree.tsx @@ -0,0 +1,224 @@ +/** + * @license + * Copyright 2025 Qwen Team + * SPDX-License-Identifier: Apache-2.0 + */ + +import type React from 'react'; +import { Box, Text } from 'ink'; +import { useState, useEffect } from 'react'; +import * as fs from 'node:fs/promises'; +import * as path from 'node:path'; +import { theme } from '../semantic-colors.js'; + +export interface FileTreeNode { + name: string; + path: string; + isDirectory: boolean; + children?: FileTreeNode[]; + depth: number; +} + +export interface FileTreeProps { + rootPath: string; + width: number; + height: number; +} + +const IGNORE_PATTERNS = [ + 'node_modules', + '.git', + 'dist', + 'build', + '.next', + 'coverage', + '.qwen', + '.vscode', + '.idea', + '__pycache__', + 'venv', + '.venv', + 'target', + 'out', +]; + +const MAX_DEPTH = 4; +const MAX_CHILDREN = 50; + +export const FileTree: React.FC = ({ + rootPath, + width, + height, +}) => { + const [tree, setTree] = useState(null); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + const [expandedNodes, setExpandedNodes] = useState>(new Set()); + + // Load initial tree structure + useEffect(() => { + const loadTree = async () => { + try { + setLoading(true); + const rootName = path.basename(rootPath) || rootPath; + const rootNode: FileTreeNode = { + name: rootName, + path: rootPath, + isDirectory: true, + depth: 0, + children: [], + }; + + // Load first level + rootNode.children = await loadDirectory(rootPath, 0); + setTree(rootNode); + + // Auto-expand first level + setExpandedNodes(new Set([rootPath])); + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to load file tree'); + } finally { + setLoading(false); + } + }; + + loadTree(); + }, [rootPath]); + + const loadDirectory = async ( + dirPath: string, + depth: number, + ): Promise => { + if (depth >= MAX_DEPTH) { + return []; + } + + try { + const entries = await fs.readdir(dirPath, { withFileTypes: true }); + + // Sort: directories first, then files, alphabetically + entries.sort((a, b) => { + if (a.isDirectory() && !b.isDirectory()) return -1; + if (!a.isDirectory() && b.isDirectory()) return 1; + return a.name.localeCompare(b.name); + }); + + const nodes: FileTreeNode[] = []; + let count = 0; + + for (const entry of entries) { + if (count >= MAX_CHILDREN) { + break; + } + + // Skip ignored patterns + if (IGNORE_PATTERNS.includes(entry.name)) { + continue; + } + + // Skip hidden files (except common config files) + if (entry.name.startsWith('.') && !entry.name.match(/^\.[a-z]+rc$/)) { + continue; + } + + const childPath = path.join(dirPath, entry.name); + const node: FileTreeNode = { + name: entry.name, + path: childPath, + isDirectory: entry.isDirectory(), + depth: depth + 1, + children: [], + }; + + // Pre-load children for first level directories + if (entry.isDirectory() && depth === 0) { + try { + node.children = await loadDirectory(childPath, depth + 1); + } catch { + // Ignore errors for individual directories + } + } + + nodes.push(node); + count++; + } + + return nodes; + } catch { + return []; + } + }; + + const renderNode = (node: FileTreeNode, index: number): React.ReactNode => { + const isExpanded = expandedNodes.has(node.path); + const prefix = ' '.repeat(node.depth); + + // Calculate available width for this line + const availableWidth = width - node.depth * 2; + if (availableWidth <= 0) { + return null; + } + + // Truncate name if too long + const displayName = + node.name.length > availableWidth - 4 + ? node.name.slice(0, availableWidth - 7) + '...' + : node.name; + + return ( + + + + {prefix} + {node.isDirectory ? (isExpanded ? '📂' : '📁') : '📄'}{' '} + {displayName} + + + {node.isDirectory && isExpanded && node.children && ( + + {node.children.map((child, idx) => renderNode(child, idx))} + + )} + + ); + }; + + if (loading) { + return ( + + Loading file tree... + + ); + } + + if (error) { + return ( + + Error: {error} + + ); + } + + if (!tree) { + return ( + + No files + + ); + } + + return ( + + {tree.children && + tree.children.map((child, index) => renderNode(child, index))} + + ); +}; diff --git a/packages/cli/src/ui/components/FolderTrustDialog.test.tsx b/packages/cli/src/ui/components/FolderTrustDialog.test.tsx index aaf780ce12..0300e0707e 100644 --- a/packages/cli/src/ui/components/FolderTrustDialog.test.tsx +++ b/packages/cli/src/ui/components/FolderTrustDialog.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/FolderTrustDialog.tsx b/packages/cli/src/ui/components/FolderTrustDialog.tsx index 9aa5609f81..2a8ef058b8 100644 --- a/packages/cli/src/ui/components/FolderTrustDialog.tsx +++ b/packages/cli/src/ui/components/FolderTrustDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/Footer.test.tsx b/packages/cli/src/ui/components/Footer.test.tsx index f2b759e69b..84cc3499df 100644 --- a/packages/cli/src/ui/components/Footer.test.tsx +++ b/packages/cli/src/ui/components/Footer.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index af81f6a5d7..243b970633 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -16,7 +16,7 @@ import { isNarrowWidth } from '../utils/isNarrowWidth.js'; import { useUIState } from '../contexts/UIStateContext.js'; import { useConfig } from '../contexts/ConfigContext.js'; import { useVimMode } from '../contexts/VimModeContext.js'; -import { ApprovalMode } from '@qwen-code/qwen-code-core'; +import { ApprovalMode } from '@bwen-code/bwen-code-core'; import { t } from '../../i18n/index.js'; export const Footer: React.FC = () => { diff --git a/packages/cli/src/ui/components/GeminiRespondingSpinner.tsx b/packages/cli/src/ui/components/GeminiRespondingSpinner.tsx index cde45a3ec3..b937c2b509 100644 --- a/packages/cli/src/ui/components/GeminiRespondingSpinner.tsx +++ b/packages/cli/src/ui/components/GeminiRespondingSpinner.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/Header.test.tsx b/packages/cli/src/ui/components/Header.test.tsx index 72da62aba5..53b6ef19ec 100644 --- a/packages/cli/src/ui/components/Header.test.tsx +++ b/packages/cli/src/ui/components/Header.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/Header.tsx b/packages/cli/src/ui/components/Header.tsx index 2d919385f5..e17059c5b7 100644 --- a/packages/cli/src/ui/components/Header.tsx +++ b/packages/cli/src/ui/components/Header.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import type React from 'react'; import { Box, Text } from 'ink'; import Gradient from 'ink-gradient'; -import { shortenPath, tildeifyPath } from '@qwen-code/qwen-code-core'; +import { shortenPath, tildeifyPath } from '@bwen-code/bwen-code-core'; import { theme } from '../semantic-colors.js'; import { shortAsciiLogo } from './AsciiArt.js'; import { getAsciiArtWidth, getCachedStringWidth } from '../utils/textUtils.js'; @@ -134,10 +134,10 @@ export const Header: React.FC = ({ flexGrow={showLogo ? 0 : 1} width={showLogo ? availableInfoPanelWidth : undefined} > - {/* Title line: >_ Qwen Code (v{version}) */} + {/* Title line: >_ BWEN Code (v{version}) */} - >_ Qwen Code + >_ BWEN Code (v{version}) diff --git a/packages/cli/src/ui/components/Help.test.tsx b/packages/cli/src/ui/components/Help.test.tsx index 23b379eaf7..5a3a9125a8 100644 --- a/packages/cli/src/ui/components/Help.test.tsx +++ b/packages/cli/src/ui/components/Help.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/Help.tsx b/packages/cli/src/ui/components/Help.tsx index 64c2f76885..8be01f7700 100644 --- a/packages/cli/src/ui/components/Help.tsx +++ b/packages/cli/src/ui/components/Help.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx index 7b4a22e801..a577276394 100644 --- a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx +++ b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import { SessionStatsProvider } from '../contexts/SessionContext.js'; import type { Config, ToolExecuteConfirmationDetails, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { ToolGroupMessage } from './messages/ToolGroupMessage.js'; import { renderWithProviders } from '../../test-utils/render.js'; import { ConfigContext } from '../contexts/ConfigContext.js'; diff --git a/packages/cli/src/ui/components/HistoryItemDisplay.tsx b/packages/cli/src/ui/components/HistoryItemDisplay.tsx index a82847cc8f..076679442e 100644 --- a/packages/cli/src/ui/components/HistoryItemDisplay.tsx +++ b/packages/cli/src/ui/components/HistoryItemDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -34,7 +34,7 @@ import { SessionSummaryDisplay } from './SessionSummaryDisplay.js'; import { Help } from './Help.js'; import type { SlashCommand } from '../commands/types.js'; import { ExtensionsList } from './views/ExtensionsList.js'; -import { getMCPServerStatus } from '@qwen-code/qwen-code-core'; +import { getMCPServerStatus } from '@bwen-code/bwen-code-core'; import { SkillsList } from './views/SkillsList.js'; import { ToolsList } from './views/ToolsList.js'; import { McpStatus } from './views/McpStatus.js'; diff --git a/packages/cli/src/ui/components/IdeTrustChangeDialog.test.tsx b/packages/cli/src/ui/components/IdeTrustChangeDialog.test.tsx index ba53864fe7..6169844914 100644 --- a/packages/cli/src/ui/components/IdeTrustChangeDialog.test.tsx +++ b/packages/cli/src/ui/components/IdeTrustChangeDialog.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/IdeTrustChangeDialog.tsx b/packages/cli/src/ui/components/IdeTrustChangeDialog.tsx index 6780792efb..ae8b9d442c 100644 --- a/packages/cli/src/ui/components/IdeTrustChangeDialog.tsx +++ b/packages/cli/src/ui/components/IdeTrustChangeDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import { theme } from '../semantic-colors.js'; import { useKeypress } from '../hooks/useKeypress.js'; import { relaunchApp } from '../../utils/processUtils.js'; import { type RestartReason } from '../hooks/useIdeTrustListener.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; interface IdeTrustChangeDialogProps { reason: RestartReason; diff --git a/packages/cli/src/ui/components/InputPrompt.test.tsx b/packages/cli/src/ui/components/InputPrompt.test.tsx index 61584b8c70..e705a374bc 100644 --- a/packages/cli/src/ui/components/InputPrompt.test.tsx +++ b/packages/cli/src/ui/components/InputPrompt.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,8 +9,8 @@ import { waitFor, act } from '@testing-library/react'; import type { InputPromptProps } from './InputPrompt.js'; import { InputPrompt } from './InputPrompt.js'; import type { TextBuffer } from './shared/text-buffer.js'; -import type { Config } from '@qwen-code/qwen-code-core'; -import { ApprovalMode } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; +import { ApprovalMode } from '@bwen-code/bwen-code-core'; import * as path from 'node:path'; import type { CommandContext, SlashCommand } from '../commands/types.js'; import { CommandKind } from '../commands/types.js'; diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index 42ec7efbbc..78f4b41869 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -21,12 +21,12 @@ import type { Key } from '../hooks/useKeypress.js'; import { useKeypress } from '../hooks/useKeypress.js'; import { keyMatchers, Command } from '../keyMatchers.js'; import type { CommandContext, SlashCommand } from '../commands/types.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { ApprovalMode, Storage, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { parseInputForHighlighting, buildSegmentsForVisualSlice, @@ -37,6 +37,10 @@ import { saveClipboardImage, cleanupOldClipboardImages, } from '../utils/clipboardUtils.js'; +import { + processPastedTextForImages, + createSimulatedImageAttachment, +} from '../utils/imagePasteUtils.js'; import * as path from 'node:path'; import { SCREEN_READER_USER_PREFIX } from '../textConstants.js'; import { useShellFocusState } from '../contexts/ShellFocusContext.js'; @@ -52,6 +56,7 @@ export interface Attachment { id: string; // Unique identifier (timestamp) path: string; // Full file path filename: string; // Filename only (for display) + simulated?: boolean; // True if this is a simulated attachment (from path/URL paste) } const debugLogger = createDebugLogger('INPUT_PROMPT'); @@ -456,8 +461,35 @@ export const InputPrompt: React.FC = ({ // Insert the placeholder as regular text buffer.insert(placeholder, { paste: false }); } else { - // Normal paste handling for small content - buffer.handleInput(key); + // Check for image paths/URLs in pasted text (simulated image paste) + processPastedTextForImages(pasted, config.getTargetDir()) + .then(({ cleanedText, images }) => { + if (images.length > 0) { + // Add detected images as attachments + const newAttachments = images.map((img) => { + if (img.type === 'file') { + return createSimulatedImageAttachment(img.path); + } else { + // For URLs and data URLs, use the value as path + return createSimulatedImageAttachment(img.path); + } + }); + setAttachments((prev) => [...prev, ...newAttachments]); + + // Insert cleaned text (with image references removed) + if (cleanedText.trim()) { + buffer.setText(buffer.text + cleanedText); + } + } else { + // No images found, insert as normal text + buffer.handleInput(key); + } + }) + .catch((error) => { + debugLogger.error('Error processing pasted images:', error); + // Fallback to normal paste on error + buffer.handleInput(key); + }); } return; } @@ -1016,20 +1048,25 @@ export const InputPrompt: React.FC = ({ return ( <> {attachments.length > 0 && ( - + {t('Attachments: ')} - {attachments.map((att, idx) => ( - - [{att.filename}]{idx < attachments.length - 1 ? ' ' : ''} - - ))} + + {attachments.map((att, idx) => ( + + {att.simulated ? '📎' : '🖼️'}[{att.filename}] + {idx < attachments.length - 1 ? ' ' : ''} + + ))} + )} { - const actual = await vi.importActual('@qwen-code/qwen-code-core'); +vi.mock('@bwen-code/bwen-code-core', async () => { + const actual = await vi.importActual('@bwen-code/bwen-code-core'); return { ...actual, getGitBranch: vi.fn().mockReturnValue('main'), diff --git a/packages/cli/src/ui/components/StandaloneSessionPicker.tsx b/packages/cli/src/ui/components/StandaloneSessionPicker.tsx index 244258d799..e3c4309af8 100644 --- a/packages/cli/src/ui/components/StandaloneSessionPicker.tsx +++ b/packages/cli/src/ui/components/StandaloneSessionPicker.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { useState } from 'react'; import { render, Box, useApp } from 'ink'; -import { getGitBranch, SessionService } from '@qwen-code/qwen-code-core'; +import { getGitBranch, SessionService } from '@bwen-code/bwen-code-core'; import { KeypressProvider } from '../contexts/KeypressContext.js'; import { SessionPicker } from './SessionPicker.js'; import { writeStdoutLine } from '../../utils/stdioHelpers.js'; diff --git a/packages/cli/src/ui/components/StatsDisplay.test.tsx b/packages/cli/src/ui/components/StatsDisplay.test.tsx index 6820171cb9..56c75333a6 100644 --- a/packages/cli/src/ui/components/StatsDisplay.test.tsx +++ b/packages/cli/src/ui/components/StatsDisplay.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/StatsDisplay.tsx b/packages/cli/src/ui/components/StatsDisplay.tsx index 48ed58f181..284564b30b 100644 --- a/packages/cli/src/ui/components/StatsDisplay.tsx +++ b/packages/cli/src/ui/components/StatsDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/SuggestionsDisplay.tsx b/packages/cli/src/ui/components/SuggestionsDisplay.tsx index 8b4ba93980..b420851d2a 100644 --- a/packages/cli/src/ui/components/SuggestionsDisplay.tsx +++ b/packages/cli/src/ui/components/SuggestionsDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/ThemeDialog.test.tsx b/packages/cli/src/ui/components/ThemeDialog.test.tsx index 0a9a3d0c0d..ec99800ed8 100644 --- a/packages/cli/src/ui/components/ThemeDialog.test.tsx +++ b/packages/cli/src/ui/components/ThemeDialog.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/ThemeDialog.tsx b/packages/cli/src/ui/components/ThemeDialog.tsx index a2ade610b2..1b8eff7672 100644 --- a/packages/cli/src/ui/components/ThemeDialog.tsx +++ b/packages/cli/src/ui/components/ThemeDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/Tips.test.ts b/packages/cli/src/ui/components/Tips.test.ts index dd2c25ea9d..646fb65849 100644 --- a/packages/cli/src/ui/components/Tips.test.ts +++ b/packages/cli/src/ui/components/Tips.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/Tips.tsx b/packages/cli/src/ui/components/Tips.tsx index f85184a194..c326b2faae 100644 --- a/packages/cli/src/ui/components/Tips.tsx +++ b/packages/cli/src/ui/components/Tips.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/TodoDisplay.test.tsx b/packages/cli/src/ui/components/TodoDisplay.test.tsx index d7198d6e32..4c6c9e2097 100644 --- a/packages/cli/src/ui/components/TodoDisplay.test.tsx +++ b/packages/cli/src/ui/components/TodoDisplay.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/TodoDisplay.tsx b/packages/cli/src/ui/components/TodoDisplay.tsx index f503316fc1..203b374b79 100644 --- a/packages/cli/src/ui/components/TodoDisplay.tsx +++ b/packages/cli/src/ui/components/TodoDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/ToolStatsDisplay.test.tsx b/packages/cli/src/ui/components/ToolStatsDisplay.test.tsx index cf2d7f13d8..beea205565 100644 --- a/packages/cli/src/ui/components/ToolStatsDisplay.test.tsx +++ b/packages/cli/src/ui/components/ToolStatsDisplay.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/ToolStatsDisplay.tsx b/packages/cli/src/ui/components/ToolStatsDisplay.tsx index c48815eb1f..07e200e079 100644 --- a/packages/cli/src/ui/components/ToolStatsDisplay.tsx +++ b/packages/cli/src/ui/components/ToolStatsDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -16,7 +16,7 @@ import { USER_AGREEMENT_RATE_MEDIUM, } from '../utils/displayUtils.js'; import { useSessionStats } from '../contexts/SessionContext.js'; -import type { ToolCallStats } from '@qwen-code/qwen-code-core'; +import type { ToolCallStats } from '@bwen-code/bwen-code-core'; import { t } from '../../i18n/index.js'; const TOOL_NAME_COL_WIDTH = 25; diff --git a/packages/cli/src/ui/components/UpdateNotification.tsx b/packages/cli/src/ui/components/UpdateNotification.tsx index 8142a2018e..eb703558fc 100644 --- a/packages/cli/src/ui/components/UpdateNotification.tsx +++ b/packages/cli/src/ui/components/UpdateNotification.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/WelcomeBackDialog.tsx b/packages/cli/src/ui/components/WelcomeBackDialog.tsx index 5ce5de31c4..9017a0656a 100644 --- a/packages/cli/src/ui/components/WelcomeBackDialog.tsx +++ b/packages/cli/src/ui/components/WelcomeBackDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { Box, Text } from 'ink'; import { Colors } from '../colors.js'; -import { type ProjectSummaryInfo } from '@qwen-code/qwen-code-core'; +import { type ProjectSummaryInfo } from '@bwen-code/bwen-code-core'; import { RadioButtonSelect, type RadioSelectItem, diff --git a/packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.test.tsx b/packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.test.tsx index 22f11e16b9..f84816f6ec 100644 --- a/packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.test.tsx +++ b/packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import { ExtensionsManagerDialog } from './ExtensionsManagerDialog.js'; import { UIStateContext } from '../../contexts/UIStateContext.js'; import { KeypressProvider } from '../../contexts/KeypressContext.js'; import type { UIState } from '../../contexts/UIStateContext.js'; -import type { Config, Extension } from '@qwen-code/qwen-code-core'; +import type { Config, Extension } from '@bwen-code/bwen-code-core'; import { ExtensionUpdateState } from '../../state/extensions.js'; const createMockExtension = ( diff --git a/packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.tsx b/packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.tsx index c06f9c85ce..46badff30f 100644 --- a/packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.tsx +++ b/packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -18,8 +18,8 @@ import { theme } from '../../semantic-colors.js'; import { useKeypress } from '../../hooks/useKeypress.js'; import { useUIState } from '../../contexts/UIStateContext.js'; import { t } from '../../../i18n/index.js'; -import type { Extension, Config } from '@qwen-code/qwen-code-core'; -import { SettingScope, createDebugLogger } from '@qwen-code/qwen-code-core'; +import type { Extension, Config } from '@bwen-code/bwen-code-core'; +import { SettingScope, createDebugLogger } from '@bwen-code/bwen-code-core'; import { ExtensionUpdateState } from '../../state/extensions.js'; import { getErrorMessage } from '../../../utils/errors.js'; import { useTerminalSize } from '../../hooks/useTerminalSize.js'; diff --git a/packages/cli/src/ui/components/extensions/index.ts b/packages/cli/src/ui/components/extensions/index.ts index e368898afb..1b3e19cf12 100644 --- a/packages/cli/src/ui/components/extensions/index.ts +++ b/packages/cli/src/ui/components/extensions/index.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/extensions/steps/ActionSelectionStep.test.tsx b/packages/cli/src/ui/components/extensions/steps/ActionSelectionStep.test.tsx index d2d7a27090..c3f2e7f9b3 100644 --- a/packages/cli/src/ui/components/extensions/steps/ActionSelectionStep.test.tsx +++ b/packages/cli/src/ui/components/extensions/steps/ActionSelectionStep.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { render } from 'ink-testing-library'; import { describe, it, expect, vi } from 'vitest'; import { ActionSelectionStep } from './ActionSelectionStep.js'; import { KeypressProvider } from '../../../contexts/KeypressContext.js'; -import type { Extension } from '@qwen-code/qwen-code-core'; +import type { Extension } from '@bwen-code/bwen-code-core'; const createMockExtension = (name: string, isActive = true): Extension => ({ diff --git a/packages/cli/src/ui/components/extensions/steps/ActionSelectionStep.tsx b/packages/cli/src/ui/components/extensions/steps/ActionSelectionStep.tsx index 0aa566489c..9a01aa1126 100644 --- a/packages/cli/src/ui/components/extensions/steps/ActionSelectionStep.tsx +++ b/packages/cli/src/ui/components/extensions/steps/ActionSelectionStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import { useState, useMemo } from 'react'; import { Box } from 'ink'; import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js'; -import { type Extension } from '@qwen-code/qwen-code-core'; +import { type Extension } from '@bwen-code/bwen-code-core'; import { t } from '../../../../i18n/index.js'; import { type ExtensionAction } from '../types.js'; diff --git a/packages/cli/src/ui/components/extensions/steps/ExtensionDetailStep.tsx b/packages/cli/src/ui/components/extensions/steps/ExtensionDetailStep.tsx index 10b17a6c17..0f7aa3c59b 100644 --- a/packages/cli/src/ui/components/extensions/steps/ExtensionDetailStep.tsx +++ b/packages/cli/src/ui/components/extensions/steps/ExtensionDetailStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { Box, Text } from 'ink'; import { theme } from '../../../semantic-colors.js'; -import { type Extension } from '@qwen-code/qwen-code-core'; +import { type Extension } from '@bwen-code/bwen-code-core'; import { t } from '../../../../i18n/index.js'; interface ExtensionDetailStepProps { diff --git a/packages/cli/src/ui/components/extensions/steps/ExtensionListStep.test.tsx b/packages/cli/src/ui/components/extensions/steps/ExtensionListStep.test.tsx index 80f53cc71a..83b7cba54a 100644 --- a/packages/cli/src/ui/components/extensions/steps/ExtensionListStep.test.tsx +++ b/packages/cli/src/ui/components/extensions/steps/ExtensionListStep.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { render } from 'ink-testing-library'; import { describe, it, expect, vi } from 'vitest'; import { ExtensionListStep } from './ExtensionListStep.js'; import { KeypressProvider } from '../../../contexts/KeypressContext.js'; -import type { Extension } from '@qwen-code/qwen-code-core'; +import type { Extension } from '@bwen-code/bwen-code-core'; import { ExtensionUpdateState } from '../../../state/extensions.js'; const createMockExtension = ( diff --git a/packages/cli/src/ui/components/extensions/steps/ExtensionListStep.tsx b/packages/cli/src/ui/components/extensions/steps/ExtensionListStep.tsx index 63a73ddb5a..ff6d3b0bbe 100644 --- a/packages/cli/src/ui/components/extensions/steps/ExtensionListStep.tsx +++ b/packages/cli/src/ui/components/extensions/steps/ExtensionListStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { useState, useEffect, useMemo } from 'react'; import { Box, Text } from 'ink'; import { theme } from '../../../semantic-colors.js'; import { useKeypress } from '../../../hooks/useKeypress.js'; -import { type Extension } from '@qwen-code/qwen-code-core'; +import { type Extension } from '@bwen-code/bwen-code-core'; import { t } from '../../../../i18n/index.js'; import { ExtensionUpdateState } from '../../../state/extensions.js'; diff --git a/packages/cli/src/ui/components/extensions/steps/ScopeSelectStep.tsx b/packages/cli/src/ui/components/extensions/steps/ScopeSelectStep.tsx index b69ab9a7d2..cfcfa0f85b 100644 --- a/packages/cli/src/ui/components/extensions/steps/ScopeSelectStep.tsx +++ b/packages/cli/src/ui/components/extensions/steps/ScopeSelectStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { Box, Text } from 'ink'; import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js'; -import { type Extension } from '@qwen-code/qwen-code-core'; +import { type Extension } from '@bwen-code/bwen-code-core'; import { theme } from '../../../semantic-colors.js'; import { t } from '../../../../i18n/index.js'; diff --git a/packages/cli/src/ui/components/extensions/steps/UninstallConfirmStep.tsx b/packages/cli/src/ui/components/extensions/steps/UninstallConfirmStep.tsx index 90f8bf1a9f..2d348951ee 100644 --- a/packages/cli/src/ui/components/extensions/steps/UninstallConfirmStep.tsx +++ b/packages/cli/src/ui/components/extensions/steps/UninstallConfirmStep.tsx @@ -1,12 +1,12 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ import { Box, Text } from 'ink'; -import { type Extension } from '@qwen-code/qwen-code-core'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { type Extension } from '@bwen-code/bwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import { theme } from '../../../semantic-colors.js'; import { useKeypress } from '../../../hooks/useKeypress.js'; import { t } from '../../../../i18n/index.js'; diff --git a/packages/cli/src/ui/components/extensions/steps/index.ts b/packages/cli/src/ui/components/extensions/steps/index.ts index 45bde66710..8f228a6133 100644 --- a/packages/cli/src/ui/components/extensions/steps/index.ts +++ b/packages/cli/src/ui/components/extensions/steps/index.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/extensions/types.ts b/packages/cli/src/ui/components/extensions/types.ts index 09a8426bd8..be3a9510a0 100644 --- a/packages/cli/src/ui/components/extensions/types.ts +++ b/packages/cli/src/ui/components/extensions/types.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ -import type { Extension, Config } from '@qwen-code/qwen-code-core'; +import type { Extension, Config } from '@bwen-code/bwen-code-core'; /** * Management steps for the extensions manager dialog. diff --git a/packages/cli/src/ui/components/mcp/MCPManagementDialog.tsx b/packages/cli/src/ui/components/mcp/MCPManagementDialog.tsx index 94910fd72c..d9b11593d5 100644 --- a/packages/cli/src/ui/components/mcp/MCPManagementDialog.tsx +++ b/packages/cli/src/ui/components/mcp/MCPManagementDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -30,7 +30,7 @@ import { type AnyDeclarativeTool, type DiscoveredMCPPrompt, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { loadSettings, SettingScope } from '../../../config/settings.js'; import { isToolValid, getToolInvalidReasons } from './utils.js'; import { useTerminalSize } from '../../hooks/useTerminalSize.js'; diff --git a/packages/cli/src/ui/components/mcp/constants.ts b/packages/cli/src/ui/components/mcp/constants.ts index cfdc2691ff..b25f7bf898 100644 --- a/packages/cli/src/ui/components/mcp/constants.ts +++ b/packages/cli/src/ui/components/mcp/constants.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/mcp/index.ts b/packages/cli/src/ui/components/mcp/index.ts index 01ebfee8f9..6914b1e51c 100644 --- a/packages/cli/src/ui/components/mcp/index.ts +++ b/packages/cli/src/ui/components/mcp/index.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/mcp/steps/AuthenticateStep.tsx b/packages/cli/src/ui/components/mcp/steps/AuthenticateStep.tsx index 6e0011a77f..e50c694f60 100644 --- a/packages/cli/src/ui/components/mcp/steps/AuthenticateStep.tsx +++ b/packages/cli/src/ui/components/mcp/steps/AuthenticateStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -15,8 +15,8 @@ import { MCPOAuthProvider, MCPOAuthTokenStorage, getErrorMessage, -} from '@qwen-code/qwen-code-core'; -import type { OAuthDisplayPayload } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import type { OAuthDisplayPayload } from '@bwen-code/bwen-code-core'; import { appEvents, AppEvent } from '../../../../utils/events.js'; type AuthState = 'idle' | 'authenticating' | 'success' | 'error'; diff --git a/packages/cli/src/ui/components/mcp/steps/DisableScopeSelectStep.tsx b/packages/cli/src/ui/components/mcp/steps/DisableScopeSelectStep.tsx index 3c97ccfd15..6eb3c4a56e 100644 --- a/packages/cli/src/ui/components/mcp/steps/DisableScopeSelectStep.tsx +++ b/packages/cli/src/ui/components/mcp/steps/DisableScopeSelectStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/mcp/steps/ServerDetailStep.tsx b/packages/cli/src/ui/components/mcp/steps/ServerDetailStep.tsx index 3718f5e878..89b04aad5b 100644 --- a/packages/cli/src/ui/components/mcp/steps/ServerDetailStep.tsx +++ b/packages/cli/src/ui/components/mcp/steps/ServerDetailStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/mcp/steps/ServerListStep.tsx b/packages/cli/src/ui/components/mcp/steps/ServerListStep.tsx index bd9c585686..302d74b9f1 100644 --- a/packages/cli/src/ui/components/mcp/steps/ServerListStep.tsx +++ b/packages/cli/src/ui/components/mcp/steps/ServerListStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/mcp/steps/ToolDetailStep.tsx b/packages/cli/src/ui/components/mcp/steps/ToolDetailStep.tsx index d864c5732d..c60f9ac2d3 100644 --- a/packages/cli/src/ui/components/mcp/steps/ToolDetailStep.tsx +++ b/packages/cli/src/ui/components/mcp/steps/ToolDetailStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/mcp/steps/ToolListStep.tsx b/packages/cli/src/ui/components/mcp/steps/ToolListStep.tsx index 81d8e2f7c7..4300696664 100644 --- a/packages/cli/src/ui/components/mcp/steps/ToolListStep.tsx +++ b/packages/cli/src/ui/components/mcp/steps/ToolListStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/mcp/types.ts b/packages/cli/src/ui/components/mcp/types.ts index 82d9ab7ba3..2088c8a74a 100644 --- a/packages/cli/src/ui/components/mcp/types.ts +++ b/packages/cli/src/ui/components/mcp/types.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import type { MCPServerConfig, MCPServerStatus, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; /** * MCP管理步骤定义 diff --git a/packages/cli/src/ui/components/mcp/utils.test.ts b/packages/cli/src/ui/components/mcp/utils.test.ts index 155195454f..e913e19e2f 100644 --- a/packages/cli/src/ui/components/mcp/utils.test.ts +++ b/packages/cli/src/ui/components/mcp/utils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -15,7 +15,7 @@ import { getToolInvalidReasons, } from './utils.js'; import type { MCPServerDisplayInfo } from './types.js'; -import { MCPServerStatus } from '@qwen-code/qwen-code-core'; +import { MCPServerStatus } from '@bwen-code/bwen-code-core'; describe('MCP utils', () => { describe('groupServersBySource', () => { diff --git a/packages/cli/src/ui/components/mcp/utils.ts b/packages/cli/src/ui/components/mcp/utils.ts index 4220fe7eb1..b8fe63d063 100644 --- a/packages/cli/src/ui/components/mcp/utils.ts +++ b/packages/cli/src/ui/components/mcp/utils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/messages/AskUserQuestionDialog.test.tsx b/packages/cli/src/ui/components/messages/AskUserQuestionDialog.test.tsx index 2a19e93286..d332b1e813 100644 --- a/packages/cli/src/ui/components/messages/AskUserQuestionDialog.test.tsx +++ b/packages/cli/src/ui/components/messages/AskUserQuestionDialog.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -6,8 +6,8 @@ import { describe, it, expect, vi } from 'vitest'; import { AskUserQuestionDialog } from './AskUserQuestionDialog.js'; -import type { ToolAskUserQuestionConfirmationDetails } from '@qwen-code/qwen-code-core'; -import { ToolConfirmationOutcome } from '@qwen-code/qwen-code-core'; +import type { ToolAskUserQuestionConfirmationDetails } from '@bwen-code/bwen-code-core'; +import { ToolConfirmationOutcome } from '@bwen-code/bwen-code-core'; import { renderWithProviders } from '../../../test-utils/render.js'; const wait = (ms = 50) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx b/packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx index 421ec82c9b..ca95eedb20 100644 --- a/packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx +++ b/packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { type ToolAskUserQuestionConfirmationDetails, ToolConfirmationOutcome, type ToolConfirmationPayload, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { theme } from '../../semantic-colors.js'; import { useKeypress } from '../../hooks/useKeypress.js'; import { TextInput } from '../shared/TextInput.js'; diff --git a/packages/cli/src/ui/components/messages/CompressionMessage.test.tsx b/packages/cli/src/ui/components/messages/CompressionMessage.test.tsx index d648cb06b7..8418810a3b 100644 --- a/packages/cli/src/ui/components/messages/CompressionMessage.test.tsx +++ b/packages/cli/src/ui/components/messages/CompressionMessage.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import { render } from 'ink-testing-library'; import type { CompressionDisplayProps } from './CompressionMessage.js'; import { CompressionMessage } from './CompressionMessage.js'; -import { CompressionStatus } from '@qwen-code/qwen-code-core'; +import { CompressionStatus } from '@bwen-code/bwen-code-core'; import type { CompressionProps } from '../../types.js'; import { describe, it, expect } from 'vitest'; diff --git a/packages/cli/src/ui/components/messages/CompressionMessage.tsx b/packages/cli/src/ui/components/messages/CompressionMessage.tsx index 362b9e052e..48ca55405a 100644 --- a/packages/cli/src/ui/components/messages/CompressionMessage.tsx +++ b/packages/cli/src/ui/components/messages/CompressionMessage.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import type { CompressionProps } from '../../types.js'; import Spinner from 'ink-spinner'; import { theme } from '../../semantic-colors.js'; import { SCREEN_READER_MODEL_PREFIX } from '../../textConstants.js'; -import { CompressionStatus } from '@qwen-code/qwen-code-core'; +import { CompressionStatus } from '@bwen-code/bwen-code-core'; import { t } from '../../../i18n/index.js'; export interface CompressionDisplayProps { diff --git a/packages/cli/src/ui/components/messages/ConversationMessages.tsx b/packages/cli/src/ui/components/messages/ConversationMessages.tsx index 526bc9cfe6..d93e360a14 100644 --- a/packages/cli/src/ui/components/messages/ConversationMessages.tsx +++ b/packages/cli/src/ui/components/messages/ConversationMessages.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx b/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx index 245f4df2ce..04b9e0ddad 100644 --- a/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx +++ b/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/messages/DiffRenderer.tsx b/packages/cli/src/ui/components/messages/DiffRenderer.tsx index 8910d6d803..4802c94a0c 100644 --- a/packages/cli/src/ui/components/messages/DiffRenderer.tsx +++ b/packages/cli/src/ui/components/messages/DiffRenderer.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/messages/InsightProgressMessage.tsx b/packages/cli/src/ui/components/messages/InsightProgressMessage.tsx index 4115b3899f..a79a1afc75 100644 --- a/packages/cli/src/ui/components/messages/InsightProgressMessage.tsx +++ b/packages/cli/src/ui/components/messages/InsightProgressMessage.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/messages/StatusMessages.tsx b/packages/cli/src/ui/components/messages/StatusMessages.tsx index e6e945bbd5..faf7197069 100644 --- a/packages/cli/src/ui/components/messages/StatusMessages.tsx +++ b/packages/cli/src/ui/components/messages/StatusMessages.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/messages/SummaryMessage.tsx b/packages/cli/src/ui/components/messages/SummaryMessage.tsx index 82819f959d..1003bb16e6 100644 --- a/packages/cli/src/ui/components/messages/SummaryMessage.tsx +++ b/packages/cli/src/ui/components/messages/SummaryMessage.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.test.tsx b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.test.tsx index 11daefa3b4..d39f993c49 100644 --- a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.test.tsx +++ b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import { ToolConfirmationMessage } from './ToolConfirmationMessage.js'; import type { ToolCallConfirmationDetails, Config, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { renderWithProviders } from '../../../test-utils/render.js'; import type { LoadedSettings } from '../../../config/settings.js'; diff --git a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx index 34eb34cacd..dad740b791 100644 --- a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -16,8 +16,8 @@ import type { ToolMcpConfirmationDetails, Config, EditorType, -} from '@qwen-code/qwen-code-core'; -import { IdeClient, ToolConfirmationOutcome } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import { IdeClient, ToolConfirmationOutcome } from '@bwen-code/bwen-code-core'; import type { RadioSelectItem } from '../shared/RadioButtonSelect.js'; import { RadioButtonSelect } from '../shared/RadioButtonSelect.js'; import { MaxSizedBox } from '../shared/MaxSizedBox.js'; diff --git a/packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx b/packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx index 51ca0bea17..6b9f93924a 100644 --- a/packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx +++ b/packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -14,7 +14,7 @@ import { ToolCallStatus } from '../../types.js'; import type { Config, ToolCallConfirmationDetails, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { TOOL_STATUS } from '../../constants.js'; import { ConfigContext } from '../../contexts/ConfigContext.js'; diff --git a/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx b/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx index bbebc13612..83d3d66b1e 100644 --- a/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/messages/ToolMessage.test.tsx b/packages/cli/src/ui/components/messages/ToolMessage.test.tsx index 0c44a8ed94..95ea5fda1f 100644 --- a/packages/cli/src/ui/components/messages/ToolMessage.test.tsx +++ b/packages/cli/src/ui/components/messages/ToolMessage.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -16,7 +16,7 @@ import type { AnsiOutput, AnsiOutputDisplay, Config, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { LoadedSettings } from '../../../config/settings.js'; vi.mock('../TerminalOutput.js', () => ({ diff --git a/packages/cli/src/ui/components/messages/ToolMessage.tsx b/packages/cli/src/ui/components/messages/ToolMessage.tsx index c0c981197d..065943cc68 100644 --- a/packages/cli/src/ui/components/messages/ToolMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolMessage.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -21,7 +21,7 @@ import type { AnsiOutput, Config, McpToolProgressData, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { AgentExecutionDisplay } from '../subagents/index.js'; import { PlanSummaryDisplay } from '../PlanSummaryDisplay.js'; import { ShellInputPrompt } from '../ShellInputPrompt.js'; diff --git a/packages/cli/src/ui/components/shared/BaseSelectionList.test.tsx b/packages/cli/src/ui/components/shared/BaseSelectionList.test.tsx index e17dea39be..362285496a 100644 --- a/packages/cli/src/ui/components/shared/BaseSelectionList.test.tsx +++ b/packages/cli/src/ui/components/shared/BaseSelectionList.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/BaseSelectionList.tsx b/packages/cli/src/ui/components/shared/BaseSelectionList.tsx index 15664ef951..35b645890b 100644 --- a/packages/cli/src/ui/components/shared/BaseSelectionList.tsx +++ b/packages/cli/src/ui/components/shared/BaseSelectionList.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/DescriptiveRadioButtonSelect.test.tsx b/packages/cli/src/ui/components/shared/DescriptiveRadioButtonSelect.test.tsx index 8ca34c174b..388daeaad0 100644 --- a/packages/cli/src/ui/components/shared/DescriptiveRadioButtonSelect.test.tsx +++ b/packages/cli/src/ui/components/shared/DescriptiveRadioButtonSelect.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/DescriptiveRadioButtonSelect.tsx b/packages/cli/src/ui/components/shared/DescriptiveRadioButtonSelect.tsx index 396ee8c3a5..0a4ad0b419 100644 --- a/packages/cli/src/ui/components/shared/DescriptiveRadioButtonSelect.tsx +++ b/packages/cli/src/ui/components/shared/DescriptiveRadioButtonSelect.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/EnumSelector.test.tsx b/packages/cli/src/ui/components/shared/EnumSelector.test.tsx index be2df513f9..4349a981e3 100644 --- a/packages/cli/src/ui/components/shared/EnumSelector.test.tsx +++ b/packages/cli/src/ui/components/shared/EnumSelector.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/EnumSelector.tsx b/packages/cli/src/ui/components/shared/EnumSelector.tsx index a86efd8ff1..e9a0b8e60a 100644 --- a/packages/cli/src/ui/components/shared/EnumSelector.tsx +++ b/packages/cli/src/ui/components/shared/EnumSelector.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx b/packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx index 92147d3c59..98d469fc6f 100644 --- a/packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx +++ b/packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/MaxSizedBox.tsx b/packages/cli/src/ui/components/shared/MaxSizedBox.tsx index 0572a0f767..2313a50c92 100644 --- a/packages/cli/src/ui/components/shared/MaxSizedBox.tsx +++ b/packages/cli/src/ui/components/shared/MaxSizedBox.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import stringWidth from 'string-width'; import { theme } from '../../semantic-colors.js'; import { toCodePoints } from '../../utils/textUtils.js'; import { useOverflowActions } from '../../contexts/OverflowContext.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; let enableDebugLog = false; const debugLogger = createDebugLogger('MAX_SIZED_BOX'); diff --git a/packages/cli/src/ui/components/shared/RadioButtonSelect.test.tsx b/packages/cli/src/ui/components/shared/RadioButtonSelect.test.tsx index 1b15bc6f9e..b2d50bd005 100644 --- a/packages/cli/src/ui/components/shared/RadioButtonSelect.test.tsx +++ b/packages/cli/src/ui/components/shared/RadioButtonSelect.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx b/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx index 02fc85228c..977cac200d 100644 --- a/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx +++ b/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/ScopeSelector.tsx b/packages/cli/src/ui/components/shared/ScopeSelector.tsx index f5d265bfd6..a6c1d0808c 100644 --- a/packages/cli/src/ui/components/shared/ScopeSelector.tsx +++ b/packages/cli/src/ui/components/shared/ScopeSelector.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/TextInput.tsx b/packages/cli/src/ui/components/shared/TextInput.tsx index 01ebc2fa03..d978f71195 100644 --- a/packages/cli/src/ui/components/shared/TextInput.tsx +++ b/packages/cli/src/ui/components/shared/TextInput.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/text-buffer.test.ts b/packages/cli/src/ui/components/shared/text-buffer.test.ts index 118a3a4979..1483e76873 100644 --- a/packages/cli/src/ui/components/shared/text-buffer.test.ts +++ b/packages/cli/src/ui/components/shared/text-buffer.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/text-buffer.ts b/packages/cli/src/ui/components/shared/text-buffer.ts index 369c7fff55..ef8177335a 100644 --- a/packages/cli/src/ui/components/shared/text-buffer.ts +++ b/packages/cli/src/ui/components/shared/text-buffer.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import fs from 'node:fs'; import os from 'node:os'; import pathMod from 'node:path'; import { useState, useCallback, useEffect, useMemo, useReducer } from 'react'; -import { createDebugLogger, unescapePath } from '@qwen-code/qwen-code-core'; +import { createDebugLogger, unescapePath } from '@bwen-code/bwen-code-core'; import { toCodePoints, cpLen, diff --git a/packages/cli/src/ui/components/shared/vim-buffer-actions.test.ts b/packages/cli/src/ui/components/shared/vim-buffer-actions.test.ts index a07d8df195..3876fbe3be 100644 --- a/packages/cli/src/ui/components/shared/vim-buffer-actions.test.ts +++ b/packages/cli/src/ui/components/shared/vim-buffer-actions.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/shared/vim-buffer-actions.ts b/packages/cli/src/ui/components/shared/vim-buffer-actions.ts index 8243aeabd1..59e7ae390a 100644 --- a/packages/cli/src/ui/components/shared/vim-buffer-actions.ts +++ b/packages/cli/src/ui/components/shared/vim-buffer-actions.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/subagents/constants.ts b/packages/cli/src/ui/components/subagents/constants.ts index 0aecfefe5f..235c3d5ec3 100644 --- a/packages/cli/src/ui/components/subagents/constants.ts +++ b/packages/cli/src/ui/components/subagents/constants.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/subagents/create/AgentCreationWizard.tsx b/packages/cli/src/ui/components/subagents/create/AgentCreationWizard.tsx index 70c0e06719..03e7cab7b5 100644 --- a/packages/cli/src/ui/components/subagents/create/AgentCreationWizard.tsx +++ b/packages/cli/src/ui/components/subagents/create/AgentCreationWizard.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -16,7 +16,7 @@ import { CreationSummary } from './CreationSummary.js'; import { type WizardStepProps } from '../types.js'; import { WIZARD_STEPS } from '../constants.js'; import { getStepKind } from '../utils.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { theme } from '../../../semantic-colors.js'; import { TextEntryStep } from './TextEntryStep.js'; import { useKeypress } from '../../../hooks/useKeypress.js'; diff --git a/packages/cli/src/ui/components/subagents/create/ColorSelector.tsx b/packages/cli/src/ui/components/subagents/create/ColorSelector.tsx index ba8802833a..f7f5b37fd5 100644 --- a/packages/cli/src/ui/components/subagents/create/ColorSelector.tsx +++ b/packages/cli/src/ui/components/subagents/create/ColorSelector.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/subagents/create/CreationSummary.tsx b/packages/cli/src/ui/components/subagents/create/CreationSummary.tsx index 0cc899b87f..a3f942aff6 100644 --- a/packages/cli/src/ui/components/subagents/create/CreationSummary.tsx +++ b/packages/cli/src/ui/components/subagents/create/CreationSummary.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -10,8 +10,8 @@ import type { WizardStepProps } from '../types.js'; import type { SubagentManager, SubagentConfig, -} from '@qwen-code/qwen-code-core'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import { theme } from '../../../semantic-colors.js'; import { shouldShowColor, getColorForDisplay } from '../utils.js'; import { useLaunchEditor } from '../../../hooks/useLaunchEditor.js'; diff --git a/packages/cli/src/ui/components/subagents/create/DescriptionInput.tsx b/packages/cli/src/ui/components/subagents/create/DescriptionInput.tsx index 4e7f449106..3c8c094ef7 100644 --- a/packages/cli/src/ui/components/subagents/create/DescriptionInput.tsx +++ b/packages/cli/src/ui/components/subagents/create/DescriptionInput.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import { Box, Text } from 'ink'; import Spinner from 'ink-spinner'; import type { WizardStepProps, WizardAction } from '../types.js'; import { sanitizeInput } from '../utils.js'; -import { type Config, subagentGenerator } from '@qwen-code/qwen-code-core'; +import { type Config, subagentGenerator } from '@bwen-code/bwen-code-core'; import { useKeypress, type Key } from '../../../hooks/useKeypress.js'; import { keyMatchers, Command } from '../../../keyMatchers.js'; import { theme } from '../../../semantic-colors.js'; diff --git a/packages/cli/src/ui/components/subagents/create/GenerationMethodSelector.tsx b/packages/cli/src/ui/components/subagents/create/GenerationMethodSelector.tsx index b7f111e629..edaa58470a 100644 --- a/packages/cli/src/ui/components/subagents/create/GenerationMethodSelector.tsx +++ b/packages/cli/src/ui/components/subagents/create/GenerationMethodSelector.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/subagents/create/LocationSelector.tsx b/packages/cli/src/ui/components/subagents/create/LocationSelector.tsx index aad81c3a2a..4cac25b338 100644 --- a/packages/cli/src/ui/components/subagents/create/LocationSelector.tsx +++ b/packages/cli/src/ui/components/subagents/create/LocationSelector.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/subagents/create/TextEntryStep.tsx b/packages/cli/src/ui/components/subagents/create/TextEntryStep.tsx index 3e080765ef..39ecbcb135 100644 --- a/packages/cli/src/ui/components/subagents/create/TextEntryStep.tsx +++ b/packages/cli/src/ui/components/subagents/create/TextEntryStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/subagents/create/ToolSelector.tsx b/packages/cli/src/ui/components/subagents/create/ToolSelector.tsx index 547e14edd1..87673a875d 100644 --- a/packages/cli/src/ui/components/subagents/create/ToolSelector.tsx +++ b/packages/cli/src/ui/components/subagents/create/ToolSelector.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { useState, useMemo, useEffect } from 'react'; import { Box, Text } from 'ink'; import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js'; import type { ToolCategory } from '../types.js'; -import { Kind, type Config } from '@qwen-code/qwen-code-core'; +import { Kind, type Config } from '@bwen-code/bwen-code-core'; import { theme } from '../../../semantic-colors.js'; import { t } from '../../../../i18n/index.js'; diff --git a/packages/cli/src/ui/components/subagents/index.ts b/packages/cli/src/ui/components/subagents/index.ts index 8f22a244d6..0b7ef141df 100644 --- a/packages/cli/src/ui/components/subagents/index.ts +++ b/packages/cli/src/ui/components/subagents/index.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/subagents/manage/ActionSelectionStep.tsx b/packages/cli/src/ui/components/subagents/manage/ActionSelectionStep.tsx index 3cf453814e..2f6173bcb3 100644 --- a/packages/cli/src/ui/components/subagents/manage/ActionSelectionStep.tsx +++ b/packages/cli/src/ui/components/subagents/manage/ActionSelectionStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { useState } from 'react'; import { Box } from 'ink'; import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js'; import { MANAGEMENT_STEPS } from '../types.js'; -import { type SubagentConfig } from '@qwen-code/qwen-code-core'; +import { type SubagentConfig } from '@bwen-code/bwen-code-core'; import { t } from '../../../../i18n/index.js'; interface ActionSelectionStepProps { diff --git a/packages/cli/src/ui/components/subagents/manage/AgentDeleteStep.tsx b/packages/cli/src/ui/components/subagents/manage/AgentDeleteStep.tsx index 215fe4bb32..889da10b1c 100644 --- a/packages/cli/src/ui/components/subagents/manage/AgentDeleteStep.tsx +++ b/packages/cli/src/ui/components/subagents/manage/AgentDeleteStep.tsx @@ -1,12 +1,12 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ import { Box, Text } from 'ink'; -import { type SubagentConfig } from '@qwen-code/qwen-code-core'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { type SubagentConfig } from '@bwen-code/bwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import type { StepNavigationProps } from '../types.js'; import { theme } from '../../../semantic-colors.js'; import { useKeypress } from '../../../hooks/useKeypress.js'; diff --git a/packages/cli/src/ui/components/subagents/manage/AgentEditStep.tsx b/packages/cli/src/ui/components/subagents/manage/AgentEditStep.tsx index ccec2ebf63..f903844c10 100644 --- a/packages/cli/src/ui/components/subagents/manage/AgentEditStep.tsx +++ b/packages/cli/src/ui/components/subagents/manage/AgentEditStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js'; import { MANAGEMENT_STEPS } from '../types.js'; import { theme } from '../../../semantic-colors.js'; import { useLaunchEditor } from '../../../hooks/useLaunchEditor.js'; -import { type SubagentConfig } from '@qwen-code/qwen-code-core'; +import { type SubagentConfig } from '@bwen-code/bwen-code-core'; import { t } from '../../../../i18n/index.js'; interface EditOption { diff --git a/packages/cli/src/ui/components/subagents/manage/AgentSelectionStep.tsx b/packages/cli/src/ui/components/subagents/manage/AgentSelectionStep.tsx index 71d813fe82..8d6b1caaa0 100644 --- a/packages/cli/src/ui/components/subagents/manage/AgentSelectionStep.tsx +++ b/packages/cli/src/ui/components/subagents/manage/AgentSelectionStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { useState, useEffect, useMemo } from 'react'; import { Box, Text } from 'ink'; import { theme } from '../../../semantic-colors.js'; import { useKeypress } from '../../../hooks/useKeypress.js'; -import { type SubagentConfig } from '@qwen-code/qwen-code-core'; +import { type SubagentConfig } from '@bwen-code/bwen-code-core'; import { t } from '../../../../i18n/index.js'; interface NavigationState { diff --git a/packages/cli/src/ui/components/subagents/manage/AgentViewerStep.tsx b/packages/cli/src/ui/components/subagents/manage/AgentViewerStep.tsx index ee2fd3664b..443bc93f64 100644 --- a/packages/cli/src/ui/components/subagents/manage/AgentViewerStep.tsx +++ b/packages/cli/src/ui/components/subagents/manage/AgentViewerStep.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import { Box, Text } from 'ink'; import { theme } from '../../../semantic-colors.js'; import { shouldShowColor, getColorForDisplay } from '../utils.js'; -import { type SubagentConfig } from '@qwen-code/qwen-code-core'; +import { type SubagentConfig } from '@bwen-code/bwen-code-core'; import { t } from '../../../../i18n/index.js'; interface AgentViewerStepProps { diff --git a/packages/cli/src/ui/components/subagents/manage/AgentsManagerDialog.tsx b/packages/cli/src/ui/components/subagents/manage/AgentsManagerDialog.tsx index 79b8597079..fa80866fb6 100644 --- a/packages/cli/src/ui/components/subagents/manage/AgentsManagerDialog.tsx +++ b/packages/cli/src/ui/components/subagents/manage/AgentsManagerDialog.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -16,8 +16,8 @@ import { ColorSelector } from '../create/ColorSelector.js'; import { MANAGEMENT_STEPS } from '../types.js'; import { theme } from '../../../semantic-colors.js'; import { getColorForDisplay, shouldShowColor } from '../utils.js'; -import type { SubagentConfig, Config } from '@qwen-code/qwen-code-core'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import type { SubagentConfig, Config } from '@bwen-code/bwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import { useKeypress } from '../../../hooks/useKeypress.js'; import { t } from '../../../../i18n/index.js'; diff --git a/packages/cli/src/ui/components/subagents/reducers.tsx b/packages/cli/src/ui/components/subagents/reducers.tsx index 1279914502..296443fb8c 100644 --- a/packages/cli/src/ui/components/subagents/reducers.tsx +++ b/packages/cli/src/ui/components/subagents/reducers.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/subagents/runtime/AgentExecutionDisplay.tsx b/packages/cli/src/ui/components/subagents/runtime/AgentExecutionDisplay.tsx index 8f9fe2a6a6..1c669a722a 100644 --- a/packages/cli/src/ui/components/subagents/runtime/AgentExecutionDisplay.tsx +++ b/packages/cli/src/ui/components/subagents/runtime/AgentExecutionDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import type { TaskResultDisplay, SubagentStatsSummary, Config, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { theme } from '../../../semantic-colors.js'; import { useKeypress } from '../../../hooks/useKeypress.js'; import { COLOR_OPTIONS } from '../constants.js'; diff --git a/packages/cli/src/ui/components/subagents/types.ts b/packages/cli/src/ui/components/subagents/types.ts index b4574e5af8..1a1137d344 100644 --- a/packages/cli/src/ui/components/subagents/types.ts +++ b/packages/cli/src/ui/components/subagents/types.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ -import type { SubagentLevel, Config } from '@qwen-code/qwen-code-core'; +import type { SubagentLevel, Config } from '@bwen-code/bwen-code-core'; /** * State management for the subagent creation wizard. diff --git a/packages/cli/src/ui/components/subagents/utils.ts b/packages/cli/src/ui/components/subagents/utils.ts index 73011662a3..59a09798da 100644 --- a/packages/cli/src/ui/components/subagents/utils.ts +++ b/packages/cli/src/ui/components/subagents/utils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/views/ExtensionsList.test.tsx b/packages/cli/src/ui/components/views/ExtensionsList.test.tsx index fe67396ad4..c29b0937d1 100644 --- a/packages/cli/src/ui/components/views/ExtensionsList.test.tsx +++ b/packages/cli/src/ui/components/views/ExtensionsList.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/views/ExtensionsList.tsx b/packages/cli/src/ui/components/views/ExtensionsList.tsx index 316e66687f..44c1529917 100644 --- a/packages/cli/src/ui/components/views/ExtensionsList.tsx +++ b/packages/cli/src/ui/components/views/ExtensionsList.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import { Box, Text } from 'ink'; import { useUIState } from '../../contexts/UIStateContext.js'; import { ExtensionUpdateState } from '../../state/extensions.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('EXTENSIONS_LIST'); diff --git a/packages/cli/src/ui/components/views/McpStatus.test.tsx b/packages/cli/src/ui/components/views/McpStatus.test.tsx index 987997ecd0..bf8d79db80 100644 --- a/packages/cli/src/ui/components/views/McpStatus.test.tsx +++ b/packages/cli/src/ui/components/views/McpStatus.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import { render } from 'ink-testing-library'; import { describe, it, expect, vi } from 'vitest'; import { McpStatus } from './McpStatus.js'; -import { MCPServerStatus } from '@qwen-code/qwen-code-core'; +import { MCPServerStatus } from '@bwen-code/bwen-code-core'; import { MessageType } from '../../types.js'; describe('McpStatus', () => { @@ -77,7 +77,7 @@ describe('McpStatus', () => { it('renders correctly with a disconnected server', async () => { vi.spyOn( - await import('@qwen-code/qwen-code-core'), + await import('@bwen-code/bwen-code-core'), 'getMCPServerStatus', ).mockReturnValue(MCPServerStatus.DISCONNECTED); const { lastFrame } = render(); diff --git a/packages/cli/src/ui/components/views/McpStatus.tsx b/packages/cli/src/ui/components/views/McpStatus.tsx index 0bf74db81e..7c2b4ac5c0 100644 --- a/packages/cli/src/ui/components/views/McpStatus.tsx +++ b/packages/cli/src/ui/components/views/McpStatus.tsx @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import type { MCPServerConfig } from '@qwen-code/qwen-code-core'; -import { MCPServerStatus } from '@qwen-code/qwen-code-core'; +import type { MCPServerConfig } from '@bwen-code/bwen-code-core'; +import { MCPServerStatus } from '@bwen-code/bwen-code-core'; import { Box, Text } from 'ink'; import type React from 'react'; import { theme } from '../../semantic-colors.js'; diff --git a/packages/cli/src/ui/components/views/SkillsList.tsx b/packages/cli/src/ui/components/views/SkillsList.tsx index c3d73c8e5d..3b6c924c08 100644 --- a/packages/cli/src/ui/components/views/SkillsList.tsx +++ b/packages/cli/src/ui/components/views/SkillsList.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/views/ToolsList.test.tsx b/packages/cli/src/ui/components/views/ToolsList.test.tsx index ae6acd1201..d4dddc9e02 100644 --- a/packages/cli/src/ui/components/views/ToolsList.test.tsx +++ b/packages/cli/src/ui/components/views/ToolsList.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/components/views/ToolsList.tsx b/packages/cli/src/ui/components/views/ToolsList.tsx index d397c1002f..f56ec8efd3 100644 --- a/packages/cli/src/ui/components/views/ToolsList.tsx +++ b/packages/cli/src/ui/components/views/ToolsList.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/constants.ts b/packages/cli/src/ui/constants.ts index 6b099fd806..276741eab6 100644 --- a/packages/cli/src/ui/constants.ts +++ b/packages/cli/src/ui/constants.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/contexts/AppContext.tsx b/packages/cli/src/ui/contexts/AppContext.tsx index 791c8a73ac..bf7120e275 100644 --- a/packages/cli/src/ui/contexts/AppContext.tsx +++ b/packages/cli/src/ui/contexts/AppContext.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/contexts/ConfigContext.tsx b/packages/cli/src/ui/contexts/ConfigContext.tsx index 1688416c7e..3f5a11276a 100644 --- a/packages/cli/src/ui/contexts/ConfigContext.tsx +++ b/packages/cli/src/ui/contexts/ConfigContext.tsx @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React, { useContext } from 'react'; -import { type Config } from '@qwen-code/qwen-code-core'; +import { type Config } from '@bwen-code/bwen-code-core'; export const ConfigContext = React.createContext(undefined); diff --git a/packages/cli/src/ui/contexts/KeypressContext.test.tsx b/packages/cli/src/ui/contexts/KeypressContext.test.tsx index edf25bead7..b1f26928e5 100644 --- a/packages/cli/src/ui/contexts/KeypressContext.test.tsx +++ b/packages/cli/src/ui/contexts/KeypressContext.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/contexts/KeypressContext.tsx b/packages/cli/src/ui/contexts/KeypressContext.tsx index 791602f6ab..c5bede846f 100644 --- a/packages/cli/src/ui/contexts/KeypressContext.tsx +++ b/packages/cli/src/ui/contexts/KeypressContext.tsx @@ -1,15 +1,15 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { KittySequenceOverflowEvent, logKittySequenceOverflow, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { useStdin } from 'ink'; import type React from 'react'; import { diff --git a/packages/cli/src/ui/contexts/OverflowContext.tsx b/packages/cli/src/ui/contexts/OverflowContext.tsx index 9d8b78d4c7..4782542420 100644 --- a/packages/cli/src/ui/contexts/OverflowContext.tsx +++ b/packages/cli/src/ui/contexts/OverflowContext.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/contexts/SessionContext.test.tsx b/packages/cli/src/ui/contexts/SessionContext.test.tsx index f1550e2552..78532b95e0 100644 --- a/packages/cli/src/ui/contexts/SessionContext.test.tsx +++ b/packages/cli/src/ui/contexts/SessionContext.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { act } from 'react-dom/test-utils'; import type { SessionMetrics } from './SessionContext.js'; import { SessionStatsProvider, useSessionStats } from './SessionContext.js'; import { describe, it, expect, vi } from 'vitest'; -import { uiTelemetryService } from '@qwen-code/qwen-code-core'; +import { uiTelemetryService } from '@bwen-code/bwen-code-core'; /** * A test harness component that uses the hook and exposes the context value diff --git a/packages/cli/src/ui/contexts/SessionContext.tsx b/packages/cli/src/ui/contexts/SessionContext.tsx index 9fdb4fa255..4e360f3825 100644 --- a/packages/cli/src/ui/contexts/SessionContext.tsx +++ b/packages/cli/src/ui/contexts/SessionContext.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -18,8 +18,8 @@ import type { SessionMetrics, ModelMetrics, ToolCallStats, -} from '@qwen-code/qwen-code-core'; -import { uiTelemetryService } from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; +import { uiTelemetryService } from '@bwen-code/bwen-code-core'; export enum ToolCallDecision { ACCEPT = 'accept', diff --git a/packages/cli/src/ui/contexts/SettingsContext.tsx b/packages/cli/src/ui/contexts/SettingsContext.tsx index 144e1a2859..4d0e735859 100644 --- a/packages/cli/src/ui/contexts/SettingsContext.tsx +++ b/packages/cli/src/ui/contexts/SettingsContext.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/contexts/ShellFocusContext.tsx b/packages/cli/src/ui/contexts/ShellFocusContext.tsx index aaed98c9d5..0d17815587 100644 --- a/packages/cli/src/ui/contexts/ShellFocusContext.tsx +++ b/packages/cli/src/ui/contexts/ShellFocusContext.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/contexts/StreamingContext.tsx b/packages/cli/src/ui/contexts/StreamingContext.tsx index 7195e21d4c..980cb49d5a 100644 --- a/packages/cli/src/ui/contexts/StreamingContext.tsx +++ b/packages/cli/src/ui/contexts/StreamingContext.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/contexts/UIActionsContext.tsx b/packages/cli/src/ui/contexts/UIActionsContext.tsx index 19464cccc5..198cae24bd 100644 --- a/packages/cli/src/ui/contexts/UIActionsContext.tsx +++ b/packages/cli/src/ui/contexts/UIActionsContext.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -13,7 +13,7 @@ import { type AuthType, type EditorType, type ApprovalMode, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { type SettingScope } from '../../config/settings.js'; import { type CodingPlanRegion } from '../../constants/codingPlan.js'; import type { AuthState } from '../types.js'; @@ -87,6 +87,8 @@ export interface UIActions { closeFeedbackDialog: () => void; temporaryCloseFeedbackDialog: () => void; submitFeedback: (rating: number) => void; + // File tree panel + toggleFileTree: () => void; } export const UIActionsContext = createContext(null); diff --git a/packages/cli/src/ui/contexts/UIStateContext.tsx b/packages/cli/src/ui/contexts/UIStateContext.tsx index 0d461e70ca..b164586fcb 100644 --- a/packages/cli/src/ui/contexts/UIStateContext.tsx +++ b/packages/cli/src/ui/contexts/UIStateContext.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -24,7 +24,7 @@ import type { IdeContext, ApprovalMode, IdeInfo, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { DOMElement } from 'ink'; import type { SessionStatsState } from '../contexts/SessionContext.js'; import type { ExtensionUpdateState } from '../state/extensions.js'; @@ -131,6 +131,8 @@ export interface UIState { isMcpDialogOpen: boolean; // Feedback dialog isFeedbackDialogOpen: boolean; + // File tree panel + showFileTree: boolean; } export const UIStateContext = createContext(null); diff --git a/packages/cli/src/ui/contexts/VimModeContext.tsx b/packages/cli/src/ui/contexts/VimModeContext.tsx index 7f7cb7bf7f..6e90c23db5 100644 --- a/packages/cli/src/ui/contexts/VimModeContext.tsx +++ b/packages/cli/src/ui/contexts/VimModeContext.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/editors/editorSettingsManager.ts b/packages/cli/src/ui/editors/editorSettingsManager.ts index 612e4ff569..8c4a33375e 100644 --- a/packages/cli/src/ui/editors/editorSettingsManager.ts +++ b/packages/cli/src/ui/editors/editorSettingsManager.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { allowEditorTypeInSandbox, checkHasEditorType, type EditorType, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; export interface EditorDisplay { name: string; diff --git a/packages/cli/src/ui/hooks/atCommandProcessor.test.ts b/packages/cli/src/ui/hooks/atCommandProcessor.test.ts index 3d734707b9..5b95eef343 100644 --- a/packages/cli/src/ui/hooks/atCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/atCommandProcessor.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,13 +7,13 @@ import type { Mock } from 'vitest'; import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { handleAtCommand } from './atCommandProcessor.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { FileDiscoveryService, StandardFileSystemService, COMMON_IGNORE_PATTERNS, // DEFAULT_FILE_EXCLUDES, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import * as os from 'node:os'; import { ToolCallStatus } from '../types.js'; import type { UseHistoryManagerReturn } from './useHistoryManager.js'; diff --git a/packages/cli/src/ui/hooks/atCommandProcessor.ts b/packages/cli/src/ui/hooks/atCommandProcessor.ts index 31c8092ebb..e908ecd48f 100644 --- a/packages/cli/src/ui/hooks/atCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/atCommandProcessor.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,14 +7,14 @@ import * as fs from 'node:fs/promises'; import * as path from 'node:path'; import type { PartListUnion } from '@google/genai'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { getErrorMessage, isNodeError, Storage, unescapePath, readManyFiles, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { HistoryItemToolGroup, HistoryItemWithoutId, diff --git a/packages/cli/src/ui/hooks/keyToAnsi.ts b/packages/cli/src/ui/hooks/keyToAnsi.ts index 1d5549ab0f..10368d96e5 100644 --- a/packages/cli/src/ui/hooks/keyToAnsi.ts +++ b/packages/cli/src/ui/hooks/keyToAnsi.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.test.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.test.ts index 7b6acdca48..0bf841d7d5 100644 --- a/packages/cli/src/ui/hooks/shellCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/shellCommandProcessor.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -17,9 +17,9 @@ import { const mockIsBinary = vi.hoisted(() => vi.fn()); const mockShellExecutionService = vi.hoisted(() => vi.fn()); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = - await importOriginal(); + await importOriginal(); return { ...original, ShellExecutionService: { execute: mockShellExecutionService }, @@ -40,7 +40,7 @@ import { type GeminiClient, type ShellExecutionResult, type ShellOutputEvent, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import * as fs from 'node:fs'; import * as os from 'node:os'; import * as path from 'node:path'; diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.ts index 65037942b9..74a4e52d32 100644 --- a/packages/cli/src/ui/hooks/shellCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/shellCommandProcessor.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -15,12 +15,12 @@ import type { Config, GeminiClient, ShellExecutionResult, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { createDebugLogger, isBinary, ShellExecutionService, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { type PartListUnion } from '@google/genai'; import type { UseHistoryManagerReturn } from './useHistoryManager.js'; import { SHELL_COMMAND_NAME } from '../constants.js'; diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts index c48653970f..aa2a3f3f69 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -23,15 +23,15 @@ import { SlashCommandStatus, ToolConfirmationOutcome, makeFakeConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; const { logSlashCommand } = vi.hoisted(() => ({ logSlashCommand: vi.fn(), })); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = - await importOriginal(); + await importOriginal(); return { ...original, logSlashCommand, diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts index 82cd52060c..4eecde0922 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -17,7 +17,7 @@ import { SlashCommandStatus, ToolConfirmationOutcome, IdeClient, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { useSessionStats } from '../contexts/SessionContext.js'; import type { Message, @@ -81,6 +81,7 @@ interface SlashCommandProcessorActions { openAgentsManagerDialog: () => void; openExtensionsManagerDialog: () => void; openMcpDialog: () => void; + toggleFileTree: () => void; } /** @@ -440,6 +441,11 @@ export const useSlashCommandProcessor = ( toolArgs: result.toolArgs, }; case 'message': + // Special handling for file tree toggle + if (result.content === '__TOGGLE_FILE_TREE__') { + actions.toggleFileTree(); + return { type: 'handled' }; + } if (result.messageType === 'info') { addMessage({ type: MessageType.INFO, diff --git a/packages/cli/src/ui/hooks/useAgentsManagerDialog.ts b/packages/cli/src/ui/hooks/useAgentsManagerDialog.ts index b5904af658..f65bc3f963 100644 --- a/packages/cli/src/ui/hooks/useAgentsManagerDialog.ts +++ b/packages/cli/src/ui/hooks/useAgentsManagerDialog.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useApprovalModeCommand.ts b/packages/cli/src/ui/hooks/useApprovalModeCommand.ts index f328ded98d..d59ea6e9ed 100644 --- a/packages/cli/src/ui/hooks/useApprovalModeCommand.ts +++ b/packages/cli/src/ui/hooks/useApprovalModeCommand.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ import { useState, useCallback } from 'react'; -import type { ApprovalMode, Config } from '@qwen-code/qwen-code-core'; +import type { ApprovalMode, Config } from '@bwen-code/bwen-code-core'; import type { LoadedSettings, SettingScope } from '../../config/settings.js'; interface UseApprovalModeCommandReturn { diff --git a/packages/cli/src/ui/hooks/useAtCompletion.test.ts b/packages/cli/src/ui/hooks/useAtCompletion.test.ts index 588d53fcf7..987062a654 100644 --- a/packages/cli/src/ui/hooks/useAtCompletion.test.ts +++ b/packages/cli/src/ui/hooks/useAtCompletion.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,8 +9,8 @@ import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'; import { renderHook, waitFor, act } from '@testing-library/react'; import { useAtCompletion } from './useAtCompletion.js'; -import type { Config, FileSearch } from '@qwen-code/qwen-code-core'; -import { FileSearchFactory } from '@qwen-code/qwen-code-core'; +import type { Config, FileSearch } from '@bwen-code/bwen-code-core'; +import { FileSearchFactory } from '@bwen-code/bwen-code-core'; import type { FileSystemStructure } from '@qwen-code/qwen-code-test-utils'; import { createTmpDir, cleanupTmpDir } from '@qwen-code/qwen-code-test-utils'; import { useState } from 'react'; diff --git a/packages/cli/src/ui/hooks/useAtCompletion.ts b/packages/cli/src/ui/hooks/useAtCompletion.ts index 1df1eded3c..5f48cb7d35 100644 --- a/packages/cli/src/ui/hooks/useAtCompletion.ts +++ b/packages/cli/src/ui/hooks/useAtCompletion.ts @@ -1,12 +1,12 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { useEffect, useReducer, useRef } from 'react'; -import type { Config, FileSearch } from '@qwen-code/qwen-code-core'; -import { FileSearchFactory, escapePath } from '@qwen-code/qwen-code-core'; +import type { Config, FileSearch } from '@bwen-code/bwen-code-core'; +import { FileSearchFactory, escapePath } from '@bwen-code/bwen-code-core'; import type { Suggestion } from '../components/SuggestionsDisplay.js'; import { MAX_SUGGESTIONS_TO_SHOW } from '../components/SuggestionsDisplay.js'; import { AsyncFzf } from 'fzf'; @@ -217,7 +217,7 @@ export function useAtCompletion(props: UseAtCompletionProps): void { const fzf = new AsyncFzf(allFiles, { casing: 'case-insensitive', normalize: true, - selector: (item) => item, + selector: (item: string) => item, tiebreakers: ['score', 'length'], }); @@ -225,9 +225,9 @@ export function useAtCompletion(props: UseAtCompletionProps): void { // Sort by fzf score (higher is better) and take top results results = fzfResults - .sort((a, b) => b.score - a.score) + .sort((a: { score: number }, b: { score: number }) => b.score - a.score) .slice(0, MAX_SUGGESTIONS_TO_SHOW * 3) - .map((r) => r.item); + .map((r: { item: string }) => r.item); } else { results = allFiles; } diff --git a/packages/cli/src/ui/hooks/useAttentionNotifications.test.ts b/packages/cli/src/ui/hooks/useAttentionNotifications.test.ts index e8beb86fdb..40103dff6a 100644 --- a/packages/cli/src/ui/hooks/useAttentionNotifications.test.ts +++ b/packages/cli/src/ui/hooks/useAttentionNotifications.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useAttentionNotifications.ts b/packages/cli/src/ui/hooks/useAttentionNotifications.ts index 7c5cd043a4..a49d180823 100644 --- a/packages/cli/src/ui/hooks/useAttentionNotifications.ts +++ b/packages/cli/src/ui/hooks/useAttentionNotifications.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useAutoAcceptIndicator.test.ts b/packages/cli/src/ui/hooks/useAutoAcceptIndicator.test.ts index 19dfd05313..576b0c5fe9 100644 --- a/packages/cli/src/ui/hooks/useAutoAcceptIndicator.test.ts +++ b/packages/cli/src/ui/hooks/useAutoAcceptIndicator.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -16,17 +16,17 @@ import { import { renderHook, act } from '@testing-library/react'; import { useAutoAcceptIndicator } from './useAutoAcceptIndicator.js'; -import { Config, ApprovalMode } from '@qwen-code/qwen-code-core'; -import type { Config as ActualConfigType } from '@qwen-code/qwen-code-core'; +import { Config, ApprovalMode } from '@bwen-code/bwen-code-core'; +import type { Config as ActualConfigType } from '@bwen-code/bwen-code-core'; import type { Key } from './useKeypress.js'; import { useKeypress } from './useKeypress.js'; import { MessageType } from '../types.js'; vi.mock('./useKeypress.js'); -vi.mock('@qwen-code/qwen-code-core', async () => { +vi.mock('@bwen-code/bwen-code-core', async () => { const actualServerModule = (await vi.importActual( - '@qwen-code/qwen-code-core', + '@bwen-code/bwen-code-core', )) as Record; return { ...actualServerModule, diff --git a/packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts b/packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts index 3135a362b4..222635f550 100644 --- a/packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts +++ b/packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { type ApprovalMode, APPROVAL_MODES, type Config, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { useEffect, useState } from 'react'; import { useKeypress } from './useKeypress.js'; import type { HistoryItemWithoutId } from '../types.js'; diff --git a/packages/cli/src/ui/hooks/useBracketedPaste.ts b/packages/cli/src/ui/hooks/useBracketedPaste.ts index ae58be3b07..a4acf3e0f1 100644 --- a/packages/cli/src/ui/hooks/useBracketedPaste.ts +++ b/packages/cli/src/ui/hooks/useBracketedPaste.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useCodingPlanUpdates.test.ts b/packages/cli/src/ui/hooks/useCodingPlanUpdates.test.ts index 7f8be6a69a..d384f6a9d2 100644 --- a/packages/cli/src/ui/hooks/useCodingPlanUpdates.test.ts +++ b/packages/cli/src/ui/hooks/useCodingPlanUpdates.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import { getCodingPlanConfig, CodingPlanRegion, } from '../../constants/codingPlan.js'; -import { AuthType } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; // Get region configs for testing const chinaConfig = getCodingPlanConfig(CodingPlanRegion.CHINA); diff --git a/packages/cli/src/ui/hooks/useCodingPlanUpdates.ts b/packages/cli/src/ui/hooks/useCodingPlanUpdates.ts index 1d341b31f0..028d99dacc 100644 --- a/packages/cli/src/ui/hooks/useCodingPlanUpdates.ts +++ b/packages/cli/src/ui/hooks/useCodingPlanUpdates.ts @@ -1,12 +1,12 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ import { useCallback, useEffect, useState } from 'react'; -import type { Config, ModelProvidersConfig } from '@qwen-code/qwen-code-core'; -import { AuthType } from '@qwen-code/qwen-code-core'; +import type { Config, ModelProvidersConfig } from '@bwen-code/bwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import type { LoadedSettings } from '../../config/settings.js'; import { getPersistScopeForModelSelection } from '../../config/modelProvidersScope.js'; import { diff --git a/packages/cli/src/ui/hooks/useCommandCompletion.test.ts b/packages/cli/src/ui/hooks/useCommandCompletion.test.ts index 659b99db0d..2018be1002 100644 --- a/packages/cli/src/ui/hooks/useCommandCompletion.test.ts +++ b/packages/cli/src/ui/hooks/useCommandCompletion.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'; import { renderHook, act, waitFor } from '@testing-library/react'; import { useCommandCompletion } from './useCommandCompletion.js'; import type { CommandContext } from '../commands/types.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { useTextBuffer } from '../components/shared/text-buffer.js'; import { useEffect } from 'react'; import type { Suggestion } from '../components/SuggestionsDisplay.js'; diff --git a/packages/cli/src/ui/hooks/useCommandCompletion.tsx b/packages/cli/src/ui/hooks/useCommandCompletion.tsx index cb5d9f276b..365d4ab7e1 100644 --- a/packages/cli/src/ui/hooks/useCommandCompletion.tsx +++ b/packages/cli/src/ui/hooks/useCommandCompletion.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -13,7 +13,7 @@ import { isSlashCommand } from '../utils/commandUtils.js'; import { toCodePoints } from '../utils/textUtils.js'; import { useAtCompletion } from './useAtCompletion.js'; import { useSlashCompletion } from './useSlashCompletion.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { useCompletion } from './useCompletion.js'; export enum CompletionMode { diff --git a/packages/cli/src/ui/hooks/useCommandMigration.ts b/packages/cli/src/ui/hooks/useCommandMigration.ts index 191694089b..d38995f822 100644 --- a/packages/cli/src/ui/hooks/useCommandMigration.ts +++ b/packages/cli/src/ui/hooks/useCommandMigration.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { useEffect, useState } from 'react'; -import { Storage } from '@qwen-code/qwen-code-core'; +import { Storage } from '@bwen-code/bwen-code-core'; import { detectTomlCommands } from '../../services/command-migration-tool.js'; import type { LoadedSettings } from '../../config/settings.js'; diff --git a/packages/cli/src/ui/hooks/useCompletion.ts b/packages/cli/src/ui/hooks/useCompletion.ts index 8d3d4c2f37..9f0ee8a4f7 100644 --- a/packages/cli/src/ui/hooks/useCompletion.ts +++ b/packages/cli/src/ui/hooks/useCompletion.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useDialogClose.ts b/packages/cli/src/ui/hooks/useDialogClose.ts index d71a211901..218f8b0ec3 100644 --- a/packages/cli/src/ui/hooks/useDialogClose.ts +++ b/packages/cli/src/ui/hooks/useDialogClose.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { useCallback } from 'react'; import { SettingScope } from '../../config/settings.js'; -import type { AuthType, ApprovalMode } from '@qwen-code/qwen-code-core'; +import type { AuthType, ApprovalMode } from '@bwen-code/bwen-code-core'; // OpenAICredentials type (previously imported from OpenAIKeyPrompt) interface OpenAICredentials { apiKey: string; diff --git a/packages/cli/src/ui/hooks/useEditorSettings.test.ts b/packages/cli/src/ui/hooks/useEditorSettings.test.ts index fa3cf98b71..7102970c1a 100644 --- a/packages/cli/src/ui/hooks/useEditorSettings.test.ts +++ b/packages/cli/src/ui/hooks/useEditorSettings.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -23,10 +23,10 @@ import { type EditorType, checkHasEditorType, allowEditorTypeInSandbox, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; -vi.mock('@qwen-code/qwen-code-core', async () => { - const actual = await vi.importActual('@qwen-code/qwen-code-core'); +vi.mock('@bwen-code/bwen-code-core', async () => { + const actual = await vi.importActual('@bwen-code/bwen-code-core'); return { ...actual, checkHasEditorType: vi.fn(() => true), diff --git a/packages/cli/src/ui/hooks/useEditorSettings.ts b/packages/cli/src/ui/hooks/useEditorSettings.ts index 5d6a5a371b..91c652ce57 100644 --- a/packages/cli/src/ui/hooks/useEditorSettings.ts +++ b/packages/cli/src/ui/hooks/useEditorSettings.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,11 +7,11 @@ import { useState, useCallback } from 'react'; import type { LoadedSettings, SettingScope } from '../../config/settings.js'; import { type HistoryItem, MessageType } from '../types.js'; -import type { EditorType } from '@qwen-code/qwen-code-core'; +import type { EditorType } from '@bwen-code/bwen-code-core'; import { allowEditorTypeInSandbox, checkHasEditorType, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; interface UseEditorSettingsReturn { isEditorDialogOpen: boolean; diff --git a/packages/cli/src/ui/hooks/useExtensionUpdates.test.ts b/packages/cli/src/ui/hooks/useExtensionUpdates.test.ts index bc0906aa33..7ef0e1ee19 100644 --- a/packages/cli/src/ui/hooks/useExtensionUpdates.test.ts +++ b/packages/cli/src/ui/hooks/useExtensionUpdates.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -21,7 +21,7 @@ import { type Extension, type ExtensionUpdateInfo, ExtensionUpdateState, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { renderHook, waitFor, act } from '@testing-library/react'; import { MessageType } from '../types.js'; diff --git a/packages/cli/src/ui/hooks/useExtensionUpdates.ts b/packages/cli/src/ui/hooks/useExtensionUpdates.ts index a86f0b814f..b2a485ceb3 100644 --- a/packages/cli/src/ui/hooks/useExtensionUpdates.ts +++ b/packages/cli/src/ui/hooks/useExtensionUpdates.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import type { ExtensionManager } from '@qwen-code/qwen-code-core'; +import type { ExtensionManager } from '@bwen-code/bwen-code-core'; import { getErrorMessage } from '../../utils/errors.js'; import { ExtensionUpdateState, diff --git a/packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts b/packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts index db6c820548..4dbd63d67d 100644 --- a/packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts +++ b/packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useFeedbackDialog.ts b/packages/cli/src/ui/hooks/useFeedbackDialog.ts index aee0f5a66c..f76b9ee160 100644 --- a/packages/cli/src/ui/hooks/useFeedbackDialog.ts +++ b/packages/cli/src/ui/hooks/useFeedbackDialog.ts @@ -1,4 +1,4 @@ -import { useState, useCallback, useEffect } from 'react'; +import { useState, useCallback, useEffect } from 'react'; import * as fs from 'node:fs'; import { type Config, @@ -8,7 +8,7 @@ import { type UserFeedbackRating, isNodeError, AuthType, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { StreamingState, MessageType, type HistoryItem } from '../types.js'; import { SettingScope, diff --git a/packages/cli/src/ui/hooks/useFocus.test.ts b/packages/cli/src/ui/hooks/useFocus.test.ts index cf0dad0dcc..349d4b639c 100644 --- a/packages/cli/src/ui/hooks/useFocus.test.ts +++ b/packages/cli/src/ui/hooks/useFocus.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useFocus.ts b/packages/cli/src/ui/hooks/useFocus.ts index 65288cb0da..ce0ef6d15b 100644 --- a/packages/cli/src/ui/hooks/useFocus.ts +++ b/packages/cli/src/ui/hooks/useFocus.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useFolderTrust.test.ts b/packages/cli/src/ui/hooks/useFolderTrust.test.ts index 4f6ff98427..5379da3124 100644 --- a/packages/cli/src/ui/hooks/useFolderTrust.test.ts +++ b/packages/cli/src/ui/hooks/useFolderTrust.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useFolderTrust.ts b/packages/cli/src/ui/hooks/useFolderTrust.ts index 76d63150d7..635028db6d 100644 --- a/packages/cli/src/ui/hooks/useFolderTrust.ts +++ b/packages/cli/src/ui/hooks/useFolderTrust.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx index e6696ae6b3..f1be070c14 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx +++ b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -23,14 +23,14 @@ import type { EditorType, GeminiClient, AnyToolInvocation, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { ApprovalMode, AuthType, GeminiEventType as ServerGeminiEventType, ToolErrorType, ToolConfirmationOutcome, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Part, PartListUnion } from '@google/genai'; import type { UseHistoryManagerReturn } from './useHistoryManager.js'; import type { HistoryItem, SlashCommandProcessorResult } from '../types.js'; @@ -74,7 +74,7 @@ const mockParseAndFormatApiError = vi.hoisted(() => ); const mockLogApiCancel = vi.hoisted(() => vi.fn()); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actualCoreModule = (await importOriginal()) as any; return { ...actualCoreModule, diff --git a/packages/cli/src/ui/hooks/useGeminiStream.ts b/packages/cli/src/ui/hooks/useGeminiStream.ts index 7614eed002..0b884e201b 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.ts +++ b/packages/cli/src/ui/hooks/useGeminiStream.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -16,7 +16,7 @@ import type { ThoughtSummary, ToolCallRequestInfo, GeminiErrorEventValue, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { GeminiEventType as ServerGeminiEventType, createDebugLogger, @@ -37,7 +37,7 @@ import { ApiCancelEvent, isSupportedImageMimeType, getUnsupportedImageFormatWarning, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { type Part, type PartListUnion, FinishReason } from '@google/genai'; import type { HistoryItem, diff --git a/packages/cli/src/ui/hooks/useGitBranchName.test.ts b/packages/cli/src/ui/hooks/useGitBranchName.test.ts index dcc6428900..ce98e344a3 100644 --- a/packages/cli/src/ui/hooks/useGitBranchName.test.ts +++ b/packages/cli/src/ui/hooks/useGitBranchName.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,13 +10,13 @@ import { act } from 'react'; import { renderHook, waitFor } from '@testing-library/react'; import { useGitBranchName } from './useGitBranchName.js'; import { fs, vol } from 'memfs'; // For mocking fs -import { isCommandAvailable, execCommand } from '@qwen-code/qwen-code-core'; +import { isCommandAvailable, execCommand } from '@bwen-code/bwen-code-core'; -// Mock @qwen-code/qwen-code-core -vi.mock('@qwen-code/qwen-code-core', async () => { +// Mock @bwen-code/bwen-code-core +vi.mock('@bwen-code/bwen-code-core', async () => { const original = await vi.importActual< - typeof import('@qwen-code/qwen-code-core') - >('@qwen-code/qwen-code-core'); + typeof import('@bwen-code/bwen-code-core') + >('@bwen-code/bwen-code-core'); return { ...original, execCommand: vi.fn(), diff --git a/packages/cli/src/ui/hooks/useGitBranchName.ts b/packages/cli/src/ui/hooks/useGitBranchName.ts index 326051a02e..76247c5c8f 100644 --- a/packages/cli/src/ui/hooks/useGitBranchName.ts +++ b/packages/cli/src/ui/hooks/useGitBranchName.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { useState, useEffect, useCallback } from 'react'; -import { isCommandAvailable, execCommand } from '@qwen-code/qwen-code-core'; +import { isCommandAvailable, execCommand } from '@bwen-code/bwen-code-core'; import fs from 'node:fs'; import fsPromises from 'node:fs/promises'; import path from 'node:path'; diff --git a/packages/cli/src/ui/hooks/useHistoryManager.test.ts b/packages/cli/src/ui/hooks/useHistoryManager.test.ts index c6f600323e..07b58c808b 100644 --- a/packages/cli/src/ui/hooks/useHistoryManager.test.ts +++ b/packages/cli/src/ui/hooks/useHistoryManager.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useHistoryManager.ts b/packages/cli/src/ui/hooks/useHistoryManager.ts index cc7ed5575e..7925521e33 100644 --- a/packages/cli/src/ui/hooks/useHistoryManager.ts +++ b/packages/cli/src/ui/hooks/useHistoryManager.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useIdeTrustListener.test.ts b/packages/cli/src/ui/hooks/useIdeTrustListener.test.ts index 8f613e52cf..dd45f80770 100644 --- a/packages/cli/src/ui/hooks/useIdeTrustListener.test.ts +++ b/packages/cli/src/ui/hooks/useIdeTrustListener.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -13,16 +13,16 @@ import { IDEConnectionStatus, ideContextStore, type IDEConnectionState, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { useIdeTrustListener } from './useIdeTrustListener.js'; import * as trustedFolders from '../../config/trustedFolders.js'; import { useSettings } from '../contexts/SettingsContext.js'; import type { LoadedSettings } from '../../config/settings.js'; // Mock dependencies -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = - await importOriginal(); + await importOriginal(); const ideClientInstance = { addTrustChangeListener: vi.fn(), removeTrustChangeListener: vi.fn(), diff --git a/packages/cli/src/ui/hooks/useIdeTrustListener.ts b/packages/cli/src/ui/hooks/useIdeTrustListener.ts index 1669d9a435..2d06a7953a 100644 --- a/packages/cli/src/ui/hooks/useIdeTrustListener.ts +++ b/packages/cli/src/ui/hooks/useIdeTrustListener.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -16,7 +16,7 @@ import { IDEConnectionStatus, ideContextStore, type IDEConnectionState, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { useSettings } from '../contexts/SettingsContext.js'; import { isWorkspaceTrusted } from '../../config/trustedFolders.js'; diff --git a/packages/cli/src/ui/hooks/useInitializationAuthError.ts b/packages/cli/src/ui/hooks/useInitializationAuthError.ts index bb25d323da..43fcba4efd 100644 --- a/packages/cli/src/ui/hooks/useInitializationAuthError.ts +++ b/packages/cli/src/ui/hooks/useInitializationAuthError.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useInputHistory.test.ts b/packages/cli/src/ui/hooks/useInputHistory.test.ts index 8d10c376b6..9b97d1df2a 100644 --- a/packages/cli/src/ui/hooks/useInputHistory.test.ts +++ b/packages/cli/src/ui/hooks/useInputHistory.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useInputHistory.ts b/packages/cli/src/ui/hooks/useInputHistory.ts index 58fc9d4a6c..79c18a859a 100644 --- a/packages/cli/src/ui/hooks/useInputHistory.ts +++ b/packages/cli/src/ui/hooks/useInputHistory.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useInputHistoryStore.test.ts b/packages/cli/src/ui/hooks/useInputHistoryStore.test.ts index 49ccef42bc..93086c1e21 100644 --- a/packages/cli/src/ui/hooks/useInputHistoryStore.test.ts +++ b/packages/cli/src/ui/hooks/useInputHistoryStore.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useInputHistoryStore.ts b/packages/cli/src/ui/hooks/useInputHistoryStore.ts index f879e31f0f..ba349ca5fb 100644 --- a/packages/cli/src/ui/hooks/useInputHistoryStore.ts +++ b/packages/cli/src/ui/hooks/useInputHistoryStore.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { useState, useCallback } from 'react'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; interface Logger { getPreviousUserMessages(): Promise; diff --git a/packages/cli/src/ui/hooks/useKeypress.test.ts b/packages/cli/src/ui/hooks/useKeypress.test.ts index 296368b5ee..9a7d90abc1 100644 --- a/packages/cli/src/ui/hooks/useKeypress.test.ts +++ b/packages/cli/src/ui/hooks/useKeypress.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useKeypress.ts b/packages/cli/src/ui/hooks/useKeypress.ts index 1ff3ae2778..24c147cd64 100644 --- a/packages/cli/src/ui/hooks/useKeypress.ts +++ b/packages/cli/src/ui/hooks/useKeypress.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts b/packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts index 53c7566c69..9a171404b8 100644 --- a/packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts +++ b/packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useLaunchEditor.ts b/packages/cli/src/ui/hooks/useLaunchEditor.ts index 809e8a3d6e..a6c2d1e42c 100644 --- a/packages/cli/src/ui/hooks/useLaunchEditor.ts +++ b/packages/cli/src/ui/hooks/useLaunchEditor.ts @@ -1,10 +1,10 @@ -import { useCallback } from 'react'; +import { useCallback } from 'react'; import { useStdin } from 'ink'; -import type { EditorType } from '@qwen-code/qwen-code-core'; +import type { EditorType } from '@bwen-code/bwen-code-core'; import { editorCommands, commandExists as coreCommandExists, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { spawnSync } from 'child_process'; import { useSettings } from '../contexts/SettingsContext.js'; diff --git a/packages/cli/src/ui/hooks/useLoadingIndicator.test.ts b/packages/cli/src/ui/hooks/useLoadingIndicator.test.ts index 0845658ed8..7052ffd5d5 100644 --- a/packages/cli/src/ui/hooks/useLoadingIndicator.test.ts +++ b/packages/cli/src/ui/hooks/useLoadingIndicator.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useLoadingIndicator.ts b/packages/cli/src/ui/hooks/useLoadingIndicator.ts index d69df1706d..1565556551 100644 --- a/packages/cli/src/ui/hooks/useLoadingIndicator.ts +++ b/packages/cli/src/ui/hooks/useLoadingIndicator.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useLogger.ts b/packages/cli/src/ui/hooks/useLogger.ts index bcd980ba94..f58786b3d8 100644 --- a/packages/cli/src/ui/hooks/useLogger.ts +++ b/packages/cli/src/ui/hooks/useLogger.ts @@ -1,12 +1,12 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { useState, useEffect } from 'react'; -import type { Storage } from '@qwen-code/qwen-code-core'; -import { Logger } from '@qwen-code/qwen-code-core'; +import type { Storage } from '@bwen-code/bwen-code-core'; +import { Logger } from '@bwen-code/bwen-code-core'; /** * Hook to manage the logger instance. diff --git a/packages/cli/src/ui/hooks/useMcpDialog.ts b/packages/cli/src/ui/hooks/useMcpDialog.ts index 3b444297f7..3a63df70bc 100644 --- a/packages/cli/src/ui/hooks/useMcpDialog.ts +++ b/packages/cli/src/ui/hooks/useMcpDialog.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useMemoryMonitor.test.ts b/packages/cli/src/ui/hooks/useMemoryMonitor.test.ts index 3250a33833..d68ae15313 100644 --- a/packages/cli/src/ui/hooks/useMemoryMonitor.test.ts +++ b/packages/cli/src/ui/hooks/useMemoryMonitor.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useMemoryMonitor.ts b/packages/cli/src/ui/hooks/useMemoryMonitor.ts index 7573eb0c2c..e7ac1a0b96 100644 --- a/packages/cli/src/ui/hooks/useMemoryMonitor.ts +++ b/packages/cli/src/ui/hooks/useMemoryMonitor.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useMessageQueue.test.ts b/packages/cli/src/ui/hooks/useMessageQueue.test.ts index 33dbf3211c..441d6228f8 100644 --- a/packages/cli/src/ui/hooks/useMessageQueue.test.ts +++ b/packages/cli/src/ui/hooks/useMessageQueue.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useMessageQueue.ts b/packages/cli/src/ui/hooks/useMessageQueue.ts index 517040fecf..0966599d00 100644 --- a/packages/cli/src/ui/hooks/useMessageQueue.ts +++ b/packages/cli/src/ui/hooks/useMessageQueue.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useModelCommand.test.ts b/packages/cli/src/ui/hooks/useModelCommand.test.ts index 30cbe7e56a..e57ac63750 100644 --- a/packages/cli/src/ui/hooks/useModelCommand.test.ts +++ b/packages/cli/src/ui/hooks/useModelCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useModelCommand.ts b/packages/cli/src/ui/hooks/useModelCommand.ts index c26dcf95a7..536b1cc10c 100644 --- a/packages/cli/src/ui/hooks/useModelCommand.ts +++ b/packages/cli/src/ui/hooks/useModelCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/usePermissionsModifyTrust.test.ts b/packages/cli/src/ui/hooks/usePermissionsModifyTrust.test.ts index 519752e82b..758c2c00c2 100644 --- a/packages/cli/src/ui/hooks/usePermissionsModifyTrust.test.ts +++ b/packages/cli/src/ui/hooks/usePermissionsModifyTrust.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/usePermissionsModifyTrust.ts b/packages/cli/src/ui/hooks/usePermissionsModifyTrust.ts index f5a10ff38f..0a42b59dc7 100644 --- a/packages/cli/src/ui/hooks/usePermissionsModifyTrust.ts +++ b/packages/cli/src/ui/hooks/usePermissionsModifyTrust.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/usePhraseCycler.test.ts b/packages/cli/src/ui/hooks/usePhraseCycler.test.ts index 420851edbc..5794bc1f2a 100644 --- a/packages/cli/src/ui/hooks/usePhraseCycler.test.ts +++ b/packages/cli/src/ui/hooks/usePhraseCycler.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/usePhraseCycler.ts b/packages/cli/src/ui/hooks/usePhraseCycler.ts index 4aa202e6c1..e22bb003d6 100644 --- a/packages/cli/src/ui/hooks/usePhraseCycler.ts +++ b/packages/cli/src/ui/hooks/usePhraseCycler.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useQwenAuth.test.ts b/packages/cli/src/ui/hooks/useQwenAuth.test.ts index 43611afe58..84506d2746 100644 --- a/packages/cli/src/ui/hooks/useQwenAuth.test.ts +++ b/packages/cli/src/ui/hooks/useQwenAuth.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -6,17 +6,17 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { renderHook, act } from '@testing-library/react'; -import type { DeviceAuthorizationData } from '@qwen-code/qwen-code-core'; +import type { DeviceAuthorizationData } from '@bwen-code/bwen-code-core'; import { useQwenAuth } from './useQwenAuth.js'; import { AuthType, qwenOAuth2Events, QwenOAuth2Event, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; // Mock the qwenOAuth2Events -vi.mock('@qwen-code/qwen-code-core', async () => { - const actual = await vi.importActual('@qwen-code/qwen-code-core'); +vi.mock('@bwen-code/bwen-code-core', async () => { + const actual = await vi.importActual('@bwen-code/bwen-code-core'); const mockEmitter = { on: vi.fn().mockReturnThis(), off: vi.fn().mockReturnThis(), diff --git a/packages/cli/src/ui/hooks/useQwenAuth.ts b/packages/cli/src/ui/hooks/useQwenAuth.ts index 2b1819c1ca..c02bbfff7c 100644 --- a/packages/cli/src/ui/hooks/useQwenAuth.ts +++ b/packages/cli/src/ui/hooks/useQwenAuth.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import { qwenOAuth2Events, QwenOAuth2Event, type DeviceAuthorizationData, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; export interface QwenAuthState { deviceAuth: DeviceAuthorizationData | null; diff --git a/packages/cli/src/ui/hooks/useReactToolScheduler.ts b/packages/cli/src/ui/hooks/useReactToolScheduler.ts index 56992f6784..fbd81c1067 100644 --- a/packages/cli/src/ui/hooks/useReactToolScheduler.ts +++ b/packages/cli/src/ui/hooks/useReactToolScheduler.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -19,11 +19,11 @@ import type { ToolCall, Status as CoreStatus, EditorType, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { CoreToolScheduler, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { useCallback, useState, useMemo } from 'react'; import type { HistoryItemToolGroup, diff --git a/packages/cli/src/ui/hooks/useRefreshMemoryCommand.ts b/packages/cli/src/ui/hooks/useRefreshMemoryCommand.ts index 025eb9a05e..a84c0559b8 100644 --- a/packages/cli/src/ui/hooks/useRefreshMemoryCommand.ts +++ b/packages/cli/src/ui/hooks/useRefreshMemoryCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useResumeCommand.test.ts b/packages/cli/src/ui/hooks/useResumeCommand.test.ts index daaedfcce7..acbd3f9429 100644 --- a/packages/cli/src/ui/hooks/useResumeCommand.test.ts +++ b/packages/cli/src/ui/hooks/useResumeCommand.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 @@ -40,7 +40,7 @@ vi.mock('../utils/resumeHistoryUtils.js', () => ({ buildResumedHistoryItems: vi.fn(() => [{ id: 1, type: 'user', text: 'hi' }]), })); -vi.mock('@qwen-code/qwen-code-core', () => { +vi.mock('@bwen-code/bwen-code-core', () => { class SessionService { constructor(_cwd: string) {} async loadSession(_sessionId: string) { @@ -142,7 +142,7 @@ describe('useResumeCommand', () => { getTargetDir: () => '/tmp', getGeminiClient: () => geminiClient, startNewSession: vi.fn(), - } as unknown as import('@qwen-code/qwen-code-core').Config; + } as unknown as import('@bwen-code/bwen-code-core').Config; const { result } = renderHook(() => useResumeCommand({ diff --git a/packages/cli/src/ui/hooks/useResumeCommand.ts b/packages/cli/src/ui/hooks/useResumeCommand.ts index 8fc3d4ddfa..8231ec923b 100644 --- a/packages/cli/src/ui/hooks/useResumeCommand.ts +++ b/packages/cli/src/ui/hooks/useResumeCommand.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 */ import { useState, useCallback } from 'react'; -import { SessionService, type Config } from '@qwen-code/qwen-code-core'; +import { SessionService, type Config } from '@bwen-code/bwen-code-core'; import { buildResumedHistoryItems } from '../utils/resumeHistoryUtils.js'; import type { UseHistoryManagerReturn } from './useHistoryManager.js'; diff --git a/packages/cli/src/ui/hooks/useReverseSearchCompletion.test.tsx b/packages/cli/src/ui/hooks/useReverseSearchCompletion.test.tsx index 373696ce4c..356c95012f 100644 --- a/packages/cli/src/ui/hooks/useReverseSearchCompletion.test.tsx +++ b/packages/cli/src/ui/hooks/useReverseSearchCompletion.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useReverseSearchCompletion.tsx b/packages/cli/src/ui/hooks/useReverseSearchCompletion.tsx index d90875c10c..39bbd52f1e 100644 --- a/packages/cli/src/ui/hooks/useReverseSearchCompletion.tsx +++ b/packages/cli/src/ui/hooks/useReverseSearchCompletion.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useSelectionList.test.ts b/packages/cli/src/ui/hooks/useSelectionList.test.ts index 8383d89c9c..7867439a9a 100644 --- a/packages/cli/src/ui/hooks/useSelectionList.test.ts +++ b/packages/cli/src/ui/hooks/useSelectionList.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useSelectionList.ts b/packages/cli/src/ui/hooks/useSelectionList.ts index c09aec8027..632403ce18 100644 --- a/packages/cli/src/ui/hooks/useSelectionList.ts +++ b/packages/cli/src/ui/hooks/useSelectionList.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { useReducer, useRef, useEffect } from 'react'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import { useKeypress } from './useKeypress.js'; export interface SelectionListItem { diff --git a/packages/cli/src/ui/hooks/useSessionPicker.ts b/packages/cli/src/ui/hooks/useSessionPicker.ts index 7d451466a4..32aa16816b 100644 --- a/packages/cli/src/ui/hooks/useSessionPicker.ts +++ b/packages/cli/src/ui/hooks/useSessionPicker.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 @@ -18,7 +18,7 @@ import type { ListSessionsResult, SessionListItem, SessionService, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { filterSessions, SESSION_PAGE_SIZE, diff --git a/packages/cli/src/ui/hooks/useSettingsCommand.ts b/packages/cli/src/ui/hooks/useSettingsCommand.ts index 42f535dffb..8e14d88743 100644 --- a/packages/cli/src/ui/hooks/useSettingsCommand.ts +++ b/packages/cli/src/ui/hooks/useSettingsCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useShellHistory.test.ts b/packages/cli/src/ui/hooks/useShellHistory.test.ts index 4bfe6c9bb9..2c8e647121 100644 --- a/packages/cli/src/ui/hooks/useShellHistory.test.ts +++ b/packages/cli/src/ui/hooks/useShellHistory.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -25,7 +25,7 @@ vi.mock('fs', async (importOriginal) => { mkdirSync: vi.fn(), }; }); -vi.mock('@qwen-code/qwen-code-core', () => { +vi.mock('@bwen-code/bwen-code-core', () => { class Storage { getProjectTempDir(): string { return path.join('/test/home/', '.qwen', 'tmp', 'mocked_hash'); diff --git a/packages/cli/src/ui/hooks/useShellHistory.ts b/packages/cli/src/ui/hooks/useShellHistory.ts index 69358d890b..33f86c793d 100644 --- a/packages/cli/src/ui/hooks/useShellHistory.ts +++ b/packages/cli/src/ui/hooks/useShellHistory.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { createDebugLogger, isNodeError, Storage, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; const MAX_HISTORY_LENGTH = 100; const debugLogger = createDebugLogger('SHELL_HISTORY'); diff --git a/packages/cli/src/ui/hooks/useShowMemoryCommand.ts b/packages/cli/src/ui/hooks/useShowMemoryCommand.ts index 971e775fed..e97a6f2431 100644 --- a/packages/cli/src/ui/hooks/useShowMemoryCommand.ts +++ b/packages/cli/src/ui/hooks/useShowMemoryCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,9 +6,9 @@ import type { Message } from '../types.js'; import { MessageType } from '../types.js'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import type { LoadedSettings } from '../../config/settings.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('SHOW_MEMORY'); diff --git a/packages/cli/src/ui/hooks/useSlashCompletion.test.ts b/packages/cli/src/ui/hooks/useSlashCompletion.test.ts index b813ff8db9..f402602567 100644 --- a/packages/cli/src/ui/hooks/useSlashCompletion.test.ts +++ b/packages/cli/src/ui/hooks/useSlashCompletion.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useSlashCompletion.ts b/packages/cli/src/ui/hooks/useSlashCompletion.ts index 0247523ee7..c36de0596e 100644 --- a/packages/cli/src/ui/hooks/useSlashCompletion.ts +++ b/packages/cli/src/ui/hooks/useSlashCompletion.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { useState, useEffect, useMemo } from 'react'; import { AsyncFzf } from 'fzf'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import type { Suggestion } from '../components/SuggestionsDisplay.js'; import { CommandKind, diff --git a/packages/cli/src/ui/hooks/useStateAndRef.ts b/packages/cli/src/ui/hooks/useStateAndRef.ts index 8a10bab4cc..7a57d0e8bc 100644 --- a/packages/cli/src/ui/hooks/useStateAndRef.ts +++ b/packages/cli/src/ui/hooks/useStateAndRef.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useSubagentCreateDialog.ts b/packages/cli/src/ui/hooks/useSubagentCreateDialog.ts index 30c167031e..b4d62c35b5 100644 --- a/packages/cli/src/ui/hooks/useSubagentCreateDialog.ts +++ b/packages/cli/src/ui/hooks/useSubagentCreateDialog.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useTerminalSize.ts b/packages/cli/src/ui/hooks/useTerminalSize.ts index 9f08a5310e..ed27e9eee1 100644 --- a/packages/cli/src/ui/hooks/useTerminalSize.ts +++ b/packages/cli/src/ui/hooks/useTerminalSize.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useThemeCommand.ts b/packages/cli/src/ui/hooks/useThemeCommand.ts index 467ef313e5..b1d034e94f 100644 --- a/packages/cli/src/ui/hooks/useThemeCommand.ts +++ b/packages/cli/src/ui/hooks/useThemeCommand.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useTimer.test.ts b/packages/cli/src/ui/hooks/useTimer.test.ts index 20d44d1781..c72fc585ed 100644 --- a/packages/cli/src/ui/hooks/useTimer.test.ts +++ b/packages/cli/src/ui/hooks/useTimer.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useTimer.ts b/packages/cli/src/ui/hooks/useTimer.ts index 53c266dde0..22da510cfe 100644 --- a/packages/cli/src/ui/hooks/useTimer.ts +++ b/packages/cli/src/ui/hooks/useTimer.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/useTomlMigration.ts b/packages/cli/src/ui/hooks/useTomlMigration.ts index e69de29bb2..5f282702bb 100644 --- a/packages/cli/src/ui/hooks/useTomlMigration.ts +++ b/packages/cli/src/ui/hooks/useTomlMigration.ts @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/cli/src/ui/hooks/useToolScheduler.test.ts b/packages/cli/src/ui/hooks/useToolScheduler.test.ts index 4e0b753d34..5de58bb287 100644 --- a/packages/cli/src/ui/hooks/useToolScheduler.test.ts +++ b/packages/cli/src/ui/hooks/useToolScheduler.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -24,18 +24,18 @@ import type { Status as ToolCallStatusType, AnyDeclarativeTool, AnyToolInvocation, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES, DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, ApprovalMode, MockTool, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { ToolCallStatus } from '../types.js'; // Mocks -vi.mock('@qwen-code/qwen-code-core', async () => { - const actual = await vi.importActual('@qwen-code/qwen-code-core'); +vi.mock('@bwen-code/bwen-code-core', async () => { + const actual = await vi.importActual('@bwen-code/bwen-code-core'); return { ...actual, ToolRegistry: vi.fn(), diff --git a/packages/cli/src/ui/hooks/useWelcomeBack.ts b/packages/cli/src/ui/hooks/useWelcomeBack.ts index 36ce931beb..e1ba624796 100644 --- a/packages/cli/src/ui/hooks/useWelcomeBack.ts +++ b/packages/cli/src/ui/hooks/useWelcomeBack.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import { getProjectSummaryInfo, type ProjectSummaryInfo, type Config, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { type Settings } from '../../config/settingsSchema.js'; export interface WelcomeBackState { diff --git a/packages/cli/src/ui/hooks/vim.test.ts b/packages/cli/src/ui/hooks/vim.test.ts index c7af542612..626e60d96d 100644 --- a/packages/cli/src/ui/hooks/vim.test.ts +++ b/packages/cli/src/ui/hooks/vim.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/hooks/vim.ts b/packages/cli/src/ui/hooks/vim.ts index da57459594..dd50e9898e 100644 --- a/packages/cli/src/ui/hooks/vim.ts +++ b/packages/cli/src/ui/hooks/vim.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { useCallback, useReducer, useEffect } from 'react'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; import type { Key } from './useKeypress.js'; import type { TextBuffer } from '../components/shared/text-buffer.js'; import { useVimMode } from '../contexts/VimModeContext.js'; diff --git a/packages/cli/src/ui/keyMatchers.test.ts b/packages/cli/src/ui/keyMatchers.test.ts index 8961f9ff70..5873184a04 100644 --- a/packages/cli/src/ui/keyMatchers.test.ts +++ b/packages/cli/src/ui/keyMatchers.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/keyMatchers.ts b/packages/cli/src/ui/keyMatchers.ts index 0b47bb6785..0f43e32bf9 100644 --- a/packages/cli/src/ui/keyMatchers.ts +++ b/packages/cli/src/ui/keyMatchers.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/layouts/DefaultAppLayout.tsx b/packages/cli/src/ui/layouts/DefaultAppLayout.tsx index 93ad311c67..fff3ecca92 100644 --- a/packages/cli/src/ui/layouts/DefaultAppLayout.tsx +++ b/packages/cli/src/ui/layouts/DefaultAppLayout.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -10,31 +10,66 @@ import { MainContent } from '../components/MainContent.js'; import { DialogManager } from '../components/DialogManager.js'; import { Composer } from '../components/Composer.js'; import { ExitWarning } from '../components/ExitWarning.js'; +import { FileTree } from '../components/FileTree.js'; import { useUIState } from '../contexts/UIStateContext.js'; import { useTerminalSize } from '../hooks/useTerminalSize.js'; +import { Config } from '@bwen-code/bwen-code-core'; -export const DefaultAppLayout: React.FC = () => { +interface DefaultAppLayoutProps { + config: Config; +} + +export const DefaultAppLayout: React.FC = ({ + config, +}) => { const uiState = useUIState(); - const { columns: terminalWidth } = useTerminalSize(); + const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize(); + + const fileTreeWidth = Math.min(40, Math.floor(terminalWidth * 0.3)); + const mainContentWidth = uiState.showFileTree + ? terminalWidth - fileTreeWidth + : terminalWidth; return ( - - - - - {uiState.dialogsVisible ? ( - - - - ) : ( - - )} + + {/* Main content area (left) */} + + - + + {uiState.dialogsVisible ? ( + + + + ) : ( + + )} + + + + + {/* File tree panel (right) */} + {uiState.showFileTree && ( + + + + + + )} ); }; diff --git a/packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx b/packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx index b4967a5f40..7cf676f921 100644 --- a/packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx +++ b/packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/models/availableModels.test.ts b/packages/cli/src/ui/models/availableModels.test.ts index 767fb6f060..7248fab68c 100644 --- a/packages/cli/src/ui/models/availableModels.test.ts +++ b/packages/cli/src/ui/models/availableModels.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -10,7 +10,7 @@ import { getFilteredQwenModels, getOpenAIAvailableModelFromEnv, } from './availableModels.js'; -import { AuthType, type Config } from '@qwen-code/qwen-code-core'; +import { AuthType, type Config } from '@bwen-code/bwen-code-core'; describe('availableModels', () => { describe('Qwen models', () => { diff --git a/packages/cli/src/ui/models/availableModels.ts b/packages/cli/src/ui/models/availableModels.ts index def4f12a7a..9583c12f67 100644 --- a/packages/cli/src/ui/models/availableModels.ts +++ b/packages/cli/src/ui/models/availableModels.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import { type Config, type AvailableModel as CoreAvailableModel, QWEN_OAUTH_MODELS, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { t } from '../../i18n/index.js'; export type AvailableModel = { diff --git a/packages/cli/src/ui/noninteractive/nonInteractiveUi.ts b/packages/cli/src/ui/noninteractive/nonInteractiveUi.ts index 7792933308..fa837c07aa 100644 --- a/packages/cli/src/ui/noninteractive/nonInteractiveUi.ts +++ b/packages/cli/src/ui/noninteractive/nonInteractiveUi.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/semantic-colors.ts b/packages/cli/src/ui/semantic-colors.ts index 88e75833f8..9c20d04da3 100644 --- a/packages/cli/src/ui/semantic-colors.ts +++ b/packages/cli/src/ui/semantic-colors.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/state/extensions.ts b/packages/cli/src/ui/state/extensions.ts index 88f0cadcdf..c693eccc71 100644 --- a/packages/cli/src/ui/state/extensions.ts +++ b/packages/cli/src/ui/state/extensions.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/textConstants.ts b/packages/cli/src/ui/textConstants.ts index 53236cfed6..dfedb827ab 100644 --- a/packages/cli/src/ui/textConstants.ts +++ b/packages/cli/src/ui/textConstants.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/ansi-light.ts b/packages/cli/src/ui/themes/ansi-light.ts index fc3f84abf7..cc5a3533ac 100644 --- a/packages/cli/src/ui/themes/ansi-light.ts +++ b/packages/cli/src/ui/themes/ansi-light.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/ansi.ts b/packages/cli/src/ui/themes/ansi.ts index b0cbe95df9..0a41fa6ba9 100644 --- a/packages/cli/src/ui/themes/ansi.ts +++ b/packages/cli/src/ui/themes/ansi.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/atom-one-dark.ts b/packages/cli/src/ui/themes/atom-one-dark.ts index d40a6a0c0f..016eb95c49 100644 --- a/packages/cli/src/ui/themes/atom-one-dark.ts +++ b/packages/cli/src/ui/themes/atom-one-dark.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/ayu-light.ts b/packages/cli/src/ui/themes/ayu-light.ts index 729d0dab36..489b68d50b 100644 --- a/packages/cli/src/ui/themes/ayu-light.ts +++ b/packages/cli/src/ui/themes/ayu-light.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/ayu.ts b/packages/cli/src/ui/themes/ayu.ts index d5bfc9ad41..3cada53585 100644 --- a/packages/cli/src/ui/themes/ayu.ts +++ b/packages/cli/src/ui/themes/ayu.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/color-utils.test.ts b/packages/cli/src/ui/themes/color-utils.test.ts index dfb1be83c8..919d0ecb29 100644 --- a/packages/cli/src/ui/themes/color-utils.test.ts +++ b/packages/cli/src/ui/themes/color-utils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/color-utils.ts b/packages/cli/src/ui/themes/color-utils.ts index 08caf6b001..261757e0de 100644 --- a/packages/cli/src/ui/themes/color-utils.ts +++ b/packages/cli/src/ui/themes/color-utils.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; // Mapping from common CSS color names (lowercase) to hex codes (lowercase) // Excludes names directly supported by Ink diff --git a/packages/cli/src/ui/themes/default-light.ts b/packages/cli/src/ui/themes/default-light.ts index 1803e7fae0..64ec9467c7 100644 --- a/packages/cli/src/ui/themes/default-light.ts +++ b/packages/cli/src/ui/themes/default-light.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/default.ts b/packages/cli/src/ui/themes/default.ts index e1d0247c01..dda47095a1 100644 --- a/packages/cli/src/ui/themes/default.ts +++ b/packages/cli/src/ui/themes/default.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/dracula.ts b/packages/cli/src/ui/themes/dracula.ts index 8a982f4e7a..38f03d9d4b 100644 --- a/packages/cli/src/ui/themes/dracula.ts +++ b/packages/cli/src/ui/themes/dracula.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/github-dark.ts b/packages/cli/src/ui/themes/github-dark.ts index b2e24f15b4..c9bedb0597 100644 --- a/packages/cli/src/ui/themes/github-dark.ts +++ b/packages/cli/src/ui/themes/github-dark.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/github-light.ts b/packages/cli/src/ui/themes/github-light.ts index 65efa7a6a5..d8c6274d89 100644 --- a/packages/cli/src/ui/themes/github-light.ts +++ b/packages/cli/src/ui/themes/github-light.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/googlecode.ts b/packages/cli/src/ui/themes/googlecode.ts index 09a41cb446..dab6cea310 100644 --- a/packages/cli/src/ui/themes/googlecode.ts +++ b/packages/cli/src/ui/themes/googlecode.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/no-color.ts b/packages/cli/src/ui/themes/no-color.ts index c3a7cbce40..e29f2ba785 100644 --- a/packages/cli/src/ui/themes/no-color.ts +++ b/packages/cli/src/ui/themes/no-color.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/qwen-dark.ts b/packages/cli/src/ui/themes/qwen-dark.ts index ab899a7c0f..a6b3f3a14d 100644 --- a/packages/cli/src/ui/themes/qwen-dark.ts +++ b/packages/cli/src/ui/themes/qwen-dark.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/qwen-light.ts b/packages/cli/src/ui/themes/qwen-light.ts index 325be2aafc..67dd6cc2b3 100644 --- a/packages/cli/src/ui/themes/qwen-light.ts +++ b/packages/cli/src/ui/themes/qwen-light.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/semantic-tokens.ts b/packages/cli/src/ui/themes/semantic-tokens.ts index d3047f0f01..2b793725e6 100644 --- a/packages/cli/src/ui/themes/semantic-tokens.ts +++ b/packages/cli/src/ui/themes/semantic-tokens.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/shades-of-purple.ts b/packages/cli/src/ui/themes/shades-of-purple.ts index b0f7b9a9be..d0dff62473 100644 --- a/packages/cli/src/ui/themes/shades-of-purple.ts +++ b/packages/cli/src/ui/themes/shades-of-purple.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/theme-manager.test.ts b/packages/cli/src/ui/themes/theme-manager.test.ts index 75c6b761d3..13c352d075 100644 --- a/packages/cli/src/ui/themes/theme-manager.test.ts +++ b/packages/cli/src/ui/themes/theme-manager.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/theme-manager.ts b/packages/cli/src/ui/themes/theme-manager.ts index e4d8c3dfa9..4336bfc720 100644 --- a/packages/cli/src/ui/themes/theme-manager.ts +++ b/packages/cli/src/ui/themes/theme-manager.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -27,7 +27,7 @@ import { ANSI } from './ansi.js'; import { ANSILight } from './ansi-light.js'; import { NoColorTheme } from './no-color.js'; import process from 'node:process'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('THEME_MANAGER'); diff --git a/packages/cli/src/ui/themes/theme.test.ts b/packages/cli/src/ui/themes/theme.test.ts index 4395522e99..9074a7212f 100644 --- a/packages/cli/src/ui/themes/theme.test.ts +++ b/packages/cli/src/ui/themes/theme.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/theme.ts b/packages/cli/src/ui/themes/theme.ts index 5fee07729f..c18674c0cd 100644 --- a/packages/cli/src/ui/themes/theme.ts +++ b/packages/cli/src/ui/themes/theme.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/themes/xcode.ts b/packages/cli/src/ui/themes/xcode.ts index bbfcab4f83..6837277545 100644 --- a/packages/cli/src/ui/themes/xcode.ts +++ b/packages/cli/src/ui/themes/xcode.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/types.ts b/packages/cli/src/ui/types.ts index d2483f3712..ed8db7b402 100644 --- a/packages/cli/src/ui/types.ts +++ b/packages/cli/src/ui/types.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import type { ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolResultDisplay, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { PartListUnion } from '@google/genai'; import { type ReactNode } from 'react'; diff --git a/packages/cli/src/ui/utils/CodeColorizer.tsx b/packages/cli/src/ui/utils/CodeColorizer.tsx index da0d991322..760dda9432 100644 --- a/packages/cli/src/ui/utils/CodeColorizer.tsx +++ b/packages/cli/src/ui/utils/CodeColorizer.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -21,7 +21,7 @@ import { MINIMUM_MAX_HEIGHT, } from '../components/shared/MaxSizedBox.js'; import type { LoadedSettings } from '../../config/settings.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; // Configure theming and parsing utilities. const lowlight = createLowlight(common); diff --git a/packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx b/packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx index ce31078d1c..fe6eb1deac 100644 --- a/packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx +++ b/packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import React from 'react'; import { Text } from 'ink'; import { theme } from '../semantic-colors.js'; import stringWidth from 'string-width'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; // Constants for Markdown parsing const BOLD_MARKER_LENGTH = 2; // For "**" diff --git a/packages/cli/src/ui/utils/MarkdownDisplay.test.tsx b/packages/cli/src/ui/utils/MarkdownDisplay.test.tsx index 7f2e8f1d9a..4899d2beeb 100644 --- a/packages/cli/src/ui/utils/MarkdownDisplay.test.tsx +++ b/packages/cli/src/ui/utils/MarkdownDisplay.test.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/MarkdownDisplay.tsx b/packages/cli/src/ui/utils/MarkdownDisplay.tsx index b67b8fd61b..9445a28ff6 100644 --- a/packages/cli/src/ui/utils/MarkdownDisplay.tsx +++ b/packages/cli/src/ui/utils/MarkdownDisplay.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/TableRenderer.tsx b/packages/cli/src/ui/utils/TableRenderer.tsx index e59da3c31a..6fec3717e1 100644 --- a/packages/cli/src/ui/utils/TableRenderer.tsx +++ b/packages/cli/src/ui/utils/TableRenderer.tsx @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/clipboardUtils.test.ts b/packages/cli/src/ui/utils/clipboardUtils.test.ts index 5a190bf48b..87d15e43f7 100644 --- a/packages/cli/src/ui/utils/clipboardUtils.test.ts +++ b/packages/cli/src/ui/utils/clipboardUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/clipboardUtils.ts b/packages/cli/src/ui/utils/clipboardUtils.ts index a28c2a49c5..0855ec27a3 100644 --- a/packages/cli/src/ui/utils/clipboardUtils.ts +++ b/packages/cli/src/ui/utils/clipboardUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import * as fs from 'node:fs/promises'; import * as path from 'node:path'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('CLIPBOARD_UTILS'); diff --git a/packages/cli/src/ui/utils/commandUtils.test.ts b/packages/cli/src/ui/utils/commandUtils.test.ts index 9d2fddd9ae..f2fb618f4f 100644 --- a/packages/cli/src/ui/utils/commandUtils.test.ts +++ b/packages/cli/src/ui/utils/commandUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/commandUtils.ts b/packages/cli/src/ui/utils/commandUtils.ts index 802107f6bc..57c6841e6f 100644 --- a/packages/cli/src/ui/utils/commandUtils.ts +++ b/packages/cli/src/ui/utils/commandUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import type { SpawnOptions } from 'node:child_process'; import { spawn } from 'node:child_process'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; /** * Common Windows console code pages (CP) used for encoding conversions. diff --git a/packages/cli/src/ui/utils/computeStats.test.ts b/packages/cli/src/ui/utils/computeStats.test.ts index db8d4cc9b7..9d0a2a1fcf 100644 --- a/packages/cli/src/ui/utils/computeStats.test.ts +++ b/packages/cli/src/ui/utils/computeStats.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/computeStats.ts b/packages/cli/src/ui/utils/computeStats.ts index cc0d870e74..44c534d372 100644 --- a/packages/cli/src/ui/utils/computeStats.ts +++ b/packages/cli/src/ui/utils/computeStats.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/displayUtils.test.ts b/packages/cli/src/ui/utils/displayUtils.test.ts index 058df01a90..f36d8fbac9 100644 --- a/packages/cli/src/ui/utils/displayUtils.test.ts +++ b/packages/cli/src/ui/utils/displayUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/displayUtils.ts b/packages/cli/src/ui/utils/displayUtils.ts index b8f603170e..a70d57f4d5 100644 --- a/packages/cli/src/ui/utils/displayUtils.ts +++ b/packages/cli/src/ui/utils/displayUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/export/collect.ts b/packages/cli/src/ui/utils/export/collect.ts index 112f38c7fe..e0e8aece03 100644 --- a/packages/cli/src/ui/utils/export/collect.ts +++ b/packages/cli/src/ui/utils/export/collect.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ import { randomUUID } from 'node:crypto'; -import type { Config, ChatRecord } from '@qwen-code/qwen-code-core'; +import type { Config, ChatRecord } from '@bwen-code/bwen-code-core'; import type { SessionContext } from '../../../acp-integration/session/types.js'; import type { SessionUpdate, ToolCall } from '@agentclientprotocol/sdk'; import { HistoryReplayer } from '../../../acp-integration/session/HistoryReplayer.js'; diff --git a/packages/cli/src/ui/utils/export/formatters/html.ts b/packages/cli/src/ui/utils/export/formatters/html.ts index b4b72fb390..c13ca8d5a0 100644 --- a/packages/cli/src/ui/utils/export/formatters/html.ts +++ b/packages/cli/src/ui/utils/export/formatters/html.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ import type { ExportSessionData } from '../types.js'; -import { EXPORT_HTML_TEMPLATE as HTML_TEMPLATE } from '@qwen-code/web-templates'; +import { EXPORT_HTML_TEMPLATE as HTML_TEMPLATE } from '@bwen-code/web-templates'; /** * Escapes JSON for safe embedding in HTML. diff --git a/packages/cli/src/ui/utils/export/formatters/json.ts b/packages/cli/src/ui/utils/export/formatters/json.ts index 49942bb952..4b035971d6 100644 --- a/packages/cli/src/ui/utils/export/formatters/json.ts +++ b/packages/cli/src/ui/utils/export/formatters/json.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/export/formatters/jsonl.ts b/packages/cli/src/ui/utils/export/formatters/jsonl.ts index 57dcfeb8b6..8608927308 100644 --- a/packages/cli/src/ui/utils/export/formatters/jsonl.ts +++ b/packages/cli/src/ui/utils/export/formatters/jsonl.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/export/formatters/markdown.ts b/packages/cli/src/ui/utils/export/formatters/markdown.ts index deb520cad0..714c38a414 100644 --- a/packages/cli/src/ui/utils/export/formatters/markdown.ts +++ b/packages/cli/src/ui/utils/export/formatters/markdown.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/export/index.ts b/packages/cli/src/ui/utils/export/index.ts index b19a6114bd..22497438cd 100644 --- a/packages/cli/src/ui/utils/export/index.ts +++ b/packages/cli/src/ui/utils/export/index.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/export/normalize.ts b/packages/cli/src/ui/utils/export/normalize.ts index c2236dd3c3..60d00d4575 100644 --- a/packages/cli/src/ui/utils/export/normalize.ts +++ b/packages/cli/src/ui/utils/export/normalize.ts @@ -1,12 +1,12 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ import type { Part } from '@google/genai'; -import { ExitPlanModeTool, ToolNames } from '@qwen-code/qwen-code-core'; -import type { ChatRecord, Config, Kind } from '@qwen-code/qwen-code-core'; +import { ExitPlanModeTool, ToolNames } from '@bwen-code/bwen-code-core'; +import type { ChatRecord, Config, Kind } from '@bwen-code/bwen-code-core'; import type { ExportMessage, ExportSessionData } from './types.js'; /** diff --git a/packages/cli/src/ui/utils/export/types.ts b/packages/cli/src/ui/utils/export/types.ts index e716126154..fe3bc6a7cd 100644 --- a/packages/cli/src/ui/utils/export/types.ts +++ b/packages/cli/src/ui/utils/export/types.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/export/utils.ts b/packages/cli/src/ui/utils/export/utils.ts index d53fe1a90a..928950c758 100644 --- a/packages/cli/src/ui/utils/export/utils.ts +++ b/packages/cli/src/ui/utils/export/utils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/formatters.test.ts b/packages/cli/src/ui/utils/formatters.test.ts index 34bf67e264..d4bc47f14e 100644 --- a/packages/cli/src/ui/utils/formatters.test.ts +++ b/packages/cli/src/ui/utils/formatters.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/formatters.ts b/packages/cli/src/ui/utils/formatters.ts index b65cefe18b..c17fc6b9d1 100644 --- a/packages/cli/src/ui/utils/formatters.ts +++ b/packages/cli/src/ui/utils/formatters.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/highlight.test.ts b/packages/cli/src/ui/utils/highlight.test.ts index 8d4c5ce620..20d87d08ac 100644 --- a/packages/cli/src/ui/utils/highlight.test.ts +++ b/packages/cli/src/ui/utils/highlight.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/highlight.ts b/packages/cli/src/ui/utils/highlight.ts index 1e48b36f13..c198ebadf2 100644 --- a/packages/cli/src/ui/utils/highlight.ts +++ b/packages/cli/src/ui/utils/highlight.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/imagePasteUtils.ts b/packages/cli/src/ui/utils/imagePasteUtils.ts new file mode 100644 index 0000000000..a77547de8d --- /dev/null +++ b/packages/cli/src/ui/utils/imagePasteUtils.ts @@ -0,0 +1,263 @@ +/** + * @license + * Copyright 2025 Qwen Team + * SPDX-License-Identifier: Apache-2.0 + */ + +import * as fs from 'node:fs/promises'; +import * as path from 'node:path'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; + +const debugLogger = createDebugLogger('IMAGE_PASTE'); + +// Supported image extensions +const IMAGE_EXTENSIONS = new Set([ + '.png', + '.jpg', + '.jpeg', + '.gif', + '.webp', + '.bmp', + '.svg', + '.ico', + '.tiff', + '.tif', + '.heic', + '.heif', + '.avif', +]); + +// Image URL patterns +const IMAGE_URL_PATTERNS = [ + // GitHub raw content URLs + /https?:\/\/raw\.githubusercontent\.com\/[^\s]+?\.(png|jpg|jpeg|gif|webp|svg|bmp)/gi, + // General image URLs + /https?:\/\/[^\s]+?\.(png|jpg|jpeg|gif|webp|svg|bmp|tiff|avif)/gi, + // Data URLs (base64 encoded images) + /data:image\/(png|jpeg|gif|webp|svg\+xml);base64,[A-Za-z0-9+/=]+/gi, +]; + +/** + * Check if a file path points to an image file + */ +export function isImagePath(filePath: string): boolean { + const ext = path.extname(filePath).toLowerCase(); + return IMAGE_EXTENSIONS.has(ext); +} + +/** + * Check if a URL is an image URL + */ +export function isImageUrl(url: string): boolean { + for (const pattern of IMAGE_URL_PATTERNS) { + pattern.lastIndex = 0; + if (pattern.test(url)) { + return true; + } + } + return false; +} + +/** + * Extract image paths/URLs from pasted text + * Handles: + * - File paths (absolute and relative) + * - file:// URLs + * - HTTP/HTTPS image URLs + * - Data URLs (base64) + */ +export function extractImagePathsFromText(text: string): Array<{ + type: 'file' | 'url' | 'data'; + value: string; + original: string; +}> { + const results: Array<{ + type: 'file' | 'url' | 'data'; + value: string; + original: string; + }> = []; + + // Extract data URLs first (they're self-contained) + for (const pattern of IMAGE_URL_PATTERNS) { + if (pattern.source.includes('data:image')) { + pattern.lastIndex = 0; + let match; + while ((match = pattern.exec(text)) !== null) { + results.push({ + type: 'data', + value: match[0], + original: match[0], + }); + } + } + } + + // Split text by whitespace and newlines to find potential file paths + const tokens = text.split(/[\s\n\r]+/); + + for (const token of tokens) { + if (!token) continue; + + // Check for file:// URLs + if (token.startsWith('file://')) { + const filePath = token.slice(7); + if (isImagePath(filePath)) { + results.push({ + type: 'file', + value: filePath, + original: token, + }); + } + continue; + } + + // Check for HTTP/HTTPS image URLs + if (token.startsWith('http://') || token.startsWith('https://')) { + if (isImageUrl(token)) { + results.push({ + type: 'url', + value: token, + original: token, + }); + } + continue; + } + + // Check for local file paths (Windows and Unix style) + // Windows: C:\path\to\image.png or C:/path/to/image.png + // Unix: /path/to/image.png or ./path/to/image.png or ~/path/to/image.png + const isWindowsPath = + /^[A-Za-z]:[\\\/]/.test(token) || token.startsWith('\\\\'); + const isUnixPath = + token.startsWith('/') || + token.startsWith('./') || + token.startsWith('../') || + token.startsWith('~'); + + if (isWindowsPath || isUnixPath) { + // Remove surrounding quotes if present + let cleanPath = token; + if ( + (cleanPath.startsWith('"') && cleanPath.endsWith('"')) || + (cleanPath.startsWith("'") && cleanPath.endsWith("'")) + ) { + cleanPath = cleanPath.slice(1, -1); + } + + if (isImagePath(cleanPath)) { + results.push({ + type: 'file', + value: cleanPath, + original: token, + }); + } + } + } + + return results; +} + +/** + * Validate that a file path exists and is readable + */ +export async function validateImagePath( + filePath: string, +): Promise<{ valid: boolean; error?: string }> { + try { + // Resolve relative paths + const resolvedPath = path.resolve(filePath); + + // Check if file exists + await fs.access(resolvedPath); + + // Check if it's a file (not a directory) + const stats = await fs.stat(resolvedPath); + if (!stats.isFile()) { + return { valid: false, error: 'Not a file' }; + } + + return { valid: true }; + } catch (error) { + const err = error as NodeJS.ErrnoException; + if (err.code === 'ENOENT') { + return { valid: false, error: 'File not found' }; + } + if (err.code === 'EACCES') { + return { valid: false, error: 'Permission denied' }; + } + return { valid: false, error: err.message || 'Unknown error' }; + } +} + +/** + * Process pasted text and extract image attachments + * Returns the cleaned text (with image references removed) and found images + */ +export async function processPastedTextForImages( + text: string, + targetDir: string, +): Promise<{ + cleanedText: string; + images: Array<{ + type: 'file' | 'url' | 'data'; + path: string; // For files: resolved path, for URLs/data: original value + original: string; + }>; +}> { + const extracted = extractImagePathsFromText(text); + const images: Array<{ + type: 'file' | 'url' | 'data'; + path: string; + original: string; + }> = []; + let cleanedText = text; + + for (const item of extracted) { + if (item.type === 'file') { + const validation = await validateImagePath(item.value); + if (validation.valid) { + const resolvedPath = path.resolve(item.value); + images.push({ + type: 'file', + path: resolvedPath, + original: item.original, + }); + // Remove the file path from the text + cleanedText = cleanedText.replace(item.original, ''); + } else { + debugLogger.warn( + `Invalid image path "${item.value}": ${validation.error}`, + ); + } + } else { + // For URLs and data URLs, add them directly + images.push({ + type: item.type, + path: item.value, + original: item.original, + }); + // Remove the URL from the text + cleanedText = cleanedText.replace(item.original, ''); + } + } + + // Clean up extra whitespace left after removing paths + cleanedText = cleanedText.replace(/\n\s*\n/g, '\n').trim(); + + return { cleanedText, images }; +} + +/** + * Simulate image paste by creating a temporary representation + * This is used when actual clipboard image data is not available + */ +export function createSimulatedImageAttachment( + filePath: string, +): { id: string; path: string; filename: string; simulated: boolean } { + return { + id: `sim-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, + path: filePath, + filename: path.basename(filePath), + simulated: true, + }; +} diff --git a/packages/cli/src/ui/utils/isNarrowWidth.ts b/packages/cli/src/ui/utils/isNarrowWidth.ts index 5540a40016..a8af9e86a3 100644 --- a/packages/cli/src/ui/utils/isNarrowWidth.ts +++ b/packages/cli/src/ui/utils/isNarrowWidth.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/kittyProtocolDetector.ts b/packages/cli/src/ui/utils/kittyProtocolDetector.ts index 3355330a62..4b6fa52d6f 100644 --- a/packages/cli/src/ui/utils/kittyProtocolDetector.ts +++ b/packages/cli/src/ui/utils/kittyProtocolDetector.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/markdownUtilities.test.ts b/packages/cli/src/ui/utils/markdownUtilities.test.ts index 02bd2ea75a..698043cd1e 100644 --- a/packages/cli/src/ui/utils/markdownUtilities.test.ts +++ b/packages/cli/src/ui/utils/markdownUtilities.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/markdownUtilities.ts b/packages/cli/src/ui/utils/markdownUtilities.ts index 6a34f1387f..071380554d 100644 --- a/packages/cli/src/ui/utils/markdownUtilities.ts +++ b/packages/cli/src/ui/utils/markdownUtilities.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/platformConstants.ts b/packages/cli/src/ui/utils/platformConstants.ts index 7993883d6c..f4a005bb26 100644 --- a/packages/cli/src/ui/utils/platformConstants.ts +++ b/packages/cli/src/ui/utils/platformConstants.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/resumeHistoryUtils.test.ts b/packages/cli/src/ui/utils/resumeHistoryUtils.test.ts index f6b7ee3927..455614b279 100644 --- a/packages/cli/src/ui/utils/resumeHistoryUtils.test.ts +++ b/packages/cli/src/ui/utils/resumeHistoryUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import type { Config, ConversationRecord, ResumedSessionData, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Part } from '@google/genai'; const makeConfig = (tools: Record) => diff --git a/packages/cli/src/ui/utils/resumeHistoryUtils.ts b/packages/cli/src/ui/utils/resumeHistoryUtils.ts index 3e6607b04e..678e59f9f5 100644 --- a/packages/cli/src/ui/utils/resumeHistoryUtils.ts +++ b/packages/cli/src/ui/utils/resumeHistoryUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 @@ -14,7 +14,7 @@ import type { ToolResultDisplay, SlashCommandRecordPayload, AtCommandRecordPayload, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { HistoryItem, HistoryItemWithoutId, diff --git a/packages/cli/src/ui/utils/sessionPickerUtils.test.ts b/packages/cli/src/ui/utils/sessionPickerUtils.test.ts index e561199e16..c30daa4f1a 100644 --- a/packages/cli/src/ui/utils/sessionPickerUtils.test.ts +++ b/packages/cli/src/ui/utils/sessionPickerUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/sessionPickerUtils.ts b/packages/cli/src/ui/utils/sessionPickerUtils.ts index 74560c5b40..46e5d70710 100644 --- a/packages/cli/src/ui/utils/sessionPickerUtils.ts +++ b/packages/cli/src/ui/utils/sessionPickerUtils.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen Code * SPDX-License-Identifier: Apache-2.0 */ -import type { SessionListItem } from '@qwen-code/qwen-code-core'; +import type { SessionListItem } from '@bwen-code/bwen-code-core'; /** * State for managing loaded sessions in the session picker. diff --git a/packages/cli/src/ui/utils/terminalSetup.ts b/packages/cli/src/ui/utils/terminalSetup.ts index 2c548edede..2ea4afd950 100644 --- a/packages/cli/src/ui/utils/terminalSetup.ts +++ b/packages/cli/src/ui/utils/terminalSetup.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -31,7 +31,7 @@ import { promisify } from 'node:util'; import { isKittyProtocolEnabled } from './kittyProtocolDetector.js'; import { VSCODE_SHIFT_ENTER_SEQUENCE } from './platformConstants.js'; import { t } from '../../i18n/index.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('TERMINAL_SETUP'); diff --git a/packages/cli/src/ui/utils/textUtils.test.ts b/packages/cli/src/ui/utils/textUtils.test.ts index 7d761ef102..4a7181fc84 100644 --- a/packages/cli/src/ui/utils/textUtils.test.ts +++ b/packages/cli/src/ui/utils/textUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import { describe, it, expect } from 'vitest'; import type { ToolCallConfirmationDetails, ToolEditConfirmationDetails, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { escapeAnsiCtrlCodes } from './textUtils.js'; describe('textUtils', () => { diff --git a/packages/cli/src/ui/utils/textUtils.ts b/packages/cli/src/ui/utils/textUtils.ts index ecea36316a..2e9ec411ba 100644 --- a/packages/cli/src/ui/utils/textUtils.ts +++ b/packages/cli/src/ui/utils/textUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/updateCheck.test.ts b/packages/cli/src/ui/utils/updateCheck.test.ts index c7214e8b61..22e2893a26 100644 --- a/packages/cli/src/ui/utils/updateCheck.test.ts +++ b/packages/cli/src/ui/utils/updateCheck.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/ui/utils/updateCheck.ts b/packages/cli/src/ui/utils/updateCheck.ts index b13467251c..a7b508300f 100644 --- a/packages/cli/src/ui/utils/updateCheck.ts +++ b/packages/cli/src/ui/utils/updateCheck.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import type { UpdateInfo } from 'update-notifier'; import updateNotifier from 'update-notifier'; import semver from 'semver'; import { getPackageJson } from '../../utils/package.js'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('UPDATE_CHECK'); diff --git a/packages/cli/src/utils/acpModelUtils.test.ts b/packages/cli/src/utils/acpModelUtils.test.ts index a8adddfc82..1011821e4d 100644 --- a/packages/cli/src/utils/acpModelUtils.test.ts +++ b/packages/cli/src/utils/acpModelUtils.test.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; -import { AuthType } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import { formatAcpModelId, parseAcpBaseModelId, diff --git a/packages/cli/src/utils/acpModelUtils.ts b/packages/cli/src/utils/acpModelUtils.ts index 1def62533f..f13719d055 100644 --- a/packages/cli/src/utils/acpModelUtils.ts +++ b/packages/cli/src/utils/acpModelUtils.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ -import { AuthType } from '@qwen-code/qwen-code-core'; +import { AuthType } from '@bwen-code/bwen-code-core'; import { z } from 'zod'; /** diff --git a/packages/cli/src/utils/attentionNotification.test.ts b/packages/cli/src/utils/attentionNotification.test.ts index 9ebb785c7f..672339798e 100644 --- a/packages/cli/src/utils/attentionNotification.test.ts +++ b/packages/cli/src/utils/attentionNotification.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/attentionNotification.ts b/packages/cli/src/utils/attentionNotification.ts index 89da6826c4..5b0c1d4bb7 100644 --- a/packages/cli/src/utils/attentionNotification.ts +++ b/packages/cli/src/utils/attentionNotification.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ import process from 'node:process'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; export enum AttentionNotificationReason { ToolApproval = 'tool_approval', diff --git a/packages/cli/src/utils/checks.ts b/packages/cli/src/utils/checks.ts index 0598835f4e..98c6d91d27 100644 --- a/packages/cli/src/utils/checks.ts +++ b/packages/cli/src/utils/checks.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/cleanup.test.ts b/packages/cli/src/utils/cleanup.test.ts index 0b254bac67..a57221f71f 100644 --- a/packages/cli/src/utils/cleanup.test.ts +++ b/packages/cli/src/utils/cleanup.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/cleanup.ts b/packages/cli/src/utils/cleanup.ts index c7103792fd..b7ea8ad792 100644 --- a/packages/cli/src/utils/cleanup.ts +++ b/packages/cli/src/utils/cleanup.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { promises as fs } from 'node:fs'; import { join } from 'node:path'; -import { Storage } from '@qwen-code/qwen-code-core'; +import { Storage } from '@bwen-code/bwen-code-core'; const cleanupFunctions: Array<(() => void) | (() => Promise)> = []; diff --git a/packages/cli/src/utils/commands.test.ts b/packages/cli/src/utils/commands.test.ts index 30040a0350..febe3033e7 100644 --- a/packages/cli/src/utils/commands.test.ts +++ b/packages/cli/src/utils/commands.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/commands.ts b/packages/cli/src/utils/commands.ts index c96c8c6ef7..ab79c53345 100644 --- a/packages/cli/src/utils/commands.ts +++ b/packages/cli/src/utils/commands.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/commentJson.test.ts b/packages/cli/src/utils/commentJson.test.ts index 0cba17cb60..126165a018 100644 --- a/packages/cli/src/utils/commentJson.test.ts +++ b/packages/cli/src/utils/commentJson.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/commentJson.ts b/packages/cli/src/utils/commentJson.ts index 58b83e9487..9efbcff6c8 100644 --- a/packages/cli/src/utils/commentJson.ts +++ b/packages/cli/src/utils/commentJson.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/deepMerge.test.ts b/packages/cli/src/utils/deepMerge.test.ts index 0603aafb3a..ccf37d6cc0 100644 --- a/packages/cli/src/utils/deepMerge.test.ts +++ b/packages/cli/src/utils/deepMerge.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/deepMerge.ts b/packages/cli/src/utils/deepMerge.ts index 85200ddbae..3fe4bd81c2 100644 --- a/packages/cli/src/utils/deepMerge.ts +++ b/packages/cli/src/utils/deepMerge.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/dialogScopeUtils.ts b/packages/cli/src/utils/dialogScopeUtils.ts index 027928abcd..ef77c142b9 100644 --- a/packages/cli/src/utils/dialogScopeUtils.ts +++ b/packages/cli/src/utils/dialogScopeUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/envVarResolver.test.ts b/packages/cli/src/utils/envVarResolver.test.ts index a45b65b1b9..c267f75954 100644 --- a/packages/cli/src/utils/envVarResolver.test.ts +++ b/packages/cli/src/utils/envVarResolver.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/envVarResolver.ts b/packages/cli/src/utils/envVarResolver.ts index 096b5549ec..b5932d3fb0 100644 --- a/packages/cli/src/utils/envVarResolver.ts +++ b/packages/cli/src/utils/envVarResolver.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/errors.test.ts b/packages/cli/src/utils/errors.test.ts index 1dfa0deda7..a209d81bac 100644 --- a/packages/cli/src/utils/errors.test.ts +++ b/packages/cli/src/utils/errors.test.ts @@ -1,16 +1,16 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, type Mock, type MockInstance } from 'vitest'; -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { OutputFormat, FatalInputError, ToolErrorType, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { getErrorMessage, handleError, @@ -28,9 +28,9 @@ const debugLoggerSpy = vi.hoisted(() => ({ })); // Mock the core modules -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = - await importOriginal(); + await importOriginal(); return { ...original, diff --git a/packages/cli/src/utils/errors.ts b/packages/cli/src/utils/errors.ts index 598f535b73..7e1972a4c8 100644 --- a/packages/cli/src/utils/errors.ts +++ b/packages/cli/src/utils/errors.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import type { Config } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import { OutputFormat, JsonFormatter, @@ -13,7 +13,7 @@ import { FatalCancellationError, ToolErrorType, createDebugLogger, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { writeStderrLine } from './stdioHelpers.js'; const debugLogger = createDebugLogger('CLI_ERRORS'); diff --git a/packages/cli/src/utils/events.ts b/packages/cli/src/utils/events.ts index c29f740bd3..2941857aca 100644 --- a/packages/cli/src/utils/events.ts +++ b/packages/cli/src/utils/events.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/gitUtils.test.ts b/packages/cli/src/utils/gitUtils.test.ts index 71c80d6cf4..9ef88e3c55 100644 --- a/packages/cli/src/utils/gitUtils.test.ts +++ b/packages/cli/src/utils/gitUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/gitUtils.ts b/packages/cli/src/utils/gitUtils.ts index 58b0bfde13..f80ff1abd0 100644 --- a/packages/cli/src/utils/gitUtils.ts +++ b/packages/cli/src/utils/gitUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,7 +6,7 @@ import { execSync } from 'node:child_process'; import { ProxyAgent } from 'undici'; -import { createDebugLogger } from '@qwen-code/qwen-code-core'; +import { createDebugLogger } from '@bwen-code/bwen-code-core'; const debugLogger = createDebugLogger('GIT'); diff --git a/packages/cli/src/utils/handleAutoUpdate.test.ts b/packages/cli/src/utils/handleAutoUpdate.test.ts index da3e500ef8..6163ef12fb 100644 --- a/packages/cli/src/utils/handleAutoUpdate.test.ts +++ b/packages/cli/src/utils/handleAutoUpdate.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/handleAutoUpdate.ts b/packages/cli/src/utils/handleAutoUpdate.ts index e02c0f615b..7c0346541f 100644 --- a/packages/cli/src/utils/handleAutoUpdate.ts +++ b/packages/cli/src/utils/handleAutoUpdate.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/installationInfo.test.ts b/packages/cli/src/utils/installationInfo.test.ts index 1da119db71..887803fd61 100644 --- a/packages/cli/src/utils/installationInfo.test.ts +++ b/packages/cli/src/utils/installationInfo.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -9,11 +9,11 @@ import { getInstallationInfo, PackageManager } from './installationInfo.js'; import * as fs from 'node:fs'; import * as path from 'node:path'; import * as childProcess from 'node:child_process'; -import { isGitRepository } from '@qwen-code/qwen-code-core'; +import { isGitRepository } from '@bwen-code/bwen-code-core'; -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actual = - await importOriginal(); + await importOriginal(); return { ...actual, isGitRepository: vi.fn(), diff --git a/packages/cli/src/utils/installationInfo.ts b/packages/cli/src/utils/installationInfo.ts index 6eb39b0540..fd77bbc23b 100644 --- a/packages/cli/src/utils/installationInfo.ts +++ b/packages/cli/src/utils/installationInfo.ts @@ -1,10 +1,10 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import { createDebugLogger, isGitRepository } from '@qwen-code/qwen-code-core'; +import { createDebugLogger, isGitRepository } from '@bwen-code/bwen-code-core'; import * as fs from 'node:fs'; import * as path from 'node:path'; import * as childProcess from 'node:child_process'; diff --git a/packages/cli/src/utils/languageUtils.test.ts b/packages/cli/src/utils/languageUtils.test.ts index 39582af759..4fa5137e1e 100644 --- a/packages/cli/src/utils/languageUtils.test.ts +++ b/packages/cli/src/utils/languageUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen team * SPDX-License-Identifier: Apache-2.0 @@ -34,8 +34,8 @@ vi.mock('../i18n/index.js', () => ({ }), })); -// Mock @qwen-code/qwen-code-core -vi.mock('@qwen-code/qwen-code-core', () => ({ +// Mock @bwen-code/bwen-code-core +vi.mock('@bwen-code/bwen-code-core', () => ({ Storage: { getGlobalQwenDir: vi.fn(() => '/mock/home/.qwen'), }, diff --git a/packages/cli/src/utils/languageUtils.ts b/packages/cli/src/utils/languageUtils.ts index cb4e06c4db..43be9e4ade 100644 --- a/packages/cli/src/utils/languageUtils.ts +++ b/packages/cli/src/utils/languageUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen team * SPDX-License-Identifier: Apache-2.0 @@ -12,7 +12,7 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; -import { Storage } from '@qwen-code/qwen-code-core'; +import { Storage } from '@bwen-code/bwen-code-core'; import { detectSystemLanguage, getLanguageNameFromLocale, diff --git a/packages/cli/src/utils/math.ts b/packages/cli/src/utils/math.ts index f067a4ef95..a6083ab51e 100644 --- a/packages/cli/src/utils/math.ts +++ b/packages/cli/src/utils/math.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/modelConfigUtils.test.ts b/packages/cli/src/utils/modelConfigUtils.test.ts index 97cea9974d..b31e29f368 100644 --- a/packages/cli/src/utils/modelConfigUtils.test.ts +++ b/packages/cli/src/utils/modelConfigUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import { AuthType, resolveModelConfig, type ProviderModelConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { getAuthTypeFromEnv, resolveCliGenerationConfig, @@ -18,9 +18,9 @@ import type { Settings } from '../config/settings.js'; const mockWriteStderrLine = vi.hoisted(() => vi.fn()); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const original = - await importOriginal(); + await importOriginal(); return { ...original, resolveModelConfig: vi.fn(), diff --git a/packages/cli/src/utils/modelConfigUtils.ts b/packages/cli/src/utils/modelConfigUtils.ts index aa5ac5e82e..ebb187357f 100644 --- a/packages/cli/src/utils/modelConfigUtils.ts +++ b/packages/cli/src/utils/modelConfigUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ import { resolveModelConfig, type ModelConfigSourcesInput, type ProviderModelConfig, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Settings } from '../config/settings.js'; export interface CliGenerationConfigInputs { diff --git a/packages/cli/src/utils/nonInteractiveHelpers.test.ts b/packages/cli/src/utils/nonInteractiveHelpers.test.ts index 1892e6e41a..5c087c60d9 100644 --- a/packages/cli/src/utils/nonInteractiveHelpers.test.ts +++ b/packages/cli/src/utils/nonInteractiveHelpers.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -10,13 +10,13 @@ import type { SessionMetrics, TaskResultDisplay, ToolCallResponseInfo, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { ToolErrorType, MCPServerStatus, getMCPServerStatus, OutputFormat, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Part } from '@google/genai'; import type { CLIUserMessage, @@ -72,9 +72,9 @@ vi.mock('../ui/utils/computeStats.js', () => ({ }), })); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actual = - await importOriginal(); + await importOriginal(); return { ...actual, getMCPServerStatus: vi.fn(), diff --git a/packages/cli/src/utils/nonInteractiveHelpers.ts b/packages/cli/src/utils/nonInteractiveHelpers.ts index a5b23e6c99..f4aaeedfe9 100644 --- a/packages/cli/src/utils/nonInteractiveHelpers.ts +++ b/packages/cli/src/utils/nonInteractiveHelpers.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -13,13 +13,13 @@ import type { ToolCallResponseInfo, SessionMetrics, McpToolProgressData, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import { OutputFormat, ToolErrorType, createDebugLogger, getMCPServerStatus, -} from '@qwen-code/qwen-code-core'; +} from '@bwen-code/bwen-code-core'; import type { Part, PartListUnion } from '@google/genai'; import type { CLIUserMessage, diff --git a/packages/cli/src/utils/package.ts b/packages/cli/src/utils/package.ts index e90376b69b..e81dc28974 100644 --- a/packages/cli/src/utils/package.ts +++ b/packages/cli/src/utils/package.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/processUtils.test.ts b/packages/cli/src/utils/processUtils.test.ts index be85a4dbad..0ba6bbcf36 100644 --- a/packages/cli/src/utils/processUtils.test.ts +++ b/packages/cli/src/utils/processUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/processUtils.ts b/packages/cli/src/utils/processUtils.ts index 7d3f1bcbf9..eff27eba1f 100644 --- a/packages/cli/src/utils/processUtils.ts +++ b/packages/cli/src/utils/processUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/readStdin.test.ts b/packages/cli/src/utils/readStdin.test.ts index 6ff5bd6d54..a51b7b6d51 100644 --- a/packages/cli/src/utils/readStdin.test.ts +++ b/packages/cli/src/utils/readStdin.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/readStdin.ts b/packages/cli/src/utils/readStdin.ts index b95dddc740..712a34ef80 100644 --- a/packages/cli/src/utils/readStdin.ts +++ b/packages/cli/src/utils/readStdin.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/relaunch.test.ts b/packages/cli/src/utils/relaunch.test.ts index 1d137bced2..ef7cfd5212 100644 --- a/packages/cli/src/utils/relaunch.test.ts +++ b/packages/cli/src/utils/relaunch.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/relaunch.ts b/packages/cli/src/utils/relaunch.ts index f80a6a2c38..467cda79d6 100644 --- a/packages/cli/src/utils/relaunch.ts +++ b/packages/cli/src/utils/relaunch.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/resolvePath.ts b/packages/cli/src/utils/resolvePath.ts index dea8be55ae..d23034d8ea 100644 --- a/packages/cli/src/utils/resolvePath.ts +++ b/packages/cli/src/utils/resolvePath.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/sandbox.ts b/packages/cli/src/utils/sandbox.ts index 930ea41a0d..2106823287 100644 --- a/packages/cli/src/utils/sandbox.ts +++ b/packages/cli/src/utils/sandbox.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -15,8 +15,8 @@ import { SETTINGS_DIRECTORY_NAME, } from '../config/settings.js'; import { promisify } from 'node:util'; -import type { Config, SandboxConfig } from '@qwen-code/qwen-code-core'; -import { FatalSandboxError } from '@qwen-code/qwen-code-core'; +import type { Config, SandboxConfig } from '@bwen-code/bwen-code-core'; +import { FatalSandboxError } from '@bwen-code/bwen-code-core'; import { randomBytes } from 'node:crypto'; import { writeStderrLine } from './stdioHelpers.js'; diff --git a/packages/cli/src/utils/settingsUtils.test.ts b/packages/cli/src/utils/settingsUtils.test.ts index 223e83f0b7..11a543400a 100644 --- a/packages/cli/src/utils/settingsUtils.test.ts +++ b/packages/cli/src/utils/settingsUtils.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/settingsUtils.ts b/packages/cli/src/utils/settingsUtils.ts index 0effeb738c..88d4b76319 100644 --- a/packages/cli/src/utils/settingsUtils.ts +++ b/packages/cli/src/utils/settingsUtils.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/spawnWrapper.ts b/packages/cli/src/utils/spawnWrapper.ts index 108f166dc0..3a0dc173cb 100644 --- a/packages/cli/src/utils/spawnWrapper.ts +++ b/packages/cli/src/utils/spawnWrapper.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/startupWarnings.test.ts b/packages/cli/src/utils/startupWarnings.test.ts index e39552eb42..767e1b275b 100644 --- a/packages/cli/src/utils/startupWarnings.test.ts +++ b/packages/cli/src/utils/startupWarnings.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,12 +7,12 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { getStartupWarnings } from './startupWarnings.js'; import * as fs from 'node:fs/promises'; -import { getErrorMessage } from '@qwen-code/qwen-code-core'; +import { getErrorMessage } from '@bwen-code/bwen-code-core'; vi.mock('node:fs/promises', { spy: true }); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actual = - await importOriginal(); + await importOriginal(); return { ...actual, getErrorMessage: vi.fn(), diff --git a/packages/cli/src/utils/startupWarnings.ts b/packages/cli/src/utils/startupWarnings.ts index 4b4337476b..765d306208 100644 --- a/packages/cli/src/utils/startupWarnings.ts +++ b/packages/cli/src/utils/startupWarnings.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import fs from 'node:fs/promises'; import os from 'node:os'; import { join as pathJoin } from 'node:path'; -import { getErrorMessage } from '@qwen-code/qwen-code-core'; +import { getErrorMessage } from '@bwen-code/bwen-code-core'; const warningsFilePath = pathJoin(os.tmpdir(), 'qwen-code-warnings.txt'); diff --git a/packages/cli/src/utils/stdioHelpers.ts b/packages/cli/src/utils/stdioHelpers.ts index ca5e30f9eb..d1dda91665 100644 --- a/packages/cli/src/utils/stdioHelpers.ts +++ b/packages/cli/src/utils/stdioHelpers.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen Team * SPDX-License-Identifier: Apache-2.0 @@ -11,7 +11,7 @@ * CLI commands (like `qwen extensions list`) where the output IS the user-facing * result, not debug logging. * - * For debug/diagnostic logging, use `createDebugLogger()` from @qwen-code/qwen-code-core. + * For debug/diagnostic logging, use `createDebugLogger()` from @bwen-code/bwen-code-core. */ /** diff --git a/packages/cli/src/utils/systemInfo.test.ts b/packages/cli/src/utils/systemInfo.test.ts index 4f6bc83043..197bc9c247 100644 --- a/packages/cli/src/utils/systemInfo.test.ts +++ b/packages/cli/src/utils/systemInfo.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -16,7 +16,7 @@ import type { CommandContext } from '../ui/commands/types.js'; import { createMockCommandContext } from '../test-utils/mockCommandContext.js'; import * as child_process from 'node:child_process'; import os from 'node:os'; -import { IdeClient } from '@qwen-code/qwen-code-core'; +import { IdeClient } from '@bwen-code/bwen-code-core'; import * as versionUtils from './version.js'; import type { ExecSyncOptions } from 'node:child_process'; @@ -32,9 +32,9 @@ vi.mock('./version.js', () => ({ getCliVersion: vi.fn(), })); -vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { +vi.mock('@bwen-code/bwen-code-core', async (importOriginal) => { const actual = - await importOriginal(); + await importOriginal(); return { ...actual, IdeClient: { @@ -272,7 +272,7 @@ describe('systemInfo', () => { }, ); - const { AuthType } = await import('@qwen-code/qwen-code-core'); + const { AuthType } = await import('@bwen-code/bwen-code-core'); // Update the mock context to use OpenAI auth mockContext.services.settings.merged.security!.auth!.selectedType = AuthType.USE_OPENAI; diff --git a/packages/cli/src/utils/systemInfo.ts b/packages/cli/src/utils/systemInfo.ts index 4ea281210d..408efd61fd 100644 --- a/packages/cli/src/utils/systemInfo.ts +++ b/packages/cli/src/utils/systemInfo.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import os from 'node:os'; import { execSync } from 'node:child_process'; import type { CommandContext } from '../ui/commands/types.js'; import { getCliVersion } from './version.js'; -import { IdeClient, AuthType } from '@qwen-code/qwen-code-core'; +import { IdeClient, AuthType } from '@bwen-code/bwen-code-core'; import { formatMemoryUsage } from '../ui/utils/formatters.js'; import { GIT_COMMIT_INFO } from '../generated/git-commit.js'; diff --git a/packages/cli/src/utils/systemInfoFields.test.ts b/packages/cli/src/utils/systemInfoFields.test.ts index fb8624781c..a2aff9edb6 100644 --- a/packages/cli/src/utils/systemInfoFields.test.ts +++ b/packages/cli/src/utils/systemInfoFields.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/systemInfoFields.ts b/packages/cli/src/utils/systemInfoFields.ts index 17062b66af..47e9d2167f 100644 --- a/packages/cli/src/utils/systemInfoFields.ts +++ b/packages/cli/src/utils/systemInfoFields.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/updateEventEmitter.ts b/packages/cli/src/utils/updateEventEmitter.ts index 1c69277254..0f525ae63c 100644 --- a/packages/cli/src/utils/updateEventEmitter.ts +++ b/packages/cli/src/utils/updateEventEmitter.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/userStartupWarnings.test.ts b/packages/cli/src/utils/userStartupWarnings.test.ts index eb892e68cb..194716c352 100644 --- a/packages/cli/src/utils/userStartupWarnings.test.ts +++ b/packages/cli/src/utils/userStartupWarnings.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/userStartupWarnings.ts b/packages/cli/src/utils/userStartupWarnings.ts index e2e7c440c1..661132b44a 100644 --- a/packages/cli/src/utils/userStartupWarnings.ts +++ b/packages/cli/src/utils/userStartupWarnings.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,7 @@ import fs from 'node:fs/promises'; import * as os from 'node:os'; import path from 'node:path'; -import { canUseRipgrep } from '@qwen-code/qwen-code-core'; +import { canUseRipgrep } from '@bwen-code/bwen-code-core'; type WarningCheckOptions = { workspaceRoot: string; diff --git a/packages/cli/src/utils/version.ts b/packages/cli/src/utils/version.ts index 0318f380be..3f65143591 100644 --- a/packages/cli/src/utils/version.ts +++ b/packages/cli/src/utils/version.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/windowTitle.test.ts b/packages/cli/src/utils/windowTitle.test.ts index 61b3e69593..24251abf17 100644 --- a/packages/cli/src/utils/windowTitle.test.ts +++ b/packages/cli/src/utils/windowTitle.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/windowTitle.ts b/packages/cli/src/utils/windowTitle.ts index eab5eedd62..dc5cf4a657 100644 --- a/packages/cli/src/utils/windowTitle.ts +++ b/packages/cli/src/utils/windowTitle.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/writeWithBackup.test.ts b/packages/cli/src/utils/writeWithBackup.test.ts index 219bda81b6..aa8fabc4ba 100644 --- a/packages/cli/src/utils/writeWithBackup.test.ts +++ b/packages/cli/src/utils/writeWithBackup.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/utils/writeWithBackup.ts b/packages/cli/src/utils/writeWithBackup.ts index 2c341ae38c..c0ce1d68b1 100644 --- a/packages/cli/src/utils/writeWithBackup.ts +++ b/packages/cli/src/utils/writeWithBackup.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 diff --git a/packages/cli/src/validateNonInterActiveAuth.test.ts b/packages/cli/src/validateNonInterActiveAuth.test.ts index 2df4156ca0..68dc007127 100644 --- a/packages/cli/src/validateNonInterActiveAuth.test.ts +++ b/packages/cli/src/validateNonInterActiveAuth.test.ts @@ -1,4 +1,4 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 @@ -6,8 +6,8 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { validateNonInteractiveAuth } from './validateNonInterActiveAuth.js'; -import { AuthType, OutputFormat } from '@qwen-code/qwen-code-core'; -import type { Config } from '@qwen-code/qwen-code-core'; +import { AuthType, OutputFormat } from '@bwen-code/bwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; import * as auth from './config/auth.js'; import { type LoadedSettings } from './config/settings.js'; import * as JsonOutputAdapterModule from './nonInteractive/io/JsonOutputAdapter.js'; diff --git a/packages/cli/src/validateNonInterActiveAuth.ts b/packages/cli/src/validateNonInterActiveAuth.ts index 0a7080aea6..db66486e63 100644 --- a/packages/cli/src/validateNonInterActiveAuth.ts +++ b/packages/cli/src/validateNonInterActiveAuth.ts @@ -1,11 +1,11 @@ -/** +/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import type { Config } from '@qwen-code/qwen-code-core'; -import { OutputFormat } from '@qwen-code/qwen-code-core'; +import type { Config } from '@bwen-code/bwen-code-core'; +import { OutputFormat } from '@bwen-code/bwen-code-core'; import { validateAuthMethod } from './config/auth.js'; import { type LoadedSettings } from './config/settings.js'; import { JsonOutputAdapter } from './nonInteractive/io/JsonOutputAdapter.js'; diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 1e61331749..3ffb80ffac 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -43,6 +43,7 @@ "src/ui/commands/editorCommand.test.ts", "src/ui/commands/extensionsCommand.test.ts", "src/ui/commands/helpCommand.test.ts", + "src/ui/commands/quitCommand.test.ts", "src/ui/commands/restoreCommand.test.ts", "src/ui/commands/settingsCommand.test.ts", "src/ui/commands/themeCommand.test.ts", @@ -50,7 +51,6 @@ "src/ui/commands/directoryCommand.test.tsx", "src/ui/commands/ideCommand.test.ts", "src/ui/commands/initCommand.test.ts", - "src/ui/commands/quitCommand.test.ts", "src/ui/commands/mcpCommand.test.ts", "src/ui/commands/memoryCommand.test.ts", "src/ui/commands/statsCommand.test.ts", @@ -81,7 +81,10 @@ "src/ui/themes/theme.test.ts", "src/validateNonInterActiveAuth.test.ts", "src/services/prompt-processors/shellProcessor.test.ts", - "src/commands/extensions/examples/**" + "src/commands/extensions/examples/**", + // Exclude all test files to speed up build + "**/*.test.ts", + "**/*.test.tsx" ], "references": [{ "path": "../core" }] } diff --git a/packages/core/package.json b/packages/core/package.json index c66f51a93d..730cb75876 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,10 +1,10 @@ { - "name": "@qwen-code/qwen-code-core", + "name": "@bwen-code/bwen-code-core", "version": "0.12.3", - "description": "Qwen Code Core", + "description": "BWEN Code Core", "repository": { "type": "git", - "url": "git+https://github.com/QwenLM/qwen-code.git" + "url": "git+https://github.com/bonsai/bwen-code.git" }, "type": "module", "main": "dist/index.js", @@ -81,7 +81,7 @@ "@lydell/node-pty-win32-x64": "1.1.0" }, "devDependencies": { - "@qwen-code/qwen-code-test-utils": "file:../test-utils", + "@bwen-code/bwen-code-test-utils": "file:../test-utils", "@types/diff": "^7.0.2", "@types/dotenv": "^6.1.1", "@types/fast-levenshtein": "^0.0.4", diff --git a/packages/core/src/mcp-types.d.ts b/packages/core/src/mcp-types.d.ts new file mode 100644 index 0000000000..f5b910ec84 --- /dev/null +++ b/packages/core/src/mcp-types.d.ts @@ -0,0 +1,195 @@ +// Type declarations for @modelcontextprotocol/sdk modules +// These modules don't have bundled TypeScript declarations + +declare module '@modelcontextprotocol/sdk/client/index.js' { + export interface ClientOptions { + name: string; + version: string; + } + + export interface ConnectOptions { + timeout?: number; + } + + export interface CallToolOptions { + name: string; + arguments?: Record; + } + + export interface CallToolResult { + content: Array<{ type: string; text?: string }>; + isError?: boolean; + } + + export interface ListToolsResult { + tools: Array<{ name: string; description?: string }>; + } + + export interface GetPromptOptions { + name: string; + arguments?: Record; + } + + export interface GetPromptResult { + description?: string; + messages: Array<{ role: string; content: { type: string; text?: string } }>; + } + + export interface ListPromptsResult { + prompts: Array<{ name: string; description?: string }>; + } + + export interface ReadResourceOptions { + uri: string; + } + + export interface ReadResourceResult { + contents: Array<{ uri: string; mimeType?: string; text?: string; blob?: string }>; + } + + export class Client { + constructor(clientInfo: ClientOptions); + connect(transport: unknown, options?: ConnectOptions): Promise; + close(): Promise; + callTool(params: CallToolOptions, signal?: AbortSignal): Promise; + listTools(): Promise; + getPrompt(params: GetPromptOptions, signal?: AbortSignal): Promise; + listPrompts(): Promise; + readResource(params: ReadResourceOptions, signal?: AbortSignal): Promise; + } +} + +declare module '@modelcontextprotocol/sdk/client/streamableHttp.js' { + export interface StreamableHTTPClientTransportOptions { + requestInit?: RequestInit; + fetch?: (url: string | URL, init?: RequestInit) => Promise; + } + + export class StreamableHTTPClientTransport { + constructor(url: URL, options?: StreamableHTTPClientTransportOptions); + start(): Promise; + close(): Promise; + send(message: unknown): Promise; + } +} + +declare module '@modelcontextprotocol/sdk/client/stdio.js' { + export interface StdioClientTransportOptions { + command: string; + args?: string[]; + env?: Record; + cwd?: string; + } + + export class StdioClientTransport { + constructor(options: StdioClientTransportOptions); + start(): Promise; + close(): Promise; + send(message: unknown): Promise; + } +} + +declare module '@modelcontextprotocol/sdk/client/sse.js' { + export interface SSEClientTransportOptions { + requestInit?: RequestInit; + reconnectInterval?: number; + } + + export class SSEClientTransport { + constructor(url: URL, options?: SSEClientTransportOptions); + start(): Promise; + close(): Promise; + send(message: unknown): Promise; + } +} + +declare module '@modelcontextprotocol/sdk/client/auth.js' { + export interface OAuthClientProvider { + clientInformation(): unknown | undefined; + saveClientInformation(clientInformation: unknown): void; + tokens(): Promise; + saveTokens(tokens: unknown): void; + clientMetadata: unknown; + } +} + +declare module '@modelcontextprotocol/sdk/shared/transport.js' { + export interface Transport { + start(): Promise; + close(): Promise; + send(message: unknown): Promise; + } +} + +declare module '@modelcontextprotocol/sdk/shared/auth.js' { + export interface OAuthClientMetadata { + client_name?: string; + redirect_uris: string[]; + grant_types?: string[]; + response_types?: string[]; + token_endpoint_auth_method?: string; + } + export interface OAuthClientInformation { + client_id: string; + client_secret?: string; + client_id_issued_at?: number; + client_secret_expires_at?: number; + } + export interface OAuthClientInformationFull extends OAuthClientInformation { + client_name?: string; + redirect_uris: string[]; + grant_types?: string[]; + response_types?: string[]; + token_endpoint_auth_method?: string; + } + export interface OAuthTokens { + access_token: string; + token_type: string; + expires_in?: number; + refresh_token?: string; + scope?: string; + } +} + +declare module '@modelcontextprotocol/sdk/types.js' { + export interface JSONRPCMessage { + jsonrpc: string; + id?: string | number; + method?: string; + params?: unknown; + result?: unknown; + error?: { code: number; message: string; data?: unknown }; + } + export interface Prompt { + name: string; + description?: string; + arguments?: { name: string; description?: string; required?: boolean }[]; + } + export interface GetPromptResult { + description?: string; + messages: { role: string; content: { type: string; text?: string } }[]; + } + export interface ReadResourceResult { + contents: { uri: string; mimeType?: string; text?: string; blob?: string }[]; + } + export interface CallToolResult { + content: Array<{ type: string; text?: string }>; + isError?: boolean; + [key: string]: unknown; + } + export interface Tool { + name: string; + description?: string; + inputSchema?: unknown; + annotations?: { + title?: string; + readOnlyHint?: boolean; + destructiveHint?: boolean; + idempotentHint?: boolean; + openWorldHint?: boolean; + }; + } + export interface ListToolsResult { + tools: Tool[]; + } +} diff --git a/packages/core/src/utils/filesearch/crawler.test.ts b/packages/core/src/utils/filesearch/crawler.test.ts index bae7e84cb4..1042c892d9 100644 --- a/packages/core/src/utils/filesearch/crawler.test.ts +++ b/packages/core/src/utils/filesearch/crawler.test.ts @@ -9,7 +9,7 @@ import * as fs from 'node:fs/promises'; import * as path from 'node:path'; import * as cache from './crawlCache.js'; import { crawl } from './crawler.js'; -import { createTmpDir, cleanupTmpDir } from '@qwen-code/qwen-code-test-utils'; +import { createTmpDir, cleanupTmpDir } from '@bwen-code/bwen-code-test-utils'; import type { Ignore } from './ignore.js'; import { loadIgnoreRules } from './ignore.js'; diff --git a/packages/core/src/utils/filesearch/fileSearch.test.ts b/packages/core/src/utils/filesearch/fileSearch.test.ts index 854944e0ca..c786e9a79c 100644 --- a/packages/core/src/utils/filesearch/fileSearch.test.ts +++ b/packages/core/src/utils/filesearch/fileSearch.test.ts @@ -6,7 +6,7 @@ import { describe, it, expect, afterEach, vi } from 'vitest'; import { FileSearchFactory, AbortError, filter } from './fileSearch.js'; -import { createTmpDir, cleanupTmpDir } from '@qwen-code/qwen-code-test-utils'; +import { createTmpDir, cleanupTmpDir } from '@bwen-code/bwen-code-test-utils'; describe('FileSearch', () => { let tmpDir: string; diff --git a/packages/core/src/utils/filesearch/ignore.test.ts b/packages/core/src/utils/filesearch/ignore.test.ts index f94872f854..b3c6c30cbd 100644 --- a/packages/core/src/utils/filesearch/ignore.test.ts +++ b/packages/core/src/utils/filesearch/ignore.test.ts @@ -6,7 +6,7 @@ import { describe, it, expect, afterEach } from 'vitest'; import { Ignore, loadIgnoreRules } from './ignore.js'; -import { createTmpDir, cleanupTmpDir } from '@qwen-code/qwen-code-test-utils'; +import { createTmpDir, cleanupTmpDir } from '@bwen-code/bwen-code-test-utils'; describe('Ignore', () => { describe('getDirectoryFilter', () => { diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 06e3256b97..ba3978efbc 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -4,8 +4,10 @@ "outDir": "dist", "lib": ["DOM", "DOM.Iterable", "ES2023"], "composite": true, - "types": ["node", "vitest/globals"] + "types": ["node", "vitest/globals"], + "skipLibCheck": true, + "noEmitOnError": false }, "include": ["index.ts", "src/**/*.ts", "src/**/*.json"], - "exclude": ["node_modules", "dist"] + "exclude": ["node_modules", "dist", "src/**/*.test.ts"] } diff --git a/packages/sdk-java/client/.editorconfig b/packages/sdk-java/client/.editorconfig deleted file mode 100644 index 53a4241f9d..0000000000 --- a/packages/sdk-java/client/.editorconfig +++ /dev/null @@ -1,24 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_style = space -indent_size = 4 -tab_width = 4 -ij_continuation_indent_size = 8 - -[*.java] -ij_java_doc_align_exception_comments = false -ij_java_doc_align_param_comments = false - -[*.{yaml, yml, sh, ps1}] -indent_size = 2 - -[*.{md, mkd, markdown}] -trim_trailing_whitespace = false - -[{**/res/**.xml, **/AndroidManifest.xml}] -ij_continuation_indent_size = 4 diff --git a/packages/sdk-java/client/.gitignore b/packages/sdk-java/client/.gitignore deleted file mode 100644 index 93d4122741..0000000000 --- a/packages/sdk-java/client/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -# Mac -.DS_Store - -# Maven -log/ -target/ - -/docs/ -/logs/ diff --git a/packages/sdk-java/client/QWEN.md b/packages/sdk-java/client/QWEN.md deleted file mode 100644 index 3a3f74380e..0000000000 --- a/packages/sdk-java/client/QWEN.md +++ /dev/null @@ -1,106 +0,0 @@ -# ACP SDK Project Context - -## Project Overview - -The `acp-sdk` is a Java SDK implementation for the Agent Client Protocol (ACP), which is a protocol for communication between AI agents and client applications. The SDK provides a standardized way to interact with AI agents that support the Agent Client Protocol, enabling features like session management, file system operations, terminal commands, and tool calls. - -The project is structured as a Maven-based Java project with the following key characteristics: - -- **Group ID**: com.alibaba -- **Artifact ID**: acp-sdk -- **Version**: 0.0.1-alpha -- **Description**: The agent client protocol Java SDK -- **Java Version**: 1.8+ - -## Architecture and Components - -### Core Components - -1. **AcpClient**: Main client class that manages connections to ACP-compatible agents -2. **Session**: Represents a conversation session with an agent -3. **Transport**: Handles the underlying communication protocol (JSON-RPC over stdio, HTTP, etc.) -4. **Protocol Definitions**: Generated from JSON schema, defining all ACP message types - -### Key Features - -- Session management (create, load, manage conversations) -- File system operations (read/write text files) -- Terminal command execution -- Tool call handling and permission management -- Support for rich content types (text, images, audio, resources) -- Integration with Model Context Protocol (MCP) servers - -### Protocol Structure - -The SDK implements the Agent Client Protocol based on a comprehensive JSON schema that defines: - -- Request/Response types for agent-client communication -- Notification mechanisms for real-time updates -- Error handling and capability negotiation -- Content blocks for various data types -- Tool call definitions and execution flows - -## Building and Running - -### Prerequisites - -- Java 8 or higher -- Maven 3.6.0 or higher - -### Build Commands - -```bash -# Compile the project -mvn compile - -# Run tests -mvn test - -# Package the JAR -mvn package - -# Install to local repository -mvn install -``` - -### Testing - -The project includes comprehensive unit tests covering: - -- Protocol message generation from JSON schema -- Session management functionality -- Permission handling workflows -- Content type processing - -### Development Conventions - -- Code follows standard Java conventions -- Uses SLF4J for logging -- Leverages Apache Commons Lang3 and IO utilities -- Uses FastJSON2 for JSON serialization/deserialization -- Follows JSON-RPC 2.0 specification for messaging - -## Usage Examples - -Based on the test files, typical usage involves: - -1. Creating a Transport instance (e.g., ProcessTransport for running agent processes) -2. Initializing an AcpClient with appropriate capabilities -3. Creating or loading sessions -4. Sending prompts and handling responses through event consumers - -The SDK supports advanced features like permission management for sensitive operations, file system access, and integration with external MCP servers for extended tooling capabilities. - -## Dependencies - -Key dependencies include: - -- SLF4J API for logging -- Apache Commons Lang3 and IO for utility functions -- FastJSON2 for JSON processing -- JUnit 5 for testing -- Logback Classic for testing logging - -## Project Status - -This is an alpha version of the SDK, suggesting it's in early development stages. The project appears to be actively maintained by Alibaba's skyfire developer team and is designed to support AI agent integration in enterprise environments. diff --git a/packages/sdk-java/client/README.md b/packages/sdk-java/client/README.md deleted file mode 100644 index 7bfc390bf5..0000000000 --- a/packages/sdk-java/client/README.md +++ /dev/null @@ -1,178 +0,0 @@ -# ACP Client SDK (Agent Client Protocol Java SDK For Client) - -The ACP Client SDK is a Java Software Development Kit for communicating with AI agents that support the Agent Client Protocol (ACP). It provides a standardized way to interact with AI agents that support the Agent Client Protocol, enabling features like session management, file system operations, terminal commands, and tool calls. - -## Project Overview - -The ACP SDK implements the Agent Client Protocol, allowing client applications to communicate with AI agents. The SDK provides the following core features: - -- Session management (create, load, manage conversations) -- File system operations (read/write text files) -- Terminal command execution -- Tool call handling and permission management -- Support for rich content types (text, images, audio, resources) -- Integration with Model Context Protocol (MCP) servers - -## Requirements - -- Java 8 or higher -- Maven 3.6.0 or higher - -## Features - -- **Standardized Protocol**: Implements ACP protocol to ensure interoperability with various ACP-compatible agents -- **Flexible Transport Layer**: Supports multiple transport mechanisms (stdio, HTTP, etc.) -- **Session Management**: Complete session lifecycle management -- **Permission Control**: Fine-grained permission management to protect sensitive operations -- **Content Block Handling**: Support for multiple data types in content blocks -- **MCP Integration**: Integration with external MCP servers for extended tooling capabilities - -## Installation - -### Maven - -Add the following dependency to your `pom.xml` file: - -```xml - - com.alibaba - acp-sdk - 0.0.1-alpha - -``` - -### Gradle - -Add the following to your `build.gradle` file: - -```gradle -implementation 'com.alibaba:acp-sdk:0.0.1-alpha' -``` - -## Quick Start - -The following is a simple example showing how to use the ACP SDK to create a client and establish a session: - -```java -@Test -public void testSession() throws AgentInitializeException, SessionNewException, IOException { - // Create an ACP client with a process transport - AcpClient acpClient = new AcpClient( - new ProcessTransport(new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "-y"}))); - - try { - // Send a prompt to the agent - acpClient.sendPrompt(Collections.singletonList(new TextContent("你是谁")), - new AgentEventConsumer().setContentEventConsumer(new ContentEventSimpleConsumer() { - @Override - public void onAgentMessageChunkSessionUpdate(AgentMessageChunkSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onAvailableCommandsUpdateSessionUpdate(AvailableCommandsUpdateSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onCurrentModeUpdateSessionUpdate(CurrentModeUpdateSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onPlanSessionUpdate(PlanSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onToolCallUpdateSessionUpdate(ToolCallUpdateSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onToolCallSessionUpdate(ToolCallSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - })); - } finally { - // Close the client when done - acpClient.close(); - } -} -``` - -## Architecture Components - -### Core Components - -1. **AcpClient**: Main client class that manages connections to ACP-compatible agents -2. **Session**: Represents a conversation session with an agent -3. **Transport**: Handles the underlying communication protocol (JSON-RPC over stdio, HTTP, etc.) -4. **Protocol Definitions**: Generated from JSON schema, defining all ACP message types - -### Protocol Structure - -The SDK implements the Agent Client Protocol based on a comprehensive JSON schema that defines: - -- Request/Response types for agent-client communication -- Notification mechanisms for real-time updates -- Error handling and capability negotiation -- Content blocks for various data types -- Tool call definitions and execution flows - -## Use Cases - -- AI agent integration in enterprise applications -- Automated scripting and task execution -- File system operation automation -- Terminal command execution and result processing -- Integration with external services and tools - -## Development - -### Build - -```bash -# Compile the project -mvn compile - -# Run tests -mvn test - -# Package the JAR -mvn package - -# Install to local repository -mvn install -``` - -### Testing - -The project includes comprehensive unit tests covering: - -- Protocol message generation from JSON schema -- Session management functionality -- Permission handling workflows -- Content type processing - -## Dependencies - -Key dependencies include: - -- SLF4J API for logging -- Apache Commons Lang3 and IO for utility functions -- FastJSON2 for JSON serialization/deserialization -- JUnit 5 for testing -- Logback Classic for testing logging - -## License - -This project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for details. - -## Contributing - -Contributions are welcome! Please submit issues and pull requests. - -## Support - -If you encounter any problems, please submit an issue report through GitHub Issues. diff --git a/packages/sdk-java/client/checkstyle.xml b/packages/sdk-java/client/checkstyle.xml deleted file mode 100644 index c67c1319f9..0000000000 --- a/packages/sdk-java/client/checkstyle.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/sdk-java/client/pom.xml b/packages/sdk-java/client/pom.xml deleted file mode 100644 index b857815369..0000000000 --- a/packages/sdk-java/client/pom.xml +++ /dev/null @@ -1,206 +0,0 @@ - - 4.0.0 - com.alibaba - acp-sdk - jar - 0.0.1-alpha - acp-sdk - The agent client protocol Java SDK - - https://maven.apache.org - - - Apache 2 - https://www.apache.org/licenses/LICENSE-2.0.txt - repo - A business-friendly OSS license - - - - https://github.com/QwenLM/qwen-code - scm:git:https://github.com/QwenLM/qwen-code.git - - - 1.8 - 1.8 - UTF-8 - 3.6.0 - 0.8.12 - 5.14.1 - 2.0.60 - 2.0.17 - 3.20.0 - 3.13.0 - 0.8.0 - 2.2.1 - 2.9.1 - 1.5 - 2.21.0 - - - - - - org.junit - junit-bom - pom - ${junit5.version} - import - - - - - - org.slf4j - slf4j-api - ${slf4j-api.version} - compile - - - org.apache.commons - commons-lang3 - ${commons-lang3.version} - - - commons-io - commons-io - ${commons-io.version} - - - com.alibaba.fastjson2 - fastjson2 - ${fastjson2.version} - - - org.junit.jupiter - junit-jupiter - test - - - ch.qos.logback - logback-classic - 1.3.16 - test - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - ${checkstyle-maven-plugin.version} - - checkstyle.xml - - - - - check - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco-maven-plugin.version} - - - - prepare-agent - - - - report - test - - report - - - - - - org.sonatype.central - central-publishing-maven-plugin - ${central-publishing-maven-plugin.version} - true - - central - - - - - org.apache.maven.plugins - maven-source-plugin - ${maven-source-plugin.version} - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - - sign-artifacts - verify - - sign - - - - - - - - - Alibaba Group - https://github.com/alibaba - - - - skyfire - skyfire - gengwei.gw(at)alibaba-inc.com - - Developer - Designer - - +8 - https://github.com/gwinthis - - - - - - central - https://central.sonatype.com/repository/maven-snapshots/ - - - central - https://central.sonatype.org/service/local/staging/deploy/maven2/ - - - diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/AcpClient.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/AcpClient.java deleted file mode 100644 index 1f3d8957d1..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/AcpClient.java +++ /dev/null @@ -1,174 +0,0 @@ -package com.alibaba.acp.sdk; - -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; - -import com.alibaba.acp.sdk.protocol.agent.response.InitializeResponse; -import com.alibaba.acp.sdk.protocol.client.request.InitializeRequest; -import com.alibaba.acp.sdk.protocol.client.request.InitializeRequest.InitializeRequestParams; -import com.alibaba.acp.sdk.protocol.client.request.LoadSessionRequest; -import com.alibaba.acp.sdk.protocol.client.request.LoadSessionRequest.LoadSessionRequestParams; -import com.alibaba.acp.sdk.protocol.client.request.NewSessionRequest; -import com.alibaba.acp.sdk.protocol.client.request.NewSessionRequest.NewSessionRequestParams; -import com.alibaba.acp.sdk.protocol.agent.response.LoadSessionResponse; -import com.alibaba.acp.sdk.protocol.agent.response.NewSessionResponse; -import com.alibaba.acp.sdk.protocol.domain.content.block.ContentBlock; -import com.alibaba.acp.sdk.session.Session; -import com.alibaba.acp.sdk.session.event.consumer.AgentEventConsumer; -import com.alibaba.acp.sdk.session.exception.SessionLoadException; -import com.alibaba.acp.sdk.session.exception.SessionNewException; -import com.alibaba.acp.sdk.transport.Transport; -import com.alibaba.acp.sdk.utils.AgentInitializeException; -import com.alibaba.acp.sdk.utils.TransportUtils; - -import org.apache.commons.lang3.Validate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * ACP (Agent Client Protocol) Client Implementation - * This class provides the main entry point for communicating with AI agents, responsible for initializing connections, managing sessions, and other - * operations. - * - * @author SkyFire - * @version 0.0.1 - */ -public class AcpClient { - private final Transport transport; - private Session session; - private static final Logger logger = LoggerFactory.getLogger(AcpClient.class); - - /** - * Constructs a new ACP client instance - * This constructor starts the transport layer and sends an initialization request to the agent side, completing the protocol handshake process. - * - * @param transport Transport instance for communication with the agent, cannot be null - * @throws AgentInitializeException Thrown when an error occurs during initialization - */ - public AcpClient(Transport transport) throws AgentInitializeException { - this(transport, new InitializeRequestParams()); - } - - /** - * Constructs a new ACP client instance - * This constructor starts the transport layer and sends an initialization request to the agent side, completing the protocol handshake process. - * - * @param transport Transport instance for communication with the agent, cannot be null - * @param initializeRequestParams Initialization request parameters, including client capabilities and other information, cannot be null - * @throws AgentInitializeException Thrown when an error occurs during initialization - */ - public AcpClient(Transport transport, InitializeRequestParams initializeRequestParams) throws AgentInitializeException { - Validate.notNull(transport, "transport can't be null"); - this.transport = transport; - - try { - transport.start(); - } catch (IOException e) { - throw new AgentInitializeException("transport start error") - .addContextValue("initializeRequestParams", initializeRequestParams); - } - Validate.notNull(initializeRequestParams, "initializeRequestParams can't be null"); - - InitializeResponse initializeResponse; - try { - InitializeRequest initializeRequest = new InitializeRequest(initializeRequestParams); - logger.debug("start to initialize agent {}", initializeRequest); - initializeResponse = TransportUtils.inputWaitForOneLine(transport, initializeRequest, InitializeResponse.class); - logger.debug("initialize response: {}", initializeResponse); - } catch (IOException | ExecutionException | InterruptedException | TimeoutException e) { - throw new AgentInitializeException("agent transport error") - .addContextValue("initializeRequestParams", initializeRequestParams); - } - if (initializeResponse.getError() != null) { - throw new AgentInitializeException("agent initialize error") - .addContextValue("initializeRequestParams", initializeRequestParams) - .addContextValue("initializeResponse", initializeResponse); - } - } - - public void sendPrompt(List prompts, AgentEventConsumer agentEventConsumer) throws IOException, SessionNewException { - newSession(); - session.sendPrompt(prompts, agentEventConsumer); - } - - /** - * Creates a new session - * Sends a new session request to the agent and creates a Session instance based on the response. - * - * @return Session object representing the newly created session - * @throws SessionNewException Thrown when an error occurs during session creation - */ - public Session newSession() throws SessionNewException { - return newSession(new NewSessionRequestParams()); - } - - /** - * Creates a new session - * Sends a new session request to the agent and creates a Session instance based on the response. - * - * @param newSessionRequestParams New session request parameters, including session configuration information - * @return Session object representing the newly created session - * @throws SessionNewException Thrown when an error occurs during session creation - */ - public Session newSession(NewSessionRequestParams newSessionRequestParams) throws SessionNewException { - Validate.notNull(newSessionRequestParams, "newSessionRequestParams can't be null"); - NewSessionRequest newSessionRequest = new NewSessionRequest(newSessionRequestParams); - NewSessionResponse newSessionResponse; - try { - logger.debug("start to new session {}", newSessionRequest); - newSessionResponse = TransportUtils.inputWaitForOneLine(transport, newSessionRequest, NewSessionResponse.class); - } catch (IOException | ExecutionException | InterruptedException | TimeoutException e) { - throw new SessionNewException("transport inputWaitForOneLine error", e) - .addContextValue("newSessionRequestParams", newSessionRequestParams) - .addContextValue("newSessionRequest", newSessionRequest); - } - logger.debug("new session response: {}", newSessionResponse); - if (newSessionResponse.getError() != null) { - throw new SessionNewException("new session error") - .addContextValue("newSessionRequest", newSessionRequest) - .addContextValue("newSessionRequestParams", newSessionRequestParams) - .addContextValue("newSessionResponse", newSessionResponse); - } - - session = new Session(transport, new LoadSessionRequestParams() - .setSessionId(newSessionResponse.getResult().getSessionId()) - .setCwd(newSessionRequestParams.getCwd()) - .setMcpServers(newSessionRequestParams.getMcpServers()) - ); - return session; - } - - /** - * Loads an existing session - * Sends a load session request to the agent and creates a Session instance representing the session. - * - * @param loadSessionRequestParams Load session request parameters, including session identifier and other information - * @return Session object representing the loaded session - * @throws SessionLoadException Thrown when an error occurs during session loading - */ - public Session loadSession(LoadSessionRequestParams loadSessionRequestParams) - throws SessionLoadException { - LoadSessionRequest loadSessionRequest = new LoadSessionRequest(loadSessionRequestParams); - logger.debug("start to load session {}", loadSessionRequest); - LoadSessionResponse loadSessionResponse; - try { - loadSessionResponse = TransportUtils.inputWaitForOneLine(transport, loadSessionRequest, LoadSessionResponse.class); - } catch (IOException | ExecutionException | InterruptedException | TimeoutException e) { - throw new SessionLoadException("transport inputWaitForOneLine error", e) - .addContextValue("loadSessionRequestParams", loadSessionRequestParams) - .addContextValue("loadSessionRequest", loadSessionRequest); - } - logger.debug("loadSessionResponse: {}", loadSessionResponse); - session = new Session(transport, loadSessionRequestParams); - return session; - } - - public void close() throws IOException { - if (transport != null) { - transport.close(); - } - //ThreadPoolConfig.shutdown(); - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/notification/AgentNotification.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/notification/AgentNotification.java deleted file mode 100644 index 67650c3ae7..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/notification/AgentNotification.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.notification; - -import com.alibaba.acp.sdk.protocol.jsonrpc.MethodMessage; - -public class AgentNotification

extends MethodMessage

{ - public AgentNotification() { - } - - public AgentNotification(String method, P params) { - super(method, params); - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/notification/SessionNotification.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/notification/SessionNotification.java deleted file mode 100644 index d2ef8c618d..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/notification/SessionNotification.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.notification; - -import com.alibaba.acp.sdk.protocol.agent.notification.SessionNotification.SessionNotificationParams; -import com.alibaba.acp.sdk.protocol.domain.session.update.SessionUpdate; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeName = "session/update") -public class SessionNotification extends AgentNotification { - public SessionNotification() { - super(); - this.method = "session/update"; - } - - public static class SessionNotificationParams { - private String sessionId; - private SessionUpdate update; - - public SessionNotificationParams() { - } - - public SessionNotificationParams(String sessionId, SessionUpdate update) { - this.sessionId = sessionId; - this.update = update; - } - - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public SessionUpdate getUpdate() { - return update; - } - - public void setUpdate(SessionUpdate update) { - this.update = update; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/AuthenticateRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/AuthenticateRequest.java deleted file mode 100644 index 7774eaca42..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/AuthenticateRequest.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.request; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.agent.request.AuthenticateRequest.AuthenticateRequestParams; - -@JSONType(typeName = "authenticate") -public class AuthenticateRequest extends Request { - public AuthenticateRequest() { - this(new AuthenticateRequestParams()); - } - - public AuthenticateRequest(AuthenticateRequestParams requestParams) { - super("authenticate", requestParams); - } - - public static class AuthenticateRequestParams extends Meta { - private String methodId; - - // Getters and setters - public String getMethodId() { - return methodId; - } - - public void setMethodId(String methodId) { - this.methodId = methodId; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/ReadTextFileRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/ReadTextFileRequest.java deleted file mode 100644 index 189680c1c7..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/ReadTextFileRequest.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.request; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.agent.request.ReadTextFileRequest.ReadTextFileRequestParams; - -@JSONType(typeName = "fs/read_text_file") -public class ReadTextFileRequest extends Request { - public ReadTextFileRequest() { - this(new ReadTextFileRequestParams()); - } - - public ReadTextFileRequest(ReadTextFileRequestParams requestParams) { - super("fs/read_text_file", requestParams); - } - - public static class ReadTextFileRequestParams extends Meta { - private String sessionId; - private String path; - private Integer line; - private Integer limit; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public Integer getLine() { - return line; - } - - public void setLine(Integer line) { - this.line = line; - } - - public Integer getLimit() { - return limit; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/RequestPermissionRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/RequestPermissionRequest.java deleted file mode 100644 index d8c34c242b..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/RequestPermissionRequest.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.request; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.domain.permission.PermissionOption; -import com.alibaba.acp.sdk.protocol.domain.tool.ToolCallUpdate; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.agent.request.RequestPermissionRequest.RequestPermissionRequestParams; - -@JSONType(typeName = "session/request_permission") -public class RequestPermissionRequest extends Request { - public RequestPermissionRequest() { - this(new RequestPermissionRequestParams()); - } - - public RequestPermissionRequest(RequestPermissionRequestParams requestParams) { - super("session/request_permission", requestParams); - } - - public static class RequestPermissionRequestParams extends Meta { - private String sessionId; - private ToolCallUpdate toolCall; - private List options; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public ToolCallUpdate getToolCall() { - return toolCall; - } - - public void setToolCall(ToolCallUpdate toolCall) { - this.toolCall = toolCall; - } - - public List getOptions() { - return options; - } - - public void setOptions(List options) { - this.options = options; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/WriteTextFileRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/WriteTextFileRequest.java deleted file mode 100644 index 373ffac7c2..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/WriteTextFileRequest.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.request; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.agent.request.WriteTextFileRequest.WriteTextFileRequestParams; - -@JSONType(typeName = "fs/write_text_file") -public class WriteTextFileRequest extends Request { - public WriteTextFileRequest() { - this(new WriteTextFileRequestParams()); - } - - public WriteTextFileRequest(WriteTextFileRequestParams requestParams) { - super("fs/write_text_file", requestParams); - } - - public static class WriteTextFileRequestParams extends Meta { - private String sessionId; - private String path; - private String content; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/CreateTerminalRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/CreateTerminalRequest.java deleted file mode 100644 index 4269276f82..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/CreateTerminalRequest.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.request.terminal; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.domain.terminal.EnvVariable; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.agent.request.terminal.CreateTerminalRequest.CreateTerminalRequestParams; - -@JSONType(typeName = "terminal/create") -public class CreateTerminalRequest extends Request { - public CreateTerminalRequest() { - this(new CreateTerminalRequestParams()); - } - - public CreateTerminalRequest(CreateTerminalRequestParams requestParams) { - super("terminal/create", requestParams); - } - - public static class CreateTerminalRequestParams extends Meta { - private String sessionId; - private String command; - private List args; - private String cwd; - private List env; - private Long outputByteLimit; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public String getCommand() { - return command; - } - - public void setCommand(String command) { - this.command = command; - } - - public List getArgs() { - return args; - } - - public void setArgs(List args) { - this.args = args; - } - - public String getCwd() { - return cwd; - } - - public void setCwd(String cwd) { - this.cwd = cwd; - } - - public List getEnv() { - return env; - } - - public void setEnv(List env) { - this.env = env; - } - - public Long getOutputByteLimit() { - return outputByteLimit; - } - - public void setOutputByteLimit(Long outputByteLimit) { - this.outputByteLimit = outputByteLimit; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/KillTerminalCommandRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/KillTerminalCommandRequest.java deleted file mode 100644 index 9d6b9a57ee..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/KillTerminalCommandRequest.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.request.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.agent.request.terminal.KillTerminalCommandRequest.KillTerminalCommandRequestParams; - -@JSONType(typeName = "terminal/kill") -public class KillTerminalCommandRequest extends Request { - public KillTerminalCommandRequest() { - this(new KillTerminalCommandRequestParams()); - } - - public KillTerminalCommandRequest(KillTerminalCommandRequestParams requestParams) { - super("terminal/kill", requestParams); - } - - public static class KillTerminalCommandRequestParams extends Meta { - private String sessionId; - private String terminalId; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public String getTerminalId() { - return terminalId; - } - - public void setTerminalId(String terminalId) { - this.terminalId = terminalId; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/ReleaseTerminalRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/ReleaseTerminalRequest.java deleted file mode 100644 index 3ebe764574..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/ReleaseTerminalRequest.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.request.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.agent.request.terminal.ReleaseTerminalRequest.ReleaseTerminalRequestParams; - -@JSONType(typeName = "terminal/release") -public class ReleaseTerminalRequest extends Request { - public ReleaseTerminalRequest() { - this(new ReleaseTerminalRequestParams()); - } - - public ReleaseTerminalRequest(ReleaseTerminalRequestParams requestParams) { - super("terminal/release", requestParams); - } - - public static class ReleaseTerminalRequestParams extends Meta { - private String sessionId; - private String terminalId; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public String getTerminalId() { - return terminalId; - } - - public void setTerminalId(String terminalId) { - this.terminalId = terminalId; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/TerminalOutputRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/TerminalOutputRequest.java deleted file mode 100644 index e847e55fdf..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/TerminalOutputRequest.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.request.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.agent.request.terminal.TerminalOutputRequest.TerminalOutputRequestParams; - -@JSONType(typeName = "terminal/output") -public class TerminalOutputRequest extends Request { - public TerminalOutputRequest() { - this(new TerminalOutputRequestParams()); - } - - public TerminalOutputRequest(TerminalOutputRequestParams requestParams) { - super("terminal/output", requestParams); - } - - public static class TerminalOutputRequestParams extends Meta { - private String sessionId; - private String terminalId; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public String getTerminalId() { - return terminalId; - } - - public void setTerminalId(String terminalId) { - this.terminalId = terminalId; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/WaitForTerminalExitRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/WaitForTerminalExitRequest.java deleted file mode 100644 index f58d74c4bc..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/request/terminal/WaitForTerminalExitRequest.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.request.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.agent.request.terminal.WaitForTerminalExitRequest.WaitForTerminalExitRequestParams; - -@JSONType(typeName = "terminal/wait_for_exit") -public class WaitForTerminalExitRequest extends Request { - public WaitForTerminalExitRequest() { - this(new WaitForTerminalExitRequestParams()); - } - - public WaitForTerminalExitRequest(WaitForTerminalExitRequestParams requestParams) { - super("terminal/wait_for_exit", requestParams); - } - - public static class WaitForTerminalExitRequestParams extends Meta { - private String sessionId; - private String terminalId; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public String getTerminalId() { - return terminalId; - } - - public void setTerminalId(String terminalId) { - this.terminalId = terminalId; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/AuthenticateResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/AuthenticateResponse.java deleted file mode 100644 index b28f731a2c..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/AuthenticateResponse.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.response; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.agent.response.AuthenticateResponse.AuthenticateResponseResult; - -public class AuthenticateResponse extends Response { - public static class AuthenticateResponseResult { - // Empty result class as per schema - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/InitializeResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/InitializeResponse.java deleted file mode 100644 index dd9e9e572d..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/InitializeResponse.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.response; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.domain.agent.AgentCapabilities; -import com.alibaba.acp.sdk.protocol.domain.agent.AgentInfo; -import com.alibaba.acp.sdk.protocol.domain.agent.AuthMethod; -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.agent.response.InitializeResponse.InitializeResponseResult; - -/** - * Initialize Response Class - * - * Represents the agent's response to the client's initialization request, containing agent capability information, authentication methods, etc. - */ -public class InitializeResponse extends Response { - /** - * Initialize Response Result Class - * - * Contains initialization response data such as protocol version, agent capabilities, agent information, and authentication methods. - */ - public static class InitializeResponseResult { - private int protocolVersion; - private AgentCapabilities agentCapabilities; - private AgentInfo agentInfo; - private List authMethods; - - /** - * Gets the protocol version - * - * @return Protocol version number - */ - public int getProtocolVersion() { - return protocolVersion; - } - - /** - * Sets the protocol version - * - * @param protocolVersion Protocol version number - */ - public void setProtocolVersion(int protocolVersion) { - this.protocolVersion = protocolVersion; - } - - /** - * Gets the agent capabilities - * - * @return Agent capabilities object - */ - public AgentCapabilities getAgentCapabilities() { - return agentCapabilities; - } - - /** - * Sets the agent capabilities - * - * @param agentCapabilities Agent capabilities object - */ - public void setAgentCapabilities(AgentCapabilities agentCapabilities) { - this.agentCapabilities = agentCapabilities; - } - - /** - * Gets the agent information - * - * @return Agent information object - */ - public AgentInfo getAgentInfo() { - return agentInfo; - } - - /** - * Sets the agent information - * - * @param agentInfo Agent information object - */ - public void setAgentInfo(AgentInfo agentInfo) { - this.agentInfo = agentInfo; - } - - /** - * Gets the authentication method list - * - * @return Authentication method list - */ - public List getAuthMethods() { - return authMethods; - } - - /** - * Sets the authentication method list - * - * @param authMethods Authentication method list - */ - public void setAuthMethods(List authMethods) { - this.authMethods = authMethods; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/LoadSessionResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/LoadSessionResponse.java deleted file mode 100644 index 45d9d2702b..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/LoadSessionResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.response; - -import com.alibaba.acp.sdk.protocol.domain.session.SessionModeState; -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.agent.response.LoadSessionResponse.LoadSessionResponseResult; - -public class LoadSessionResponse extends Response { - public static class LoadSessionResponseResult { - private SessionModeState modes; - - // Getters and setters - public SessionModeState getModes() { - return modes; - } - - public void setModes(SessionModeState modes) { - this.modes = modes; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/NewSessionResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/NewSessionResponse.java deleted file mode 100644 index 6a1fff8e8d..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/NewSessionResponse.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.response; - -import com.alibaba.acp.sdk.protocol.domain.session.SessionModeState; -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.agent.response.NewSessionResponse.NewSessionResponseResult; - -public class NewSessionResponse extends Response { - public static class NewSessionResponseResult { - private String sessionId; - private SessionModeState modes; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public SessionModeState getModes() { - return modes; - } - - public void setModes(SessionModeState modes) { - this.modes = modes; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/PromptResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/PromptResponse.java deleted file mode 100644 index 5511a96bec..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/PromptResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.response; - -import com.alibaba.acp.sdk.protocol.domain.session.StopReason; -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.agent.response.PromptResponse.PromptResponseResult; - -public class PromptResponse extends Response { - public static class PromptResponseResult { - private StopReason stopReason; - - // Getters and setters - public StopReason getStopReason() { - return stopReason; - } - - public void setStopReason(StopReason stopReason) { - this.stopReason = stopReason; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/SetSessionModeResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/SetSessionModeResponse.java deleted file mode 100644 index b2e1a79149..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/agent/response/SetSessionModeResponse.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.alibaba.acp.sdk.protocol.agent.response; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.agent.response.SetSessionModeResponse.SetSessionModeResponseResult; - -public class SetSessionModeResponse extends Response { - public static class SetSessionModeResponseResult { - // Empty result class as per schema - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/notification/CancelNotification.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/notification/CancelNotification.java deleted file mode 100644 index 258f1665b0..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/notification/CancelNotification.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.notification; - -import com.alibaba.acp.sdk.protocol.client.notification.CancelNotification.CancelNotificationParams; - -public class CancelNotification extends ClientNotification { - public CancelNotification() { - super(); - this.method = "session/cancel"; - } - - public CancelNotification(String method, CancelNotificationParams params) { - super(method, params); - } - - public static class CancelNotificationParams { - private String sessionId; - - public CancelNotificationParams() { - } - - public CancelNotificationParams(String sessionId) { - this.sessionId = sessionId; - } - - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/notification/ClientNotification.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/notification/ClientNotification.java deleted file mode 100644 index 6cef7c2761..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/notification/ClientNotification.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.notification; - -import com.alibaba.acp.sdk.protocol.jsonrpc.MethodMessage; - -public class ClientNotification

extends MethodMessage

{ - public ClientNotification() { - super(); - } - - public ClientNotification(String method, P params) { - super(method, params); - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/InitializeRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/InitializeRequest.java deleted file mode 100644 index 1fe2a3dd20..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/InitializeRequest.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.request; - -import com.alibaba.acp.sdk.protocol.domain.client.ClientCapabilities; -import com.alibaba.acp.sdk.protocol.domain.client.ClientInfo; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.client.request.InitializeRequest.InitializeRequestParams; - -/** - * Initialize Request Class - * - * Used to send client initialization information to the agent, including protocol version, client capabilities, and client information. - */ -@JSONType(typeName = "initialize") -public class InitializeRequest extends Request { - /** - * Constructs an initialization request with default parameters - */ - public InitializeRequest() { - this(new InitializeRequestParams()); - } - - /** - * Constructs an initialization request with specified parameters - * - * @param requestParams Initialization request parameters - */ - public InitializeRequest(InitializeRequestParams requestParams) { - super("initialize", requestParams); - } - - /** - * Initialize Request Parameters Class - * - * Contains initialization information such as protocol version, client capabilities, and client information. - */ - public static class InitializeRequestParams extends Meta { - private int protocolVersion; - private ClientCapabilities clientCapabilities = new ClientCapabilities(); - private ClientInfo clientInfo; - - /** - * Gets the protocol version - * - * @return Protocol version number - */ - public int getProtocolVersion() { - return protocolVersion; - } - - /** - * Sets the protocol version - * - * @param protocolVersion Protocol version number - */ - public void setProtocolVersion(int protocolVersion) { - this.protocolVersion = protocolVersion; - } - - /** - * Gets the client capabilities - * - * @return Client capabilities object - */ - public ClientCapabilities getClientCapabilities() { - return clientCapabilities; - } - - /** - * Sets the client capabilities - * - * @param clientCapabilities Client capabilities object - * @return Current object instance, facilitating method chaining - */ - public InitializeRequestParams setClientCapabilities(ClientCapabilities clientCapabilities) { - this.clientCapabilities = clientCapabilities; - return this; - } - - /** - * Gets the client information - * - * @return Client information object - */ - public ClientInfo getClientInfo() { - return clientInfo; - } - - /** - * Sets the client information - * - * @param clientInfo Client information object - * @return Current object instance, facilitating method chaining - */ - public InitializeRequestParams setClientInfo(ClientInfo clientInfo) { - this.clientInfo = clientInfo; - return this; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/LoadSessionRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/LoadSessionRequest.java deleted file mode 100644 index f47e77377f..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/LoadSessionRequest.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.request; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.domain.mcp.McpServer; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.client.request.LoadSessionRequest.LoadSessionRequestParams; - -@JSONType(typeName = "session/load") -public class LoadSessionRequest extends Request { - public LoadSessionRequest() { - this(new LoadSessionRequestParams()); - } - - public LoadSessionRequest(LoadSessionRequestParams requestParams) { - super("session/load", requestParams); - } - - public static class LoadSessionRequestParams extends Meta { - private String sessionId; - private String cwd; - private List mcpServers; - - public String getSessionId() { - return sessionId; - } - - public LoadSessionRequestParams setSessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - public String getCwd() { - return cwd; - } - - public LoadSessionRequestParams setCwd(String cwd) { - this.cwd = cwd; - return this; - } - - public List getMcpServers() { - return mcpServers; - } - - public LoadSessionRequestParams setMcpServers(List mcpServers) { - this.mcpServers = mcpServers; - return this; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/NewSessionRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/NewSessionRequest.java deleted file mode 100644 index 3017f04731..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/NewSessionRequest.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.request; - -import java.util.ArrayList; -import java.util.List; - -import com.alibaba.acp.sdk.protocol.domain.mcp.McpServer; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.client.request.NewSessionRequest.NewSessionRequestParams; - -@JSONType(typeName = "session/new") -public class NewSessionRequest extends Request { - public NewSessionRequest() { - this(new NewSessionRequestParams()); - } - - public NewSessionRequest(NewSessionRequestParams requestParams) { - super("session/new", requestParams); - } - - public static class NewSessionRequestParams extends Meta { - private String cwd = System.getProperty("user.dir"); - private List mcpServers = new ArrayList<>(); - - // Getters and setters - public String getCwd() { - return cwd; - } - - public void setCwd(String cwd) { - this.cwd = cwd; - } - - public List getMcpServers() { - return mcpServers; - } - - public void setMcpServers(List mcpServers) { - this.mcpServers = mcpServers; - } - - // Inner class for McpServer - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/PromptRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/PromptRequest.java deleted file mode 100644 index 11d1430e00..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/PromptRequest.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.request; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.client.request.PromptRequest.PromptRequestParams; -import com.alibaba.acp.sdk.protocol.domain.content.block.ContentBlock; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeName = "session/prompt") -public class PromptRequest extends Request { - public PromptRequest() { - this(new PromptRequestParams()); - } - - public PromptRequest(PromptRequestParams requestParams) { - super("session/prompt", requestParams); - } - - public static class PromptRequestParams extends Meta { - private String sessionId; - private List prompt; - - public PromptRequestParams(String sessionId, List prompt) { - this.sessionId = sessionId; - this.prompt = prompt; - } - - public PromptRequestParams() { - } - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public List getPrompt() { - return prompt; - } - - public void setPrompt(List prompt) { - this.prompt = prompt; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/SetSessionModeRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/SetSessionModeRequest.java deleted file mode 100644 index 4e6d1cccbd..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/request/SetSessionModeRequest.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.request; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.fastjson2.annotation.JSONType; - -import static com.alibaba.acp.sdk.protocol.client.request.SetSessionModeRequest.SetSessionModeRequestParams; - -@JSONType(typeName = "session/set_mode") -public class SetSessionModeRequest extends Request { - public SetSessionModeRequest() { - this(new SetSessionModeRequestParams()); - } - - public SetSessionModeRequest(SetSessionModeRequestParams requestParams) { - super("session/set_mode", requestParams); - } - - public static class SetSessionModeRequestParams extends Meta { - private String sessionId; - private String modeId; - - // Getters and setters - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public String getModeId() { - return modeId; - } - - public void setModeId(String modeId) { - this.modeId = modeId; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/ReadTextFileResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/ReadTextFileResponse.java deleted file mode 100644 index 401085f657..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/ReadTextFileResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.response; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Error; -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.client.response.ReadTextFileResponse.ReadTextFileResponseResult; - -public class ReadTextFileResponse extends Response { - public ReadTextFileResponse() { - } - - public ReadTextFileResponse(Object id, ReadTextFileResponseResult result) { - super(id, result); - } - - public ReadTextFileResponse(Object id, Error error) { - super(id, error); - } - - public static class ReadTextFileResponseResult { - private String content; - - // Getters and setters - public String getContent() { - return content; - } - - public ReadTextFileResponseResult setContent(String content) { - this.content = content; - return this; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/RequestPermissionResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/RequestPermissionResponse.java deleted file mode 100644 index 278b1a6b91..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/RequestPermissionResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.response; - -import com.alibaba.acp.sdk.protocol.domain.permission.RequestPermissionOutcome; -import com.alibaba.acp.sdk.protocol.jsonrpc.Error; -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.client.response.RequestPermissionResponse.RequestPermissionResponseResult; - -public class RequestPermissionResponse extends Response { - public RequestPermissionResponse() { - } - - public RequestPermissionResponse(Object id, RequestPermissionResponseResult result) { - super(id, result); - } - - public RequestPermissionResponse(Object id, Error error) { - super(id, error); - } - - public static class RequestPermissionResponseResult { - private RequestPermissionOutcome outcome; - - public RequestPermissionResponseResult() { - } - - public RequestPermissionResponseResult(RequestPermissionOutcome outcome) { - this.outcome = outcome; - } - - // Getters and setters - public RequestPermissionOutcome getOutcome() { - return outcome; - } - - public void setOutcome(RequestPermissionOutcome outcome) { - this.outcome = outcome; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/WriteTextFileResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/WriteTextFileResponse.java deleted file mode 100644 index c5cfb41b1e..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/WriteTextFileResponse.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.response; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.client.response.WriteTextFileResponse.WriteTextFileResponseResult; - -public class WriteTextFileResponse extends Response { - public static class WriteTextFileResponseResult { - // Empty result class as per schema - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/CreateTerminalResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/CreateTerminalResponse.java deleted file mode 100644 index 3296ff6c4d..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/CreateTerminalResponse.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.response.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.client.response.terminal.CreateTerminalResponse.CreateTerminalResponseResult; - -public class CreateTerminalResponse extends Response { - public static class CreateTerminalResponseResult { - private String terminalId; - - // Getters and setters - public String getTerminalId() { - return terminalId; - } - - public void setTerminalId(String terminalId) { - this.terminalId = terminalId; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/KillTerminalCommandResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/KillTerminalCommandResponse.java deleted file mode 100644 index 22950fbc70..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/KillTerminalCommandResponse.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.response.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.client.response.terminal.KillTerminalCommandResponse.KillTerminalCommandResponseResult; - -public class KillTerminalCommandResponse extends Response { - public static class KillTerminalCommandResponseResult { - // Empty result class as per schema - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/ReleaseTerminalResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/ReleaseTerminalResponse.java deleted file mode 100644 index 224af45662..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/ReleaseTerminalResponse.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.response.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.client.response.terminal.ReleaseTerminalResponse.ReleaseTerminalResponseResult; - -public class ReleaseTerminalResponse extends Response { - public static class ReleaseTerminalResponseResult { - // Empty result class as per schema - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/TerminalOutputResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/TerminalOutputResponse.java deleted file mode 100644 index 56ac4cfa30..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/TerminalOutputResponse.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.response.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.client.response.terminal.TerminalOutputResponse.TerminalOutputResponseResult; - -public class TerminalOutputResponse extends Response { - public static class TerminalOutputResponseResult { - private String output; - private Boolean truncated; - private TerminalExitStatus exitStatus; - - // Getters and setters - public String getOutput() { - return output; - } - - public void setOutput(String output) { - this.output = output; - } - - public Boolean getTruncated() { - return truncated; - } - - public void setTruncated(Boolean truncated) { - this.truncated = truncated; - } - - public TerminalExitStatus getExitStatus() { - return exitStatus; - } - - public void setExitStatus(TerminalExitStatus exitStatus) { - this.exitStatus = exitStatus; - } - - public static class TerminalExitStatus { - private Long exitCode; - private String signal; - - // Getters and setters - public Long getExitCode() { - return exitCode; - } - - public void setExitCode(Long exitCode) { - this.exitCode = exitCode; - } - - public String getSignal() { - return signal; - } - - public void setSignal(String signal) { - this.signal = signal; - } - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/WaitForTerminalExitResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/WaitForTerminalExitResponse.java deleted file mode 100644 index 4af7f514d6..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/client/response/terminal/WaitForTerminalExitResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.response.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; - -import static com.alibaba.acp.sdk.protocol.client.response.terminal.WaitForTerminalExitResponse.WaitForTerminalExitResponseResult; - -public class WaitForTerminalExitResponse extends Response { - public static class WaitForTerminalExitResponseResult { - private Long exitCode; - private String signal; - - // Getters and setters - public Long getExitCode() { - return exitCode; - } - - public void setExitCode(Long exitCode) { - this.exitCode = exitCode; - } - - public String getSignal() { - return signal; - } - - public void setSignal(String signal) { - this.signal = signal; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/agent/AgentCapabilities.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/agent/AgentCapabilities.java deleted file mode 100644 index 020b4f8226..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/agent/AgentCapabilities.java +++ /dev/null @@ -1,189 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.agent; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -/** - * Agent Capabilities Class - * - * Describes functional capabilities supported by the agent, such as loading sessions, prompt capabilities, MCP, etc. - */ -public class AgentCapabilities extends Meta { - private Boolean loadSession; - private PromptCapabilities promptCapabilities; - private McpCapabilities mcp; - private Meta sessionCapabilities; - - /** - * Checks if loading sessions is supported - * - * @return True if loading sessions is supported, false otherwise - */ - public Boolean getLoadSession() { - return loadSession; - } - - /** - * Sets loading session support - * - * @param loadSession Whether loading sessions is supported - */ - public void setLoadSession(Boolean loadSession) { - this.loadSession = loadSession; - } - - /** - * Gets the prompt capabilities - * - * @return Prompt capabilities object - */ - public PromptCapabilities getPromptCapabilities() { - return promptCapabilities; - } - - /** - * Sets the prompt capabilities - * - * @param promptCapabilities Prompt capabilities object - */ - public void setPromptCapabilities(PromptCapabilities promptCapabilities) { - this.promptCapabilities = promptCapabilities; - } - - /** - * Gets the MCP capabilities - * - * @return MCP capabilities object - */ - public McpCapabilities getMcp() { - return mcp; - } - - /** - * Gets the session capabilities - * - * @return Session capabilities object - */ - public Meta getSessionCapabilities() { - return sessionCapabilities; - } - - /** - * Sets the session capabilities - * - * @param sessionCapabilities Session capabilities object - */ - public void setSessionCapabilities(Meta sessionCapabilities) { - this.sessionCapabilities = sessionCapabilities; - } - - /** - * Prompt Capabilities Class - * - * Describes the agent's support capabilities for different types of prompt content, such as images, audio, and embedded context. - */ - public static class PromptCapabilities extends Meta { - private Boolean image; - private Boolean audio; - private Boolean embeddedContext; - - /** - * Checks if images are supported - * - * @return True if images are supported, false otherwise - */ - public Boolean getImage() { - return image; - } - - /** - * Sets image support - * - * @param image Whether images are supported - */ - public void setImage(Boolean image) { - this.image = image; - } - - /** - * Checks if audio is supported - * - * @return True if audio is supported, false otherwise - */ - public Boolean getAudio() { - return audio; - } - - /** - * Sets audio support - * - * @param audio Whether audio is supported - */ - public void setAudio(Boolean audio) { - this.audio = audio; - } - - /** - * Checks if embedded context is supported - * - * @return True if embedded context is supported, false otherwise - */ - public Boolean getEmbeddedContext() { - return embeddedContext; - } - - /** - * Sets embedded context support - * - * @param embeddedContext Whether embedded context is supported - */ - public void setEmbeddedContext(Boolean embeddedContext) { - this.embeddedContext = embeddedContext; - } - } - - /** - * MCP Capabilities Class - * - * Describes the agent's support capabilities for MCP (Model Context Protocol). - */ - public static class McpCapabilities extends Meta { - private Boolean sse; - private Boolean mcp; - - /** - * Checks if SSE is supported - * - * @return True if SSE is supported, false otherwise - */ - public Boolean getSse() { - return sse; - } - - /** - * Sets SSE support - * - * @param sse Whether SSE is supported - */ - public void setSse(Boolean sse) { - this.sse = sse; - } - - /** - * Checks if MCP is supported - * - * @return True if MCP is supported, false otherwise - */ - public Boolean getMcp() { - return mcp; - } - - /** - * Sets MCP support - * - * @param mcp Whether MCP is supported - */ - public void setMcp(Boolean mcp) { - this.mcp = mcp; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/agent/AgentInfo.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/agent/AgentInfo.java deleted file mode 100644 index 4fcb9a677c..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/agent/AgentInfo.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.agent; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -/** - * Agent Implementation Information Class - * - * Describes the agent's implementation information, such as name, title, and version. - */ -public class AgentInfo extends Meta { - private String name; - private String title; - private String version; - - /** - * Gets the implementation name - * - * @return Implementation name - */ - public String getName() { - return name; - } - - /** - * Sets the implementation name - * - * @param name Implementation name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the implementation title - * - * @return Implementation title - */ - public String getTitle() { - return title; - } - - /** - * Sets the implementation title - * - * @param title Implementation title - */ - public void setTitle(String title) { - this.title = title; - } - - /** - * Gets the implementation version - * - * @return Implementation version - */ - public String getVersion() { - return version; - } - - /** - * Sets the implementation version - * - * @param version Implementation version - */ - public void setVersion(String version) { - this.version = version; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/agent/AuthMethod.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/agent/AuthMethod.java deleted file mode 100644 index 0f73cde7ee..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/agent/AuthMethod.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.agent; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -/** - * Authentication Method Class - * - * Describes an available authentication method, including ID, name, and description. - */ -public class AuthMethod extends Meta { - private String id; - private String name; - private String description; - - /** - * Gets the authentication method ID - * - * @return Authentication method ID - */ - public String getId() { - return id; - } - - /** - * Sets the authentication method ID - * - * @param id Authentication method ID - */ - public void setId(String id) { - this.id = id; - } - - /** - * Gets the authentication method name - * - * @return Authentication method name - */ - public String getName() { - return name; - } - - /** - * Sets the authentication method name - * - * @param name Authentication method name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the authentication method description - * - * @return Authentication method description - */ - public String getDescription() { - return description; - } - - /** - * Sets the authentication method description - * - * @param description Authentication method description - */ - public void setDescription(String description) { - this.description = description; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/client/ClientCapabilities.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/client/ClientCapabilities.java deleted file mode 100644 index 0c7c7be93a..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/client/ClientCapabilities.java +++ /dev/null @@ -1,120 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.client; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -/** - * Client Capabilities Class - * - * Describes functional capabilities supported by the client, such as file system operations and terminal functionality. - */ -public class ClientCapabilities extends Meta { - private FileSystemCapability fs = new FileSystemCapability(); - private boolean terminal; - - /** - * Gets the file system capability - * - * @return File system capability object - */ - public FileSystemCapability getFs() { - return fs; - } - - /** - * Sets the file system capability - * - * @param fs File system capability object - * @return Current object instance, facilitating method chaining - */ - public ClientCapabilities setFs(FileSystemCapability fs) { - this.fs = fs; - return this; - } - - /** - * Checks if terminal functionality is supported - * - * @return True if terminal functionality is supported, false otherwise - */ - public boolean getTerminal() { - return terminal; - } - - /** - * Sets terminal functionality support - * - * @param terminal Whether terminal functionality is supported - * @return Current object instance, facilitating method chaining - */ - public ClientCapabilities setTerminal(Boolean terminal) { - this.terminal = terminal; - return this; - } - - /** - * File System Capability Class - * - * Describes the client's support capabilities for file system operations, such as reading and writing text files. - */ - public static class FileSystemCapability extends Meta { - private boolean readTextFile; - private boolean writeTextFile; - - /** - * Default constructor - */ - public FileSystemCapability() { - } - - /** - * Constructs a file system capability object with specified parameters - * - * @param readTextFile Whether reading text files is supported - * @param writeTextFile Whether writing text files is supported - */ - public FileSystemCapability(boolean readTextFile, boolean writeTextFile) { - this.readTextFile = readTextFile; - this.writeTextFile = writeTextFile; - } - - /** - * Checks if reading text files is supported - * - * @return True if reading text files is supported, false otherwise - */ - public boolean getReadTextFile() { - return readTextFile; - } - - /** - * Sets reading text files support - * - * @param readTextFile Whether reading text files is supported - * @return Current object instance, facilitating method chaining - */ - public FileSystemCapability setReadTextFile(boolean readTextFile) { - this.readTextFile = readTextFile; - return this; - } - - /** - * Checks if writing text files is supported - * - * @return True if writing text files is supported, false otherwise - */ - public boolean getWriteTextFile() { - return writeTextFile; - } - - /** - * Sets writing text files support - * - * @param writeTextFile Whether writing text files is supported - * @return Current object instance, facilitating method chaining - */ - public FileSystemCapability setWriteTextFile(boolean writeTextFile) { - this.writeTextFile = writeTextFile; - return this; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/client/ClientInfo.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/client/ClientInfo.java deleted file mode 100644 index b941f821e5..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/client/ClientInfo.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.client; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -/** - * Client Information Class - * - * Describes basic client information such as name, title, and version. - */ -public class ClientInfo extends Meta { - private String name; - private String title; - private String version; - - /** - * Gets the client name - * - * @return Client name - */ - public String getName() { - return name; - } - - /** - * Sets the client name - * - * @param name Client name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the client title - * - * @return Client title - */ - public String getTitle() { - return title; - } - - /** - * Sets the client title - * - * @param title Client title - */ - public void setTitle(String title) { - this.title = title; - } - - /** - * Gets the client version - * - * @return Client version - */ - public String getVersion() { - return version; - } - - /** - * Sets the client version - * - * @param version Client version - */ - public void setVersion(String version) { - this.version = version; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/Diff.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/Diff.java deleted file mode 100644 index 50afce5201..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/Diff.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class Diff extends Meta { - private String path; - private String newText; - private String oldText; - - // Getters and setters - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getNewText() { - return newText; - } - - public void setNewText(String newText) { - this.newText = newText; - } - - public String getOldText() { - return oldText; - } - - public void setOldText(String oldText) { - this.oldText = oldText; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/ToolCallContent.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/ToolCallContent.java deleted file mode 100644 index 8be92bfc68..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/ToolCallContent.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content; - -import com.alibaba.acp.sdk.protocol.domain.content.block.ContentBlock; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class ToolCallContent extends Meta { - private String type; - private ContentBlock content; - private Diff diff; - private String terminalId; - - // Getters and setters - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public ContentBlock getContent() { - return content; - } - - public void setContent(ContentBlock content) { - this.content = content; - } - - public Diff getDiff() { - return diff; - } - - public void setDiff(Diff diff) { - this.diff = diff; - } - - public String getTerminalId() { - return terminalId; - } - - public void setTerminalId(String terminalId) { - this.terminalId = terminalId; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/Annotations.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/Annotations.java deleted file mode 100644 index a96e755cc0..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/Annotations.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.block; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class Annotations extends Meta { - private List audience; - private Double priority; - private String lastModified; - - // Getters and setters - public List getAudience() { - return audience; - } - - public void setAudience(List audience) { - this.audience = audience; - } - - public Double getPriority() { - return priority; - } - - public void setPriority(Double priority) { - this.priority = priority; - } - - public String getLastModified() { - return lastModified; - } - - public void setLastModified(String lastModified) { - this.lastModified = lastModified; - } - - // Inner class for Role - public static class Role { - private String role; - - public Role(String role) { - this.role = role; - } - - public String getRole() { - return role; - } - - public void setRole(String role) { - this.role = role; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/AudioContent.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/AudioContent.java deleted file mode 100644 index 51cf1c798a..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/AudioContent.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.block; - -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeKey = "type", typeName = "audio") -public class AudioContent extends ContentBlock { - private String data; - private String mimeType; - private Annotations annotations; - - public AudioContent() { - super(); - this.type = "audio"; - } - - // Getters and setters - public String getData() { - return data; - } - - public void setData(String data) { - this.data = data; - } - - public String getMimeType() { - return mimeType; - } - - public void setMimeType(String mimeType) { - this.mimeType = mimeType; - } - - public Annotations getAnnotations() { - return annotations; - } - - public void setAnnotations(Annotations annotations) { - this.annotations = annotations; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/ContentBlock.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/ContentBlock.java deleted file mode 100644 index 24e1d79da6..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/ContentBlock.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.block; - -import com.alibaba.acp.sdk.protocol.domain.content.embedded.EmbeddedResource; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeKey = "type", typeName = "ContentBlock", seeAlso = {TextContent.class, ImageContent.class, AudioContent.class, ResourceLink.class, EmbeddedResource.class}) -public class ContentBlock extends Meta { - protected String type; - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/ImageContent.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/ImageContent.java deleted file mode 100644 index 0558c98b66..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/ImageContent.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.block; - -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeKey = "type", typeName = "image") -public class ImageContent extends ContentBlock { - private String data; - private String mimeType; - private String uri; - private Annotations annotations; - - public ImageContent() { - super(); - this.type = "image"; - } - - // Getters and setters - public String getData() { - return data; - } - - public void setData(String data) { - this.data = data; - } - - public String getMimeType() { - return mimeType; - } - - public void setMimeType(String mimeType) { - this.mimeType = mimeType; - } - - public String getUri() { - return uri; - } - - public void setUri(String uri) { - this.uri = uri; - } - - public Annotations getAnnotations() { - return annotations; - } - - public void setAnnotations(Annotations annotations) { - this.annotations = annotations; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/ResourceLink.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/ResourceLink.java deleted file mode 100644 index 48b2079293..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/ResourceLink.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.block; - -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeKey = "type", typeName = "resource_link") -public class ResourceLink extends ContentBlock { - private String name; - private String title; - private String uri; - private String description; - private String mimeType; - private Annotations annotations; - private Long size; - - public ResourceLink() { - super(); - this.type = "resource_link"; - } - - // Getters and setters - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getUri() { - return uri; - } - - public void setUri(String uri) { - this.uri = uri; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getMimeType() { - return mimeType; - } - - public void setMimeType(String mimeType) { - this.mimeType = mimeType; - } - - public Annotations getAnnotations() { - return annotations; - } - - public void setAnnotations(Annotations annotations) { - this.annotations = annotations; - } - - public Long getSize() { - return size; - } - - public void setSize(Long size) { - this.size = size; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/TextContent.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/TextContent.java deleted file mode 100644 index 508c75cb4c..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/block/TextContent.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.block; - -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeKey = "type", typeName = "text") -public class TextContent extends ContentBlock { - private String text; - private Annotations annotations; - - public TextContent() { - super(); - this.type = "text"; - } - - public TextContent(String text) { - this(); - this.text = text; - } - - // Getters and setters - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } - - public Annotations getAnnotations() { - return annotations; - } - - public void setAnnotations(Annotations annotations) { - this.annotations = annotations; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/BlobResourceContents.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/BlobResourceContents.java deleted file mode 100644 index 9c9499fe70..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/BlobResourceContents.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.embedded; - -public class BlobResourceContents extends ResourceContent { - private String blob; - - public String getBlob() { - return blob; - } - - public void setBlob(String blob) { - this.blob = blob; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/EmbeddedResource.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/EmbeddedResource.java deleted file mode 100644 index dadf54b601..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/EmbeddedResource.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.embedded; - -import com.alibaba.acp.sdk.protocol.domain.content.block.Annotations; -import com.alibaba.acp.sdk.protocol.domain.content.block.ContentBlock; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeKey = "type", typeName = "resource") -public class EmbeddedResource extends ContentBlock { - private ResourceContent resource; // This could be TextResourceContents or BlobResourceContents - private Annotations annotations; - - public EmbeddedResource() { - super(); - this.type = "resource"; - } - - public ResourceContent getResource() { - return resource; - } - - public void setResource(ResourceContent resource) { - this.resource = resource; - } - - public Annotations getAnnotations() { - return annotations; - } - - public void setAnnotations(Annotations annotations) { - this.annotations = annotations; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/ResourceContent.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/ResourceContent.java deleted file mode 100644 index 35792515be..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/ResourceContent.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.embedded; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(deserializer = ResourceContentDeserializer.class) -public class ResourceContent extends Meta { - protected String mimeType; - protected String uri; - - public String getMimeType() { - return mimeType; - } - - public void setMimeType(String mimeType) { - this.mimeType = mimeType; - } - - public String getUri() { - return uri; - } - - public void setUri(String uri) { - this.uri = uri; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/ResourceContentDeserializer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/ResourceContentDeserializer.java deleted file mode 100644 index 12a41df930..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/ResourceContentDeserializer.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.embedded; - -import com.alibaba.fastjson2.JSONObject; -import com.alibaba.fastjson2.JSONReader; -import com.alibaba.fastjson2.reader.ObjectReader; - -import java.lang.reflect.Type; - -public class ResourceContentDeserializer implements ObjectReader { - @Override - public ResourceContent readObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) { - if (jsonReader == null || jsonReader.nextIfNull()) { - return null; - } - JSONObject jsonObject = jsonReader.readJSONObject(); - if (jsonObject.containsKey("blob")) { - return jsonObject.to(BlobResourceContents.class); - } else if (jsonObject.containsKey("text")) { - return jsonObject.to(TextResourceContents.class); - } else { - return jsonObject.to(ResourceContent.class); - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/TextResourceContents.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/TextResourceContents.java deleted file mode 100644 index 9b6d720b5f..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/content/embedded/TextResourceContents.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.content.embedded; - -public class TextResourceContents extends ResourceContent { - private String text; - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/mcp/HttpHeader.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/mcp/HttpHeader.java deleted file mode 100644 index 6e96de1328..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/mcp/HttpHeader.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.mcp; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class HttpHeader extends Meta { - private String name; - private String value; - - // Getters and setters - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/mcp/McpServer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/mcp/McpServer.java deleted file mode 100644 index 1a014c4a9e..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/mcp/McpServer.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.mcp; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.domain.terminal.EnvVariable; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class McpServer extends Meta { - private String type; - private String name; - private String command; - private List args; - private List env; - - // Stdio-specific fields - private List headers; - private String url; - - // Getters and setters - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getCommand() { - return command; - } - - public void setCommand(String command) { - this.command = command; - } - - public List getArgs() { - return args; - } - - public void setArgs(List args) { - this.args = args; - } - - public List getEnv() { - return env; - } - - public void setEnv(List env) { - this.env = env; - } - - public List getHeaders() { - return headers; - } - - public void setHeaders(List headers) { - this.headers = headers; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/PermissionOption.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/PermissionOption.java deleted file mode 100644 index f1f7e66ca8..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/PermissionOption.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.permission; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class PermissionOption extends Meta { - private String optionId; - private String name; - private PermissionOptionKind kind; - - // Getters and setters - public String getOptionId() { - return optionId; - } - - public void setOptionId(String optionId) { - this.optionId = optionId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public PermissionOptionKind getKind() { - return kind; - } - - public void setKind(PermissionOptionKind kind) { - this.kind = kind; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/PermissionOptionKind.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/PermissionOptionKind.java deleted file mode 100644 index 5fe02707b8..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/PermissionOptionKind.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.permission; - -import com.alibaba.fastjson2.annotation.JSONField; - -public enum PermissionOptionKind { - @JSONField(name = "allow_once", label = "Allow this operation only this time.") - ALLOW_ONCE, - - @JSONField(name = "allow_always", label = "Allow this operation and remember the choice.") - ALLOW_ALWAYS, - - @JSONField(name = "reject_once", label = "Reject this operation only this time.") - REJECT_ONCE, - - @JSONField(name = "reject_always", label = "Reject this operation and remember the choice.") - REJECT_ALWAYS; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/PermissionOutcomeKind.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/PermissionOutcomeKind.java deleted file mode 100644 index 03177612cd..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/PermissionOutcomeKind.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.permission; - -import com.alibaba.fastjson2.annotation.JSONField; - -public enum PermissionOutcomeKind { - @JSONField(name = "selected", label = "The user selected an option.") - SELECTED, - @JSONField(name = "cancelled", label = "The user cancelled the prompt.") - CANCELLED -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/RequestPermissionOutcome.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/RequestPermissionOutcome.java deleted file mode 100644 index f83d23e65c..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/permission/RequestPermissionOutcome.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.permission; - -// Inner class for RequestPermissionOutcome -public class RequestPermissionOutcome { - private PermissionOutcomeKind outcome; - private String optionId; - - public RequestPermissionOutcome() { - } - - public RequestPermissionOutcome(PermissionOutcomeKind outcome, String optionId) { - this.outcome = outcome; - this.optionId = optionId; - } - - // Getters and setters - public PermissionOutcomeKind getOutcome() { - return outcome; - } - - public RequestPermissionOutcome setOutcome(PermissionOutcomeKind outcome) { - this.outcome = outcome; - return this; - } - - public String getOptionId() { - return optionId; - } - - public RequestPermissionOutcome setOptionId(String optionId) { - this.optionId = optionId; - return this; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/Plan.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/Plan.java deleted file mode 100644 index 086b04d422..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/Plan.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.plan; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class Plan extends Meta { - private List entries; - - // Getters and setters - public List getEntries() { - return entries; - } - - public void setEntries(List entries) { - this.entries = entries; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/PlanEntry.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/PlanEntry.java deleted file mode 100644 index 2d87e28194..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/PlanEntry.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.plan; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class PlanEntry extends Meta { - private String content; - private PlanEntryPriority priority; - private PlanEntryStatus status; - - // Getters and setters - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public PlanEntryPriority getPriority() { - return priority; - } - - public void setPriority(PlanEntryPriority priority) { - this.priority = priority; - } - - public PlanEntryStatus getStatus() { - return status; - } - - public void setStatus(PlanEntryStatus status) { - this.status = status; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/PlanEntryPriority.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/PlanEntryPriority.java deleted file mode 100644 index 28ad72feb1..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/PlanEntryPriority.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.plan; - -import com.alibaba.fastjson2.annotation.JSONField; - -public enum PlanEntryPriority { - @JSONField(name = "high", label = "High priority task - critical to the overall goal.") - HIGH, - - @JSONField(name = "medium", label = "Medium priority task - important but not critical.") - MEDIUM, - - @JSONField(name = "low", label = "Low priority task - nice to have but not essential.") - LOW; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/PlanEntryStatus.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/PlanEntryStatus.java deleted file mode 100644 index 8fb88b9c18..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/plan/PlanEntryStatus.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.plan; - -import com.alibaba.fastjson2.annotation.JSONField; - -public enum PlanEntryStatus { - @JSONField(name = "pending", label = "The task has not started yet.") - PENDING, - - @JSONField(name = "in_progress", label = "The task is currently being worked on.") - IN_PROGRESS, - - @JSONField(name = "completed", label = "The task has been successfully completed.") - COMPLETED; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/SessionMode.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/SessionMode.java deleted file mode 100644 index eaa9a18cf2..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/SessionMode.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class SessionMode extends Meta { - private String id; - private String name; - private String description; - - // Getters and setters - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/SessionModeState.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/SessionModeState.java deleted file mode 100644 index 0079756515..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/SessionModeState.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class SessionModeState extends Meta { - private String currentModeId; - private List availableModes; - - // Getters and setters - public String getCurrentModeId() { - return currentModeId; - } - - public void setCurrentModeId(String currentModeId) { - this.currentModeId = currentModeId; - } - - public List getAvailableModes() { - return availableModes; - } - - public void setAvailableModes(List availableModes) { - this.availableModes = availableModes; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/StopReason.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/StopReason.java deleted file mode 100644 index ad2f4d23aa..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/StopReason.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session; - -import com.alibaba.fastjson2.annotation.JSONField; - -public enum StopReason { - @JSONField(name = "end_turn", label = "The turn ended successfully.") - END_TURN, - - @JSONField(name = "max_tokens", label = "The turn ended because the agent reached the maximum number of tokens.") - MAX_TOKENS, - - @JSONField(name = "max_turn_requests", label = "The turn ended because the agent reached the maximum number of allowed\nagent requests between user turns.") - MAX_TURN_REQUESTS, - - @JSONField(name = "refusal", label = "The turn ended because the agent refused to continue. The user prompt\nand everything that comes after it won't be included in the next\nprompt, so this should be reflected in the UI.") - REFUSAL, - - @JSONField(name = "cancelled", label = "The turn was cancelled by the client via `session/cancel`.\n\nThis stop reason MUST be returned when the client sends a `session/cancel`\nnotification, even if the cancellation causes exceptions in underlying operations.\nAgents should catch these exceptions and return this semantically meaningful\nresponse to confirm successful cancellation.") - CANCELLED; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/AgentMessageChunkSessionUpdate.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/AgentMessageChunkSessionUpdate.java deleted file mode 100644 index 1a53c3f84e..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/AgentMessageChunkSessionUpdate.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session.update; - -import com.alibaba.acp.sdk.protocol.domain.content.block.ContentBlock; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeName = "agent_message_chunk") -public class AgentMessageChunkSessionUpdate extends SessionUpdate { - private ContentBlock content; - - public AgentMessageChunkSessionUpdate() { - this.setSessionUpdate("agent_message_chunk"); - } - - public ContentBlock getContent() { - return content; - } - - public void setContent(ContentBlock content) { - this.content = content; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/AvailableCommand.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/AvailableCommand.java deleted file mode 100644 index d2af7af848..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/AvailableCommand.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session.update; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class AvailableCommand extends Meta { - private String name; - private String description; - private UnstructuredCommandInput input; - - // Getters and setters - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public UnstructuredCommandInput getInput() { - return input; - } - - public void setInput(UnstructuredCommandInput input) { - this.input = input; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/AvailableCommandsUpdateSessionUpdate.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/AvailableCommandsUpdateSessionUpdate.java deleted file mode 100644 index dba3d12b27..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/AvailableCommandsUpdateSessionUpdate.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session.update; - -import java.util.List; - -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeName = "available_commands_update") -public class AvailableCommandsUpdateSessionUpdate extends SessionUpdate { - private List availableCommands; - - public AvailableCommandsUpdateSessionUpdate() { - this.setSessionUpdate("available_commands_update"); - } - - public List getAvailableCommands() { - return availableCommands; - } - - public void setAvailableCommands(List availableCommands) { - this.availableCommands = availableCommands; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/CurrentModeUpdateSessionUpdate.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/CurrentModeUpdateSessionUpdate.java deleted file mode 100644 index 2f42727ddd..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/CurrentModeUpdateSessionUpdate.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session.update; - -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeName = "current_mode_update") -public class CurrentModeUpdateSessionUpdate extends SessionUpdate { - private String currentModeId; - - public CurrentModeUpdateSessionUpdate() { - this.setSessionUpdate("current_mode_update"); - } - - public String getCurrentModeId() { - return currentModeId; - } - - public void setCurrentModeId(String currentModeId) { - this.currentModeId = currentModeId; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/PlanSessionUpdate.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/PlanSessionUpdate.java deleted file mode 100644 index b9ed3c3052..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/PlanSessionUpdate.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session.update; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.domain.plan.PlanEntry; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeName = "plan") -public class PlanSessionUpdate extends SessionUpdate { - private List entries; - - public PlanSessionUpdate() { - this.setSessionUpdate("plan"); - } - - public List getEntries() { - return entries; - } - - public void setEntries(List entries) { - this.entries = entries; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/SessionUpdate.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/SessionUpdate.java deleted file mode 100644 index d9aa7bb14c..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/SessionUpdate.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session.update; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeKey = "sessionUpdate", typeName = "session_update", - seeAlso = {AgentMessageChunkSessionUpdate.class, - AvailableCommandsUpdateSessionUpdate.class, - CurrentModeUpdateSessionUpdate.class, - PlanSessionUpdate.class, - ToolCallSessionUpdate.class, - ToolCallUpdateSessionUpdate.class}) -public class SessionUpdate extends Meta { - String sessionUpdate; - - public String getSessionUpdate() { - return sessionUpdate; - } - - public void setSessionUpdate(String sessionUpdate) { - this.sessionUpdate = sessionUpdate; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/ToolCallSessionUpdate.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/ToolCallSessionUpdate.java deleted file mode 100644 index 777f0cb65e..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/ToolCallSessionUpdate.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session.update; - -import com.alibaba.acp.sdk.protocol.domain.tool.ToolCallUpdate; -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeName = "tool_call") -public class ToolCallSessionUpdate extends SessionUpdate { - @JSONField(unwrapped = true) - ToolCallUpdate toolCallUpdate; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/ToolCallUpdateSessionUpdate.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/ToolCallUpdateSessionUpdate.java deleted file mode 100644 index 84bee2165f..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/ToolCallUpdateSessionUpdate.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session.update; - -import com.alibaba.acp.sdk.protocol.domain.tool.ToolCallUpdate; -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; - -@JSONType(typeName = "tool_call_update") -public class ToolCallUpdateSessionUpdate extends SessionUpdate { - @JSONField(unwrapped = true) - ToolCallUpdate toolCallUpdate; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/UnstructuredCommandInput.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/UnstructuredCommandInput.java deleted file mode 100644 index 4a896cf537..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/session/update/UnstructuredCommandInput.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.session.update; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class UnstructuredCommandInput extends Meta { - private String hint; - - // Getters and setters - public String getHint() { - return hint; - } - - public void setHint(String hint) { - this.hint = hint; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/terminal/EnvVariable.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/terminal/EnvVariable.java deleted file mode 100644 index 8f85516a55..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/terminal/EnvVariable.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.terminal; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class EnvVariable extends Meta { - private String name; - private String value; - - // Getters and setters - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolCallLocation.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolCallLocation.java deleted file mode 100644 index 5b0f72812d..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolCallLocation.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.tool; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class ToolCallLocation extends Meta { - private String path; - private Integer line; - - // Getters and setters - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public Integer getLine() { - return line; - } - - public void setLine(Integer line) { - this.line = line; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolCallStatus.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolCallStatus.java deleted file mode 100644 index eb03510276..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolCallStatus.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.tool; - -import com.alibaba.fastjson2.annotation.JSONField; - -public enum ToolCallStatus { - @JSONField(name = "pending", label = "The tool call hasn't started running yet because the input is either\nstreaming or we're awaiting approval.") - PENDING, - - @JSONField(name = "in_progress", label = "The tool call is currently running.") - IN_PROGRESS, - - @JSONField(name = "completed", label = "The tool call completed successfully.") - COMPLETED, - - @JSONField(name = "failed", label = "The tool call failed with an error.") - FAILED; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolCallUpdate.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolCallUpdate.java deleted file mode 100644 index 4bcecde68a..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolCallUpdate.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.tool; - -import java.util.List; - -import com.alibaba.acp.sdk.protocol.domain.content.ToolCallContent; -import com.alibaba.acp.sdk.protocol.jsonrpc.Meta; - -public class ToolCallUpdate extends Meta { - private String toolCallId; - private String title; - private ToolKind kind; - private ToolCallStatus status; - private Object rawInput; - private Object rawOutput; - private List locations; - private List content; - - // Getters and setters - public String getToolCallId() { - return toolCallId; - } - - public void setToolCallId(String toolCallId) { - this.toolCallId = toolCallId; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public ToolKind getKind() { - return kind; - } - - public void setKind(ToolKind kind) { - this.kind = kind; - } - - public ToolCallStatus getStatus() { - return status; - } - - public void setStatus(ToolCallStatus status) { - this.status = status; - } - - public Object getRawInput() { - return rawInput; - } - - public void setRawInput(Object rawInput) { - this.rawInput = rawInput; - } - - public Object getRawOutput() { - return rawOutput; - } - - public void setRawOutput(Object rawOutput) { - this.rawOutput = rawOutput; - } - - public List getLocations() { - return locations; - } - - public void setLocations(List locations) { - this.locations = locations; - } - - public List getContent() { - return content; - } - - public void setContent(List content) { - this.content = content; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolKind.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolKind.java deleted file mode 100644 index 25cfb048ed..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/domain/tool/ToolKind.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.alibaba.acp.sdk.protocol.domain.tool; - -import com.alibaba.fastjson2.annotation.JSONField; - -public enum ToolKind { - @JSONField(name = "read", label = "Reading files or data.") - READ, - - @JSONField(name = "edit", label = "Modifying files or content.") - EDIT, - - @JSONField(name = "delete", label = "Removing files or data.") - DELETE, - - @JSONField(name = "move", label = "Moving or renaming files.") - MOVE, - - @JSONField(name = "search", label = "Searching for information.") - SEARCH, - - @JSONField(name = "execute", label = "Running commands or code.") - EXECUTE, - - @JSONField(name = "think", label = "Internal reasoning or planning.") - THINK, - - @JSONField(name = "fetch", label = "Retrieving external data.") - FETCH, - - @JSONField(name = "switch_mode", label = "Switching the current session mode.") - SWITCH_MODE, - - @JSONField(name = "other", label = "Other tool types (default).") - OTHER; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Error.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Error.java deleted file mode 100644 index a1a40c5cd7..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Error.java +++ /dev/null @@ -1,181 +0,0 @@ -package com.alibaba.acp.sdk.protocol.jsonrpc; - -import com.alibaba.fastjson2.annotation.JSONField; - -/** - * Represents an error in the JSON-RPC protocol. - * - * This class encapsulates error information including code, message, and optional data - * that can be returned to clients when errors occur during RPC processing. - * - * @author SkyFire - * @version 0.0.1 - */ -public class Error { - private int code; - private String message; - private Object data; - - /** - * Constructs a new Error with the specified code, message, and data. - * - * @param code The error code - * @param message The error message - * @param data Additional error data - */ - public Error(int code, String message, Object data) { - this.code = code; - this.message = message; - this.data = data; - } - - /** - * Constructs a new Error with default values. - */ - public Error() { - } - - /** - * Gets the error code. - * - * @return The error code - */ - public int getCode() { - return code; - } - - /** - * Sets the error code. - * - * @param code The error code - * @return This error instance for method chaining - */ - public Error setCode(int code) { - this.code = code; - return this; - } - - /** - * Gets the error message. - * - * @return The error message - */ - public String getMessage() { - return message; - } - - /** - * Sets the error message. - * - * @param message The error message - * @return This error instance for method chaining - */ - public Error setMessage(String message) { - this.message = message; - return this; - } - - /** - * Gets the error data. - * - * @return The error data - */ - public Object getData() { - return data; - } - - /** - * Sets the error data. - * - * @param data The error data - * @return This error instance for method chaining - */ - public Error setData(Object data) { - this.data = data; - return this; - } - - /** - * Enum representing standard error codes in the JSON-RPC protocol. - * - * These codes follow the JSON-RPC 2.0 specification with additional custom codes - * for ACP-specific error conditions. - */ - public enum ErrorCode { - /** - * Parse error: Invalid JSON was received by the server. - * An error occurred on the server while parsing the JSON text. - */ - PARSE_ERROR(-32700, "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text."), - - /** - * Invalid request: The JSON sent is not a valid Request object. - */ - INVALID_REQUEST(-32600, "**Invalid request**: The JSON sent is not a valid Request object."), - - /** - * Method not found: The method does not exist or is not available. - */ - METHOD_NOT_FOUND(-32601, "**Method not found**: The method does not exist or is not available."), - - /** - * Invalid params: Invalid method parameter(s). - */ - INVALID_PARAMS(-32602, "**Invalid params**: Invalid method parameter(s)."), - - /** - * Internal error: Internal JSON-RPC error. - * Reserved for implementation-defined server errors. - */ - INTERNAL_ERROR(-32603, "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors."), - - /** - * Authentication required: Authentication is required before this operation can be performed. - */ - AUTHENTICATION_REQUIRED(-32000, "**Authentication required**: Authentication is required before this operation can be performed."), - - /** - * Resource not found: A given resource, such as a file, was not found. - */ - RESOURCE_NOT_FOUND(-32002, "**Resource not found**: A given resource, such as a file, was not found."), - - /** - * Other undefined error code. - */ - OTHER_UNDEFINED_ERROR(-32004, "Other undefined error code."); - - private final int code; - private final String description; - - /** - * Constructs a new ErrorCode with the specified code and description. - * - * @param code The error code - * @param description The error description - */ - ErrorCode(int code, String description) { - this.code = code; - this.description = description; - } - - /** - * Gets the error code. - * - * @return The error code - */ - @JSONField - public int getCode() { - return code; - } - - /** - * Gets the error description. - * - * @return The error description - */ - @JSONField(deserialize = false) - public String getDescription() { - return description; - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/ExtNotification.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/ExtNotification.java deleted file mode 100644 index fb029f8baf..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/ExtNotification.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.alibaba.acp.sdk.protocol.jsonrpc; - -public class ExtNotification extends MethodMessage { -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/ExtRequest.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/ExtRequest.java deleted file mode 100644 index 32a3d915ae..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/ExtRequest.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.alibaba.acp.sdk.protocol.jsonrpc; - -public class ExtRequest extends Request { -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/ExtResponse.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/ExtResponse.java deleted file mode 100644 index 30174bc988..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/ExtResponse.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.alibaba.acp.sdk.protocol.jsonrpc; - -public class ExtResponse extends Response { - // This is a generic extension response that can hold any result -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Message.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Message.java deleted file mode 100644 index 1fc2cce8a7..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Message.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.alibaba.acp.sdk.protocol.jsonrpc; - -public class Message extends Meta { - String jsonrpc = "2.0"; - Object id; - - public String getJsonrpc() { - return jsonrpc; - } - - public void setJsonrpc(String jsonrpc) { - this.jsonrpc = jsonrpc; - } - - public Object getId() { - return id; - } - - public void setId(Object id) { - this.id = id; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Meta.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Meta.java deleted file mode 100644 index ed77d73321..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Meta.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.alibaba.acp.sdk.protocol.jsonrpc; - -import java.util.Map; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.JSONWriter.Feature; -import com.alibaba.fastjson2.annotation.JSONField; - -/** - * Base class for objects that contain metadata. - * - * This class provides a generic way to store metadata in the form of key-value pairs - * that can be included in JSON-RPC messages for additional context or information. - * - * @author SkyFire - * @version 0.0.1 - */ -public class Meta { - @JSONField(name = "_meta") - Map meta; - - /** - * Gets the metadata map. - * - * @return The metadata map containing key-value pairs - */ - public Map getMeta() { - return meta; - } - - /** - * Sets the metadata map. - * - * @param meta The metadata map containing key-value pairs - */ - public void setMeta(Map meta) { - this.meta = meta; - } - - /** - * Converts this object to its JSON string representation. - * - * @return JSON string representation of this object - */ - public String toString() { - return JSON.toJSONString(this, Feature.FieldBased); - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/MethodMessage.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/MethodMessage.java deleted file mode 100644 index 62b1c1666c..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/MethodMessage.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.alibaba.acp.sdk.protocol.jsonrpc; - -import java.util.UUID; - -import com.alibaba.acp.sdk.protocol.agent.notification.SessionNotification; -import com.alibaba.acp.sdk.protocol.agent.request.AuthenticateRequest; -import com.alibaba.acp.sdk.protocol.agent.request.ReadTextFileRequest; -import com.alibaba.acp.sdk.protocol.agent.request.RequestPermissionRequest; -import com.alibaba.acp.sdk.protocol.agent.request.WriteTextFileRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.CreateTerminalRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.KillTerminalCommandRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.ReleaseTerminalRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.TerminalOutputRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.WaitForTerminalExitRequest; -import com.alibaba.acp.sdk.protocol.client.request.InitializeRequest; -import com.alibaba.acp.sdk.protocol.client.request.LoadSessionRequest; -import com.alibaba.acp.sdk.protocol.client.request.NewSessionRequest; -import com.alibaba.acp.sdk.protocol.client.request.PromptRequest; -import com.alibaba.acp.sdk.protocol.client.request.SetSessionModeRequest; -import com.alibaba.fastjson2.annotation.JSONType; - -import org.apache.commons.lang3.Validate; - -@JSONType(typeKey = "method", seeAlso = { - AuthenticateRequest.class, - ReadTextFileRequest.class, - RequestPermissionRequest.class, - WriteTextFileRequest.class, - CreateTerminalRequest.class, - KillTerminalCommandRequest.class, - ReleaseTerminalRequest.class, - TerminalOutputRequest.class, - WaitForTerminalExitRequest.class, - InitializeRequest.class, - LoadSessionRequest.class, - NewSessionRequest.class, - PromptRequest.class, - SetSessionModeRequest.class, - SessionNotification.class, -}) -public class MethodMessage

extends Message { - protected String method; - protected P params; - - public String getMethod() { - return method; - } - - public void setMethod(String method) { - this.method = method; - } - - public P getParams() { - return params; - } - - public void setParams(P params) { - this.params = params; - } - - public MethodMessage() { - this.id = UUID.randomUUID().toString(); - } - - public MethodMessage(String method, P params) { - this(); - Validate.notEmpty(method, "method can not be empty"); - this.method = method; - Validate.notNull(params, "params can not be null"); - this.params = params; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Request.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Request.java deleted file mode 100644 index 4a70d7a29c..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Request.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.alibaba.acp.sdk.protocol.jsonrpc; - -public class Request

extends MethodMessage

{ - public Request() { - } - - public Request(String method, P params) { - super(method, params); - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Response.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Response.java deleted file mode 100644 index 8dc2829872..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/jsonrpc/Response.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.alibaba.acp.sdk.protocol.jsonrpc; - -public class Response extends Message { - R result; - Error error; - - public Response() { - } - - public Response(Object id, R result) { - this.id = id; - this.result = result; - } - - public Response(Object id, Error error) { - this.id = id; - this.error = error; - } - - public R getResult() { - return result; - } - - public void setResult(R result) { - this.result = result; - } - - public Error getError() { - return error; - } - - public void setError(Error error) { - this.error = error; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/schema.json b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/schema.json deleted file mode 100644 index eba1794570..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/protocol/schema.json +++ /dev/null @@ -1,3105 +0,0 @@ -{ - "$defs": { - "AgentCapabilities": { - "description": "Capabilities supported by the agent.\n\nAdvertised during initialization to inform the client about\navailable features and content types.\n\nSee protocol docs: [Agent Capabilities](https://agentclientprotocol.com/protocol/initialization#agent-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "loadSession": { - "default": false, - "description": "Whether the agent supports `session/load`.", - "type": "boolean" - }, - "mcpCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/McpCapabilities" - } - ], - "default": { - "http": false, - "sse": false - }, - "description": "MCP capabilities supported by the agent." - }, - "promptCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/PromptCapabilities" - } - ], - "default": { - "audio": false, - "embeddedContext": false, - "image": false - }, - "description": "Prompt capabilities supported by the agent." - }, - "sessionCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/SessionCapabilities" - } - ], - "default": {} - } - }, - "type": "object" - }, - "AgentNotification": { - "properties": { - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/SessionNotification" - } - ], - "description": "Handles session update notifications from the agent.\n\nThis is a notification endpoint (no response expected) that receives\nreal-time updates about session progress, including message chunks,\ntool calls, and execution plans.\n\nNote: Clients SHOULD continue accepting tool call updates even after\nsending a `session/cancel` notification, as the agent may send final\nupdates before responding with the cancelled stop reason.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "title": "SessionNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtNotification" - } - ], - "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" - } - ], - "description": "All possible notifications that an agent can send to a client.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly - use the notification methods on the [`Client`] trait instead.\n\nNotifications do not expect a response." - }, - { - "type": "null" - } - ] - } - }, - "required": ["method"], - "type": "object", - "x-docs-ignore": true - }, - "AgentRequest": { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/WriteTextFileRequest" - } - ], - "description": "Writes content to a text file in the client's file system.\n\nOnly available if the client advertises the `fs.writeTextFile` capability.\nAllows the agent to create or modify files within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "WriteTextFileRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReadTextFileRequest" - } - ], - "description": "Reads content from a text file in the client's file system.\n\nOnly available if the client advertises the `fs.readTextFile` capability.\nAllows the agent to access file contents within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "ReadTextFileRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/RequestPermissionRequest" - } - ], - "description": "Requests permission from the user for a tool call operation.\n\nCalled by the agent when it needs user authorization before executing\na potentially sensitive operation. The client should present the options\nto the user and return their decision.\n\nIf the client cancels the prompt turn via `session/cancel`, it MUST\nrespond to this request with `RequestPermissionOutcome::Cancelled`.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", - "title": "RequestPermissionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CreateTerminalRequest" - } - ], - "description": "Executes a command in a new terminal\n\nOnly available if the `terminal` Client capability is set to `true`.\n\nReturns a `TerminalId` that can be used with other terminal methods\nto get the current output, wait for exit, and kill the command.\n\nThe `TerminalId` can also be used to embed the terminal in a tool call\nby using the `ToolCallContent::Terminal` variant.\n\nThe Agent is responsible for releasing the terminal by using the `terminal/release`\nmethod.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "CreateTerminalRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/TerminalOutputRequest" - } - ], - "description": "Gets the terminal output and exit status\n\nReturns the current content in the terminal without waiting for the command to exit.\nIf the command has already exited, the exit status is included.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "TerminalOutputRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReleaseTerminalRequest" - } - ], - "description": "Releases a terminal\n\nThe command is killed if it hasn't exited yet. Use `terminal/wait_for_exit`\nto wait for the command to exit before releasing the terminal.\n\nAfter release, the `TerminalId` can no longer be used with other `terminal/*` methods,\nbut tool calls that already contain it, continue to display its output.\n\nThe `terminal/kill` method can be used to terminate the command without releasing\nthe terminal, allowing the Agent to call `terminal/output` and other methods.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "ReleaseTerminalRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/WaitForTerminalExitRequest" - } - ], - "description": "Waits for the terminal command to exit and return its exit status\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "WaitForTerminalExitRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/KillTerminalCommandRequest" - } - ], - "description": "Kills the terminal command without releasing the terminal\n\nWhile `terminal/release` will also kill the command, this method will keep\nthe `TerminalId` valid so it can be used with other methods.\n\nThis method can be helpful when implementing command timeouts which terminate\nthe command as soon as elapsed, and then get the final output so it can be sent\nto the model.\n\nNote: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "KillTerminalCommandRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtRequest" - } - ], - "description": "Handles extension method requests from the agent.\n\nAllows the Agent to send an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" - } - ], - "description": "All possible requests that an agent can send to a client.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly - instead, use the methods on the [`Client`] trait.\n\nThis enum encompasses all method calls from agent to client." - }, - { - "type": "null" - } - ] - } - }, - "required": ["id", "method"], - "type": "object", - "x-docs-ignore": true - }, - "AgentResponse": { - "anyOf": [ - { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "result": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/InitializeResponse" - } - ], - "title": "InitializeResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AuthenticateResponse" - } - ], - "title": "AuthenticateResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/NewSessionResponse" - } - ], - "title": "NewSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/LoadSessionResponse" - } - ], - "title": "LoadSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionModeResponse" - } - ], - "title": "SetSessionModeResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/PromptResponse" - } - ], - "title": "PromptResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtResponse" - } - ], - "title": "ExtMethodResponse" - } - ], - "description": "All possible responses that an agent can send to a client.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `ClientRequest` variants." - } - }, - "required": ["id", "result"], - "title": "Result", - "type": "object" - }, - { - "properties": { - "error": { - "$ref": "#/$defs/Error" - }, - "id": { - "$ref": "#/$defs/RequestId" - } - }, - "required": ["id", "error"], - "title": "Error", - "type": "object" - } - ], - "x-docs-ignore": true - }, - "Annotations": { - "description": "Optional annotations for the client. The client can use annotations to inform how objects are used or displayed", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "audience": { - "items": { - "$ref": "#/$defs/Role" - }, - "type": ["array", "null"] - }, - "lastModified": { - "type": ["string", "null"] - }, - "priority": { - "format": "double", - "type": ["number", "null"] - } - }, - "type": "object" - }, - "AudioContent": { - "description": "Audio provided to or from an LLM.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "data": { - "type": "string" - }, - "mimeType": { - "type": "string" - } - }, - "required": ["data", "mimeType"], - "type": "object" - }, - "AuthMethod": { - "description": "Describes an available authentication method.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "description": { - "description": "Optional description providing more details about this authentication method.", - "type": ["string", "null"] - }, - "id": { - "description": "Unique identifier for this authentication method.", - "type": "string" - }, - "name": { - "description": "Human-readable name of the authentication method.", - "type": "string" - } - }, - "required": ["id", "name"], - "type": "object" - }, - "AuthenticateRequest": { - "description": "Request parameters for the authenticate method.\n\nSpecifies which authentication method to use.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "methodId": { - "description": "The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response.", - "type": "string" - } - }, - "required": ["methodId"], - "type": "object", - "x-method": "authenticate", - "x-side": "agent" - }, - "AuthenticateResponse": { - "description": "Response to the `authenticate` method.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "authenticate", - "x-side": "agent" - }, - "AvailableCommand": { - "description": "Information about a command.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "description": { - "description": "Human-readable description of what the command does.", - "type": "string" - }, - "input": { - "anyOf": [ - { - "$ref": "#/$defs/AvailableCommandInput" - }, - { - "type": "null" - } - ], - "description": "Input for the command if required" - }, - "name": { - "description": "Command name (e.g., `create_plan`, `research_codebase`).", - "type": "string" - } - }, - "required": ["name", "description"], - "type": "object" - }, - "AvailableCommandInput": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/UnstructuredCommandInput" - } - ], - "description": "All text that was typed after the command name is provided as input.", - "title": "unstructured" - } - ], - "description": "The input specification for a command." - }, - "AvailableCommandsUpdate": { - "description": "Available commands are ready or have changed", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "availableCommands": { - "description": "Commands the agent can execute", - "items": { - "$ref": "#/$defs/AvailableCommand" - }, - "type": "array" - } - }, - "required": ["availableCommands"], - "type": "object" - }, - "BlobResourceContents": { - "description": "Binary resource contents.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "blob": { - "type": "string" - }, - "mimeType": { - "type": ["string", "null"] - }, - "uri": { - "type": "string" - } - }, - "required": ["blob", "uri"], - "type": "object" - }, - "CancelNotification": { - "description": "Notification to cancel ongoing operations for a session.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session to cancel operations for." - } - }, - "required": ["sessionId"], - "type": "object", - "x-method": "session/cancel", - "x-side": "agent" - }, - "ClientCapabilities": { - "description": "Capabilities supported by the client.\n\nAdvertised during initialization to inform the agent about\navailable features and methods.\n\nSee protocol docs: [Client Capabilities](https://agentclientprotocol.com/protocol/initialization#client-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "fs": { - "allOf": [ - { - "$ref": "#/$defs/FileSystemCapability" - } - ], - "default": { - "readTextFile": false, - "writeTextFile": false - }, - "description": "File system capabilities supported by the client.\nDetermines which file operations the agent can request." - }, - "terminal": { - "default": false, - "description": "Whether the Client support all `terminal/*` methods.", - "type": "boolean" - } - }, - "type": "object" - }, - "ClientNotification": { - "properties": { - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/CancelNotification" - } - ], - "description": "Cancels ongoing operations for a session.\n\nThis is a notification sent by the client to cancel an ongoing prompt turn.\n\nUpon receiving this notification, the Agent SHOULD:\n- Stop all language model requests as soon as possible\n- Abort all tool call invocations in progress\n- Send any pending `session/update` notifications\n- Respond to the original `session/prompt` request with `StopReason::Cancelled`\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "title": "CancelNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtNotification" - } - ], - "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" - } - ], - "description": "All possible notifications that a client can send to an agent.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly - use the notification methods on the [`Agent`] trait instead.\n\nNotifications do not expect a response." - }, - { - "type": "null" - } - ] - } - }, - "required": ["method"], - "type": "object", - "x-docs-ignore": true - }, - "ClientRequest": { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/InitializeRequest" - } - ], - "description": "Establishes the connection with a client and negotiates protocol capabilities.\n\nThis method is called once at the beginning of the connection to:\n- Negotiate the protocol version to use\n- Exchange capability information between client and agent\n- Determine available authentication methods\n\nThe agent should respond with its supported protocol version and capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "InitializeRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AuthenticateRequest" - } - ], - "description": "Authenticates the client using the specified authentication method.\n\nCalled when the agent requires authentication before allowing session creation.\nThe client provides the authentication method ID that was advertised during initialization.\n\nAfter successful authentication, the client can proceed to create sessions with\n`new_session` without receiving an `auth_required` error.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "AuthenticateRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/NewSessionRequest" - } - ], - "description": "Creates a new conversation session with the agent.\n\nSessions represent independent conversation contexts with their own history and state.\n\nThe agent should:\n- Create a new session context\n- Connect to any specified MCP servers\n- Return a unique session ID for future requests\n\nMay return an `auth_required` error if the agent requires authentication.\n\nSee protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)", - "title": "NewSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/LoadSessionRequest" - } - ], - "description": "Loads an existing session to resume a previous conversation.\n\nThis method is only available if the agent advertises the `loadSession` capability.\n\nThe agent should:\n- Restore the session context and conversation history\n- Connect to the specified MCP servers\n- Stream the entire conversation history back to the client via notifications\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", - "title": "LoadSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionModeRequest" - } - ], - "description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "title": "SetSessionModeRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/PromptRequest" - } - ], - "description": "Processes a user prompt within a session.\n\nThis method handles the whole lifecycle of a prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Processes the prompt using language models\n- Reports language model content and tool calls to the Clients\n- Requests permission to run tools\n- Executes any requested tool calls\n- Returns when the turn is complete with a stop reason\n\nSee protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)", - "title": "PromptRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtRequest" - } - ], - "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" - } - ], - "description": "All possible requests that a client can send to an agent.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly - instead, use the methods on the [`Agent`] trait.\n\nThis enum encompasses all method calls from client to agent." - }, - { - "type": "null" - } - ] - } - }, - "required": ["id", "method"], - "type": "object", - "x-docs-ignore": true - }, - "ClientResponse": { - "anyOf": [ - { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "result": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/WriteTextFileResponse" - } - ], - "title": "WriteTextFileResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReadTextFileResponse" - } - ], - "title": "ReadTextFileResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/RequestPermissionResponse" - } - ], - "title": "RequestPermissionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CreateTerminalResponse" - } - ], - "title": "CreateTerminalResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/TerminalOutputResponse" - } - ], - "title": "TerminalOutputResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReleaseTerminalResponse" - } - ], - "title": "ReleaseTerminalResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/WaitForTerminalExitResponse" - } - ], - "title": "WaitForTerminalExitResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/KillTerminalCommandResponse" - } - ], - "title": "KillTerminalResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtResponse" - } - ], - "title": "ExtMethodResponse" - } - ], - "description": "All possible responses that a client can send to an agent.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `AgentRequest` variants." - } - }, - "required": ["id", "result"], - "title": "Result", - "type": "object" - }, - { - "properties": { - "error": { - "$ref": "#/$defs/Error" - }, - "id": { - "$ref": "#/$defs/RequestId" - } - }, - "required": ["id", "error"], - "title": "Error", - "type": "object" - } - ], - "x-docs-ignore": true - }, - "Content": { - "description": "Standard content block (text, images, resources).", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "allOf": [ - { - "$ref": "#/$defs/ContentBlock" - } - ], - "description": "The actual content block." - } - }, - "required": ["content"], - "type": "object" - }, - "ContentBlock": { - "description": "Content blocks represent displayable information in the Agent Client Protocol.\n\nThey provide a structured way to handle various types of user-facing content—whether\nit's text from language models, images for analysis, or embedded resources for context.\n\nContent blocks appear in:\n- User prompts sent via `session/prompt`\n- Language model output streamed through `session/update` notifications\n- Progress updates and results from tool calls\n\nThis structure is compatible with the Model Context Protocol (MCP), enabling\nagents to seamlessly forward content from MCP tool outputs without transformation.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/content)", - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/TextContent" - } - ], - "description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.", - "properties": { - "type": { - "const": "text", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ImageContent" - } - ], - "description": "Images for visual context or analysis.\n\nRequires the `image` prompt capability when included in prompts.", - "properties": { - "type": { - "const": "image", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AudioContent" - } - ], - "description": "Audio data for transcription or analysis.\n\nRequires the `audio` prompt capability when included in prompts.", - "properties": { - "type": { - "const": "audio", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ResourceLink" - } - ], - "description": "References to resources that the agent can access.\n\nAll agents MUST support resource links in prompts.", - "properties": { - "type": { - "const": "resource_link", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/EmbeddedResource" - } - ], - "description": "Complete resource contents embedded directly in the message.\n\nPreferred for including context as it avoids extra round-trips.\n\nRequires the `embeddedContext` prompt capability when included in prompts.", - "properties": { - "type": { - "const": "resource", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ] - }, - "ContentChunk": { - "description": "A streamed item of content", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "allOf": [ - { - "$ref": "#/$defs/ContentBlock" - } - ], - "description": "A single item of content" - } - }, - "required": ["content"], - "type": "object" - }, - "CreateTerminalRequest": { - "description": "Request to create a new terminal and execute a command.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "args": { - "description": "Array of command arguments.", - "items": { - "type": "string" - }, - "type": "array" - }, - "command": { - "description": "The command to execute.", - "type": "string" - }, - "cwd": { - "description": "Working directory for the command (absolute path).", - "type": ["string", "null"] - }, - "env": { - "description": "Environment variables for the command.", - "items": { - "$ref": "#/$defs/EnvVariable" - }, - "type": "array" - }, - "outputByteLimit": { - "description": "Maximum number of output bytes to retain.\n\nWhen the limit is exceeded, the Client truncates from the beginning of the output\nto stay within the limit.\n\nThe Client MUST ensure truncation happens at a character boundary to maintain valid\nstring output, even if this means the retained output is slightly less than the\nspecified limit.", - "format": "uint64", - "minimum": 0, - "type": ["integer", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - } - }, - "required": ["sessionId", "command"], - "type": "object", - "x-method": "terminal/create", - "x-side": "client" - }, - "CreateTerminalResponse": { - "description": "Response containing the ID of the created terminal.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "terminalId": { - "description": "The unique identifier for the created terminal.", - "type": "string" - } - }, - "required": ["terminalId"], - "type": "object", - "x-method": "terminal/create", - "x-side": "client" - }, - "CurrentModeUpdate": { - "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "currentModeId": { - "allOf": [ - { - "$ref": "#/$defs/SessionModeId" - } - ], - "description": "The ID of the current mode" - } - }, - "required": ["currentModeId"], - "type": "object" - }, - "Diff": { - "description": "A diff representing file modifications.\n\nShows changes to files in a format suitable for display in the client UI.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "newText": { - "description": "The new content after modification.", - "type": "string" - }, - "oldText": { - "description": "The original content (None for new files).", - "type": ["string", "null"] - }, - "path": { - "description": "The file path being modified.", - "type": "string" - } - }, - "required": ["path", "newText"], - "type": "object" - }, - "EmbeddedResource": { - "description": "The contents of a resource, embedded into a prompt or tool call result.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "resource": { - "$ref": "#/$defs/EmbeddedResourceResource" - } - }, - "required": ["resource"], - "type": "object" - }, - "EmbeddedResourceResource": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/TextResourceContents" - } - ], - "title": "TextResourceContents" - }, - { - "allOf": [ - { - "$ref": "#/$defs/BlobResourceContents" - } - ], - "title": "BlobResourceContents" - } - ], - "description": "Resource content that can be embedded in a message." - }, - "EnvVariable": { - "description": "An environment variable to set when launching an MCP server.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "name": { - "description": "The name of the environment variable.", - "type": "string" - }, - "value": { - "description": "The value to set for the environment variable.", - "type": "string" - } - }, - "required": ["name", "value"], - "type": "object" - }, - "Error": { - "description": "JSON-RPC error object.\n\nRepresents an error that occurred during method execution, following the\nJSON-RPC 2.0 error object specification with optional additional data.\n\nSee protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)", - "properties": { - "code": { - "allOf": [ - { - "$ref": "#/$defs/ErrorCode" - } - ], - "description": "A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification." - }, - "data": { - "description": "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details." - }, - "message": { - "description": "A string providing a short description of the error.\nThe message should be limited to a concise single sentence.", - "type": "string" - } - }, - "required": ["code", "message"], - "type": "object" - }, - "ErrorCode": { - "anyOf": [ - { - "const": -32700, - "description": "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text.", - "format": "int32", - "title": "Parse error", - "type": "integer" - }, - { - "const": -32600, - "description": "**Invalid request**: The JSON sent is not a valid Request object.", - "format": "int32", - "title": "Invalid request", - "type": "integer" - }, - { - "const": -32601, - "description": "**Method not found**: The method does not exist or is not available.", - "format": "int32", - "title": "Method not found", - "type": "integer" - }, - { - "const": -32602, - "description": "**Invalid params**: Invalid method parameter(s).", - "format": "int32", - "title": "Invalid params", - "type": "integer" - }, - { - "const": -32603, - "description": "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors.", - "format": "int32", - "title": "Internal error", - "type": "integer" - }, - { - "const": -32000, - "description": "**Authentication required**: Authentication is required before this operation can be performed.", - "format": "int32", - "title": "Authentication required", - "type": "integer" - }, - { - "const": -32002, - "description": "**Resource not found**: A given resource, such as a file, was not found.", - "format": "int32", - "title": "Resource not found", - "type": "integer" - }, - { - "description": "Other undefined error code.", - "format": "int32", - "title": "Other", - "type": "integer" - } - ], - "description": "Predefined error codes for common JSON-RPC and ACP-specific errors.\n\nThese codes follow the JSON-RPC 2.0 specification for standard errors\nand use the reserved range (-32000 to -32099) for protocol-specific errors." - }, - "ExtNotification": { - "description": "Allows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" - }, - "ExtRequest": { - "description": "Allows for sending an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" - }, - "ExtResponse": { - "description": "Allows for sending an arbitrary response to an [`ExtRequest`] that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" - }, - "FileSystemCapability": { - "description": "Filesystem capabilities supported by the client.\nFile system capabilities that a client may support.\n\nSee protocol docs: [FileSystem](https://agentclientprotocol.com/protocol/initialization#filesystem)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "readTextFile": { - "default": false, - "description": "Whether the Client supports `fs/read_text_file` requests.", - "type": "boolean" - }, - "writeTextFile": { - "default": false, - "description": "Whether the Client supports `fs/write_text_file` requests.", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpHeader": { - "description": "An HTTP header to set when making requests to the MCP server.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "name": { - "description": "The name of the HTTP header.", - "type": "string" - }, - "value": { - "description": "The value to set for the HTTP header.", - "type": "string" - } - }, - "required": ["name", "value"], - "type": "object" - }, - "ImageContent": { - "description": "An image provided to or from an LLM.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "data": { - "type": "string" - }, - "mimeType": { - "type": "string" - }, - "uri": { - "type": ["string", "null"] - } - }, - "required": ["data", "mimeType"], - "type": "object" - }, - "Implementation": { - "description": "Metadata about the implementation of the client or agent.\nDescribes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "name": { - "description": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.", - "type": "string" - }, - "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.", - "type": ["string", "null"] - }, - "version": { - "description": "Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes. (e.g. \"1.0.0\").", - "type": "string" - } - }, - "required": ["name", "version"], - "type": "object" - }, - "InitializeRequest": { - "description": "Request parameters for the initialize method.\n\nSent by the client to establish connection and negotiate capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "clientCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/ClientCapabilities" - } - ], - "default": { - "fs": { - "readTextFile": false, - "writeTextFile": false - }, - "terminal": false - }, - "description": "Capabilities supported by the client." - }, - "clientInfo": { - "anyOf": [ - { - "$ref": "#/$defs/Implementation" - }, - { - "type": "null" - } - ], - "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required." - }, - "protocolVersion": { - "allOf": [ - { - "$ref": "#/$defs/ProtocolVersion" - } - ], - "description": "The latest protocol version supported by the client." - } - }, - "required": ["protocolVersion"], - "type": "object", - "x-method": "initialize", - "x-side": "agent" - }, - "InitializeResponse": { - "description": "Response to the `initialize` method.\n\nContains the negotiated protocol version and agent capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "agentCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/AgentCapabilities" - } - ], - "default": { - "loadSession": false, - "mcpCapabilities": { - "http": false, - "sse": false - }, - "promptCapabilities": { - "audio": false, - "embeddedContext": false, - "image": false - }, - "sessionCapabilities": {} - }, - "description": "Capabilities supported by the agent." - }, - "agentInfo": { - "anyOf": [ - { - "$ref": "#/$defs/Implementation" - }, - { - "type": "null" - } - ], - "description": "Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required." - }, - "authMethods": { - "default": [], - "description": "Authentication methods supported by the agent.", - "items": { - "$ref": "#/$defs/AuthMethod" - }, - "type": "array" - }, - "protocolVersion": { - "allOf": [ - { - "$ref": "#/$defs/ProtocolVersion" - } - ], - "description": "The protocol version the client specified if supported by the agent,\nor the latest protocol version supported by the agent.\n\nThe client should disconnect, if it doesn't support this version." - } - }, - "required": ["protocolVersion"], - "type": "object", - "x-method": "initialize", - "x-side": "agent" - }, - "KillTerminalCommandRequest": { - "description": "Request to kill a terminal command without releasing the terminal.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to kill.", - "type": "string" - } - }, - "required": ["sessionId", "terminalId"], - "type": "object", - "x-method": "terminal/kill", - "x-side": "client" - }, - "KillTerminalCommandResponse": { - "description": "Response to terminal/kill command method", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "terminal/kill", - "x-side": "client" - }, - "LoadSessionRequest": { - "description": "Request parameters for loading an existing session.\n\nOnly available if the Agent supports the `loadSession` capability.\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "cwd": { - "description": "The working directory for this session.", - "type": "string" - }, - "mcpServers": { - "description": "List of MCP servers to connect to for this session.", - "items": { - "$ref": "#/$defs/McpServer" - }, - "type": "array" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session to load." - } - }, - "required": ["mcpServers", "cwd", "sessionId"], - "type": "object", - "x-method": "session/load", - "x-side": "agent" - }, - "LoadSessionResponse": { - "description": "Response from loading an existing session.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "modes": { - "anyOf": [ - { - "$ref": "#/$defs/SessionModeState" - }, - { - "type": "null" - } - ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" - } - }, - "type": "object", - "x-method": "session/load", - "x-side": "agent" - }, - "McpCapabilities": { - "description": "MCP capabilities supported by the agent", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "http": { - "default": false, - "description": "Agent supports [`McpServer::Http`].", - "type": "boolean" - }, - "sse": { - "default": false, - "description": "Agent supports [`McpServer::Sse`].", - "type": "boolean" - } - }, - "type": "object" - }, - "McpServer": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/McpServerHttp" - } - ], - "description": "HTTP transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.http` is `true`.", - "properties": { - "type": { - "const": "http", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/McpServerSse" - } - ], - "description": "SSE transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.sse` is `true`.", - "properties": { - "type": { - "const": "sse", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/McpServerStdio" - } - ], - "description": "Stdio transport configuration\n\nAll Agents MUST support this transport.", - "title": "stdio" - } - ], - "description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)" - }, - "McpServerHttp": { - "description": "HTTP transport configuration for MCP.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "headers": { - "description": "HTTP headers to set when making requests to the MCP server.", - "items": { - "$ref": "#/$defs/HttpHeader" - }, - "type": "array" - }, - "name": { - "description": "Human-readable name identifying this MCP server.", - "type": "string" - }, - "url": { - "description": "URL to the MCP server.", - "type": "string" - } - }, - "required": ["name", "url", "headers"], - "type": "object" - }, - "McpServerSse": { - "description": "SSE transport configuration for MCP.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "headers": { - "description": "HTTP headers to set when making requests to the MCP server.", - "items": { - "$ref": "#/$defs/HttpHeader" - }, - "type": "array" - }, - "name": { - "description": "Human-readable name identifying this MCP server.", - "type": "string" - }, - "url": { - "description": "URL to the MCP server.", - "type": "string" - } - }, - "required": ["name", "url", "headers"], - "type": "object" - }, - "McpServerStdio": { - "description": "Stdio transport configuration for MCP.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "args": { - "description": "Command-line arguments to pass to the MCP server.", - "items": { - "type": "string" - }, - "type": "array" - }, - "command": { - "description": "Path to the MCP server executable.", - "type": "string" - }, - "env": { - "description": "Environment variables to set when launching the MCP server.", - "items": { - "$ref": "#/$defs/EnvVariable" - }, - "type": "array" - }, - "name": { - "description": "Human-readable name identifying this MCP server.", - "type": "string" - } - }, - "required": ["name", "command", "args", "env"], - "type": "object" - }, - "NewSessionRequest": { - "description": "Request parameters for creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "cwd": { - "description": "The working directory for this session. Must be an absolute path.", - "type": "string" - }, - "mcpServers": { - "description": "List of MCP (Model Context Protocol) servers the agent should connect to.", - "items": { - "$ref": "#/$defs/McpServer" - }, - "type": "array" - } - }, - "required": ["cwd", "mcpServers"], - "type": "object", - "x-method": "session/new", - "x-side": "agent" - }, - "NewSessionResponse": { - "description": "Response from creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "modes": { - "anyOf": [ - { - "$ref": "#/$defs/SessionModeState" - }, - { - "type": "null" - } - ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation." - } - }, - "required": ["sessionId"], - "type": "object", - "x-method": "session/new", - "x-side": "agent" - }, - "PermissionOption": { - "description": "An option presented to the user when requesting permission.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "kind": { - "allOf": [ - { - "$ref": "#/$defs/PermissionOptionKind" - } - ], - "description": "Hint about the nature of this permission option." - }, - "name": { - "description": "Human-readable label to display to the user.", - "type": "string" - }, - "optionId": { - "allOf": [ - { - "$ref": "#/$defs/PermissionOptionId" - } - ], - "description": "Unique identifier for this permission option." - } - }, - "required": ["optionId", "name", "kind"], - "type": "object" - }, - "PermissionOptionId": { - "description": "Unique identifier for a permission option.", - "type": "string" - }, - "PermissionOptionKind": { - "description": "The type of permission option being presented to the user.\n\nHelps clients choose appropriate icons and UI treatment.", - "oneOf": [ - { - "const": "allow_once", - "description": "Allow this operation only this time.", - "type": "string" - }, - { - "const": "allow_always", - "description": "Allow this operation and remember the choice.", - "type": "string" - }, - { - "const": "reject_once", - "description": "Reject this operation only this time.", - "type": "string" - }, - { - "const": "reject_always", - "description": "Reject this operation and remember the choice.", - "type": "string" - } - ] - }, - "Plan": { - "description": "An execution plan for accomplishing complex tasks.\n\nPlans consist of multiple entries representing individual tasks or goals.\nAgents report plans to clients to provide visibility into their execution strategy.\nPlans can evolve during execution as the agent discovers new requirements or completes tasks.\n\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "entries": { - "description": "The list of tasks to be accomplished.\n\nWhen updating a plan, the agent must send a complete list of all entries\nwith their current status. The client replaces the entire plan with each update.", - "items": { - "$ref": "#/$defs/PlanEntry" - }, - "type": "array" - } - }, - "required": ["entries"], - "type": "object" - }, - "PlanEntry": { - "description": "A single entry in the execution plan.\n\nRepresents a task or goal that the assistant intends to accomplish\nas part of fulfilling the user's request.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "description": "Human-readable description of what this task aims to accomplish.", - "type": "string" - }, - "priority": { - "allOf": [ - { - "$ref": "#/$defs/PlanEntryPriority" - } - ], - "description": "The relative importance of this task.\nUsed to indicate which tasks are most critical to the overall goal." - }, - "status": { - "allOf": [ - { - "$ref": "#/$defs/PlanEntryStatus" - } - ], - "description": "Current execution status of this task." - } - }, - "required": ["content", "priority", "status"], - "type": "object" - }, - "PlanEntryPriority": { - "description": "Priority levels for plan entries.\n\nUsed to indicate the relative importance or urgency of different\ntasks in the execution plan.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", - "oneOf": [ - { - "const": "high", - "description": "High priority task - critical to the overall goal.", - "type": "string" - }, - { - "const": "medium", - "description": "Medium priority task - important but not critical.", - "type": "string" - }, - { - "const": "low", - "description": "Low priority task - nice to have but not essential.", - "type": "string" - } - ] - }, - "PlanEntryStatus": { - "description": "Status of a plan entry in the execution flow.\n\nTracks the lifecycle of each task from planning through completion.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", - "oneOf": [ - { - "const": "pending", - "description": "The task has not started yet.", - "type": "string" - }, - { - "const": "in_progress", - "description": "The task is currently being worked on.", - "type": "string" - }, - { - "const": "completed", - "description": "The task has been successfully completed.", - "type": "string" - } - ] - }, - "PromptCapabilities": { - "description": "Prompt capabilities supported by the agent in `session/prompt` requests.\n\nBaseline agent functionality requires support for [`ContentBlock::Text`]\nand [`ContentBlock::ResourceLink`] in prompt requests.\n\nOther variants must be explicitly opted in to.\nCapabilities for different types of content in prompt requests.\n\nIndicates which content types beyond the baseline (text and resource links)\nthe agent can process.\n\nSee protocol docs: [Prompt Capabilities](https://agentclientprotocol.com/protocol/initialization#prompt-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "audio": { - "default": false, - "description": "Agent supports [`ContentBlock::Audio`].", - "type": "boolean" - }, - "embeddedContext": { - "default": false, - "description": "Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.", - "type": "boolean" - }, - "image": { - "default": false, - "description": "Agent supports [`ContentBlock::Image`].", - "type": "boolean" - } - }, - "type": "object" - }, - "PromptRequest": { - "description": "Request parameters for sending a user prompt to the agent.\n\nContains the user's message and any additional context.\n\nSee protocol docs: [User Message](https://agentclientprotocol.com/protocol/prompt-turn#1-user-message)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "prompt": { - "description": "The blocks of content that compose the user's message.\n\nAs a baseline, the Agent MUST support [`ContentBlock::Text`] and [`ContentBlock::ResourceLink`],\nwhile other variants are optionally enabled via [`PromptCapabilities`].\n\nThe Client MUST adapt its interface according to [`PromptCapabilities`].\n\nThe client MAY include referenced pieces of context as either\n[`ContentBlock::Resource`] or [`ContentBlock::ResourceLink`].\n\nWhen available, [`ContentBlock::Resource`] is preferred\nas it avoids extra round-trips and allows the message to include\npieces of context from sources the agent may not have access to.", - "items": { - "$ref": "#/$defs/ContentBlock" - }, - "type": "array" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session to send this user message to" - } - }, - "required": ["sessionId", "prompt"], - "type": "object", - "x-method": "session/prompt", - "x-side": "agent" - }, - "PromptResponse": { - "description": "Response from processing a user prompt.\n\nSee protocol docs: [Check for Completion](https://agentclientprotocol.com/protocol/prompt-turn#4-check-for-completion)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "stopReason": { - "allOf": [ - { - "$ref": "#/$defs/StopReason" - } - ], - "description": "Indicates why the agent stopped processing the turn." - } - }, - "required": ["stopReason"], - "type": "object", - "x-method": "session/prompt", - "x-side": "agent" - }, - "ProtocolVersion": { - "description": "Protocol version identifier.\n\nThis version is only bumped for breaking changes.\nNon-breaking changes should be introduced via capabilities.", - "format": "uint16", - "maximum": 65535, - "minimum": 0, - "type": "integer" - }, - "ReadTextFileRequest": { - "description": "Request to read content from a text file.\n\nOnly available if the client supports the `fs.readTextFile` capability.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "limit": { - "description": "Maximum number of lines to read.", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "line": { - "description": "Line number to start reading from (1-based).", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "path": { - "description": "Absolute path to the file to read.", - "type": "string" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - } - }, - "required": ["sessionId", "path"], - "type": "object", - "x-method": "fs/read_text_file", - "x-side": "client" - }, - "ReadTextFileResponse": { - "description": "Response containing the contents of a text file.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "type": "string" - } - }, - "required": ["content"], - "type": "object", - "x-method": "fs/read_text_file", - "x-side": "client" - }, - "ReleaseTerminalRequest": { - "description": "Request to release a terminal and free its resources.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to release.", - "type": "string" - } - }, - "required": ["sessionId", "terminalId"], - "type": "object", - "x-method": "terminal/release", - "x-side": "client" - }, - "ReleaseTerminalResponse": { - "description": "Response to terminal/release method", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "terminal/release", - "x-side": "client" - }, - "RequestId": { - "anyOf": [ - { - "title": "Null", - "type": "null" - }, - { - "format": "int64", - "title": "Number", - "type": "integer" - }, - { - "title": "Str", - "type": "string" - } - ], - "description": "JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null [1] and Numbers SHOULD NOT contain fractional parts [2]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n[1] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n[2] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions." - }, - "RequestPermissionOutcome": { - "description": "The outcome of a permission request.", - "discriminator": { - "propertyName": "outcome" - }, - "oneOf": [ - { - "description": "The prompt turn was cancelled before the user responded.\n\nWhen a client sends a `session/cancel` notification to cancel an ongoing\nprompt turn, it MUST respond to all pending `session/request_permission`\nrequests with this `Cancelled` outcome.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "properties": { - "outcome": { - "const": "cancelled", - "type": "string" - } - }, - "required": ["outcome"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SelectedPermissionOutcome" - } - ], - "description": "The user selected one of the provided options.", - "properties": { - "outcome": { - "const": "selected", - "type": "string" - } - }, - "required": ["outcome"], - "type": "object" - } - ] - }, - "RequestPermissionRequest": { - "description": "Request for user permission to execute a tool call.\n\nSent when the agent needs authorization before performing a sensitive operation.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "options": { - "description": "Available permission options for the user to choose from.", - "items": { - "$ref": "#/$defs/PermissionOption" - }, - "type": "array" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "toolCall": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallUpdate" - } - ], - "description": "Details about the tool call requiring permission." - } - }, - "required": ["sessionId", "toolCall", "options"], - "type": "object", - "x-method": "session/request_permission", - "x-side": "client" - }, - "RequestPermissionResponse": { - "description": "Response to a permission request.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "outcome": { - "allOf": [ - { - "$ref": "#/$defs/RequestPermissionOutcome" - } - ], - "description": "The user's decision on the permission request." - } - }, - "required": ["outcome"], - "type": "object", - "x-method": "session/request_permission", - "x-side": "client" - }, - "ResourceLink": { - "description": "A resource that the server is capable of reading, included in a prompt or tool call result.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "description": { - "type": ["string", "null"] - }, - "mimeType": { - "type": ["string", "null"] - }, - "name": { - "type": "string" - }, - "size": { - "format": "int64", - "type": ["integer", "null"] - }, - "title": { - "type": ["string", "null"] - }, - "uri": { - "type": "string" - } - }, - "required": ["name", "uri"], - "type": "object" - }, - "Role": { - "description": "The sender or recipient of messages and data in a conversation.", - "enum": ["assistant", "user"], - "type": "string" - }, - "SelectedPermissionOutcome": { - "description": "The user selected one of the provided options.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "optionId": { - "allOf": [ - { - "$ref": "#/$defs/PermissionOptionId" - } - ], - "description": "The ID of the option the user selected." - } - }, - "required": ["optionId"], - "type": "object" - }, - "SessionCapabilities": { - "description": "Session capabilities supported by the agent.\n\nAs a baseline, all Agents **MUST** support `session/new`, `session/prompt`, `session/cancel`, and `session/update`.\n\nOptionally, they **MAY** support other session methods and notifications by specifying additional capabilities.\n\nNote: `session/load` is still handled by the top-level `load_session` capability. This will be unified in future versions of the protocol.\n\nSee protocol docs: [Session Capabilities](https://agentclientprotocol.com/protocol/initialization#session-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object" - }, - "SessionId": { - "description": "A unique identifier for a conversation session between a client and agent.\n\nSessions maintain their own context, conversation history, and state,\nallowing multiple independent interactions with the same agent.\n\nSee protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)", - "type": "string" - }, - "SessionMode": { - "description": "A mode the agent can operate in.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "description": { - "type": ["string", "null"] - }, - "id": { - "$ref": "#/$defs/SessionModeId" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"], - "type": "object" - }, - "SessionModeId": { - "description": "Unique identifier for a Session Mode.", - "type": "string" - }, - "SessionModeState": { - "description": "The set of modes and the one currently active.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "availableModes": { - "description": "The set of modes that the Agent can operate in", - "items": { - "$ref": "#/$defs/SessionMode" - }, - "type": "array" - }, - "currentModeId": { - "allOf": [ - { - "$ref": "#/$defs/SessionModeId" - } - ], - "description": "The current mode the Agent is in." - } - }, - "required": ["currentModeId", "availableModes"], - "type": "object" - }, - "SessionNotification": { - "description": "Notification containing a session update from the agent.\n\nUsed to stream real-time progress and results during prompt processing.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session this update pertains to." - }, - "update": { - "allOf": [ - { - "$ref": "#/$defs/SessionUpdate" - } - ], - "description": "The actual update content." - } - }, - "required": ["sessionId", "update"], - "type": "object", - "x-method": "session/update", - "x-side": "client" - }, - "SessionUpdate": { - "description": "Different types of updates that can be sent during session processing.\n\nThese updates provide real-time feedback about the agent's progress.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "discriminator": { - "propertyName": "sessionUpdate" - }, - "oneOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/ContentChunk" - } - ], - "description": "A chunk of the user's message being streamed.", - "properties": { - "sessionUpdate": { - "const": "user_message_chunk", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ContentChunk" - } - ], - "description": "A chunk of the agent's response being streamed.", - "properties": { - "sessionUpdate": { - "const": "agent_message_chunk", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ContentChunk" - } - ], - "description": "A chunk of the agent's internal reasoning being streamed.", - "properties": { - "sessionUpdate": { - "const": "agent_thought_chunk", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ToolCall" - } - ], - "description": "Notification that a new tool call has been initiated.", - "properties": { - "sessionUpdate": { - "const": "tool_call", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ToolCallUpdate" - } - ], - "description": "Update on the status or results of a tool call.", - "properties": { - "sessionUpdate": { - "const": "tool_call_update", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/Plan" - } - ], - "description": "The agent's execution plan for complex tasks.\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)", - "properties": { - "sessionUpdate": { - "const": "plan", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AvailableCommandsUpdate" - } - ], - "description": "Available commands are ready or have changed", - "properties": { - "sessionUpdate": { - "const": "available_commands_update", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CurrentModeUpdate" - } - ], - "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "properties": { - "sessionUpdate": { - "const": "current_mode_update", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - } - ] - }, - "SetSessionModeRequest": { - "description": "Request parameters for setting a session mode.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "modeId": { - "allOf": [ - { - "$ref": "#/$defs/SessionModeId" - } - ], - "description": "The ID of the mode to set." - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session to set the mode for." - } - }, - "required": ["sessionId", "modeId"], - "type": "object", - "x-method": "session/set_mode", - "x-side": "agent" - }, - "SetSessionModeResponse": { - "description": "Response to `session/set_mode` method.", - "properties": { - "_meta": { - "additionalProperties": true, - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "session/set_mode", - "x-side": "agent" - }, - "StopReason": { - "description": "Reasons why an agent stops processing a prompt turn.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)", - "oneOf": [ - { - "const": "end_turn", - "description": "The turn ended successfully.", - "type": "string" - }, - { - "const": "max_tokens", - "description": "The turn ended because the agent reached the maximum number of tokens.", - "type": "string" - }, - { - "const": "max_turn_requests", - "description": "The turn ended because the agent reached the maximum number of allowed\nagent requests between user turns.", - "type": "string" - }, - { - "const": "refusal", - "description": "The turn ended because the agent refused to continue. The user prompt\nand everything that comes after it won't be included in the next\nprompt, so this should be reflected in the UI.", - "type": "string" - }, - { - "const": "cancelled", - "description": "The turn was cancelled by the client via `session/cancel`.\n\nThis stop reason MUST be returned when the client sends a `session/cancel`\nnotification, even if the cancellation causes exceptions in underlying operations.\nAgents should catch these exceptions and return this semantically meaningful\nresponse to confirm successful cancellation.", - "type": "string" - } - ] - }, - "Terminal": { - "description": "Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "terminalId": { - "type": "string" - } - }, - "required": ["terminalId"], - "type": "object" - }, - "TerminalExitStatus": { - "description": "Exit status of a terminal command.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "exitCode": { - "description": "The process exit code (may be null if terminated by signal).", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "signal": { - "description": "The signal that terminated the process (may be null if exited normally).", - "type": ["string", "null"] - } - }, - "type": "object" - }, - "TerminalOutputRequest": { - "description": "Request to get the current output and status of a terminal.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to get output from.", - "type": "string" - } - }, - "required": ["sessionId", "terminalId"], - "type": "object", - "x-method": "terminal/output", - "x-side": "client" - }, - "TerminalOutputResponse": { - "description": "Response containing the terminal output and exit status.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "exitStatus": { - "anyOf": [ - { - "$ref": "#/$defs/TerminalExitStatus" - }, - { - "type": "null" - } - ], - "description": "Exit status if the command has completed." - }, - "output": { - "description": "The terminal output captured so far.", - "type": "string" - }, - "truncated": { - "description": "Whether the output was truncated due to byte limits.", - "type": "boolean" - } - }, - "required": ["output", "truncated"], - "type": "object", - "x-method": "terminal/output", - "x-side": "client" - }, - "TextContent": { - "description": "Text provided to or from an LLM.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "text": { - "type": "string" - } - }, - "required": ["text"], - "type": "object" - }, - "TextResourceContents": { - "description": "Text-based resource contents.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "mimeType": { - "type": ["string", "null"] - }, - "text": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "required": ["text", "uri"], - "type": "object" - }, - "ToolCall": { - "description": "Represents a tool call that the language model has requested.\n\nTool calls are actions that the agent executes on behalf of the language model,\nsuch as reading files, executing code, or fetching data from external sources.\n\nSee protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/tool-calls)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "description": "Content produced by the tool call.", - "items": { - "$ref": "#/$defs/ToolCallContent" - }, - "type": "array" - }, - "kind": { - "allOf": [ - { - "$ref": "#/$defs/ToolKind" - } - ], - "description": "The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment." - }, - "locations": { - "description": "File locations affected by this tool call.\nEnables \"follow-along\" features in clients.", - "items": { - "$ref": "#/$defs/ToolCallLocation" - }, - "type": "array" - }, - "rawInput": { - "description": "Raw input parameters sent to the tool." - }, - "rawOutput": { - "description": "Raw output returned by the tool." - }, - "status": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallStatus" - } - ], - "description": "Current execution status of the tool call." - }, - "title": { - "description": "Human-readable title describing what the tool is doing.", - "type": "string" - }, - "toolCallId": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallId" - } - ], - "description": "Unique identifier for this tool call within the session." - } - }, - "required": ["toolCallId", "title"], - "type": "object" - }, - "ToolCallContent": { - "description": "Content produced by a tool call.\n\nTool calls can produce different types of content including\nstandard content blocks (text, images) or file diffs.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)", - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/Content" - } - ], - "description": "Standard content block (text, images, resources).", - "properties": { - "type": { - "const": "content", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/Diff" - } - ], - "description": "File modification shown as a diff.", - "properties": { - "type": { - "const": "diff", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/Terminal" - } - ], - "description": "Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)", - "properties": { - "type": { - "const": "terminal", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ] - }, - "ToolCallId": { - "description": "Unique identifier for a tool call within a session.", - "type": "string" - }, - "ToolCallLocation": { - "description": "A file location being accessed or modified by a tool.\n\nEnables clients to implement \"follow-along\" features that track\nwhich files the agent is working with in real-time.\n\nSee protocol docs: [Following the Agent](https://agentclientprotocol.com/protocol/tool-calls#following-the-agent)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "line": { - "description": "Optional line number within the file.", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "path": { - "description": "The file path being accessed or modified.", - "type": "string" - } - }, - "required": ["path"], - "type": "object" - }, - "ToolCallStatus": { - "description": "Execution status of a tool call.\n\nTool calls progress through different statuses during their lifecycle.\n\nSee protocol docs: [Status](https://agentclientprotocol.com/protocol/tool-calls#status)", - "oneOf": [ - { - "const": "pending", - "description": "The tool call hasn't started running yet because the input is either\nstreaming or we're awaiting approval.", - "type": "string" - }, - { - "const": "in_progress", - "description": "The tool call is currently running.", - "type": "string" - }, - { - "const": "completed", - "description": "The tool call completed successfully.", - "type": "string" - }, - { - "const": "failed", - "description": "The tool call failed with an error.", - "type": "string" - } - ] - }, - "ToolCallUpdate": { - "description": "An update to an existing tool call.\n\nUsed to report progress and results as tools execute. All fields except\nthe tool call ID are optional - only changed fields need to be included.\n\nSee protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "description": "Replace the content collection.", - "items": { - "$ref": "#/$defs/ToolCallContent" - }, - "type": ["array", "null"] - }, - "kind": { - "anyOf": [ - { - "$ref": "#/$defs/ToolKind" - }, - { - "type": "null" - } - ], - "description": "Update the tool kind." - }, - "locations": { - "description": "Replace the locations collection.", - "items": { - "$ref": "#/$defs/ToolCallLocation" - }, - "type": ["array", "null"] - }, - "rawInput": { - "description": "Update the raw input." - }, - "rawOutput": { - "description": "Update the raw output." - }, - "status": { - "anyOf": [ - { - "$ref": "#/$defs/ToolCallStatus" - }, - { - "type": "null" - } - ], - "description": "Update the execution status." - }, - "title": { - "description": "Update the human-readable title.", - "type": ["string", "null"] - }, - "toolCallId": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallId" - } - ], - "description": "The ID of the tool call being updated." - } - }, - "required": ["toolCallId"], - "type": "object" - }, - "ToolKind": { - "description": "Categories of tools that can be invoked.\n\nTool kinds help clients choose appropriate icons and optimize how they\ndisplay tool execution progress.\n\nSee protocol docs: [Creating](https://agentclientprotocol.com/protocol/tool-calls#creating)", - "oneOf": [ - { - "const": "read", - "description": "Reading files or data.", - "type": "string" - }, - { - "const": "edit", - "description": "Modifying files or content.", - "type": "string" - }, - { - "const": "delete", - "description": "Removing files or data.", - "type": "string" - }, - { - "const": "move", - "description": "Moving or renaming files.", - "type": "string" - }, - { - "const": "search", - "description": "Searching for information.", - "type": "string" - }, - { - "const": "execute", - "description": "Running commands or code.", - "type": "string" - }, - { - "const": "think", - "description": "Internal reasoning or planning.", - "type": "string" - }, - { - "const": "fetch", - "description": "Retrieving external data.", - "type": "string" - }, - { - "const": "switch_mode", - "description": "Switching the current session mode.", - "type": "string" - }, - { - "const": "other", - "description": "Other tool types (default).", - "type": "string" - } - ] - }, - "UnstructuredCommandInput": { - "description": "All text that was typed after the command name is provided as input.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "hint": { - "description": "A hint to display when the input hasn't been provided yet", - "type": "string" - } - }, - "required": ["hint"], - "type": "object" - }, - "WaitForTerminalExitRequest": { - "description": "Request to wait for a terminal command to exit.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to wait for.", - "type": "string" - } - }, - "required": ["sessionId", "terminalId"], - "type": "object", - "x-method": "terminal/wait_for_exit", - "x-side": "client" - }, - "WaitForTerminalExitResponse": { - "description": "Response containing the exit status of a terminal command.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "exitCode": { - "description": "The process exit code (may be null if terminated by signal).", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "signal": { - "description": "The signal that terminated the process (may be null if exited normally).", - "type": ["string", "null"] - } - }, - "type": "object", - "x-method": "terminal/wait_for_exit", - "x-side": "client" - }, - "WriteTextFileRequest": { - "description": "Request to write content to a text file.\n\nOnly available if the client supports the `fs.writeTextFile` capability.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "description": "The text content to write to the file.", - "type": "string" - }, - "path": { - "description": "Absolute path to the file to write.", - "type": "string" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - } - }, - "required": ["sessionId", "path", "content"], - "type": "object", - "x-method": "fs/write_text_file", - "x-side": "client" - }, - "WriteTextFileResponse": { - "description": "Response to `fs/write_text_file`", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "fs/write_text_file", - "x-side": "client" - } - }, - "$schema": "https://json-schema.org/draft/2020-12/schema", - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/AgentRequest" - } - ], - "title": "Request" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AgentResponse" - } - ], - "title": "Response" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AgentNotification" - } - ], - "title": "Notification" - } - ], - "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", - "properties": { - "jsonrpc": { - "enum": ["2.0"], - "type": "string" - } - }, - "required": ["jsonrpc"], - "title": "Agent", - "type": "object" - }, - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/ClientRequest" - } - ], - "title": "Request" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ClientResponse" - } - ], - "title": "Response" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ClientNotification" - } - ], - "title": "Notification" - } - ], - "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", - "properties": { - "jsonrpc": { - "enum": ["2.0"], - "type": "string" - } - }, - "required": ["jsonrpc"], - "title": "Client", - "type": "object" - } - ], - "title": "Agent Client Protocol" -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/Session.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/Session.java deleted file mode 100644 index 958d156beb..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/Session.java +++ /dev/null @@ -1,312 +0,0 @@ -package com.alibaba.acp.sdk.session; - -import java.io.IOException; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; -import java.util.function.Consumer; -import java.util.function.Function; - -import com.alibaba.acp.sdk.protocol.agent.notification.SessionNotification; -import com.alibaba.acp.sdk.protocol.agent.request.ReadTextFileRequest; -import com.alibaba.acp.sdk.protocol.agent.request.RequestPermissionRequest; -import com.alibaba.acp.sdk.protocol.agent.request.WriteTextFileRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.CreateTerminalRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.KillTerminalCommandRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.ReleaseTerminalRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.TerminalOutputRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.WaitForTerminalExitRequest; -import com.alibaba.acp.sdk.protocol.agent.response.PromptResponse; -import com.alibaba.acp.sdk.protocol.client.notification.CancelNotification; -import com.alibaba.acp.sdk.protocol.client.request.LoadSessionRequest.LoadSessionRequestParams; -import com.alibaba.acp.sdk.protocol.client.request.PromptRequest; -import com.alibaba.acp.sdk.protocol.client.request.PromptRequest.PromptRequestParams; -import com.alibaba.acp.sdk.protocol.domain.content.block.ContentBlock; -import com.alibaba.acp.sdk.protocol.domain.session.update.AgentMessageChunkSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.AvailableCommandsUpdateSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.CurrentModeUpdateSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.PlanSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.SessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.ToolCallSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.ToolCallUpdateSessionUpdate; -import com.alibaba.acp.sdk.protocol.jsonrpc.Error; -import com.alibaba.acp.sdk.protocol.jsonrpc.Message; -import com.alibaba.acp.sdk.protocol.jsonrpc.MethodMessage; -import com.alibaba.acp.sdk.protocol.jsonrpc.Request; -import com.alibaba.acp.sdk.protocol.jsonrpc.Response; -import com.alibaba.acp.sdk.session.event.consumer.AgentEventConsumer; -import com.alibaba.acp.sdk.session.event.consumer.ContentEventConsumer; -import com.alibaba.acp.sdk.session.event.consumer.FileEventConsumer; -import com.alibaba.acp.sdk.session.event.consumer.PermissionEventConsumer; -import com.alibaba.acp.sdk.session.event.consumer.PromptEndEventConsumer; -import com.alibaba.acp.sdk.session.event.consumer.TerminalEventConsumer; -import com.alibaba.acp.sdk.session.event.consumer.exception.EventConsumeException; -import com.alibaba.acp.sdk.transport.Transport; -import com.alibaba.acp.sdk.utils.MyConcurrentUtils; -import com.alibaba.acp.sdk.utils.Timeout; -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.JSONObject; - -import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.exception.ContextedRuntimeException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static com.alibaba.acp.sdk.protocol.jsonrpc.Error.ErrorCode.INTERNAL_ERROR; -import static com.alibaba.acp.sdk.utils.MyConcurrentUtils.runAndWait; - -/** - * Represents a session connection with an AI agent - * This class encapsulates all functionality for interacting with the agent, including sending prompts, handling various events and responses, etc. - * - * @author SkyFire - * @version 0.0.1 - */ -public class Session { - private final Transport transport; - private final LoadSessionRequestParams loadSessionRequestParams; - private static final Logger logger = LoggerFactory.getLogger(Session.class); - - /** - * Constructs a new session instance - * - * @param transport Transport instance for communication with the agent, cannot be null - * @param loadSessionRequestParams Load session request parameters, including session identifier and other information, cannot be null - */ - public Session(Transport transport, LoadSessionRequestParams loadSessionRequestParams) { - Validate.notNull(transport, "transport can't be null"); - this.transport = transport; - Validate.notNull(loadSessionRequestParams, "loadSessionRequestParams can't be null"); - this.loadSessionRequestParams = loadSessionRequestParams; - } - - /** - * Cancels the currently ongoing operation - * Sends a cancellation notification to the agent, requesting termination of the currently executing task. - * - * @throws IOException Thrown when an IO error occurs while sending the cancellation notification - */ - public void cancel() throws IOException { - CancelNotification cancelNotification = new CancelNotification(); - String message = cancelNotification.toString(); - logger.debug("send_cancelNotification to agent {}", message); - transport.inputNoWaitResponse(message); - } - - /** - * Sends a prompt message to the agent and handles the response - * This method sends a prompt to the agent and handles various responses and events from the agent, including content updates, terminal operations, permission requests, etc. - * - * @param prompts List of prompt content blocks, cannot be empty - * @param agentEventConsumer Consumer for handling agent events, cannot be null - * @throws IOException Thrown when an IO error occurs while sending the prompt or receiving the response - */ - public void sendPrompt(List prompts, AgentEventConsumer agentEventConsumer) throws IOException { - Validate.notEmpty(prompts, "prompts can't be empty"); - PromptRequest promptRequest = new PromptRequest(new PromptRequestParams(loadSessionRequestParams.getSessionId(), prompts)); - - Validate.notNull(agentEventConsumer, "agentEventConsumer can't be null"); - ContentEventConsumer contentEventConsumer = agentEventConsumer.getContentEventConsumer(); - PromptEndEventConsumer promptEndEventConsumer = agentEventConsumer.getPromptEndEventConsumer(); - TerminalEventConsumer terminalEventConsumer = agentEventConsumer.getTerminalEventConsumer(); - PermissionEventConsumer permissionEventConsumer = agentEventConsumer.getPermissionEventConsumer(); - FileEventConsumer fileEventConsumer = agentEventConsumer.getFileEventConsumer(); - - String requestMessage = promptRequest.toString(); - logger.debug("send_prompt to agent: {}", requestMessage); - transport.inputWaitForMultiLine(requestMessage, (String line) -> { - logger.debug("received_message from agent: {}", line); - if (line == null) { - return true; - } - Message message = this.toMessage(line); - if (message instanceof PromptResponse) { - logger.debug("rcv prompt_turn_end for prompt {}", prompts); - if (promptEndEventConsumer != null) { - processNoWaitResponse(promptEndEventConsumer::onPromptEnd, promptEndEventConsumer::onPromptEndTimeout, - ((PromptResponse) message).getResult()); - } - return true; - } else if (message instanceof SessionNotification) { - if (contentEventConsumer != null) { - processSessionUpdate(contentEventConsumer, ((SessionNotification) message).getParams().getUpdate()); - } - return false; - } else if (message instanceof RequestPermissionRequest) { - if (permissionEventConsumer != null) { - processRequest(permissionEventConsumer::onRequestPermissionRequest, permissionEventConsumer::onRequestPermissionRequestTimeout, - (RequestPermissionRequest) message); - } - return false; - } else if (message instanceof ReadTextFileRequest) { - if (fileEventConsumer != null) { - processRequest(fileEventConsumer::onReadTextFileRequest, fileEventConsumer::onReadTextFileRequestTimeout, - (ReadTextFileRequest) message); - } - return false; - } else if (message instanceof WriteTextFileRequest) { - if (fileEventConsumer != null) { - processRequest(fileEventConsumer::onWriteTextFileRequest, fileEventConsumer::onWriteTextFileRequestTimeout, - (WriteTextFileRequest) message); - } - return false; - } else if (message instanceof CreateTerminalRequest) { - if (terminalEventConsumer != null) { - processRequest(terminalEventConsumer::onCreateTerminalRequest, terminalEventConsumer::onCreateTerminalRequestTimeout, - (CreateTerminalRequest) message); - } - return false; - } else if (message instanceof ReleaseTerminalRequest) { - if (terminalEventConsumer != null) { - processRequest(terminalEventConsumer::onReleaseTerminalRequest, terminalEventConsumer::onReleaseTerminalRequestTimeout, - (ReleaseTerminalRequest) message); - } - return false; - } else if (message instanceof WaitForTerminalExitRequest) { - if (terminalEventConsumer != null) { - processRequest(terminalEventConsumer::onWaitForTerminalExitRequest, terminalEventConsumer::onWaitForTerminalExitRequestTimeout, - (WaitForTerminalExitRequest) message); - } - return false; - } else if (message instanceof TerminalOutputRequest) { - if (terminalEventConsumer != null) { - processRequest(terminalEventConsumer::onTerminalOutput, terminalEventConsumer::onTerminalOutputRequestTimeout, - (TerminalOutputRequest) message); - } - return false; - } else if (message instanceof KillTerminalCommandRequest) { - if (terminalEventConsumer != null) { - processRequest(terminalEventConsumer::onKillTerminalCommandRequest, terminalEventConsumer::onKillTerminalCommandRequestTimeout, - (KillTerminalCommandRequest) message); - } - return false; - } else { - logger.warn("Unknown message, will end prompt turn. {}", line); - return false; - } - }); - } - - /** - * Parses a string into the corresponding message object - *
- * Determines the message type based on the fields in the JSON content and converts it to the corresponding object. - * - * @param line String containing JSON-formatted message - * @return Parsed message object - */ - private Message toMessage(String line) { - JSONObject jsonObject = JSON.parseObject(line); - if (jsonObject.containsKey("method")) { - return jsonObject.toJavaObject(MethodMessage.class); - } else if (jsonObject.containsKey("result") || jsonObject.containsKey("error")) { - JSONObject result = jsonObject.getJSONObject("result"); - if (result != null && result.containsKey("stopReason")) { - return jsonObject.toJavaObject(PromptResponse.class); - } else { - return jsonObject.toJavaObject(Response.class); - } - } else { - return jsonObject.toJavaObject(Message.class); - } - } - - /** - * Processes session update events - *
- * Calls the corresponding content event handler based on different session update types. - * - * @param contentEventConsumer Content event consumer - * @param sessionUpdate Session update object - */ - private void processSessionUpdate(ContentEventConsumer contentEventConsumer, SessionUpdate sessionUpdate) { - if (contentEventConsumer == null) { - return; - } - if (sessionUpdate instanceof AgentMessageChunkSessionUpdate) { - processNoWaitResponse(contentEventConsumer::onAgentMessageChunkSessionUpdate, - contentEventConsumer::onAgentMessageChunkSessionUpdateTimeout, (AgentMessageChunkSessionUpdate) sessionUpdate); - } else if (sessionUpdate instanceof ToolCallUpdateSessionUpdate) { - processNoWaitResponse(contentEventConsumer::onToolCallUpdateSessionUpdate, contentEventConsumer::onToolCallUpdateSessionUpdateTimeout, - (ToolCallUpdateSessionUpdate) sessionUpdate); - } else if (sessionUpdate instanceof ToolCallSessionUpdate) { - processNoWaitResponse(contentEventConsumer::onToolCallSessionUpdate, contentEventConsumer::onToolCallSessionUpdateTimeout, - (ToolCallSessionUpdate) sessionUpdate); - } else if (sessionUpdate instanceof AvailableCommandsUpdateSessionUpdate) { - processNoWaitResponse(contentEventConsumer::onAvailableCommandsUpdateSessionUpdate, - contentEventConsumer::onAvailableCommandsUpdateSessionUpdateTimeout, - (AvailableCommandsUpdateSessionUpdate) sessionUpdate); - } else if (sessionUpdate instanceof CurrentModeUpdateSessionUpdate) { - processNoWaitResponse(contentEventConsumer::onCurrentModeUpdateSessionUpdate, - contentEventConsumer::onCurrentModeUpdateSessionUpdateTimeout, - (CurrentModeUpdateSessionUpdate) sessionUpdate); - } else if (sessionUpdate instanceof PlanSessionUpdate) { - processNoWaitResponse(contentEventConsumer::onPlanSessionUpdate, contentEventConsumer::onPlanSessionUpdateTimeout, - (PlanSessionUpdate) sessionUpdate); - } - } - - /** - * Processes event consumption without waiting for a response - *
- * Executes event consumption logic within the specified timeout period. - * - * @param consumer Event consumer - * @param timeoutFunction Timeout function - * @param notification Notification object - * @param Notification type - */ - private void processNoWaitResponse(Consumer consumer, Function timeoutFunction, N notification) { - runAndWait(() -> consumer.accept(notification), Optional.ofNullable(timeoutFunction) - .map(tf -> tf.apply(notification)) - .orElse(defaultEventConsumeTimeout)); - } - - /** - * Processes requests that require a response - *
- * Executes request processing logic and sends a response to the agent upon completion. - * - * @param requestProcessor Request processor - * @param timeoutFunction Timeout function - * @param request Request object - * @param Request type - * @param Response payload type - */ - private , L> void processRequest(Function requestProcessor, Function timeoutFunction, R request) { - Response response = new Response<>(); - response.setId(request.getId()); - try { - L result = MyConcurrentUtils.runAndWait( - () -> requestProcessor.apply(request), - Optional.ofNullable(timeoutFunction) - .map(tf -> tf.apply(request)) - .orElse(defaultEventConsumeTimeout)); - response.setResult(result); - } catch (EventConsumeException eventConsumeException) { - response.setError(eventConsumeException.getError()); - } catch (ExecutionException e) { - if (e.getCause() instanceof EventConsumeException) { - response.setError(((EventConsumeException) e.getCause()).getError()); - } else { - response.setError(new Error(INTERNAL_ERROR.getCode(), INTERNAL_ERROR.getDescription(), e.getMessage())); - } - } catch (InterruptedException | TimeoutException e) { - response.setError(new Error(INTERNAL_ERROR.getCode(), INTERNAL_ERROR.getDescription(), e.getMessage())); - } - try { - String message = response.toString(); - logger.debug("send_response to agent: {}", message); - transport.inputNoWaitResponse(message); - } catch (Exception e) { - throw new ContextedRuntimeException("Failed to send response by transport ", e) - .addContextValue("transport", transport) - .addContextValue("request", request) - .addContextValue("response", response); - } - } - - /** Default event consumption timeout is 60 seconds */ - Timeout defaultEventConsumeTimeout = Timeout.TIMEOUT_60_SECONDS; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/AgentEventConsumer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/AgentEventConsumer.java deleted file mode 100644 index c004366d0e..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/AgentEventConsumer.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.alibaba.acp.sdk.session.event.consumer; - -/** - * Agent Event Consumer Container - * - * This class serves as a container for various event consumers that handle different types of events - * received from the AI agent during a session, such as content updates, file operations, terminal commands, etc. - * - * @author SkyFire - * @version 0.0.1 - */ -public class AgentEventConsumer { - private ContentEventConsumer contentEventConsumer; - private FileEventConsumer fileEventConsumer; - private TerminalEventConsumer terminalEventConsumer; - private PermissionEventConsumer permissionEventConsumer; - private PromptEndEventConsumer promptEndEventConsumer; - - /** - * Gets the content event consumer - * - * @return ContentEventConsumer instance for handling content-related events - */ - public ContentEventConsumer getContentEventConsumer() { - return contentEventConsumer; - } - - /** - * Sets the content event consumer - * - * @param contentEventConsumer ContentEventConsumer instance for handling content-related events - * @return Current instance for method chaining - */ - public AgentEventConsumer setContentEventConsumer(ContentEventConsumer contentEventConsumer) { - this.contentEventConsumer = contentEventConsumer; - return this; - } - - /** - * Gets the file event consumer - * - * @return FileEventConsumer instance for handling file-related events - */ - public FileEventConsumer getFileEventConsumer() { - return fileEventConsumer; - } - - /** - * Sets the file event consumer - * - * @param fileEventConsumer FileEventConsumer instance for handling file-related events - * @return Current instance for method chaining - */ - public AgentEventConsumer setFileEventConsumer(FileEventConsumer fileEventConsumer) { - this.fileEventConsumer = fileEventConsumer; - return this; - } - - /** - * Gets the terminal event consumer - * - * @return TerminalEventConsumer instance for handling terminal-related events - */ - public TerminalEventConsumer getTerminalEventConsumer() { - return terminalEventConsumer; - } - - /** - * Sets the terminal event consumer - * - * @param terminalEventConsumer TerminalEventConsumer instance for handling terminal-related events - * @return Current instance for method chaining - */ - public AgentEventConsumer setTerminalEventConsumer(TerminalEventConsumer terminalEventConsumer) { - this.terminalEventConsumer = terminalEventConsumer; - return this; - } - - /** - * Gets the permission event consumer - * - * @return PermissionEventConsumer instance for handling permission-related events - */ - public PermissionEventConsumer getPermissionEventConsumer() { - return permissionEventConsumer; - } - - /** - * Sets the permission event consumer - * - * @param permissionEventConsumer PermissionEventConsumer instance for handling permission-related events - * @return Current instance for method chaining - */ - public AgentEventConsumer setPermissionEventConsumer(PermissionEventConsumer permissionEventConsumer) { - this.permissionEventConsumer = permissionEventConsumer; - return this; - } - - /** - * Gets the prompt end event consumer - * - * @return PromptEndEventConsumer instance for handling prompt completion events - */ - public PromptEndEventConsumer getPromptEndEventConsumer() { - return promptEndEventConsumer; - } - - /** - * Sets the prompt end event consumer - * - * @param promptEndEventConsumer PromptEndEventConsumer instance for handling prompt completion events - * @return Current instance for method chaining - */ - public AgentEventConsumer setPromptEndEventConsumer(PromptEndEventConsumer promptEndEventConsumer) { - this.promptEndEventConsumer = promptEndEventConsumer; - return this; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/ContentEventConsumer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/ContentEventConsumer.java deleted file mode 100644 index 8656f78cdc..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/ContentEventConsumer.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.alibaba.acp.sdk.session.event.consumer; - -import com.alibaba.acp.sdk.protocol.domain.session.update.AgentMessageChunkSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.AvailableCommandsUpdateSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.CurrentModeUpdateSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.PlanSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.ToolCallSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.ToolCallUpdateSessionUpdate; -import com.alibaba.acp.sdk.utils.Timeout; - -/** - * Content Event Consumer Interface - * - * This interface defines methods for handling content-related events received from the AI agent, - * such as message chunks, available commands, mode updates, plans, and tool calls. - * - * @author SkyFire - * @version 0.0.1 - */ -public interface ContentEventConsumer { - /** - * Handles agent message chunk session updates - * - * @param sessionUpdate Agent message chunk session update - */ - void onAgentMessageChunkSessionUpdate(AgentMessageChunkSessionUpdate sessionUpdate); - - /** - * Handles available commands update session updates - * - * @param sessionUpdate Available commands update session update - */ - void onAvailableCommandsUpdateSessionUpdate(AvailableCommandsUpdateSessionUpdate sessionUpdate); - - /** - * Handles current mode update session updates - * - * @param sessionUpdate Current mode update session update - */ - void onCurrentModeUpdateSessionUpdate(CurrentModeUpdateSessionUpdate sessionUpdate); - - /** - * Handles plan session updates - * - * @param sessionUpdate Plan session update - */ - void onPlanSessionUpdate(PlanSessionUpdate sessionUpdate); - - /** - * Handles tool call update session updates - * - * @param sessionUpdate Tool call update session update - */ - void onToolCallUpdateSessionUpdate(ToolCallUpdateSessionUpdate sessionUpdate); - - /** - * Handles tool call session updates - * - * @param sessionUpdate Tool call session update - */ - void onToolCallSessionUpdate(ToolCallSessionUpdate sessionUpdate); - - /** - * Gets timeout for agent message chunk session update processing - * - * @param sessionUpdate Agent message chunk session update - * @return Timeout for processing the update - */ - Timeout onAgentMessageChunkSessionUpdateTimeout(AgentMessageChunkSessionUpdate sessionUpdate); - - /** - * Gets timeout for available commands update session update processing - * - * @param sessionUpdate Available commands update session update - * @return Timeout for processing the update - */ - Timeout onAvailableCommandsUpdateSessionUpdateTimeout(AvailableCommandsUpdateSessionUpdate sessionUpdate); - - /** - * Gets timeout for current mode update session update processing - * - * @param sessionUpdate Current mode update session update - * @return Timeout for processing the update - */ - Timeout onCurrentModeUpdateSessionUpdateTimeout(CurrentModeUpdateSessionUpdate sessionUpdate); - - /** - * Gets timeout for plan session update processing - * - * @param sessionUpdate Plan session update - * @return Timeout for processing the update - */ - Timeout onPlanSessionUpdateTimeout(PlanSessionUpdate sessionUpdate); - - /** - * Gets timeout for tool call update session update processing - * - * @param sessionUpdate Tool call update session update - * @return Timeout for processing the update - */ - Timeout onToolCallUpdateSessionUpdateTimeout(ToolCallUpdateSessionUpdate sessionUpdate); - - /** - * Gets timeout for tool call session update processing - * - * @param sessionUpdate Tool call session update - * @return Timeout for processing the update - */ - Timeout onToolCallSessionUpdateTimeout(ToolCallSessionUpdate sessionUpdate); -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/ContentEventSimpleConsumer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/ContentEventSimpleConsumer.java deleted file mode 100644 index 896e667b08..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/ContentEventSimpleConsumer.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.alibaba.acp.sdk.session.event.consumer; - -import com.alibaba.acp.sdk.protocol.domain.session.update.AgentMessageChunkSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.AvailableCommandsUpdateSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.CurrentModeUpdateSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.PlanSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.ToolCallSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.ToolCallUpdateSessionUpdate; -import com.alibaba.acp.sdk.utils.Timeout; - -/** - * Simple Content Event Consumer Implementation - * - * This class provides a simple implementation of the ContentEventConsumer interface - * that performs minimal processing for content-related events, primarily serving as a base - * implementation that can be extended or used as-is for basic functionality. - * - * @author SkyFire - * @version 0.0.1 - */ -public class ContentEventSimpleConsumer implements ContentEventConsumer { - @Override - public void onAgentMessageChunkSessionUpdate(AgentMessageChunkSessionUpdate sessionUpdate) { - // Simple implementation - does nothing - } - - @Override - public void onAvailableCommandsUpdateSessionUpdate(AvailableCommandsUpdateSessionUpdate sessionUpdate) { - // Simple implementation - does nothing - } - - @Override - public void onCurrentModeUpdateSessionUpdate(CurrentModeUpdateSessionUpdate sessionUpdate) { - // Simple implementation - does nothing - } - - @Override - public void onPlanSessionUpdate(PlanSessionUpdate sessionUpdate) { - // Simple implementation - does nothing - } - - @Override - public void onToolCallUpdateSessionUpdate(ToolCallUpdateSessionUpdate sessionUpdate) { - // Simple implementation - does nothing - } - - @Override - public void onToolCallSessionUpdate(ToolCallSessionUpdate sessionUpdate) { - // Simple implementation - does nothing - } - - @Override - public Timeout onAgentMessageChunkSessionUpdateTimeout(AgentMessageChunkSessionUpdate sessionUpdate) { - return defaultTimeout; - } - - @Override - public Timeout onAvailableCommandsUpdateSessionUpdateTimeout(AvailableCommandsUpdateSessionUpdate sessionUpdate) { - return defaultTimeout; - } - - @Override - public Timeout onCurrentModeUpdateSessionUpdateTimeout(CurrentModeUpdateSessionUpdate sessionUpdate) { - return defaultTimeout; - } - - @Override - public Timeout onPlanSessionUpdateTimeout(PlanSessionUpdate sessionUpdate) { - return defaultTimeout; - } - - @Override - public Timeout onToolCallUpdateSessionUpdateTimeout(ToolCallUpdateSessionUpdate sessionUpdate) { - return defaultTimeout; - } - - @Override - public Timeout onToolCallSessionUpdateTimeout(ToolCallSessionUpdate sessionUpdate) { - return defaultTimeout; - } - - /** Default timeout for event processing is 60 seconds */ - Timeout defaultTimeout = Timeout.TIMEOUT_60_SECONDS; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/FileEventConsumer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/FileEventConsumer.java deleted file mode 100644 index 6765fc4d13..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/FileEventConsumer.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.alibaba.acp.sdk.session.event.consumer; - -import com.alibaba.acp.sdk.protocol.agent.request.ReadTextFileRequest; -import com.alibaba.acp.sdk.protocol.agent.request.WriteTextFileRequest; -import com.alibaba.acp.sdk.protocol.client.response.ReadTextFileResponse.ReadTextFileResponseResult; -import com.alibaba.acp.sdk.protocol.client.response.WriteTextFileResponse.WriteTextFileResponseResult; -import com.alibaba.acp.sdk.session.event.consumer.exception.EventConsumeException; -import com.alibaba.acp.sdk.utils.Timeout; - -/** - * File Event Consumer Interface - * - * This interface defines methods for handling file-related events received from the AI agent, - * such as reading and writing text files. - * - * @author SkyFire - * @version 0.0.1 - */ -public interface FileEventConsumer { - /** - * Handles read text file requests from the agent - * - * @param request Read text file request from the agent - * @return Result of reading the file - * @throws EventConsumeException Thrown when an error occurs during event processing - */ - ReadTextFileResponseResult onReadTextFileRequest(ReadTextFileRequest request) throws EventConsumeException; - - /** - * Handles write text file requests from the agent - * - * @param request Write text file request from the agent - * @return Result of writing the file - * @throws EventConsumeException Thrown when an error occurs during event processing - */ - WriteTextFileResponseResult onWriteTextFileRequest(WriteTextFileRequest request) throws EventConsumeException; - - /** - * Gets timeout for read text file request processing - * - * @param message Read text file request message - * @return Timeout for processing the request - */ - Timeout onReadTextFileRequestTimeout(ReadTextFileRequest message); - - /** - * Gets timeout for write text file request processing - * - * @param message Write text file request message - * @return Timeout for processing the request - */ - Timeout onWriteTextFileRequestTimeout(WriteTextFileRequest message); -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/FileEventSimpleConsumer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/FileEventSimpleConsumer.java deleted file mode 100644 index ef8a7b50ec..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/FileEventSimpleConsumer.java +++ /dev/null @@ -1,168 +0,0 @@ -package com.alibaba.acp.sdk.session.event.consumer; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.util.Optional; - -import com.alibaba.acp.sdk.protocol.agent.request.ReadTextFileRequest; -import com.alibaba.acp.sdk.protocol.agent.request.ReadTextFileRequest.ReadTextFileRequestParams; -import com.alibaba.acp.sdk.protocol.agent.request.WriteTextFileRequest; -import com.alibaba.acp.sdk.protocol.client.response.ReadTextFileResponse.ReadTextFileResponseResult; -import com.alibaba.acp.sdk.protocol.client.response.WriteTextFileResponse.WriteTextFileResponseResult; -import com.alibaba.acp.sdk.session.event.consumer.exception.EventConsumeException; -import com.alibaba.acp.sdk.utils.Timeout; - -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang3.StringUtils; - -import static com.alibaba.acp.sdk.protocol.jsonrpc.Error.ErrorCode.INTERNAL_ERROR; -import static com.alibaba.acp.sdk.protocol.jsonrpc.Error.ErrorCode.INVALID_PARAMS; -import static com.alibaba.acp.sdk.protocol.jsonrpc.Error.ErrorCode.RESOURCE_NOT_FOUND; - -/** - * Simple File Event Consumer Implementation - * - * This class provides a simple implementation of the FileEventConsumer interface - * that handles file read and write operations. It supports reading text files with optional - * line range parameters and writing content to text files. - * - * @author SkyFire - * @version 0.0.1 - */ -public class FileEventSimpleConsumer implements FileEventConsumer { - @Override - public ReadTextFileResponseResult onReadTextFileRequest(ReadTextFileRequest request) throws EventConsumeException { - ReadTextFileResponseResult result = new ReadTextFileResponseResult(); - if (request == null) { - return result; - } - String filePath = request.getParams().getPath(); - if (StringUtils.isBlank(filePath)) { - return result; - } - File file = new File(filePath); - if (!file.exists()) { - throw new EventConsumeException().setError(RESOURCE_NOT_FOUND.getCode(), RESOURCE_NOT_FOUND.getDescription(), filePath); - } - int startLine = Optional.ofNullable(request.getParams()) - .map(ReadTextFileRequestParams::getLine) - .orElse(1); - int limit = Optional.ofNullable(request.getParams()).map(ReadTextFileRequestParams::getLimit).orElse(1000); - try { - StringBuilder content = new StringBuilder(); - try (BufferedReader br = new BufferedReader(new InputStreamReader(Files.newInputStream(file.toPath()), charset), 16384)) { - for (int i = 1; i < startLine; i++) { - if (br.readLine() == null) { - return result; - } - } - String line; - int count = 0; - while (count < limit && (line = br.readLine()) != null) { - content.append(line).append(File.separator); - count++; - } - } - result.setContent(content.toString()); - return result; - } catch (IOException e) { - throw new EventConsumeException("Failed to read file", e) - .setError(INTERNAL_ERROR.getCode(), INTERNAL_ERROR.getDescription(), filePath) - .addContextValue("filePath", filePath).addContextValue("startLine", startLine).addContextValue("limit", limit); - } - } - - @Override - public WriteTextFileResponseResult onWriteTextFileRequest(WriteTextFileRequest request) throws EventConsumeException { - if (request == null) { - throw new EventConsumeException().setError(INVALID_PARAMS.getCode(), INVALID_PARAMS.getDescription(), "writeTextFileRequest can't be null"); - } - String filePath = request.getParams().getPath(); - if (StringUtils.isBlank(filePath)) { - throw new EventConsumeException().setError(INVALID_PARAMS.getCode(), INVALID_PARAMS.getDescription(), "the path of writeTextFileRequest can't be null"); - } - File file = new File(filePath); - String content = request.getParams().getContent(); - try { - FileUtils.write(file, content, charset); - } catch (IOException e) { - throw new EventConsumeException("Failed to write file", e) - .setError(INTERNAL_ERROR.getCode(), INTERNAL_ERROR.getDescription(), filePath) - .addContextValue("filePath", filePath); - } - return new WriteTextFileResponseResult(); - } - - @Override - public Timeout onReadTextFileRequestTimeout(ReadTextFileRequest message) { - return readTimeout; - } - - @Override - public Timeout onWriteTextFileRequestTimeout(WriteTextFileRequest message) { - return writeTimeout; - } - - private Charset charset = StandardCharsets.UTF_8; - private Timeout readTimeout = Timeout.TIMEOUT_3_SECONDS; - private Timeout writeTimeout = Timeout.TIMEOUT_3_SECONDS; - - /** - * Gets the character set used for file operations - * - * @return The character set used for file operations - */ - public Charset getCharset() { - return charset; - } - - /** - * Sets the character set used for file operations - * - * @param charset The character set to use for file operations - */ - public void setCharset(Charset charset) { - this.charset = charset; - } - - /** - * Gets the timeout for read file operations - * - * @return The timeout for read file operations - */ - public Timeout getReadTimeout() { - return readTimeout; - } - - /** - * Sets the timeout for read file operations - * - * @param readTimeout The timeout for read file operations - */ - public void setReadTimeout(Timeout readTimeout) { - this.readTimeout = readTimeout; - } - - /** - * Gets the timeout for write file operations - * - * @return The timeout for write file operations - */ - public Timeout getWriteTimeout() { - return writeTimeout; - } - - /** - * Sets the timeout for write file operations - * - * @param writeTimeout The timeout for write file operations - */ - public void setWriteTimeout(Timeout writeTimeout) { - this.writeTimeout = writeTimeout; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/PermissionEventConsumer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/PermissionEventConsumer.java deleted file mode 100644 index 0bda5085ba..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/PermissionEventConsumer.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.alibaba.acp.sdk.session.event.consumer; - -import com.alibaba.acp.sdk.protocol.agent.request.RequestPermissionRequest; -import com.alibaba.acp.sdk.protocol.client.response.RequestPermissionResponse.RequestPermissionResponseResult; -import com.alibaba.acp.sdk.session.event.consumer.exception.EventConsumeException; -import com.alibaba.acp.sdk.utils.Timeout; - -/** - * Permission Event Consumer Interface - * - * This interface defines methods for handling permission-related events received from the AI agent, - * such as permission requests. - * - * @author SkyFire - * @version 0.0.1 - */ -public interface PermissionEventConsumer { - /** - * Handles permission requests from the agent - * - * @param request Permission request from the agent - * @return Result of processing the permission request - * @throws EventConsumeException Thrown when an error occurs during event processing - */ - RequestPermissionResponseResult onRequestPermissionRequest(RequestPermissionRequest request) throws EventConsumeException; - - /** - * Gets timeout for permission request processing - * - * @param request Permission request - * @return Timeout for processing the request - */ - Timeout onRequestPermissionRequestTimeout(RequestPermissionRequest request); -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/PromptEndEventConsumer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/PromptEndEventConsumer.java deleted file mode 100644 index eaf3398109..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/PromptEndEventConsumer.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.alibaba.acp.sdk.session.event.consumer; - -import com.alibaba.acp.sdk.protocol.agent.response.PromptResponse.PromptResponseResult; -import com.alibaba.acp.sdk.utils.Timeout; - -/** - * Prompt End Event Consumer Interface - * - * This interface defines methods for handling prompt completion events received from the AI agent. - * - * @author SkyFire - * @version 0.0.1 - */ -public interface PromptEndEventConsumer { - /** - * Handles prompt end events from the agent - * - * @param promptResponseResult Prompt response result indicating the end of a prompt - */ - void onPromptEnd(PromptResponseResult promptResponseResult); - - /** - * Gets timeout for prompt end event processing - * - * @param promptResponseResult Prompt response result - * @return Timeout for processing the event - */ - Timeout onPromptEndTimeout(PromptResponseResult promptResponseResult); -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/TerminalEventConsumer.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/TerminalEventConsumer.java deleted file mode 100644 index 016324943b..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/TerminalEventConsumer.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.alibaba.acp.sdk.session.event.consumer; - -import com.alibaba.acp.sdk.protocol.agent.request.terminal.CreateTerminalRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.KillTerminalCommandRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.ReleaseTerminalRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.TerminalOutputRequest; -import com.alibaba.acp.sdk.protocol.agent.request.terminal.WaitForTerminalExitRequest; -import com.alibaba.acp.sdk.protocol.client.response.terminal.CreateTerminalResponse.CreateTerminalResponseResult; -import com.alibaba.acp.sdk.protocol.client.response.terminal.KillTerminalCommandResponse.KillTerminalCommandResponseResult; -import com.alibaba.acp.sdk.protocol.client.response.terminal.ReleaseTerminalResponse.ReleaseTerminalResponseResult; -import com.alibaba.acp.sdk.protocol.client.response.terminal.TerminalOutputResponse.TerminalOutputResponseResult; -import com.alibaba.acp.sdk.protocol.client.response.terminal.WaitForTerminalExitResponse.WaitForTerminalExitResponseResult; -import com.alibaba.acp.sdk.session.event.consumer.exception.EventConsumeException; -import com.alibaba.acp.sdk.utils.Timeout; - -/** - * Terminal Event Consumer Interface - * - * This interface defines methods for handling terminal-related events received from the AI agent, - * such as creating terminals, waiting for terminal exit, releasing terminals, handling terminal output, and killing terminal commands. - * - * @author SkyFire - * @version 0.0.1 - */ -public interface TerminalEventConsumer { - /** - * Handles create terminal requests from the agent - * - * @param request Create terminal request from the agent - * @return Result of creating the terminal - * @throws EventConsumeException Thrown when an error occurs during event processing - */ - CreateTerminalResponseResult onCreateTerminalRequest(CreateTerminalRequest request) throws EventConsumeException; - - /** - * Handles wait for terminal exit requests from the agent - * - * @param request Wait for terminal exit request from the agent - * @return Result of waiting for terminal exit - * @throws EventConsumeException Thrown when an error occurs during event processing - */ - WaitForTerminalExitResponseResult onWaitForTerminalExitRequest(WaitForTerminalExitRequest request) throws EventConsumeException; - - /** - * Handles release terminal requests from the agent - * - * @param request Release terminal request from the agent - * @return Result of releasing the terminal - * @throws EventConsumeException Thrown when an error occurs during event processing - */ - ReleaseTerminalResponseResult onReleaseTerminalRequest(ReleaseTerminalRequest request) throws EventConsumeException; - - /** - * Handles terminal output requests from the agent - * - * @param request Terminal output request from the agent - * @return Result of processing terminal output - * @throws EventConsumeException Thrown when an error occurs during event processing - */ - TerminalOutputResponseResult onTerminalOutput(TerminalOutputRequest request) throws EventConsumeException; - - /** - * Handles kill terminal command requests from the agent - * - * @param request Kill terminal command request from the agent - * @return Result of killing the terminal command - * @throws EventConsumeException Thrown when an error occurs during event processing - */ - KillTerminalCommandResponseResult onKillTerminalCommandRequest(KillTerminalCommandRequest request) throws EventConsumeException; - - /** - * Gets timeout for create terminal request processing - * - * @param createTerminalRequest Create terminal request - * @return Timeout for processing the request - */ - Timeout onCreateTerminalRequestTimeout(CreateTerminalRequest createTerminalRequest); - - /** - * Gets timeout for wait for terminal exit request processing - * - * @param waitForTerminalExitRequest Wait for terminal exit request - * @return Timeout for processing the request - */ - Timeout onWaitForTerminalExitRequestTimeout(WaitForTerminalExitRequest waitForTerminalExitRequest); - - /** - * Gets timeout for release terminal request processing - * - * @param releaseTerminalRequest Release terminal request - * @return Timeout for processing the request - */ - Timeout onReleaseTerminalRequestTimeout(ReleaseTerminalRequest releaseTerminalRequest); - - /** - * Gets timeout for terminal output request processing - * - * @param terminalOutputRequest Terminal output request - * @return Timeout for processing the request - */ - Timeout onTerminalOutputRequestTimeout(TerminalOutputRequest terminalOutputRequest); - - /** - * Gets timeout for kill terminal command request processing - * - * @param killTerminalCommandRequest Kill terminal command request - * @return Timeout for processing the request - */ - Timeout onKillTerminalCommandRequestTimeout(KillTerminalCommandRequest killTerminalCommandRequest); -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/exception/EventConsumeException.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/exception/EventConsumeException.java deleted file mode 100644 index 7a575327ec..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/event/consumer/exception/EventConsumeException.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.alibaba.acp.sdk.session.event.consumer.exception; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Error; - -import org.apache.commons.lang3.exception.ContextedRuntimeException; -import org.apache.commons.lang3.exception.ExceptionContext; - -/** - * Exception thrown when an error occurs during event consumption. - * - * This exception is used to indicate problems that occur when processing events - * from an ACP agent, such as invalid request parameters or processing errors. - * It includes an error object that can be sent back to the agent. - * - * @author SkyFire - * @version 0.0.1 - */ -public class EventConsumeException extends ContextedRuntimeException { - /** - * Constructs a new EventConsumeException with no message or cause. - */ - public EventConsumeException() { - } - - /** - * Constructs a new EventConsumeException with the specified message. - * - * @param message The error message - */ - public EventConsumeException(String message) { - super(message); - } - - /** - * Constructs a new EventConsumeException with the specified message and cause. - * - * @param message The error message - * @param cause The underlying cause of the exception - */ - public EventConsumeException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructs a new EventConsumeException with the specified message, cause, and context. - * - * @param message The error message - * @param cause The underlying cause of the exception - * @param context The exception context - */ - public EventConsumeException(String message, Throwable cause, ExceptionContext context) { - super(message, cause, context); - } - - /** - * Constructs a new EventConsumeException with the specified cause. - * - * @param cause The underlying cause of the exception - */ - public EventConsumeException(Throwable cause) { - super(cause); - } - - private final Error error = new Error(); - - /** - * Sets the error details for this exception. - * - * @param code The error code - * @param message The error message - * @param detail Additional error details - * @return This exception instance for method chaining - */ - public EventConsumeException setError(int code, String message, Object detail) { - error.setCode(code); - error.setMessage(message); - error.setData(detail); - return this; - } - - /** - * Gets the error object associated with this exception. - * - * @return The error object that can be sent back to the agent - */ - public Error getError() { - return error; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/exception/SessionLoadException.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/exception/SessionLoadException.java deleted file mode 100644 index e44844fd0c..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/exception/SessionLoadException.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.alibaba.acp.sdk.session.exception; - -import org.apache.commons.lang3.exception.ContextedException; -import org.apache.commons.lang3.exception.ExceptionContext; - -/** - * Exception thrown when an error occurs during session creation. - * This exception is used to indicate problems that occur when attempting to create a new session - * with an ACP agent, such as communication errors or invalid session parameters. - * - * @author SkyFire - * @version 0.0.1 - */ -public class SessionLoadException extends ContextedException { - /** - * Constructs a new SessionLoadException with no message or cause. - */ - public SessionLoadException() { - } - - /** - * Constructs a new SessionLoadException with the specified message. - * - * @param message The error message - */ - public SessionLoadException(String message) { - super(message); - } - - /** - * Constructs a new SessionLoadException with the specified message and cause. - * - * @param message The error message - * @param cause The underlying cause of the exception - */ - public SessionLoadException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructs a new SessionLoadException with the specified message, cause, and context. - * - * @param message The error message - * @param cause The underlying cause of the exception - * @param context The exception context - */ - public SessionLoadException(String message, Throwable cause, ExceptionContext context) { - super(message, cause, context); - } - - /** - * Constructs a new SessionLoadException with the specified cause. - * - * @param cause The underlying cause of the exception - */ - public SessionLoadException(Throwable cause) { - super(cause); - } - - @Override - public SessionLoadException addContextValue(String label, Object value) { - super.addContextValue(label, value); - return this; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/exception/SessionNewException.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/exception/SessionNewException.java deleted file mode 100644 index 145c4dbda8..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/session/exception/SessionNewException.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.alibaba.acp.sdk.session.exception; - -import org.apache.commons.lang3.exception.ContextedException; -import org.apache.commons.lang3.exception.ExceptionContext; - -/** - * Exception thrown when an error occurs during session creation. - * - * This exception is used to indicate problems that occur when attempting to create a new session - * with an ACP agent, such as communication errors or invalid session parameters. - * - * @author SkyFire - * @version 0.0.1 - */ -public class SessionNewException extends ContextedException { - /** - * Constructs a new SessionNewException with no message or cause. - */ - public SessionNewException() { - } - - /** - * Constructs a new SessionNewException with the specified message. - * - * @param message The error message - */ - public SessionNewException(String message) { - super(message); - } - - /** - * Constructs a new SessionNewException with the specified message and cause. - * - * @param message The error message - * @param cause The underlying cause of the exception - */ - public SessionNewException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructs a new SessionNewException with the specified message, cause, and context. - * - * @param message The error message - * @param cause The underlying cause of the exception - * @param context The exception context - */ - public SessionNewException(String message, Throwable cause, ExceptionContext context) { - super(message, cause, context); - } - - /** - * Constructs a new SessionNewException with the specified cause. - * - * @param cause The underlying cause of the exception - */ - public SessionNewException(Throwable cause) { - super(cause); - } - - @Override - /** - * Adds a context value to the exception for debugging purposes. - * - * @param label The label for the context value - * @param value The context value - * @return This exception instance for method chaining - */ - public SessionNewException addContextValue(String label, Object value) { - super.addContextValue(label, value); - return this; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/transport/Transport.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/transport/Transport.java deleted file mode 100644 index 1258447f0d..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/transport/Transport.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.alibaba.acp.sdk.transport; - -import java.io.IOException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; -import java.util.function.Function; - -/** - * ACP (Agent Client Protocol) Transport Interface - * - * Defines the transport layer contract for communication with AI agents, including message sending, receiving, and connection management functions. - * Classes implementing this interface should provide a reliable message transmission mechanism. - * - * @author SkyFire - * @version 0.0.1 - */ -public interface Transport { - /** - * Checks if the transport is currently reading. - * - * @return true if reading, false otherwise - */ - boolean isReading(); - - /** - * Starts the transport. - * - * @throws IOException if starting fails - */ - void start() throws IOException; - - /** - * Closes the transport and releases resources. - * - * @throws IOException if closing fails - */ - void close() throws IOException; - - /** - * Checks if the transport is available for communication. - * - * @return true if available, false otherwise - */ - boolean isAvailable(); - - /** - * Sends a message and waits for a single-line response. - * - * @param message The message to send - * @return The response message - * @throws IOException if an I/O error occurs - * @throws ExecutionException if an execution error occurs - * @throws InterruptedException if the operation is interrupted - * @throws TimeoutException if the operation times out - */ - String inputWaitForOneLine(String message) throws IOException, ExecutionException, InterruptedException, TimeoutException; - - /** - * Sends a message and waits for a multi-line response. - * - * @param message The message to send - * @param callBackFunction A function to process each line of the response - * @throws IOException if an I/O error occurs - */ - void inputWaitForMultiLine(String message, Function callBackFunction) throws IOException; - - /** - * Sends a message without waiting for a response. - * - * @param message The message to send - * @throws IOException if an I/O error occurs - */ - void inputNoWaitResponse(String message) throws IOException; -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/transport/process/ProcessTransport.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/transport/process/ProcessTransport.java deleted file mode 100644 index 85493e5e1e..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/transport/process/ProcessTransport.java +++ /dev/null @@ -1,228 +0,0 @@ -package com.alibaba.acp.sdk.transport.process; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.lang.ProcessBuilder.Redirect; -import java.util.Optional; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.function.Consumer; -import java.util.function.Function; - -import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.exception.ContextedRuntimeException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.alibaba.acp.sdk.transport.Transport; -import com.alibaba.acp.sdk.utils.MyConcurrentUtils; -import com.alibaba.acp.sdk.utils.Timeout; - -/** - * Implementation of the Transport interface that communicates with the ACP agent via a process. - * This class manages a subprocess that communicates with an ACP-compatible agent, - * handling message exchange, process lifecycle, and error handling. - * - * @author SkyFire - * @version 0.0.1 - */ -public class ProcessTransport implements Transport { - private static final Logger log = LoggerFactory.getLogger(ProcessTransport.class); - - private final String cwd; - private final String[] commandArgs; - - protected Timeout turnTimeout; - protected Timeout messageTimeout; - - protected volatile Process process; - protected BufferedWriter processInput; - protected BufferedReader processOutput; - protected BufferedReader processError; - protected Future processErrorFuture; - protected final Consumer errorHandler; - - private final AtomicBoolean reading = new AtomicBoolean(false); - - /** - * Constructs a new ProcessTransport with the specified options. - * - * @param transportOptions The transport options to configure the process transport - */ - public ProcessTransport(ProcessTransportOptions transportOptions) { - Validate.notNull(transportOptions, "transportOptions can not be null"); - - Validate.notEmpty(transportOptions.getCommandArgs(), "commandArgs of transportOptions can't be empty"); - this.commandArgs = transportOptions.getCommandArgs(); - - this.cwd = Optional.ofNullable(transportOptions.getCwd()).orElse("./"); - this.turnTimeout = Optional.ofNullable(transportOptions.getTurnTimeout()).orElse(Timeout.TIMEOUT_30_MINUTES); - this.messageTimeout = Optional.ofNullable(transportOptions.getMessageTimeout()).orElse(Timeout.TIMEOUT_180_SECONDS); - this.errorHandler = Optional.ofNullable(transportOptions.getErrorHandler()).orElse((line) -> log.error("process error: {}", line)); - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isReading() { - return reading.get(); - } - - /** - * {@inheritDoc} - */ - @Override - public void start() throws IOException { - if (process != null) { - return; - } - ProcessBuilder processBuilder = new ProcessBuilder(commandArgs) - .redirectOutput(Redirect.PIPE) - .redirectInput(Redirect.PIPE) - .redirectError(Redirect.PIPE) - .redirectErrorStream(false) - .directory(new File(cwd)); - - process = processBuilder.start(); - processInput = new BufferedWriter(new OutputStreamWriter(process.getOutputStream())); - processOutput = new BufferedReader(new InputStreamReader(process.getInputStream())); - processError = new BufferedReader(new InputStreamReader(process.getErrorStream())); - startErrorReading(); - } - - /** - * {@inheritDoc} - */ - @Override - public void close() throws IOException { - if (process != null) { - process.getErrorStream().close(); - process.getOutputStream().close(); - process.getInputStream().close(); - process.destroy(); - } - if (processInput != null) { - processInput.close(); - } - if (processOutput != null) { - processOutput.close(); - } - if (processError != null) { - processError.close(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isAvailable() { - return process != null && process.isAlive(); - } - - /** - * {@inheritDoc} - */ - @Override - public String inputWaitForOneLine(String message) throws IOException, ExecutionException, InterruptedException, TimeoutException { - return inputWaitForOneLine(message, turnTimeout); - } - - private String inputWaitForOneLine(String message, Timeout timeOut) - throws IOException, TimeoutException, InterruptedException, ExecutionException { - inputNoWaitResponse(message); - try { - reading.set(true); - String line = MyConcurrentUtils.runAndWait(() -> { - try { - return processOutput.readLine(); - } catch (IOException e) { - throw new ContextedRuntimeException("read line error", e) - .addContextValue("message", message); - } - }, timeOut); - log.trace("inputWaitForOneLine result: {}", line); - return line; - } finally { - reading.set(false); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void inputWaitForMultiLine(String message, Function callBackFunction) throws IOException { - inputWaitForMultiLine(message, callBackFunction, turnTimeout); - } - - private void inputWaitForMultiLine(String message, Function callBackFunction, Timeout timeOut) throws IOException { - log.trace("input message for multiLine: {}", message); - inputNoWaitResponse(message); - MyConcurrentUtils.runAndWait(() -> iterateOutput(callBackFunction), timeOut); - } - - /** - * {@inheritDoc} - */ - @Override - public void inputNoWaitResponse(String message) throws IOException { - log.trace("input message to process: {}", message); - processInput.write(message); - processInput.newLine(); - processInput.flush(); - } - - private void startErrorReading() { - processErrorFuture = MyConcurrentUtils.asyncRun(() -> { - try { - for (; ; ) { - final String line = processError.readLine(); - if (line == null) { - break; - } - if (errorHandler != null) { - try { - MyConcurrentUtils.runAndWait(() -> errorHandler.accept(line), messageTimeout); - } catch (Exception e) { - log.warn("error handler error", e); - } - } - } - } catch (IOException e) { - log.warn("Failed read error {}, caused by {}", e.getMessage(), e.getCause(), e); - } - }, (e, t) -> log.warn("read error {}", t.getMessage(), t)); - } - - private void iterateOutput(Function callBackFunction) { - try { - reading.set(true); - MyConcurrentUtils.runAndWait(() -> { - try { - for (; ; ) { - String line = processOutput.readLine(); - if (line == null) { - break; - } - log.trace("read a message from process {}", line); - if (callBackFunction.apply(line)) { - break; - } - } - } catch (IOException e) { - throw new RuntimeException("read process output error", e); - } - }, messageTimeout); - } finally { - reading.set(false); - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/transport/process/ProcessTransportOptions.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/transport/process/ProcessTransportOptions.java deleted file mode 100644 index ca95af4148..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/transport/process/ProcessTransportOptions.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.alibaba.acp.sdk.transport.process; - -import java.util.function.Consumer; - -import com.alibaba.acp.sdk.utils.Timeout; - -/** - * Options for configuring ProcessTransport - * - * This class provides configuration options for ProcessTransport, including working directory, - * command arguments, error handling, and timeouts for different operations. - * - * @author SkyFire - * @version 0.0.1 - */ -public class ProcessTransportOptions { - private String cwd; - private String[] commandArgs; - private Consumer errorHandler; - private Timeout turnTimeout; - private Timeout messageTimeout; - - /** - * Gets the current working directory for the process - * - * @return The current working directory - */ - public String getCwd() { - return cwd; - } - - /** - * Sets the current working directory for the process - * - * @param cwd The current working directory - * @return Current instance for method chaining - */ - public ProcessTransportOptions setCwd(String cwd) { - this.cwd = cwd; - return this; - } - - /** - * Gets the command arguments for the process - * - * @return Array of command arguments - */ - public String[] getCommandArgs() { - return commandArgs; - } - - /** - * Sets the command arguments for the process - * - * @param commandArgs Array of command arguments - * @return Current instance for method chaining - */ - public ProcessTransportOptions setCommandArgs(String[] commandArgs) { - this.commandArgs = commandArgs; - return this; - } - - /** - * Gets the error handler for processing error messages - * - * @return Consumer for handling error messages - */ - public Consumer getErrorHandler() { - return errorHandler; - } - - /** - * Sets the error handler for processing error messages - * - * @param errorHandler Consumer for handling error messages - * @return Current instance for method chaining - */ - public ProcessTransportOptions setErrorHandler(Consumer errorHandler) { - this.errorHandler = errorHandler; - return this; - } - - /** - * Gets the timeout for a turn (conversation round) - * - * @return Timeout for a turn - */ - public Timeout getTurnTimeout() { - return turnTimeout; - } - - /** - * Sets the timeout for a turn (conversation round) - * - * @param turnTimeout Timeout for a turn - * @return Current instance for method chaining - */ - public ProcessTransportOptions setTurnTimeout(Timeout turnTimeout) { - this.turnTimeout = turnTimeout; - return this; - } - - /** - * Gets the timeout for individual messages - * - * @return Timeout for individual messages - */ - public Timeout getMessageTimeout() { - return messageTimeout; - } - - /** - * Sets the timeout for individual messages - * - * @param messageTimeout Timeout for individual messages - * @return Current instance for method chaining - */ - public ProcessTransportOptions setMessageTimeout(Timeout messageTimeout) { - this.messageTimeout = messageTimeout; - return this; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/AgentInitializeException.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/AgentInitializeException.java deleted file mode 100644 index e91febad15..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/AgentInitializeException.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.alibaba.acp.sdk.utils; - -import org.apache.commons.lang3.exception.ContextedException; -import org.apache.commons.lang3.exception.ExceptionContext; - -/** - * Exception thrown when an error occurs during agent initialization. - * - * This exception is used to indicate problems that occur when attempting to initialize - * communication with an ACP agent, such as connection errors or protocol mismatches. - * - * @author SkyFire - * @version 0.0.1 - */ -public class AgentInitializeException extends ContextedException { - /** - * Constructs a new AgentInitializeException with no message or cause. - */ - public AgentInitializeException() { - } - - /** - * Constructs a new AgentInitializeException with the specified message. - * - * @param message The error message - */ - public AgentInitializeException(String message) { - super(message); - } - - /** - * Constructs a new AgentInitializeException with the specified message and cause. - * - * @param message The error message - * @param cause The underlying cause of the exception - */ - public AgentInitializeException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructs a new AgentInitializeException with the specified message, cause, and context. - * - * @param message The error message - * @param cause The underlying cause of the exception - * @param context The exception context - */ - public AgentInitializeException(String message, Throwable cause, ExceptionContext context) { - super(message, cause, context); - } - - /** - * Constructs a new AgentInitializeException with the specified cause. - * - * @param cause The underlying cause of the exception - */ - public AgentInitializeException(Throwable cause) { - super(cause); - } - - @Override - /** - * Adds a context value to the exception for debugging purposes. - * - * @param label The label for the context value - * @param value The context value - * @return This exception instance for method chaining - */ - public AgentInitializeException addContextValue(String label, Object value) { - super.addContextValue(label, value); - return this; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/MyConcurrentUtils.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/MyConcurrentUtils.java deleted file mode 100644 index c25cc639eb..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/MyConcurrentUtils.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.alibaba.acp.sdk.utils; - -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeoutException; -import java.util.function.BiConsumer; -import java.util.function.Supplier; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Utility class for concurrent operations. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class MyConcurrentUtils { - private static final Logger log = LoggerFactory.getLogger(MyConcurrentUtils.class); - - /** - * Runs a task and waits for it to complete with a timeout. - * - * @param runnable The task to run - * @param timeOut The timeout for the operation - */ - public static void runAndWait(Runnable runnable, Timeout timeOut) { - CompletableFuture future = CompletableFuture.runAsync(runnable, ThreadPoolConfig.getExecutor()); - try { - future.get(timeOut.getValue(), timeOut.getUnit()); - } catch (InterruptedException e) { - log.warn("task interrupted", e); - future.cancel(true); - } catch (TimeoutException e) { - log.warn("Operation timed out", e); - future.cancel(true); - } catch (Exception e) { - future.cancel(true); - log.warn("Operation error", e); - } - } - - /** - * Runs a task that returns a value and waits for it to complete with a timeout. - * - * @param supplier The task to run - * @param timeOut The timeout for the operation - * @param The type of the result - * @return The result of the task - * @throws ExecutionException if an execution error occurs - * @throws InterruptedException if the operation is interrupted - * @throws TimeoutException if the operation times out - */ - public static T runAndWait(Supplier supplier, Timeout timeOut) throws ExecutionException, InterruptedException, TimeoutException { - CompletableFuture future = CompletableFuture.supplyAsync(supplier, ThreadPoolConfig.getExecutor()); - try { - return future.get(timeOut.getValue(), timeOut.getUnit()); - } catch (TimeoutException | InterruptedException | ExecutionException e) { - future.cancel(true); - throw e; - } - } - - /** - * Runs a task asynchronously and returns a future for the result. - * - * @param runnable The task to run - * @param errorCallback The callback to invoke if an error occurs - * @return A future for the result - */ - public static Future asyncRun(Runnable runnable, BiConsumer errorCallback) { - CompletableFuture future = CompletableFuture.runAsync(() -> { - try { - runnable.run(); - } catch (Exception e) { - log.warn("async task error", e); - } - }, ThreadPoolConfig.getExecutor()); - future.whenComplete(errorCallback); - return future; - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/ThreadPoolConfig.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/ThreadPoolConfig.java deleted file mode 100644 index f9d75b8f50..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/ThreadPoolConfig.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.alibaba.acp.sdk.utils; - -import java.util.Optional; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Supplier; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Configuration for the thread pool used by the SDK. - * - * @author SkyFire - * @version 0.0.1 - */ -public class ThreadPoolConfig { - private static final Logger logger = LoggerFactory.getLogger(ThreadPoolConfig.class); - - private static final ThreadPoolExecutor defaultExecutor = new ThreadPoolExecutor( - 30, 100, 60L, TimeUnit.SECONDS, - new LinkedBlockingQueue<>(300), - new ThreadFactory() { - private final AtomicInteger threadNumber = new AtomicInteger(1); - - @Override - public Thread newThread(Runnable r) { - Thread t = new Thread(r, "acp-client-pool-" + threadNumber.getAndIncrement()); - t.setDaemon(false); - return t; - } - }, - new ThreadPoolExecutor.CallerRunsPolicy() // 拒绝策略 - ); - - private static Supplier executorSupplier; - - /** - * Sets the supplier for the executor. - * - * @param executorSupplier The supplier for the executor - */ - public static void setExecutorSupplier(Supplier executorSupplier) { - ThreadPoolConfig.executorSupplier = executorSupplier; - } - - /** - * Gets the default executor. - * - * @return The default executor - */ - public static ThreadPoolExecutor getDefaultExecutor() { - return defaultExecutor; - } - - static ExecutorService getExecutor() { - return Optional.ofNullable(executorSupplier).map(s -> { - try { - return s.get(); - } catch (Exception e) { - logger.warn("Failed to getExecutor, will use defaultExecutor", e); - return defaultExecutor; - } - }).orElse(defaultExecutor); - } - - public static void shutdown() { - defaultExecutor.shutdownNow(); - if (getExecutor() != defaultExecutor) { - getExecutor().shutdownNow(); - } - } -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/Timeout.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/Timeout.java deleted file mode 100644 index e6ee5bb151..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/Timeout.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.alibaba.acp.sdk.utils; - -import java.util.concurrent.TimeUnit; - -import org.apache.commons.lang3.Validate; - -/** - * Represents a timeout value with a time unit. - * - * @author SkyFire - * @version 0.0.1 - */ -public class Timeout { - /** - * The timeout value. - */ - private final Long value; - /** - * The time unit. - */ - private final TimeUnit unit; - - /** - * Creates a new Timeout instance. - * - * @param value The timeout value - * @param unit The time unit - */ - public Timeout(Long value, TimeUnit unit) { - Validate.notNull(value, "value can not be null"); - Validate.notNull(unit, "unit can not be null"); - this.value = value; - this.unit = unit; - } - - /** - * Gets the timeout value. - * - * @return The timeout value - */ - public Long getValue() { - return value; - } - - /** - * Gets the time unit. - * - * @return The time unit - */ - public TimeUnit getUnit() { - return unit; - } - - /** A timeout of 3 seconds. - */ - public static final Timeout TIMEOUT_3_SECONDS = new Timeout(3L, TimeUnit.SECONDS); - - /** - * A timeout of 60 seconds. - */ - public static final Timeout TIMEOUT_60_SECONDS = new Timeout(60L, TimeUnit.SECONDS); - - /** - * A timeout of 180 seconds. - */ - public static final Timeout TIMEOUT_180_SECONDS = new Timeout(180L, TimeUnit.SECONDS); - - /** - * A timeout of 30 minutes. - */ - public static final Timeout TIMEOUT_30_MINUTES = new Timeout(60L, TimeUnit.MINUTES); -} diff --git a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/TransportUtils.java b/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/TransportUtils.java deleted file mode 100644 index 49b147f14a..0000000000 --- a/packages/sdk-java/client/src/main/java/com/alibaba/acp/sdk/utils/TransportUtils.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.alibaba.acp.sdk.utils; - -import java.io.IOException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; - -import com.alibaba.acp.sdk.protocol.jsonrpc.Message; -import com.alibaba.acp.sdk.transport.Transport; -import com.alibaba.fastjson2.JSON; - -/** - * Transport Utilities Class - * - * Provides common utility methods related to the transport layer, such as sending messages and waiting for single-line responses. - * - * @author SkyFire - * @version 0.0.1 - */ -public class TransportUtils { - /** - * Sends a message and waits for a single-line response through the transport layer - * - * Sends the message to the transport layer, waits and receives a single-line response, then parses it into an object of the specified type. - * - * @param transport Transport instance for sending and receiving messages - * @param message Message object to send - * @param responseClass Target type for the response message - * @param Type of the response object - * @return Parsed response object - * @throws IOException Thrown when IO operations fail - * @throws ExecutionException Thrown when an error occurs during execution - * @throws InterruptedException Thrown when the operation is interrupted - * @throws TimeoutException Thrown when the operation times out - */ - public static C inputWaitForOneLine(Transport transport, Message message, Class responseClass) throws IOException, ExecutionException, InterruptedException, TimeoutException { - return JSON.parseObject(transport.inputWaitForOneLine(message.toString()), responseClass); - } -} diff --git a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/PermissionOptionKindTest.java b/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/PermissionOptionKindTest.java deleted file mode 100644 index d7c51d16ac..0000000000 --- a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/PermissionOptionKindTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.session; - -import com.alibaba.acp.sdk.protocol.domain.permission.PermissionOptionKind; -import com.alibaba.fastjson2.JSON; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class PermissionOptionKindTest { - - @Test - public void testJson() { - PermissionOptionKind kind = PermissionOptionKind.ALLOW_ONCE; - assertEquals("\"allow_once\"", JSON.toJSONString(kind)); - assertEquals(PermissionOptionKind.ALLOW_ONCE, JSON.parseObject("\"allow_once\"", PermissionOptionKind.class)); - - kind = PermissionOptionKind.ALLOW_ALWAYS; - assertEquals("\"allow_always\"", JSON.toJSONString(kind)); - assertEquals(PermissionOptionKind.ALLOW_ALWAYS, JSON.parseObject("\"allow_always\"", PermissionOptionKind.class)); - - kind = PermissionOptionKind.REJECT_ONCE; - assertEquals("\"reject_once\"", JSON.toJSONString(kind)); - assertEquals(PermissionOptionKind.REJECT_ONCE, JSON.parseObject("\"reject_once\"", PermissionOptionKind.class)); - - kind = PermissionOptionKind.REJECT_ALWAYS; - assertEquals("\"reject_always\"", JSON.toJSONString(kind)); - assertEquals(PermissionOptionKind.REJECT_ALWAYS, JSON.parseObject("\"reject_always\"", PermissionOptionKind.class)); - } - -} diff --git a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/PlanEntryPriorityTest.java b/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/PlanEntryPriorityTest.java deleted file mode 100644 index 2a8ce41f56..0000000000 --- a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/PlanEntryPriorityTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.session; - -import com.alibaba.acp.sdk.protocol.domain.plan.PlanEntryPriority; -import com.alibaba.fastjson2.JSON; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class PlanEntryPriorityTest { - - @Test - public void testJson() { - PlanEntryPriority priority = PlanEntryPriority.HIGH; - assertEquals("\"high\"", JSON.toJSONString(priority)); - assertEquals(PlanEntryPriority.HIGH, JSON.parseObject("\"high\"", PlanEntryPriority.class)); - - priority = PlanEntryPriority.MEDIUM; - assertEquals("\"medium\"", JSON.toJSONString(priority)); - assertEquals(PlanEntryPriority.MEDIUM, JSON.parseObject("\"medium\"", PlanEntryPriority.class)); - - priority = PlanEntryPriority.LOW; - assertEquals("\"low\"", JSON.toJSONString(priority)); - assertEquals(PlanEntryPriority.LOW, JSON.parseObject("\"low\"", PlanEntryPriority.class)); - } - -} diff --git a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/PlanEntryStatusTest.java b/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/PlanEntryStatusTest.java deleted file mode 100644 index 6880a5b047..0000000000 --- a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/PlanEntryStatusTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.session; - -import com.alibaba.acp.sdk.protocol.domain.plan.PlanEntryStatus; -import com.alibaba.fastjson2.JSON; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class PlanEntryStatusTest { - - @Test - public void testJson() { - PlanEntryStatus status = PlanEntryStatus.PENDING; - assertEquals("\"pending\"", JSON.toJSONString(status)); - assertEquals(PlanEntryStatus.PENDING, JSON.parseObject("\"pending\"", PlanEntryStatus.class)); - - status = PlanEntryStatus.IN_PROGRESS; - assertEquals("\"in_progress\"", JSON.toJSONString(status)); - assertEquals(PlanEntryStatus.IN_PROGRESS, JSON.parseObject("\"in_progress\"", PlanEntryStatus.class)); - - status = PlanEntryStatus.COMPLETED; - assertEquals("\"completed\"", JSON.toJSONString(status)); - assertEquals(PlanEntryStatus.COMPLETED, JSON.parseObject("\"completed\"", PlanEntryStatus.class)); - } - -} diff --git a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/StopReasonTest.java b/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/StopReasonTest.java deleted file mode 100644 index 483d3ed10a..0000000000 --- a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/StopReasonTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.session; - -import com.alibaba.acp.sdk.protocol.domain.session.StopReason; -import com.alibaba.fastjson2.JSON; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class StopReasonTest { - - @Test - public void testJson() { - StopReason reason = StopReason.END_TURN; - assertEquals("\"end_turn\"", JSON.toJSONString(reason)); - assertEquals(StopReason.END_TURN, JSON.parseObject("\"end_turn\"", StopReason.class)); - - reason = StopReason.MAX_TOKENS; - assertEquals("\"max_tokens\"", JSON.toJSONString(reason)); - assertEquals(StopReason.MAX_TOKENS, JSON.parseObject("\"max_tokens\"", StopReason.class)); - - reason = StopReason.MAX_TURN_REQUESTS; - assertEquals("\"max_turn_requests\"", JSON.toJSONString(reason)); - assertEquals(StopReason.MAX_TURN_REQUESTS, JSON.parseObject("\"max_turn_requests\"", StopReason.class)); - - reason = StopReason.REFUSAL; - assertEquals("\"refusal\"", JSON.toJSONString(reason)); - assertEquals(StopReason.REFUSAL, JSON.parseObject("\"refusal\"", StopReason.class)); - - reason = StopReason.CANCELLED; - assertEquals("\"cancelled\"", JSON.toJSONString(reason)); - assertEquals(StopReason.CANCELLED, JSON.parseObject("\"cancelled\"", StopReason.class)); - } - -} diff --git a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/ToolCallStatusTest.java b/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/ToolCallStatusTest.java deleted file mode 100644 index 2d212b3f44..0000000000 --- a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/ToolCallStatusTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.session; - -import com.alibaba.acp.sdk.protocol.domain.tool.ToolCallStatus; -import com.alibaba.fastjson2.JSON; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class ToolCallStatusTest { - - @Test - public void testJson() { - ToolCallStatus status = ToolCallStatus.PENDING; - assertEquals("\"pending\"", JSON.toJSONString(status)); - assertEquals(ToolCallStatus.PENDING, JSON.parseObject("\"pending\"", ToolCallStatus.class)); - - status = ToolCallStatus.IN_PROGRESS; - assertEquals("\"in_progress\"", JSON.toJSONString(status)); - assertEquals(ToolCallStatus.IN_PROGRESS, JSON.parseObject("\"in_progress\"", ToolCallStatus.class)); - - status = ToolCallStatus.COMPLETED; - assertEquals("\"completed\"", JSON.toJSONString(status)); - assertEquals(ToolCallStatus.COMPLETED, JSON.parseObject("\"completed\"", ToolCallStatus.class)); - - status = ToolCallStatus.FAILED; - assertEquals("\"failed\"", JSON.toJSONString(status)); - assertEquals(ToolCallStatus.FAILED, JSON.parseObject("\"failed\"", ToolCallStatus.class)); - } - -} diff --git a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/ToolKindTest.java b/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/ToolKindTest.java deleted file mode 100644 index 69cba5388e..0000000000 --- a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/protocol/client/session/ToolKindTest.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.alibaba.acp.sdk.protocol.client.session; - -import com.alibaba.acp.sdk.protocol.domain.tool.ToolKind; -import com.alibaba.fastjson2.JSON; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class ToolKindTest { - - @Test - public void testJson() { - ToolKind kind = ToolKind.READ; - assertEquals("\"read\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.READ, JSON.parseObject("\"read\"", ToolKind.class)); - - kind = ToolKind.EDIT; - assertEquals("\"edit\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.EDIT, JSON.parseObject("\"edit\"", ToolKind.class)); - - kind = ToolKind.DELETE; - assertEquals("\"delete\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.DELETE, JSON.parseObject("\"delete\"", ToolKind.class)); - - kind = ToolKind.MOVE; - assertEquals("\"move\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.MOVE, JSON.parseObject("\"move\"", ToolKind.class)); - - kind = ToolKind.SEARCH; - assertEquals("\"search\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.SEARCH, JSON.parseObject("\"search\"", ToolKind.class)); - - kind = ToolKind.EXECUTE; - assertEquals("\"execute\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.EXECUTE, JSON.parseObject("\"execute\"", ToolKind.class)); - - kind = ToolKind.THINK; - assertEquals("\"think\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.THINK, JSON.parseObject("\"think\"", ToolKind.class)); - - kind = ToolKind.FETCH; - assertEquals("\"fetch\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.FETCH, JSON.parseObject("\"fetch\"", ToolKind.class)); - - kind = ToolKind.SWITCH_MODE; - assertEquals("\"switch_mode\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.SWITCH_MODE, JSON.parseObject("\"switch_mode\"", ToolKind.class)); - - kind = ToolKind.OTHER; - assertEquals("\"other\"", JSON.toJSONString(kind)); - assertEquals(ToolKind.OTHER, JSON.parseObject("\"other\"", ToolKind.class)); - } - -} diff --git a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/session/SessionTest.java b/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/session/SessionTest.java deleted file mode 100644 index 81972c0183..0000000000 --- a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/session/SessionTest.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.alibaba.acp.sdk.session; - -import java.io.IOException; -import java.util.Collections; -import java.util.Optional; - -import com.alibaba.acp.sdk.AcpClient; -import com.alibaba.acp.sdk.protocol.domain.client.ClientCapabilities; -import com.alibaba.acp.sdk.protocol.domain.client.ClientCapabilities.FileSystemCapability; -import com.alibaba.acp.sdk.protocol.domain.content.block.TextContent; -import com.alibaba.acp.sdk.protocol.domain.permission.PermissionOption; -import com.alibaba.acp.sdk.protocol.domain.permission.RequestPermissionOutcome; -import com.alibaba.acp.sdk.protocol.domain.session.update.AgentMessageChunkSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.AvailableCommandsUpdateSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.CurrentModeUpdateSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.PlanSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.ToolCallSessionUpdate; -import com.alibaba.acp.sdk.protocol.domain.session.update.ToolCallUpdateSessionUpdate; -import com.alibaba.acp.sdk.session.event.consumer.ContentEventSimpleConsumer; -import com.alibaba.acp.sdk.session.event.consumer.FileEventSimpleConsumer; -import com.alibaba.acp.sdk.utils.AgentInitializeException; -import com.alibaba.acp.sdk.protocol.agent.request.RequestPermissionRequest; -import com.alibaba.acp.sdk.protocol.agent.request.RequestPermissionRequest.RequestPermissionRequestParams; -import com.alibaba.acp.sdk.protocol.client.request.InitializeRequest.InitializeRequestParams; -import com.alibaba.acp.sdk.protocol.client.request.NewSessionRequest.NewSessionRequestParams; -import com.alibaba.acp.sdk.protocol.client.response.RequestPermissionResponse.RequestPermissionResponseResult; -import com.alibaba.acp.sdk.protocol.domain.permission.PermissionOutcomeKind; -import com.alibaba.acp.sdk.protocol.jsonrpc.MethodMessage; -import com.alibaba.acp.sdk.session.event.consumer.AgentEventConsumer; -import com.alibaba.acp.sdk.session.event.consumer.PermissionEventConsumer; -import com.alibaba.acp.sdk.session.event.consumer.exception.EventConsumeException; -import com.alibaba.acp.sdk.session.exception.SessionNewException; -import com.alibaba.acp.sdk.transport.Transport; -import com.alibaba.acp.sdk.transport.process.ProcessTransport; -import com.alibaba.acp.sdk.transport.process.ProcessTransportOptions; -import com.alibaba.acp.sdk.utils.Timeout; - -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static com.alibaba.acp.sdk.protocol.domain.permission.PermissionOptionKind.ALLOW_ALWAYS; - -class SessionTest { - private static final Logger logger = LoggerFactory.getLogger(SessionTest.class); - @Test - public void testSession() throws AgentInitializeException, SessionNewException, IOException { - AcpClient acpClient = new AcpClient(new ProcessTransport(new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "-y"}))); - try { - acpClient.sendPrompt(Collections.singletonList(new TextContent("你是谁")), new AgentEventConsumer().setContentEventConsumer(new ContentEventSimpleConsumer(){ - @Override - public void onAgentMessageChunkSessionUpdate(AgentMessageChunkSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onAvailableCommandsUpdateSessionUpdate(AvailableCommandsUpdateSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onCurrentModeUpdateSessionUpdate(CurrentModeUpdateSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onPlanSessionUpdate(PlanSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onToolCallUpdateSessionUpdate(ToolCallUpdateSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - - @Override - public void onToolCallSessionUpdate(ToolCallSessionUpdate sessionUpdate) { - logger.info(sessionUpdate.toString()); - } - })); - } finally { - acpClient.close(); - } - } - - @Test - void test() throws SessionNewException, AgentInitializeException, IOException { - Transport transport = new ProcessTransport( - new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "-y"})); - AcpClient acpClient = new AcpClient(transport, new InitializeRequestParams().setClientCapabilities( - new ClientCapabilities() - .setTerminal(true) - .setFs(new FileSystemCapability().setReadTextFile(true).setWriteTextFile(true)))); - Session session = acpClient.newSession(new NewSessionRequestParams()); - session.sendPrompt(Collections.singletonList(new TextContent("你是谁")), new AgentEventConsumer()); - } - - @Test - void testPermission() throws AgentInitializeException, SessionNewException, IOException { - Transport transport = new ProcessTransport( - new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp"})); - AcpClient acpClient = new AcpClient(transport, new InitializeRequestParams().setClientCapabilities( - new ClientCapabilities() - .setTerminal(false) - .setFs(new FileSystemCapability(true, true)))); - Session session = acpClient.newSession(new NewSessionRequestParams()); - session.sendPrompt(Collections.singletonList(new TextContent("创建一个test.touch文件")) - , new AgentEventConsumer().setFileEventConsumer(new FileEventSimpleConsumer()).setPermissionEventConsumer(new PermissionEventConsumer() { - @Override - public RequestPermissionResponseResult onRequestPermissionRequest(RequestPermissionRequest request) throws EventConsumeException { - return new RequestPermissionResponseResult(new RequestPermissionOutcome(). - setOptionId(Optional.of(request) - .map(MethodMessage::getParams) - .map(RequestPermissionRequestParams::getOptions) - .flatMap(options -> options.stream() - .filter(option -> ALLOW_ALWAYS.equals(option.getKind())) - .findFirst()) - .map(PermissionOption::getOptionId).orElse(null)) - .setOutcome(PermissionOutcomeKind.SELECTED)); - } - - @Override - public Timeout onRequestPermissionRequestTimeout(RequestPermissionRequest request) { - return Timeout.TIMEOUT_60_SECONDS; - } - })); - } -} diff --git a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/test/EnumTest.java b/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/test/EnumTest.java deleted file mode 100644 index 68e3bdfebc..0000000000 --- a/packages/sdk-java/client/src/test/java/com/alibaba/acp/sdk/test/EnumTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.alibaba.acp.sdk.test; - -import com.alibaba.acp.sdk.protocol.domain.plan.PlanEntryStatus; -import com.alibaba.fastjson2.JSON; - -public class EnumTest { - public static void main(String[] args) { - // Test PlanEntryStatus enum - PlanEntryStatus status = PlanEntryStatus.PENDING; - String json = JSON.toJSONString(status); - System.out.println("JSON output: " + json); - - PlanEntryStatus parsed = JSON.parseObject("\"pending\"", PlanEntryStatus.class); - System.out.println("Parsed enum: " + parsed); - - if ("\"pending\"".equals(json) && PlanEntryStatus.PENDING == parsed) { - System.out.println("SUCCESS: PlanEntryStatus enum works correctly!"); - } else { - System.out.println("FAILURE: PlanEntryStatus enum not working properly"); - } - } -} diff --git a/packages/sdk-java/client/src/test/resources/schema/schema.json b/packages/sdk-java/client/src/test/resources/schema/schema.json deleted file mode 100644 index eba1794570..0000000000 --- a/packages/sdk-java/client/src/test/resources/schema/schema.json +++ /dev/null @@ -1,3105 +0,0 @@ -{ - "$defs": { - "AgentCapabilities": { - "description": "Capabilities supported by the agent.\n\nAdvertised during initialization to inform the client about\navailable features and content types.\n\nSee protocol docs: [Agent Capabilities](https://agentclientprotocol.com/protocol/initialization#agent-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "loadSession": { - "default": false, - "description": "Whether the agent supports `session/load`.", - "type": "boolean" - }, - "mcpCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/McpCapabilities" - } - ], - "default": { - "http": false, - "sse": false - }, - "description": "MCP capabilities supported by the agent." - }, - "promptCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/PromptCapabilities" - } - ], - "default": { - "audio": false, - "embeddedContext": false, - "image": false - }, - "description": "Prompt capabilities supported by the agent." - }, - "sessionCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/SessionCapabilities" - } - ], - "default": {} - } - }, - "type": "object" - }, - "AgentNotification": { - "properties": { - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/SessionNotification" - } - ], - "description": "Handles session update notifications from the agent.\n\nThis is a notification endpoint (no response expected) that receives\nreal-time updates about session progress, including message chunks,\ntool calls, and execution plans.\n\nNote: Clients SHOULD continue accepting tool call updates even after\nsending a `session/cancel` notification, as the agent may send final\nupdates before responding with the cancelled stop reason.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "title": "SessionNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtNotification" - } - ], - "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" - } - ], - "description": "All possible notifications that an agent can send to a client.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly - use the notification methods on the [`Client`] trait instead.\n\nNotifications do not expect a response." - }, - { - "type": "null" - } - ] - } - }, - "required": ["method"], - "type": "object", - "x-docs-ignore": true - }, - "AgentRequest": { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/WriteTextFileRequest" - } - ], - "description": "Writes content to a text file in the client's file system.\n\nOnly available if the client advertises the `fs.writeTextFile` capability.\nAllows the agent to create or modify files within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "WriteTextFileRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReadTextFileRequest" - } - ], - "description": "Reads content from a text file in the client's file system.\n\nOnly available if the client advertises the `fs.readTextFile` capability.\nAllows the agent to access file contents within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "ReadTextFileRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/RequestPermissionRequest" - } - ], - "description": "Requests permission from the user for a tool call operation.\n\nCalled by the agent when it needs user authorization before executing\na potentially sensitive operation. The client should present the options\nto the user and return their decision.\n\nIf the client cancels the prompt turn via `session/cancel`, it MUST\nrespond to this request with `RequestPermissionOutcome::Cancelled`.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", - "title": "RequestPermissionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CreateTerminalRequest" - } - ], - "description": "Executes a command in a new terminal\n\nOnly available if the `terminal` Client capability is set to `true`.\n\nReturns a `TerminalId` that can be used with other terminal methods\nto get the current output, wait for exit, and kill the command.\n\nThe `TerminalId` can also be used to embed the terminal in a tool call\nby using the `ToolCallContent::Terminal` variant.\n\nThe Agent is responsible for releasing the terminal by using the `terminal/release`\nmethod.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "CreateTerminalRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/TerminalOutputRequest" - } - ], - "description": "Gets the terminal output and exit status\n\nReturns the current content in the terminal without waiting for the command to exit.\nIf the command has already exited, the exit status is included.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "TerminalOutputRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReleaseTerminalRequest" - } - ], - "description": "Releases a terminal\n\nThe command is killed if it hasn't exited yet. Use `terminal/wait_for_exit`\nto wait for the command to exit before releasing the terminal.\n\nAfter release, the `TerminalId` can no longer be used with other `terminal/*` methods,\nbut tool calls that already contain it, continue to display its output.\n\nThe `terminal/kill` method can be used to terminate the command without releasing\nthe terminal, allowing the Agent to call `terminal/output` and other methods.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "ReleaseTerminalRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/WaitForTerminalExitRequest" - } - ], - "description": "Waits for the terminal command to exit and return its exit status\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "WaitForTerminalExitRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/KillTerminalCommandRequest" - } - ], - "description": "Kills the terminal command without releasing the terminal\n\nWhile `terminal/release` will also kill the command, this method will keep\nthe `TerminalId` valid so it can be used with other methods.\n\nThis method can be helpful when implementing command timeouts which terminate\nthe command as soon as elapsed, and then get the final output so it can be sent\nto the model.\n\nNote: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "KillTerminalCommandRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtRequest" - } - ], - "description": "Handles extension method requests from the agent.\n\nAllows the Agent to send an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" - } - ], - "description": "All possible requests that an agent can send to a client.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly - instead, use the methods on the [`Client`] trait.\n\nThis enum encompasses all method calls from agent to client." - }, - { - "type": "null" - } - ] - } - }, - "required": ["id", "method"], - "type": "object", - "x-docs-ignore": true - }, - "AgentResponse": { - "anyOf": [ - { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "result": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/InitializeResponse" - } - ], - "title": "InitializeResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AuthenticateResponse" - } - ], - "title": "AuthenticateResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/NewSessionResponse" - } - ], - "title": "NewSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/LoadSessionResponse" - } - ], - "title": "LoadSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionModeResponse" - } - ], - "title": "SetSessionModeResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/PromptResponse" - } - ], - "title": "PromptResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtResponse" - } - ], - "title": "ExtMethodResponse" - } - ], - "description": "All possible responses that an agent can send to a client.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `ClientRequest` variants." - } - }, - "required": ["id", "result"], - "title": "Result", - "type": "object" - }, - { - "properties": { - "error": { - "$ref": "#/$defs/Error" - }, - "id": { - "$ref": "#/$defs/RequestId" - } - }, - "required": ["id", "error"], - "title": "Error", - "type": "object" - } - ], - "x-docs-ignore": true - }, - "Annotations": { - "description": "Optional annotations for the client. The client can use annotations to inform how objects are used or displayed", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "audience": { - "items": { - "$ref": "#/$defs/Role" - }, - "type": ["array", "null"] - }, - "lastModified": { - "type": ["string", "null"] - }, - "priority": { - "format": "double", - "type": ["number", "null"] - } - }, - "type": "object" - }, - "AudioContent": { - "description": "Audio provided to or from an LLM.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "data": { - "type": "string" - }, - "mimeType": { - "type": "string" - } - }, - "required": ["data", "mimeType"], - "type": "object" - }, - "AuthMethod": { - "description": "Describes an available authentication method.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "description": { - "description": "Optional description providing more details about this authentication method.", - "type": ["string", "null"] - }, - "id": { - "description": "Unique identifier for this authentication method.", - "type": "string" - }, - "name": { - "description": "Human-readable name of the authentication method.", - "type": "string" - } - }, - "required": ["id", "name"], - "type": "object" - }, - "AuthenticateRequest": { - "description": "Request parameters for the authenticate method.\n\nSpecifies which authentication method to use.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "methodId": { - "description": "The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response.", - "type": "string" - } - }, - "required": ["methodId"], - "type": "object", - "x-method": "authenticate", - "x-side": "agent" - }, - "AuthenticateResponse": { - "description": "Response to the `authenticate` method.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "authenticate", - "x-side": "agent" - }, - "AvailableCommand": { - "description": "Information about a command.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "description": { - "description": "Human-readable description of what the command does.", - "type": "string" - }, - "input": { - "anyOf": [ - { - "$ref": "#/$defs/AvailableCommandInput" - }, - { - "type": "null" - } - ], - "description": "Input for the command if required" - }, - "name": { - "description": "Command name (e.g., `create_plan`, `research_codebase`).", - "type": "string" - } - }, - "required": ["name", "description"], - "type": "object" - }, - "AvailableCommandInput": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/UnstructuredCommandInput" - } - ], - "description": "All text that was typed after the command name is provided as input.", - "title": "unstructured" - } - ], - "description": "The input specification for a command." - }, - "AvailableCommandsUpdate": { - "description": "Available commands are ready or have changed", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "availableCommands": { - "description": "Commands the agent can execute", - "items": { - "$ref": "#/$defs/AvailableCommand" - }, - "type": "array" - } - }, - "required": ["availableCommands"], - "type": "object" - }, - "BlobResourceContents": { - "description": "Binary resource contents.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "blob": { - "type": "string" - }, - "mimeType": { - "type": ["string", "null"] - }, - "uri": { - "type": "string" - } - }, - "required": ["blob", "uri"], - "type": "object" - }, - "CancelNotification": { - "description": "Notification to cancel ongoing operations for a session.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session to cancel operations for." - } - }, - "required": ["sessionId"], - "type": "object", - "x-method": "session/cancel", - "x-side": "agent" - }, - "ClientCapabilities": { - "description": "Capabilities supported by the client.\n\nAdvertised during initialization to inform the agent about\navailable features and methods.\n\nSee protocol docs: [Client Capabilities](https://agentclientprotocol.com/protocol/initialization#client-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "fs": { - "allOf": [ - { - "$ref": "#/$defs/FileSystemCapability" - } - ], - "default": { - "readTextFile": false, - "writeTextFile": false - }, - "description": "File system capabilities supported by the client.\nDetermines which file operations the agent can request." - }, - "terminal": { - "default": false, - "description": "Whether the Client support all `terminal/*` methods.", - "type": "boolean" - } - }, - "type": "object" - }, - "ClientNotification": { - "properties": { - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/CancelNotification" - } - ], - "description": "Cancels ongoing operations for a session.\n\nThis is a notification sent by the client to cancel an ongoing prompt turn.\n\nUpon receiving this notification, the Agent SHOULD:\n- Stop all language model requests as soon as possible\n- Abort all tool call invocations in progress\n- Send any pending `session/update` notifications\n- Respond to the original `session/prompt` request with `StopReason::Cancelled`\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "title": "CancelNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtNotification" - } - ], - "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" - } - ], - "description": "All possible notifications that a client can send to an agent.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly - use the notification methods on the [`Agent`] trait instead.\n\nNotifications do not expect a response." - }, - { - "type": "null" - } - ] - } - }, - "required": ["method"], - "type": "object", - "x-docs-ignore": true - }, - "ClientRequest": { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/InitializeRequest" - } - ], - "description": "Establishes the connection with a client and negotiates protocol capabilities.\n\nThis method is called once at the beginning of the connection to:\n- Negotiate the protocol version to use\n- Exchange capability information between client and agent\n- Determine available authentication methods\n\nThe agent should respond with its supported protocol version and capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "InitializeRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AuthenticateRequest" - } - ], - "description": "Authenticates the client using the specified authentication method.\n\nCalled when the agent requires authentication before allowing session creation.\nThe client provides the authentication method ID that was advertised during initialization.\n\nAfter successful authentication, the client can proceed to create sessions with\n`new_session` without receiving an `auth_required` error.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "AuthenticateRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/NewSessionRequest" - } - ], - "description": "Creates a new conversation session with the agent.\n\nSessions represent independent conversation contexts with their own history and state.\n\nThe agent should:\n- Create a new session context\n- Connect to any specified MCP servers\n- Return a unique session ID for future requests\n\nMay return an `auth_required` error if the agent requires authentication.\n\nSee protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)", - "title": "NewSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/LoadSessionRequest" - } - ], - "description": "Loads an existing session to resume a previous conversation.\n\nThis method is only available if the agent advertises the `loadSession` capability.\n\nThe agent should:\n- Restore the session context and conversation history\n- Connect to the specified MCP servers\n- Stream the entire conversation history back to the client via notifications\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", - "title": "LoadSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionModeRequest" - } - ], - "description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "title": "SetSessionModeRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/PromptRequest" - } - ], - "description": "Processes a user prompt within a session.\n\nThis method handles the whole lifecycle of a prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Processes the prompt using language models\n- Reports language model content and tool calls to the Clients\n- Requests permission to run tools\n- Executes any requested tool calls\n- Returns when the turn is complete with a stop reason\n\nSee protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)", - "title": "PromptRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtRequest" - } - ], - "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" - } - ], - "description": "All possible requests that a client can send to an agent.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly - instead, use the methods on the [`Agent`] trait.\n\nThis enum encompasses all method calls from client to agent." - }, - { - "type": "null" - } - ] - } - }, - "required": ["id", "method"], - "type": "object", - "x-docs-ignore": true - }, - "ClientResponse": { - "anyOf": [ - { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "result": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/WriteTextFileResponse" - } - ], - "title": "WriteTextFileResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReadTextFileResponse" - } - ], - "title": "ReadTextFileResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/RequestPermissionResponse" - } - ], - "title": "RequestPermissionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CreateTerminalResponse" - } - ], - "title": "CreateTerminalResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/TerminalOutputResponse" - } - ], - "title": "TerminalOutputResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReleaseTerminalResponse" - } - ], - "title": "ReleaseTerminalResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/WaitForTerminalExitResponse" - } - ], - "title": "WaitForTerminalExitResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/KillTerminalCommandResponse" - } - ], - "title": "KillTerminalResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtResponse" - } - ], - "title": "ExtMethodResponse" - } - ], - "description": "All possible responses that a client can send to an agent.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `AgentRequest` variants." - } - }, - "required": ["id", "result"], - "title": "Result", - "type": "object" - }, - { - "properties": { - "error": { - "$ref": "#/$defs/Error" - }, - "id": { - "$ref": "#/$defs/RequestId" - } - }, - "required": ["id", "error"], - "title": "Error", - "type": "object" - } - ], - "x-docs-ignore": true - }, - "Content": { - "description": "Standard content block (text, images, resources).", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "allOf": [ - { - "$ref": "#/$defs/ContentBlock" - } - ], - "description": "The actual content block." - } - }, - "required": ["content"], - "type": "object" - }, - "ContentBlock": { - "description": "Content blocks represent displayable information in the Agent Client Protocol.\n\nThey provide a structured way to handle various types of user-facing content—whether\nit's text from language models, images for analysis, or embedded resources for context.\n\nContent blocks appear in:\n- User prompts sent via `session/prompt`\n- Language model output streamed through `session/update` notifications\n- Progress updates and results from tool calls\n\nThis structure is compatible with the Model Context Protocol (MCP), enabling\nagents to seamlessly forward content from MCP tool outputs without transformation.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/content)", - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/TextContent" - } - ], - "description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.", - "properties": { - "type": { - "const": "text", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ImageContent" - } - ], - "description": "Images for visual context or analysis.\n\nRequires the `image` prompt capability when included in prompts.", - "properties": { - "type": { - "const": "image", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AudioContent" - } - ], - "description": "Audio data for transcription or analysis.\n\nRequires the `audio` prompt capability when included in prompts.", - "properties": { - "type": { - "const": "audio", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ResourceLink" - } - ], - "description": "References to resources that the agent can access.\n\nAll agents MUST support resource links in prompts.", - "properties": { - "type": { - "const": "resource_link", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/EmbeddedResource" - } - ], - "description": "Complete resource contents embedded directly in the message.\n\nPreferred for including context as it avoids extra round-trips.\n\nRequires the `embeddedContext` prompt capability when included in prompts.", - "properties": { - "type": { - "const": "resource", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ] - }, - "ContentChunk": { - "description": "A streamed item of content", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "allOf": [ - { - "$ref": "#/$defs/ContentBlock" - } - ], - "description": "A single item of content" - } - }, - "required": ["content"], - "type": "object" - }, - "CreateTerminalRequest": { - "description": "Request to create a new terminal and execute a command.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "args": { - "description": "Array of command arguments.", - "items": { - "type": "string" - }, - "type": "array" - }, - "command": { - "description": "The command to execute.", - "type": "string" - }, - "cwd": { - "description": "Working directory for the command (absolute path).", - "type": ["string", "null"] - }, - "env": { - "description": "Environment variables for the command.", - "items": { - "$ref": "#/$defs/EnvVariable" - }, - "type": "array" - }, - "outputByteLimit": { - "description": "Maximum number of output bytes to retain.\n\nWhen the limit is exceeded, the Client truncates from the beginning of the output\nto stay within the limit.\n\nThe Client MUST ensure truncation happens at a character boundary to maintain valid\nstring output, even if this means the retained output is slightly less than the\nspecified limit.", - "format": "uint64", - "minimum": 0, - "type": ["integer", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - } - }, - "required": ["sessionId", "command"], - "type": "object", - "x-method": "terminal/create", - "x-side": "client" - }, - "CreateTerminalResponse": { - "description": "Response containing the ID of the created terminal.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "terminalId": { - "description": "The unique identifier for the created terminal.", - "type": "string" - } - }, - "required": ["terminalId"], - "type": "object", - "x-method": "terminal/create", - "x-side": "client" - }, - "CurrentModeUpdate": { - "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "currentModeId": { - "allOf": [ - { - "$ref": "#/$defs/SessionModeId" - } - ], - "description": "The ID of the current mode" - } - }, - "required": ["currentModeId"], - "type": "object" - }, - "Diff": { - "description": "A diff representing file modifications.\n\nShows changes to files in a format suitable for display in the client UI.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "newText": { - "description": "The new content after modification.", - "type": "string" - }, - "oldText": { - "description": "The original content (None for new files).", - "type": ["string", "null"] - }, - "path": { - "description": "The file path being modified.", - "type": "string" - } - }, - "required": ["path", "newText"], - "type": "object" - }, - "EmbeddedResource": { - "description": "The contents of a resource, embedded into a prompt or tool call result.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "resource": { - "$ref": "#/$defs/EmbeddedResourceResource" - } - }, - "required": ["resource"], - "type": "object" - }, - "EmbeddedResourceResource": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/TextResourceContents" - } - ], - "title": "TextResourceContents" - }, - { - "allOf": [ - { - "$ref": "#/$defs/BlobResourceContents" - } - ], - "title": "BlobResourceContents" - } - ], - "description": "Resource content that can be embedded in a message." - }, - "EnvVariable": { - "description": "An environment variable to set when launching an MCP server.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "name": { - "description": "The name of the environment variable.", - "type": "string" - }, - "value": { - "description": "The value to set for the environment variable.", - "type": "string" - } - }, - "required": ["name", "value"], - "type": "object" - }, - "Error": { - "description": "JSON-RPC error object.\n\nRepresents an error that occurred during method execution, following the\nJSON-RPC 2.0 error object specification with optional additional data.\n\nSee protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)", - "properties": { - "code": { - "allOf": [ - { - "$ref": "#/$defs/ErrorCode" - } - ], - "description": "A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification." - }, - "data": { - "description": "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details." - }, - "message": { - "description": "A string providing a short description of the error.\nThe message should be limited to a concise single sentence.", - "type": "string" - } - }, - "required": ["code", "message"], - "type": "object" - }, - "ErrorCode": { - "anyOf": [ - { - "const": -32700, - "description": "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text.", - "format": "int32", - "title": "Parse error", - "type": "integer" - }, - { - "const": -32600, - "description": "**Invalid request**: The JSON sent is not a valid Request object.", - "format": "int32", - "title": "Invalid request", - "type": "integer" - }, - { - "const": -32601, - "description": "**Method not found**: The method does not exist or is not available.", - "format": "int32", - "title": "Method not found", - "type": "integer" - }, - { - "const": -32602, - "description": "**Invalid params**: Invalid method parameter(s).", - "format": "int32", - "title": "Invalid params", - "type": "integer" - }, - { - "const": -32603, - "description": "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors.", - "format": "int32", - "title": "Internal error", - "type": "integer" - }, - { - "const": -32000, - "description": "**Authentication required**: Authentication is required before this operation can be performed.", - "format": "int32", - "title": "Authentication required", - "type": "integer" - }, - { - "const": -32002, - "description": "**Resource not found**: A given resource, such as a file, was not found.", - "format": "int32", - "title": "Resource not found", - "type": "integer" - }, - { - "description": "Other undefined error code.", - "format": "int32", - "title": "Other", - "type": "integer" - } - ], - "description": "Predefined error codes for common JSON-RPC and ACP-specific errors.\n\nThese codes follow the JSON-RPC 2.0 specification for standard errors\nand use the reserved range (-32000 to -32099) for protocol-specific errors." - }, - "ExtNotification": { - "description": "Allows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" - }, - "ExtRequest": { - "description": "Allows for sending an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" - }, - "ExtResponse": { - "description": "Allows for sending an arbitrary response to an [`ExtRequest`] that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" - }, - "FileSystemCapability": { - "description": "Filesystem capabilities supported by the client.\nFile system capabilities that a client may support.\n\nSee protocol docs: [FileSystem](https://agentclientprotocol.com/protocol/initialization#filesystem)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "readTextFile": { - "default": false, - "description": "Whether the Client supports `fs/read_text_file` requests.", - "type": "boolean" - }, - "writeTextFile": { - "default": false, - "description": "Whether the Client supports `fs/write_text_file` requests.", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpHeader": { - "description": "An HTTP header to set when making requests to the MCP server.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "name": { - "description": "The name of the HTTP header.", - "type": "string" - }, - "value": { - "description": "The value to set for the HTTP header.", - "type": "string" - } - }, - "required": ["name", "value"], - "type": "object" - }, - "ImageContent": { - "description": "An image provided to or from an LLM.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "data": { - "type": "string" - }, - "mimeType": { - "type": "string" - }, - "uri": { - "type": ["string", "null"] - } - }, - "required": ["data", "mimeType"], - "type": "object" - }, - "Implementation": { - "description": "Metadata about the implementation of the client or agent.\nDescribes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "name": { - "description": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.", - "type": "string" - }, - "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.", - "type": ["string", "null"] - }, - "version": { - "description": "Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes. (e.g. \"1.0.0\").", - "type": "string" - } - }, - "required": ["name", "version"], - "type": "object" - }, - "InitializeRequest": { - "description": "Request parameters for the initialize method.\n\nSent by the client to establish connection and negotiate capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "clientCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/ClientCapabilities" - } - ], - "default": { - "fs": { - "readTextFile": false, - "writeTextFile": false - }, - "terminal": false - }, - "description": "Capabilities supported by the client." - }, - "clientInfo": { - "anyOf": [ - { - "$ref": "#/$defs/Implementation" - }, - { - "type": "null" - } - ], - "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required." - }, - "protocolVersion": { - "allOf": [ - { - "$ref": "#/$defs/ProtocolVersion" - } - ], - "description": "The latest protocol version supported by the client." - } - }, - "required": ["protocolVersion"], - "type": "object", - "x-method": "initialize", - "x-side": "agent" - }, - "InitializeResponse": { - "description": "Response to the `initialize` method.\n\nContains the negotiated protocol version and agent capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "agentCapabilities": { - "allOf": [ - { - "$ref": "#/$defs/AgentCapabilities" - } - ], - "default": { - "loadSession": false, - "mcpCapabilities": { - "http": false, - "sse": false - }, - "promptCapabilities": { - "audio": false, - "embeddedContext": false, - "image": false - }, - "sessionCapabilities": {} - }, - "description": "Capabilities supported by the agent." - }, - "agentInfo": { - "anyOf": [ - { - "$ref": "#/$defs/Implementation" - }, - { - "type": "null" - } - ], - "description": "Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required." - }, - "authMethods": { - "default": [], - "description": "Authentication methods supported by the agent.", - "items": { - "$ref": "#/$defs/AuthMethod" - }, - "type": "array" - }, - "protocolVersion": { - "allOf": [ - { - "$ref": "#/$defs/ProtocolVersion" - } - ], - "description": "The protocol version the client specified if supported by the agent,\nor the latest protocol version supported by the agent.\n\nThe client should disconnect, if it doesn't support this version." - } - }, - "required": ["protocolVersion"], - "type": "object", - "x-method": "initialize", - "x-side": "agent" - }, - "KillTerminalCommandRequest": { - "description": "Request to kill a terminal command without releasing the terminal.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to kill.", - "type": "string" - } - }, - "required": ["sessionId", "terminalId"], - "type": "object", - "x-method": "terminal/kill", - "x-side": "client" - }, - "KillTerminalCommandResponse": { - "description": "Response to terminal/kill command method", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "terminal/kill", - "x-side": "client" - }, - "LoadSessionRequest": { - "description": "Request parameters for loading an existing session.\n\nOnly available if the Agent supports the `loadSession` capability.\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "cwd": { - "description": "The working directory for this session.", - "type": "string" - }, - "mcpServers": { - "description": "List of MCP servers to connect to for this session.", - "items": { - "$ref": "#/$defs/McpServer" - }, - "type": "array" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session to load." - } - }, - "required": ["mcpServers", "cwd", "sessionId"], - "type": "object", - "x-method": "session/load", - "x-side": "agent" - }, - "LoadSessionResponse": { - "description": "Response from loading an existing session.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "modes": { - "anyOf": [ - { - "$ref": "#/$defs/SessionModeState" - }, - { - "type": "null" - } - ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" - } - }, - "type": "object", - "x-method": "session/load", - "x-side": "agent" - }, - "McpCapabilities": { - "description": "MCP capabilities supported by the agent", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "http": { - "default": false, - "description": "Agent supports [`McpServer::Http`].", - "type": "boolean" - }, - "sse": { - "default": false, - "description": "Agent supports [`McpServer::Sse`].", - "type": "boolean" - } - }, - "type": "object" - }, - "McpServer": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/McpServerHttp" - } - ], - "description": "HTTP transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.http` is `true`.", - "properties": { - "type": { - "const": "http", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/McpServerSse" - } - ], - "description": "SSE transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.sse` is `true`.", - "properties": { - "type": { - "const": "sse", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/McpServerStdio" - } - ], - "description": "Stdio transport configuration\n\nAll Agents MUST support this transport.", - "title": "stdio" - } - ], - "description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)" - }, - "McpServerHttp": { - "description": "HTTP transport configuration for MCP.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "headers": { - "description": "HTTP headers to set when making requests to the MCP server.", - "items": { - "$ref": "#/$defs/HttpHeader" - }, - "type": "array" - }, - "name": { - "description": "Human-readable name identifying this MCP server.", - "type": "string" - }, - "url": { - "description": "URL to the MCP server.", - "type": "string" - } - }, - "required": ["name", "url", "headers"], - "type": "object" - }, - "McpServerSse": { - "description": "SSE transport configuration for MCP.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "headers": { - "description": "HTTP headers to set when making requests to the MCP server.", - "items": { - "$ref": "#/$defs/HttpHeader" - }, - "type": "array" - }, - "name": { - "description": "Human-readable name identifying this MCP server.", - "type": "string" - }, - "url": { - "description": "URL to the MCP server.", - "type": "string" - } - }, - "required": ["name", "url", "headers"], - "type": "object" - }, - "McpServerStdio": { - "description": "Stdio transport configuration for MCP.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "args": { - "description": "Command-line arguments to pass to the MCP server.", - "items": { - "type": "string" - }, - "type": "array" - }, - "command": { - "description": "Path to the MCP server executable.", - "type": "string" - }, - "env": { - "description": "Environment variables to set when launching the MCP server.", - "items": { - "$ref": "#/$defs/EnvVariable" - }, - "type": "array" - }, - "name": { - "description": "Human-readable name identifying this MCP server.", - "type": "string" - } - }, - "required": ["name", "command", "args", "env"], - "type": "object" - }, - "NewSessionRequest": { - "description": "Request parameters for creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "cwd": { - "description": "The working directory for this session. Must be an absolute path.", - "type": "string" - }, - "mcpServers": { - "description": "List of MCP (Model Context Protocol) servers the agent should connect to.", - "items": { - "$ref": "#/$defs/McpServer" - }, - "type": "array" - } - }, - "required": ["cwd", "mcpServers"], - "type": "object", - "x-method": "session/new", - "x-side": "agent" - }, - "NewSessionResponse": { - "description": "Response from creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "modes": { - "anyOf": [ - { - "$ref": "#/$defs/SessionModeState" - }, - { - "type": "null" - } - ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation." - } - }, - "required": ["sessionId"], - "type": "object", - "x-method": "session/new", - "x-side": "agent" - }, - "PermissionOption": { - "description": "An option presented to the user when requesting permission.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "kind": { - "allOf": [ - { - "$ref": "#/$defs/PermissionOptionKind" - } - ], - "description": "Hint about the nature of this permission option." - }, - "name": { - "description": "Human-readable label to display to the user.", - "type": "string" - }, - "optionId": { - "allOf": [ - { - "$ref": "#/$defs/PermissionOptionId" - } - ], - "description": "Unique identifier for this permission option." - } - }, - "required": ["optionId", "name", "kind"], - "type": "object" - }, - "PermissionOptionId": { - "description": "Unique identifier for a permission option.", - "type": "string" - }, - "PermissionOptionKind": { - "description": "The type of permission option being presented to the user.\n\nHelps clients choose appropriate icons and UI treatment.", - "oneOf": [ - { - "const": "allow_once", - "description": "Allow this operation only this time.", - "type": "string" - }, - { - "const": "allow_always", - "description": "Allow this operation and remember the choice.", - "type": "string" - }, - { - "const": "reject_once", - "description": "Reject this operation only this time.", - "type": "string" - }, - { - "const": "reject_always", - "description": "Reject this operation and remember the choice.", - "type": "string" - } - ] - }, - "Plan": { - "description": "An execution plan for accomplishing complex tasks.\n\nPlans consist of multiple entries representing individual tasks or goals.\nAgents report plans to clients to provide visibility into their execution strategy.\nPlans can evolve during execution as the agent discovers new requirements or completes tasks.\n\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "entries": { - "description": "The list of tasks to be accomplished.\n\nWhen updating a plan, the agent must send a complete list of all entries\nwith their current status. The client replaces the entire plan with each update.", - "items": { - "$ref": "#/$defs/PlanEntry" - }, - "type": "array" - } - }, - "required": ["entries"], - "type": "object" - }, - "PlanEntry": { - "description": "A single entry in the execution plan.\n\nRepresents a task or goal that the assistant intends to accomplish\nas part of fulfilling the user's request.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "description": "Human-readable description of what this task aims to accomplish.", - "type": "string" - }, - "priority": { - "allOf": [ - { - "$ref": "#/$defs/PlanEntryPriority" - } - ], - "description": "The relative importance of this task.\nUsed to indicate which tasks are most critical to the overall goal." - }, - "status": { - "allOf": [ - { - "$ref": "#/$defs/PlanEntryStatus" - } - ], - "description": "Current execution status of this task." - } - }, - "required": ["content", "priority", "status"], - "type": "object" - }, - "PlanEntryPriority": { - "description": "Priority levels for plan entries.\n\nUsed to indicate the relative importance or urgency of different\ntasks in the execution plan.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", - "oneOf": [ - { - "const": "high", - "description": "High priority task - critical to the overall goal.", - "type": "string" - }, - { - "const": "medium", - "description": "Medium priority task - important but not critical.", - "type": "string" - }, - { - "const": "low", - "description": "Low priority task - nice to have but not essential.", - "type": "string" - } - ] - }, - "PlanEntryStatus": { - "description": "Status of a plan entry in the execution flow.\n\nTracks the lifecycle of each task from planning through completion.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", - "oneOf": [ - { - "const": "pending", - "description": "The task has not started yet.", - "type": "string" - }, - { - "const": "in_progress", - "description": "The task is currently being worked on.", - "type": "string" - }, - { - "const": "completed", - "description": "The task has been successfully completed.", - "type": "string" - } - ] - }, - "PromptCapabilities": { - "description": "Prompt capabilities supported by the agent in `session/prompt` requests.\n\nBaseline agent functionality requires support for [`ContentBlock::Text`]\nand [`ContentBlock::ResourceLink`] in prompt requests.\n\nOther variants must be explicitly opted in to.\nCapabilities for different types of content in prompt requests.\n\nIndicates which content types beyond the baseline (text and resource links)\nthe agent can process.\n\nSee protocol docs: [Prompt Capabilities](https://agentclientprotocol.com/protocol/initialization#prompt-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "audio": { - "default": false, - "description": "Agent supports [`ContentBlock::Audio`].", - "type": "boolean" - }, - "embeddedContext": { - "default": false, - "description": "Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.", - "type": "boolean" - }, - "image": { - "default": false, - "description": "Agent supports [`ContentBlock::Image`].", - "type": "boolean" - } - }, - "type": "object" - }, - "PromptRequest": { - "description": "Request parameters for sending a user prompt to the agent.\n\nContains the user's message and any additional context.\n\nSee protocol docs: [User Message](https://agentclientprotocol.com/protocol/prompt-turn#1-user-message)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "prompt": { - "description": "The blocks of content that compose the user's message.\n\nAs a baseline, the Agent MUST support [`ContentBlock::Text`] and [`ContentBlock::ResourceLink`],\nwhile other variants are optionally enabled via [`PromptCapabilities`].\n\nThe Client MUST adapt its interface according to [`PromptCapabilities`].\n\nThe client MAY include referenced pieces of context as either\n[`ContentBlock::Resource`] or [`ContentBlock::ResourceLink`].\n\nWhen available, [`ContentBlock::Resource`] is preferred\nas it avoids extra round-trips and allows the message to include\npieces of context from sources the agent may not have access to.", - "items": { - "$ref": "#/$defs/ContentBlock" - }, - "type": "array" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session to send this user message to" - } - }, - "required": ["sessionId", "prompt"], - "type": "object", - "x-method": "session/prompt", - "x-side": "agent" - }, - "PromptResponse": { - "description": "Response from processing a user prompt.\n\nSee protocol docs: [Check for Completion](https://agentclientprotocol.com/protocol/prompt-turn#4-check-for-completion)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "stopReason": { - "allOf": [ - { - "$ref": "#/$defs/StopReason" - } - ], - "description": "Indicates why the agent stopped processing the turn." - } - }, - "required": ["stopReason"], - "type": "object", - "x-method": "session/prompt", - "x-side": "agent" - }, - "ProtocolVersion": { - "description": "Protocol version identifier.\n\nThis version is only bumped for breaking changes.\nNon-breaking changes should be introduced via capabilities.", - "format": "uint16", - "maximum": 65535, - "minimum": 0, - "type": "integer" - }, - "ReadTextFileRequest": { - "description": "Request to read content from a text file.\n\nOnly available if the client supports the `fs.readTextFile` capability.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "limit": { - "description": "Maximum number of lines to read.", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "line": { - "description": "Line number to start reading from (1-based).", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "path": { - "description": "Absolute path to the file to read.", - "type": "string" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - } - }, - "required": ["sessionId", "path"], - "type": "object", - "x-method": "fs/read_text_file", - "x-side": "client" - }, - "ReadTextFileResponse": { - "description": "Response containing the contents of a text file.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "type": "string" - } - }, - "required": ["content"], - "type": "object", - "x-method": "fs/read_text_file", - "x-side": "client" - }, - "ReleaseTerminalRequest": { - "description": "Request to release a terminal and free its resources.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to release.", - "type": "string" - } - }, - "required": ["sessionId", "terminalId"], - "type": "object", - "x-method": "terminal/release", - "x-side": "client" - }, - "ReleaseTerminalResponse": { - "description": "Response to terminal/release method", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "terminal/release", - "x-side": "client" - }, - "RequestId": { - "anyOf": [ - { - "title": "Null", - "type": "null" - }, - { - "format": "int64", - "title": "Number", - "type": "integer" - }, - { - "title": "Str", - "type": "string" - } - ], - "description": "JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null [1] and Numbers SHOULD NOT contain fractional parts [2]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n[1] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n[2] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions." - }, - "RequestPermissionOutcome": { - "description": "The outcome of a permission request.", - "discriminator": { - "propertyName": "outcome" - }, - "oneOf": [ - { - "description": "The prompt turn was cancelled before the user responded.\n\nWhen a client sends a `session/cancel` notification to cancel an ongoing\nprompt turn, it MUST respond to all pending `session/request_permission`\nrequests with this `Cancelled` outcome.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "properties": { - "outcome": { - "const": "cancelled", - "type": "string" - } - }, - "required": ["outcome"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SelectedPermissionOutcome" - } - ], - "description": "The user selected one of the provided options.", - "properties": { - "outcome": { - "const": "selected", - "type": "string" - } - }, - "required": ["outcome"], - "type": "object" - } - ] - }, - "RequestPermissionRequest": { - "description": "Request for user permission to execute a tool call.\n\nSent when the agent needs authorization before performing a sensitive operation.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "options": { - "description": "Available permission options for the user to choose from.", - "items": { - "$ref": "#/$defs/PermissionOption" - }, - "type": "array" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "toolCall": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallUpdate" - } - ], - "description": "Details about the tool call requiring permission." - } - }, - "required": ["sessionId", "toolCall", "options"], - "type": "object", - "x-method": "session/request_permission", - "x-side": "client" - }, - "RequestPermissionResponse": { - "description": "Response to a permission request.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "outcome": { - "allOf": [ - { - "$ref": "#/$defs/RequestPermissionOutcome" - } - ], - "description": "The user's decision on the permission request." - } - }, - "required": ["outcome"], - "type": "object", - "x-method": "session/request_permission", - "x-side": "client" - }, - "ResourceLink": { - "description": "A resource that the server is capable of reading, included in a prompt or tool call result.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "description": { - "type": ["string", "null"] - }, - "mimeType": { - "type": ["string", "null"] - }, - "name": { - "type": "string" - }, - "size": { - "format": "int64", - "type": ["integer", "null"] - }, - "title": { - "type": ["string", "null"] - }, - "uri": { - "type": "string" - } - }, - "required": ["name", "uri"], - "type": "object" - }, - "Role": { - "description": "The sender or recipient of messages and data in a conversation.", - "enum": ["assistant", "user"], - "type": "string" - }, - "SelectedPermissionOutcome": { - "description": "The user selected one of the provided options.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "optionId": { - "allOf": [ - { - "$ref": "#/$defs/PermissionOptionId" - } - ], - "description": "The ID of the option the user selected." - } - }, - "required": ["optionId"], - "type": "object" - }, - "SessionCapabilities": { - "description": "Session capabilities supported by the agent.\n\nAs a baseline, all Agents **MUST** support `session/new`, `session/prompt`, `session/cancel`, and `session/update`.\n\nOptionally, they **MAY** support other session methods and notifications by specifying additional capabilities.\n\nNote: `session/load` is still handled by the top-level `load_session` capability. This will be unified in future versions of the protocol.\n\nSee protocol docs: [Session Capabilities](https://agentclientprotocol.com/protocol/initialization#session-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object" - }, - "SessionId": { - "description": "A unique identifier for a conversation session between a client and agent.\n\nSessions maintain their own context, conversation history, and state,\nallowing multiple independent interactions with the same agent.\n\nSee protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)", - "type": "string" - }, - "SessionMode": { - "description": "A mode the agent can operate in.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "description": { - "type": ["string", "null"] - }, - "id": { - "$ref": "#/$defs/SessionModeId" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"], - "type": "object" - }, - "SessionModeId": { - "description": "Unique identifier for a Session Mode.", - "type": "string" - }, - "SessionModeState": { - "description": "The set of modes and the one currently active.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "availableModes": { - "description": "The set of modes that the Agent can operate in", - "items": { - "$ref": "#/$defs/SessionMode" - }, - "type": "array" - }, - "currentModeId": { - "allOf": [ - { - "$ref": "#/$defs/SessionModeId" - } - ], - "description": "The current mode the Agent is in." - } - }, - "required": ["currentModeId", "availableModes"], - "type": "object" - }, - "SessionNotification": { - "description": "Notification containing a session update from the agent.\n\nUsed to stream real-time progress and results during prompt processing.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session this update pertains to." - }, - "update": { - "allOf": [ - { - "$ref": "#/$defs/SessionUpdate" - } - ], - "description": "The actual update content." - } - }, - "required": ["sessionId", "update"], - "type": "object", - "x-method": "session/update", - "x-side": "client" - }, - "SessionUpdate": { - "description": "Different types of updates that can be sent during session processing.\n\nThese updates provide real-time feedback about the agent's progress.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "discriminator": { - "propertyName": "sessionUpdate" - }, - "oneOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/ContentChunk" - } - ], - "description": "A chunk of the user's message being streamed.", - "properties": { - "sessionUpdate": { - "const": "user_message_chunk", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ContentChunk" - } - ], - "description": "A chunk of the agent's response being streamed.", - "properties": { - "sessionUpdate": { - "const": "agent_message_chunk", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ContentChunk" - } - ], - "description": "A chunk of the agent's internal reasoning being streamed.", - "properties": { - "sessionUpdate": { - "const": "agent_thought_chunk", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ToolCall" - } - ], - "description": "Notification that a new tool call has been initiated.", - "properties": { - "sessionUpdate": { - "const": "tool_call", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ToolCallUpdate" - } - ], - "description": "Update on the status or results of a tool call.", - "properties": { - "sessionUpdate": { - "const": "tool_call_update", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/Plan" - } - ], - "description": "The agent's execution plan for complex tasks.\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)", - "properties": { - "sessionUpdate": { - "const": "plan", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AvailableCommandsUpdate" - } - ], - "description": "Available commands are ready or have changed", - "properties": { - "sessionUpdate": { - "const": "available_commands_update", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CurrentModeUpdate" - } - ], - "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "properties": { - "sessionUpdate": { - "const": "current_mode_update", - "type": "string" - } - }, - "required": ["sessionUpdate"], - "type": "object" - } - ] - }, - "SetSessionModeRequest": { - "description": "Request parameters for setting a session mode.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "modeId": { - "allOf": [ - { - "$ref": "#/$defs/SessionModeId" - } - ], - "description": "The ID of the mode to set." - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session to set the mode for." - } - }, - "required": ["sessionId", "modeId"], - "type": "object", - "x-method": "session/set_mode", - "x-side": "agent" - }, - "SetSessionModeResponse": { - "description": "Response to `session/set_mode` method.", - "properties": { - "_meta": { - "additionalProperties": true, - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "session/set_mode", - "x-side": "agent" - }, - "StopReason": { - "description": "Reasons why an agent stops processing a prompt turn.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)", - "oneOf": [ - { - "const": "end_turn", - "description": "The turn ended successfully.", - "type": "string" - }, - { - "const": "max_tokens", - "description": "The turn ended because the agent reached the maximum number of tokens.", - "type": "string" - }, - { - "const": "max_turn_requests", - "description": "The turn ended because the agent reached the maximum number of allowed\nagent requests between user turns.", - "type": "string" - }, - { - "const": "refusal", - "description": "The turn ended because the agent refused to continue. The user prompt\nand everything that comes after it won't be included in the next\nprompt, so this should be reflected in the UI.", - "type": "string" - }, - { - "const": "cancelled", - "description": "The turn was cancelled by the client via `session/cancel`.\n\nThis stop reason MUST be returned when the client sends a `session/cancel`\nnotification, even if the cancellation causes exceptions in underlying operations.\nAgents should catch these exceptions and return this semantically meaningful\nresponse to confirm successful cancellation.", - "type": "string" - } - ] - }, - "Terminal": { - "description": "Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "terminalId": { - "type": "string" - } - }, - "required": ["terminalId"], - "type": "object" - }, - "TerminalExitStatus": { - "description": "Exit status of a terminal command.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "exitCode": { - "description": "The process exit code (may be null if terminated by signal).", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "signal": { - "description": "The signal that terminated the process (may be null if exited normally).", - "type": ["string", "null"] - } - }, - "type": "object" - }, - "TerminalOutputRequest": { - "description": "Request to get the current output and status of a terminal.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to get output from.", - "type": "string" - } - }, - "required": ["sessionId", "terminalId"], - "type": "object", - "x-method": "terminal/output", - "x-side": "client" - }, - "TerminalOutputResponse": { - "description": "Response containing the terminal output and exit status.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "exitStatus": { - "anyOf": [ - { - "$ref": "#/$defs/TerminalExitStatus" - }, - { - "type": "null" - } - ], - "description": "Exit status if the command has completed." - }, - "output": { - "description": "The terminal output captured so far.", - "type": "string" - }, - "truncated": { - "description": "Whether the output was truncated due to byte limits.", - "type": "boolean" - } - }, - "required": ["output", "truncated"], - "type": "object", - "x-method": "terminal/output", - "x-side": "client" - }, - "TextContent": { - "description": "Text provided to or from an LLM.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ] - }, - "text": { - "type": "string" - } - }, - "required": ["text"], - "type": "object" - }, - "TextResourceContents": { - "description": "Text-based resource contents.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "mimeType": { - "type": ["string", "null"] - }, - "text": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "required": ["text", "uri"], - "type": "object" - }, - "ToolCall": { - "description": "Represents a tool call that the language model has requested.\n\nTool calls are actions that the agent executes on behalf of the language model,\nsuch as reading files, executing code, or fetching data from external sources.\n\nSee protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/tool-calls)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "description": "Content produced by the tool call.", - "items": { - "$ref": "#/$defs/ToolCallContent" - }, - "type": "array" - }, - "kind": { - "allOf": [ - { - "$ref": "#/$defs/ToolKind" - } - ], - "description": "The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment." - }, - "locations": { - "description": "File locations affected by this tool call.\nEnables \"follow-along\" features in clients.", - "items": { - "$ref": "#/$defs/ToolCallLocation" - }, - "type": "array" - }, - "rawInput": { - "description": "Raw input parameters sent to the tool." - }, - "rawOutput": { - "description": "Raw output returned by the tool." - }, - "status": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallStatus" - } - ], - "description": "Current execution status of the tool call." - }, - "title": { - "description": "Human-readable title describing what the tool is doing.", - "type": "string" - }, - "toolCallId": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallId" - } - ], - "description": "Unique identifier for this tool call within the session." - } - }, - "required": ["toolCallId", "title"], - "type": "object" - }, - "ToolCallContent": { - "description": "Content produced by a tool call.\n\nTool calls can produce different types of content including\nstandard content blocks (text, images) or file diffs.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)", - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/Content" - } - ], - "description": "Standard content block (text, images, resources).", - "properties": { - "type": { - "const": "content", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/Diff" - } - ], - "description": "File modification shown as a diff.", - "properties": { - "type": { - "const": "diff", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/Terminal" - } - ], - "description": "Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)", - "properties": { - "type": { - "const": "terminal", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ] - }, - "ToolCallId": { - "description": "Unique identifier for a tool call within a session.", - "type": "string" - }, - "ToolCallLocation": { - "description": "A file location being accessed or modified by a tool.\n\nEnables clients to implement \"follow-along\" features that track\nwhich files the agent is working with in real-time.\n\nSee protocol docs: [Following the Agent](https://agentclientprotocol.com/protocol/tool-calls#following-the-agent)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "line": { - "description": "Optional line number within the file.", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "path": { - "description": "The file path being accessed or modified.", - "type": "string" - } - }, - "required": ["path"], - "type": "object" - }, - "ToolCallStatus": { - "description": "Execution status of a tool call.\n\nTool calls progress through different statuses during their lifecycle.\n\nSee protocol docs: [Status](https://agentclientprotocol.com/protocol/tool-calls#status)", - "oneOf": [ - { - "const": "pending", - "description": "The tool call hasn't started running yet because the input is either\nstreaming or we're awaiting approval.", - "type": "string" - }, - { - "const": "in_progress", - "description": "The tool call is currently running.", - "type": "string" - }, - { - "const": "completed", - "description": "The tool call completed successfully.", - "type": "string" - }, - { - "const": "failed", - "description": "The tool call failed with an error.", - "type": "string" - } - ] - }, - "ToolCallUpdate": { - "description": "An update to an existing tool call.\n\nUsed to report progress and results as tools execute. All fields except\nthe tool call ID are optional - only changed fields need to be included.\n\nSee protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "description": "Replace the content collection.", - "items": { - "$ref": "#/$defs/ToolCallContent" - }, - "type": ["array", "null"] - }, - "kind": { - "anyOf": [ - { - "$ref": "#/$defs/ToolKind" - }, - { - "type": "null" - } - ], - "description": "Update the tool kind." - }, - "locations": { - "description": "Replace the locations collection.", - "items": { - "$ref": "#/$defs/ToolCallLocation" - }, - "type": ["array", "null"] - }, - "rawInput": { - "description": "Update the raw input." - }, - "rawOutput": { - "description": "Update the raw output." - }, - "status": { - "anyOf": [ - { - "$ref": "#/$defs/ToolCallStatus" - }, - { - "type": "null" - } - ], - "description": "Update the execution status." - }, - "title": { - "description": "Update the human-readable title.", - "type": ["string", "null"] - }, - "toolCallId": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallId" - } - ], - "description": "The ID of the tool call being updated." - } - }, - "required": ["toolCallId"], - "type": "object" - }, - "ToolKind": { - "description": "Categories of tools that can be invoked.\n\nTool kinds help clients choose appropriate icons and optimize how they\ndisplay tool execution progress.\n\nSee protocol docs: [Creating](https://agentclientprotocol.com/protocol/tool-calls#creating)", - "oneOf": [ - { - "const": "read", - "description": "Reading files or data.", - "type": "string" - }, - { - "const": "edit", - "description": "Modifying files or content.", - "type": "string" - }, - { - "const": "delete", - "description": "Removing files or data.", - "type": "string" - }, - { - "const": "move", - "description": "Moving or renaming files.", - "type": "string" - }, - { - "const": "search", - "description": "Searching for information.", - "type": "string" - }, - { - "const": "execute", - "description": "Running commands or code.", - "type": "string" - }, - { - "const": "think", - "description": "Internal reasoning or planning.", - "type": "string" - }, - { - "const": "fetch", - "description": "Retrieving external data.", - "type": "string" - }, - { - "const": "switch_mode", - "description": "Switching the current session mode.", - "type": "string" - }, - { - "const": "other", - "description": "Other tool types (default).", - "type": "string" - } - ] - }, - "UnstructuredCommandInput": { - "description": "All text that was typed after the command name is provided as input.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "hint": { - "description": "A hint to display when the input hasn't been provided yet", - "type": "string" - } - }, - "required": ["hint"], - "type": "object" - }, - "WaitForTerminalExitRequest": { - "description": "Request to wait for a terminal command to exit.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to wait for.", - "type": "string" - } - }, - "required": ["sessionId", "terminalId"], - "type": "object", - "x-method": "terminal/wait_for_exit", - "x-side": "client" - }, - "WaitForTerminalExitResponse": { - "description": "Response containing the exit status of a terminal command.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "exitCode": { - "description": "The process exit code (may be null if terminated by signal).", - "format": "uint32", - "minimum": 0, - "type": ["integer", "null"] - }, - "signal": { - "description": "The signal that terminated the process (may be null if exited normally).", - "type": ["string", "null"] - } - }, - "type": "object", - "x-method": "terminal/wait_for_exit", - "x-side": "client" - }, - "WriteTextFileRequest": { - "description": "Request to write content to a text file.\n\nOnly available if the client supports the `fs.writeTextFile` capability.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "content": { - "description": "The text content to write to the file.", - "type": "string" - }, - "path": { - "description": "Absolute path to the file to write.", - "type": "string" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - } - }, - "required": ["sessionId", "path", "content"], - "type": "object", - "x-method": "fs/write_text_file", - "x-side": "client" - }, - "WriteTextFileResponse": { - "description": "Response to `fs/write_text_file`", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "fs/write_text_file", - "x-side": "client" - } - }, - "$schema": "https://json-schema.org/draft/2020-12/schema", - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/AgentRequest" - } - ], - "title": "Request" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AgentResponse" - } - ], - "title": "Response" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AgentNotification" - } - ], - "title": "Notification" - } - ], - "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", - "properties": { - "jsonrpc": { - "enum": ["2.0"], - "type": "string" - } - }, - "required": ["jsonrpc"], - "title": "Agent", - "type": "object" - }, - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/ClientRequest" - } - ], - "title": "Request" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ClientResponse" - } - ], - "title": "Response" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ClientNotification" - } - ], - "title": "Notification" - } - ], - "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", - "properties": { - "jsonrpc": { - "enum": ["2.0"], - "type": "string" - } - }, - "required": ["jsonrpc"], - "title": "Client", - "type": "object" - } - ], - "title": "Agent Client Protocol" -} diff --git a/packages/sdk-java/qwencode/.editorconfig b/packages/sdk-java/qwencode/.editorconfig deleted file mode 100644 index 53a4241f9d..0000000000 --- a/packages/sdk-java/qwencode/.editorconfig +++ /dev/null @@ -1,24 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_style = space -indent_size = 4 -tab_width = 4 -ij_continuation_indent_size = 8 - -[*.java] -ij_java_doc_align_exception_comments = false -ij_java_doc_align_param_comments = false - -[*.{yaml, yml, sh, ps1}] -indent_size = 2 - -[*.{md, mkd, markdown}] -trim_trailing_whitespace = false - -[{**/res/**.xml, **/AndroidManifest.xml}] -ij_continuation_indent_size = 4 diff --git a/packages/sdk-java/qwencode/.gitignore b/packages/sdk-java/qwencode/.gitignore deleted file mode 100644 index 23cdb8c94b..0000000000 --- a/packages/sdk-java/qwencode/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -# Mac -.DS_Store - -# Maven -log/ -target/ - -/docs/ diff --git a/packages/sdk-java/qwencode/LICENSE b/packages/sdk-java/qwencode/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/packages/sdk-java/qwencode/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/sdk-java/qwencode/QWEN.md b/packages/sdk-java/qwencode/QWEN.md deleted file mode 100644 index 80bda7ab84..0000000000 --- a/packages/sdk-java/qwencode/QWEN.md +++ /dev/null @@ -1,377 +0,0 @@ -# Qwen Code Java SDK - -## Project Overview - -The Qwen Code Java SDK is a minimum experimental SDK for programmatic access to Qwen Code functionality. It provides a Java interface to interact with the Qwen Code CLI, allowing developers to integrate Qwen Code capabilities into their Java applications. - -**Context Information:** - -- Current Date: Monday 5 January 2026 -- Operating System: darwin -- Working Directory: /Users/weigeng/repos/qwen-code/packages/sdk-java - -## Project Details - -- **Group ID**: com.alibaba -- **Artifact ID**: qwencode-sdk (as per pom.xml) -- **Version**: 0.0.1-SNAPSHOT -- **Packaging**: JAR -- **Java Version**: 1.8+ (source and target) -- **License**: Apache-2.0 - -## Architecture - -The SDK follows a layered architecture: - -- **API Layer**: Provides the main entry points through `QwenCodeCli` class with simple static methods for basic usage -- **Session Layer**: Manages communication sessions with the Qwen Code CLI through the `Session` class -- **Transport Layer**: Handles the communication mechanism between the SDK and CLI process (currently using process transport via `ProcessTransport`) -- **Protocol Layer**: Defines data structures for communication based on the CLI protocol -- **Utils**: Common utilities for concurrent execution, timeout handling, and error management - -## Key Components - -### Main Classes - -- `QwenCodeCli`: Main entry point with static methods for simple queries -- `Session`: Manages communication sessions with the CLI -- `Transport`: Abstracts the communication mechanism (currently using process transport) -- `ProcessTransport`: Implementation that communicates via process execution -- `TransportOptions`: Configuration class for transport layer settings -- `SessionEventSimpleConsumers`: High-level event handler for processing responses -- `AssistantContentSimpleConsumers`: Handles different types of content within assistant messages - -### Dependencies - -- **Logging**: ch.qos.logback:logback-classic -- **Utilities**: org.apache.commons:commons-lang3 -- **JSON Processing**: com.alibaba.fastjson2:fastjson2 -- **Testing**: JUnit 5 (org.junit.jupiter:junit-jupiter) - -## Building and Running - -### Prerequisites - -- Java 8 or higher -- Apache Maven 3.6.0 or higher - -### Build Commands - -```bash -# Compile the project -mvn compile - -# Run tests -mvn test - -# Package the JAR -mvn package - -# Install to local repository -mvn install - -# Run checkstyle verification -mvn checkstyle:check - -# Generate Javadoc -mvn javadoc:javadoc -``` - -### Testing - -The project includes basic unit tests using JUnit 5. The main test class `QwenCodeCliTest` demonstrates how to use the SDK to make simple queries to the Qwen Code CLI. - -### Code Quality - -The project uses Checkstyle for code formatting and style enforcement. The configuration is defined in `checkstyle.xml` and includes rules for: - -- Whitespace and indentation -- Naming conventions -- Import ordering -- Code structure -- Line endings (LF only) -- No trailing whitespace -- 8-space indentation for line wrapping - -## Development Conventions - -### Coding Standards - -- Java 8 language features are supported -- Follow standard Java naming conventions -- Use UTF-8 encoding for source files -- Line endings should be LF (Unix-style) -- No trailing whitespace allowed -- Use 8-space indentation for line wrapping - -### Testing Practices - -- Write unit tests using JUnit 5 -- Test classes should be in the `src/test/java` directory -- Follow the naming convention `*Test.java` for test classes -- Use appropriate assertions to validate functionality - -### Documentation - -- API documentation should follow Javadoc conventions -- Update README files when adding new features -- Include examples in documentation - -## API Reference - -### QwenCodeCli Class - -The main class provides several primary methods: - -- `simpleQuery(String prompt)`: Synchronous method that returns a list of responses -- `simpleQuery(String prompt, TransportOptions transportOptions)`: Synchronous method with custom transport options -- `simpleQuery(String prompt, TransportOptions transportOptions, AssistantContentConsumers assistantContentConsumers)`: Advanced method with custom content consumers -- `newSession()`: Creates a new session with default options -- `newSession(TransportOptions transportOptions)`: Creates a new session with custom options - -### Permission Modes - -The SDK supports different permission modes for controlling tool execution: - -- **`default`**: Write tools are denied unless approved via `canUseTool` callback or in `allowedTools`. Read-only tools execute without confirmation. -- **`plan`**: Blocks all write tools, instructing AI to present a plan first. -- **`auto-edit`**: Auto-approve edit tools (edit, write_file) while other tools require confirmation. -- **`yolo`**: All tools execute automatically without confirmation. - -### Transport Options - -The `TransportOptions` class allows configuration of how the SDK communicates with the Qwen Code CLI: - -- `pathToQwenExecutable`: Path to the Qwen Code CLI executable -- `cwd`: Working directory for the CLI process -- `model`: AI model to use for the session -- `permissionMode`: Permission mode that controls tool execution -- `env`: Environment variables to pass to the CLI process -- `maxSessionTurns`: Limits the number of conversation turns in a session -- `coreTools`: List of core tools that should be available to the AI -- `excludeTools`: List of tools to exclude from being available to the AI -- `allowedTools`: List of tools that are pre-approved for use without additional confirmation -- `authType`: Authentication type to use for the session -- `includePartialMessages`: Enables receiving partial messages during streaming responses -- `turnTimeout`: Timeout for a complete turn of conversation -- `messageTimeout`: Timeout for individual messages within a turn -- `resumeSessionId`: ID of a previous session to resume -- `otherOptions`: Additional command-line options to pass to the CLI - -### Session Control Features - -- **Session creation**: Use `QwenCodeCli.newSession()` to create a new session with custom options -- **Session management**: The `Session` class provides methods to send prompts, handle responses, and manage session state -- **Session cleanup**: Always close sessions using `session.close()` to properly terminate the CLI process -- **Session resumption**: Use `setResumeSessionId()` in `TransportOptions` to resume a previous session -- **Session interruption**: Use `session.interrupt()` to interrupt a currently running prompt -- **Dynamic model switching**: Use `session.setModel()` to change the model during a session -- **Dynamic permission mode switching**: Use `session.setPermissionMode()` to change the permission mode during a session - -### Thread Pool Configuration - -The SDK uses a thread pool for managing concurrent operations with the following default configuration: - -- **Core Pool Size**: 30 threads -- **Maximum Pool Size**: 100 threads -- **Keep-Alive Time**: 60 seconds -- **Queue Capacity**: 300 tasks (using LinkedBlockingQueue) -- **Thread Naming**: "qwen_code_cli-pool-{number}" -- **Daemon Threads**: false -- **Rejected Execution Handler**: CallerRunsPolicy - -### Session Event Consumers and Assistant Content Consumers - -The SDK provides two key interfaces for handling events and content from the CLI: - -#### SessionEventConsumers Interface - -The `SessionEventConsumers` interface provides callbacks for different types of messages during a session: - -- `onSystemMessage`: Handles system messages from the CLI (receives Session and SDKSystemMessage) -- `onResultMessage`: Handles result messages from the CLI (receives Session and SDKResultMessage) -- `onAssistantMessage`: Handles assistant messages (AI responses) (receives Session and SDKAssistantMessage) -- `onPartialAssistantMessage`: Handles partial assistant messages during streaming (receives Session and SDKPartialAssistantMessage) -- `onUserMessage`: Handles user messages (receives Session and SDKUserMessage) -- `onOtherMessage`: Handles other types of messages (receives Session and String message) -- `onControlResponse`: Handles control responses (receives Session and CLIControlResponse) -- `onControlRequest`: Handles control requests (receives Session and CLIControlRequest, returns CLIControlResponse) -- `onPermissionRequest`: Handles permission requests (receives Session and CLIControlRequest, returns Behavior) - -#### AssistantContentConsumers Interface - -The `AssistantContentConsumers` interface handles different types of content within assistant messages: - -- `onText`: Handles text content (receives Session and TextAssistantContent) -- `onThinking`: Handles thinking content (receives Session and ThingkingAssistantContent) -- `onToolUse`: Handles tool use content (receives Session and ToolUseAssistantContent) -- `onToolResult`: Handles tool result content (receives Session and ToolResultAssistantContent) -- `onOtherContent`: Handles other content types (receives Session and AssistantContent) -- `onUsage`: Handles usage information (receives Session and AssistantUsage) -- `onPermissionRequest`: Handles permission requests (receives Session and CLIControlPermissionRequest, returns Behavior) -- `onOtherControlRequest`: Handles other control requests (receives Session and ControlRequestPayload, returns ControlResponsePayload) - -#### Relationship Between the Interfaces - -**Important Note on Event Hierarchy:** - -- `SessionEventConsumers` is the **high-level** event processor that handles different message types (system, assistant, user, etc.) -- `AssistantContentConsumers` is the **low-level** content processor that handles different types of content within assistant messages (text, tools, thinking, etc.) - -**Processor Relationship:** - -- `SessionEventConsumers` → `AssistantContentConsumers` (SessionEventConsumers uses AssistantContentConsumers to process content within assistant messages) - -**Event Derivation Relationships:** - -- `onAssistantMessage` → `onText`, `onThinking`, `onToolUse`, `onToolResult`, `onOtherContent`, `onUsage` -- `onPartialAssistantMessage` → `onText`, `onThinking`, `onToolUse`, `onToolResult`, `onOtherContent` -- `onControlRequest` → `onPermissionRequest`, `onOtherControlRequest` - -**Event Timeout Relationships:** - -Each event handler method has a corresponding timeout method that allows customizing the timeout behavior for that specific event: - -- `onSystemMessage` ↔ `onSystemMessageTimeout` -- `onResultMessage` ↔ `onResultMessageTimeout` -- `onAssistantMessage` ↔ `onAssistantMessageTimeout` -- `onPartialAssistantMessage` ↔ `onPartialAssistantMessageTimeout` -- `onUserMessage` ↔ `onUserMessageTimeout` -- `onOtherMessage` ↔ `onOtherMessageTimeout` -- `onControlResponse` ↔ `onControlResponseTimeout` -- `onControlRequest` ↔ `onControlRequestTimeout` - -For AssistantContentConsumers timeout methods: - -- `onText` ↔ `onTextTimeout` -- `onThinking` ↔ `onThinkingTimeout` -- `onToolUse` ↔ `onToolUseTimeout` -- `onToolResult` ↔ `onToolResultTimeout` -- `onOtherContent` ↔ `onOtherContentTimeout` -- `onPermissionRequest` ↔ `onPermissionRequestTimeout` -- `onOtherControlRequest` ↔ `onOtherControlRequestTimeout` - -**Default Timeout Values:** - -- `SessionEventSimpleConsumers` default timeout: 180 seconds (Timeout.TIMEOUT_180_SECONDS) -- `AssistantContentSimpleConsumers` default timeout: 60 seconds (Timeout.TIMEOUT_60_SECONDS) - -**Timeout Hierarchy Requirements:** - -For proper operation, the following timeout relationships should be maintained: - -- `onAssistantMessageTimeout` return value should be greater than `onTextTimeout`, `onThinkingTimeout`, `onToolUseTimeout`, `onToolResultTimeout`, and `onOtherContentTimeout` return values -- `onControlRequestTimeout` return value should be greater than `onPermissionRequestTimeout` and `onOtherControlRequestTimeout` return values - -#### Relationship Between the Interfaces - -- `AssistantContentSimpleConsumers` is the default implementation of `AssistantContentConsumers` -- `SessionEventSimpleConsumers` is the concrete implementation that combines both interfaces and depends on an `AssistantContentConsumers` instance to handle content within assistant messages -- The timeout methods in `SessionEventConsumers` now include the message object as a parameter (e.g., `onSystemMessageTimeout(Session session, SDKSystemMessage systemMessage)`) - -Event processing is subject to the timeout settings configured in `TransportOptions` and `SessionEventConsumers`. For detailed timeout configuration options, see the "Timeout" section above. - -## Usage Examples - -The SDK includes several example files in `src/test/java/com/alibaba/qwen/code/cli/example/` that demonstrate different aspects of the API: - -### Basic Usage - -- `QuickStartExample.java`: Demonstrates simple query usage, transport options configuration, and streaming content handling - -### Session Control - -- `SessionExample.java`: Shows session control features including permission mode changes, model switching, interruption, and event handling - -### Configuration - -- `ThreadPoolConfigurationExample.java`: Shows how to configure the thread pool used by the SDK - -## Error Handling - -The SDK provides specific exception types for different error scenarios: - -- `SessionControlException`: Thrown when there's an issue with session control (creation, initialization, etc.) -- `SessionSendPromptException`: Thrown when there's an issue sending a prompt or receiving a response -- `SessionClosedException`: Thrown when attempting to use a closed session - -## Project Structure - -``` -src/ -├── example/ -│ └── java/ -│ └── com/ -│ └── alibaba/ -│ └── qwen/ -│ └── code/ -│ └── example/ -├── main/ -│ └── java/ -│ └── com/ -│ └── alibaba/ -│ └── qwen/ -│ └── code/ -│ └── cli/ -│ ├── QwenCodeCli.java -│ ├── protocol/ -│ ├── session/ -│ ├── transport/ -│ └── utils/ -└── test/ - ├── java/ - │ └── com/ - │ └── alibaba/ - │ └── qwen/ - │ └── code/ - │ └── cli/ - │ ├── QwenCodeCliTest.java - │ ├── session/ - │ │ └── SessionTest.java - │ └── transport/ - │ ├── PermissionModeTest.java - │ └── process/ - │ └── ProcessTransportTest.java - └── temp/ -``` - -## Configuration Files - -- `pom.xml`: Maven build configuration and dependencies -- `checkstyle.xml`: Code style and formatting rules -- `.editorconfig`: Editor configuration settings - -## FAQ / Troubleshooting - -### Q: Do I need to install the Qwen CLI separately? - -A: No, from v0.1.1, the CLI is bundled with the SDK, so no standalone CLI installation is needed. - -### Q: What Java versions are supported? - -A: The SDK requires Java 1.8 or higher. - -### Q: How do I handle long-running requests? - -A: The SDK includes timeout utilities. You can configure timeouts using the `Timeout` class in `TransportOptions`. - -### Q: Why are some tools not executing? - -A: This is likely due to permission modes. Check your permission mode settings and consider using `allowedTools` to pre-approve certain tools. - -### Q: How do I resume a previous session? - -A: Use the `setResumeSessionId()` method in `TransportOptions` to resume a previous session. - -### Q: Can I customize the environment for the CLI process? - -A: Yes, use the `setEnv()` method in `TransportOptions` to pass environment variables to the CLI process. - -### Q: What happens if the CLI process crashes? - -A: The SDK will throw appropriate exceptions. Make sure to handle `SessionControlException` and implement retry logic if needed. - -## Maintainers - -- **Developer**: skyfire (gengwei.gw(at)alibaba-inc.com) -- **Organization**: Alibaba Group diff --git a/packages/sdk-java/qwencode/README.md b/packages/sdk-java/qwencode/README.md deleted file mode 100644 index 755e03d8a6..0000000000 --- a/packages/sdk-java/qwencode/README.md +++ /dev/null @@ -1,307 +0,0 @@ -# Qwen Code Java SDK - -The Qwen Code Java SDK is a minimum experimental SDK for programmatic access to Qwen Code functionality. It provides a Java interface to interact with the Qwen Code CLI, allowing developers to integrate Qwen Code capabilities into their Java applications. - -## Requirements - -- Java >= 1.8 -- Maven >= 3.6.0 (for building from source) -- qwen-code >= 0.5.0 - -### Dependencies - -- **Logging**: ch.qos.logback:logback-classic -- **Utilities**: org.apache.commons:commons-lang3 -- **JSON Processing**: com.alibaba.fastjson2:fastjson2 -- **Testing**: JUnit 5 (org.junit.jupiter:junit-jupiter) - -## Installation - -Add the following dependency to your Maven `pom.xml`: - -```xml - - com.alibaba - qwencode-sdk - {$version} - -``` - -Or if using Gradle, add to your `build.gradle`: - -```gradle -implementation 'com.alibaba:qwencode-sdk:{$version}' -``` - -## Building and Running - -### Build Commands - -```bash -# Compile the project -mvn compile - -# Run tests -mvn test - -# Package the JAR -mvn package - -# Install to local repository -mvn install -``` - -## Quick Start - -The simplest way to use the SDK is through the `QwenCodeCli.simpleQuery()` method: - -```java -public static void runSimpleExample() { - List result = QwenCodeCli.simpleQuery("hello world"); - result.forEach(logger::info); -} -``` - -For more advanced usage with custom transport options: - -```java -public static void runTransportOptionsExample() { - TransportOptions options = new TransportOptions() - .setModel("qwen3-coder-flash") - .setPermissionMode(PermissionMode.AUTO_EDIT) - .setCwd("./") - .setEnv(new HashMap() {{put("CUSTOM_VAR", "value");}}) - .setIncludePartialMessages(true) - .setTurnTimeout(new Timeout(120L, TimeUnit.SECONDS)) - .setMessageTimeout(new Timeout(90L, TimeUnit.SECONDS)) - .setAllowedTools(Arrays.asList("read_file", "write_file", "list_directory")); - - List result = QwenCodeCli.simpleQuery("who are you, what are your capabilities?", options); - result.forEach(logger::info); -} -``` - -For streaming content handling with custom content consumers: - -```java -public static void runStreamingExample() { - QwenCodeCli.simpleQuery("who are you, what are your capabilities?", - new TransportOptions().setMessageTimeout(new Timeout(10L, TimeUnit.SECONDS)), new AssistantContentSimpleConsumers() { - - @Override - public void onText(Session session, TextAssistantContent textAssistantContent) { - logger.info("Text content received: {}", textAssistantContent.getText()); - } - - @Override - public void onThinking(Session session, ThingkingAssistantContent thingkingAssistantContent) { - logger.info("Thinking content received: {}", thingkingAssistantContent.getThinking()); - } - - @Override - public void onToolUse(Session session, ToolUseAssistantContent toolUseContent) { - logger.info("Tool use content received: {} with arguments: {}", - toolUseContent, toolUseContent.getInput()); - } - - @Override - public void onToolResult(Session session, ToolResultAssistantContent toolResultContent) { - logger.info("Tool result content received: {}", toolResultContent.getContent()); - } - - @Override - public void onOtherContent(Session session, AssistantContent other) { - logger.info("Other content received: {}", other); - } - - @Override - public void onUsage(Session session, AssistantUsage assistantUsage) { - logger.info("Usage information received: Input tokens: {}, Output tokens: {}", - assistantUsage.getUsage().getInputTokens(), assistantUsage.getUsage().getOutputTokens()); - } - }.setDefaultPermissionOperation(Operation.allow)); - logger.info("Streaming example completed."); -} -``` - -other examples see src/test/java/com/alibaba/qwen/code/cli/example - -## Architecture - -The SDK follows a layered architecture: - -- **API Layer**: Provides the main entry points through `QwenCodeCli` class with simple static methods for basic usage -- **Session Layer**: Manages communication sessions with the Qwen Code CLI through the `Session` class -- **Transport Layer**: Handles the communication mechanism between the SDK and CLI process (currently using process transport via `ProcessTransport`) -- **Protocol Layer**: Defines data structures for communication based on the CLI protocol -- **Utils**: Common utilities for concurrent execution, timeout handling, and error management - -## Key Features - -### Permission Modes - -The SDK supports different permission modes for controlling tool execution: - -- **`default`**: Write tools are denied unless approved via `canUseTool` callback or in `allowedTools`. Read-only tools execute without confirmation. -- **`plan`**: Blocks all write tools, instructing AI to present a plan first. -- **`auto-edit`**: Auto-approve edit tools (edit, write_file) while other tools require confirmation. -- **`yolo`**: All tools execute automatically without confirmation. - -### Session Event Consumers and Assistant Content Consumers - -The SDK provides two key interfaces for handling events and content from the CLI: - -#### SessionEventConsumers Interface - -The `SessionEventConsumers` interface provides callbacks for different types of messages during a session: - -- `onSystemMessage`: Handles system messages from the CLI (receives Session and SDKSystemMessage) -- `onResultMessage`: Handles result messages from the CLI (receives Session and SDKResultMessage) -- `onAssistantMessage`: Handles assistant messages (AI responses) (receives Session and SDKAssistantMessage) -- `onPartialAssistantMessage`: Handles partial assistant messages during streaming (receives Session and SDKPartialAssistantMessage) -- `onUserMessage`: Handles user messages (receives Session and SDKUserMessage) -- `onOtherMessage`: Handles other types of messages (receives Session and String message) -- `onControlResponse`: Handles control responses (receives Session and CLIControlResponse) -- `onControlRequest`: Handles control requests (receives Session and CLIControlRequest, returns CLIControlResponse) -- `onPermissionRequest`: Handles permission requests (receives Session and CLIControlRequest, returns Behavior) - -#### AssistantContentConsumers Interface - -The `AssistantContentConsumers` interface handles different types of content within assistant messages: - -- `onText`: Handles text content (receives Session and TextAssistantContent) -- `onThinking`: Handles thinking content (receives Session and ThingkingAssistantContent) -- `onToolUse`: Handles tool use content (receives Session and ToolUseAssistantContent) -- `onToolResult`: Handles tool result content (receives Session and ToolResultAssistantContent) -- `onOtherContent`: Handles other content types (receives Session and AssistantContent) -- `onUsage`: Handles usage information (receives Session and AssistantUsage) -- `onPermissionRequest`: Handles permission requests (receives Session and CLIControlPermissionRequest, returns Behavior) -- `onOtherControlRequest`: Handles other control requests (receives Session and ControlRequestPayload, returns ControlResponsePayload) - -#### Relationship Between the Interfaces - -**Important Note on Event Hierarchy:** - -- `SessionEventConsumers` is the **high-level** event processor that handles different message types (system, assistant, user, etc.) -- `AssistantContentConsumers` is the **low-level** content processor that handles different types of content within assistant messages (text, tools, thinking, etc.) - -**Processor Relationship:** - -- `SessionEventConsumers` → `AssistantContentConsumers` (SessionEventConsumers uses AssistantContentConsumers to process content within assistant messages) - -**Event Derivation Relationships:** - -- `onAssistantMessage` → `onText`, `onThinking`, `onToolUse`, `onToolResult`, `onOtherContent`, `onUsage` -- `onPartialAssistantMessage` → `onText`, `onThinking`, `onToolUse`, `onToolResult`, `onOtherContent` -- `onControlRequest` → `onPermissionRequest`, `onOtherControlRequest` - -**Event Timeout Relationships:** - -Each event handler method has a corresponding timeout method that allows customizing the timeout behavior for that specific event: - -- `onSystemMessage` ↔ `onSystemMessageTimeout` -- `onResultMessage` ↔ `onResultMessageTimeout` -- `onAssistantMessage` ↔ `onAssistantMessageTimeout` -- `onPartialAssistantMessage` ↔ `onPartialAssistantMessageTimeout` -- `onUserMessage` ↔ `onUserMessageTimeout` -- `onOtherMessage` ↔ `onOtherMessageTimeout` -- `onControlResponse` ↔ `onControlResponseTimeout` -- `onControlRequest` ↔ `onControlRequestTimeout` - -For AssistantContentConsumers timeout methods: - -- `onText` ↔ `onTextTimeout` -- `onThinking` ↔ `onThinkingTimeout` -- `onToolUse` ↔ `onToolUseTimeout` -- `onToolResult` ↔ `onToolResultTimeout` -- `onOtherContent` ↔ `onOtherContentTimeout` -- `onPermissionRequest` ↔ `onPermissionRequestTimeout` -- `onOtherControlRequest` ↔ `onOtherControlRequestTimeout` - -**Default Timeout Values:** - -- `SessionEventSimpleConsumers` default timeout: 180 seconds (Timeout.TIMEOUT_180_SECONDS) -- `AssistantContentSimpleConsumers` default timeout: 60 seconds (Timeout.TIMEOUT_60_SECONDS) - -**Timeout Hierarchy Requirements:** - -For proper operation, the following timeout relationships should be maintained: - -- `onAssistantMessageTimeout` return value should be greater than `onTextTimeout`, `onThinkingTimeout`, `onToolUseTimeout`, `onToolResultTimeout`, and `onOtherContentTimeout` return values -- `onControlRequestTimeout` return value should be greater than `onPermissionRequestTimeout` and `onOtherControlRequestTimeout` return values - -### Transport Options - -The `TransportOptions` class allows configuration of how the SDK communicates with the Qwen Code CLI: - -- `pathToQwenExecutable`: Path to the Qwen Code CLI executable -- `cwd`: Working directory for the CLI process -- `model`: AI model to use for the session -- `permissionMode`: Permission mode that controls tool execution -- `env`: Environment variables to pass to the CLI process -- `maxSessionTurns`: Limits the number of conversation turns in a session -- `coreTools`: List of core tools that should be available to the AI -- `excludeTools`: List of tools to exclude from being available to the AI -- `allowedTools`: List of tools that are pre-approved for use without additional confirmation -- `authType`: Authentication type to use for the session -- `includePartialMessages`: Enables receiving partial messages during streaming responses -- `turnTimeout`: Timeout for a complete turn of conversation -- `messageTimeout`: Timeout for individual messages within a turn -- `resumeSessionId`: ID of a previous session to resume -- `otherOptions`: Additional command-line options to pass to the CLI - -### Session Control Features - -- **Session creation**: Use `QwenCodeCli.newSession()` to create a new session with custom options -- **Session management**: The `Session` class provides methods to send prompts, handle responses, and manage session state -- **Session cleanup**: Always close sessions using `session.close()` to properly terminate the CLI process -- **Session resumption**: Use `setResumeSessionId()` in `TransportOptions` to resume a previous session -- **Session interruption**: Use `session.interrupt()` to interrupt a currently running prompt -- **Dynamic model switching**: Use `session.setModel()` to change the model during a session -- **Dynamic permission mode switching**: Use `session.setPermissionMode()` to change the permission mode during a session - -### Thread Pool Configuration - -The SDK uses a thread pool for managing concurrent operations with the following default configuration: - -- **Core Pool Size**: 30 threads -- **Maximum Pool Size**: 100 threads -- **Keep-Alive Time**: 60 seconds -- **Queue Capacity**: 300 tasks (using LinkedBlockingQueue) -- **Thread Naming**: "qwen_code_cli-pool-{number}" -- **Daemon Threads**: false -- **Rejected Execution Handler**: CallerRunsPolicy - -## Error Handling - -The SDK provides specific exception types for different error scenarios: - -- `SessionControlException`: Thrown when there's an issue with session control (creation, initialization, etc.) -- `SessionSendPromptException`: Thrown when there's an issue sending a prompt or receiving a response -- `SessionClosedException`: Thrown when attempting to use a closed session - -## FAQ / Troubleshooting - -### Q: What Java versions are supported? - -A: The SDK requires Java 1.8 or higher. - -### Q: How do I handle long-running requests? - -A: The SDK includes timeout utilities. You can configure timeouts using the `Timeout` class in `TransportOptions`. - -### Q: Why are some tools not executing? - -A: This is likely due to permission modes. Check your permission mode settings and consider using `allowedTools` to pre-approve certain tools. - -### Q: How do I resume a previous session? - -A: Use the `setResumeSessionId()` method in `TransportOptions` to resume a previous session. - -### Q: Can I customize the environment for the CLI process? - -A: Yes, use the `setEnv()` method in `TransportOptions` to pass environment variables to the CLI process. - -## License - -Apache-2.0 - see [LICENSE](./LICENSE) for details. diff --git a/packages/sdk-java/qwencode/RELEASE.md b/packages/sdk-java/qwencode/RELEASE.md deleted file mode 100644 index 520ea1e7d1..0000000000 --- a/packages/sdk-java/qwencode/RELEASE.md +++ /dev/null @@ -1,150 +0,0 @@ -# Release Notes - -### Changes in 0.0.2-alpha - -### Summary - -This release includes a fix for modifying some fields as referenced in issue #1459. - -#### Fix - -- Issue: modify some fields #1459 - -### Release Date - -January 14, 2026 - -### Maven Configuration - -```xml - - com.alibaba - qwencode-sdk - 0.0.2-alpha - -``` - -### Changes in 0.0.1-alpha - -### Summary - -This release includes updates to the Qwen Code Java SDK with improved session management, enhanced transport options, and better error handling capabilities. - -### Maven Configuration - -```xml - - com.alibaba - qwencode-sdk - 0.0.1-alpha - -``` - -#### Gradle Configuration - -```gradle -implementation 'com.alibaba:qwencode-sdk:0.0.1-alpha' -``` - -### Release Date - -January 5, 2026 - -#### New Features - -- Enhanced session management with dynamic model switching -- Improved permission mode controls with multiple options (default, plan, auto-edit, yolo) -- Support for streaming content handling with custom content consumers -- Thread pool configuration for managing concurrent operations -- Session resumption capabilities using resumeSessionId -- Dynamic permission mode switching during active sessions - -#### Improvements - -- Better timeout handling with configurable session and message timeouts -- Enhanced error handling with specific exception types -- Improved transport options configuration -- More flexible environment variable passing to CLI process -- Better support for partial message streaming - -#### Bug Fixes - -- Fixed session interruption handling -- Resolved issues with tool execution permissions -- Improved stability of process transport communication -- Fixed potential resource leaks in session cleanup - -### Known Issues - -1. **CLI Bundling**: From v0.1.1, the CLI is bundled with the SDK, eliminating the need for separate CLI installation. However, users upgrading from earlier versions should remove any standalone CLI installations to avoid conflicts. - -2. **Memory Management**: Long-running sessions with extensive streaming content may consume significant memory. Proper session cleanup using `session.close()` is essential. - -3. **Thread Pool Configuration**: The default thread pool configuration (30 core, 100 max threads) may need adjustment based on application load and concurrent session requirements. - -4. **Timeout Configuration**: Users experiencing timeout issues should adjust the `turnTimeout` and `messageTimeout` values in `TransportOptions` based on their specific use cases. - -5. **Permission Mode Confusion**: The different permission modes (default, plan, auto-edit, yolo) may cause confusion for new users. Clear documentation and examples are needed to guide users in selecting appropriate permission modes. - -6. **Environment Variable Limitations**: Environment variables passed to the CLI process may have platform-specific limitations on length and character sets. - -### Maven Build Configuration - -The project uses Maven for build management with the following key plugins and configurations: - -#### Compiler Plugin - -- Source and Target: Java 1.8 -- Encoding: UTF-8 - -#### Dependencies - -- Logging: ch.qos.logback:logback-classic -- Utilities: org.apache.commons:commons-lang3 -- JSON Processing: com.alibaba.fastjson2:fastjson2 -- Testing: JUnit 5 (org.junit.jupiter:junit-jupiter) - -#### Build Plugins - -- **Checkstyle Plugin**: Enforces code style consistency using checkstyle.xml configuration -- **JaCoCo Plugin**: Provides code coverage reports during testing -- **Central Publishing Plugin**: Enables publishing to Maven Central -- **Source Plugin**: Generates and attaches source JARs -- **Javadoc Plugin**: Generates and attaches Javadoc JARs -- **GPG Plugin**: Signs artifacts for secure publishing to Maven Central - -#### Distribution Management - -- Snapshot Repository: https://central.sonatype.com/repository/maven-snapshots/ -- Release Repository: https://central.sonatype.org/service/local/staging/deploy/maven2/ - -### Deployment Instructions - -To deploy a new version of the SDK: - -1. Update the version in `pom.xml` -2. Run `mvn clean deploy` to build and deploy to Maven Central -3. Ensure GPG signing keys are properly configured -4. Verify the deployment in the Sonatype staging repository - -### Future Enhancements - -Planned improvements for upcoming releases: - -1. **Enhanced Security**: Additional authentication mechanisms and secure credential handling -2. **Performance Optimization**: Improved memory usage and faster response times -3. **Extended API Coverage**: More comprehensive coverage of Qwen Code CLI features -4. **Better Documentation**: Expanded examples and API reference materials -5. **Improved Error Recovery**: More robust handling of connection failures and retries - -### Support and Contributions - -For support, bug reports, or contributions: - -- Issue Tracker: https://github.com/QwenLM/qwen-code/issues -- Documentation: Refer to README.md and Javadoc -- Contributions: Pull requests are welcome following the project's contribution guidelines - -### License - -This project is licensed under the Apache 2.0 License - see the [LICENSE](./LICENSE) file for details. diff --git a/packages/sdk-java/qwencode/checkstyle.xml b/packages/sdk-java/qwencode/checkstyle.xml deleted file mode 100644 index c67c1319f9..0000000000 --- a/packages/sdk-java/qwencode/checkstyle.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/sdk-java/qwencode/pom.xml b/packages/sdk-java/qwencode/pom.xml deleted file mode 100644 index 7defb5926e..0000000000 --- a/packages/sdk-java/qwencode/pom.xml +++ /dev/null @@ -1,193 +0,0 @@ - - 4.0.0 - com.alibaba - qwencode-sdk - jar - 0.0.3-alpha - qwencode-sdk - The Qwen Code Java SDK is a minimum experimental SDK for programmatic access to Qwen Code functionality. It provides a Java interface - to interact with the Qwen Code CLI, allowing developers to integrate Qwen Code capabilities into their Java applications. - - https://maven.apache.org - - - Apache 2 - https://www.apache.org/licenses/LICENSE-2.0.txt - repo - A business-friendly OSS license - - - - https://github.com/QwenLM/qwen-code - scm:git:https://github.com/QwenLM/qwen-code.git - - - 1.8 - 1.8 - UTF-8 - 3.6.0 - 0.8.12 - 5.14.1 - 1.3.16 - 2.0.60 - 3.13.0 - 0.8.0 - 2.2.1 - 2.9.1 - 1.5 - - - - - - org.junit - junit-bom - pom - ${junit5.version} - import - - - - - - ch.qos.logback - logback-classic - ${logback-classic.version} - - - org.apache.commons - commons-lang3 - 3.20.0 - - - com.alibaba.fastjson2 - fastjson2 - ${fastjson2.version} - - - org.junit.jupiter - junit-jupiter - test - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - ${checkstyle-maven-plugin.version} - - checkstyle.xml - - - - - check - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco-maven-plugin.version} - - - - prepare-agent - - - - report - test - - report - - - - - - org.sonatype.central - central-publishing-maven-plugin - ${central-publishing-maven-plugin.version} - true - - central - - - - - org.apache.maven.plugins - maven-source-plugin - ${maven-source-plugin.version} - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - - sign-artifacts - verify - - sign - - - - - - - - - Alibaba Group - https://github.com/alibaba - - - - skyfire - skyfire - gengwei.gw(at)alibaba-inc.com - - Developer - Designer - - +8 - https://github.com/gwinthis - - - - - - central - https://central.sonatype.com/repository/maven-snapshots/ - - - central - https://central.sonatype.org/service/local/staging/deploy/maven2/ - - - diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/QwenCodeCli.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/QwenCodeCli.java deleted file mode 100644 index 9a654034de..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/QwenCodeCli.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.alibaba.qwen.code.cli; - -import java.util.ArrayList; -import java.util.List; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.qwen.code.cli.protocol.data.AssistantUsage; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.TextAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ThingkingAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolResultAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolUseAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior.Operation; -import com.alibaba.qwen.code.cli.session.Session; -import com.alibaba.qwen.code.cli.session.event.consumers.AssistantContentConsumers; -import com.alibaba.qwen.code.cli.session.event.consumers.AssistantContentSimpleConsumers; -import com.alibaba.qwen.code.cli.session.event.consumers.SessionEventSimpleConsumers; -import com.alibaba.qwen.code.cli.transport.Transport; -import com.alibaba.qwen.code.cli.transport.TransportOptions; -import com.alibaba.qwen.code.cli.transport.process.ProcessTransport; -import com.alibaba.qwen.code.cli.utils.MyConcurrentUtils; -import com.alibaba.qwen.code.cli.utils.Timeout; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Main entry point for interacting with the Qwen Code CLI. Provides static methods for simple queries and session management. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class QwenCodeCli { - private static final Logger log = LoggerFactory.getLogger(QwenCodeCli.class); - - /** - * Sends a simple query to the Qwen Code CLI and returns a list of responses. - * - * @param prompt The input prompt to send to the CLI - * @return A list of strings representing the CLI's responses - */ - public static List simpleQuery(String prompt) { - return simpleQuery(prompt, new TransportOptions()); - } - - /** - * Sends a simple query with custom transport options. - * - * @param prompt The input prompt to send to the CLI - * @param transportOptions Configuration options for the transport layer - * @return A list of strings representing the CLI's responses - */ - public static List simpleQuery(String prompt, TransportOptions transportOptions) { - final List response = new ArrayList<>(); - MyConcurrentUtils.runAndWait(() -> simpleQuery(prompt, transportOptions, new AssistantContentSimpleConsumers() { - @Override - public void onText(Session session, TextAssistantContent textAssistantContent) { - response.add(textAssistantContent.getText()); - } - - @Override - public void onThinking(Session session, ThingkingAssistantContent thingkingAssistantContent) { - response.add(thingkingAssistantContent.getThinking()); - } - - @Override - public void onToolUse(Session session, ToolUseAssistantContent toolUseAssistantContent) { - response.add(JSON.toJSONString(toolUseAssistantContent.getContentOfAssistant())); - } - - @Override - public void onToolResult(Session session, ToolResultAssistantContent toolResultAssistantContent) { - response.add(JSON.toJSONString(toolResultAssistantContent)); - } - - public void onOtherContent(Session session, AssistantContent other) { - response.add(JSON.toJSONString(other.getContentOfAssistant())); - } - - @Override - public void onUsage(Session session, AssistantUsage assistantUsage) { - log.info("received usage {} of message {}", assistantUsage.getUsage(), assistantUsage.getMessageId()); - } - }.setDefaultPermissionOperation(Operation.allow)), Timeout.TIMEOUT_30_MINUTES); - return response; - } - - /** - * Sends a query with custom content consumers. - * - * @param prompt The input prompt to send to the CLI - * @param transportOptions Configuration options for the transport layer - * @param assistantContentConsumers Consumers for handling different types of assistant content - */ - public static void simpleQuery(String prompt, TransportOptions transportOptions, AssistantContentConsumers assistantContentConsumers) { - Session session = newSession(transportOptions); - try { - session.sendPrompt(prompt, new SessionEventSimpleConsumers() - .setAssistantContentConsumer(assistantContentConsumers)); - } catch (Exception e) { - throw new RuntimeException("sendPrompt error!", e); - } finally { - try { - session.close(); - } catch (Exception e) { - log.error("close session error!", e); - } - } - } - - /** - * Creates a new session with default transport options. - * - * @return A new Session instance - */ - public static Session newSession() { - return newSession(new TransportOptions()); - } - - /** - * Creates a new session with custom transport options. - * - * @param transportOptions Configuration options for the transport layer - * @return A new Session instance - */ - public static Session newSession(TransportOptions transportOptions) { - Transport transport; - try { - transport = new ProcessTransport(transportOptions); - } catch (Exception e) { - throw new RuntimeException("initialized ProcessTransport error!", e); - } - - Session session; - try { - session = new Session(transport); - } catch (Exception e) { - throw new RuntimeException("initialized Session error!", e); - } - return session; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/AssistantContent.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/AssistantContent.java deleted file mode 100644 index ba03565456..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/AssistantContent.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data; - -import java.util.Map; - -/** - * Represents content from the assistant in a Qwen Code session. - * - * @param The type of content - * @author skyfire - * @version $Id: 0.0.1 - */ -public interface AssistantContent { - /** - * Gets the type of the assistant content. - * - * @return The type of the assistant content - */ - String getType(); - - /** - * Gets the actual content from the assistant. - * - * @return The content from the assistant - */ - C getContentOfAssistant(); - - /** - * Gets the message ID associated with this content. - * - * @return The message ID - */ - String getMessageId(); - - /** - * Represents text content from the assistant. - */ - interface TextAssistantContent extends AssistantContent { - /** - * Gets the text content. - * - * @return The text content - */ - String getText(); - } - - /** - * Represents thinking content from the assistant. - */ - interface ThingkingAssistantContent extends AssistantContent { - /** - * Gets the thinking content. - * - * @return The thinking content - */ - String getThinking(); - } - - /** - * Represents tool use content from the assistant. - */ - interface ToolUseAssistantContent extends AssistantContent> { - /** - * Gets the tool input. - * - * @return The tool input - */ - Map getInput(); - } - - /** - * Represents tool result content from the assistant. - */ - interface ToolResultAssistantContent extends AssistantContent { - /** - * Gets whether the tool result indicates an error. - * - * @return Whether the tool result indicates an error - */ - Boolean getIsError(); - - /** - * Gets the tool result content. - * - * @return The tool result content - */ - String getContent(); - - /** - * Gets the tool use ID. - * - * @return The tool use ID - */ - String getToolUseId(); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/AssistantUsage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/AssistantUsage.java deleted file mode 100644 index 8ecb2a5bfe..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/AssistantUsage.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data; - -import com.alibaba.fastjson2.JSON; - -/** - * Represents usage information for an assistant message. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class AssistantUsage { - /** - * The ID of the message. - */ - String messageId; - /** - * The usage information. - */ - Usage usage; - - /** - * Gets the message ID. - * - * @return The message ID - */ - public String getMessageId() { - return messageId; - } - - /** - * Sets the message ID. - * - * @param messageId The message ID - */ - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - /** - * Gets the usage information. - * - * @return The usage information - */ - public Usage getUsage() { - return usage; - } - - /** - * Sets the usage information. - * - * @param usage The usage information - */ - public void setUsage(Usage usage) { - this.usage = usage; - } - - /** - * Constructs a new AssistantUsage instance. - * - * @param messageId The message ID - * @param usage The usage information - */ - public AssistantUsage(String messageId, Usage usage) { - this.messageId = messageId; - this.usage = usage; - } - - /** - *

toString.

- * - * @return a {@link java.lang.String} object. - */ - public String toString() { - return JSON.toJSONString(this); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/CLIPermissionDenial.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/CLIPermissionDenial.java deleted file mode 100644 index bc155b7769..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/CLIPermissionDenial.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data; - -import com.alibaba.fastjson2.annotation.JSONField; - -/** - * Represents a permission denial from the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class CLIPermissionDenial { - /** - * The name of the denied tool. - */ - @JSONField(name = "tool_name") - private String toolName; - - /** - * The ID of the denied tool use. - */ - @JSONField(name = "tool_use_id") - private String toolUseId; - - /** - * The input for the denied tool. - */ - @JSONField(name = "tool_input") - private Object toolInput; - - /** - * Gets the name of the denied tool. - * - * @return The name of the denied tool - */ - public String getToolName() { - return toolName; - } - - /** - * Sets the name of the denied tool. - * - * @param toolName The name of the denied tool - */ - public void setToolName(String toolName) { - this.toolName = toolName; - } - - /** - * Gets the ID of the denied tool use. - * - * @return The ID of the denied tool use - */ - public String getToolUseId() { - return toolUseId; - } - - /** - * Sets the ID of the denied tool use. - * - * @param toolUseId The ID of the denied tool use - */ - public void setToolUseId(String toolUseId) { - this.toolUseId = toolUseId; - } - - /** - * Gets the input for the denied tool. - * - * @return The input for the denied tool - */ - public Object getToolInput() { - return toolInput; - } - - /** - * Sets the input for the denied tool. - * - * @param toolInput The input for the denied tool - */ - public void setToolInput(Object toolInput) { - this.toolInput = toolInput; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/Capabilities.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/Capabilities.java deleted file mode 100644 index e6cbadfe97..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/Capabilities.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data; - -import com.alibaba.fastjson2.annotation.JSONField; - -/** - * Represents the capabilities of the Qwen Code CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class Capabilities { - /** - * Whether the CLI can handle can_use_tool requests. - */ - @JSONField(name = "can_handle_can_use_tool") - boolean canHandleCanUseTool; - - /** - * Whether the CLI can handle hook callbacks. - */ - @JSONField(name = "can_handle_hook_callback") - boolean canHandleHookCallback; - - /** - * Whether the CLI can set permission mode. - */ - @JSONField(name = "can_set_permission_mode") - boolean canSetPermissionMode; - - /** - * Whether the CLI can set the model. - */ - @JSONField(name = "can_set_model") - boolean canSetModel; - - /** - * Whether the CLI can handle MCP messages. - */ - @JSONField(name = "can_handle_mcp_message") - boolean canHandleMcpMessage; - - /** - * Checks if the CLI can handle can_use_tool requests. - * - * @return true if the CLI can handle can_use_tool requests, false otherwise - */ - public boolean isCanHandleCanUseTool() { - return canHandleCanUseTool; - } - - /** - * Sets whether the CLI can handle can_use_tool requests. - * - * @param canHandleCanUseTool Whether the CLI can handle can_use_tool requests - */ - public void setCanHandleCanUseTool(boolean canHandleCanUseTool) { - this.canHandleCanUseTool = canHandleCanUseTool; - } - - /** - * Checks if the CLI can handle hook callbacks. - * - * @return true if the CLI can handle hook callbacks, false otherwise - */ - public boolean isCanHandleHookCallback() { - return canHandleHookCallback; - } - - /** - * Sets whether the CLI can handle hook callbacks. - * - * @param canHandleHookCallback Whether the CLI can handle hook callbacks - */ - public void setCanHandleHookCallback(boolean canHandleHookCallback) { - this.canHandleHookCallback = canHandleHookCallback; - } - - /** - * Checks if the CLI can set permission mode. - * - * @return true if the CLI can set permission mode, false otherwise - */ - public boolean isCanSetPermissionMode() { - return canSetPermissionMode; - } - - /** - * Sets whether the CLI can set permission mode. - * - * @param canSetPermissionMode Whether the CLI can set permission mode - */ - public void setCanSetPermissionMode(boolean canSetPermissionMode) { - this.canSetPermissionMode = canSetPermissionMode; - } - - /** - * Checks if the CLI can set the model. - * - * @return true if the CLI can set the model, false otherwise - */ - public boolean isCanSetModel() { - return canSetModel; - } - - /** - * Sets whether the CLI can set the model. - * - * @param canSetModel Whether the CLI can set the model - */ - public void setCanSetModel(boolean canSetModel) { - this.canSetModel = canSetModel; - } - - /** - * Checks if the CLI can handle MCP messages. - * - * @return true if the CLI can handle MCP messages, false otherwise - */ - public boolean isCanHandleMcpMessage() { - return canHandleMcpMessage; - } - - /** - * Sets whether the CLI can handle MCP messages. - * - * @param canHandleMcpMessage Whether the CLI can handle MCP messages - */ - public void setCanHandleMcpMessage(boolean canHandleMcpMessage) { - this.canHandleMcpMessage = canHandleMcpMessage; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/ExtendedUsage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/ExtendedUsage.java deleted file mode 100644 index 7e67a629f8..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/ExtendedUsage.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data; - -import com.alibaba.fastjson2.annotation.JSONField; - -/** - * Extends the Usage class with additional usage information. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class ExtendedUsage extends Usage { - /** - * Server tool use information. - */ - @JSONField(name = "server_tool_use") - private ServerToolUse serverToolUse; - - /** - * Service tier information. - */ - @JSONField(name = "service_tier") - private String serviceTier; - - /** - * Cache creation information. - */ - @JSONField(name = "cache_creation") - private CacheCreation cacheCreation; - - /** - * Gets the server tool use information. - * - * @return The server tool use information - */ - public ServerToolUse getServerToolUse() { - return serverToolUse; - } - - /** - * Sets the server tool use information. - * - * @param serverToolUse The server tool use information - */ - public void setServerToolUse(ServerToolUse serverToolUse) { - this.serverToolUse = serverToolUse; - } - - /** - * Gets the service tier information. - * - * @return The service tier information - */ - public String getServiceTier() { - return serviceTier; - } - - /** - * Sets the service tier information. - * - * @param serviceTier The service tier information - */ - public void setServiceTier(String serviceTier) { - this.serviceTier = serviceTier; - } - - /** - * Gets the cache creation information. - * - * @return The cache creation information - */ - public CacheCreation getCacheCreation() { - return cacheCreation; - } - - /** - * Sets the cache creation information. - * - * @param cacheCreation The cache creation information - */ - public void setCacheCreation(CacheCreation cacheCreation) { - this.cacheCreation = cacheCreation; - } - - /** - * Represents server tool use information. - */ - public static class ServerToolUse { - /** - * Number of web search requests. - */ - @JSONField(name = "web_search_requests") - private int webSearchRequests; - } - - /** - * Represents cache creation information. - */ - public static class CacheCreation { - /** - * Number of ephemeral 1-hour input tokens. - */ - @JSONField(name = "ephemeral_1h_input_tokens") - private int ephemeral1hInputTokens; - - /** - * Number of ephemeral 5-minute input tokens. - */ - @JSONField(name = "ephemeral_5m_input_tokens") - private int ephemeral5mInputTokens; - - /** - * Gets the number of ephemeral 1-hour input tokens. - * - * @return The number of ephemeral 1-hour input tokens - */ - public int getEphemeral1hInputTokens() { - return ephemeral1hInputTokens; - } - - /** - * Sets the number of ephemeral 1-hour input tokens. - * - * @param ephemeral1hInputTokens The number of ephemeral 1-hour input tokens - */ - public void setEphemeral1hInputTokens(int ephemeral1hInputTokens) { - this.ephemeral1hInputTokens = ephemeral1hInputTokens; - } - - /** - * Gets the number of ephemeral 5-minute input tokens. - * - * @return The number of ephemeral 5-minute input tokens - */ - public int getEphemeral5mInputTokens() { - return ephemeral5mInputTokens; - } - - /** - * Sets the number of ephemeral 5-minute input tokens. - * - * @param ephemeral5mInputTokens The number of ephemeral 5-minute input tokens - */ - public void setEphemeral5mInputTokens(int ephemeral5mInputTokens) { - this.ephemeral5mInputTokens = ephemeral5mInputTokens; - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/InitializeConfig.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/InitializeConfig.java deleted file mode 100644 index 36296d053c..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/InitializeConfig.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data; - -/** - * Configuration for initializing the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class InitializeConfig { - /** - * Hooks configuration. - */ - String hooks; - /** - * SDK MCP servers configuration. - */ - String sdkMcpServers; - /** - * MCP servers configuration. - */ - String mcpServers; - /** - * Agents configuration. - */ - String agents; - - /** - * Gets the hooks configuration. - * - * @return The hooks configuration - */ - public String getHooks() { - return hooks; - } - - /** - * Sets the hooks configuration. - * - * @param hooks The hooks configuration - */ - public void setHooks(String hooks) { - this.hooks = hooks; - } - - /** - * Gets the SDK MCP servers configuration. - * - * @return The SDK MCP servers configuration - */ - public String getSdkMcpServers() { - return sdkMcpServers; - } - - /** - * Sets the SDK MCP servers configuration. - * - * @param sdkMcpServers The SDK MCP servers configuration - */ - public void setSdkMcpServers(String sdkMcpServers) { - this.sdkMcpServers = sdkMcpServers; - } - - /** - * Gets the MCP servers configuration. - * - * @return The MCP servers configuration - */ - public String getMcpServers() { - return mcpServers; - } - - /** - * Sets the MCP servers configuration. - * - * @param mcpServers The MCP servers configuration - */ - public void setMcpServers(String mcpServers) { - this.mcpServers = mcpServers; - } - - /** - * Gets the agents configuration. - * - * @return The agents configuration - */ - public String getAgents() { - return agents; - } - - /** - * Sets the agents configuration. - * - * @param agents The agents configuration - */ - public void setAgents(String agents) { - this.agents = agents; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/ModelUsage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/ModelUsage.java deleted file mode 100644 index 33b426c4a2..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/ModelUsage.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data; - -/** - * Represents usage information for a specific model. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class ModelUsage { - /** - * Number of input tokens. - */ - private int inputTokens; - /** - * Number of output tokens. - */ - private int outputTokens; - /** - * Number of cache read input tokens. - */ - private int cacheReadInputTokens; - /** - * Number of cache creation input tokens. - */ - private int cacheCreationInputTokens; - /** - * Number of web search requests. - */ - private int webSearchRequests; - /** - * Context window size. - */ - private int contextWindow; - - /** - * Gets the number of input tokens. - * - * @return The number of input tokens - */ - public int getInputTokens() { - return inputTokens; - } - - /** - * Sets the number of input tokens. - * - * @param inputTokens The number of input tokens - */ - public void setInputTokens(int inputTokens) { - this.inputTokens = inputTokens; - } - - /** - * Gets the number of output tokens. - * - * @return The number of output tokens - */ - public int getOutputTokens() { - return outputTokens; - } - - /** - * Sets the number of output tokens. - * - * @param outputTokens The number of output tokens - */ - public void setOutputTokens(int outputTokens) { - this.outputTokens = outputTokens; - } - - /** - * Gets the number of cache read input tokens. - * - * @return The number of cache read input tokens - */ - public int getCacheReadInputTokens() { - return cacheReadInputTokens; - } - - /** - * Sets the number of cache read input tokens. - * - * @param cacheReadInputTokens The number of cache read input tokens - */ - public void setCacheReadInputTokens(int cacheReadInputTokens) { - this.cacheReadInputTokens = cacheReadInputTokens; - } - - /** - * Gets the number of cache creation input tokens. - * - * @return The number of cache creation input tokens - */ - public int getCacheCreationInputTokens() { - return cacheCreationInputTokens; - } - - /** - * Sets the number of cache creation input tokens. - * - * @param cacheCreationInputTokens The number of cache creation input tokens - */ - public void setCacheCreationInputTokens(int cacheCreationInputTokens) { - this.cacheCreationInputTokens = cacheCreationInputTokens; - } - - /** - * Gets the number of web search requests. - * - * @return The number of web search requests - */ - public int getWebSearchRequests() { - return webSearchRequests; - } - - /** - * Sets the number of web search requests. - * - * @param webSearchRequests The number of web search requests - */ - public void setWebSearchRequests(int webSearchRequests) { - this.webSearchRequests = webSearchRequests; - } - - /** - * Gets the context window size. - * - * @return The context window size - */ - public int getContextWindow() { - return contextWindow; - } - - /** - * Sets the context window size. - * - * @param contextWindow The context window size - */ - public void setContextWindow(int contextWindow) { - this.contextWindow = contextWindow; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/PermissionMode.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/PermissionMode.java deleted file mode 100644 index 420dd760d4..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/PermissionMode.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data; - -/** - * Represents different permission modes for the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public enum PermissionMode { - /** - * Default permission mode. - */ - DEFAULT("default"), - /** - * Plan permission mode. - */ - PLAN("plan"), - /** - * Auto-edit permission mode. - */ - AUTO_EDIT("auto-edit"), - /** - * YOLO permission mode. - */ - YOLO("yolo"); - - private final String value; - - PermissionMode(String value) { - this.value = value; - } - - /** - * Gets the string value of the permission mode. - * - * @return The string value of the permission mode - */ - public String getValue() { - return value; - } - - /** - * Gets the permission mode from its string value. - * - * @param value The string value - * @return The corresponding permission mode - */ - public static PermissionMode fromValue(String value) { - for (PermissionMode mode : PermissionMode.values()) { - if (mode.value.equals(value)) { - return mode; - } - } - throw new IllegalArgumentException("Unknown permission mode: " + value); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/Usage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/Usage.java deleted file mode 100644 index 7fb430511c..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/Usage.java +++ /dev/null @@ -1,137 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.annotation.JSONField; - -/** - * Represents usage information for a message. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class Usage { - /** - * Number of input tokens. - */ - @JSONField(name = "input_tokens") - private Integer inputTokens; - /** - * Number of output tokens. - */ - @JSONField(name = "output_tokens") - private Integer outputTokens; - /** - * Number of cache creation input tokens. - */ - @JSONField(name = "cache_creation_input_tokens") - private Integer cacheCreationInputTokens; - /** - * Number of cache read input tokens. - */ - @JSONField(name = "cache_read_input_tokens") - private Integer cacheReadInputTokens; - /** - * Total number of tokens. - */ - @JSONField(name = "total_tokens") - private Integer totalTokens; - - /** - * Gets the number of input tokens. - * - * @return The number of input tokens - */ - public Integer getInputTokens() { - return inputTokens; - } - - /** - * Sets the number of input tokens. - * - * @param inputTokens The number of input tokens - */ - public void setInputTokens(Integer inputTokens) { - this.inputTokens = inputTokens; - } - - /** - * Gets the number of output tokens. - * - * @return The number of output tokens - */ - public Integer getOutputTokens() { - return outputTokens; - } - - /** - * Sets the number of output tokens. - * - * @param outputTokens The number of output tokens - */ - public void setOutputTokens(Integer outputTokens) { - this.outputTokens = outputTokens; - } - - /** - * Gets the number of cache creation input tokens. - * - * @return The number of cache creation input tokens - */ - public Integer getCacheCreationInputTokens() { - return cacheCreationInputTokens; - } - - /** - * Sets the number of cache creation input tokens. - * - * @param cacheCreationInputTokens The number of cache creation input tokens - */ - public void setCacheCreationInputTokens(Integer cacheCreationInputTokens) { - this.cacheCreationInputTokens = cacheCreationInputTokens; - } - - /** - * Gets the number of cache read input tokens. - * - * @return The number of cache read input tokens - */ - public Integer getCacheReadInputTokens() { - return cacheReadInputTokens; - } - - /** - * Sets the number of cache read input tokens. - * - * @param cacheReadInputTokens The number of cache read input tokens - */ - public void setCacheReadInputTokens(Integer cacheReadInputTokens) { - this.cacheReadInputTokens = cacheReadInputTokens; - } - - /** - * Gets the total number of tokens. - * - * @return The total number of tokens - */ - public Integer getTotalTokens() { - return totalTokens; - } - - /** - * Sets the total number of tokens. - * - * @param totalTokens The total number of tokens - */ - public void setTotalTokens(Integer totalTokens) { - this.totalTokens = totalTokens; - } - - /** - *

toString.

- * - * @return a {@link java.lang.String} object. - */ - public String toString() { - return JSON.toJSONString(this); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/behavior/Allow.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/behavior/Allow.java deleted file mode 100644 index 5ed08f099f..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/behavior/Allow.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data.behavior; - -import java.util.Map; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents an allow behavior that permits an operation. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "operation", typeName = "allow") -public class Allow extends Behavior { - /** - * Creates a new Allow instance and sets the behavior to allow. - */ - public Allow() { - super(); - this.behavior = Operation.allow; - } - /** - * Updated input for the operation. - */ - Map updatedInput; - - /** - * Gets the updated input. - * - * @return The updated input - */ - public Map getUpdatedInput() { - return updatedInput; - } - - /** - * Sets the updated input. - * - * @param updatedInput The updated input - * @return This instance for method chaining - */ - public Allow setUpdatedInput(Map updatedInput) { - this.updatedInput = updatedInput; - return this; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/behavior/Behavior.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/behavior/Behavior.java deleted file mode 100644 index 5adca830e9..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/behavior/Behavior.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data.behavior; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Base class for behavior objects that define how the CLI should handle requests. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "operation", typeName = "Behavior", seeAlso = {Allow.class, Deny.class}) -public class Behavior { - /** - * The behavior operation (allow or deny). - */ - Operation behavior; - - /** - * Gets the behavior operation. - * - * @return The behavior operation - */ - public Operation getBehavior() { - return behavior; - } - - /** - * Sets the behavior operation. - * - * @param behavior The behavior operation - */ - public void setBehavior(Operation behavior) { - this.behavior = behavior; - } - - /** - * Represents the type of operation. - */ - public enum Operation { - /** - * Allow the operation. - */ - allow, - /** - * Deny the operation. - */ - deny - } - - /** - * Gets the default behavior (deny with message). - * - * @return The default behavior - */ - public static Behavior defaultBehavior() { - return denyBehavior(); - } - - public static Behavior denyBehavior() { - return new Deny().setMessage("Default Behavior Permission denied"); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/behavior/Deny.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/behavior/Deny.java deleted file mode 100644 index 042673e45b..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/data/behavior/Deny.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.data.behavior; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a deny behavior that rejects an operation. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "operation", typeName = "deny") -public class Deny extends Behavior { - /** - * Creates a new Deny instance and sets the behavior to deny. - */ - public Deny() { - super(); - this.behavior = Operation.deny; - } - - /** - * The message explaining why the operation was denied. - */ - String message; - - /** - * Gets the denial message. - * - * @return The denial message - */ - public String getMessage() { - return message; - } - - /** - * Sets the denial message. - * - * @param message The denial message - * @return This instance for method chaining - */ - public Deny setMessage(String message) { - this.message = message; - return this; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/Message.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/Message.java deleted file mode 100644 index 855fb5de7f..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/Message.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message; - -/** - * Represents a message in the Qwen Code protocol. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public interface Message { - /** - * Gets the type of the message. - * - * @return The type of the message - */ - String getType(); - - /** - * Gets the ID of the message. - * - * @return The ID of the message - */ - String getMessageId(); -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/MessageBase.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/MessageBase.java deleted file mode 100644 index 37390164ad..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/MessageBase.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Base class for messages in the Qwen Code protocol. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(alphabetic = false, typeKey = "type", typeName = "MessageBase") -public class MessageBase implements Message{ - /** - * The type of the message. - */ - protected String type; - - /** - * The ID of the message. - */ - @JSONField(name = "message_id") - protected String messageId; - - /** - *

toString.

- * - * @return a {@link java.lang.String} object. - */ - public String toString() { - return JSON.toJSONString(this); - } - - /** {@inheritDoc} */ - @Override - public String getType() { - return type; - } - - /** - * Sets the type of the message. - * - * @param type The type of the message - */ - public void setType(String type) { - this.type = type; - } - - /** {@inheritDoc} */ - @Override - public String getMessageId() { - return messageId; - } - - /** - * Sets the ID of the message. - * - * @param messageId The ID of the message - */ - public void setMessageId(String messageId) { - this.messageId = messageId; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/SDKResultMessage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/SDKResultMessage.java deleted file mode 100644 index 58889630b2..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/SDKResultMessage.java +++ /dev/null @@ -1,332 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message; - -import java.util.List; -import java.util.Map; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.CLIPermissionDenial; -import com.alibaba.qwen.code.cli.protocol.data.ExtendedUsage; -import com.alibaba.qwen.code.cli.protocol.data.Usage; - -/** - * Represents a result message from the SDK. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "result") -public class SDKResultMessage extends MessageBase { - /** - * The subtype of the result. - */ - private String subtype; // 'error_max_turns' | 'error_during_execution' - /** - * The UUID of the message. - */ - private String uuid; - - /** - * The session ID. - */ - @JSONField(name = "session_id") - private String sessionId; - - /** - * Whether the result represents an error. - */ - @JSONField(name = "is_error") - private boolean isError = true; - - /** - * Duration in milliseconds. - */ - @JSONField(name = "duration_ms") - private Long durationMs; - - /** - * API duration in milliseconds. - */ - @JSONField(name = "duration_api_ms") - private Long durationApiMs; - - /** - * Number of turns. - */ - @JSONField(name = "num_turns") - private Integer numTurns; - /** - * Usage information. - */ - private ExtendedUsage usage; - /** - * Model usage information. - */ - private Map modelUsage; - - /** - * List of permission denials. - */ - @JSONField(name = "permission_denials") - private List permissionDenials; - /** - * Error information. - */ - private Error error; - - /** - * Creates a new SDKResultMessage instance and sets the type to "result". - */ - public SDKResultMessage() { - super(); - this.type = "result"; - } - - /** - * Gets the subtype of the result. - * - * @return The subtype of the result - */ - public String getSubtype() { - return subtype; - } - - /** - * Sets the subtype of the result. - * - * @param subtype The subtype of the result - */ - public void setSubtype(String subtype) { - this.subtype = subtype; - } - - /** - * Gets the UUID of the message. - * - * @return The UUID of the message - */ - public String getUuid() { - return uuid; - } - - /** - * Sets the UUID of the message. - * - * @param uuid The UUID of the message - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Gets the session ID. - * - * @return The session ID - */ - public String getSessionId() { - return sessionId; - } - - /** - * Sets the session ID. - * - * @param sessionId The session ID - */ - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - /** - * Checks if the result represents an error. - * - * @return Whether the result represents an error - */ - public boolean isError() { - return isError; - } - - /** - * Sets whether the result represents an error. - * - * @param error Whether the result represents an error - */ - public void setError(boolean error) { - isError = error; - } - - /** - * Gets the duration in milliseconds. - * - * @return The duration in milliseconds - */ - public Long getDurationMs() { - return durationMs; - } - - /** - * Sets the duration in milliseconds. - * - * @param durationMs The duration in milliseconds - */ - public void setDurationMs(Long durationMs) { - this.durationMs = durationMs; - } - - /** - * Gets the API duration in milliseconds. - * - * @return The API duration in milliseconds - */ - public Long getDurationApiMs() { - return durationApiMs; - } - - /** - * Sets the API duration in milliseconds. - * - * @param durationApiMs The API duration in milliseconds - */ - public void setDurationApiMs(Long durationApiMs) { - this.durationApiMs = durationApiMs; - } - - /** - * Gets the number of turns. - * - * @return The number of turns - */ - public Integer getNumTurns() { - return numTurns; - } - - /** - * Sets the number of turns. - * - * @param numTurns The number of turns - */ - public void setNumTurns(Integer numTurns) { - this.numTurns = numTurns; - } - - /** - * Gets the usage information. - * - * @return The usage information - */ - public ExtendedUsage getUsage() { - return usage; - } - - /** - * Sets the usage information. - * - * @param usage The usage information - */ - public void setUsage(ExtendedUsage usage) { - this.usage = usage; - } - - /** - * Gets the model usage information. - * - * @return The model usage information - */ - public Map getModelUsage() { - return modelUsage; - } - - /** - * Sets the model usage information. - * - * @param modelUsage The model usage information - */ - public void setModelUsage(Map modelUsage) { - this.modelUsage = modelUsage; - } - - /** - * Gets the list of permission denials. - * - * @return The list of permission denials - */ - public List getPermissionDenials() { - return permissionDenials; - } - - /** - * Sets the list of permission denials. - * - * @param permissionDenials The list of permission denials - */ - public void setPermissionDenials(List permissionDenials) { - this.permissionDenials = permissionDenials; - } - - /** - * Gets the error information. - * - * @return The error information - */ - public Error getError() { - return error; - } - - /** - * Sets the error information. - * - * @param error The error information - */ - public void setError(Error error) { - this.error = error; - } - - /** - * Represents error information. - */ - public static class Error { - /** - * Error type. - */ - private String type; - /** - * Error message. - */ - private String message; - - /** - * Gets the error type. - * - * @return The error type - */ - public String getType() { - return type; - } - - /** - * Sets the error type. - * - * @param type The error type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Gets the error message. - * - * @return The error message - */ - public String getMessage() { - return message; - } - - /** - * Sets the error message. - * - * @param message The error message - */ - public void setMessage(String message) { - this.message = message; - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/SDKSystemMessage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/SDKSystemMessage.java deleted file mode 100644 index abdb0fe5b3..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/SDKSystemMessage.java +++ /dev/null @@ -1,486 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message; - -import java.util.List; -import java.util.Map; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a system message from the SDK. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "system") -public class SDKSystemMessage extends MessageBase { - /** - * The subtype of the system message. - */ - private String subtype; - /** - * The UUID of the message. - */ - private String uuid; - /** - * The session ID. - */ - @JSONField(name = "session_id") - private String sessionId; - /** - * Additional data. - */ - private Object data; - /** - * Current working directory. - */ - private String cwd; - /** - * List of available tools. - */ - private List tools; - /** - * List of MCP servers. - */ - @JSONField(name = "mcp_servers") - private List mcpServers; - /** - * Model information. - */ - private String model; - /** - * Permission mode. - */ - @JSONField(name = "permission_mode") - private String permissionMode; - /** - * Available slash commands. - */ - @JSONField(name = "slash_commands") - private List slashCommands; - /** - * Qwen Code version. - */ - @JSONField(name = "qwen_code_version") - private String qwenCodeVersion; - /** - * Output style. - */ - @JSONField(name = "output_style") - private String outputStyle; - /** - * Available agents. - */ - private List agents; - /** - * Available skills. - */ - private List skills; - /** - * Capabilities information. - */ - private Map capabilities; - /** - * Compact metadata. - */ - @JSONField(name = "compact_metadata") - private CompactMetadata compactMetadata; - - /** - * Creates a new SDKSystemMessage instance and sets the type to "system". - */ - public SDKSystemMessage() { - super(); - this.type = "system"; - } - - /** - * Gets the subtype of the system message. - * - * @return The subtype of the system message - */ - public String getSubtype() { - return subtype; - } - - /** - * Sets the subtype of the system message. - * - * @param subtype The subtype of the system message - */ - public void setSubtype(String subtype) { - this.subtype = subtype; - } - - /** - * Gets the UUID of the message. - * - * @return The UUID of the message - */ - public String getUuid() { - return uuid; - } - - /** - * Sets the UUID of the message. - * - * @param uuid The UUID of the message - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Gets the session ID. - * - * @return The session ID - */ - public String getSessionId() { - return sessionId; - } - - /** - * Sets the session ID. - * - * @param sessionId The session ID - */ - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - /** - * Gets the additional data. - * - * @return The additional data - */ - public Object getData() { - return data; - } - - /** - * Sets the additional data. - * - * @param data The additional data - */ - public void setData(Object data) { - this.data = data; - } - - /** - * Gets the current working directory. - * - * @return The current working directory - */ - public String getCwd() { - return cwd; - } - - /** - * Sets the current working directory. - * - * @param cwd The current working directory - */ - public void setCwd(String cwd) { - this.cwd = cwd; - } - - /** - * Gets the list of available tools. - * - * @return The list of available tools - */ - public List getTools() { - return tools; - } - - /** - * Sets the list of available tools. - * - * @param tools The list of available tools - */ - public void setTools(List tools) { - this.tools = tools; - } - - /** - * Gets the list of MCP servers. - * - * @return The list of MCP servers - */ - public List getMcpServers() { - return mcpServers; - } - - /** - * Sets the list of MCP servers. - * - * @param mcpServers The list of MCP servers - */ - public void setMcpServers(List mcpServers) { - this.mcpServers = mcpServers; - } - - /** - * Gets the model information. - * - * @return The model information - */ - public String getModel() { - return model; - } - - /** - * Sets the model information. - * - * @param model The model information - */ - public void setModel(String model) { - this.model = model; - } - - /** - * Gets the permission mode. - * - * @return The permission mode - */ - public String getPermissionMode() { - return permissionMode; - } - - /** - * Sets the permission mode. - * - * @param permissionMode The permission mode - */ - public void setPermissionMode(String permissionMode) { - this.permissionMode = permissionMode; - } - - /** - * Gets the available slash commands. - * - * @return The available slash commands - */ - public List getSlashCommands() { - return slashCommands; - } - - /** - * Sets the available slash commands. - * - * @param slashCommands The available slash commands - */ - public void setSlashCommands(List slashCommands) { - this.slashCommands = slashCommands; - } - - /** - * Gets the Qwen Code version. - * - * @return The Qwen Code version - */ - public String getQwenCodeVersion() { - return qwenCodeVersion; - } - - /** - * Sets the Qwen Code version. - * - * @param qwenCodeVersion The Qwen Code version - */ - public void setQwenCodeVersion(String qwenCodeVersion) { - this.qwenCodeVersion = qwenCodeVersion; - } - - /** - * Gets the output style. - * - * @return The output style - */ - public String getOutputStyle() { - return outputStyle; - } - - /** - * Sets the output style. - * - * @param outputStyle The output style - */ - public void setOutputStyle(String outputStyle) { - this.outputStyle = outputStyle; - } - - /** - * Gets the available agents. - * - * @return The available agents - */ - public List getAgents() { - return agents; - } - - /** - * Sets the available agents. - * - * @param agents The available agents - */ - public void setAgents(List agents) { - this.agents = agents; - } - - /** - * Gets the available skills. - * - * @return The available skills - */ - public List getSkills() { - return skills; - } - - /** - * Sets the available skills. - * - * @param skills The available skills - */ - public void setSkills(List skills) { - this.skills = skills; - } - - /** - * Gets the capabilities information. - * - * @return The capabilities information - */ - public Map getCapabilities() { - return capabilities; - } - - /** - * Sets the capabilities information. - * - * @param capabilities The capabilities information - */ - public void setCapabilities(Map capabilities) { - this.capabilities = capabilities; - } - - /** - * Gets the compact metadata. - * - * @return The compact metadata - */ - public CompactMetadata getCompactMetadata() { - return compactMetadata; - } - - /** - * Sets the compact metadata. - * - * @param compactMetadata The compact metadata - */ - public void setCompactMetadata(CompactMetadata compactMetadata) { - this.compactMetadata = compactMetadata; - } - - /** - * Represents MCP server information. - */ - public static class McpServer { - /** - * Server name. - */ - private String name; - /** - * Server status. - */ - private String status; - - /** - * Gets the server name. - * - * @return The server name - */ - public String getName() { - return name; - } - - /** - * Sets the server name. - * - * @param name The server name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the server status. - * - * @return The server status - */ - public String getStatus() { - return status; - } - - /** - * Sets the server status. - * - * @param status The server status - */ - public void setStatus(String status) { - this.status = status; - } - } - - /** - * Represents compact metadata. - */ - public static class CompactMetadata { - /** - * Trigger information. - */ - private String trigger; - - /** - * Pre-tokens information. - */ - @JSONField(name = "pre_tokens") - private Integer preTokens; - - /** - * Gets the trigger information. - * - * @return The trigger information - */ - public String getTrigger() { - return trigger; - } - - /** - * Sets the trigger information. - * - * @param trigger The trigger information - */ - public void setTrigger(String trigger) { - this.trigger = trigger; - } - - /** - * Gets the pre-tokens information. - * - * @return The pre-tokens information - */ - public Integer getPreTokens() { - return preTokens; - } - - /** - * Sets the pre-tokens information. - * - * @param preTokens The pre-tokens information - */ - public void setPreTokens(Integer preTokens) { - this.preTokens = preTokens; - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/SDKUserMessage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/SDKUserMessage.java deleted file mode 100644 index e2d9f1e2a4..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/SDKUserMessage.java +++ /dev/null @@ -1,196 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message; - -import java.util.Map; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a user message in the SDK protocol. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "user") -public class SDKUserMessage extends MessageBase { - /** - * The UUID of the message. - */ - private String uuid; - - /** - * The session ID. - */ - @JSONField(name = "session_id") - private String sessionId; - /** - * The API user message. - */ - private final APIUserMessage message = new APIUserMessage(); - - /** - * The parent tool use ID. - */ - @JSONField(name = "parent_tool_use_id") - private String parentToolUseId; - /** - * Additional options. - */ - private Map options; - - /** - * Creates a new SDKUserMessage instance and sets the type to "user". - */ - public SDKUserMessage() { - super(); - this.setType("user"); - } - - /** - * Gets the UUID of the message. - * - * @return The UUID of the message - */ - public String getUuid() { - return uuid; - } - - /** - * Sets the UUID of the message. - * - * @param uuid The UUID of the message - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Gets the session ID. - * - * @return The session ID - */ - public String getSessionId() { - return sessionId; - } - - /** - * Sets the session ID. - * - * @param sessionId The session ID - * @return This instance for method chaining - */ - public SDKUserMessage setSessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * Sets the content of the message. - * - * @param content The content of the message - * @return This instance for method chaining - */ - public SDKUserMessage setContent(String content) { - message.setContent(content); - return this; - } - - /** - * Gets the content of the message. - * - * @return The content of the message - */ - public String getContent() { - return message.getContent(); - } - - /** - * Gets the parent tool use ID. - * - * @return The parent tool use ID - */ - public String getParentToolUseId() { - return parentToolUseId; - } - - /** - * Sets the parent tool use ID. - * - * @param parentToolUseId The parent tool use ID - * @return This instance for method chaining - */ - public SDKUserMessage setParentToolUseId(String parentToolUseId) { - this.parentToolUseId = parentToolUseId; - return this; - } - - /** - * Gets the additional options. - * - * @return The additional options - */ - public Map getOptions() { - return options; - } - - /** - * Sets the additional options. - * - * @param options The additional options - * @return This instance for method chaining - */ - public SDKUserMessage setOptions(Map options) { - this.options = options; - return this; - } - - /** - * Represents the API user message. - */ - public static class APIUserMessage { - /** - * User role. - */ - private String role = "user"; - /** - * Message content. - */ - private String content; - - /** - * Gets the user role. - * - * @return The user role - */ - public String getRole() { - return role; - } - - /** - * Sets the user role. - * - * @param role The user role - */ - public void setRole(String role) { - this.role = role; - } - - /** - * Gets the message content. - * - * @return The message content - */ - public String getContent() { - return content; - } - - /** - * Sets the message content. - * - * @param content The message content - */ - public void setContent(String content) { - this.content = content; - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/APIAssistantMessage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/APIAssistantMessage.java deleted file mode 100644 index b54bca4436..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/APIAssistantMessage.java +++ /dev/null @@ -1,172 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant; - -import java.util.List; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.qwen.code.cli.protocol.data.Usage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.block.ContentBlock; - -/** - * Represents an API assistant message. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class APIAssistantMessage { - /** - * Message ID. - */ - private String id; - /** - * Message type. - */ - private String type = "message"; - /** - * Message role. - */ - private String role = "assistant"; - /** - * Message model. - */ - private String model; - /** - * Message content. - */ - private List> content; - - /** - * Stop reason. - */ - @JSONField(name = "stop_reason") - private String stopReason; - /** - * Usage information. - */ - private Usage usage; - - /** - * Gets the message ID. - * - * @return The message ID - */ - public String getId() { - return id; - } - - /** - * Sets the message ID. - * - * @param id The message ID - */ - public void setId(String id) { - this.id = id; - } - - /** - * Gets the message type. - * - * @return The message type - */ - public String getType() { - return type; - } - - /** - * Sets the message type. - * - * @param type The message type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Gets the message role. - * - * @return The message role - */ - public String getRole() { - return role; - } - - /** - * Sets the message role. - * - * @param role The message role - */ - public void setRole(String role) { - this.role = role; - } - - /** - * Gets the message model. - * - * @return The message model - */ - public String getModel() { - return model; - } - - /** - * Sets the message model. - * - * @param model The message model - */ - public void setModel(String model) { - this.model = model; - } - - /** - * Gets the stop reason. - * - * @return The stop reason - */ - public String getStopReason() { - return stopReason; - } - - /** - * Sets the stop reason. - * - * @param stopReason The stop reason - */ - public void setStopReason(String stopReason) { - this.stopReason = stopReason; - } - - /** - * Gets the usage information. - * - * @return The usage information - */ - public Usage getUsage() { - return usage; - } - - /** - * Sets the usage information. - * - * @param usage The usage information - */ - public void setUsage(Usage usage) { - this.usage = usage; - } - - /** - * Gets the message content. - * - * @return The message content - */ - public List> getContent() { - return content; - } - - /** - * Sets the message content. - * - * @param content The message content - */ - public void setContent(List> content) { - this.content = content; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/SDKAssistantMessage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/SDKAssistantMessage.java deleted file mode 100644 index b94fde07b8..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/SDKAssistantMessage.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.message.MessageBase; - -/** - * Represents an SDK assistant message. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "assistant") -public class SDKAssistantMessage extends MessageBase { - /** - * The UUID of the message. - */ - private String uuid; - - /** - * The session ID. - */ - @JSONField(name = "session_id") - private String sessionId; - /** - * The API assistant message. - */ - private APIAssistantMessage message; - - /** - * The parent tool use ID. - */ - @JSONField(name = "parent_tool_use_id") - private String parentToolUseId; - - /** - * Creates a new SDKAssistantMessage instance and sets the type to "assistant". - */ - public SDKAssistantMessage() { - super(); - this.type = "assistant"; - } - - /** {@inheritDoc} */ - @Override - public String getMessageId() { - return this.getUuid(); - } - - /** - * Gets the UUID of the message. - * - * @return The UUID of the message - */ - public String getUuid() { - return uuid; - } - - /** - * Sets the UUID of the message. - * - * @param uuid The UUID of the message - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Gets the session ID. - * - * @return The session ID - */ - public String getSessionId() { - return sessionId; - } - - /** - * Sets the session ID. - * - * @param sessionId The session ID - */ - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - /** - * Gets the API assistant message. - * - * @return The API assistant message - */ - public APIAssistantMessage getMessage() { - return message; - } - - /** - * Sets the API assistant message. - * - * @param message The API assistant message - */ - public void setMessage(APIAssistantMessage message) { - this.message = message; - } - - /** - * Gets the parent tool use ID. - * - * @return The parent tool use ID - */ - public String getParentToolUseId() { - return parentToolUseId; - } - - /** - * Sets the parent tool use ID. - * - * @param parentToolUseId The parent tool use ID - */ - public void setParentToolUseId(String parentToolUseId) { - this.parentToolUseId = parentToolUseId; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/SDKPartialAssistantMessage.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/SDKPartialAssistantMessage.java deleted file mode 100644 index 0ace1e3f00..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/SDKPartialAssistantMessage.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.message.MessageBase; -import com.alibaba.qwen.code.cli.protocol.message.assistant.event.StreamEvent; - -/** - * Represents a partial assistant message during streaming. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "stream_event") -public class SDKPartialAssistantMessage extends MessageBase { - /** - * The UUID of the message. - */ - private String uuid; - - /** - * The session ID. - */ - @JSONField(name = "session_id") - private String sessionId; - /** - * The stream event. - */ - private StreamEvent event; - - /** - * The parent tool use ID. - */ - @JSONField(name = "parent_tool_use_id") - private String parentToolUseId; - - /** - * Creates a new SDKPartialAssistantMessage instance and sets the type to "stream_event". - */ - public SDKPartialAssistantMessage() { - super(); - this.type = "stream_event"; - } - - /** - * Gets the UUID of the message. - * - * @return The UUID of the message - */ - public String getUuid() { - return uuid; - } - - /** - * Sets the UUID of the message. - * - * @param uuid The UUID of the message - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Gets the session ID. - * - * @return The session ID - */ - public String getSessionId() { - return sessionId; - } - - /** - * Sets the session ID. - * - * @param sessionId The session ID - */ - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - /** - * Gets the stream event. - * - * @return The stream event - */ - public StreamEvent getEvent() { - return event; - } - - /** - * Sets the stream event. - * - * @param event The stream event - */ - public void setEvent(StreamEvent event) { - this.event = event; - } - - /** - * Gets the parent tool use ID. - * - * @return The parent tool use ID - */ - public String getParentToolUseId() { - return parentToolUseId; - } - - /** - * Sets the parent tool use ID. - * - * @param parentToolUseId The parent tool use ID - */ - public void setParentToolUseId(String parentToolUseId) { - this.parentToolUseId = parentToolUseId; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/Annotation.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/Annotation.java deleted file mode 100644 index 880bb12f84..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/Annotation.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.block; - -import com.alibaba.fastjson2.annotation.JSONField; - -/** - * Represents an annotation for a content block. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class Annotation { - /** - * The annotation type. - */ - @JSONField(name = "type") - private String type; - - /** - * The annotation value. - */ - @JSONField(name = "value") - private String value; - - /** - * Gets the annotation type. - * - * @return The annotation type - */ - public String getType() { - return type; - } - - /** - * Sets the annotation type. - * - * @param type The annotation type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Gets the annotation value. - * - * @return The annotation value - */ - public String getValue() { - return value; - } - - /** - * Sets the annotation value. - * - * @param value The annotation value - */ - public void setValue(String value) { - this.value = value; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ContentBlock.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ContentBlock.java deleted file mode 100644 index fabee58b55..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ContentBlock.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.block; - -import java.util.List; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent; - -/** - * Abstract base class for content blocks in assistant messages. - * - * @param The type of content - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "ContentBlock", seeAlso = { TextBlock.class, ToolResultBlock.class, ThinkingBlock.class, ToolUseBlock.class }) -public abstract class ContentBlock implements AssistantContent { - /** - * The type of the content block. - */ - protected String type; - /** - * List of annotations. - */ - protected List annotations; - /** - * The message ID. - */ - protected String messageId; - - /** {@inheritDoc} */ - @Override - public String getType() { - return type; - } - - /** - * Sets the type of the content block. - * - * @param type The type of the content block - */ - public void setType(String type) { - this.type = type; - } - - /** - * Gets the list of annotations. - * - * @return The list of annotations - */ - public List getAnnotations() { - return annotations; - } - - /** - * Sets the list of annotations. - * - * @param annotations The list of annotations - */ - public void setAnnotations(List annotations) { - this.annotations = annotations; - } - - /** {@inheritDoc} */ - @Override - public String getMessageId() { - return messageId; - } - - /** - * Sets the message ID. - * - * @param messageId The message ID - */ - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - /** - *

toString.

- * - * @return a {@link java.lang.String} object. - */ - public String toString() { - return JSON.toJSONString(this); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/TextBlock.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/TextBlock.java deleted file mode 100644 index 5b6953fda5..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/TextBlock.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.block; - -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.TextAssistantContent; - -/** - * Represents a text content block. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "text") -public class TextBlock extends ContentBlock implements TextAssistantContent { - /** - * The text content. - */ - private String text; - - /** - * Gets the text content. - * - * @return The text content - */ - public String getText() { - return text; - } - - /** - * Sets the text content. - * - * @param text The text content - */ - public void setText(String text) { - this.text = text; - } - - /** {@inheritDoc} */ - @Override - public String getContentOfAssistant() { - return text; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ThinkingBlock.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ThinkingBlock.java deleted file mode 100644 index 52967e67b4..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ThinkingBlock.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.block; - -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ThingkingAssistantContent; - -/** - * Represents a thinking content block. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "thinking") -public class ThinkingBlock extends ContentBlock implements ThingkingAssistantContent { - /** - * The thinking content. - */ - private String thinking; - /** - * The signature. - */ - private String signature; - - /** - * Gets the thinking content. - * - * @return The thinking content - */ - public String getThinking() { - return thinking; - } - - /** - * Sets the thinking content. - * - * @param thinking The thinking content - */ - public void setThinking(String thinking) { - this.thinking = thinking; - } - - /** - * Gets the signature. - * - * @return The signature - */ - public String getSignature() { - return signature; - } - - /** - * Sets the signature. - * - * @param signature The signature - */ - public void setSignature(String signature) { - this.signature = signature; - } - - /** {@inheritDoc} */ - @Override - public String getContentOfAssistant() { - return thinking; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ToolResultBlock.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ToolResultBlock.java deleted file mode 100644 index 35185a40d9..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ToolResultBlock.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.block; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolResultAssistantContent; - -/** - * Represents a tool result content block. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "tool_result") -public class ToolResultBlock extends ContentBlock implements ToolResultAssistantContent { - /** - * The tool use ID. - */ - @JSONField(name = "tool_use_id") - private String toolUseId; - - /** - * The result content. - */ - @JSONField(name = "content") - private String content; - - /** - * Whether the result is an error. - */ - @JSONField(name = "is_error") - private Boolean isError; - - /** - * Gets the tool use ID. - * - * @return The tool use ID - */ - public String getToolUseId() { - return toolUseId; - } - - /** - * Sets the tool use ID. - * - * @param toolUseId The tool use ID - */ - public void setToolUseId(String toolUseId) { - this.toolUseId = toolUseId; - } - - /** - * Gets the result content. - * - * @return The result content - */ - public String getContent() { - return content; - } - - /** - * Sets the result content. - * - * @param content The result content - */ - public void setContent(String content) { - this.content = content; - } - - /** - * Gets whether the result is an error. - * - * @return Whether the result is an error - */ - public Boolean getIsError() { - return isError; - } - - /** - * Sets whether the result is an error. - * - * @param isError Whether the result is an error - */ - public void setIsError(Boolean isError) { - this.isError = isError; - } - - /** {@inheritDoc} */ - @Override - public String getContentOfAssistant() { - return content; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ToolUseBlock.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ToolUseBlock.java deleted file mode 100644 index 91cfacb366..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/block/ToolUseBlock.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.block; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolUseAssistantContent; - -/** - * Represents a tool use content block. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "tool_use") -public class ToolUseBlock extends ContentBlock> implements ToolUseAssistantContent { - /** - * The tool use ID. - */ - private String id; - /** - * The tool name. - */ - private String name; - /** - * The tool input. - */ - private Map input; - /** - * List of annotations. - */ - private List annotations; - - /** - * Creates a new ToolUseBlock instance. - */ - public ToolUseBlock() {} - - /** - * Gets the tool use ID. - * - * @return The tool use ID - */ - public String getId() { - return id; - } - - /** - * Sets the tool use ID. - * - * @param id The tool use ID - */ - public void setId(String id) { - this.id = id; - } - - /** - * Gets the tool name. - * - * @return The tool name - */ - public String getName() { - return name; - } - - /** - * Sets the tool name. - * - * @param name The tool name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the tool input. - * - * @return The tool input - */ - public Map getInput() { - return input; - } - - /** - * Sets the tool input. - * - * @param input The tool input - */ - public void setInput(Map input) { - this.input = input; - } - - /** - * Gets the list of annotations. - * - * @return The list of annotations - */ - public List getAnnotations() { - return annotations; - } - - /** - * {@inheritDoc} - * - * Sets the list of annotations. - */ - @Override - public void setAnnotations(List annotations) { - this.annotations = annotations; - } - - /** - * {@inheritDoc} - * - * Gets the content of the assistant. - */ - @Override - public Map getContentOfAssistant() { - return Collections.emptyMap(); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/ContentBlockDeltaEvent.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/ContentBlockDeltaEvent.java deleted file mode 100644 index b7328b08e0..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/ContentBlockDeltaEvent.java +++ /dev/null @@ -1,224 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.event; - -import java.util.Map; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.TypeReference; -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.TextAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ThingkingAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolUseAssistantContent; - -/** - * Represents a content block delta event during streaming. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "content_block_delta") -public class ContentBlockDeltaEvent extends StreamEvent { - /** - * The index of the content block. - */ - private int index; - /** - * The content block delta. - */ - private ContentBlockDelta delta; - - /** - * Gets the index of the content block. - * - * @return The index of the content block - */ - public int getIndex() { - return index; - } - - /** - * Sets the index of the content block. - * - * @param index The index of the content block - */ - public void setIndex(int index) { - this.index = index; - } - - /** - * Gets the content block delta. - * - * @return The content block delta - */ - public ContentBlockDelta getDelta() { - return delta; - } - - /** - * Sets the content block delta. - * - * @param delta The content block delta - */ - public void setDelta(ContentBlockDelta delta) { - this.delta = delta; - } - - /** - * Abstract base class for content block deltas. - * - * @param The type of content - */ - @JSONType(typeKey = "type", typeName = "ContentBlockDelta", - seeAlso = {ContentBlockDeltaText.class, ContentBlockDeltaThinking.class, ContentBlockDeltaInputJson.class}) - public abstract static class ContentBlockDelta implements AssistantContent { - /** - * The type of the content block delta. - */ - protected String type; - /** - * The message ID. - */ - protected String messageId; - - @Override - public String getType() { - return type; - } - - /** - * Sets the type of the content block delta. - * - * @param type The type of the content block delta - */ - public void setType(String type) { - this.type = type; - } - - @Override - public String getMessageId() { - return messageId; - } - - /** - * Sets the message ID. - * - * @param messageId The message ID - */ - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - public String toString() { - return JSON.toJSONString(this); - } - } - - /** - * Represents a text delta. - */ - @JSONType(typeKey = "type", typeName = "text_delta") - public static class ContentBlockDeltaText extends ContentBlockDelta implements TextAssistantContent { - /** - * The text content. - */ - private String text; - - /** - * Gets the text content. - * - * @return The text content - */ - public String getText() { - return text; - } - - /** - * Sets the text content. - * - * @param text The text content - */ - public void setText(String text) { - this.text = text; - } - - @Override - public String getContentOfAssistant() { - return text; - } - } - - /** - * Represents a thinking delta. - */ - @JSONType(typeKey = "type", typeName = "thinking_delta") - public static class ContentBlockDeltaThinking extends ContentBlockDelta implements ThingkingAssistantContent { - /** - * The thinking content. - */ - private String thinking; - - /** - * Gets the thinking content. - * - * @return The thinking content - */ - public String getThinking() { - return thinking; - } - - /** - * Sets the thinking content. - * - * @param thinking The thinking content - */ - public void setThinking(String thinking) { - this.thinking = thinking; - } - - @Override - public String getContentOfAssistant() { - return thinking; - } - } - - /** - * Represents an input JSON delta. - */ - @JSONType(typeKey = "type", typeName = "input_json_delta") - public static class ContentBlockDeltaInputJson extends ContentBlockDelta> implements ToolUseAssistantContent { - /** - * The partial JSON content. - */ - @JSONField(name = "partial_json") - private String partialJson; - - /** - * Gets the partial JSON content. - * - * @return The partial JSON content - */ - public String getPartialJson() { - return partialJson; - } - - /** - * Sets the partial JSON content. - * - * @param partialJson The partial JSON content - */ - public void setPartialJson(String partialJson) { - this.partialJson = partialJson; - } - - @Override - public Map getContentOfAssistant() { - return getInput(); - } - - @Override - public Map getInput() { - return JSON.parseObject(partialJson, new TypeReference>() {}); - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/ContentBlockStartEvent.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/ContentBlockStartEvent.java deleted file mode 100644 index 758e596601..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/ContentBlockStartEvent.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.event; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.message.assistant.block.ContentBlock; - -/** - * Represents a content block start event during message streaming. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "content_block_start") -public class ContentBlockStartEvent extends StreamEvent{ - /** - * The index of the content block. - */ - private int index; - - /** - * The content block that is starting. - */ - @JSONField(name = "content_block") - private ContentBlock contentBlock; -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/ContentBlockStopEvent.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/ContentBlockStopEvent.java deleted file mode 100644 index ed1241957e..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/ContentBlockStopEvent.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.event; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a content block stop event during message streaming. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "content_block_stop") -public class ContentBlockStopEvent extends StreamEvent{ - /** - * The index of the content block. - */ - Long index; - - /** - * Gets the index of the content block. - * - * @return The index of the content block - */ - public Long getIndex() { - return index; - } - - /** - * Sets the index of the content block. - * - * @param index The index of the content block - */ - public void setIndex(Long index) { - this.index = index; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/MessageStartStreamEvent.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/MessageStartStreamEvent.java deleted file mode 100644 index 2377e6662f..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/MessageStartStreamEvent.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.event; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a message start event during message streaming. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeName = "message_start") -public class MessageStartStreamEvent extends StreamEvent{ - /** - * The message that is starting. - */ - private Message message; - - /** - * Represents the message information. - */ - public static class Message { - /** - * Message ID. - */ - private String id; - /** - * Message role. - */ - private String role; - /** - * Message model. - */ - private String model; - - /** - * Gets the message ID. - * - * @return The message ID - */ - public String getId() { - return id; - } - - /** - * Sets the message ID. - * - * @param id The message ID - */ - public void setId(String id) { - this.id = id; - } - - /** - * Gets the message role. - * - * @return The message role - */ - public String getRole() { - return role; - } - - /** - * Sets the message role. - * - * @param role The message role - */ - public void setRole(String role) { - this.role = role; - } - - /** - * Gets the message model. - * - * @return The message model - */ - public String getModel() { - return model; - } - - /** - * Sets the message model. - * - * @param model The message model - */ - public void setModel(String model) { - this.model = model; - } - } - - /** - * Gets the message that is starting. - * - * @return The message that is starting - */ - public Message getMessage() { - return message; - } - - /** - * Sets the message that is starting. - * - * @param message The message that is starting - */ - public void setMessage(Message message) { - this.message = message; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/MessageStopStreamEvent.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/MessageStopStreamEvent.java deleted file mode 100644 index cbf32c27ad..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/MessageStopStreamEvent.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.event; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a message stop event during message streaming. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeName = "message_stop") -public class MessageStopStreamEvent extends StreamEvent{ -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/StreamEvent.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/StreamEvent.java deleted file mode 100644 index b45c852ca1..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/assistant/event/StreamEvent.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.assistant.event; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Base class for stream events during message streaming. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "StreamEvent", - seeAlso = {MessageStartStreamEvent.class, MessageStopStreamEvent.class, ContentBlockStartEvent.class, ContentBlockStopEvent.class, - ContentBlockDeltaEvent.class}) -public class StreamEvent { - /** - * The type of the stream event. - */ - protected String type; - - /** - * Gets the type of the stream event. - * - * @return The type of the stream event - */ - public String getType() { - return type; - } - - /** - * Sets the type of the stream event. - * - * @param type The type of the stream event - */ - public void setType(String type) { - this.type = type; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/CLIControlRequest.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/CLIControlRequest.java deleted file mode 100644 index 58079bc6b7..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/CLIControlRequest.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control; - -import java.util.UUID; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.message.MessageBase; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlRequestPayload; - -/** - * Represents a control request to the CLI. - * - * @param The type of the request object - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "control_request") -public class CLIControlRequest extends MessageBase { - /** - * The ID of the request. - */ - @JSONField(name = "request_id") - private String requestId = UUID.randomUUID().toString(); - - /** - * The actual request object. - */ - private R request; - - /** - * Creates a new CLIControlRequest instance and sets the type to "control_request". - */ - public CLIControlRequest() { - super(); - type = "control_request"; - } - - /** - * Creates a new control request with the specified request object. - * - * @param request The request object - * @param The type of the request object - * @return A new control request instance - */ - public static CLIControlRequest create(T request) { - CLIControlRequest controlRequest = new CLIControlRequest<>(); - controlRequest.setRequest(request); - return controlRequest; - } - - /** - * Gets the ID of the request. - * - * @return The ID of the request - */ - public String getRequestId() { - return requestId; - } - - /** - * Sets the ID of the request. - * - * @param requestId The ID of the request - * @return This instance for method chaining - */ - public CLIControlRequest setRequestId(String requestId) { - this.requestId = requestId; - return this; - } - - /** - * Gets the actual request object. - * - * @return The actual request object - */ - public R getRequest() { - return request; - } - - /** - * Sets the actual request object. - * - * @param request The actual request object - * @return This instance for method chaining - */ - public CLIControlRequest setRequest(R request) { - this.request = request; - return this; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/CLIControlResponse.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/CLIControlResponse.java deleted file mode 100644 index 7e416786ec..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/CLIControlResponse.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.message.MessageBase; - -/** - * Represents a control response from the CLI. - * - * @param The type of the response object - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "type", typeName = "control_response") -public class CLIControlResponse extends MessageBase { - /** - * The response object. - */ - private Response response; - - /** - * Creates a new CLIControlResponse instance and sets the type to "control_response". - */ - public CLIControlResponse() { - super(); - this.type = "control_response"; - } - - /** - * Gets the response object. - * - * @return The response object - */ - public Response getResponse() { - return response; - } - - /** - * Sets the response object. - * - * @param response The response object - */ - public void setResponse(Response response) { - this.response = response; - } - - /** - * Creates a new response object. - * - * @return A new response object - */ - public Response createResponse() { - Response response = new Response<>(); - this.setResponse(response); - return response; - } - - /** - * Represents the response information. - * - * @param The type of the response object - */ - public static class Response { - /** - * The ID of the request. - */ - @JSONField(name = "request_id") - private String requestId; - /** - * The subtype of the response. - */ - private String subtype = "success"; - /** - * The actual response. - */ - R response; - - /** - * Gets the ID of the request. - * - * @return The ID of the request - */ - public String getRequestId() { - return requestId; - } - - /** - * Sets the ID of the request. - * - * @param requestId The ID of the request - * @return This instance for method chaining - */ - public Response setRequestId(String requestId) { - this.requestId = requestId; - return this; - } - - /** - * Gets the subtype of the response. - * - * @return The subtype of the response - */ - public String getSubtype() { - return subtype; - } - - /** - * Sets the subtype of the response. - * - * @param subtype The subtype of the response - * @return This instance for method chaining - */ - public Response setSubtype(String subtype) { - this.subtype = subtype; - return this; - } - - /** - * Gets the actual response. - * - * @return The actual response - */ - public R getResponse() { - return response; - } - - /** - * Sets the actual response. - * - * @param response The actual response - * @return This instance for method chaining - */ - public Response setResponse(R response) { - this.response = response; - return this; - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlInitializeRequest.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlInitializeRequest.java deleted file mode 100644 index a990e03163..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlInitializeRequest.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.InitializeConfig; - -/** - * Represents a control initialize request to the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "subtype", typeName = "initialize") -public class CLIControlInitializeRequest extends ControlRequestPayload { - public CLIControlInitializeRequest() { - super(); - this.subtype = "initialize"; - } - - /** - * The initialization configuration. - */ - @JSONField(unwrapped = true) - InitializeConfig initializeConfig = new InitializeConfig(); - - /** - * Gets the initialization configuration. - * - * @return The initialization configuration - */ - public InitializeConfig getInitializeConfig() { - return initializeConfig; - } - - /** - * Sets the initialization configuration. - * - * @param initializeConfig The initialization configuration - * @return This instance for method chaining - */ - public CLIControlInitializeRequest setInitializeConfig(InitializeConfig initializeConfig) { - this.initializeConfig = initializeConfig; - return this; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlInitializeResponse.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlInitializeResponse.java deleted file mode 100644 index aabeec0160..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlInitializeResponse.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.Capabilities; - -/** - * Represents a control initialize response from the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "subtype", typeName = "initialize") -public class CLIControlInitializeResponse extends ControlResponsePayload { - public CLIControlInitializeResponse() { - super(); - this.subtype = "initialize"; - } - - /** - * The capabilities' information. - */ - Capabilities capabilities; - - /** - * Gets the capabilities information. - * - * @return The capabilities information - */ - public Capabilities getCapabilities() { - return capabilities; - } - - /** - * Sets the capabilities information. - * - * @param capabilities The capabilities information - */ - public void setCapabilities(Capabilities capabilities) { - this.capabilities = capabilities; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlInterruptRequest.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlInterruptRequest.java deleted file mode 100644 index cf3f835672..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlInterruptRequest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a control interrupt request to the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "subtype", typeName = "interrupt") -public class CLIControlInterruptRequest extends ControlRequestPayload { - public CLIControlInterruptRequest() { - super(); - setSubtype("interrupt"); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlPermissionRequest.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlPermissionRequest.java deleted file mode 100644 index e15133dfbd..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlPermissionRequest.java +++ /dev/null @@ -1,235 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -import java.util.List; -import java.util.Map; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a control permission request to the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "subtype", typeName = "can_use_tool") -public class CLIControlPermissionRequest extends ControlRequestPayload { - public CLIControlPermissionRequest() { - super(); - this.subtype = "can_use_tool"; - } - - /** - * The name of the tool requesting permission. - */ - @JSONField(name = "tool_name") - private String toolName; - - /** - * The ID of the tool use. - */ - @JSONField(name = "tool_use_id") - private String toolUseId; - - /** - * The input for the tool. - */ - private Map input; - - /** - * List of permission suggestions. - */ - @JSONField(name = "permission_suggestions") - private List permissionSuggestions; - - /** - * The blocked path. - */ - @JSONField(name = "blocked_path") - private String blockedPath; - - /** - * Gets the name of the tool requesting permission. - * - * @return The name of the tool requesting permission - */ - public String getToolName() { - return toolName; - } - - /** - * Sets the name of the tool requesting permission. - * - * @param toolName The name of the tool requesting permission - */ - public void setToolName(String toolName) { - this.toolName = toolName; - } - - /** - * Gets the ID of the tool use. - * - * @return The ID of the tool use - */ - public String getToolUseId() { - return toolUseId; - } - - /** - * Sets the ID of the tool use. - * - * @param toolUseId The ID of the tool use - */ - public void setToolUseId(String toolUseId) { - this.toolUseId = toolUseId; - } - - /** - * Gets the input for the tool. - * - * @return The input for the tool - */ - public Map getInput() { - return input; - } - - /** - * Sets the input for the tool. - * - * @param input The input for the tool - */ - public void setInput(Map input) { - this.input = input; - } - - /** - * Gets the list of permission suggestions. - * - * @return The list of permission suggestions - */ - public List getPermissionSuggestions() { - return permissionSuggestions; - } - - /** - * Sets the list of permission suggestions. - * - * @param permissionSuggestions The list of permission suggestions - */ - public void setPermissionSuggestions( - List permissionSuggestions) { - this.permissionSuggestions = permissionSuggestions; - } - - /** - * Gets the blocked path. - * - * @return The blocked path - */ - public String getBlockedPath() { - return blockedPath; - } - - /** - * Sets the blocked path. - * - * @param blockedPath The blocked path - */ - public void setBlockedPath(String blockedPath) { - this.blockedPath = blockedPath; - } - - /** - * Represents a permission suggestion. - */ - public static class PermissionSuggestion { - /** - * The type of suggestion (allow, deny, modify). - */ - private String type; // 'allow' | 'deny' | 'modify' - /** - * The label for the suggestion. - */ - private String label; - /** - * The description of the suggestion. - */ - private String description; - /** - * The modified input. - */ - private Object modifiedInput; - - /** - * Gets the type of suggestion. - * - * @return The type of suggestion - */ - public String getType() { - return type; - } - - /** - * Sets the type of suggestion. - * - * @param type The type of suggestion - */ - public void setType(String type) { - this.type = type; - } - - /** - * Gets the label for the suggestion. - * - * @return The label for the suggestion - */ - public String getLabel() { - return label; - } - - /** - * Sets the label for the suggestion. - * - * @param label The label for the suggestion - */ - public void setLabel(String label) { - this.label = label; - } - - /** - * Gets the description of the suggestion. - * - * @return The description of the suggestion - */ - public String getDescription() { - return description; - } - - /** - * Sets the description of the suggestion. - * - * @param description The description of the suggestion - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Gets the modified input. - * - * @return The modified input - */ - public Object getModifiedInput() { - return modifiedInput; - } - - /** - * Sets the modified input. - * - * @param modifiedInput The modified input - */ - public void setModifiedInput(Object modifiedInput) { - this.modifiedInput = modifiedInput; - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlPermissionResponse.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlPermissionResponse.java deleted file mode 100644 index 771f0d5811..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlPermissionResponse.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -import com.alibaba.fastjson2.annotation.JSONField; -import com.alibaba.fastjson2.annotation.JSONType; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior; - -/** - * Represents a control permission response from the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "subtype", typeName = "can_use_tool") -public class CLIControlPermissionResponse extends ControlResponsePayload { - public CLIControlPermissionResponse() { - super(); - this.subtype = "can_use_tool"; - } - - /** - * The behavior for the permission request. - */ - @JSONField(unwrapped = true) - Behavior behavior; - - /** - * Gets the behavior for the permission request. - * - * @return The behavior for the permission request - */ - public Behavior getBehavior() { - return behavior; - } - - /** - * Sets the behavior for the permission request. - * - * @param behavior The behavior for the permission request - * @return This instance for method chaining - */ - public CLIControlPermissionResponse setBehavior(Behavior behavior) { - this.behavior = behavior; - return this; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlSetModelRequest.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlSetModelRequest.java deleted file mode 100644 index e12b704a35..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlSetModelRequest.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a control request to set the model in the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "subtype", typeName = "set_model") -public class CLIControlSetModelRequest extends ControlRequestPayload { - public CLIControlSetModelRequest() { - super(); - this.subtype = "set_model"; - } - - /** - * The model to set. - */ - String model; - - /** - * Gets the model to set. - * - * @return The model to set - */ - public String getModel() { - return model; - } - - /** - * Sets the model to set. - * - * @param model The model to set - */ - public void setModel(String model) { - this.model = model; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlSetModelResponse.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlSetModelResponse.java deleted file mode 100644 index b59552e0cd..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlSetModelResponse.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -/** - * Represents a control response for setting the model in the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class CLIControlSetModelResponse { - /** - * The subtype of the response ("set_model"). - */ - String subtype = "set_model"; - /** - * The model that was set. - */ - String model; - - /** - * Gets the subtype of the response. - * - * @return The subtype of the response - */ - public String getSubtype() { - return subtype; - } - - /** - * Sets the subtype of the response. - * - * @param subtype The subtype of the response - */ - public void setSubtype(String subtype) { - this.subtype = subtype; - } - - /** - * Gets the model that was set. - * - * @return The model that was set - */ - public String getModel() { - return model; - } - - /** - * Sets the model that was set. - * - * @param model The model that was set - */ - public void setModel(String model) { - this.model = model; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlSetPermissionModeRequest.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlSetPermissionModeRequest.java deleted file mode 100644 index 3e5ef9dd17..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/CLIControlSetPermissionModeRequest.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a control request to set the permission mode in the CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "subtype", typeName = "set_permission_mode") -public class CLIControlSetPermissionModeRequest extends ControlRequestPayload { - public CLIControlSetPermissionModeRequest() { - super(); - setSubtype("set_permission_mode"); - } - - /** - * The permission mode to set. - */ - String mode; - - /** - * Gets the permission mode to set. - * - * @return The permission mode to set - */ - public String getMode() { - return mode; - } - - /** - * Sets the permission mode to set. - * - * @param mode The permission mode to set - */ - public void setMode(String mode) { - this.mode = mode; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/ControlRequestPayload.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/ControlRequestPayload.java deleted file mode 100644 index 1390850e71..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/ControlRequestPayload.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a payload request in the CLI control message. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "subtype", typeName = "ControlRequestPayload", - seeAlso = {CLIControlInitializeRequest.class, CLIControlInterruptRequest.class, CLIControlPermissionRequest.class, CLIControlSetModelRequest.class, CLIControlSetPermissionModeRequest.class}) -public class ControlRequestPayload { - /** - * The subtype of the request. - */ - protected String subtype; - - public String getSubtype() { - return subtype; - } - - public void setSubtype(String subtype) { - this.subtype = subtype; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/ControlResponsePayload.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/ControlResponsePayload.java deleted file mode 100644 index fe8cdd8aeb..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/message/control/payload/ControlResponsePayload.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.alibaba.qwen.code.cli.protocol.message.control.payload; - -import com.alibaba.fastjson2.annotation.JSONType; - -/** - * Represents a payload request in the CLI control message. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -@JSONType(typeKey = "subtype", typeName = "ControlResponsePayload", - seeAlso = {CLIControlInitializeResponse.class, CLIControlPermissionResponse.class}) -public class ControlResponsePayload { - /** - * The subtype of the request. - */ - protected String subtype; - - public String getSubtype() { - return subtype; - } - - public void setSubtype(String subtype) { - this.subtype = subtype; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/protocol.ts b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/protocol.ts deleted file mode 100644 index e5eeb12124..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/protocol/protocol.ts +++ /dev/null @@ -1,594 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ - -import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; -export interface Annotation { - type: string; - value: string; -} - -export interface Usage { - input_tokens: number; - output_tokens: number; - cache_creation_input_tokens?: number; - cache_read_input_tokens?: number; - total_tokens?: number; -} - -export interface ExtendedUsage extends Usage { - server_tool_use?: { - web_search_requests: number; - }; - service_tier?: string; - cache_creation?: { - ephemeral_1h_input_tokens: number; - ephemeral_5m_input_tokens: number; - }; -} - -export interface ModelUsage { - inputTokens: number; - outputTokens: number; - cacheReadInputTokens: number; - cacheCreationInputTokens: number; - webSearchRequests: number; - contextWindow: number; -} - -export interface CLIPermissionDenial { - tool_name: string; - tool_use_id: string; - tool_input: unknown; -} - -export interface TextBlock { - type: 'text'; - text: string; - annotations?: Annotation[]; -} - -export interface ThinkingBlock { - type: 'thinking'; - thinking: string; - signature?: string; - annotations?: Annotation[]; -} - -export interface ToolUseBlock { - type: 'tool_use'; - id: string; - name: string; - input: unknown; - annotations?: Annotation[]; -} - -export interface ToolResultBlock { - type: 'tool_result'; - tool_use_id: string; - content?: string | ContentBlock[]; - is_error?: boolean; - annotations?: Annotation[]; -} - -export type ContentBlock = - | TextBlock - | ThinkingBlock - | ToolUseBlock - | ToolResultBlock; - -export interface APIUserMessage { - role: 'user'; - content: string | ContentBlock[]; -} - -export interface APIAssistantMessage { - id: string; - type: 'message'; - role: 'assistant'; - model: string; - content: ContentBlock[]; - stop_reason?: string | null; - usage: Usage; -} - -export interface SDKUserMessage { - type: 'user'; - uuid?: string; - session_id: string; - message: APIUserMessage; - parent_tool_use_id: string | null; - options?: Record; -} - -export interface SDKAssistantMessage { - type: 'assistant'; - uuid: string; - session_id: string; - message: APIAssistantMessage; - parent_tool_use_id: string | null; -} - -export interface SDKSystemMessage { - type: 'system'; - subtype: string; - uuid: string; - session_id: string; - data?: unknown; - cwd?: string; - tools?: string[]; - mcp_servers?: Array<{ - name: string; - status: string; - }>; - model?: string; - permission_mode?: string; - slash_commands?: string[]; - qwen_code_version?: string; - output_style?: string; - agents?: string[]; - skills?: string[]; - capabilities?: Record; - compact_metadata?: { - trigger: 'manual' | 'auto'; - pre_tokens: number; - }; -} - -export interface SDKResultMessageSuccess { - type: 'result'; - subtype: 'success'; - uuid: string; - session_id: string; - is_error: false; - duration_ms: number; - duration_api_ms: number; - num_turns: number; - result: string; - usage: ExtendedUsage; - modelUsage?: Record; - permission_denials: CLIPermissionDenial[]; - [key: string]: unknown; -} - -export interface SDKResultMessageError { - type: 'result'; - subtype: 'error_max_turns' | 'error_during_execution'; - uuid: string; - session_id: string; - is_error: true; - duration_ms: number; - duration_api_ms: number; - num_turns: number; - usage: ExtendedUsage; - modelUsage?: Record; - permission_denials: CLIPermissionDenial[]; - error?: { - type?: string; - message: string; - [key: string]: unknown; - }; - [key: string]: unknown; -} - -export type SDKResultMessage = SDKResultMessageSuccess | SDKResultMessageError; - -export interface MessageStartStreamEvent { - type: 'message_start'; - message: { - id: string; - role: 'assistant'; - model: string; - }; -} - -export interface ContentBlockStartEvent { - type: 'content_block_start'; - index: number; - content_block: ContentBlock; -} - -export type ContentBlockDelta = - | { - type: 'text_delta'; - text: string; - } - | { - type: 'thinking_delta'; - thinking: string; - } - | { - type: 'input_json_delta'; - partial_json: string; - }; - -export interface ContentBlockDeltaEvent { - type: 'content_block_delta'; - index: number; - delta: ContentBlockDelta; -} - -export interface ContentBlockStopEvent { - type: 'content_block_stop'; - index: number; -} - -export interface MessageStopStreamEvent { - type: 'message_stop'; -} - -export type StreamEvent = - | MessageStartStreamEvent - | ContentBlockStartEvent - | ContentBlockDeltaEvent - | ContentBlockStopEvent - | MessageStopStreamEvent; - -export interface SDKPartialAssistantMessage { - type: 'stream_event'; - uuid: string; - session_id: string; - event: StreamEvent; - parent_tool_use_id: string | null; -} - -export type PermissionMode = 'default' | 'plan' | 'auto-edit' | 'yolo'; - -/** - * TODO: Align with `ToolCallConfirmationDetails` - */ -export interface PermissionSuggestion { - type: 'allow' | 'deny' | 'modify'; - label: string; - description?: string; - modifiedInput?: unknown; -} - -export interface HookRegistration { - event: string; - callback_id: string; -} - -export interface HookCallbackResult { - shouldSkip?: boolean; - shouldInterrupt?: boolean; - suppressOutput?: boolean; - message?: string; -} - -export interface CLIControlInterruptRequest { - subtype: 'interrupt'; -} - -export interface CLIControlPermissionRequest { - subtype: 'can_use_tool'; - tool_name: string; - tool_use_id: string; - input: unknown; - permission_suggestions: PermissionSuggestion[] | null; - blocked_path: string | null; -} - -export enum AuthProviderType { - DYNAMIC_DISCOVERY = 'dynamic_discovery', - GOOGLE_CREDENTIALS = 'google_credentials', - SERVICE_ACCOUNT_IMPERSONATION = 'service_account_impersonation', -} - -export interface MCPServerConfig { - command?: string; - args?: string[]; - env?: Record; - cwd?: string; - url?: string; - httpUrl?: string; - headers?: Record; - tcp?: string; - timeout?: number; - trust?: boolean; - description?: string; - includeTools?: string[]; - excludeTools?: string[]; - extensionName?: string; - oauth?: Record; - authProviderType?: AuthProviderType; - targetAudience?: string; - targetServiceAccount?: string; -} - -/** - * SDK MCP Server configuration - * - * SDK MCP servers run in the SDK process and are connected via in-memory transport. - * Tool calls are routed through the control plane between SDK and CLI. - */ -export interface SDKMcpServerConfig { - /** - * Type identifier for SDK MCP servers - */ - type: 'sdk'; - /** - * Server name for identification and routing - */ - name: string; - /** - * The MCP Server instance created by createSdkMcpServer() - */ - instance: McpServer; -} - -/** - * Wire format for SDK MCP servers sent to the CLI - */ -export type WireSDKMcpServerConfig = Omit; - -export interface CLIControlInitializeRequest { - subtype: 'initialize'; - hooks?: HookRegistration[] | null; - /** - * SDK MCP servers config - * These are MCP servers running in the SDK process, connected via control plane. - * External MCP servers are configured separately in settings, not via initialization. - */ - sdkMcpServers?: Record; - /** - * External MCP servers that should be managed by the CLI. - */ - mcpServers?: Record; - agents?: SubagentConfig[]; -} - -export interface CLIControlSetPermissionModeRequest { - subtype: 'set_permission_mode'; - mode: PermissionMode; -} - -export interface CLIHookCallbackRequest { - subtype: 'hook_callback'; - callback_id: string; - input: unknown; - tool_use_id: string | null; -} - -export interface CLIControlMcpMessageRequest { - subtype: 'mcp_message'; - server_name: string; - message: { - jsonrpc?: string; - method: string; - params?: Record; - id?: string | number | null; - }; -} - -export interface CLIControlSetModelRequest { - subtype: 'set_model'; - model: string; -} - -export interface CLIControlMcpStatusRequest { - subtype: 'mcp_server_status'; -} - -export interface CLIControlSupportedCommandsRequest { - subtype: 'supported_commands'; -} - -export type ControlRequestPayload = - | CLIControlInterruptRequest - | CLIControlPermissionRequest - | CLIControlInitializeRequest - | CLIControlSetPermissionModeRequest - | CLIHookCallbackRequest - | CLIControlMcpMessageRequest - | CLIControlSetModelRequest - | CLIControlMcpStatusRequest - | CLIControlSupportedCommandsRequest; - -export interface CLIControlRequest { - type: 'control_request'; - request_id: string; - request: ControlRequestPayload; -} - -export interface PermissionApproval { - allowed: boolean; - reason?: string; - modifiedInput?: unknown; -} - -export interface ControlResponse { - subtype: 'success'; - request_id: string; - response: unknown; -} - -export interface ControlErrorResponse { - subtype: 'error'; - request_id: string; - error: string | { message: string; [key: string]: unknown }; -} - -export interface CLIControlResponse { - type: 'control_response'; - response: ControlResponse | ControlErrorResponse; -} - -export interface ControlCancelRequest { - type: 'control_cancel_request'; - request_id?: string; -} - -export type ControlMessage = - | CLIControlRequest - | CLIControlResponse - | ControlCancelRequest; - -/** - * Union of all SDK message types - */ -export type SDKMessage = - | SDKUserMessage - | SDKAssistantMessage - | SDKSystemMessage - | SDKResultMessage - | SDKPartialAssistantMessage; - -export function isSDKUserMessage(msg: any): msg is SDKUserMessage { - return ( - msg && typeof msg === 'object' && msg.type === 'user' && 'message' in msg - ); -} - -export function isSDKAssistantMessage(msg: any): msg is SDKAssistantMessage { - return ( - msg && - typeof msg === 'object' && - msg.type === 'assistant' && - 'uuid' in msg && - 'message' in msg && - 'session_id' in msg && - 'parent_tool_use_id' in msg - ); -} - -export function isSDKSystemMessage(msg: any): msg is SDKSystemMessage { - return ( - msg && - typeof msg === 'object' && - msg.type === 'system' && - 'subtype' in msg && - 'uuid' in msg && - 'session_id' in msg - ); -} - -export function isSDKResultMessage(msg: any): msg is SDKResultMessage { - return ( - msg && - typeof msg === 'object' && - msg.type === 'result' && - 'subtype' in msg && - 'duration_ms' in msg && - 'is_error' in msg && - 'uuid' in msg && - 'session_id' in msg - ); -} - -export function isSDKPartialAssistantMessage( - msg: any, -): msg is SDKPartialAssistantMessage { - return ( - msg && - typeof msg === 'object' && - msg.type === 'stream_event' && - 'uuid' in msg && - 'session_id' in msg && - 'event' in msg && - 'parent_tool_use_id' in msg - ); -} - -export function isControlRequest(msg: any): msg is CLIControlRequest { - return ( - msg && - typeof msg === 'object' && - msg.type === 'control_request' && - 'request_id' in msg && - 'request' in msg - ); -} - -export function isControlResponse(msg: any): msg is CLIControlResponse { - return ( - msg && - typeof msg === 'object' && - msg.type === 'control_response' && - 'response' in msg - ); -} - -export function isControlCancel(msg: any): msg is ControlCancelRequest { - return ( - msg && - typeof msg === 'object' && - msg.type === 'control_cancel_request' && - 'request_id' in msg - ); -} - -export function isTextBlock(block: any): block is TextBlock { - return block && typeof block === 'object' && block.type === 'text'; -} - -export function isThinkingBlock(block: any): block is ThinkingBlock { - return block && typeof block === 'object' && block.type === 'thinking'; -} - -export function isToolUseBlock(block: any): block is ToolUseBlock { - return block && typeof block === 'object' && block.type === 'tool_use'; -} - -export function isToolResultBlock(block: any): block is ToolResultBlock { - return block && typeof block === 'object' && block.type === 'tool_result'; -} - -export type SubagentLevel = 'session'; - -export interface ModelConfig { - model?: string; - temp?: number; - top_p?: number; -} - -export interface RunConfig { - max_time_minutes?: number; - max_turns?: number; -} - -export interface SubagentConfig { - name: string; - description: string; - tools?: string[]; - systemPrompt: string; - level: SubagentLevel; - filePath?: string; - modelConfig?: Partial; - runConfig?: Partial; - color?: string; - readonly isBuiltin?: boolean; -} - -/** - * @license - * Copyright 2025 Qwen Team - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * Control Request Types - * - * Centralized enum for all control request subtypes supported by the CLI. - * This enum should be kept in sync with the controllers in: - * - packages/cli/src/services/control/controllers/systemController.ts - * - packages/cli/src/services/control/controllers/permissionController.ts - * - packages/cli/src/services/control/controllers/mcpController.ts - * - packages/cli/src/services/control/controllers/hookController.ts - */ -export enum ControlRequestType { - // SystemController requests - INITIALIZE = 'initialize', - INTERRUPT = 'interrupt', - SET_MODEL = 'set_model', - SUPPORTED_COMMANDS = 'supported_commands', - - // PermissionController requests - CAN_USE_TOOL = 'can_use_tool', - SET_PERMISSION_MODE = 'set_permission_mode', - - // MCPController requests - MCP_MESSAGE = 'mcp_message', - MCP_SERVER_STATUS = 'mcp_server_status', - - // HookController requests - HOOK_CALLBACK = 'hook_callback', -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/Session.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/Session.java deleted file mode 100644 index e72ab6a044..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/Session.java +++ /dev/null @@ -1,302 +0,0 @@ -package com.alibaba.qwen.code.cli.session; - -import java.util.Optional; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.JSONObject; -import com.alibaba.fastjson2.JSONReader.Feature; -import com.alibaba.fastjson2.TypeReference; -import com.alibaba.qwen.code.cli.protocol.data.Capabilities; -import com.alibaba.qwen.code.cli.protocol.data.PermissionMode; -import com.alibaba.qwen.code.cli.protocol.message.SDKResultMessage; -import com.alibaba.qwen.code.cli.protocol.message.SDKSystemMessage; -import com.alibaba.qwen.code.cli.protocol.message.SDKUserMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.SDKAssistantMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.SDKPartialAssistantMessage; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlInitializeRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlInitializeResponse; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlInterruptRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlResponse; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlSetModelRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlSetPermissionModeRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlRequestPayload; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlResponsePayload; -import com.alibaba.qwen.code.cli.session.event.consumers.SessionEventConsumers; -import com.alibaba.qwen.code.cli.session.exception.SessionControlException; -import com.alibaba.qwen.code.cli.session.exception.SessionSendPromptException; -import com.alibaba.qwen.code.cli.transport.Transport; -import com.alibaba.qwen.code.cli.transport.TransportOptions; -import com.alibaba.qwen.code.cli.utils.MyConcurrentUtils; -import com.alibaba.qwen.code.cli.utils.Timeout; - -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Manages a session with the Qwen Code CLI, handling communication, sending prompts, and processing responses. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class Session { - private static final Logger log = LoggerFactory.getLogger(Session.class); - private final Transport transport; - private CLIControlInitializeResponse lastCliControlInitializeResponse; - private SDKSystemMessage lastSdkSystemMessage; - private final Timeout defaultEventTimeout = Timeout.TIMEOUT_60_SECONDS; - - /** - * Checks if the session is configured for streaming. - * - * @return true if streaming is enabled, false otherwise - */ - public boolean isStreaming() { - return Optional.ofNullable(transport) - .map(Transport::getTransportOptions) - .map(TransportOptions::getIncludePartialMessages) - .orElse(false); - } - - /** - * Constructs a new session with the specified transport. - * - * @param transport The transport layer to use for communication - * @throws com.alibaba.qwen.code.cli.session.exception.SessionControlException if the transport is not available - */ - public Session(Transport transport) throws SessionControlException { - if (transport == null || !transport.isAvailable()) { - throw new SessionControlException("Transport is not available"); - } - this.transport = transport; - start(); - } - - /** - * Starts the session by initializing communication with the CLI. - * - * @throws com.alibaba.qwen.code.cli.session.exception.SessionControlException if initialization fails - */ - public void start() throws SessionControlException { - try { - if (!transport.isAvailable()) { - transport.start(); - } - String response = transport.inputWaitForOneLine(CLIControlRequest.create(new CLIControlInitializeRequest()).toString()); - CLIControlResponse cliControlResponse = JSON.parseObject(response, - new TypeReference>() {}); - this.lastCliControlInitializeResponse = cliControlResponse.getResponse().getResponse(); - } catch (Exception e) { - throw new SessionControlException("Failed to initialize the session", e); - } - } - - /** - * Closes the session and releases resources. - * - * @throws com.alibaba.qwen.code.cli.session.exception.SessionControlException if closing fails - */ - public void close() throws SessionControlException { - try { - transport.close(); - } catch (Exception e) { - throw new SessionControlException("Failed to close the session", e); - } - } - - /** - * Interrupts the current operation in the CLI. - * - * @return An optional boolean indicating success of the interrupt operation - * @throws com.alibaba.qwen.code.cli.session.exception.SessionControlException if the operation fails - */ - public Optional interrupt() throws SessionControlException { - checkAvailable(); - return processControlRequest(new CLIControlRequest().setRequest(new CLIControlInterruptRequest()).toString()); - } - - /** - * Sets the model to be used in the session. - * - * @param modelName The name of the model to use - * @return An optional boolean indicating success of the operation - * @throws com.alibaba.qwen.code.cli.session.exception.SessionControlException if the operation fails - */ - public Optional setModel(String modelName) throws SessionControlException { - checkAvailable(); - CLIControlSetModelRequest cliControlSetModelRequest = new CLIControlSetModelRequest(); - cliControlSetModelRequest.setModel(modelName); - return processControlRequest(new CLIControlRequest().setRequest(cliControlSetModelRequest).toString()); - } - - /** - * Sets the permission mode for the session. - * - * @param permissionMode The permission mode to use - * @return An optional boolean indicating success of the operation - * @throws com.alibaba.qwen.code.cli.session.exception.SessionControlException if the operation fails - */ - public Optional setPermissionMode(PermissionMode permissionMode) throws SessionControlException { - checkAvailable(); - CLIControlSetPermissionModeRequest cliControlSetPermissionModeRequest = new CLIControlSetPermissionModeRequest(); - cliControlSetPermissionModeRequest.setMode(permissionMode.getValue()); - return processControlRequest( - new CLIControlRequest().setRequest(cliControlSetPermissionModeRequest).toString()); - } - - private Optional processControlRequest(String request) throws SessionControlException { - try { - if (transport.isReading()) { - transport.inputNoWaitResponse(request); - return Optional.empty(); - } else { - String response = transport.inputWaitForOneLine(request); - CLIControlResponse cliControlResponse = JSON.parseObject(response, new TypeReference>() {}); - return Optional.of("success".equals(cliControlResponse.getResponse().getSubtype())); - } - } catch (Exception e) { - throw new SessionControlException("Failed to set model", e); - } - } - - /** - * Continues the current session. - * - * @throws com.alibaba.qwen.code.cli.session.exception.SessionControlException if the operation fails - */ - public void continueSession() throws SessionControlException { - resumeSession(getSessionId()); - } - - /** - * Resumes a session with the specified ID. - * - * @param sessionId The ID of the session to resume - * @throws com.alibaba.qwen.code.cli.session.exception.SessionControlException if the operation fails - */ - public void resumeSession(String sessionId) throws SessionControlException { - if (StringUtils.isNotBlank(sessionId)) { - transport.getTransportOptions().setResumeSessionId(sessionId); - } - this.start(); - } - - /** - * Sends a prompt to the CLI and processes the response. - * - * @param prompt The prompt to send to the CLI - * @param sessionEventConsumers Consumers for handling different types of events - * @throws com.alibaba.qwen.code.cli.session.exception.SessionSendPromptException if sending the prompt fails - * @throws com.alibaba.qwen.code.cli.session.exception.SessionControlException if a control operation fails - */ - public void sendPrompt(String prompt, SessionEventConsumers sessionEventConsumers) throws SessionSendPromptException, SessionControlException { - checkAvailable(); - try { - transport.inputWaitForMultiLine(new SDKUserMessage().setContent(prompt).toString(), (line) -> { - JSONObject jsonObject = JSON.parseObject(line); - String messageType = jsonObject.getString("type"); - if ("system".equals(messageType)) { - lastSdkSystemMessage = jsonObject.to(SDKSystemMessage.class); - MyConcurrentUtils.runAndWait(() -> sessionEventConsumers.onSystemMessage(this, lastSdkSystemMessage), - Optional.ofNullable(sessionEventConsumers.onSystemMessageTimeout(this, lastSdkSystemMessage)) - .orElse(defaultEventTimeout)); - return false; - } else if ("assistant".equals(messageType)) { - SDKAssistantMessage assistantMessage = jsonObject.to(SDKAssistantMessage.class); - MyConcurrentUtils.runAndWait(() -> sessionEventConsumers.onAssistantMessage(this, assistantMessage), - Optional.ofNullable(sessionEventConsumers.onAssistantMessageTimeout(this, assistantMessage)).orElse(defaultEventTimeout)); - return false; - } else if ("stream_event".equals(messageType)) { - SDKPartialAssistantMessage sdkPartialAssistantMessage = jsonObject.to(SDKPartialAssistantMessage.class); - MyConcurrentUtils.runAndWait( - () -> sessionEventConsumers.onPartialAssistantMessage(this, sdkPartialAssistantMessage), - Optional.ofNullable(sessionEventConsumers.onPartialAssistantMessageTimeout(this, sdkPartialAssistantMessage)) - .orElse(defaultEventTimeout)); - return false; - } else if ("user".equals(messageType)) { - SDKUserMessage sdkUserMessage = jsonObject.to(SDKUserMessage.class, Feature.FieldBased); - MyConcurrentUtils.runAndWait( - () -> sessionEventConsumers.onUserMessage(this, sdkUserMessage), - Optional.ofNullable(sessionEventConsumers.onUserMessageTimeout(this, sdkUserMessage)).orElse(defaultEventTimeout)); - return false; - } else if ("result".equals(messageType)) { - SDKResultMessage sdkResultMessage = jsonObject.to(SDKResultMessage.class); - MyConcurrentUtils.runAndWait(() -> sessionEventConsumers.onResultMessage(this, sdkResultMessage), - Optional.ofNullable(sessionEventConsumers.onResultMessageTimeout(this, sdkResultMessage)).orElse(defaultEventTimeout)); - return true; - } else if ("control_response".equals(messageType)) { - CLIControlResponse controlResponse = jsonObject.to( - new TypeReference>() {}); - MyConcurrentUtils.runAndWait(() -> sessionEventConsumers.onControlResponse(this, controlResponse), - Optional.ofNullable(sessionEventConsumers.onControlResponseTimeout(this, controlResponse)).orElse(defaultEventTimeout)); - if (!"error".equals(jsonObject.getString("subtype"))) { - return false; - } else { - log.info("control_response error: {}", jsonObject.toJSONString()); - return "error".equals(jsonObject.getString("subtype")); - } - } else if ("control_request".equals(messageType)) { - CLIControlResponse controlResponse; - try { - CLIControlRequest controlRequest = jsonObject.to( - new TypeReference>() {}); - controlResponse = MyConcurrentUtils.runAndWait( - () -> sessionEventConsumers.onControlRequest(this, controlRequest), - Optional.ofNullable(sessionEventConsumers.onControlRequestTimeout(this, controlRequest)).orElse(defaultEventTimeout)); - } catch (Exception e) { - log.error("Failed to process control request", e); - controlResponse = new CLIControlResponse<>(); - } - try { - transport.inputNoWaitResponse(Optional.ofNullable(controlResponse).map(CLIControlResponse::toString) - .orElse(new CLIControlResponse().toString())); - } catch (Exception e) { - throw new RuntimeException("Failed to send control response", e); - } - return false; - } else { - log.warn("unknown message type: {}", messageType); - MyConcurrentUtils.runAndWait(() -> sessionEventConsumers.onOtherMessage(this, line), - Optional.ofNullable(sessionEventConsumers.onOtherMessageTimeout(this, line)).orElse(defaultEventTimeout)); - return false; - } - }); - } catch (Exception e) { - throw new SessionSendPromptException("Failed to send prompt", e); - } - } - - /** - * Gets the current session ID. - * - * @return The session ID, or null if not available - */ - public String getSessionId() { - return Optional.ofNullable(lastSdkSystemMessage).map(SDKSystemMessage::getSessionId).orElse(null); - } - - /** - * Checks if the session is available for operations. - * - * @return true if the session is available, false otherwise - */ - public boolean isAvailable() { - return transport.isAvailable(); - } - - /** - * Gets the capabilities of the CLI. - * - * @return A Capabilities object representing the CLI's capabilities - */ - public Capabilities getCapabilities() { - return Optional.ofNullable(lastCliControlInitializeResponse).map(CLIControlInitializeResponse::getCapabilities).orElse(new Capabilities()); - } - - private void checkAvailable() throws SessionControlException { - if (!isAvailable()) { - throw new SessionControlException("Session is not available"); - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/AssistantContentConsumers.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/AssistantContentConsumers.java deleted file mode 100644 index 233bf73533..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/AssistantContentConsumers.java +++ /dev/null @@ -1,159 +0,0 @@ -package com.alibaba.qwen.code.cli.session.event.consumers; - -import com.alibaba.qwen.code.cli.protocol.data.AssistantUsage; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.TextAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ThingkingAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolResultAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolUseAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior.Operation; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlPermissionRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlRequestPayload; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlResponsePayload; -import com.alibaba.qwen.code.cli.session.Session; -import com.alibaba.qwen.code.cli.utils.Timeout; - -/** - * Interface for handling different types of assistant content during a session. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public interface AssistantContentConsumers { - /** - * Handles text content from the assistant. - * - * @param session The session - * @param textAssistantContent The text content from the assistant - */ - void onText(Session session, TextAssistantContent textAssistantContent); - - /** - * Handles thinking content from the assistant. - * - * @param session The session - * @param thingkingAssistantContent The thinking content from the assistant - */ - void onThinking(Session session, ThingkingAssistantContent thingkingAssistantContent); - - /** - * Handles tool use content from the assistant. - * - * @param session The session - * @param toolUseAssistantContent The tool use content from the assistant - */ - void onToolUse(Session session, ToolUseAssistantContent toolUseAssistantContent); - - /** - * Handles tool result content from the assistant. - * - * @param session The session - * @param toolResultAssistantContent The tool result content from the assistant - */ - void onToolResult(Session session, ToolResultAssistantContent toolResultAssistantContent); - - /** - * Handles other types of assistant content. - * - * @param session The session - * @param other The other content from the assistant - */ - void onOtherContent(Session session, AssistantContent other); - - /** - * Handles permission requests. - * - * @param session The session - * @param permissionRequest The permission request - * @return The behavior for the permission request - */ - Behavior onPermissionRequest(Session session, CLIControlPermissionRequest permissionRequest); - - /** - * Handles permission requests. - * - * @param session The session - * @param requestPayload The control request payload - * @return The response payload for the control request - */ - ControlResponsePayload onOtherControlRequest(Session session, ControlRequestPayload requestPayload); - - /** - * Handles usage information from the assistant. - * - * @param session The session - * @param AssistantUsage The usage information from the assistant - */ - void onUsage(Session session, AssistantUsage AssistantUsage); - - /** - * Sets the default permission operation. - * - * @param defaultPermissionOperation The default permission operation - * @return This instance for method chaining - */ - AssistantContentSimpleConsumers setDefaultPermissionOperation(Operation defaultPermissionOperation); - - /** - * Gets timeout for permission request handling. - * - * @param session The session - * @return The timeout for permission request handling - */ - Timeout onPermissionRequestTimeout(Session session, CLIControlPermissionRequest permissionRequest); - - /** - * Gets timeout for other control request handling. - * - * @param session The session - * @param requestPayload The control request payload - * @return The timeout for other control request handling - */ - Timeout onOtherControlRequestTimeout(Session session, ControlRequestPayload requestPayload); - - /** - * Gets timeout for text handling. - * - * @param session The session - * @param textAssistantContent The text content from the assistant - * @return The timeout for text handling - */ - Timeout onTextTimeout(Session session, TextAssistantContent textAssistantContent); - - /** - * Gets timeout for thinking handling. - * - * @param session The session - * @param thingkingAssistantContent The thinking content from the assistant - * @return The timeout for thinking handling - */ - Timeout onThinkingTimeout(Session session, ThingkingAssistantContent thingkingAssistantContent); - - /** - * Gets timeout for tool use handling. - * - * @param session The session - * @param toolUseAssistantContent The tool use content from the assistant - * @return The timeout for tool use handling - */ - Timeout onToolUseTimeout(Session session, ToolUseAssistantContent toolUseAssistantContent); - - /** - * Gets timeout for tool result handling. - * - * @param session The session - * @param toolResultAssistantContent The tool result content from the assistant - * @return The timeout for tool result handling - */ - Timeout onToolResultTimeout(Session session, ToolResultAssistantContent toolResultAssistantContent); - - /** - * Gets timeout for other content handling. - * - * @param session The session - * @param other The other content from the assistant - * @return The timeout for other content handling - */ - Timeout onOtherContentTimeout(Session session, AssistantContent other); -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/AssistantContentSimpleConsumers.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/AssistantContentSimpleConsumers.java deleted file mode 100644 index b5a158fedf..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/AssistantContentSimpleConsumers.java +++ /dev/null @@ -1,193 +0,0 @@ -package com.alibaba.qwen.code.cli.session.event.consumers; - -import com.alibaba.qwen.code.cli.protocol.data.AssistantUsage; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.TextAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ThingkingAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolResultAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolUseAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Allow; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior.Operation; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Deny; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlPermissionRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlRequestPayload; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlResponsePayload; -import com.alibaba.qwen.code.cli.session.Session; -import com.alibaba.qwen.code.cli.utils.Timeout; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Simple implementation of AssistantContentConsumers that provides empty implementations for all methods. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class AssistantContentSimpleConsumers implements AssistantContentConsumers { - /** - * {@inheritDoc} - */ - @Override - public void onText(Session session, TextAssistantContent textAssistantContent) { - log.debug("Received textAssistantContent {}", textAssistantContent.getText()); - } - - /** - * {@inheritDoc} - */ - @Override - public void onThinking(Session session, ThingkingAssistantContent thingkingAssistantContent) { - log.debug("Received thingkingAssistantContent {}", thingkingAssistantContent.getThinking()); - } - - /** - * {@inheritDoc} - */ - @Override - public void onToolUse(Session session, ToolUseAssistantContent toolUseAssistantContent) { - log.debug("Received toolUseAssistantContent {}", toolUseAssistantContent.getInput()); - } - - /** - * {@inheritDoc} - */ - @Override - public void onToolResult(Session session, ToolResultAssistantContent toolResultAssistantContent) { - if (log.isDebugEnabled()) { - log.debug("Received toolResultAssistantContent {}", toolResultAssistantContent); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void onOtherContent(Session session, AssistantContent other) { - if (log.isDebugEnabled()) { - log.debug("Received other content {}", other); - } - } - - /** - * {@inheritDoc} - */ - @Override - public Behavior onPermissionRequest(Session session, CLIControlPermissionRequest permissionRequest) { - if (Operation.deny.equals(this.defaultPermissionOperation)) { - log.info("use defaultPermissionOperation Permission denied."); - return new Deny().setMessage("Permission denied."); - } else { - log.info("use defaultPermissionOperation Permission allowed."); - return new Allow().setUpdatedInput(permissionRequest.getInput()); - } - } - - @Override - public ControlResponsePayload onOtherControlRequest(Session session, ControlRequestPayload requestPayload) { - throw new RuntimeException("need override onOtherControlRequest"); - } - - /** - * {@inheritDoc} - */ - @Override - public void onUsage(Session session, AssistantUsage AssistantUsage) { - log.info("received usage {} of message {}", AssistantUsage.getUsage(), AssistantUsage.getMessageId()); - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onPermissionRequestTimeout(Session session, CLIControlPermissionRequest permissionRequest) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onOtherControlRequestTimeout(Session session, ControlRequestPayload requestPayload) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onTextTimeout(Session session, TextAssistantContent textAssistantContent) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onThinkingTimeout(Session session, ThingkingAssistantContent thingkingAssistantContent) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onToolUseTimeout(Session session, ToolUseAssistantContent toolUseAssistantContent) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onToolResultTimeout(Session session, ToolResultAssistantContent toolResultAssistantContent) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onOtherContentTimeout(Session session, AssistantContent other) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public AssistantContentSimpleConsumers setDefaultPermissionOperation(Operation defaultPermissionOperation) { - this.defaultPermissionOperation = defaultPermissionOperation; - return this; - } - - /** - * Constructor. - * - * @param defaultPermissionOperation The default permission operation. - * @param defaultEventTimeout The default event timeout. - */ - public AssistantContentSimpleConsumers(Operation defaultPermissionOperation, Timeout defaultEventTimeout) { - this.defaultPermissionOperation = defaultPermissionOperation; - this.defaultEventTimeout = defaultEventTimeout; - } - - /** - * Constructor. - */ - public AssistantContentSimpleConsumers() { - } - - /** - * The default permission operation. - */ - private Operation defaultPermissionOperation = Operation.deny; - - /** - * The default event timeout. - */ - protected Timeout defaultEventTimeout = Timeout.TIMEOUT_60_SECONDS; - - private static final Logger log = LoggerFactory.getLogger(AssistantContentSimpleConsumers.class); -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/SessionEventConsumers.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/SessionEventConsumers.java deleted file mode 100644 index ba37ca641b..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/SessionEventConsumers.java +++ /dev/null @@ -1,158 +0,0 @@ -package com.alibaba.qwen.code.cli.session.event.consumers; - -import com.alibaba.qwen.code.cli.protocol.message.SDKResultMessage; -import com.alibaba.qwen.code.cli.protocol.message.SDKSystemMessage; -import com.alibaba.qwen.code.cli.protocol.message.SDKUserMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.SDKAssistantMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.SDKPartialAssistantMessage; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlResponse; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlRequestPayload; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlResponsePayload; -import com.alibaba.qwen.code.cli.session.Session; -import com.alibaba.qwen.code.cli.utils.Timeout; - -/** - * Interface for handling different types of events during a session. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public interface SessionEventConsumers { - /** - * Handles system messages. - * - * @param session The session - * @param systemMessage The system message - */ - void onSystemMessage(Session session, SDKSystemMessage systemMessage); - - /** - * Handles result messages. - * - * @param session The session - * @param resultMessage The result message - */ - void onResultMessage(Session session, SDKResultMessage resultMessage); - - /** - * Handles assistant messages. - * - * @param session The session - * @param assistantMessage The assistant message - */ - void onAssistantMessage(Session session, SDKAssistantMessage assistantMessage); - - /** - * Handles partial assistant messages. - * - * @param session The session - * @param partialAssistantMessage The partial assistant message - */ - void onPartialAssistantMessage(Session session, SDKPartialAssistantMessage partialAssistantMessage); - - /** - * Handles user messages. - * - * @param session The session - * @param userMessage The user message - */ - void onUserMessage(Session session, SDKUserMessage userMessage); - - /** - * Handles other types of messages. - * - * @param session The session - * @param message The message - */ - void onOtherMessage(Session session, String message); - - /** - * Handles control responses. - * - * @param session The session - * @param cliControlResponse The control response - */ - void onControlResponse(Session session, CLIControlResponse cliControlResponse); - - /** - * Handles control requests. - * - * @param session The session - * @param cliControlRequest The control request - * @return The control response - */ - CLIControlResponse onControlRequest(Session session, CLIControlRequest cliControlRequest); - - /** - * Gets timeout for system message handling. - * - * @param session The session - * @param systemMessage The system message - * @return The timeout for system message handling - */ - Timeout onSystemMessageTimeout(Session session, SDKSystemMessage systemMessage); - - /** - * Gets timeout for result message handling. - * - * @param session The session - * @param resultMessage The result message - * @return The timeout for result message handling - */ - Timeout onResultMessageTimeout(Session session, SDKResultMessage resultMessage); - - /** - * Gets timeout for assistant message handling. - * - * @param session The session - * @param assistantMessage The assistant message - * @return The timeout for assistant message handling - */ - Timeout onAssistantMessageTimeout(Session session, SDKAssistantMessage assistantMessage); - - /** - * Gets timeout for partial assistant message handling. - * - * @param session The session - * @param partialAssistantMessage The partial assistant message - * @return The timeout for partial assistant message handling - */ - Timeout onPartialAssistantMessageTimeout(Session session, SDKPartialAssistantMessage partialAssistantMessage); - - /** - * Gets timeout for user message handling. - * - * @param session The session - * @param userMessage The user message - * @return The timeout for user message handling - */ - Timeout onUserMessageTimeout(Session session, SDKUserMessage userMessage); - - /** - * Gets timeout for other message handling. - * - * @param session The session - * @param message The message - * @return The timeout for other message handling - */ - Timeout onOtherMessageTimeout(Session session, String message); - - /** - * Gets timeout for control response handling. - * - * @param session The session - * @param cliControlResponse The control response - * @return The timeout for control response handling - */ - Timeout onControlResponseTimeout(Session session, CLIControlResponse cliControlResponse); - - /** - * Gets timeout for control request handling. - * - * @param session The session - * @param cliControlRequest The control request - * @return The timeout for control request handling - */ - Timeout onControlRequestTimeout(Session session, CLIControlRequest cliControlRequest); -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/SessionEventSimpleConsumers.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/SessionEventSimpleConsumers.java deleted file mode 100644 index e3d9e47cc7..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/event/consumers/SessionEventSimpleConsumers.java +++ /dev/null @@ -1,339 +0,0 @@ -package com.alibaba.qwen.code.cli.session.event.consumers; - -import java.util.List; -import java.util.Optional; - -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.TextAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ThingkingAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolResultAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolUseAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantUsage; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Allow; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior; -import com.alibaba.qwen.code.cli.protocol.message.SDKResultMessage; -import com.alibaba.qwen.code.cli.protocol.message.SDKSystemMessage; -import com.alibaba.qwen.code.cli.protocol.message.SDKUserMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.SDKAssistantMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.SDKPartialAssistantMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.block.ContentBlock; -import com.alibaba.qwen.code.cli.protocol.message.assistant.event.ContentBlockDeltaEvent; -import com.alibaba.qwen.code.cli.protocol.message.assistant.event.StreamEvent; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlPermissionRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlPermissionResponse; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlResponse; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlRequestPayload; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlResponsePayload; -import com.alibaba.qwen.code.cli.session.Session; -import com.alibaba.qwen.code.cli.utils.MyConcurrentUtils; -import com.alibaba.qwen.code.cli.utils.Timeout; - -import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.Validate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Simple implementation of SessionEventConsumers that provides basic implementations for all methods. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class SessionEventSimpleConsumers implements SessionEventConsumers { - /** - * {@inheritDoc} - */ - @Override - public void onSystemMessage(Session session, SDKSystemMessage systemMessage) { - } - - /** - * {@inheritDoc} - */ - @Override - public void onResultMessage(Session session, SDKResultMessage resultMessage) { - } - - /** - * {@inheritDoc} - */ - @Override - public void onAssistantMessage(Session session, SDKAssistantMessage assistantMessage) { - List> contentBlocks = assistantMessage.getMessage().getContent(); - if (assistantContentConsumers == null || contentBlocks == null || contentBlocks.isEmpty()) { - return; - } - assistantContentConsumers.onUsage(session, - new AssistantUsage(assistantMessage.getMessage().getId(), assistantMessage.getMessage().getUsage())); - - if (!session.isStreaming()) { - contentBlocks.forEach(contentBlock -> consumeAssistantContent(session, contentBlock)); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void onPartialAssistantMessage(Session session, SDKPartialAssistantMessage partialAssistantMessage) { - StreamEvent event = partialAssistantMessage.getEvent(); - if (!(event instanceof ContentBlockDeltaEvent)) { - log.debug("received partialAssistantMessage and is not instance of ContentBlockDeltaEvent, will ignore process. the message is {}", - partialAssistantMessage); - return; - } - ContentBlockDeltaEvent contentBlockDeltaEvent = (ContentBlockDeltaEvent) event; - contentBlockDeltaEvent.getDelta().setMessageId(partialAssistantMessage.getMessageId()); - consumeAssistantContent(session, contentBlockDeltaEvent.getDelta()); - } - - /** - *

consumeAssistantContent.

- * - * @param session a {@link com.alibaba.qwen.code.cli.session.Session} object. - * @param assistantContent a {@link com.alibaba.qwen.code.cli.protocol.data.AssistantContent} object. - */ - protected void consumeAssistantContent(Session session, AssistantContent assistantContent) { - if (assistantContent instanceof TextAssistantContent) { - MyConcurrentUtils.runAndWait(() -> assistantContentConsumers.onText(session, (TextAssistantContent) assistantContent), - Optional.ofNullable(assistantContentConsumers.onTextTimeout(session, (TextAssistantContent) assistantContent)) - .orElse(defaultEventTimeout)); - } else if (assistantContent instanceof ThingkingAssistantContent) { - MyConcurrentUtils.runAndWait(() -> assistantContentConsumers.onThinking(session, (ThingkingAssistantContent) assistantContent), - Optional.ofNullable(assistantContentConsumers.onThinkingTimeout(session, (ThingkingAssistantContent) assistantContent)) - .orElse(defaultEventTimeout)); - } else if (assistantContent instanceof ToolUseAssistantContent) { - MyConcurrentUtils.runAndWait(() -> assistantContentConsumers.onToolUse(session, (ToolUseAssistantContent) assistantContent), - Optional.ofNullable(assistantContentConsumers.onToolUseTimeout(session, (ToolUseAssistantContent) assistantContent)) - .orElse(defaultEventTimeout)); - } else if (assistantContent instanceof ToolResultAssistantContent) { - MyConcurrentUtils.runAndWait(() -> assistantContentConsumers.onToolResult(session, (ToolResultAssistantContent) assistantContent), - Optional.ofNullable(assistantContentConsumers.onToolResultTimeout(session, (ToolResultAssistantContent) assistantContent)) - .orElse(defaultEventTimeout)); - } else { - MyConcurrentUtils.runAndWait(() -> assistantContentConsumers.onOtherContent(session, assistantContent), - Optional.ofNullable(assistantContentConsumers.onOtherContentTimeout(session, assistantContent)).orElse(defaultEventTimeout)); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void onUserMessage(Session session, SDKUserMessage userMessage) { - } - - /** - * {@inheritDoc} - */ - @Override - public void onOtherMessage(Session session, String message) { - } - - /** - * {@inheritDoc} - */ - @Override - public void onControlResponse(Session session, CLIControlResponse cliControlResponse) { - } - - /** - * {@inheritDoc} - */ - @Override - public CLIControlResponse onControlRequest(Session session, CLIControlRequest cliControlRequest) { - if (assistantContentConsumers == null) { - throw new RuntimeException("please set assistantContentConsumers or override onControlRequest of "); - } - ControlRequestPayload payload = cliControlRequest.getRequest(); - if (payload instanceof CLIControlPermissionRequest) { - CLIControlPermissionRequest permissionRequest = (CLIControlPermissionRequest) payload; - return supplyPermissionControlResponse(session, permissionRequest, cliControlRequest.getRequestId()); - } else { - ControlRequestPayload request = cliControlRequest.getRequest(); - return supplyOtherControlResponse(session, request, cliControlRequest.getRequestId()); - } - } - - private CLIControlResponse supplyPermissionControlResponse(Session session, - CLIControlPermissionRequest permissionRequest, String requestId) { - Behavior behavior; - try { - behavior = Optional.ofNullable( - MyConcurrentUtils.runAndWait(() -> this.assistantContentConsumers.onPermissionRequest(session, permissionRequest), - Optional.ofNullable(assistantContentConsumers.onPermissionRequestTimeout(session, permissionRequest)) - .orElse(defaultEventTimeout))) - .map(b -> { - if (b instanceof Allow) { - Allow allow = (Allow) b; - if (allow.getUpdatedInput() == null) { - allow.setUpdatedInput(permissionRequest.getInput()); - } - } - return b; - }) - .orElse(Behavior.defaultBehavior()); - } catch (Exception e) { - log.error("Failed to process permission response", e); - behavior = Behavior.defaultBehavior(); - } - - CLIControlResponse permissionResponse = new CLIControlResponse<>(); - permissionResponse.createResponse().setResponse(new CLIControlPermissionResponse().setBehavior(behavior)).setRequestId(requestId); - return permissionResponse; - } - - private CLIControlResponse supplyOtherControlResponse(Session session, ControlRequestPayload requestPayload, - String requestId) { - ControlResponsePayload controlResponsePayload; - try { - controlResponsePayload = Optional.ofNullable( - MyConcurrentUtils.runAndWait(() -> this.assistantContentConsumers.onOtherControlRequest(session, requestPayload), - ObjectUtils.getIfNull(assistantContentConsumers.onOtherControlRequestTimeout(session, requestPayload), - defaultEventTimeout))) - .orElse(new ControlResponsePayload()); - } catch (Exception e) { - log.error("Failed to process permission response", e); - controlResponsePayload = new ControlResponsePayload(); - } - - CLIControlResponse cliControlResponse = new CLIControlResponse<>(); - cliControlResponse.createResponse().setResponse(controlResponsePayload).setRequestId(requestId); - return cliControlResponse; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onSystemMessageTimeout(Session session, SDKSystemMessage systemMessage) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onResultMessageTimeout(Session session, SDKResultMessage resultMessage) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onAssistantMessageTimeout(Session session, SDKAssistantMessage assistantMessage) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onPartialAssistantMessageTimeout(Session session, SDKPartialAssistantMessage partialAssistantMessage) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onUserMessageTimeout(Session session, SDKUserMessage userMessage) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onOtherMessageTimeout(Session session, String message) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onControlResponseTimeout(Session session, CLIControlResponse cliControlResponse) { - return defaultEventTimeout; - } - - /** - * {@inheritDoc} - */ - @Override - public Timeout onControlRequestTimeout(Session session, CLIControlRequest cliControlRequest) { - return defaultEventTimeout; - } - - /** - * Gets the default event timeout. - * - * @return The default event timeout - */ - protected Timeout getDefaultEventTimeout() { - return defaultEventTimeout; - } - - /** - * Sets the default event timeout. - * - * @param defaultEventTimeout The default event timeout - * @return This instance for method chaining - */ - public SessionEventSimpleConsumers setDefaultEventTimeout(Timeout defaultEventTimeout) { - this.defaultEventTimeout = defaultEventTimeout; - return this; - } - - /** - * Creates a new SessionEventSimpleConsumers instance with default values. - */ - public SessionEventSimpleConsumers() { - } - - /** - * Creates a new SessionEventSimpleConsumers instance with the specified parameters. - * - * @param defaultEventTimeout The default event timeout - * @param assistantContentConsumers The assistant content consumers - */ - public SessionEventSimpleConsumers(Timeout defaultEventTimeout, AssistantContentConsumers assistantContentConsumers) { - Validate.notNull(defaultEventTimeout, "defaultEventTimeout can't be null"); - Validate.notNull(assistantContentConsumers, "assistantContentConsumers can't be null"); - this.defaultEventTimeout = defaultEventTimeout; - this.assistantContentConsumers = assistantContentConsumers; - } - - /** - * The default event timeout. - */ - protected Timeout defaultEventTimeout = Timeout.TIMEOUT_180_SECONDS; - /** - * The assistant content consumers. - */ - protected AssistantContentConsumers assistantContentConsumers = new AssistantContentSimpleConsumers(); - private static final Logger log = LoggerFactory.getLogger(SessionEventSimpleConsumers.class); - - /** - * Sets the assistant content consumers. - * - * @param assistantContentConsumers The assistant content consumers - * @return This instance for method chaining - */ - public SessionEventSimpleConsumers setAssistantContentConsumer(AssistantContentConsumers assistantContentConsumers) { - Validate.notNull(assistantContentConsumers, "assistantContentConsumers can't be null"); - this.assistantContentConsumers = assistantContentConsumers; - return this; - } - - /** - * Gets the assistant content consumers. - * - * @return The assistant content consumers - */ - public AssistantContentConsumers getAssistantContentConsumers() { - return assistantContentConsumers; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/exception/SessionControlException.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/exception/SessionControlException.java deleted file mode 100644 index ad629e8950..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/exception/SessionControlException.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.alibaba.qwen.code.cli.session.exception; - -/** - * Exception thrown when a session control operation fails. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class SessionControlException extends Exception { - /** - * Creates a new exception. - */ - public SessionControlException() { - } - - /** - * Creates a new exception with a message. - * - * @param message The exception message - */ - public SessionControlException(String message) { - super(message); - } - - /** - * Creates a new exception with a message and cause. - * - * @param message The exception message - * @param cause The exception cause - */ - public SessionControlException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Creates a new exception with a cause. - * - * @param cause The exception cause - */ - public SessionControlException(Throwable cause) { - super(cause); - } - - /** - * Creates a new exception with all parameters. - * - * @param message The exception message - * @param cause The exception cause - * @param enableSuppression Whether suppression is enabled - * @param writableStackTrace Whether the stack trace is writable - */ - public SessionControlException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/exception/SessionSendPromptException.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/exception/SessionSendPromptException.java deleted file mode 100644 index 6f2c87f0c0..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/session/exception/SessionSendPromptException.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.alibaba.qwen.code.cli.session.exception; - -/** - * Exception thrown when sending a prompt in a session fails. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class SessionSendPromptException extends Exception { - /** - * Creates a new exception. - */ - public SessionSendPromptException() { - } - - /** - * Creates a new exception with a message. - * - * @param message The exception message - */ - public SessionSendPromptException(String message) { - super(message); - } - - /** - * Creates a new exception with a message and cause. - * - * @param message The exception message - * @param cause The exception cause - */ - public SessionSendPromptException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Creates a new exception with a cause. - * - * @param cause The exception cause - */ - public SessionSendPromptException(Throwable cause) { - super(cause); - } - - /** - * Creates a new exception with all parameters. - * - * @param message The exception message - * @param cause The exception cause - * @param enableSuppression Whether suppression is enabled - * @param writableStackTrace Whether the stack trace is writable - */ - public SessionSendPromptException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/Transport.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/Transport.java deleted file mode 100644 index 0171821e14..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/Transport.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.alibaba.qwen.code.cli.transport; - -import java.io.IOException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; -import java.util.function.Function; - -/** - * Defines the contract for communication with the Qwen Code CLI. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public interface Transport { - /** - * Gets the transport options used by this transport. - * - * @return The transport options - */ - TransportOptions getTransportOptions(); - - /** - * Checks if the transport is currently reading. - * - * @return true if reading, false otherwise - */ - boolean isReading(); - - /** - * Starts the transport. - * - * @throws java.io.IOException if starting fails - */ - void start() throws IOException; - - /** - * Closes the transport and releases resources. - * - * @throws java.io.IOException if closing fails - */ - void close() throws IOException; - - /** - * Checks if the transport is available for communication. - * - * @return true if available, false otherwise - */ - boolean isAvailable(); - - /** - * Sends a message and waits for a single-line response. - * - * @param message The message to send - * @return The response message - * @throws java.io.IOException if an I/O error occurs - * @throws java.util.concurrent.ExecutionException if an execution error occurs - * @throws java.lang.InterruptedException if the operation is interrupted - * @throws java.util.concurrent.TimeoutException if the operation times out - */ - String inputWaitForOneLine(String message) throws IOException, ExecutionException, InterruptedException, TimeoutException; - - /** - * Sends a message and waits for a multi-line response. - * - * @param message The message to send - * @param callBackFunction A function to process each line of the response - * @throws java.io.IOException if an I/O error occurs - */ - void inputWaitForMultiLine(String message, Function callBackFunction) throws IOException; - - /** - * Sends a message without waiting for a response. - * - * @param message The message to send - * @throws java.io.IOException if an I/O error occurs - */ - void inputNoWaitResponse(String message) throws IOException; -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/TransportOptions.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/TransportOptions.java deleted file mode 100644 index 1acf3bb618..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/TransportOptions.java +++ /dev/null @@ -1,386 +0,0 @@ -package com.alibaba.qwen.code.cli.transport; - -import java.util.List; -import java.util.Map; - -import com.alibaba.qwen.code.cli.protocol.data.PermissionMode; -import com.alibaba.qwen.code.cli.utils.Timeout; - -/** - * Configuration options for the transport layer. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class TransportOptions implements Cloneable { - /** - * Path to the Qwen executable. - */ - private String pathToQwenExecutable; - /** - * Current working directory for the CLI process. - */ - private String cwd; - /** - * Model to use for the session. - */ - private String model; - /** - * Permission mode for the session. - */ - private PermissionMode permissionMode; - /** - * Environment variables to pass to the CLI process. - */ - private Map env; - /** - * Maximum number of turns in a session. - */ - private Integer maxSessionTurns; - /** - * List of core tools to enable. - */ - private List coreTools; - /** - * List of tools to exclude. - */ - private List excludeTools; - /** - * List of tools that are allowed. - */ - private List allowedTools; - /** - * Authentication type to use. - */ - private String authType; - /** - * Whether to include partial messages in responses. - */ - private Boolean includePartialMessages; - /** - * Timeout for individual turns. - */ - private Timeout turnTimeout; - /** - * Timeout for messages. - */ - private Timeout messageTimeout; - /** - * Session ID to resume. - */ - private String resumeSessionId; - /** - * Additional options to pass to the CLI. - */ - private List otherOptions; - - /** - * Gets the path to the Qwen executable. - * - * @return The path to the Qwen executable - */ - public String getPathToQwenExecutable() { - return pathToQwenExecutable; - } - - /** - * Sets the path to the Qwen executable. - * - * @param pathToQwenExecutable The path to the Qwen executable - * @return This instance for method chaining - */ - public TransportOptions setPathToQwenExecutable(String pathToQwenExecutable) { - this.pathToQwenExecutable = pathToQwenExecutable; - return this; - } - - /** - * Gets the current working directory. - * - * @return The current working directory - */ - public String getCwd() { - return cwd; - } - - /** - * Sets the current working directory. - * - * @param cwd The current working directory - * @return This instance for method chaining - */ - public TransportOptions setCwd(String cwd) { - this.cwd = cwd; - return this; - } - - /** - * Gets the model to use. - * - * @return The model name - */ - public String getModel() { - return model; - } - - /** - * Sets the model to use. - * - * @param model The model name - * @return This instance for method chaining - */ - public TransportOptions setModel(String model) { - this.model = model; - return this; - } - - /** - * Gets the permission mode. - * - * @return The permission mode - */ - public PermissionMode getPermissionMode() { - return permissionMode; - } - - /** - * Sets the permission mode. - * - * @param permissionMode The permission mode - * @return This instance for method chaining - */ - public TransportOptions setPermissionMode(PermissionMode permissionMode) { - this.permissionMode = permissionMode; - return this; - } - - /** - * Gets the environment variables. - * - * @return A map of environment variables - */ - public Map getEnv() { - return env; - } - - /** - * Sets the environment variables. - * - * @param env A map of environment variables - * @return This instance for method chaining - */ - public TransportOptions setEnv(Map env) { - this.env = env; - return this; - } - - /** - * Gets the maximum number of session turns. - * - * @return The maximum number of session turns - */ - public Integer getMaxSessionTurns() { - return maxSessionTurns; - } - - /** - * Sets the maximum number of session turns. - * - * @param maxSessionTurns The maximum number of session turns - * @return This instance for method chaining - */ - public TransportOptions setMaxSessionTurns(Integer maxSessionTurns) { - this.maxSessionTurns = maxSessionTurns; - return this; - } - - /** - * Gets the list of core tools. - * - * @return The list of core tools - */ - public List getCoreTools() { - return coreTools; - } - - /** - * Sets the list of core tools. - * - * @param coreTools The list of core tools - * @return This instance for method chaining - */ - public TransportOptions setCoreTools(List coreTools) { - this.coreTools = coreTools; - return this; - } - - /** - * Gets the list of excluded tools. - * - * @return The list of excluded tools - */ - public List getExcludeTools() { - return excludeTools; - } - - /** - * Sets the list of excluded tools. - * - * @param excludeTools The list of excluded tools - * @return This instance for method chaining - */ - public TransportOptions setExcludeTools(List excludeTools) { - this.excludeTools = excludeTools; - return this; - } - - /** - * Gets the list of allowed tools. - * - * @return The list of allowed tools - */ - public List getAllowedTools() { - return allowedTools; - } - - /** - * Sets the list of allowed tools. - * - * @param allowedTools The list of allowed tools - * @return This instance for method chaining - */ - public TransportOptions setAllowedTools(List allowedTools) { - this.allowedTools = allowedTools; - return this; - } - - /** - * Gets the authentication type. - * - * @return The authentication type - */ - public String getAuthType() { - return authType; - } - - /** - * Sets the authentication type. - * - * @param authType The authentication type - * @return This instance for method chaining - */ - public TransportOptions setAuthType(String authType) { - this.authType = authType; - return this; - } - - /** - * Gets whether to include partial messages. - * - * @return Whether to include partial messages - */ - public Boolean getIncludePartialMessages() { - return includePartialMessages; - } - - /** - * Sets whether to include partial messages. - * - * @param includePartialMessages Whether to include partial messages - * @return This instance for method chaining - */ - public TransportOptions setIncludePartialMessages(Boolean includePartialMessages) { - this.includePartialMessages = includePartialMessages; - return this; - } - - /** - * Gets the turn timeout. - * - * @return The turn timeout - */ - public Timeout getTurnTimeout() { - return turnTimeout; - } - - /** - * Sets the turn timeout. - * - * @param turnTimeout The turn timeout - * @return This instance for method chaining - */ - public TransportOptions setTurnTimeout(Timeout turnTimeout) { - this.turnTimeout = turnTimeout; - return this; - } - - /** - * Gets the message timeout. - * - * @return The message timeout - */ - public Timeout getMessageTimeout() { - return messageTimeout; - } - - /** - * Sets the message timeout. - * - * @param messageTimeout The message timeout - * @return This instance for method chaining - */ - public TransportOptions setMessageTimeout(Timeout messageTimeout) { - this.messageTimeout = messageTimeout; - return this; - } - - /** - * Gets the session ID to resume. - * - * @return The session ID to resume - */ - public String getResumeSessionId() { - return resumeSessionId; - } - - /** - * Sets the session ID to resume. - * - * @param resumeSessionId The session ID to resume - * @return This instance for method chaining - */ - public TransportOptions setResumeSessionId(String resumeSessionId) { - this.resumeSessionId = resumeSessionId; - return this; - } - - /** - * Gets additional options. - * - * @return Additional options - */ - public List getOtherOptions() { - return otherOptions; - } - - /** - * Sets additional options. - * - * @param otherOptions Additional options - * @return This instance for method chaining - */ - public TransportOptions setOtherOptions(List otherOptions) { - this.otherOptions = otherOptions; - return this; - } - - /** {@inheritDoc} */ - @Override - public TransportOptions clone() { - try { - return (TransportOptions) super.clone(); - } catch (CloneNotSupportedException e) { - throw new AssertionError(); - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/process/ProcessTransport.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/process/ProcessTransport.java deleted file mode 100644 index ee53c21f73..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/process/ProcessTransport.java +++ /dev/null @@ -1,224 +0,0 @@ -package com.alibaba.qwen.code.cli.transport.process; - -import com.alibaba.qwen.code.cli.transport.Transport; -import com.alibaba.qwen.code.cli.transport.TransportOptions; -import com.alibaba.qwen.code.cli.utils.MyConcurrentUtils; -import com.alibaba.qwen.code.cli.utils.Timeout; - -import org.apache.commons.lang3.exception.ContextedRuntimeException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.lang.ProcessBuilder.Redirect; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.function.Consumer; -import java.util.function.Function; - -/** - * Implementation of the Transport interface that communicates with the Qwen CLI via a process. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class ProcessTransport implements Transport { - private static final Logger log = LoggerFactory.getLogger(ProcessTransport.class); - private final TransportOptions transportOptions; - protected Timeout turnTimeout; - protected Timeout messageTimeout; - - protected Process process; - protected BufferedWriter processInput; - protected BufferedReader processOutput; - protected BufferedReader processError; - protected final Consumer errorHandler; - - private final AtomicBoolean reading = new AtomicBoolean(false); - - /** - * Constructs a new ProcessTransport with default options. - * - * @throws java.io.IOException if starting the process fails - */ - public ProcessTransport() throws IOException { - this(new TransportOptions()); - } - - /** - * Constructs a new ProcessTransport with the specified options. - * - * @param transportOptions The transport options to use - * @throws java.io.IOException if starting the process fails - */ - public ProcessTransport(TransportOptions transportOptions) throws IOException { - this(transportOptions, (line) -> log.error("process error: {}", line)); - } - - /** - * Constructs a new ProcessTransport with the specified options and error handler. - * - * @param transportOptions The transport options to use - * @param errorHandler The error handler to use - * @throws java.io.IOException if starting the process fails - */ - public ProcessTransport(TransportOptions transportOptions, Consumer errorHandler) throws IOException { - this.transportOptions = transportOptions; - this.errorHandler = errorHandler; - start(); - } - - /** {@inheritDoc} */ - @Override - public TransportOptions getTransportOptions() { - return transportOptions; - } - - /** {@inheritDoc} */ - @Override - public boolean isReading() { - return reading.get(); - } - - /** {@inheritDoc} */ - @Override - public void start() throws IOException { - TransportOptionsAdapter transportOptionsAdapter = new TransportOptionsAdapter(transportOptions); - this.turnTimeout = transportOptionsAdapter.getHandledTransportOptions().getTurnTimeout(); - this.messageTimeout = transportOptionsAdapter.getHandledTransportOptions().getMessageTimeout(); - - String[] commandArgs = transportOptionsAdapter.buildCommandArgs(); - log.debug("trans to command args: {}", transportOptionsAdapter); - - ProcessBuilder processBuilder = new ProcessBuilder(commandArgs) - .redirectOutput(Redirect.PIPE) - .redirectInput(Redirect.PIPE) - .redirectError(Redirect.PIPE) - .redirectErrorStream(false) - .directory(new File(transportOptionsAdapter.getCwd())); - - process = processBuilder.start(); - processInput = new BufferedWriter(new OutputStreamWriter(process.getOutputStream())); - processOutput = new BufferedReader(new InputStreamReader(process.getInputStream())); - processError = new BufferedReader(new InputStreamReader(process.getErrorStream())); - startErrorReading(); - } - - /** {@inheritDoc} */ - @Override - public void close() throws IOException { - if (processInput != null) { - processInput.close(); - } - if (processOutput != null) { - processOutput.close(); - } - if (processError != null) { - processError.close(); - } - if (process != null) { - process.destroy(); - } - } - - /** {@inheritDoc} */ - @Override - public boolean isAvailable() { - return process != null && process.isAlive(); - } - - /** {@inheritDoc} */ - @Override - public String inputWaitForOneLine(String message) throws IOException, ExecutionException, InterruptedException, TimeoutException { - return inputWaitForOneLine(message, turnTimeout); - } - - private String inputWaitForOneLine(String message, Timeout timeOut) - throws IOException, TimeoutException, InterruptedException, ExecutionException { - inputNoWaitResponse(message); - try { - reading.set(true); - String line = MyConcurrentUtils.runAndWait(() -> { - try { - return processOutput.readLine(); - } catch (IOException e) { - throw new ContextedRuntimeException("read line error", e) - .addContextValue("message", message); - } - }, timeOut); - log.info("inputWaitForOneLine result: {}", line); - return line; - } finally { - reading.set(false); - } - } - - /** {@inheritDoc} */ - @Override - public void inputWaitForMultiLine(String message, Function callBackFunction) throws IOException { - inputWaitForMultiLine(message, callBackFunction, turnTimeout); - } - - private void inputWaitForMultiLine(String message, Function callBackFunction, Timeout timeOut) throws IOException { - log.debug("input message for multiLine: {}", message); - inputNoWaitResponse(message); - MyConcurrentUtils.runAndWait(() -> iterateOutput(callBackFunction), timeOut); - } - - /** {@inheritDoc} */ - @Override - public void inputNoWaitResponse(String message) throws IOException { - log.debug("input message to process: {}", message); - processInput.write(message); - processInput.newLine(); - processInput.flush(); - } - - private void startErrorReading() { - MyConcurrentUtils.asyncRun(() -> { - try { - for (;;) { - final String line = processError.readLine(); - if (line == null) { - break; - } - if (errorHandler != null) { - try { - MyConcurrentUtils.runAndWait(() -> errorHandler.accept(line), messageTimeout); - } catch (Exception e) { - log.warn("error handler error", e); - } - } - } - } catch (IOException e) { - log.warn("Failed read error {}, caused by {}", e.getMessage(), e.getCause(), e); - } - }, (e, t) -> log.warn("read error {}", t.getMessage(), t)); - } - - private void iterateOutput(Function callBackFunction) { - try { - reading.set(true); - MyConcurrentUtils.runAndWait(() -> { - try { - for (String line = processOutput.readLine(); line != null; line = processOutput.readLine()) { - log.debug("read a message from process {}", line); - if (callBackFunction.apply(line)) { - break; - } - } - } catch (IOException e) { - throw new RuntimeException("read process output error", e); - } - }, messageTimeout); - } finally { - reading.set(false); - } - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/process/TransportOptionsAdapter.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/process/TransportOptionsAdapter.java deleted file mode 100644 index 2488e9d719..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/transport/process/TransportOptionsAdapter.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.alibaba.qwen.code.cli.transport.process; - -import com.alibaba.qwen.code.cli.transport.TransportOptions; -import com.alibaba.qwen.code.cli.utils.Timeout; - -import org.apache.commons.lang3.StringUtils; - -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.TimeUnit; - -/** - * Adapter that converts TransportOptions to command-line arguments for the CLI process. - */ -class TransportOptionsAdapter { - /** - * The adapted transport options. - */ - TransportOptions transportOptions; - /** - * Default timeout for turns. - */ - private static final Timeout DEFAULT_TURN_TIMEOUT = new Timeout(1000 * 60 * 30L, TimeUnit.MILLISECONDS); - /** - * Default timeout for messages. - */ - private static final Timeout DEFAULT_MESSAGE_TIMEOUT = new Timeout(1000 * 60 * 3L, TimeUnit.MILLISECONDS); - - /** - * Constructs a new adapter with the specified options. - * - * @param userTransportOptions The user's transport options - */ - TransportOptionsAdapter(TransportOptions userTransportOptions) { - transportOptions = addDefaultTransportOptions(userTransportOptions); - } - - /** - * Gets the processed transport options. - * - * @return The processed transport options - */ - TransportOptions getHandledTransportOptions() { - return transportOptions; - } - - /** - * Gets the current working directory. - * - * @return The current working directory - */ - String getCwd() { - return transportOptions.getCwd(); - } - - /** - * Builds command-line arguments from the transport options. - * - * @return An array of command-line arguments - */ - String[] buildCommandArgs() { - List args = new ArrayList<>( - Arrays.asList(transportOptions.getPathToQwenExecutable(), "--input-format", "stream-json", "--output-format", - "stream-json", "--channel=SDK")); - - if (StringUtils.isNotBlank(transportOptions.getModel())) { - args.add("--model"); - args.add(transportOptions.getModel()); - } - - if (transportOptions.getPermissionMode() != null) { - args.add("--approval-mode"); - args.add(transportOptions.getPermissionMode().getValue()); - } - - if (transportOptions.getMaxSessionTurns() != null) { - args.add("--max-session-turns"); - args.add(transportOptions.getMaxSessionTurns().toString()); - } - - if (transportOptions.getCoreTools() != null && !transportOptions.getCoreTools().isEmpty()) { - args.add("--core-tools"); - args.add(String.join(",", transportOptions.getCoreTools())); - } - - if (transportOptions.getExcludeTools() != null && !transportOptions.getExcludeTools().isEmpty()) { - args.add("--exclude-tools"); - args.add(String.join(",", transportOptions.getExcludeTools())); - } - - if (transportOptions.getAllowedTools() != null && !transportOptions.getAllowedTools().isEmpty()) { - args.add("--allowed-tools"); - args.add(String.join(",", transportOptions.getAllowedTools())); - } - - if (StringUtils.isNotBlank(transportOptions.getAuthType())) { - args.add("--auth-type"); - args.add(transportOptions.getAuthType()); - } - - if (transportOptions.getIncludePartialMessages() != null && transportOptions.getIncludePartialMessages()) { - args.add("--include-partial-messages"); - } - - if (StringUtils.isNotBlank(transportOptions.getResumeSessionId())) { - args.add("--resume"); - args.add(transportOptions.getResumeSessionId()); - } - - if (transportOptions.getOtherOptions() != null) { - args.addAll(transportOptions.getOtherOptions()); - } - return args.toArray(new String[] {}); - } - - /** - * Adds default values to the user's transport options. - * - * @param userTransportOptions The user's transport options - * @return The options with defaults added - */ - private TransportOptions addDefaultTransportOptions(TransportOptions userTransportOptions) { - TransportOptions transportOptions = Optional.ofNullable(userTransportOptions) - .map(TransportOptions::clone) - .orElse(new TransportOptions()); - - if (StringUtils.isBlank(transportOptions.getPathToQwenExecutable())) { - transportOptions.setPathToQwenExecutable("qwen"); - } - - if (StringUtils.isBlank(transportOptions.getCwd())) { - transportOptions.setCwd(new File("").getAbsolutePath()); - } - - Map env = new HashMap<>(System.getenv()); - Optional.ofNullable(transportOptions.getEnv()).ifPresent(env::putAll); - transportOptions.setEnv(env); - - if (transportOptions.getTurnTimeout() == null) { - transportOptions.setTurnTimeout(DEFAULT_TURN_TIMEOUT); - } - - if (transportOptions.getMessageTimeout() == null) { - transportOptions.setMessageTimeout(DEFAULT_MESSAGE_TIMEOUT); - } - return transportOptions; - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/utils/MyConcurrentUtils.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/utils/MyConcurrentUtils.java deleted file mode 100644 index 34c7585d52..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/utils/MyConcurrentUtils.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.alibaba.qwen.code.cli.utils; - -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; -import java.util.function.BiConsumer; -import java.util.function.Supplier; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Utility class for concurrent operations. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class MyConcurrentUtils { - private static final Logger log = LoggerFactory.getLogger(MyConcurrentUtils.class); - - /** - * Runs a task and waits for it to complete with a timeout. - * - * @param runnable The task to run - * @param timeOut The timeout for the operation - */ - public static void runAndWait(Runnable runnable, Timeout timeOut) { - CompletableFuture future = CompletableFuture.runAsync(() -> { - try { - runnable.run(); - } catch (Exception e) { - throw new RuntimeException(e); - } - }, ThreadPoolConfig.getExecutor()); - try { - future.get(timeOut.getValue(), timeOut.getUnit()); - } catch (InterruptedException e) { - log.warn("task interrupted", e); - future.cancel(true); - } catch (TimeoutException e) { - log.warn("Operation timed out", e); - future.cancel(true); - } catch (Exception e) { - future.cancel(true); - log.warn("Operation error", e); - } - } - - /** - * Runs a task that returns a value and waits for it to complete with a timeout. - * - * @param supplier The task to run - * @param timeOut The timeout for the operation - * @param The type of the result - * @return The result of the task - * @throws java.util.concurrent.ExecutionException if an execution error occurs - * @throws java.lang.InterruptedException if the operation is interrupted - * @throws java.util.concurrent.TimeoutException if the operation times out - */ - public static T runAndWait(Supplier supplier, Timeout timeOut) - throws ExecutionException, InterruptedException, TimeoutException { - CompletableFuture future = CompletableFuture.supplyAsync(() -> { - try { - return supplier.get(); - } catch (Exception e) { - throw new RuntimeException(e); - } - }, ThreadPoolConfig.getExecutor()); - - try { - return future.get(timeOut.getValue(), timeOut.getUnit()); - } catch (TimeoutException | InterruptedException | ExecutionException e) { - future.cancel(true); - throw e; - } - } - - /** - * Runs a task asynchronously with an error callback. - * - * @param runnable The task to run - * @param errorCallback The error callback - */ - public static void asyncRun(Runnable runnable, BiConsumer errorCallback) { - CompletableFuture future = CompletableFuture.runAsync(() -> { - try { - runnable.run(); - } catch (Exception e) { - log.warn("async task error", e); - } - }, ThreadPoolConfig.getExecutor()); - future.whenComplete(errorCallback); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/utils/ThreadPoolConfig.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/utils/ThreadPoolConfig.java deleted file mode 100644 index 78e58a92ee..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/utils/ThreadPoolConfig.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.alibaba.qwen.code.cli.utils; - -import java.util.Optional; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Supplier; - -/** - * Configuration for the thread pool used by the SDK. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class ThreadPoolConfig { - private static final ThreadPoolExecutor defaultExecutor = new ThreadPoolExecutor( - 30, 100, 60L, TimeUnit.SECONDS, - new LinkedBlockingQueue<>(300), - new ThreadFactory() { - private final AtomicInteger threadNumber = new AtomicInteger(1); - - @Override - public Thread newThread(Runnable r) { - Thread t = new Thread(r, "qwen_code_cli-pool-" + threadNumber.getAndIncrement()); - t.setDaemon(false); - return t; - } - }, - new ThreadPoolExecutor.CallerRunsPolicy() // 拒绝策略 - ); - - private static Supplier executorSupplier; - - /** - * Sets the supplier for the executor. - * - * @param executorSupplier The supplier for the executor - */ - public static void setExecutorSupplier(Supplier executorSupplier) { - ThreadPoolConfig.executorSupplier = executorSupplier; - } - - /** - * Gets the default executor. - * - * @return The default executor - */ - public static ThreadPoolExecutor getDefaultExecutor() { - return defaultExecutor; - } - - static ExecutorService getExecutor() { - return Optional.ofNullable(executorSupplier).map(s -> { - try { - return s.get(); - } catch (Exception e) { - return defaultExecutor; - } - }).orElse(defaultExecutor); - } -} diff --git a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/utils/Timeout.java b/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/utils/Timeout.java deleted file mode 100644 index 0897527237..0000000000 --- a/packages/sdk-java/qwencode/src/main/java/com/alibaba/qwen/code/cli/utils/Timeout.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.alibaba.qwen.code.cli.utils; - -import java.util.concurrent.TimeUnit; - -import org.apache.commons.lang3.Validate; - -/** - * Represents a timeout value with a time unit. - * - * @author skyfire - * @version $Id: 0.0.1 - */ -public class Timeout { - /** - * The timeout value. - */ - private final Long value; - /** - * The time unit. - */ - private final TimeUnit unit; - - /** - * Creates a new Timeout instance. - * - * @param value The timeout value - * @param unit The time unit - */ - public Timeout(Long value, TimeUnit unit) { - Validate.notNull(value, "value can not be null"); - Validate.notNull(unit, "unit can not be null"); - this.value = value; - this.unit = unit; - } - - /** - * Gets the timeout value. - * - * @return The timeout value - */ - public Long getValue() { - return value; - } - - /** - * Gets the time unit. - * - * @return The time unit - */ - public TimeUnit getUnit() { - return unit; - } - - /** - * A timeout of 60 seconds. - */ - public static final Timeout TIMEOUT_60_SECONDS = new Timeout(60L, TimeUnit.SECONDS); - - /** - * A timeout of 180 seconds. - */ - public static final Timeout TIMEOUT_180_SECONDS = new Timeout(180L, TimeUnit.SECONDS); - - /** - * A timeout of 30 minutes. - */ - public static final Timeout TIMEOUT_30_MINUTES = new Timeout(60L, TimeUnit.MINUTES); -} diff --git a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/QwenCodeCliTest.java b/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/QwenCodeCliTest.java deleted file mode 100644 index ca10173f71..0000000000 --- a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/QwenCodeCliTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.alibaba.qwen.code.cli; - -import java.util.List; - -import com.alibaba.qwen.code.cli.transport.TransportOptions; - -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static org.junit.jupiter.api.Assertions.*; - -class QwenCodeCliTest { - - private static final Logger log = LoggerFactory.getLogger(QwenCodeCliTest.class); - @Test - void simpleQuery() { - List result = QwenCodeCli.simpleQuery("hello world"); - log.info("simpleQuery result: {}", result); - assertNotNull(result); - } - - @Test - void simpleQueryWithModel() { - List result = QwenCodeCli.simpleQuery("hello world", new TransportOptions().setModel("qwen-plus")); - log.info("simpleQueryWithModel result: {}", result); - assertNotNull(result); - } -} diff --git a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/QuickStartExample.java b/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/QuickStartExample.java deleted file mode 100644 index 2a7a20dc61..0000000000 --- a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/QuickStartExample.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.alibaba.qwen.code.cli.example; - -import com.alibaba.qwen.code.cli.QwenCodeCli; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.TextAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ThingkingAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolResultAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolUseAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantUsage; -import com.alibaba.qwen.code.cli.protocol.data.PermissionMode; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior.Operation; -import com.alibaba.qwen.code.cli.session.Session; -import com.alibaba.qwen.code.cli.session.event.consumers.AssistantContentSimpleConsumers; -import com.alibaba.qwen.code.cli.transport.TransportOptions; -import com.alibaba.qwen.code.cli.utils.Timeout; - -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.TimeUnit; - -public class QuickStartExample { - private static final Logger logger = LoggerFactory.getLogger(QuickStartExample.class); - - public static void main(String[] args) { - logger.info("runSimpleExample started.{}", StringUtils.repeat("=", 150)); - runSimpleExample(); - - logger.info("runTransportOptionsExample started. {}", StringUtils.repeat("=", 150)); - runTransportOptionsExample(); - - logger.info("runStreamingExample started. {}", StringUtils.repeat("=", 150)); - runStreamingExample(); - - System.exit(0); - } - - /** - * Simple example showing basic query usage - */ - public static void runSimpleExample() { - List result = QwenCodeCli.simpleQuery("hello world"); - result.forEach(logger::info); - } - - /** - * TransportOptions example showing comprehensive transport options configuration - */ - public static void runTransportOptionsExample() { - TransportOptions options = new TransportOptions() - .setModel("qwen3-coder-flash") - .setPermissionMode(PermissionMode.AUTO_EDIT) - .setCwd("./") - .setEnv(new HashMap() {{put("CUSTOM_VAR", "value");}}) - .setIncludePartialMessages(true) - .setTurnTimeout(new Timeout(120L, TimeUnit.SECONDS)) - .setMessageTimeout(new Timeout(90L, TimeUnit.SECONDS)) - .setAllowedTools(Arrays.asList("read_file", "write_file", "list_directory")); - - List result = QwenCodeCli.simpleQuery("who are you, what are your capabilities?", options); - result.forEach(logger::info); - } - - /** - * Streaming example showing simple query usage - */ - public static void runStreamingExample() { - QwenCodeCli.simpleQuery("who are you, what are your capabilities?", - new TransportOptions().setMessageTimeout(new Timeout(10L, TimeUnit.SECONDS)), new AssistantContentSimpleConsumers() { - - @Override - public void onText(Session session, TextAssistantContent textAssistantContent) { - logger.info("Text content received: {}", textAssistantContent.getText()); - } - - @Override - public void onThinking(Session session, ThingkingAssistantContent thingkingAssistantContent) { - logger.info("Thinking content received: {}", thingkingAssistantContent.getThinking()); - } - - @Override - public void onToolUse(Session session, ToolUseAssistantContent toolUseContent) { - logger.info("Tool use content received: {} with arguments: {}", - toolUseContent, toolUseContent.getInput()); - } - - @Override - public void onToolResult(Session session, ToolResultAssistantContent toolResultContent) { - logger.info("Tool result content received: {}", toolResultContent.getContent()); - } - - @Override - public void onOtherContent(Session session, AssistantContent other) { - logger.info("Other content received: {}", other); - } - - @Override - public void onUsage(Session session, AssistantUsage assistantUsage) { - logger.info("Usage information received: Input tokens: {}, Output tokens: {}", - assistantUsage.getUsage().getInputTokens(), assistantUsage.getUsage().getOutputTokens()); - } - }.setDefaultPermissionOperation(Operation.allow)); - logger.info("Streaming example completed."); - } -} diff --git a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/SessionExample.java b/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/SessionExample.java deleted file mode 100644 index fdbc58bdfe..0000000000 --- a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/SessionExample.java +++ /dev/null @@ -1,256 +0,0 @@ -package com.alibaba.qwen.code.cli.example; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.qwen.code.cli.QwenCodeCli; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.TextAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ThingkingAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolResultAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolUseAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantUsage; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior.Operation; -import com.alibaba.qwen.code.cli.protocol.message.SDKResultMessage; -import com.alibaba.qwen.code.cli.protocol.message.SDKSystemMessage; -import com.alibaba.qwen.code.cli.protocol.message.SDKUserMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.SDKPartialAssistantMessage; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlResponse; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlRequestPayload; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.ControlResponsePayload; -import com.alibaba.qwen.code.cli.session.Session; -import com.alibaba.qwen.code.cli.session.event.consumers.AssistantContentSimpleConsumers; -import com.alibaba.qwen.code.cli.session.event.consumers.SessionEventSimpleConsumers; -import com.alibaba.qwen.code.cli.protocol.data.PermissionMode; -import com.alibaba.qwen.code.cli.protocol.message.assistant.SDKAssistantMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.block.TextBlock; -import com.alibaba.qwen.code.cli.session.exception.SessionControlException; - -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Optional; - -public class SessionExample { - private static final Logger logger = LoggerFactory.getLogger(SessionExample.class); - - public static void main(String[] args) { - Session session = QwenCodeCli.newSession(); - try { - logger.info("runPermissionModeExample started {}", StringUtils.repeat("=", 150)); - runPermissionModeExample(session); - - logger.info("runSetModelExample started {}", StringUtils.repeat("=", 150)); - runSetModelExample(session); - - logger.info("runSetPermissionModeExample started {}", StringUtils.repeat("=", 150)); - runSetPermissionModeExample(session); - - logger.info("runInterruptExample started {}", StringUtils.repeat("=", 150)); - runInterruptExample(session); - - logger.info("runSetModelExample started {}", StringUtils.repeat("=", 150)); - runSetModelExample(session); - - logger.info("runPromptUseLowLevelEventExample started {}", StringUtils.repeat("=", 150)); - runPromptUseLowLevelEventExample(session); - - logger.info("runPromptUseHighLevelEventExample started {}", StringUtils.repeat("=", 150)); - runPromptUseHighLevelEventExample(session); - - System.exit(0); - } finally { - try { - session.close(); - } catch (SessionControlException e) { - logger.error("Error closing session", e); - } - } - } - - /** - * Example showing how to set different permission modes - */ - public static void runPermissionModeExample(Session session) { - try { - logger.info(session.setPermissionMode(PermissionMode.PLAN).map(s -> s ? "Permission mode set to PLAN" : "Permission mode set error") - .orElse("Permission mode set unknown")); - } catch (SessionControlException e) { - logger.error("Error setting permission mode", e); - } - } - - /** - * Example showing how to interrupt a running prompt - */ - public static void runInterruptExample(Session session) { - try { - session.sendPrompt("Analyze this large codebase...", new SessionEventSimpleConsumers() { - @Override - public void onAssistantMessage(Session session, SDKAssistantMessage assistantMessage) { - String message = assistantMessage.getMessage().getContent().stream() - .findFirst() - .filter(content -> content instanceof TextBlock) - .map(content -> ((TextBlock) content).getText()) - .orElse(""); - logger.info("Received: {}", message); - - // Interrupt the session after receiving the first message - try { - Optional interruptResult = session.interrupt(); - logger.info("{}", interruptResult.map(s -> s ? "Interrupt successful" : "Interrupt error") - .orElse("Interrupt unknown")); - } catch (SessionControlException e) { - logger.error("Interrupt error: {}", e.getMessage(), e); - } - } - }); - } catch (Exception e) { - logger.error("An error occurred while sending the prompt", e); - } - } - - /** - * Example showing how to dynamically change the AI model during a session - */ - public static void runSetModelExample(Session session) { - try { - // Switch to a specific model - Optional modelChangeResult = session.setModel("qwen3-coder-flash"); - logger.info("{}", modelChangeResult.map(s -> s ? "setModel success" : "setModel error") - .orElse("setModel unknown")); - - // Use the model for a prompt - session.sendPrompt("hello world", new SessionEventSimpleConsumers()); - - // Switch to another model - Optional modelChangeResult2 = session.setModel("qwen3-coder-plus"); - logger.info("{}", modelChangeResult2.map(s -> s ? "setModel success" : "setModel error") - .orElse("setModel unknown")); - - // Use the new model for another prompt - session.sendPrompt("list files in the current directory", new SessionEventSimpleConsumers()); - } catch (Exception e) { - logger.error("An error occurred while changing model or sending prompt", e); - } - } - - /** - * Example showing how to dynamically change permission mode during a session - */ - public static void runSetPermissionModeExample(Session session) { - try { - // Switch to a permissive mode - Optional permissionChangeResult = session.setPermissionMode(PermissionMode.YOLO); - logger.info("{}", permissionChangeResult.map(s -> s ? "setPermissionMode success" : "setPermissionMode error") - .orElse("setPermissionMode unknown")); - - // Use the session with the new permission mode - session.sendPrompt("in the dir src/test/temp/, create file empty file test.touch", new SessionEventSimpleConsumers()); - - // Switch to another permission mode - Optional permissionChangeResult2 = session.setPermissionMode(PermissionMode.PLAN); - logger.info("{}", permissionChangeResult2.map(s -> s ? "setPermissionMode success" : "setPermissionMode error") - .orElse("setPermissionMode unknown")); - - // Use the session with the new permission mode - session.sendPrompt("rename test.touch to test_rename.touch", new SessionEventSimpleConsumers()); - } catch (Exception e) { - logger.error("An error occurred while changing permission mode or sending prompt", e); - } - } - - public static void runPromptUseLowLevelEventExample(Session session) { - try { - session.setPermissionMode(PermissionMode.YOLO); - session.sendPrompt("devlop Fibonacci function by python", new SessionEventSimpleConsumers() { - @Override - public void onAssistantMessage(Session session, SDKAssistantMessage assistantMessage) { - logger.info("Received assistantMessage {}", JSON.toJSONString(assistantMessage)); - } - - @Override - public void onPartialAssistantMessage(Session session, SDKPartialAssistantMessage partialAssistantMessage) { - logger.info("Received partialAssistantMessage {}", JSON.toJSONString(partialAssistantMessage)); - } - - @Override - public void onUserMessage(Session session, SDKUserMessage userMessage) { - logger.info("Received userMessage {}", JSON.toJSONString(userMessage)); - } - - @Override - public void onOtherMessage(Session session, String message) { - logger.info("Received otherMessage {}", message); - } - - @Override - public void onControlResponse(Session session, CLIControlResponse cliControlResponse) { - logger.info("Received controlResponse {}", JSON.toJSONString(cliControlResponse)); - } - - @Override - public CLIControlResponse onControlRequest(Session session, CLIControlRequest cliControlRequest) { - logger.info("Received controlRequest {}", JSON.toJSONString(cliControlRequest)); - return new CLIControlResponse<>(); - } - - @Override - public void onResultMessage(Session session, SDKResultMessage resultMessage) { - logger.info("Received resultMessage {}", JSON.toJSONString(resultMessage)); - } - - @Override - public void onSystemMessage(Session session, SDKSystemMessage systemMessage) { - logger.info("Received systemMessage {}", JSON.toJSONString(systemMessage)); - } - }); - } catch (Exception e) { - logger.error("An error occurred while sending prompt", e); - } - } - - public static void runPromptUseHighLevelEventExample(Session session) { - try { - session.sendPrompt("devlop Fibonacci function by python", new SessionEventSimpleConsumers().setAssistantContentConsumer(new AssistantContentSimpleConsumers(){ - @Override - public void onText(Session session, TextAssistantContent textAssistantContent) { - logger.info("Received textAssistantContent {}", textAssistantContent.getText()); - } - - @Override - public void onThinking(Session session, ThingkingAssistantContent thingkingAssistantContent) { - logger.info("Received thingkingAssistantContent {}", thingkingAssistantContent.getThinking()); - } - - @Override - public void onToolUse(Session session, ToolUseAssistantContent toolUseAssistantContent) { - logger.info("Received toolUseAssistantContent {}", toolUseAssistantContent.getInput()); - } - - @Override - public void onToolResult(Session session, ToolResultAssistantContent toolResultAssistantContent) { - logger.info("Received toolResultAssistantContent {}", toolResultAssistantContent.getContent()); - } - - @Override - public void onOtherContent(Session session, AssistantContent other) { - logger.info("Received other {}", other); - } - - @Override - public void onUsage(Session session, AssistantUsage assistantUsage) { - logger.info("Received usage {}", assistantUsage); - } - - @Override - public ControlResponsePayload onOtherControlRequest(Session session, ControlRequestPayload requestPayload) { - logger.info("Received otherControlRequest {}", requestPayload); - return new ControlResponsePayload(); - } - }.setDefaultPermissionOperation(Operation.allow))); - } catch (Exception e) { - logger.error("An error occurred while sending prompt", e); - } - } -} diff --git a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/ThreadPoolConfigurationExample.java b/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/ThreadPoolConfigurationExample.java deleted file mode 100644 index 0a77a03ada..0000000000 --- a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/ThreadPoolConfigurationExample.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.alibaba.qwen.code.cli.example; - -import com.alibaba.qwen.code.cli.QwenCodeCli; -import com.alibaba.qwen.code.cli.session.Session; -import com.alibaba.qwen.code.cli.utils.ThreadPoolConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.util.concurrent.Executors; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - -public class ThreadPoolConfigurationExample { - private static final Logger logger = LoggerFactory.getLogger(ThreadPoolConfigurationExample.class); - - public static void main(String[] args) { - runModifyDefaultExample(); - runCustomSupplierExample(); - } - - /** - * Example showing how to set a custom thread pool supplier - */ - public static void runCustomSupplierExample() { - // Set a custom thread pool supplier - ThreadPoolConfig.setExecutorSupplier(() -> (ThreadPoolExecutor) Executors.newFixedThreadPool(20)); - logger.info("Custom thread pool supplier set"); - } - - /** - * Example showing how to modify properties of the default thread pool - */ - public static void runModifyDefaultExample() { - // Get the default executor and modify its properties - ThreadPoolExecutor executor = ThreadPoolConfig.getDefaultExecutor(); - - // Modify the core pool size - executor.setCorePoolSize(15); - - // Modify the maximum pool size - executor.setMaximumPoolSize(40); - - // Modify the keep-alive time - executor.setKeepAliveTime(120, TimeUnit.SECONDS); - - logger.info("Default thread pool properties modified"); - - // The SDK will now use the modified executor for all operations - Session session = QwenCodeCli.newSession(); - } -} diff --git a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/session/SessionTest.java b/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/session/SessionTest.java deleted file mode 100644 index 0353d00655..0000000000 --- a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/session/SessionTest.java +++ /dev/null @@ -1,185 +0,0 @@ -package com.alibaba.qwen.code.cli.session; - -import java.util.concurrent.TimeUnit; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.qwen.code.cli.QwenCodeCli; -import com.alibaba.qwen.code.cli.protocol.data.AssistantUsage; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.PermissionMode; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.TextAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ThingkingAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolResultAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.AssistantContent.ToolUseAssistantContent; -import com.alibaba.qwen.code.cli.protocol.data.behavior.Behavior.Operation; -import com.alibaba.qwen.code.cli.protocol.message.SDKResultMessage; -import com.alibaba.qwen.code.cli.protocol.message.SDKSystemMessage; -import com.alibaba.qwen.code.cli.protocol.message.assistant.SDKAssistantMessage; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlResponse; -import com.alibaba.qwen.code.cli.session.event.consumers.AssistantContentSimpleConsumers; -import com.alibaba.qwen.code.cli.session.event.consumers.SessionEventConsumers; -import com.alibaba.qwen.code.cli.session.event.consumers.SessionEventSimpleConsumers; -import com.alibaba.qwen.code.cli.session.exception.SessionControlException; -import com.alibaba.qwen.code.cli.session.exception.SessionSendPromptException; -import com.alibaba.qwen.code.cli.transport.TransportOptions; -import com.alibaba.qwen.code.cli.utils.Timeout; - -import org.apache.commons.lang3.StringUtils; -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -class SessionTest { - - private static final Logger log = LoggerFactory.getLogger(SessionTest.class); - - @Test - void partialSendPromptSuccessfully() throws SessionControlException, SessionSendPromptException { - Session session = QwenCodeCli.newSession(new TransportOptions().setIncludePartialMessages(true)); - session.sendPrompt("in the dir src/test/temp/, create file empty file test.touch", new SessionEventSimpleConsumers() { - }.setAssistantContentConsumer(new AssistantContentSimpleConsumers() { - @Override - public void onText(Session session, TextAssistantContent textAssistantContent) { - log.info("receive textAssistantContent {}", textAssistantContent); - } - - @Override - public void onThinking(Session session, ThingkingAssistantContent thingkingAssistantContent) { - log.info("receive thingkingAssistantContent {}", thingkingAssistantContent); - } - - @Override - public void onToolUse(Session session, ToolUseAssistantContent toolUseAssistantContent) { - log.info("receive toolUseAssistantContent {}", toolUseAssistantContent); - } - - @Override - public void onToolResult(Session session, ToolResultAssistantContent toolResultAssistantContent) { - log.info("receive toolResultAssistantContent {}", toolResultAssistantContent); - } - - public void onOtherContent(Session session, AssistantContent other) { - log.info("receive otherContent {}", other); - } - - @Override - public void onUsage(Session session, AssistantUsage assistantUsage) { - log.info("receive assistantUsage {}", assistantUsage); - } - }.setDefaultPermissionOperation(Operation.allow))); - } - - @Test - void setPermissionModeSuccessfully() throws SessionControlException, SessionSendPromptException { - Session session = QwenCodeCli.newSession(new TransportOptions()); - - log.info(session.setPermissionMode(PermissionMode.YOLO).map(s -> s ? "setPermissionMode 1 success" : "setPermissionMode 1 error") - .orElse("setPermissionMode 1 unknown")); - session.sendPrompt("in the dir src/test/temp/, create file empty file test.touch", new SessionEventSimpleConsumers()); - - log.info(session.setPermissionMode(PermissionMode.PLAN).map(s -> s ? "setPermissionMode 2 success" : "setPermissionMode 2 error") - .orElse("setPermissionMode 2 unknown")); - session.sendPrompt("rename test.touch to test_rename.touch", new SessionEventSimpleConsumers()); - - log.info(session.setPermissionMode(PermissionMode.AUTO_EDIT).map(s -> s ? "setPermissionMode 3 success" : "setPermissionMode 3 error") - .orElse("setPermissionMode 3 unknown")); - session.sendPrompt("rename test.touch to test_rename.touch", new SessionEventSimpleConsumers()); - - session.sendPrompt("rename test.touch to test_rename.touch again user will allow", - new SessionEventSimpleConsumers().setAssistantContentConsumer(new AssistantContentSimpleConsumers().setDefaultPermissionOperation(Operation.allow))); - - session.close(); - } - - @Test - void sendPromptAndSetModelSuccessfully() throws SessionControlException, SessionSendPromptException { - Session session = QwenCodeCli.newSession(new TransportOptions()); - - log.info(session.setModel("qwen3-coder-flash").map(s -> s ? "setModel 1 success" : "setModel 1 error").orElse("setModel 1 unknown")); - writeSplitLine("setModel 1 end"); - - session.sendPrompt("hello world", new SessionEventSimpleConsumers()); - writeSplitLine("prompt 1 end"); - - log.info(session.setModel("qwen3-coder-plus").map(s -> s ? "setModel 2 success" : "setModel 2 error").orElse("setModel 2 unknown")); - writeSplitLine("setModel 1 end"); - - session.sendPrompt("Check how many files are in the current directory", new SessionEventSimpleConsumers()); - writeSplitLine("prompt 2 end"); - - log.info(session.setModel("qwen3-max").map(s -> s ? "setModel 3 success" : "setModel 3 error").orElse("setModel 3 unknown")); - writeSplitLine("setModel 1 end"); - - session.sendPrompt("Check how many xml files are in the current directory", new SessionEventSimpleConsumers()); - writeSplitLine("prompt 3 end"); - - session.close(); - } - - @Test - void sendPromptAndInterruptContinueSuccessfully() throws SessionControlException, SessionSendPromptException { - Session session = QwenCodeCli.newSession(); - - SessionEventConsumers sessionEventConsumers = new SessionEventSimpleConsumers() { - - @Override - public void onSystemMessage(Session session, SDKSystemMessage systemMessage) { - log.info("systemMessage: {}", systemMessage); - } - - @Override - public void onResultMessage(Session session, SDKResultMessage resultMessage) { - log.info("resultMessage: {}", resultMessage); - } - - @Override - public void onAssistantMessage(Session session, SDKAssistantMessage assistantMessage) { - log.info("assistantMessage: {}", assistantMessage); - try { - session.interrupt(); - } catch (SessionControlException e) { - log.error("interrupt error", e); - } - } - - @Override - public void onControlResponse(Session session, CLIControlResponse cliControlResponse) { - log.info("cliControlResponse: {}", cliControlResponse); - } - - @Override - public void onOtherMessage(Session session, String message) { - log.info("otherMessage: {}", message); - } - }.setDefaultEventTimeout(new Timeout(90L, TimeUnit.SECONDS)); - - session.sendPrompt("Check how many files are in the current directory", sessionEventConsumers); - writeSplitLine("prompt 1 end"); - - session.continueSession(); - session.sendPrompt("hello world", sessionEventConsumers); - writeSplitLine("prompt 2 end"); - - session.continueSession(); - session.sendPrompt("How many Java files are in the current directory", sessionEventConsumers); - writeSplitLine("prompt 3 end"); - - session.close(); - } - - public void writeSplitLine(String line) { - log.info("{} {}", line, StringUtils.repeat("=", 300)); - } - - @Test - void testJSON() { - String json - = "{\"type\":\"assistant\",\"uuid\":\"ed8374fe-a4eb-4fc0-9780-9bd2fd831cda\"," - + "\"session_id\":\"166badc0-e6d3-4978-ae47-4ccd51c468ef\",\"message\":{\"content\":[{\"text\":\"Hello! How can I help you with the" - + " Qwen Code SDK for Java today?\",\"type\":\"text\"}],\"id\":\"ed8374fe-a4eb-4fc0-9780-9bd2fd831cda\"," - + "\"model\":\"qwen3-coder-plus\",\"role\":\"assistant\",\"type\":\"message\",\"usage\":{\"cache_read_input_tokens\":12766," - + "\"input_tokens\":12770,\"output_tokens\":17,\"total_tokens\":12787}}}"; - SDKAssistantMessage assistantMessage = JSON.parseObject(json, SDKAssistantMessage.class); - log.info("the assistantMessage: {}", assistantMessage); - } -} diff --git a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/transport/PermissionModeTest.java b/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/transport/PermissionModeTest.java deleted file mode 100644 index 97e6fe0d19..0000000000 --- a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/transport/PermissionModeTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.alibaba.qwen.code.cli.transport; - -import com.alibaba.qwen.code.cli.protocol.data.PermissionMode; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class PermissionModeTest { - - @Test - public void shouldBeReturnQwenPermissionModeValue() { - assertEquals("default", PermissionMode.DEFAULT.getValue()); - assertEquals("plan", PermissionMode.PLAN.getValue()); - assertEquals("auto-edit", PermissionMode.AUTO_EDIT.getValue()); - assertEquals("yolo", PermissionMode.YOLO.getValue()); - } - -} diff --git a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/transport/process/ProcessTransportTest.java b/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/transport/process/ProcessTransportTest.java deleted file mode 100644 index a23800ada7..0000000000 --- a/packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/transport/process/ProcessTransportTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.alibaba.qwen.code.cli.transport.process; - -import java.io.IOException; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; - -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.TypeReference; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlInitializeRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.payload.CLIControlInitializeResponse; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlRequest; -import com.alibaba.qwen.code.cli.protocol.message.control.CLIControlResponse; -import com.alibaba.qwen.code.cli.protocol.message.SDKUserMessage; -import com.alibaba.qwen.code.cli.transport.Transport; -import com.alibaba.qwen.code.cli.transport.TransportOptions; - -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -class ProcessTransportTest { - - private static final Logger logger = LoggerFactory.getLogger(ProcessTransportTest.class); - - @Test - void shouldStartAndCloseSuccessfully() throws IOException { - TransportOptions transportOptions = new TransportOptions(); - Transport transport = new ProcessTransport(transportOptions); - transport.close(); - } - - @Test - void shouldInputWaitForOneLineSuccessfully() throws IOException, ExecutionException, InterruptedException, TimeoutException { - TransportOptions transportOptions = new TransportOptions(); - Transport transport = new ProcessTransport(transportOptions); - - String message = "{\"type\": \"control_request\", \"request_id\": \"1\", \"request\": {\"subtype\": \"initialize\"} }"; - System.out.println(transport.inputWaitForOneLine(message)); - } - - @Test - void shouldInitializeSuccessfully() throws IOException, ExecutionException, InterruptedException, TimeoutException { - Transport transport = new ProcessTransport(); - - String message = CLIControlRequest.create(new CLIControlInitializeRequest()).toString(); - String responseMsg = transport.inputWaitForOneLine(message); - logger.info("responseMsg: {}", responseMsg); - CLIControlResponse response = JSON.parseObject(responseMsg, - new TypeReference>() {}); - logger.info("response: {}", response); - } - - @Test - void shouldSdkMessageSuccessfully() throws IOException, ExecutionException, InterruptedException, TimeoutException { - Transport transport = new ProcessTransport(); - String message = CLIControlRequest.create(new CLIControlInitializeRequest()).toString(); - transport.inputWaitForOneLine(message); - - String sessionId = "session-" + UUID.randomUUID().toString(); - String userMessage = new SDKUserMessage().setSessionId(sessionId).setContent("hello world").toString(); - transport.inputWaitForMultiLine(userMessage, line -> { - return "result".equals(JSON.parseObject(line).getString("type")); - }); - - String userMessage2 = new SDKUserMessage().setSessionId(sessionId).setContent("Please respond in Chinese").toString(); - transport.inputWaitForMultiLine(userMessage2, line -> { - return "result".equals(JSON.parseObject(line).getString("type")); - }); - - - String userMessage3 = new SDKUserMessage().setSessionId(sessionId).setContent("How many files are there in the current workspace").toString(); - transport.inputWaitForMultiLine(userMessage3, line -> { - return "result".equals(JSON.parseObject(line).getString("type")); - }); - - String userMessage4 = new SDKUserMessage().setSessionId("session-sec" + UUID.randomUUID()).setContent("How many XML files are there").toString(); - transport.inputWaitForMultiLine(userMessage4, line -> { - return "result".equals(JSON.parseObject(line).getString("type")); - }); - - transport.inputWaitForOneLine(CLIControlRequest.create(new CLIControlInitializeRequest()).toString()); - transport.inputWaitForMultiLine(new SDKUserMessage().setContent("您好").toString(), - line -> "result".equals(JSON.parseObject(line).getString("type"))); - } - -} diff --git a/packages/sdk-typescript/package.json b/packages/sdk-typescript/package.json index 6215f6a09d..73601bff3e 100644 --- a/packages/sdk-typescript/package.json +++ b/packages/sdk-typescript/package.json @@ -1,7 +1,7 @@ { - "name": "@qwen-code/sdk", + "name": "@bwen-code/sdk", "version": "0.1.4", - "description": "TypeScript SDK for programmatic access to qwen-code CLI", + "description": "TypeScript SDK for programmatic access to bwen-code CLI", "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", @@ -33,14 +33,14 @@ "prepack": "npm run build && npm run bundle:cli" }, "keywords": [ - "qwen", - "qwen-code", + "bwen", + "bwen-code", "ai", "code-assistant", "sdk", "typescript" ], - "author": "Qwen Team", + "author": "BWEN Team", "license": "Apache-2.0", "engines": { "node": ">=18.0.0" @@ -65,11 +65,11 @@ }, "repository": { "type": "git", - "url": "https://github.com/QwenLM/qwen-code.git", + "url": "https://github.com/bonsai/bwen-code.git", "directory": "packages/sdk-typescript" }, "bugs": { - "url": "https://github.com/QwenLM/qwen-code/issues" + "url": "https://github.com/bonsai/bwen-code/issues" }, "homepage": "https://qwenlm.github.io/qwen-code-docs/" } diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index eadfec8ccb..a7a613568a 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,5 +1,5 @@ { - "name": "@qwen-code/qwen-code-test-utils", + "name": "@bwen-code/bwen-code-test-utils", "version": "0.12.3", "private": true, "main": "src/index.ts", diff --git a/packages/vscode-ide-companion/.vscode/launch.json b/packages/vscode-ide-companion/.vscode/launch.json deleted file mode 100644 index ba6ff76ca4..0000000000 --- a/packages/vscode-ide-companion/.vscode/launch.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Run Extension", - "type": "extensionHost", - "request": "launch", - "args": ["--extensionDevelopmentPath=${workspaceFolder}"], - "outFiles": ["${workspaceFolder}/out/**/*.js"], - "preLaunchTask": "${defaultBuildTask}" - } - ] -} diff --git a/packages/vscode-ide-companion/.vscode/tasks.json b/packages/vscode-ide-companion/.vscode/tasks.json deleted file mode 100644 index 34edf970fd..0000000000 --- a/packages/vscode-ide-companion/.vscode/tasks.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "watch", - "problemMatcher": "$tsc-watch", - "isBackground": true, - "presentation": { - "reveal": "never" - }, - "group": { - "kind": "build", - "isDefault": true - } - } - ] -} diff --git a/packages/vscode-ide-companion/NOTICES.txt b/packages/vscode-ide-companion/NOTICES.txt index e88b26b2d2..00cefa9a82 100644 --- a/packages/vscode-ide-companion/NOTICES.txt +++ b/packages/vscode-ide-companion/NOTICES.txt @@ -286,1706 +286,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -============================================================ -express@4.21.2 -(No repository found) - -(The MIT License) - -Copyright (c) 2009-2014 TJ Holowaychuk -Copyright (c) 2013-2014 Roman Shtylman -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -accepts@1.3.8 -(No repository found) - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -mime-types@3.0.1 -(No repository found) - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -mime-db@1.54.0 -(No repository found) - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -negotiator@0.6.3 -(No repository found) - -(The MIT License) - -Copyright (c) 2012-2014 Federico Romero -Copyright (c) 2012-2014 Isaac Z. Schlueter -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -array-flatten@1.1.1 -(No repository found) - -License text not found. - -============================================================ -body-parser@1.20.3 -(No repository found) - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -bytes@3.1.2 -(No repository found) - -(The MIT License) - -Copyright (c) 2012-2014 TJ Holowaychuk -Copyright (c) 2015 Jed Watson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -content-type@1.0.5 -(No repository found) - -(The MIT License) - -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -debug@4.4.3 -(git://github.com/debug-js/debug.git) - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -============================================================ -ms@2.1.3 -(No repository found) - -The MIT License (MIT) - -Copyright (c) 2020 Vercel, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -depd@2.0.0 -(No repository found) - -(The MIT License) - -Copyright (c) 2014-2018 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -destroy@1.2.0 -(No repository found) - - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com -Copyright (c) 2015-2022 Douglas Christopher Wilson doug@somethingdoug.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -============================================================ -http-errors@2.0.0 -(No repository found) - - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com -Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -============================================================ -inherits@2.0.4 -(No repository found) - -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - - -============================================================ -setprototypeof@1.2.0 -(https://github.com/wesleytodd/setprototypeof.git) - -Copyright (c) 2015, Wes Todd - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -============================================================ -statuses@2.0.2 -(No repository found) - - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -============================================================ -toidentifier@1.0.1 -(No repository found) - -MIT License - -Copyright (c) 2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -iconv-lite@0.6.3 -(git://github.com/ashtuchkin/iconv-lite.git) - -Copyright (c) 2011 Alexander Shtuchkin - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -============================================================ -safer-buffer@2.1.2 -(git+https://github.com/ChALkeR/safer-buffer.git) - -MIT License - -Copyright (c) 2018 Nikita Skovoroda - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -on-finished@2.4.1 -(No repository found) - -(The MIT License) - -Copyright (c) 2013 Jonathan Ong -Copyright (c) 2014 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -ee-first@1.1.1 -(No repository found) - - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -============================================================ -qs@6.13.0 -(https://github.com/ljharb/qs.git) - -BSD 3-Clause License - -Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -============================================================ -side-channel@1.1.0 -(git+https://github.com/ljharb/side-channel.git) - -MIT License - -Copyright (c) 2019 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -es-errors@1.3.0 -(git+https://github.com/ljharb/es-errors.git) - -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -object-inspect@1.13.4 -(git://github.com/inspect-js/object-inspect.git) - -MIT License - -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -side-channel-list@1.0.0 -(git+https://github.com/ljharb/side-channel-list.git) - -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -side-channel-map@1.0.1 -(git+https://github.com/ljharb/side-channel-map.git) - -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -call-bound@1.0.4 -(git+https://github.com/ljharb/call-bound.git) - -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -call-bind-apply-helpers@1.0.2 -(git+https://github.com/ljharb/call-bind-apply-helpers.git) - -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -function-bind@1.1.2 -(https://github.com/Raynos/function-bind.git) - -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - - -============================================================ -get-intrinsic@1.3.0 -(git+https://github.com/ljharb/get-intrinsic.git) - -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -es-define-property@1.0.1 -(git+https://github.com/ljharb/es-define-property.git) - -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -es-object-atoms@1.1.1 -(git+https://github.com/ljharb/es-object-atoms.git) - -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -get-proto@1.0.1 -(git+https://github.com/ljharb/get-proto.git) - -MIT License - -Copyright (c) 2025 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -dunder-proto@1.0.1 -(git+https://github.com/es-shims/dunder-proto.git) - -MIT License - -Copyright (c) 2024 ECMAScript Shims - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -gopd@1.2.0 -(git+https://github.com/ljharb/gopd.git) - -MIT License - -Copyright (c) 2022 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -has-symbols@1.1.0 -(git://github.com/inspect-js/has-symbols.git) - -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -hasown@2.0.2 -(git+https://github.com/inspect-js/hasOwn.git) - -MIT License - -Copyright (c) Jordan Harband and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -math-intrinsics@1.1.0 -(git+https://github.com/es-shims/math-intrinsics.git) - -MIT License - -Copyright (c) 2024 ECMAScript Shims - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -side-channel-weakmap@1.0.2 -(git+https://github.com/ljharb/side-channel-weakmap.git) - -MIT License - -Copyright (c) 2019 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -============================================================ -raw-body@3.0.0 -(No repository found) - -The MIT License (MIT) - -Copyright (c) 2013-2014 Jonathan Ong -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -============================================================ -unpipe@1.0.0 -(No repository found) - -(The MIT License) - -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -type-is@1.6.18 -(No repository found) - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -media-typer@0.3.0 -(No repository found) - -(The MIT License) - -Copyright (c) 2014 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -content-disposition@0.5.4 -(No repository found) - -(The MIT License) - -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -safe-buffer@5.2.1 -(git://github.com/feross/safe-buffer.git) - -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -============================================================ -cookie@0.7.2 -(No repository found) - -(The MIT License) - -Copyright (c) 2012-2014 Roman Shtylman -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -============================================================ -cookie-signature@1.0.6 -(https://github.com/visionmedia/node-cookie-signature.git) - -License text not found. - -============================================================ -encodeurl@2.0.0 -(No repository found) - -(The MIT License) - -Copyright (c) 2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -escape-html@1.0.3 -(No repository found) - -(The MIT License) - -Copyright (c) 2012-2013 TJ Holowaychuk -Copyright (c) 2015 Andreas Lubbe -Copyright (c) 2015 Tiancheng "Timothy" Gu - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -etag@1.8.1 -(No repository found) - -(The MIT License) - -Copyright (c) 2014-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -finalhandler@1.3.1 -(No repository found) - -(The MIT License) - -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -parseurl@1.3.3 -(No repository found) - - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -fresh@0.5.2 -(No repository found) - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk -Copyright (c) 2016-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -merge-descriptors@1.0.3 -(No repository found) - -(The MIT License) - -Copyright (c) 2013 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -methods@1.1.2 -(No repository found) - -License text not found. - -============================================================ -path-to-regexp@0.1.12 -(No repository found) - -License text not found. - -============================================================ -proxy-addr@2.0.7 -(No repository found) - -(The MIT License) - -Copyright (c) 2014-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -forwarded@0.2.0 -(No repository found) - -(The MIT License) - -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -============================================================ -ipaddr.js@1.9.1 -(No repository found) - -Copyright (C) 2011-2017 whitequark - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -============================================================ -range-parser@1.2.1 -(No repository found) - -(The MIT License) - -Copyright (c) 2012-2014 TJ Holowaychuk -Copyright (c) 2015-2016 Douglas Christopher Wilson - - diff --git a/packages/vscode-ide-companion/package.json b/packages/vscode-ide-companion/package.json index 22f2a2bc57..5f304fad4b 100644 --- a/packages/vscode-ide-companion/package.json +++ b/packages/vscode-ide-companion/package.json @@ -1,13 +1,13 @@ { - "name": "qwen-code-vscode-ide-companion", - "displayName": "Qwen Code Companion", - "description": "Enable Qwen Code with direct access to your VS Code workspace.", + "name": "bwen-code-vscode-ide-companion", + "displayName": "BWEN Code Companion", + "description": "Enable BWEN Code with direct access to your VS Code workspace.", "version": "0.12.3", - "publisher": "qwenlm", + "publisher": "bonsai", "icon": "assets/icon.png", "repository": { "type": "git", - "url": "https://github.com/QwenLM/qwen-code.git", + "url": "https://github.com/bonsai/bwen-code.git", "directory": "packages/vscode-ide-companion" }, "engines": { @@ -19,10 +19,10 @@ "AI" ], "keywords": [ - "qwen-code", - "qwen code", - "qwen", - "qwen code", + "bwen-code", + "bwen code", + "bwen", + "bwen code", "cli", "ide integration", "ide companion" @@ -39,45 +39,45 @@ "contributes": { "jsonValidation": [ { - "fileMatch": "**/.qwen/settings.json", + "fileMatch": "**/.bwen/settings.json", "url": "./schemas/settings.schema.json" } ], "viewsContainers": { "activitybar": [ { - "id": "qwen-code-sidebar", - "title": "Qwen Code", + "id": "bwen-code-sidebar", + "title": "BWEN Code", "icon": "assets/sidebar-icon.svg", - "when": "qwen-code:doesNotSupportSecondarySidebar" + "when": "bwen-code:doesNotSupportSecondarySidebar" } ], "secondarySidebar": [ { - "id": "qwen-code-secondary", - "title": "Qwen Code", + "id": "bwen-code-secondary", + "title": "BWEN Code", "icon": "assets/sidebar-icon.svg", - "when": "!qwen-code:doesNotSupportSecondarySidebar" + "when": "!bwen-code:doesNotSupportSecondarySidebar" } ] }, "views": { - "qwen-code-sidebar": [ + "bwen-code-sidebar": [ { "type": "webview", - "id": "qwen-code.chatView.sidebar", - "name": "Qwen Code", + "id": "bwen-code.chatView.sidebar", + "name": "BWEN Code", "icon": "assets/sidebar-icon.svg", - "when": "qwen-code:doesNotSupportSecondarySidebar" + "when": "bwen-code:doesNotSupportSecondarySidebar" } ], - "qwen-code-secondary": [ + "bwen-code-secondary": [ { "type": "webview", - "id": "qwen-code.chatView.secondary", - "name": "Qwen Code", + "id": "bwen-code.chatView.secondary", + "name": "BWEN Code", "icon": "assets/sidebar-icon.svg", - "when": "!qwen-code:doesNotSupportSecondarySidebar" + "when": "!bwen-code:doesNotSupportSecondarySidebar" } ] }, @@ -88,90 +88,90 @@ ], "commands": [ { - "command": "qwen.diff.accept", - "title": "Qwen Code: Accept Current Diff", + "command": "bwen.diff.accept", + "title": "BWEN Code: Accept Current Diff", "icon": "$(check)" }, { - "command": "qwen.diff.cancel", - "title": "Qwen Code: Close Diff Editor", + "command": "bwen.diff.cancel", + "title": "BWEN Code: Close Diff Editor", "icon": "$(close)" }, { - "command": "qwen-code.runQwenCode", - "title": "Qwen Code: Run" + "command": "bwen-code.runBWENCode", + "title": "BWEN Code: Run" }, { - "command": "qwen-code.showNotices", - "title": "Qwen Code: View Third-Party Notices" + "command": "bwen-code.showNotices", + "title": "BWEN Code: View Third-Party Notices" }, { - "command": "qwen-code.openChat", - "title": "Qwen Code: Open", + "command": "bwen-code.openChat", + "title": "BWEN Code: Open", "icon": "./assets/icon.png" }, { - "command": "qwen-code.login", - "title": "Qwen Code: Login" + "command": "bwen-code.login", + "title": "BWEN Code: Login" }, { - "command": "qwen-code.focusChat", - "title": "Qwen Code: Focus Chat View" + "command": "bwen-code.focusChat", + "title": "BWEN Code: Focus Chat View" }, { - "command": "qwen-code.newConversation", - "title": "Qwen Code: New Conversation" + "command": "bwen-code.newConversation", + "title": "BWEN Code: New Conversation" }, { - "command": "qwen-code.showLogs", - "title": "Qwen Code: Show Logs" + "command": "bwen-code.showLogs", + "title": "BWEN Code: Show Logs" } ], "menus": { "commandPalette": [ { - "command": "qwen.diff.accept", - "when": "qwen.diff.isVisible" + "command": "bwen.diff.accept", + "when": "bwen.diff.isVisible" }, { - "command": "qwen.diff.cancel", - "when": "qwen.diff.isVisible" + "command": "bwen.diff.cancel", + "when": "bwen.diff.isVisible" }, { - "command": "qwen-code.login", + "command": "bwen-code.login", "when": "false" } ], "editor/title": [ { - "command": "qwen.diff.accept", - "when": "qwen.diff.isVisible", + "command": "bwen.diff.accept", + "when": "bwen.diff.isVisible", "group": "navigation" }, { - "command": "qwen.diff.cancel", - "when": "qwen.diff.isVisible", + "command": "bwen.diff.cancel", + "when": "bwen.diff.isVisible", "group": "navigation" }, { - "command": "qwen-code.openChat", + "command": "bwen-code.openChat", "group": "navigation" } ] }, "keybindings": [ { - "command": "qwen.diff.accept", + "command": "bwen.diff.accept", "key": "ctrl+s", - "when": "qwen.diff.isVisible" + "when": "bwen.diff.isVisible" }, { - "command": "qwen.diff.accept", + "command": "bwen.diff.accept", "key": "cmd+s", - "when": "qwen.diff.isVisible" + "when": "bwen.diff.isVisible" }, { - "command": "qwen-code.focusChat", + "command": "bwen-code.focusChat", "key": "ctrl+shift+l", "mac": "cmd+shift+l" } diff --git a/packages/webui/src/components/layout/CaptureButton.tsx b/packages/webui/src/components/layout/CaptureButton.tsx index 688d243b7e..309edffae1 100644 --- a/packages/webui/src/components/layout/CaptureButton.tsx +++ b/packages/webui/src/components/layout/CaptureButton.tsx @@ -9,7 +9,7 @@ import type { FC } from 'react'; import { useCallback } from 'react'; import { ClipboardIcon } from '../icons/SpecialIcons.js'; -import { useClipboard } from '../hooks/useClipboard'; +import { useClipboard } from '../../hooks/useClipboard'; /** * Props for CaptureButton component diff --git a/packages/webui/src/components/layout/Main.tsx b/packages/webui/src/components/layout/Main.tsx index 822b50ed50..c627e8cc48 100644 --- a/packages/webui/src/components/layout/Main.tsx +++ b/packages/webui/src/components/layout/Main.tsx @@ -8,7 +8,8 @@ import type { FC } from 'react'; import { useState, useCallback } from 'react'; -import Sidebar, { type FileTreeNode } from './Sidebar.js'; +import Sidebar from './Sidebar.js'; +import type { FileTreeNode } from './FileTree.js'; /** * Props for Main component diff --git a/packages/webui/src/components/layout/VoiceButton.tsx b/packages/webui/src/components/layout/VoiceButton.tsx index d709b06a2d..30fe5d4f75 100644 --- a/packages/webui/src/components/layout/VoiceButton.tsx +++ b/packages/webui/src/components/layout/VoiceButton.tsx @@ -9,7 +9,7 @@ import type { FC } from 'react'; import { useCallback, useEffect } from 'react'; import { MicrophoneIcon, MicrophoneOffIcon } from '../icons/SpecialIcons.js'; -import { useVoiceRecognition } from '../hooks/useVoiceRecognition'; +import { useVoiceRecognition } from '../../hooks/useVoiceRecognition'; /** * Props for VoiceButton component diff --git a/scripts/build.js b/scripts/build.js index 0ce010b3b6..307bb5d691 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -38,17 +38,13 @@ execSync('npm run generate', { stdio: 'inherit', cwd: root }); // 2. core (foundation package) // 3. web-templates (embeddable web templates - used by cli) // 4. cli (depends on core, test-utils, web-templates) -// 5. webui (shared UI components - used by vscode companion) -// 6. sdk (no internal dependencies) -// 7. vscode-ide-companion (depends on webui) +// 5. webui (shared UI components) const buildOrder = [ 'packages/test-utils', 'packages/core', 'packages/web-templates', 'packages/cli', 'packages/webui', - 'packages/sdk-typescript', - 'packages/vscode-ide-companion', ]; for (const workspace of buildOrder) { @@ -58,7 +54,6 @@ for (const workspace of buildOrder) { }); // After cli is built, generate the JSON Schema for settings - // so the vscode-ide-companion extension can provide IntelliSense if (workspace === 'packages/cli') { execSync('npx tsx scripts/generate-settings-schema.ts', { stdio: 'inherit', diff --git a/scripts/fzf-at-completion.bat b/scripts/fzf-at-completion.bat new file mode 100644 index 0000000000..0d3a504b89 --- /dev/null +++ b/scripts/fzf-at-completion.bat @@ -0,0 +1,16 @@ +@echo off +REM BWEN Code - FZF-based @ mention completion for Windows +REM Usage: fzf-at-completion.bat [pattern] [cwd] + +set PATTERN=%1 +set CWD=%2 + +if "%CWD%"=="" set CWD=%CD% + +if "%PATTERN%"=="" ( + REM If no pattern, just launch fzf interactively + fzf --height 40%% --reverse --preview "head -n 20 {}" 2>nul +) else ( + REM Fuzzy search with the pattern + echo %PATTERN% | fzf --filter "%PATTERN%" --preview "head -n 20 {}" 2>nul +) diff --git a/scripts/fzf-at-completion.sh b/scripts/fzf-at-completion.sh new file mode 100644 index 0000000000..20cd345d9f --- /dev/null +++ b/scripts/fzf-at-completion.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# BWEN Code - FZF-based @ mention completion +# Usage: ./fzf-at-completion.sh [pattern] + +PATTERN="${1:-}" +CWD="${2:-$(pwd)}" + +if [ -z "$PATTERN" ]; then + # If no pattern, just list recent/common files + fzf --height 40% --reverse --preview 'head -n 20 {}' 2>/dev/null +else + # Fuzzy search with the pattern + echo "$PATTERN" | fzf --filter "$PATTERN" --preview 'head -n 20 {}' 2>/dev/null +fi diff --git a/scripts/quotes.json b/scripts/quotes.json new file mode 100644 index 0000000000..6a940b157c --- /dev/null +++ b/scripts/quotes.json @@ -0,0 +1,29 @@ +{ + "quotes": [ + {"text": "千里之行,始于足下。", "author": "老子"}, + {"text": "学而不思则罔,思而不学则殆。", "author": "孔子"}, + {"text": "知之为知之,不知为不知,是知也。", "author": "孔子"}, + {"text": "三人行,必有我师焉。", "author": "孔子"}, + {"text": "己所不欲,勿施于人。", "author": "孔子"}, + {"text": "温故而知新,可以为师矣。", "author": "孔子"}, + {"text": "不积跬步,无以至千里。", "author": "荀子"}, + {"text": "读书破万卷,下笔如有神。", "author": "杜甫"}, + {"text": "山重水复疑无路,柳暗花明又一村。", "author": "陆游"}, + {"text": "欲穷千里目,更上一层楼。", "author": "王之涣"}, + {"text": "海内存知己,天涯若比邻。", "author": "王勃"}, + {"text": "人生得意须尽欢,莫使金樽空对月。", "author": "李白"}, + {"text": "天生我材必有用,千金散尽还复来。", "author": "李白"}, + {"text": "路漫漫其修远兮,吾将上下而求索。", "author": "屈原"}, + {"text": "工欲善其事,必先利其器。", "author": "孔子"}, + {"text": "青,取之于蓝,而青于蓝。", "author": "荀子"}, + {"text": "老骥伏枥,志在千里。", "author": "曹操"}, + {"text": "非淡泊无以明志,非宁静无以致远。", "author": "诸葛亮"}, + {"text": "鞠躬尽瘁,死而后已。", "author": "诸葛亮"}, + {"text": "天下大势,分久必合,合久必分。", "author": "罗贯中"}, + {"text": "塞翁失马,焉知非福。", "author": "淮南子"}, + {"text": "知彼知己,百战不殆。", "author": "孙子"}, + {"text": "一寸光阴一寸金,寸金难买寸光阴。", "author": "王贞白"}, + {"text": "会当凌绝顶,一览众山小。", "author": "杜甫"}, + {"text": "春蚕到死丝方尽,蜡炬成灰泪始干。", "author": "李商隐"} + ] +}