@turri-dev/cli 0.1.6 → 0.1.7-next.ccadaa0
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/jellyfish/dark-00.png +0 -0
- package/assets/jellyfish/dark-01.png +0 -0
- package/assets/jellyfish/dark-02.png +0 -0
- package/assets/jellyfish/dark-03.png +0 -0
- package/assets/jellyfish/dark-04.png +0 -0
- package/assets/jellyfish/dark-05.png +0 -0
- package/assets/jellyfish/dark-06.png +0 -0
- package/assets/jellyfish/dark-07.png +0 -0
- package/assets/jellyfish/dark-08.png +0 -0
- package/assets/jellyfish/dark-09.png +0 -0
- package/assets/jellyfish/dark-10.png +0 -0
- package/assets/jellyfish/dark-11.png +0 -0
- package/assets/jellyfish/dark-12.png +0 -0
- package/assets/jellyfish/dark-13.png +0 -0
- package/assets/jellyfish/dark-14.png +0 -0
- package/assets/jellyfish/dark-15.png +0 -0
- package/assets/jellyfish/dark-16.png +0 -0
- package/assets/jellyfish/dark-17.png +0 -0
- package/assets/jellyfish/dark-18.png +0 -0
- package/assets/jellyfish/dark-19.png +0 -0
- package/assets/jellyfish/dark-20.png +0 -0
- package/assets/jellyfish/dark-21.png +0 -0
- package/assets/jellyfish/dark-22.png +0 -0
- package/assets/jellyfish/dark-23.png +0 -0
- package/assets/jellyfish/dark-24.png +0 -0
- package/assets/jellyfish/dark-25.png +0 -0
- package/assets/jellyfish/dark-26.png +0 -0
- package/assets/jellyfish/dark-27.png +0 -0
- package/assets/jellyfish/dark-28.png +0 -0
- package/assets/jellyfish/dark-29.png +0 -0
- package/assets/jellyfish/dark-30.png +0 -0
- package/assets/jellyfish/dark-31.png +0 -0
- package/assets/jellyfish/dark-32.png +0 -0
- package/assets/jellyfish/dark-33.png +0 -0
- package/assets/jellyfish/dark-34.png +0 -0
- package/assets/jellyfish/dark-35.png +0 -0
- package/assets/jellyfish/dark-36.png +0 -0
- package/assets/jellyfish/dark-37.png +0 -0
- package/assets/jellyfish/dark-38.png +0 -0
- package/assets/jellyfish/dark-39.png +0 -0
- package/assets/jellyfish/dark-40.png +0 -0
- package/assets/jellyfish/light-00.png +0 -0
- package/assets/jellyfish/light-01.png +0 -0
- package/assets/jellyfish/light-02.png +0 -0
- package/assets/jellyfish/light-03.png +0 -0
- package/assets/jellyfish/light-04.png +0 -0
- package/assets/jellyfish/light-05.png +0 -0
- package/assets/jellyfish/light-06.png +0 -0
- package/assets/jellyfish/light-07.png +0 -0
- package/assets/jellyfish/light-08.png +0 -0
- package/assets/jellyfish/light-09.png +0 -0
- package/assets/jellyfish/light-10.png +0 -0
- package/assets/jellyfish/light-11.png +0 -0
- package/assets/jellyfish/light-12.png +0 -0
- package/assets/jellyfish/light-13.png +0 -0
- package/assets/jellyfish/light-14.png +0 -0
- package/assets/jellyfish/light-15.png +0 -0
- package/assets/jellyfish/light-16.png +0 -0
- package/assets/jellyfish/light-17.png +0 -0
- package/assets/jellyfish/light-18.png +0 -0
- package/assets/jellyfish/light-19.png +0 -0
- package/assets/jellyfish/light-20.png +0 -0
- package/assets/jellyfish/light-21.png +0 -0
- package/assets/jellyfish/light-22.png +0 -0
- package/assets/jellyfish/light-23.png +0 -0
- package/assets/jellyfish/light-24.png +0 -0
- package/assets/jellyfish/light-25.png +0 -0
- package/assets/jellyfish/light-26.png +0 -0
- package/assets/jellyfish/light-27.png +0 -0
- package/assets/jellyfish/light-28.png +0 -0
- package/assets/jellyfish/light-29.png +0 -0
- package/assets/jellyfish/light-30.png +0 -0
- package/assets/jellyfish/light-31.png +0 -0
- package/assets/jellyfish/light-32.png +0 -0
- package/assets/jellyfish/light-33.png +0 -0
- package/assets/jellyfish/light-34.png +0 -0
- package/assets/jellyfish/light-35.png +0 -0
- package/assets/jellyfish/light-36.png +0 -0
- package/assets/jellyfish/light-37.png +0 -0
- package/assets/jellyfish/light-38.png +0 -0
- package/assets/jellyfish/light-39.png +0 -0
- package/assets/jellyfish/light-40.png +0 -0
- package/dist/ask.d.ts +83 -0
- package/dist/brand.d.ts +13 -0
- package/dist/btw.d.ts +67 -0
- package/dist/chat-models.d.ts +22 -0
- package/dist/chat-skills.d.ts +17 -0
- package/dist/cli-options.d.ts +25 -0
- package/dist/cli.d.ts +9 -0
- package/dist/config-command.d.ts +26 -0
- package/dist/config-edit.d.ts +69 -0
- package/dist/config.d.ts +321 -0
- package/dist/conform-cli.d.ts +1 -0
- package/dist/cultivate-cli.d.ts +1 -0
- package/dist/drift-cli.d.ts +1 -0
- package/dist/environment.d.ts +39 -0
- package/dist/extension.d.ts +147 -0
- package/dist/extension.js +49 -18
- package/dist/genome.d.ts +62 -0
- package/dist/graph.d.ts +52 -0
- package/dist/host.d.ts +21 -0
- package/dist/host.js +25 -0
- package/dist/identity.d.ts +2 -0
- package/dist/init-config.d.ts +106 -0
- package/dist/jellyfish.d.ts +35 -0
- package/dist/jellyfish.js +230 -97
- package/dist/judge.d.ts +25 -0
- package/dist/lineage-cli.d.ts +1 -0
- package/dist/loop-cli.d.ts +34 -0
- package/dist/loop-tools.d.ts +80 -0
- package/dist/mature-tools.d.ts +53 -0
- package/dist/model-check.d.ts +42 -0
- package/dist/module-report.d.ts +9 -0
- package/dist/pi-launch.d.ts +1 -0
- package/dist/pi.d.ts +246 -0
- package/dist/picture-row.d.ts +10 -0
- package/dist/plain/check.d.ts +23 -0
- package/dist/plain/concepts.d.ts +11 -0
- package/dist/plain/errors.d.ts +22 -0
- package/dist/plain/files.d.ts +12 -0
- package/dist/plain/highlight.d.ts +42 -0
- package/dist/plain/index.d.ts +15 -0
- package/dist/plain/liquid.d.ts +22 -0
- package/dist/plain/markdown.d.ts +74 -0
- package/dist/plain/parser.d.ts +87 -0
- package/dist/plain/spec.d.ts +90 -0
- package/dist/plain/stdlib.d.ts +14 -0
- package/dist/question-dialog.d.ts +51 -0
- package/dist/questioning.d.ts +55 -0
- package/dist/quiet.d.ts +34 -0
- package/dist/regenerate/activity.d.ts +207 -0
- package/dist/regenerate/agent-env.d.ts +44 -0
- package/dist/regenerate/agent-shell.d.ts +49 -0
- package/dist/regenerate/arbiter.d.ts +68 -0
- package/dist/regenerate/audit.d.ts +69 -0
- package/dist/regenerate/cases.d.ts +9 -0
- package/dist/regenerate/change-view.d.ts +18 -0
- package/dist/regenerate/choose-conformance.d.ts +32 -0
- package/dist/regenerate/chunk-plan.d.ts +164 -0
- package/dist/regenerate/codebase.d.ts +21 -0
- package/dist/regenerate/command-check.d.ts +40 -0
- package/dist/regenerate/compaction.d.ts +13 -0
- package/dist/regenerate/confine.d.ts +62 -0
- package/dist/regenerate/conform.d.ts +63 -0
- package/dist/regenerate/conformance-agents.d.ts +405 -0
- package/dist/regenerate/conformance.d.ts +189 -0
- package/dist/regenerate/conversation-writes.d.ts +10 -0
- package/dist/regenerate/credentials.d.ts +18 -0
- package/dist/regenerate/debug-log.d.ts +54 -0
- package/dist/regenerate/debugger.d.ts +31 -0
- package/dist/regenerate/delivery.d.ts +6 -0
- package/dist/regenerate/diagnose-job.d.ts +2 -0
- package/dist/regenerate/diagnose.d.ts +46 -0
- package/dist/regenerate/diff-view.d.ts +61 -0
- package/dist/regenerate/drift.d.ts +84 -0
- package/dist/regenerate/engine.d.ts +52 -0
- package/dist/regenerate/environment-error.d.ts +136 -0
- package/dist/regenerate/job-log.d.ts +28 -0
- package/dist/regenerate/job-panel.d.ts +122 -0
- package/dist/regenerate/jobs-tree.d.ts +71 -0
- package/dist/regenerate/jobs.d.ts +186 -0
- package/dist/regenerate/lanes.d.ts +16 -0
- package/dist/regenerate/lineage.d.ts +95 -0
- package/dist/regenerate/list-arguments.d.ts +21 -0
- package/dist/regenerate/loop.d.ts +392 -0
- package/dist/regenerate/masking.d.ts +19 -0
- package/dist/regenerate/notes.d.ts +159 -0
- package/dist/regenerate/os-sandbox.d.ts +89 -0
- package/dist/regenerate/panel-dock.d.ts +23 -0
- package/dist/regenerate/paths.d.ts +92 -0
- package/dist/regenerate/plain-palette.d.ts +34 -0
- package/dist/regenerate/prompt.d.ts +192 -0
- package/dist/regenerate/records.d.ts +88 -0
- package/dist/regenerate/regenerate.d.ts +108 -0
- package/dist/regenerate/regression.d.ts +58 -0
- package/dist/regenerate/release.d.ts +123 -0
- package/dist/regenerate/requires.d.ts +96 -0
- package/dist/regenerate/resources.d.ts +53 -0
- package/dist/regenerate/self-check.d.ts +29 -0
- package/dist/regenerate/services.d.ts +28 -0
- package/dist/regenerate/shell.d.ts +91 -0
- package/dist/regenerate/side-panel.d.ts +57 -0
- package/dist/regenerate/spec-map-view.d.ts +139 -0
- package/dist/regenerate/spec-map.d.ts +138 -0
- package/dist/regenerate/spec-steps.d.ts +137 -0
- package/dist/regenerate/state.d.ts +20 -0
- package/dist/regenerate/steer.d.ts +34 -0
- package/dist/regenerate/steering.d.ts +56 -0
- package/dist/regenerate/stop-report.d.ts +43 -0
- package/dist/regenerate/submit-work.d.ts +42 -0
- package/dist/regenerate/test-kinds.d.ts +42 -0
- package/dist/regenerate/test-scripts.d.ts +221 -0
- package/dist/regenerate/testing.d.ts +141 -0
- package/dist/regenerate/transcript-view.d.ts +21 -0
- package/dist/regenerate/unit-gate.d.ts +27 -0
- package/dist/regenerate/unit-review.d.ts +152 -0
- package/dist/regenerate/web.d.ts +61 -0
- package/dist/regenerate/workspace.d.ts +12 -0
- package/dist/regenerate-cli.d.ts +1 -0
- package/dist/release-agent.d.ts +26 -0
- package/dist/release-cli.d.ts +1 -0
- package/dist/release-tools.d.ts +38 -0
- package/dist/resume-line.d.ts +2 -0
- package/dist/review/live.d.ts +72 -0
- package/dist/rules.d.ts +20 -0
- package/dist/run-report.d.ts +88 -0
- package/dist/screen-padding.d.ts +28 -0
- package/dist/self-invocation.d.ts +25 -0
- package/dist/setup.d.ts +43 -0
- package/dist/skill-progress.d.ts +46 -0
- package/dist/skill.d.ts +98 -0
- package/dist/skills.d.ts +30 -0
- package/dist/spec-diff-cli.d.ts +1 -0
- package/dist/spec-tools.d.ts +36 -0
- package/dist/stack.d.ts +58 -0
- package/dist/stacks.d.ts +12 -0
- package/dist/stdlib.d.ts +27 -0
- package/dist/terminal-images.d.ts +2 -0
- package/dist/tools.d.ts +101 -0
- package/dist/validate-cli.d.ts +1 -0
- package/docs/README.md +2 -0
- package/docs/hosting.md +52 -0
- package/docs/images/turri-banner.png +0 -0
- package/docs/theming.md +6 -4
- package/docs/using.md +1 -1
- package/package.json +8 -1
package/dist/stdlib.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ***plain standard library, as the agents that write specs are told it: every stack's import name,
|
|
3
|
+
* its conformance template and what it is, and where the files are - read from `stdlib/` each time, so
|
|
4
|
+
* what they are told is what is there. Sorted, so the rules block it goes into is the same every turn and
|
|
5
|
+
* stays cached.
|
|
6
|
+
*/
|
|
7
|
+
export interface StdlibTemplate {
|
|
8
|
+
/** What a spec imports it as: `stdlib/backend/python-fastapi`. */
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
text: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function stdlibTemplates(dir?: string): StdlibTemplate[];
|
|
14
|
+
/** A stack to import - not a kind's `common`, not a conformance template, and not a language's. */
|
|
15
|
+
export declare function isStack(template: StdlibTemplate): boolean;
|
|
16
|
+
/** A stack's conformance template: `stdlib/backend/python-fastapi` has `stdlib/backend/conformance/python-fastapi`. */
|
|
17
|
+
export declare function conformanceOf(stack: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* The catalogue appended to the stdlib rule: every stack with its conformance template and what it is, the
|
|
20
|
+
* shared templates, and the folder they are all in - an absolute path, so an agent reads the one it imports
|
|
21
|
+
* instead of looking for it. The text of each is not in it: there are too many to carry in every prompt.
|
|
22
|
+
*/
|
|
23
|
+
export declare function stdlibCatalogue(templates?: StdlibTemplate[], dir?: string): string;
|
|
24
|
+
/** How many stacks the standard library has, for the banner. */
|
|
25
|
+
export declare function stdlibStackCount(templates?: StdlibTemplate[]): number;
|
|
26
|
+
/** The standard library as the person reads it, with `/stdlib`: each kind's stacks, what each is, and how to import one. */
|
|
27
|
+
export declare function describeStdlib(templates?: StdlibTemplate[], dir?: string): string;
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { Type, type Static } from "typebox";
|
|
3
|
+
import type { Questioning } from "./questioning.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Personal tools.
|
|
6
|
+
*
|
|
7
|
+
* `write_artifact` is the executor's only way to produce output: it can read the
|
|
8
|
+
* repo, but everything it makes lands in one sandboxed directory under a name the
|
|
9
|
+
* graph chose. That is what lets the gate know exactly what to review - there is
|
|
10
|
+
* no "find the thing the agent probably changed" step.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createWriteArtifactTool(runDir: string): ToolDefinition<Type.TObject<{
|
|
13
|
+
path: Type.TString;
|
|
14
|
+
content: Type.TString;
|
|
15
|
+
}>, {
|
|
16
|
+
path: string;
|
|
17
|
+
bytes: number;
|
|
18
|
+
}, any> & ToolDefinition<any, any, any>;
|
|
19
|
+
export declare const VerdictSchema: Type.TObject<{
|
|
20
|
+
verdict: Type.TUnion<[Type.TLiteral<"pass">, Type.TLiteral<"fail">]>;
|
|
21
|
+
violations: Type.TArray<Type.TObject<{
|
|
22
|
+
criterion: Type.TString;
|
|
23
|
+
evidence: Type.TString;
|
|
24
|
+
fix: Type.TString;
|
|
25
|
+
}>>;
|
|
26
|
+
}>;
|
|
27
|
+
export type Verdict = Static<typeof VerdictSchema>;
|
|
28
|
+
/**
|
|
29
|
+
* The judge's only tool. Forcing the verdict through a schema is the difference
|
|
30
|
+
* between a decision the graph can branch on and a paragraph someone has to read.
|
|
31
|
+
* `terminate` stops the judge session as soon as the verdict lands.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createVerdictTool(onVerdict: (v: Verdict) => void): ToolDefinition<Type.TObject<{
|
|
34
|
+
verdict: Type.TUnion<[Type.TLiteral<"pass">, Type.TLiteral<"fail">]>;
|
|
35
|
+
violations: Type.TArray<Type.TObject<{
|
|
36
|
+
criterion: Type.TString;
|
|
37
|
+
evidence: Type.TString;
|
|
38
|
+
fix: Type.TString;
|
|
39
|
+
}>>;
|
|
40
|
+
}>, {
|
|
41
|
+
verdict: "pass" | "fail";
|
|
42
|
+
violations: {
|
|
43
|
+
fix: string;
|
|
44
|
+
evidence: string;
|
|
45
|
+
criterion: string;
|
|
46
|
+
}[];
|
|
47
|
+
}, any> & ToolDefinition<any, any, any>;
|
|
48
|
+
import { runAsk, type AskUser, type AskUserRequest } from "./ask.ts";
|
|
49
|
+
import { type LiveReviewer } from "./review/live.ts";
|
|
50
|
+
export type { AskUser, AskUserRequest };
|
|
51
|
+
/**
|
|
52
|
+
* Lets a skill step put a question to the person running it.
|
|
53
|
+
*
|
|
54
|
+
* A gated skill otherwise runs to completion with nobody to ask, which is fine for work
|
|
55
|
+
* that is fully specified and useless for an interview. The harness still owns the
|
|
56
|
+
* sequence - the step decides what to ask, not whether the gate afterwards runs.
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* `gate`, for an interview that holds its questions to rules - the questioning level's cap (questioning.ts), an answer
|
|
60
|
+
* written as a spec change before the next question: a question it refuses is not asked, and `confirms_phase` marks a
|
|
61
|
+
* phase's closing confirmation, which the cap never counts.
|
|
62
|
+
*
|
|
63
|
+
* `talks`: where the asker answers a person who chose "Chat about this" - `"reply"`, the conversation's agent, in its
|
|
64
|
+
* reply; `"context"`, a skill's agent, whose replies nobody sees, as the `context` of the question asked again. Such a
|
|
65
|
+
* choice is no answer: neither the cap nor `onAnswered` counts it.
|
|
66
|
+
*/
|
|
67
|
+
export declare function createAskUserTool(ask: AskUser, onAnswered?: (answer: string, confirmsPhase: boolean) => void, said?: () => string, gate?: Pick<Questioning, "refusal" | "answered">, talks?: "reply" | "context"): ToolDefinition<Type.TObject<{
|
|
68
|
+
confirms_phase?: Type.TOptional<Type.TBoolean> | undefined;
|
|
69
|
+
question: Type.TString;
|
|
70
|
+
options: Type.TOptional<Type.TArray<Type.TString>>;
|
|
71
|
+
multi_select: Type.TOptional<Type.TBoolean>;
|
|
72
|
+
context: Type.TOptional<Type.TString>;
|
|
73
|
+
free_form: Type.TOptional<Type.TBoolean>;
|
|
74
|
+
}>, {
|
|
75
|
+
question: string;
|
|
76
|
+
answer: string;
|
|
77
|
+
}, any> & ToolDefinition<any, any, any>;
|
|
78
|
+
export { runAsk };
|
|
79
|
+
/** Ends the questions of a phase the questioning level caps: what is left, the agent decides itself. */
|
|
80
|
+
export declare function createEndQuestionsTool(questioning: Pick<Questioning, "end">): ToolDefinition<Type.TObject<{}>, {}, any> & ToolDefinition<any, any, any>;
|
|
81
|
+
/**
|
|
82
|
+
* Everything the reviewer has to say since the last tool call.
|
|
83
|
+
*
|
|
84
|
+
* It rides along on the tool results the interviewer is already getting, so a finding
|
|
85
|
+
* lands between two questions without the interviewer having to remember to go looking
|
|
86
|
+
* for one.
|
|
87
|
+
*/
|
|
88
|
+
export declare function reviewNote(liveReview: LiveReviewer | undefined): string;
|
|
89
|
+
export type { LiveReviewer };
|
|
90
|
+
/**
|
|
91
|
+
* With a live reviewer, a way to answer the reviewer's questions. How the builds stand, a skill reads with the
|
|
92
|
+
* conversation's own drift (loop-tools.ts), the reviewer's findings riding along on it (`withReviewNote`).
|
|
93
|
+
*/
|
|
94
|
+
export declare function createReviewTools(liveReview?: LiveReviewer): (ToolDefinition<Type.TObject<{
|
|
95
|
+
question_id: Type.TString;
|
|
96
|
+
answer: Type.TString;
|
|
97
|
+
}>, {
|
|
98
|
+
accepted: boolean;
|
|
99
|
+
}, any> & ToolDefinition<any, any, any>)[];
|
|
100
|
+
/** A tool whose every result carries what the reviewer has said since the last one. */
|
|
101
|
+
export declare function withReviewNote(tool: ToolDefinition<any, any, any>, liveReview: LiveReviewer | undefined): ToolDefinition<any, any, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/docs/README.md
CHANGED
|
@@ -31,6 +31,7 @@ turri implements regenerative software: the \*\*\*plain specs are the durable de
|
|
|
31
31
|
| what the agents can and cannot reach | [the sandbox](sandbox.md) |
|
|
32
32
|
| how skill review gates and judges work | [skills and gates](skills-and-gates.md) |
|
|
33
33
|
| how the parser matches the reference implementation | [the \*\*\*plain parser](parser.md) |
|
|
34
|
+
| how a desktop app or an editor runs turri's conversation itself | [running turri in a host](hosting.md) |
|
|
34
35
|
| where the code for something lives | [development](development.md#layout) |
|
|
35
36
|
|
|
36
37
|
## All pages
|
|
@@ -48,4 +49,5 @@ turri implements regenerative software: the \*\*\*plain specs are the durable de
|
|
|
48
49
|
| [Skills and gates](skills-and-gates.md) | the gate syntax, what the harness enforces, what a step can do, the rules, trying the gates |
|
|
49
50
|
| [The \*\*\*plain parser](parser.md) | the TypeScript port, `turri validate`, inheritance, the iterator, fidelity |
|
|
50
51
|
| [Theming](theming.md) | the turri themes, contrast, backgrounds, the font |
|
|
52
|
+
| [Running turri in a host](hosting.md) | `@turri-dev/cli/host`: the conversation in a host's own window - its jobs, its questions - and what a host shows beside it |
|
|
51
53
|
| [Development](development.md) | tests, the source layout, known edges |
|
package/docs/hosting.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Running turri in a host
|
|
2
|
+
|
|
3
|
+
`turri` runs its conversation in a terminal. A host - a desktop app, an editor - can run the same conversation itself, in its own window, and show what turri's terminal would draw in its own way: the jobs, the questions, the spec. It imports turri from npm as `@turri-dev/cli/host`.
|
|
4
|
+
|
|
5
|
+
## What the host entry gives
|
|
6
|
+
|
|
7
|
+
`@turri-dev/cli/host` is turri's compiled code (`dist/host.js`, with its types) - the conversation and what a host shows beside it:
|
|
8
|
+
|
|
9
|
+
| export | what it is |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `createTurriExtension(host)` | turri's conversation as an extension of pi's: every tool, slash command, rule and skill the terminal has. The host is told of its jobs and asks its questions - see below. |
|
|
12
|
+
| `pi` | pi itself, as turri's extension is built against it. Make the session with this one - `pi.createAgentSession`, `pi.DefaultResourceLoader` - not another copy. |
|
|
13
|
+
| `readProjectConfig`, `projectModels`, `modelSpec`, `configForSpec`, `hasProjectConfig`, `stacksOf` | the project's settings, as [config.turri.yaml](config.md) has them. |
|
|
14
|
+
| `initConfig(dir, { vendor, bedrock, force })`, `VENDORS`, `BEDROCK_REGIONS`, `BEDROCK_DEFAULT`, `bedrockModels` | a project's first config.turri.yaml, as `turri init-config` writes it: the host asks which vendor's models - `VENDORS` has each one's label and its two models, `BEDROCK_REGIONS` where Bedrock serves each maker's - and `initConfig` writes it, saying what it did. One already there keeps everything but its two models. |
|
|
15
|
+
| `checkPlainFile`, `plainFileParser`, `resolveTemplateDirs`, `iterateFunctionalSpecs`, `FUNCTIONAL_REQUIREMENTS` | a spec checked and parsed, its functional specs one by one - as `turri validate` reads it. |
|
|
16
|
+
| `highlightLines`, `roleOf` | a spec's lines coloured by turri's own \*\*\*plain grammar. |
|
|
17
|
+
| `functionalityCompletion`, `createWorkLoop`, `createJobRegistry`, `promptOf`, `describeModules` | how far each functional spec is built, and - on a loop of the host's own with `dryRun` - the work a spec change would plan, as `turri glimpse` does. |
|
|
18
|
+
| `onModelEvent`, `describeTurnIncident` | a provider failing and waited out, a turn turri ended itself. |
|
|
19
|
+
| `sweepOrphanedGroups` | stop what a turri killed outright left running, before anything starts. |
|
|
20
|
+
|
|
21
|
+
It is turri's own code, as the terminal runs it: a 0.x release may change any of it.
|
|
22
|
+
|
|
23
|
+
## The conversation in a host
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { createTurriExtension, pi } from "@turri-dev/cli/host";
|
|
27
|
+
|
|
28
|
+
const loader = new pi.DefaultResourceLoader({
|
|
29
|
+
cwd,
|
|
30
|
+
agentDir: pi.getAgentDir(),
|
|
31
|
+
extensionFactories: [
|
|
32
|
+
createTurriExtension({
|
|
33
|
+
onJobs: (jobs) => {}, // the conversation's job registry: every pulse it starts
|
|
34
|
+
onWorkLoop: (loop) => {}, // its work loop, once work is first asked for
|
|
35
|
+
onJobChange: (job) => {}, // a job started, moved on, did something, or ended
|
|
36
|
+
onPlanChange: () => {}, // what is planned changed with no job
|
|
37
|
+
dialogs: { select, input }, // ask_user's questions, put in the host's own dialogs
|
|
38
|
+
}),
|
|
39
|
+
],
|
|
40
|
+
});
|
|
41
|
+
await loader.reload();
|
|
42
|
+
const { session } = await pi.createAgentSession({ cwd, resourceLoader: loader });
|
|
43
|
+
await session.bindExtensions({ uiContext, mode: "tui" });
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- **The jobs.** The pulses the conversation starts - its tools, `/regenerate`, a spec change - run in its own job registry and work loop, the project's one. The host is handed both as they are made, and told of each job as it changes, so it shows the very jobs the conversation runs. Its buttons are best the conversation's commands - `session.prompt("/regenerate app.plain")` - so there is never a second loop on the same project.
|
|
47
|
+
- **The questions.** `dialogs` is `ask_user`'s two dialogs: `select(title, options, context, at)` and `input(title, context)`, each resolving with the answer, or undefined when the person dismissed it. Given, the conversation's questions and a skill's interview are put in them; without it, in the terminal's own dialog.
|
|
48
|
+
- **The mode.** `mode: "tui"` runs the work in the background and keeps the conversation free, as the terminal does; `rpc`, `json` and `print` wait for each job. The extension's other UI calls - its notices, its working line, a confirm - come to the host's `uiContext`, as pi's [SDK](https://github.com/earendil-works/pi) describes it.
|
|
49
|
+
|
|
50
|
+
## Running it
|
|
51
|
+
|
|
52
|
+
The host entry is compiled JavaScript, so any Node from 22.19 runs it - Electron's own included; nothing strips types. It finds turri's own folders - `genome/`, `stdlib/`, `.pi/` - beside `dist/` in the package, wherever npm installed it.
|
|
Binary file
|
package/docs/theming.md
CHANGED
|
@@ -14,7 +14,7 @@ Bad input fails quietly - an unknown `--use-theme` name and a malformed theme fi
|
|
|
14
14
|
|
|
15
15
|
## The palette
|
|
16
16
|
|
|
17
|
-
Both themes, the command line's colours, the spec diff's, the banner's jellyfish and the docs' diagram are drawn from turri's design system and nothing else: dark, quiet surfaces, one pink thing to press, neon for anything you can follow. These are all the colours turri has - none is mixed, tinted or added.
|
|
17
|
+
Both themes, the command line's colours, the spec diff's, the banner's jellyfish and the docs' diagram are drawn from turri's design system and nothing else: dark, quiet surfaces, one pink thing to press, neon for anything you can follow. These are all the colours turri has - none is mixed, tinted or added, but for the jellyfish's tentacles, every other pixel of which the design draws half seen.
|
|
18
18
|
|
|
19
19
|
| name | value | in `turri-dark` |
|
|
20
20
|
|---|---|---|
|
|
@@ -25,13 +25,15 @@ Both themes, the command line's colours, the spec diff's, the banner's jellyfish
|
|
|
25
25
|
| lines | `#22344a` | rules, dividers, frames: `borderMuted`, `mdHr` |
|
|
26
26
|
| path | `#3e5a6b` | the editor's border, what is dim: `dim`, line numbers |
|
|
27
27
|
| grauzone | `#85a3b2` | body text, and what can be skimmed: `text`, `muted` |
|
|
28
|
-
| white | `#f4f7f9` | headings, tool titles, what you typed
|
|
28
|
+
| white | `#f4f7f9` | headings, tool titles, what you typed |
|
|
29
29
|
| siesta tan | `#e9d8c8` | strings in code, \*\*\*plain's text in quotes or backticks |
|
|
30
|
-
| eggplant | `#732553` | a removed line's fill in a spec diff |
|
|
30
|
+
| eggplant | `#732553` | a removed line's fill in a spec diff, the jellyfish's rim |
|
|
31
31
|
| neon | `#5ce1e6` | links, focus, the selection, section labels, \*\*\*plain's concepts in a spec diff: `accent`, `mdLink`, regen's `◆` |
|
|
32
32
|
| neon hover | `#8eebee` | inline code - siesta tan beside white text was too close to tell apart, and tiring to read - types in code, an added line's fill in a light theme's spec diff: `mdCode` |
|
|
33
33
|
| pink | `#ff5c8d` | the wordmark, the jellyfish's bell, and what is done - its `✓`, the spec map's `◇` and `◆`: `success` |
|
|
34
|
-
| pink hover | `#ff7fa6` | \*\*\*plain's section headers, a removed line's `-`, keywords in code |
|
|
34
|
+
| pink hover | `#ff7fa6` | the glint on the jellyfish's bell, \*\*\*plain's section headers, a removed line's `-`, keywords in code |
|
|
35
|
+
| orchid | `#a9479a` | the jellyfish's bell, between its pink and its indigo - nowhere else |
|
|
36
|
+
| indigo | `#5b57d9` | the jellyfish's bell, at its rim - nowhere else |
|
|
35
37
|
| orange | `#ff7a3d` | the jellyfish's gut, the `$` of bash mode, and everything that asks for you - what failed (`✗`), what works with limits, what needs you (the spec map's `!`): `error`, `warning` |
|
|
36
38
|
|
|
37
39
|
The design system keeps pink for the one thing to press and orange for the `$` prompt alone. A terminal has no buttons, but it needs status colours, so pink carries what is done and orange everything that asks for you - what failed, what works with limits, what waits on you - the mark (`✗`, `!`, `■`) telling them apart. The palette has no red.
|
package/docs/using.md
CHANGED
|
@@ -7,7 +7,7 @@ cd ~/my-project
|
|
|
7
7
|
turri
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
That is pi, with turri's tools, skills and themes loaded - `turri` alone, or with pi's options (`turri -c`, `turri --harness-model <m>`). It opens with turri's own banner - the jellyfish it is named after,
|
|
10
|
+
That is pi, with turri's tools, skills and themes loaded - `turri` alone, or with pi's options (`turri -c`, `turri --harness-model <m>`). It opens with turri's own banner - the jellyfish it is named after, regenerating until the conversation fills the screen: a pixel polyp on the sea floor grows into the jellyfish - a bell from pink down to indigo, an orange gut, neon tentacles - which swims a while, sinks back to the floor, and the polyp grows again, round and round: a picture in a terminal that shows images (Kitty, Ghostty, WezTerm, Warp, iTerm2), and drawn at a third of the size in half blocks in any other, tmux included (`src/jellyfish.ts` draws it, ported from the design system's pixel kit, `scripts/jellyfish-frames.mjs` writes the pictures) - turri's version (and, run from a clone, the commit it is on, and whether the clone has changes) and where its settings are changed - and only when something is wrong, skills that failed to load or agents' commands less fenced than they should be - rather than pi's startup header and resource list; `turri --verbose` shows those too. pi's "Update Available" notice is left out - turri's pi is a pinned dependency `pi update` never touches - and the terminal's tab reads `🪼 turri - <folder>`, not pi's `π`. Talk to it: ask it to start a project, add a feature, render a module, fix a spec. It decides which skill or tool applies - but not *how* a skill runs: `cultivate` hands the work to the gated runner, which owns the steps, the gates and the judges (see [skills and gates](skills-and-gates.md)).
|
|
11
11
|
|
|
12
12
|
The skills that build from scratch:
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turri-dev/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7-next.ccadaa0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
"bin": {
|
|
17
17
|
"turri": "bin/turri.mjs"
|
|
18
18
|
},
|
|
19
|
+
"exports": {
|
|
20
|
+
"./host": {
|
|
21
|
+
"types": "./dist/host.d.ts",
|
|
22
|
+
"import": "./dist/host.js"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
19
26
|
"scripts": {
|
|
20
27
|
"cultivate": "tsx src/cultivate-cli.ts",
|
|
21
28
|
"typecheck": "tsc --noEmit",
|