selftune 0.2.22 → 0.2.23
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 +4 -2
- package/apps/local-dashboard/dist/assets/index-CwOtTrUS.css +1 -0
- package/apps/local-dashboard/dist/assets/index-f1HQpbeH.js +59 -0
- package/apps/local-dashboard/dist/assets/vendor-ui-jVSaIZey.js +12 -0
- package/apps/local-dashboard/dist/index.html +3 -3
- package/cli/selftune/adapters/pi/hook.ts +273 -0
- package/cli/selftune/adapters/pi/install.ts +207 -0
- package/cli/selftune/constants.ts +10 -1
- package/cli/selftune/dashboard-contract.ts +14 -0
- package/cli/selftune/evolution/engines/judge-engine.ts +96 -0
- package/cli/selftune/evolution/engines/replay-engine.ts +158 -0
- package/cli/selftune/evolution/evidence.ts +2 -6
- package/cli/selftune/evolution/evolve-body.ts +73 -20
- package/cli/selftune/evolution/validate-body.ts +78 -42
- package/cli/selftune/evolution/validate-routing.ts +45 -104
- package/cli/selftune/hooks/skill-eval.ts +2 -1
- package/cli/selftune/hooks-shared/types.ts +1 -0
- package/cli/selftune/index.ts +23 -5
- package/cli/selftune/ingestors/pi-ingest.ts +726 -0
- package/cli/selftune/init.ts +11 -1
- package/cli/selftune/localdb/direct-write.ts +85 -0
- package/cli/selftune/localdb/materialize.ts +6 -7
- package/cli/selftune/localdb/queries.ts +126 -0
- package/cli/selftune/localdb/schema.ts +38 -0
- package/cli/selftune/observability.ts +8 -1
- package/cli/selftune/orchestrate.ts +43 -0
- package/cli/selftune/registry/client.ts +74 -0
- package/cli/selftune/registry/history.ts +54 -0
- package/cli/selftune/registry/index.ts +90 -0
- package/cli/selftune/registry/install.ts +141 -0
- package/cli/selftune/registry/list.ts +44 -0
- package/cli/selftune/registry/push.ts +171 -0
- package/cli/selftune/registry/rollback.ts +49 -0
- package/cli/selftune/registry/status.ts +62 -0
- package/cli/selftune/registry/sync.ts +125 -0
- package/cli/selftune/repair/skill-usage.ts +4 -1
- package/cli/selftune/status.ts +31 -0
- package/cli/selftune/sync.ts +127 -23
- package/cli/selftune/types.ts +2 -1
- package/cli/selftune/utils/jsonl.ts +1 -30
- package/cli/selftune/utils/skill-discovery.ts +22 -0
- package/node_modules/@selftune/telemetry-contract/fixtures/evidence-only-push.ts +1 -1
- package/node_modules/@selftune/telemetry-contract/fixtures/golden.test.ts +0 -1
- package/node_modules/@selftune/telemetry-contract/fixtures/partial-push-unresolved-parents.ts +1 -1
- package/node_modules/@selftune/telemetry-contract/package.json +1 -1
- package/node_modules/@selftune/telemetry-contract/src/index.ts +1 -0
- package/node_modules/@selftune/telemetry-contract/src/schemas.ts +22 -4
- package/node_modules/@selftune/telemetry-contract/src/types.ts +1 -12
- package/node_modules/@selftune/telemetry-contract/tests/compatibility.test.ts +0 -1
- package/package.json +1 -1
- package/packages/telemetry-contract/fixtures/evidence-only-push.ts +1 -1
- package/packages/telemetry-contract/fixtures/golden.test.ts +0 -1
- package/packages/telemetry-contract/fixtures/partial-push-unresolved-parents.ts +1 -1
- package/packages/telemetry-contract/package.json +1 -1
- package/packages/telemetry-contract/src/index.ts +1 -0
- package/packages/telemetry-contract/src/schemas.ts +22 -4
- package/packages/telemetry-contract/src/types.ts +1 -12
- package/packages/telemetry-contract/tests/compatibility.test.ts +0 -1
- package/packages/ui/AGENTS.md +16 -0
- package/packages/ui/README.md +1 -1
- package/packages/ui/package.json +1 -1
- package/packages/ui/src/components/ActivityTimeline.tsx +152 -168
- package/packages/ui/src/components/AnalyticsCharts.tsx +344 -0
- package/packages/ui/src/components/EvidenceViewer.tsx +153 -443
- package/packages/ui/src/components/EvolutionTimeline.tsx +34 -87
- package/packages/ui/src/components/InfoTip.tsx +1 -2
- package/packages/ui/src/components/InvocationsPanel.tsx +413 -0
- package/packages/ui/src/components/JobHistoryTimeline.tsx +156 -0
- package/packages/ui/src/components/OrchestrateRunsPanel.tsx +18 -36
- package/packages/ui/src/components/OverviewPanels.tsx +652 -0
- package/packages/ui/src/components/PipelineStatusBar.tsx +65 -0
- package/packages/ui/src/components/SkillReportGuide.tsx +215 -0
- package/packages/ui/src/components/SkillReportPanels.tsx +919 -0
- package/packages/ui/src/components/SkillsLibrary.tsx +437 -0
- package/packages/ui/src/components/index.ts +56 -1
- package/packages/ui/src/components/section-cards.tsx +18 -35
- package/packages/ui/src/components/skill-health-grid.tsx +47 -37
- package/packages/ui/src/lib/constants.tsx +0 -1
- package/packages/ui/src/primitives/card.tsx +1 -1
- package/packages/ui/src/primitives/checkbox.tsx +1 -1
- package/packages/ui/src/primitives/dropdown-menu.tsx +2 -2
- package/packages/ui/src/primitives/select.tsx +2 -2
- package/packages/ui/src/types.ts +172 -4
- package/skill/SKILL.md +18 -4
- package/skill/Workflows/Ingest.md +60 -2
- package/skill/Workflows/Initialize.md +8 -5
- package/skill/Workflows/PlatformHooks.md +19 -3
- package/skill/Workflows/Registry.md +99 -0
- package/skill/Workflows/Sync.md +3 -1
- package/apps/local-dashboard/dist/assets/index-D8O-RG1I.js +0 -60
- package/apps/local-dashboard/dist/assets/index-_EcLywDg.css +0 -1
- package/apps/local-dashboard/dist/assets/vendor-ui-CGEmUayx.js +0 -12
- package/cli/selftune/utils/html.ts +0 -27
- package/packages/ui/src/components/RecentActivityFeed.tsx +0 -117
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
Install and configure selftune hooks for non-Claude-Code platforms (Codex, OpenCode, Cline).
|
|
5
|
+
Install and configure selftune hooks for non-Claude-Code platforms (Codex, OpenCode, Cline, Pi).
|
|
6
6
|
|
|
7
7
|
## When to Use
|
|
8
8
|
|
|
9
|
-
- User wants selftune on Codex, OpenCode, or
|
|
9
|
+
- User wants selftune on Codex, OpenCode, Cline, or Pi
|
|
10
10
|
- User asks about multi-platform support
|
|
11
11
|
- User wants real-time skill tracking on a non-Claude-Code agent
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Install and configure selftune hooks for non-Claude-Code platforms (Codex, OpenC
|
|
|
18
18
|
selftune <platform> install [--dry-run] [--uninstall]
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Supported platforms: `codex`, `opencode`, `cline`
|
|
21
|
+
Supported platforms: `codex`, `opencode`, `cline`, `pi`
|
|
22
22
|
|
|
23
23
|
| Flag | Description |
|
|
24
24
|
| ------------- | ---------------------------------------------- |
|
|
@@ -56,6 +56,13 @@ This is called automatically by the agent's hook system. Users don't run this di
|
|
|
56
56
|
- Events: PostToolUse, TaskComplete, TaskCancel
|
|
57
57
|
- Install creates executable shell scripts in the hooks directory
|
|
58
58
|
|
|
59
|
+
### Pi
|
|
60
|
+
|
|
61
|
+
- Config: `~/.pi/extensions/selftune/`
|
|
62
|
+
- Sessions: `~/.pi/agent/sessions/`
|
|
63
|
+
- Events: tool_call, tool_result, message, session_shutdown
|
|
64
|
+
- Install creates executable hook scripts in the extensions directory
|
|
65
|
+
|
|
59
66
|
## Examples
|
|
60
67
|
|
|
61
68
|
### Codex
|
|
@@ -82,6 +89,14 @@ selftune cline install --dry-run # Preview what would be created
|
|
|
82
89
|
selftune cline install --uninstall # Remove selftune hook scripts
|
|
83
90
|
```
|
|
84
91
|
|
|
92
|
+
### Pi
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
selftune pi install # Install hooks into ~/.pi/extensions/selftune/
|
|
96
|
+
selftune pi install --dry-run # Preview changes without writing
|
|
97
|
+
selftune pi install --uninstall # Remove selftune hooks
|
|
98
|
+
```
|
|
99
|
+
|
|
85
100
|
### Hook handler (agent-only, not user-facing)
|
|
86
101
|
|
|
87
102
|
The hook subcommand is called automatically by the agent. Users do not run it directly:
|
|
@@ -90,4 +105,5 @@ The hook subcommand is called automatically by the agent. Users do not run it di
|
|
|
90
105
|
printf '%s\n' "$PAYLOAD" | selftune codex hook
|
|
91
106
|
printf '%s\n' "$PAYLOAD" | selftune opencode hook
|
|
92
107
|
printf '%s\n' "$PAYLOAD" | selftune cline hook
|
|
108
|
+
printf '%s\n' "$PAYLOAD" | selftune pi hook
|
|
93
109
|
```
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Registry — Team Skill Distribution
|
|
2
|
+
|
|
3
|
+
Manage versioned skill distribution across your team. Push skill folders to the cloud, install from the registry, sync to latest versions, and rollback when needed.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Flags | What It Does |
|
|
8
|
+
|---------|-------|-------------|
|
|
9
|
+
| `selftune registry push [name]` | `--version=<semver>` `--summary=<text>` | Archive current skill folder and push as a new version |
|
|
10
|
+
| `selftune registry install <name>` | `--global` | Download and extract a skill from the registry |
|
|
11
|
+
| `selftune registry sync` | | Check all installed entries for updates, pull latest |
|
|
12
|
+
| `selftune registry status` | | Show installed entries with version drift |
|
|
13
|
+
| `selftune registry rollback <name>` | `--to=<version>` `--reason=<text>` | Rollback a skill to a previous version |
|
|
14
|
+
| `selftune registry history <name>` | | Show version timeline with quality data |
|
|
15
|
+
| `selftune registry list` | | Show all published entries in the org |
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- User says "push this skill to the team" → `selftune registry push`
|
|
20
|
+
- User says "install the deploy skill" → `selftune registry install deploy`
|
|
21
|
+
- User says "update my skills" or "sync registry" → `selftune registry sync`
|
|
22
|
+
- User says "check for updates" → `selftune registry status`
|
|
23
|
+
- User says "rollback the deploy skill" → `selftune registry rollback deploy`
|
|
24
|
+
- User says "show version history" → `selftune registry history <name>`
|
|
25
|
+
- User says "what's in the registry" → `selftune registry list`
|
|
26
|
+
|
|
27
|
+
## Push Workflow
|
|
28
|
+
|
|
29
|
+
1. Navigate to the skill directory (must contain `SKILL.md`)
|
|
30
|
+
2. Run `selftune registry push` — archives the entire folder (SKILL.md + scripts/ + assets/)
|
|
31
|
+
3. The skill name and description are extracted from SKILL.md frontmatter
|
|
32
|
+
4. Use `--version=1.0.0` for explicit semver, otherwise auto-generated
|
|
33
|
+
5. Use `--summary="Added new trigger keywords"` for change notes
|
|
34
|
+
|
|
35
|
+
## Install Workflow
|
|
36
|
+
|
|
37
|
+
1. Run `selftune registry install <name>` to pull from the registry
|
|
38
|
+
2. By default, installs to `.claude/skills/<name>/` in the current project
|
|
39
|
+
3. Use `--global` to install to `~/.claude/skills/<name>/` (available everywhere)
|
|
40
|
+
4. Installation is tracked — `selftune registry status` shows what's installed
|
|
41
|
+
|
|
42
|
+
## Sync Workflow
|
|
43
|
+
|
|
44
|
+
1. Run `selftune registry sync` to check all installations for updates
|
|
45
|
+
2. Only downloads archives when the version hash differs (lightweight check)
|
|
46
|
+
3. Local state is stored at `~/.selftune/registry-state.json`
|
|
47
|
+
|
|
48
|
+
## Rollback Workflow
|
|
49
|
+
|
|
50
|
+
1. Run `selftune registry rollback <name>` to revert to the previous version
|
|
51
|
+
2. Use `--to=1.0.0` to target a specific version
|
|
52
|
+
3. After rollback, tell team members to run `selftune registry sync`
|
|
53
|
+
4. Rollback is recorded with timestamp and reason
|
|
54
|
+
|
|
55
|
+
## Prerequisites
|
|
56
|
+
|
|
57
|
+
- Must be authenticated (`selftune alpha upload` to set up API key)
|
|
58
|
+
- Push and rollback require Team plan and admin role
|
|
59
|
+
- Install requires Pro plan or higher
|
|
60
|
+
|
|
61
|
+
## Output Format
|
|
62
|
+
|
|
63
|
+
All commands output JSON for agent consumption:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
// push
|
|
67
|
+
{"success": true, "name": "deploy", "version": "1.2.0", "files": 8, "size": 4096, "hash": "abc123"}
|
|
68
|
+
|
|
69
|
+
// sync
|
|
70
|
+
{"synced": 2, "failed": 0, "total": 5}
|
|
71
|
+
|
|
72
|
+
// status
|
|
73
|
+
{"installations": [{"name": "deploy", "installed": "1.1.0", "latest": "1.2.0", "status": "behind"}]}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Common Patterns
|
|
77
|
+
|
|
78
|
+
**User wants to share a skill with the team**
|
|
79
|
+
|
|
80
|
+
> Run `selftune registry push` from the skill directory. Report the version
|
|
81
|
+
> and file count from the JSON output.
|
|
82
|
+
|
|
83
|
+
**User wants to install a shared skill**
|
|
84
|
+
|
|
85
|
+
> Run `selftune registry install <name>`. Use `--global` if they want it
|
|
86
|
+
> available across all projects.
|
|
87
|
+
|
|
88
|
+
**User wants to check what's outdated**
|
|
89
|
+
|
|
90
|
+
> Run `selftune registry status`. Report entries where `status` is `"behind"`.
|
|
91
|
+
|
|
92
|
+
**User wants to update everything**
|
|
93
|
+
|
|
94
|
+
> Run `selftune registry sync`. Report `synced` and `failed` counts.
|
|
95
|
+
|
|
96
|
+
**User wants to undo a bad version**
|
|
97
|
+
|
|
98
|
+
> Run `selftune registry rollback <name> --reason="regression in trigger accuracy"`.
|
|
99
|
+
> Remind them to have team members run `selftune registry sync` afterward.
|
package/skill/Workflows/Sync.md
CHANGED
|
@@ -10,7 +10,7 @@ also writes the compatibility repaired overlay JSONL.
|
|
|
10
10
|
## When to Use
|
|
11
11
|
|
|
12
12
|
- Before running `status`, `dashboard`, `watch`, or `evolve` when data may be stale
|
|
13
|
-
- The user has run many Claude Code, Codex, OpenCode, or
|
|
13
|
+
- The user has run many Claude Code, Codex, OpenCode, OpenClaw, or Pi sessions since last sync
|
|
14
14
|
- The agent detects host logs may be polluted and needs the repaired/source-first view
|
|
15
15
|
- Before inspecting alpha-upload readiness or pushing fresh cloud data
|
|
16
16
|
|
|
@@ -31,6 +31,8 @@ selftune sync
|
|
|
31
31
|
| `--no-codex` | Skip Codex rollout ingest |
|
|
32
32
|
| `--no-opencode` | Skip OpenCode ingest |
|
|
33
33
|
| `--no-openclaw` | Skip OpenClaw ingest |
|
|
34
|
+
| `--no-pi` | Skip Pi ingest |
|
|
35
|
+
| `--pi-sessions-dir <dir>` | Pi sessions directory (default: `~/.pi/agent/sessions`) |
|
|
34
36
|
| `--no-repair` | Skip rebuilding repaired skill-usage data |
|
|
35
37
|
| `--json` | Output results as JSON |
|
|
36
38
|
|