@buildaharness/aielia 0.3.8 → 0.3.10

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 (103) hide show
  1. package/README.md +6 -3
  2. package/dist/_memory-core-generated.d.ts +6 -0
  3. package/dist/action-approval-service.d.ts +2 -0
  4. package/dist/ask-draft.d.ts +22 -0
  5. package/dist/assistant-options.d.ts +35 -0
  6. package/dist/assistant-session.d.ts +1 -1
  7. package/dist/assistant.d.ts +11 -0
  8. package/dist/{bin-DETwedpj.js → bin-Cz3FY6Ew.js} +144 -254
  9. package/dist/bin-Cz3FY6Ew.js.map +1 -0
  10. package/dist/claude-cli-llm-client.d.ts +2 -0
  11. package/dist/claude-cli-prompt.d.ts +7 -0
  12. package/dist/cli-config.d.ts +2 -2
  13. package/dist/cli-session.d.ts +2 -1
  14. package/dist/cli.d.ts +2 -0
  15. package/dist/cli.js +1 -1
  16. package/dist/commands.d.ts +32 -0
  17. package/dist/config-keys.d.ts +43 -0
  18. package/dist/doctor-checks.d.ts +1 -2
  19. package/dist/fact-extraction.d.ts +4 -0
  20. package/dist/fact-repository.contract.d.ts +2 -0
  21. package/dist/fact-repository.d.ts +44 -0
  22. package/dist/file-tools-mcp-server.mjs +29 -0
  23. package/dist/goal-graph-store.d.ts +6 -0
  24. package/dist/harness-bridge.d.ts +5 -5
  25. package/dist/html-to-markdown.d.ts +11 -0
  26. package/dist/index.d.ts +98 -3
  27. package/dist/index.js +5003 -150
  28. package/dist/index.js.map +1 -1
  29. package/dist/layer-settings.d.ts +16 -3
  30. package/dist/llm-client-factory.d.ts +13 -0
  31. package/dist/memory-events.d.ts +177 -0
  32. package/dist/memory-service.d.ts +17 -0
  33. package/dist/model-pricing.d.ts +15 -9
  34. package/dist/node-display-names.d.ts +1 -1
  35. package/dist/project-command.d.ts +16 -0
  36. package/dist/{provider-setup-wX2IBw2X.js → provider-setup-DG8iYm_F.js} +14471 -13032
  37. package/dist/provider-setup-DG8iYm_F.js.map +1 -0
  38. package/dist/proxy-health.d.ts +8 -0
  39. package/dist/redact-url.d.ts +2 -0
  40. package/dist/reply-audit.d.ts +2 -0
  41. package/dist/response-service.d.ts +10 -0
  42. package/dist/run-explain.d.ts +58 -0
  43. package/dist/scripted-llm-client.d.ts +1 -1
  44. package/dist/{tui-app-CcxiwZyM.js → tui-app-oWbIUcBW.js} +3 -3
  45. package/dist/{tui-app-CcxiwZyM.js.map → tui-app-oWbIUcBW.js.map} +1 -1
  46. package/dist/turn-abort.d.ts +5 -0
  47. package/dist/turn-cost.d.ts +12 -0
  48. package/dist/turn-presentation.d.ts +86 -0
  49. package/dist/undo-action-command.d.ts +12 -0
  50. package/dist/undo-plan.d.ts +13 -0
  51. package/dist/version.d.ts +1 -1
  52. package/dist/web-fetch-core.d.ts +0 -14
  53. package/dist/writer/article-autosave.d.ts +12 -0
  54. package/dist/writer/article-change-summary.d.ts +28 -0
  55. package/dist/writer/article-claims.d.ts +49 -0
  56. package/dist/writer/article-comments.d.ts +20 -0
  57. package/dist/writer/article-consistency.d.ts +27 -0
  58. package/dist/writer/article-decorations.d.ts +23 -0
  59. package/dist/writer/article-dependencies.d.ts +44 -0
  60. package/dist/writer/article-draft.d.ts +23 -0
  61. package/dist/writer/article-edit-outline.d.ts +16 -0
  62. package/dist/writer/article-edit-suggest.d.ts +30 -0
  63. package/dist/writer/article-folder.d.ts +29 -0
  64. package/dist/writer/article-history.d.ts +73 -0
  65. package/dist/writer/article-ideas.d.ts +34 -0
  66. package/dist/writer/article-issues.d.ts +47 -0
  67. package/dist/writer/article-marks.d.ts +25 -0
  68. package/dist/writer/article-memory-store.d.ts +3 -0
  69. package/dist/writer/article-model.d.ts +1337 -0
  70. package/dist/writer/article-outline.d.ts +43 -0
  71. package/dist/writer/article-resolver.d.ts +55 -0
  72. package/dist/writer/article-revisions.d.ts +30 -0
  73. package/dist/writer/article-rules.d.ts +60 -0
  74. package/dist/writer/article-sections.d.ts +26 -0
  75. package/dist/writer/article-selection.d.ts +26 -0
  76. package/dist/writer/article-service.d.ts +542 -0
  77. package/dist/writer/article-source-links.d.ts +42 -0
  78. package/dist/writer/article-sources.d.ts +82 -0
  79. package/dist/writer/article-style-derive.d.ts +26 -0
  80. package/dist/writer/article-style.d.ts +31 -0
  81. package/dist/writer/article-suggestions.d.ts +33 -0
  82. package/dist/writer/article-support.d.ts +33 -0
  83. package/dist/writer/article-verify.d.ts +42 -0
  84. package/dist/writer/local-folder.d.ts +49 -0
  85. package/dist/writer/model-failure-hint.d.ts +7 -0
  86. package/dist/writer/repo-reader.d.ts +29 -0
  87. package/dist/writer/repo-search.d.ts +33 -0
  88. package/dist/writer/repo-verify-loop.d.ts +61 -0
  89. package/dist/writer/text-tool-calls.d.ts +11 -0
  90. package/dist/writer/work-progress.d.ts +51 -0
  91. package/dist/writer/write-activity.d.ts +61 -0
  92. package/dist/writer/write-models.d.ts +12 -0
  93. package/dist/writer/write-parameters.d.ts +31 -0
  94. package/dist/writer/write-permissions.d.ts +89 -0
  95. package/dist/writer/write-spend.d.ts +16 -0
  96. package/dist/writer/writer-chat-capture.d.ts +25 -0
  97. package/dist/writer/writer-chat-history.d.ts +17 -0
  98. package/dist/writer/writer-chat-state.d.ts +358 -0
  99. package/dist/writer/writer-chat-turn.d.ts +52 -0
  100. package/dist/writer/writer-intent.d.ts +20 -0
  101. package/package.json +3 -3
  102. package/dist/bin-DETwedpj.js.map +0 -1
  103. package/dist/provider-setup-wX2IBw2X.js.map +0 -1
