@lmctl-ai/lmctl 0.2.37 → 0.2.39

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 (199) hide show
  1. package/README.md +16 -0
  2. package/THIRD_PARTY_NOTICES.md +35 -0
  3. package/bin/lmbee +2 -0
  4. package/bin/lmscript +3 -0
  5. package/build-info.json +1 -0
  6. package/dist/cli/index.js +569 -494
  7. package/dist/cli/schema.sql +0 -169
  8. package/dist/cli/script.js +273 -266
  9. package/dist/lmbee.js +960 -0
  10. package/dist/lmscript.js +388 -0
  11. package/dist/public/app.js +379 -0
  12. package/dist/public/index.html +78 -0
  13. package/dist/public/styles.css +160 -0
  14. package/dist/schema.sql +455 -0
  15. package/dist/vendor-webui/index.html +18 -0
  16. package/dist/vendor-webui/local.js +231 -0
  17. package/dist/vendor-webui/styles.css +1852 -0
  18. package/package.json +12 -7
  19. package/dist/cli/batch.d.ts +0 -2
  20. package/dist/cli/busy-evidence.d.ts +0 -27
  21. package/dist/cli/chat-cycle.d.ts +0 -59
  22. package/dist/cli/chat-exec.d.ts +0 -91
  23. package/dist/cli/chat-policy.d.ts +0 -22
  24. package/dist/cli/chat.d.ts +0 -14
  25. package/dist/cli/code-resolver.d.ts +0 -8
  26. package/dist/cli/common.d.ts +0 -57
  27. package/dist/cli/context.d.ts +0 -12
  28. package/dist/cli/cost.d.ts +0 -2
  29. package/dist/cli/export.d.ts +0 -2
  30. package/dist/cli/hello.d.ts +0 -10
  31. package/dist/cli/index.d.ts +0 -3
  32. package/dist/cli/infra.d.ts +0 -78
  33. package/dist/cli/init.d.ts +0 -21
  34. package/dist/cli/intent-input.d.ts +0 -16
  35. package/dist/cli/intent-match.d.ts +0 -30
  36. package/dist/cli/intent-sessions.d.ts +0 -24
  37. package/dist/cli/intent-team.d.ts +0 -25
  38. package/dist/cli/intent.d.ts +0 -22
  39. package/dist/cli/ls.d.ts +0 -2
  40. package/dist/cli/mailbox-cli.d.ts +0 -6
  41. package/dist/cli/managed.d.ts +0 -62
  42. package/dist/cli/mcp-install.d.ts +0 -23
  43. package/dist/cli/mcp.d.ts +0 -2
  44. package/dist/cli/model.d.ts +0 -21
  45. package/dist/cli/paths.d.ts +0 -50
  46. package/dist/cli/plan-wizard.d.ts +0 -42
  47. package/dist/cli/plan.d.ts +0 -20
  48. package/dist/cli/queue-delivery.d.ts +0 -122
  49. package/dist/cli/quickrun.d.ts +0 -14
  50. package/dist/cli/ratelimit.d.ts +0 -2
  51. package/dist/cli/remote-fetch.d.ts +0 -7
  52. package/dist/cli/run-queries.d.ts +0 -82
  53. package/dist/cli/running.d.ts +0 -5
  54. package/dist/cli/save-script.d.ts +0 -41
  55. package/dist/cli/script.d.ts +0 -6
  56. package/dist/cli/seed-flight.d.ts +0 -2
  57. package/dist/cli/self-identity.d.ts +0 -25
  58. package/dist/cli/session-idle.d.ts +0 -118
  59. package/dist/cli/status.d.ts +0 -22
  60. package/dist/cli/tail.d.ts +0 -18
  61. package/dist/cli/target-resolver.d.ts +0 -139
  62. package/dist/cli/team-status.d.ts +0 -91
  63. package/dist/cli/teamfile-compat.d.ts +0 -116
  64. package/dist/cli/teamfile-store.d.ts +0 -18
  65. package/dist/cli/teamfile-template.d.ts +0 -47
  66. package/dist/cli/template-env.d.ts +0 -25
  67. package/dist/cli/terminal-lock.d.ts +0 -25
  68. package/dist/cli/terminal.d.ts +0 -23
  69. package/dist/cli/time-filter.d.ts +0 -10
  70. package/dist/cli/update-notifier.d.ts +0 -11
  71. package/dist/cli/version-util.d.ts +0 -23
  72. package/dist/config/seed_templates.d.ts +0 -1
  73. package/dist/db/backfill-event-log.d.ts +0 -26
  74. package/dist/db/delegation.d.ts +0 -37
  75. package/dist/db/escalation_vocab.d.ts +0 -45
  76. package/dist/db/event-log.d.ts +0 -40
  77. package/dist/db/index.d.ts +0 -1213
  78. package/dist/db/inflight-acquire.d.ts +0 -70
  79. package/dist/db/invocation-event-projections.d.ts +0 -65
  80. package/dist/db/ledger-identity.test.d.ts +0 -1
  81. package/dist/db/live-event-projections.d.ts +0 -92
  82. package/dist/db/migrate.d.ts +0 -51
  83. package/dist/db/open-readonly.d.ts +0 -2
  84. package/dist/db/process-liveness.d.ts +0 -37
  85. package/dist/db/sqlite.d.ts +0 -53
  86. package/dist/db/sqlite.test.d.ts +0 -1
  87. package/dist/db/terminal-lock.d.ts +0 -14
  88. package/dist/db/tracked-invocation-reconcile.d.ts +0 -52
  89. package/dist/db/tracked-invocation.d.ts +0 -116
  90. package/dist/mcp/dispatch.d.ts +0 -45
  91. package/dist/mcp/mediation.d.ts +0 -128
  92. package/dist/mcp/path-warning.d.ts +0 -7
  93. package/dist/mcp/server.d.ts +0 -63
  94. package/dist/mcp/tools.d.ts +0 -24
  95. package/dist/providers/adapter.d.ts +0 -271
  96. package/dist/providers/adapters/agy-adapter.d.ts +0 -18
  97. package/dist/providers/adapters/claude-adapter.d.ts +0 -20
  98. package/dist/providers/adapters/codex-adapter.d.ts +0 -22
  99. package/dist/providers/adapters/copilot-adapter.d.ts +0 -16
  100. package/dist/providers/adapters/dsh-adapter.d.ts +0 -89
  101. package/dist/providers/adapters/gemini-adapter.d.ts +0 -44
  102. package/dist/providers/adapters/hermes-adapter.d.ts +0 -71
  103. package/dist/providers/adapters/index.d.ts +0 -35
  104. package/dist/providers/adapters/kimi-adapter.d.ts +0 -16
  105. package/dist/providers/adapters/lmplayer-adapter.d.ts +0 -14
  106. package/dist/providers/adapters/opencode-adapter.d.ts +0 -11
  107. package/dist/providers/adapters/pi-adapter.d.ts +0 -17
  108. package/dist/providers/adapters/print-turn.d.ts +0 -29
  109. package/dist/providers/adapters/qwen-adapter.d.ts +0 -11
  110. package/dist/providers/agy.d.ts +0 -32
  111. package/dist/providers/base-adapter.d.ts +0 -110
  112. package/dist/providers/base.d.ts +0 -12
  113. package/dist/providers/binary-check.d.ts +0 -102
  114. package/dist/providers/bundle.d.ts +0 -124
  115. package/dist/providers/claude-mock.d.ts +0 -90
  116. package/dist/providers/claude.d.ts +0 -21
  117. package/dist/providers/codex-config.d.ts +0 -15
  118. package/dist/providers/codex.d.ts +0 -25
  119. package/dist/providers/config/init-config.d.ts +0 -43
  120. package/dist/providers/config/model-selection-lint.d.ts +0 -70
  121. package/dist/providers/config/team-config.d.ts +0 -184
  122. package/dist/providers/config/types.d.ts +0 -146
  123. package/dist/providers/config/user-config.d.ts +0 -88
  124. package/dist/providers/copilot.d.ts +0 -21
  125. package/dist/providers/debug.d.ts +0 -128
  126. package/dist/providers/dsh-sidecar.d.ts +0 -65
  127. package/dist/providers/dsh-zstd.d.ts +0 -27
  128. package/dist/providers/dsh.d.ts +0 -37
  129. package/dist/providers/frontmatter.d.ts +0 -46
  130. package/dist/providers/gemini-session-reader.d.ts +0 -151
  131. package/dist/providers/gemini.d.ts +0 -39
  132. package/dist/providers/hermes.d.ts +0 -90
  133. package/dist/providers/index.d.ts +0 -423
  134. package/dist/providers/kimi.d.ts +0 -37
  135. package/dist/providers/model-catalog.d.ts +0 -145
  136. package/dist/providers/model-suggestions.d.ts +0 -4
  137. package/dist/providers/one-shot-timeout.d.ts +0 -1
  138. package/dist/providers/opencode-config.d.ts +0 -62
  139. package/dist/providers/opencode.d.ts +0 -40
  140. package/dist/providers/parsers/acp.d.ts +0 -71
  141. package/dist/providers/parsers/codex-app-server.d.ts +0 -60
  142. package/dist/providers/parsers/stream-json.d.ts +0 -57
  143. package/dist/providers/passive-readers/agy.d.ts +0 -155
  144. package/dist/providers/passive-readers/copilot.d.ts +0 -173
  145. package/dist/providers/passive-readers/dsh.d.ts +0 -34
  146. package/dist/providers/passive-readers/kimi.d.ts +0 -44
  147. package/dist/providers/passive-readers/opencode.d.ts +0 -89
  148. package/dist/providers/passive-readers/qwen.d.ts +0 -151
  149. package/dist/providers/passive-readers/shared.d.ts +0 -138
  150. package/dist/providers/passive-session-reader.d.ts +0 -188
  151. package/dist/providers/path-utils.d.ts +0 -1
  152. package/dist/providers/pi.d.ts +0 -32
  153. package/dist/providers/pricing.d.ts +0 -107
  154. package/dist/providers/qwen.d.ts +0 -22
  155. package/dist/providers/ratelimit/agy.d.ts +0 -22
  156. package/dist/providers/ratelimit/claude-auth.d.ts +0 -13
  157. package/dist/providers/ratelimit/claude.d.ts +0 -6
  158. package/dist/providers/ratelimit/codex.d.ts +0 -7
  159. package/dist/providers/ratelimit/kimi-auth.d.ts +0 -15
  160. package/dist/providers/ratelimit/kimi.d.ts +0 -6
  161. package/dist/providers/ratelimit/schema.d.ts +0 -28
  162. package/dist/providers/ratelimit-readings.d.ts +0 -19
  163. package/dist/providers/registry.d.ts +0 -31
  164. package/dist/providers/resume.d.ts +0 -43
  165. package/dist/providers/seed-instruction.d.ts +0 -3
  166. package/dist/providers/self-session-env.d.ts +0 -21
  167. package/dist/providers/session-limit.d.ts +0 -9
  168. package/dist/providers/strip-ansi.d.ts +0 -5
  169. package/dist/providers/transport-errors.d.ts +0 -94
  170. package/dist/providers/transport-lifecycle.d.ts +0 -63
  171. package/dist/providers/transport-wrappers.d.ts +0 -110
  172. package/dist/providers/transports/acp-profiles/config-option-step.d.ts +0 -24
  173. package/dist/providers/transports/acp-profiles/copilot.d.ts +0 -12
  174. package/dist/providers/transports/acp-profiles/gemini.d.ts +0 -22
  175. package/dist/providers/transports/acp-profiles/hermes.d.ts +0 -27
  176. package/dist/providers/transports/acp-profiles/index.d.ts +0 -19
  177. package/dist/providers/transports/acp-profiles/kimi.d.ts +0 -24
  178. package/dist/providers/transports/acp-profiles/opencode.d.ts +0 -26
  179. package/dist/providers/transports/acp-profiles/types.d.ts +0 -258
  180. package/dist/providers/transports/acp-rpc.d.ts +0 -18
  181. package/dist/providers/transports/acp.d.ts +0 -217
  182. package/dist/providers/transports/codex-app-server.d.ts +0 -190
  183. package/dist/providers/transports/hold-open.d.ts +0 -120
  184. package/dist/providers/transports/manager.d.ts +0 -21
  185. package/dist/providers/transports/stream-json.d.ts +0 -162
  186. package/dist/providers/transports/types.d.ts +0 -56
  187. package/dist/providers/types.d.ts +0 -154
  188. package/dist/providers/yolo-contract.d.ts +0 -131
  189. package/dist/script/adapter.d.ts +0 -104
  190. package/dist/script/batch-script.d.ts +0 -7
  191. package/dist/script/index.d.ts +0 -3
  192. package/dist/script/lmbee-module.d.ts +0 -2
  193. package/dist/script/lmscript.d.ts +0 -616
  194. package/dist/shared/policy.d.ts +0 -74
  195. package/dist/shared-lib/db.d.ts +0 -25
  196. package/dist/shared-lib/passive-session-reader.d.ts +0 -2
  197. package/dist/shared-lib/provider-parse.d.ts +0 -6
  198. package/dist/templates/basedir.d.ts +0 -52
  199. package/dist/uri/lmctl_uri.d.ts +0 -38
