@lmctl-ai/lmctl 0.2.38 → 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.
- package/README.md +16 -0
- package/bin/lmbee +2 -0
- package/bin/lmscript +3 -0
- package/build-info.json +1 -0
- package/dist/cli/index.js +485 -460
- package/dist/cli/schema.sql +0 -169
- package/dist/cli/script.js +246 -246
- package/dist/lmbee.js +960 -0
- package/dist/lmscript.js +388 -0
- package/dist/public/app.js +379 -0
- package/dist/public/index.html +78 -0
- package/dist/public/styles.css +160 -0
- package/dist/schema.sql +455 -0
- package/dist/vendor-webui/index.html +18 -0
- package/dist/vendor-webui/local.js +231 -0
- package/dist/vendor-webui/styles.css +1852 -0
- package/package.json +11 -7
- package/dist/cli/batch.d.ts +0 -2
- package/dist/cli/busy-evidence.d.ts +0 -27
- package/dist/cli/chat-cycle.d.ts +0 -59
- package/dist/cli/chat-exec.d.ts +0 -91
- package/dist/cli/chat-policy.d.ts +0 -22
- package/dist/cli/chat.d.ts +0 -14
- package/dist/cli/code-resolver.d.ts +0 -8
- package/dist/cli/common.d.ts +0 -57
- package/dist/cli/context.d.ts +0 -12
- package/dist/cli/cost.d.ts +0 -2
- package/dist/cli/export.d.ts +0 -2
- package/dist/cli/hello.d.ts +0 -10
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/infra.d.ts +0 -78
- package/dist/cli/init.d.ts +0 -8
- package/dist/cli/intent-input.d.ts +0 -16
- package/dist/cli/intent-match.d.ts +0 -30
- package/dist/cli/intent-sessions.d.ts +0 -24
- package/dist/cli/intent-team.d.ts +0 -25
- package/dist/cli/intent.d.ts +0 -22
- package/dist/cli/ls.d.ts +0 -2
- package/dist/cli/mailbox-cli.d.ts +0 -6
- package/dist/cli/managed.d.ts +0 -62
- package/dist/cli/mcp-install.d.ts +0 -23
- package/dist/cli/mcp.d.ts +0 -2
- package/dist/cli/model.d.ts +0 -21
- package/dist/cli/paths.d.ts +0 -50
- package/dist/cli/plan-wizard.d.ts +0 -42
- package/dist/cli/plan.d.ts +0 -20
- package/dist/cli/queue-delivery.d.ts +0 -122
- package/dist/cli/quickrun.d.ts +0 -14
- package/dist/cli/ratelimit.d.ts +0 -2
- package/dist/cli/remote-fetch.d.ts +0 -7
- package/dist/cli/run-queries.d.ts +0 -82
- package/dist/cli/running.d.ts +0 -5
- package/dist/cli/save-script.d.ts +0 -41
- package/dist/cli/script.d.ts +0 -6
- package/dist/cli/seed-flight.d.ts +0 -2
- package/dist/cli/self-identity.d.ts +0 -25
- package/dist/cli/session-idle.d.ts +0 -118
- package/dist/cli/status.d.ts +0 -22
- package/dist/cli/tail.d.ts +0 -18
- package/dist/cli/target-resolver.d.ts +0 -139
- package/dist/cli/team-status.d.ts +0 -91
- package/dist/cli/teamfile-compat.d.ts +0 -116
- package/dist/cli/teamfile-store.d.ts +0 -18
- package/dist/cli/teamfile-template.d.ts +0 -47
- package/dist/cli/template-env.d.ts +0 -25
- package/dist/cli/terminal-lock.d.ts +0 -25
- package/dist/cli/terminal.d.ts +0 -23
- package/dist/cli/time-filter.d.ts +0 -10
- package/dist/cli/update-notifier.d.ts +0 -11
- package/dist/cli/version-util.d.ts +0 -23
- package/dist/config/seed_templates.d.ts +0 -1
- package/dist/db/backfill-event-log.d.ts +0 -26
- package/dist/db/delegation.d.ts +0 -37
- package/dist/db/escalation_vocab.d.ts +0 -45
- package/dist/db/event-log.d.ts +0 -40
- package/dist/db/index.d.ts +0 -1213
- package/dist/db/inflight-acquire.d.ts +0 -70
- package/dist/db/invocation-event-projections.d.ts +0 -65
- package/dist/db/ledger-identity.test.d.ts +0 -1
- package/dist/db/live-event-projections.d.ts +0 -92
- package/dist/db/migrate.d.ts +0 -51
- package/dist/db/open-readonly.d.ts +0 -2
- package/dist/db/process-liveness.d.ts +0 -37
- package/dist/db/sqlite.d.ts +0 -53
- package/dist/db/sqlite.test.d.ts +0 -1
- package/dist/db/terminal-lock.d.ts +0 -14
- package/dist/db/tracked-invocation-reconcile.d.ts +0 -52
- package/dist/db/tracked-invocation.d.ts +0 -116
- package/dist/mcp/dispatch.d.ts +0 -45
- package/dist/mcp/mediation.d.ts +0 -128
- package/dist/mcp/path-warning.d.ts +0 -7
- package/dist/mcp/server.d.ts +0 -63
- package/dist/mcp/tools.d.ts +0 -24
- package/dist/providers/adapter.d.ts +0 -271
- package/dist/providers/adapters/agy-adapter.d.ts +0 -18
- package/dist/providers/adapters/claude-adapter.d.ts +0 -20
- package/dist/providers/adapters/codex-adapter.d.ts +0 -22
- package/dist/providers/adapters/copilot-adapter.d.ts +0 -16
- package/dist/providers/adapters/dsh-adapter.d.ts +0 -89
- package/dist/providers/adapters/gemini-adapter.d.ts +0 -44
- package/dist/providers/adapters/hermes-adapter.d.ts +0 -71
- package/dist/providers/adapters/index.d.ts +0 -35
- package/dist/providers/adapters/kimi-adapter.d.ts +0 -16
- package/dist/providers/adapters/lmplayer-adapter.d.ts +0 -14
- package/dist/providers/adapters/opencode-adapter.d.ts +0 -11
- package/dist/providers/adapters/pi-adapter.d.ts +0 -17
- package/dist/providers/adapters/print-turn.d.ts +0 -29
- package/dist/providers/adapters/qwen-adapter.d.ts +0 -11
- package/dist/providers/agy.d.ts +0 -32
- package/dist/providers/base-adapter.d.ts +0 -110
- package/dist/providers/base.d.ts +0 -12
- package/dist/providers/binary-check.d.ts +0 -102
- package/dist/providers/bundle.d.ts +0 -124
- package/dist/providers/claude-mock.d.ts +0 -90
- package/dist/providers/claude.d.ts +0 -21
- package/dist/providers/codex-config.d.ts +0 -15
- package/dist/providers/codex.d.ts +0 -25
- package/dist/providers/config/init-config.d.ts +0 -59
- package/dist/providers/config/init-edit.d.ts +0 -3
- package/dist/providers/config/init-file.d.ts +0 -20
- package/dist/providers/config/init-write.d.ts +0 -2
- package/dist/providers/config/model-selection-lint.d.ts +0 -70
- package/dist/providers/config/team-config.d.ts +0 -184
- package/dist/providers/config/types.d.ts +0 -146
- package/dist/providers/config/user-config.d.ts +0 -88
- package/dist/providers/copilot.d.ts +0 -21
- package/dist/providers/debug.d.ts +0 -128
- package/dist/providers/dsh-sidecar.d.ts +0 -65
- package/dist/providers/dsh-zstd.d.ts +0 -27
- package/dist/providers/dsh.d.ts +0 -37
- package/dist/providers/frontmatter.d.ts +0 -46
- package/dist/providers/gemini-session-reader.d.ts +0 -151
- package/dist/providers/gemini.d.ts +0 -39
- package/dist/providers/hermes.d.ts +0 -90
- package/dist/providers/index.d.ts +0 -423
- package/dist/providers/kimi.d.ts +0 -37
- package/dist/providers/model-catalog.d.ts +0 -145
- package/dist/providers/model-suggestions.d.ts +0 -4
- package/dist/providers/one-shot-timeout.d.ts +0 -1
- package/dist/providers/opencode-config.d.ts +0 -62
- package/dist/providers/opencode.d.ts +0 -40
- package/dist/providers/parsers/acp.d.ts +0 -71
- package/dist/providers/parsers/codex-app-server.d.ts +0 -60
- package/dist/providers/parsers/stream-json.d.ts +0 -57
- package/dist/providers/passive-readers/agy.d.ts +0 -155
- package/dist/providers/passive-readers/copilot.d.ts +0 -173
- package/dist/providers/passive-readers/dsh.d.ts +0 -34
- package/dist/providers/passive-readers/kimi.d.ts +0 -44
- package/dist/providers/passive-readers/opencode.d.ts +0 -89
- package/dist/providers/passive-readers/qwen.d.ts +0 -151
- package/dist/providers/passive-readers/shared.d.ts +0 -138
- package/dist/providers/passive-session-reader.d.ts +0 -188
- package/dist/providers/path-utils.d.ts +0 -1
- package/dist/providers/pi.d.ts +0 -32
- package/dist/providers/pricing.d.ts +0 -107
- package/dist/providers/qwen.d.ts +0 -22
- package/dist/providers/ratelimit/agy.d.ts +0 -22
- package/dist/providers/ratelimit/claude-auth.d.ts +0 -13
- package/dist/providers/ratelimit/claude.d.ts +0 -6
- package/dist/providers/ratelimit/codex.d.ts +0 -7
- package/dist/providers/ratelimit/kimi-auth.d.ts +0 -15
- package/dist/providers/ratelimit/kimi.d.ts +0 -6
- package/dist/providers/ratelimit/schema.d.ts +0 -28
- package/dist/providers/ratelimit-readings.d.ts +0 -19
- package/dist/providers/registry.d.ts +0 -31
- package/dist/providers/resume.d.ts +0 -43
- package/dist/providers/seed-instruction.d.ts +0 -3
- package/dist/providers/self-session-env.d.ts +0 -21
- package/dist/providers/session-limit.d.ts +0 -9
- package/dist/providers/strip-ansi.d.ts +0 -5
- package/dist/providers/transport-errors.d.ts +0 -94
- package/dist/providers/transport-lifecycle.d.ts +0 -63
- package/dist/providers/transport-wrappers.d.ts +0 -110
- package/dist/providers/transports/acp-profiles/config-option-step.d.ts +0 -24
- package/dist/providers/transports/acp-profiles/copilot.d.ts +0 -12
- package/dist/providers/transports/acp-profiles/gemini.d.ts +0 -22
- package/dist/providers/transports/acp-profiles/hermes.d.ts +0 -27
- package/dist/providers/transports/acp-profiles/index.d.ts +0 -19
- package/dist/providers/transports/acp-profiles/kimi.d.ts +0 -24
- package/dist/providers/transports/acp-profiles/opencode.d.ts +0 -26
- package/dist/providers/transports/acp-profiles/types.d.ts +0 -258
- package/dist/providers/transports/acp-rpc.d.ts +0 -18
- package/dist/providers/transports/acp.d.ts +0 -217
- package/dist/providers/transports/codex-app-server.d.ts +0 -190
- package/dist/providers/transports/hold-open.d.ts +0 -120
- package/dist/providers/transports/manager.d.ts +0 -21
- package/dist/providers/transports/stream-json.d.ts +0 -162
- package/dist/providers/transports/types.d.ts +0 -56
- package/dist/providers/types.d.ts +0 -154
- package/dist/providers/yolo-contract.d.ts +0 -131
- package/dist/script/adapter.d.ts +0 -107
- package/dist/script/batch-script.d.ts +0 -7
- package/dist/script/index.d.ts +0 -3
- package/dist/script/init-environment.d.ts +0 -8
- package/dist/script/lmbee-module.d.ts +0 -2
- package/dist/script/lmscript.d.ts +0 -647
- package/dist/shared/policy.d.ts +0 -74
- package/dist/shared-lib/db.d.ts +0 -25
- package/dist/shared-lib/passive-session-reader.d.ts +0 -2
- package/dist/shared-lib/provider-parse.d.ts +0 -6
- package/dist/templates/basedir.d.ts +0 -52
- package/dist/uri/lmctl_uri.d.ts +0 -38
package/dist/shared/policy.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export type SubscriptionTier = "free" | "premium" | "admin";
|
|
2
|
-
export interface LocalwebPolicy {
|
|
3
|
-
schema: "localweb.policy.v1";
|
|
4
|
-
policyId: string;
|
|
5
|
-
tier: SubscriptionTier;
|
|
6
|
-
version: number;
|
|
7
|
-
leases: {
|
|
8
|
-
mailboxUrlTtlMs: number;
|
|
9
|
-
refreshBeforeExpiryMs: number;
|
|
10
|
-
};
|
|
11
|
-
polling: {
|
|
12
|
-
notLoggedInMs: number;
|
|
13
|
-
idleForegroundMs: number;
|
|
14
|
-
idleBackgroundMs: number;
|
|
15
|
-
busyMs: number;
|
|
16
|
-
jitterRatio: number;
|
|
17
|
-
};
|
|
18
|
-
heartbeats: {
|
|
19
|
-
browserMs: number;
|
|
20
|
-
appMs: number;
|
|
21
|
-
ttlMs: number;
|
|
22
|
-
};
|
|
23
|
-
limits: {
|
|
24
|
-
enforced: boolean;
|
|
25
|
-
appsPerUser: number;
|
|
26
|
-
activeMinutesPerDay: number;
|
|
27
|
-
activityBucketMs: number;
|
|
28
|
-
maxMailboxGetsPerDay: number;
|
|
29
|
-
maxMailboxPutsPerDay: number;
|
|
30
|
-
maxControlRequestsPerDay: number;
|
|
31
|
-
maxMessagesPerMailbox: number;
|
|
32
|
-
maxMailboxBytes: number;
|
|
33
|
-
maxMessageBytes: number;
|
|
34
|
-
maxProgressPutMs: number;
|
|
35
|
-
};
|
|
36
|
-
overLimit: {
|
|
37
|
-
mode: "slowdown" | "deny_url_refresh" | "deny_requests";
|
|
38
|
-
pollMs: number;
|
|
39
|
-
denyUrlRefresh: boolean;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
export interface UsageCounters {
|
|
43
|
-
active: boolean;
|
|
44
|
-
mailboxGets: number;
|
|
45
|
-
mailboxPuts: number;
|
|
46
|
-
controlRequests: number;
|
|
47
|
-
busyMs: number;
|
|
48
|
-
bytesIn: number;
|
|
49
|
-
bytesOut: number;
|
|
50
|
-
}
|
|
51
|
-
export interface UsageSummary {
|
|
52
|
-
date: string;
|
|
53
|
-
activeMinutesToday: number;
|
|
54
|
-
mailboxGetsToday: number;
|
|
55
|
-
mailboxPutsToday: number;
|
|
56
|
-
controlRequestsToday: number;
|
|
57
|
-
busyMsToday: number;
|
|
58
|
-
bytesInToday: number;
|
|
59
|
-
bytesOutToday: number;
|
|
60
|
-
activeMinutesLimit: number;
|
|
61
|
-
mailboxGetsLimit: number;
|
|
62
|
-
mailboxPutsLimit: number;
|
|
63
|
-
controlRequestsLimit: number;
|
|
64
|
-
overLimit: boolean;
|
|
65
|
-
overLimitReasons: string[];
|
|
66
|
-
}
|
|
67
|
-
export interface EffectivePolicy {
|
|
68
|
-
policy: LocalwebPolicy;
|
|
69
|
-
usage: UsageSummary;
|
|
70
|
-
}
|
|
71
|
-
export declare const DEFAULT_USAGE_COUNTERS: UsageCounters;
|
|
72
|
-
export declare function emptyUsageSummary(date: string, policy: LocalwebPolicy): UsageSummary;
|
|
73
|
-
export declare function evaluateUsageLimits(summary: UsageSummary, policy: LocalwebPolicy): UsageSummary;
|
|
74
|
-
export declare function effectiveRetryAfterMs(effective: EffectivePolicy, fallbackMs: number): number;
|
package/dist/shared-lib/db.d.ts
DELETED
|
@@ -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;
|
package/dist/uri/lmctl_uri.d.ts
DELETED
|
@@ -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>;
|