@lore-co/cli 0.1.19 → 0.1.21
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 +34 -2
- package/dist/cli.d.ts +8 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +87 -7
- package/dist/cli.js.map +1 -1
- package/dist/cursor-mcp.d.ts +5 -0
- package/dist/cursor-mcp.d.ts.map +1 -0
- package/dist/cursor-mcp.js +41 -0
- package/dist/cursor-mcp.js.map +1 -0
- package/dist/devin-client.d.ts.map +1 -1
- package/dist/devin-client.js +6 -3
- package/dist/devin-client.js.map +1 -1
- package/dist/generated-assets.d.ts +4 -4
- package/dist/generated-assets.d.ts.map +1 -1
- package/dist/generated-assets.js +4 -4
- package/dist/generated-assets.js.map +1 -1
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +31 -1
- package/dist/guard.js.map +1 -1
- package/dist/remember.d.ts +3 -0
- package/dist/remember.d.ts.map +1 -0
- package/dist/remember.js +159 -0
- package/dist/remember.js.map +1 -0
- package/dist/runtime.d.ts +7 -3
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +248 -110
- 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 +3 -3
- package/package.json +4 -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-releases' }}\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-releases' }}\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-releases' }}\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.21' }}\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.21' }}\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.21' }}\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.21' }}\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.21}\"\nx-web-image: &web-image \"${LORE_WEB_IMAGE:-ghcr.io/treadiehq/lore-web}:${LORE_IMAGE_TAG:-0.1.21}\"\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.21}\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 EMBEDDING_SPACE_ID: ${EMBEDDING_SPACE_ID:-}\n EMBEDDING_RECONCILE_INTERVAL_MS: ${EMBEDDING_RECONCILE_INTERVAL_MS:-60000}\n EMBEDDING_RECONCILE_BATCH_SIZE: ${EMBEDDING_RECONCILE_BATCH_SIZE:-500}\n EMBEDDING_RECONCILE_PAGE_SIZE: ${EMBEDDING_RECONCILE_PAGE_SIZE:-100}\n CAPTURE_WORKER_POLL_INTERVAL_MS: ${CAPTURE_WORKER_POLL_INTERVAL_MS:-500}\n CAPTURE_WORKER_CONCURRENCY: ${CAPTURE_WORKER_CONCURRENCY:-2}\n CAPTURE_WORKER_LEASE_MS: ${CAPTURE_WORKER_LEASE_MS:-60000}\n CAPTURE_INLINE_TIMEOUT_MS: ${CAPTURE_INLINE_TIMEOUT_MS:-45000}\n SEMANTIC_MIN_SIMILARITY: ${SEMANTIC_MIN_SIMILARITY:-0.4}\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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-assets.d.ts","sourceRoot":"","sources":["../src/generated-assets.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AACX,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"generated-assets.d.ts","sourceRoot":"","sources":["../src/generated-assets.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AACX,eAAO,MAAM,uBAAuB,u0KAAu0K,CAAC"}
|
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-releases' }}\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-releases' }}\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-releases' }}\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.21' }}\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.21' }}\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.21' }}\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.21' }}\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.21}\"\nx-web-image: &web-image \"${LORE_WEB_IMAGE:-ghcr.io/treadiehq/lore-web}:${LORE_IMAGE_TAG:-0.1.21}\"\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.21}\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 EMBEDDING_SPACE_ID: ${EMBEDDING_SPACE_ID:-}\n EMBEDDING_RECONCILE_INTERVAL_MS: ${EMBEDDING_RECONCILE_INTERVAL_MS:-60000}\n EMBEDDING_RECONCILE_BATCH_SIZE: ${EMBEDDING_RECONCILE_BATCH_SIZE:-500}\n EMBEDDING_RECONCILE_PAGE_SIZE: ${EMBEDDING_RECONCILE_PAGE_SIZE:-100}\n CAPTURE_WORKER_POLL_INTERVAL_MS: ${CAPTURE_WORKER_POLL_INTERVAL_MS:-500}\n CAPTURE_WORKER_CONCURRENCY: ${CAPTURE_WORKER_CONCURRENCY:-2}\n CAPTURE_WORKER_LEASE_MS: ${CAPTURE_WORKER_LEASE_MS:-60000}\n CAPTURE_INLINE_TIMEOUT_MS: ${CAPTURE_INLINE_TIMEOUT_MS:-45000}\n SEMANTIC_MIN_SIMILARITY: ${SEMANTIC_MIN_SIMILARITY:-0.4}\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,+8HAA+8H;IACx+H,uBAAuB,EAAE,25FAA25F;IACp7F,6BAA6B,EAAE,q4CAAq4C;IACp6C,2BAA2B,EAAE,+tCAA+tC;CACpvC,CAAC;AACX,MAAM,CAAC,MAAM,uBAAuB,GAAG,
|
|
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,o0KAAo0K,CAAC"}
|
package/dist/guard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAgIhD,wBAAsB,eAAe,CACnC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,eAAe,GAAG,IAAI,GAC7B,OAAO,CAAC,IAAI,CAAC,CAwIf"}
|
package/dist/guard.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { execFile as execFileCallback } from "node:child_process";
|
|
2
2
|
import { promisify } from "node:util";
|
|
3
|
-
import {
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { GuardApproveResponseSchema, GuardEmergencyOverrideSchema, redactSensitiveText, WorkspaceGuardPolicySchema, } from "@lore-co/core";
|
|
4
5
|
import { loreApiRequest } from "./api.js";
|
|
5
6
|
import { repositoryScopeFromGitRoot } from "./repository.js";
|
|
7
|
+
import { ReliabilityStore } from "./reliability-store.js";
|
|
6
8
|
const execFile = promisify(execFileCallback);
|
|
7
9
|
const GUARD_HELP = `lore guard
|
|
8
10
|
Control Context Guard: proactive Lore context at action boundaries.
|
|
@@ -20,6 +22,7 @@ Usage:
|
|
|
20
22
|
lore guard assist [--repo [name]]
|
|
21
23
|
lore guard enforce [--repo [name]]
|
|
22
24
|
lore guard approve <check-id>
|
|
25
|
+
lore guard break-glass --session <id> --repo <name> --reason <reason>
|
|
23
26
|
lore guard clear-override [--repo [name]]
|
|
24
27
|
|
|
25
28
|
Options:
|
|
@@ -119,6 +122,32 @@ export async function runGuardCommand(args, config) {
|
|
|
119
122
|
}
|
|
120
123
|
const subcommand = args[0];
|
|
121
124
|
const rest = args.slice(1);
|
|
125
|
+
if (subcommand === "break-glass") {
|
|
126
|
+
const options = new Map();
|
|
127
|
+
for (let index = 0; index < rest.length; index += 2) {
|
|
128
|
+
const name = rest[index];
|
|
129
|
+
const value = rest[index + 1];
|
|
130
|
+
if (!["--session", "--repo", "--reason"].includes(name) || options.has(name) || value === undefined || value.startsWith("--")) {
|
|
131
|
+
throw new Error("Usage: lore guard break-glass --session <id> --repo <name> --reason <reason>");
|
|
132
|
+
}
|
|
133
|
+
options.set(name, value);
|
|
134
|
+
}
|
|
135
|
+
if (config.workspaceId === undefined)
|
|
136
|
+
throw new Error("Reconnect Lore before creating an emergency override.");
|
|
137
|
+
const now = new Date();
|
|
138
|
+
const override = GuardEmergencyOverrideSchema.parse({
|
|
139
|
+
overrideId: randomUUID(), sessionId: options.get("--session"), repo: options.get("--repo"),
|
|
140
|
+
reason: redactSensitiveText(options.get("--reason") ?? "").text,
|
|
141
|
+
issuedAt: now.toISOString(), expiresAt: new Date(now.getTime() + 15 * 60_000).toISOString(),
|
|
142
|
+
});
|
|
143
|
+
const store = new ReliabilityStore(config.workspaceId);
|
|
144
|
+
// The immutable outbox record is the audit boundary. Never activate the
|
|
145
|
+
// override unless the full record has already been durably queued.
|
|
146
|
+
await store.enqueue({ kind: "guard_override", idempotencyKey: override.overrideId, payload: override });
|
|
147
|
+
await store.writeState("guard-emergency-override", override);
|
|
148
|
+
process.stdout.write(`Emergency override recorded for this session and repository until ${override.expiresAt}. Its audit record will upload when Lore reconnects.\n`);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
122
151
|
if (subcommand === "status") {
|
|
123
152
|
const policy = await loreApiRequest(config, "GET", "/v1/guard/policy", WorkspaceGuardPolicySchema);
|
|
124
153
|
if (args.includes("--json")) {
|
|
@@ -135,6 +164,7 @@ export async function runGuardCommand(args, config) {
|
|
|
135
164
|
}
|
|
136
165
|
const repo = await resolveRepoOption(subcommand === "mode" ? rest.slice(1) : rest);
|
|
137
166
|
const policy = await loreApiRequest(config, "PATCH", "/v1/guard/policy", WorkspaceGuardPolicySchema, repo === undefined ? { mode } : { setOverride: { repo, mode } });
|
|
167
|
+
await new ReliabilityStore(policy.workspaceId).writeState("guard-policy-state", { mode: policy.mode, overrides: policy.overrides });
|
|
138
168
|
process.stdout.write(repo === undefined
|
|
139
169
|
? `Context Guard workspace default is now ${mode}.\n`
|
|
140
170
|
: `Context Guard for ${repo} is now ${mode}.\n`);
|
package/dist/guard.js.map
CHANGED
|
@@ -1 +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;
|
|
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,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,mBAAmB,EACnB,0BAA0B,GAG3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,QAAQ,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC;AAE7C,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmClB,CAAC;AAEF,MAAM,YAAY,GAChB,kEAAkE,CAAC;AAErE,KAAK,UAAU,eAAe;IAC5B,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAA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,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 @@
|
|
|
1
|
+
{"version":3,"file":"remember.d.ts","sourceRoot":"","sources":["../src/remember.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAuIhD,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,eAAe,GAAG,IAAI,GAC7B,OAAO,CAAC,IAAI,CAAC,CAoDf"}
|
package/dist/remember.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { MemoryCategorySchema, MemoryScopeSchema, } from "@lore-co/core";
|
|
2
|
+
import { LoreTransportError, SharedMemoryApiError, SharedMemoryClient, } from "@lore-co/sdk";
|
|
3
|
+
import { ZodError } from "zod";
|
|
4
|
+
const REMEMBER_HELP = `lore remember
|
|
5
|
+
Save a durable fact, convention, correction, or decision to Lore.
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
lore remember "<statement>" [options]
|
|
9
|
+
|
|
10
|
+
Options:
|
|
11
|
+
--category <name> Learning category (default: other)
|
|
12
|
+
--repo <repo> Limit the learning to this repository (owner/repository)
|
|
13
|
+
--project <name> Limit the learning to this project
|
|
14
|
+
--path <path> Limit the learning to a repository-relative file or directory
|
|
15
|
+
--component <name> Limit the learning to this component
|
|
16
|
+
--agent <name> Identify the source (default: human)
|
|
17
|
+
--json Print the full machine-readable response
|
|
18
|
+
--help Show this command's help
|
|
19
|
+
-- Treat all remaining arguments as statement text
|
|
20
|
+
|
|
21
|
+
Categories:
|
|
22
|
+
${MemoryCategorySchema.options.join(", ")}
|
|
23
|
+
|
|
24
|
+
Without scope flags, the learning is available workspace-wide.
|
|
25
|
+
Uses the workspace connection saved by lore connect.
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
lore remember "Use pnpm for this repository." --repo acme/app --category convention
|
|
29
|
+
lore remember "Payment retries must use exponential backoff." --project billing
|
|
30
|
+
lore remember "The legacy endpoint is deprecated." --agent codex --json
|
|
31
|
+
`;
|
|
32
|
+
const scopeOptions = {
|
|
33
|
+
"--repo": "repo",
|
|
34
|
+
"--project": "project",
|
|
35
|
+
"--path": "path",
|
|
36
|
+
"--component": "component",
|
|
37
|
+
};
|
|
38
|
+
function parseRememberArguments(args) {
|
|
39
|
+
const parsed = {
|
|
40
|
+
content: "",
|
|
41
|
+
category: "other",
|
|
42
|
+
scope: {},
|
|
43
|
+
agent: "human",
|
|
44
|
+
json: false,
|
|
45
|
+
};
|
|
46
|
+
const positionals = [];
|
|
47
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
48
|
+
const argument = args[index];
|
|
49
|
+
if (argument === "--") {
|
|
50
|
+
positionals.push(...args.slice(index + 1));
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
if (argument === "--help" || argument === "-h") {
|
|
54
|
+
process.stdout.write(REMEMBER_HELP);
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
if (argument === "--json") {
|
|
58
|
+
parsed.json = true;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (Object.hasOwn(scopeOptions, argument) ||
|
|
62
|
+
argument === "--category" ||
|
|
63
|
+
argument === "--agent") {
|
|
64
|
+
const value = args[index + 1]?.trim();
|
|
65
|
+
if (value === undefined || value === "" || value.startsWith("-")) {
|
|
66
|
+
throw new Error(`Missing value for ${argument}`);
|
|
67
|
+
}
|
|
68
|
+
index += 1;
|
|
69
|
+
if (argument === "--category") {
|
|
70
|
+
const category = MemoryCategorySchema.safeParse(value);
|
|
71
|
+
if (!category.success) {
|
|
72
|
+
throw new Error(`--category must be one of: ${MemoryCategorySchema.options.join(", ")}`);
|
|
73
|
+
}
|
|
74
|
+
parsed.category = category.data;
|
|
75
|
+
}
|
|
76
|
+
else if (argument === "--agent") {
|
|
77
|
+
parsed.agent = value;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
const field = scopeOptions[argument];
|
|
81
|
+
const scope = MemoryScopeSchema.safeParse({
|
|
82
|
+
...parsed.scope,
|
|
83
|
+
[field]: value,
|
|
84
|
+
});
|
|
85
|
+
if (!scope.success) {
|
|
86
|
+
throw new Error(`Invalid value for ${argument}`);
|
|
87
|
+
}
|
|
88
|
+
parsed.scope = scope.data;
|
|
89
|
+
}
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
if (argument.startsWith("-")) {
|
|
93
|
+
throw new Error(`Unknown remember option: ${argument}. Use -- before statement text that starts with a dash.`);
|
|
94
|
+
}
|
|
95
|
+
positionals.push(argument);
|
|
96
|
+
}
|
|
97
|
+
parsed.content = positionals.join(" ").trim();
|
|
98
|
+
if (parsed.content === "") {
|
|
99
|
+
throw new Error('A statement is required. Try: lore remember "Use pnpm for this repository." --repo owner/repository');
|
|
100
|
+
}
|
|
101
|
+
return parsed;
|
|
102
|
+
}
|
|
103
|
+
function formatResponse(response) {
|
|
104
|
+
const { memory, inserted } = response;
|
|
105
|
+
const scope = Object.entries(memory.scope)
|
|
106
|
+
.map(([key, value]) => `${key}: ${value}`)
|
|
107
|
+
.join(" · ");
|
|
108
|
+
return [
|
|
109
|
+
inserted ? `Remembered: ${memory.id}` : `Already remembered: ${memory.id}`,
|
|
110
|
+
memory.content,
|
|
111
|
+
`Category: ${memory.category}`,
|
|
112
|
+
`Scope: ${scope || "workspace-wide"}`,
|
|
113
|
+
`Status: ${memory.status}`,
|
|
114
|
+
"",
|
|
115
|
+
].join("\n");
|
|
116
|
+
}
|
|
117
|
+
export async function runRememberCommand(args, config) {
|
|
118
|
+
const parsed = parseRememberArguments(args);
|
|
119
|
+
if (parsed === null) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (config === null) {
|
|
123
|
+
throw new Error("Lore is not connected. Run: lore connect --login");
|
|
124
|
+
}
|
|
125
|
+
const client = new SharedMemoryClient({
|
|
126
|
+
baseUrl: config.apiUrl,
|
|
127
|
+
headers: { authorization: `Bearer ${config.token}` },
|
|
128
|
+
});
|
|
129
|
+
let response;
|
|
130
|
+
try {
|
|
131
|
+
response = await client.createLearning({
|
|
132
|
+
content: parsed.content,
|
|
133
|
+
category: parsed.category,
|
|
134
|
+
scope: parsed.scope,
|
|
135
|
+
source: { agent: parsed.agent },
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
if (error instanceof SharedMemoryApiError) {
|
|
140
|
+
if (error.status === 401 || error.status === 403) {
|
|
141
|
+
throw new Error("Lore authentication failed. Reconnect with a valid workspace token.");
|
|
142
|
+
}
|
|
143
|
+
if (error.status === 404) {
|
|
144
|
+
throw new Error("This Lore server does not support remember. Upgrade the server to use lore remember.");
|
|
145
|
+
}
|
|
146
|
+
throw new Error(`Lore remember failed with HTTP ${error.status}.`);
|
|
147
|
+
}
|
|
148
|
+
if (error instanceof ZodError ||
|
|
149
|
+
error instanceof SyntaxError ||
|
|
150
|
+
(error instanceof LoreTransportError && error.code === "response_too_large")) {
|
|
151
|
+
throw new Error("Lore returned an incompatible remember response. The save could not be confirmed; check Lore before retrying.");
|
|
152
|
+
}
|
|
153
|
+
throw new Error("Could not confirm the save with Lore. Run lore doctor to diagnose connectivity and check Lore before retrying.");
|
|
154
|
+
}
|
|
155
|
+
process.stdout.write(parsed.json
|
|
156
|
+
? `${JSON.stringify(response, null, 2)}\n`
|
|
157
|
+
: formatResponse(response));
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=remember.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remember.js","sourceRoot":"","sources":["../src/remember.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,E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oB,CAAC,EAC5E,CAAC;YACD,MAAM,IAAI,KAAK,CACb,+GAA+G,CAChH,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,KAAK,CACb,gHAAgH,CACjH,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,MAAM,CAAC,IAAI;QACT,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI;QAC1C,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,CAC7B,CAAC;AACJ,CAAC"}
|
package/dist/runtime.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ interface HookInput {
|
|
|
69
69
|
toolName?: unknown;
|
|
70
70
|
tool_input?: unknown;
|
|
71
71
|
toolArgs?: unknown;
|
|
72
|
+
input?: unknown;
|
|
72
73
|
command?: unknown;
|
|
73
74
|
}
|
|
74
75
|
export interface HookRuntimeOptions {
|
|
@@ -80,19 +81,20 @@ export interface HookRuntimeOptions {
|
|
|
80
81
|
export interface HookResult {
|
|
81
82
|
continue?: true;
|
|
82
83
|
systemMessage?: string;
|
|
83
|
-
outcome?: "accept";
|
|
84
|
+
outcome?: "accept" | "allow" | "deny";
|
|
85
|
+
reason?: string;
|
|
84
86
|
additional_context?: string;
|
|
85
87
|
/** Cursor beforeShellExecution verdict ("ask" is unenforced upstream). */
|
|
86
88
|
permission?: "deny";
|
|
87
89
|
userMessage?: string;
|
|
88
90
|
agentMessage?: string;
|
|
89
91
|
modifiedTransformedPrompt?: string;
|
|
90
|
-
permissionDecision?: "ask";
|
|
92
|
+
permissionDecision?: "ask" | "deny";
|
|
91
93
|
permissionDecisionReason?: string;
|
|
92
94
|
hookSpecificOutput?: {
|
|
93
95
|
hookEventName: "UserPromptSubmit" | "PreToolUse";
|
|
94
96
|
additionalContext?: string;
|
|
95
|
-
permissionDecision?: "ask";
|
|
97
|
+
permissionDecision?: "ask" | "deny";
|
|
96
98
|
permissionDecisionReason?: string;
|
|
97
99
|
};
|
|
98
100
|
}
|
|
@@ -122,6 +124,8 @@ interface GuardTrigger {
|
|
|
122
124
|
*/
|
|
123
125
|
export declare function guardTrigger(toolName: string, toolInput: Record<string, unknown>): GuardTrigger | null;
|
|
124
126
|
export declare function handleHookEvent(value: unknown, agent: CommandHookAgentName, options?: HookRuntimeOptions): Promise<HookResult | undefined>;
|
|
127
|
+
export declare function getCursorContext(sessionId: string, prompt: string, options?: HookRuntimeOptions): Promise<string>;
|
|
128
|
+
export declare function completeCursorResponse(sessionId: string, response: string, options?: HookRuntimeOptions): Promise<void>;
|
|
125
129
|
export declare function runHook(args?: readonly string[]): Promise<void>;
|
|
126
130
|
export {};
|
|
127
131
|
//# sourceMappingURL=runtime.d.ts.map
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAwDA,eAAO,MAAM,wBAAwB,sFAO3B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7E,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,oBAAoB,CAAC;AAiB7C,UAAU,uBAAuB;IAC/B,KAAK,EAAE,oBAAoB,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,UAAU,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,oBAAoB,CAAC;IA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