byollm 0.1.3 → 0.1.4
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 +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-PXL5HY2O.js → chunk-LGN2DHFP.js} +250 -22
- package/dist/chunk-LGN2DHFP.js.map +1 -0
- package/dist/index.d.ts +40 -6
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-PXL5HY2O.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -953,6 +953,7 @@ declare const CommunityBudget: z.ZodObject<{
|
|
|
953
953
|
maxWallClockMs: z.ZodDefault<z.ZodNumber>;
|
|
954
954
|
maxOutputBytes: z.ZodDefault<z.ZodNumber>;
|
|
955
955
|
maxPayloadChars: z.ZodDefault<z.ZodNumber>;
|
|
956
|
+
countTeamJobs: z.ZodDefault<z.ZodBoolean>;
|
|
956
957
|
}, z.core.$strict>;
|
|
957
958
|
type CommunityBudget = z.infer<typeof CommunityBudget>;
|
|
958
959
|
/** Ingress-log retention (byollm_004 Rev 1). */
|
|
@@ -1022,6 +1023,7 @@ declare const DaemonConfig: z.ZodObject<{
|
|
|
1022
1023
|
maxWallClockMs: z.ZodDefault<z.ZodNumber>;
|
|
1023
1024
|
maxOutputBytes: z.ZodDefault<z.ZodNumber>;
|
|
1024
1025
|
maxPayloadChars: z.ZodDefault<z.ZodNumber>;
|
|
1026
|
+
countTeamJobs: z.ZodDefault<z.ZodBoolean>;
|
|
1025
1027
|
}, z.core.$strict>>;
|
|
1026
1028
|
ingress: z.ZodPrefault<z.ZodObject<{
|
|
1027
1029
|
communityPromptDays: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1129,7 +1131,20 @@ declare function loadConfig(path: string): Promise<LoadedConfig>;
|
|
|
1129
1131
|
*/
|
|
1130
1132
|
declare function resolveConfig(config: DaemonConfig): LoadedConfig;
|
|
1131
1133
|
|
|
1132
|
-
|
|
1134
|
+
/**
|
|
1135
|
+
* The caps this class enforces. `countTeamJobs` is not one of them: whether a
|
|
1136
|
+
* job is counted is the runner's question, asked per job, and answered here
|
|
1137
|
+
* through `check`'s `counted`.
|
|
1138
|
+
*/
|
|
1139
|
+
type Caps = Omit<CommunityBudget, "countTeamJobs">;
|
|
1140
|
+
/** Which brake refused a community job — written to the ingress log. */
|
|
1141
|
+
declare const BudgetRefusal: z.ZodEnum<{
|
|
1142
|
+
"hourly-cap": "hourly-cap";
|
|
1143
|
+
"daily-cap": "daily-cap";
|
|
1144
|
+
"payload-too-large": "payload-too-large";
|
|
1145
|
+
"ledger-untrusted": "ledger-untrusted";
|
|
1146
|
+
}>;
|
|
1147
|
+
type BudgetRefusal = z.infer<typeof BudgetRefusal>;
|
|
1133
1148
|
type BudgetDecision = {
|
|
1134
1149
|
readonly ok: true;
|
|
1135
1150
|
} | {
|
|
@@ -1148,7 +1163,7 @@ type BudgetDecision = {
|
|
|
1148
1163
|
*/
|
|
1149
1164
|
declare class Budgets {
|
|
1150
1165
|
#private;
|
|
1151
|
-
constructor(path: string, limits:
|
|
1166
|
+
constructor(path: string, limits: Caps);
|
|
1152
1167
|
/**
|
|
1153
1168
|
* Read the record of what has already been accepted.
|
|
1154
1169
|
*
|
|
@@ -1165,15 +1180,20 @@ declare class Budgets {
|
|
|
1165
1180
|
*
|
|
1166
1181
|
* @param payloadChars - total payload text length, checked against the
|
|
1167
1182
|
* stricter community limit rather than the protocol's absolute ceiling.
|
|
1183
|
+
* @param counted - whether this job counts toward the hourly and daily
|
|
1184
|
+
* caps. `false` only for a teammate's job on a metered service the owner
|
|
1185
|
+
* shared, which the spend ceiling already bounds — see
|
|
1186
|
+
* {@link CommunityBudget}'s `countTeamJobs`. The payload limit applies
|
|
1187
|
+
* either way.
|
|
1168
1188
|
*/
|
|
1169
|
-
check(now: number, payloadChars: number): BudgetDecision;
|
|
1189
|
+
check(now: number, payloadChars: number, counted?: boolean): BudgetDecision;
|
|
1170
1190
|
/** Count a community job as accepted. Call only after {@link check} passes. */
|
|
1171
1191
|
record(now: number): Promise<void>;
|
|
1172
1192
|
/** Current usage, for `byollm status`. */
|
|
1173
1193
|
usage(now: number): {
|
|
1174
1194
|
hour: number;
|
|
1175
1195
|
day: number;
|
|
1176
|
-
limits:
|
|
1196
|
+
limits: Caps;
|
|
1177
1197
|
};
|
|
1178
1198
|
}
|
|
1179
1199
|
|
|
@@ -1395,6 +1415,12 @@ declare const OutcomeEntry: z.ZodObject<{
|
|
|
1395
1415
|
unavailable: "unavailable";
|
|
1396
1416
|
unverified: "unverified";
|
|
1397
1417
|
}>>;
|
|
1418
|
+
brake: z.ZodOptional<z.ZodEnum<{
|
|
1419
|
+
"hourly-cap": "hourly-cap";
|
|
1420
|
+
"daily-cap": "daily-cap";
|
|
1421
|
+
"payload-too-large": "payload-too-large";
|
|
1422
|
+
"ledger-untrusted": "ledger-untrusted";
|
|
1423
|
+
}>>;
|
|
1398
1424
|
}, z.core.$strict>;
|
|
1399
1425
|
type OutcomeEntry = z.infer<typeof OutcomeEntry>;
|
|
1400
1426
|
declare const IngressEntry: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1439,6 +1465,12 @@ declare const IngressEntry: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1439
1465
|
unavailable: "unavailable";
|
|
1440
1466
|
unverified: "unverified";
|
|
1441
1467
|
}>>;
|
|
1468
|
+
brake: z.ZodOptional<z.ZodEnum<{
|
|
1469
|
+
"hourly-cap": "hourly-cap";
|
|
1470
|
+
"daily-cap": "daily-cap";
|
|
1471
|
+
"payload-too-large": "payload-too-large";
|
|
1472
|
+
"ledger-untrusted": "ledger-untrusted";
|
|
1473
|
+
}>>;
|
|
1442
1474
|
}, z.core.$strict>, z.ZodObject<{
|
|
1443
1475
|
type: z.ZodLiteral<"memory">;
|
|
1444
1476
|
at: z.ZodNumber;
|
|
@@ -1502,6 +1534,7 @@ declare class IngressLog {
|
|
|
1502
1534
|
detail?: string;
|
|
1503
1535
|
stop?: StopReason;
|
|
1504
1536
|
stopKind?: StopReasonMapping["kind"];
|
|
1537
|
+
brake?: BudgetRefusal;
|
|
1505
1538
|
}): Promise<void>;
|
|
1506
1539
|
/** Record what the memory guard decided — B080. */
|
|
1507
1540
|
recordMemory(input: {
|
|
@@ -2083,6 +2116,7 @@ declare class Runner {
|
|
|
2083
2116
|
} | {
|
|
2084
2117
|
ok: false;
|
|
2085
2118
|
reason: string;
|
|
2119
|
+
brake?: BudgetRefusal;
|
|
2086
2120
|
};
|
|
2087
2121
|
/**
|
|
2088
2122
|
* Run one job, and report HOW it ran as well as what it produced — B064
|
|
@@ -2564,7 +2598,7 @@ declare const BASE_URL_REFUSAL_MESSAGES: Readonly<Record<BaseUrlRefusal, string>
|
|
|
2564
2598
|
* define: an app's runner list shows this string, so a stale one is a lie
|
|
2565
2599
|
* told to every user, and a literal that a test pins cannot drift quietly.
|
|
2566
2600
|
*/
|
|
2567
|
-
declare const DAEMON_VERSION = "0.1.
|
|
2601
|
+
declare const DAEMON_VERSION = "0.1.4";
|
|
2568
2602
|
/**
|
|
2569
2603
|
* Everything needed to reason about one daemon — byollm_010 §5.
|
|
2570
2604
|
*
|
|
@@ -2590,4 +2624,4 @@ declare function daemonVersion(): DaemonVersion;
|
|
|
2590
2624
|
/** One line, for `--version` and for pasting into an issue. */
|
|
2591
2625
|
declare function formatVersion(v?: DaemonVersion): string;
|
|
2592
2626
|
|
|
2593
|
-
export { BASE_URL_REFUSAL_MESSAGES, type Backend, type BackendErrorCode, type BackendHealth, type BackendInit, type BackendRequest, type BackendResult, type BaseUrlCheck, type BaseUrlRefusal, type BudgetDecision,
|
|
2627
|
+
export { BASE_URL_REFUSAL_MESSAGES, type Backend, type BackendErrorCode, type BackendHealth, type BackendInit, type BackendRequest, type BackendResult, type BaseUrlCheck, type BaseUrlRefusal, type BudgetDecision, BudgetRefusal, Budgets, ClaudeCliBackend, type CliIo, ClientError, type ClientErrorKind, type ClientOptions, CommunityBudget, type ConfigProblem, type ConnectOptions, type ConnectResult, DAEMON_VERSION, DEFAULT_CONFIG, DaemonConfig, type DaemonPaths, type DaemonVersion, DeviceIdentity, type ExitCode, IngressEntry, IngressLog, type IngressOptions, IngressRetention, Limits, type LoadedConfig, type MemoryPressure, type MemoryReading, OpenAiHttpBackend, OutcomeEntry, Pairing, Pairings, PromptEntry, ProtocolClient, type ReadCommand, type ResolvedRoute, Runner, type RunnerEvent, type RunnerOptions, type RunnerStatus, ServiceConfig, SpendLedger, UnusableOrigin, checkBaseUrl, childEnv, claudeArgv, composePrompt, connect, createBackend, currentPlatform, daemonPaths, daemonVersion, defaultRoot, estimateCents, formatVersion, hashText, loadConfig, main, normalizeOrigin, parseMemInfo, parsePressureLevel, parsePsi, parseSwapUsage, parseVmStat, readMemory, readPressure, resolveConfig, runCli, stripControlChars };
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "byollm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Bring Your Own LLM — run an app's LLM jobs on your own models.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"zod": "4.4.3",
|
|
27
|
-
"@byollm/protocol": "0.1.
|
|
27
|
+
"@byollm/protocol": "0.1.4"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|