@lore-co/cli 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -2
- package/dist/api.d.ts +8 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +52 -0
- package/dist/api.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +67 -4
- package/dist/cli.js.map +1 -1
- package/dist/devin-client.d.ts +1 -1
- package/dist/generated-assets.d.ts +4 -4
- package/dist/generated-assets.js +4 -4
- package/dist/generated-assets.js.map +1 -1
- package/dist/guard.d.ts +3 -0
- package/dist/guard.d.ts.map +1 -0
- package/dist/guard.js +170 -0
- package/dist/guard.js.map +1 -0
- package/dist/handoff.d.ts +4 -0
- package/dist/handoff.d.ts.map +1 -0
- package/dist/handoff.js +227 -0
- package/dist/handoff.js.map +1 -0
- package/dist/live.d.ts +28 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +597 -0
- package/dist/live.js.map +1 -0
- package/dist/machine.d.ts +19 -0
- package/dist/machine.d.ts.map +1 -0
- package/dist/machine.js +102 -0
- package/dist/machine.js.map +1 -0
- package/dist/pty.d.ts +22 -0
- package/dist/pty.d.ts.map +1 -0
- package/dist/pty.js +148 -0
- package/dist/pty.js.map +1 -0
- package/dist/runtime.d.ts +37 -3
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +364 -8
- package/dist/runtime.js.map +1 -1
- package/dist/self-host.d.ts +1 -1
- package/dist/self-host.js +2 -2
- package/dist/update.js +5 -5
- package/dist/update.js.map +1 -1
- package/package.json +7 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const GITHUB_TEMPLATE_ASSETS: {
|
|
2
|
-
readonly "lore-codex-review.yml": "name: Lore Codex review\nrun-name: \"Lore Codex review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:codex-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
3
|
-
readonly "lore-devin-review.yml": "name: Lore Devin review\nrun-name: \"Lore Devin review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\nconcurrency:\n group: lore-devin-review-${{ github.repository }}-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:devin-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
4
|
-
readonly "lore-observe-correction.yml": "name: Lore review correction\nrun-name: \"Lore review correction comment #${{ github.event.comment.id }}\"\n\non:\n issue_comment:\n types: [created]\n\njobs:\n observe:\n if: >-\n github.event.issue.pull_request &&\n startsWith(github.event.comment.body, '/lore correct ')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n issues: read\n pull-requests: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
2
|
+
readonly "lore-codex-review.yml": "name: Lore Codex review\nrun-name: \"Lore Codex review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:codex-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.16' }}\n outputs:\n final-message: ${{ steps.codex.outputs.final-message }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Prepare Lore review context\n env:\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github prepare-review\n --provider codex\n --event \"$GITHUB_EVENT_PATH\"\n --checkout \"$GITHUB_WORKSPACE/review\"\n --prompt-out \"$GITHUB_WORKSPACE/.lore/codex-prompt.md\"\n --metadata-out \"$GITHUB_WORKSPACE/.lore/codex-metadata.json\"\n --schema-out \"$GITHUB_WORKSPACE/.lore/review-output.schema.json\"\n\n - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: lore-codex-metadata\n path: .lore/codex-metadata.json\n retention-days: 1\n\n - name: Run Codex\n id: codex\n uses: openai/codex-action@52fe01ec70a42f454c9d2ebd47598f9fd6893d56 # v1.11\n with:\n openai-api-key: ${{ secrets.OPENAI_API_KEY }}\n prompt-file: .lore/codex-prompt.md\n output-schema-file: .lore/review-output.schema.json\n working-directory: review\n permission-profile: \":read-only\"\n safety-strategy: drop-sudo\n\n post:\n needs: review\n if: needs.review.outputs.final-message != ''\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.16' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0\n with:\n name: lore-codex-metadata\n path: .lore\n\n - name: Save review output\n env:\n CODEX_REVIEW: ${{ needs.review.outputs.final-message }}\n run: |\n mkdir -p .lore\n printf '%s' \"$CODEX_REVIEW\" > .lore/codex-output.json\n\n - name: Post or update Lore review\n env:\n GH_TOKEN: ${{ github.token }}\n run: >-\n lore github post-review\n --metadata .lore/codex-metadata.json\n --output .lore/codex-output.json\n";
|
|
3
|
+
readonly "lore-devin-review.yml": "name: Lore Devin review\nrun-name: \"Lore Devin review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\nconcurrency:\n group: lore-devin-review-${{ github.repository }}-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:devin-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.16' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Prepare Lore review context\n env:\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github prepare-review\n --provider devin\n --event \"$GITHUB_EVENT_PATH\"\n --checkout \"$GITHUB_WORKSPACE/review\"\n --prompt-out \"$GITHUB_WORKSPACE/.lore/devin-prompt.md\"\n --metadata-out \"$GITHUB_WORKSPACE/.lore/devin-metadata.json\"\n\n - name: Run Lore-enriched Devin review\n env:\n DEVIN_API_KEY: ${{ secrets.DEVIN_API_KEY }}\n DEVIN_ORG_ID: ${{ vars.DEVIN_ORG_ID }}\n run: >-\n lore devin run-review\n --prompt .lore/devin-prompt.md\n --metadata .lore/devin-metadata.json\n --output .lore/devin-output.json\n\n - name: Post or update Lore review\n env:\n GH_TOKEN: ${{ github.token }}\n run: >-\n lore github post-review\n --metadata .lore/devin-metadata.json\n --output .lore/devin-output.json\n\n - name: Clean up Devin session\n if: always()\n continue-on-error: true\n env:\n DEVIN_API_KEY: ${{ secrets.DEVIN_API_KEY }}\n DEVIN_ORG_ID: ${{ vars.DEVIN_ORG_ID }}\n run: |\n SESSION_ID=\"$(jq -r '.sessionId // empty' .lore/devin-metadata.json 2>/dev/null || true)\"\n if [ -n \"$SESSION_ID\" ]; then\n lore devin terminate --session \"$SESSION_ID\"\n fi\n";
|
|
4
|
+
readonly "lore-observe-correction.yml": "name: Lore review correction\nrun-name: \"Lore review correction comment #${{ github.event.comment.id }}\"\n\non:\n issue_comment:\n types: [created]\n\njobs:\n observe:\n if: >-\n github.event.issue.pull_request &&\n startsWith(github.event.comment.body, '/lore correct ')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n issues: read\n pull-requests: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.16' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Teach Lore from an authorized correction\n env:\n GH_TOKEN: ${{ github.token }}\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github observe-correction\n --event \"$GITHUB_EVENT_PATH\"\n";
|
|
5
5
|
readonly "review-output.schema.json": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"summary\", \"findings\"],\n \"properties\": {\n \"summary\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"findings\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"severity\", \"title\", \"body\", \"path\", \"line\"],\n \"properties\": {\n \"severity\": {\n \"enum\": [\"critical\", \"high\", \"medium\", \"low\"]\n },\n \"title\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"body\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"path\": {\n \"type\": [\"string\", \"null\"],\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"line\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 1\n }\n }\n }\n }\n }\n}\n";
|
|
6
6
|
};
|
|
7
|
-
export declare const SELF_HOST_COMPOSE_ASSET = "name: lore\n\nx-api-image: &api-image \"${LORE_API_IMAGE:-ghcr.io/treadiehq/lore-api}:${LORE_IMAGE_TAG:-0.1.
|
|
7
|
+
export declare const SELF_HOST_COMPOSE_ASSET = "name: lore\n\nx-api-image: &api-image \"${LORE_API_IMAGE:-ghcr.io/treadiehq/lore-api}:${LORE_IMAGE_TAG:-0.1.16}\"\nx-web-image: &web-image \"${LORE_WEB_IMAGE:-ghcr.io/treadiehq/lore-web}:${LORE_IMAGE_TAG:-0.1.16}\"\n\nservices:\n postgres:\n image: pgvector/pgvector:0.8.6-pg18\n environment:\n POSTGRES_DB: lore\n POSTGRES_USER: lore\n POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}\n volumes:\n - postgres-data:/var/lib/postgresql\n healthcheck:\n test:\n [\n \"CMD-SHELL\",\n 'pg_isready -h 127.0.0.1 -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\"',\n ]\n interval: 5s\n timeout: 5s\n retries: 10\n start_period: 10s\n restart: unless-stopped\n\n api:\n image: *api-image\n environment:\n NODE_ENV: production\n DATABASE_URL: \"postgresql://lore:${POSTGRES_PASSWORD:-}@postgres:5432/lore\"\n API_HOST: 0.0.0.0\n API_PORT: 3001\n API_JSON_BODY_LIMIT: ${API_JSON_BODY_LIMIT:-1mb}\n API_RATE_LIMIT_PER_MINUTE: ${API_RATE_LIMIT_PER_MINUTE:-120}\n RATE_LIMIT_KEY_SECRET: ${RATE_LIMIT_KEY_SECRET:-}\n TRUSTED_PROXY_CIDRS: ${TRUSTED_PROXY_CIDRS:-10.0.0.0/8,172.16.0.0/12}\n NUXT_ORIGIN: ${NUXT_ORIGIN:-}\n LORE_SERVER_VERSION: ${LORE_IMAGE_TAG:-0.1.16}\n LORE_SERVER_REVISION: ${LORE_SERVER_REVISION:-}\n LORE_WORKSPACE_TOKEN: ${LORE_WORKSPACE_TOKEN:-}\n LORE_WORKSPACE_ORGANIZATION: ${LORE_WORKSPACE_ORGANIZATION:-}\n LORE_WORKSPACE_NAME: ${LORE_WORKSPACE_NAME:-}\n AUTH_MODE: ${AUTH_MODE:-magic_link}\n AUTH_EMAIL_MODE: ${AUTH_EMAIL_MODE:-resend}\n AUTH_WEB_ORIGIN: ${AUTH_WEB_ORIGIN:-}\n AUTH_OWNER_EMAIL: ${AUTH_OWNER_EMAIL:-}\n AUTH_EMAIL_FROM: ${AUTH_EMAIL_FROM:-}\n RESEND_API_KEY: ${RESEND_API_KEY:-}\n AUTH_MAGIC_LINK_TTL_MINUTES: ${AUTH_MAGIC_LINK_TTL_MINUTES:-15}\n AUTH_SESSION_TTL_DAYS: ${AUTH_SESSION_TTL_DAYS:-30}\n DEVIN_POLLING_ENABLED: ${DEVIN_POLLING_ENABLED:-false}\n DEVIN_API_KEY: ${DEVIN_API_KEY:-}\n DEVIN_ORG_ID: ${DEVIN_ORG_ID:-}\n DEVIN_REPOSITORY_ALLOWLIST: ${DEVIN_REPOSITORY_ALLOWLIST:-}\n DEVIN_POLL_INTERVAL_MS: ${DEVIN_POLL_INTERVAL_MS:-15000}\n DEVIN_REQUEST_TIMEOUT_MS: ${DEVIN_REQUEST_TIMEOUT_MS:-10000}\n DEVIN_POLL_BATCH_SIZE: ${DEVIN_POLL_BATCH_SIZE:-25}\n EXTRACTOR_PROVIDER: ${EXTRACTOR_PROVIDER:-heuristic}\n EXTRACTOR_MIN_CONFIDENCE: ${EXTRACTOR_MIN_CONFIDENCE:-0.8}\n EXTRACTOR_MODEL: ${EXTRACTOR_MODEL:-}\n EXTRACTOR_BASE_URL: ${EXTRACTOR_BASE_URL:-}\n EXTRACTOR_API_KEY: ${EXTRACTOR_API_KEY:-}\n RETRIEVAL_MODE: ${RETRIEVAL_MODE:-auto}\n EMBEDDING_MODEL: ${EMBEDDING_MODEL:-text-embedding-3-small}\n EMBEDDING_BASE_URL: ${EMBEDDING_BASE_URL:-https://api.openai.com/v1}\n EMBEDDING_API_KEY: ${EMBEDDING_API_KEY:-}\n EMBEDDING_DIMENSIONS: ${EMBEDDING_DIMENSIONS:-1536}\n EMBEDDING_TIMEOUT_MS: ${EMBEDDING_TIMEOUT_MS:-5000}\n SEMANTIC_MIN_SIMILARITY: ${SEMANTIC_MIN_SIMILARITY:-0.65}\n CONTEXT_MAX_ITEMS: ${CONTEXT_MAX_ITEMS:-10}\n CONTEXT_MAX_CHARACTERS: ${CONTEXT_MAX_CHARACTERS:-12000}\n CONTEXT_MAX_ESTIMATED_TOKENS: ${CONTEXT_MAX_ESTIMATED_TOKENS:-4000}\n ports:\n - \"${API_BIND_ADDRESS:-127.0.0.1}:${API_PORT:-3001}:3001\"\n depends_on:\n postgres:\n condition: service_healthy\n healthcheck:\n test:\n [\n \"CMD\",\n \"node\",\n \"-e\",\n \"fetch('http://127.0.0.1:3001/health/ready').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\",\n ]\n interval: 5s\n timeout: 5s\n retries: 12\n start_period: 10s\n restart: unless-stopped\n\n web:\n image: *web-image\n environment:\n HOST: 0.0.0.0\n PORT: 3000\n NITRO_HOST: 0.0.0.0\n NITRO_PORT: 3000\n NUXT_LORE_API_URL: http://api:3001\n NUXT_AUTH_COOKIE_NAME: ${NUXT_AUTH_COOKIE_NAME:-lore_session}\n NUXT_AUTH_COOKIE_SECURE: ${NUXT_AUTH_COOKIE_SECURE:-true}\n TRUSTED_PROXY_CIDRS: ${TRUSTED_PROXY_CIDRS:-10.0.0.0/8,172.16.0.0/12}\n NUXT_PUBLIC_API_BASE_URL: /api/lore\n NUXT_PUBLIC_LORE_CONNECTOR_API_URL: ${NUXT_PUBLIC_LORE_CONNECTOR_API_URL:-http://localhost:3001}\n NUXT_PUBLIC_LORE_INSTALL_URL: ${NUXT_PUBLIC_LORE_INSTALL_URL:-https://uselore.co/install.sh}\n ports:\n - \"${NUXT_BIND_ADDRESS:-127.0.0.1}:${NUXT_PORT:-3000}:3000\"\n depends_on:\n api:\n condition: service_healthy\n healthcheck:\n test:\n [\n \"CMD\",\n \"node\",\n \"-e\",\n \"fetch('http://127.0.0.1:3000/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\",\n ]\n interval: 10s\n timeout: 5s\n retries: 12\n start_period: 15s\n restart: unless-stopped\n\nvolumes:\n postgres-data:\n";
|
|
8
8
|
//# sourceMappingURL=generated-assets.d.ts.map
|
package/dist/generated-assets.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Generated by scripts/generate-cli-assets.mjs. Do not edit directly.
|
|
2
2
|
export const GITHUB_TEMPLATE_ASSETS = {
|
|
3
|
-
"lore-codex-review.yml": "name: Lore Codex review\nrun-name: \"Lore Codex review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:codex-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
4
|
-
"lore-devin-review.yml": "name: Lore Devin review\nrun-name: \"Lore Devin review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\nconcurrency:\n group: lore-devin-review-${{ github.repository }}-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:devin-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
5
|
-
"lore-observe-correction.yml": "name: Lore review correction\nrun-name: \"Lore review correction comment #${{ github.event.comment.id }}\"\n\non:\n issue_comment:\n types: [created]\n\njobs:\n observe:\n if: >-\n github.event.issue.pull_request &&\n startsWith(github.event.comment.body, '/lore correct ')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n issues: read\n pull-requests: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
3
|
+
"lore-codex-review.yml": "name: Lore Codex review\nrun-name: \"Lore Codex review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:codex-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.16' }}\n outputs:\n final-message: ${{ steps.codex.outputs.final-message }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Prepare Lore review context\n env:\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github prepare-review\n --provider codex\n --event \"$GITHUB_EVENT_PATH\"\n --checkout \"$GITHUB_WORKSPACE/review\"\n --prompt-out \"$GITHUB_WORKSPACE/.lore/codex-prompt.md\"\n --metadata-out \"$GITHUB_WORKSPACE/.lore/codex-metadata.json\"\n --schema-out \"$GITHUB_WORKSPACE/.lore/review-output.schema.json\"\n\n - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: lore-codex-metadata\n path: .lore/codex-metadata.json\n retention-days: 1\n\n - name: Run Codex\n id: codex\n uses: openai/codex-action@52fe01ec70a42f454c9d2ebd47598f9fd6893d56 # v1.11\n with:\n openai-api-key: ${{ secrets.OPENAI_API_KEY }}\n prompt-file: .lore/codex-prompt.md\n output-schema-file: .lore/review-output.schema.json\n working-directory: review\n permission-profile: \":read-only\"\n safety-strategy: drop-sudo\n\n post:\n needs: review\n if: needs.review.outputs.final-message != ''\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.16' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0\n with:\n name: lore-codex-metadata\n path: .lore\n\n - name: Save review output\n env:\n CODEX_REVIEW: ${{ needs.review.outputs.final-message }}\n run: |\n mkdir -p .lore\n printf '%s' \"$CODEX_REVIEW\" > .lore/codex-output.json\n\n - name: Post or update Lore review\n env:\n GH_TOKEN: ${{ github.token }}\n run: >-\n lore github post-review\n --metadata .lore/codex-metadata.json\n --output .lore/codex-output.json\n",
|
|
4
|
+
"lore-devin-review.yml": "name: Lore Devin review\nrun-name: \"Lore Devin review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\nconcurrency:\n group: lore-devin-review-${{ github.repository }}-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:devin-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.16' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Prepare Lore review context\n env:\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github prepare-review\n --provider devin\n --event \"$GITHUB_EVENT_PATH\"\n --checkout \"$GITHUB_WORKSPACE/review\"\n --prompt-out \"$GITHUB_WORKSPACE/.lore/devin-prompt.md\"\n --metadata-out \"$GITHUB_WORKSPACE/.lore/devin-metadata.json\"\n\n - name: Run Lore-enriched Devin review\n env:\n DEVIN_API_KEY: ${{ secrets.DEVIN_API_KEY }}\n DEVIN_ORG_ID: ${{ vars.DEVIN_ORG_ID }}\n run: >-\n lore devin run-review\n --prompt .lore/devin-prompt.md\n --metadata .lore/devin-metadata.json\n --output .lore/devin-output.json\n\n - name: Post or update Lore review\n env:\n GH_TOKEN: ${{ github.token }}\n run: >-\n lore github post-review\n --metadata .lore/devin-metadata.json\n --output .lore/devin-output.json\n\n - name: Clean up Devin session\n if: always()\n continue-on-error: true\n env:\n DEVIN_API_KEY: ${{ secrets.DEVIN_API_KEY }}\n DEVIN_ORG_ID: ${{ vars.DEVIN_ORG_ID }}\n run: |\n SESSION_ID=\"$(jq -r '.sessionId // empty' .lore/devin-metadata.json 2>/dev/null || true)\"\n if [ -n \"$SESSION_ID\" ]; then\n lore devin terminate --session \"$SESSION_ID\"\n fi\n",
|
|
5
|
+
"lore-observe-correction.yml": "name: Lore review correction\nrun-name: \"Lore review correction comment #${{ github.event.comment.id }}\"\n\non:\n issue_comment:\n types: [created]\n\njobs:\n observe:\n if: >-\n github.event.issue.pull_request &&\n startsWith(github.event.comment.body, '/lore correct ')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n issues: read\n pull-requests: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.16' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Teach Lore from an authorized correction\n env:\n GH_TOKEN: ${{ github.token }}\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github observe-correction\n --event \"$GITHUB_EVENT_PATH\"\n",
|
|
6
6
|
"review-output.schema.json": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"summary\", \"findings\"],\n \"properties\": {\n \"summary\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"findings\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"severity\", \"title\", \"body\", \"path\", \"line\"],\n \"properties\": {\n \"severity\": {\n \"enum\": [\"critical\", \"high\", \"medium\", \"low\"]\n },\n \"title\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"body\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"path\": {\n \"type\": [\"string\", \"null\"],\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"line\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 1\n }\n }\n }\n }\n }\n}\n"
|
|
7
7
|
};
|
|
8
|
-
export const SELF_HOST_COMPOSE_ASSET = "name: lore\n\nx-api-image: &api-image \"${LORE_API_IMAGE:-ghcr.io/treadiehq/lore-api}:${LORE_IMAGE_TAG:-0.1.
|
|
8
|
+
export const SELF_HOST_COMPOSE_ASSET = "name: lore\n\nx-api-image: &api-image \"${LORE_API_IMAGE:-ghcr.io/treadiehq/lore-api}:${LORE_IMAGE_TAG:-0.1.16}\"\nx-web-image: &web-image \"${LORE_WEB_IMAGE:-ghcr.io/treadiehq/lore-web}:${LORE_IMAGE_TAG:-0.1.16}\"\n\nservices:\n postgres:\n image: pgvector/pgvector:0.8.6-pg18\n environment:\n POSTGRES_DB: lore\n POSTGRES_USER: lore\n POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}\n volumes:\n - postgres-data:/var/lib/postgresql\n healthcheck:\n test:\n [\n \"CMD-SHELL\",\n 'pg_isready -h 127.0.0.1 -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\"',\n ]\n interval: 5s\n timeout: 5s\n retries: 10\n start_period: 10s\n restart: unless-stopped\n\n api:\n image: *api-image\n environment:\n NODE_ENV: production\n DATABASE_URL: \"postgresql://lore:${POSTGRES_PASSWORD:-}@postgres:5432/lore\"\n API_HOST: 0.0.0.0\n API_PORT: 3001\n API_JSON_BODY_LIMIT: ${API_JSON_BODY_LIMIT:-1mb}\n API_RATE_LIMIT_PER_MINUTE: ${API_RATE_LIMIT_PER_MINUTE:-120}\n RATE_LIMIT_KEY_SECRET: ${RATE_LIMIT_KEY_SECRET:-}\n TRUSTED_PROXY_CIDRS: ${TRUSTED_PROXY_CIDRS:-10.0.0.0/8,172.16.0.0/12}\n NUXT_ORIGIN: ${NUXT_ORIGIN:-}\n LORE_SERVER_VERSION: ${LORE_IMAGE_TAG:-0.1.16}\n LORE_SERVER_REVISION: ${LORE_SERVER_REVISION:-}\n LORE_WORKSPACE_TOKEN: ${LORE_WORKSPACE_TOKEN:-}\n LORE_WORKSPACE_ORGANIZATION: ${LORE_WORKSPACE_ORGANIZATION:-}\n LORE_WORKSPACE_NAME: ${LORE_WORKSPACE_NAME:-}\n AUTH_MODE: ${AUTH_MODE:-magic_link}\n AUTH_EMAIL_MODE: ${AUTH_EMAIL_MODE:-resend}\n AUTH_WEB_ORIGIN: ${AUTH_WEB_ORIGIN:-}\n AUTH_OWNER_EMAIL: ${AUTH_OWNER_EMAIL:-}\n AUTH_EMAIL_FROM: ${AUTH_EMAIL_FROM:-}\n RESEND_API_KEY: ${RESEND_API_KEY:-}\n AUTH_MAGIC_LINK_TTL_MINUTES: ${AUTH_MAGIC_LINK_TTL_MINUTES:-15}\n AUTH_SESSION_TTL_DAYS: ${AUTH_SESSION_TTL_DAYS:-30}\n DEVIN_POLLING_ENABLED: ${DEVIN_POLLING_ENABLED:-false}\n DEVIN_API_KEY: ${DEVIN_API_KEY:-}\n DEVIN_ORG_ID: ${DEVIN_ORG_ID:-}\n DEVIN_REPOSITORY_ALLOWLIST: ${DEVIN_REPOSITORY_ALLOWLIST:-}\n DEVIN_POLL_INTERVAL_MS: ${DEVIN_POLL_INTERVAL_MS:-15000}\n DEVIN_REQUEST_TIMEOUT_MS: ${DEVIN_REQUEST_TIMEOUT_MS:-10000}\n DEVIN_POLL_BATCH_SIZE: ${DEVIN_POLL_BATCH_SIZE:-25}\n EXTRACTOR_PROVIDER: ${EXTRACTOR_PROVIDER:-heuristic}\n EXTRACTOR_MIN_CONFIDENCE: ${EXTRACTOR_MIN_CONFIDENCE:-0.8}\n EXTRACTOR_MODEL: ${EXTRACTOR_MODEL:-}\n EXTRACTOR_BASE_URL: ${EXTRACTOR_BASE_URL:-}\n EXTRACTOR_API_KEY: ${EXTRACTOR_API_KEY:-}\n RETRIEVAL_MODE: ${RETRIEVAL_MODE:-auto}\n EMBEDDING_MODEL: ${EMBEDDING_MODEL:-text-embedding-3-small}\n EMBEDDING_BASE_URL: ${EMBEDDING_BASE_URL:-https://api.openai.com/v1}\n EMBEDDING_API_KEY: ${EMBEDDING_API_KEY:-}\n EMBEDDING_DIMENSIONS: ${EMBEDDING_DIMENSIONS:-1536}\n EMBEDDING_TIMEOUT_MS: ${EMBEDDING_TIMEOUT_MS:-5000}\n SEMANTIC_MIN_SIMILARITY: ${SEMANTIC_MIN_SIMILARITY:-0.65}\n CONTEXT_MAX_ITEMS: ${CONTEXT_MAX_ITEMS:-10}\n CONTEXT_MAX_CHARACTERS: ${CONTEXT_MAX_CHARACTERS:-12000}\n CONTEXT_MAX_ESTIMATED_TOKENS: ${CONTEXT_MAX_ESTIMATED_TOKENS:-4000}\n ports:\n - \"${API_BIND_ADDRESS:-127.0.0.1}:${API_PORT:-3001}:3001\"\n depends_on:\n postgres:\n condition: service_healthy\n healthcheck:\n test:\n [\n \"CMD\",\n \"node\",\n \"-e\",\n \"fetch('http://127.0.0.1:3001/health/ready').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\",\n ]\n interval: 5s\n timeout: 5s\n retries: 12\n start_period: 10s\n restart: unless-stopped\n\n web:\n image: *web-image\n environment:\n HOST: 0.0.0.0\n PORT: 3000\n NITRO_HOST: 0.0.0.0\n NITRO_PORT: 3000\n NUXT_LORE_API_URL: http://api:3001\n NUXT_AUTH_COOKIE_NAME: ${NUXT_AUTH_COOKIE_NAME:-lore_session}\n NUXT_AUTH_COOKIE_SECURE: ${NUXT_AUTH_COOKIE_SECURE:-true}\n TRUSTED_PROXY_CIDRS: ${TRUSTED_PROXY_CIDRS:-10.0.0.0/8,172.16.0.0/12}\n NUXT_PUBLIC_API_BASE_URL: /api/lore\n NUXT_PUBLIC_LORE_CONNECTOR_API_URL: ${NUXT_PUBLIC_LORE_CONNECTOR_API_URL:-http://localhost:3001}\n NUXT_PUBLIC_LORE_INSTALL_URL: ${NUXT_PUBLIC_LORE_INSTALL_URL:-https://uselore.co/install.sh}\n ports:\n - \"${NUXT_BIND_ADDRESS:-127.0.0.1}:${NUXT_PORT:-3000}:3000\"\n depends_on:\n api:\n condition: service_healthy\n healthcheck:\n test:\n [\n \"CMD\",\n \"node\",\n \"-e\",\n \"fetch('http://127.0.0.1:3000/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\",\n ]\n interval: 10s\n timeout: 5s\n retries: 12\n start_period: 15s\n restart: unless-stopped\n\nvolumes:\n postgres-data:\n";
|
|
9
9
|
//# sourceMappingURL=generated-assets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-assets.js","sourceRoot":"","sources":["../src/generated-assets.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,uBAAuB,EAAE
|
|
1
|
+
{"version":3,"file":"generated-assets.js","sourceRoot":"","sources":["../src/generated-assets.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,uBAAuB,EAAE,+8HAA+8H;IACx+H,uBAAuB,EAAE,25FAA25F;IACp7F,6BAA6B,EAAE,q4CAAq4C;IACp6C,2BAA2B,EAAE,+tCAA+tC;CACpvC,CAAC;AACX,MAAM,CAAC,MAAM,uBAAuB,GAAG,0wJAA0wJ,CAAC"}
|
package/dist/guard.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA8HhD,wBAAsB,eAAe,CACnC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,eAAe,GAAG,IAAI,GAC7B,OAAO,CAAC,IAAI,CAAC,CA6Gf"}
|
package/dist/guard.js
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { execFile as execFileCallback } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
import { GuardApproveResponseSchema, WorkspaceGuardPolicySchema, } from "@lore-co/core";
|
|
4
|
+
import { loreApiRequest } from "./api.js";
|
|
5
|
+
import { repositoryScopeFromGitRoot } from "./repository.js";
|
|
6
|
+
const execFile = promisify(execFileCallback);
|
|
7
|
+
const GUARD_HELP = `lore guard
|
|
8
|
+
Control Context Guard: proactive Lore context at action boundaries.
|
|
9
|
+
|
|
10
|
+
Modes:
|
|
11
|
+
off Lore only responds when asked.
|
|
12
|
+
assist Lore automatically gives agents relevant context before
|
|
13
|
+
important actions. Recommended.
|
|
14
|
+
enforce Lore can require confirmation for actions that conflict with
|
|
15
|
+
required (governed) rules.
|
|
16
|
+
|
|
17
|
+
Usage:
|
|
18
|
+
lore guard status [--json]
|
|
19
|
+
lore guard off [--repo [name]]
|
|
20
|
+
lore guard assist [--repo [name]]
|
|
21
|
+
lore guard enforce [--repo [name]]
|
|
22
|
+
lore guard approve <check-id>
|
|
23
|
+
lore guard clear-override [--repo [name]]
|
|
24
|
+
|
|
25
|
+
Options:
|
|
26
|
+
--repo [name] Apply to one repository instead of the workspace default.
|
|
27
|
+
Omit the value to use the current repository.
|
|
28
|
+
--json Print machine-readable output
|
|
29
|
+
|
|
30
|
+
Notes:
|
|
31
|
+
Workspace-level changes need a token attributed to an owner or admin.
|
|
32
|
+
Rules only gate actions in enforce mode when an owner or admin marks
|
|
33
|
+
them "required" in the dashboard.
|
|
34
|
+
|
|
35
|
+
Examples:
|
|
36
|
+
lore guard status
|
|
37
|
+
lore guard assist
|
|
38
|
+
lore guard enforce --repo
|
|
39
|
+
lore guard off --repo payments-api
|
|
40
|
+
lore guard approve 6f1d3f9a-4b7e-4c1e-9a2b-1c3d5e7f9a0b
|
|
41
|
+
`;
|
|
42
|
+
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
|
|
43
|
+
async function detectRepoScope() {
|
|
44
|
+
try {
|
|
45
|
+
const { stdout } = await execFile("git", ["rev-parse", "--show-toplevel"], { timeout: 5_000 });
|
|
46
|
+
const root = stdout.trim();
|
|
47
|
+
if (root === "") {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
return await repositoryScopeFromGitRoot(root);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Resolves the --repo option: absent → undefined, bare flag → detected from
|
|
58
|
+
* the current git repository, valued → that value.
|
|
59
|
+
*/
|
|
60
|
+
async function resolveRepoOption(args) {
|
|
61
|
+
const index = args.indexOf("--repo");
|
|
62
|
+
if (index < 0) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
const next = args[index + 1];
|
|
66
|
+
if (next !== undefined && !next.startsWith("--")) {
|
|
67
|
+
return next;
|
|
68
|
+
}
|
|
69
|
+
const detected = await detectRepoScope();
|
|
70
|
+
if (detected === undefined) {
|
|
71
|
+
throw new Error("Not inside a git repository. Pass the repository name: --repo <name>");
|
|
72
|
+
}
|
|
73
|
+
return detected;
|
|
74
|
+
}
|
|
75
|
+
function isGuardMode(value) {
|
|
76
|
+
return value === "off" || value === "assist" || value === "enforce";
|
|
77
|
+
}
|
|
78
|
+
function describeMode(mode) {
|
|
79
|
+
switch (mode) {
|
|
80
|
+
case "off":
|
|
81
|
+
return "off — Lore only responds when asked";
|
|
82
|
+
case "assist":
|
|
83
|
+
return "assist — relevant context is surfaced before important actions";
|
|
84
|
+
case "enforce":
|
|
85
|
+
return "enforce — required rules can ask for confirmation";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function writeStatus(policy, currentRepo) {
|
|
89
|
+
const override = currentRepo === undefined
|
|
90
|
+
? undefined
|
|
91
|
+
: policy.overrides.find((entry) => entry.repo === currentRepo);
|
|
92
|
+
const effective = override?.mode ?? policy.mode;
|
|
93
|
+
const lines = [
|
|
94
|
+
"Context Guard",
|
|
95
|
+
`Mode: ${describeMode(effective)}`,
|
|
96
|
+
`Scope: ${override === undefined ? "workspace default" : `repo override (${override.repo})`}`,
|
|
97
|
+
`Workspace default: ${policy.mode}`,
|
|
98
|
+
];
|
|
99
|
+
if (policy.overrides.length > 0) {
|
|
100
|
+
lines.push("Repo overrides:");
|
|
101
|
+
for (const entry of policy.overrides) {
|
|
102
|
+
lines.push(` ${entry.repo}: ${entry.mode}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
lines.push("Repo overrides: none");
|
|
107
|
+
}
|
|
108
|
+
process.stdout.write(`${lines.join("\n")}\n`);
|
|
109
|
+
}
|
|
110
|
+
export async function runGuardCommand(args, config) {
|
|
111
|
+
if (args.length === 0 ||
|
|
112
|
+
args.includes("--help") ||
|
|
113
|
+
args.includes("-h")) {
|
|
114
|
+
process.stdout.write(GUARD_HELP);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (config === null) {
|
|
118
|
+
throw new Error("Lore is not connected. Run: lore connect --token <workspace-token>");
|
|
119
|
+
}
|
|
120
|
+
const subcommand = args[0];
|
|
121
|
+
const rest = args.slice(1);
|
|
122
|
+
if (subcommand === "status") {
|
|
123
|
+
const policy = await loreApiRequest(config, "GET", "/v1/guard/policy", WorkspaceGuardPolicySchema);
|
|
124
|
+
if (args.includes("--json")) {
|
|
125
|
+
process.stdout.write(`${JSON.stringify(policy, null, 2)}\n`);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
writeStatus(policy, await detectRepoScope());
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (subcommand === "mode" || isGuardMode(subcommand)) {
|
|
132
|
+
const mode = subcommand === "mode" ? rest[0] : subcommand;
|
|
133
|
+
if (!isGuardMode(mode)) {
|
|
134
|
+
throw new Error("Usage: lore guard <off|assist|enforce> [--repo [name]]");
|
|
135
|
+
}
|
|
136
|
+
const repo = await resolveRepoOption(subcommand === "mode" ? rest.slice(1) : rest);
|
|
137
|
+
const policy = await loreApiRequest(config, "PATCH", "/v1/guard/policy", WorkspaceGuardPolicySchema, repo === undefined ? { mode } : { setOverride: { repo, mode } });
|
|
138
|
+
process.stdout.write(repo === undefined
|
|
139
|
+
? `Context Guard workspace default is now ${mode}.\n`
|
|
140
|
+
: `Context Guard for ${repo} is now ${mode}.\n`);
|
|
141
|
+
if (mode === "enforce") {
|
|
142
|
+
process.stdout.write("Enforce gates only rules marked \"required\" in the dashboard.\n");
|
|
143
|
+
}
|
|
144
|
+
writeStatus(policy, repo ?? (await detectRepoScope()));
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (subcommand === "clear-override") {
|
|
148
|
+
const repo = await resolveRepoOption(rest.includes("--repo") ? rest : [...rest, "--repo"]);
|
|
149
|
+
if (repo === undefined) {
|
|
150
|
+
throw new Error("Usage: lore guard clear-override [--repo [name]]");
|
|
151
|
+
}
|
|
152
|
+
const policy = await loreApiRequest(config, "PATCH", "/v1/guard/policy", WorkspaceGuardPolicySchema, { removeOverride: { repo } });
|
|
153
|
+
process.stdout.write(`Removed the Context Guard override for ${repo}.\n`);
|
|
154
|
+
writeStatus(policy, await detectRepoScope());
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (subcommand === "approve") {
|
|
158
|
+
const checkId = rest[0];
|
|
159
|
+
if (checkId === undefined || !UUID_PATTERN.test(checkId)) {
|
|
160
|
+
throw new Error("Usage: lore guard approve <check-id>");
|
|
161
|
+
}
|
|
162
|
+
const result = await loreApiRequest(config, "POST", "/v1/guard/approvals", GuardApproveResponseSchema, { checkId });
|
|
163
|
+
process.stdout.write(`Approved ${result.approved} rule(s) for this session${result.expiresAt === null
|
|
164
|
+
? ""
|
|
165
|
+
: ` until ${result.expiresAt.slice(0, 16).replace("T", " ")}`}. Retry the action in your agent.\n`);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
throw new Error(`Unknown guard subcommand: ${subcommand}\nTry: lore guard --help`);
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,GAG3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,QAAQ,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC;AAE7C,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkClB,CAAC;AAEF,MAAM,YAAY,GAChB,kEAAkE,CAAC;AAErE,KAAK,UAAU,eAAe;IAC5B,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,QAAQ,CAC/B,KAAK,EACL,CAAC,WAAW,EAAE,iBAAiB,CAAC,EAChC,EAAE,OAAO,EAAE,KAAK,EAAE,CACnB,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAC3B,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;YAChB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,MAAM,0BAA0B,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED;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0BAA0B,EAC1B,EAAE,OAAO,EAAE,CACZ,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,YAAY,MAAM,CAAC,QAAQ,4BACzB,MAAM,CAAC,SAAS,KAAK,IAAI;YACvB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,UAAU,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAC/D,qCAAqC,CACtC,CAAC;QACF,OAAO;IACT,CAAC;IAED,MAAM,IAAI,KAAK,CACb,6BAA6B,UAAU,0BAA0B,CAClE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConnectorConfig, LorePaths } from "./cli.js";
|
|
2
|
+
export declare function runResumeCommand(args: readonly string[], config: ConnectorConfig | null, paths: LorePaths): Promise<void>;
|
|
3
|
+
export declare function runContinueCommand(args: readonly string[], config: ConnectorConfig | null, paths: LorePaths): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=handoff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff.d.ts","sourceRoot":"","sources":["../src/handoff.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AA8R3D,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,eAAe,GAAG,IAAI,EAC9B,KAAK,EAAE,SAAS,GACf,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,eAAe,GAAG,IAAI,EAC9B,KAAK,EAAE,SAAS,GACf,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
package/dist/handoff.js
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { execFile as execFileCallback, spawn } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
import { HandoffResponseSchema } from "@lore-co/core";
|
|
4
|
+
import { loreApiRequest } from "./api.js";
|
|
5
|
+
import { ensureMachineRegistered } from "./machine.js";
|
|
6
|
+
import { repositoryScopeFromGitRoot } from "./repository.js";
|
|
7
|
+
import { hostLiveRuntime } from "./live.js";
|
|
8
|
+
const execFile = promisify(execFileCallback);
|
|
9
|
+
const RESUME_HELP = `lore resume
|
|
10
|
+
Continue previous work with saved Lore context. Same work, new execution.
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
lore resume [options]
|
|
14
|
+
|
|
15
|
+
Options:
|
|
16
|
+
--on <agent> Tool to launch: claude, codex, or opencode
|
|
17
|
+
(default: the tool that ran the previous session)
|
|
18
|
+
--session <uuid> Resume a specific work session (default: latest for repo)
|
|
19
|
+
--repo <repo> Repository to resume work in (default: detected from cwd)
|
|
20
|
+
--project <name> Project to resume work in
|
|
21
|
+
--live Host the launched tool as a live session (lore attach)
|
|
22
|
+
--print Print the handoff brief instead of launching a tool
|
|
23
|
+
--json Print the machine-readable handoff
|
|
24
|
+
--help Show this command's help
|
|
25
|
+
|
|
26
|
+
Examples:
|
|
27
|
+
lore resume
|
|
28
|
+
lore resume --on claude
|
|
29
|
+
lore resume --print
|
|
30
|
+
`;
|
|
31
|
+
const CONTINUE_HELP = `lore continue
|
|
32
|
+
Hand the current work to a different agent. Same work, different tool.
|
|
33
|
+
|
|
34
|
+
Usage:
|
|
35
|
+
lore continue --on <agent> [options]
|
|
36
|
+
|
|
37
|
+
Options:
|
|
38
|
+
--on <agent> Target tool: claude, codex, or opencode (required)
|
|
39
|
+
--session <uuid> Continue a specific work session (default: latest for repo)
|
|
40
|
+
--repo <repo> Repository the work belongs to (default: detected from cwd)
|
|
41
|
+
--project <name> Project the work belongs to
|
|
42
|
+
--live Host the launched tool as a live session (lore attach)
|
|
43
|
+
--print Print the handoff brief instead of launching a tool
|
|
44
|
+
--json Print the machine-readable handoff
|
|
45
|
+
--help Show this command's help
|
|
46
|
+
|
|
47
|
+
Examples:
|
|
48
|
+
lore continue --on codex
|
|
49
|
+
lore continue --on opencode --repo acme/billing
|
|
50
|
+
`;
|
|
51
|
+
/** Tools `lore resume` / `lore continue` can launch interactively. */
|
|
52
|
+
const LAUNCHABLE_AGENTS = ["claude", "codex", "opencode"];
|
|
53
|
+
function isLaunchable(value) {
|
|
54
|
+
return LAUNCHABLE_AGENTS.includes(value);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Interactive launch argv for each supported tool: start the tool's normal
|
|
58
|
+
* interactive surface with the handoff brief as the initial prompt.
|
|
59
|
+
*/
|
|
60
|
+
function launchArgv(agent, brief) {
|
|
61
|
+
switch (agent) {
|
|
62
|
+
case "claude":
|
|
63
|
+
return ["claude", brief];
|
|
64
|
+
case "codex":
|
|
65
|
+
return ["codex", brief];
|
|
66
|
+
case "opencode":
|
|
67
|
+
return ["opencode", "--prompt", brief];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function parseHandoffArguments(args, help) {
|
|
71
|
+
const parsed = { live: false, print: false, json: false };
|
|
72
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
73
|
+
const argument = args[index];
|
|
74
|
+
if (argument === "--help" || argument === "-h") {
|
|
75
|
+
process.stdout.write(help);
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
if (argument === "--live") {
|
|
79
|
+
parsed.live = true;
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if (argument === "--print") {
|
|
83
|
+
parsed.print = true;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (argument === "--json") {
|
|
87
|
+
parsed.json = true;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (argument === "--on" ||
|
|
91
|
+
argument === "--session" ||
|
|
92
|
+
argument === "--repo" ||
|
|
93
|
+
argument === "--project") {
|
|
94
|
+
const value = args[index + 1];
|
|
95
|
+
if (value === undefined) {
|
|
96
|
+
throw new Error(`Missing value for ${argument}`);
|
|
97
|
+
}
|
|
98
|
+
index += 1;
|
|
99
|
+
if (argument === "--on") {
|
|
100
|
+
parsed.on = value;
|
|
101
|
+
}
|
|
102
|
+
else if (argument === "--session") {
|
|
103
|
+
parsed.session = value;
|
|
104
|
+
}
|
|
105
|
+
else if (argument === "--repo") {
|
|
106
|
+
parsed.repo = value;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
parsed.project = value;
|
|
110
|
+
}
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
throw new Error(`Unknown option: ${String(argument)}`);
|
|
114
|
+
}
|
|
115
|
+
return parsed;
|
|
116
|
+
}
|
|
117
|
+
async function detectRepoScope() {
|
|
118
|
+
try {
|
|
119
|
+
const { stdout } = await execFile("git", ["rev-parse", "--show-toplevel"], { timeout: 5_000 });
|
|
120
|
+
const root = stdout.trim();
|
|
121
|
+
if (root === "") {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
return await repositoryScopeFromGitRoot(root);
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
async function fetchHandoff(config, parsed, targetAgent) {
|
|
131
|
+
const repo = parsed.repo ?? (await detectRepoScope());
|
|
132
|
+
if (parsed.session === undefined &&
|
|
133
|
+
repo === undefined &&
|
|
134
|
+
parsed.project === undefined) {
|
|
135
|
+
throw new Error("No repository detected. Run inside a git repository or pass --repo/--project/--session.");
|
|
136
|
+
}
|
|
137
|
+
return loreApiRequest(config, "POST", "/v1/sessions/handoff", HandoffResponseSchema, {
|
|
138
|
+
...(parsed.session === undefined ? {} : { sessionId: parsed.session }),
|
|
139
|
+
...(parsed.session !== undefined || repo === undefined ? {} : { repo }),
|
|
140
|
+
...(parsed.project === undefined ? {} : { project: parsed.project }),
|
|
141
|
+
...(targetAgent === undefined ? {} : { targetAgent }),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
async function launchAgent(agent, handoff, config, paths, live) {
|
|
145
|
+
const [command, ...commandArgs] = launchArgv(agent, handoff.brief);
|
|
146
|
+
if (command === undefined) {
|
|
147
|
+
throw new Error(`No launch command for ${agent}`);
|
|
148
|
+
}
|
|
149
|
+
const env = {
|
|
150
|
+
...process.env,
|
|
151
|
+
LORE_PARENT_SESSION_ID: handoff.parentSessionId,
|
|
152
|
+
};
|
|
153
|
+
if (live) {
|
|
154
|
+
await hostLiveRuntime({
|
|
155
|
+
config,
|
|
156
|
+
paths,
|
|
157
|
+
command,
|
|
158
|
+
args: commandArgs,
|
|
159
|
+
agent,
|
|
160
|
+
env: { LORE_PARENT_SESSION_ID: handoff.parentSessionId },
|
|
161
|
+
...(handoff.session.repo === null ? {} : { repo: handoff.session.repo }),
|
|
162
|
+
...(handoff.session.project === null
|
|
163
|
+
? {}
|
|
164
|
+
: { project: handoff.session.project }),
|
|
165
|
+
attach: true,
|
|
166
|
+
});
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
process.stdout.write(`Launching ${agent} with Lore context (parent session ${handoff.parentSessionId.slice(0, 8)}…)\n`);
|
|
170
|
+
await new Promise((resolvePromise, rejectPromise) => {
|
|
171
|
+
const child = spawn(command, commandArgs, {
|
|
172
|
+
stdio: "inherit",
|
|
173
|
+
env,
|
|
174
|
+
});
|
|
175
|
+
child.on("error", (error) => {
|
|
176
|
+
rejectPromise(error.code === "ENOENT"
|
|
177
|
+
? new Error(`The ${agent} CLI is not installed or not on PATH. Use --print to get the handoff brief instead.`)
|
|
178
|
+
: error);
|
|
179
|
+
});
|
|
180
|
+
child.on("exit", (code) => {
|
|
181
|
+
process.exitCode = code ?? 0;
|
|
182
|
+
resolvePromise();
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
async function runHandoffCommand(args, config, paths, mode) {
|
|
187
|
+
const parsed = parseHandoffArguments(args, mode === "resume" ? RESUME_HELP : CONTINUE_HELP);
|
|
188
|
+
if (parsed === null) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
if (config === null) {
|
|
192
|
+
throw new Error("Lore is not connected. Run: lore connect --token <workspace-token>");
|
|
193
|
+
}
|
|
194
|
+
if (mode === "continue" && parsed.on === undefined) {
|
|
195
|
+
throw new Error("lore continue requires a target. Try: lore continue --on codex");
|
|
196
|
+
}
|
|
197
|
+
const handoff = await fetchHandoff(config, parsed, parsed.on);
|
|
198
|
+
// Resume defaults to the tool that ran the previous session.
|
|
199
|
+
const targetAgent = parsed.on ?? handoff.session.agent;
|
|
200
|
+
if (parsed.json) {
|
|
201
|
+
process.stdout.write(`${JSON.stringify(handoff, null, 2)}\n`);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (parsed.print || !isLaunchable(targetAgent)) {
|
|
205
|
+
if (!parsed.print) {
|
|
206
|
+
process.stdout.write(`Lore cannot launch "${targetAgent}" directly. Give this brief to your tool:\n\n`);
|
|
207
|
+
}
|
|
208
|
+
process.stdout.write(`${handoff.brief}\n`);
|
|
209
|
+
process.stdout.write(`\nTo record lineage, run the tool with LORE_PARENT_SESSION_ID=${handoff.parentSessionId}\n`);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
// Machine registration is best-effort provenance; never block a handoff.
|
|
213
|
+
try {
|
|
214
|
+
await ensureMachineRegistered(config, paths);
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
// Older servers may not support machines.
|
|
218
|
+
}
|
|
219
|
+
await launchAgent(targetAgent, handoff, config, paths, parsed.live);
|
|
220
|
+
}
|
|
221
|
+
export async function runResumeCommand(args, config, paths) {
|
|
222
|
+
await runHandoffCommand(args, config, paths, "resume");
|
|
223
|
+
}
|
|
224
|
+
export async function runContinueCommand(args, config, paths) {
|
|
225
|
+
await runHandoffCommand(args, config, paths, "continue");
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=handoff.js.map
|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