@felan-ai/felan 0.12.10 → 0.13.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 +82 -345
- package/dist/cli-main.d.ts +2 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli-main.js +17 -4
- package/dist/cli-main.js.map +1 -1
- package/dist/extensions.d.ts +5 -2
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +7 -1
- package/dist/extensions.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +4 -2
- package/dist/runtime.js.map +1 -1
- package/dist/settings.d.ts +3 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +5 -0
- package/dist/settings.js.map +1 -1
- package/dist/subagents/host.d.ts +3 -0
- package/dist/subagents/host.d.ts.map +1 -1
- package/dist/subagents/host.js +4 -1
- package/dist/subagents/host.js.map +1 -1
- package/dist/update.d.ts +14 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/update.js +152 -0
- package/dist/update.js.map +1 -0
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -7,363 +7,96 @@ Pi's interactive TUI.
|
|
|
7
7
|
npx @felan-ai/felan
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
The package exposes the `felan` binary. It
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
global settings from `~/.felan/settings.json` and does not load Pi project
|
|
15
|
-
settings. Pi project trust does not apply to Felan's fixed resource policy, so
|
|
16
|
-
Felan starts without a project trust prompt.
|
|
10
|
+
The package exposes the `felan` binary. It owns local credentials, settings,
|
|
11
|
+
session and agent storage paths, built-in extension selection, dependency
|
|
12
|
+
onboarding, lifecycle, and TUI presentation. Portable feature behavior remains
|
|
13
|
+
in the `@felan-ai/ext-*` packages.
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
> [!IMPORTANT]
|
|
16
|
+
> The local host uses the current user's filesystem and process permissions. It
|
|
17
|
+
> is not a sandbox.
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
$FELAN_AGENT_DIR/memory/v1/projects/<project-hash>/
|
|
24
|
-
state.json
|
|
25
|
-
current/summary.md
|
|
26
|
-
current/index.md
|
|
27
|
-
current/pages/...
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
The project hash is derived from the canonical Git root, or the canonical cwd
|
|
31
|
-
when no repository exists. Root-session storage receives a non-authoritative
|
|
32
|
-
copy at `storage/sessions/<root-id>/.memory`; child sessions can read that copy
|
|
33
|
-
but ordinary edits never publish it. Felan does not create `<repository>/.memory`
|
|
34
|
-
and does not synchronize local memory with cloud team memory.
|
|
35
|
-
Each session receives one hidden persisted memory-context entry at startup;
|
|
36
|
-
provider calls reuse it, and compaction or tree navigation restores it only if
|
|
37
|
-
it is no longer on the active branch. That entry is excluded from memory
|
|
38
|
-
evidence processing. Once it loads successfully, the welcome screen's
|
|
39
|
-
`[Context]` section lists the projected `.memory/summary.md` path alongside
|
|
40
|
-
project instructions so the loaded summary can be opened directly. The summary
|
|
41
|
-
is orientation only: substantive memory-backed answers should follow the
|
|
42
|
-
projected absolute `index.md` links to relevant pages and cite page paths and
|
|
43
|
-
their `Sources` session IDs.
|
|
44
|
-
|
|
45
|
-
Use `/memory status`, `/memory run`, `/memory enable`, `/memory disable`, or
|
|
46
|
-
`/memory open` to inspect and control local processing. A missing local model
|
|
47
|
-
credential never prevents startup or recall of existing memory; processing
|
|
48
|
-
remains pending until a configured model is available. Processing is idle
|
|
49
|
-
batched while Felan runs and catches up on the next launch after shutdown. The
|
|
50
|
-
enable/disable commands persist `felanTui.memoryProcessing` and do not remove
|
|
51
|
-
the memory recall extension.
|
|
52
|
-
|
|
53
|
-
After checkpoints are recorded, the TUI coordinator owns idle batching,
|
|
54
|
-
startup recovery, retries, and shutdown cancellation. Each batch runs one
|
|
55
|
-
disposable headless Pi memory-dreamer session against staging. It reads the
|
|
56
|
-
immutable `.dreaming/input` manifest and transcripts, edits staged `.memory`
|
|
57
|
-
files in place, and returns only a concise completion summary. The worker has
|
|
58
|
-
no normal Felan extensions, skills, repository context, credentials, or
|
|
59
|
-
process execution; its active tools are limited to `read`, `ls`, `edit`, and
|
|
60
|
-
`write`. The worker has no separate turn, tool-call, or per-file I/O budgets;
|
|
61
|
-
the only execution failsafe is a one-hour wall-clock timeout. The coordinator
|
|
62
|
-
validates and publishes the staged filesystem output, so model, validation,
|
|
63
|
-
cancellation, timeout, or publication failures leave evidence pending for
|
|
64
|
-
retry. The worker uses the active root-session model when it is authenticated;
|
|
65
|
-
if that model is unavailable, it falls back to another authenticated available
|
|
66
|
-
model. With no authenticated model, evidence remains pending. The portable
|
|
67
|
-
`@felan-ai/ext-memory` extension only recalls memory and records root
|
|
68
|
-
checkpoints; it does not schedule dreaming.
|
|
69
|
-
|
|
70
|
-
Evidence ingestion is separate from the worker's file-tool policy. The host
|
|
71
|
-
opens each checkpoint's append-only JSONL session with a bounded snapshot and
|
|
72
|
-
streams only the visible active-branch delta; abandoned branches, hidden
|
|
73
|
-
memory-context entries, and unrelated large tool output are not staged. Source
|
|
74
|
-
files may be much larger than the evidence sent to the model. After redaction,
|
|
75
|
-
each staged transcript is capped at 256 KiB. A changed, missing, or malformed
|
|
76
|
-
checkpoint source remains pending without blocking valid checkpoints in the
|
|
77
|
-
same batch; it is retried by `/memory run`, a newer cursor, or a later launch.
|
|
78
|
-
The dreamer updates affected pages and cross-links, preserves valid historical
|
|
79
|
-
source entries, marks superseded or conflicting claims, and performs a bounded
|
|
80
|
-
semantic maintenance pass before publication. Root-index links in each session
|
|
81
|
-
projection are rebased to that projection's absolute `.memory` path; canonical
|
|
82
|
-
memory remains unchanged.
|
|
19
|
+
## Requirements and quick start
|
|
83
20
|
|
|
84
|
-
Felan
|
|
85
|
-
|
|
86
|
-
Felan application.
|
|
21
|
+
Felan supports Node.js 22.19.0 or newer. Repository development and CI use
|
|
22
|
+
Node.js 22.20.0 with pnpm 9.15.5.
|
|
87
23
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
runtime, filtered settings, resources, and session composition for new, resume,
|
|
92
|
-
fork, clone, and import flows, then rebinds the active interactive UI. Host mode
|
|
93
|
-
is not an isolation boundary.
|
|
94
|
-
|
|
95
|
-
Root sessions store extension state under
|
|
96
|
-
`$FELAN_AGENT_DIR/storage/sessions/<encoded-root-session-id>`. Every nested
|
|
97
|
-
subagent shares its root session's storage path. Longer-retention agent state
|
|
98
|
-
uses `$FELAN_AGENT_DIR/storage/agent`. Storage handles remain scoped to their
|
|
99
|
-
declared roots, while ordinary runtime file operations can access these and
|
|
100
|
-
other host paths directly.
|
|
101
|
-
|
|
102
|
-
Only source-controlled built-in Felan extensions can be imported. External
|
|
103
|
-
packages, extensions, configured skill paths, prompts, themes, and Pi context
|
|
104
|
-
files remain filtered. Agent Core separately loads one instruction file from
|
|
105
|
-
the session cwd, preferring `AGENTS.md` over `CLAUDE.md`. Agent Skills are
|
|
106
|
-
loaded from `~/.agents/skills` and `<workspace>/.agents/skills` and are shared
|
|
107
|
-
with local subagents.
|
|
108
|
-
The built-in powerline reads `~/.felan/powerline.json` (or
|
|
109
|
-
`$FELAN_AGENT_DIR/powerline.json`) once when it initializes. Its subscription
|
|
110
|
-
segment obtains the active Codex or Claude OAuth token through Felan's
|
|
111
|
-
`ModelRuntime` and requests usage from that provider's fixed endpoint.
|
|
112
|
-
|
|
113
|
-
All built-in extensions are enabled by default. Toggle them in
|
|
114
|
-
`~/.felan/settings.json`:
|
|
115
|
-
|
|
116
|
-
```json
|
|
117
|
-
{
|
|
118
|
-
"builtinExtensions": {
|
|
119
|
-
"subagents": true,
|
|
120
|
-
"askUser": true,
|
|
121
|
-
"tasks": true,
|
|
122
|
-
"prewalk": true,
|
|
123
|
-
"context": true,
|
|
124
|
-
"markitdown": true,
|
|
125
|
-
"mcp": true,
|
|
126
|
-
"webAccess": true,
|
|
127
|
-
"browser": true,
|
|
128
|
-
"backgroundBash": true,
|
|
129
|
-
"codex": true,
|
|
130
|
-
"rtkOptimizer": true,
|
|
131
|
-
"memory": true,
|
|
132
|
-
"powerline": false
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
On the first interactive startup with a missing external runtime dependency,
|
|
138
|
-
Felan opens a dependency wizard before the first prompt. MarkItDown can be
|
|
139
|
-
installed into Felan's managed Python environment or disabled. RTK can be
|
|
140
|
-
installed with its pinned official installer or skipped while its
|
|
141
|
-
binary-independent output compaction remains active. Background Bash is
|
|
142
|
-
disabled when required POSIX process utilities are unavailable. The reviewed
|
|
143
|
-
`agent-browser` CLI can be installed into Felan's managed agent storage or the
|
|
144
|
-
Browser extension can be disabled. Choices are stored in global settings,
|
|
145
|
-
never prompt in non-interactive sessions, and can be revisited with
|
|
146
|
-
`/dependencies`. Install actions always require explicit confirmation.
|
|
147
|
-
|
|
148
|
-
The local transcript groups adjacent tool calls by default, with one concise
|
|
149
|
-
action row per call beneath each group title. Press `Ctrl+O` to show bounded
|
|
150
|
-
result previews. Use `/tools` or `Alt+T` to inspect the complete arguments and
|
|
151
|
-
result for one root-session call. Selected subagent transcripts use the same
|
|
152
|
-
grouped or full tool rendering and `Ctrl+O` previews. Subagent completion
|
|
153
|
-
notices stay on one summary line by default; `Ctrl+O` shows a bounded preview
|
|
154
|
-
and `Alt+A` opens full agent details. Grouped reads from projected or canonical
|
|
155
|
-
local memory appear as `Memory Recall`; conservative read-only Codex commands
|
|
156
|
-
receive the same label without hiding mutating or arbitrary shell commands.
|
|
157
|
-
To restore Pi's original ungrouped rendering, set:
|
|
158
|
-
|
|
159
|
-
```json
|
|
160
|
-
{
|
|
161
|
-
"felanTui": {
|
|
162
|
-
"toolDisplay": "full"
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Supported values are `grouped` and `full`; `grouped` is the default.
|
|
168
|
-
|
|
169
|
-
`askUser` provides the sequential `ask_user` tool. The local host presents
|
|
170
|
-
single questions or 1-4 question wizards as searchable overlays or inline
|
|
171
|
-
dialogs, with multi-select, freeform answers, and optional comments.
|
|
172
|
-
|
|
173
|
-
`mcp` provides one OAuth-only remote MCP gateway. It merges
|
|
174
|
-
`$FELAN_AGENT_DIR/mcp.json` with `<cwd>/.mcp.json`; the project file has higher
|
|
175
|
-
precedence for same-name servers. It does not discover `.pi/mcp.json`, Cursor,
|
|
176
|
-
Claude, Codex, or other ambient host configuration. A minimal Felan-owned
|
|
177
|
-
config is:
|
|
178
|
-
|
|
179
|
-
```json
|
|
180
|
-
{
|
|
181
|
-
"mcpServers": {
|
|
182
|
-
"notion": {
|
|
183
|
-
"url": "https://mcp.notion.com/mcp",
|
|
184
|
-
"auth": "oauth"
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
24
|
+
```sh
|
|
25
|
+
felan
|
|
26
|
+
/login
|
|
188
27
|
```
|
|
189
28
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
those entries as OAuth. The initial port supports remote HTTP MCP servers
|
|
193
|
-
through Streamable HTTP with classified SSE fallback. Unsupported project
|
|
194
|
-
entries such as stdio, sockets, bearer tokens, and custom headers are skipped
|
|
195
|
-
with a warning rather than executed. Direct tools and MCP Apps are not loaded.
|
|
196
|
-
Optional per-server `oauth` fields are `clientId`, `clientSecret`,
|
|
197
|
-
`clientSecretEnv`, `scope`, `redirectUri`, `clientName`, `clientUri`, and
|
|
198
|
-
`authorizationParams`. Dynamic client registration is used when no client ID
|
|
199
|
-
is configured. A client secret or `clientSecretEnv` requires `clientId`;
|
|
200
|
-
prefer the environment reference over storing a client secret in the file.
|
|
201
|
-
The default callback is `http://127.0.0.1:3118/callback`; set `redirectUri` to
|
|
202
|
-
the exact pre-registered loopback callback when using a configured client.
|
|
203
|
-
|
|
204
|
-
Run `/mcp` to inspect configured servers, list tools, reconnect, authenticate,
|
|
205
|
-
or log out. `/mcp auth [server]` opens a server picker when its argument is
|
|
206
|
-
omitted. Configuration is loaded at startup;
|
|
207
|
-
run `/reload` after editing either file. The model uses the `mcp` gateway tool
|
|
208
|
-
for status, explicit reconnects, search, describe, and remote tool calls. A
|
|
209
|
-
`disconnected` status only means that the current session has no live transport;
|
|
210
|
-
model discovery and call actions reconnect lazily with stored credentials. The
|
|
211
|
-
local host follows the upstream adapter's browser + PKCE loopback flow and
|
|
212
|
-
stores tokens and dynamic-client
|
|
213
|
-
credentials in the OS credential store, bound to the Felan agent directory,
|
|
214
|
-
server name, server URL, OAuth client/redirect/scope profile, and
|
|
215
|
-
authorization-server issuer. It fails closed when that store is unavailable.
|
|
216
|
-
Print-mode subagents never open a browser or callback listener; they can reuse
|
|
217
|
-
credentials established by a root TUI session. MCP metadata and results are
|
|
218
|
-
bounded and explicitly marked as untrusted remote content.
|
|
29
|
+
Run an initial prompt or continue the most recent session for the current
|
|
30
|
+
directory:
|
|
219
31
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
`$FELAN_AGENT_DIR/storage/sessions/<encoded-root-session-id>/tasks`. Use `/tasks`
|
|
224
|
-
or `Ctrl+Shift+T` to inspect list, detail, and graph views.
|
|
225
|
-
|
|
226
|
-
`webAccess` provides bounded web search, source verification, readable URL
|
|
227
|
-
fetching, and stored-content retrieval. Search supports OpenAI/Codex, Exa,
|
|
228
|
-
Brave, and self-hosted SearXNG. Configure providers in
|
|
229
|
-
`$FELAN_AGENT_DIR/web-search.json`. Model-facing web content is explicitly
|
|
230
|
-
encoded as untrusted external data; private and reserved network targets are
|
|
231
|
-
blocked by default.
|
|
232
|
-
|
|
233
|
-
`browser` registers one browser tool backed by the reviewed `agent-browser`
|
|
234
|
-
CLI. Ask the tool for the version-matched `core` or specialized skill before
|
|
235
|
-
browser actions, then pass literal CLI arguments for navigation, snapshots,
|
|
236
|
-
interactions, and screenshots. Bare screenshots are attached directly when the
|
|
237
|
-
selected model accepts image input; browser pages, skill text, and CLI output
|
|
238
|
-
remain untrusted data.
|
|
239
|
-
|
|
240
|
-
`markitdown` extends ordinary `read` calls for DOC/DOCX, PPT/PPTX, XLS/XLSX,
|
|
241
|
-
RTF, EPUB, and Outlook MSG files. It intentionally leaves PDFs, images, audio,
|
|
242
|
-
and generic archives to their existing or explicit workflows. Input,
|
|
243
|
-
conversion time, and output are
|
|
244
|
-
bounded; a content-hash Markdown cache preserves normal offset/limit reads, and
|
|
245
|
-
every result marks extracted document text as untrusted. The extension never
|
|
246
|
-
downloads Python packages automatically. Run `/markitdown` for status or
|
|
247
|
-
`/markitdown install` to explicitly install the managed converter. If the
|
|
248
|
-
converter is absent, conversion interception remains disabled.
|
|
249
|
-
|
|
250
|
-
`backgroundBash` augments `bash` with detached processes for models outside the
|
|
251
|
-
`openai` and `openai-codex` providers. Logs and process metadata live under
|
|
252
|
-
`$FELAN_AGENT_DIR/storage/sessions/<encoded-root-session-id>/background-bash/<workspace-key>/jobs`.
|
|
253
|
-
Use `/background-bash` or `Ctrl+Shift+J` to inspect them. Required POSIX process
|
|
254
|
-
utilities are probed through the active runtime; the tools remain inactive on
|
|
255
|
-
incompatible runtimes.
|
|
256
|
-
|
|
257
|
-
`codex` activates `exec_command`, `write_stdin`, `apply_patch`, and
|
|
258
|
-
`view_image` for GPT models on the exact `openai` and `openai-codex` providers.
|
|
259
|
-
`view_image` is included only for models with image input. It restores the
|
|
260
|
-
ordinary coding tools when another model is selected. Root and nested sessions
|
|
261
|
-
load the same optional request controls from `$FELAN_AGENT_DIR/codex.json`; see
|
|
262
|
-
the extension package README for the three supported fields.
|
|
263
|
-
|
|
264
|
-
`rtkOptimizer` delegates command rewrites to a managed or `PATH` `rtk`
|
|
265
|
-
executable available in the active runtime and compacts noisy command, read,
|
|
266
|
-
and grep results. It
|
|
267
|
-
supports both ordinary `bash` calls and Codex `exec_command` / `write_stdin`
|
|
268
|
-
calls; Codex result envelopes remain intact while only their `Output:` payloads
|
|
269
|
-
are compacted. Configuration is shared by root and nested sessions at
|
|
270
|
-
`$FELAN_AGENT_DIR/storage/agent/rtk-optimizer/config.json`. Use `/rtk` for
|
|
271
|
-
interactive settings, runtime verification, explicit installation, and session
|
|
272
|
-
savings metrics. Missing RTK bypasses rewriting without disabling output
|
|
273
|
-
compaction.
|
|
274
|
-
|
|
275
|
-
## System prompt append
|
|
276
|
-
|
|
277
|
-
The TUI reads one optional `$FELAN_AGENT_DIR/APPEND_SYSTEM.md` file when each
|
|
278
|
-
session is constructed (`~/.felan/APPEND_SYSTEM.md` by default). Missing and
|
|
279
|
-
blank files add nothing; other read failures stop session construction with the
|
|
280
|
-
filesystem error. The file extends Agent Core's Felan prompt after enabled
|
|
281
|
-
extension capabilities.
|
|
282
|
-
|
|
283
|
-
Agent Core also reads at most one instruction file from each session's cwd
|
|
284
|
-
through the active `AgentRuntime`, with `AGENTS.md` taking precedence over
|
|
285
|
-
`CLAUDE.md`. Missing, unreadable, and blank instruction files are nonfatal.
|
|
286
|
-
Child persona instructions follow the application append, root project
|
|
287
|
-
instructions follow those consumer appends using Pi's path-labeled context-file
|
|
288
|
-
format, and explicit Agent Skills and the current working directory are added
|
|
289
|
-
last. The progressive-context extension remains responsible only for instruction
|
|
290
|
-
files below the session cwd.
|
|
291
|
-
|
|
292
|
-
System prompt inputs are limited to Agent Core, enabled capabilities, the
|
|
293
|
-
single application append above, the selected cwd instruction file, explicit
|
|
294
|
-
Agent Skills, and the current working directory. Pi `SYSTEM.md`, project
|
|
295
|
-
`APPEND_SYSTEM.md`, and other Pi-discovered prompt/context files stay outside
|
|
296
|
-
local composition.
|
|
297
|
-
|
|
298
|
-
When enabled, `@felan-ai/ext-subagents` uses the session-bound local host and
|
|
299
|
-
provides `Agent`, `list_subagents`,
|
|
300
|
-
`get_subagent_result`, `steer_subagent`, and `cancel_subagent`. A root-scoped
|
|
301
|
-
local host queues every run asynchronously, persists the latest child session
|
|
302
|
-
metadata, delivers completion notices, supports bounded nesting, and uses the
|
|
303
|
-
application's current workspace. The TUI shows each queued or running direct
|
|
304
|
-
child in a full-width interactive rail beneath the powerline status rows, or
|
|
305
|
-
beneath the editor when powerline is disabled. Press Down at the editor's newest
|
|
306
|
-
prompt to enter the rail, use Up/Down to select a child, press Up on the first
|
|
307
|
-
child to return to the editor, and press Enter to open that child in the agent
|
|
308
|
-
navigator. Each child row and the selected-child header show the resolved
|
|
309
|
-
provider/model when available. Use `/agents` or `Alt+A` to open the navigator
|
|
310
|
-
directly, follow live transcripts with the same tool presentation as the main
|
|
311
|
-
agent, send steering messages, or stop active work.
|
|
312
|
-
Runtime shutdown awaits active-child cancellation before Pi teardown.
|
|
313
|
-
Completed-child continuation uses the same child ID and Pi session file while
|
|
314
|
-
replacing the latest result. The default list also
|
|
315
|
-
includes `@felan-ai/ext-powerline` for an ANSI-aware footer with subscription
|
|
316
|
-
usage; it is a direct TUI dependency and is not part of cloud composition.
|
|
317
|
-
|
|
318
|
-
Local agent definitions are loaded only from bundled Felan definitions,
|
|
319
|
-
`~/.agents/agents/*.md`, `~/.felan/agents/*.md` (or
|
|
320
|
-
`$FELAN_AGENT_DIR/agents/*.md`), `<workspace>/.agents/agents/*.md`, and
|
|
321
|
-
`<workspace>/.felan/agents/*.md`. Project definitions override user and
|
|
322
|
-
bundled definitions; within one scope the Felan-specific directory overrides
|
|
323
|
-
the shared `.agents` directory. Pi ambient agent discovery remains disabled.
|
|
324
|
-
|
|
325
|
-
The bundled definitions have role-specific model settings: `general` inherits the
|
|
326
|
-
parent model and thinking for implementation or investigation, `explore` uses the
|
|
327
|
-
`low` model tier with thinking `off` for cheap read-only exploration, and `reviewer`
|
|
328
|
-
inherits the parent model and thinking for quality-sensitive review. A definition's
|
|
329
|
-
`model` and `thinking` settings take precedence over `Agent` arguments. When a
|
|
330
|
-
definition omits either setting, the corresponding argument is used; if both omit
|
|
331
|
-
it, the parent setting is inherited. A custom definition with id `explore` replaces
|
|
332
|
-
the bundled definition and can choose its own settings.
|
|
333
|
-
|
|
334
|
-
Each definition is a Markdown file with flat `key: value` frontmatter and a
|
|
335
|
-
required prompt body. `description` is required; `id` defaults to the filename.
|
|
336
|
-
Optional fields are `model`, `thinking`, `max_turns`, `timeout_seconds`, and
|
|
337
|
-
`allow_nesting`. Definitions do not change tool access: custom children receive
|
|
338
|
-
the normal enabled Felan tools.
|
|
339
|
-
|
|
340
|
-
```md
|
|
341
|
-
---
|
|
342
|
-
description: Review changes for correctness and regressions
|
|
343
|
-
model: high
|
|
344
|
-
thinking: high
|
|
345
|
-
max_turns: 20
|
|
346
|
-
timeout_seconds: 600
|
|
347
|
-
allow_nesting: false
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
Review the requested changes and report findings with file and line references.
|
|
32
|
+
```sh
|
|
33
|
+
felan "inspect this project"
|
|
34
|
+
felan --continue
|
|
351
35
|
```
|
|
352
36
|
|
|
353
|
-
|
|
354
|
-
`felanSubagents.concurrency` and `felanSubagents.maxDepth` in the Felan settings
|
|
355
|
-
file to configure those bounded values.
|
|
356
|
-
|
|
357
|
-
Local model selectors are deterministic and support explicit inheritance or an
|
|
358
|
-
exact authenticated `provider/model`; exact selectors never fall back. Requested
|
|
359
|
-
thinking levels are checked against that resolved model and unsupported levels
|
|
360
|
-
return `unsupported_thinking` instead of being silently clamped.
|
|
37
|
+
## CLI
|
|
361
38
|
|
|
362
|
-
```
|
|
363
|
-
felan
|
|
39
|
+
```text
|
|
40
|
+
felan [options] [message]
|
|
41
|
+
|
|
42
|
+
-c, --continue Continue the most recent session for this directory
|
|
43
|
+
--diagnostics Print runtime versions and configuration mode
|
|
44
|
+
update Update a global npm installation of Felan
|
|
45
|
+
-h, --help Show help
|
|
46
|
+
-v, --version Print the Felan version
|
|
47
|
+
--verbose Show verbose startup details
|
|
364
48
|
```
|
|
365
49
|
|
|
366
|
-
|
|
50
|
+
Run `felan update` to check the stable npm release. It updates only a verified
|
|
51
|
+
global npm installation, reports when the installation is current, and tells
|
|
52
|
+
you to restart after a successful update. `npx`, local/source, and other
|
|
53
|
+
package-manager installations are not changed; update those with the command
|
|
54
|
+
that installed them.
|
|
55
|
+
|
|
56
|
+
Invocations that start or continue an agent session launch the interactive TUI.
|
|
57
|
+
`felan update` and informational flags exit without starting a session. Internal
|
|
58
|
+
headless modes used by subagents and extension adapters are not public CLI entry
|
|
59
|
+
points.
|
|
60
|
+
|
|
61
|
+
`felan --diagnostics` reports Felan, Agent Core, Pi, and Node.js versions plus
|
|
62
|
+
runtime and credential modes.
|
|
63
|
+
|
|
64
|
+
## Local state and policy
|
|
65
|
+
|
|
66
|
+
The default agent directory is `~/.felan`; set `FELAN_AGENT_DIR` to change it.
|
|
67
|
+
It contains local credentials, settings, sessions, agents, extension storage,
|
|
68
|
+
and project memory. Root-session storage is scoped under
|
|
69
|
+
`$FELAN_AGENT_DIR/storage/sessions/<encoded-root-session-id>` and longer-lived
|
|
70
|
+
extension state under `$FELAN_AGENT_DIR/storage/agent`.
|
|
71
|
+
|
|
72
|
+
The local host loads only source-controlled Felan built-ins, Felan-owned
|
|
73
|
+
settings and prompt appends, explicit Felan agents and Agent Skills, and the
|
|
74
|
+
Agent Core-selected cwd instruction file. Ambient Pi extensions, packages,
|
|
75
|
+
prompts, themes, project settings, and package resources are filtered.
|
|
76
|
+
|
|
77
|
+
All built-ins are enabled by default, including the Powerline footer in TUI
|
|
78
|
+
sessions. Binary-backed features can remain inactive until their dependency is
|
|
79
|
+
installed or the feature is disabled through `/dependencies`.
|
|
80
|
+
|
|
81
|
+
Model responses use the built-in `concise` output style by default. Set the
|
|
82
|
+
global `outputStyle` setting to `explanatory` for more reasoning and context;
|
|
83
|
+
the [configuration guide](../../docs/user-guide/configuration.md#output-style)
|
|
84
|
+
documents validation and session-lifecycle behavior.
|
|
85
|
+
|
|
86
|
+
## Canonical user documentation
|
|
87
|
+
|
|
88
|
+
The package README intentionally stays short. Use these guides for operational
|
|
89
|
+
details:
|
|
90
|
+
|
|
91
|
+
- [Getting started](../../docs/getting-started.md)
|
|
92
|
+
- [Local CLI and storage](../../docs/user-guide/local-cli.md)
|
|
93
|
+
- [Configuration](../../docs/user-guide/configuration.md)
|
|
94
|
+
- [Commands and shortcuts](../../docs/user-guide/commands-and-shortcuts.md)
|
|
95
|
+
- [Agents, tasks, and Prewalk](../../docs/user-guide/agents-tasks-and-prewalk.md)
|
|
96
|
+
- [Context and memory](../../docs/user-guide/context-and-memory.md)
|
|
97
|
+
- [Web, MCP, browser, and documents](../../docs/user-guide/web-mcp-and-browser.md)
|
|
98
|
+
- [Runtime and security](../../docs/concepts/runtime-and-security.md)
|
|
99
|
+
- [Extension catalog](../../docs/reference/extension-catalog.md)
|
|
367
100
|
|
|
368
101
|
## Development
|
|
369
102
|
|
|
@@ -373,5 +106,9 @@ Source: `apps/tui` in <https://github.com/felan-ai/felan>.
|
|
|
373
106
|
corepack enable
|
|
374
107
|
pnpm install --frozen-lockfile
|
|
375
108
|
pnpm --filter @felan-ai/felan build
|
|
109
|
+
pnpm --filter @felan-ai/felan type-check
|
|
376
110
|
pnpm --filter @felan-ai/felan test
|
|
377
111
|
```
|
|
112
|
+
|
|
113
|
+
Run `pnpm verify` from the repository root for cross-package and packed-binary
|
|
114
|
+
coverage.
|
package/dist/cli-main.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RunLocalFelanOptions } from './application.js';
|
|
2
2
|
export interface CliDependencies {
|
|
3
3
|
readonly writeOutput?: (line: string) => void;
|
|
4
4
|
readonly writeError?: (line: string) => void;
|
|
5
5
|
readonly launch?: (options: RunLocalFelanOptions) => Promise<void>;
|
|
6
|
+
readonly update?: () => Promise<number>;
|
|
6
7
|
}
|
|
7
8
|
export declare function runCli(args: readonly string[], dependencies?: CliDependencies): Promise<number>;
|
|
8
9
|
//# sourceMappingURL=cli-main.d.ts.map
|
package/dist/cli-main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-main.d.ts","sourceRoot":"","sources":["../src/cli-main.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-main.d.ts","sourceRoot":"","sources":["../src/cli-main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CACzC;AAYD,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,YAAY,GAAE,eAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CA+DzG"}
|
package/dist/cli-main.js
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { VERSION as PI_VERSION } from '@earendil-works/pi-coding-agent';
|
|
3
|
-
import { runLocalFelan } from './application.js';
|
|
1
|
+
import { runFelanUpdate } from './update.js';
|
|
4
2
|
import { FELAN_VERSION } from './version.js';
|
|
5
3
|
const help = `Usage: felan [options] [message]
|
|
6
4
|
|
|
7
5
|
Options:
|
|
8
6
|
-c, --continue Continue the most recent session for this directory
|
|
9
7
|
--diagnostics Print local runtime versions and configuration mode
|
|
8
|
+
update Update a global npm installation of Felan
|
|
10
9
|
-h, --help Show this help
|
|
11
10
|
-v, --version Print the Felan version
|
|
12
11
|
--verbose Show verbose startup details`;
|
|
13
12
|
export async function runCli(args, dependencies = {}) {
|
|
14
13
|
const writeOutput = dependencies.writeOutput ?? ((line) => console.log(line));
|
|
15
14
|
const writeError = dependencies.writeError ?? ((line) => console.error(line));
|
|
16
|
-
|
|
15
|
+
if (args[0] === 'update') {
|
|
16
|
+
if (args.length !== 1) {
|
|
17
|
+
writeError('Usage: felan update');
|
|
18
|
+
return 1;
|
|
19
|
+
}
|
|
20
|
+
return dependencies.update?.() ?? runFelanUpdate({ writeOutput, writeError });
|
|
21
|
+
}
|
|
17
22
|
let continueRecent = false;
|
|
18
23
|
let verbose = false;
|
|
19
24
|
const messageParts = [];
|
|
@@ -41,6 +46,10 @@ export async function runCli(args, dependencies = {}) {
|
|
|
41
46
|
return 0;
|
|
42
47
|
}
|
|
43
48
|
else if (argument === '--diagnostics') {
|
|
49
|
+
const [{ AGENT_CORE_VERSION }, { VERSION: PI_VERSION }] = await Promise.all([
|
|
50
|
+
import('@felan-ai/agent-core'),
|
|
51
|
+
import('@earendil-works/pi-coding-agent'),
|
|
52
|
+
]);
|
|
44
53
|
writeOutput(`Felan version: ${FELAN_VERSION}`);
|
|
45
54
|
writeOutput(`Agent Core version: ${AGENT_CORE_VERSION}`);
|
|
46
55
|
writeOutput(`Pi version: ${PI_VERSION}`);
|
|
@@ -57,6 +66,10 @@ export async function runCli(args, dependencies = {}) {
|
|
|
57
66
|
messageParts.push(argument);
|
|
58
67
|
}
|
|
59
68
|
}
|
|
69
|
+
const launch = dependencies.launch ?? (async (options) => {
|
|
70
|
+
const { runLocalFelan } = await import('./application.js');
|
|
71
|
+
await runLocalFelan(options);
|
|
72
|
+
});
|
|
60
73
|
await launch({
|
|
61
74
|
continueRecent,
|
|
62
75
|
verbose,
|
package/dist/cli-main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-main.js","sourceRoot":"","sources":["../src/cli-main.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-main.js","sourceRoot":"","sources":["../src/cli-main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC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AAC,KAAK,EAAE,OAA6B,EAAE,EAAE;QAC7E,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC3D,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IACH,MAAM,MAAM,CAAC;QACX,cAAc;QACd,OAAO;QACP,GAAG,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;KACjF,CAAC,CAAC;IACH,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/dist/extensions.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExtensionPackageImporter, ModelRuntime } from '@felan-ai/agent-core';
|
|
2
2
|
import { type MemoryHost, type MemoryRole } from '@felan-ai/ext-memory';
|
|
3
|
+
import { type OutputStyle } from '@felan-ai/ext-output-style';
|
|
3
4
|
import { type SubagentHost } from '@felan-ai/ext-subagents';
|
|
4
5
|
import { type LocalSubagentNavigatorHost } from './subagents/agent-navigator.js';
|
|
5
6
|
export declare const askUserExtensionPackage = "@felan-ai/ext-ask-user";
|
|
@@ -7,6 +8,7 @@ export declare const mcpExtensionPackage = "@felan-ai/ext-mcp";
|
|
|
7
8
|
export declare const powerlineExtensionPackage = "@felan-ai/ext-powerline";
|
|
8
9
|
export declare const subagentsExtensionPackage = "@felan-ai/ext-subagents";
|
|
9
10
|
export declare const memoryExtensionPackage = "@felan-ai/ext-memory";
|
|
11
|
+
export declare const outputStyleExtensionPackage = "@felan-ai/ext-output-style";
|
|
10
12
|
export declare const builtinExtensionPackages: {
|
|
11
13
|
readonly subagents: "@felan-ai/ext-subagents";
|
|
12
14
|
readonly askUser: "@felan-ai/ext-ask-user";
|
|
@@ -22,8 +24,9 @@ export declare const builtinExtensionPackages: {
|
|
|
22
24
|
readonly context: "@felan-ai/ext-context";
|
|
23
25
|
readonly memory: "@felan-ai/ext-memory";
|
|
24
26
|
readonly powerline: "@felan-ai/ext-powerline";
|
|
27
|
+
readonly outputStyle: "@felan-ai/ext-output-style";
|
|
25
28
|
};
|
|
26
|
-
export declare const localExtensionPackages: ("@felan-ai/ext-subagents" | "@felan-ai/ext-ask-user" | "@felan-ai/ext-tasks" | "@felan-ai/ext-prewalk" | "@felan-ai/ext-mcp" | "@felan-ai/ext-web-access" | "@felan-ai/ext-browser" | "@felan-ai/ext-background-bash" | "@felan-ai/ext-codex" | "@felan-ai/ext-rtk-optimizer" | "@felan-ai/ext-markitdown" | "@felan-ai/ext-context" | "@felan-ai/ext-memory" | "@felan-ai/ext-powerline")[];
|
|
29
|
+
export declare const localExtensionPackages: ("@felan-ai/ext-subagents" | "@felan-ai/ext-ask-user" | "@felan-ai/ext-tasks" | "@felan-ai/ext-prewalk" | "@felan-ai/ext-mcp" | "@felan-ai/ext-web-access" | "@felan-ai/ext-browser" | "@felan-ai/ext-background-bash" | "@felan-ai/ext-codex" | "@felan-ai/ext-rtk-optimizer" | "@felan-ai/ext-markitdown" | "@felan-ai/ext-context" | "@felan-ai/ext-memory" | "@felan-ai/ext-powerline" | "@felan-ai/ext-output-style")[];
|
|
27
30
|
export type BuiltinExtensionName = keyof typeof builtinExtensionPackages;
|
|
28
31
|
export type BuiltinExtensionSettings = Partial<Record<BuiltinExtensionName, boolean>>;
|
|
29
32
|
export declare function resolveBuiltinExtensionPackages(settings: unknown): readonly string[];
|
|
@@ -32,5 +35,5 @@ export interface LocalMemoryExtensionBinding {
|
|
|
32
35
|
readonly role: MemoryRole;
|
|
33
36
|
readonly host: MemoryHost;
|
|
34
37
|
}
|
|
35
|
-
export declare function createLocalExtensionImporter(host: SubagentHost & LocalSubagentNavigatorHost, modelRuntime: ModelRuntime, importExtension?: ExtensionPackageImporter, shutdownHost?: () => Promise<void>, memoryBinding?: LocalMemoryExtensionBinding): ExtensionPackageImporter;
|
|
38
|
+
export declare function createLocalExtensionImporter(host: SubagentHost & LocalSubagentNavigatorHost, modelRuntime: ModelRuntime, importExtension?: ExtensionPackageImporter, shutdownHost?: () => Promise<void>, memoryBinding?: LocalMemoryExtensionBinding, outputStyle?: OutputStyle): ExtensionPackageImporter;
|
|
36
39
|
//# sourceMappingURL=extensions.d.ts.map
|
package/dist/extensions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGnF,OAAO,EAAyB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGnF,OAAO,EAAyB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AACvD,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AACnE,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AACnE,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAC7D,eAAO,MAAM,2BAA2B,+BAA+B,CAAC;AACxE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;CAiB3B,CAAC;AACX,eAAO,MAAM,sBAAsB,8ZAA0C,CAAC;AAE9E,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,wBAAwB,CAAC;AACzE,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAAC;AAItF,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAYpF;AAED,eAAO,MAAM,oBAAoB,EAAE,wBAKlC,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAED,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,YAAY,GAAG,0BAA0B,EAC/C,YAAY,EAAE,YAAY,EAC1B,eAAe,GAAE,wBAA+C,EAChE,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAClC,aAAa,CAAC,EAAE,2BAA2B,EAC3C,WAAW,GAAE,WAAkC,GAC9C,wBAAwB,CA6C1B"}
|
package/dist/extensions.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createAskUserExtension } from '@felan-ai/ext-ask-user';
|
|
2
2
|
import { createTuiAskUserHost } from '@felan-ai/ext-ask-user/tui';
|
|
3
3
|
import { createMemoryExtension } from '@felan-ai/ext-memory';
|
|
4
|
+
import { createOutputStyleExtension, DEFAULT_OUTPUT_STYLE, } from '@felan-ai/ext-output-style';
|
|
4
5
|
import { createPowerlineExtension } from '@felan-ai/ext-powerline';
|
|
5
6
|
import { createSubagentsExtension, } from '@felan-ai/ext-subagents';
|
|
6
7
|
import { createLocalMcpExtension } from './mcp/index.js';
|
|
@@ -11,6 +12,7 @@ export const mcpExtensionPackage = '@felan-ai/ext-mcp';
|
|
|
11
12
|
export const powerlineExtensionPackage = '@felan-ai/ext-powerline';
|
|
12
13
|
export const subagentsExtensionPackage = '@felan-ai/ext-subagents';
|
|
13
14
|
export const memoryExtensionPackage = '@felan-ai/ext-memory';
|
|
15
|
+
export const outputStyleExtensionPackage = '@felan-ai/ext-output-style';
|
|
14
16
|
export const builtinExtensionPackages = {
|
|
15
17
|
subagents: subagentsExtensionPackage,
|
|
16
18
|
askUser: askUserExtensionPackage,
|
|
@@ -27,6 +29,7 @@ export const builtinExtensionPackages = {
|
|
|
27
29
|
context: '@felan-ai/ext-context',
|
|
28
30
|
memory: memoryExtensionPackage,
|
|
29
31
|
powerline: powerlineExtensionPackage,
|
|
32
|
+
outputStyle: outputStyleExtensionPackage,
|
|
30
33
|
};
|
|
31
34
|
export const localExtensionPackages = Object.values(builtinExtensionPackages);
|
|
32
35
|
const localExtensionPackageSet = new Set(localExtensionPackages);
|
|
@@ -51,7 +54,7 @@ export const importLocalExtension = async (packageName) => {
|
|
|
51
54
|
}
|
|
52
55
|
return import(packageName);
|
|
53
56
|
};
|
|
54
|
-
export function createLocalExtensionImporter(host, modelRuntime, importExtension = importLocalExtension, shutdownHost, memoryBinding) {
|
|
57
|
+
export function createLocalExtensionImporter(host, modelRuntime, importExtension = importLocalExtension, shutdownHost, memoryBinding, outputStyle = DEFAULT_OUTPUT_STYLE) {
|
|
55
58
|
let powerlineLoaded = false;
|
|
56
59
|
let agentRailRenderer;
|
|
57
60
|
const powerline = createPowerlineExtension(createLocalSubscriptionUsageHost(modelRuntime), {
|
|
@@ -93,6 +96,9 @@ export function createLocalExtensionImporter(host, modelRuntime, importExtension
|
|
|
93
96
|
throw new Error('Local memory extension requires a host binding');
|
|
94
97
|
return { default: createMemoryExtension(memoryBinding) };
|
|
95
98
|
}
|
|
99
|
+
if (packageName === outputStyleExtensionPackage) {
|
|
100
|
+
return { default: createOutputStyleExtension(outputStyle) };
|
|
101
|
+
}
|
|
96
102
|
return importExtension(packageName);
|
|
97
103
|
};
|
|
98
104
|
}
|
package/dist/extensions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAoC,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EACL,wBAAwB,GAEzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EACL,8BAA8B,GAG/B,MAAM,gCAAgC,CAAC;AAExC,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AACvD,MAAM,CAAC,MAAM,yBAAyB,GAAG,yBAAyB,CAAC;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,yBAAyB,CAAC;AACnE,MAAM,CAAC,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS,EAAE,yBAAyB;IACpC,OAAO,EAAE,uBAAuB;IAChC,KAAK,EAAE,qBAAqB;IAC5B,OAAO,EAAE,uBAAuB;IAChC,GAAG,EAAE,mBAAmB;IACxB,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,uBAAuB;IAChC,cAAc,EAAE,+BAA+B;IAC/C,KAAK,EAAE,qBAAqB;IAC5B,YAAY,EAAE,6BAA6B;IAC3C,iHAAiH;IACjH,UAAU,EAAE,0BAA0B;IACtC,OAAO,EAAE,uBAAuB;IAChC,MAAM,EAAE,sBAAsB;IAC9B,SAAS,EAAE,yBAAyB;
|
|
1
|
+
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"AACA,OAAO,EAA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