@alisio/core 0.1.0-alpha.9 → 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 +52 -7
- package/dist/agents/active.d.ts +99 -0
- package/dist/agents/active.js +218 -0
- package/dist/agents/capabilities.d.ts +26 -0
- package/dist/agents/capabilities.js +120 -0
- package/dist/agents/create-agent-skill.d.ts +11 -0
- package/dist/agents/create-agent-skill.js +60 -0
- package/dist/agents/definitions.d.ts +88 -0
- package/dist/agents/definitions.js +404 -0
- package/dist/agents/draft.d.ts +41 -0
- package/dist/agents/draft.js +133 -0
- package/dist/agents/service.d.ts +57 -0
- package/dist/agents/service.js +86 -0
- package/dist/agents/templates.d.ts +8 -0
- package/dist/agents/templates.js +102 -0
- package/dist/analysis/capabilities.d.ts +48 -0
- package/dist/analysis/capabilities.js +90 -0
- package/dist/analysis/data/csv.d.ts +46 -0
- package/dist/analysis/data/csv.js +240 -0
- package/dist/analysis/data/datasets.d.ts +132 -0
- package/dist/analysis/data/datasets.js +441 -0
- package/dist/analysis/data/describe.d.ts +27 -0
- package/dist/analysis/data/describe.js +103 -0
- package/dist/analysis/data/engine-client.d.ts +58 -0
- package/dist/analysis/data/engine-client.js +304 -0
- package/dist/analysis/data/engine-entry.d.ts +1 -0
- package/dist/analysis/data/engine-entry.js +59 -0
- package/dist/analysis/data/engine-source.d.ts +4 -0
- package/dist/analysis/data/engine-source.js +6 -0
- package/dist/analysis/data/engine-types.d.ts +86 -0
- package/dist/analysis/data/engine-types.js +7 -0
- package/dist/analysis/data/infer.d.ts +42 -0
- package/dist/analysis/data/infer.js +118 -0
- package/dist/analysis/data/ingest-worker.d.ts +17 -0
- package/dist/analysis/data/ingest-worker.js +365 -0
- package/dist/analysis/data/json.d.ts +19 -0
- package/dist/analysis/data/json.js +44 -0
- package/dist/analysis/data/query-worker.d.ts +12 -0
- package/dist/analysis/data/query-worker.js +75 -0
- package/dist/analysis/data/rows.d.ts +39 -0
- package/dist/analysis/data/rows.js +120 -0
- package/dist/analysis/data/sql-guard.d.ts +20 -0
- package/dist/analysis/data/sql-guard.js +129 -0
- package/dist/analysis/data/stats.d.ts +18 -0
- package/dist/analysis/data/stats.js +77 -0
- package/dist/analysis/install-hints.d.ts +33 -0
- package/dist/analysis/install-hints.js +144 -0
- package/dist/analysis/janitor.d.ts +60 -0
- package/dist/analysis/janitor.js +264 -0
- package/dist/analysis/jobs.d.ts +94 -0
- package/dist/analysis/jobs.js +165 -0
- package/dist/analysis/oci.d.ts +129 -0
- package/dist/analysis/oci.js +330 -0
- package/dist/analysis/python/sources.d.ts +2 -0
- package/dist/analysis/python/sources.js +10 -0
- package/dist/analysis/requirements.d.ts +32 -0
- package/dist/analysis/requirements.js +73 -0
- package/dist/analysis/rerun.d.ts +40 -0
- package/dist/analysis/rerun.js +136 -0
- package/dist/analysis/runtime-manager.d.ts +146 -0
- package/dist/analysis/runtime-manager.js +472 -0
- package/dist/analysis/status.d.ts +21 -0
- package/dist/analysis/status.js +52 -0
- package/dist/application.d.ts +105 -3
- package/dist/application.js +446 -18
- package/dist/artifacts/kinds.d.ts +35 -0
- package/dist/artifacts/kinds.js +177 -0
- package/dist/artifacts/publisher.d.ts +7 -0
- package/dist/artifacts/publisher.js +29 -0
- package/dist/artifacts/store.d.ts +119 -0
- package/dist/artifacts/store.js +581 -0
- package/dist/background/janitor.d.ts +22 -0
- package/dist/background/janitor.js +62 -0
- package/dist/background/mirror.d.ts +14 -0
- package/dist/background/mirror.js +41 -0
- package/dist/background/notify.d.ts +58 -0
- package/dist/background/notify.js +172 -0
- package/dist/background/output.d.ts +46 -0
- package/dist/background/output.js +179 -0
- package/dist/background/service.d.ts +137 -0
- package/dist/background/service.js +410 -0
- package/dist/background/store.d.ts +103 -0
- package/dist/background/store.js +195 -0
- package/dist/changelog/data.d.ts +6 -0
- package/dist/changelog/data.js +293 -0
- package/dist/changelog/index.d.ts +5 -0
- package/dist/changelog/index.js +7 -0
- package/dist/changelog/parse.d.ts +53 -0
- package/dist/changelog/parse.js +160 -0
- package/dist/commands/builtins.d.ts +10 -0
- package/dist/commands/builtins.js +161 -0
- package/dist/commands/catalog.d.ts +86 -0
- package/dist/commands/catalog.js +304 -0
- package/dist/config.d.ts +206 -6
- package/dist/config.js +426 -20
- package/dist/core/compaction.js +13 -2
- package/dist/core/contracts.d.ts +180 -3
- package/dist/core/opt-in.d.ts +12 -0
- package/dist/core/opt-in.js +12 -0
- package/dist/core/output-limit.d.ts +34 -0
- package/dist/core/output-limit.js +39 -0
- package/dist/core/run-stats.d.ts +16 -0
- package/dist/core/run-stats.js +8 -0
- package/dist/core/runner.d.ts +134 -4
- package/dist/core/runner.js +780 -138
- package/dist/core/timeout.d.ts +15 -0
- package/dist/core/timeout.js +61 -0
- package/dist/core/truncation.d.ts +30 -0
- package/dist/core/truncation.js +83 -0
- package/dist/goal/blockers.d.ts +45 -0
- package/dist/goal/blockers.js +51 -0
- package/dist/goal/budget.d.ts +24 -0
- package/dist/goal/budget.js +53 -0
- package/dist/goal/command.d.ts +36 -0
- package/dist/goal/command.js +98 -0
- package/dist/goal/format.d.ts +19 -0
- package/dist/goal/format.js +102 -0
- package/dist/goal/host.d.ts +29 -0
- package/dist/goal/host.js +42 -0
- package/dist/goal/index.d.ts +9 -0
- package/dist/goal/index.js +9 -0
- package/dist/goal/machine.d.ts +186 -0
- package/dist/goal/machine.js +344 -0
- package/dist/goal/prompts.d.ts +10 -0
- package/dist/goal/prompts.js +75 -0
- package/dist/goal/service.d.ts +113 -0
- package/dist/goal/service.js +273 -0
- package/dist/goal/store.d.ts +59 -0
- package/dist/goal/store.js +184 -0
- package/dist/index.d.ts +50 -5
- package/dist/index.js +49 -4
- package/dist/mcp/connector.js +38 -6
- package/dist/mcp/rich.d.ts +41 -0
- package/dist/mcp/rich.js +362 -0
- package/dist/permissions/modes.d.ts +72 -0
- package/dist/permissions/modes.js +98 -0
- package/dist/plan/exit-plan.d.ts +25 -0
- package/dist/plan/exit-plan.js +130 -0
- package/dist/plan/state.d.ts +102 -0
- package/dist/plan/state.js +165 -0
- package/dist/plugins/host.d.ts +34 -1
- package/dist/plugins/host.js +143 -9
- package/dist/providers/settings.d.ts +15 -0
- package/dist/providers/settings.js +38 -0
- package/dist/reload.d.ts +75 -0
- package/dist/reload.js +204 -0
- package/dist/resources/context.js +6 -1
- package/dist/runtime/access.d.ts +62 -0
- package/dist/runtime/access.js +115 -0
- package/dist/runtime/blobs.d.ts +51 -0
- package/dist/runtime/blobs.js +177 -0
- package/dist/runtime/diff.d.ts +23 -0
- package/dist/runtime/diff.js +154 -0
- package/dist/runtime/ids.d.ts +8 -0
- package/dist/runtime/ids.js +32 -0
- package/dist/runtime/paths.d.ts +11 -0
- package/dist/runtime/paths.js +17 -1
- package/dist/runtime/process.d.ts +22 -0
- package/dist/runtime/process.js +100 -15
- package/dist/runtime/sqlite.d.ts +2 -0
- package/dist/runtime/sqlite.js +18 -0
- package/dist/runtime/store.d.ts +91 -3
- package/dist/runtime/store.js +465 -11
- package/dist/runtime/zip.d.ts +24 -0
- package/dist/runtime/zip.js +126 -0
- package/dist/sessions/children.js +17 -1
- package/dist/sessions/side-questions.d.ts +57 -0
- package/dist/sessions/side-questions.js +161 -0
- package/dist/tools/analysis.d.ts +37 -0
- package/dist/tools/analysis.js +573 -0
- package/dist/tools/artifacts.d.ts +14 -0
- package/dist/tools/artifacts.js +143 -0
- package/dist/tools/background.d.ts +7 -0
- package/dist/tools/background.js +165 -0
- package/dist/tools/data.d.ts +7 -0
- package/dist/tools/data.js +160 -0
- package/dist/tools/execute.d.ts +5 -0
- package/dist/tools/execute.js +15 -3
- package/dist/tools/goal.d.ts +19 -0
- package/dist/tools/goal.js +126 -0
- package/dist/tools/search.d.ts +17 -3
- package/dist/tools/search.js +153 -0
- package/dist/tools/standard.d.ts +4 -1
- package/dist/tools/standard.js +99 -18
- package/dist/version.d.ts +5 -3
- package/dist/version.js +35 -6
- package/package.json +2 -2
package/dist/application.d.ts
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import type { AvailableProviderModel, ModelInfo, ModelProvider, Plugin, PluginCategory, ProviderConfigurationValue, ResolvedProviderModel, RunEvent } from "@alisio/sdk";
|
|
2
|
+
import { AgentDefinitionService } from "./agents/service.ts";
|
|
3
|
+
import { CapabilityGrants } from "./analysis/capabilities.ts";
|
|
4
|
+
import { DatasetService } from "./analysis/data/datasets.ts";
|
|
5
|
+
import { AnalysisJanitor } from "./analysis/janitor.ts";
|
|
6
|
+
import { AnalysisJobs } from "./analysis/jobs.ts";
|
|
7
|
+
import { OciRuntime } from "./analysis/oci.ts";
|
|
8
|
+
import { AnalysisRerun } from "./analysis/rerun.ts";
|
|
9
|
+
import { AnalysisRuntimeManager } from "./analysis/runtime-manager.ts";
|
|
10
|
+
import { ArtifactStore } from "./artifacts/store.ts";
|
|
11
|
+
import type { NotifierTiming, TaskWake } from "./background/notify.ts";
|
|
12
|
+
import { BackgroundTasks } from "./background/service.ts";
|
|
2
13
|
import { type SettableSettingKey } from "./config.ts";
|
|
3
14
|
import type { ApprovalHandler } from "./core/contracts.ts";
|
|
4
15
|
import { ToolRegistry } from "./core/registry.ts";
|
|
5
16
|
import { AgentRunner } from "./core/runner.ts";
|
|
17
|
+
import { GoalService } from "./goal/service.ts";
|
|
6
18
|
import { HerdrBridge } from "./integrations/herdr.ts";
|
|
7
19
|
import { McpConnector } from "./mcp/connector.ts";
|
|
8
20
|
import { PluginHost } from "./plugins/host.ts";
|
|
@@ -10,7 +22,10 @@ import { ActiveProvider, ProviderRegistry } from "./providers/registry.ts";
|
|
|
10
22
|
import { ProviderSettingsStore } from "./providers/settings.ts";
|
|
11
23
|
import { ProjectContext } from "./resources/context.ts";
|
|
12
24
|
import { Skills } from "./resources/skills.ts";
|
|
25
|
+
import { type ExternalDirectoryHandler, PathAccess } from "./runtime/access.ts";
|
|
26
|
+
import { BlobStore } from "./runtime/blobs.ts";
|
|
13
27
|
import { SQLiteStore } from "./runtime/store.ts";
|
|
28
|
+
import { SideQuestions } from "./sessions/side-questions.ts";
|
|
14
29
|
export interface AppOptions {
|
|
15
30
|
cwd?: string;
|
|
16
31
|
config?: string;
|
|
@@ -23,6 +38,8 @@ export interface AppOptions {
|
|
|
23
38
|
allowMcp?: boolean;
|
|
24
39
|
readOnly?: boolean;
|
|
25
40
|
allowAgents?: boolean;
|
|
41
|
+
/** Extra directories the tools may touch outside the workspace (per-run `--add-dir`). */
|
|
42
|
+
addDirs?: string[];
|
|
26
43
|
noHerdr?: boolean;
|
|
27
44
|
model?: string;
|
|
28
45
|
baseURL?: string;
|
|
@@ -45,6 +62,50 @@ export interface AppOptions {
|
|
|
45
62
|
disablePlugins?: string[];
|
|
46
63
|
/** Interactive approval for write/process tools; ignored in read-only mode. */
|
|
47
64
|
approve?: ApprovalHandler;
|
|
65
|
+
/** Pre-allow the `analysis.run` capability only (`--allow-analysis`); `--read-only` wins. */
|
|
66
|
+
allowAnalysis?: boolean;
|
|
67
|
+
/** `--python <path>`: the interpreter for `python_run` (no discovery). */
|
|
68
|
+
python?: string;
|
|
69
|
+
/** Embedders and tests: a ready Python runtime manager instead of the default one. */
|
|
70
|
+
analysisRuntime?: AnalysisRuntimeManager;
|
|
71
|
+
/** Embedders and tests: replaces the container engine collaborators (a fake CLI). */
|
|
72
|
+
analysisOci?: Partial<import("./analysis/oci.ts").OciDeps>;
|
|
73
|
+
/** Delay before the first background retention sweep (default 30 s; tests use a short one). */
|
|
74
|
+
analysisSweepDelayMs?: number;
|
|
75
|
+
/** Recorded as the source of interactive capability decisions (default `tui`). */
|
|
76
|
+
approvalSource?: "tui" | "web";
|
|
77
|
+
/**
|
|
78
|
+
* Interactive approval for a tool path outside the workspace and every declared extra root,
|
|
79
|
+
* scoped to the containing directory (allow once / session / deny); ignored in read-only mode.
|
|
80
|
+
*/
|
|
81
|
+
approveExternalDirectory?: ExternalDirectoryHandler;
|
|
82
|
+
/** Host hooks of the goal runtime (`/goal`). */
|
|
83
|
+
goals?: {
|
|
84
|
+
/** The goal of a session changed or was removed (`undefined`): UIs refresh. */
|
|
85
|
+
onChange?: (sessionId: string, goal: import("./goal/machine.ts").GoalRecord | undefined) => void;
|
|
86
|
+
/** A breaker observation (counts only). */
|
|
87
|
+
onLog?: (sessionId: string, log: import("./goal/machine.ts").GoalLog) => void;
|
|
88
|
+
/** Pause goals whose driving process is gone at startup (default true; tests turn it off). */
|
|
89
|
+
recover?: boolean;
|
|
90
|
+
};
|
|
91
|
+
/** Host hooks of the background-task runtime (`bg_run`). */
|
|
92
|
+
tasks?: {
|
|
93
|
+
/**
|
|
94
|
+
* Starts a run that tells the owner agent about finished tasks. Absent in headless hosts:
|
|
95
|
+
* no wake-up is ever sent (the tools say so).
|
|
96
|
+
*/
|
|
97
|
+
wake?: TaskWake;
|
|
98
|
+
/** A task appeared or changed state (the server turns it into a `tasks_changed` frame). */
|
|
99
|
+
onChange?: (task: import("@alisio/sdk").BackgroundTaskInfo, rootSession: string) => void;
|
|
100
|
+
/** Notification timing (tests). */
|
|
101
|
+
timing?: Partial<NotifierTiming>;
|
|
102
|
+
/** Delay before the first retention sweep (default 30 s; tests use a short one). */
|
|
103
|
+
sweepDelayMs?: number;
|
|
104
|
+
/** Live tasks allowed across this process (default 16). */
|
|
105
|
+
maxPerProcess?: number;
|
|
106
|
+
/** SIGTERM → SIGKILL grace of a stop (default 3 s; tests use a short one). */
|
|
107
|
+
killGraceMs?: number;
|
|
108
|
+
};
|
|
48
109
|
}
|
|
49
110
|
export interface BuiltinContext {
|
|
50
111
|
workspace: string;
|
|
@@ -95,6 +156,7 @@ export declare function enabledBuiltins(available: BuiltinPlugin[], config: Reco
|
|
|
95
156
|
} & Record<string, unknown>>, disabled?: string[]): BuiltinPlugin[];
|
|
96
157
|
export declare function createApplication(options?: AppOptions): Promise<{
|
|
97
158
|
workspace: string;
|
|
159
|
+
pathAccess: PathAccess;
|
|
98
160
|
config: import("./config.ts").LoadedConfig;
|
|
99
161
|
prompts: {
|
|
100
162
|
templates: Map<string, import("./index.ts").PromptTemplate>;
|
|
@@ -108,6 +170,33 @@ export declare function createApplication(options?: AppOptions): Promise<{
|
|
|
108
170
|
template: import("./index.ts").PromptTemplate;
|
|
109
171
|
} | undefined;
|
|
110
172
|
store: SQLiteStore;
|
|
173
|
+
/** Uploaded attachment bytes; resolve a `BlobRef` with `blobs.attachment(ref)` before a run. */
|
|
174
|
+
blobs: BlobStore;
|
|
175
|
+
/** Published artifacts of every session (folders under `<state>/artifacts`). */
|
|
176
|
+
artifacts: ArtifactStore;
|
|
177
|
+
/** Persisted capability grants (`analysis.run`) and their audit rows. */
|
|
178
|
+
capabilityGrants: CapabilityGrants;
|
|
179
|
+
/** Background tasks (`bg_*` tools, `/tasks` panels): admission, state, output, stop. */
|
|
180
|
+
tasks: BackgroundTasks;
|
|
181
|
+
/** Session goals (`/goal`): state, user actions, the continuation controller. */
|
|
182
|
+
goals: GoalService;
|
|
183
|
+
/** Python discovery and job folders of `python_run`; `enabled` is false under --read-only. */
|
|
184
|
+
analysis: {
|
|
185
|
+
enabled: boolean;
|
|
186
|
+
runtime: AnalysisRuntimeManager;
|
|
187
|
+
jobs: AnalysisJobs;
|
|
188
|
+
/** Container runtime of the current configuration (status, pull); mode `managed` ignores it. */
|
|
189
|
+
oci: {
|
|
190
|
+
mode: () => "managed" | "oci";
|
|
191
|
+
runtime: () => OciRuntime;
|
|
192
|
+
};
|
|
193
|
+
rerun: AnalysisRerun;
|
|
194
|
+
janitor: AnalysisJanitor;
|
|
195
|
+
};
|
|
196
|
+
/** Keys a project layer set that only the user layer decides (ignored on load). */
|
|
197
|
+
configDiagnostics: string[];
|
|
198
|
+
/** Tabular datasets of every session (ingestion, read-only queries, pages). */
|
|
199
|
+
datasets: DatasetService;
|
|
111
200
|
registry: ToolRegistry;
|
|
112
201
|
context: ProjectContext;
|
|
113
202
|
skills: Skills;
|
|
@@ -150,13 +239,16 @@ export declare function createApplication(options?: AppOptions): Promise<{
|
|
|
150
239
|
* (only when runtime permission was granted). Never includes credentials or command paths.
|
|
151
240
|
*/
|
|
152
241
|
mcpStartupFailures(): string[];
|
|
153
|
-
/**
|
|
242
|
+
/**
|
|
243
|
+
* Host-owned interactive consent boundary: the TUI and the web UI (`alisio serve`, after an
|
|
244
|
+
* explicit confirmation dialog) may grant. Headless callers remain blocked unless flagged.
|
|
245
|
+
*/
|
|
154
246
|
grantMcpRuntimePermission(request: {
|
|
155
|
-
source: "interactive-tui";
|
|
247
|
+
source: "interactive-tui" | "interactive-web";
|
|
156
248
|
confirmed: boolean;
|
|
157
249
|
}): "granted" | "not-granted" | "read-only";
|
|
158
250
|
/** Persist global consent atomically, then grant runtime permission for this process. */
|
|
159
|
-
rememberGlobalMcpConsent(): Promise<void>;
|
|
251
|
+
rememberGlobalMcpConsent(source?: "interactive-tui" | "interactive-web"): Promise<void>;
|
|
160
252
|
/**
|
|
161
253
|
* Clear the persisted global consent atomically and drop the runtime permission (disconnecting
|
|
162
254
|
* servers as cleanup does). An explicit this-run `--allow-mcp` flag keeps the grant alive.
|
|
@@ -171,6 +263,8 @@ export declare function createApplication(options?: AppOptions): Promise<{
|
|
|
171
263
|
* (next instructions load), `websearch.provider` mutates the shared config object the search
|
|
172
264
|
* chain reads per call, `pluginHooks.timeoutMs` lands in the plugin host (next hook call),
|
|
173
265
|
* and `tui.*` is persisted for the host to apply. Nothing in this set requires a restart.
|
|
266
|
+
* `agents.*` (active agent id and reasoning effort) is persisted for the TUI to consume:
|
|
267
|
+
* the next `/agents`/`/effort` selection and the next prompt already read the live config.
|
|
174
268
|
* `mcp.allow` is deliberately not routed here: it flows through
|
|
175
269
|
* `rememberGlobalMcpConsent`/`revokeGlobalMcpConsent` instead.
|
|
176
270
|
* Throws under `--read-only`. Returns the written config file.
|
|
@@ -192,6 +286,14 @@ export declare function createApplication(options?: AppOptions): Promise<{
|
|
|
192
286
|
profileName: undefined;
|
|
193
287
|
} | undefined;
|
|
194
288
|
runner: AgentRunner;
|
|
289
|
+
/** `/btw` side questions: tool-less answers about a session outside its conversation. */
|
|
290
|
+
sideQuestions: SideQuestions;
|
|
291
|
+
/**
|
|
292
|
+
* User agent files (`<workspace>/.agents/agents`, `~/.agents/agents`). Every write asks the
|
|
293
|
+
* subagents plugin (the runtime agent registry) to rediscover through its `/agents reload`
|
|
294
|
+
* verb and reports whether the saved file is loaded; without the plugin nothing reloads.
|
|
295
|
+
*/
|
|
296
|
+
agentDefinitions: AgentDefinitionService;
|
|
195
297
|
herdr: HerdrBridge;
|
|
196
298
|
contextWindow: (model: string) => number | undefined;
|
|
197
299
|
/** Effective context budget + compaction point shared by the runner and the TUI bar. */
|