portable-agent-layer 0.35.0 → 0.37.0
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 +2 -1
- package/assets/skills/analyze-pdf/tools/pdf-download.ts +1 -1
- package/assets/skills/analyze-youtube/tools/youtube-analyze.ts +1 -1
- package/assets/skills/consulting-report/tools/dev.ts +2 -2
- package/assets/skills/consulting-report/tools/generate-pdf.ts +9 -9
- package/assets/skills/consulting-report/tools/scaffold.ts +2 -2
- package/assets/skills/create-pdf/tools/md-to-html-pdf.ts +2 -2
- package/assets/skills/opinion/tools/opinion.ts +3 -2
- package/assets/skills/presentation/SKILL.md +1 -1
- package/assets/skills/presentation/tools/doctor.ts +2 -5
- package/assets/skills/presentation/tools/lib/inline.ts +6 -11
- package/assets/skills/presentation/tools/lib/lint-helpers.ts +2 -2
- package/assets/skills/presentation/tools/lib/lint-rules.ts +5 -2
- package/assets/skills/presentation/tools/setup-template.ts +10 -7
- package/assets/skills/projects/SKILL.md +44 -21
- package/assets/skills/research/tools/gemini-search.ts +2 -2
- package/assets/skills/research/tools/grok-search.ts +2 -2
- package/assets/skills/research/tools/perplexity-search.ts +2 -2
- package/assets/skills/telos/SKILL.md +7 -52
- package/assets/skills/telos/tools/update-telos.ts +0 -1
- package/assets/templates/PAL/ALGORITHM.md +54 -5
- package/assets/templates/PAL/PROJECT_LIFECYCLE.md +48 -0
- package/assets/templates/PAL/README.md +1 -1
- package/assets/templates/PAL/STEERING_RULES.md +4 -0
- package/assets/templates/PAL/SYSTEM_ARCHITECTURE.md +32 -17
- package/assets/templates/PAL/WORK_TRACKING.md +1 -1
- package/assets/templates/hooks.codex.json +44 -0
- package/assets/templates/hooks.cursor.json +11 -5
- package/assets/templates/pal-settings.json +1 -3
- package/assets/templates/settings.claude.json +2 -1
- package/package.json +2 -1
- package/src/cli/index.ts +112 -14
- package/src/cli/migrate.ts +299 -0
- package/src/cli/setup-identity.ts +3 -3
- package/src/cli/setup-telos.ts +12 -80
- package/src/hooks/CompactRecover.ts +11 -5
- package/src/hooks/LoadContext.ts +35 -11
- package/src/hooks/PreCompactPersist.ts +26 -34
- package/src/hooks/SecurityValidator.ts +43 -21
- package/src/hooks/StopOrchestrator.ts +4 -1
- package/src/hooks/UserPromptOrchestrator.ts +4 -2
- package/src/hooks/handlers/auto-graduate.ts +2 -2
- package/src/hooks/handlers/backup.ts +3 -3
- package/src/hooks/handlers/context-digests.ts +74 -0
- package/src/hooks/handlers/failure.ts +5 -3
- package/src/hooks/handlers/inject-retrieval.ts +29 -6
- package/src/hooks/handlers/persist-last-exchange.ts +76 -0
- package/src/hooks/handlers/rating.ts +2 -1
- package/src/hooks/handlers/readme-sync.ts +3 -2
- package/src/hooks/handlers/session-intelligence.ts +17 -93
- package/src/hooks/handlers/session-name.ts +2 -2
- package/src/hooks/handlers/synthesis.ts +5 -2
- package/src/hooks/handlers/update-counts.ts +3 -2
- package/src/hooks/lib/agent.ts +20 -18
- package/src/hooks/lib/claude-md.ts +69 -14
- package/src/hooks/lib/context.ts +92 -246
- package/src/hooks/lib/entities.ts +7 -7
- package/src/hooks/lib/frontmatter.ts +4 -4
- package/src/hooks/lib/graduation.ts +7 -6
- package/src/hooks/lib/inference.ts +6 -2
- package/src/hooks/lib/learning-category.ts +1 -1
- package/src/hooks/lib/learning-store.ts +6 -1
- package/src/hooks/lib/notify.ts +2 -2
- package/src/hooks/lib/opinions.ts +3 -3
- package/src/hooks/lib/paths.ts +2 -0
- package/src/hooks/lib/projects.ts +142 -74
- package/src/hooks/lib/readme-sync.ts +1 -1
- package/src/hooks/lib/relationship.ts +4 -16
- package/src/hooks/lib/retrieval-index.ts +5 -3
- package/src/hooks/lib/retrieval.ts +11 -12
- package/src/hooks/lib/security.ts +24 -18
- package/src/hooks/lib/semi-static.ts +188 -0
- package/src/hooks/lib/session-names.ts +1 -1
- package/src/hooks/lib/settings.ts +1 -1
- package/src/hooks/lib/setup.ts +2 -65
- package/src/hooks/lib/signals.ts +2 -2
- package/src/hooks/lib/stdin.ts +1 -1
- package/src/hooks/lib/stop.ts +16 -6
- package/src/hooks/lib/token-usage.ts +1 -2
- package/src/hooks/lib/transcript.ts +1 -1
- package/src/hooks/lib/wisdom.ts +5 -5
- package/src/hooks/lib/work-tracking.ts +8 -14
- package/src/targets/claude/uninstall.ts +1 -1
- package/src/targets/codex/install.ts +95 -0
- package/src/targets/codex/uninstall.ts +70 -0
- package/src/targets/copilot/install.ts +39 -8
- package/src/targets/copilot/uninstall.ts +58 -17
- package/src/targets/cursor/install.ts +8 -0
- package/src/targets/cursor/uninstall.ts +18 -1
- package/src/targets/lib.ts +166 -14
- package/src/targets/opencode/install.ts +29 -1
- package/src/targets/opencode/plugin.ts +23 -12
- package/src/targets/opencode/uninstall.ts +30 -3
- package/src/tools/agent/algorithm-reflect.ts +1 -1
- package/src/tools/agent/analyze.ts +18 -18
- package/src/tools/agent/handoff-note.ts +116 -0
- package/src/tools/agent/project.ts +375 -75
- package/src/tools/agent/relationship-note.ts +51 -0
- package/src/tools/agent/synthesize.ts +6 -42
- package/src/tools/agent/thread.ts +15 -14
- package/src/tools/agent/wisdom-frame.ts +9 -3
- package/src/tools/import.ts +1 -1
- package/src/tools/relationship-reflect.ts +15 -13
- package/src/tools/self-model.ts +23 -19
- package/src/tools/session-summary.ts +3 -3
- package/src/tools/token-cost.ts +15 -16
- package/assets/skills/telos/tools/update-projects.ts +0 -106
- package/assets/templates/telos/PROJECTS.md +0 -7
|
@@ -35,6 +35,20 @@ Thinking-only. No tool calls except context recovery (Grep/Glob/Read).
|
|
|
35
35
|
⏱️ EFFORT: [Standard | Extended | Advanced | Deep] — [one-line reason]
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
**0.5. ISA context** — before reverse engineering, orient against the ISA:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# If cwd matches a registered project — read its open ISCs:
|
|
42
|
+
bun ~/.pal/tools/project.ts list-isc <project-name>
|
|
43
|
+
|
|
44
|
+
# If this is ad-hoc work with no registered project — scaffold a task ISA:
|
|
45
|
+
bun ~/.pal/tools/project.ts scaffold-task-isa "<task title>"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Surface any open ISCs as live context: they are unfinished criteria from prior sessions. New criteria defined in this session extend them (use `add-isc`), not replace them.
|
|
49
|
+
|
|
50
|
+
**Off-topic detection:** if the task description references a different registered project than the cwd project (e.g., working on project-a while inside project-b's directory), use `AskUserQuestion` to ask which project the ISC belongs to before writing anything. `add-isc` takes a project name as its first argument, so routing to any project is a one-word change.
|
|
51
|
+
|
|
38
52
|
**1. Reverse engineer the request:**
|
|
39
53
|
|
|
40
54
|
🔎 REVERSE ENGINEERING:
|
|
@@ -206,19 +220,54 @@ bun ~/.pal/tools/algorithm-reflect.ts --task "description" --criteria N --passed
|
|
|
206
220
|
--q1 "self reflection" --q2 "algorithm reflection" --q3 "AI reflection"
|
|
207
221
|
```
|
|
208
222
|
|
|
209
|
-
**3.
|
|
223
|
+
**3. Relationship note** — write one Session entry capturing what was done this session:
|
|
210
224
|
|
|
211
225
|
```bash
|
|
212
|
-
bun ~/.pal/tools/
|
|
226
|
+
bun ~/.pal/tools/relationship-note.ts --b "description"
|
|
213
227
|
```
|
|
214
228
|
|
|
215
|
-
|
|
229
|
+
- 1-2 sentences, first-person, specific — name the actual system/file/concept worked on
|
|
230
|
+
- ✓ "Debugged the React Query cache split logic and resolved stuck message state in the onFinish callback"
|
|
231
|
+
- ✗ "Helped with memory improvements" — too vague, no system named
|
|
232
|
+
- Skip only if the session was a trivial lookup or typo fix (same rule as step 2)
|
|
233
|
+
|
|
234
|
+
**4. Handoff note** — if work is unfinished, write what remains so the next session can pick up immediately:
|
|
216
235
|
|
|
217
236
|
```bash
|
|
237
|
+
# Work still in progress:
|
|
238
|
+
bun ~/.pal/tools/handoff-note.ts --title "what we were doing" --text "what remains, decisions made, next steps"
|
|
239
|
+
|
|
240
|
+
# Work finished — clear any previous in-progress handoff:
|
|
241
|
+
bun ~/.pal/tools/handoff-note.ts --done --title "what we completed"
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
- Write if anything is left mid-flight: unfinished implementation, open decision, partially debugged issue
|
|
245
|
+
- Skip if the session fully resolved everything it set out to do
|
|
246
|
+
- `--text` should answer: what's next, what was decided, what to watch out for
|
|
247
|
+
|
|
248
|
+
**5. Open work** — close what this session finished; open what it didn't:
|
|
249
|
+
|
|
250
|
+
**Project work** — use ISCs, not threads:
|
|
251
|
+
```bash
|
|
252
|
+
# Close completed ISCs:
|
|
253
|
+
bun ~/.pal/tools/project.ts check-isc <project-name> <id>
|
|
254
|
+
|
|
255
|
+
# Open new ISCs for unfinished work:
|
|
256
|
+
bun ~/.pal/tools/project.ts add-isc <project-name> "what remains"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Task ISA (one-shot work)** — mark complete when done:
|
|
260
|
+
```bash
|
|
261
|
+
bun ~/.pal/tools/project.ts complete-task-isa <slug>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Cross-project or non-project follow-ups** — use threads:
|
|
265
|
+
```bash
|
|
266
|
+
bun ~/.pal/tools/thread.ts --add --title "brief title" --context "why it matters, what needs to happen"
|
|
218
267
|
bun ~/.pal/tools/thread.ts --resolve --id <id>
|
|
219
268
|
```
|
|
220
269
|
|
|
221
|
-
**
|
|
270
|
+
**6. Opinion capture** — scan the conversation for moments where the user:
|
|
222
271
|
- Confirmed something you did: "yes exactly", "keep doing that", "10 rated", accepted without pushback
|
|
223
272
|
- Corrected something you did: "no", "don't do that", "stop", "that's not what I meant"
|
|
224
273
|
- Revealed a preference by repeating a pattern (asked for concise answers twice, always checked PAI first, etc.)
|
|
@@ -237,7 +286,7 @@ bun ~/.pal/skills/opinion/tools/opinion.ts add "the preference" --category commu
|
|
|
237
286
|
|
|
238
287
|
Skip if nothing in the conversation touched preferences or working style.
|
|
239
288
|
|
|
240
|
-
**
|
|
289
|
+
**7. Wisdom Frame** (Extended+ only) — if the session produced a genuine, reusable insight:
|
|
241
290
|
|
|
242
291
|
```bash
|
|
243
292
|
bun ~/.pal/tools/wisdom-frame.ts --domain <domain> --observation "insight" [--type principle|contextual-rule|anti-pattern|evolution]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Project Lifecycle
|
|
2
|
+
|
|
3
|
+
You (the AI) own the project lifecycle. Project state lives in `~/.pal/memory/state/progress/{slug}.json`, one file per project, managed via `bun ~/.pal/tools/project.ts`. Active projects are auto-injected into every SessionStart context regardless of cwd.
|
|
4
|
+
|
|
5
|
+
## When to invoke the CLI
|
|
6
|
+
|
|
7
|
+
**Proactive registration.** When SessionStart context says `💡 cwd <path> is not yet registered; suggest registering if substantive work begins`, AND the user starts substantive work (not just "hi"), surface the suggestion conversationally before the second tool call: *"I see we're in `<basename>` and it's not registered yet — want me to add it as a project?"*
|
|
8
|
+
|
|
9
|
+
- **Default name** = the FULL last path segment of `cwd`, lowercased. For `/repos/portable-agent-layer` the default is `portable-agent-layer`. Never split on `-`.
|
|
10
|
+
- **Confirm before creating.** Never auto-create without explicit user approval ("yes", "do it", "register").
|
|
11
|
+
- **Capture objectives in conversation.** If the user accepts but doesn't volunteer objectives, ask one short question; or infer from the last few messages and confirm.
|
|
12
|
+
|
|
13
|
+
**Append as you go.** When the user describes plans, blockers, or decisions during normal work, invoke the relevant subcommand to keep state current — that's the dynamism this system is built for.
|
|
14
|
+
|
|
15
|
+
| user says | you call |
|
|
16
|
+
|---|---|
|
|
17
|
+
| "let's also add X" / "we should handle Y next" | `add-next <name> "..."` |
|
|
18
|
+
| "we're blocked on Z" / "Z is blocking this" | `add-blocker <name> "..."` |
|
|
19
|
+
| "the objective here is to ship X by Y" | `add-objective <name> "..."` |
|
|
20
|
+
| "the API base is at Z" / "tech stack is Bun + TS" — stable, reference-flavored facts | `add-fact <name> "..."` |
|
|
21
|
+
| "we decided to use A because B" | `add-decision <name> "A" "B"` |
|
|
22
|
+
| "let's pause this" / "shelve it" | `pause <name>` |
|
|
23
|
+
| "we shipped" / "this is done" | `complete <name>` |
|
|
24
|
+
|
|
25
|
+
**Don't** invoke for fleeting comments, hypotheticals, or things the user is just thinking through. Wait for a clear declarative ("let's add X", "Z is blocking us"), not a question or musing.
|
|
26
|
+
|
|
27
|
+
## When NOT to suggest registration
|
|
28
|
+
|
|
29
|
+
- cwd has no project marker (`.git`, `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, etc.) — it's a notes folder, not a project.
|
|
30
|
+
- The user is clearly browsing or doing a one-off task.
|
|
31
|
+
- An ancestor of multiple registered projects is the cwd (e.g. `~/Development/git/`) — that's browse mode by design.
|
|
32
|
+
- You're unsure. Err toward not registering.
|
|
33
|
+
|
|
34
|
+
## CLI cheat sheet
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
list show all projects
|
|
38
|
+
create [name] [--path PATH] [--objectives X] register (defaults: name=basename(cwd), path=cwd)
|
|
39
|
+
resume <name> print full project JSON
|
|
40
|
+
complete | archive | pause | unpause <name> change status
|
|
41
|
+
add-fact | add-objective | add-next | add-blocker <name> "text"
|
|
42
|
+
add-decision <name> "decision" "rationale"
|
|
43
|
+
add-handoff <name> "text"
|
|
44
|
+
rm-fact | rm-objective | rm-next | rm-blocker <name> <index>
|
|
45
|
+
rm <name> delete the project file (rare; prefer archive)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The Stop hook auto-touches `updated` (and optionally writes a `handoff`) whenever cwd resolves to an active project — you don't need to refresh timestamps manually.
|
|
@@ -21,7 +21,7 @@ PAL is a persistent, cross-platform, cross-agent layer for portable AI workflows
|
|
|
21
21
|
tools/ # Agent CLI tools (symlink → repo src/tools/agent/)
|
|
22
22
|
skills/ # Installed skills (symlinks → assets/skills/)
|
|
23
23
|
telos/ # User life context (TELOS)
|
|
24
|
-
MISSION.md, GOALS.md,
|
|
24
|
+
MISSION.md, GOALS.md, BELIEFS.md,
|
|
25
25
|
CHALLENGES.md, STRATEGIES.md, IDEAS.md, LEARNED.md,
|
|
26
26
|
MODELS.md, NARRATIVES.md
|
|
27
27
|
|
|
@@ -45,3 +45,7 @@ Correct: Review your recent actions → find the mistake → fix it → explain
|
|
|
45
45
|
**Act on what you know.** When tracked opinions or relationship notes reveal user preferences, apply them to your behavior. If you know the user prefers concise responses, be concise. If they prefer manual commits, never offer to commit.
|
|
46
46
|
Bad: Memory says user dislikes verbose summaries → you write a 3-paragraph recap after every change.
|
|
47
47
|
Correct: Memory says user dislikes verbose summaries → you keep the summary to one line.
|
|
48
|
+
|
|
49
|
+
**Don't trust, verify.** When adding a test or asserting a change works, prove it by making it fail first. A test that passes without ever being broken demonstrates nothing — it may be testing the wrong thing or nothing at all. Break it intentionally, confirm it fails for the right reason, then restore it.
|
|
50
|
+
Bad: Add a test, see it green, move on. The test may pass vacuously.
|
|
51
|
+
Correct: Add the test → run it green → break the code it covers → confirm it goes red → restore → now it's a real test.
|
|
@@ -233,6 +233,7 @@ Brief description.
|
|
|
233
233
|
│ │ - Work learning capture
|
|
234
234
|
│ │ - Failure logging
|
|
235
235
|
│ │ - Reflect trigger check
|
|
236
|
+
│ │ - Write context digests (semi-static sources)
|
|
236
237
|
│ │ - Auto-backup
|
|
237
238
|
│ │ - Count updates
|
|
238
239
|
│ │ - Tab reset
|
|
@@ -357,34 +358,44 @@ Relationship notes (O/B types)
|
|
|
357
358
|
|
|
358
359
|
## Context Loading Architecture
|
|
359
360
|
|
|
360
|
-
###
|
|
361
|
+
### Three-Tier Design
|
|
361
362
|
|
|
362
|
-
**
|
|
363
|
-
- CLAUDE.md — identity, modes, context routing table
|
|
364
|
-
- Loaded once
|
|
363
|
+
**Tier 1 — Operational** (loaded natively at agent startup):
|
|
364
|
+
- CLAUDE.md / AGENTS.md — identity, modes, context routing table
|
|
365
|
+
- Loaded once per session, always available, never re-fetched
|
|
365
366
|
|
|
366
|
-
**
|
|
367
|
-
-
|
|
368
|
-
-
|
|
367
|
+
**Tier 2 — Semi-static** (pre-compiled at previous session stop, loaded natively):
|
|
368
|
+
- Self-model, wisdom, opinions, synthesis, failures, steering rules
|
|
369
|
+
- Written to disk by `writeContextDigests()` at Stop time
|
|
370
|
+
- Loaded natively per-agent: `@imports` in CLAUDE.md (Claude Code), `instructions[]` in opencode config, `.mdc` rules in `~/.cursor/rules/` (Cursor), `.instructions.md` in `~/.copilot/instructions/` (Copilot)
|
|
371
|
+
- Content is global/user-level — safe to pre-compile (not project-scoped)
|
|
372
|
+
|
|
373
|
+
**Tier 3 — Dynamic** (injected fresh each session by LoadContext hook):
|
|
374
|
+
- Handoff notes, session intelligence, open threads, relationship notes, project history
|
|
375
|
+
- Changes per-session or is project-scoped — can't be pre-compiled
|
|
376
|
+
- Injected as `<system-reminder>` block via stdout
|
|
369
377
|
- Each section independently toggleable in `pal-settings.json → dynamicContext`
|
|
370
378
|
|
|
371
|
-
###
|
|
379
|
+
### Semi-Static Registry
|
|
380
|
+
|
|
381
|
+
All semi-static sources are defined in `src/hooks/lib/semi-static.ts` via `getSemiStaticSources()`. Adding one entry there propagates automatically to every consumer — no other files need to change.
|
|
382
|
+
|
|
383
|
+
### Dynamic Injection Order
|
|
372
384
|
|
|
373
385
|
```
|
|
374
386
|
LoadContext.ts
|
|
375
387
|
│
|
|
376
388
|
├─► Regenerate CLAUDE.md if template/telos changed
|
|
377
389
|
│
|
|
378
|
-
└─► Build system-reminder:
|
|
390
|
+
└─► Build system-reminder (dynamic sections only):
|
|
379
391
|
1. loadAtStartup files (user-configured)
|
|
380
|
-
2.
|
|
381
|
-
3.
|
|
382
|
-
4.
|
|
383
|
-
5.
|
|
384
|
-
6.
|
|
385
|
-
7.
|
|
386
|
-
8.
|
|
387
|
-
9. Active work summary (sessions + projects)
|
|
392
|
+
2. Handoff note (in-progress work from last session)
|
|
393
|
+
3. Session intelligence (rating trend, algorithm performance)
|
|
394
|
+
4. Open threads (current project only)
|
|
395
|
+
5. Recent interaction notes (last 2 days)
|
|
396
|
+
6. Active projects
|
|
397
|
+
7. Project session history (this project)
|
|
398
|
+
8. Signal trends (today/week/trend)
|
|
388
399
|
```
|
|
389
400
|
|
|
390
401
|
### On-Demand Context
|
|
@@ -436,6 +447,9 @@ src/targets/
|
|
|
436
447
|
├── cursor/ # Cursor specific
|
|
437
448
|
│ ├── install.ts # Register hooks + skills in ~/.cursor/
|
|
438
449
|
│ └── uninstall.ts
|
|
450
|
+
├── copilot/ # GitHub Copilot specific
|
|
451
|
+
│ ├── install.ts # Write instruction files + update VS Code settings
|
|
452
|
+
│ └── uninstall.ts
|
|
439
453
|
└── lib.ts # Shared: JSON read/write, settings merge, TELOS scaffold
|
|
440
454
|
```
|
|
441
455
|
|
|
@@ -452,6 +466,7 @@ All paths resolve through `src/hooks/lib/paths.ts`:
|
|
|
452
466
|
| Claude config | `~/.claude` | `PAL_CLAUDE_DIR` |
|
|
453
467
|
| opencode config | `~/.config/opencode` | `PAL_OPENCODE_DIR` |
|
|
454
468
|
| Cursor config | `~/.cursor` | `PAL_CURSOR_DIR` |
|
|
469
|
+
| Copilot config | `~/.copilot` | `PAL_COPILOT_DIR` |
|
|
455
470
|
| Codex config | `~/.codex` | `PAL_CODEX_DIR` |
|
|
456
471
|
| Agents dir | `~/.agents` | `PAL_AGENTS_DIR` |
|
|
457
472
|
|
|
@@ -4,4 +4,4 @@ PAL tracks your work across sessions in `memory/state/sessions.json` (auto-captu
|
|
|
4
4
|
|
|
5
5
|
## Projects
|
|
6
6
|
|
|
7
|
-
Projects are managed in
|
|
7
|
+
Projects are managed via the `/projects` skill. State lives in `~/.pal/memory/state/progress/{slug}.json`, one file per project. Inspect with `bun ~/.pal/tools/project.ts list`; manage via `~/.pal/docs/PROJECT_LIFECYCLE.md`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "PAL_AGENT=codex bun run {{PKG_ROOT}}/src/hooks/LoadContext.ts"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"UserPromptSubmit": [
|
|
14
|
+
{
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "PAL_AGENT=codex bun run {{PKG_ROOT}}/src/hooks/UserPromptOrchestrator.ts"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"PreToolUse": [
|
|
24
|
+
{
|
|
25
|
+
"hooks": [
|
|
26
|
+
{
|
|
27
|
+
"type": "command",
|
|
28
|
+
"command": "PAL_AGENT=codex bun run {{PKG_ROOT}}/src/hooks/SecurityValidator.ts"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"Stop": [
|
|
34
|
+
{
|
|
35
|
+
"hooks": [
|
|
36
|
+
{
|
|
37
|
+
"type": "command",
|
|
38
|
+
"command": "PAL_AGENT=codex bun run {{PKG_ROOT}}/src/hooks/StopOrchestrator.ts"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -4,29 +4,35 @@
|
|
|
4
4
|
"sessionStart": [
|
|
5
5
|
{
|
|
6
6
|
"type": "command",
|
|
7
|
-
"command": "bun run {{PKG_ROOT}}/src/hooks/LoadContext.ts"
|
|
7
|
+
"command": "PAL_AGENT=cursor bun run {{PKG_ROOT}}/src/hooks/LoadContext.ts"
|
|
8
8
|
}
|
|
9
9
|
],
|
|
10
10
|
"beforeSubmitPrompt": [
|
|
11
11
|
{
|
|
12
12
|
"type": "command",
|
|
13
|
-
"command": "bun run {{PKG_ROOT}}/src/hooks/UserPromptOrchestrator.ts"
|
|
13
|
+
"command": "PAL_AGENT=cursor bun run {{PKG_ROOT}}/src/hooks/UserPromptOrchestrator.ts"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"preToolUse": [
|
|
17
17
|
{
|
|
18
18
|
"type": "command",
|
|
19
|
-
"command": "bun run {{PKG_ROOT}}/src/hooks/SecurityValidator.ts"
|
|
19
|
+
"command": "PAL_AGENT=cursor bun run {{PKG_ROOT}}/src/hooks/SecurityValidator.ts"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "command",
|
|
23
|
-
"command": "bun run {{PKG_ROOT}}/src/hooks/SkillGuard.ts"
|
|
23
|
+
"command": "PAL_AGENT=cursor bun run {{PKG_ROOT}}/src/hooks/SkillGuard.ts"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"beforeShellExecution": [
|
|
27
|
+
{
|
|
28
|
+
"type": "command",
|
|
29
|
+
"command": "PAL_AGENT=cursor bun run {{PKG_ROOT}}/src/hooks/SecurityValidator.ts"
|
|
24
30
|
}
|
|
25
31
|
],
|
|
26
32
|
"stop": [
|
|
27
33
|
{
|
|
28
34
|
"type": "command",
|
|
29
|
-
"command": "bun run {{PKG_ROOT}}/src/hooks/StopOrchestrator.ts"
|
|
35
|
+
"command": "PAL_AGENT=cursor bun run {{PKG_ROOT}}/src/hooks/StopOrchestrator.ts"
|
|
30
36
|
}
|
|
31
37
|
]
|
|
32
38
|
}
|
|
@@ -13,9 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"loadAtStartup": {
|
|
15
15
|
"_docs": "Files force-loaded into session context at startup. Injected as <system-reminder> blocks.",
|
|
16
|
-
"files": [
|
|
17
|
-
"~/.pal/docs/STEERING_RULES.md"
|
|
18
|
-
]
|
|
16
|
+
"files": []
|
|
19
17
|
},
|
|
20
18
|
"dynamicContext": {
|
|
21
19
|
"_docs": "Dynamic context sections injected at session start. Set to false to disable.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "portable-agent-layer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "PAL — Portable Agent Layer: persistent personal context for AI coding assistants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"check": "biome check",
|
|
42
42
|
"check-write": "biome check --write",
|
|
43
43
|
"knip": "knip-bun",
|
|
44
|
+
"arch-check": "bun flint/cli.ts",
|
|
44
45
|
"lint-staged": "lint-staged",
|
|
45
46
|
"prepare": "bun .husky/install.mjs",
|
|
46
47
|
"install:all": "bun run src/cli/index.ts cli install",
|