@phyzess/pappra 0.0.0-stage → 0.1.0-beta.2
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/LICENSE +21 -0
- package/README.md +80 -2
- package/THIRD_PARTY_NOTICES.md +16 -0
- package/assets/integrations/skills/pappra/SKILL.md +68 -0
- package/assets/integrations/skills/pappra/references/hosts.md +30 -0
- package/assets/integrations/skills/pappra/references/lifecycle.md +37 -0
- package/assets/integrations/skills/pappra/references/operations.md +14 -0
- package/assets/manifest.json +4 -0
- package/dist/app/collaboration.d.ts +170 -0
- package/dist/app/collaboration.js +1650 -0
- package/dist/app/doctor.d.ts +9 -0
- package/dist/app/doctor.js +1030 -0
- package/dist/app/init.d.ts +143 -0
- package/dist/app/init.js +1111 -0
- package/dist/cli/commands/code.d.ts +16 -0
- package/dist/cli/commands/code.js +127 -0
- package/dist/cli/commands/collaboration.d.ts +13 -0
- package/dist/cli/commands/collaboration.js +186 -0
- package/dist/cli/commands/continuity.d.ts +29 -0
- package/dist/cli/commands/continuity.js +133 -0
- package/dist/cli/commands/docs.d.ts +11 -0
- package/dist/cli/commands/docs.js +133 -0
- package/dist/cli/commands/doctor.d.ts +14 -0
- package/dist/cli/commands/doctor.js +57 -0
- package/dist/cli/commands/host.d.ts +13 -0
- package/dist/cli/commands/host.js +125 -0
- package/dist/cli/commands/init.d.ts +51 -0
- package/dist/cli/commands/init.js +668 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +10 -0
- package/dist/cli/output.d.ts +4 -0
- package/dist/cli/output.js +1 -0
- package/dist/cli/run.d.ts +2 -0
- package/dist/cli/run.js +597 -0
- package/dist/code/budget.d.ts +14 -0
- package/dist/code/budget.js +39 -0
- package/dist/code/exec.d.ts +23 -0
- package/dist/code/exec.js +133 -0
- package/dist/code/identity.d.ts +13 -0
- package/dist/code/identity.js +214 -0
- package/dist/code/index.d.ts +6 -0
- package/dist/code/index.js +3 -0
- package/dist/code/providers/codegraph.d.ts +59 -0
- package/dist/code/providers/codegraph.js +567 -0
- package/dist/code/registration.d.ts +9 -0
- package/dist/code/registration.js +293 -0
- package/dist/code/service.d.ts +53 -0
- package/dist/code/service.js +633 -0
- package/dist/code/text.d.ts +3 -0
- package/dist/code/text.js +202 -0
- package/dist/collab/admission.d.ts +450 -0
- package/dist/collab/admission.js +797 -0
- package/dist/collab/canonical.d.ts +26 -0
- package/dist/collab/canonical.js +136 -0
- package/dist/collab/contracts.d.ts +73 -0
- package/dist/collab/contracts.js +76 -0
- package/dist/collab/envelope.d.ts +52 -0
- package/dist/collab/envelope.js +241 -0
- package/dist/collab/fingerprint.d.ts +7 -0
- package/dist/collab/fingerprint.js +58 -0
- package/dist/collab/handoff.d.ts +350 -0
- package/dist/collab/handoff.js +513 -0
- package/dist/collab/index.d.ts +9 -0
- package/dist/collab/index.js +8 -0
- package/dist/collab/lifecycle.d.ts +449 -0
- package/dist/collab/lifecycle.js +534 -0
- package/dist/collab/messages.d.ts +148 -0
- package/dist/collab/messages.js +583 -0
- package/dist/collab/notify.d.ts +47 -0
- package/dist/collab/notify.js +140 -0
- package/dist/collab/preflight.d.ts +31 -0
- package/dist/collab/preflight.js +271 -0
- package/dist/collab/resources.d.ts +119 -0
- package/dist/collab/resources.js +451 -0
- package/dist/collab/store.d.ts +143 -0
- package/dist/collab/store.js +606 -0
- package/dist/collab/types.d.ts +354 -0
- package/dist/collab/types.js +1 -0
- package/dist/collab/validation.d.ts +10 -0
- package/dist/collab/validation.js +303 -0
- package/dist/continuity/context.d.ts +24 -0
- package/dist/continuity/context.js +179 -0
- package/dist/continuity/index.d.ts +3 -0
- package/dist/continuity/index.js +1 -0
- package/dist/continuity/paths.d.ts +37 -0
- package/dist/continuity/paths.js +258 -0
- package/dist/continuity/service.d.ts +59 -0
- package/dist/continuity/service.js +1258 -0
- package/dist/hosts/claude/native.d.ts +79 -0
- package/dist/hosts/claude/native.js +853 -0
- package/dist/hosts/codex/native.d.ts +345 -0
- package/dist/hosts/codex/native.js +1528 -0
- package/dist/hosts/codex/protocol.d.ts +51 -0
- package/dist/hosts/codex/protocol.js +42 -0
- package/dist/hosts/detect.d.ts +28 -0
- package/dist/hosts/detect.js +73 -0
- package/dist/hosts/index.d.ts +10 -0
- package/dist/hosts/index.js +10 -0
- package/dist/hosts/integration/bundle.d.ts +16 -0
- package/dist/hosts/integration/bundle.js +81 -0
- package/dist/hosts/integration/hook-entry.d.ts +1 -0
- package/dist/hosts/integration/hook-entry.js +68 -0
- package/dist/hosts/integration/hook.d.ts +32 -0
- package/dist/hosts/integration/hook.js +781 -0
- package/dist/hosts/integration/pi-extension-runtime.d.ts +18 -0
- package/dist/hosts/integration/pi-extension-runtime.js +89 -0
- package/dist/hosts/integration/pi-template.d.ts +3 -0
- package/dist/hosts/integration/pi-template.js +5 -0
- package/dist/hosts/integration/service.d.ts +41 -0
- package/dist/hosts/integration/service.js +1381 -0
- package/dist/hosts/integration/support.d.ts +36 -0
- package/dist/hosts/integration/support.js +41 -0
- package/dist/hosts/integration/templates.d.ts +22 -0
- package/dist/hosts/integration/templates.js +70 -0
- package/dist/hosts/pi/protocol.d.ts +22 -0
- package/dist/hosts/pi/protocol.js +28 -0
- package/dist/hosts/pi/query-result.d.ts +22 -0
- package/dist/hosts/pi/query-result.js +710 -0
- package/dist/hosts/pi/rpc.d.ts +937 -0
- package/dist/hosts/pi/rpc.js +1621 -0
- package/dist/hosts/pilot.d.ts +485 -0
- package/dist/hosts/pilot.js +593 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/infra/fs.d.ts +27 -0
- package/dist/infra/fs.js +130 -0
- package/dist/infra/git.d.ts +60 -0
- package/dist/infra/git.js +358 -0
- package/dist/infra/owned-process-group.d.ts +173 -0
- package/dist/infra/owned-process-group.js +571 -0
- package/dist/install/apply.d.ts +65 -0
- package/dist/install/apply.js +663 -0
- package/dist/install/index.d.ts +5 -0
- package/dist/install/index.js +5 -0
- package/dist/install/ownership.d.ts +85 -0
- package/dist/install/ownership.js +430 -0
- package/dist/install/plan.d.ts +39 -0
- package/dist/install/plan.js +97 -0
- package/dist/install/rollback.d.ts +18 -0
- package/dist/install/rollback.js +544 -0
- package/dist/install/runtime.d.ts +76 -0
- package/dist/install/runtime.js +1145 -0
- package/dist/knowledge/catalog.d.ts +47 -0
- package/dist/knowledge/catalog.js +308 -0
- package/dist/knowledge/context.d.ts +28 -0
- package/dist/knowledge/context.js +61 -0
- package/dist/knowledge/index.d.ts +3 -0
- package/dist/knowledge/index.js +1 -0
- package/dist/knowledge/journal.d.ts +16 -0
- package/dist/knowledge/journal.js +109 -0
- package/dist/knowledge/lifecycle.d.ts +8 -0
- package/dist/knowledge/lifecycle.js +1001 -0
- package/dist/knowledge/paths.d.ts +37 -0
- package/dist/knowledge/paths.js +236 -0
- package/dist/knowledge/refs.d.ts +36 -0
- package/dist/knowledge/refs.js +267 -0
- package/dist/knowledge/service.d.ts +21 -0
- package/dist/knowledge/service.js +393 -0
- package/dist/knowledge/types.d.ts +171 -0
- package/dist/knowledge/types.js +1 -0
- package/dist/knowledge/write.d.ts +8 -0
- package/dist/knowledge/write.js +1223 -0
- package/dist/package-info.d.ts +6 -0
- package/dist/package-info.js +19 -0
- package/dist/schemas/code.d.ts +377 -0
- package/dist/schemas/code.js +145 -0
- package/dist/schemas/collaboration.d.ts +115 -0
- package/dist/schemas/collaboration.js +106 -0
- package/dist/schemas/continuity.d.ts +315 -0
- package/dist/schemas/continuity.js +199 -0
- package/dist/schemas/diagnostics.d.ts +28 -0
- package/dist/schemas/diagnostics.js +27 -0
- package/dist/schemas/doctor.d.ts +157 -0
- package/dist/schemas/doctor.js +75 -0
- package/dist/schemas/document.d.ts +644 -0
- package/dist/schemas/document.js +296 -0
- package/dist/schemas/errors.d.ts +177 -0
- package/dist/schemas/errors.js +176 -0
- package/dist/schemas/evidence.d.ts +24 -0
- package/dist/schemas/evidence.js +16 -0
- package/dist/schemas/host.d.ts +436 -0
- package/dist/schemas/host.js +201 -0
- package/dist/schemas/index.d.ts +15 -0
- package/dist/schemas/index.js +15 -0
- package/dist/schemas/init.d.ts +121 -0
- package/dist/schemas/init.js +94 -0
- package/dist/schemas/install.d.ts +213 -0
- package/dist/schemas/install.js +139 -0
- package/dist/schemas/machine.d.ts +43 -0
- package/dist/schemas/machine.js +96 -0
- package/dist/schemas/outcome.d.ts +23 -0
- package/dist/schemas/outcome.js +17 -0
- package/dist/schemas/paths.d.ts +19 -0
- package/dist/schemas/paths.js +63 -0
- package/dist/schemas/workspace.d.ts +120 -0
- package/dist/schemas/workspace.js +201 -0
- package/dist/workspace/config-file.d.ts +36 -0
- package/dist/workspace/config-file.js +237 -0
- package/dist/workspace/config.d.ts +28 -0
- package/dist/workspace/config.js +79 -0
- package/dist/workspace/discover.d.ts +34 -0
- package/dist/workspace/discover.js +195 -0
- package/dist/workspace/documents.d.ts +21 -0
- package/dist/workspace/documents.js +395 -0
- package/dist/workspace/ignore.d.ts +10 -0
- package/dist/workspace/ignore.js +48 -0
- package/dist/workspace/index.d.ts +7 -0
- package/dist/workspace/index.js +3 -0
- package/dist/workspace/repositories.d.ts +24 -0
- package/dist/workspace/repositories.js +411 -0
- package/dist/workspace/resolve.d.ts +24 -0
- package/dist/workspace/resolve.js +268 -0
- package/dist/workspace/types.d.ts +71 -0
- package/dist/workspace/types.js +1 -0
- package/dist/workspace/validation.d.ts +18 -0
- package/dist/workspace/validation.js +197 -0
- package/package.json +105 -4
- package/skills/pappra/SKILL.md +68 -0
- package/skills/pappra/references/hosts.md +30 -0
- package/skills/pappra/references/lifecycle.md +37 -0
- package/skills/pappra/references/operations.md +14 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pappra
|
|
3
|
+
description: Use Pappra workspace knowledge, checkpoint/resume, and selected-repository code intelligence from any supported coding agent. Use when a task needs durable handoff context, workspace documents, or bounded code navigation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pappra
|
|
7
|
+
|
|
8
|
+
Pappra keeps workspace knowledge, continuity, and code navigation outside the
|
|
9
|
+
host transcript. Use the installed `pappra` CLI for durable operations; hooks
|
|
10
|
+
only record bounded lifecycle observations and never start a model, download,
|
|
11
|
+
index, or new writer.
|
|
12
|
+
|
|
13
|
+
## Start here
|
|
14
|
+
|
|
15
|
+
1. Read `references/lifecycle.md` before relying on a host lifecycle event.
|
|
16
|
+
2. Read `references/hosts.md` when the host surface is Pi, Codex, or Claude.
|
|
17
|
+
3. Use `pappra checkpoint` / `pappra resume` for handoffs. A stored checkpoint
|
|
18
|
+
is context, not permission to execute or to trust a previous session.
|
|
19
|
+
4. Use `pappra docs` and `pappra code` only for the workspace selected by the
|
|
20
|
+
current root. Never infer a workspace from an unrelated session.
|
|
21
|
+
5. For a new bounded collaboration request, build an explicit
|
|
22
|
+
`pappra/collaboration-goal/1` from the user's objective and named choices,
|
|
23
|
+
run `pappra collab prepare --goal <file> --domain-root <dir>`, admit against a fresh capability
|
|
24
|
+
card, then use `pappra collab run` with the reviewed controller. Never turn
|
|
25
|
+
prose into identity, approval, or capability claims.
|
|
26
|
+
|
|
27
|
+
## One-request collaboration
|
|
28
|
+
|
|
29
|
+
`pappra collab prepare --goal <file> --domain-root <dir>` requires an explicit
|
|
30
|
+
shared domain. It validates the canonical domain/tasks/task/private namespace
|
|
31
|
+
before writing any task metadata and again around each write, so a task-root or
|
|
32
|
+
mid-write directory redirect fails closed instead of scattering artifacts. It
|
|
33
|
+
then writes a private task record, assignment, prompt, and resource claims; read
|
|
34
|
+
resources stay read claims. The captured identities also guard live query, finish, disposal and lower RPC artifact writes; after a redirect, no new query/execution/proof/current-result pathname is written. `pappra collab run` requires an explicit `--controller <fixture|pi-rpc>`,
|
|
35
|
+
performs the single admitted launch, and accepts bounded
|
|
36
|
+
`pappra/collaboration-command/1` JSONL on stdin; it emits
|
|
37
|
+
`pappra/collaboration-event/1` JSONL. `query` reads persisted history only and
|
|
38
|
+
reports live ownership as unknown. A `finish` produces one deterministic REPORT;
|
|
39
|
+
only a result whose stored classification was `applied` for the same fixed
|
|
40
|
+
identity/attempt/input may repeat successfully as a duplicate — repeated
|
|
41
|
+
rejections stay rejected. Cancel records and validates intent first: a denied
|
|
42
|
+
intent never calls the native controller. Claims are retained and stop proof is
|
|
43
|
+
never invented.
|
|
44
|
+
|
|
45
|
+
Use `--controller fixture` only for deterministic, no-model tests; it is a
|
|
46
|
+
restricted explicit fixture, never a silent default. The optional `pi-rpc` controller
|
|
47
|
+
uses the existing owned Pi RPC daily path and preserves required skills, tools,
|
|
48
|
+
MCP, hooks, and model settings; missing capabilities or stale/forged admission
|
|
49
|
+
fail before launch. A native run reports only the current prompt-correlated
|
|
50
|
+
result: terminal success requires a supported terminal reason and no pending
|
|
51
|
+
tool call, so text-plus-toolUse/intermediate, tool-only, empty, old, malformed or
|
|
52
|
+
missing answers are `unknown`; an explicit error is `failed` and an abort is
|
|
53
|
+
`cancelled`. The current result must be published as validated
|
|
54
|
+
`native-current-result/1` evidence; EIO/conflict/symlink/partial publication
|
|
55
|
+
makes delivery `unknown`, not success, and repeated finish reuses verified
|
|
56
|
+
content instead of overwriting it. A clean transport exit is not task success.
|
|
57
|
+
No approval is auto-answered, no cancel is inferred from an acknowledgement, and no new thread or
|
|
58
|
+
arbitrary PID is adopted. Do not launch a model or real user session without
|
|
59
|
+
the task's explicit authorization.
|
|
60
|
+
|
|
61
|
+
## Boundaries
|
|
62
|
+
|
|
63
|
+
- Hooks are local and bounded. They do not read transcripts, run commands,
|
|
64
|
+
call models, fetch the network, or continue a conversation.
|
|
65
|
+
- Missing semantic context stays missing; do not fabricate summaries.
|
|
66
|
+
- Treat unknown ownership, stale bundles, untrusted hooks, and changed host
|
|
67
|
+
versions as visible conditions, not silent fallbacks.
|
|
68
|
+
- Preserve user settings and unrelated keys when integrating a host.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Host surfaces
|
|
2
|
+
|
|
3
|
+
## Pi
|
|
4
|
+
|
|
5
|
+
The integration installs a project extension plus a copied `pappra` skill.
|
|
6
|
+
Pi extensions run with host permissions. Load only a trusted copy from this
|
|
7
|
+
workspace/target; the generated entrypoint imports the fixed Pappra runtime by
|
|
8
|
+
absolute file URL and registers lifecycle handlers only.
|
|
9
|
+
|
|
10
|
+
## Codex
|
|
11
|
+
|
|
12
|
+
The integration installs a command-hook entry and merges only Pappra-owned
|
|
13
|
+
entries into `hooks.json`. Existing hooks and unrelated keys are preserved.
|
|
14
|
+
Codex hook definitions are trusted individually; installation is not trust.
|
|
15
|
+
Observed 0.163.0 hook keys do not include a compact event, so compact and
|
|
16
|
+
automatic checkpoint requests remain unsupported.
|
|
17
|
+
|
|
18
|
+
## Claude Code
|
|
19
|
+
|
|
20
|
+
The integration installs a command-hook entry and merges only Pappra-owned
|
|
21
|
+
entries into `settings.json`. `SessionStart` and `PostCompact` are distinct;
|
|
22
|
+
matchers, trust, timeout, and output behavior remain host/version-specific.
|
|
23
|
+
Installing a command is not proof it ran.
|
|
24
|
+
|
|
25
|
+
## Common safety
|
|
26
|
+
|
|
27
|
+
All surfaces use the event's canonical cwd/root, bounded stdin, a one-second
|
|
28
|
+
local deadline, no transcript reads, no arbitrary configured commands, and no
|
|
29
|
+
network/model/index/session side effects. Paths with spaces or Unicode are
|
|
30
|
+
passed as argv/file URLs, never interpolated into a shell.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Lifecycle reference
|
|
2
|
+
|
|
3
|
+
## Supported mapping
|
|
4
|
+
|
|
5
|
+
Pappra distinguishes four local lifecycle intents:
|
|
6
|
+
|
|
7
|
+
| Intent | Pi | Codex | Claude |
|
|
8
|
+
| -------------------- | ---------------------------- | ------------------------------------------ | ------------------------------------------ |
|
|
9
|
+
| `startup` | `session_start` | `SessionStart` with source `startup`/`new` | `SessionStart` with source `startup`/`new` |
|
|
10
|
+
| `resume` | `session_start` | `SessionStart` with source `resume` | `SessionStart` with source `resume` |
|
|
11
|
+
| `compact` | `session_before_compact` | unsupported in observed 0.163.0 hook keys | `PostCompact` |
|
|
12
|
+
| `checkpoint-request` | explicit Pappra command/hook | unsupported automatic event | unsupported automatic event |
|
|
13
|
+
|
|
14
|
+
The matrix is version-specific. A host version outside the observed support
|
|
15
|
+
range is `unsupported`/`unknown`, not a fallback to name similarity.
|
|
16
|
+
|
|
17
|
+
## What a hook does
|
|
18
|
+
|
|
19
|
+
A hook validates the host payload, resolves the current workspace from the
|
|
20
|
+
event cwd (never from a last-session cache), derives a bounded event identity,
|
|
21
|
+
suppresses a duplicate identity, and records a private local event observation.
|
|
22
|
+
It may print a short advisory context. It never starts a model, fetches,
|
|
23
|
+
indexes, runs arbitrary commands, creates a new agent, or writes a checkpoint
|
|
24
|
+
with invented semantics.
|
|
25
|
+
|
|
26
|
+
## Manual continuity
|
|
27
|
+
|
|
28
|
+
`pappra checkpoint --task <id> ...` and `pappra resume <id>` remain available
|
|
29
|
+
without hooks. A hook observation is not a checkpoint and does not grant
|
|
30
|
+
`executionAllowed`. A resume packet is read-only context; an unknown or
|
|
31
|
+
non-stopped writer fails closed.
|
|
32
|
+
|
|
33
|
+
## Reload and trust
|
|
34
|
+
|
|
35
|
+
Installing files does not prove the host loaded them or trusted their exact
|
|
36
|
+
definition. Report reload-needed and trust-needed separately. Do not approve a
|
|
37
|
+
host trust prompt on the user's behalf.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Operations reference
|
|
2
|
+
|
|
3
|
+
- `pappra init` plans or applies workspace configuration.
|
|
4
|
+
- `pappra doctor` is passive: it does not install hooks, start hosts, or fix
|
|
5
|
+
state.
|
|
6
|
+
- `pappra checkpoint` writes a task checkpoint; `pappra resume` reads a
|
|
7
|
+
stored snapshot and reports whether execution is allowed.
|
|
8
|
+
- `pappra docs` manages knowledge documents.
|
|
9
|
+
- `pappra code` operates on an explicitly selected repository and keeps
|
|
10
|
+
index mutations behind an explicit `--apply`.
|
|
11
|
+
|
|
12
|
+
Preserve user bytes. If an operation reports a conflict or residual path,
|
|
13
|
+
inspect that path and resolve ownership before retrying. Never delete an
|
|
14
|
+
unknown file to make a retry succeed.
|