@buildaharness/aielia 0.3.8 → 0.3.9

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.
Files changed (41) hide show
  1. package/README.md +6 -3
  2. package/dist/action-approval-service.d.ts +2 -0
  3. package/dist/ask-draft.d.ts +22 -0
  4. package/dist/assistant-options.d.ts +35 -0
  5. package/dist/assistant-session.d.ts +1 -1
  6. package/dist/{bin-DETwedpj.js → bin-CCwDFxDe.js} +118 -247
  7. package/dist/bin-CCwDFxDe.js.map +1 -0
  8. package/dist/cli-config.d.ts +2 -2
  9. package/dist/cli-session.d.ts +2 -1
  10. package/dist/cli.d.ts +2 -0
  11. package/dist/cli.js +1 -1
  12. package/dist/commands.d.ts +32 -0
  13. package/dist/config-keys.d.ts +43 -0
  14. package/dist/doctor-checks.d.ts +1 -2
  15. package/dist/fact-extraction.d.ts +4 -0
  16. package/dist/goal-graph-store.d.ts +6 -0
  17. package/dist/index.d.ts +17 -2
  18. package/dist/index.js +199 -148
  19. package/dist/index.js.map +1 -1
  20. package/dist/llm-client-factory.d.ts +13 -0
  21. package/dist/memory-service.d.ts +2 -0
  22. package/dist/model-pricing.d.ts +12 -9
  23. package/dist/node-display-names.d.ts +1 -1
  24. package/dist/project-command.d.ts +16 -0
  25. package/dist/{provider-setup-wX2IBw2X.js → provider-setup-Cy9dwqrd.js} +13504 -13034
  26. package/dist/provider-setup-Cy9dwqrd.js.map +1 -0
  27. package/dist/proxy-health.d.ts +8 -0
  28. package/dist/redact-url.d.ts +2 -0
  29. package/dist/reply-audit.d.ts +2 -0
  30. package/dist/response-service.d.ts +10 -0
  31. package/dist/run-explain.d.ts +58 -0
  32. package/dist/{tui-app-CcxiwZyM.js → tui-app-Dt72u8vZ.js} +3 -3
  33. package/dist/{tui-app-CcxiwZyM.js.map → tui-app-Dt72u8vZ.js.map} +1 -1
  34. package/dist/turn-cost.d.ts +12 -0
  35. package/dist/turn-presentation.d.ts +86 -0
  36. package/dist/undo-action-command.d.ts +12 -0
  37. package/dist/undo-plan.d.ts +13 -0
  38. package/dist/version.d.ts +1 -1
  39. package/package.json +1 -1
  40. package/dist/bin-DETwedpj.js.map +0 -1
  41. package/dist/provider-setup-wX2IBw2X.js.map +0 -1