@@ -0,0 +1,8 @@
1
+ import { DoctorCheck } from './cli-session.js';
2
+ /**
3
+ * GET <proxyUrl>/health, expecting {status:'ok'} (see packages/proxy/src/index.ts), hard-timed so a dead proxy
4
+ * cannot hang /doctor or Settings. Shared by the CLI's /doctor and the apps' Settings diagnostics. Credentials in
5
+ * the URL (user:password, query values) are masked in the label. Only fetch and AbortController, so it is
6
+ * browser-safe; the desktop app can pass Tauri's fetch.
7
+ */
8
+ export declare function checkProxyHealth(proxyUrl: string, fetchImpl?: typeof fetch): Promise<DoctorCheck>;
@@ -0,0 +1,2 @@
1
+ /** A URL with any user:password, and every query-string value, masked, so a credential embedded in proxyUrl is never printed. Text that is not a URL is returned unchanged. */
2
+ export declare function redactUrlCredentials(text: string): string;
@@ -59,6 +59,8 @@ export declare function replyAuditNotice(audit: ReplyAudit, actions: string[]):
59
59
  * turns it off. Same shape as `semanticGroundingEnabled()`.
60
60
  */
61
61
  export declare function replyAuditEnabled(env?: Record<string, string | undefined>): boolean;
62
+ /** Every automatic retry message starts with this; it is the system talking to the model, never something the user said. */
63
+ export declare const AUDIT_NUDGE_PREFIX = "[automatic reply check]";
62
64
  /**
63
65
  * The message for the one automatic retry, or undefined when the reply needs none. A claim or promise of work the system
64
66
  * did not record asks for the work to be done now or the claim withdrawn; details that disagree with the command output
@@ -41,6 +41,16 @@ export declare class ResponseService {
41
41
  * thread, not be silently dropped). A no-op when `memory` wasn't wired in, or the caller never
42
42
  * resolved a `threadId` — exactly today's behavior either way (INV-43).
43
43
  */
