create-feltkit 0.3.37 → 0.5.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/bin/create.js +3 -3
- package/package.json +4 -4
- package/scaffold.d.ts +1 -1
- package/scaffold.js +8 -5
- package/template/README.md +72 -177
- package/template/_gitignore +4 -0
- package/template/agent/agent.ts +28 -0
- package/template/agent/channels/eve.ts +6 -0
- package/template/agent/instructions.md +24 -0
- package/template/agent/lib/deterministic.ts +46 -0
- package/template/agent/lib/feltkit-capabilities.json +294 -0
- package/template/agent/tools/crew_artifacts_create.ts +4 -0
- package/template/agent/tools/crew_context_read.ts +4 -0
- package/template/agent/tools/crew_context_record.ts +4 -0
- package/template/agent/tools/crew_context_search.ts +4 -0
- package/template/agent/tools/crew_decisions_propose.ts +4 -0
- package/template/agent/tools/crew_tasks_add.ts +6 -0
- package/template/agent/tools/crew_tasks_list.ts +4 -0
- package/template/agent/tools/crew_tasks_note.ts +4 -0
- package/template/agent/tools/crew_workspace_overview.ts +4 -0
- package/template/agent/tools/crew_workstreams_update.ts +6 -0
- package/template/agent/tools/web_fetch.ts +1 -0
- package/template/agent/tools/web_search.ts +3 -0
- package/template/feltkit/_generated/api.ts +8 -4
- package/template/feltkit/activity.ts +26 -0
- package/template/feltkit/app.ts +147 -54
- package/template/feltkit/boards.ts +10 -0
- package/template/feltkit/decisions.ts +99 -0
- package/template/feltkit/knowledge.ts +119 -0
- package/template/feltkit/model.ts +96 -0
- package/template/feltkit/work.ts +45 -0
- package/template/feltkit/workspace.ts +171 -0
- package/template/index.html +1 -1
- package/template/native/App.tsx +249 -0
- package/template/package.json +11 -5
- package/template/shared/rules.ts +23 -0
- package/template/src/App.tsx +177 -528
- package/template/src/screens/activity.tsx +66 -0
- package/template/src/screens/agent.tsx +188 -0
- package/template/src/screens/context.tsx +71 -0
- package/template/src/screens/decisions.tsx +89 -0
- package/template/src/screens/home.tsx +140 -0
- package/template/src/screens/team.tsx +13 -0
- package/template/src/screens/work.tsx +149 -0
- package/template/src/styles.css +201 -118
- package/template/src/ui.tsx +179 -0
- package/template/tests/crew.test.ts +111 -0
- package/template/tsconfig.json +18 -3
- package/template-managed/Dockerfile +2 -2
- package/template-managed/README.md +1 -1
- package/template-managed/package.json +3 -3
- package/template-tasks/README.md +383 -0
- package/template-tasks/_gitignore +12 -0
- package/template-tasks/feltkit/_generated/api.ts +10 -0
- package/template-tasks/feltkit/app.ts +73 -0
- package/template-tasks/index.html +17 -0
- package/template-tasks/native/App.tsx +220 -0
- package/template-tasks/native/native.json +5 -0
- package/template-tasks/package.json +30 -0
- package/template-tasks/public/apple-touch-icon.png +0 -0
- package/template-tasks/public/favicon.png +0 -0
- package/template-tasks/public/theme.js +7 -0
- package/template-tasks/shared/rules.ts +18 -0
- package/template-tasks/src/App.tsx +557 -0
- package/template-tasks/src/main.tsx +17 -0
- package/template-tasks/src/styles.css +134 -0
- package/template-tasks/src/theme.tsx +58 -0
- package/template-tasks/tsconfig.json +16 -0
- package/template-tasks/vite.config.ts +6 -0
- /package/{template → template-tasks}/feltkit/inbox.ts +0 -0
- /package/{template → template-tasks}/feltkit/projects.ts +0 -0
- /package/{template → template-tasks}/feltkit/tasks.ts +0 -0
- /package/{template → template-tasks}/public/feltkit-mark.png +0 -0
- /package/{template → template-tasks}/tests/tasks.test.ts +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* Light or dark: the system's setting unless the top bar's theme switch chose one
|
|
3
|
+
(data-theme on <html>). Each color is light-dark(light, dark). */
|
|
4
|
+
color-scheme: light dark;
|
|
5
|
+
--bg: light-dark(#f7f7f5, #111312);
|
|
6
|
+
--surface: light-dark(#ffffff, #181b1a);
|
|
7
|
+
--ink: light-dark(#1b1d1c, #eceeed);
|
|
8
|
+
--muted: light-dark(#6b706d, #9aa19d);
|
|
9
|
+
--line: light-dark(#e4e5e1, #2a2f2c);
|
|
10
|
+
--accent: light-dark(#166534, #4ade80);
|
|
11
|
+
--accent-ink: light-dark(#ffffff, #052e16);
|
|
12
|
+
--accent-soft: light-dark(#e8f3ec, #15301f);
|
|
13
|
+
--warn-soft: light-dark(#fef3c7, #2b2210);
|
|
14
|
+
--danger-soft: light-dark(#fef3f2, #2a1513);
|
|
15
|
+
--danger-line: light-dark(#fecdca, #55201b);
|
|
16
|
+
--danger: light-dark(#b42318, #f97066);
|
|
17
|
+
--warn: light-dark(#92400e, #fbbf24);
|
|
18
|
+
--radius: 10px;
|
|
19
|
+
--shadow: 0 1px 2px light-dark(rgba(16, 24, 20, 0.06), transparent), 0 2px 8px light-dark(rgba(16, 24, 20, 0.04), transparent);
|
|
20
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
21
|
+
color: var(--ink);
|
|
22
|
+
background: var(--bg);
|
|
23
|
+
font-size: 15px;
|
|
24
|
+
line-height: 1.5;
|
|
25
|
+
-webkit-font-smoothing: antialiased;
|
|
26
|
+
}
|
|
27
|
+
:root[data-theme="light"] { color-scheme: light; }
|
|
28
|
+
:root[data-theme="dark"] { color-scheme: dark; }
|
|
29
|
+
* { box-sizing: border-box; }
|
|
30
|
+
body { margin: 0; }
|
|
31
|
+
button, input, select, textarea { font: inherit; color: inherit; }
|
|
32
|
+
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
|
|
33
|
+
.muted { color: var(--muted); }
|
|
34
|
+
.shell { min-height: 100vh; display: flex; flex-direction: column; }
|
|
35
|
+
|
|
36
|
+
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 2; }
|
|
37
|
+
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
|
|
38
|
+
.mark { display: block; width: 30px; height: 30px; }
|
|
39
|
+
.env { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
|
|
40
|
+
.env-prod { background: var(--warn-soft); color: var(--warn); }
|
|
41
|
+
.topbar-right { display: flex; align-items: center; gap: 14px; }
|
|
42
|
+
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
|
|
43
|
+
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
|
|
44
|
+
.live.on .dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
|
|
45
|
+
.identity select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
|
|
46
|
+
.dashboard-link { font-size: 13px; color: var(--muted); text-decoration: none; }
|
|
47
|
+
.dashboard-link:hover { color: var(--ink); }
|
|
48
|
+
.theme-toggle { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 8px; }
|
|
49
|
+
.theme-toggle button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
|
|
50
|
+
.theme-toggle button:hover { color: var(--ink); }
|
|
51
|
+
.theme-toggle button.on { background: var(--accent-soft); color: var(--accent); }
|
|
52
|
+
.theme-toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
53
|
+
|
|
54
|
+
.notice { margin: 12px 20px 0; padding: 10px 14px; border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
|
|
55
|
+
.notice.error { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-line); }
|
|
56
|
+
.notice.info { background: var(--accent-soft); color: var(--accent); }
|
|
57
|
+
|
|
58
|
+
.workspace { flex: 1; display: grid; grid-template-columns: 260px 1fr; min-height: 0; }
|
|
59
|
+
.sidebar { border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 6px; }
|
|
60
|
+
.sidebar-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 10px 6px; }
|
|
61
|
+
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
|
|
62
|
+
.project { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: left; }
|
|
63
|
+
.project:hover { background: var(--surface); }
|
|
64
|
+
.project.active { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
|
|
65
|
+
.project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
66
|
+
.count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
67
|
+
.new-project input { width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; background: transparent; }
|
|
68
|
+
.new-project input:focus { border-style: solid; outline: 2px solid var(--accent-soft); }
|
|
69
|
+
.hint { font-size: 13px; color: var(--muted); padding: 8px 10px; }
|
|
70
|
+
|
|
71
|
+
.main { padding: 28px 36px 60px; max-width: 860px; width: 100%; }
|
|
72
|
+
.project-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
|
|
73
|
+
h1 { font-size: 24px; letter-spacing: -0.01em; margin: 0; }
|
|
74
|
+
.add-task input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
|
|
75
|
+
.add-task input:focus, .title-input:focus, .note-form input:focus, textarea:focus, .inline-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
|
|
76
|
+
|
|
77
|
+
.tasks { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 6px; }
|
|
78
|
+
.task { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
|
|
79
|
+
.task.open { box-shadow: var(--shadow); }
|
|
80
|
+
.task-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
|
|
81
|
+
.task-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex: none; }
|
|
82
|
+
.title { flex: 1; text-align: left; border: 0; background: none; padding: 2px 0; cursor: pointer; }
|
|
83
|
+
.task.done .title { color: var(--muted); text-decoration: line-through; }
|
|
84
|
+
.title-input { flex: 1; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
|
|
85
|
+
.by { font-size: 12px; }
|
|
86
|
+
.task-detail { border-top: 1px solid var(--line); padding: 14px 16px 16px 42px; display: flex; flex-direction: column; gap: 14px; }
|
|
87
|
+
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
|
|
88
|
+
textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); resize: vertical; color: var(--ink); }
|
|
89
|
+
.notes-title { font-size: 13px; font-weight: 600; }
|
|
90
|
+
.note { padding: 8px 10px; border-left: 2px solid var(--accent); background: var(--bg); border-radius: 0 8px 8px 0; margin-top: 6px; }
|
|
91
|
+
.note-meta { font-size: 12px; }
|
|
92
|
+
.note-text { white-space: pre-wrap; }
|
|
93
|
+
.note-form, .inline-form { display: flex; gap: 8px; margin-top: 8px; }
|
|
94
|
+
.note-form input, .inline-form input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
|
|
95
|
+
.row-end { display: flex; justify-content: flex-end; }
|
|
96
|
+
.small-text { font-size: 13px; margin: 4px 0; }
|
|
97
|
+
|
|
98
|
+
button.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
|
|
99
|
+
button.secondary { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
|
|
100
|
+
button.secondary:hover { border-color: var(--muted); }
|
|
101
|
+
button:disabled { opacity: 0.5; cursor: default; }
|
|
102
|
+
button.ghost { background: none; border: 0; cursor: pointer; color: inherit; font-size: 18px; line-height: 1; }
|
|
103
|
+
button.icon { color: var(--muted); font-size: 14px; opacity: 0; }
|
|
104
|
+
.task-row:hover .icon, .task-row .icon:focus { opacity: 1; }
|
|
105
|
+
.danger-link { background: none; border: 0; color: var(--danger); cursor: pointer; font-size: 13px; }
|
|
106
|
+
.wide { width: 100%; text-align: left; }
|
|
107
|
+
.stack { display: flex; flex-direction: column; gap: 8px; }
|
|
108
|
+
code.block { display: block; padding: 8px 10px; border-radius: 6px; background: rgba(127, 127, 127, 0.12); font-size: 12px; word-break: break-all; }
|
|
109
|
+
|
|
110
|
+
.empty { margin-top: 12vh; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
|
|
111
|
+
.empty.small { margin-top: 36px; }
|
|
112
|
+
.empty p { margin: 0; }
|
|
113
|
+
.center { flex: 1; display: grid; place-items: center; padding: 40px; }
|
|
114
|
+
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
|
|
115
|
+
.narrow { width: min(420px, 100%); }
|
|
116
|
+
.card h1 { margin-bottom: 8px; }
|
|
117
|
+
.error-text { color: var(--danger); }
|
|
118
|
+
.pad { padding: 12px 0; }
|
|
119
|
+
.footer { padding: 14px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }
|
|
120
|
+
|
|
121
|
+
@media (max-width: 720px) {
|
|
122
|
+
.workspace { grid-template-columns: 1fr; }
|
|
123
|
+
.sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
|
|
124
|
+
.main { padding: 20px 16px 48px; }
|
|
125
|
+
.topbar { flex-wrap: wrap; padding: 10px 16px; }
|
|
126
|
+
.topbar-right { flex-wrap: wrap; gap: 10px; min-width: 0; }
|
|
127
|
+
.identity, .identity select { max-width: 100%; min-width: 0; }
|
|
128
|
+
.task-detail { padding-left: 16px; }
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Account sign-in (auth.accounts) */
|
|
132
|
+
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
|
|
133
|
+
button.ghost.signout { font-size: 14px; }
|
|
134
|
+
.card form.stack input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Light, dark, or the system's setting. The choice is kept in this browser (localStorage) and
|
|
3
|
+
* applied as data-theme on <html>; every color in styles.css follows it. public/theme.js
|
|
4
|
+
* applies it before first paint.
|
|
5
|
+
*/
|
|
6
|
+
import { useEffect, useState, type ReactNode } from "react";
|
|
7
|
+
|
|
8
|
+
type Theme = "system" | "light" | "dark";
|
|
9
|
+
const KEY = "app:theme";
|
|
10
|
+
|
|
11
|
+
function stored(): Theme {
|
|
12
|
+
try {
|
|
13
|
+
const value = localStorage.getItem(KEY);
|
|
14
|
+
return value === "light" || value === "dark" ? value : "system";
|
|
15
|
+
} catch {
|
|
16
|
+
return "system";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function apply(theme: Theme) {
|
|
21
|
+
if (theme === "system") delete document.documentElement.dataset.theme;
|
|
22
|
+
else document.documentElement.dataset.theme = theme;
|
|
23
|
+
try {
|
|
24
|
+
if (theme === "system") localStorage.removeItem(KEY);
|
|
25
|
+
else localStorage.setItem(KEY, theme);
|
|
26
|
+
} catch {
|
|
27
|
+
// Storage is blocked (a private window): the choice lasts until the page reloads.
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const OPTIONS: Array<{ theme: Theme; label: string; icon: ReactNode }> = [
|
|
32
|
+
{ theme: "system", label: "System", icon: <><rect x="3" y="4" width="14" height="10" rx="1.5" /><path d="M7.5 17h5M10 14v3" /></> },
|
|
33
|
+
{ theme: "light", label: "Light", icon: <><circle cx="10" cy="10" r="3.2" /><path d="M10 2.5v2M10 15.5v2M2.5 10h2M15.5 10h2M4.7 4.7l1.4 1.4M13.9 13.9l1.4 1.4M4.7 15.3l1.4-1.4M13.9 6.1l1.4-1.4" /></> },
|
|
34
|
+
{ theme: "dark", label: "Dark", icon: <path d="M15.5 12.2A6 6 0 0 1 7.8 4.5a6 6 0 1 0 7.7 7.7Z" /> },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
/** The light / dark / system switch in the top bar. */
|
|
38
|
+
export function ThemeToggle() {
|
|
39
|
+
const [theme, setTheme] = useState<Theme>(stored);
|
|
40
|
+
useEffect(() => apply(theme), [theme]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const onStorage = (e: StorageEvent) => e.key === KEY && setTheme(stored());
|
|
43
|
+
window.addEventListener("storage", onStorage);
|
|
44
|
+
return () => window.removeEventListener("storage", onStorage);
|
|
45
|
+
}, []);
|
|
46
|
+
return (
|
|
47
|
+
<div className="theme-toggle" role="radiogroup" aria-label="Theme">
|
|
48
|
+
{OPTIONS.map((o) => (
|
|
49
|
+
<button key={o.theme} type="button" role="radio" aria-checked={theme === o.theme} className={theme === o.theme ? "on" : ""} onClick={() => setTheme(o.theme)} title={`${o.label} theme`}>
|
|
50
|
+
<svg viewBox="0 0 20 20" width="15" height="15" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" aria-hidden>
|
|
51
|
+
{o.icon}
|
|
52
|
+
</svg>
|
|
53
|
+
<span className="sr-only">{o.label}</span>
|
|
54
|
+
</button>
|
|
55
|
+
))}
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
13
|
+
"types": ["node", "vite/client"]
|
|
14
|
+
},
|
|
15
|
+
"include": ["src", "feltkit", "tests", "vite.config.ts"]
|
|
16
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|