package/README.md CHANGED
@@ -670,8 +670,10 @@ Set `ASSISTANT_ENABLE_WEB=1` (plus `BRAVE_SEARCH_API_KEY`) to give the model
670
670
  real `web_search`/`fetch_url` tools (no approval needed — see "Web access via
671
671
  tools" above) and `ASSISTANT_ENABLE_SHELL=1` to give it a real, approval-gated
672
672
  `run_shell_command` tool scoped to `ASSISTANT_WORKSPACE_DIR`. Both are off by
673
- default; `ASSISTANT_ENABLE_SHELL` must be exactly `"1"` (a stray
674
- `ASSISTANT_ENABLE_SHELL=0` left in an env file does not enable it). Optional
673
+ default. Every on/off variable (`ASSISTANT_ENABLE_WEB`, `ASSISTANT_ENABLE_SHELL`,
674
+ `ASSISTANT_ENABLE_EMAIL`, `ASSISTANT_DANGEROUSLY_SKIP_PERMISSIONS`) takes `1` or `true` for on and `0` or
675
+ `false` for off; any other value (`yes`, `True`) is treated as off, with a warning that names the variable
676
+ (a stray `ASSISTANT_ENABLE_SHELL=0` left in an env file does not enable it). Optional
675
677
  `ASSISTANT_SHELL_TIMEOUT_MS` (default 30000) tunes the shell timeout:
676
678
 
677
679
  ```bash
@@ -944,9 +946,10 @@ ends the session.
944
946
  | `/model [name]` | Show the active model, or switch it — a thin alias over `/config set model <name>` (see "Configuration" above); rejected the same way if `model` is pinned by `ASSISTANT_MODEL` |
945
947
  | `/cost` | Show token usage for the last turn and the running session total |
946
948
  | `/doctor` | Check proxy reachability (proxy backend) or the `claude` binary (claude-cli backend), plus workspace root and data dir health — no dedicated check yet for the anthropic/openai/openrouter backends, only the backend-agnostic checks run for those |
947
- | `/why` | Explain the harness path the last turn took (verification confidence + node sequence) |
949
+ | `/why` | Explain the last turn: confidence, whether the reply was checked against what was read, the layers that fired, and what memory the prompt held. The chat app (web and desktop) answers the same command with the same lines |
948
950
  | `/layers` | Show all 11 harness layers: fired or skipped, and why, for the last turn. `/layers settings` lists the reasoning layers with their cost/evidence; `/layers on\|off\|reset <id>` changes a layer's persisted on/off choice (an operator-set `AUDIT_*` env flag wins and shows as pinned) |
949
951
  | `/sources` | List files/URLs the last turn actually consulted |
952
+ | `/steps` | List the tool calls the last turn made, in order |
950
953
  | `/plan` | Show the active structured plan's task status |
951
954
  | `/plan sketch <request>` | One-shot, advisory plan sketch: no plan record, nothing staged, cannot execute |
952
955
  | `/goals` | Review every known goal thread this session: status, tasks and visibility (freshly computed, carried over, done, suggested) |
@@ -51,6 +51,8 @@ export declare class ActionApprovalService {
51
51
  }[];
52
52
  /** Sessions in which a command got the network-containment refusal. */
53
53
  private readonly networkDeniedSessions;
54
+ /** Per session: where in appliedActions the actions of the request now being approved begin (see resolvePendingActionOnce). */
55
+ private readonly chainStartBySession;
54
56
  /** Pending-action ids currently being resolved (see resolvePendingAction). */
55
57
  private readonly inFlightResolutions;
56
58
  networkDenied(sessionId: string): boolean;
@@ -0,0 +1,22 @@
1
+ import { AskAnswer, AskQuestion, AskQuestionOption } from '@buildaharness/harness';
2
+ /**
3
+ * One question's in-progress answer, shared by the CLI's text prompt and AskQuestionCard.tsx. Kept
4
+ * separate from AskAnswer itself so a user can flip between picking an option and typing free text
5
+ * without losing whichever they touched last; draftToAnswer collapses it to the wire shape.
6
+ */
7
+ export interface QuestionDraft {
8
+ selectedLabels: string[];
9
+ editText: string;
10
+ freeText: string;
11
+ /**
12
+ * Only the card sets this: it hides the note field without clearing the text, so `false` means "ignore
13
+ * editText". Left unset (the CLI, which only fills editText through its explicit `e<n>` command), a
14
+ * non-empty editText counts.
15
+ */
16
+ showEdit?: boolean;
17
+ }
18
+ export declare function emptyDraft(): QuestionDraft;
19
+ /** Recommended option(s) first, stable otherwise, so the same question lists its options in the same order on every surface. */
20
+ export declare function orderedOptions(question: AskQuestion): AskQuestionOption[];
21
+ /** Collapses one question's draft into the wire AskAnswer shape, or null while still unanswered (INV-28). */
22
+ export declare function draftToAnswer(questionId: string, draft: QuestionDraft): AskAnswer | null;
@@ -0,0 +1,35 @@
1
+ import { PersonalAssistantOptions } from './assistant.js';
2
+ import { AssistantConfig } from './config.js';
3
+ /** Which of the config-derived options a surface passes at all. A surface that leaves one off gets PersonalAssistant's default for it. */
4
+ export interface AssistantFeatures {
5
+ spendCap: boolean;
6
+ ambiguityGuard: boolean;
7
+ /** Passes `config.activeProject`, falling back to `platform.workspaceRoot`. */
8
+ activeProject: boolean;
9
+ consolidateOnNewSession: boolean;
10
+ }
11
+ /** What only the surface can supply: its LLM client, storage, tools and logging, plus which optional features it enables. */
12
+ export interface AssistantPlatform {
13
+ llmClient: NonNullable<PersonalAssistantOptions['llmClient']>;
14
+ memory?: PersonalAssistantOptions['memory'];
15
+ experienceStore?: PersonalAssistantOptions['experienceStore'];
16
+ checkpointStore?: PersonalAssistantOptions['checkpointStore'];
17
+ reminderStore?: PersonalAssistantOptions['reminderStore'];
18
+ fileTools?: PersonalAssistantOptions['fileTools'];
19
+ shellTools?: PersonalAssistantOptions['shellTools'];
20
+ webTools?: PersonalAssistantOptions['webTools'];
21
+ actionTools?: PersonalAssistantOptions['actionTools'];
22
+ onDebugLog?: PersonalAssistantOptions['onDebugLog'];
23
+ /** Default project when `config.activeProject` is unset (only used when `features.activeProject`). */
24
+ workspaceRoot?: string;
25
+ features: AssistantFeatures;
26
+ }
27
+ /** What each surface enables. The parity test snapshots the keys each preset passes. */
28
+ export declare const CLI_FEATURES: AssistantFeatures;
29
+ export declare const DESKTOP_FEATURES: AssistantFeatures;
30
+ export declare const WEB_FEATURES: AssistantFeatures;
31
+ /**
32
+ * The PersonalAssistant.create options derived from AssistantConfig, built once for every surface. Keys a
33
+ * surface leaves unset are omitted rather than passed as undefined, so PersonalAssistant's defaults apply.
34
+ */
35
+ export declare function buildAssistantOptions(config: AssistantConfig, platform: AssistantPlatform): PersonalAssistantOptions;
@@ -93,7 +93,7 @@ export declare class AssistantSession {
93
93
  }>;
94
94
  /**
95
95
  * Called once per successfully completed ('ok') turn — counts turns, not raw internal LLM
96
- * calls (see SpendCapConfig's doc comment for why). Estimates cost the same way cli.ts's
96
+ * calls (see SpendCapConfig's doc comment for why). Estimates cost the same way turn-cost.ts's
97
97
  * withCostEstimate does for a backend that doesn't report a real costUsd, so the cap enforces
98
98
  * against the same number /cost displays, not a second cost model.
99
99
  *