@alisio/alisio-code 0.1.0-alpha.3
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/LICENSE +21 -0
- package/README.md +23 -0
- package/dist/banner.d.ts +56 -0
- package/dist/banner.js +69 -0
- package/dist/builtin.d.ts +8 -0
- package/dist/builtin.js +49 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +476 -0
- package/dist/prompts/index.d.ts +5 -0
- package/dist/prompts/index.js +3 -0
- package/dist/prompts/init.d.ts +2 -0
- package/dist/prompts/init.js +57 -0
- package/dist/tui/app.d.ts +8 -0
- package/dist/tui/app.js +1313 -0
- package/dist/tui/attachments.d.ts +68 -0
- package/dist/tui/attachments.js +132 -0
- package/dist/tui/clipboard.d.ts +30 -0
- package/dist/tui/clipboard.js +57 -0
- package/dist/tui/components.d.ts +159 -0
- package/dist/tui/components.js +487 -0
- package/dist/tui/connect-input.d.ts +35 -0
- package/dist/tui/connect-input.js +104 -0
- package/dist/tui/panel.d.ts +54 -0
- package/dist/tui/panel.js +140 -0
- package/dist/tui/questions.d.ts +56 -0
- package/dist/tui/questions.js +113 -0
- package/dist/tui/queue.d.ts +35 -0
- package/dist/tui/queue.js +79 -0
- package/dist/tui/skills-manager.d.ts +67 -0
- package/dist/tui/skills-manager.js +200 -0
- package/dist/tui/state.d.ts +189 -0
- package/dist/tui/state.js +546 -0
- package/dist/tui/theme.d.ts +23 -0
- package/dist/tui/theme.js +49 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gustavo Gutiérrez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# alisio
|
|
2
|
+
|
|
3
|
+
**Alisio is an extensible, provider-agnostic coding-agent harness for your terminal.** It pairs a
|
|
4
|
+
fast TUI with any OpenAI-compatible model, runs local tools behind explicit permissions, compacts
|
|
5
|
+
long conversations into structured checkpoints, remembers decisions across sessions with an
|
|
6
|
+
Engram-style memory plugin, and exposes a typed plugin SDK.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install -g @alisio/alisio-code # or: pnpm add -g @alisio/alisio-code · bun add -g @alisio/alisio-code
|
|
10
|
+
alisio # the CLI binary is installed as `alisio`
|
|
11
|
+
export DEEPSEEK_API_KEY=... # keys are read from environment variables only
|
|
12
|
+
alisio --config ./alisio.json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- Terminal UI: streaming Markdown, tool blocks with diffs, context/token bar, slash commands, copy-on-select.
|
|
16
|
+
- Headless: `alisio run "prompt" --json` emits versioned JSONL events.
|
|
17
|
+
- Permissions: reads by default; `--allow-write`, `--allow-process` or interactive approval; `--read-only`.
|
|
18
|
+
- Built-in memory plugin (disable with `--disable-plugin memory`); npm plugins via `--plugin <package>`.
|
|
19
|
+
- Runs on Node.js >= 22.16 or Bun; standalone binaries are attached to GitHub releases.
|
|
20
|
+
|
|
21
|
+
Documentation: [English](https://gustavogutierrez.github.io/alisio/) · [Español](https://gustavogutierrez.github.io/alisio/es/)
|
|
22
|
+
|
|
23
|
+
Maintainer: Gustavo Gutiérrez · License: MIT
|
package/dist/banner.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { StartupInput, StartupResult, TerminalCapabilities } from "@alisio/core";
|
|
2
|
+
type Env = Record<string, string | undefined>;
|
|
3
|
+
export interface BannerPolicyInput {
|
|
4
|
+
mode: "tui" | "readline" | "run";
|
|
5
|
+
json?: boolean;
|
|
6
|
+
quiet?: boolean;
|
|
7
|
+
/** `false` when --no-banner is given. */
|
|
8
|
+
banner?: boolean;
|
|
9
|
+
stdoutTTY: boolean;
|
|
10
|
+
stderrTTY: boolean;
|
|
11
|
+
env: Env;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Banner only for interactive sessions: never for run/resume-with-prompt, --json, --quiet,
|
|
15
|
+
* --no-banner, CI, or when the target stream is not a terminal.
|
|
16
|
+
*/
|
|
17
|
+
export declare function bannerPolicy(input: BannerPolicyInput): boolean;
|
|
18
|
+
export declare function terminalCapabilities(input: {
|
|
19
|
+
env: Env;
|
|
20
|
+
columns: number;
|
|
21
|
+
tty: boolean;
|
|
22
|
+
}): TerminalCapabilities;
|
|
23
|
+
interface AppLike {
|
|
24
|
+
workspace: string;
|
|
25
|
+
config: {
|
|
26
|
+
provider: {
|
|
27
|
+
baseURL: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
provider: {
|
|
31
|
+
model: string;
|
|
32
|
+
};
|
|
33
|
+
providerInfo?: {
|
|
34
|
+
id: string;
|
|
35
|
+
profile: Record<string, string | number | boolean>;
|
|
36
|
+
persisted: boolean;
|
|
37
|
+
};
|
|
38
|
+
plugins: Parameters<typeof import("@alisio/core").renderStartup>[0] & {
|
|
39
|
+
builtins: Set<string>;
|
|
40
|
+
};
|
|
41
|
+
runner: {
|
|
42
|
+
policy: {
|
|
43
|
+
write: boolean;
|
|
44
|
+
process: boolean;
|
|
45
|
+
};
|
|
46
|
+
approvals: boolean;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Startup input from an application: provider host only, never keys or full URLs. */
|
|
50
|
+
export declare function startupInput(app: AppLike, options: {
|
|
51
|
+
version: string;
|
|
52
|
+
model?: string;
|
|
53
|
+
readOnly?: boolean;
|
|
54
|
+
terminal: TerminalCapabilities;
|
|
55
|
+
}): StartupInput;
|
|
56
|
+
export type { StartupResult };
|
package/dist/banner.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Startup banner policy and terminal capability detection (pure), plus the glue that builds
|
|
3
|
+
* the startup context from an application. Rendering itself lives in @alisio/core.
|
|
4
|
+
*/
|
|
5
|
+
import { homedir, userInfo } from "node:os";
|
|
6
|
+
/**
|
|
7
|
+
* Banner only for interactive sessions: never for run/resume-with-prompt, --json, --quiet,
|
|
8
|
+
* --no-banner, CI, or when the target stream is not a terminal.
|
|
9
|
+
*/
|
|
10
|
+
export function bannerPolicy(input) {
|
|
11
|
+
if (input.mode === "run" || input.json || input.quiet || input.banner === false)
|
|
12
|
+
return false;
|
|
13
|
+
if (input.env.CI && input.env.CI !== "false" && input.env.CI !== "0")
|
|
14
|
+
return false;
|
|
15
|
+
// The TUI draws on stdout; readline mode prints the banner to stderr.
|
|
16
|
+
return input.mode === "tui" ? input.stdoutTTY : input.stderrTTY;
|
|
17
|
+
}
|
|
18
|
+
export function terminalCapabilities(input) {
|
|
19
|
+
const { env } = input;
|
|
20
|
+
const dumb = env.TERM === "dumb";
|
|
21
|
+
const locale = env.LC_ALL || env.LC_CTYPE || env.LANG || "";
|
|
22
|
+
return {
|
|
23
|
+
color: input.tty && !dumb && env.NO_COLOR === undefined,
|
|
24
|
+
unicode: !dumb && !/^(C|POSIX)(\.|$)/i.test(locale),
|
|
25
|
+
columns: input.columns > 0 ? input.columns : 80,
|
|
26
|
+
interactive: input.tty,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** Startup input from an application: provider host only, never keys or full URLs. */
|
|
30
|
+
export function startupInput(app, options) {
|
|
31
|
+
let host = "unknown";
|
|
32
|
+
try {
|
|
33
|
+
host = new URL(String(app.providerInfo?.profile.baseURL ?? app.config.provider.baseURL)).host;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
/* keep unknown */
|
|
37
|
+
}
|
|
38
|
+
const state = (on) => (on ? "on" : app.runner.approvals ? "ask" : "off");
|
|
39
|
+
let user;
|
|
40
|
+
try {
|
|
41
|
+
user = userInfo().username;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
user = undefined;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
version: options.version,
|
|
48
|
+
cwd: app.workspace,
|
|
49
|
+
home: homedir(),
|
|
50
|
+
model: options.model ?? app.provider.model,
|
|
51
|
+
provider: host,
|
|
52
|
+
...(user ? { userName: user } : {}),
|
|
53
|
+
terminal: options.terminal,
|
|
54
|
+
facts: [
|
|
55
|
+
{
|
|
56
|
+
label: "access",
|
|
57
|
+
value: options.readOnly
|
|
58
|
+
? "read-only"
|
|
59
|
+
: `write:${state(app.runner.policy.write)} process:${state(app.runner.policy.process)}`,
|
|
60
|
+
},
|
|
61
|
+
{ label: "memory", value: app.plugins.builtins.has("memory") ? "on" : "off" },
|
|
62
|
+
...(!(options.model ?? app.provider.model)
|
|
63
|
+
? [{ label: "model", value: "⚠ not configured — use /connect" }]
|
|
64
|
+
: (options.model ?? app.provider.model) === "YOUR_MODEL_ID"
|
|
65
|
+
? [{ label: "model", value: "⚠ placeholder — edit .alisio/config.json" }]
|
|
66
|
+
: []),
|
|
67
|
+
],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in plugin registry wired by the CLI. Built-ins load through the trusted path of the
|
|
3
|
+
* plugin host (unprefixed names, `internal` effect) and can be disabled by configuration
|
|
4
|
+
* (`builtinPlugins.<id>.enabled: false`) or `--disable-plugin <id>`. Add a built-in by
|
|
5
|
+
* appending an entry here.
|
|
6
|
+
*/
|
|
7
|
+
import type { BuiltinPlugin } from "@alisio/core";
|
|
8
|
+
export declare const BUILTIN_PLUGINS: BuiltinPlugin[];
|
package/dist/builtin.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createDeepSeekPlugin } from "@alisio/plugin-deepseek";
|
|
2
|
+
import { createMemoryPlugin } from "@alisio/plugin-memory";
|
|
3
|
+
import { createOpenAICompatiblePlugin } from "@alisio/plugin-openai-compatible";
|
|
4
|
+
import { createOpenCodePlugin } from "@alisio/plugin-opencode";
|
|
5
|
+
import { createOpenCodeGoPlugin } from "@alisio/plugin-opencode-go";
|
|
6
|
+
import { createSubagentsPlugin } from "@alisio/plugin-subagents";
|
|
7
|
+
export const BUILTIN_PLUGINS = [
|
|
8
|
+
{
|
|
9
|
+
id: "deepseek",
|
|
10
|
+
name: "DeepSeek",
|
|
11
|
+
description: "Dedicated DeepSeek Chat Completions and Responses provider",
|
|
12
|
+
categories: ["model-provider"],
|
|
13
|
+
create: createDeepSeekPlugin,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "opencode",
|
|
17
|
+
name: "OpenCode Console (Zen)",
|
|
18
|
+
description: "Dedicated OpenCode Console (Zen) multi-protocol provider",
|
|
19
|
+
categories: ["model-provider"],
|
|
20
|
+
create: createOpenCodePlugin,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "opencode-go",
|
|
24
|
+
name: "OpenCode Go",
|
|
25
|
+
description: "Dedicated OpenCode Go multi-protocol provider",
|
|
26
|
+
categories: ["model-provider"],
|
|
27
|
+
create: createOpenCodeGoPlugin,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "openai-compatible",
|
|
31
|
+
name: "OpenAI compatible",
|
|
32
|
+
description: "OpenAI-compatible Chat Completions and Responses model provider",
|
|
33
|
+
categories: ["model-provider"],
|
|
34
|
+
defaultProvider: true,
|
|
35
|
+
create: createOpenAICompatiblePlugin,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "memory",
|
|
39
|
+
name: "Memory",
|
|
40
|
+
description: "Engram-style persistent memory (SQLite + FTS5), memory-aware compaction",
|
|
41
|
+
create: createMemoryPlugin,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "subagents",
|
|
45
|
+
name: "Subagents",
|
|
46
|
+
description: "Delegation to specialized subagents in child sessions (task tool, agent tree)",
|
|
47
|
+
create: createSubagentsPlugin,
|
|
48
|
+
},
|
|
49
|
+
];
|
package/dist/main.d.ts
ADDED