omegon 0.6.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/.gitattributes +3 -0
- package/AGENTS.md +16 -0
- package/LICENSE +15 -0
- package/README.md +289 -0
- package/bin/pi.mjs +30 -0
- package/extensions/00-secrets/index.ts +1126 -0
- package/extensions/01-auth/auth.ts +401 -0
- package/extensions/01-auth/index.ts +289 -0
- package/extensions/auto-compact.ts +42 -0
- package/extensions/bootstrap/deps.ts +291 -0
- package/extensions/bootstrap/index.ts +811 -0
- package/extensions/chronos/chronos.sh +487 -0
- package/extensions/chronos/index.ts +148 -0
- package/extensions/cleave/assessment.ts +754 -0
- package/extensions/cleave/bridge.ts +31 -0
- package/extensions/cleave/conflicts.ts +250 -0
- package/extensions/cleave/dispatcher.ts +808 -0
- package/extensions/cleave/guardrails.ts +426 -0
- package/extensions/cleave/index.ts +3121 -0
- package/extensions/cleave/lifecycle-emitter.ts +20 -0
- package/extensions/cleave/openspec.ts +811 -0
- package/extensions/cleave/planner.ts +260 -0
- package/extensions/cleave/review.ts +579 -0
- package/extensions/cleave/skills.ts +355 -0
- package/extensions/cleave/types.ts +261 -0
- package/extensions/cleave/workspace.ts +861 -0
- package/extensions/cleave/worktree.ts +243 -0
- package/extensions/core-renderers.ts +253 -0
- package/extensions/dashboard/context-gauge.ts +58 -0
- package/extensions/dashboard/file-watch.ts +14 -0
- package/extensions/dashboard/footer.ts +1145 -0
- package/extensions/dashboard/git.ts +185 -0
- package/extensions/dashboard/index.ts +478 -0
- package/extensions/dashboard/memory-audit.ts +34 -0
- package/extensions/dashboard/overlay-data.ts +705 -0
- package/extensions/dashboard/overlay.ts +365 -0
- package/extensions/dashboard/render-utils.ts +54 -0
- package/extensions/dashboard/types.ts +191 -0
- package/extensions/dashboard/uri-helper.ts +45 -0
- package/extensions/debug.ts +69 -0
- package/extensions/defaults.ts +282 -0
- package/extensions/design-tree/dashboard-state.ts +161 -0
- package/extensions/design-tree/design-card.ts +362 -0
- package/extensions/design-tree/index.ts +2130 -0
- package/extensions/design-tree/lifecycle-emitter.ts +41 -0
- package/extensions/design-tree/tree.ts +1607 -0
- package/extensions/design-tree/types.ts +163 -0
- package/extensions/distill.ts +127 -0
- package/extensions/effort/index.ts +395 -0
- package/extensions/effort/tiers.ts +146 -0
- package/extensions/effort/types.ts +105 -0
- package/extensions/lib/git-state.ts +227 -0
- package/extensions/lib/local-models.ts +157 -0
- package/extensions/lib/model-preferences.ts +51 -0
- package/extensions/lib/model-routing.ts +720 -0
- package/extensions/lib/operator-fallback.ts +205 -0
- package/extensions/lib/operator-profile.ts +360 -0
- package/extensions/lib/slash-command-bridge.ts +253 -0
- package/extensions/lib/typebox-helpers.ts +16 -0
- package/extensions/local-inference/index.ts +727 -0
- package/extensions/mcp-bridge/README.md +220 -0
- package/extensions/mcp-bridge/index.ts +951 -0
- package/extensions/mcp-bridge/lib.ts +365 -0
- package/extensions/mcp-bridge/mcp.json +3 -0
- package/extensions/mcp-bridge/package.json +11 -0
- package/extensions/model-budget.ts +752 -0
- package/extensions/offline-driver.ts +403 -0
- package/extensions/openspec/archive-gate.ts +164 -0
- package/extensions/openspec/branch-cleanup.ts +64 -0
- package/extensions/openspec/dashboard-state.ts +50 -0
- package/extensions/openspec/index.ts +1917 -0
- package/extensions/openspec/lifecycle-emitter.ts +65 -0
- package/extensions/openspec/lifecycle-files.ts +70 -0
- package/extensions/openspec/lifecycle.ts +50 -0
- package/extensions/openspec/reconcile.ts +187 -0
- package/extensions/openspec/spec.ts +1385 -0
- package/extensions/openspec/types.ts +98 -0
- package/extensions/project-memory/DESIGN-global-mind.md +198 -0
- package/extensions/project-memory/README.md +202 -0
- package/extensions/project-memory/api-types.ts +382 -0
- package/extensions/project-memory/compaction-policy.ts +29 -0
- package/extensions/project-memory/core.ts +164 -0
- package/extensions/project-memory/embeddings.ts +230 -0
- package/extensions/project-memory/extraction-v2.ts +861 -0
- package/extensions/project-memory/factstore.ts +2177 -0
- package/extensions/project-memory/index.ts +3459 -0
- package/extensions/project-memory/injection-metrics.ts +91 -0
- package/extensions/project-memory/jsonl-io.ts +12 -0
- package/extensions/project-memory/lifecycle.ts +331 -0
- package/extensions/project-memory/migration.ts +293 -0
- package/extensions/project-memory/package.json +9 -0
- package/extensions/project-memory/sci-renderers.ts +7 -0
- package/extensions/project-memory/template.ts +103 -0
- package/extensions/project-memory/triggers.ts +52 -0
- package/extensions/project-memory/types.ts +102 -0
- package/extensions/render/composition/fonts/Inter-Bold.ttf +0 -0
- package/extensions/render/composition/fonts/Inter-Regular.ttf +0 -0
- package/extensions/render/composition/fonts/Tomorrow-Bold.ttf +0 -0
- package/extensions/render/composition/fonts/Tomorrow-Regular.ttf +0 -0
- package/extensions/render/composition/package-lock.json +534 -0
- package/extensions/render/composition/package.json +22 -0
- package/extensions/render/composition/render.mjs +246 -0
- package/extensions/render/composition/test-comp.tsx +87 -0
- package/extensions/render/composition/types.ts +24 -0
- package/extensions/render/excalidraw/UPSTREAM.md +81 -0
- package/extensions/render/excalidraw/elements.ts +764 -0
- package/extensions/render/excalidraw/index.ts +66 -0
- package/extensions/render/excalidraw/types.ts +223 -0
- package/extensions/render/excalidraw-renderer/pyproject.toml +8 -0
- package/extensions/render/excalidraw-renderer/render_excalidraw.py +182 -0
- package/extensions/render/excalidraw-renderer/render_template.html +59 -0
- package/extensions/render/index.ts +830 -0
- package/extensions/render/native-diagrams/index.ts +57 -0
- package/extensions/render/native-diagrams/motifs.ts +542 -0
- package/extensions/render/native-diagrams/raster.ts +8 -0
- package/extensions/render/native-diagrams/scene.ts +75 -0
- package/extensions/render/native-diagrams/spec.ts +204 -0
- package/extensions/render/native-diagrams/svg.ts +116 -0
- package/extensions/sci-ui.ts +304 -0
- package/extensions/session-log.ts +174 -0
- package/extensions/shared-state.ts +146 -0
- package/extensions/spinner-verbs.ts +91 -0
- package/extensions/style.ts +281 -0
- package/extensions/terminal-title.ts +191 -0
- package/extensions/tool-profile/index.ts +291 -0
- package/extensions/tool-profile/profiles.ts +290 -0
- package/extensions/types.d.ts +9 -0
- package/extensions/vault/index.ts +185 -0
- package/extensions/version-check.ts +90 -0
- package/extensions/view/index.ts +859 -0
- package/extensions/view/uri-resolver.ts +148 -0
- package/extensions/web-search/index.ts +182 -0
- package/extensions/web-search/providers.ts +121 -0
- package/extensions/web-ui/index.ts +110 -0
- package/extensions/web-ui/server.ts +265 -0
- package/extensions/web-ui/state.ts +462 -0
- package/extensions/web-ui/static/index.html +145 -0
- package/extensions/web-ui/types.ts +284 -0
- package/package.json +76 -0
- package/prompts/init.md +75 -0
- package/prompts/new-repo.md +54 -0
- package/prompts/oci-login.md +56 -0
- package/prompts/status.md +50 -0
- package/settings.json +4 -0
- package/skills/cleave/SKILL.md +218 -0
- package/skills/git/SKILL.md +209 -0
- package/skills/git/_reference/ci-validation.md +204 -0
- package/skills/oci/SKILL.md +338 -0
- package/skills/openspec/SKILL.md +346 -0
- package/skills/pi-extensions/SKILL.md +191 -0
- package/skills/pi-tui/SKILL.md +517 -0
- package/skills/python/SKILL.md +189 -0
- package/skills/rust/SKILL.md +268 -0
- package/skills/security/SKILL.md +206 -0
- package/skills/style/SKILL.md +264 -0
- package/skills/typescript/SKILL.md +225 -0
- package/skills/vault/SKILL.md +102 -0
- package/themes/alpharius-legacy.json +85 -0
- package/themes/alpharius.conf +59 -0
- package/themes/alpharius.json +88 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ControlPlaneState — versioned read-only snapshot contract for the web UI.
|
|
3
|
+
*
|
|
4
|
+
* Served at GET /api/state and derived section routes.
|
|
5
|
+
* All fields are plain JSON-serialisable values — no Dates, no symbols.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// ── Schema version ────────────────────────────────────────────────────────────
|
|
9
|
+
|
|
10
|
+
/** Bumped when the shape of ControlPlaneState changes in a breaking way. */
|
|
11
|
+
export const SCHEMA_VERSION = 2 as const;
|
|
12
|
+
export type SchemaVersion = typeof SCHEMA_VERSION;
|
|
13
|
+
|
|
14
|
+
// ── Session ───────────────────────────────────────────────────────────────────
|
|
15
|
+
|
|
16
|
+
export interface SessionSnapshot {
|
|
17
|
+
/** ISO 8601 timestamp when the snapshot was generated. */
|
|
18
|
+
capturedAt: string;
|
|
19
|
+
/** Omegon package version (from package.json). */
|
|
20
|
+
piKitVersion: string;
|
|
21
|
+
/** Absolute path of the repository root (process.cwd() at extension load). */
|
|
22
|
+
repoRoot: string;
|
|
23
|
+
/** Current git branch, or null if not a git repo. */
|
|
24
|
+
gitBranch: string | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// ── Dashboard ─────────────────────────────────────────────────────────────────
|
|
28
|
+
|
|
29
|
+
export interface DashboardSnapshot {
|
|
30
|
+
/** Current display mode. */
|
|
31
|
+
mode: string;
|
|
32
|
+
/** Number of conversation turns in the current session. */
|
|
33
|
+
turns: number;
|
|
34
|
+
/** Approximate token count of the last memory injection. */
|
|
35
|
+
memoryTokenEstimate: number;
|
|
36
|
+
/** Routing policy tier overrides, if any. */
|
|
37
|
+
routingPolicy: Record<string, unknown> | null;
|
|
38
|
+
/** Current effort level label, if effort extension is active. */
|
|
39
|
+
effortLevel: string | null;
|
|
40
|
+
/** Latest harness recovery event summary, if any. */
|
|
41
|
+
recovery: RecoverySnapshot | null;
|
|
42
|
+
/**
|
|
43
|
+
* Pinned operator-context metadata mirroring the raised-mode dashboard block.
|
|
44
|
+
* Exposes context/model/thinking and memory-oriented state structurally so
|
|
45
|
+
* web UI consumers do not need to parse footer or display text.
|
|
46
|
+
*/
|
|
47
|
+
operatorMetadata: OperatorMetadataSnapshot;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface RecoverySnapshot {
|
|
51
|
+
provider: string;
|
|
52
|
+
modelId: string;
|
|
53
|
+
classification: string;
|
|
54
|
+
summary: string;
|
|
55
|
+
action: string;
|
|
56
|
+
retryCount: number | null;
|
|
57
|
+
timestamp: number;
|
|
58
|
+
escalated: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* True when the recovery event represents a condition that may require
|
|
61
|
+
* operator attention or UI-level action (e.g. escalation, hard failover).
|
|
62
|
+
* False for passive/observe-only recovery events.
|
|
63
|
+
* Web UI consumers should use this flag instead of parsing action strings.
|
|
64
|
+
*/
|
|
65
|
+
actionable: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Pinned operator-context metadata exposed by the raised-mode dashboard.
|
|
70
|
+
* Groups the context/model/thinking indicators and memory-oriented state so
|
|
71
|
+
* web UI consumers do not need to reverse-engineer values from footer text.
|
|
72
|
+
*/
|
|
73
|
+
export interface OperatorMetadataSnapshot {
|
|
74
|
+
/** Active effort tier name (e.g. "Ruthless"), or null if effort extension is inactive. */
|
|
75
|
+
effortName: string | null;
|
|
76
|
+
/** Numeric effort level 1-7, or null. */
|
|
77
|
+
effortLevel: number | null;
|
|
78
|
+
/** Driver model tier (e.g. "victory", "gloriana"), or null. */
|
|
79
|
+
driverTier: string | null;
|
|
80
|
+
/** Extended thinking level (e.g. "medium", "high"), or null. */
|
|
81
|
+
thinkingLevel: string | null;
|
|
82
|
+
/** Whether the effort level is ceiling-locked by an operator cap. */
|
|
83
|
+
effortCapped: boolean;
|
|
84
|
+
/** Approximate token count of the last memory injection. */
|
|
85
|
+
memoryTokenEstimate: number;
|
|
86
|
+
/** Number of facts in working memory during the last injection. */
|
|
87
|
+
workingMemoryCount: number | null;
|
|
88
|
+
/** Total fact count from the last injection (project + global + working). */
|
|
89
|
+
totalFactCount: number | null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ── Design Tree ───────────────────────────────────────────────────────────────
|
|
93
|
+
|
|
94
|
+
export interface DesignTreeSnapshot {
|
|
95
|
+
/** Total node count. */
|
|
96
|
+
nodeCount: number;
|
|
97
|
+
/** Count by status. */
|
|
98
|
+
statusCounts: Record<string, number>;
|
|
99
|
+
/** Number of open questions across all nodes. */
|
|
100
|
+
openQuestionCount: number;
|
|
101
|
+
/** Currently focused node, or null. */
|
|
102
|
+
focusedNode: DesignNodeSummary | null;
|
|
103
|
+
/** Summary of every node in the tree. */
|
|
104
|
+
nodes: DesignNodeSummary[];
|
|
105
|
+
/** Design pipeline funnel counts, present when dual-lifecycle is active. */
|
|
106
|
+
designPipeline?: DesignPipelineSnapshot;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface DesignNodeSummary {
|
|
110
|
+
id: string;
|
|
111
|
+
title: string;
|
|
112
|
+
status: string;
|
|
113
|
+
parent: string | null;
|
|
114
|
+
questionCount: number;
|
|
115
|
+
questions: string[];
|
|
116
|
+
tags: string[];
|
|
117
|
+
openspecChange: string | null;
|
|
118
|
+
branch: string | null;
|
|
119
|
+
/** Linked design-phase OpenSpec change info, if any. */
|
|
120
|
+
designSpec: DesignSpecBinding | null;
|
|
121
|
+
/** Acceptance-criteria summary counts from the node document, if any. */
|
|
122
|
+
acSummary: ACSummary | null;
|
|
123
|
+
/** Latest design-spec assessment result, if any. */
|
|
124
|
+
assessmentResult: AssessmentResult | null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Binding between a design node and its openspec/design/<nodeId>/ directory. */
|
|
128
|
+
export interface DesignSpecBinding {
|
|
129
|
+
/** Relative path to the design change directory (openspec/design/<nodeId>/). */
|
|
130
|
+
changePath: string;
|
|
131
|
+
hasProposal: boolean;
|
|
132
|
+
hasSpec: boolean;
|
|
133
|
+
hasTasks: boolean;
|
|
134
|
+
hasAssessment: boolean;
|
|
135
|
+
tasksDone: number;
|
|
136
|
+
tasksTotal: number;
|
|
137
|
+
isArchived: boolean;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Acceptance-criteria counts parsed from the node's markdown document. */
|
|
141
|
+
export interface ACSummary {
|
|
142
|
+
scenarios: number;
|
|
143
|
+
falsifiability: number;
|
|
144
|
+
constraints: number;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Latest assessment.json result for a design-spec change. */
|
|
148
|
+
export interface AssessmentResult {
|
|
149
|
+
pass: boolean;
|
|
150
|
+
capturedAt: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// ── Design Pipeline ───────────────────────────────────────────────────────────
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* A single design-phase change entry (openspec/design/<nodeId>/).
|
|
157
|
+
*/
|
|
158
|
+
export interface DesignChangeSummary {
|
|
159
|
+
nodeId: string;
|
|
160
|
+
changePath: string;
|
|
161
|
+
hasProposal: boolean;
|
|
162
|
+
hasSpec: boolean;
|
|
163
|
+
hasTasks: boolean;
|
|
164
|
+
hasAssessment: boolean;
|
|
165
|
+
assessmentPass: boolean | null;
|
|
166
|
+
capturedAt: string | null;
|
|
167
|
+
tasksDone: number;
|
|
168
|
+
tasksTotal: number;
|
|
169
|
+
isArchived: boolean;
|
|
170
|
+
archivedPath: string | undefined;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Funnel counts — how many design nodes have reached each lifecycle milestone.
|
|
175
|
+
*/
|
|
176
|
+
export interface DesignFunnelCounts {
|
|
177
|
+
/** Total design nodes. */
|
|
178
|
+
total: number;
|
|
179
|
+
/** Nodes with an openspec/design/<nodeId>/ binding. */
|
|
180
|
+
bound: number;
|
|
181
|
+
/** Bound nodes where tasksTotal > 0 and tasksDone >= tasksTotal. */
|
|
182
|
+
tasksComplete: number;
|
|
183
|
+
/** Bound nodes with a passing assessment. */
|
|
184
|
+
assessed: number;
|
|
185
|
+
/** Archived design-phase changes. */
|
|
186
|
+
archived: number;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Snapshot of the design-pipeline funnel.
|
|
191
|
+
* Top-level slice at GET /api/design-pipeline.
|
|
192
|
+
*/
|
|
193
|
+
export interface DesignPipelineSnapshot {
|
|
194
|
+
/** ISO 8601 timestamp when snapshot was generated. */
|
|
195
|
+
capturedAt: string;
|
|
196
|
+
/** All active + archived design-phase changes. */
|
|
197
|
+
changes: DesignChangeSummary[];
|
|
198
|
+
/** Funnel counts across the design tree. */
|
|
199
|
+
funnelCounts: DesignFunnelCounts;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// ── OpenSpec ──────────────────────────────────────────────────────────────────
|
|
203
|
+
|
|
204
|
+
export interface OpenSpecSnapshot {
|
|
205
|
+
changes: OpenSpecChangeSummary[];
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface OpenSpecChangeSummary {
|
|
209
|
+
name: string;
|
|
210
|
+
stage: string;
|
|
211
|
+
hasProposal: boolean;
|
|
212
|
+
hasDesign: boolean;
|
|
213
|
+
hasSpecs: boolean;
|
|
214
|
+
hasTasks: boolean;
|
|
215
|
+
tasksTotal: number;
|
|
216
|
+
tasksDone: number;
|
|
217
|
+
specDomains: string[];
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// ── Cleave ────────────────────────────────────────────────────────────────────
|
|
221
|
+
|
|
222
|
+
export interface CleaveSnapshot {
|
|
223
|
+
status: string;
|
|
224
|
+
runId: string | null;
|
|
225
|
+
children: CleaveChildSummary[];
|
|
226
|
+
updatedAt: number | null;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface CleaveChildSummary {
|
|
230
|
+
label: string;
|
|
231
|
+
status: string;
|
|
232
|
+
elapsed: number | null;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// ── Models ────────────────────────────────────────────────────────────────────
|
|
236
|
+
|
|
237
|
+
export interface ModelsSnapshot {
|
|
238
|
+
routingPolicy: Record<string, unknown> | null;
|
|
239
|
+
effortLevel: string | null;
|
|
240
|
+
effortCapped: boolean;
|
|
241
|
+
resolvedExtractionModelId: string | null;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// ── Memory ────────────────────────────────────────────────────────────────────
|
|
245
|
+
|
|
246
|
+
export interface MemorySnapshot {
|
|
247
|
+
tokenEstimate: number;
|
|
248
|
+
lastInjection: MemoryInjectionSummary | null;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface MemoryInjectionSummary {
|
|
252
|
+
factCount: number;
|
|
253
|
+
episodeCount: number;
|
|
254
|
+
workingMemoryCount: number;
|
|
255
|
+
totalTokens: number;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// ── Health ────────────────────────────────────────────────────────────────────
|
|
259
|
+
|
|
260
|
+
export interface HealthSnapshot {
|
|
261
|
+
status: "ok";
|
|
262
|
+
uptimeMs: number;
|
|
263
|
+
/** Whether the web UI server itself is considered healthy. */
|
|
264
|
+
serverAlive: boolean;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// ── Root ──────────────────────────────────────────────────────────────────────
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Top-level versioned control-plane state snapshot.
|
|
271
|
+
* Served at GET /api/state.
|
|
272
|
+
*/
|
|
273
|
+
export interface ControlPlaneState {
|
|
274
|
+
schemaVersion: SchemaVersion;
|
|
275
|
+
session: SessionSnapshot;
|
|
276
|
+
dashboard: DashboardSnapshot;
|
|
277
|
+
designTree: DesignTreeSnapshot;
|
|
278
|
+
openspec: OpenSpecSnapshot;
|
|
279
|
+
cleave: CleaveSnapshot;
|
|
280
|
+
models: ModelsSnapshot;
|
|
281
|
+
memory: MemorySnapshot;
|
|
282
|
+
health: HealthSnapshot;
|
|
283
|
+
designPipeline: DesignPipelineSnapshot;
|
|
284
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "omegon",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Omegon — agent-native software engineering platform: lifecycle management, memory, orchestration, and visualization for the pi coding agent",
|
|
5
|
+
"bin": {
|
|
6
|
+
"pi": "bin/pi.mjs"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "npx tsx --test tests/*.test.ts extensions/**/*.test.ts",
|
|
11
|
+
"typecheck": "tsc --noEmit",
|
|
12
|
+
"check:lifecycle": "npx tsx extensions/openspec/lifecycle-files.ts",
|
|
13
|
+
"check": "tsc --noEmit && npm run check:lifecycle && npx tsx --test extensions/*.test.ts extensions/**/*.test.ts",
|
|
14
|
+
"build:pi": "cd vendor/pi-mono && npm run build",
|
|
15
|
+
"update:pi": "git -C vendor/pi-mono pull --ff-only origin main && npm run build:pi",
|
|
16
|
+
"setup": "git submodule update --init --recursive && cd vendor/pi-mono && npm install && npm run build && cd ../.. && npm link --force"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"pi-package",
|
|
20
|
+
"coding-agent",
|
|
21
|
+
"cli"
|
|
22
|
+
],
|
|
23
|
+
"author": "cwilson613",
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"pi": {
|
|
26
|
+
"extensions": [
|
|
27
|
+
"./extensions/bootstrap",
|
|
28
|
+
"./extensions/core-renderers.ts",
|
|
29
|
+
"./extensions/auto-compact.ts",
|
|
30
|
+
"./extensions/00-secrets",
|
|
31
|
+
"./extensions/01-auth",
|
|
32
|
+
"./extensions/chronos",
|
|
33
|
+
"./extensions/cleave",
|
|
34
|
+
"./extensions/openspec",
|
|
35
|
+
"./extensions/defaults.ts",
|
|
36
|
+
"./extensions/distill.ts",
|
|
37
|
+
"./extensions/render",
|
|
38
|
+
"./extensions/local-inference",
|
|
39
|
+
"./extensions/mcp-bridge",
|
|
40
|
+
"./extensions/offline-driver.ts",
|
|
41
|
+
"./extensions/effort",
|
|
42
|
+
"./extensions/model-budget.ts",
|
|
43
|
+
"./extensions/project-memory",
|
|
44
|
+
"./extensions/session-log.ts",
|
|
45
|
+
"./extensions/spinner-verbs.ts",
|
|
46
|
+
"./extensions/style.ts",
|
|
47
|
+
"./extensions/terminal-title.ts",
|
|
48
|
+
"./extensions/view",
|
|
49
|
+
"./extensions/web-search",
|
|
50
|
+
"./extensions/design-tree",
|
|
51
|
+
"./extensions/dashboard",
|
|
52
|
+
"./extensions/tool-profile",
|
|
53
|
+
"./extensions/vault",
|
|
54
|
+
"./extensions/version-check.ts",
|
|
55
|
+
"./extensions/web-ui"
|
|
56
|
+
],
|
|
57
|
+
"skills": [
|
|
58
|
+
"./skills"
|
|
59
|
+
],
|
|
60
|
+
"prompts": [
|
|
61
|
+
"./prompts"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@cwilson613/pi-coding-agent": "^0.57.1-cwilson613.2",
|
|
66
|
+
"@cwilson613/pi-ai": "^0.57.1-cwilson613.2",
|
|
67
|
+
"@cwilson613/pi-tui": "^0.57.1-cwilson613.2",
|
|
68
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
69
|
+
"@resvg/resvg-js": "^2.6.2",
|
|
70
|
+
"@sinclair/typebox": "^0.34.48",
|
|
71
|
+
"better-sqlite3": "^12.6.2"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"typescript": "^5.9.3"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/prompts/init.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: First-session environment check — orient to a new project directory
|
|
3
|
+
---
|
|
4
|
+
# Project Init
|
|
5
|
+
|
|
6
|
+
You are orienting to a project directory for the first time. Perform each step, then present a concise summary.
|
|
7
|
+
|
|
8
|
+
## 1. Environment Scan
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pwd
|
|
12
|
+
ls -la
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Check if this is a git repository:
|
|
16
|
+
```bash
|
|
17
|
+
git rev-parse --is-inside-work-tree 2>/dev/null && echo "GIT_REPO=yes" || echo "GIT_REPO=no"
|
|
18
|
+
git remote -v 2>/dev/null
|
|
19
|
+
git log --oneline -5 2>/dev/null
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Detect project type (look for key files):
|
|
23
|
+
```bash
|
|
24
|
+
ls package.json pyproject.toml Cargo.toml go.mod Makefile Dockerfile *.sln 2>/dev/null
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 2. Initialize Memory
|
|
28
|
+
|
|
29
|
+
Use `memory_query` to check if project memory already exists.
|
|
30
|
+
|
|
31
|
+
- If **no facts exist**: this is truly a first session. Read key files (README, config files, project manifests) to understand the project. Use `memory_store` to persist 3-5 foundational facts about the project (language, structure, key abstractions).
|
|
32
|
+
- If **facts exist**: this project has prior context. Skim the facts and skip to step 3.
|
|
33
|
+
|
|
34
|
+
## 3. Check Tooling State
|
|
35
|
+
|
|
36
|
+
Use `design_tree` action `list` to see if any design explorations exist.
|
|
37
|
+
|
|
38
|
+
Check for design doc migration needs:
|
|
39
|
+
```bash
|
|
40
|
+
# If design docs with frontmatter (id/status) exist in docs/ instead of docs/design/,
|
|
41
|
+
# suggest running /migrate to archive completed explorations
|
|
42
|
+
ls docs/design/ 2>/dev/null || echo "NO_DESIGN_ARCHIVE"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If `docs/design/` doesn't exist but `docs/` has markdown files with design-tree frontmatter, note that `/migrate` is available to archive completed design docs.
|
|
46
|
+
|
|
47
|
+
Check for OpenSpec changes:
|
|
48
|
+
```bash
|
|
49
|
+
ls openspec/changes/ 2>/dev/null
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Check for active branches:
|
|
53
|
+
```bash
|
|
54
|
+
git branch --list 2>/dev/null | head -10
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 4. Present Summary
|
|
58
|
+
|
|
59
|
+
Give the operator a **brief, scannable summary** (not a wall of text):
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
📍 <directory name> — <one-line description>
|
|
63
|
+
<language/framework> · <git status or "not a git repo">
|
|
64
|
+
|
|
65
|
+
🧠 Memory: <N facts | fresh start>
|
|
66
|
+
🌳 Design: <N nodes | none>
|
|
67
|
+
📋 OpenSpec: <N active changes | none>
|
|
68
|
+
🔀 Branch: <current branch>
|
|
69
|
+
|
|
70
|
+
<If migration available: "📦 /migrate available — N design docs can be archived to docs/design/">
|
|
71
|
+
<If first session: "Ready to explore. What are we building?">
|
|
72
|
+
<If returning: "Welcome back. Pick up where we left off?">
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Keep the summary under 10 lines. Do NOT dump file listings or memory contents — just the counts and orientation cues.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Guided repository creation with identity awareness and org placement
|
|
3
|
+
---
|
|
4
|
+
# New Repository
|
|
5
|
+
|
|
6
|
+
Guide through creating a new repository with proper identity awareness and placement.
|
|
7
|
+
|
|
8
|
+
## Pre-flight: Identity Check
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
echo "Git user: $(git config user.name) <$(git config user.email)>"
|
|
12
|
+
gh auth status
|
|
13
|
+
gh api user -q '.login'
|
|
14
|
+
gh api user/orgs -q '.[].login' 2>/dev/null || echo "(no orgs or limited scope)"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Present identity to user. If wrong, fix before proceeding.
|
|
18
|
+
|
|
19
|
+
## Guided Questions
|
|
20
|
+
|
|
21
|
+
Ask the user:
|
|
22
|
+
|
|
23
|
+
1. **Repo name?**
|
|
24
|
+
2. **Personal account or org?** List available orgs from pre-flight.
|
|
25
|
+
3. **Starting point?** From scratch or existing local code?
|
|
26
|
+
4. **Visibility?** Private (recommended) or public?
|
|
27
|
+
5. **Description?**
|
|
28
|
+
|
|
29
|
+
## Execution
|
|
30
|
+
|
|
31
|
+
### From Scratch
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
GH_USER=$(gh api user -q '.login')
|
|
35
|
+
OWNER=${ORG:-$GH_USER}
|
|
36
|
+
gh repo create ${OWNER}/$1 --private --description "$2"
|
|
37
|
+
git clone https://github.com/${OWNER}/$1.git
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### From Existing Code
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
cd /path/to/existing/code
|
|
44
|
+
[[ ! -d .git ]] && git init && git add . && git commit -m "feat: initial commit"
|
|
45
|
+
OWNER=${ORG:-$(gh api user -q '.login')}
|
|
46
|
+
gh repo create ${OWNER}/$1 --private --source=. --push
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Post-Creation Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] Verify git remote identity matches intended account
|
|
52
|
+
- [ ] Add README.md if not present
|
|
53
|
+
- [ ] Set up branch protection if org repo
|
|
54
|
+
- [ ] Add collaborators if needed
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Authenticate podman with OCI registries (ghcr.io, ECR, Docker Hub)
|
|
3
|
+
---
|
|
4
|
+
# OCI Registry Login
|
|
5
|
+
|
|
6
|
+
Authenticate with OCI registries for container image operations.
|
|
7
|
+
|
|
8
|
+
## 1. Pre-flight Check
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
gh auth status
|
|
12
|
+
podman login --get-login ghcr.io 2>/dev/null || echo "ghcr.io: not logged in"
|
|
13
|
+
aws sts get-caller-identity 2>/dev/null || echo "AWS: not authenticated"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 2. Authenticate
|
|
17
|
+
|
|
18
|
+
### GitHub Container Registry (ghcr.io)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Ensure write:packages scope
|
|
22
|
+
gh auth refresh -s write:packages
|
|
23
|
+
|
|
24
|
+
# Login
|
|
25
|
+
gh auth token | podman login ghcr.io -u $(gh api user --jq .login) --password-stdin
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### AWS ECR
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
AWS_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
|
|
32
|
+
AWS_REGION="${AWS_REGION:-${AWS_DEFAULT_REGION:-us-east-1}}"
|
|
33
|
+
aws ecr get-login-password --region "$AWS_REGION" | \
|
|
34
|
+
podman login --username AWS --password-stdin "$AWS_ACCOUNT.dkr.ecr.$AWS_REGION.amazonaws.com"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Docker Hub (docker.io)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
podman login docker.io -u <username>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 3. Verify
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
podman login --get-login ghcr.io
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Troubleshooting
|
|
50
|
+
|
|
51
|
+
| Problem | Solution |
|
|
52
|
+
|---------|----------|
|
|
53
|
+
| ghcr.io permission denied | `gh auth refresh -s write:packages` |
|
|
54
|
+
| ECR auth failed | `aws sts get-caller-identity` to check session |
|
|
55
|
+
| ECR token expired | Re-run login (tokens valid 12 hours) |
|
|
56
|
+
| podman not found | Use `docker login` instead |
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Session orientation — load project state and show what's active
|
|
3
|
+
---
|
|
4
|
+
# Status Check
|
|
5
|
+
|
|
6
|
+
Quick session orientation. Load state from all subsystems and present a dashboard-style summary.
|
|
7
|
+
|
|
8
|
+
## 1. Load State (parallel)
|
|
9
|
+
|
|
10
|
+
Do all of these in parallel — they are independent:
|
|
11
|
+
|
|
12
|
+
- `memory_query` — get project memory (skim for recent sessions, open issues)
|
|
13
|
+
- `design_tree` action `list` — get design nodes
|
|
14
|
+
- `design_tree` action `frontier` — get open questions
|
|
15
|
+
- Check OpenSpec: `ls openspec/changes/ 2>/dev/null`
|
|
16
|
+
- Git state: `git branch --show-current && git status --short | head -10`
|
|
17
|
+
|
|
18
|
+
## 2. Parse and Summarize
|
|
19
|
+
|
|
20
|
+
From the loaded state, extract:
|
|
21
|
+
|
|
22
|
+
- **Design tree**: count by status (exploring/decided/seed), list any open questions
|
|
23
|
+
- **OpenSpec**: list active changes with task completion counts
|
|
24
|
+
- **Memory**: count facts, note the most recent session episode
|
|
25
|
+
- **Git**: current branch, dirty files count
|
|
26
|
+
- **Known issues**: any from memory's Known Issues section
|
|
27
|
+
|
|
28
|
+
## 3. Present
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
📊 Status — <project name>
|
|
32
|
+
━━━━━━━━━━━━━━━━━━━━━━━
|
|
33
|
+
|
|
34
|
+
🌳 Design: <N decided, N exploring, N open questions>
|
|
35
|
+
<if open questions, list top 3 briefly>
|
|
36
|
+
|
|
37
|
+
📋 OpenSpec: <N active changes>
|
|
38
|
+
<list each: name — M/N tasks complete>
|
|
39
|
+
|
|
40
|
+
🔀 Git: <branch> · <clean | N dirty files>
|
|
41
|
+
🧠 Memory: <N facts> · Last session: <date — topic>
|
|
42
|
+
|
|
43
|
+
⚠️ Open Issues:
|
|
44
|
+
<top 2-3 known issues from memory, one line each>
|
|
45
|
+
<or "None tracked">
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If there are actionable next steps (incomplete OpenSpec changes, open design questions, dirty working tree), suggest 1-2 concrete actions at the bottom.
|
|
49
|
+
|
|
50
|
+
Keep the entire output under 20 lines. This is a glanceable dashboard, not a report.
|
package/settings.json
ADDED