@vite-hub/presets 0.6.1 → 0.7.0
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/dist/babysitter/server.d.ts +1 -1
- package/dist/babysitter/server.js +1 -1
- package/dist/{babysitter-Bc7fiKzx.js → babysitter-SWX5zXIM.js} +2 -2
- package/dist/babysitter.d.ts +1 -1
- package/dist/babysitter.js +1 -1
- package/dist/{error-diagnostics-BqwPfmNx.js → error-diagnostics-ba9TWgh5.js} +4 -0
- package/dist/{host-DHjNUmve.js → host-1nLqi8HQ.js} +6 -5
- package/dist/labeller.d.ts +2 -0
- package/dist/labeller.js +6 -4
- package/dist/{pr-workspaces-BGAsF7fH.d.ts → pr-workspaces-DfBICt8N.d.ts} +3 -1
- package/dist/{server-9eUlfkBm.js → server-CWLmnhPQ.js} +4 -3
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as createGitHubAppCredentials, S as GitHubHostSecret, _ as GitHubHostCredentials, a as BabysitterAdmissionResult, b as GitHubHostPullRequest, c as PullRequestInboxStorage, d as GitHubHost, f as GitHubHostAccess, g as GitHubHostCredentialContext, h as GitHubHostCheckoutOptions, m as GitHubHostCheckout, n as PullRequestWorkspaces, o as PullRequestInbox, p as GitHubHostAccessOptions, u as GitHubAppEnvironment, v as GitHubHostForgeOptions, w as createGitHubHost, x as GitHubHostRateLimit, y as GitHubHostOptions } from "../pr-workspaces-
|
|
1
|
+
import { C as createGitHubAppCredentials, S as GitHubHostSecret, _ as GitHubHostCredentials, a as BabysitterAdmissionResult, b as GitHubHostPullRequest, c as PullRequestInboxStorage, d as GitHubHost, f as GitHubHostAccess, g as GitHubHostCredentialContext, h as GitHubHostCheckoutOptions, m as GitHubHostCheckout, n as PullRequestWorkspaces, o as PullRequestInbox, p as GitHubHostAccessOptions, u as GitHubAppEnvironment, v as GitHubHostForgeOptions, w as createGitHubHost, x as GitHubHostRateLimit, y as GitHubHostOptions } from "../pr-workspaces-DfBICt8N.js";
|
|
2
2
|
import { AgentInput } from "@vite-hub/agent";
|
|
3
3
|
import { GitHubAppRepository } from "@vite-hub/forge";
|
|
4
4
|
import { ProcessReconcilerRunContext } from "@vite-hub/runtime/internal/node";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createBabysitterRuntime, s as createGitHubAppCredentials, c as createGitHubHost, n as isProviderRateLimit, r as pendingMergeRetryAt } from "../server-
|
|
1
|
+
export { t as createBabysitterRuntime, s as createGitHubAppCredentials, c as createGitHubHost, n as isProviderRateLimit, r as pendingMergeRetryAt } from "../server-CWLmnhPQ.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isRuntimeRecord, n as hasRuntimeType, t as presetsErrorDiagnostics } from "./error-diagnostics-
|
|
1
|
+
import { i as isRuntimeRecord, n as hasRuntimeType, t as presetsErrorDiagnostics } from "./error-diagnostics-ba9TWgh5.js";
|
|
2
2
|
import { claudeCodeDriver, codexDriver, defineAgent } from "@vite-hub/agent";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as v from "valibot";
|
|
@@ -2309,7 +2309,7 @@ function validMainRepair(mainRepair) {
|
|
|
2309
2309
|
return names(workflows, /\S/) && (repositories === void 0 || names(repositories, /^[\w.-]+\/[\w.-]+$/)) && (stuckJobMinutes === void 0 || stuckJobMinutes === false || Number.isSafeInteger(stuckJobMinutes) && Number(stuckJobMinutes) >= 1);
|
|
2310
2310
|
}
|
|
2311
2311
|
const babysitterHost = { async create(context) {
|
|
2312
|
-
const { createBabysitterProcessHost } = await import("./host-
|
|
2312
|
+
const { createBabysitterProcessHost } = await import("./host-1nLqi8HQ.js");
|
|
2313
2313
|
return await createBabysitterProcessHost(context);
|
|
2314
2314
|
} };
|
|
2315
2315
|
function plainSecret(value) {
|
package/dist/babysitter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as AutomatedReviewClass, i as BabysitterAdmissionPause, l as GitHubRequiredCheckState, r as BabysitterAdmissionOptions, s as Snapshot, t as BabysitterWarmWorkspaces } from "./pr-workspaces-
|
|
1
|
+
import { T as AutomatedReviewClass, i as BabysitterAdmissionPause, l as GitHubRequiredCheckState, r as BabysitterAdmissionOptions, s as Snapshot, t as BabysitterWarmWorkspaces } from "./pr-workspaces-DfBICt8N.js";
|
|
2
2
|
import { AgentDefinition, AgentInvocationContextValues, AgentInvoker, AgentRuntimeConfig, AgentSandboxDefinition, BuiltInAgentDriverName, ConfiguredAgentDefinition } from "@vite-hub/agent";
|
|
3
3
|
import { GitHubPullRequestFilter } from "@vite-hub/agent/channels";
|
|
4
4
|
import { Diagnostic } from "nostics";
|
package/dist/babysitter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as BabysitterPlacementCapacityError, t as babysitter, n as babysitterPassResultSchema, r as resolveBabysitterLifecycleFilter } from "./babysitter-
|
|
1
|
+
export { i as BabysitterPlacementCapacityError, t as babysitter, n as babysitterPassResultSchema, r as resolveBabysitterLifecycleFilter } from "./babysitter-SWX5zXIM.js";
|
|
@@ -442,6 +442,10 @@ const presetsErrorDiagnostics = /*#__PURE__*/ defineErrors({
|
|
|
442
442
|
why: "PullRequestInbox requires exactly one of path or storage.",
|
|
443
443
|
fix: "Set inboxPath, a private node:sqlite file, or inboxStorage, such as agentState.extension(\"babysitter\"), in the createBabysitterRuntime() options."
|
|
444
444
|
},
|
|
445
|
+
PRESETS_BABYSITTER_INBOX_STORAGE_NOT_SQLITE: {
|
|
446
|
+
why: "PullRequestInbox storage runs on Postgres Agent State. The inbox SQL is SQLite.",
|
|
447
|
+
fix: "Set inboxPath to a private node:sqlite file in the data directory of the server that holds the process host, as the Babysitter host does on Postgres Agent State."
|
|
448
|
+
},
|
|
445
449
|
PRESETS_BABYSITTER_PROMPT_TOO_LARGE: {
|
|
446
450
|
why: ({ characters, bytes, limit }) => `GitHubPullRequest prompt exceeds transport safety limit: ${characters} characters, ${bytes} UTF-8 bytes; limit ${limit}. All review/comment bodies were retained. No truncated prompt was sent.`,
|
|
447
451
|
fix: "Shorten or hide the longest comments and review bodies on the pull request, or split it into smaller pull requests. The Babysitter does not cut feedback."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as isRuntimeRecord, n as hasRuntimeType, t as presetsErrorDiagnostics } from "./error-diagnostics-
|
|
2
|
-
import { a as budgetParks, c as createGitHubHost, i as babysitterQueueHealth, o as pullRequestThreadId, s as createGitHubAppCredentials, t as createBabysitterRuntime } from "./server-
|
|
3
|
-
import { d as resolveBabysitterAdmissionLimits, f as sharedBabysitterRead, o as createPullRequestWorkspaces, r as resolveBabysitterLifecycleFilter, u as createBabysitterAdmission } from "./babysitter-
|
|
1
|
+
import { i as isRuntimeRecord, n as hasRuntimeType, t as presetsErrorDiagnostics } from "./error-diagnostics-ba9TWgh5.js";
|
|
2
|
+
import { a as budgetParks, c as createGitHubHost, i as babysitterQueueHealth, o as pullRequestThreadId, s as createGitHubAppCredentials, t as createBabysitterRuntime } from "./server-CWLmnhPQ.js";
|
|
3
|
+
import { d as resolveBabysitterAdmissionLimits, f as sharedBabysitterRead, o as createPullRequestWorkspaces, r as resolveBabysitterLifecycleFilter, u as createBabysitterAdmission } from "./babysitter-SWX5zXIM.js";
|
|
4
4
|
import { defineAgent } from "@vite-hub/agent";
|
|
5
5
|
import { forgeErrorStatus, githubInstallationRouting } from "@vite-hub/forge";
|
|
6
6
|
import { channelEnv } from "@vite-hub/agent/channels";
|
|
@@ -508,7 +508,7 @@ async function createBabysitterProcessHost(context) {
|
|
|
508
508
|
run: async (reason, run, accepting) => await runtime?.reconcile(reason, run, accepting)
|
|
509
509
|
});
|
|
510
510
|
const preflight = createBabysitterPreflight(agent.options.install ?? true);
|
|
511
|
-
const buildRevision = "
|
|
511
|
+
const buildRevision = "387f07d1e9806cff33c42fb2ea713504e01ac59c5c185c23ed0a4565b255629c";
|
|
512
512
|
const admission = createBabysitterAdmission({
|
|
513
513
|
invocations: host.invocations,
|
|
514
514
|
limits: resolveBabysitterAdmissionLimits(agent.options.admission),
|
|
@@ -529,12 +529,13 @@ async function createBabysitterProcessHost(context) {
|
|
|
529
529
|
...resumeThreads ? { sessionStorePath: host.providerSessionStorePath } : {}
|
|
530
530
|
}
|
|
531
531
|
});
|
|
532
|
+
const inboxStorage = context.state.extension("babysitter");
|
|
532
533
|
runtime = createBabysitterRuntime({
|
|
533
534
|
workspaces,
|
|
534
535
|
agent: worker,
|
|
535
536
|
agentName: context.agentName,
|
|
536
537
|
github,
|
|
537
|
-
inboxStorage: context.
|
|
538
|
+
...inboxStorage.dialect === "postgresql" ? { inboxPath: join(context.dataDir, "inbox.sqlite") } : { inboxStorage },
|
|
538
539
|
inboxScope: context.agentName,
|
|
539
540
|
repositories,
|
|
540
541
|
concurrency: agent.options.concurrency,
|
package/dist/labeller.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ export interface LabellerOptions {
|
|
|
50
50
|
relabel: boolean;
|
|
51
51
|
trashEnabled: boolean;
|
|
52
52
|
client?: GmailClient;
|
|
53
|
+
/** Name of the Google Connection that the Gmail Channel calls Gmail through, as in `gmail({ connection })`. */
|
|
54
|
+
connection?: string;
|
|
53
55
|
}
|
|
54
56
|
export interface LabellerDecision {
|
|
55
57
|
label: string;
|
package/dist/labeller.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isRuntimeRecord, t as presetsErrorDiagnostics } from "./error-diagnostics-
|
|
1
|
+
import { i as isRuntimeRecord, t as presetsErrorDiagnostics } from "./error-diagnostics-ba9TWgh5.js";
|
|
2
2
|
import { defineAgent } from "@vite-hub/agent";
|
|
3
3
|
import { hasRuntimeType, isRuntimeObject } from "@vite-hub/runtime/internal/runtime-type";
|
|
4
4
|
import * as v from "valibot";
|
|
@@ -172,7 +172,8 @@ const labeller = defineAgent({
|
|
|
172
172
|
minConfidence: .6,
|
|
173
173
|
relabel: false,
|
|
174
174
|
trashEnabled: false,
|
|
175
|
-
client: void 0
|
|
175
|
+
client: void 0,
|
|
176
|
+
connection: void 0
|
|
176
177
|
},
|
|
177
178
|
configure: (options) => {
|
|
178
179
|
if (materializingTemplate) {
|
|
@@ -186,13 +187,14 @@ const labeller = defineAgent({
|
|
|
186
187
|
});
|
|
187
188
|
}
|
|
188
189
|
validateOptions(options);
|
|
189
|
-
const { labels, rules, actions, bodyLimit, hideUnmanagedLabels, maxAttempts, minConfidence, relabel, trashEnabled, client } = options;
|
|
190
|
+
const { labels, rules, actions, bodyLimit, hideUnmanagedLabels, maxAttempts, minConfidence, relabel, trashEnabled, client, connection } = options;
|
|
190
191
|
const channelOptions = {
|
|
191
192
|
labels,
|
|
192
193
|
bodyLimit,
|
|
193
194
|
client,
|
|
194
195
|
hideUnmanagedLabels,
|
|
195
|
-
...maxAttempts === void 0 ? {} : { maxAttempts }
|
|
196
|
+
...maxAttempts === void 0 ? {} : { maxAttempts },
|
|
197
|
+
...connection === void 0 ? {} : { connection }
|
|
196
198
|
};
|
|
197
199
|
if (options.dryRun) channelOptions.dryRun = true;
|
|
198
200
|
const channel = gmail(channelOptions);
|
|
@@ -431,9 +431,11 @@ type PullRequestWait = {
|
|
|
431
431
|
};
|
|
432
432
|
/**
|
|
433
433
|
* SQL access for the PR inbox. `agentState.extension("babysitter")` from
|
|
434
|
-
* `@vite-hub/agent/state` satisfies it and keeps the inbox in the Agent State database.
|
|
434
|
+
* `@vite-hub/agent/state` satisfies it on SQLite Agent State and keeps the inbox in the Agent State database.
|
|
435
|
+
* The inbox SQL is SQLite, so the inbox rejects an extension on Postgres Agent State.
|
|
435
436
|
*/
|
|
436
437
|
interface PullRequestInboxStorage extends Pick<SqliteAgentStateExtension, "execute" | "tablePrefix" | "transaction"> {
|
|
438
|
+
readonly dialect?: SqliteAgentStateExtension["dialect"];
|
|
437
439
|
close?: () => Promise<void>;
|
|
438
440
|
}
|
|
439
441
|
interface StatusDelivery {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as isRuntimeString, i as isRuntimeRecord, n as hasRuntimeType, r as isRuntimeNumber, t as presetsErrorDiagnostics } from "./error-diagnostics-
|
|
2
|
-
import { A as invariant, B as createBabysitterPassResultSchema, C as approvalReviewers, D as normalizeGitHubMentionAllowlist, E as isReviewThreadOutcome, F as failed$1, I as hydrateFailedCiEvidence, L as newestCheckRun, M as hasGitHubLogin, N as matchesBabysitterPullRequestFilter, O as reviewThreadOutcomes, P as actionLocation, R as createBabysitterCheckRuns, S as snapshotCheckEvidence, T as createGitHubPullRequestOperations, _ as isAutomatedFeedback, a as isBabysitterPlacementCapacityError, b as mergeReviewEvidenceKey, c as workspaceDecision, g as headChecksUnreported, h as hasHumanComment, j as invariantError, k as reviewerLabeledSevere, l as babysitterModelAdmission, m as feedbackFingerprints, p as directMergeReadiness, r as resolveBabysitterLifecycleFilter, s as providerSessionDecision, v as liveMergeReadiness, w as maintainerApproval, x as resolveBabysitterMerge, y as matchesMergeReviewEvidence, z as isBabysitterCheckRun } from "./babysitter-
|
|
1
|
+
import { a as isRuntimeString, i as isRuntimeRecord, n as hasRuntimeType, r as isRuntimeNumber, t as presetsErrorDiagnostics } from "./error-diagnostics-ba9TWgh5.js";
|
|
2
|
+
import { A as invariant, B as createBabysitterPassResultSchema, C as approvalReviewers, D as normalizeGitHubMentionAllowlist, E as isReviewThreadOutcome, F as failed$1, I as hydrateFailedCiEvidence, L as newestCheckRun, M as hasGitHubLogin, N as matchesBabysitterPullRequestFilter, O as reviewThreadOutcomes, P as actionLocation, R as createBabysitterCheckRuns, S as snapshotCheckEvidence, T as createGitHubPullRequestOperations, _ as isAutomatedFeedback, a as isBabysitterPlacementCapacityError, b as mergeReviewEvidenceKey, c as workspaceDecision, g as headChecksUnreported, h as hasHumanComment, j as invariantError, k as reviewerLabeledSevere, l as babysitterModelAdmission, m as feedbackFingerprints, p as directMergeReadiness, r as resolveBabysitterLifecycleFilter, s as providerSessionDecision, v as liveMergeReadiness, w as maintainerApproval, x as resolveBabysitterMerge, y as matchesMergeReviewEvidence, z as isBabysitterCheckRun } from "./babysitter-SWX5zXIM.js";
|
|
3
3
|
import { activeProviderSandbox, agentInvocationId, agentSettings, createMessage, defineAgent, defineCapability, publishAgentActivity, recordProviderCheckout, runAgent, withoutForgeAccess } from "@vite-hub/agent";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import { resolvePublicUrl } from "@vite-hub/runtime";
|
|
@@ -3709,6 +3709,7 @@ var PullRequestInbox = class {
|
|
|
3709
3709
|
constructor({ path, storage, scope = "", repositories, filter, admitApproved = false, clock, budgets = {}, activityAuthors = [], activityAppId, priorityLabels = [], mainRepairBranchPrefix, claimStackChildren = false, invalidRow }) {
|
|
3710
3710
|
validateBudgets(budgets);
|
|
3711
3711
|
if (path === void 0 === (storage === void 0)) throw presetsErrorDiagnostics.PRESETS_BABYSITTER_INBOX_STORAGE_MISSING();
|
|
3712
|
+
if (storage?.dialect === "postgresql") throw presetsErrorDiagnostics.PRESETS_BABYSITTER_INBOX_STORAGE_NOT_SQLITE();
|
|
3712
3713
|
this.budgets = { ...budgets };
|
|
3713
3714
|
this.priorityLabels = [...new Set(priorityLabels.map((label) => label.trim().toLowerCase()).filter(Boolean))];
|
|
3714
3715
|
this.mainRepairBranchPrefix = mainRepairBranchPrefix || void 0;
|
|
@@ -8977,7 +8978,7 @@ function createBabysitterRuntime(options) {
|
|
|
8977
8978
|
ignoreAssessedBotThreads: presetOptions.ignoreAssessedBotThreads === true
|
|
8978
8979
|
};
|
|
8979
8980
|
const schedulerEvent = (name, properties = {}) => options.event?.(name, properties);
|
|
8980
|
-
const release = baseAgent.version ?? "
|
|
8981
|
+
const release = baseAgent.version ?? "387f07d1e9806cff33c42fb2ea713504e01ac59c5c185c23ed0a4565b255629c";
|
|
8981
8982
|
const workspaces = options.workspaces;
|
|
8982
8983
|
const schedulerError = (name, error, properties = {}) => options.error?.(name, error, properties);
|
|
8983
8984
|
const statusComment = !!verifiedHostIdentity && presetOptions.status?.comment !== false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-hub/presets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Ready-made Agents built from ViteHub primitives: Babysitter, Labeller, and the workspace preset.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@vite-hub/forge": "0.
|
|
62
|
-
"@vite-hub/gateways": "0.
|
|
63
|
-
"@vite-hub/runtime": "0.
|
|
64
|
-
"@vite-hub/sandbox": "0.
|
|
65
|
-
"@vite-hub/workspace": "0.
|
|
61
|
+
"@vite-hub/forge": "0.7.0",
|
|
62
|
+
"@vite-hub/gateways": "0.7.0",
|
|
63
|
+
"@vite-hub/runtime": "0.7.0",
|
|
64
|
+
"@vite-hub/sandbox": "0.7.0",
|
|
65
|
+
"@vite-hub/workspace": "0.7.0",
|
|
66
66
|
"@yarnpkg/parsers": "3.1.0",
|
|
67
67
|
"comark": "^0.9.2",
|
|
68
68
|
"nostics": "1.4.0",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@libsql/client": "^0.18.0",
|
|
74
74
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
75
|
-
"@t3tools/provider-runtime": "https://pkg.pr.new/vite-hub/t3code/@t3tools/provider-runtime@
|
|
75
|
+
"@t3tools/provider-runtime": "https://pkg.pr.new/vite-hub/t3code/@t3tools/provider-runtime@1ee7ef6",
|
|
76
76
|
"@types/node": "^24.19.2",
|
|
77
|
-
"@vite-hub/agent": "0.
|
|
77
|
+
"@vite-hub/agent": "0.7.0",
|
|
78
78
|
"@vite-hub/internal": "0.0.1",
|
|
79
79
|
"publint": "^0.3.25",
|
|
80
80
|
"typescript": "^6.0.3",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"vitest": "5.1.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
|
-
"@vite-hub/agent": "0.
|
|
85
|
+
"@vite-hub/agent": "0.7.0"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": ">=24.15.0"
|