44
+ /** Public entry for the tool-level approval path (a staged write/command pauses the turn before any result builder runs): records the tasks on the goal thread so Goals shows them. */
45
+ syncGoalThread(sessionId: string, threadId: string | undefined, tasks: {
46
+ id: string;
47
+ status: string;
48
+ description?: string;
49
+ depends_on?: string[];
50
+ risk_level?: string;
51
+ }[], onUsage?: (usage: TokenUsage) => void): Promise<void>;
52
+ /** Marks every counted task of `threadId` COMPLETE (the staged actions it was waiting on were approved and applied); a thread whose tasks all finish moves to DONE. */
53
+ completeGoalThread(sessionId: string, threadId: string | undefined, onUsage?: (usage: TokenUsage) => void): Promise<void>;
44
54
  private syncGoalThreadEvidence;
45
55
  buildTrivialResult(params: {
46
56
  sessionId: string;
@@ -0,0 +1,58 @@
1
+ import { AssistantTrace, AssistantSource, AssistantTurnResult } from './assistant.js';
2
+ import { AnswerClaim } from './answer-claim.js';
3
+ import { MemoryInjection } from './memory-service.js';
4
+ import { AssistantToolStep } from './tool-step.js';
5
+ import { GoalGraphState } from './goal-graph-service.js';
6
+ /**
7
+ * The one place that explains a finished turn ("why", "layers", "sources", "steps", "plan").
8
+ * The CLI prints these lines and chat-ui shows the same lines in a panel, so what the user is told
9
+ * about a turn cannot drift between surfaces. Everything here is a pure function of data the turn
10
+ * already produced — no I/O, no UI.
11
+ */
12
+ /** What a surface remembers about the last turn. All fields are optional: a staged, declined or fast-path turn has no trace. */
13
+ export interface TurnExplainInput {
14
+ trace?: AssistantTrace;
15
+ /** True when the turn skipped the harness entirely (a self-contained trivial question). */
16
+ harnessSkipped?: boolean;
17
+ /** Why there is no trace, when the surface knows a more specific reason than the generic one. */
18
+ noTraceReason?: string;
19
+ answerClaim?: AnswerClaim;
20
+ memoryInjection?: MemoryInjection;
21
+ sources?: AssistantSource[];
22
+ toolSteps?: AssistantToolStep[];
23
+ planStatus?: AssistantTurnResult['planStatus'];
24
+ /** The session's goal threads. When there is no drafted plan but threads have tasks, /plan says the request was worked as tracked goal tasks instead of "No active plan". */
25
+ goalGraph?: GoalGraphState;
26
+ }
27
+ export declare const FAST_PATH_REASON = "No harness trace \u2014 the last turn was a simple, self-contained question answered directly without activating the harness (fast path).";
28
+ export declare const GENERIC_NO_TRACE_REASON = "No harness trace for the last turn (nothing to explain yet, or it took the fast path).";
29
+ export declare const NO_SOURCES_TEXT = "No sources for the last turn (it used no file/web tool calls).";
30
+ export declare const NO_STEPS_TEXT = "No tool steps for the last turn.";
31
+ export declare const NO_PLAN_TEXT = "No active plan for this session.";
32
+ export declare const NO_DRAFTED_PLAN_BUT_GOAL_TASKS_TEXT = "No drafted plan for this session. The request was worked as tracked goal tasks (/goals):";
33
+ /** Slash commands that open the explanations. Shared so the CLI's dispatch table and chat-ui's composer recognise the same words. */
34
+ export declare const EXPLAIN_COMMANDS: readonly ["/why", "/layers", "/sources", "/steps", "/plan"];
35
+ export type ExplainCommand = (typeof EXPLAIN_COMMANDS)[number];
36
+ export declare function verificationHealthLabel({ strength, feasibility }: AssistantTrace['verificationHealth']): string;
37
+ /**
38
+ * Turns AnswerClaim's mechanically-derived verification_status into the "this is true" vs "I found X
39
+ * but couldn't independently verify it" text. One pure function so a future change can't silently
40
+ * collapse the four branches back into one generic phrasing.
41
+ */
42
+ export declare function answerClaimLabel(claim: AnswerClaim): string;
43
+ type BatchBudget = NonNullable<AssistantTrace['batchBudget']>;
44
+ /** One-line found / not found / truncated tally for a batch-research turn (absent on every other turn). */
45
+ export declare function batchBudgetSummaryLine(batchBudget: BatchBudget): string;
46
+ /** `/why` — confidence, whether the reply was checked against what was read, the layers that fired (in order), and what memory the prompt held. */
47
+ export declare function explainWhy(input: TurnExplainInput): string[];
48
+ /** `/layers` — every one of the 11 layers: fired or not, and why; plus the per-item batch breakdown on a batch turn. */
49
+ export declare function explainLayers(input: TurnExplainInput): string[];
50
+ /** `/sources` — the files and URLs the turn consulted, each once. */
51
+ export declare function explainSources(input: TurnExplainInput): string[];
52
+ /** `/steps` — the tool calls the turn made, in order. */
53
+ export declare function explainSteps(input: TurnExplainInput): string[];
54
+ /** `/plan` — the active plan's task checklist. */
55
+ export declare function explainPlan(input: TurnExplainInput): string[];
56
+ /** Dispatches a bare slash command to its explainer; undefined for anything else (including `/plan graph` and other arguments, which are not explanations). */
57
+ export declare function explainCommand(message: string, input: TurnExplainInput): string[] | undefined;
58
+ export {};
@@ -51,7 +51,7 @@ export interface ScriptedLLMClientScript {
51
51
  /**
52
52
  * Known auxiliary semantic-escalation system prompts and their safe, inert default answer — see
53
53
  * ScriptedLLMClientScript's doc comment. Kept in sync by hand with each check's own system prompt
54
- * (review-checker.ts, failure-mode-matcher.ts, trust-tagging.ts, grounding-check.ts, task-completion-check.ts, constraint-check.ts, semantic-compaction.ts, source-reliability.ts, semantic-hypotheses.ts, episodic-digest.ts, memory-consolidation.ts, memory-reviewer.ts) since there's no shared constant
54
+ * (review-checker.ts, failure-mode-matcher.ts, trust-tagging.ts, grounding-check.ts, task-completion-check.ts, constraint-check.ts, semantic-compaction.ts, source-reliability.ts, semantic-hypotheses.ts, episodic-digest.ts, memory-consolidation.ts, memory-reviewer.ts, writer/writer-chat-capture.ts) since there's no shared constant
55
55
  * to import without a circular dependency back into this package's own public surface.
56
56
  */
57
57
  export declare const SIDE_CALL_MARKERS: Array<[string, string]>;
@@ -5,9 +5,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
5
5
  import { Readable, Writable } from "node:stream";
6
6
  import { useState, useRef, useEffect, useMemo, useCallback, useSyncExternalStore } from "react";
7
7
  import { useWindowSize, usePaste, useInput, Box, Text, render, Static } from "ink";
8
- import { s as sanitizeLabel, r as renderPlan, t as toLines, a as runCli, P as PLAN_LINE_PREFIX, I as ICONS } from "./bin-DETwedpj.js";
8
+ import { s as sanitizeLabel, r as renderPlan, t as toLines, a as runCli, P as PLAN_LINE_PREFIX, I as ICONS } from "./bin-Cz3FY6Ew.js";
9
9
  import { format } from "node:util";
10
- import { o as DIFF_INDENT, bM as stripTerminalControls } from "./provider-setup-wX2IBw2X.js";
10
+ import { v as DIFF_INDENT, cW as stripTerminalControls } from "./provider-setup-DG8iYm_F.js";
11
11
  function classify(raw, stream) {
12
12
  if (raw.startsWith("\r")) {
13
13
  return { type: "progress", text: raw.replace(/\r/g, "").trimEnd() };
@@ -1057,4 +1057,4 @@ export {
1057
1057
  formatLivenessLabel,
1058
1058
  runTuiApp
1059
1059
  };
1060
- //# sourceMappingURL=tui-app-CcxiwZyM.js.map
1060
+ //# sourceMappingURL=tui-app-oWbIUcBW.js.map