@@ -1,25 +0,0 @@
1
- import { createDal, Dal } from '../db/index.js';
2
- export { createDal, Dal, };
3
- export type { AgentInflightAcquireOptions, AgentInflightAcquireResult, AgentInflightInput, AgentInflightObservedHolder, AgentInflightRow, TerminalLockRecord, TrackedInvocationFinishPatch, TrackedInvocationInput, TrackedInvocationKind, TrackedInvocationListFilter, TrackedInvocationOrigin, TrackedInvocationRow, TrackedInvocationStatus, TrackedInvocationTerminalClaimFilter, WorkflowRow, WorkflowVersionRow, TriggerInstanceRow, TeamRow, TeamMemberRow, ProjectRow, JobRow, RunRow, StepRow, AttentionRow, } from '../db/index.js';
4
- export interface OpenLmctlStateDbOptions {
5
- /**
6
- * Explicit state.db path. When omitted, uses the same resolver as the CLI:
7
- * db flag equivalent -> LMCTL_DB -> active workspace -> legacy/default db.
8
- */
9
- path?: string;
10
- /**
11
- * Open the existing DB read-only and set PRAGMA query_only=ON.
12
- * Write mode uses the normal migration-backed createDal path.
13
- */
14
- readonly?: boolean;
15
- }
16
- export interface LmctlStateDbHandle {
17
- path: string;
18
- readonly: boolean;
19
- dal: Dal;
20
- close(): void;
21
- }
22
- export declare function resolveLmctlStateDbPath(path?: string): string;
23
- export declare function openLmctlStateDb(options?: OpenLmctlStateDbOptions): LmctlStateDbHandle;
24
- export declare function openReadonlyLmctlStateDb(path?: string): LmctlStateDbHandle;
25
- export declare function createReadonlyDal(path: string): Dal;
@@ -1,2 +0,0 @@
1
- export { NativePassiveSessionReader, createPassiveSessionReader, } from '../providers/passive-session-reader.js';
2
- export type { Source, ReadLimits, SourceState, NativeResponseMetadata, Discovery, Snapshot, PassiveSessionReader, PassiveSessionReaderOptions, } from '../providers/passive-session-reader.js';
@@ -1,6 +0,0 @@
1
- export { aggregateResultEvents, createStreamJsonProcessor, joinResultTurns, supportsStreamJson, } from '../providers/parsers/stream-json.js';
2
- export type { AggregatedResultEvents, StreamJsonProcessor, StreamJsonResult, } from '../providers/parsers/stream-json.js';
3
- export { acpSessionIdFromResponse, acpStopReasonFromResponse, createAcpOutputProcessor, isolateGeminiLatestAgentMessage, supportsAcp, } from '../providers/parsers/acp.js';
4
- export type { AcpOutputProcessor, AcpOutputProcessorResult, AcpResult, } from '../providers/parsers/acp.js';
5
- export { buildCodexThreadResumeParams, buildCodexThreadStartParams, buildInitializePayload, classifyCodexErrorDisposition, createCodexAgentAccumulator, createCodexTurnState, flushCodexAgentAccumulator, processCodexAgentNotification, recordCodexErrorNotification, resolveCodexTurnCompletion, } from '../providers/parsers/codex-app-server.js';
6
- export type { AgentMessageItemState, AgentMessagePhase, CodexAgentAccumulatorState, CodexInitializePayload, CodexItemMismatchInfo, CodexTurnState, } from '../providers/parsers/codex-app-server.js';
@@ -1,52 +0,0 @@
1
- /** The ONE place the default basedir name lives — re-defaulting is 1 line. */
2
- export declare const DEFAULT_BASEDIR_DIRNAME = ".lmctl";
3
- /**
4
- * The active basedir (tiers 1-3). Never touches the filesystem beyond the
5
- * project-local probe; pure given env + cwd.
6
- */
7
- export declare function resolveBasedir(cwd?: string): string;
8
- /** `<basedir>/templates/workflows`. */
9
- export declare function templatesWorkflowsDir(cwd?: string): string;
10
- /**
11
- * The read-only shipped-sibling workflows dir. dev (tsx):
12
- * src/templates/basedir.ts → ../../workflows = <repo>/workflows. built
13
- * (unbundled) dist/templates/basedir.js → <repo>/workflows. packed bundle:
14
- * every module collapses onto dist/cli/index.js → ../../workflows =
15
- * <pkgroot>/workflows (exactly where pack-release.mjs ships the
16
- * engine-owned built-in). One expression, correct in all three.
17
- */
18
- export declare function shippedWorkflowsDir(): string;
19
- export interface MaterializeResult {
20
- basedir: string;
21
- copied: string[];
22
- refreshed: string[];
23
- preserved: string[];
24
- shadowed: string[];
25
- }
26
- /**
27
- * Copy shipped workflow templates into `<basedir>/templates/workflows/`,
28
- * honouring the sha256 manifest for edit-preservation. Idempotent.
29
- * Best-effort: a read-only/unwritable basedir does NOT throw fatally for
30
- * callers that pass `{ swallow: true }` — the per-template resolver still
31
- * falls back to the shipped sibling so the engine never hard-fails.
32
- */
33
- export declare function materializeTemplates(opts?: {
34
- cwd?: string;
35
- swallow?: boolean;
36
- }): MaterializeResult;
37
- /**
38
- * The ordered basedir search list (tiers 1-3, same order as
39
- * `resolveBasedir` but ALL applicable tiers, not just the winner):
40
- * `$LMCTL_HOME` → nearest `./.lmctl` → `~/.lmctl`. Single source of the
41
- * tier order — reused by `resolveWorkflowTemplate` and the `lmctl://`
42
- * resolver so they can never drift. (The read-only shipped-sibling
43
- * fallback is workflow-only and is appended by `resolveWorkflowTemplate`.)
44
- */
45
- export declare function basedirSearchList(cwd?: string): string[];
46
- /**
47
- * Resolve a workflow template by name (no extension) to an on-disk path,
48
- * basedir-first then the read-only shipped sibling. Pure lookup — no
49
- * mutation. Returns null if it exists nowhere (caller decides: the worker
50
- * built-in keeps its graceful `catch → null`).
51
- */
52
- export declare function resolveWorkflowTemplate(name: string, cwd?: string): string | null;
@@ -1,38 +0,0 @@
1
- /** The URI scheme prefix — single named constant. */
2
- export declare const LMCTL_URI_SCHEME = "lmctl://";
3
- /** F4 (DECIDED 2026-05-19, WIRED) — the live remote catalog base. Single
4
- * named constant; mirror the local path shape `<base><kind>/<name>`. */
5
- export declare const LMCTL_REMOTE_CATALOG_BASE = "https://lmctl.com/templates/";
6
- /** F5 — fetched bytes are cached under `<basedir>/<LMCTL_CACHE_DIRNAME>/`
7
- * ONLY (never the user-editable `templates/` tree). */
8
- export declare const LMCTL_CACHE_DIRNAME = ".cache";
9
- /** Bounded remote fetch — a hung/slow catalog can never wedge resolution. */
10
- export declare const LMCTL_REMOTE_FETCH_TIMEOUT_MS = 8000;
11
- export type LmctlUriKind = 'workflow' | 'mcp' | 'skill';
12
- export interface ParsedLmctlUri {
13
- kind: LmctlUriKind;
14
- name: string;
15
- /** Optional `@<sha256>` integrity pin (F6 hash-pinning). */
16
- ref?: string;
17
- }
18
- /** Distinct failure classes (the directive's classification map):
19
- * - `malformed` — the URI itself is invalid (parse).
20
- * - `missing` — not local AND remote unreachable/404/non-2xx.
21
- * - `validation-failure` — remote 2xx but pin-mismatch or shape-invalid
22
- * (artifact discarded, NOT cached; loud). */
23
- export type LmctlUriFailure = 'malformed' | 'missing' | 'validation-failure';
24
- export declare class LmctlUriError extends Error {
25
- readonly reason: LmctlUriFailure;
26
- constructor(message: string, reason?: LmctlUriFailure);
27
- }
28
- /** True iff `s` is a string using the `lmctl://` scheme. */
29
- export declare function isLmctlUri(s: unknown): s is string;
30
- /** Parse + validate an `lmctl://` URI. Throws `LmctlUriError`
31
- * (reason `malformed`) on any malformed input — never a raw crash. */
32
- export declare function parseLmctlUri(uri: string): ParsedLmctlUri;
33
- /**
34
- * Resolve an `lmctl://` URI to a concrete EXISTING local path. Local-first;
35
- * on miss, the wired remote tier (bounded, typed-classified). Async because
36
- * the remote tier uses `fetch`.
37
- */
38
- export declare function resolveLmctlUri(uri: string, cwd?: string): Promise<string>;