@praxis-framework/cli 0.1.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 +51 -0
- package/dist/app.js +122 -0
- package/dist/app.js.map +1 -0
- package/dist/commands/init-config.js +85 -0
- package/dist/commands/init-config.js.map +1 -0
- package/dist/commands/init.js +59 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/log.js +171 -0
- package/dist/commands/log.js.map +1 -0
- package/dist/flows/capabilities.js +14 -0
- package/dist/flows/capabilities.js.map +1 -0
- package/dist/flows/inhibitions.js +14 -0
- package/dist/flows/inhibitions.js.map +1 -0
- package/dist/flows/initial-verbs.js +82 -0
- package/dist/flows/initial-verbs.js.map +1 -0
- package/dist/flows/organisation.js +112 -0
- package/dist/flows/organisation.js.map +1 -0
- package/dist/flows/path-choice.js +22 -0
- package/dist/flows/path-choice.js.map +1 -0
- package/dist/flows/review.js +31 -0
- package/dist/flows/review.js.map +1 -0
- package/dist/flows/role-definition.js +77 -0
- package/dist/flows/role-definition.js.map +1 -0
- package/dist/flows/tools.js +63 -0
- package/dist/flows/tools.js.map +1 -0
- package/dist/flows/voice.js +146 -0
- package/dist/flows/voice.js.map +1 -0
- package/dist/flows/welcome.js +17 -0
- package/dist/flows/welcome.js.map +1 -0
- package/dist/flows/wrote.js +51 -0
- package/dist/flows/wrote.js.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/catalog.js +190 -0
- package/dist/lib/catalog.js.map +1 -0
- package/dist/lib/seed-adapter.js +28 -0
- package/dist/lib/seed-adapter.js.map +1 -0
- package/dist/lib/traits.js +13 -0
- package/dist/lib/traits.js.map +1 -0
- package/dist/state/form.js +63 -0
- package/dist/state/form.js.map +1 -0
- package/dist/state/steps.js +28 -0
- package/dist/state/steps.js.map +1 -0
- package/dist/ui/header.js +14 -0
- package/dist/ui/header.js.map +1 -0
- package/dist/ui/list-builder-state.js +179 -0
- package/dist/ui/list-builder-state.js.map +1 -0
- package/dist/ui/list-builder.js +144 -0
- package/dist/ui/list-builder.js.map +1 -0
- package/dist/ui/theme.js +8 -0
- package/dist/ui/theme.js.map +1 -0
- package/examples/sample-role.json +24 -0
- package/package.json +66 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Box, Text, useInput } from 'ink';
|
|
4
|
+
import TextInput from 'ink-text-input';
|
|
5
|
+
import { accent, muted, ok, warn } from './theme.js';
|
|
6
|
+
import { applyAction, initialState, trimEmptyRows, } from './list-builder-state.js';
|
|
7
|
+
/**
|
|
8
|
+
* Generic add/edit/delete list builder. Keeps the row data structure
|
|
9
|
+
* opaque to the component — callers describe the editable fields via
|
|
10
|
+
* `fields` and how to mint a new item via `empty`.
|
|
11
|
+
*
|
|
12
|
+
* Interactions:
|
|
13
|
+
* ↑/↓ navigate rows (↓ on the last row appends an empty trailing row)
|
|
14
|
+
* tab cycle editable field within the focused row
|
|
15
|
+
* enter "next entry" — commit the current row and either advance to the
|
|
16
|
+
* next existing row, append a new empty row at the bottom, or
|
|
17
|
+
* finalise (the latter when the focused row is itself empty, or
|
|
18
|
+
* when the row count is already at `max`).
|
|
19
|
+
* backspace on an empty row → delete it
|
|
20
|
+
* esc cancel the entire step
|
|
21
|
+
*
|
|
22
|
+
* Why enter doesn't always finalise: shift+enter is the operator's natural
|
|
23
|
+
* "submit and add another" shortcut, but Ink's `useInput` broadcasts shift+enter
|
|
24
|
+
* as a literal `\n` to the focused TextInput, polluting the data with embedded
|
|
25
|
+
* newlines. So the framework remaps the bare-enter semantics to match the
|
|
26
|
+
* intuition — finalise then becomes "press enter on an empty trailing row",
|
|
27
|
+
* which is what falls out naturally after the operator's last item.
|
|
28
|
+
*
|
|
29
|
+
* Plain alphabetic keys (including `j`/`k`/`d`) are intentionally NOT bound
|
|
30
|
+
* to navigation — they collide with text input. The reported "typed second
|
|
31
|
+
* field's text into first field" bug came from `d` racing with the row-clear
|
|
32
|
+
* shortcut while a `TextInput` was focused. The state machine that drives
|
|
33
|
+
* this component lives in `./list-builder-state.ts` for unit-testing.
|
|
34
|
+
*/
|
|
35
|
+
export const ListBuilder = ({ title, helper, initial, fields, empty, validate, min, max, onNext, onCancel, }) => {
|
|
36
|
+
// Strip the FieldSpec down to what the state machine needs — the rest of
|
|
37
|
+
// the spec (label, placeholder) is presentational only. `validate` is
|
|
38
|
+
// forwarded so the state machine can refuse to advance past an invalid
|
|
39
|
+
// row, matching the protective gate the finalise path already enforces.
|
|
40
|
+
const config = {
|
|
41
|
+
fields: fields.map((f) => ({ extract: f.extract, apply: f.apply })),
|
|
42
|
+
empty,
|
|
43
|
+
max,
|
|
44
|
+
validate,
|
|
45
|
+
};
|
|
46
|
+
const [state, setState] = useState(() => initialState(initial, config));
|
|
47
|
+
const [topLevelError, setTopLevelError] = useState(null);
|
|
48
|
+
const finalise = (items) => {
|
|
49
|
+
const trimmed = trimEmptyRows(items, config);
|
|
50
|
+
if (trimmed.length < min) {
|
|
51
|
+
setTopLevelError(min === 1
|
|
52
|
+
? 'At least one entry is required.'
|
|
53
|
+
: `At least ${min} entries are required.`);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
for (const item of trimmed) {
|
|
57
|
+
const err = validate(item);
|
|
58
|
+
if (err !== null) {
|
|
59
|
+
setTopLevelError(`Fix the highlighted row before continuing: ${err}`);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
onNext(trimmed);
|
|
64
|
+
};
|
|
65
|
+
useInput((input, key) => {
|
|
66
|
+
if (key.escape) {
|
|
67
|
+
onCancel();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (key.tab) {
|
|
71
|
+
setTopLevelError(null);
|
|
72
|
+
const result = applyAction(state, { type: 'tab' }, config);
|
|
73
|
+
if (result.kind === 'state')
|
|
74
|
+
setState(result.state);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (key.downArrow) {
|
|
78
|
+
setTopLevelError(null);
|
|
79
|
+
const result = applyAction(state, { type: 'down' }, config);
|
|
80
|
+
if (result.kind === 'state')
|
|
81
|
+
setState(result.state);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (key.upArrow) {
|
|
85
|
+
setTopLevelError(null);
|
|
86
|
+
const result = applyAction(state, { type: 'up' }, config);
|
|
87
|
+
if (result.kind === 'state')
|
|
88
|
+
setState(result.state);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// Backspace on an empty draft (and only when more than one row exists)
|
|
92
|
+
// deletes the focused row. The `TextInput` itself ignores backspace once
|
|
93
|
+
// its cursor is at offset 0, so this doesn't fight the editor.
|
|
94
|
+
if (key.backspace &&
|
|
95
|
+
state.draft.length === 0 &&
|
|
96
|
+
state.items.length > 1) {
|
|
97
|
+
const result = applyAction(state, { type: 'deleteRow' }, config);
|
|
98
|
+
if (result.kind === 'state')
|
|
99
|
+
setState(result.state);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
// Plain printable characters fall through to the focused TextInput's own
|
|
103
|
+
// `useInput` handler — we deliberately don't intercept them here so words
|
|
104
|
+
// containing 'j', 'k', or 'd' type cleanly. (See header comment.)
|
|
105
|
+
void input;
|
|
106
|
+
});
|
|
107
|
+
// ink-text-input swallows enter for us, so the submit handler is the
|
|
108
|
+
// single place we decide whether enter advances to the next row, adds
|
|
109
|
+
// a new trailing row, or finalises the step.
|
|
110
|
+
const handleSubmit = () => {
|
|
111
|
+
setTopLevelError(null);
|
|
112
|
+
const result = applyAction(state, { type: 'submit' }, config);
|
|
113
|
+
if (result.kind === 'finalise') {
|
|
114
|
+
finalise(result.items);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
setState(result.state);
|
|
118
|
+
};
|
|
119
|
+
const setDraft = (value) => {
|
|
120
|
+
setTopLevelError(null);
|
|
121
|
+
const result = applyAction(state, { type: 'setDraft', value }, config);
|
|
122
|
+
if (result.kind === 'state')
|
|
123
|
+
setState(result.state);
|
|
124
|
+
};
|
|
125
|
+
const focusedField = fields[state.fieldIdx];
|
|
126
|
+
const focusedFieldKey = focusedField?.key ?? '';
|
|
127
|
+
return (_jsxs(Box, { flexDirection: "column", children: [title.length > 0 ? (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { children: accent(title) }) })) : null, helper.length > 0 ? (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { children: muted(helper) }) })) : null, _jsxs(Box, { flexDirection: "column", children: [state.items.map((item, i) => {
|
|
128
|
+
const isFocused = i === state.rowIdx;
|
|
129
|
+
const rowErr = validate(item);
|
|
130
|
+
const isRowEmpty = fields.every((f) => f.extract(item).trim().length === 0);
|
|
131
|
+
return (_jsx(Row, { item: item, fields: fields, focused: isFocused, focusedFieldKey: isFocused ? focusedFieldKey : '', draft: isFocused ? state.draft : null, setDraft: setDraft, onSubmit: handleSubmit, error: isRowEmpty ? null : rowErr }, i));
|
|
132
|
+
}), state.items.length < max ? (_jsx(Box, { marginTop: 0, children: _jsxs(Text, { children: [muted(' ↳ '), muted(state.items.length === 0
|
|
133
|
+
? 'press enter to add the first entry'
|
|
134
|
+
: 'enter to add another (or finish on an empty row)')] }) })) : (_jsx(Box, { marginTop: 0, children: _jsx(Text, { children: muted(` · max ${max} reached — enter to finish`) }) }))] }), topLevelError ? (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: topLevelError }) })) : null, _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "\u2191/\u2193 navigate \u00B7 tab next field \u00B7 enter add/finish (empty row to finish) \u00B7 backspace clear/delete \u00B7 esc cancel" }), _jsx(Text, { dimColor: true, children: `${state.items.length} entr${state.items.length === 1 ? 'y' : 'ies'} · min ${min} · max ${max}` })] })] }));
|
|
135
|
+
};
|
|
136
|
+
const Row = ({ item, fields, focused, focusedFieldKey, draft, setDraft, onSubmit, error, }) => {
|
|
137
|
+
const cursor = focused ? accent('›') : ' ';
|
|
138
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsxs(Text, { children: [cursor, " "] }), fields.map((field, i) => {
|
|
139
|
+
const isEditing = focused && field.key === focusedFieldKey;
|
|
140
|
+
const stored = field.extract(item);
|
|
141
|
+
return (_jsxs(Box, { children: [i > 0 ? _jsx(Text, { children: muted(' · ') }) : null, _jsx(Text, { children: muted(field.label + ': ') }), isEditing && draft !== null ? (_jsx(TextInput, { value: draft, onChange: setDraft, onSubmit: onSubmit, placeholder: field.placeholder ?? '' })) : stored.length > 0 ? (_jsx(Text, { children: focused ? stored : ok(stored) })) : (_jsx(Text, { children: muted(field.placeholder ?? '(empty)') }))] }, field.key));
|
|
142
|
+
})] }), error ? (_jsx(Box, { marginLeft: 2, children: _jsx(Text, { children: warn(' ' + error) }) })) : null] }));
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=list-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-builder.js","sourceRoot":"","sources":["../../src/ui/list-builder.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,aAAa,GAGd,MAAM,yBAAyB,CAAC;AAuCjC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAK,EAC9B,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,EACH,MA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"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;AAC3B,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AAC3B,MAAM,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC,MAAM,CAAC;AAC9B,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC;AAC7B,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC,GAAG,CAAC;AAC5B,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"organisation": {
|
|
3
|
+
"name": "Acme BD",
|
|
4
|
+
"size": "small"
|
|
5
|
+
},
|
|
6
|
+
"role_definition": {
|
|
7
|
+
"role_name": "sales-lead",
|
|
8
|
+
"working_title": "Sales lead",
|
|
9
|
+
"one_sentence_purpose": "drives outbound on Acme's flagship product",
|
|
10
|
+
"day_to_day": "drafts cold outreach, reviews replies, escalates complex deals"
|
|
11
|
+
},
|
|
12
|
+
"tools": ["websearch", "mcp:google-workspace"],
|
|
13
|
+
"voice_traits": [
|
|
14
|
+
{ "trait": "direct", "qualifiers": ["short sentences, no hedging"] }
|
|
15
|
+
],
|
|
16
|
+
"capabilities": ["drafts cold-outreach emails"],
|
|
17
|
+
"inhibitions": ["never quote prices without sign-off"],
|
|
18
|
+
"initial_verbs": [
|
|
19
|
+
{
|
|
20
|
+
"slug": "draft-cold-emails",
|
|
21
|
+
"description": ["compose an outreach email per prospect"]
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@praxis-framework/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "praxis CLI — set up and manage praxis-framework roles",
|
|
7
|
+
"bin": {
|
|
8
|
+
"praxis": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"examples",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/steveworley/praxis-framework.git",
|
|
18
|
+
"directory": "cli"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"homepage": "https://github.com/steveworley/praxis-framework#readme",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/steveworley/praxis-framework/issues"
|
|
24
|
+
},
|
|
25
|
+
"author": "Steve Worley",
|
|
26
|
+
"keywords": [
|
|
27
|
+
"praxis",
|
|
28
|
+
"agent",
|
|
29
|
+
"cli",
|
|
30
|
+
"scaffold",
|
|
31
|
+
"role"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"dev": "tsx src/index.tsx",
|
|
35
|
+
"build": "tsc",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"check": "tsc --noEmit",
|
|
38
|
+
"prepublishOnly": "npm run build"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@praxis-framework/seed": "^0.1.0",
|
|
42
|
+
"commander": "^12.0.0",
|
|
43
|
+
"ink": "^5.0.0",
|
|
44
|
+
"react": "^18.3.0",
|
|
45
|
+
"ink-spinner": "^5.0.0",
|
|
46
|
+
"ink-text-input": "^6.0.0",
|
|
47
|
+
"ink-select-input": "^6.0.0",
|
|
48
|
+
"ink-big-text": "^2.0.0",
|
|
49
|
+
"ink-gradient": "^3.0.0",
|
|
50
|
+
"ink-task-list": "^2.0.0",
|
|
51
|
+
"boxen": "^7.1.1",
|
|
52
|
+
"picocolors": "^1.0.0",
|
|
53
|
+
"simple-git": "^3.27.0",
|
|
54
|
+
"zod": "^3.23.8"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/node": "^22.10.0",
|
|
58
|
+
"@types/react": "^18.3.0",
|
|
59
|
+
"tsx": "^4.0.0",
|
|
60
|
+
"typescript": "^5.6.3",
|
|
61
|
+
"vitest": "^2.1.8"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=20"
|
|
65
|
+
}
|
|
66
|
+
}
|