@alisio/alisio-code 0.8.0 → 0.10.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 CHANGED
@@ -1,7 +1,8 @@
1
1
  # @alisio/alisio-code
2
2
 
3
- **Alisio is an extensible, provider-agnostic coding-agent harness for your terminal.** It pairs a fast
4
- TUI with any OpenAI-compatible model, runs local tools behind explicit permissions, compacts long
3
+ **Alisio is your assistant for everyday work, on the model you choose.** This package is the
4
+ command-line interface (the advanced path); the easiest way to use Alisio is the desktop app. It
5
+ pairs a fast TUI with any OpenAI-compatible model, runs local tools behind explicit permissions, compacts long
5
6
  conversations into structured checkpoints, remembers decisions across sessions with an Engram-style
6
7
  memory plugin, and exposes a typed plugin SDK.
7
8
 
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Built-in plugins and prompt templates, and the slash names templates may not take. Shared by the
3
+ * `alisio` binary and by hosts that embed the app (the desktop wrapper imports it through the
4
+ * `@alisio/alisio-code/defaults` export, which has no commander side effects).
5
+ */
6
+ export declare function cliDefaults(): Promise<{
7
+ builtins: import("@alisio/core").BuiltinPlugin[];
8
+ builtinPrompts: {
9
+ name: string;
10
+ text: string;
11
+ }[];
12
+ reservedPromptNames: string[];
13
+ }>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Built-in plugins and prompt templates, and the slash names templates may not take. Shared by the
3
+ * `alisio` binary and by hosts that embed the app (the desktop wrapper imports it through the
4
+ * `@alisio/alisio-code/defaults` export, which has no commander side effects).
5
+ */
6
+ export async function cliDefaults() {
7
+ const [{ BUILTIN_PLUGINS }, { BUILTIN_PROMPTS }, { reservedCommandNames }] = await Promise.all([
8
+ import("./builtin.js"),
9
+ import("./prompts/index.js"),
10
+ import("./tui/state.js"),
11
+ ]);
12
+ return {
13
+ builtins: BUILTIN_PLUGINS,
14
+ builtinPrompts: BUILTIN_PROMPTS,
15
+ reservedPromptNames: reservedCommandNames(),
16
+ };
17
+ }
package/dist/main.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from "commander";
3
+ import { cliDefaults } from "./defaults.js";
3
4
  import { loadVersion } from "./version.js";
4
5
  const VERSION = loadVersion(import.meta.url);
