@codeworksh/harness 0.0.1-dev.20260923035712 → 0.0.1-dev.20260925125142
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 +2 -4
- package/effect.d.mts +234 -55
- package/effect.mjs +2296 -2111
- package/effect.mjs.map +1 -1
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -212,7 +212,7 @@ Vercel and Daytona are the first remote drivers. More providers can be added beh
|
|
|
212
212
|
- Node.js 24.14.1 or newer
|
|
213
213
|
- An API key for the model provider you select, or OAuth credentials created with
|
|
214
214
|
`codework auth login --openai-codex` / `codework auth login --github-copilot`
|
|
215
|
-
-
|
|
215
|
+
- Network access to models.dev the first time: the model catalog is downloaded into `<home>/models.gen.json` on demand
|
|
216
216
|
|
|
217
217
|
## CLI
|
|
218
218
|
|
|
@@ -221,8 +221,6 @@ Run the current development release without installing it globally:
|
|
|
221
221
|
```sh
|
|
222
222
|
export OPENAI_API_KEY="..."
|
|
223
223
|
|
|
224
|
-
pnpm dlx @codeworksh/harness@dev models generate
|
|
225
|
-
|
|
226
224
|
pnpm dlx @codeworksh/harness@dev \
|
|
227
225
|
--home .codework-beta \
|
|
228
226
|
run --cwd "$PWD" --provider openai --model gpt-5.5 --thinking high \
|
|
@@ -244,7 +242,7 @@ cache 9,600 read · 0 write
|
|
|
244
242
|
cost $0.014200 · 1 turn
|
|
245
243
|
```
|
|
246
244
|
|
|
247
|
-
|
|
245
|
+
The model catalog lives at `<home>/models.gen.json` and is refreshed once it is older than 15 minutes; `codework models refresh --force` downloads it now. Set `CODEWORK_MODELS_FILE` to pin a catalog you manage yourself.
|
|
248
246
|
|
|
249
247
|
The CLI prints the session ID to stderr. Provider, model, and thinking settings are stored with the session, so use the same home directory and session ID to continue it:
|
|
250
248
|
|
package/effect.d.mts
CHANGED
|
@@ -498,7 +498,7 @@ declare const SessionEntryPartRow_base: import("effect/unstable/schema/VariantSc
|
|
|
498
498
|
declare class SessionEntryPartRow extends SessionEntryPartRow_base {}
|
|
499
499
|
import * as import__codeworksh_plugin_event from "@codeworksh/plugin/event";
|
|
500
500
|
declare namespace event_d_exports {
|
|
501
|
-
export { event_d_exports as Event, Interface$17 as Interface, InvalidDurableEventError, LogInput, LogItem, Manifest, PublishOptions, ReadAggregateInput, ReadAggregateResult, SerializedEvent, Service$17 as Service, Subscribe, SubscribeOptions, Subscriber, SubscriptionOverflowError, Synced, Unsubscribe, isSynced, layer$
|
|
501
|
+
export { event_d_exports as Event, Interface$17 as Interface, InvalidDurableEventError, LogInput, LogItem, Manifest, PublishOptions, ReadAggregateInput, ReadAggregateResult, SerializedEvent, Service$17 as Service, Subscribe, SubscribeOptions, Subscriber, SubscriptionOverflowError, Synced, Unsubscribe, isSynced, layer$19 as layer };
|
|
502
502
|
}
|
|
503
503
|
type SerializedEvent = {
|
|
504
504
|
readonly id: schema_d_exports$10.ID;
|
|
@@ -654,7 +654,7 @@ interface Interface$17 {
|
|
|
654
654
|
}
|
|
655
655
|
declare const Service_base$15: Context.ServiceClass<Service$17, "@codeworksh/harness/event/event/Service", Interface$17>;
|
|
656
656
|
declare class Service$17 extends Service_base$15 {}
|
|
657
|
-
declare const layer$
|
|
657
|
+
declare const layer$19: Layer.Layer<Service$17, never, SqlClient.SqlClient>;
|
|
658
658
|
import * as import__codeworksh_plugin_project from "@codeworksh/plugin/project";
|
|
659
659
|
import * as import__codeworksh_plugin_schema from "@codeworksh/plugin/schema";
|
|
660
660
|
import * as import__codeworksh_plugin_space from "@codeworksh/plugin/space";
|
|
@@ -711,7 +711,7 @@ declare const AssistantEnvelopeUsage: Schema.fromJsonString<Schema.Struct<{
|
|
|
711
711
|
}>;
|
|
712
712
|
}>>;
|
|
713
713
|
declare namespace session_d_exports$1 {
|
|
714
|
-
export { AbortAssistant, AppendEntry, AppendPart, CreateSession, EntryNotFoundError, EntryState, EntryType, ForkInput, HydratedEntry, Interface$16 as Interface, InvalidEntryDataError, ListInput$1 as ListInput, MessageEntryType, PartType, RelinkError, RelinkInput$1 as RelinkInput, RelinkReason, ReplaceAssistant, Service$16 as Service, session_d_exports$1 as Session, SessionEntryPartRow, SessionEntryRow, SessionLinkedSpaceNotFoundError, SessionNotFoundError, SessionNotLinkedError, SessionRow, SetEntryState, SettleToolCall, ToolCallNotFoundError, ToolStatus, defaultLayer$7 as defaultLayer, entryStates, entryTypes, layer$
|
|
714
|
+
export { AbortAssistant, AppendEntry, AppendPart, CreateSession, EntryNotFoundError, EntryState, EntryType, ForkInput, HydratedEntry, Interface$16 as Interface, InvalidEntryDataError, ListInput$1 as ListInput, MessageEntryType, PartType, RelinkError, RelinkInput$1 as RelinkInput, RelinkReason, ReplaceAssistant, Service$16 as Service, session_d_exports$1 as Session, SessionEntryPartRow, SessionEntryRow, SessionLinkedSpaceNotFoundError, SessionNotFoundError, SessionNotLinkedError, SessionRow, SetEntryState, SettleToolCall, ToolCallNotFoundError, ToolStatus, defaultLayer$7 as defaultLayer, entryStates, entryTypes, layer$18 as layer, messageEntryTypes, partTypes, rebaseDirectory, toolStatuses };
|
|
715
715
|
}
|
|
716
716
|
declare const SessionNotFoundError_base: Schema.Class<SessionNotFoundError, Schema.TaggedStruct<"SessionNotFoundError", {
|
|
717
717
|
readonly sessionId: Schema.String;
|
|
@@ -926,7 +926,7 @@ interface Interface$16 {
|
|
|
926
926
|
}
|
|
927
927
|
declare const Service_base$14: Context.ServiceClass<Service$16, "@codeworksh/harness/session/session/Service", Interface$16>;
|
|
928
928
|
declare class Service$16 extends Service_base$14 {}
|
|
929
|
-
declare const layer$
|
|
929
|
+
declare const layer$18: Layer.Layer<Service$16, never, Service$17 | SqlClient.SqlClient>;
|
|
930
930
|
declare const defaultLayer$7: Layer.Layer<Service$16, import("effect/Config").ConfigError, Service$17>;
|
|
931
931
|
//#endregion
|
|
932
932
|
//#region src/context/errors.d.ts
|
|
@@ -947,9 +947,9 @@ declare const ContextInvariantError_base: Schema.Class<ContextInvariantError, Sc
|
|
|
947
947
|
}>, import("effect/Cause").YieldableError>;
|
|
948
948
|
declare class ContextInvariantError extends ContextInvariantError_base {}
|
|
949
949
|
declare namespace db_d_exports {
|
|
950
|
-
export { db_d_exports as Database, SqlClient$1 as SqlClient, SqlSchema$1 as SqlSchema, defaultLayer$6 as defaultLayer, layer$
|
|
950
|
+
export { db_d_exports as Database, SqlClient$1 as SqlClient, SqlSchema$1 as SqlSchema, defaultLayer$6 as defaultLayer, layer$17 as layer, locationConfig, path, resolveDatabaseLocation };
|
|
951
951
|
}
|
|
952
|
-
declare function layer$
|
|
952
|
+
declare function layer$17(location: string): Layer.Layer<SqlClient.SqlClient | SqliteClient.SqliteClient, never, never>;
|
|
953
953
|
declare const locationConfig: Config.Config<string>;
|
|
954
954
|
declare function resolveDatabaseLocation(configured: string, data: string): string;
|
|
955
955
|
declare const path: (data?: string | undefined) => Effect.Effect<string, Config.ConfigError, never>;
|
|
@@ -960,7 +960,7 @@ import * as import__codeworksh_plugin_sandbox_io from "@codeworksh/plugin/sandbo
|
|
|
960
960
|
import * as import__codeworksh_plugin_sandbox_driver from "@codeworksh/plugin/sandbox/driver";
|
|
961
961
|
import * as import__codeworksh_plugin_sandbox_errors from "@codeworksh/plugin/sandbox/errors";
|
|
962
962
|
declare namespace registry_d_exports$1 {
|
|
963
|
-
export { DriverInfo, Registry, RegistryService, registry_d_exports$1 as SandboxDriverRegistry, layer$
|
|
963
|
+
export { DriverInfo, Registry, RegistryService, registry_d_exports$1 as SandboxDriverRegistry, layer$16 as layer, make$5 as make };
|
|
964
964
|
}
|
|
965
965
|
interface DriverInfo {
|
|
966
966
|
readonly name: driver_d_exports.SandboxDriver.Name;
|
|
@@ -982,9 +982,9 @@ interface RegistryService {
|
|
|
982
982
|
declare const Registry_base: Context.ServiceClass<Registry, "@codeworksh/harness/sandbox/registry", RegistryService>;
|
|
983
983
|
declare class Registry extends Registry_base {}
|
|
984
984
|
declare const make$5: (drivers: ReadonlyArray<driver_d_exports.SandboxDriver.Registration>) => Effect.Effect<RegistryService, errors_d_exports.SandboxDriverRegistrationError>;
|
|
985
|
-
declare const layer$
|
|
985
|
+
declare const layer$16: (...drivers: ReadonlyArray<driver_d_exports.SandboxDriver.Registration>) => Layer.Layer<Registry, errors_d_exports.SandboxDriverRegistrationError, never>;
|
|
986
986
|
declare namespace control_d_exports$1 {
|
|
987
|
-
export { Controller, CreateInput$2 as CreateInput, DestroyOptions, Interface$15 as Interface, ListInput, MountOptions, Options$5 as Options, RegisterInput$1 as RegisterInput, control_d_exports$1 as SandboxController, layer$
|
|
987
|
+
export { Controller, CreateInput$2 as CreateInput, DestroyOptions, Interface$15 as Interface, ListInput, MountOptions, Options$5 as Options, RegisterInput$1 as RegisterInput, control_d_exports$1 as SandboxController, layer$15 as layer, make$4 as make };
|
|
988
988
|
}
|
|
989
989
|
interface CreateInput$2<CreateConfig, RuntimeConfig extends driver_d_exports.SandboxDriver.RuntimeConfigBase> {
|
|
990
990
|
readonly driver: driver_d_exports.SandboxDriver.Definition<CreateConfig, RuntimeConfig>;
|
|
@@ -1036,7 +1036,7 @@ interface Options$5 {
|
|
|
1036
1036
|
readonly provisioningTimeoutMs?: number;
|
|
1037
1037
|
}
|
|
1038
1038
|
declare const make$4: (options: Options$5) => Effect.Effect<Interface$15, errors_d_exports.SandboxDriverRegistrationError, Registry | import("effect/Scope").Scope | SqlClient.SqlClient>;
|
|
1039
|
-
declare const layer$
|
|
1039
|
+
declare const layer$15: (options: Options$5) => Layer.Layer<Controller, errors_d_exports.SandboxDriverRegistrationError, Registry | SqlClient.SqlClient>;
|
|
1040
1040
|
//#endregion
|
|
1041
1041
|
//#region src/sandbox/sandbox.d.ts
|
|
1042
1042
|
/**
|
|
@@ -1053,7 +1053,7 @@ type Provides = io_d_exports.SandboxIO.Provides;
|
|
|
1053
1053
|
/** A sandbox is any Layer providing the runtime services above. */
|
|
1054
1054
|
type Sandbox<E = never, RIn = never> = Layer.Layer<Provides, E, RIn>;
|
|
1055
1055
|
declare namespace git_d_exports {
|
|
1056
|
-
export { AppProcessError, git_d_exports as Git, Interface$14 as Interface, Result$1 as Result, RevParse, Service$15 as Service, defaultLayer$5 as defaultLayer, layer$
|
|
1056
|
+
export { AppProcessError, git_d_exports as Git, Interface$14 as Interface, Result$1 as Result, RevParse, Service$15 as Service, defaultLayer$5 as defaultLayer, layer$14 as layer, layerWith$6 as layerWith, resolvePath };
|
|
1057
1057
|
}
|
|
1058
1058
|
declare const AppProcessError_base: Schema.Class<AppProcessError, Schema.TaggedStruct<"AppProcessError", {
|
|
1059
1059
|
readonly command: Schema.String;
|
|
@@ -1098,7 +1098,7 @@ interface Interface$14 {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
declare const Service_base$13: Context.ServiceClass<Service$15, "@codeworksh/harness/git/git/Service", Interface$14>;
|
|
1100
1100
|
declare class Service$15 extends Service_base$13 {}
|
|
1101
|
-
declare const layer$
|
|
1101
|
+
declare const layer$14: Layer.Layer<Service$15, never, import("@codeworksh/plugin/sandbox/shell").Shell>;
|
|
1102
1102
|
/**
|
|
1103
1103
|
* Run git inside the given sandbox — local, remote, or virtual. Every command
|
|
1104
1104
|
* goes through the sandbox shell, so git never executes anywhere other than
|
|
@@ -1114,7 +1114,7 @@ declare const defaultLayer$5: (rootPath: string) => Layer.Layer<Service$15, neve
|
|
|
1114
1114
|
declare function resolvePath(cwd: string, value: string): string;
|
|
1115
1115
|
import * as import__codeworksh_plugin_repo from "@codeworksh/plugin/repo";
|
|
1116
1116
|
declare namespace repo_d_exports {
|
|
1117
|
-
export { Identity, Interface$13 as Interface, MARKER, repo_d_exports as Repo, Service$14 as Service, defaultLayer$4 as defaultLayer, layer$
|
|
1117
|
+
export { Identity, Interface$13 as Interface, MARKER, repo_d_exports as Repo, Service$14 as Service, defaultLayer$4 as defaultLayer, layer$13 as layer, layerWith$5 as layerWith, normalize };
|
|
1118
1118
|
}
|
|
1119
1119
|
/** Per-clone file under the store that pins the project id (see PROJECT.md §1 "marker"). */
|
|
1120
1120
|
declare const MARKER = "codework";
|
|
@@ -1139,11 +1139,11 @@ declare class Service$14 extends Service_base$12 {}
|
|
|
1139
1139
|
* `file:` urls and empty input yield undefined.
|
|
1140
1140
|
*/
|
|
1141
1141
|
declare function normalize(url: string): string | undefined;
|
|
1142
|
-
declare const layer$
|
|
1142
|
+
declare const layer$13: Layer.Layer<Service$14, never, import("@codeworksh/plugin/sandbox/filesystem").Service | Service$15>;
|
|
1143
1143
|
declare const layerWith$5: <E, RIn>(sandbox: Sandbox.Sandbox<E, RIn>) => Layer.Layer<Service$14, E, RIn>;
|
|
1144
1144
|
declare const defaultLayer$4: (rootPath: string) => Layer.Layer<Service$14, never, never>;
|
|
1145
1145
|
declare namespace space_d_exports {
|
|
1146
|
-
export { AbsorbInput, Interface$12 as Interface, RehomeInput, Service$13 as Service, space_d_exports as Space, archiveEnv, fromRow, id, layer$
|
|
1146
|
+
export { AbsorbInput, Interface$12 as Interface, RehomeInput, Service$13 as Service, space_d_exports as Space, archiveEnv, fromRow, id, layer$12 as layer, layerWith$4 as layerWith };
|
|
1147
1147
|
}
|
|
1148
1148
|
/** `hash(env, location)` — no project component (D-SPACEID). */
|
|
1149
1149
|
declare const id: (env: instance_d_exports.SandboxInstance.ID, location: string) => schema_d_exports$7.SpaceSchema.ID;
|
|
@@ -1182,10 +1182,10 @@ declare const fromRow: (row: SpaceRow) => schema_d_exports$7.SpaceSchema.Info;
|
|
|
1182
1182
|
* Write-first so a DEFERRED transaction takes the write lock immediately.
|
|
1183
1183
|
*/
|
|
1184
1184
|
declare const archiveEnv: (env: string & import("effect/Brand").Brand<"SandboxInstance.ID">) => Effect.Effect<void, never, SqlClient.SqlClient>;
|
|
1185
|
-
declare const layer$
|
|
1185
|
+
declare const layer$12: Layer.Layer<Service$13, never, io_d_exports.SandboxIO.Current | import("@codeworksh/plugin/sandbox/filesystem").Service | SqlClient.SqlClient>;
|
|
1186
1186
|
declare const layerWith$4: <E, RIn>(sandbox: Sandbox.Sandbox<E, RIn>) => Layer.Layer<Service$13, E, RIn | SqlClient.SqlClient>;
|
|
1187
1187
|
declare namespace worktree_d_exports {
|
|
1188
|
-
export { Entry$2 as Entry, Input$1 as Input, Interface$11 as Interface, Service$12 as Service, worktree_d_exports as Worktree, WorktreeError, defaultLayer$3 as defaultLayer, layer$
|
|
1188
|
+
export { Entry$2 as Entry, Input$1 as Input, Interface$11 as Interface, Service$12 as Service, worktree_d_exports as Worktree, WorktreeError, defaultLayer$3 as defaultLayer, layer$11 as layer, layerWith$3 as layerWith };
|
|
1189
1189
|
}
|
|
1190
1190
|
declare const WorktreeError_base: Schema.Class<WorktreeError, Schema.TaggedStruct<"Worktree.WorktreeError", {
|
|
1191
1191
|
readonly operation: Schema.Literals<readonly ["add", "remove", "list"]>;
|
|
@@ -1214,11 +1214,11 @@ interface Interface$11 {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
declare const Service_base$10: Context.ServiceClass<Service$12, "@codeworksh/harness/worktree/worktree/Service", Interface$11>;
|
|
1216
1216
|
declare class Service$12 extends Service_base$10 {}
|
|
1217
|
-
declare const layer$
|
|
1217
|
+
declare const layer$11: Layer.Layer<Service$12, never, import("@codeworksh/plugin/sandbox/filesystem").Service | Service$15>;
|
|
1218
1218
|
declare const layerWith$3: <E, RIn>(sandbox: Sandbox.Sandbox<E, RIn>) => Layer.Layer<Service$12, E, RIn>;
|
|
1219
1219
|
declare const defaultLayer$3: (rootPath: string) => Layer.Layer<Service$12, never, never>;
|
|
1220
1220
|
declare namespace project_d_exports {
|
|
1221
|
-
export { Interface$10 as Interface, project_d_exports as Project, Resolved$2 as Resolved, Service$11 as Service, defaultLayer$2 as defaultLayer, layer$
|
|
1221
|
+
export { Interface$10 as Interface, project_d_exports as Project, Resolved$2 as Resolved, Service$11 as Service, defaultLayer$2 as defaultLayer, layer$10 as layer, layerWith$2 as layerWith, provisional };
|
|
1222
1222
|
}
|
|
1223
1223
|
/** Deterministic, env-local id for a directory without a portable identity. Never written to a marker. */
|
|
1224
1224
|
declare const provisional: (env: instance_d_exports.SandboxInstance.ID, location: string) => schema_d_exports$9.ProjectSchema.ID;
|
|
@@ -1237,14 +1237,14 @@ interface Interface$10 {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
declare const Service_base$9: Context.ServiceClass<Service$11, "@codeworksh/harness/project/project/Service", Interface$10>;
|
|
1239
1239
|
declare class Service$11 extends Service_base$9 {}
|
|
1240
|
-
declare const layer$
|
|
1240
|
+
declare const layer$10: Layer.Layer<Service$11, never, io_d_exports.SandboxIO.Current | import("@codeworksh/plugin/sandbox/filesystem").Service | Service$13 | Service$14 | Service$12 | SqlClient.SqlClient>;
|
|
1241
1241
|
/** Takes an assembled sandbox — local or remote — not a local backend. */
|
|
1242
1242
|
declare const layerWith$2: <E, RIn>(sandbox: Sandbox.Sandbox<E, RIn>) => Layer.Layer<Service$11, E | import("effect/Config").ConfigError, Exclude<RIn, SqlClient.SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient>>;
|
|
1243
1243
|
declare const defaultLayer$2: (path: string) => Layer.Layer<Service$11, import("effect/Config").ConfigError, never>;
|
|
1244
1244
|
declare namespace location_d_exports {
|
|
1245
|
-
export { DirectoryNotFoundError, Error, Info$5 as Info, Interface$9 as Interface, location_d_exports as Location, NotDirectoryError, Ref$2 as Ref, Service$10 as Service, defaultLayer$1 as defaultLayer, layer$
|
|
1245
|
+
export { DirectoryNotFoundError, Error, Info$5 as Info, Interface$9 as Interface, location_d_exports as Location, NotDirectoryError, Ref$2 as Ref, Service$10 as Service, defaultLayer$1 as defaultLayer, layer$9 as layer, layerMounted, layerWith$1 as layerWith };
|
|
1246
1246
|
}
|
|
1247
|
-
declare const layer$
|
|
1247
|
+
declare const layer$9: (ref?: Ref$1) => Layer.Layer<Service, import("@codeworksh/plugin/location").Error, io_d_exports.SandboxIO.Current | Service$11>;
|
|
1248
1248
|
/**
|
|
1249
1249
|
* `layer` with the whole resolution stack (Project, Space, Repo, Worktree, Git)
|
|
1250
1250
|
* folded in. What remains is exactly the mount and the database — for callers
|
|
@@ -1254,7 +1254,7 @@ declare const layerMounted: (ref?: Ref$1) => Layer.Layer<Service, import("@codew
|
|
|
1254
1254
|
declare const layerWith$1: <E, RIn>(ref: Ref$1, sandbox: Sandbox.Sandbox<E, RIn>) => Layer.Layer<Service, E | import("effect/Config").ConfigError | import("@codeworksh/plugin/location").Error, Exclude<RIn, SqlClient$1.SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient>>;
|
|
1255
1255
|
declare const defaultLayer$1: (ref: Ref$1, path: string) => Layer.Layer<Service, import("effect/Config").ConfigError | import("@codeworksh/plugin/location").Error, never>;
|
|
1256
1256
|
declare namespace global_d_exports {
|
|
1257
|
-
export { global_d_exports as Global, Interface$8 as Interface, Service$9 as Service, app, appConfigDir, authFile, defaultLayer, homeConfig, layer$
|
|
1257
|
+
export { global_d_exports as Global, Interface$8 as Interface, Service$9 as Service, app, appConfigDir, authFile, defaultLayer, homeConfig, layer$8 as layer, layerWith, make$3 as make, resolve$3 as resolve };
|
|
1258
1258
|
}
|
|
1259
1259
|
declare const appConfigDir = ".codework";
|
|
1260
1260
|
declare const app = "codework";
|
|
@@ -1279,14 +1279,18 @@ declare function make$3(input?: Partial<Interface$8>): Interface$8;
|
|
|
1279
1279
|
*/
|
|
1280
1280
|
declare const authFile: (home: string | undefined) => string | undefined;
|
|
1281
1281
|
declare const resolve$3: (input?: Partial<Interface$8> | undefined) => Effect.Effect<Interface$8, Config.ConfigError, never>;
|
|
1282
|
-
declare const layer$
|
|
1282
|
+
declare const layer$8: Layer.Layer<Service$9, Config.ConfigError, never>;
|
|
1283
1283
|
declare const defaultLayer: Layer.Layer<Service$9, Config.ConfigError, never>;
|
|
1284
1284
|
declare const layerWith: (input: Partial<Interface$8>) => Layer.Layer<Service$9, Config.ConfigError, never>;
|
|
1285
1285
|
import * as import__codeworksh_plugin_settings from "@codeworksh/plugin/settings";
|
|
1286
1286
|
declare namespace settings_d_exports {
|
|
1287
|
-
export { Interface$7 as Interface, Options$4 as Options, Service$8 as Service, settings_d_exports as Settings, SettingsError, schema_d_exports$4.defaults as defaults, layer$
|
|
1287
|
+
export { Interface$7 as Interface, Options$4 as Options, Service$8 as Service, settings_d_exports as Settings, SettingsError, schema_d_exports$4.defaults as defaults, layer$7 as layer, load$1 as load, modules, parse$1 as parse, paths, projectRoot, userConfigDir };
|
|
1288
1288
|
}
|
|
1289
1289
|
interface Options$4 {
|
|
1290
|
+
/**
|
|
1291
|
+
* `--user-config-dir`, already absolute ({@link userConfigDir}): the directory whose settings
|
|
1292
|
+
* file replaces the user layer's.
|
|
1293
|
+
*/
|
|
1290
1294
|
readonly userConfigDir?: string;
|
|
1291
1295
|
/**
|
|
1292
1296
|
* The host directory this load discovers the project layer from, supplied by the caller --
|
|
@@ -1302,6 +1306,12 @@ interface Options$4 {
|
|
|
1302
1306
|
*/
|
|
1303
1307
|
readonly hostDir?: string | undefined;
|
|
1304
1308
|
}
|
|
1309
|
+
/**
|
|
1310
|
+
* An app-level `--user-config-dir` as the absolute directory it names: `~` is the user's home, and
|
|
1311
|
+
* a relative spelling is relative to `hostCwd` -- never to a session's `hostDir`, which is not
|
|
1312
|
+
* where the flag was typed.
|
|
1313
|
+
*/
|
|
1314
|
+
declare const userConfigDir: (raw: string, hostCwd: string) => string;
|
|
1305
1315
|
/**
|
|
1306
1316
|
* The project a directory is in: the nearest ancestor holding a `.codework` **directory**.
|
|
1307
1317
|
*
|
|
@@ -1336,9 +1346,8 @@ declare function paths(input: {
|
|
|
1336
1346
|
readonly home: string;
|
|
1337
1347
|
/** The project root, from {@link projectRoot}. */
|
|
1338
1348
|
readonly root?: string | undefined;
|
|
1339
|
-
/**
|
|
1340
|
-
readonly
|
|
1341
|
-
readonly custom?: string | undefined;
|
|
1349
|
+
/** `--user-config-dir`, absolute ({@link userConfigDir}): replaces the home's settings. */
|
|
1350
|
+
readonly userConfigDir?: string | undefined;
|
|
1342
1351
|
}): ReadonlyArray<ReadonlyArray<string>>;
|
|
1343
1352
|
declare const SettingsError_base: Schema.Class<SettingsError, Schema.TaggedStruct<"SettingsError", {
|
|
1344
1353
|
readonly path: Schema.String;
|
|
@@ -1565,10 +1574,20 @@ declare const load$1: (options: Options$4 & {
|
|
|
1565
1574
|
})[];
|
|
1566
1575
|
declared: readonly schema_d_exports$4.Declared[];
|
|
1567
1576
|
}, SettingsError, never>;
|
|
1568
|
-
|
|
1577
|
+
/**
|
|
1578
|
+
* Each module reference once, owned by the **last** file to declare it (D6).
|
|
1579
|
+
*
|
|
1580
|
+
* The owner is not bookkeeping: its `.npmrc` chain keys the store artifact. The CLI that installs
|
|
1581
|
+
* a reference and the runtime that loads it must pick the same owner, or `plugin update` refreshes
|
|
1582
|
+
* an artifact the runtime never reads. Only a string entry loads a module, so only a string entry
|
|
1583
|
+
* owns one -- a `{ package }` patch in another file configures it and must not move its registry.
|
|
1584
|
+
* A reference keeps the position of its first declaration.
|
|
1585
|
+
*/
|
|
1586
|
+
declare const modules: (declared: ReadonlyArray<schema_d_exports$4.Declared>) => ReadonlyMap<string, schema_d_exports$4.Declared>;
|
|
1587
|
+
declare const layer$7: (options?: Omit<Options$4, "hostDir">) => Layer.Layer<Service$8, never, Service$9>;
|
|
1569
1588
|
import * as import__codeworksh_plugin_plugin from "@codeworksh/plugin/plugin";
|
|
1570
1589
|
declare namespace registry_d_exports {
|
|
1571
|
-
export { EventRegistrationError, registry_d_exports as EventRegistry, Interface$6 as Interface, Service$7 as Service, flatten, layer$
|
|
1590
|
+
export { EventRegistrationError, registry_d_exports as EventRegistry, Interface$6 as Interface, Service$7 as Service, flatten, layer$6 as layer };
|
|
1572
1591
|
}
|
|
1573
1592
|
/**
|
|
1574
1593
|
* Every event definition this harness knows: the kernel's, plus whatever the
|
|
@@ -1598,7 +1617,7 @@ declare class EventRegistrationError extends EventRegistrationError_base {}
|
|
|
1598
1617
|
* hide it behind plugin ordering.
|
|
1599
1618
|
*/
|
|
1600
1619
|
declare const flatten: (plugins: readonly plugin_d_exports.Plugin[]) => Effect.Effect<readonly schema_d_exports$10.EventSchema.Definition<string, Schema.Codec<unknown, unknown, never, never>>[], EventRegistrationError, never>;
|
|
1601
|
-
declare const layer$
|
|
1620
|
+
declare const layer$6: (definitions?: ReadonlyArray<schema_d_exports$10.EventSchema.Definition>) => Layer.Layer<Service$7, never, never>;
|
|
1602
1621
|
//#endregion
|
|
1603
1622
|
//#region src/plugin/error.d.ts
|
|
1604
1623
|
declare const SourceError_base: Schema.Class<SourceError, Schema.TaggedStruct<"PluginSourceError", {
|
|
@@ -1686,6 +1705,11 @@ type Fetchable = Exclude<Target, {
|
|
|
1686
1705
|
declare const parse: (reference: string, from: string) => Effect.Effect<Target, SourceError>;
|
|
1687
1706
|
//#endregion
|
|
1688
1707
|
//#region src/plugin/loader.d.ts
|
|
1708
|
+
/**
|
|
1709
|
+
* The name a local package declares, read without importing it: the alias the catalog registers
|
|
1710
|
+
* for it, so a `{ package }` entry and a command naming the package both reach it.
|
|
1711
|
+
*/
|
|
1712
|
+
declare const localName: (location: string) => Effect.Effect<string | undefined>;
|
|
1689
1713
|
interface Options$3 {
|
|
1690
1714
|
readonly cache: string;
|
|
1691
1715
|
/**
|
|
@@ -1807,7 +1831,7 @@ interface Origin {
|
|
|
1807
1831
|
readonly file?: string;
|
|
1808
1832
|
}
|
|
1809
1833
|
declare namespace runtime_d_exports {
|
|
1810
|
-
export { Bindings, Interface$5 as Interface, Service$6 as Service, runtime_d_exports as SessionRuntime, layer$
|
|
1834
|
+
export { Bindings, Interface$5 as Interface, Service$6 as Service, runtime_d_exports as SessionRuntime, layer$5 as layer };
|
|
1811
1835
|
}
|
|
1812
1836
|
/**
|
|
1813
1837
|
* Per-session configuration, held in process.
|
|
@@ -1824,7 +1848,7 @@ interface Interface$5 {
|
|
|
1824
1848
|
}
|
|
1825
1849
|
declare const Service_base$5: Context.ServiceClass<Service$6, "@codeworksh/harness/session/runtime/Service", Interface$5>;
|
|
1826
1850
|
declare class Service$6 extends Service_base$5 {}
|
|
1827
|
-
declare const layer$
|
|
1851
|
+
declare const layer$5: Layer.Layer<Service$6, never, never>;
|
|
1828
1852
|
import * as import__codeworksh_plugin_plugin_tool from "@codeworksh/plugin/plugin/tool";
|
|
1829
1853
|
import * as import__codeworksh_plugin_tool_progress from "@codeworksh/plugin/tool/progress";
|
|
1830
1854
|
import * as import__codeworksh_plugin_tool from "@codeworksh/plugin/tool";
|
|
@@ -1926,7 +1950,7 @@ interface Resolved$1 {
|
|
|
1926
1950
|
readonly handle: Executor["handle"];
|
|
1927
1951
|
}
|
|
1928
1952
|
declare namespace state_d_exports {
|
|
1929
|
-
export { Interface$4 as Interface, Options$2 as Options, Reloaded, RequestOptions, Service$5 as Service, Snapshot$1 as Snapshot, SnapshotError, state_d_exports as State, ToolExecutionMode, layer$
|
|
1953
|
+
export { Interface$4 as Interface, Options$2 as Options, Reloaded, RequestOptions, Service$5 as Service, Snapshot$1 as Snapshot, SnapshotError, state_d_exports as State, ToolExecutionMode, layer$4 as layer };
|
|
1930
1954
|
}
|
|
1931
1955
|
/**
|
|
1932
1956
|
* How a turn's tool calls are scheduled once the array has been re-read.
|
|
@@ -2060,27 +2084,37 @@ declare class Service$5 extends Service_base$4 {}
|
|
|
2060
2084
|
* `references` says which entries the config pass walks. It is a function of the settings that
|
|
2061
2085
|
* exchange read, so a caller that pinned an explicit list keeps it and everyone else follows the
|
|
2062
2086
|
* files.
|
|
2087
|
+
*
|
|
2088
|
+
* `pool` is the **process view**: what boot loaded from the user layers. A session in a project
|
|
2089
|
+
* runs from that project's own view, a pool created from the process view the first time the
|
|
2090
|
+
* project is seen and moved only by its own sessions. The same spec can be owned by different
|
|
2091
|
+
* files -- and so name different registries -- in two views; one shared pool could hold only one of
|
|
2092
|
+
* those builds, and sessions in different projects would keep evicting each other's.
|
|
2063
2093
|
*/
|
|
2064
|
-
declare const layer$
|
|
2094
|
+
declare const layer$4: (options: Options$2, pool: Ref.Ref<Pool>, references: (settings: schema_d_exports$4.Info) => ReadonlyArray<PluginRef>,
|
|
2065
2095
|
/**
|
|
2066
2096
|
* The exchange-boundary check: the new pool when the store has moved, nothing when it has not.
|
|
2067
2097
|
* State does not know what a store is, so whoever built the pool answers this.
|
|
2068
2098
|
*/
|
|
2069
|
-
follow: (refs: ReadonlyArray<PluginRef>, current: Pool, settings: schema_d_exports$4.Info
|
|
2099
|
+
follow: (refs: ReadonlyArray<PluginRef>, current: Pool, settings: schema_d_exports$4.Info,
|
|
2100
|
+
/** The view's project root, whose host directory the view resolves against. */
|
|
2101
|
+
root: string | undefined) => Effect.Effect<Option.Option<Pool>, {
|
|
2070
2102
|
readonly message: string;
|
|
2071
2103
|
}>,
|
|
2072
2104
|
/**
|
|
2073
2105
|
* A full load pass, told to re-import even where nothing looks different. Resolve-only, like
|
|
2074
2106
|
* `follow`: reload re-imports what is on disk, it does not fetch.
|
|
2075
2107
|
*
|
|
2076
|
-
* It takes
|
|
2077
|
-
*
|
|
2078
|
-
*
|
|
2079
|
-
* caller
|
|
2108
|
+
* It takes a view rather than references and reads that view's settings itself, because the set
|
|
2109
|
+
* it must produce is the view's -- every module any of its sessions has named -- and State only
|
|
2110
|
+
* ever sees one session. Handing it `references` from here would quietly narrow the pool to
|
|
2111
|
+
* whatever the caller declares, and drop what the view's other sessions loaded on the floor.
|
|
2080
2112
|
*/
|
|
2081
|
-
rebuild: () => Effect.Effect<Pool, {
|
|
2113
|
+
rebuild: (root: string | undefined, current: Pool) => Effect.Effect<Pool, {
|
|
2082
2114
|
readonly message: string;
|
|
2083
|
-
}
|
|
2115
|
+
}>,
|
|
2116
|
+
/** The view a session in `hostDir` runs from: its project root, or the process view. */
|
|
2117
|
+
viewOf?: (hostDir: string | undefined) => Effect.Effect<string | undefined>) => Layer.Layer<Service$5, never, Service$17 | Service$16 | Service$8 | Service$7 | Service$6>;
|
|
2084
2118
|
declare namespace run_d_exports {
|
|
2085
2119
|
export { Interface$3 as Interface, LLMStreamError, ModelCatalogError, ModelNotFoundError, ProviderAuthenticationError, ProviderAuthorizationError, ProviderConfigurationError, ProviderContentPolicyError, ProviderError, ProviderFailureReason, ProviderInvalidRequestError, ProviderInvalidResponseError, ProviderModelUnavailableError, ProviderQuotaError, ProviderRateLimitError, ProviderTimeoutError, ProviderTransportError, ProviderUnavailableError, ProviderUnknownError, RunError, run_d_exports as Runner, SandboxDirectoryNotFoundError, Service$4 as Service };
|
|
2086
2120
|
}
|
|
@@ -2954,7 +2988,7 @@ declare const decodeMessage: (hydrated: HydratedEntry) => Effect.Effect<{
|
|
|
2954
2988
|
messageId: string;
|
|
2955
2989
|
}, ContextDecodeError, never>;
|
|
2956
2990
|
declare namespace context_d_exports {
|
|
2957
|
-
export { context_d_exports as Context, assemble_d_exports as ContextAssembly, codec_d_exports as ContextCodec, ContextDecodeError, ContextEncodeError, ContextInvariantError, ContextReadError, EncodedMessage, Interface$1 as Interface, Service$2 as Service, Snapshot, assemblePath, decodeMessage, decodeSyntheticMessage, encodeMessage, encodePart, layer$
|
|
2991
|
+
export { context_d_exports as Context, assemble_d_exports as ContextAssembly, codec_d_exports as ContextCodec, ContextDecodeError, ContextEncodeError, ContextInvariantError, ContextReadError, EncodedMessage, Interface$1 as Interface, Service$2 as Service, Snapshot, assemblePath, decodeMessage, decodeSyntheticMessage, encodeMessage, encodePart, layer$3 as layer, validateUserMessage };
|
|
2958
2992
|
}
|
|
2959
2993
|
type ContextReadError = SessionNotFoundError | ContextDecodeError;
|
|
2960
2994
|
interface Interface$1 {
|
|
@@ -2962,7 +2996,7 @@ interface Interface$1 {
|
|
|
2962
2996
|
}
|
|
2963
2997
|
declare const Service_base$1: Context.ServiceClass<Service$2, "@codeworksh/harness/context/context/Service", Interface$1>;
|
|
2964
2998
|
declare class Service$2 extends Service_base$1 {}
|
|
2965
|
-
declare const layer$
|
|
2999
|
+
declare const layer$3: Layer.Layer<Service$2, never, Service$16>;
|
|
2966
3000
|
//#endregion
|
|
2967
3001
|
//#region src/session/input/schema.d.ts
|
|
2968
3002
|
declare const Admitted: Schema.Struct<{
|
|
@@ -2994,7 +3028,7 @@ declare namespace schema_d_exports$2 {
|
|
|
2994
3028
|
export { ID, schema_d_exports$2 as SessionMessageSchema };
|
|
2995
3029
|
}
|
|
2996
3030
|
declare namespace control_d_exports {
|
|
2997
|
-
export { control_d_exports as Control, Interface, PromptConflictError, PromptInput$1 as PromptInput, Service$1 as Service, layer$
|
|
3031
|
+
export { control_d_exports as Control, Interface, PromptConflictError, PromptInput$1 as PromptInput, Service$1 as Service, layer$2 as layer };
|
|
2998
3032
|
}
|
|
2999
3033
|
declare const PromptConflictError_base: Schema.Class<PromptConflictError, Schema.TaggedStruct<"PromptConflictError", {
|
|
3000
3034
|
readonly sessionId: Schema.String;
|
|
@@ -3046,7 +3080,7 @@ interface Interface {
|
|
|
3046
3080
|
}
|
|
3047
3081
|
declare const Service_base: Context.ServiceClass<Service$1, "@codeworksh/harness/control/Service", Interface>;
|
|
3048
3082
|
declare class Service$1 extends Service_base {}
|
|
3049
|
-
declare const layer$
|
|
3083
|
+
declare const layer$2: Layer.Layer<Service$1, never, Service$17 | Service$16 | Service$3 | import("effect/unstable/sql/SqlClient").SqlClient>;
|
|
3050
3084
|
declare namespace event_d_exports$1 {
|
|
3051
3085
|
export { event_d_exports$1 as LLMEventPublisher, Publisher, Terminal, make$1 as make };
|
|
3052
3086
|
}
|
|
@@ -3171,7 +3205,7 @@ interface Options$1 {
|
|
|
3171
3205
|
declare const load: (entry: Entry$1, options: Options$1) => Effect.Effect<driver_d_exports.SandboxDriver.Registration, errors_d_exports.SandboxDriverLoadError, never>;
|
|
3172
3206
|
declare const loadAll: (entries: ReadonlyArray<Entry$1>, options: Options$1) => Effect.Effect<ReadonlyArray<driver_d_exports.SandboxDriver.Registration>, errors_d_exports.SandboxDriverLoadError>;
|
|
3173
3207
|
declare namespace harness_d_exports {
|
|
3174
|
-
export { harness_d_exports as Harness, Options, layer };
|
|
3208
|
+
export { harness_d_exports as Harness, Options, layer$1 as layer };
|
|
3175
3209
|
}
|
|
3176
3210
|
interface Options {
|
|
3177
3211
|
/**
|
|
@@ -3183,20 +3217,33 @@ interface Options {
|
|
|
3183
3217
|
readonly database?: string;
|
|
3184
3218
|
/**
|
|
3185
3219
|
* The process-level host directory: the default sandbox mount, the `.npmrc`/parse fallback
|
|
3186
|
-
* for plugin references no file declared, and the base a relative
|
|
3220
|
+
* for plugin references no file declared, and the base a relative `home` or `userConfigDir`
|
|
3187
3221
|
* resolves against. Defaults to the OS process's directory. It is never a project-settings
|
|
3188
|
-
* root -- that discovery belongs to a session's `hostDir`.
|
|
3222
|
+
* root -- that discovery belongs to a session's `hostDir` -- and never a sandbox `cwd`.
|
|
3189
3223
|
*/
|
|
3190
3224
|
readonly hostCwd?: string;
|
|
3225
|
+
/**
|
|
3226
|
+
* `--home`: the shared, user-wide home -- `~/.codework` by default -- holding the user
|
|
3227
|
+
* settings, credentials, plugin cache and data.
|
|
3228
|
+
*/
|
|
3191
3229
|
readonly home?: string;
|
|
3192
|
-
/**
|
|
3230
|
+
/**
|
|
3231
|
+
* `--user-config-dir`: a hard override of the user settings file only. Its `settings.jsonc`
|
|
3232
|
+
* is read *instead of* the home's; the project layer still sits above it, and everything else
|
|
3233
|
+
* the home holds stays in the home.
|
|
3234
|
+
*/
|
|
3193
3235
|
readonly userConfigDir?: string;
|
|
3194
3236
|
readonly sandboxes?: ReadonlyArray<Entry$1>;
|
|
3195
3237
|
readonly llm?: Open;
|
|
3238
|
+
/**
|
|
3239
|
+
* Keep `<home>/models.gen.json` fresh for the life of the process, as a server does.
|
|
3240
|
+
* Otherwise it is checked once, at boot.
|
|
3241
|
+
*/
|
|
3242
|
+
readonly watchModels?: boolean;
|
|
3196
3243
|
}
|
|
3197
|
-
declare const layer: (options?: Options) => Layer.Layer<Controller | Registry | Service$9 | Service$17 | Service$16 | Service$2 | Service$8 | Service$7 | Service$6 | Service$5 | Service$3 | Service$1 | SqlClient$1.SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient, import("effect/Config").ConfigError | EventRegistrationError | InstallError | LoadError | import("@codeworksh/plugin/sandbox/errors").SandboxDriverLoadError | import("@codeworksh/plugin/sandbox/errors").SandboxDriverRegistrationError | SettingsError | SourceError | StoreError, never>;
|
|
3244
|
+
declare const layer$1: (options?: Options) => Layer.Layer<Controller | Registry | Service$9 | Service$17 | Service$16 | Service$2 | Service$8 | Service$7 | Service$6 | Service$5 | Service$3 | Service$1 | SqlClient$1.SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient, import("effect/Config").ConfigError | EventRegistrationError | InstallError | LoadError | import("@codeworksh/plugin/sandbox/errors").SandboxDriverLoadError | import("@codeworksh/plugin/sandbox/errors").SandboxDriverRegistrationError | SettingsError | SourceError | StoreError, never>;
|
|
3198
3245
|
declare namespace sandbox_d_exports {
|
|
3199
|
-
export { CreateInput$1 as CreateInput, Driver, DriverInfo, Info$2 as Info, RegisterInput, sandbox_d_exports as Sandbox, instance_d_exports.SandboxInstance as SandboxInstance, Selection, create$2 as create, destroy, drivers, get$1 as get, list, refresh, register, resolve$1 as resolve, stop, wake };
|
|
3246
|
+
export { CreateInput$1 as CreateInput, Driver, DriverInfo, Info$2 as Info, RegisterInput, sandbox_d_exports as Sandbox, instance_d_exports.SandboxInstance as SandboxInstance, Selection, create$2 as create, destroy, drivers, get$1 as get, list, refresh$1 as refresh, register, resolve$1 as resolve, stop, wake };
|
|
3200
3247
|
}
|
|
3201
3248
|
type Info$2 = instance_d_exports.SandboxInstance.Info;
|
|
3202
3249
|
type Driver = Entry$1;
|
|
@@ -3240,7 +3287,7 @@ declare const list: (input?: {
|
|
|
3240
3287
|
readonly driver?: string;
|
|
3241
3288
|
readonly status?: instance_d_exports.SandboxInstance.Status;
|
|
3242
3289
|
} | undefined) => Effect.Effect<readonly instance_d_exports.SandboxInstance.Info[], never, Controller>;
|
|
3243
|
-
declare const refresh: (id: string & import("effect/Brand").Brand<"SandboxInstance.ID">) => Effect.Effect<instance_d_exports.SandboxInstance.Info, import("@codeworksh/plugin/sandbox/errors").SandboxRefreshError, Controller>;
|
|
3290
|
+
declare const refresh$1: (id: string & import("effect/Brand").Brand<"SandboxInstance.ID">) => Effect.Effect<instance_d_exports.SandboxInstance.Info, import("@codeworksh/plugin/sandbox/errors").SandboxRefreshError, Controller>;
|
|
3244
3291
|
declare const wake: (id: string & import("effect/Brand").Brand<"SandboxInstance.ID">) => Effect.Effect<instance_d_exports.SandboxInstance.Info, import("@codeworksh/plugin/sandbox/errors").SandboxWakeError, Controller>;
|
|
3245
3292
|
declare const stop: (id: string & import("effect/Brand").Brand<"SandboxInstance.ID">) => Effect.Effect<instance_d_exports.SandboxInstance.Info, import("@codeworksh/plugin/sandbox/errors").SandboxStopError, Controller>;
|
|
3246
3293
|
declare const destroy: (id: string & import("effect/Brand").Brand<"SandboxInstance.ID">) => Effect.Effect<void, import("@codeworksh/plugin/sandbox/errors").SandboxDestroyError, Controller>;
|
|
@@ -23176,6 +23223,129 @@ declare const DurableDefinitions: readonly [Schema.Struct<{
|
|
|
23176
23223
|
}>, Schema.Unknown, never, never>;
|
|
23177
23224
|
}>;
|
|
23178
23225
|
}];
|
|
23226
|
+
declare namespace catalog_d_exports {
|
|
23227
|
+
export { catalog_d_exports as ModelCatalog, RefreshError, Status, filename, layer, loadError, models, providers, refresh, sync, ttlConfig };
|
|
23228
|
+
}
|
|
23229
|
+
declare const filename = "models.gen.json";
|
|
23230
|
+
/** How old the catalog may get before a check downloads a new one. */
|
|
23231
|
+
declare const ttlConfig: Config.Config<Duration.Duration>;
|
|
23232
|
+
declare const RefreshError_base: Schema.Class<RefreshError, Schema.TaggedStruct<"ModelCatalog.RefreshError", {
|
|
23233
|
+
readonly path: Schema.String;
|
|
23234
|
+
readonly detail: Schema.String;
|
|
23235
|
+
}>, import("effect/Cause").YieldableError>;
|
|
23236
|
+
declare class RefreshError extends RefreshError_base {
|
|
23237
|
+
get message(): string;
|
|
23238
|
+
}
|
|
23239
|
+
interface Status {
|
|
23240
|
+
readonly path: string;
|
|
23241
|
+
/** False when the catalog was fresh enough to keep. */
|
|
23242
|
+
readonly refreshed: boolean;
|
|
23243
|
+
}
|
|
23244
|
+
/** Download a new catalog for the home when it is missing, older than the TTL, or `force` asks. */
|
|
23245
|
+
declare const refresh: (home: string, options?: {
|
|
23246
|
+
readonly force?: boolean;
|
|
23247
|
+
} | undefined) => Effect.Effect<{
|
|
23248
|
+
path: string;
|
|
23249
|
+
refreshed: false;
|
|
23250
|
+
} | {
|
|
23251
|
+
path: string;
|
|
23252
|
+
refreshed: true;
|
|
23253
|
+
}, Config.ConfigError | RefreshError, never>;
|
|
23254
|
+
/** Check the home's catalog once, for a command that runs and exits; returns the file aikit reads. */
|
|
23255
|
+
declare const sync: (home: string) => Effect.Effect<string, never, never>;
|
|
23256
|
+
/**
|
|
23257
|
+
* Check at boot, and with `watch`, keep checking for the life of the layer. A file whose mtime
|
|
23258
|
+
* moved -- refreshed here, by `codework models refresh`, or by hand -- is reloaded, so the
|
|
23259
|
+
* process never serves a catalog older than what is on disk.
|
|
23260
|
+
*/
|
|
23261
|
+
declare const layer: (options: {
|
|
23262
|
+
readonly home: string;
|
|
23263
|
+
readonly watch: boolean;
|
|
23264
|
+
}) => Layer.Layer<never, never, never>;
|
|
23265
|
+
/** Translate aikit's catalog failure, or undefined for anything else. */
|
|
23266
|
+
declare const loadError: (cause: unknown) => ModelCatalogError | undefined;
|
|
23267
|
+
declare const models: Effect.Effect<Partial<Record<string, Record<string, {
|
|
23268
|
+
api?: {
|
|
23269
|
+
id?: string;
|
|
23270
|
+
url?: string;
|
|
23271
|
+
method?: "chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses";
|
|
23272
|
+
};
|
|
23273
|
+
baseUrl: string;
|
|
23274
|
+
compat?: {
|
|
23275
|
+
supportsThinkingLevel?: boolean;
|
|
23276
|
+
supportsToolSearch?: boolean;
|
|
23277
|
+
supportsAdditionalTools?: boolean;
|
|
23278
|
+
supportsStrictMode?: boolean;
|
|
23279
|
+
supportsOpenAIGrammarTools?: boolean;
|
|
23280
|
+
supportsThinkingTokenBudget?: boolean;
|
|
23281
|
+
forceAdaptiveThinking?: boolean;
|
|
23282
|
+
thinkingTokenBudgetField?: string;
|
|
23283
|
+
};
|
|
23284
|
+
contextWindow: number;
|
|
23285
|
+
cost: {
|
|
23286
|
+
input: number;
|
|
23287
|
+
output: number;
|
|
23288
|
+
cacheRead: number;
|
|
23289
|
+
cacheWrite: number;
|
|
23290
|
+
tiers?: {
|
|
23291
|
+
input: number;
|
|
23292
|
+
output: number;
|
|
23293
|
+
cacheRead: number;
|
|
23294
|
+
cacheWrite: number;
|
|
23295
|
+
inputTokensAbove: number;
|
|
23296
|
+
}[];
|
|
23297
|
+
serviceTierMultipliers?: Record<string, number>;
|
|
23298
|
+
};
|
|
23299
|
+
headers?: Record<string, string>;
|
|
23300
|
+
id: string;
|
|
23301
|
+
input: ("image" | "text")[];
|
|
23302
|
+
maxTokens: number;
|
|
23303
|
+
name: string;
|
|
23304
|
+
npm?: string;
|
|
23305
|
+
options?: Record<string, unknown>;
|
|
23306
|
+
protocol: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23307
|
+
provider: {
|
|
23308
|
+
id: string;
|
|
23309
|
+
name: string;
|
|
23310
|
+
source: "api" | "config" | "custom" | "env" | "unknown";
|
|
23311
|
+
env: string[];
|
|
23312
|
+
key?: string;
|
|
23313
|
+
options?: Record<string, any>;
|
|
23314
|
+
};
|
|
23315
|
+
providerOptions?: Record<string, unknown>;
|
|
23316
|
+
providerOptionsKey?: string;
|
|
23317
|
+
reasoning: boolean;
|
|
23318
|
+
supportedProtocols?: {
|
|
23319
|
+
anthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23320
|
+
google?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23321
|
+
googleVertex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23322
|
+
googleVertexAnthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23323
|
+
githubCopilot?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23324
|
+
openai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23325
|
+
openaiCompatible?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23326
|
+
openaiCodex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23327
|
+
openrouter?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23328
|
+
xai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
|
|
23329
|
+
};
|
|
23330
|
+
thinkingBudgets?: {
|
|
23331
|
+
high?: number;
|
|
23332
|
+
low?: number;
|
|
23333
|
+
max?: number;
|
|
23334
|
+
medium?: number;
|
|
23335
|
+
minimal?: number;
|
|
23336
|
+
xhigh?: number;
|
|
23337
|
+
};
|
|
23338
|
+
thinkingLevelMap?: {
|
|
23339
|
+
high?: string | null;
|
|
23340
|
+
low?: string | null;
|
|
23341
|
+
max?: string | null;
|
|
23342
|
+
medium?: string | null;
|
|
23343
|
+
minimal?: string | null;
|
|
23344
|
+
off?: string | null;
|
|
23345
|
+
xhigh?: string | null;
|
|
23346
|
+
};
|
|
23347
|
+
}>>>, ModelCatalogError, never>;
|
|
23348
|
+
declare const providers: Effect.Effect<string[], ModelCatalogError, never>;
|
|
23179
23349
|
//#endregion
|
|
23180
23350
|
//#region src/plugin/host.d.ts
|
|
23181
23351
|
declare const SetupError_base: Schema.Class<SetupError, Schema.TaggedStruct<"Plugin.SetupError", {
|
|
@@ -23263,6 +23433,15 @@ interface Entry extends Marker {
|
|
|
23263
23433
|
/** A `file:` URL for the entrypoint, ready to import. */
|
|
23264
23434
|
readonly url: string;
|
|
23265
23435
|
}
|
|
23436
|
+
/**
|
|
23437
|
+
* The **full** SHA-256 of the source identity: canonical spec plus effective registry for a
|
|
23438
|
+
* registry package, and the canonical spec alone for git.
|
|
23439
|
+
*
|
|
23440
|
+
* Not truncated. The fast path proves a hit by checking that a marker *exists* rather than by
|
|
23441
|
+
* decoding it, and the index is keyed by digest alone, so a truncated digest would let a collision
|
|
23442
|
+
* return the wrong package silently.
|
|
23443
|
+
*/
|
|
23444
|
+
declare const digest: (target: Fetchable, cache: string, from: string) => Effect.Effect<string, InstallError | import("effect/PlatformError").PlatformError, never>;
|
|
23266
23445
|
/**
|
|
23267
23446
|
* Disk-only lookup. No network, no install -- this is what boot uses, and the reason booting
|
|
23268
23447
|
* offline works.
|
|
@@ -23362,11 +23541,11 @@ declare const update: <A>(target: Fetchable, cache: string, options: {
|
|
|
23362
23541
|
readonly validated?: A & ({} | null);
|
|
23363
23542
|
}, InstallError | LoadError | StoreError, never>;
|
|
23364
23543
|
declare namespace index_d_exports {
|
|
23365
|
-
export { Checked, Config$1 as Config, Entry, Events, Fetchable, InstallError, LoadError, plugin_d_exports.Mount as Mount, plugin_d_exports.Plugin as Plugin, PluginOptions, PluginRef, PluginRegistry, Probe, schema_d_exports$1 as Prompt, PromptResolver, SetupError, SharedPluginContext, SourceError, StoreError, Target, schema_d_exports$3 as Tool, Updated, anchor, canonical, check, plugin_d_exports.define as define, definition, inspect, parse, probe, resolve, required as resolveCached, lock as settingsLock, update };
|
|
23544
|
+
export { Checked, Config$1 as Config, Entry, Events, Fetchable, InstallError, LoadError, plugin_d_exports.Mount as Mount, plugin_d_exports.Plugin as Plugin, PluginOptions, PluginRef, PluginRegistry, Probe, schema_d_exports$1 as Prompt, PromptResolver, SetupError, SharedPluginContext, SourceError, StoreError, Target, schema_d_exports$3 as Tool, Updated, anchor, canonical, check, plugin_d_exports.define as define, definition, digest as identity, inspect, localName, parse, probe, resolve, required as resolveCached, lock as settingsLock, update };
|
|
23366
23545
|
}
|
|
23367
23546
|
type DateTimeUtcFromMillis = import__codeworksh_plugin_schema.DateTimeUtcFromMillis;
|
|
23368
23547
|
type EventSchema = import__codeworksh_plugin_event.EventSchema;
|
|
23369
23548
|
type SandboxError = import__codeworksh_plugin_sandbox_errors.SandboxError;
|
|
23370
23549
|
type optional = import__codeworksh_plugin_schema.optional;
|
|
23371
|
-
export { control_d_exports as Control, db_d_exports as Database, DateTimeUtcFromMillis, event_d_exports as Event, list_d_exports as EventList, registry_d_exports as EventRegistry, EventSchema, global_d_exports as Global, harness_d_exports as Harness, location_d_exports as Location, index_d_exports as Plugin, schema_d_exports as PromptSchema, run_d_exports as Runner, sandbox_d_exports as Sandbox, SandboxError, session_d_exports as Session, session_d_exports$1 as SessionStore, settings_d_exports as Settings, state_d_exports as State, tool_d_exports as Tool, optional };
|
|
23550
|
+
export { control_d_exports as Control, db_d_exports as Database, DateTimeUtcFromMillis, event_d_exports as Event, list_d_exports as EventList, registry_d_exports as EventRegistry, EventSchema, global_d_exports as Global, harness_d_exports as Harness, location_d_exports as Location, catalog_d_exports as ModelCatalog, index_d_exports as Plugin, schema_d_exports as PromptSchema, run_d_exports as Runner, sandbox_d_exports as Sandbox, SandboxError, session_d_exports as Session, session_d_exports$1 as SessionStore, settings_d_exports as Settings, state_d_exports as State, tool_d_exports as Tool, optional };
|
|
23372
23551
|
//# sourceMappingURL=effect.d.mts.map
|