Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5db9646
feat: add multi-contributor managed memory CLI
kushalpatil07 Jul 29, 2026
5022e5a
fix: reconcile every memory candidate safely
kushalpatil07 Jul 29, 2026
38e477b
fix: skip non-ancestor memory candidates
kushalpatil07 Jul 29, 2026
b594b26
feat: add trusted reusable reconciliation workflow
kushalpatil07 Jul 29, 2026
b147dab
fix: harden managed collaboration clients
kushalpatil07 Jul 29, 2026
f4908cb
ci: pin managed reconciliation action
kushalpatil07 Jul 29, 2026
267e255
fix: attest current default and pull request delta
kushalpatil07 Jul 29, 2026
e172a68
ci: repin managed reconciliation action
kushalpatil07 Jul 29, 2026
b2f1209
fix: persist rejected reconciliation proofs
kushalpatil07 Jul 29, 2026
9704266
ci: repin reconciliation proof reporting
kushalpatil07 Jul 29, 2026
5eff39a
test: use detected default branch in reconciliation fixture
kushalpatil07 Jul 29, 2026
fb14d06
fix: attest exact code merge ancestry
kushalpatil07 Jul 29, 2026
af06588
ci: repin exact code merge proof
kushalpatil07 Jul 29, 2026
e9d22a9
feat: preserve collaborative audit provenance
kushalpatil07 Jul 29, 2026
df17589
ci: repin collaborative provenance audit
kushalpatil07 Jul 29, 2026
b7a7969
fix: report memory retry state truthfully
kushalpatil07 Jul 29, 2026
1d5b474
ci: repin truthful retry output
kushalpatil07 Jul 29, 2026
39e0753
feat: attest bounded exact-code evidence
kushalpatil07 Jul 29, 2026
64cfa2a
ci: pin exact-code evidence action
kushalpatil07 Jul 29, 2026
225c2cf
fix: leave actor working composition to server
kushalpatil07 Jul 29, 2026
86b8355
ci: repin server-composed working views
kushalpatil07 Jul 29, 2026
2c1e8a1
fix: derive anchor audit from exact evidence
kushalpatil07 Jul 29, 2026
f88edc0
ci: repin canonical evidence audit
kushalpatil07 Jul 29, 2026
3aa909a
Add automated repair provenance
kushalpatil07 Jul 29, 2026
8eae724
Pin repair provenance Action implementation
kushalpatil07 Jul 29, 2026
62b0a36
Separate agent sessions from graph evidence
kushalpatil07 Jul 29, 2026
c83d112
Handle closed child stdin in CLI checks
kushalpatil07 Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/reconcile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Reconcile Greplica memory

on:
workflow_call:
inputs:
managed-repo:
description: Managed Greplica repository UUID.
required: true
type: string
merge-sha:
description: Exact default-branch commit to audit.
required: true
type: string

permissions:
contents: read
id-token: write

concurrency:
group: greplica-memory-${{ github.repository }}-${{ inputs.merge-sha }}
cancel-in-progress: false

jobs:
reconcile:
name: Audit exact default-branch source
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
id-token: write
steps:
# Keep this immutable. The managed service separately allowlists this
# reusable workflow's signed job_workflow_sha.
- name: Reconcile Memory PRs
uses: Autoloops/greplica@3aa909a12be71cac2fe34a75a841e2969768224a
with:
managed-repo: ${{ inputs.managed-repo }}
merge-sha: ${{ inputs.merge-sha }}
# These trust endpoints are deliberately not caller-controlled: the
# Action sends its short-lived GitHub OIDC bearer to this API.
api-url: https://memory.autoloops.ai
oidc-audience: greplica-managed
62 changes: 58 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,55 @@ The link works for multiple GitHub users until an admin revokes it. Greplica nev

Replace `codex` with your agent platform. Login uses GitHub's browser device flow; do not share GitHub credentials or Greplica tokens. Interactive install can accept a matching invitation and automatically map a public fork to its upstream namespace. The GitHub App therefore does not need access to each contributor fork.

Organization admins and members inherit read access to every organization repository. Guests can read only explicitly granted repositories. Repository writes always require an explicit `memory_admin` grant; ordinary contributors remain read-only. Managed graph data stays on the server, while local SQLite stores only the repository binding, role cache, hook policy, and runtime session metadata.
Organization admins and members inherit read access to every organization repository. Guests can read only explicitly granted repositories. A `contributor` writes proposals to their own persistent personal working scope; `memory_admin` additionally manages repository memory access. Managed graph data stays on the server, while local SQLite stores only the repository binding, role cache, hook policy, and runtime session metadata.

Managed retrieval defaults to canonical `main` plus your own persistent working memory. Add other contributors explicitly when reviewing related work:

```bash
greplica graph context "How does authentication work?" \
--with-working alice \
--with-working bob
```

Context and generated graph views retain stable user IDs, current and historical GitHub logins, the full Git head/ref/dirty envelope, and every source origin when identical contributor drafts coalesce into one canonical object. Components, flows, and claims expose the same provenance badges and filters.

Managed GitHub repositories reconcile Memory PRs against exact default-branch code through the official reusable workflow. Pin the reusable workflow to a full commit SHA; do not use a branch or movable tag:

```yaml
name: Greplica memory

on:
push:
branches: [main] # Replace with the repository's default branch.
schedule:
- cron: "17 * * * *"
workflow_dispatch:

permissions:
contents: read
id-token: write

jobs:
reconcile-memory:
permissions:
contents: read
id-token: write
uses: Autoloops/greplica/.github/workflows/reconcile.yml@<full-40-character-commit-sha>
with:
managed-repo: <managed-repository-uuid>
merge-sha: ${{ github.sha }}
```

The push trigger reconciles immediately after default-branch updates; the hourly schedule retries unmatched and stalled work without a human memory-admin step. The workflow checks out `merge-sha` with full history, installs an immutable Greplica Action revision, proves that each code PR's recorded merge commit is contained in that exact checkout, audits every eligible Memory PR's version-keyed claim and component anchors (including code drift from stored baselines), and attests through GitHub OIDC. It does not use a repository or model secret.

When a compatible managed server requests repair evidence, the Action also submits a deterministic packet bound to that exact SHA. It reads only the anchors named by the selected claim and component versions—never a repository-wide content scan—and limits the packet to 128 anchors, 4 KiB and 80 lines per snippet, and 64 KiB of snippets total. Snippets can come only from regular blobs tracked at the attested commit, with the checkout bytes verified against that blob. Traversal is rejected; ignored/untracked files, symlinks, submodules, sensitive paths, binary or oversized files, and high-confidence credential content are represented only as non-content omissions. For evidence-enabled candidates, the version-keyed audit and fingerprints are derived from that same packet; omissions become explicit `unverifiable` failures rather than independently appearing clean. Managed repair may use only `resolved` or `file_only` entries whose transmitted snippet hash and current anchor fingerprint are present and valid. Older servers retain the prior attestation shape.

Managed Greplica must allowlist both signed reusable-workflow claims for the pinned revision:

- `job_workflow_ref=Autoloops/greplica/.github/workflows/reconcile.yml@<full-40-character-commit-sha>`
- `job_workflow_sha=<the-same-full-40-character-commit-sha>`

Those claims prove the trusted reusable workflow ran. A token issued directly to a consumer-authored workflow or a composite Action alone is not sufficient.

Local mode remains independent and does not require login or a server:

Expand Down Expand Up @@ -165,19 +213,25 @@ greplica install --mode managed [--platform codex|claude|copilot|cursor|opencode
greplica install --invite-link <url> --platform codex|claude|copilot|cursor|opencode|openhands|factory-droid|antigravity
greplica repo invite-link create|list
greplica repo invite-link revoke --link <uuid>
greplica repo invite-contributor --github-user <login>
greplica repo grant-contributor --user <managed-user-id>
greplica repo revoke-contributor --user <managed-user-id>
greplica logout
greplica whoami
greplica repo status
greplica config
greplica doctor [--check-embeddings]
greplica embeddings prewarm
greplica graph read
greplica graph context "<query>" [--debug]
greplica graph read [--with-working <login>...] [--memory-pr <id>] [--main-only] [--include-quarantined] [--json]
greplica graph context "<query>" [--with-working <login>...] [--memory-pr <id>] [--main-only] [--include-quarantined] [--json|--debug]
greplica graph audit anchors
greplica graph view [--out <file>] [--no-open]
greplica graph view [--with-working <login>...] [--memory-pr <id>] [--main-only] [--include-quarantined] [--json] [--out <file>] [--no-open]
greplica graph export <dir>
greplica proposal validate <proposal.json>
greplica proposal apply <proposal.json>
greplica proposal list|show
greplica memory pr list|show|context|retry
greplica memory status [--json]
greplica session mark-memory-current --session-ref <ref>
greplica transcript bundle --platform codex|claude|copilot|opencode --file <path> [--file <path>...] --out <bundle.md>
```
Expand Down
44 changes: 44 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Reconcile Greplica memory
description: Audit a Memory PR against an exact GitHub merge SHA and attest the result with GitHub OIDC.
inputs:
managed-repo:
description: Managed Greplica repository UUID.
required: true
merge-sha:
description: Exact merged/default-branch commit to check out and audit.
required: true
api-url:
description: Managed Greplica API URL.
required: false
default: https://memory.autoloops.ai
oidc-audience:
description: GitHub OIDC audience expected by the managed service.
required: false
default: greplica-managed
runs:
using: composite
steps:
- name: Check out exact merge commit
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: ${{ inputs.merge-sha }}
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: "22"
- name: Audit and attest Memory PR
shell: bash
env:
GREPLICA_ACTION_MANAGED_REPO: ${{ inputs.managed-repo }}
GREPLICA_ACTION_MERGE_SHA: ${{ inputs.merge-sha }}
GREPLICA_ACTION_API_URL: ${{ inputs.api-url }}
GREPLICA_ACTION_OIDC_AUDIENCE: ${{ inputs.oidc-audience }}
run: |
npm ci --prefix "$GITHUB_ACTION_PATH" --include=dev
npm run --prefix "$GITHUB_ACTION_PATH" build
node "$GITHUB_ACTION_PATH/dist/apps/cli/main.js" memory reconcile \
--managed-repo "$GREPLICA_ACTION_MANAGED_REPO" \
--merge-sha "$GREPLICA_ACTION_MERGE_SHA" \
--api-url "$GREPLICA_ACTION_API_URL" \
--oidc-audience "$GREPLICA_ACTION_OIDC_AUDIENCE"
Loading
Loading