create-egregore 0.19.8 → 0.19.12
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/assets/egregore-launcher.js +266 -4
- package/lib/local.js +11 -1
- package/lib/setup.js +33 -0
- package/package.json +2 -2
- package/runtime/codex/.codex/hooks/branch-guard.js +242 -34
- package/runtime/codex/.codex/skills/activity/SKILL.md +18 -6
- package/runtime/codex/.codex/skills/deep-reflect/SKILL.md +90 -55
- package/runtime/codex/.codex/skills/deploy-bridge/SKILL.md +25 -0
- package/runtime/codex/.codex/skills/handoff/SKILL.md +6 -2
- package/runtime/codex/.codex/skills/save/SKILL.md +29 -5
- package/runtime/codex/.codex/skills/scroll/SKILL.md +54 -3
- package/runtime/codex/.codex/skills/task/SKILL.md +25 -0
- package/runtime/codex/.codex/skills/tui-design/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/wrap/SKILL.md +4 -1
- package/runtime/codex/.codex/spec-manifest.json +19 -7
- package/runtime/codex/AGENTS.md +63 -19
- package/runtime/codex/bin/activity-data.sh +1 -1
- package/runtime/codex/bin/agent.sh +88 -25
- package/runtime/codex/bin/attendant.sh +525 -0
- package/runtime/codex/bin/capture-reconcile.sh +67 -0
- package/runtime/codex/bin/capture-run.sh +341 -0
- package/runtime/codex/bin/codex-render-spec.mjs +29 -14
- package/runtime/codex/bin/codex-session-start.sh +49 -4
- package/runtime/codex/bin/codex-skill-render.mjs +23 -4
- package/runtime/codex/bin/graph-op.sh +719 -49
- package/runtime/codex/bin/graph-wal.sh +3 -2
- package/runtime/codex/bin/handoff-run.sh +72 -0
- package/runtime/codex/bin/handoff-save-egregore.sh +51 -11
- package/runtime/codex/bin/index-handoff.sh +26 -17
- package/runtime/codex/bin/ingest-graph.sh +80 -0
- package/runtime/codex/bin/ingest-surface.html +429 -0
- package/runtime/codex/bin/ingest.py +614 -0
- package/runtime/codex/bin/ingest.sh +231 -0
- package/runtime/codex/bin/ingest_graph.py +776 -0
- package/runtime/codex/bin/ingest_surface.py +464 -0
- package/runtime/codex/bin/lib/git-sync.sh +2 -6
- package/runtime/codex/bin/lib/greeting.sh +157 -22
- package/runtime/codex/bin/lib/identity.sh +50 -29
- package/runtime/codex/bin/lib/noncode.sh +31 -0
- package/runtime/codex/bin/person.py +610 -0
- package/runtime/codex/bin/person.sh +448 -0
- package/runtime/codex/bin/session-autosave.sh +184 -0
- package/runtime/codex/bin/session-log.sh +199 -0
- package/runtime/codex/bin/settings.sh +1 -1
- package/runtime/codex/manifest.json +19 -1
- package/runtime/pi/.codex/hooks/branch-guard.js +242 -34
- package/runtime/pi/.codex/skills/activity/SKILL.md +18 -6
- package/runtime/pi/.codex/skills/deep-reflect/SKILL.md +90 -55
- package/runtime/pi/.codex/skills/deploy-bridge/SKILL.md +25 -0
- package/runtime/pi/.codex/skills/handoff/SKILL.md +6 -2
- package/runtime/pi/.codex/skills/save/SKILL.md +29 -5
- package/runtime/pi/.codex/skills/scroll/SKILL.md +54 -3
- package/runtime/pi/.codex/skills/task/SKILL.md +25 -0
- package/runtime/pi/.codex/skills/tui-design/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/wrap/SKILL.md +4 -1
- package/runtime/pi/.codex/spec-manifest.json +19 -7
- package/runtime/pi/.pi/APPEND_SYSTEM.md +57 -14
- package/runtime/pi/.pi/extensions/egregore.ts +98 -8
- package/runtime/pi/.pi/spec-manifest.json +2 -2
- package/runtime/pi/AGENTS.md +63 -19
- package/runtime/pi/bin/activity-data.sh +1 -1
- package/runtime/pi/bin/agent.sh +88 -25
- package/runtime/pi/bin/attendant.sh +525 -0
- package/runtime/pi/bin/capture-reconcile.sh +67 -0
- package/runtime/pi/bin/capture-run.sh +341 -0
- package/runtime/pi/bin/codex-render-spec.mjs +29 -14
- package/runtime/pi/bin/codex-session-start.sh +49 -4
- package/runtime/pi/bin/codex-skill-render.mjs +23 -4
- package/runtime/pi/bin/graph-op.sh +719 -49
- package/runtime/pi/bin/graph-wal.sh +3 -2
- package/runtime/pi/bin/handoff-run.sh +72 -0
- package/runtime/pi/bin/handoff-save-egregore.sh +51 -11
- package/runtime/pi/bin/index-handoff.sh +26 -17
- package/runtime/pi/bin/ingest-graph.sh +80 -0
- package/runtime/pi/bin/ingest-surface.html +429 -0
- package/runtime/pi/bin/ingest.py +614 -0
- package/runtime/pi/bin/ingest.sh +231 -0
- package/runtime/pi/bin/ingest_graph.py +776 -0
- package/runtime/pi/bin/ingest_surface.py +464 -0
- package/runtime/pi/bin/lib/git-sync.sh +2 -6
- package/runtime/pi/bin/lib/greeting.sh +157 -22
- package/runtime/pi/bin/lib/identity.sh +50 -29
- package/runtime/pi/bin/lib/noncode.sh +31 -0
- package/runtime/pi/bin/person.py +610 -0
- package/runtime/pi/bin/person.sh +448 -0
- package/runtime/pi/bin/pi-branch-policy.mjs +164 -4
- package/runtime/pi/bin/pi-product-workflows.mjs +31 -2
- package/runtime/pi/bin/publish-artifact.sh +14 -0
- package/runtime/pi/bin/session-autosave.sh +184 -0
- package/runtime/pi/bin/session-log.sh +199 -0
- package/runtime/pi/bin/settings.sh +274 -0
- package/runtime/pi/manifest.json +20 -1
package/runtime/pi/bin/agent.sh
CHANGED
|
@@ -32,9 +32,13 @@ Runtime-neutral commands:
|
|
|
32
32
|
Hybrid recall over shared memory (qmd)
|
|
33
33
|
people List known people from memory/people
|
|
34
34
|
branch --topic TEXT Create or reuse a task branch/worktree
|
|
35
|
-
save [--message TEXT]
|
|
35
|
+
save [--message TEXT] [--pr-body TEXT|--pr-body-file PATH]
|
|
36
|
+
Commit and push current repo + memory changes;
|
|
37
|
+
PR body follows .claude/context/pr-format.md
|
|
38
|
+
(auto-generated skeleton if not provided)
|
|
36
39
|
wrap --topic T --summary TEXT Write a session wrap to memory/wraps
|
|
37
|
-
handoff --from A --to B --topic T [--
|
|
40
|
+
handoff --from A --to B --topic T [--intent action|feedback|fyi]
|
|
41
|
+
[--body TEXT|--body-file PATH] [--no-push] [--no-publish] [--no-notify] [--json]
|
|
38
42
|
ask --from A --to B --topic T --question TEXT [--no-push]
|
|
39
43
|
[--harvest-id ID --harvest-session-id ID --turn N
|
|
40
44
|
--question-intent TEXT --context-mode blind|disclosed|comparative]
|
|
@@ -331,13 +335,26 @@ ensure_working_branch() {
|
|
|
331
335
|
echo "$branch"
|
|
332
336
|
}
|
|
333
337
|
|
|
338
|
+
build_pr_body() {
|
|
339
|
+
# Compliant fallback PR body (spec: .claude/context/pr-format.md) built
|
|
340
|
+
# from the commit log + diff when the calling agent supplies none.
|
|
341
|
+
local topic="${1:-portable save}" commits stat
|
|
342
|
+
commits="$(git -C "$SCRIPT_DIR" log --pretty='- %s' "origin/develop..HEAD" 2>/dev/null | head -8)"
|
|
343
|
+
[ -n "$commits" ] || commits="- (commit list unavailable — see the Files tab)"
|
|
344
|
+
stat="$(git -C "$SCRIPT_DIR" diff --shortstat "origin/develop...HEAD" 2>/dev/null | sed 's/^ *//')"
|
|
345
|
+
printf '## What\n%s\n\n## Why\nShell-agent session save — topic: %s. Body auto-generated by bin/agent.sh; pass --pr-body for a hand-written description.\n\n## Verification\nNot verified — auto-generated skeleton; review the diff before merging.%s\n\n🤖 Saved via bin/agent.sh\n' \
|
|
346
|
+
"$commits" "$topic" "${stat:+ ($stat)}"
|
|
347
|
+
}
|
|
348
|
+
|
|
334
349
|
cmd_save() {
|
|
335
|
-
local message="" topic="" no_pr=0 branch pushed="false" committed="false" pr_url="" existing_pr=""
|
|
350
|
+
local message="" topic="" no_pr=0 branch pushed="false" committed="false" pr_url="" existing_pr="" pr_number="" non_md="" merged="false" pr_body="" pr_body_file=""
|
|
336
351
|
|
|
337
352
|
while [ $# -gt 0 ]; do
|
|
338
353
|
case "$1" in
|
|
339
354
|
--message|-m) message="${2:-}"; shift 2 ;;
|
|
340
355
|
--topic) topic="${2:-}"; shift 2 ;;
|
|
356
|
+
--pr-body) pr_body="${2:-}"; shift 2 ;;
|
|
357
|
+
--pr-body-file) pr_body_file="${2:-}"; shift 2 ;;
|
|
341
358
|
--no-pr) no_pr=1; shift ;;
|
|
342
359
|
*) die "unknown save option: $1" ;;
|
|
343
360
|
esac
|
|
@@ -375,7 +392,31 @@ cmd_save() {
|
|
|
375
392
|
if [ -n "$existing_pr" ]; then
|
|
376
393
|
pr_url="$existing_pr"
|
|
377
394
|
else
|
|
378
|
-
|
|
395
|
+
if [ -z "$pr_body" ] && [ -n "$pr_body_file" ] && [ -f "$pr_body_file" ]; then
|
|
396
|
+
pr_body="$(cat "$pr_body_file")"
|
|
397
|
+
fi
|
|
398
|
+
[ -n "$pr_body" ] || pr_body="$(build_pr_body "$topic")"
|
|
399
|
+
pr_url="$(gh pr create --base develop --head "$branch" --title "$message" --body "$pr_body" 2>/dev/null || true)"
|
|
400
|
+
fi
|
|
401
|
+
fi
|
|
402
|
+
|
|
403
|
+
# Non-coding saves auto-merge to develop (same rule as /save and the
|
|
404
|
+
# handoff helper; policy in bin/lib/noncode.sh). `--auto` needs repo
|
|
405
|
+
# auto-merge + pending required checks; without branch protection it always
|
|
406
|
+
# errors, so fall back to a direct merge.
|
|
407
|
+
if [ -n "$pr_url" ]; then
|
|
408
|
+
# shellcheck source=bin/lib/noncode.sh
|
|
409
|
+
. "$SCRIPT_DIR/bin/lib/noncode.sh" 2>/dev/null || true
|
|
410
|
+
type noncode_blockers >/dev/null 2>&1 || noncode_blockers() {
|
|
411
|
+
git -C "${2:-.}" diff "${1:-origin/develop}...HEAD" --name-only 2>/dev/null | grep -v '\.md$' | head -1 || true
|
|
412
|
+
}
|
|
413
|
+
pr_number="${pr_url##*/}"
|
|
414
|
+
non_code="$(noncode_blockers origin/develop "$SCRIPT_DIR")"
|
|
415
|
+
if [ -z "$non_code" ] && [ -n "$pr_number" ]; then
|
|
416
|
+
if gh pr merge "$pr_number" --auto --merge >/dev/null 2>&1 \
|
|
417
|
+
|| gh pr merge "$pr_number" --merge >/dev/null 2>&1; then
|
|
418
|
+
merged="true"
|
|
419
|
+
fi
|
|
379
420
|
fi
|
|
380
421
|
fi
|
|
381
422
|
|
|
@@ -383,6 +424,7 @@ cmd_save() {
|
|
|
383
424
|
echo "commit: $committed"
|
|
384
425
|
echo "push: $pushed"
|
|
385
426
|
[ -n "$pr_url" ] && echo "pr: $pr_url"
|
|
427
|
+
[ "$merged" = "true" ] && echo "merge: non-coding, merged to develop"
|
|
386
428
|
return 0
|
|
387
429
|
}
|
|
388
430
|
|
|
@@ -413,31 +455,38 @@ cmd_wrap() {
|
|
|
413
455
|
fi
|
|
414
456
|
[ -n "$body" ] || body="$summary"
|
|
415
457
|
|
|
416
|
-
local
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
458
|
+
local tmpd result rel session_id branch
|
|
459
|
+
local capture_args=(--mode personal)
|
|
460
|
+
tmpd="$(mktemp -d -t egregore-agent-wrap-XXXXXX)"
|
|
461
|
+
trap 'rm -rf "$tmpd"' RETURN
|
|
462
|
+
session_id="$(cat "$SCRIPT_DIR/.egregore-session-id" 2>/dev/null || true)"
|
|
463
|
+
branch="$(git -C "$SCRIPT_DIR" branch --show-current 2>/dev/null || true)"
|
|
464
|
+
[ "$no_push" = "1" ] && capture_args+=(--no-push)
|
|
465
|
+
|
|
466
|
+
printf '%s\n' "$body" |
|
|
467
|
+
TMPDIR="$tmpd" bash "$SCRIPT_DIR/bin/capture-run.sh" \
|
|
468
|
+
"${capture_args[@]}" \
|
|
469
|
+
--author "$from" \
|
|
470
|
+
--topic "$topic" \
|
|
471
|
+
--summary "$summary" \
|
|
472
|
+
--session-id "$session_id" \
|
|
473
|
+
--branch "$branch" >/dev/null
|
|
474
|
+
|
|
475
|
+
result="$tmpd/capture-run-result.json"
|
|
476
|
+
rel="$(jq -r '.file // empty' "$result" 2>/dev/null || true)"
|
|
477
|
+
[ -n "$rel" ] || die "wrap was not created"
|
|
435
478
|
echo "wrap: memory/$rel"
|
|
479
|
+
|
|
480
|
+
# Session close: non-coding core-repo changes save + merge themselves
|
|
481
|
+
# (gated inside session-autosave.sh — code is never auto-committed).
|
|
482
|
+
if [ "$no_push" = "0" ]; then
|
|
483
|
+
( bash "$SCRIPT_DIR/bin/session-autosave.sh" --dir "$SCRIPT_DIR" >/dev/null 2>&1 & ) >/dev/null 2>&1
|
|
484
|
+
fi
|
|
436
485
|
}
|
|
437
486
|
|
|
438
487
|
cmd_handoff() {
|
|
439
488
|
ensure_memory
|
|
440
|
-
local from="" to="" topic="" body="" body_file="" project=""
|
|
489
|
+
local from="" to="" topic="" body="" body_file="" project="" intent="action"
|
|
441
490
|
local no_publish=0 no_notify=0 json=0
|
|
442
491
|
NO_PUSH=0
|
|
443
492
|
|
|
@@ -449,6 +498,7 @@ cmd_handoff() {
|
|
|
449
498
|
--body) body="${2:-}"; shift 2 ;;
|
|
450
499
|
--body-file) body_file="${2:-}"; shift 2 ;;
|
|
451
500
|
--project) project="${2:-}"; shift 2 ;;
|
|
501
|
+
--intent) intent="${2:-}"; shift 2 ;;
|
|
452
502
|
--no-push) NO_PUSH=1; shift ;;
|
|
453
503
|
--no-publish) no_publish=1; shift ;;
|
|
454
504
|
--no-notify) no_notify=1; shift ;;
|
|
@@ -460,6 +510,10 @@ cmd_handoff() {
|
|
|
460
510
|
[ -z "$from" ] && from="$(person_from_state)"
|
|
461
511
|
[ -n "$from" ] || die "handoff requires --from"
|
|
462
512
|
[ -n "$topic" ] || die "handoff requires --topic"
|
|
513
|
+
case "$intent" in
|
|
514
|
+
action|feedback|fyi) ;;
|
|
515
|
+
*) die "invalid --intent: $intent (action|feedback|fyi)" ;;
|
|
516
|
+
esac
|
|
463
517
|
if [ -n "$body_file" ]; then
|
|
464
518
|
[ -f "$body_file" ] || die "body file not found: $body_file"
|
|
465
519
|
body="$(cat "$body_file")"
|
|
@@ -480,6 +534,7 @@ cmd_handoff() {
|
|
|
480
534
|
[ -n "$project" ] && project_line="**Project**: $project"
|
|
481
535
|
[ -n "$to" ] && handoff_args+=(--recipient "$to")
|
|
482
536
|
[ -n "$project" ] && handoff_args+=(--project "$project")
|
|
537
|
+
handoff_args+=(--intent "$intent")
|
|
483
538
|
[ "$NO_PUSH" = "1" ] && handoff_args+=(--no-push)
|
|
484
539
|
[ "$no_publish" = "1" ] && handoff_args+=(--no-publish)
|
|
485
540
|
[ "$no_notify" = "1" ] && handoff_args+=(--no-notify)
|
|
@@ -489,10 +544,12 @@ cmd_handoff() {
|
|
|
489
544
|
printf '**Date**: %s\n' "$today"
|
|
490
545
|
printf '**Author**: %s\n' "$from"
|
|
491
546
|
[ -n "$to" ] && printf '**To**: %s\n' "$to"
|
|
547
|
+
printf '**Intent**: %s\n' "$intent"
|
|
492
548
|
[ -n "$project_line" ] && printf '%s\n' "$project_line"
|
|
493
549
|
printf '\n## Briefing\n\n%s\n\n' "$body"
|
|
494
550
|
printf '## Next Steps\n\n- Continue from this handoff using the shared Egregore memory protocol.\n'
|
|
495
|
-
} | TMPDIR="$tmpd" bash "$SCRIPT_DIR/bin/
|
|
551
|
+
} | TMPDIR="$tmpd" bash "$SCRIPT_DIR/bin/capture-run.sh" \
|
|
552
|
+
--mode addressed \
|
|
496
553
|
--author "$from" \
|
|
497
554
|
--topic "$topic" \
|
|
498
555
|
"${handoff_args[@]}" \
|
|
@@ -509,6 +566,12 @@ cmd_handoff() {
|
|
|
509
566
|
[ -s "$stdout_file" ] && sed 's/^/status: /' "$stdout_file"
|
|
510
567
|
echo "handoff: memory/$rel"
|
|
511
568
|
echo "result: $result_out"
|
|
569
|
+
|
|
570
|
+
# Parity with the Claude /handoff skill: save core-repo session work in the
|
|
571
|
+
# background (non-coding diffs auto-merge to develop, code stays in a PR).
|
|
572
|
+
if [ "$NO_PUSH" = "0" ]; then
|
|
573
|
+
( bash "$SCRIPT_DIR/bin/handoff-save-egregore.sh" "$from" "$topic" --repo-dir "$SCRIPT_DIR" >/dev/null 2>&1 & ) >/dev/null 2>&1
|
|
574
|
+
fi
|
|
512
575
|
}
|
|
513
576
|
|
|
514
577
|
cmd_ask() {
|