5
6
  function parseAgents(json) {
@@ -8,25 +9,12 @@ function parseAgents(json) {
8
9
  throw new Error('--agents expects a JSON object: {"name":{"description":"...","prompt":"..."}}');
9
10
  return value;
10
11
  }
11
- /** Built-in plugins and prompt templates, and the slash names templates may not take. */
12
- async function cliDefaults() {
13
- const [{ BUILTIN_PLUGINS }, { BUILTIN_PROMPTS }, { reservedCommandNames }] = await Promise.all([
14
- import("./builtin.js"),
15
- import("./prompts/index.js"),
16
- import("./tui/state.js"),
17
- ]);
18
- return {
19
- builtins: BUILTIN_PLUGINS,
20
- builtinPrompts: BUILTIN_PROMPTS,
21
- reservedPromptNames: reservedCommandNames(),
22
- };
23
- }
24
12
  /** Commander collector of a repeatable option. */
25
13
  const collect = (value, previous) => [...previous, value];
26
14
  const program = new Command();
27
15
  program
28
16
  .name("alisio")
29
- .description("Velocidad y eficiencia para construir — extensible coding harness")
17
+ .description("Alisio: your assistant for everyday work, on the model you choose")
30
18
  .version(VERSION)
31
19
  .option("--cwd <path>", "Working directory")
32
20
  .option("--config <path>", "Explicit trusted configuration file")
package/dist/tui/app.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { homedir } from "node:os";
2
2
  import { join } from "node:path";
3
- import { AGENT_TEMPLATES, agentAuthoringGuidance, agentCommandDescriptors, agentIdFromCommand, agentModelCapabilities, agentModelLabels, agentModelOptions, changelogNews, describePermissionStatus, formatChangelogMarkdown, formatDecisionStatsSection, formatReloadReport, generateAgentDraft, goalOptInTools, goalOutcome, goalWaiting, IMPLEMENTATION_AGENT_ID, isTaskLive, loadChangelog, modeFromFlags, NOT_SANDBOXED, nextAgent, PERMISSION_MODE_TABLE, PERMISSION_USAGE, PLAN_QUESTION_ID, PLAN_TEXT_KEY, parseGoalCommand, parsePermissionCommand, ReloadFailedError, ReloadRefusedError, reloadApplication, selectEntries, settlePlanRun, stateHome, toGrantWire, toRef, validateReloadConfig, } from "@alisio/core";
3
+ import { AGENT_TEMPLATES, agentAuthoringGuidance, agentCommandDescriptors, agentIdFromCommand, agentModelCapabilities, agentModelLabels, agentModelOptions, changelogNews, describePermissionStatus, formatChangelogMarkdown, formatContextGovernorStatsSection, formatDecisionStatsSection, formatReloadReport, generateAgentDraft, goalOptInTools, goalOutcome, goalWaiting, IMPLEMENTATION_AGENT_ID, isTaskLive, loadChangelog, modeFromFlags, NOT_SANDBOXED, nextAgent, PERMISSION_MODE_TABLE, PERMISSION_USAGE, PLAN_QUESTION_ID, PLAN_TEXT_KEY, parseGoalCommand, parsePermissionCommand, ReloadFailedError, ReloadRefusedError, reloadApplication, selectEntries, settlePlanRun, stateHome, toGrantWire, toRef, validateReloadConfig, } from "@alisio/core";
4
4
  import { summarizeDecisionEvents } from "@alisio/sdk";
5
5
  import { CombinedAutocompleteProvider, Container, Editor, getImageDimensions, getNativeClipboard, Key, MouseRegion, matchesKey, ProcessTerminal, ScrollView, SelectList, TuiAltScreen, truncateToWidth, VStack, } from "@earendil-works/pi-tui";
6
6
  import { loadVersion } from "../version.js";
@@ -2604,6 +2604,12 @@ export async function runTui(options) {
2604
2604
  .map(([name, t]) => `| \`${name}\` | ${t.calls} | ${t.errors} |`)
2605
2605
  .join("\n");
2606
2606
  const decisionSection = formatDecisionStatsSection(summarizeDecisionEvents(s.decisions ?? []));
2607
+ const governance = app.runner.governance(session);
2608
+ const contextUsage = app.runner.contextUsage(session);
2609
+ const governorSection = formatContextGovernorStatsSection({
2610
+ ...(governance ? { governance } : {}),
2611
+ ...(contextUsage ? { usage: contextUsage } : {}),
2612
+ });
2607
2613
  return [
2608
2614
  "**Session statistics**",
2609
2615
  "",
@@ -2617,6 +2623,7 @@ export async function runTui(options) {
2617
2623
  tools ? `| Tool | Calls | Errors |\n| --- | --- | --- |\n${tools}` : "No tool calls yet.",
2618
2624
  "",
2619
2625
  ...(decisionSection ? [decisionSection, ""] : []),
2626
+ ...(governorSection ? [governorSection, ""] : []),
2620
2627
  "**Extensions**",
2621
2628
  "",
2622
2629
  `- mascot: ${app.plugins.extensions.resolve("mascot")?.provider.id ?? "alisio.default"} · startup screen: ${app.plugins.extensions.resolve("startup-screen")?.provider.id ?? "alisio.default"}`,
@@ -2781,6 +2788,7 @@ export async function runTui(options) {
2781
2788
  case "stats":
2782
2789
  return info(statsReport());
2783
2790
  case "tools":
2791
+ case "context":
2784
2792
  case "decisions":
2785
2793
  case "sessions": {
2786
2794
  // Text-identical core handlers (parity-tested): output comes from the CommandCatalog.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alisio/alisio-code",
3
- "version": "0.8.0",
4
- "description": "Alisio: an extensible, provider-agnostic coding-agent harness for your terminal. TUI, OpenAI-compatible providers, permissioned local tools, context compaction, persistent memory and a typed plugin SDK.",
3
+ "version": "0.10.0",
4
+ "description": "Alisio: your assistant for everyday work, on the model you choose. A provider-agnostic AI harness with a desktop app, a terminal UI, OpenAI-compatible providers, permissioned local tools, profession plugins, context compaction, persistent memory and a typed plugin SDK.",
5
5
  "author": "Gustavo Gutiérrez",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -29,6 +29,10 @@
29
29
  ".": {
30
30
  "types": "./dist/main.d.ts",
31
31
  "import": "./dist/main.js"
32
+ },
33
+ "./defaults": {
34
+ "types": "./dist/defaults.d.ts",
35
+ "import": "./dist/defaults.js"
32
36
  }
33
37
  },
34
38
  "types": "./dist/main.d.ts",
@@ -45,12 +49,12 @@
45
49
  "alisio": "./dist/main.js"
46
50
  },
47
51
  "dependencies": {
48
- "@alisio/core": "0.8.0",
49
- "@alisio/plugin-memory": "0.8.0",
50
- "@alisio/plugin-openai-compatible": "0.8.0",
51
- "@alisio/plugin-subagents": "0.8.0",
52
- "@alisio/sdk": "0.8.0",
53
- "@alisio/server": "0.8.0",
52
+ "@alisio/core": "0.10.0",
53
+ "@alisio/plugin-memory": "0.10.0",
54
+ "@alisio/plugin-openai-compatible": "0.10.0",
55
+ "@alisio/plugin-subagents": "0.10.0",
56
+ "@alisio/sdk": "0.10.0",
57
+ "@alisio/server": "0.10.0",
54
58
  "@earendil-works/pi-tui": "1.2.0",
55
59
  "commander": "15.0.0"
56
60
  },