Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

feat(feedback): add the product feedback workflow (#18)

Leo51058c4a08f7
diff --git a/.depot/workflows/ci.yml b/.depot/workflows/ci.yml
index aed7be1a5..b73bfb577 100644
--- a/.depot/workflows/ci.yml
+++ b/.depot/workflows/ci.yml
@@ -99,7 +99,7 @@ jobs:
run: vp run --filter @t3tools/desktop ensure:electron
- name: Test shipped desktop and shared packages
- run: vp run --parallel --concurrency-limit 4 --filter '!t3' --filter '!t3code-relay' --filter '!@t3tools/monorepo' --filter '!@t3tools/mobile' test
+ run: vp run --parallel --concurrency-limit 4 --filter '!akeru-bot' --filter '!t3code-relay' --filter '!@t3tools/monorepo' --filter '!@t3tools/mobile' test
test_server:
name: Server tests (shard ${{ matrix.shard }}/${{ strategy.job-total }})
@@ -122,7 +122,7 @@ jobs:
- name: Test isolated server shard
run: >-
- vp run --filter t3 test
+ vp run --filter akeru-bot test
--shard ${{ matrix.shard }}/${{ strategy.job-total }}
--exclude integration/orchestrationEngine.integration.test.ts
diff --git a/.depot/workflows/release.yml b/.depot/workflows/release.yml
index 88183ca6c..f18024410 100644
--- a/.depot/workflows/release.yml
+++ b/.depot/workflows/release.yml
@@ -84,7 +84,7 @@ jobs:
run-install: false
- name: Install desktop dependencies
- run: vp install --frozen-lockfile --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts...
+ run: vp install --frozen-lockfile --filter=@t3tools/desktop... --filter=akeru-bot... --filter=@t3tools/scripts...
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
@@ -243,14 +243,14 @@ jobs:
cache: true
run-install: |
args:
- - --filter=t3...
+ - --filter=akeru-bot...
- --filter=@t3tools/web...
- --filter=@t3tools/scripts...
- name: Build CLI package
run: |
node scripts/update-release-package-versions.ts "$RELEASE_VERSION"
- vp run --filter t3 build
+ vp run --filter akeru-bot build
- name: Dry-run CLI package
run: node apps/server/scripts/cli.ts publish --dry-run --app-version "$RELEASE_VERSION" --verbose
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 38a764eab..667802b83 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -9,7 +9,7 @@ body:
attributes:
value: |
Use this form for broken behavior, regressions, crashes, or reliability problems.
- Feature requests belong in [Discussions](https://github.com/pingdotgg/t3code/discussions/categories/ideas).
+ Use Akeru Bot's Send feedback flow for feature requests.
Search existing issues first and keep the report focused on one problem.
- type: checkboxes
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 4f4940ba6..3ba13e0ce 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1 @@
blank_issues_enabled: false
-contact_links:
- - name: Feature request
- url: https://github.com/pingdotgg/t3code/discussions/categories/ideas
- about: Suggest an improvement or new capability in Discussions.
diff --git a/.github/ISSUE_TEMPLATE/via-triage.yml b/.github/ISSUE_TEMPLATE/via-triage.yml
index 5b8465b87..e9421e991 100644
--- a/.github/ISSUE_TEMPLATE/via-triage.yml
+++ b/.github/ISSUE_TEMPLATE/via-triage.yml
@@ -1,12 +1,12 @@
name: Triage report
-description: Filed with `npx t3 triage`, where a coding agent investigated the machine. For hand-written reports use the bug report template instead.
+description: Filed with `npx akeru-bot triage`, where a coding agent investigated the machine. For hand-written reports use the bug report template instead.
labels:
- via-triage
body:
- type: markdown
attributes:
value: |
- This structure is what `t3 triage` agents follow. Keep one problem per issue
+ This structure is what `npx akeru-bot triage` agents follow. Keep one problem per issue
and redact secrets and home directory paths from anything you paste.
- type: textarea
@@ -37,7 +37,7 @@ body:
id: version
attributes:
label: Version
- description: Installed t3 version or commit.
+ description: Installed Akeru Bot version or commit.
placeholder: 0.0.33
validations:
required: true
@@ -69,10 +69,3 @@ body:
attributes:
label: Fix applied or workaround
description: Anything that was run on the machine to unblock the user.
-
- - type: input
- id: agent
- attributes:
- label: Filed by
- description: Which agent and model produced this report.
- placeholder: claude (opus-5) via t3 triage
diff --git a/.github/triage/PLAYBOOK.md b/.github/triage/PLAYBOOK.md
index 39bf3ea01..3d5e9d533 100644
--- a/.github/triage/PLAYBOOK.md
+++ b/.github/triage/PLAYBOOK.md
@@ -1,6 +1,6 @@
-# T3 Code triage playbook
+# Akeru Bot triage playbook
-You are a support engineer for T3 Code (https://github.com/pingdotgg/t3code), working
+You are a support engineer for Akeru Bot (https://github.com/opencoredev/akeru-bot), working
inside a coding-agent session on the machine of a user whose install is misbehaving:
crashes, auth failures, broken setups, slow launches, or anything else. Your job is to
find out what went wrong, unblock the user if you can, and turn what you learned into
@@ -24,7 +24,7 @@ paths for state, logs, and the database.
## 3. Check for a newer playbook
-Fetch https://raw.githubusercontent.com/pingdotgg/t3code/main/.github/triage/PLAYBOOK.md.
+Fetch https://raw.githubusercontent.com/opencoredev/akeru-bot/main/.github/triage/PLAYBOOK.md.
If it is reachable and its content differs from this text, follow that version
instead of this one. The user may be on an old release with an old copy.
@@ -34,7 +34,7 @@ Clone the repo at the tag matching the user's installed version, into the source
cache directory named in the context file, one subdirectory per commit hash:
git clone --depth 1 --filter=blob:none --branch <release-tag> \
- https://github.com/pingdotgg/t3code <source-cache-dir>/<hash>
+ https://github.com/opencoredev/akeru-bot <source-cache-dir>/<hash>
If the tag does not exist (nightly builds), clone `main` instead, and treat file
and line references as approximate: the user's build may not match `main`
@@ -51,11 +51,10 @@ Diagnosis grounded in source beats guessing.
First establish the shape of the install, because the same symptom points at
different code depending on it:
-- How is T3 Code running on this machine: `npx t3 serve` in a terminal, the
+- How is Akeru Bot running on this machine: `npx akeru-bot serve` in a terminal, the
background service, or the desktop app?
-- Which surface is the user connecting from: the website (app.t3.codes), the
- desktop app against a local server, the desktop app against a remote server,
- or the mobile app?
+- Which client is the user connecting from: the browser, the desktop app against
+ a local or remote server, or the mobile app?
Then work from evidence, not assumption. In rough order of value:
@@ -79,7 +78,7 @@ comes from this repo's `main` branch.
## 6. Check upstream
-Search existing issues in pingdotgg/t3code (use `gh`, or the public GitHub search
+Search existing issues in opencoredev/akeru-bot (use `gh`, or the public GitHub search
API if `gh` is missing or not logged in). Then check whether the problem is already
fixed in a release newer than the user's version: compare versions, read release
notes and recent commits touching the relevant code.
@@ -94,7 +93,7 @@ Present what you found and let the user choose: fix it now, file an issue, both,
neither. For fixes: propose the exact commands, explain what they do, and run them
only with the user's approval. Prefer configuration and service-level fixes.
-Do not patch the T3 Code source as a fix. A good issue with strong repro steps
+Do not patch the Akeru Bot source as a fix. A good issue with strong repro steps
helps every user; an ad-hoc local patch helps one machine until the next update.
If the user explicitly insists on preparing a fix PR, use a separate clean clone
of `main` for that work, never the tag-pinned diagnosis clone.
@@ -104,14 +103,16 @@ of `main` for that work, never the tag-pinned diagnosis clone.
- Match the structure of the `via-triage` issue template
(`.github/ISSUE_TEMPLATE/via-triage.yml` in the repo): what happened, diagnosis,
repro steps, environment, evidence, related issues.
-- Label it `via-triage`. Use a plain, specific title with no prefix.
+- Label it `via-triage`. Use a plain, specific title with no prefix. If GitHub
+ does not let the user's account apply labels, use the `via-triage` issue form
+ at https://github.com/opencoredev/akeru-bot/issues/new?template=via-triage.yml
+ so GitHub applies the label from the template.
- Show the user the complete final issue text and get an explicit yes before
posting. Never post without it.
-- Note at the end of the issue which model and agent produced it.
-- If `gh` is not authenticated, offer `gh auth login`, or build a prefilled
- https://github.com/pingdotgg/t3code/issues/new URL with title and body query
- parameters; print the URL, and open it in their browser only after they
- approve.
+- If `gh` is not authenticated or cannot apply the label, offer `gh auth login`,
+ or build a prefilled URL for the `via-triage` issue form. Use the form field IDs
+ as query parameters. Print the URL, and open it in their browser only after
+ they approve.
- If the user pasted screenshots, remind them to drag the images into the issue
after it is created; they cannot be attached from here.
diff --git a/.github/workflows/issue-labels.yml b/.github/workflows/issue-labels.yml
index d6571d65d..92406f894 100644
--- a/.github/workflows/issue-labels.yml
+++ b/.github/workflows/issue-labels.yml
@@ -37,6 +37,11 @@ jobs:
color: "fbca04",
description: "Issue needs maintainer review and initial categorization.",
},
+ {
+ name: "via-triage",
+ color: "5319E7",
+ description: "Prepared through Akeru agent triage and approved by the user",
+ },
];
for (const label of managedLabels) {
diff --git a/apps/desktop/src/window/DesktopApplicationMenu.test.ts b/apps/desktop/src/window/DesktopApplicationMenu.test.ts
index 595b0dd11..a40a113f3 100644
--- a/apps/desktop/src/window/DesktopApplicationMenu.test.ts
+++ b/apps/desktop/src/window/DesktopApplicationMenu.test.ts
@@ -147,6 +147,35 @@ describe("DesktopApplicationMenu", () => {
}),
);
+ it.effect("routes Help feedback through DesktopWindow", () =>
+ Effect.gen(function* () {
+ const selectedAction = yield* Deferred.make<string>();
+ const applicationMenuTemplate =
+ yield* Deferred.make<readonly Electron.MenuItemConstructorOptions[]>();
+
+ yield* configureMenu(selectedAction, applicationMenuTemplate);
+
+ const template = yield* Deferred.await(applicationMenuTemplate);
+ const helpMenu = template.find((item) => item.role === "help");
+ assert.isDefined(helpMenu);
+ if (!Array.isArray(helpMenu.submenu)) {
+ throw new Error("Expected Help menu submenu to be an array.");
+ }
+ const feedbackItem = helpMenu.submenu.find((item) => item.label === "Send Feedback...");
+ assert.isDefined(feedbackItem);
+ if (typeof feedbackItem.click !== "function") {
+ throw new Error("Expected feedback menu item to have a click handler.");
+ }
+
+ feedbackItem.click(
+ {} as Electron.MenuItem,
+ {} as Electron.BrowserWindow,
+ {} as KeyboardEvent,
+ );
+ assert.equal(yield* Deferred.await(selectedAction), "open-feedback");
+ }),
+ );
+
// Zoom must route through DesktopWindow.zoomMain instead of the Electron
// zoom roles: the roles zoom whichever webContents has focus, which breaks
// app zoom while an embedded preview WebContentsView holds focus.
diff --git a/apps/desktop/src/window/DesktopApplicationMenu.ts b/apps/desktop/src/window/DesktopApplicationMenu.ts
index d3aea6848..51bd27aed 100644
--- a/apps/desktop/src/window/DesktopApplicationMenu.ts
+++ b/apps/desktop/src/window/DesktopApplicationMenu.ts
@@ -134,6 +134,9 @@ export const make = Effect.gen(function* () {
const settingsClick = () => {
runMenuEffect("open-settings", dispatchMenuAction("open-settings"));
};
+ const feedbackClick = () => {
+ runMenuEffect("open-feedback", dispatchMenuAction("open-feedback"));
+ };
const zoomClick = (direction: DesktopWindow.MainWindowZoomDirection) => () => {
runMenuEffect(`zoom-${direction}`, zoomMainWindow(direction));
};
@@ -214,6 +217,11 @@ export const make = Effect.gen(function* () {
{
role: "help",
submenu: [
+ {
+ label: "Send Feedback...",
+ click: feedbackClick,
+ },
+ { type: "separator" },
{
label: "Check for Updates...",
click: checkForUpdatesClick,
diff --git a/apps/desktop/vite.config.ts b/apps/desktop/vite.config.ts
index 9f25204f1..d1b87c547 100644
--- a/apps/desktop/vite.config.ts
+++ b/apps/desktop/vite.config.ts
@@ -15,13 +15,13 @@ export default defineConfig({
tasks: {
build: {
command: "node scripts/build-preview-annotation-css.mjs && vp pack",
- dependsOn: ["t3#build"],
+ dependsOn: ["akeru-bot#build"],
cache: false,
},
dev: {
command:
"node scripts/build-preview-annotation-css.mjs && cross-env T3CODE_DESKTOP_DEV=1 vp pack --watch",
- dependsOn: ["t3#build"],
+ dependsOn: ["akeru-bot#build"],
cache: false,
},
"dev:bundle": {
@@ -30,7 +30,7 @@ export default defineConfig({
},
"dev:electron": {
command: "node scripts/dev-electron.mjs",
- dependsOn: ["t3#build"],
+ dependsOn: ["akeru-bot#build"],
cache: false,
},
},
diff --git a/apps/mobile/src/features/threads/PendingApprovalCard.tsx b/apps/mobile/src/features/threads/PendingApprovalCard.tsx
index fb9cc72d2..d1fe747e2 100644
--- a/apps/mobile/src/features/threads/PendingApprovalCard.tsx
+++ b/apps/mobile/src/features/threads/PendingApprovalCard.tsx
@@ -1,7 +1,8 @@
-import type {
- ApprovalRequestId,
- ProviderApprovalDecision,
- ProviderApprovalOption,
+import {
+ AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ type ApprovalRequestId,
+ type ProviderApprovalDecision,
+ type ProviderApprovalOption,
} from "@t3tools/contracts";
import { Pressable, View } from "react-native";
@@ -22,9 +23,15 @@ const DEFAULT_APPROVAL_OPTIONS = [
{ decision: "acceptForSession", label: "Allow session" },
{ decision: "decline", label: "Decline" },
] satisfies ReadonlyArray<ProviderApprovalOption>;
+const MOBILE_FEEDBACK_OPTIONS = [
+ { decision: "decline", label: "Cancel" },
+] satisfies ReadonlyArray<ProviderApprovalOption>;
export function PendingApprovalCard(props: PendingApprovalCardProps) {
- const options = props.approval.options ?? DEFAULT_APPROVAL_OPTIONS;
+ const isProductFeedback = props.approval.toolName === AKERU_PRODUCT_FEEDBACK_TOOL_NAME;
+ const options = isProductFeedback
+ ? MOBILE_FEEDBACK_OPTIONS
+ : (props.approval.options ?? DEFAULT_APPROVAL_OPTIONS);
// Opaque for the same reason as PendingUserInputCard: nothing blurs the feed
// behind this card, so a translucent surface bleeds messages through it.
return (
@@ -33,11 +40,15 @@ export function PendingApprovalCard(props: PendingApprovalCardProps) {
Approval needed
</Text>
<Text className="font-t3-bold text-lg text-neutral-950 dark:text-neutral-50">
- {props.approval.appName ?? props.approval.requestKind}
+ {isProductFeedback
+ ? "Product feedback"
+ : (props.approval.appName ?? props.approval.requestKind)}
</Text>
{props.approval.detail ? (
<Text className="font-sans text-sm leading-normal text-neutral-600 dark:text-neutral-400">
- {props.approval.detail}
+ {isProductFeedback
+ ? "Open Akeru on web or desktop to review this feedback draft."
+ : props.approval.detail}
</Text>
) : null}
<View className="flex-row flex-wrap gap-2.5">
diff --git a/apps/mobile/src/lib/threadActivity.test.ts b/apps/mobile/src/lib/threadActivity.test.ts
index e2943ebc1..a1317ac2b 100644
--- a/apps/mobile/src/lib/threadActivity.test.ts
+++ b/apps/mobile/src/lib/threadActivity.test.ts
@@ -194,6 +194,24 @@ describe("pending approvals", () => {
expect(derivePendingApprovals([requested, resolved])).toEqual([]);
});
+
+ it("keeps the tool name needed for mobile feedback handling", () => {
+ const activity = makeActivity({
+ id: EventId.make("approval-feedback"),
+ kind: "approval.requested",
+ summary: "Approval requested",
+ createdAt: "2026-08-30T00:00:00.000Z",
+ payload: {
+ requestId: "req-feedback",
+ requestType: "dynamic_tool_call",
+ toolName: "akeru_product_feedback",
+ },
+ });
+
+ expect(derivePendingApprovals([activity])[0]).toMatchObject({
+ toolName: "akeru_product_feedback",
+ });
+ });
});
function makeActivity(
diff --git a/apps/mobile/src/lib/threadActivity.ts b/apps/mobile/src/lib/threadActivity.ts
index 9e0cb64ae..a9b357a07 100644
--- a/apps/mobile/src/lib/threadActivity.ts
+++ b/apps/mobile/src/lib/threadActivity.ts
@@ -24,6 +24,7 @@ export interface PendingApproval {
readonly createdAt: string;
readonly detail?: string;
readonly appName?: string;
+ readonly toolName?: string;
readonly options?: ReadonlyArray<ProviderApprovalOption>;
}
@@ -152,6 +153,7 @@ function requestKindFromRequestType(requestType: unknown): PendingApproval["requ
switch (requestType) {
case "command_execution_approval":
case "exec_command_approval":
+ case "dynamic_tool_call":
return "command";
case "file_read_approval":
return "file-read";
@@ -1393,6 +1395,7 @@ export function derivePendingApprovals(
: requestKindFromRequestType(payload?.requestType);
const detail = typeof payload?.detail === "string" ? payload.detail : undefined;
const appName = typeof payload?.appName === "string" ? payload.appName : undefined;
+ const toolName = typeof payload?.toolName === "string" ? payload.toolName : undefined;
const options = Array.isArray(payload?.options)
? payload.options.filter(isProviderApprovalOption)
: undefined;
@@ -1404,6 +1407,7 @@ export function derivePendingApprovals(
createdAt: activity.createdAt,
...(detail ? { detail } : {}),
...(appName ? { appName } : {}),
+ ...(toolName ? { toolName } : {}),
...(options && options.length > 0 ? { options } : {}),
});
continue;
diff --git a/apps/server/package.json b/apps/server/package.json
index 37737bfd6..31f7f8c0c 100644
--- a/apps/server/package.json
+++ b/apps/server/package.json
@@ -1,14 +1,14 @@
{
- "name": "t3",
+ "name": "akeru-bot",
"version": "0.0.34",
"license": "MIT",
"repository": {
"type": "git",
- "url": "https://github.com/pingdotgg/t3code",
+ "url": "https://github.com/opencoredev/akeru-bot",
"directory": "apps/server"
},
"bin": {
- "t3": "./dist/bin.mjs"
+ "akeru": "./dist/bin.mjs"
},
"files": [
"dist"
diff --git a/apps/server/src/auth/EnvironmentAuth.ts b/apps/server/src/auth/EnvironmentAuth.ts
index eb0563421..b56772f89 100644
--- a/apps/server/src/auth/EnvironmentAuth.ts
+++ b/apps/server/src/auth/EnvironmentAuth.ts
@@ -490,7 +490,7 @@ export class EnvironmentAuth extends Context.Service<
baseUrl: string,
) => Effect.Effect<string, ServerAuthInternalError>;
}
->()("t3/auth/EnvironmentAuth") {}
+>()("akeru-bot/auth/EnvironmentAuth") {}
type BootstrapExchangeResult = {
readonly response: AuthBrowserSessionResult;
diff --git a/apps/server/src/auth/EnvironmentAuthPolicy.ts b/apps/server/src/auth/EnvironmentAuthPolicy.ts
index 9945c6906..df39d50a2 100644
--- a/apps/server/src/auth/EnvironmentAuthPolicy.ts
+++ b/apps/server/src/auth/EnvironmentAuthPolicy.ts
@@ -11,7 +11,7 @@ export class EnvironmentAuthPolicy extends Context.Service<
{
readonly getDescriptor: () => Effect.Effect<ServerAuthDescriptor>;
}
->()("t3/auth/EnvironmentAuthPolicy") {}
+>()("akeru-bot/auth/EnvironmentAuthPolicy") {}
export const make = Effect.gen(function* () {
const config = yield* ServerConfig.ServerConfig;
diff --git a/apps/server/src/auth/PairingGrantStore.ts b/apps/server/src/auth/PairingGrantStore.ts
index 057a257ba..53bd9f93b 100644
--- a/apps/server/src/auth/PairingGrantStore.ts
+++ b/apps/server/src/auth/PairingGrantStore.ts
@@ -221,7 +221,7 @@ export class PairingGrantStore extends Context.Service<
},
) => Effect.Effect<BootstrapGrant, BootstrapCredentialError>;
}
->()("t3/auth/PairingGrantStore") {}
+>()("akeru-bot/auth/PairingGrantStore") {}
interface StoredBootstrapGrant extends BootstrapGrant {
readonly remainingUses: number | "unbounded";
diff --git a/apps/server/src/auth/ServerSecretStore.ts b/apps/server/src/auth/ServerSecretStore.ts
index 5e9890c1e..8bab075c9 100644
--- a/apps/server/src/auth/ServerSecretStore.ts
+++ b/apps/server/src/auth/ServerSecretStore.ts
@@ -147,7 +147,7 @@ export class ServerSecretStore extends Context.Service<
) => Effect.Effect<Uint8Array, SecretStoreError>;
readonly remove: (name: string) => Effect.Effect<void, SecretStoreError>;
}
->()("t3/auth/ServerSecretStore") {}
+>()("akeru-bot/auth/ServerSecretStore") {}
export const make = Effect.gen(function* () {
const crypto = yield* Crypto.Crypto;
diff --git a/apps/server/src/auth/SessionStore.ts b/apps/server/src/auth/SessionStore.ts
index cdcd4a1ac..8be2dcabd 100644
--- a/apps/server/src/auth/SessionStore.ts
+++ b/apps/server/src/auth/SessionStore.ts
@@ -405,7 +405,7 @@ export class SessionStore extends Context.Service<
},
) => Effect.Effect<void, never>;
}
->()("t3/auth/SessionStore") {}
+>()("akeru-bot/auth/SessionStore") {}
const SIGNING_SECRET_NAME = "server-signing-key";
const DEFAULT_SESSION_TTL = Duration.days(30);
diff --git a/apps/server/src/background/BackgroundPolicy.ts b/apps/server/src/background/BackgroundPolicy.ts
index a2a8e99d3..57b970547 100644
--- a/apps/server/src/background/BackgroundPolicy.ts
+++ b/apps/server/src/background/BackgroundPolicy.ts
@@ -53,7 +53,7 @@ export class BackgroundPolicy extends Context.Service<
readonly shouldRunScopeWork: (scope: BackgroundScope) => Effect.Effect<boolean>;
readonly shouldRunOpportunisticWork: Effect.Effect<boolean>;
}
->()("t3/background/BackgroundPolicy") {}
+>()("akeru-bot/background/BackgroundPolicy") {}
const DEFAULT_LEASE_TTL_MS = 45_000;
const MAX_LEASE_TTL_MS = 120_000;
diff --git a/apps/server/src/background/HostPowerMonitor.ts b/apps/server/src/background/HostPowerMonitor.ts
index 273548faa..c0acffb23 100644
--- a/apps/server/src/background/HostPowerMonitor.ts
+++ b/apps/server/src/background/HostPowerMonitor.ts
@@ -17,7 +17,7 @@ export class HostPowerMonitor extends Context.Service<
readonly report: (snapshot: HostPowerSnapshot) => Effect.Effect<void>;
readonly streamChanges: Stream.Stream<HostPowerSnapshot>;
}
->()("t3/background/HostPowerMonitor") {}
+>()("akeru-bot/background/HostPowerMonitor") {}
export const makeUnknownSnapshot = (
source: HostPowerSnapshot["source"],
diff --git a/apps/server/src/bin.test.ts b/apps/server/src/bin.test.ts
index fcb662b9b..937073c23 100644
--- a/apps/server/src/bin.test.ts
+++ b/apps/server/src/bin.test.ts
@@ -194,7 +194,7 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {
if (error._tag !== "ShowHelp") {
assert.fail(`Expected ShowHelp, got ${error._tag}`);
}
- assert.deepEqual(error.commandPath, ["t3", "connect"]);
+ assert.deepEqual(error.commandPath, ["akeru", "connect"]);
assert.include(error.errors[0]?.message ?? "", "missing T3 Connect public configuration");
const output = (yield* TestConsole.errorLines).join("\n");
@@ -252,7 +252,7 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {
assert.include(output, "T3 Connect\n Exposure: disabled");
assert.include(output, " Authorization: missing");
assert.include(output, " Environment link: not provisioned");
- assert.include(output, "Next: Run `t3 connect link` to authorize and enable T3 Connect.");
+ assert.include(output, "Next: Run `akeru connect link` to authorize and enable T3 Connect.");
}),
);
@@ -320,7 +320,7 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {
assert.equal(
output,
- "Signed out of T3 Connect locally.\nThe background service is managed separately with `t3 service`.",
+ "Signed out of T3 Connect locally.\nThe background service is managed separately with `akeru service`.",
);
assert.isFalse(NodeFS.existsSync(tokenPath));
}),
@@ -423,7 +423,7 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {
if (error._tag !== "ShowHelp") {
assert.fail(`Expected ShowHelp, got ${error._tag}`);
}
- assert.deepEqual(error.commandPath, ["t3", "auth", "pairing", "create"]);
+ assert.deepEqual(error.commandPath, ["akeru", "auth", "pairing", "create"]);
const ttlError = error.errors[0] as CliError.CliError | undefined;
if (!ttlError || ttlError._tag !== "InvalidValue") {
assert.fail(`Expected InvalidValue, got ${String(ttlError?._tag)}`);
@@ -591,7 +591,7 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {
if (error._tag !== "ShowHelp") {
assert.fail(`Expected ShowHelp, got ${error._tag}`);
}
- assert.deepEqual(error.commandPath, ["t3", "project", "add"]);
+ assert.deepEqual(error.commandPath, ["akeru", "project", "add"]);
const optionError = error.errors[0] as CliError.CliError | undefined;
if (!optionError || optionError._tag !== "UnrecognizedOption") {
assert.fail(`Expected UnrecognizedOption, got ${String(optionError?._tag)}`);
diff --git a/apps/server/src/bin.ts b/apps/server/src/bin.ts
index 8d2ee75ac..6d054d621 100644
--- a/apps/server/src/bin.ts
+++ b/apps/server/src/bin.ts
@@ -38,7 +38,7 @@ const connectUnavailableCommand = Command.make("connect", {
Command.withHandler(() =>
Effect.fail(
new CliError.ShowHelp({
- commandPath: ["t3", "connect"],
+ commandPath: ["akeru", "connect"],
errors: [new ConnectPublicConfigMissingError({ cause: connectPublicConfigMissingMessage })],
}),
),
@@ -46,8 +46,8 @@ const connectUnavailableCommand = Command.make("connect", {
);
export const makeCli = ({ cloudEnabled = hasCloudPublicConfig } = {}) =>
- Command.make("t3", { ...sharedServerCommandFlags }).pipe(
- Command.withDescription("Run the T3 Code server."),
+ Command.make("akeru", { ...sharedServerCommandFlags }).pipe(
+ Command.withDescription("Run the Akeru Bot server."),
Command.withHandler((flags) => runServerCommand(flags)),
Command.withSubcommands([
startCommand,
diff --git a/apps/server/src/checkpointing/CheckpointDiffQuery.ts b/apps/server/src/checkpointing/CheckpointDiffQuery.ts
index 077506ff3..240dd8df4 100644
--- a/apps/server/src/checkpointing/CheckpointDiffQuery.ts
+++ b/apps/server/src/checkpointing/CheckpointDiffQuery.ts
@@ -55,7 +55,7 @@ export class CheckpointDiffQuery extends Context.Service<
input: OrchestrationGetFullThreadDiffInput,
) => Effect.Effect<OrchestrationGetFullThreadDiffResult, CheckpointServiceError>;
}
->()("t3/checkpointing/CheckpointDiffQuery") {}
+>()("akeru-bot/checkpointing/CheckpointDiffQuery") {}
const isTurnDiffResult = Schema.is(OrchestrationGetTurnDiffResult);
diff --git a/apps/server/src/checkpointing/CheckpointStore.ts b/apps/server/src/checkpointing/CheckpointStore.ts
index f13aa4572..5614c9e37 100644
--- a/apps/server/src/checkpointing/CheckpointStore.ts
+++ b/apps/server/src/checkpointing/CheckpointStore.ts
@@ -94,7 +94,7 @@ export class CheckpointStore extends Context.Service<
input: DeleteCheckpointRefsInput,
) => Effect.Effect<void, CheckpointStoreError>;
}
->()("t3/checkpointing/CheckpointStore") {}
+>()("akeru-bot/checkpointing/CheckpointStore") {}
export const make = Effect.gen(function* () {
const vcsRegistry = yield* VcsDriverRegistry.VcsDriverRegistry;
diff --git a/apps/server/src/cli/config.ts b/apps/server/src/cli/config.ts
index 674f5c306..9f38b139f 100644
--- a/apps/server/src/cli/config.ts
+++ b/apps/server/src/cli/config.ts
@@ -32,7 +32,7 @@ export const hostFlag = Flag.string("host").pipe(
);
export const baseDirFlag = Flag.string("base-dir").pipe(
Flag.withDescription(
- "Explicit Akeru Bot data directory; runtime state is stored under userdata (equivalent to AKERU_HOME or T3CODE_HOME).",
+ "Explicit Akeru Bot data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME).",
),
Flag.optional,
);
diff --git a/apps/server/src/cli/connect.ts b/apps/server/src/cli/connect.ts
index 74f469364..5b7c4aaff 100644
--- a/apps/server/src/cli/connect.ts
+++ b/apps/server/src/cli/connect.ts
@@ -193,9 +193,9 @@ function formatCloudStatus(status: CloudCliStatus, options?: { readonly json?: b
? "pending server startup"
: "not provisioned";
const nextStep = !status.authenticated
- ? "Run `t3 connect link` to authorize and enable T3 Connect."
+ ? "Run `akeru connect link` to authorize and enable T3 Connect."
: !status.desired
- ? "Run `t3 connect link` to enable T3 Connect."
+ ? "Run `akeru connect link` to enable T3 Connect."
: !status.linked
? "Start T3 to provision the environment link and launch its managed tunnel."
: undefined;
@@ -274,7 +274,7 @@ const withCloudCliSessionToken = <A, E, R>(
environmentAuth.issueSession({
scopes: [AuthRelayWriteScope],
subject: "cloud-cli",
- label: "t3 connect cli",
+ label: "akeru connect cli",
}),
(issued) => run(issued.token),
(issued) => environmentAuth.revokeSession(issued.sessionId).pipe(Effect.ignore({ log: true })),
@@ -383,7 +383,7 @@ export const reportCloudDisconnectResults = Effect.fn("cloud.cli.report_disconne
yield* Console.warn(
input.clearAuthorization
? "Could not revoke the relay-side environment record before signing out.\nThe stored CLI authorization was still removed locally."
- : "Could not revoke the relay-side environment record yet.\nRun `t3 connect unlink` again when the relay is reachable.",
+ : "Could not revoke the relay-side environment record yet.\nRun `akeru connect unlink` again when the relay is reachable.",
);
} else if (input.relayResult.value.status === "revoked") {
yield* Console.log("Revoked the relay-side environment record.");
@@ -412,7 +412,7 @@ const disconnectCloud = Effect.fn("cloud.cli.disconnect")(function* (options: {
if (options.clearAuthorization) {
yield* Console.log(
- "Signed out of T3 Connect locally.\nThe background service is managed separately with `t3 service`.",
+ "Signed out of T3 Connect locally.\nThe background service is managed separately with `akeru service`.",
);
}
});
@@ -632,11 +632,11 @@ const connectPublishCommand = Command.make("publish", {
// out of band without T3 Connect.
if (!(yield* tokens.hasCredential)) {
yield* Console.log(
- "Run `t3 connect login` first so this environment can be authorized to publish.",
+ "Run `akeru connect login` first so this environment can be authorized to publish.",
);
return;
}
- // A link may already be desired (e.g. `t3 connect link` before the
+ // A link may already be desired (e.g. `akeru connect link` before the
// server's first start). Never downgrade it: a desired managed link
// also covers publishing, so only request a publish-only link when no
// link is pending at all.
diff --git a/apps/server/src/cli/invocation.test.ts b/apps/server/src/cli/invocation.test.ts
index c01a2caa4..fea417f93 100644
--- a/apps/server/src/cli/invocation.test.ts
+++ b/apps/server/src/cli/invocation.test.ts
@@ -3,72 +3,85 @@ import { assert, it } from "@effect/vitest";
import { detectCliRunner, formatCliCommand, suggestedPackageSpec } from "./invocation.ts";
it("detects package runners from their cache entry paths", () => {
- assert.equal(detectCliRunner("/home/theo/.npm/_npx/abc123/node_modules/t3/dist/bin.mjs"), "npx");
+ assert.equal(
+ detectCliRunner("/home/leo/.npm/_npx/abc123/node_modules/akeru-bot/dist/bin.mjs"),
+ "npx",
+ );
assert.equal(
detectCliRunner(
- "C:\\Users\\theo\\AppData\\Local\\npm-cache\\_npx\\abc\\node_modules\\t3\\dist\\bin.mjs",
+ "C:\\Users\\leo\\AppData\\Local\\npm-cache\\_npx\\abc\\node_modules\\akeru-bot\\dist\\bin.mjs",
),
"npx",
);
assert.equal(
- detectCliRunner("/home/theo/.cache/pnpm/dlx/abc/node_modules/t3/dist/bin.mjs"),
+ detectCliRunner("/home/leo/.cache/pnpm/dlx/abc/node_modules/akeru-bot/dist/bin.mjs"),
"pnpm dlx",
);
assert.equal(
- detectCliRunner("/home/theo/.local/share/pnpm/.pnpm/dlx/abc/node_modules/t3/dist/bin.mjs"),
+ detectCliRunner(
+ "/home/leo/.local/share/pnpm/.pnpm/dlx/abc/node_modules/akeru-bot/dist/bin.mjs",
+ ),
"pnpm dlx",
);
assert.equal(
detectCliRunner(
- "C:\\Users\\theo\\AppData\\Local\\pnpm-cache\\dlx\\abc\\node_modules\\t3\\dist\\bin.mjs",
+ "C:\\Users\\leo\\AppData\\Local\\pnpm-cache\\dlx\\abc\\node_modules\\akeru-bot\\dist\\bin.mjs",
),
"pnpm dlx",
);
- assert.equal(detectCliRunner("/home/theo/.bun/install/cache/[email protected]/dist/bin.mjs"), "bunx");
- assert.equal(detectCliRunner("/tmp/bunx-1000-t3@latest/node_modules/t3/dist/bin.mjs"), "bunx");
+ assert.equal(
+ detectCliRunner("/home/leo/.bun/install/cache/[email protected]/dist/bin.mjs"),
+ "bunx",
+ );
+ assert.equal(
+ detectCliRunner("/tmp/bunx-1000-akeru-bot@latest/node_modules/akeru-bot/dist/bin.mjs"),
+ "bunx",
+ );
assert.equal(
detectCliRunner(
- "C:\\Users\\theo\\AppData\\Local\\Temp\\bunx-0-t3@latest\\node_modules\\t3\\dist\\bin.mjs",
+ "C:\\Users\\leo\\AppData\\Local\\Temp\\bunx-0-akeru-bot@latest\\node_modules\\akeru-bot\\dist\\bin.mjs",
),
"bunx",
);
});
it("treats stable installs as direct invocations", () => {
- assert.isNull(detectCliRunner("/usr/local/lib/node_modules/t3/dist/bin.mjs"));
- assert.isNull(detectCliRunner("/home/theo/Code/work/t3code/apps/server/dist/bin.mjs"));
- assert.isNull(detectCliRunner("/home/theo/.t3/runtime/0.0.31/node_modules/t3/dist/bin.mjs"));
+ assert.isNull(detectCliRunner("/usr/local/lib/node_modules/akeru-bot/dist/bin.mjs"));
+ assert.isNull(detectCliRunner("/home/leo/Code/work/akeru-bot/apps/server/dist/bin.mjs"));
+ assert.isNull(
+ detectCliRunner("/home/leo/.akeru/runtime/0.0.31/node_modules/akeru-bot/dist/bin.mjs"),
+ );
assert.isNull(detectCliRunner(""));
});
it("re-suggests the nightly channel only for nightly builds", () => {
- assert.equal(suggestedPackageSpec("0.0.31-nightly.20260729"), "t3@nightly");
- assert.equal(suggestedPackageSpec("0.0.31"), "t3");
+ assert.equal(suggestedPackageSpec("0.0.31-nightly.20260729"), "akeru-bot@nightly");
+ assert.equal(suggestedPackageSpec("0.0.31"), "akeru-bot");
});
it("formats serve suggestions to match the launching command", () => {
assert.equal(
formatCliCommand({
subcommand: "serve",
- entryPath: "/home/theo/.npm/_npx/abc/node_modules/t3/dist/bin.mjs",
+ entryPath: "/home/leo/.npm/_npx/abc/node_modules/akeru-bot/dist/bin.mjs",
version: "0.0.31-nightly.20260729",
}),
- "npx t3@nightly serve",
+ "npx akeru-bot@nightly serve",
);
assert.equal(
formatCliCommand({
subcommand: "serve",
- entryPath: "/tmp/bunx-1000-t3@latest/node_modules/t3/dist/bin.mjs",
+ entryPath: "/tmp/bunx-1000-akeru-bot@latest/node_modules/akeru-bot/dist/bin.mjs",
version: "0.0.31",
}),
- "bunx t3 serve",
+ "bunx akeru-bot serve",
);
assert.equal(
formatCliCommand({
subcommand: "serve",
- entryPath: "/usr/local/lib/node_modules/t3/dist/bin.mjs",
+ entryPath: "/usr/local/lib/node_modules/akeru-bot/dist/bin.mjs",
version: "0.0.31-nightly.20260729",
}),
- "t3 serve",
+ "akeru serve",
);
});
diff --git a/apps/server/src/cli/invocation.ts b/apps/server/src/cli/invocation.ts
index e1b035529..ae7f07f98 100644
--- a/apps/server/src/cli/invocation.ts
+++ b/apps/server/src/cli/invocation.ts
@@ -16,7 +16,7 @@ export type CliRunner = "npx" | "pnpm dlx" | "bunx";
* bunx ~/.bun/install/cache/... or $TMPDIR/bunx-<uid>-<spec>/...
*
* Global installs and repo checkouts match none of these and return null.
- * Detection is best-effort; callers must fail closed to a plain `t3` command.
+ * Detection is best-effort; callers must fail closed to a plain `akeru` command.
*/
export function detectCliRunner(entryPath: string): CliRunner | null {
const path = entryPath.replaceAll("\\", "/");
@@ -37,20 +37,20 @@ export function detectCliRunner(entryPath: string): CliRunner | null {
}
/**
- * The `t3` package spec to suggest. The literal spec the user typed (e.g.
- * `t3@nightly`) is resolved away before our process starts, so re-derive it
- * from the running version: nightly builds re-suggest the nightly channel,
- * anything else suggests the bare package.
+ * The `akeru-bot` package spec to suggest. The literal spec the user typed
+ * (for example, `akeru-bot@nightly`) is resolved away before our process
+ * starts, so re-derive it from the running version. Nightly builds re-suggest
+ * the nightly channel. Anything else suggests the bare package.
*/
export function suggestedPackageSpec(version: string): string {
- return version.includes("-nightly.") ? "t3@nightly" : "t3";
+ return version.includes("-nightly.") ? "akeru-bot@nightly" : "akeru-bot";
}
/**
- * Render a `t3 <subcommand>` suggestion that matches how this process was
- * launched, so copy/pasting it actually works: `npx t3 connect` suggests
- * `npx t3 serve`, a global install suggests `t3 serve`, and a nightly build
- * keeps the `@nightly` tag.
+ * Render an `akeru <subcommand>` suggestion that matches how this process was
+ * launched, so copy/pasting it works. An `npx akeru-bot connect` launch suggests
+ * `npx akeru-bot serve`, a global install suggests `akeru serve`, and a nightly
+ * build keeps the `@nightly` tag.
*/
export function formatCliCommand(input: {
readonly subcommand: string;
@@ -59,7 +59,7 @@ export function formatCliCommand(input: {
}): string {
const runner = detectCliRunner(input.entryPath);
if (runner === null) {
- return `t3 ${input.subcommand}`;
+ return `akeru ${input.subcommand}`;
}
return `${runner} ${suggestedPackageSpec(input.version)} ${input.subcommand}`;
}
diff --git a/apps/server/src/cli/pair.test.ts b/apps/server/src/cli/pair.test.ts
index c4f321a5a..4c234a4d6 100644
--- a/apps/server/src/cli/pair.test.ts
+++ b/apps/server/src/cli/pair.test.ts
@@ -135,7 +135,7 @@ const withDescriptorServer = <A, E, R>(run: (origin: string) => Effect.Effect<A,
(server) => Effect.sync(() => server.close()),
);
-describe("t3 pair", () => {
+describe("akeru pair", () => {
it.effect("mints a token and prints a QR pairing URL for a live server", () =>
withDescriptorServer((origin) =>
Effect.gen(function* () {
@@ -168,7 +168,7 @@ describe("t3 pair", () => {
// @effect-diagnostics-next-line preferSchemaOverJson:off - CLI JSON output is decoded as a presentation DTO.
const credentials = JSON.parse(listed) as ReadonlyArray<{ readonly label?: string }>;
assert.equal(credentials.length, 1);
- assert.equal(credentials[0]?.label, "t3 pair");
+ assert.equal(credentials[0]?.label, "akeru pair");
}),
).pipe(Effect.provide(NodeServices.layer)),
);
@@ -194,7 +194,7 @@ describe("t3 pair", () => {
).pipe(Effect.provide(NodeServices.layer)),
);
- it.effect("directs to t3 serve or t3 connect when no server is running", () =>
+ it.effect("directs to akeru serve or akeru connect when no server is running", () =>
Effect.gen(function* () {
const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-pair-none-test-"));
@@ -206,8 +206,8 @@ describe("t3 pair", () => {
typeof error === "object" && error !== null && "cause" in error ? error.cause : error,
);
assert.include(rendered, "No running T3 Code server found.");
- assert.include(rendered, "npx t3 serve");
- assert.include(rendered, "npx t3 connect");
+ assert.include(rendered, "npx akeru-bot serve");
+ assert.include(rendered, "npx akeru-bot connect");
}).pipe(Effect.provide(NodeServices.layer)),
);
diff --git a/apps/server/src/cli/pair.ts b/apps/server/src/cli/pair.ts
index 38fa3be8b..4b7508726 100644
--- a/apps/server/src/cli/pair.ts
+++ b/apps/server/src/cli/pair.ts
@@ -1,5 +1,5 @@
/**
- * `t3 pair` - mint a pairing token for an already-running server and print it
+ * `akeru pair` - mint a pairing token for an already-running server and print it
* as a QR code, without restarting anything.
*
* Discovery reads the `server-runtime.json` a live server persists next to its
@@ -78,7 +78,7 @@ export class NoRunningServerError extends Schema.TaggedErrorClass<NoRunningServe
return [
"No running T3 Code server found.",
...this.checkedStatePaths.map((statePath) => ` checked ${statePath}`),
- "Start one with `npx t3 serve`, or connect this machine with T3 Connect: `npx t3 connect`.",
+ "Start one with `npx akeru-bot serve`, or connect this machine with T3 Connect: `npx akeru-bot connect`.",
].join("\n");
}
}
@@ -215,7 +215,7 @@ const probeEnvironmentDescriptor = (
);
// Bad-gateway family means a proxy (Tailscale Serve) answered for a
// backend that is gone — a stale mapping, not a live occupant. Treating
- // it as unreachable lets `t3 pair --tailscale` repair its own mapping
+ // it as unreachable lets `akeru pair --tailscale` repair its own mapping
// after the server's port changed.
if (response.status === 502 || response.status === 503 || response.status === 504) {
return { _tag: "unreachable" } as const;
@@ -255,7 +255,7 @@ const discoverPairTarget = Effect.fn("pair.discoverPairTarget")(function* (
bases.push(yield* resolveBaseDir(explicitBaseDir));
} else {
// Same precedence as dev-runner: inside a linked worktree its own `.t3`
- // outranks the shared home, so `t3 pair` in a worktree pairs with the dev
+ // outranks the shared home, so `akeru pair` in a worktree pairs with the dev
// server under test rather than the daily-driver install.
const worktreeHome = yield* resolveWorktreeT3Home(process.cwd());
if (worktreeHome !== undefined) {
@@ -442,7 +442,7 @@ const mintPairingLink = Effect.fn("pair.mintPairingLink")(function* (input: {
return yield* environmentAuth.createPairingLink({
scopes: AuthStandardClientScopes,
subject: "one-time-token",
- label: Option.getOrElse(input.label, () => "t3 pair"),
+ label: Option.getOrElse(input.label, () => "akeru pair"),
...(Option.isSome(input.ttl) ? { ttl: input.ttl.value } : {}),
});
}).pipe(
diff --git a/apps/server/src/cli/project.ts b/apps/server/src/cli/project.ts
index 39b3b2431..15d8db6da 100644
--- a/apps/server/src/cli/project.ts
+++ b/apps/server/src/cli/project.ts
@@ -214,7 +214,7 @@ const withProjectCliSessionToken = <A, E, R>(
Effect.acquireUseRelease(
environmentAuth.issueSession({
scopes: AuthAdministrativeScopes,
- label: "t3 project cli",
+ label: "akeru project cli",
}),
(issued) => run(issued.token),
(issued) => environmentAuth.revokeSession(issued.sessionId).pipe(Effect.ignore({ log: true })),
diff --git a/apps/server/src/cli/service.test.ts b/apps/server/src/cli/service.test.ts
index 08980faf7..24a82949c 100644
--- a/apps/server/src/cli/service.test.ts
+++ b/apps/server/src/cli/service.test.ts
@@ -15,7 +15,7 @@ it("reports the installed service version and host paths", () => {
formatServiceStatus(status, "0.0.29"),
[
"T3 Code service",
- " Status: installed · [email protected]",
+ " Status: installed · [email protected]",
" Unit: /home/me/.config/systemd/user/t3code.service",
" Logs: /home/me/.t3/userdata/logs/boot-service.log",
].join("\n"),
@@ -25,7 +25,7 @@ it("reports the installed service version and host paths", () => {
it("gives a direct repair command for a stale service", () => {
assert.include(
formatServiceStatus({ ...status, current: false }, "0.0.29"),
- "Next: Run `npx t3@latest service update`.",
+ "Next: Run `npx akeru-bot@latest service update`.",
);
});
diff --git a/apps/server/src/cli/service.ts b/apps/server/src/cli/service.ts
index 74d220610..2716bc383 100644
--- a/apps/server/src/cli/service.ts
+++ b/apps/server/src/cli/service.ts
@@ -52,14 +52,14 @@ export function formatServiceStatus(
return "T3 Code service\n Status: unavailable on this machine\n Supported on: Linux with systemd, macOS with launchd";
}
if (!status.installed) {
- return "T3 Code service\n Status: not installed\n Next: Run `t3 service install`.";
+ return "T3 Code service\n Status: not installed\n Next: Run `akeru service install`.";
}
return [
"T3 Code service",
- ` Status: ${status.current ? `installed · t3@${cliVersion}` : "needs an update or repair"}`,
+ ` Status: ${status.current ? `installed · akeru-bot@${cliVersion}` : "needs an update or repair"}`,
` Unit: ${status.unitPath}`,
` Logs: ${status.logPath}`,
- ...(status.current ? [] : [" Next: Run `npx t3@latest service update`."]),
+ ...(status.current ? [] : [" Next: Run `npx akeru-bot@latest service update`."]),
].join("\n");
}
@@ -81,12 +81,12 @@ const serviceInstallCommand = Command.make("install", projectLocationFlags).pipe
const result = yield* reconcileService();
if (!result.changed) {
yield* Console.log(
- `T3 Code service is already installed with t3@${packageJson.version}.`,
+ `T3 Code service is already installed with akeru-bot@${packageJson.version}.`,
);
return;
}
yield* Console.log(
- `${result.previouslyInstalled ? "Updated" : "Installed"} T3 Code service with t3@${packageJson.version}.\nLogs: ${result.plan.logPath}`,
+ `${result.previouslyInstalled ? "Updated" : "Installed"} T3 Code service with akeru-bot@${packageJson.version}.\nLogs: ${result.plan.logPath}`,
);
}),
),
@@ -95,7 +95,7 @@ const serviceInstallCommand = Command.make("install", projectLocationFlags).pipe
const serviceUpdateCommand = Command.make("update", projectLocationFlags).pipe(
Command.withDescription(
- "Update or repair the background service using this CLI version. Use `npx t3@latest service update` for the latest release.",
+ "Update or repair the background service using this CLI version. Use `npx akeru-bot@latest service update` for the latest release.",
),
Command.withHandler((flags) =>
runServiceCommand(
@@ -103,11 +103,11 @@ const serviceUpdateCommand = Command.make("update", projectLocationFlags).pipe(
Effect.gen(function* () {
const result = yield* reconcileService();
if (!result.changed) {
- yield* Console.log(`T3 Code service is already using t3@${packageJson.version}.`);
+ yield* Console.log(`T3 Code service is already using akeru-bot@${packageJson.version}.`);
return;
}
yield* Console.log(
- `${result.previouslyInstalled ? "Updated" : "Installed"} T3 Code service with t3@${packageJson.version}.\nLogs: ${result.plan.logPath}`,
+ `${result.previouslyInstalled ? "Updated" : "Installed"} T3 Code service with akeru-bot@${packageJson.version}.\nLogs: ${result.plan.logPath}`,
);
}),
),
diff --git a/apps/server/src/cli/triage.ts b/apps/server/src/cli/triage.ts
index 76d577a12..e3770e308 100644
--- a/apps/server/src/cli/triage.ts
+++ b/apps/server/src/cli/triage.ts
@@ -1,5 +1,5 @@
/**
- * `t3 triage` - hand a misbehaving install to the user's own coding agent.
+ * `akeru triage` - hand a misbehaving install to the user's own coding agent.
*
* The command is deliberately thin: it writes a `context.md` with machine facts
* (version, paths, server liveness), then launches claude or codex
@@ -169,7 +169,7 @@ export const triageCommand = Command.make("triage", {
model: modelFlag,
}).pipe(
Command.withDescription(
- "Investigate a T3 Code problem on this machine with claude or codex, and help file a good issue.",
+ "Investigate an Akeru Bot problem on this machine with claude or codex, and help file a good issue.",
),
Command.withHandler((flags) =>
Effect.gen(function* () {
@@ -178,7 +178,7 @@ export const triageCommand = Command.make("triage", {
// Triage is a user-facing feature: always the userdata state, never dev.
// --base-dir wins; T3CODE_HOME is its documented env equivalent (same
- // precedence as `t3 pair`).
+ // precedence as `akeru pair`).
const explicitBaseDir = Option.getOrUndefined(flags.baseDir);
const envHome = yield* Config.string("T3CODE_HOME").pipe(Config.option);
const baseDir = yield* resolveBaseDir(explicitBaseDir ?? Option.getOrUndefined(envHome));
diff --git a/apps/server/src/cli/triagePrompt.test.ts b/apps/server/src/cli/triagePrompt.test.ts
index bf1ac5dbb..22d0438f9 100644
--- a/apps/server/src/cli/triagePrompt.test.ts
+++ b/apps/server/src/cli/triagePrompt.test.ts
@@ -11,18 +11,63 @@ import {
TRIAGE_PLAYBOOK,
} from "./triagePrompt.ts";
+const repoRoot = NodePath.join(import.meta.dirname, "../../../..");
+
it("stays byte-identical to .github/triage/PLAYBOOK.md", () => {
// Old releases fetch the repo copy from `main` and follow it when it differs
// from their bundled playbook. The two must say the same thing at HEAD, or a
// playbook edit silently changes behavior only for old (or only for new)
// installs. Edit both files together.
- const canonicalPath = NodePath.join(
- import.meta.dirname,
- "../../../../.github/triage/PLAYBOOK.md",
- );
+ const canonicalPath = NodePath.join(repoRoot, ".github/triage/PLAYBOOK.md");
assert.equal(TRIAGE_PLAYBOOK, NodeFS.readFileSync(canonicalPath, "utf8"));
});
+it("keeps the GitHub triage flow Akeru-only and labeled via-triage", () => {
+ const issueTemplate = NodeFS.readFileSync(
+ NodePath.join(repoRoot, ".github/ISSUE_TEMPLATE/via-triage.yml"),
+ "utf8",
+ );
+ const bugTemplate = NodeFS.readFileSync(
+ NodePath.join(repoRoot, ".github/ISSUE_TEMPLATE/bug_report.yml"),
+ "utf8",
+ );
+ const issueConfig = NodeFS.readFileSync(
+ NodePath.join(repoRoot, ".github/ISSUE_TEMPLATE/config.yml"),
+ "utf8",
+ );
+ const issueLabelWorkflow = NodeFS.readFileSync(
+ NodePath.join(repoRoot, ".github/workflows/issue-labels.yml"),
+ "utf8",
+ );
+ const githubTriage = `${issueTemplate}\n${bugTemplate}\n${issueConfig}`;
+
+ assert.include(issueTemplate, "`npx akeru-bot triage`");
+ assert.match(issueTemplate, /labels:\n - via-triage\nbody:/u);
+ assert.include(issueLabelWorkflow, 'name: "via-triage"');
+ assert.notMatch(githubTriage, /T3 Code|npx t3|pingdotgg\/t3code|AI.generated/iu);
+});
+
+it("keeps the package identity and explicit approval gate", () => {
+ const packageManifest = NodeFS.readFileSync(
+ NodePath.join(repoRoot, "apps/server/package.json"),
+ "utf8",
+ );
+ const triageSource = NodeFS.readFileSync(
+ NodePath.join(repoRoot, "apps/server/src/cli/triage.ts"),
+ "utf8",
+ );
+
+ assert.include(packageManifest, '"name": "akeru-bot"');
+ assert.include(packageManifest, '"url": "https://github.com/opencoredev/akeru-bot"');
+ assert.include(packageManifest, '"akeru": "./dist/bin.mjs"');
+ assert.include(triageSource, 'Config.string("T3CODE_HOME")');
+ assert.notInclude(triageSource, 'Config.string("AKERU_HOME")');
+ assert.include(TRIAGE_PLAYBOOK, "Show the user the complete final issue text");
+ assert.include(TRIAGE_PLAYBOOK, "get an explicit yes before");
+ assert.include(TRIAGE_PLAYBOOK, "Never post without it");
+ assert.include(TRIAGE_PLAYBOOK, "issues/new?template=via-triage.yml");
+});
+
it("seed prompt names the context file and embeds the playbook", () => {
const prompt = buildTriageSeedPrompt("/tmp/triage-run/context.md");
assert.include(prompt, "/tmp/triage-run/context.md");
@@ -32,9 +77,11 @@ it("seed prompt names the context file and embeds the playbook", () => {
it("launch prompt stays a single argv-safe line naming the prompt file", () => {
// The launch argument goes through cmd.exe on Windows (.cmd shims), which
// cannot carry newlines; the playbook itself must stay on disk.
- const launch = buildTriageLaunchPrompt(String.raw`C:\Users\a b\.t3\userdata\triage\x\prompt.md`);
+ const launch = buildTriageLaunchPrompt(
+ String.raw`C:\Users\a b\.akeru\userdata\triage\x\prompt.md`,
+ );
assert.notInclude(launch, "\n");
- assert.include(launch, String.raw`C:\Users\a b\.t3\userdata\triage\x\prompt.md`);
+ assert.include(launch, String.raw`C:\Users\a b\.akeru\userdata\triage\x\prompt.md`);
assert.isBelow(launch.length, 1_000);
});
@@ -45,27 +92,27 @@ it("context file carries every path the playbook depends on", () => {
releaseTag: "v0.0.33",
os: "linux x64 (7.0.0)",
nodeVersion: "v24.0.0",
- launchedAs: "npx t3 triage",
+ launchedAs: "npx akeru-bot triage",
server: "running (pid 42, http://127.0.0.1:4501)",
paths: {
- stateDir: "/home/u/.t3/userdata",
- dbPath: "/home/u/.t3/userdata/state.sqlite",
- settingsPath: "/home/u/.t3/userdata/settings.json",
- logsDir: "/home/u/.t3/userdata/logs",
- serverLogPath: "/home/u/.t3/userdata/logs/server.log",
- serverTracePath: "/home/u/.t3/userdata/logs/server.trace.ndjson",
- providerEventLogPath: "/home/u/.t3/userdata/logs/provider/events.log",
- terminalLogsDir: "/home/u/.t3/userdata/logs/terminals",
- providerStatusCacheDir: "/home/u/.t3/caches",
- secretsDir: "/home/u/.t3/userdata/secrets",
- sourceCacheDir: "/home/u/.t3/source",
+ stateDir: "/home/u/.akeru/userdata",
+ dbPath: "/home/u/.akeru/userdata/state.sqlite",
+ settingsPath: "/home/u/.akeru/userdata/settings.json",
+ logsDir: "/home/u/.akeru/userdata/logs",
+ serverLogPath: "/home/u/.akeru/userdata/logs/server.log",
+ serverTracePath: "/home/u/.akeru/userdata/logs/server.trace.ndjson",
+ providerEventLogPath: "/home/u/.akeru/userdata/logs/provider/events.log",
+ terminalLogsDir: "/home/u/.akeru/userdata/logs/terminals",
+ providerStatusCacheDir: "/home/u/.akeru/caches",
+ secretsDir: "/home/u/.akeru/userdata/secrets",
+ sourceCacheDir: "/home/u/.akeru/source",
},
});
- assert.include(context, "/home/u/.t3/userdata/state.sqlite");
- assert.include(context, "/home/u/.t3/userdata/logs/server.trace.ndjson");
- assert.include(context, "/home/u/.t3/userdata/logs/provider/events.log");
- assert.include(context, "/home/u/.t3/userdata/secrets");
- assert.include(context, "/home/u/.t3/source");
- assert.include(context, "npx t3 triage");
+ assert.include(context, "/home/u/.akeru/userdata/state.sqlite");
+ assert.include(context, "/home/u/.akeru/userdata/logs/server.trace.ndjson");
+ assert.include(context, "/home/u/.akeru/userdata/logs/provider/events.log");
+ assert.include(context, "/home/u/.akeru/userdata/secrets");
+ assert.include(context, "/home/u/.akeru/source");
+ assert.include(context, "npx akeru-bot triage");
assert.include(context, "v0.0.33");
});
diff --git a/apps/server/src/cli/triagePrompt.ts b/apps/server/src/cli/triagePrompt.ts
index c2b93a184..1da379c1b 100644
--- a/apps/server/src/cli/triagePrompt.ts
+++ b/apps/server/src/cli/triagePrompt.ts
@@ -1,5 +1,5 @@
/**
- * All text `t3 triage` hands to the coding agent. Kept as bare template strings
+ * All text `akeru triage` hands to the coding agent. Kept as bare template strings
* on purpose: to change triage behavior, edit the text.
*
* `TRIAGE_PLAYBOOK` must stay byte-identical to `.github/triage/PLAYBOOK.md`
@@ -10,9 +10,9 @@
* when the two drift.
*/
-export const TRIAGE_PLAYBOOK = `# T3 Code triage playbook
+export const TRIAGE_PLAYBOOK = `# Akeru Bot triage playbook
-You are a support engineer for T3 Code (https://github.com/pingdotgg/t3code), working
+You are a support engineer for Akeru Bot (https://github.com/opencoredev/akeru-bot), working
inside a coding-agent session on the machine of a user whose install is misbehaving:
crashes, auth failures, broken setups, slow launches, or anything else. Your job is to
find out what went wrong, unblock the user if you can, and turn what you learned into
@@ -36,7 +36,7 @@ paths for state, logs, and the database.
## 3. Check for a newer playbook
-Fetch https://raw.githubusercontent.com/pingdotgg/t3code/main/.github/triage/PLAYBOOK.md.
+Fetch https://raw.githubusercontent.com/opencoredev/akeru-bot/main/.github/triage/PLAYBOOK.md.
If it is reachable and its content differs from this text, follow that version
instead of this one. The user may be on an old release with an old copy.
@@ -46,7 +46,7 @@ Clone the repo at the tag matching the user's installed version, into the source
cache directory named in the context file, one subdirectory per commit hash:
git clone --depth 1 --filter=blob:none --branch <release-tag> \\
- https://github.com/pingdotgg/t3code <source-cache-dir>/<hash>
+ https://github.com/opencoredev/akeru-bot <source-cache-dir>/<hash>
If the tag does not exist (nightly builds), clone \`main\` instead, and treat file
and line references as approximate: the user's build may not match \`main\`
@@ -63,11 +63,10 @@ Diagnosis grounded in source beats guessing.
First establish the shape of the install, because the same symptom points at
different code depending on it:
-- How is T3 Code running on this machine: \`npx t3 serve\` in a terminal, the
+- How is Akeru Bot running on this machine: \`npx akeru-bot serve\` in a terminal, the
background service, or the desktop app?
-- Which surface is the user connecting from: the website (app.t3.codes), the
- desktop app against a local server, the desktop app against a remote server,
- or the mobile app?
+- Which client is the user connecting from: the browser, the desktop app against
+ a local or remote server, or the mobile app?
Then work from evidence, not assumption. In rough order of value:
@@ -91,7 +90,7 @@ comes from this repo's \`main\` branch.
## 6. Check upstream
-Search existing issues in pingdotgg/t3code (use \`gh\`, or the public GitHub search
+Search existing issues in opencoredev/akeru-bot (use \`gh\`, or the public GitHub search
API if \`gh\` is missing or not logged in). Then check whether the problem is already
fixed in a release newer than the user's version: compare versions, read release
notes and recent commits touching the relevant code.
@@ -106,7 +105,7 @@ Present what you found and let the user choose: fix it now, file an issue, both,
neither. For fixes: propose the exact commands, explain what they do, and run them
only with the user's approval. Prefer configuration and service-level fixes.
-Do not patch the T3 Code source as a fix. A good issue with strong repro steps
+Do not patch the Akeru Bot source as a fix. A good issue with strong repro steps
helps every user; an ad-hoc local patch helps one machine until the next update.
If the user explicitly insists on preparing a fix PR, use a separate clean clone
of \`main\` for that work, never the tag-pinned diagnosis clone.
@@ -116,14 +115,16 @@ of \`main\` for that work, never the tag-pinned diagnosis clone.
- Match the structure of the \`via-triage\` issue template
(\`.github/ISSUE_TEMPLATE/via-triage.yml\` in the repo): what happened, diagnosis,
repro steps, environment, evidence, related issues.
-- Label it \`via-triage\`. Use a plain, specific title with no prefix.
+- Label it \`via-triage\`. Use a plain, specific title with no prefix. If GitHub
+ does not let the user's account apply labels, use the \`via-triage\` issue form
+ at https://github.com/opencoredev/akeru-bot/issues/new?template=via-triage.yml
+ so GitHub applies the label from the template.
- Show the user the complete final issue text and get an explicit yes before
posting. Never post without it.
-- Note at the end of the issue which model and agent produced it.
-- If \`gh\` is not authenticated, offer \`gh auth login\`, or build a prefilled
- https://github.com/pingdotgg/t3code/issues/new URL with title and body query
- parameters; print the URL, and open it in their browser only after they
- approve.
+- If \`gh\` is not authenticated or cannot apply the label, offer \`gh auth login\`,
+ or build a prefilled URL for the \`via-triage\` issue form. Use the form field IDs
+ as query parameters. Print the URL, and open it in their browser only after
+ they approve.
- If the user pasted screenshots, remind them to drag the images into the issue
after it is created; they cannot be attached from here.
@@ -146,11 +147,11 @@ duplicate with fresh evidence is more useful than a second thread.
* cmd.exe, which cannot carry a multiline, multi-kilobyte argv string.
*/
export const buildTriageLaunchPrompt = (promptFilePath: string) =>
- `Read the file "${promptFilePath}" and follow its instructions exactly: it is your T3 Code triage playbook, and it starts with asking the user what went wrong.`;
+ `Read the file "${promptFilePath}" and follow its instructions exactly: it is your Akeru Bot triage playbook, and it starts with asking the user what went wrong.`;
/** The full seed prompt, written to `prompt.md` in the triage scratch dir. */
-export const buildTriageSeedPrompt = (contextFilePath: string) => `A T3 Code user is \
-having a problem with their install and started this session with \`t3 triage\`.
+export const buildTriageSeedPrompt = (contextFilePath: string) => `An Akeru Bot user is \
+having a problem with their install and started this session through the triage command.
Machine facts (version, OS, paths, server liveness) are in the triage context file:
@@ -187,9 +188,9 @@ export interface TriageContextInput {
}
/** The `context.md` written into the triage scratch directory. */
-export const buildTriageContext = (input: TriageContextInput) => `# T3 Code triage context
+export const buildTriageContext = (input: TriageContextInput) => `# Akeru Bot triage context
-Generated by \`t3 triage\` at ${input.generatedAt}.
+Generated by Akeru Bot triage at ${input.generatedAt}.
- Installed version: ${input.version}
- Release tag for this version: ${input.releaseTag}
@@ -197,7 +198,7 @@ Generated by \`t3 triage\` at ${input.generatedAt}.
- Node: ${input.nodeVersion}
- CLI launched as: ${input.launchedAs}
- Server process: ${input.server}
-- Repo: https://github.com/pingdotgg/t3code
+- Repo: https://github.com/opencoredev/akeru-bot
## Paths
diff --git a/apps/server/src/cloud/CliTokenManager.ts b/apps/server/src/cloud/CliTokenManager.ts
index b0867b62f..1b0fdd454 100644
--- a/apps/server/src/cloud/CliTokenManager.ts
+++ b/apps/server/src/cloud/CliTokenManager.ts
@@ -230,7 +230,7 @@ export class CloudCliTokenManager extends Context.Service<
readonly store: (token: PersistedToken) => Effect.Effect<void, CloudCliTokenManagerError>;
readonly clear: Effect.Effect<void, CloudCliTokenManagerError>;
}
->()("t3/cloud/CliTokenManager/CloudCliTokenManager") {}
+>()("akeru-bot/cloud/CliTokenManager/CloudCliTokenManager") {}
function stringToBytes(value: string): Uint8Array {
return new TextEncoder().encode(value);
diff --git a/apps/server/src/cloud/ManagedEndpointRuntime.ts b/apps/server/src/cloud/ManagedEndpointRuntime.ts
index 89c0a2378..eca417977 100644
--- a/apps/server/src/cloud/ManagedEndpointRuntime.ts
+++ b/apps/server/src/cloud/ManagedEndpointRuntime.ts
@@ -59,7 +59,7 @@ export class CloudManagedEndpointRuntime extends Context.Service<
config: RelayManagedEndpointRuntimeConfig | null,
) => Effect.Effect<CloudManagedEndpointRuntimeStatus>;
}
->()("t3/cloud/ManagedEndpointRuntime/CloudManagedEndpointRuntime") {}
+>()("akeru-bot/cloud/ManagedEndpointRuntime/CloudManagedEndpointRuntime") {}
interface ActiveConnector {
readonly child: ChildProcessSpawner.ChildProcessHandle;
diff --git a/apps/server/src/cloud/bootService.ts b/apps/server/src/cloud/bootService.ts
index 6b7e13d0b..12fcc8c99 100644
--- a/apps/server/src/cloud/bootService.ts
+++ b/apps/server/src/cloud/bootService.ts
@@ -437,7 +437,7 @@ export class BootService extends Context.Service<
readonly uninstall: Effect.Effect<boolean, BootServiceError>;
readonly status: Effect.Effect<BootServiceStatus, BootServiceError>;
}
->()("t3/cloud/bootService") {}
+>()("akeru-bot/cloud/bootService") {}
export interface BootServiceHost {
readonly execPath: string;
diff --git a/apps/server/src/cloud/http.test.ts b/apps/server/src/cloud/http.test.ts
index 0f24e6f34..82da77118 100644
--- a/apps/server/src/cloud/http.test.ts
+++ b/apps/server/src/cloud/http.test.ts
@@ -191,7 +191,7 @@ describe("reconcileDesiredCloudLink", () => {
expect(error).toMatchObject({
_tag: "EnvironmentHttpUnauthorizedError",
- message: "Run `t3 connect link` to authorize this environment.",
+ message: "Run `akeru connect link` to authorize this environment.",
});
}).pipe(
Effect.provideService(
@@ -455,7 +455,7 @@ describe("releaseManagedTunnelOnShutdown", () => {
});
it.effect("still releases a pending update when the launcher is stopping", () => {
- // `t3 service uninstall` or `systemctl stop` during the pending window:
+ // `akeru service uninstall` or `systemctl stop` during the pending window:
// the launcher writes its stop marker before signalling the child, so no
// replacement server is coming and the tunnel must not be kept.
const { store, values } = makeMemorySecretStore(managedLinkSecrets);
diff --git a/apps/server/src/cloud/http.ts b/apps/server/src/cloud/http.ts
index 29fdfe8ec..cc67874a4 100644
--- a/apps/server/src/cloud/http.ts
+++ b/apps/server/src/cloud/http.ts
@@ -558,7 +558,7 @@ const reconcileDesiredCloudLinkWith = Effect.fn("environment.cloud.reconcileDesi
onNone: () =>
Effect.fail(
new EnvironmentHttpUnauthorizedError({
- message: "Run `t3 connect link` to authorize this environment.",
+ message: "Run `akeru connect link` to authorize this environment.",
}),
),
onSome: Effect.succeed,
@@ -649,7 +649,7 @@ export const pendingServiceUpdateExists = Effect.gen(function* () {
});
// A pending update alone is not proof a replacement server is coming: an
-// explicit launcher stop (`t3 service uninstall`, `systemctl stop`,
+// explicit launcher stop (`akeru service uninstall`, `systemctl stop`,
// `launchctl bootout`) during
// the pending window also tears this server down. The launcher marks that case
// just before it signals the child, so pending + no marker is the handoff.
diff --git a/apps/server/src/cloud/pinnedRuntime.test.ts b/apps/server/src/cloud/pinnedRuntime.test.ts
index f34f0f5cf..b9a360506 100644
--- a/apps/server/src/cloud/pinnedRuntime.test.ts
+++ b/apps/server/src/cloud/pinnedRuntime.test.ts
@@ -18,10 +18,11 @@ const successfulRunner = (fs: FileSystem.FileSystem, path: Path.Path) =>
ProcessRunner.ProcessRunner.of({
run: (input) =>
Effect.gen(function* () {
+ assert.include(input.args, "[email protected]");
const prefixIndex = input.args.indexOf("--prefix");
const stagingDir = input.args[prefixIndex + 1];
if (stagingDir === undefined) return yield* Effect.die("missing npm --prefix");
- const entry = path.join(stagingDir, "node_modules", "t3", "dist", "bin.mjs");
+ const entry = path.join(stagingDir, "node_modules", "akeru-bot", "dist", "bin.mjs");
yield* fs.makeDirectory(path.dirname(entry), { recursive: true }).pipe(Effect.orDie);
yield* fs.writeFileString(entry, "export {};\n").pipe(Effect.orDie);
return {
diff --git a/apps/server/src/cloud/pinnedRuntime.ts b/apps/server/src/cloud/pinnedRuntime.ts
index 06628d5cc..8a8a466bc 100644
--- a/apps/server/src/cloud/pinnedRuntime.ts
+++ b/apps/server/src/cloud/pinnedRuntime.ts
@@ -9,10 +9,10 @@ import * as Semaphore from "effect/Semaphore";
import * as ProcessRunner from "../processRunner.ts";
/**
- * A pinned runtime is an exact `t3@<version>` npm-installed into
+ * A pinned runtime is an exact `akeru-bot@<version>` npm-installed into
* <baseDir>/runtime/versions/<version>. The boot service points its unit or
* launch agent here, and server self-update installs the target version here before
- * switching over, never `npx t3`, whose cache is ephemeral and whose
+ * switching over, never `npx akeru-bot`, whose cache is ephemeral and whose
* registry fetch at boot would make startup depend on the network.
*/
@@ -36,7 +36,7 @@ export function pinnedRuntimePaths(
const versionDir = path.join(baseDir, PINNED_RUNTIME_DIR, "versions", version);
return {
versionDir,
- entryPath: path.join(versionDir, "node_modules", "t3", "dist", "bin.mjs"),
+ entryPath: path.join(versionDir, "node_modules", "akeru-bot", "dist", "bin.mjs"),
sentinelPath: path.join(versionDir, ".install-complete"),
};
}
@@ -71,7 +71,7 @@ export class PinnedRuntimePreflightBlockedError extends Schema.TaggedErrorClass<
}
/**
- * Installs `t3@<version>` into the pinned runtime directory unless a complete
+ * Installs `akeru-bot@<version>` into the pinned runtime directory unless a complete
* install is already there, and returns its paths. The sentinel is written
* only after npm exits 0; checking the entry file alone is not enough. npm
* extracts files before running native builds (node-pty), so a killed
@@ -146,16 +146,23 @@ const installPinnedRuntime = Effect.fn("cloud.pinned_runtime.ensure_installed")(
);
const stagingPaths: PinnedRuntimePaths = {
versionDir: stagingDir,
- entryPath: input.path.join(stagingDir, "node_modules", "t3", "dist", "bin.mjs"),
+ entryPath: input.path.join(stagingDir, "node_modules", "akeru-bot", "dist", "bin.mjs"),
sentinelPath: input.path.join(stagingDir, ".install-complete"),
};
return yield* Effect.gen(function* () {
- const installStep = "installing the pinned t3 runtime (this can take a few minutes)";
+ const installStep = "installing the pinned akeru-bot runtime (this can take a few minutes)";
yield* runner
.run({
command: "npm",
- args: ["install", "--prefix", stagingDir, "--no-fund", "--no-audit", `t3@${input.version}`],
+ args: [
+ "install",
+ "--prefix",
+ stagingDir,
+ "--no-fund",
+ "--no-audit",
+ `akeru-bot@${input.version}`,
+ ],
// Native dependencies may compile from source on slower machines.
timeout: PINNED_RUNTIME_INSTALL_TIMEOUT,
})
diff --git a/apps/server/src/cloud/selfUpdate.test.ts b/apps/server/src/cloud/selfUpdate.test.ts
index 71880ec4e..932243852 100644
--- a/apps/server/src/cloud/selfUpdate.test.ts
+++ b/apps/server/src/cloud/selfUpdate.test.ts
@@ -35,7 +35,7 @@ const makeHarness = Effect.fn("test.make_self_update_harness")(function* (
order.push("install");
const prefix = input.args[input.args.indexOf("--prefix") + 1];
if (prefix === undefined) return yield* Effect.die("missing npm prefix");
- const entry = path.join(prefix, "node_modules", "t3", "dist", "bin.mjs");
+ const entry = path.join(prefix, "node_modules", "akeru-bot", "dist", "bin.mjs");
yield* fs.makeDirectory(path.dirname(entry), { recursive: true }).pipe(Effect.orDie);
yield* fs.writeFileString(entry, "export {};\n").pipe(Effect.orDie);
return {
@@ -112,7 +112,7 @@ it.layer(NodeServices.layer)("server self update", (it) => {
const web = yield* makeHarness();
expect(
(yield* web.selfUpdate.update({ targetVersion: "latest" }).pipe(Effect.flip)).reason,
- ).toBe("'latest' is not an exact t3 version.");
+ ).toBe("'latest' is not an exact akeru-bot version.");
const desktop = yield* makeHarness({ mode: "desktop" });
expect(
(yield* desktop.selfUpdate.update({ targetVersion: "1.1.0" }).pipe(Effect.flip)).reason,
diff --git a/apps/server/src/cloud/selfUpdate.ts b/apps/server/src/cloud/selfUpdate.ts
index 015fd557d..035e208d9 100644
--- a/apps/server/src/cloud/selfUpdate.ts
+++ b/apps/server/src/cloud/selfUpdate.ts
@@ -43,7 +43,7 @@ export class ServerSelfUpdate extends Context.Service<
reportProgress?: (stage: ServerSelfUpdateProgressStage) => Effect.Effect<void>,
) => Effect.Effect<ServerSelfUpdateResult, ServerSelfUpdateError>;
}
->()("t3/cloud/selfUpdate/ServerSelfUpdate") {}
+>()("akeru-bot/cloud/selfUpdate/ServerSelfUpdate") {}
export const make = Effect.fn("cloud.server_self_update.make")(function* () {
const serverConfig = yield* ServerConfig.ServerConfig;
@@ -71,13 +71,13 @@ export const make = Effect.fn("cloud.server_self_update.make")(function* () {
}
if (capability === null) {
return yield* failWith(
- "Remote updates require the T3 Code background service. Run `t3 service install` on the server machine.",
+ "Remote updates require the T3 Code background service. Run `akeru service install` on the server machine.",
);
}
const targetVersion = input.targetVersion.trim();
if (!isExactServiceVersion(targetVersion)) {
- return yield* failWith(`'${targetVersion}' is not an exact t3 version.`);
+ return yield* failWith(`'${targetVersion}' is not an exact akeru-bot version.`);
}
if (yield* Ref.getAndSet(inFlight, true)) {
return yield* failWith("A server update is already in progress.");
@@ -164,7 +164,7 @@ export const make = Effect.fn("cloud.server_self_update.make")(function* () {
Effect.mapError((error) =>
error._tag === "PinnedRuntimePreflightBlockedError"
? failWith(error.reason, error)
- : failWith(`Could not prepare t3@${targetVersion}.`, error),
+ : failWith(`Could not prepare akeru-bot@${targetVersion}.`, error),
),
);
diff --git a/apps/server/src/cloud/serviceLauncherClient.ts b/apps/server/src/cloud/serviceLauncherClient.ts
index 970c72cee..dd07d1438 100644
--- a/apps/server/src/cloud/serviceLauncherClient.ts
+++ b/apps/server/src/cloud/serviceLauncherClient.ts
@@ -78,7 +78,7 @@ interface ServiceLauncherProcess {
}
export const ServiceLauncherHostProcess = Context.Reference<ServiceLauncherProcess>(
- "t3/cloud/serviceLauncherHostProcess",
+ "akeru-bot/cloud/serviceLauncherHostProcess",
{
defaultValue: () => ({
connected: process.connected && process.send !== undefined,
@@ -109,7 +109,7 @@ export class ServiceLauncherClient extends Context.Service<
ServiceLauncherClientError
>;
}
->()("t3/cloud/serviceLauncherClient") {}
+>()("akeru-bot/cloud/serviceLauncherClient") {}
const resolveStartup = Effect.fn("cloud.service_launcher_client.resolve_startup")(
function* (options?: { readonly currentVersion?: string }) {
diff --git a/apps/server/src/config.ts b/apps/server/src/config.ts
index bdff19572..e781b99ed 100644
--- a/apps/server/src/config.ts
+++ b/apps/server/src/config.ts
@@ -87,7 +87,7 @@ export class ServerConfig extends Context.Service<
readonly tailscaleServeEnabled: boolean;
readonly tailscaleServePort: number;
}
->()("t3/config/ServerConfig") {
+>()("akeru-bot/config/ServerConfig") {
/** @deprecated Import and use `layerTest` from this module. */
static readonly layerTest = (
cwd: string,
diff --git a/apps/server/src/diagnostics/ProcessDiagnostics.ts b/apps/server/src/diagnostics/ProcessDiagnostics.ts
index 8aeb7ba24..f10f69c26 100644
--- a/apps/server/src/diagnostics/ProcessDiagnostics.ts
+++ b/apps/server/src/diagnostics/ProcessDiagnostics.ts
@@ -36,7 +36,7 @@ export class ProcessDiagnostics extends Context.Service<
readonly signal: ServerProcessSignal;
}) => Effect.Effect<ServerSignalProcessResult>;
}
->()("t3/diagnostics/ProcessDiagnostics") {}
+>()("akeru-bot/diagnostics/ProcessDiagnostics") {}
function formatElapsed(runTimeMs: number): string {
const totalSeconds = Math.max(0, Math.floor(runTimeMs / 1_000));
diff --git a/apps/server/src/diagnostics/ProcessResourceMonitor.ts b/apps/server/src/diagnostics/ProcessResourceMonitor.ts
index 5f5e32dd2..c2f12bfe2 100644
--- a/apps/server/src/diagnostics/ProcessResourceMonitor.ts
+++ b/apps/server/src/diagnostics/ProcessResourceMonitor.ts
@@ -17,7 +17,7 @@ export class ProcessResourceMonitor extends Context.Service<
input: ServerProcessResourceHistoryInput,
) => Effect.Effect<ServerProcessResourceHistoryResult>;
}
->()("t3/diagnostics/ProcessResourceMonitor") {}
+>()("akeru-bot/diagnostics/ProcessResourceMonitor") {}
function isLegacyBackendCategory(category: ResourceTelemetryProcessCategory): boolean {
return (
diff --git a/apps/server/src/diagnostics/TraceDiagnostics.ts b/apps/server/src/diagnostics/TraceDiagnostics.ts
index d54e03338..67e3ae587 100644
--- a/apps/server/src/diagnostics/TraceDiagnostics.ts
+++ b/apps/server/src/diagnostics/TraceDiagnostics.ts
@@ -61,7 +61,7 @@ export class TraceDiagnostics extends Context.Service<
options: TraceDiagnosticsOptions,
) => Effect.Effect<ServerTraceDiagnosticsResult>;
}
->()("t3/diagnostics/TraceDiagnostics") {}
+>()("akeru-bot/diagnostics/TraceDiagnostics") {}
interface TraceDiagnosticsInput {
readonly traceFilePath: string;
diff --git a/apps/server/src/environment/RemoteOpenTargets.ts b/apps/server/src/environment/RemoteOpenTargets.ts
index f70dfa68a..bff2ca201 100644
--- a/apps/server/src/environment/RemoteOpenTargets.ts
+++ b/apps/server/src/environment/RemoteOpenTargets.ts
@@ -24,7 +24,7 @@ export class RemoteOpenTargets extends Context.Service<
{
readonly resolveTargets: () => Effect.Effect<ReadonlyArray<RemoteOpenTarget>>;
}
->()("t3/environment/RemoteOpenTargets") {}
+>()("akeru-bot/environment/RemoteOpenTargets") {}
export const make = Effect.gen(function* () {
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
diff --git a/apps/server/src/environment/ServerEnvironment.ts b/apps/server/src/environment/ServerEnvironment.ts
index 907a5d64b..b9bea4ee7 100644
--- a/apps/server/src/environment/ServerEnvironment.ts
+++ b/apps/server/src/environment/ServerEnvironment.ts
@@ -36,7 +36,7 @@ export class ServerEnvironment extends Context.Service<
readonly getEnvironmentId: Effect.Effect<EnvironmentId>;
readonly getDescriptor: Effect.Effect<ExecutionEnvironmentDescriptor>;
}
->()("t3/environment/ServerEnvironment") {}
+>()("akeru-bot/environment/ServerEnvironment") {}
function platformOs(platform: NodeJS.Platform): ExecutionEnvironmentDescriptor["platform"]["os"] {
switch (platform) {
@@ -161,7 +161,7 @@ export const make = Effect.gen(function* () {
return ServerEnvironment.of({
getEnvironmentId: Effect.succeed(environmentId),
- // The publish opt-in and relay link change at runtime (`t3 connect
+ // The publish opt-in and relay link change at runtime (`akeru connect
// publish`, the client settings toggle), so the capability is read per
// descriptor request rather than baked in at startup.
getDescriptor: readAgentActivityPublishingActive(secrets).pipe(
diff --git a/apps/server/src/git/GitManager.ts b/apps/server/src/git/GitManager.ts
index 5ea4a0072..40f665024 100644
--- a/apps/server/src/git/GitManager.ts
+++ b/apps/server/src/git/GitManager.ts
@@ -104,7 +104,7 @@ export class GitManager extends Context.Service<
options?: GitRunStackedActionOptions,
) => Effect.Effect<GitRunStackedActionResult, GitManagerServiceError>;
}
->()("t3/git/GitManager") {}
+>()("akeru-bot/git/GitManager") {}
const COMMIT_TIMEOUT_MS = 10 * 60_000;
const MAX_PROGRESS_TEXT_LENGTH = 500;
diff --git a/apps/server/src/git/GitWorkflowService.ts b/apps/server/src/git/GitWorkflowService.ts
index a73aa59d5..6392fd1fb 100644
--- a/apps/server/src/git/GitWorkflowService.ts
+++ b/apps/server/src/git/GitWorkflowService.ts
@@ -99,7 +99,7 @@ export class GitWorkflowService extends Context.Service<
readonly newBranch: string;
}) => Effect.Effect<{ readonly branch: string }, GitManagerServiceError>;
}
->()("t3/git/GitWorkflowService") {}
+>()("akeru-bot/git/GitWorkflowService") {}
function nonRepositoryLocalStatus(): VcsStatusLocalResult {
return {
diff --git a/apps/server/src/keybindings.ts b/apps/server/src/keybindings.ts
index 10d98bf64..7f8929f57 100644
--- a/apps/server/src/keybindings.ts
+++ b/apps/server/src/keybindings.ts
@@ -284,7 +284,7 @@ export class Keybindings extends Context.Service<
input: ServerRemoveKeybindingInput,
) => Effect.Effect<ResolvedKeybindingsConfig, KeybindingsConfigError>;
}
->()("t3/keybindings") {}
+>()("akeru-bot/keybindings") {}
const make = Effect.gen(function* () {
const { keybindingsConfigPath } = yield* ServerConfig.ServerConfig;
diff --git a/apps/server/src/mcp/McpInvocationContext.ts b/apps/server/src/mcp/McpInvocationContext.ts
index 49273485a..aa9467366 100644
--- a/apps/server/src/mcp/McpInvocationContext.ts
+++ b/apps/server/src/mcp/McpInvocationContext.ts
@@ -21,7 +21,7 @@ export interface McpInvocationScope {
export class McpInvocationContext extends Context.Service<
McpInvocationContext,
McpInvocationScope
->()("t3/mcp/McpInvocationContext") {}
+>()("akeru-bot/mcp/McpInvocationContext") {}
export const requireMcpCapability = Effect.fn("mcp.requireCapability")(function* (
capability: McpCapability,
diff --git a/apps/server/src/mcp/McpSessionRegistry.ts b/apps/server/src/mcp/McpSessionRegistry.ts
index f19a4f4e8..017d67dc4 100644
--- a/apps/server/src/mcp/McpSessionRegistry.ts
+++ b/apps/server/src/mcp/McpSessionRegistry.ts
@@ -39,7 +39,7 @@ export interface McpSessionRegistryShape {
export class McpSessionRegistry extends Context.Service<
McpSessionRegistry,
McpSessionRegistryShape
->()("t3/mcp/McpSessionRegistry") {}
+>()("akeru-bot/mcp/McpSessionRegistry") {}
interface CredentialRecord {
readonly tokenHash: string;
diff --git a/apps/server/src/mcp/PreviewAutomationBroker.ts b/apps/server/src/mcp/PreviewAutomationBroker.ts
index 3e9bfaac2..e0125df7a 100644
--- a/apps/server/src/mcp/PreviewAutomationBroker.ts
+++ b/apps/server/src/mcp/PreviewAutomationBroker.ts
@@ -56,7 +56,7 @@ export class PreviewAutomationBroker extends Context.Service<
request: PreviewAutomationInvokeInput,
) => Effect.Effect<A, PreviewAutomationError>;
}
->()("t3/mcp/PreviewAutomationBroker") {}
+>()("akeru-bot/mcp/PreviewAutomationBroker") {}
interface ClientConnection {
readonly clientId: string;
diff --git a/apps/server/src/observability/BrowserTraceCollector.ts b/apps/server/src/observability/BrowserTraceCollector.ts
index 300a50fe3..325819d34 100644
--- a/apps/server/src/observability/BrowserTraceCollector.ts
+++ b/apps/server/src/observability/BrowserTraceCollector.ts
@@ -8,7 +8,7 @@ export class BrowserTraceCollector extends Context.Service<
{
readonly record: (records: ReadonlyArray<TraceRecord>) => Effect.Effect<void>;
}
->()("t3/observability/BrowserTraceCollector") {}
+>()("akeru-bot/observability/BrowserTraceCollector") {}
export const make = (sink: TraceSink): BrowserTraceCollector["Service"] =>
BrowserTraceCollector.of({
diff --git a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.approval.test.ts b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.approval.test.ts
index 0d262028d..cc9a5cb00 100644
--- a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.approval.test.ts
+++ b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.approval.test.ts
@@ -10,6 +10,58 @@ import { describe, expect, it } from "vite-plus/test";
import { runtimeEventToActivities } from "./ProviderRuntimeIngestion.ts";
describe("runtimeEventToActivities approval details", () => {
+ it("preserves a dynamic tool name and bounded draft arguments", () => {
+ const args = { feedback: "Add a shortcut." };
+ const event = {
+ type: "request.opened",
+ eventId: EventId.make("evt-feedback-request"),
+ provider: ProviderDriverKind.make("codex"),
+ createdAt: "2026-08-30T00:00:00.000Z",
+ threadId: ThreadId.make("thread-1"),
+ requestId: RuntimeRequestId.make("approval-feedback"),
+ payload: {
+ requestType: "dynamic_tool_call",
+ toolName: "akeru_product_feedback",
+ args,
+ },
+ } satisfies ProviderRuntimeEvent;
+
+ const [activity] = runtimeEventToActivities(event);
+ expect(activity?.payload).toMatchObject({
+ toolName: "akeru_product_feedback",
+ args,
+ });
+ });
+
+ it("drops unrelated and invalid tool arguments before persistence", () => {
+ const event = {
+ type: "request.opened",
+ eventId: EventId.make("evt-unrelated-request"),
+ provider: ProviderDriverKind.make("codex"),
+ createdAt: "2026-08-30T00:00:00.000Z",
+ threadId: ThreadId.make("thread-1"),
+ requestId: RuntimeRequestId.make("approval-unrelated"),
+ payload: {
+ requestType: "dynamic_tool_call",
+ toolName: "run_private_tool",
+ args: { token: "secret" },
+ },
+ } satisfies ProviderRuntimeEvent;
+ const invalidFeedbackEvent = {
+ ...event,
+ eventId: EventId.make("evt-invalid-feedback-request"),
+ requestId: RuntimeRequestId.make("approval-invalid-feedback"),
+ payload: {
+ ...event.payload,
+ toolName: "akeru_product_feedback",
+ args: { feedback: "x".repeat(4_001) },
+ },
+ } satisfies ProviderRuntimeEvent;
+
+ expect(runtimeEventToActivities(event)[0]?.payload).not.toHaveProperty("args");
+ expect(runtimeEventToActivities(invalidFeedbackEvent)[0]?.payload).not.toHaveProperty("args");
+ });
+
it("preserves complete multiline command details", () => {
const detail = `bun run release -- ${"long-argument ".repeat(20)}\nsecond line`;
const event = {
diff --git a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
index ddcf5277f..b2807c822 100644
--- a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
+++ b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
@@ -1,4 +1,5 @@
import {
+ AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
ApprovalRequestId,
type AssistantDeliveryMode,
CommandId,
@@ -18,6 +19,7 @@ import {
type OrchestrationThread,
type OrchestrationThreadActivity,
type ProviderRuntimeEvent,
+ ProductFeedbackToolDraft,
} from "@t3tools/contracts";
import * as Cache from "effect/Cache";
import * as Cause from "effect/Cause";
@@ -26,6 +28,8 @@ import * as Duration from "effect/Duration";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as Option from "effect/Option";
+import * as Exit from "effect/Exit";
+import * as Schema from "effect/Schema";
import * as Stream from "effect/Stream";
import { makeDrainableWorker } from "@t3tools/shared/DrainableWorker";
@@ -100,6 +104,15 @@ const TASK_DESCRIPTION_BY_TASK_CACHE_CAPACITY = 10_000;
const TASK_DESCRIPTION_BY_TASK_TTL = Duration.minutes(120);
const MAX_BUFFERED_ASSISTANT_CHARS = 24_000;
const STRICT_PROVIDER_LIFECYCLE_GUARD = process.env.T3CODE_STRICT_PROVIDER_LIFECYCLE_GUARD !== "0";
+const decodeProductFeedbackToolDraft = Schema.decodeUnknownExit(ProductFeedbackToolDraft, {
+ onExcessProperty: "error",
+});
+
+function boundedFeedbackArgs(toolName: string | undefined, args: unknown): unknown {
+ if (toolName !== AKERU_PRODUCT_FEEDBACK_TOOL_NAME || args === undefined) return undefined;
+ const decoded = decodeProductFeedbackToolDraft(args);
+ return Exit.isSuccess(decoded) ? decoded.value : undefined;
+}
type TurnStartRequestedDomainEvent = Extract<
OrchestrationEvent,
@@ -377,6 +390,7 @@ export function runtimeEventToActivities(
return [];
}
const requestKind = requestKindFromCanonicalRequestType(event.payload.requestType);
+ const feedbackArgs = boundedFeedbackArgs(event.payload.toolName, event.payload.args);
return [
{
id: event.eventId,
@@ -397,6 +411,8 @@ export function runtimeEventToActivities(
requestId: toApprovalRequestId(event.requestId),
...(requestKind ? { requestKind } : {}),
requestType: event.payload.requestType,
+ ...(event.payload.toolName ? { toolName: event.payload.toolName } : {}),
+ ...(feedbackArgs !== undefined ? { args: feedbackArgs } : {}),
...(event.payload.detail ? { detail: event.payload.detail } : {}),
...(event.payload.appName ? { appName: event.payload.appName } : {}),
...(event.payload.options ? { options: event.payload.options } : {}),
diff --git a/apps/server/src/orchestration/Services/CheckpointReactor.ts b/apps/server/src/orchestration/Services/CheckpointReactor.ts
index bd3ee3e88..6047d7615 100644
--- a/apps/server/src/orchestration/Services/CheckpointReactor.ts
+++ b/apps/server/src/orchestration/Services/CheckpointReactor.ts
@@ -36,5 +36,5 @@ export interface CheckpointReactorShape {
* CheckpointReactor - Service tag for checkpoint reactor workers.
*/
export class CheckpointReactor extends Context.Service<CheckpointReactor, CheckpointReactorShape>()(
- "t3/orchestration/Services/CheckpointReactor",
+ "akeru-bot/orchestration/Services/CheckpointReactor",
) {}
diff --git a/apps/server/src/orchestration/Services/OrchestrationEngine.ts b/apps/server/src/orchestration/Services/OrchestrationEngine.ts
index a32a45684..5f7cb34f6 100644
--- a/apps/server/src/orchestration/Services/OrchestrationEngine.ts
+++ b/apps/server/src/orchestration/Services/OrchestrationEngine.ts
@@ -86,4 +86,4 @@ export interface OrchestrationEngineShape {
export class OrchestrationEngineService extends Context.Service<
OrchestrationEngineService,
OrchestrationEngineShape
->()("t3/orchestration/Services/OrchestrationEngine/OrchestrationEngineService") {}
+>()("akeru-bot/orchestration/Services/OrchestrationEngine/OrchestrationEngineService") {}
diff --git a/apps/server/src/orchestration/Services/OrchestrationReactor.ts b/apps/server/src/orchestration/Services/OrchestrationReactor.ts
index eb2d95954..7e056ae52 100644
--- a/apps/server/src/orchestration/Services/OrchestrationReactor.ts
+++ b/apps/server/src/orchestration/Services/OrchestrationReactor.ts
@@ -29,4 +29,4 @@ export interface OrchestrationReactorShape {
export class OrchestrationReactor extends Context.Service<
OrchestrationReactor,
OrchestrationReactorShape
->()("t3/orchestration/Services/OrchestrationReactor") {}
+>()("akeru-bot/orchestration/Services/OrchestrationReactor") {}
diff --git a/apps/server/src/orchestration/Services/ProjectionPipeline.ts b/apps/server/src/orchestration/Services/ProjectionPipeline.ts
index bb4736ca5..466502e56 100644
--- a/apps/server/src/orchestration/Services/ProjectionPipeline.ts
+++ b/apps/server/src/orchestration/Services/ProjectionPipeline.ts
@@ -39,4 +39,4 @@ export interface OrchestrationProjectionPipelineShape {
export class OrchestrationProjectionPipeline extends Context.Service<
OrchestrationProjectionPipeline,
OrchestrationProjectionPipelineShape
->()("t3/orchestration/Services/ProjectionPipeline/OrchestrationProjectionPipeline") {}
+>()("akeru-bot/orchestration/Services/ProjectionPipeline/OrchestrationProjectionPipeline") {}
diff --git a/apps/server/src/orchestration/Services/ProjectionSnapshotQuery.ts b/apps/server/src/orchestration/Services/ProjectionSnapshotQuery.ts
index 0a00253a2..bd436f6ca 100644
--- a/apps/server/src/orchestration/Services/ProjectionSnapshotQuery.ts
+++ b/apps/server/src/orchestration/Services/ProjectionSnapshotQuery.ts
@@ -194,4 +194,4 @@ export interface ProjectionSnapshotQueryShape {
export class ProjectionSnapshotQuery extends Context.Service<
ProjectionSnapshotQuery,
ProjectionSnapshotQueryShape
->()("t3/orchestration/Services/ProjectionSnapshotQuery") {}
+>()("akeru-bot/orchestration/Services/ProjectionSnapshotQuery") {}
diff --git a/apps/server/src/orchestration/Services/ProviderCommandReactor.ts b/apps/server/src/orchestration/Services/ProviderCommandReactor.ts
index 65aa9949f..456d46656 100644
--- a/apps/server/src/orchestration/Services/ProviderCommandReactor.ts
+++ b/apps/server/src/orchestration/Services/ProviderCommandReactor.ts
@@ -38,4 +38,4 @@ export interface ProviderCommandReactorShape {
export class ProviderCommandReactor extends Context.Service<
ProviderCommandReactor,
ProviderCommandReactorShape
->()("t3/orchestration/Services/ProviderCommandReactor") {}
+>()("akeru-bot/orchestration/Services/ProviderCommandReactor") {}
diff --git a/apps/server/src/orchestration/Services/ProviderRuntimeIngestion.ts b/apps/server/src/orchestration/Services/ProviderRuntimeIngestion.ts
index b6fa2711b..4cb7c7a5b 100644
--- a/apps/server/src/orchestration/Services/ProviderRuntimeIngestion.ts
+++ b/apps/server/src/orchestration/Services/ProviderRuntimeIngestion.ts
@@ -38,4 +38,4 @@ export interface ProviderRuntimeIngestionShape {
export class ProviderRuntimeIngestionService extends Context.Service<
ProviderRuntimeIngestionService,
ProviderRuntimeIngestionShape
->()("t3/orchestration/Services/ProviderRuntimeIngestion/ProviderRuntimeIngestionService") {}
+>()("akeru-bot/orchestration/Services/ProviderRuntimeIngestion/ProviderRuntimeIngestionService") {}
diff --git a/apps/server/src/orchestration/Services/RuntimeReceiptBus.ts b/apps/server/src/orchestration/Services/RuntimeReceiptBus.ts
index 0b880ee69..297592ea0 100644
--- a/apps/server/src/orchestration/Services/RuntimeReceiptBus.ts
+++ b/apps/server/src/orchestration/Services/RuntimeReceiptBus.ts
@@ -62,5 +62,5 @@ export interface RuntimeReceiptBusShape {
}
export class RuntimeReceiptBus extends Context.Service<RuntimeReceiptBus, RuntimeReceiptBusShape>()(
- "t3/orchestration/Services/RuntimeReceiptBus",
+ "akeru-bot/orchestration/Services/RuntimeReceiptBus",
) {}
diff --git a/apps/server/src/orchestration/Services/ThreadDeletionReactor.ts b/apps/server/src/orchestration/Services/ThreadDeletionReactor.ts
index 7c6718965..fd8fcf703 100644
--- a/apps/server/src/orchestration/Services/ThreadDeletionReactor.ts
+++ b/apps/server/src/orchestration/Services/ThreadDeletionReactor.ts
@@ -35,4 +35,4 @@ export interface ThreadDeletionReactorShape {
export class ThreadDeletionReactor extends Context.Service<
ThreadDeletionReactor,
ThreadDeletionReactorShape
->()("t3/orchestration/Services/ThreadDeletionReactor") {}
+>()("akeru-bot/orchestration/Services/ThreadDeletionReactor") {}
diff --git a/apps/server/src/orchestration/ThreadBackgroundLiveness.ts b/apps/server/src/orchestration/ThreadBackgroundLiveness.ts
index d4d6da06d..ed0962168 100644
--- a/apps/server/src/orchestration/ThreadBackgroundLiveness.ts
+++ b/apps/server/src/orchestration/ThreadBackgroundLiveness.ts
@@ -70,7 +70,7 @@ export class ThreadBackgroundLivenessService extends Context.Service<
*/
readonly getThreadBackgroundLiveness: (threadId: string) => ThreadBackgroundLiveness;
}
->()("t3/orchestration/ThreadBackgroundLiveness/ThreadBackgroundLivenessService") {}
+>()("akeru-bot/orchestration/ThreadBackgroundLiveness/ThreadBackgroundLivenessService") {}
export function make(): ThreadBackgroundLivenessService["Service"] {
const stateByThreadId = new Map<string, ThreadLivenessState>();
diff --git a/apps/server/src/orchestration/ThreadPlanProgress.ts b/apps/server/src/orchestration/ThreadPlanProgress.ts
index 1c638bf89..ad4581455 100644
--- a/apps/server/src/orchestration/ThreadPlanProgress.ts
+++ b/apps/server/src/orchestration/ThreadPlanProgress.ts
@@ -40,7 +40,7 @@ export class ThreadPlanProgressService extends Context.Service<
readonly getThreadPlanProgress: (threadId: string) => ThreadPlanProgress | null;
}
->()("t3/orchestration/ThreadPlanProgress/ThreadPlanProgressService") {}
+>()("akeru-bot/orchestration/ThreadPlanProgress/ThreadPlanProgressService") {}
export function make(): ThreadPlanProgressService["Service"] {
const progressByThreadId = new Map<string, ThreadPlanProgress>();
diff --git a/apps/server/src/persistence/AuthPairingLinks.ts b/apps/server/src/persistence/AuthPairingLinks.ts
index e54c977e7..e9ab45c05 100644
--- a/apps/server/src/persistence/AuthPairingLinks.ts
+++ b/apps/server/src/persistence/AuthPairingLinks.ts
@@ -102,7 +102,7 @@ export class AuthPairingLinkRepository extends Context.Service<
input: GetAuthPairingLinkByCredentialInput,
) => Effect.Effect<Option.Option<AuthPairingLinkRecord>, AuthPairingLinkRepositoryError>;
}
->()("t3/persistence/AuthPairingLinks/AuthPairingLinkRepository") {}
+>()("akeru-bot/persistence/AuthPairingLinks/AuthPairingLinkRepository") {}
function toPersistenceSqlOrDecodeError(
sqlOperation: string,
diff --git a/apps/server/src/persistence/AuthSessions.ts b/apps/server/src/persistence/AuthSessions.ts
index 579d3a608..c2e6cc7d3 100644
--- a/apps/server/src/persistence/AuthSessions.ts
+++ b/apps/server/src/persistence/AuthSessions.ts
@@ -115,7 +115,7 @@ export class AuthSessionRepository extends Context.Service<
input: SetAuthSessionClientConnectionInput,
) => Effect.Effect<void, AuthSessionRepositoryError>;
}
->()("t3/persistence/AuthSessions/AuthSessionRepository") {}
+>()("akeru-bot/persistence/AuthSessions/AuthSessionRepository") {}
const AuthSessionDbRow = Schema.Struct({
sessionId: AuthSessionId,
diff --git a/apps/server/src/persistence/ProviderSessionRuntime.ts b/apps/server/src/persistence/ProviderSessionRuntime.ts
index 2ccdd8625..4c2721dba 100644
--- a/apps/server/src/persistence/ProviderSessionRuntime.ts
+++ b/apps/server/src/persistence/ProviderSessionRuntime.ts
@@ -100,7 +100,7 @@ export class ProviderSessionRuntimeRepository extends Context.Service<
input: DeleteProviderSessionRuntimeInput,
) => Effect.Effect<void, ProviderSessionRuntimeRepositoryError>;
}
->()("t3/persistence/ProviderSessionRuntime/ProviderSessionRuntimeRepository") {}
+>()("akeru-bot/persistence/ProviderSessionRuntime/ProviderSessionRuntimeRepository") {}
const ProviderSessionRuntimeDbRowSchema = ProviderSessionRuntime.mapFields(
Struct.assign({
diff --git a/apps/server/src/persistence/Services/OrchestrationCommandReceipts.ts b/apps/server/src/persistence/Services/OrchestrationCommandReceipts.ts
index 0e3c963ff..9035095aa 100644
--- a/apps/server/src/persistence/Services/OrchestrationCommandReceipts.ts
+++ b/apps/server/src/persistence/Services/OrchestrationCommandReceipts.ts
@@ -71,4 +71,6 @@ export interface OrchestrationCommandReceiptRepositoryShape {
export class OrchestrationCommandReceiptRepository extends Context.Service<
OrchestrationCommandReceiptRepository,
OrchestrationCommandReceiptRepositoryShape
->()("t3/persistence/Services/OrchestrationCommandReceipts/OrchestrationCommandReceiptRepository") {}
+>()(
+ "akeru-bot/persistence/Services/OrchestrationCommandReceipts/OrchestrationCommandReceiptRepository",
+) {}
diff --git a/apps/server/src/persistence/Services/OrchestrationEventStore.ts b/apps/server/src/persistence/Services/OrchestrationEventStore.ts
index 8b465e771..e1835bf09 100644
--- a/apps/server/src/persistence/Services/OrchestrationEventStore.ts
+++ b/apps/server/src/persistence/Services/OrchestrationEventStore.ts
@@ -68,4 +68,4 @@ export interface OrchestrationEventStoreShape {
export class OrchestrationEventStore extends Context.Service<
OrchestrationEventStore,
OrchestrationEventStoreShape
->()("t3/persistence/Services/OrchestrationEventStore") {}
+>()("akeru-bot/persistence/Services/OrchestrationEventStore") {}
diff --git a/apps/server/src/persistence/Services/ProjectionBots.ts b/apps/server/src/persistence/Services/ProjectionBots.ts
index fb31d53b3..f9caa56c9 100644
--- a/apps/server/src/persistence/Services/ProjectionBots.ts
+++ b/apps/server/src/persistence/Services/ProjectionBots.ts
@@ -50,4 +50,4 @@ export interface ProjectionBotRepositoryShape {
export class ProjectionBotRepository extends Context.Service<
ProjectionBotRepository,
ProjectionBotRepositoryShape
->()("t3/persistence/Services/ProjectionBots/ProjectionBotRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionBots/ProjectionBotRepository") {}
diff --git a/apps/server/src/persistence/Services/ProjectionCheckpoints.ts b/apps/server/src/persistence/Services/ProjectionCheckpoints.ts
index 7796ebec2..ca926bf57 100644
--- a/apps/server/src/persistence/Services/ProjectionCheckpoints.ts
+++ b/apps/server/src/persistence/Services/ProjectionCheckpoints.ts
@@ -92,4 +92,4 @@ export interface ProjectionCheckpointRepositoryShape {
export class ProjectionCheckpointRepository extends Context.Service<
ProjectionCheckpointRepository,
ProjectionCheckpointRepositoryShape
->()("t3/persistence/Services/ProjectionCheckpoints/ProjectionCheckpointRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionCheckpoints/ProjectionCheckpointRepository") {}
diff --git a/apps/server/src/persistence/Services/ProjectionGroups.ts b/apps/server/src/persistence/Services/ProjectionGroups.ts
index 6901b314d..4e9d013cf 100644
--- a/apps/server/src/persistence/Services/ProjectionGroups.ts
+++ b/apps/server/src/persistence/Services/ProjectionGroups.ts
@@ -33,4 +33,4 @@ export interface ProjectionGroupRepositoryShape {
export class ProjectionGroupRepository extends Context.Service<
ProjectionGroupRepository,
ProjectionGroupRepositoryShape
->()("t3/persistence/Services/ProjectionGroups/ProjectionGroupRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionGroups/ProjectionGroupRepository") {}
diff --git a/apps/server/src/persistence/Services/ProjectionMcpServers.ts b/apps/server/src/persistence/Services/ProjectionMcpServers.ts
index 80b1c0588..8f691577e 100644
--- a/apps/server/src/persistence/Services/ProjectionMcpServers.ts
+++ b/apps/server/src/persistence/Services/ProjectionMcpServers.ts
@@ -32,4 +32,4 @@ export interface ProjectionMcpServerRepositoryShape {
export class ProjectionMcpServerRepository extends Context.Service<
ProjectionMcpServerRepository,
ProjectionMcpServerRepositoryShape
->()("t3/persistence/Services/ProjectionMcpServers/ProjectionMcpServerRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionMcpServers/ProjectionMcpServerRepository") {}
diff --git a/apps/server/src/persistence/Services/ProjectionPendingApprovals.ts b/apps/server/src/persistence/Services/ProjectionPendingApprovals.ts
index 967e6da9d..c7a6439e5 100644
--- a/apps/server/src/persistence/Services/ProjectionPendingApprovals.ts
+++ b/apps/server/src/persistence/Services/ProjectionPendingApprovals.ts
@@ -90,4 +90,6 @@ export interface ProjectionPendingApprovalRepositoryShape {
export class ProjectionPendingApprovalRepository extends Context.Service<
ProjectionPendingApprovalRepository,
ProjectionPendingApprovalRepositoryShape
->()("t3/persistence/Services/ProjectionPendingApprovals/ProjectionPendingApprovalRepository") {}
+>()(
+ "akeru-bot/persistence/Services/ProjectionPendingApprovals/ProjectionPendingApprovalRepository",
+) {}
diff --git a/apps/server/src/persistence/Services/ProjectionProjects.ts b/apps/server/src/persistence/Services/ProjectionProjects.ts
index 339439fdf..8a6c63414 100644
--- a/apps/server/src/persistence/Services/ProjectionProjects.ts
+++ b/apps/server/src/persistence/Services/ProjectionProjects.ts
@@ -86,4 +86,4 @@ export interface ProjectionProjectRepositoryShape {
export class ProjectionProjectRepository extends Context.Service<
ProjectionProjectRepository,
ProjectionProjectRepositoryShape
->()("t3/persistence/Services/ProjectionProjects/ProjectionProjectRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionProjects/ProjectionProjectRepository") {}
diff --git a/apps/server/src/persistence/Services/ProjectionState.ts b/apps/server/src/persistence/Services/ProjectionState.ts
index ba1ca1517..959c4ecd6 100644
--- a/apps/server/src/persistence/Services/ProjectionState.ts
+++ b/apps/server/src/persistence/Services/ProjectionState.ts
@@ -63,4 +63,4 @@ export interface ProjectionStateRepositoryShape {
export class ProjectionStateRepository extends Context.Service<
ProjectionStateRepository,
ProjectionStateRepositoryShape
->()("t3/persistence/Services/ProjectionState/ProjectionStateRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionState/ProjectionStateRepository") {}
diff --git a/apps/server/src/persistence/Services/ProjectionThreadActivities.ts b/apps/server/src/persistence/Services/ProjectionThreadActivities.ts
index 47cb6073c..49cbebbdb 100644
--- a/apps/server/src/persistence/Services/ProjectionThreadActivities.ts
+++ b/apps/server/src/persistence/Services/ProjectionThreadActivities.ts
@@ -81,4 +81,6 @@ export interface ProjectionThreadActivityRepositoryShape {
export class ProjectionThreadActivityRepository extends Context.Service<
ProjectionThreadActivityRepository,
ProjectionThreadActivityRepositoryShape
->()("t3/persistence/Services/ProjectionThreadActivities/ProjectionThreadActivityRepository") {}
+>()(
+ "akeru-bot/persistence/Services/ProjectionThreadActivities/ProjectionThreadActivityRepository",
+) {}
diff --git a/apps/server/src/persistence/Services/ProjectionThreadMessages.ts b/apps/server/src/persistence/Services/ProjectionThreadMessages.ts
index c1b09d509..a55853b33 100644
--- a/apps/server/src/persistence/Services/ProjectionThreadMessages.ts
+++ b/apps/server/src/persistence/Services/ProjectionThreadMessages.ts
@@ -94,4 +94,4 @@ export interface ProjectionThreadMessageRepositoryShape {
export class ProjectionThreadMessageRepository extends Context.Service<
ProjectionThreadMessageRepository,
ProjectionThreadMessageRepositoryShape
->()("t3/persistence/Services/ProjectionThreadMessages/ProjectionThreadMessageRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionThreadMessages/ProjectionThreadMessageRepository") {}
diff --git a/apps/server/src/persistence/Services/ProjectionThreadProposedPlans.ts b/apps/server/src/persistence/Services/ProjectionThreadProposedPlans.ts
index b4bc2bcc3..ecc5e04dc 100644
--- a/apps/server/src/persistence/Services/ProjectionThreadProposedPlans.ts
+++ b/apps/server/src/persistence/Services/ProjectionThreadProposedPlans.ts
@@ -51,5 +51,5 @@ export class ProjectionThreadProposedPlanRepository extends Context.Service<
ProjectionThreadProposedPlanRepository,
ProjectionThreadProposedPlanRepositoryShape
>()(
- "t3/persistence/Services/ProjectionThreadProposedPlans/ProjectionThreadProposedPlanRepository",
+ "akeru-bot/persistence/Services/ProjectionThreadProposedPlans/ProjectionThreadProposedPlanRepository",
) {}
diff --git a/apps/server/src/persistence/Services/ProjectionThreadSessions.ts b/apps/server/src/persistence/Services/ProjectionThreadSessions.ts
index 7cecac33e..0510d8ab3 100644
--- a/apps/server/src/persistence/Services/ProjectionThreadSessions.ts
+++ b/apps/server/src/persistence/Services/ProjectionThreadSessions.ts
@@ -75,4 +75,4 @@ export interface ProjectionThreadSessionRepositoryShape {
export class ProjectionThreadSessionRepository extends Context.Service<
ProjectionThreadSessionRepository,
ProjectionThreadSessionRepositoryShape
->()("t3/persistence/Services/ProjectionThreadSessions/ProjectionThreadSessionRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionThreadSessions/ProjectionThreadSessionRepository") {}
diff --git a/apps/server/src/persistence/Services/ProjectionThreads.ts b/apps/server/src/persistence/Services/ProjectionThreads.ts
index 479e8986e..94e30615e 100644
--- a/apps/server/src/persistence/Services/ProjectionThreads.ts
+++ b/apps/server/src/persistence/Services/ProjectionThreads.ts
@@ -117,4 +117,4 @@ export interface ProjectionThreadRepositoryShape {
export class ProjectionThreadRepository extends Context.Service<
ProjectionThreadRepository,
ProjectionThreadRepositoryShape
->()("t3/persistence/Services/ProjectionThreads/ProjectionThreadRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionThreads/ProjectionThreadRepository") {}
diff --git a/apps/server/src/persistence/Services/ProjectionTurns.ts b/apps/server/src/persistence/Services/ProjectionTurns.ts
index 9517373c2..a906120e6 100644
--- a/apps/server/src/persistence/Services/ProjectionTurns.ts
+++ b/apps/server/src/persistence/Services/ProjectionTurns.ts
@@ -171,4 +171,4 @@ export interface ProjectionTurnRepositoryShape {
export class ProjectionTurnRepository extends Context.Service<
ProjectionTurnRepository,
ProjectionTurnRepositoryShape
->()("t3/persistence/Services/ProjectionTurns/ProjectionTurnRepository") {}
+>()("akeru-bot/persistence/Services/ProjectionTurns/ProjectionTurnRepository") {}
diff --git a/apps/server/src/preview/Manager.ts b/apps/server/src/preview/Manager.ts
index 09bbe0a41..f1a8e288e 100644
--- a/apps/server/src/preview/Manager.ts
+++ b/apps/server/src/preview/Manager.ts
@@ -58,7 +58,7 @@ export class PreviewManager extends Context.Service<
readonly events: Stream.Stream<PreviewEvent>;
readonly subscribeEvents: Effect.Effect<PubSub.Subscription<PreviewEvent>, never, Scope.Scope>;
}
->()("t3/preview/Manager/PreviewManager") {}
+>()("akeru-bot/preview/Manager/PreviewManager") {}
interface PreviewSessionState {
readonly threadId: string;
diff --git a/apps/server/src/preview/PortScanner.ts b/apps/server/src/preview/PortScanner.ts
index 4571aeef4..b966f2ea0 100644
--- a/apps/server/src/preview/PortScanner.ts
+++ b/apps/server/src/preview/PortScanner.ts
@@ -64,7 +64,7 @@ export class PortDiscovery extends Context.Service<
readonly terminalId: string;
}) => Effect.Effect<void>;
}
->()("t3/preview/PortScanner/PortDiscovery") {}
+>()("akeru-bot/preview/PortScanner/PortDiscovery") {}
export const COMMON_DEV_PORTS: ReadonlyArray<number> = Object.freeze([
3000, 3001, 3333, 4173, 4200, 4321, 5000, 5173, 5174, 5175, 5500, 8000, 8080, 8081, 8888, 9000,
diff --git a/apps/server/src/process/externalLauncher.ts b/apps/server/src/process/externalLauncher.ts
index 96e647031..61a652e5c 100644
--- a/apps/server/src/process/externalLauncher.ts
+++ b/apps/server/src/process/externalLauncher.ts
@@ -513,7 +513,7 @@ export class ExternalLauncher extends Context.Service<
*/
readonly launchEditor: (input: LaunchEditorInput) => Effect.Effect<void, ExternalLauncherError>;
}
->()("t3/process/externalLauncher") {}
+>()("akeru-bot/process/externalLauncher") {}
// ==============================
// Implementations
diff --git a/apps/server/src/processRunner.ts b/apps/server/src/processRunner.ts
index 16b5625d4..5c78d8727 100644
--- a/apps/server/src/processRunner.ts
+++ b/apps/server/src/processRunner.ts
@@ -145,7 +145,7 @@ export class ProcessRunner extends Context.Service<
{
readonly run: (input: ProcessRunInput) => Effect.Effect<ProcessRunOutput, ProcessRunError>;
}
->()("t3/processRunner") {}
+>()("akeru-bot/processRunner") {}
const DEFAULT_TIMEOUT = "60 seconds";
const DEFAULT_MAX_OUTPUT_BYTES = 8 * 1024 * 1024;
diff --git a/apps/server/src/project/ProjectFaviconResolver.ts b/apps/server/src/project/ProjectFaviconResolver.ts
index 9d9a5bddc..3590e002f 100644
--- a/apps/server/src/project/ProjectFaviconResolver.ts
+++ b/apps/server/src/project/ProjectFaviconResolver.ts
@@ -97,7 +97,7 @@ export class ProjectFaviconResolver extends Context.Service<
faviconPath?: string,
) => Effect.Effect<string | null, ProjectFaviconResolutionError>;
}
->()("t3/project/ProjectFaviconResolver") {}
+>()("akeru-bot/project/ProjectFaviconResolver") {}
function extractIconHref(source: string): string | null {
const htmlMatch = source.match(LINK_ICON_HTML_RE);
diff --git a/apps/server/src/project/ProjectSetupScriptRunner.ts b/apps/server/src/project/ProjectSetupScriptRunner.ts
index 41bf0fabf..70e6e39f0 100644
--- a/apps/server/src/project/ProjectSetupScriptRunner.ts
+++ b/apps/server/src/project/ProjectSetupScriptRunner.ts
@@ -76,7 +76,7 @@ export class ProjectSetupScriptRunner extends Context.Service<
input: ProjectSetupScriptRunnerInput,
) => Effect.Effect<ProjectSetupScriptRunnerResult, ProjectSetupScriptRunnerError>;
}
->()("t3/project/ProjectSetupScriptRunner") {}
+>()("akeru-bot/project/ProjectSetupScriptRunner") {}
export const make = Effect.gen(function* () {
const projectionSnapshotQuery = yield* ProjectionSnapshotQuery.ProjectionSnapshotQuery;
diff --git a/apps/server/src/project/RepositoryIdentityResolver.ts b/apps/server/src/project/RepositoryIdentityResolver.ts
index 50608e770..b162e5fff 100644
--- a/apps/server/src/project/RepositoryIdentityResolver.ts
+++ b/apps/server/src/project/RepositoryIdentityResolver.ts
@@ -27,7 +27,7 @@ export class RepositoryIdentityResolver extends Context.Service<
{
readonly resolve: (cwd: string) => Effect.Effect<RepositoryIdentity | null>;
}
->()("t3/project/RepositoryIdentityResolver") {}
+>()("akeru-bot/project/RepositoryIdentityResolver") {}
function parseRemoteFetchUrls(stdout: string): Map<string, string> {
const remotes = new Map<string, string>();
diff --git a/apps/server/src/project/T3ProjectFileLoader.ts b/apps/server/src/project/T3ProjectFileLoader.ts
index 00ad9d383..bc27e5311 100644
--- a/apps/server/src/project/T3ProjectFileLoader.ts
+++ b/apps/server/src/project/T3ProjectFileLoader.ts
@@ -47,7 +47,7 @@ export class T3ProjectFileLoader extends Context.Service<
*/
readonly load: (workspaceRoot: string) => Effect.Effect<Option.Option<T3ProjectFile>>;
}
->()("t3/project/T3ProjectFileLoader") {}
+>()("akeru-bot/project/T3ProjectFileLoader") {}
const logT3ProjectFileLoadError = (error: T3ProjectFileLoadError) =>
Effect.logWarning(error).pipe(
diff --git a/apps/server/src/provider/AkeruMastraHarness.test.ts b/apps/server/src/provider/AkeruMastraHarness.test.ts
index 13f835217..66f1a478a 100644
--- a/apps/server/src/provider/AkeruMastraHarness.test.ts
+++ b/apps/server/src/provider/AkeruMastraHarness.test.ts
@@ -3,10 +3,12 @@ import type { ToolsInput } from "@mastra/core/agent";
import { TOOL_NAME_OVERRIDES } from "@mastra/code-sdk/tool-names";
import { RequestContext } from "@mastra/core/request-context";
import { LocalFilesystem, LocalSandbox, Workspace } from "@mastra/core/workspace";
+import { AKERU_PRODUCT_FEEDBACK_TOOL_NAME } from "@t3tools/contracts";
import { assert, describe, it } from "vite-plus/test";
import { AKERU_AGENT_INSTRUCTIONS } from "./AkeruAgentInstructions.ts";
import { resolveAkeruTools } from "./AkeruMastraHarness.ts";
+import { productFeedbackToolInputSchema } from "./AkeruMastraHarness.ts";
describe("AkeruMastraHarness", () => {
it("configures Akeru as a general-purpose assistant with plugin awareness", () => {
@@ -36,6 +38,35 @@ describe("AkeruMastraHarness", () => {
});
assert.containsAllKeys(tools, ["view", "write_file", "execute_command", "exa_search"]);
+ assert.containsAllKeys(tools, [AKERU_PRODUCT_FEEDBACK_TOOL_NAME]);
await workspace.destroy();
});
+
+ it("keeps product feedback draft-only and approval-gated", async () => {
+ const valid = await productFeedbackToolInputSchema["~standard"].validate({
+ feedback: "The button is unresponsive.",
+ });
+ const forbidden = await productFeedbackToolInputSchema["~standard"].validate({
+ feedback: "Private payload",
+ conversation: "full thread",
+ });
+ assert.isUndefined(valid.issues);
+ assert.isDefined(forbidden.issues);
+
+ const requestContext = new RequestContext();
+ requestContext.setRaw("controller", { resourceId: "thread-1" });
+ const tools = await resolveAkeruTools(requestContext, {
+ authStorage: new AuthStorage("/tmp/akeru-unused-auth.json"),
+ getThreadWorkspace: () => undefined,
+ getThreadTools: () => ({}),
+ });
+ const tool = tools[AKERU_PRODUCT_FEEDBACK_TOOL_NAME] as {
+ requireApproval?: boolean;
+ execute?: (input: unknown, context: unknown) => Promise<unknown>;
+ };
+ assert.isTrue(tool.requireApproval);
+ assert.deepEqual(await tool.execute?.({ feedback: "The button is unresponsive." }, {}), {
+ status: "draft-opened",
+ });
+ });
});
diff --git a/apps/server/src/provider/AkeruMastraHarness.ts b/apps/server/src/provider/AkeruMastraHarness.ts
index 75e6be077..e8305fa24 100644
--- a/apps/server/src/provider/AkeruMastraHarness.ts
+++ b/apps/server/src/provider/AkeruMastraHarness.ts
@@ -7,11 +7,58 @@ import {
} from "@mastra/core/agent-controller";
import { createCodingAgent } from "@mastra/core/coding-agent";
import type { RequestContext } from "@mastra/core/request-context";
+import type { StandardSchemaWithJSON } from "@mastra/core/schema";
+import { createTool } from "@mastra/core/tools";
import { createWorkspaceTools, type Workspace } from "@mastra/core/workspace";
+import {
+ AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ ProductFeedbackToolDraft,
+ type ProductFeedbackToolDraft as ProductFeedbackToolDraftValue,
+} from "@t3tools/contracts";
+import * as Exit from "effect/Exit";
+import * as Schema from "effect/Schema";
import { AKERU_AGENT_INSTRUCTIONS } from "./AkeruAgentInstructions.ts";
const DEFAULT_MODEL_ID = "openai/gpt-5.6-sol";
+const decodeProductFeedbackToolDraft = Schema.decodeUnknownExit(ProductFeedbackToolDraft, {
+ onExcessProperty: "error",
+});
+const productFeedbackToolJsonSchema = {
+ type: "object",
+ additionalProperties: false,
+ properties: {
+ feedback: { type: "string", minLength: 1, maxLength: 4_000 },
+ },
+ required: ["feedback"],
+} as const;
+
+export const productFeedbackToolInputSchema: StandardSchemaWithJSON<ProductFeedbackToolDraftValue> =
+ {
+ "~standard": {
+ version: 1,
+ vendor: "akeru-effect",
+ validate: (value) => {
+ const decoded = decodeProductFeedbackToolDraft(value);
+ return Exit.isSuccess(decoded)
+ ? { value: decoded.value }
+ : { issues: [{ message: "Invalid product feedback draft." }] };
+ },
+ jsonSchema: {
+ input: () => productFeedbackToolJsonSchema,
+ output: () => productFeedbackToolJsonSchema,
+ },
+ },
+ };
+
+const productFeedbackTool = createTool({
+ id: AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ description:
+ "Draft anonymous Akeru Bot product feedback for the user to review and send. This tool never sends feedback.",
+ inputSchema: productFeedbackToolInputSchema,
+ requireApproval: true,
+ execute: async () => ({ status: "draft-opened" as const }),
+});
export interface AkeruMastraState {
readonly projectPath?: string;
@@ -73,7 +120,11 @@ export async function resolveAkeruTools(
workspace,
})
: {};
- return { ...workspaceTools, ...options.getThreadTools(threadId) };
+ return {
+ ...workspaceTools,
+ ...options.getThreadTools(threadId),
+ [AKERU_PRODUCT_FEEDBACK_TOOL_NAME]: productFeedbackTool,
+ };
}
function toolCategory(toolName: string): "read" | "edit" | "execute" | "mcp" | "other" {
diff --git a/apps/server/src/provider/Layers/AgentController.test.ts b/apps/server/src/provider/Layers/AgentController.test.ts
index a36a19943..c9c9bfa55 100644
--- a/apps/server/src/provider/Layers/AgentController.test.ts
+++ b/apps/server/src/provider/Layers/AgentController.test.ts
@@ -7,6 +7,7 @@ import * as NodeServices from "@effect/platform-node/NodeServices";
import type { AgentControllerEvent, MastraDBMessage, Session } from "@mastra/core/agent-controller";
import { LocalFilesystem, LocalSandbox, Workspace } from "@mastra/core/workspace";
import {
+ AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
ApprovalRequestId,
McpServerId,
ProviderDriverKind,
@@ -430,6 +431,55 @@ describe("AgentControllerLive", () => {
);
});
+ it.effect("keeps product feedback approval-gated in full-access mode", () => {
+ const bridge = makeBridge();
+ const mastra = makeMastraHarness();
+ return provideController(
+ Effect.gen(function* () {
+ const controller = yield* AgentController;
+ yield* resolveCodex(controller);
+ yield* controller.startSession(codexThreadId, {
+ threadId: codexThreadId,
+ provider: ProviderDriverKind.make("codex"),
+ providerInstanceId: codexInstanceId,
+ cwd: process.cwd(),
+ modelSelection: codexSelection,
+ runtimeMode: "full-access",
+ });
+
+ expect(mastra.session.state.set).toHaveBeenCalledWith(
+ expect.objectContaining({ yolo: false }),
+ );
+ expect(mastra.session.permissions.setForTool).toHaveBeenCalledWith({
+ toolName: AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ policy: "ask",
+ });
+
+ yield* controller.sendTurn({ threadId: codexThreadId, input: "Prepare feedback." });
+ mastra.emit({
+ type: "tool_approval_required",
+ toolCallId: "feedback-tool-1",
+ toolName: AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ args: { feedback: "The button failed." },
+ } as AgentControllerEvent);
+ yield* Effect.yieldNow;
+ yield* controller.respondToRequest({
+ threadId: codexThreadId,
+ requestId: ApprovalRequestId.make("feedback-tool-1"),
+ decision: "acceptForSession",
+ });
+
+ expect(mastra.session.permissions.setForTool).not.toHaveBeenCalledWith({
+ toolName: AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ policy: "allow",
+ });
+ mastra.finishSend();
+ }),
+ bridge.service,
+ mastra.factory,
+ );
+ });
+
it.effect("keeps a suspended Mastra turn active until tool input resumes", () => {
const bridge = makeBridge();
const mastra = makeMastraHarness();
diff --git a/apps/server/src/provider/Layers/AgentController.ts b/apps/server/src/provider/Layers/AgentController.ts
index 87b82cdcd..6d7ea8c18 100644
--- a/apps/server/src/provider/Layers/AgentController.ts
+++ b/apps/server/src/provider/Layers/AgentController.ts
@@ -29,6 +29,7 @@ import {
type ProviderSession,
type RuntimeMode,
type ThreadId,
+ AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
} from "@t3tools/contracts";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
@@ -401,13 +402,23 @@ const make = (options?: AgentControllerLiveOptions) =>
type: "request.opened",
payload: {
requestType: "dynamic_tool_call",
- detail: `Allow ${event.toolName}?`,
+ detail:
+ event.toolName === AKERU_PRODUCT_FEEDBACK_TOOL_NAME
+ ? "Review product feedback"
+ : `Allow ${event.toolName}?`,
+ toolName: event.toolName,
args: event.args,
- options: [
- { decision: "accept", label: "Allow" },
- { decision: "acceptForSession", label: "Allow for session" },
- { decision: "decline", label: "Decline" },
- ],
+ options:
+ event.toolName === AKERU_PRODUCT_FEEDBACK_TOOL_NAME
+ ? [
+ { decision: "accept", label: "Add to feedback draft" },
+ { decision: "decline", label: "Cancel" },
+ ]
+ : [
+ { decision: "accept", label: "Allow" },
+ { decision: "acceptForSession", label: "Allow for session" },
+ { decision: "decline", label: "Decline" },
+ ],
},
});
return;
@@ -591,7 +602,7 @@ const make = (options?: AgentControllerLiveOptions) =>
yield* runMastra("state.set", () =>
session.state.set({
...(input.cwd ? { projectPath: input.cwd } : {}),
- yolo: input.runtimeMode === "full-access" || input.runtimeMode === "auto",
+ yolo: false,
}),
);
yield* runMastra("model.switch", () =>
@@ -612,6 +623,12 @@ const make = (options?: AgentControllerLiveOptions) =>
),
{ discard: true },
);
+ yield* runMastra("permissions.setForTool", () =>
+ session.permissions.setForTool({
+ toolName: AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ policy: "ask",
+ }),
+ );
const createdAt = nowIso();
const activeWithoutUnsubscribe = {
session,
@@ -763,7 +780,11 @@ const make = (options?: AgentControllerLiveOptions) =>
}
const toolCallId = String(input.requestId);
const toolName = active.toolNames.get(toolCallId);
- if (input.decision === "acceptForSession" && toolName) {
+ if (
+ input.decision === "acceptForSession" &&
+ toolName &&
+ toolName !== AKERU_PRODUCT_FEEDBACK_TOOL_NAME
+ ) {
yield* runMastra("permissions.setForTool", () =>
active.session.permissions.setForTool({ toolName, policy: "allow" }),
);
diff --git a/apps/server/src/provider/Layers/ClaudeAdapter.test.ts b/apps/server/src/provider/Layers/ClaudeAdapter.test.ts
index dd824796b..a4a28ff70 100644
--- a/apps/server/src/provider/Layers/ClaudeAdapter.test.ts
+++ b/apps/server/src/provider/Layers/ClaudeAdapter.test.ts
@@ -42,7 +42,7 @@ const decodeClaudeSettings = Schema.decodeSync(ClaudeSettings);
// Test-local service tag so the rest of the file can keep using `yield* ClaudeAdapter`.
class ClaudeAdapter extends Context.Service<ClaudeAdapter, ClaudeAdapterShape>()(
- "t3/provider/Layers/ClaudeAdapter.test/ClaudeAdapter",
+ "akeru-bot/provider/Layers/ClaudeAdapter.test/ClaudeAdapter",
) {}
class FakeClaudeQuery implements AsyncIterable<SDKMessage> {
diff --git a/apps/server/src/provider/Layers/CodexAdapter.test.ts b/apps/server/src/provider/Layers/CodexAdapter.test.ts
index 4986d02c9..7ec84f0a2 100644
--- a/apps/server/src/provider/Layers/CodexAdapter.test.ts
+++ b/apps/server/src/provider/Layers/CodexAdapter.test.ts
@@ -51,7 +51,7 @@ const decodeCodexSettings = Schema.decodeSync(CodexSettings);
// Test-local service tag so the rest of the file can keep using `yield* CodexAdapter`.
class CodexAdapter extends Context.Service<CodexAdapter, CodexAdapterShape>()(
- "t3/provider/Layers/CodexAdapter.test/CodexAdapter",
+ "akeru-bot/provider/Layers/CodexAdapter.test/CodexAdapter",
) {}
const asThreadId = (value: string): ThreadId => ThreadId.make(value);
diff --git a/apps/server/src/provider/Layers/CursorAdapter.test.ts b/apps/server/src/provider/Layers/CursorAdapter.test.ts
index cd5cdb7f0..e9fcca364 100644
--- a/apps/server/src/provider/Layers/CursorAdapter.test.ts
+++ b/apps/server/src/provider/Layers/CursorAdapter.test.ts
@@ -33,7 +33,7 @@ const decodeCursorSettings = Schema.decodeSync(CursorSettings);
// Test-local service tag so the rest of the file can keep using `yield* CursorAdapter`.
class CursorAdapter extends Context.Service<CursorAdapter, CursorAdapterShape>()(
- "t3/provider/Layers/CursorAdapter.test/CursorAdapter",
+ "akeru-bot/provider/Layers/CursorAdapter.test/CursorAdapter",
) {}
const __dirname = NodePath.dirname(NodeURL.fileURLToPath(import.meta.url));
diff --git a/apps/server/src/provider/Layers/OpenCodeAdapter.test.ts b/apps/server/src/provider/Layers/OpenCodeAdapter.test.ts
index eea328e05..9bd64569e 100644
--- a/apps/server/src/provider/Layers/OpenCodeAdapter.test.ts
+++ b/apps/server/src/provider/Layers/OpenCodeAdapter.test.ts
@@ -41,7 +41,7 @@ import {
// Test-local service tag so the rest of the file can keep using `yield* OpenCodeAdapter`.
class OpenCodeAdapter extends Context.Service<OpenCodeAdapter, OpenCodeAdapterShape>()(
- "t3/provider/Layers/OpenCodeAdapter.test/OpenCodeAdapter",
+ "akeru-bot/provider/Layers/OpenCodeAdapter.test/OpenCodeAdapter",
) {}
const asThreadId = (value: string): ThreadId => ThreadId.make(value);
diff --git a/apps/server/src/provider/Layers/ProviderEventLoggers.ts b/apps/server/src/provider/Layers/ProviderEventLoggers.ts
index a4f0b01e8..f70aa780d 100644
--- a/apps/server/src/provider/Layers/ProviderEventLoggers.ts
+++ b/apps/server/src/provider/Layers/ProviderEventLoggers.ts
@@ -46,7 +46,7 @@ export class ProviderEventLoggers extends Context.Service<
readonly native: EventNdjsonLogger.EventNdjsonLogger | undefined;
readonly canonical: EventNdjsonLogger.EventNdjsonLogger | undefined;
}
->()("t3/provider/Layers/ProviderEventLoggers") {}
+>()("akeru-bot/provider/Layers/ProviderEventLoggers") {}
/**
* Constant value used by tests / boot layers that want to opt out of native
diff --git a/apps/server/src/provider/ModelManifest.ts b/apps/server/src/provider/ModelManifest.ts
index cb9494992..3676ef11e 100644
--- a/apps/server/src/provider/ModelManifest.ts
+++ b/apps/server/src/provider/ModelManifest.ts
@@ -128,7 +128,7 @@ export class ModelManifest extends Context.Service<
* the teardown of whichever instance happened to trigger it. */
readonly refreshInBackground: Effect.Effect<void>;
}
->()("t3/provider/ModelManifest") {}
+>()("akeru-bot/provider/ModelManifest") {}
/** Constant service for tests and callers that only need the bundled data. */
export const BundledOnlyModelManifest: ModelManifest["Service"] = {
diff --git a/apps/server/src/provider/Services/AgentController.ts b/apps/server/src/provider/Services/AgentController.ts
index aa0e3f3ed..cdfc008b3 100644
--- a/apps/server/src/provider/Services/AgentController.ts
+++ b/apps/server/src/provider/Services/AgentController.ts
@@ -92,5 +92,5 @@ export interface AgentControllerShape {
}
export class AgentController extends Context.Service<AgentController, AgentControllerShape>()(
- "t3/provider/Services/AgentController",
+ "akeru-bot/provider/Services/AgentController",
) {}
diff --git a/apps/server/src/provider/Services/LegacyProviderBridge.ts b/apps/server/src/provider/Services/LegacyProviderBridge.ts
index 8e93bb7b3..8510c087f 100644
--- a/apps/server/src/provider/Services/LegacyProviderBridge.ts
+++ b/apps/server/src/provider/Services/LegacyProviderBridge.ts
@@ -11,4 +11,4 @@ import type { ProviderServiceShape } from "./ProviderService.ts";
export class LegacyProviderBridge extends Context.Service<
LegacyProviderBridge,
ProviderServiceShape
->()("t3/provider/Services/LegacyProviderBridge") {}
+>()("akeru-bot/provider/Services/LegacyProviderBridge") {}
diff --git a/apps/server/src/provider/Services/ProviderAdapterRegistry.ts b/apps/server/src/provider/Services/ProviderAdapterRegistry.ts
index 5b755c42e..fe3ab6779 100644
--- a/apps/server/src/provider/Services/ProviderAdapterRegistry.ts
+++ b/apps/server/src/provider/Services/ProviderAdapterRegistry.ts
@@ -97,4 +97,4 @@ export interface ProviderAdapterRegistryShape {
export class ProviderAdapterRegistry extends Context.Service<
ProviderAdapterRegistry,
ProviderAdapterRegistryShape
->()("t3/provider/Services/ProviderAdapterRegistry") {}
+>()("akeru-bot/provider/Services/ProviderAdapterRegistry") {}
diff --git a/apps/server/src/provider/Services/ProviderInstanceRegistry.ts b/apps/server/src/provider/Services/ProviderInstanceRegistry.ts
index cfea11426..454a11c36 100644
--- a/apps/server/src/provider/Services/ProviderInstanceRegistry.ts
+++ b/apps/server/src/provider/Services/ProviderInstanceRegistry.ts
@@ -84,4 +84,4 @@ export interface ProviderInstanceRegistryShape {
export class ProviderInstanceRegistry extends Context.Service<
ProviderInstanceRegistry,
ProviderInstanceRegistryShape
->()("t3/provider/Services/ProviderInstanceRegistry") {}
+>()("akeru-bot/provider/Services/ProviderInstanceRegistry") {}
diff --git a/apps/server/src/provider/Services/ProviderInstanceRegistryMutator.ts b/apps/server/src/provider/Services/ProviderInstanceRegistryMutator.ts
index 98d450802..b491112cd 100644
--- a/apps/server/src/provider/Services/ProviderInstanceRegistryMutator.ts
+++ b/apps/server/src/provider/Services/ProviderInstanceRegistryMutator.ts
@@ -49,4 +49,4 @@ export interface ProviderInstanceRegistryMutatorShape {
export class ProviderInstanceRegistryMutator extends Context.Service<
ProviderInstanceRegistryMutator,
ProviderInstanceRegistryMutatorShape
->()("t3/provider/Services/ProviderInstanceRegistryMutator") {}
+>()("akeru-bot/provider/Services/ProviderInstanceRegistryMutator") {}
diff --git a/apps/server/src/provider/Services/ProviderRegistry.ts b/apps/server/src/provider/Services/ProviderRegistry.ts
index b7426b303..04e82fbb0 100644
--- a/apps/server/src/provider/Services/ProviderRegistry.ts
+++ b/apps/server/src/provider/Services/ProviderRegistry.ts
@@ -77,5 +77,5 @@ export interface ProviderRegistryShape {
}
export class ProviderRegistry extends Context.Service<ProviderRegistry, ProviderRegistryShape>()(
- "t3/provider/Services/ProviderRegistry",
+ "akeru-bot/provider/Services/ProviderRegistry",
) {}
diff --git a/apps/server/src/provider/Services/ProviderService.ts b/apps/server/src/provider/Services/ProviderService.ts
index 545641d2e..043f2e781 100644
--- a/apps/server/src/provider/Services/ProviderService.ts
+++ b/apps/server/src/provider/Services/ProviderService.ts
@@ -126,5 +126,5 @@ export interface ProviderServiceShape {
* ProviderService - Service tag for provider orchestration.
*/
export class ProviderService extends Context.Service<ProviderService, ProviderServiceShape>()(
- "t3/provider/Services/ProviderService",
+ "akeru-bot/provider/Services/ProviderService",
) {}
diff --git a/apps/server/src/provider/Services/ProviderSessionDirectory.ts b/apps/server/src/provider/Services/ProviderSessionDirectory.ts
index f2dd4323f..7a9cea684 100644
--- a/apps/server/src/provider/Services/ProviderSessionDirectory.ts
+++ b/apps/server/src/provider/Services/ProviderSessionDirectory.ts
@@ -67,4 +67,4 @@ export interface ProviderSessionDirectoryShape {
export class ProviderSessionDirectory extends Context.Service<
ProviderSessionDirectory,
ProviderSessionDirectoryShape
->()("t3/provider/Services/ProviderSessionDirectory") {}
+>()("akeru-bot/provider/Services/ProviderSessionDirectory") {}
diff --git a/apps/server/src/provider/Services/ProviderSessionReaper.ts b/apps/server/src/provider/Services/ProviderSessionReaper.ts
index 7c4627eca..6a6f00820 100644
--- a/apps/server/src/provider/Services/ProviderSessionReaper.ts
+++ b/apps/server/src/provider/Services/ProviderSessionReaper.ts
@@ -12,4 +12,4 @@ export interface ProviderSessionReaperShape {
export class ProviderSessionReaper extends Context.Service<
ProviderSessionReaper,
ProviderSessionReaperShape
->()("t3/provider/Services/ProviderSessionReaper") {}
+>()("akeru-bot/provider/Services/ProviderSessionReaper") {}
diff --git a/apps/server/src/provider/acp/AcpSessionRuntime.ts b/apps/server/src/provider/acp/AcpSessionRuntime.ts
index 0dcf72895..587da2605 100644
--- a/apps/server/src/provider/acp/AcpSessionRuntime.ts
+++ b/apps/server/src/provider/acp/AcpSessionRuntime.ts
@@ -251,7 +251,7 @@ export class AcpSessionRuntime extends Context.Service<
payload: unknown,
) => Effect.Effect<void, EffectAcpErrors.AcpError>;
}
->()("t3/provider/acp/AcpSessionRuntime") {}
+>()("akeru-bot/provider/acp/AcpSessionRuntime") {}
interface AcpStartedState extends AcpSessionRuntimeStartResult {}
diff --git a/apps/server/src/provider/opencodeRuntime.ts b/apps/server/src/provider/opencodeRuntime.ts
index 80329a679..c8f2dff67 100644
--- a/apps/server/src/provider/opencodeRuntime.ts
+++ b/apps/server/src/provider/opencodeRuntime.ts
@@ -839,7 +839,7 @@ const makeOpenCodeRuntime = Effect.gen(function* () {
});
export class OpenCodeRuntime extends Context.Service<OpenCodeRuntime, OpenCodeRuntimeShape>()(
- "t3/provider/opencodeRuntime",
+ "akeru-bot/provider/opencodeRuntime",
) {}
export const OpenCodeRuntimeLive = Layer.effect(OpenCodeRuntime, makeOpenCodeRuntime).pipe(
diff --git a/apps/server/src/provider/providerMaintenanceRunner.ts b/apps/server/src/provider/providerMaintenanceRunner.ts
index 3c114dd83..4cb73e3dc 100644
--- a/apps/server/src/provider/providerMaintenanceRunner.ts
+++ b/apps/server/src/provider/providerMaintenanceRunner.ts
@@ -54,7 +54,7 @@ export interface ProviderMaintenanceRunnerShape {
export class ProviderMaintenanceRunner extends Context.Service<
ProviderMaintenanceRunner,
ProviderMaintenanceRunnerShape
->()("t3/provider/providerMaintenanceRunner") {}
+>()("akeru-bot/provider/providerMaintenanceRunner") {}
class ProviderMaintenanceCommandError extends Data.TaggedError("ProviderMaintenanceCommandError")<{
readonly message: string;
diff --git a/apps/server/src/relay/AgentAwarenessRelay.ts b/apps/server/src/relay/AgentAwarenessRelay.ts
index 5127ecf7d..637c51579 100644
--- a/apps/server/src/relay/AgentAwarenessRelay.ts
+++ b/apps/server/src/relay/AgentAwarenessRelay.ts
@@ -53,7 +53,7 @@ export class AgentAwarenessRelay extends Context.Service<
readonly publishThread: (threadId: ThreadId) => Effect.Effect<void>;
readonly start: () => Effect.Effect<void, never, Scope.Scope>;
}
->()("t3/relay/AgentAwarenessRelay") {}
+>()("akeru-bot/relay/AgentAwarenessRelay") {}
export function eventThreadId(event: OrchestrationEvent): ThreadId | null {
const payload = event.payload as { readonly threadId?: unknown };
diff --git a/apps/server/src/resourceTelemetry/DesktopTelemetryReceiver.ts b/apps/server/src/resourceTelemetry/DesktopTelemetryReceiver.ts
index 1fca5696a..f3fb4a525 100644
--- a/apps/server/src/resourceTelemetry/DesktopTelemetryReceiver.ts
+++ b/apps/server/src/resourceTelemetry/DesktopTelemetryReceiver.ts
@@ -172,7 +172,7 @@ export class DesktopTelemetryReceiver extends Context.Service<
enabled: boolean,
) => Effect.Effect<void, DesktopTelemetryControlError>;
}
->()("t3/resourceTelemetry/DesktopTelemetryReceiver") {}
+>()("akeru-bot/resourceTelemetry/DesktopTelemetryReceiver") {}
const decodeMessage = Schema.decodeUnknownEffect(DesktopHostTelemetryMessage);
const encodeControlMessage = Schema.encodeEffect(
diff --git a/apps/server/src/resourceTelemetry/NativeTelemetryClient.ts b/apps/server/src/resourceTelemetry/NativeTelemetryClient.ts
index e8d81cc4c..e864c0228 100644
--- a/apps/server/src/resourceTelemetry/NativeTelemetryClient.ts
+++ b/apps/server/src/resourceTelemetry/NativeTelemetryClient.ts
@@ -203,7 +203,7 @@ export class NativeTelemetryClient extends Context.Service<
Scope.Scope
>;
}
->()("t3/resourceTelemetry/NativeTelemetryClient") {}
+>()("akeru-bot/resourceTelemetry/NativeTelemetryClient") {}
interface ClientState {
readonly status: ResourceTelemetrySourceStatus;
diff --git a/apps/server/src/resourceTelemetry/ResourceAttribution.ts b/apps/server/src/resourceTelemetry/ResourceAttribution.ts
index 374564bb7..8fcb2f214 100644
--- a/apps/server/src/resourceTelemetry/ResourceAttribution.ts
+++ b/apps/server/src/resourceTelemetry/ResourceAttribution.ts
@@ -20,7 +20,7 @@ export class ResourceAttribution extends Context.Service<
readonly record: (input: ResourceAttributionRecord) => Effect.Effect<void>;
readonly snapshot: Effect.Effect<ResourceAttributionSnapshot>;
}
->()("t3/resourceTelemetry/ResourceAttribution") {}
+>()("akeru-bot/resourceTelemetry/ResourceAttribution") {}
function key(input: Pick<ResourceAttributionRecord, "component" | "operation">): string {
return `${input.component}\u0000${input.operation}`;
diff --git a/apps/server/src/resourceTelemetry/ResourceMonitorBinary.ts b/apps/server/src/resourceTelemetry/ResourceMonitorBinary.ts
index c93bc54a1..022507c97 100644
--- a/apps/server/src/resourceTelemetry/ResourceMonitorBinary.ts
+++ b/apps/server/src/resourceTelemetry/ResourceMonitorBinary.ts
@@ -60,7 +60,7 @@ export class ResourceMonitorBinary extends Context.Service<
{
readonly resolve: Effect.Effect<string, ResourceMonitorBinaryError>;
}
->()("t3/resourceTelemetry/ResourceMonitorBinary") {}
+>()("akeru-bot/resourceTelemetry/ResourceMonitorBinary") {}
function binaryName(platform: NodeJS.Platform): string {
return platform === "win32" ? "t3-resource-monitor.exe" : "t3-resource-monitor";
@@ -84,7 +84,7 @@ function detectResourceMonitorLinuxLibc(): ResourceMonitorLinuxLibc {
}
export const ResourceMonitorHostLinuxLibc = Context.Reference<ResourceMonitorLinuxLibc>(
- "t3/resourceTelemetry/ResourceMonitorHostLinuxLibc",
+ "akeru-bot/resourceTelemetry/ResourceMonitorHostLinuxLibc",
{
defaultValue: detectResourceMonitorLinuxLibc,
},
diff --git a/apps/server/src/resourceTelemetry/ResourceTelemetry.ts b/apps/server/src/resourceTelemetry/ResourceTelemetry.ts
index 4dd7e721d..2acebf405 100644
--- a/apps/server/src/resourceTelemetry/ResourceTelemetry.ts
+++ b/apps/server/src/resourceTelemetry/ResourceTelemetry.ts
@@ -72,7 +72,7 @@ export class ResourceTelemetry extends Context.Service<
) => Effect.Effect<boolean, ResourceTelemetryRefreshFailed>;
readonly retry: Effect.Effect<ResourceTelemetryRetryResult>;
}
->()("t3/resourceTelemetry/ResourceTelemetry") {}
+>()("akeru-bot/resourceTelemetry/ResourceTelemetry") {}
interface TelemetryState {
readonly nativeSnapshot: Option.Option<ResourceMonitorSnapshotEvent>;
diff --git a/apps/server/src/review/ReviewService.ts b/apps/server/src/review/ReviewService.ts
index 275dcb416..e2906421e 100644
--- a/apps/server/src/review/ReviewService.ts
+++ b/apps/server/src/review/ReviewService.ts
@@ -29,7 +29,7 @@ export class ReviewService extends Context.Service<
input: ReviewDiffFileContentsInput,
) => Effect.Effect<ReviewDiffFileContentsResult, ReviewDiffPreviewError>;
}
->()("t3/review/ReviewService") {}
+>()("akeru-bot/review/ReviewService") {}
export const make = Effect.gen(function* () {
const config = yield* ServerConfig.ServerConfig;
diff --git a/apps/server/src/serverActivation.ts b/apps/server/src/serverActivation.ts
index c068d55e7..43e682eaf 100644
--- a/apps/server/src/serverActivation.ts
+++ b/apps/server/src/serverActivation.ts
@@ -4,7 +4,7 @@ import * as Effect from "effect/Effect";
import type * as Scope from "effect/Scope";
export class ServerActivation extends Context.Reference<Effect.Effect<void> | undefined>(
- "t3/serverActivation",
+ "akeru-bot/serverActivation",
{ defaultValue: () => undefined },
) {}
diff --git a/apps/server/src/serverLifecycleEvents.ts b/apps/server/src/serverLifecycleEvents.ts
index 855d03490..d7edd14c3 100644
--- a/apps/server/src/serverLifecycleEvents.ts
+++ b/apps/server/src/serverLifecycleEvents.ts
@@ -22,7 +22,7 @@ export class ServerLifecycleEvents extends Context.Service<
readonly snapshot: Effect.Effect<SnapshotState>;
readonly stream: Stream.Stream<ServerLifecycleStreamEvent>;
}
->()("t3/serverLifecycleEvents") {}
+>()("akeru-bot/serverLifecycleEvents") {}
const make = Effect.gen(function* () {
const pubsub = yield* PubSub.unbounded<ServerLifecycleStreamEvent>();
diff --git a/apps/server/src/serverRuntimeStartup.ts b/apps/server/src/serverRuntimeStartup.ts
index 80c74a13f..fb78d393b 100644
--- a/apps/server/src/serverRuntimeStartup.ts
+++ b/apps/server/src/serverRuntimeStartup.ts
@@ -69,7 +69,7 @@ export class ServerRuntimeStartup extends Context.Service<
effect: Effect.Effect<A, E>,
) => Effect.Effect<A, E | ServerRuntimeStartupError>;
}
->()("t3/serverRuntimeStartup") {}
+>()("akeru-bot/serverRuntimeStartup") {}
interface QueuedCommand {
readonly run: Effect.Effect<void, never>;
diff --git a/apps/server/src/serverSettings.ts b/apps/server/src/serverSettings.ts
index 5a8650b7e..0d5e90cf5 100644
--- a/apps/server/src/serverSettings.ts
+++ b/apps/server/src/serverSettings.ts
@@ -189,7 +189,7 @@ export class ServerSettingsService extends Context.Service<
*/
readonly subscribeChanges: Effect.Effect<Stream.Stream<ServerSettings>, never, Scope.Scope>;
}
->()("t3/serverSettings/ServerSettingsService") {
+>()("akeru-bot/serverSettings/ServerSettingsService") {
/** @deprecated Import and use `layerTest` from this module. */
static readonly layerTest = (overrides: DeepPartial<ServerSettings> = {}) => layerTest(overrides);
}
diff --git a/apps/server/src/serviceLauncher.test.ts b/apps/server/src/serviceLauncher.test.ts
index 45c472af1..b7ad2318b 100644
--- a/apps/server/src/serviceLauncher.test.ts
+++ b/apps/server/src/serviceLauncher.test.ts
@@ -99,7 +99,7 @@ it.layer(NodeServices.layer)("service state persistence", (it) => {
const root = yield* fs.makeTempDirectoryScoped({ prefix: "t3-service-launcher-stop-" });
const statePath = path.join(root, "runtime", "service-state.json");
const versionDir = path.join(root, "runtime", "versions", "1.0.0");
- const entryPath = path.join(versionDir, "node_modules", "t3", "dist", "bin.mjs");
+ const entryPath = path.join(versionDir, "node_modules", "akeru-bot", "dist", "bin.mjs");
yield* fs.makeDirectory(path.dirname(entryPath), { recursive: true });
yield* fs.writeFileString(entryPath, "setInterval(() => {}, 1_000);\n");
yield* fs.writeFileString(path.join(versionDir, ".install-complete"), "1.0.0\n");
@@ -149,7 +149,7 @@ if (context.update?.status === "pending") {
`;
for (const version of ["1.0.0", "1.1.0"]) {
const versionDir = path.join(root, "runtime", "versions", version);
- const entryPath = path.join(versionDir, "node_modules", "t3", "dist", "bin.mjs");
+ const entryPath = path.join(versionDir, "node_modules", "akeru-bot", "dist", "bin.mjs");
yield* fs.makeDirectory(path.dirname(entryPath), { recursive: true });
yield* fs.writeFileString(entryPath, childSource);
yield* fs.writeFileString(path.join(versionDir, ".install-complete"), `${version}\n`);
@@ -199,7 +199,7 @@ if (context.update?.status === "pending") {
`;
for (const version of ["1.0.0", "1.1.0"]) {
const versionDir = path.join(root, "runtime", "versions", version);
- const entryPath = path.join(versionDir, "node_modules", "t3", "dist", "bin.mjs");
+ const entryPath = path.join(versionDir, "node_modules", "akeru-bot", "dist", "bin.mjs");
yield* fs.makeDirectory(path.dirname(entryPath), { recursive: true });
yield* fs.writeFileString(entryPath, childSource);
yield* fs.writeFileString(path.join(versionDir, ".install-complete"), `${version}\n`);
@@ -258,7 +258,7 @@ if (context.update?.status === "pending") {
`;
for (const version of ["1.0.0", "1.1.0"]) {
const versionDir = path.join(root, "runtime", "versions", version);
- const entryPath = path.join(versionDir, "node_modules", "t3", "dist", "bin.mjs");
+ const entryPath = path.join(versionDir, "node_modules", "akeru-bot", "dist", "bin.mjs");
yield* fs.makeDirectory(path.dirname(entryPath), { recursive: true });
yield* fs.writeFileString(entryPath, childSource);
yield* fs.writeFileString(path.join(versionDir, ".install-complete"), `${version}\n`);
diff --git a/apps/server/src/serviceLauncher.ts b/apps/server/src/serviceLauncher.ts
index 68f3c3467..3bb5666fc 100644
--- a/apps/server/src/serviceLauncher.ts
+++ b/apps/server/src/serviceLauncher.ts
@@ -2,7 +2,7 @@
// @effect-diagnostics globalDate:off
// @effect-diagnostics globalTimers:off
// This file is shipped as a standalone bundle and copied to a stable path by
-// `t3 service update`. Keep runtime imports limited to Node built-ins.
+// `akeru service update`. Keep runtime imports limited to Node built-ins.
import * as NodeChildProcess from "node:child_process";
import * as NodeCrypto from "node:crypto";
import * as NodeFS from "node:fs";
@@ -46,7 +46,7 @@ const runtimePaths = (baseDir: string, version: string) => {
const versionDir = NodePath.join(baseDir, "runtime", "versions", version);
return {
versionDir,
- entryPath: NodePath.join(versionDir, "node_modules", "t3", "dist", "bin.mjs"),
+ entryPath: NodePath.join(versionDir, "node_modules", "akeru-bot", "dist", "bin.mjs"),
sentinelPath: NodePath.join(versionDir, ".install-complete"),
};
};
@@ -393,7 +393,7 @@ export class Launcher {
async #startChild(version: string, role: ChildRole, update?: ServiceUpdateRecord): Promise<void> {
if (this.#stopping) return;
if (!(await runtimeExists(this.#baseDir, version))) {
- throw new Error(`Selected t3@${version} runtime is missing or incomplete.`);
+ throw new Error(`Selected akeru-bot@${version} runtime is missing or incomplete.`);
}
if (this.#stopping) return;
const paths = runtimePaths(this.#baseDir, version);
diff --git a/apps/server/src/sourceControl/AzureDevOpsCli.ts b/apps/server/src/sourceControl/AzureDevOpsCli.ts
index 556dc4bf2..e4274d72d 100644
--- a/apps/server/src/sourceControl/AzureDevOpsCli.ts
+++ b/apps/server/src/sourceControl/AzureDevOpsCli.ts
@@ -264,7 +264,7 @@ export class AzureDevOpsCli extends Context.Service<
readonly remoteName?: string;
}) => Effect.Effect<void, AzureDevOpsCliError>;
}
->()("t3/sourceControl/AzureDevOpsCli") {}
+>()("akeru-bot/sourceControl/AzureDevOpsCli") {}
function normalizeChangeRequestId(reference: string): string {
const trimmed = reference.trim().replace(/^#/, "");
diff --git a/apps/server/src/sourceControl/BitbucketApi.ts b/apps/server/src/sourceControl/BitbucketApi.ts
index 4573f2891..5a8966ece 100644
--- a/apps/server/src/sourceControl/BitbucketApi.ts
+++ b/apps/server/src/sourceControl/BitbucketApi.ts
@@ -384,7 +384,7 @@ export class BitbucketApi extends Context.Service<
readonly force?: boolean;
}) => Effect.Effect<void, BitbucketApiError>;
}
->()("t3/sourceControl/BitbucketApi") {}
+>()("akeru-bot/sourceControl/BitbucketApi") {}
function nonEmpty(value: string | undefined): Option.Option<string> {
const trimmed = value?.trim();
diff --git a/apps/server/src/sourceControl/GitHubCli.ts b/apps/server/src/sourceControl/GitHubCli.ts
index 974574cbd..48e865102 100644
--- a/apps/server/src/sourceControl/GitHubCli.ts
+++ b/apps/server/src/sourceControl/GitHubCli.ts
@@ -265,7 +265,7 @@ export class GitHubCli extends Context.Service<
readonly force?: boolean;
}) => Effect.Effect<void, GitHubCliError>;
}
->()("t3/sourceControl/GitHubCli") {}
+>()("akeru-bot/sourceControl/GitHubCli") {}
const RawGitHubRepositoryCloneUrlsSchema = Schema.Struct({
nameWithOwner: TrimmedNonEmptyString,
diff --git a/apps/server/src/sourceControl/GitLabCli.ts b/apps/server/src/sourceControl/GitLabCli.ts
index 9a9fc3360..7ac9e429c 100644
--- a/apps/server/src/sourceControl/GitLabCli.ts
+++ b/apps/server/src/sourceControl/GitLabCli.ts
@@ -314,7 +314,7 @@ export class GitLabCli extends Context.Service<
readonly force?: boolean;
}) => Effect.Effect<void, GitLabCliError>;
}
->()("t3/sourceControl/GitLabCli") {}
+>()("akeru-bot/sourceControl/GitLabCli") {}
const RawGitLabRepositoryCloneUrlsSchema = Schema.Struct({
path_with_namespace: TrimmedNonEmptyString,
diff --git a/apps/server/src/sourceControl/SourceControlDiscovery.ts b/apps/server/src/sourceControl/SourceControlDiscovery.ts
index 660f32283..328af304e 100644
--- a/apps/server/src/sourceControl/SourceControlDiscovery.ts
+++ b/apps/server/src/sourceControl/SourceControlDiscovery.ts
@@ -62,7 +62,7 @@ export class SourceControlDiscovery extends Context.Service<
{
readonly discover: Effect.Effect<SourceControlDiscoveryResult>;
}
->()("t3/sourceControl/SourceControlDiscovery") {}
+>()("akeru-bot/sourceControl/SourceControlDiscovery") {}
export const make = Effect.gen(function* () {
const config = yield* ServerConfig;
diff --git a/apps/server/src/sourceControl/SourceControlProvider.ts b/apps/server/src/sourceControl/SourceControlProvider.ts
index 5f93dbcaa..cb2acd7c6 100644
--- a/apps/server/src/sourceControl/SourceControlProvider.ts
+++ b/apps/server/src/sourceControl/SourceControlProvider.ts
@@ -127,4 +127,4 @@ export class SourceControlProvider extends Context.Service<
readonly force?: boolean;
}) => Effect.Effect<void, SourceControlProviderError>;
}
->()("t3/sourceControl/SourceControlProvider") {}
+>()("akeru-bot/sourceControl/SourceControlProvider") {}
diff --git a/apps/server/src/sourceControl/SourceControlProviderRegistry.ts b/apps/server/src/sourceControl/SourceControlProviderRegistry.ts
index 9fe089a41..a6ccb3d54 100644
--- a/apps/server/src/sourceControl/SourceControlProviderRegistry.ts
+++ b/apps/server/src/sourceControl/SourceControlProviderRegistry.ts
@@ -60,7 +60,7 @@ export class SourceControlProviderRegistry extends Context.Service<
>;
readonly discover: Effect.Effect<ReadonlyArray<SourceControlProviderDiscoveryItem>>;
}
->()("t3/sourceControl/SourceControlProviderRegistry") {}
+>()("akeru-bot/sourceControl/SourceControlProviderRegistry") {}
function unsupportedProvider(
kind: SourceControlProviderKind,
diff --git a/apps/server/src/sourceControl/SourceControlRateLimit.ts b/apps/server/src/sourceControl/SourceControlRateLimit.ts
index e8f7218de..4d54b13d0 100644
--- a/apps/server/src/sourceControl/SourceControlRateLimit.ts
+++ b/apps/server/src/sourceControl/SourceControlRateLimit.ts
@@ -57,7 +57,7 @@ export class SourceControlRateLimit extends Context.Service<
) => Effect.Effect<void>;
readonly recordSuccess: (input: RateLimitLease) => Effect.Effect<void>;
}
->()("t3/sourceControl/SourceControlRateLimit") {}
+>()("akeru-bot/sourceControl/SourceControlRateLimit") {}
function normalizedKey(key: RateLimitKey): string {
return `${key.provider}\0${key.host.trim().toLowerCase()}`;
diff --git a/apps/server/src/sourceControl/SourceControlRepositoryService.ts b/apps/server/src/sourceControl/SourceControlRepositoryService.ts
index 1b46369e2..86f737c48 100644
--- a/apps/server/src/sourceControl/SourceControlRepositoryService.ts
+++ b/apps/server/src/sourceControl/SourceControlRepositoryService.ts
@@ -37,7 +37,7 @@ export class SourceControlRepositoryService extends Context.Service<
input: SourceControlPublishRepositoryInput,
) => Effect.Effect<SourceControlPublishRepositoryResult, SourceControlRepositoryError>;
}
->()("t3/sourceControl/SourceControlRepositoryService") {}
+>()("akeru-bot/sourceControl/SourceControlRepositoryService") {}
function mapRepositoryError(operation: string, provider: SourceControlProviderKind) {
return Effect.mapError((cause: unknown) =>
diff --git a/apps/server/src/sourceControl/githubGraphQlBudget.ts b/apps/server/src/sourceControl/githubGraphQlBudget.ts
index 9c43de8e0..01d25a161 100644
--- a/apps/server/src/sourceControl/githubGraphQlBudget.ts
+++ b/apps/server/src/sourceControl/githubGraphQlBudget.ts
@@ -27,7 +27,7 @@ export class GitHubGraphQlBudget extends Context.Service<
) => Effect.Effect<string, SourceControlRateLimit.SourceControlRateLimitPausedError>;
readonly observe: (host: string, raw: string) => Effect.Effect<void>;
}
->()("t3/sourceControl/githubGraphQlBudget") {}
+>()("akeru-bot/sourceControl/githubGraphQlBudget") {}
function hostKey(host: string): string {
return host.trim().toLowerCase();
diff --git a/apps/server/src/telemetry/AnalyticsService.ts b/apps/server/src/telemetry/AnalyticsService.ts
index 5fdc7bdeb..ce1d6f834 100644
--- a/apps/server/src/telemetry/AnalyticsService.ts
+++ b/apps/server/src/telemetry/AnalyticsService.ts
@@ -55,7 +55,7 @@ export class AnalyticsService extends Context.Service<
/** Flush all currently queued telemetry events. */
readonly flush: Effect.Effect<void>;
}
->()("t3/telemetry/AnalyticsService") {
+>()("akeru-bot/telemetry/AnalyticsService") {
/** No-op layer for callers that intentionally disable telemetry. */
static readonly layerTest = Layer.succeed(
AnalyticsService,
diff --git a/apps/server/src/terminal/BunPtyAdapter.test.ts b/apps/server/src/terminal/BunPtyAdapter.test.ts
index e04a54e6d..f41be9312 100644
--- a/apps/server/src/terminal/BunPtyAdapter.test.ts
+++ b/apps/server/src/terminal/BunPtyAdapter.test.ts
@@ -37,7 +37,7 @@ it.effect("reports unsupported platforms with a structured startup defect", () =
platform: "win32",
});
expect(error.message).toBe(
- "Bun PTY terminal support is unavailable on win32. Please use Node.js (e.g. by running `npx t3`) instead.",
+ "Bun PTY terminal support is unavailable on win32. Please use Node.js (e.g. by running `npx akeru-bot`) instead.",
);
}
}),
diff --git a/apps/server/src/terminal/BunPtyAdapter.ts b/apps/server/src/terminal/BunPtyAdapter.ts
index 88b68940d..c821fe799 100644
--- a/apps/server/src/terminal/BunPtyAdapter.ts
+++ b/apps/server/src/terminal/BunPtyAdapter.ts
@@ -14,7 +14,7 @@ export class BunPtyUnsupportedPlatformError extends Schema.TaggedErrorClass<BunP
},
) {
override get message(): string {
- return `Bun PTY terminal support is unavailable on ${this.platform}. Please use Node.js (e.g. by running \`npx t3\`) instead.`;
+ return `Bun PTY terminal support is unavailable on ${this.platform}. Please use Node.js (e.g. by running \`npx akeru-bot\`) instead.`;
}
}
diff --git a/apps/server/src/terminal/Manager.ts b/apps/server/src/terminal/Manager.ts
index 64c2dbb91..ecb67b00b 100644
--- a/apps/server/src/terminal/Manager.ts
+++ b/apps/server/src/terminal/Manager.ts
@@ -195,7 +195,7 @@ export class TerminalManager extends Context.Service<
listener: (event: TerminalMetadataStreamEvent) => Effect.Effect<void>,
) => Effect.Effect<() => void>;
}
->()("t3/terminal/Manager/TerminalManager") {}
+>()("akeru-bot/terminal/Manager/TerminalManager") {}
interface TerminalSubprocessInspectResult {
readonly hasRunningSubprocess: boolean;
diff --git a/apps/server/src/terminal/PtyAdapter.ts b/apps/server/src/terminal/PtyAdapter.ts
index 67147035b..5fea6725b 100644
--- a/apps/server/src/terminal/PtyAdapter.ts
+++ b/apps/server/src/terminal/PtyAdapter.ts
@@ -63,4 +63,4 @@ export class PtyAdapter extends Context.Service<
*/
readonly spawn: (input: PtySpawnInput) => Effect.Effect<PtyProcess, PtySpawnError>;
}
->()("t3/terminal/PtyAdapter") {}
+>()("akeru-bot/terminal/PtyAdapter") {}
diff --git a/apps/server/src/textGeneration/TextGeneration.ts b/apps/server/src/textGeneration/TextGeneration.ts
index 66b7ccd46..3b3513899 100644
--- a/apps/server/src/textGeneration/TextGeneration.ts
+++ b/apps/server/src/textGeneration/TextGeneration.ts
@@ -114,7 +114,7 @@ export class TextGeneration extends Context.Service<
input: ThreadTitleGenerationInput,
) => Effect.Effect<ThreadTitleGenerationResult, TextGenerationError>;
}
->()("t3/textGeneration/TextGeneration") {}
+>()("akeru-bot/textGeneration/TextGeneration") {}
/** @deprecated Use `TextGeneration["Service"]`. */
export type TextGenerationShape = TextGeneration["Service"];
diff --git a/apps/server/src/usage/UsageService.ts b/apps/server/src/usage/UsageService.ts
index abfe099f9..681e7cd32 100644
--- a/apps/server/src/usage/UsageService.ts
+++ b/apps/server/src/usage/UsageService.ts
@@ -93,7 +93,7 @@ export class UsageService extends Context.Service<
{
readonly readSummary: (input: UsageSummaryInput) => Effect.Effect<UsageSummary, UsageReadError>;
}
->()("t3/usage/UsageService") {}
+>()("akeru-bot/usage/UsageService") {}
/** Empty summary, for suites that only need the RPC surface to resolve. */
export const layerTest = Layer.succeed(
diff --git a/apps/server/src/vcs/GitVcsDriver.ts b/apps/server/src/vcs/GitVcsDriver.ts
index 6cf4400c6..0c01d6e8b 100644
--- a/apps/server/src/vcs/GitVcsDriver.ts
+++ b/apps/server/src/vcs/GitVcsDriver.ts
@@ -326,7 +326,7 @@ export class GitVcsDriver extends Context.Service<
readonly initRepo: (input: VcsInitInput) => Effect.Effect<void, GitCommandError>;
readonly listLocalBranchNames: (cwd: string) => Effect.Effect<string[], GitCommandError>;
}
->()("t3/vcs/GitVcsDriver") {}
+>()("akeru-bot/vcs/GitVcsDriver") {}
const WORKSPACE_FILES_MAX_OUTPUT_BYTES = 16 * 1024 * 1024;
const GIT_CHECK_IGNORE_MAX_STDIN_BYTES = 256 * 1024;
diff --git a/apps/server/src/vcs/VcsDriver.ts b/apps/server/src/vcs/VcsDriver.ts
index f2daf7935..9cf957f22 100644
--- a/apps/server/src/vcs/VcsDriver.ts
+++ b/apps/server/src/vcs/VcsDriver.ts
@@ -77,4 +77,4 @@ export class VcsDriver extends Context.Service<
input: ReviewDiffPreviewInput,
) => Effect.Effect<ReviewDiffPreviewResult, VcsError>;
}
->()("t3/vcs/VcsDriver") {}
+>()("akeru-bot/vcs/VcsDriver") {}
diff --git a/apps/server/src/vcs/VcsDriverRegistry.ts b/apps/server/src/vcs/VcsDriverRegistry.ts
index f40e1dade..357f2a6cd 100644
--- a/apps/server/src/vcs/VcsDriverRegistry.ts
+++ b/apps/server/src/vcs/VcsDriverRegistry.ts
@@ -34,7 +34,7 @@ export class VcsDriverRegistry extends Context.Service<
) => Effect.Effect<VcsDriverHandle | null, VcsError>;
readonly resolve: (input: VcsDriverResolveInput) => Effect.Effect<VcsDriverHandle, VcsError>;
}
->()("t3/vcs/VcsDriverRegistry") {}
+>()("akeru-bot/vcs/VcsDriverRegistry") {}
function detectionCacheKey(input: {
readonly cwd: string;
diff --git a/apps/server/src/vcs/VcsProcess.ts b/apps/server/src/vcs/VcsProcess.ts
index ec245fa13..f385bf6b6 100644
--- a/apps/server/src/vcs/VcsProcess.ts
+++ b/apps/server/src/vcs/VcsProcess.ts
@@ -47,7 +47,7 @@ export class VcsProcess extends Context.Service<
{
readonly run: (input: VcsProcessInput) => Effect.Effect<VcsProcessOutput, VcsError>;
}
->()("t3/vcs/VcsProcess") {}
+>()("akeru-bot/vcs/VcsProcess") {}
const DEFAULT_TIMEOUT_MS = 30_000;
const DEFAULT_MAX_OUTPUT_BYTES = 1_000_000;
diff --git a/apps/server/src/vcs/VcsProjectConfig.ts b/apps/server/src/vcs/VcsProjectConfig.ts
index 6abce9a3e..c6706331f 100644
--- a/apps/server/src/vcs/VcsProjectConfig.ts
+++ b/apps/server/src/vcs/VcsProjectConfig.ts
@@ -48,7 +48,7 @@ export class VcsProjectConfig extends Context.Service<
input: VcsProjectConfigResolveInput,
) => Effect.Effect<VcsDriverKindType | "auto">;
}
->()("t3/vcs/VcsProjectConfig") {}
+>()("akeru-bot/vcs/VcsProjectConfig") {}
function configuredKind(config: ProjectVcsConfigFile): VcsDriverKindType | "auto" {
return config.vcs?.kind ?? config.vcsKind ?? "auto";
diff --git a/apps/server/src/vcs/VcsProvisioningService.ts b/apps/server/src/vcs/VcsProvisioningService.ts
index 9febacf22..a34ae51ed 100644
--- a/apps/server/src/vcs/VcsProvisioningService.ts
+++ b/apps/server/src/vcs/VcsProvisioningService.ts
@@ -15,7 +15,7 @@ export class VcsProvisioningService extends Context.Service<
{
readonly initRepository: (input: VcsInitInput) => Effect.Effect<void, VcsError>;
}
->()("t3/vcs/VcsProvisioningService") {}
+>()("akeru-bot/vcs/VcsProvisioningService") {}
function resolveRequestedKind(
kind: VcsDriverKind | undefined,
diff --git a/apps/server/src/vcs/VcsStatusBroadcaster.ts b/apps/server/src/vcs/VcsStatusBroadcaster.ts
index f28069f6d..0dd57cd9e 100644
--- a/apps/server/src/vcs/VcsStatusBroadcaster.ts
+++ b/apps/server/src/vcs/VcsStatusBroadcaster.ts
@@ -168,7 +168,7 @@ export class VcsStatusBroadcaster extends Context.Service<
options?: StreamStatusOptions,
) => Stream.Stream<VcsStatusStreamEvent, GitManagerServiceError>;
}
->()("t3/vcs/VcsStatusBroadcaster") {}
+>()("akeru-bot/vcs/VcsStatusBroadcaster") {}
function fingerprintStatusPart(status: unknown): string {
return JSON.stringify(status);
diff --git a/apps/server/src/voiceCall/VoiceCallManager.ts b/apps/server/src/voiceCall/VoiceCallManager.ts
index 765a6c5b7..ef3412760 100644
--- a/apps/server/src/voiceCall/VoiceCallManager.ts
+++ b/apps/server/src/voiceCall/VoiceCallManager.ts
@@ -203,7 +203,7 @@ export class VoiceCallManager extends Context.Service<
) => Effect.Effect<VoiceCallSnapshot, VoiceCallError>;
readonly hangupOwner: (ownerId: string) => Effect.Effect<void>;
}
->()("t3/voiceCall/VoiceCallManager") {}
+>()("akeru-bot/voiceCall/VoiceCallManager") {}
const make = (options?: VoiceCallManagerOptions) =>
Effect.gen(function* () {
diff --git a/apps/server/src/workspace/WorkspaceEntries.ts b/apps/server/src/workspace/WorkspaceEntries.ts
index 28a30481b..7d26caf64 100644
--- a/apps/server/src/workspace/WorkspaceEntries.ts
+++ b/apps/server/src/workspace/WorkspaceEntries.ts
@@ -101,7 +101,7 @@ export class WorkspaceEntries extends Context.Service<
) => Effect.Effect<ProjectSearchContentsResult, WorkspaceEntriesError>;
readonly refresh: (cwd: string) => Effect.Effect<void>;
}
->()("t3/workspace/WorkspaceEntries") {}
+>()("akeru-bot/workspace/WorkspaceEntries") {}
function expandHomePath(input: string, path: Path.Path): string {
if (input === "~") {
diff --git a/apps/server/src/workspace/WorkspaceFileSystem.ts b/apps/server/src/workspace/WorkspaceFileSystem.ts
index e2dc9cbbb..ac06ff4a6 100644
--- a/apps/server/src/workspace/WorkspaceFileSystem.ts
+++ b/apps/server/src/workspace/WorkspaceFileSystem.ts
@@ -124,7 +124,7 @@ export class WorkspaceFileSystem extends Context.Service<
WorkspaceFileSystemError | WorkspacePaths.WorkspacePathOutsideRootError
>;
}
->()("t3/workspace/WorkspaceFileSystem") {}
+>()("akeru-bot/workspace/WorkspaceFileSystem") {}
export const make = Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
diff --git a/apps/server/src/workspace/WorkspacePaths.ts b/apps/server/src/workspace/WorkspacePaths.ts
index 5acf6677c..cc74f1fa6 100644
--- a/apps/server/src/workspace/WorkspacePaths.ts
+++ b/apps/server/src/workspace/WorkspacePaths.ts
@@ -115,7 +115,7 @@ export class WorkspacePaths extends Context.Service<
WorkspacePathOutsideRootError
>;
}
->()("t3/workspace/WorkspacePaths") {}
+>()("akeru-bot/workspace/WorkspacePaths") {}
function toPosixRelativePath(input: string): string {
return input.replaceAll("\\", "/");
diff --git a/apps/server/src/workspace/WorkspaceSearchIndex.ts b/apps/server/src/workspace/WorkspaceSearchIndex.ts
index eeb2df342..75ee973bb 100644
--- a/apps/server/src/workspace/WorkspaceSearchIndex.ts
+++ b/apps/server/src/workspace/WorkspaceSearchIndex.ts
@@ -122,7 +122,7 @@ export class WorkspaceSearchIndex extends Context.Service<
WorkspaceSearchIndexRefreshFailed | WorkspaceSearchIndexScanTimedOut
>;
}
->()("t3/workspace/WorkspaceSearchIndex") {}
+>()("akeru-bot/workspace/WorkspaceSearchIndex") {}
function toPosixPath(input: string): string {
return input.replaceAll("\\", "/");
@@ -558,7 +558,7 @@ export const layer = (key: string) => {
};
export class WorkspaceSearchIndexMap extends LayerMap.Service<WorkspaceSearchIndexMap>()(
- "t3/workspace/WorkspaceSearchIndexMap",
+ "akeru-bot/workspace/WorkspaceSearchIndexMap",
{
lookup: layer,
idleTimeToLive: WORKSPACE_INDEX_IDLE_TTL,
diff --git a/apps/web/src/components/AppSidebarLayout.tsx b/apps/web/src/components/AppSidebarLayout.tsx
index 121e7b77a..72a750a96 100644
--- a/apps/web/src/components/AppSidebarLayout.tsx
+++ b/apps/web/src/components/AppSidebarLayout.tsx
@@ -15,6 +15,7 @@ import { cn, isMacPlatform } from "../lib/utils";
import { primaryServerKeybindingsAtom } from "../state/server";
import BotRosterSidebar from "./roster/BotRosterSidebar";
import { openSettings } from "~/settingsDialogStore";
+import { openProductFeedback } from "~/productFeedbackStore";
import {
resolveSidebarStageFocusRingOffsetClass,
useSidebarStageBackdropVariant,
@@ -193,6 +194,8 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) {
const unsubscribe = onMenuAction((action) => {
if (action === "open-settings") {
openSettings();
+ } else if (action === "open-feedback") {
+ openProductFeedback();
}
});
diff --git a/apps/web/src/components/CommandPalette.tsx b/apps/web/src/components/CommandPalette.tsx
index e026c7e60..3ee340196 100644
--- a/apps/web/src/components/CommandPalette.tsx
+++ b/apps/web/src/components/CommandPalette.tsx
@@ -40,6 +40,7 @@ import {
FolderIcon,
FolderPlusIcon,
LinkIcon,
+ MessageCircleIcon,
PaletteIcon,
PuzzleIcon,
ServerIcon,
@@ -140,6 +141,7 @@ import { ProjectFilePicker } from "./files/ProjectFilePicker";
import { ProjectContentSearchDialog } from "./search/ProjectContentSearchDialog";
import { toggleThemeEditorForTheme } from "./settings/themeEditorStore";
import { openSettings } from "~/settingsDialogStore";
+import { openProductFeedback } from "~/productFeedbackStore";
import { openPlugins } from "~/pluginsDialogStore";
import { openUsage } from "~/usageDialogStore";
import { COMMAND_PALETTE_META_ICON_CLASS, CommandPaletteMetaDot } from "./ThreadCommandSubtitle";
@@ -1444,6 +1446,17 @@ function OpenCommandPaletteDialog(props: {
},
});
+ actionItems.push({
+ kind: "action",
+ value: "action:feedback",
+ searchTerms: ["feedback", "help", "bug", "idea"],
+ title: "Send feedback",
+ icon: <MessageCircleIcon className={ITEM_ICON_CLASS} />,
+ run: async () => {
+ openProductFeedback();
+ },
+ });
+
actionItems.push({
kind: "action",
value: "action:settings",
diff --git a/apps/web/src/components/chat/ChatComposer.controls.test.tsx b/apps/web/src/components/chat/ChatComposer.controls.test.tsx
index 2236d397e..7cb624c29 100644
--- a/apps/web/src/components/chat/ChatComposer.controls.test.tsx
+++ b/apps/web/src/components/chat/ChatComposer.controls.test.tsx
@@ -1,6 +1,11 @@
-import { ApprovalRequestId, OrchestrationProposedPlanId, ThreadId } from "@t3tools/contracts";
+import {
+ AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ ApprovalRequestId,
+ OrchestrationProposedPlanId,
+ ThreadId,
+} from "@t3tools/contracts";
import { renderToStaticMarkup } from "react-dom/server";
-import { describe, expect, it, vi } from "vite-plus/test";
+import { beforeEach, describe, expect, it, vi } from "vite-plus/test";
vi.mock("../../lib/composerPathSearchState", () => ({
useComposerPathSearch: () => ({ entries: [], error: null, isPending: false }),
@@ -32,10 +37,19 @@ import {
makeChatComposerProps,
makeComposerTestThread,
} from "../../test/chatComposerProps";
-import { ChatComposer } from "./ChatComposer";
+import { EMPTY_PRODUCT_FEEDBACK_DRAFT, useProductFeedbackStore } from "../../productFeedbackStore";
+import { ChatComposer, respondToComposerApproval } from "./ChatComposer";
const environmentId = composerTestEnvironmentId;
+beforeEach(() => {
+ useProductFeedbackStore.setState({
+ open: false,
+ picking: false,
+ draft: EMPTY_PRODUCT_FEEDBACK_DRAFT,
+ });
+});
+
/** Launch controls LEO-215 removes from the primary composer. */
function expectNoLaunchControls(markup: string) {
// Model picker trigger (the trigger label rendered the model name). The
@@ -201,3 +215,55 @@ describe("ChatComposer launch-control removal", () => {
expectNoLaunchControls(markup);
});
});
+
+describe("ChatComposer product feedback approval", () => {
+ it("opens a valid draft and accepts without sending feedback", async () => {
+ const requestId = ApprovalRequestId.make("feedback-approval");
+ const respond = vi.fn(async () => undefined);
+ const fetch = vi.fn();
+ vi.stubGlobal("fetch", fetch);
+
+ await respondToComposerApproval(
+ {
+ requestId,
+ requestKind: "command",
+ createdAt: "2026-08-30T00:00:00.000Z",
+ toolName: AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ args: { feedback: "The action was unclear." },
+ },
+ requestId,
+ "accept",
+ respond,
+ );
+
+ expect(useProductFeedbackStore.getState()).toMatchObject({
+ open: true,
+ draft: { feedback: "The action was unclear." },
+ });
+ expect(respond).toHaveBeenCalledOnce();
+ expect(respond).toHaveBeenCalledWith(requestId, "accept");
+ expect(fetch).not.toHaveBeenCalled();
+ });
+
+ it("declines invalid feedback arguments without opening a draft", async () => {
+ const requestId = ApprovalRequestId.make("invalid-feedback-approval");
+ const respond = vi.fn(async () => undefined);
+
+ await respondToComposerApproval(
+ {
+ requestId,
+ requestKind: "command",
+ createdAt: "2026-08-30T00:00:00.000Z",
+ toolName: AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
+ args: { feedback: "x".repeat(5_000) },
+ },
+ requestId,
+ "accept",
+ respond,
+ );
+
+ expect(useProductFeedbackStore.getState().open).toBe(false);
+ expect(respond).toHaveBeenCalledOnce();
+ expect(respond).toHaveBeenCalledWith(requestId, "decline");
+ });
+});
diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx
index a77e5af46..5df077219 100644
--- a/apps/web/src/components/chat/ChatComposer.tsx
+++ b/apps/web/src/components/chat/ChatComposer.tsx
@@ -11,6 +11,7 @@ import type {
TurnId,
} from "@t3tools/contracts";
import {
+ AKERU_PRODUCT_FEEDBACK_TOOL_NAME,
isProviderSendTurnSupportedImageMimeType,
ProviderDriverKind,
ProviderInstanceId,
@@ -240,6 +241,7 @@ import {
type ProviderInstanceEntry,
} from "../../providerInstances";
import { type AppModelOption, getAppModelOptionsForInstance } from "../../modelSelection";
+import { openProductFeedbackFromToolArgs } from "../../productFeedbackStore";
import type { UnifiedSettings } from "@t3tools/contracts/settings";
import type { SessionPhase, Thread } from "../../types";
import type { PendingUserInputDraftAnswer } from "../../pendingUserInput";
@@ -263,6 +265,23 @@ const COMPOSER_FLOATING_LAYER_SELECTOR = [
'[data-slot="autocomplete-popup"]',
].join(",");
+export function respondToComposerApproval(
+ approval: PendingApproval | null,
+ requestId: ApprovalRequestId,
+ decision: ProviderApprovalDecision,
+ respond: ChatComposerProps["onRespondToApproval"],
+): Promise<unknown> {
+ if (
+ approval?.requestId === requestId &&
+ approval.toolName === AKERU_PRODUCT_FEEDBACK_TOOL_NAME &&
+ decision === "accept" &&
+ !openProductFeedbackFromToolArgs(approval.args)
+ ) {
+ return respond(requestId, "decline");
+ }
+ return respond(requestId, decision);
+}
+
const extendReplacementRangeForTrailingSpace = (
text: string,
rangeEnd: number,
@@ -1061,6 +1080,11 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
);
const isComposerApprovalState = activePendingApproval !== null;
+ const respondToApproval = useCallback(
+ (requestId: ApprovalRequestId, decision: ProviderApprovalDecision) =>
+ respondToComposerApproval(activePendingApproval, requestId, decision, onRespondToApproval),
+ [activePendingApproval, onRespondToApproval],
+ );
const activePendingUserInput = pendingUserInputs[0] ?? null;
const showComposerTopDrawer =
isComposerApprovalState ||
@@ -2743,7 +2767,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
requestId={activePendingApproval.requestId}
isResponding={respondingRequestIds.includes(activePendingApproval.requestId)}
options={activePendingApproval.options}
- onRespondToApproval={onRespondToApproval}
+ onRespondToApproval={respondToApproval}
/>
</div>
</div>
@@ -2773,7 +2797,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
requestId={activePendingApproval.requestId}
isResponding={respondingRequestIds.includes(activePendingApproval.requestId)}
options={activePendingApproval.options}
- onRespondToApproval={onRespondToApproval}
+ onRespondToApproval={respondToApproval}
/>
</div>
</div>
diff --git a/apps/web/src/components/chat/ComposerPendingApprovalPanel.tsx b/apps/web/src/components/chat/ComposerPendingApprovalPanel.tsx
index 5c6aedb04..61a872c9a 100644
--- a/apps/web/src/components/chat/ComposerPendingApprovalPanel.tsx
+++ b/apps/web/src/components/chat/ComposerPendingApprovalPanel.tsx
@@ -1,4 +1,5 @@
import { memo } from "react";
+import { AKERU_PRODUCT_FEEDBACK_TOOL_NAME } from "@t3tools/contracts";
import { type PendingApproval } from "../../session-logic";
import { cn } from "~/lib/utils";
@@ -13,16 +14,19 @@ export const ComposerPendingApprovalPanel = memo(function ComposerPendingApprova
pendingCount,
className,
}: ComposerPendingApprovalPanelProps) {
- const fallbackLabel =
- approval.requestKind === "mcp-elicitation"
+ const isProductFeedback = approval.toolName === AKERU_PRODUCT_FEEDBACK_TOOL_NAME;
+ const fallbackLabel = isProductFeedback
+ ? "Product feedback approval"
+ : approval.requestKind === "mcp-elicitation"
? "App access approval"
: approval.requestKind === "command"
? "Command approval"
: approval.requestKind === "file-read"
? "File read approval"
: "File change approval";
- const detailAriaLabel =
- approval.requestKind === "mcp-elicitation"
+ const detailAriaLabel = isProductFeedback
+ ? "Product feedback draft"
+ : approval.requestKind === "mcp-elicitation"
? "App access request"
: approval.requestKind === "command"
? "Command"
diff --git a/apps/web/src/components/productFeedback/ProductFeedbackDialog.tsx b/apps/web/src/components/productFeedback/ProductFeedbackDialog.tsx
new file mode 100644
index 000000000..5b5ede1bc
--- /dev/null
+++ b/apps/web/src/components/productFeedback/ProductFeedbackDialog.tsx
@@ -0,0 +1,251 @@
+import { PRODUCT_FEEDBACK_TEXT_MAX_CHARS } from "@t3tools/contracts";
+import { useEffect, useMemo, useRef, useState, type FormEvent } from "react";
+
+import { usePrimarySettings } from "../../hooks/useSettings";
+import { startProductFeedbackElementPicker } from "../../productFeedbackPicker";
+import {
+ buildProductFeedbackSubmission,
+ shouldRefreshProductFeedbackChallenge,
+ submitProductFeedback,
+} from "../../productFeedbackSubmission";
+import { useProductFeedbackStore } from "../../productFeedbackStore";
+import { Button } from "../ui/button";
+import {
+ Dialog,
+ DialogFooter,
+ DialogHeader,
+ DialogPanel,
+ DialogPopup,
+ DialogTitle,
+} from "../ui/dialog";
+import { Label } from "../ui/label";
+import { Textarea } from "../ui/textarea";
+
+interface TurnstileApi {
+ readonly render: (
+ container: HTMLElement,
+ options: { readonly sitekey: string; readonly callback: (token: string) => void },
+ ) => string;
+ readonly remove: (widgetId: string) => void;
+}
+
+declare global {
+ interface Window {
+ turnstile?: TurnstileApi;
+ }
+}
+
+function TurnstileChallenge({
+ siteKey,
+ onToken,
+}: {
+ readonly siteKey: string;
+ readonly onToken: (token: string) => void;
+}) {
+ const containerRef = useRef<HTMLDivElement>(null);
+ useEffect(() => {
+ let widgetId: string | null = null;
+ let cancelled = false;
+ const render = () => {
+ if (cancelled || !containerRef.current || !window.turnstile) return;
+ widgetId = window.turnstile.render(containerRef.current, {
+ sitekey: siteKey,
+ callback: onToken,
+ });
+ };
+ const existing = document.querySelector<HTMLScriptElement>("script[data-akeru-turnstile]");
+ if (existing) {
+ if (window.turnstile) render();
+ else existing.addEventListener("load", render, { once: true });
+ } else {
+ const script = document.createElement("script");
+ script.src = "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit";
+ script.async = true;
+ script.defer = true;
+ script.dataset.akeruTurnstile = "true";
+ script.addEventListener("load", render, { once: true });
+ document.head.append(script);
+ }
+ return () => {
+ cancelled = true;
+ if (widgetId && window.turnstile) window.turnstile.remove(widgetId);
+ };
+ }, [onToken, siteKey]);
+ return <div ref={containerRef} aria-label="Verification challenge" />;
+}
+
+export function ProductFeedbackDialog() {
+ const settings = usePrimarySettings();
+ const open = useProductFeedbackStore((state) => state.open);
+ const picking = useProductFeedbackStore((state) => state.picking);
+ const draft = useProductFeedbackStore((state) => state.draft);
+ const closeFeedback = useProductFeedbackStore((state) => state.closeFeedback);
+ const startPicking = useProductFeedbackStore((state) => state.startPicking);
+ const stopPicking = useProductFeedbackStore((state) => state.stopPicking);
+ const updateDraft = useProductFeedbackStore((state) => state.updateDraft);
+ const clearDraft = useProductFeedbackStore((state) => state.clearDraft);
+ const [submitting, setSubmitting] = useState(false);
+ const [website, setWebsite] = useState("");
+ const [status, setStatus] = useState<
+ | { readonly kind: "idle" }
+ | { readonly kind: "success"; readonly feedbackId: string }
+ | { readonly kind: "failure"; readonly message: string }
+ >({ kind: "idle" });
+ const [challengeSiteKey, setChallengeSiteKey] = useState<string | null>(null);
+ const [challengeAttempt, setChallengeAttempt] = useState(0);
+ const [turnstileToken, setTurnstileToken] = useState<string | undefined>();
+
+ useEffect(() => {
+ if (open) setStatus({ kind: "idle" });
+ }, [open]);
+
+ useEffect(() => {
+ if (!picking) return;
+ const session = startProductFeedbackElementPicker({
+ onPick: (element) => stopPicking(element),
+ onCancel: () => stopPicking(),
+ });
+ return session.stop;
+ }, [picking, stopPicking]);
+
+ const payload = useMemo(
+ () =>
+ buildProductFeedbackSubmission({
+ draft,
+ website,
+ ...(turnstileToken ? { turnstileToken } : {}),
+ }),
+ [draft, turnstileToken, website],
+ );
+ const canSend =
+ settings.productFeedbackEnabled && draft.feedback.trim().length > 0 && !submitting;
+
+ const handleClose = () => {
+ closeFeedback();
+ setWebsite("");
+ setChallengeSiteKey(null);
+ setTurnstileToken(undefined);
+ };
+
+ const handleSubmit = async (event: FormEvent) => {
+ event.preventDefault();
+ if (!canSend) return;
+ setSubmitting(true);
+ setStatus({ kind: "idle" });
+ const result = await submitProductFeedback(settings.productFeedbackEndpoint, payload);
+ setSubmitting(false);
+ if (result.ok) {
+ setStatus({ kind: "success", feedbackId: result.receipt.feedbackId });
+ clearDraft();
+ setWebsite("");
+ setChallengeSiteKey(null);
+ setTurnstileToken(undefined);
+ return;
+ }
+ setStatus({ kind: "failure", message: result.rejection.message });
+ if (shouldRefreshProductFeedbackChallenge(payload, result)) {
+ setTurnstileToken(undefined);
+ setChallengeAttempt((attempt) => attempt + 1);
+ }
+ if (result.rejection.reason === "challenge_required" && result.rejection.challengeSiteKey) {
+ setChallengeSiteKey(result.rejection.challengeSiteKey);
+ }
+ };
+
+ return (
+ <Dialog open={open} onOpenChange={(nextOpen) => !nextOpen && handleClose()}>
+ <DialogPopup
+ className="flex max-h-[min(36rem,90dvh)] max-w-lg flex-col overflow-hidden"
+ data-akeru-feedback-ui="composer"
+ >
+ <form className="flex min-h-0 flex-1 flex-col" onSubmit={handleSubmit}>
+ <DialogHeader className="shrink-0">
+ <DialogTitle>Send feedback</DialogTitle>
+ </DialogHeader>
+
+ <DialogPanel className="space-y-3 px-5 py-4">
+ <div className="space-y-1.5">
+ <Label htmlFor="product-feedback-text">Feedback</Label>
+ <Textarea
+ autoFocus
+ className="min-h-52"
+ id="product-feedback-text"
+ maxLength={PRODUCT_FEEDBACK_TEXT_MAX_CHARS}
+ placeholder="What happened?"
+ value={draft.feedback}
+ onChange={(event) => updateDraft({ feedback: event.currentTarget.value })}
+ />
+ </div>
+ {draft.element ? (
+ <div className="flex min-w-0 items-center gap-1 rounded-md border border-border px-2 py-1 text-xs">
+ <span className="min-w-0 flex-1 truncate">
+ {draft.element.label ?? draft.element.selector}
+ </span>
+ <Button
+ aria-label="Remove selected element"
+ size="micro"
+ type="button"
+ variant="ghost-muted"
+ onClick={() => updateDraft({ element: null })}
+ >
+ Remove
+ </Button>
+ </div>
+ ) : null}
+ <input
+ aria-hidden="true"
+ autoComplete="off"
+ name="website"
+ tabIndex={-1}
+ className="absolute -left-[10000px] size-px opacity-0"
+ value={website}
+ onChange={(event) => setWebsite(event.currentTarget.value)}
+ />
+
+ {challengeSiteKey ? (
+ <TurnstileChallenge
+ key={challengeAttempt}
+ siteKey={challengeSiteKey}
+ onToken={setTurnstileToken}
+ />
+ ) : null}
+
+ {status.kind === "failure" ? (
+ <p role="alert" className="text-sm text-destructive-foreground">
+ {status.message}
+ </p>
+ ) : status.kind === "success" ? (
+ <p role="status" className="text-sm text-foreground">
+ Feedback sent. ID: <code>{status.feedbackId}</code>
+ </p>
+ ) : null}
+ {!settings.productFeedbackEnabled ? (
+ <p role="status" className="text-sm text-muted-foreground">
+ Product feedback is disabled in Settings.
+ </p>
+ ) : null}
+ </DialogPanel>
+
+ <DialogFooter className="shrink-0">
+ <div className="grid w-full grid-cols-2 gap-2 min-[360px]:grid-cols-[1fr_auto_auto]">
+ <Button
+ className="col-span-2 min-[360px]:col-span-1 min-[360px]:mr-auto"
+ type="button"
+ variant="outline"
+ onClick={startPicking}
+ >
+ Choose an element
+ </Button>
+ <Button type="button" variant="ghost-muted" onClick={handleClose}>
+ Cancel
+ </Button>
+ <Button disabled={!canSend} type="submit">
+ {submitting ? "Sending..." : "Send"}
+ </Button>
+ </div>
+ </DialogFooter>
+ </form>
+ </DialogPopup>
+ </Dialog>
+ );
+}
diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsx
index 194ab50d1..33e83060f 100644
--- a/apps/web/src/components/settings/SettingsPanels.tsx
+++ b/apps/web/src/components/settings/SettingsPanels.tsx
@@ -33,11 +33,13 @@ import {
MIN_PROMPT_FONT_SIZE,
MIN_SIDEBAR_AUTO_SETTLE_AFTER_DAYS,
MIN_TERMINAL_FONT_SIZE,
+ ProductFeedbackEndpoint,
} from "@t3tools/contracts/settings";
import { resolveServerBackgroundActivitySettings } from "@t3tools/shared/backgroundActivitySettings";
import { createModelSelection } from "@t3tools/shared/model";
import * as Duration from "effect/Duration";
import * as Equal from "effect/Equal";
+import * as Exit from "effect/Exit";
import * as Schema from "effect/Schema";
import { APP_VERSION, HOSTED_APP_CHANNEL, HOSTED_APP_CHANNEL_LABEL } from "../../branding";
import {
@@ -55,6 +57,7 @@ import {
} from "../SidebarStageBackdrop";
import { isElectron } from "../../env";
import { openSettings } from "../../settingsDialogStore";
+import { openProductFeedback } from "../../productFeedbackStore";
import { buildHostedChannelSelectionUrl, type HostedAppChannel } from "../../hostedPairing";
import { useCustomThemes } from "../../hooks/useCustomThemes";
import {
@@ -2522,6 +2525,57 @@ export function GeneralSettingsPanel() {
description="Current version of the application."
/>
)}
+ <SettingsRow
+ title="Product feedback"
+ control={
+ <Switch
+ aria-label="Product feedback"
+ checked={settings.productFeedbackEnabled}
+ onCheckedChange={(productFeedbackEnabled) =>
+ updateSettings({ productFeedbackEnabled })
+ }
+ />
+ }
+ />
+ <SettingsRow
+ title="Feedback endpoint"
+ control={
+ <Input
+ aria-label="Feedback endpoint"
+ className="w-full sm:w-80"
+ defaultValue={settings.productFeedbackEndpoint}
+ key={settings.productFeedbackEndpoint}
+ onBlur={(event) => {
+ const decoded = Schema.decodeUnknownExit(ProductFeedbackEndpoint)(
+ event.currentTarget.value,
+ );
+ if (Exit.isFailure(decoded)) {
+ event.currentTarget.value = settings.productFeedbackEndpoint;
+ toastManager.add({
+ type: "error",
+ title: "Use HTTPS or loopback HTTP.",
+ });
+ return;
+ }
+ const productFeedbackEndpoint = decoded.value;
+ if (
+ productFeedbackEndpoint &&
+ productFeedbackEndpoint !== settings.productFeedbackEndpoint
+ ) {
+ updateSettings({ productFeedbackEndpoint });
+ }
+ }}
+ />
+ }
+ />
+ <SettingsRow
+ title="Send feedback"
+ control={
+ <Button size="xs" variant="outline" onClick={() => openProductFeedback()}>
+ Send feedback
+ </Button>
+ }
+ />
<SettingsRow
{...searchableSetting("diagnostics")}
description={diagnosticsDescription}
diff --git a/apps/web/src/components/sidebar/SidebarChrome.tsx b/apps/web/src/components/sidebar/SidebarChrome.tsx
index a7562673f..1b2e00726 100644
--- a/apps/web/src/components/sidebar/SidebarChrome.tsx
+++ b/apps/web/src/components/sidebar/SidebarChrome.tsx
@@ -1,5 +1,10 @@
import { useAtomValue } from "@effect/atom-react";
-import { Analytics01Icon, PlugSocketIcon, Settings02Icon } from "@hugeicons/core-free-icons";
+import {
+ Analytics01Icon,
+ HelpCircleIcon,
+ PlugSocketIcon,
+ Settings02Icon,
+} from "@hugeicons/core-free-icons";
import type { EnvironmentId } from "@t3tools/contracts";
import { Link } from "@tanstack/react-router";
import type { ReactNode } from "react";
@@ -10,6 +15,7 @@ import { useEnvironmentIdentificationMode } from "../../hooks/useSettings";
import { openSettings } from "../../settingsDialogStore";
import { openPlugins } from "../../pluginsDialogStore";
import { openUsage } from "../../usageDialogStore";
+import { openProductFeedback } from "../../productFeedbackStore";
import { usePrimaryEnvironmentId } from "../../state/environments";
import { environmentMcpServersAtom } from "../../state/mcpServers";
import { AkeruMark } from "../AkeruMark";
@@ -244,6 +250,10 @@ export const SidebarChromeFooter = memo(function SidebarChromeFooter() {
closeMobileSidebar();
openUsage();
}, [closeMobileSidebar]);
+ const handleFeedbackClick = useCallback(() => {
+ closeMobileSidebar();
+ openProductFeedback();
+ }, [closeMobileSidebar]);
return (
<SidebarFooter className="max-h-[min(45dvh,22rem)] shrink-0 overflow-y-auto overscroll-contain p-[var(--sidebar-content-inset)]">
@@ -264,6 +274,11 @@ export const SidebarChromeFooter = memo(function SidebarChromeFooter() {
label="Settings"
onClick={handleSettingsClick}
/>
+ <SidebarUtilityItem
+ icon={<AppIcon className="size-4" icon={HelpCircleIcon} />}
+ label="Feedback"
+ onClick={handleFeedbackClick}
+ />
<SidebarUtilityItem
icon={<AppIcon className="size-4" icon={Analytics01Icon} />}
label="Usage"
diff --git a/apps/web/src/productFeedbackPicker.test.ts b/apps/web/src/productFeedbackPicker.test.ts
new file mode 100644
index 000000000..8ae77ff56
--- /dev/null
+++ b/apps/web/src/productFeedbackPicker.test.ts
@@ -0,0 +1,227 @@
+import { beforeEach, describe, expect, it, vi } from "vite-plus/test";
+
+import {
+ productFeedbackElementDescriptor,
+ startProductFeedbackElementPicker,
+} from "./productFeedbackPicker";
+
+class TestElement {
+ readonly attributes = new Map<string, string>();
+ readonly children: TestElement[] = [];
+ readonly dataset: Record<string, string> = {};
+ readonly style: Record<string, string> = {};
+ parentElement: TestElement | null = null;
+ textContent: string | null = null;
+ ownerDocument: TestDocument | null = null;
+ private readonly listeners = new Map<string, Set<() => void>>();
+
+ constructor(readonly tagName: string) {}
+
+ append(...children: TestElement[]) {
+ for (const child of children) {
+ child.parentElement = this;
+ this.children.push(child);
+ }
+ }
+
+ remove() {
+ if (!this.parentElement) return;
+ const index = this.parentElement.children.indexOf(this);
+ if (index >= 0) this.parentElement.children.splice(index, 1);
+ this.parentElement = null;
+ }
+
+ getAttribute(name: string) {
+ if (name === "data-component") return this.dataset.component ?? null;
+ if (name === "data-source") return this.dataset.source ?? null;
+ if (name === "data-feedback-target") return this.dataset.feedbackTarget ?? null;
+ return this.attributes.get(name) ?? null;
+ }
+
+ setAttribute(name: string, value: string) {
+ this.attributes.set(name, value);
+ }
+
+ focus() {
+ if (this.ownerDocument) this.ownerDocument.activeElement = this;
+ }
+
+ addEventListener(type: string, listener: () => void) {
+ const listeners = this.listeners.get(type) ?? new Set();
+ listeners.add(listener);
+ this.listeners.set(type, listeners);
+ }
+
+ hasAttribute(name: string) {
+ return this.getAttribute(name) !== null;
+ }
+
+ closest(selector: string): TestElement | null {
+ let current: TestElement | null = this;
+ while (current) {
+ if (selector === "[data-component]" && current.dataset.component) return current;
+ if (
+ selector === "[data-akeru-feedback-ui]" &&
+ current.dataset.akeruFeedbackUi !== undefined
+ ) {
+ return current;
+ }
+ if (
+ selector === "button, a, [role], [data-feedback-target], [data-component]" &&
+ (current.tagName === "BUTTON" ||
+ current.tagName === "A" ||
+ current.attributes.has("role") ||
+ current.dataset.feedbackTarget !== undefined ||
+ current.dataset.component !== undefined)
+ ) {
+ return current;
+ }
+ if (
+ selector.includes(",") &&
+ (["INPUT", "TEXTAREA", "SELECT", "OPTION"].includes(current.tagName) ||
+ current.attributes.has("contenteditable") ||
+ current.dataset.akeruFeedbackUi !== undefined ||
+ current.dataset.feedbackPrivate !== undefined ||
+ current.dataset.sensitive !== undefined)
+ ) {
+ return current;
+ }
+ current = current.parentElement;
+ }
+ return null;
+ }
+
+ getBoundingClientRect() {
+ return { left: 10, top: 20, width: 100, height: 30 } as DOMRect;
+ }
+}
+
+class TestDocument {
+ readonly documentElement = new TestElement("HTML");
+ readonly body = new TestElement("BODY");
+ private readonly listeners = new Map<string, Set<(event: never) => void>>();
+ activeElement: TestElement | null = null;
+
+ constructor() {
+ this.documentElement.append(this.body);
+ }
+
+ createElement(tagName: string) {
+ const element = new TestElement(tagName.toUpperCase());
+ element.ownerDocument = this;
+ return element;
+ }
+
+ addEventListener(type: string, listener: (event: never) => void) {
+ const listeners = this.listeners.get(type) ?? new Set();
+ listeners.add(listener);
+ this.listeners.set(type, listeners);
+ }
+
+ removeEventListener(type: string, listener: (event: never) => void) {
+ this.listeners.get(type)?.delete(listener);
+ }
+
+ emit(type: string, event: Record<string, unknown>) {
+ for (const listener of this.listeners.get(type) ?? []) listener(event as never);
+ }
+
+ querySelector() {
+ return this.body.children.find((child) => child.dataset.akeruFeedbackUi !== undefined) ?? null;
+ }
+}
+
+let testDocument: TestDocument;
+
+beforeEach(() => {
+ testDocument = new TestDocument();
+ vi.stubGlobal("Element", TestElement);
+ vi.stubGlobal("HTMLElement", TestElement);
+ vi.stubGlobal("document", testDocument);
+ vi.stubGlobal("window", {
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
+ });
+});
+
+describe("product feedback element picker", () => {
+ it("selects a privacy-safe descriptor and cleans up", () => {
+ const button = testDocument.createElement("button");
+ button.dataset.component = "ComposerSendButton";
+ button.dataset.source = "chat.composer";
+ button.textContent = "Send";
+ testDocument.body.append(button);
+ const onPick = vi.fn();
+ const session = startProductFeedbackElementPicker({ onPick, onCancel: vi.fn() });
+
+ testDocument.emit("click", {
+ target: button,
+ preventDefault: vi.fn(),
+ stopImmediatePropagation: vi.fn(),
+ });
+
+ expect(onPick).toHaveBeenCalledWith({
+ selector: 'button[data-component="ComposerSendButton"]',
+ component: "ComposerSendButton",
+ source: "chat.composer",
+ role: "button",
+ label: "Send",
+ });
+ session.stop();
+ expect(testDocument.querySelector()).toBeNull();
+ });
+
+ it("cancels on Escape", () => {
+ const onCancel = vi.fn();
+ startProductFeedbackElementPicker({ onPick: vi.fn(), onCancel });
+ testDocument.emit("keydown", {
+ key: "Escape",
+ preventDefault: vi.fn(),
+ stopImmediatePropagation: vi.fn(),
+ });
+ expect(onCancel).toHaveBeenCalledOnce();
+ });
+
+ it("promotes nested labels and builds a valid native button selector", () => {
+ const button = testDocument.createElement("button");
+ const label = testDocument.createElement("span");
+ label.textContent = "Send";
+ button.textContent = "Send";
+ button.append(label);
+ testDocument.body.append(button);
+ const onPick = vi.fn();
+ startProductFeedbackElementPicker({ onPick, onCancel: vi.fn() });
+
+ testDocument.emit("click", {
+ target: label,
+ preventDefault: vi.fn(),
+ stopImmediatePropagation: vi.fn(),
+ });
+
+ expect(onPick).toHaveBeenCalledWith(
+ expect.objectContaining({
+ selector: "body:nth-of-type(1) > button:nth-of-type(1)",
+ role: "button",
+ }),
+ );
+ });
+
+ it("never captures form values, private UI, tokens, or paths", () => {
+ const input = testDocument.createElement("input");
+ expect(productFeedbackElementDescriptor(input as unknown as Element)).toBeNull();
+
+ const privateNode = testDocument.createElement("button");
+ privateNode.dataset.feedbackPrivate = "true";
+ privateNode.textContent = "Private";
+ expect(productFeedbackElementDescriptor(privateNode as unknown as Element)).toBeNull();
+
+ const button = testDocument.createElement("button");
+ button.textContent =
+ "Open sk_abcdefghijklmnopqrstuvwxyz /Users/alice/private/file.ts https://private.example/path";
+ const descriptor = productFeedbackElementDescriptor(button as unknown as Element);
+ expect(descriptor?.label).toContain("[redacted]");
+ expect(descriptor?.label).toContain("[path]");
+ expect(descriptor?.label).toContain("[url]");
+ expect(JSON.stringify(descriptor)).not.toContain("alice");
+ });
+});
diff --git a/apps/web/src/productFeedbackPicker.ts b/apps/web/src/productFeedbackPicker.ts
new file mode 100644
index 000000000..0a6cb472f
--- /dev/null
+++ b/apps/web/src/productFeedbackPicker.ts
@@ -0,0 +1,276 @@
+import {
+ PRODUCT_FEEDBACK_ELEMENT_LABEL_MAX_CHARS,
+ type ProductFeedbackElement,
+} from "@t3tools/contracts";
+
+const EXCLUDED_SELECTOR = [
+ "input",
+ "textarea",
+ "select",
+ "option",
+ "[contenteditable]",
+ "[data-akeru-feedback-ui]",
+ "[data-feedback-private]",
+ "[data-sensitive]",
+ "[aria-label*='password' i]",
+ "[aria-label*='secret' i]",
+ "[aria-label*='token' i]",
+].join(",");
+
+const SAFE_NAME_PATTERN = /^[a-z0-9_.:-]{1,128}$/i;
+const TOKEN_PATTERN = /(?:[a-z0-9_-]{24,}|(?:sk|pk)_[a-z0-9_-]+)/gi;
+const URL_PATTERN = /https?:\/\/[^\s]+/gi;
+const PATH_PATTERN = /(?:[a-z]:\\|\/)[^\s]+/gi;
+
+function safeName(value: string | null): string | undefined {
+ const trimmed = value?.trim();
+ return trimmed && SAFE_NAME_PATTERN.test(trimmed) ? trimmed : undefined;
+}
+
+function safeLabel(element: Element): string | undefined {
+ const explicit = element.getAttribute("aria-label") ?? element.getAttribute("title");
+ const tagName = element.tagName.toLowerCase();
+ const fallback = tagName === "button" || tagName === "a" ? element.textContent : null;
+ const normalized = (explicit ?? fallback ?? "")
+ .replace(TOKEN_PATTERN, "[redacted]")
+ .replace(URL_PATTERN, "[url]")
+ .replace(PATH_PATTERN, "[path]")
+ .replace(/\s+/g, " ")
+ .trim()
+ .slice(0, PRODUCT_FEEDBACK_ELEMENT_LABEL_MAX_CHARS);
+ return normalized || undefined;
+}
+
+function elementRole(element: Element): string | undefined {
+ const explicit = safeName(element.getAttribute("role"));
+ if (explicit) return explicit;
+ switch (element.tagName.toLowerCase()) {
+ case "a":
+ return "link";
+ case "button":
+ return "button";
+ case "nav":
+ return "navigation";
+ case "main":
+ return "main";
+ default:
+ return undefined;
+ }
+}
+
+function selectorSegment(element: Element): string {
+ const component = safeName(element.getAttribute("data-component"));
+ const target = safeName(element.getAttribute("data-feedback-target"));
+ if (target) return `${element.tagName.toLowerCase()}[data-feedback-target="${target}"]`;
+ if (component) return `${element.tagName.toLowerCase()}[data-component="${component}"]`;
+ const explicitRole = safeName(element.getAttribute("role"));
+ if (explicitRole) return `${element.tagName.toLowerCase()}[role="${explicitRole}"]`;
+ const parent = element.parentElement;
+ if (!parent) return element.tagName.toLowerCase();
+ const sameTag = Array.from(parent.children).filter((child) => child.tagName === element.tagName);
+ const position = sameTag.indexOf(element) + 1;
+ return `${element.tagName.toLowerCase()}:nth-of-type(${Math.max(1, position)})`;
+}
+
+function stableSelector(element: Element): string {
+ const segments: string[] = [];
+ let current: Element | null = element;
+ while (current && current !== document.documentElement && segments.length < 4) {
+ segments.unshift(selectorSegment(current));
+ if (current.hasAttribute("data-feedback-target") || current.hasAttribute("data-component")) {
+ break;
+ }
+ current = current.parentElement;
+ }
+ return segments.join(" > ").slice(0, 256);
+}
+
+export function isProductFeedbackPickable(element: Element): boolean {
+ return element.closest(EXCLUDED_SELECTOR) === null;
+}
+
+export function productFeedbackElementDescriptor(element: Element): ProductFeedbackElement | null {
+ if (!isProductFeedbackPickable(element)) return null;
+ if (element === document.body || element === document.documentElement) return null;
+ const rect = element.getBoundingClientRect();
+ if (rect.width <= 0 || rect.height <= 0) return null;
+ const owner = element.closest("[data-component]");
+ const component = safeName(owner?.getAttribute("data-component") ?? null);
+ const source = safeName(owner?.getAttribute("data-source") ?? null);
+ const role = elementRole(element);
+ const label = safeLabel(element);
+ return {
+ selector: stableSelector(element),
+ ...(component ? { component } : {}),
+ ...(source ? { source } : {}),
+ ...(role ? { role } : {}),
+ ...(label ? { label } : {}),
+ };
+}
+
+export interface ProductFeedbackPickerSession {
+ readonly stop: () => void;
+}
+
+export function startProductFeedbackElementPicker(input: {
+ readonly onPick: (element: ProductFeedbackElement) => void;
+ readonly onCancel: () => void;
+}): ProductFeedbackPickerSession {
+ const outline = document.createElement("div");
+ const label = document.createElement("div");
+ const instructions = document.createElement("div");
+ const instructionText = document.createElement("span");
+ const cancelButton = document.createElement("button");
+ const previousFocus =
+ document.activeElement instanceof HTMLElement ? document.activeElement : null;
+ outline.dataset.akeruFeedbackUi = "picker-outline";
+ label.dataset.akeruFeedbackUi = "picker-label";
+ instructions.dataset.akeruFeedbackUi = "picker-instructions";
+ outline.setAttribute("aria-hidden", "true");
+ label.setAttribute("aria-hidden", "true");
+ Object.assign(outline.style, {
+ position: "fixed",
+ pointerEvents: "none",
+ zIndex: "2147483646",
+ border: "2px solid var(--primary)",
+ background: "color-mix(in srgb, var(--primary) 10%, transparent)",
+ display: "none",
+ });
+ Object.assign(label.style, {
+ position: "fixed",
+ pointerEvents: "none",
+ zIndex: "2147483647",
+ borderRadius: "4px",
+ padding: "3px 6px",
+ background: "var(--primary)",
+ color: "var(--primary-foreground)",
+ font: "12px system-ui, sans-serif",
+ display: "none",
+ });
+ Object.assign(instructions.style, {
+ position: "fixed",
+ zIndex: "2147483647",
+ left: "50%",
+ bottom: "20px",
+ transform: "translateX(-50%)",
+ display: "flex",
+ alignItems: "center",
+ gap: "12px",
+ maxWidth: "calc(100vw - 24px)",
+ border: "1px solid var(--border)",
+ borderRadius: "10px",
+ padding: "8px 10px 8px 12px",
+ background: "var(--popover)",
+ color: "var(--popover-foreground)",
+ boxShadow: "0 8px 30px rgba(0,0,0,0.2)",
+ font: "13px system-ui, sans-serif",
+ });
+ instructionText.textContent = "Choose an element. Press Escape to cancel.";
+ instructions.setAttribute("role", "status");
+ instructions.setAttribute("aria-live", "polite");
+ cancelButton.type = "button";
+ cancelButton.textContent = "Cancel";
+ cancelButton.dataset.akeruFeedbackUi = "picker-cancel";
+ Object.assign(cancelButton.style, {
+ border: "1px solid var(--border)",
+ borderRadius: "6px",
+ padding: "4px 8px",
+ background: "var(--background)",
+ color: "var(--foreground)",
+ cursor: "pointer",
+ });
+ instructions.append(instructionText, cancelButton);
+ document.body.append(outline, label, instructions);
+ let hovered: Element | null = null;
+ let stopped = false;
+
+ const hide = () => {
+ outline.style.display = "none";
+ label.style.display = "none";
+ };
+ const meaningfulTarget = (element: Element): Element =>
+ element.closest("button, a, [role], [data-feedback-target], [data-component]") ?? element;
+ const show = (target: Element) => {
+ const element = meaningfulTarget(target);
+ const descriptor = productFeedbackElementDescriptor(element);
+ if (!descriptor) {
+ hovered = null;
+ hide();
+ return;
+ }
+ hovered = element;
+ const rect = element.getBoundingClientRect();
+ Object.assign(outline.style, {
+ display: "block",
+ left: `${rect.left}px`,
+ top: `${rect.top}px`,
+ width: `${rect.width}px`,
+ height: `${rect.height}px`,
+ });
+ label.textContent = descriptor.label ?? descriptor.role ?? element.tagName.toLowerCase();
+ Object.assign(label.style, {
+ display: "block",
+ left: `${Math.max(4, rect.left)}px`,
+ top: `${Math.max(4, rect.top - 25)}px`,
+ });
+ };
+ const onPointerMove = (event: PointerEvent) => {
+ const target = event.target;
+ if (!(target instanceof Element) || target === hovered) return;
+ show(target);
+ };
+ const stop = () => {
+ if (stopped) return;
+ stopped = true;
+ document.removeEventListener("pointermove", onPointerMove, true);
+ document.removeEventListener("pointerdown", onPointerDown, true);
+ document.removeEventListener("click", onClick, true);
+ document.removeEventListener("keydown", onKeyDown, true);
+ window.removeEventListener("resize", reposition, true);
+ window.removeEventListener("scroll", reposition, true);
+ outline.remove();
+ label.remove();
+ instructions.remove();
+ previousFocus?.focus();
+ };
+ const isPickerUi = (target: EventTarget | null) =>
+ target instanceof Element && target.closest("[data-akeru-feedback-ui]") !== null;
+ const onPointerDown = (event: PointerEvent) => {
+ if (isPickerUi(event.target)) return;
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ };
+ const onClick = (event: MouseEvent) => {
+ if (isPickerUi(event.target)) return;
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ const target = event.target;
+ const descriptor =
+ target instanceof Element ? productFeedbackElementDescriptor(meaningfulTarget(target)) : null;
+ if (!descriptor) return;
+ stop();
+ input.onPick(descriptor);
+ };
+ const onKeyDown = (event: KeyboardEvent) => {
+ if (event.key !== "Escape") return;
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ stop();
+ input.onCancel();
+ };
+ const reposition = () => {
+ if (hovered) show(hovered);
+ };
+ cancelButton.addEventListener("click", () => {
+ stop();
+ input.onCancel();
+ });
+ document.addEventListener("pointermove", onPointerMove, true);
+ document.addEventListener("pointerdown", onPointerDown, true);
+ document.addEventListener("click", onClick, true);
+ document.addEventListener("keydown", onKeyDown, true);
+ window.addEventListener("resize", reposition, true);
+ window.addEventListener("scroll", reposition, true);
+ cancelButton.focus();
+ return { stop };
+}
diff --git a/apps/web/src/productFeedbackStore.test.ts b/apps/web/src/productFeedbackStore.test.ts
new file mode 100644
index 000000000..88a653117
--- /dev/null
+++ b/apps/web/src/productFeedbackStore.test.ts
@@ -0,0 +1,74 @@
+import { beforeEach, describe, expect, it, vi } from "vite-plus/test";
+
+import {
+ EMPTY_PRODUCT_FEEDBACK_DRAFT,
+ openProductFeedback,
+ openProductFeedbackFromToolArgs,
+ productFeedbackDraftFromToolArgs,
+ useProductFeedbackStore,
+} from "./productFeedbackStore";
+
+beforeEach(() => {
+ useProductFeedbackStore.setState({
+ open: false,
+ picking: false,
+ draft: EMPTY_PRODUCT_FEEDBACK_DRAFT,
+ });
+});
+
+describe("product feedback store", () => {
+ it("uses one draft for Help, Settings, picking, and retry", () => {
+ openProductFeedback({ feedback: "Draft from Help" });
+ useProductFeedbackStore.getState().startPicking();
+ useProductFeedbackStore.getState().stopPicking();
+ useProductFeedbackStore.getState().closeFeedback();
+ openProductFeedback();
+
+ expect(useProductFeedbackStore.getState().draft.feedback).toBe("Draft from Help");
+ });
+
+ it("removes an attached element and clears only on explicit success", () => {
+ openProductFeedback({
+ feedback: "Button issue",
+ element: { selector: 'button[data-feedback-target="send"]', label: "Send" },
+ });
+ useProductFeedbackStore.getState().updateDraft({ element: null });
+ expect(useProductFeedbackStore.getState().draft.element).toBeNull();
+ expect(useProductFeedbackStore.getState().draft.feedback).toBe("Button issue");
+
+ useProductFeedbackStore.getState().clearDraft();
+ expect(useProductFeedbackStore.getState().draft).toEqual(EMPTY_PRODUCT_FEEDBACK_DRAFT);
+ });
+
+ it("decodes only bounded bot-authored draft fields", () => {
+ expect(
+ productFeedbackDraftFromToolArgs({
+ feedback: "The label is unclear.",
+ }),
+ ).toEqual({ feedback: "The label is unclear." });
+ expect(
+ productFeedbackDraftFromToolArgs({
+ feedback: "Private payload",
+ conversation: "full thread",
+ }),
+ ).toBeNull();
+ });
+
+ it("adds an agent proposal without replacing a manual draft", () => {
+ const fetch = vi.fn();
+ vi.stubGlobal("fetch", fetch);
+ openProductFeedback({
+ feedback: "My existing report.",
+ });
+
+ expect(
+ openProductFeedbackFromToolArgs({
+ feedback: "Agent proposal.",
+ }),
+ ).toBe(true);
+ expect(useProductFeedbackStore.getState().draft).toMatchObject({
+ feedback: "My existing report.\n\nAgent proposal.",
+ });
+ expect(fetch).not.toHaveBeenCalled();
+ });
+});
diff --git a/apps/web/src/productFeedbackStore.ts b/apps/web/src/productFeedbackStore.ts
new file mode 100644
index 000000000..823413b16
--- /dev/null
+++ b/apps/web/src/productFeedbackStore.ts
@@ -0,0 +1,86 @@
+import {
+ PRODUCT_FEEDBACK_TEXT_MAX_CHARS,
+ ProductFeedbackToolDraft,
+ type ProductFeedbackElement,
+} from "@t3tools/contracts";
+import * as Exit from "effect/Exit";
+import * as Schema from "effect/Schema";
+import { create } from "zustand";
+
+const decodeProductFeedbackToolDraft = Schema.decodeUnknownExit(ProductFeedbackToolDraft, {
+ onExcessProperty: "error",
+});
+
+export interface ProductFeedbackDraft {
+ readonly feedback: string;
+ readonly element: ProductFeedbackElement | null;
+}
+
+export const EMPTY_PRODUCT_FEEDBACK_DRAFT: ProductFeedbackDraft = {
+ feedback: "",
+ element: null,
+};
+
+interface ProductFeedbackDialogState {
+ readonly open: boolean;
+ readonly picking: boolean;
+ readonly draft: ProductFeedbackDraft;
+ readonly openFeedback: (draft?: Partial<ProductFeedbackDraft>) => void;
+ readonly closeFeedback: () => void;
+ readonly startPicking: () => void;
+ readonly stopPicking: (element?: ProductFeedbackElement) => void;
+ readonly updateDraft: (draft: Partial<ProductFeedbackDraft>) => void;
+ readonly clearDraft: () => void;
+}
+
+export const useProductFeedbackStore = create<ProductFeedbackDialogState>((set) => ({
+ open: false,
+ picking: false,
+ draft: EMPTY_PRODUCT_FEEDBACK_DRAFT,
+ openFeedback: (draft) =>
+ set((state) => ({
+ open: true,
+ picking: false,
+ draft: { ...state.draft, ...draft },
+ })),
+ closeFeedback: () => set({ open: false, picking: false }),
+ startPicking: () => set({ open: false, picking: true }),
+ stopPicking: (element) =>
+ set((state) => ({
+ open: true,
+ picking: false,
+ draft: element ? { ...state.draft, element } : state.draft,
+ })),
+ updateDraft: (draft) => set((state) => ({ draft: { ...state.draft, ...draft } })),
+ clearDraft: () => set({ draft: EMPTY_PRODUCT_FEEDBACK_DRAFT }),
+}));
+
+export function openProductFeedback(draft?: Partial<ProductFeedbackDraft>): void {
+ useProductFeedbackStore.getState().openFeedback(draft);
+}
+
+export function productFeedbackDraftFromToolArgs(
+ args: unknown,
+): Partial<ProductFeedbackDraft> | null {
+ const decoded = decodeProductFeedbackToolDraft(args);
+ if (Exit.isFailure(decoded)) return null;
+ return { feedback: decoded.value.feedback };
+}
+
+function appendBounded(current: string, proposed: string, maxLength: number): string {
+ const left = current.trim();
+ const right = proposed.trim();
+ if (!left) return right.slice(0, maxLength);
+ if (!right || left === right) return left.slice(0, maxLength);
+ return `${left}\n\n${right}`.slice(0, maxLength);
+}
+
+export function openProductFeedbackFromToolArgs(args: unknown): boolean {
+ const proposed = productFeedbackDraftFromToolArgs(args);
+ if (!proposed?.feedback) return false;
+ const current = useProductFeedbackStore.getState().draft;
+ useProductFeedbackStore.getState().openFeedback({
+ feedback: appendBounded(current.feedback, proposed.feedback, PRODUCT_FEEDBACK_TEXT_MAX_CHARS),
+ });
+ return true;
+}
diff --git a/apps/web/src/productFeedbackSubmission.test.ts b/apps/web/src/productFeedbackSubmission.test.ts
new file mode 100644
index 000000000..d7c740b77
--- /dev/null
+++ b/apps/web/src/productFeedbackSubmission.test.ts
@@ -0,0 +1,116 @@
+import { beforeEach, describe, expect, it, vi } from "vite-plus/test";
+
+import {
+ buildProductFeedbackSubmission,
+ readOrRotateProductFeedbackInstallToken,
+ shouldRefreshProductFeedbackChallenge,
+ submitProductFeedback,
+} from "./productFeedbackSubmission";
+
+const storage = new Map<string, string>();
+
+beforeEach(() => {
+ storage.clear();
+ vi.stubGlobal("localStorage", {
+ getItem: (key: string) => storage.get(key) ?? null,
+ setItem: (key: string, value: string) => storage.set(key, value),
+ });
+ vi.stubGlobal("window", { location: { hostname: "localhost" } });
+ vi.stubGlobal("navigator", {
+ platform: "MacIntel",
+ userAgent: "Test OS",
+ language: "en-US",
+ onLine: true,
+ });
+});
+
+describe("product feedback submission", () => {
+ it("contains feedback but no user contact, excerpt, or conversation body", () => {
+ const payload = buildProductFeedbackSubmission({
+ draft: {
+ feedback: "The action failed.",
+ element: null,
+ },
+ });
+ expect(payload).not.toHaveProperty("thread");
+ expect(payload).not.toHaveProperty("conversation");
+ expect(payload).not.toHaveProperty("category");
+ expect(payload).not.toHaveProperty("responseExcerpt");
+ expect(payload).not.toHaveProperty("contact");
+ });
+
+ it("keeps an installation token until a forced rotation", () => {
+ const first = readOrRotateProductFeedbackInstallToken();
+ expect(readOrRotateProductFeedbackInstallToken()).toBe(first);
+ expect(readOrRotateProductFeedbackInstallToken(true)).not.toBe(first);
+ });
+
+ it("rotates malformed and future-dated installation tokens", () => {
+ storage.set(
+ "akeru.product-feedback.install-token.v1",
+ JSON.stringify({ token: "broken", createdAt: Date.now() + 60_000 }),
+ );
+ expect(readOrRotateProductFeedbackInstallToken()).toMatch(
+ /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,
+ );
+ });
+
+ it("continues when browser storage rejects the installation token", () => {
+ vi.stubGlobal("localStorage", {
+ getItem: () => null,
+ setItem: () => {
+ throw new Error("storage unavailable");
+ },
+ });
+ expect(readOrRotateProductFeedbackInstallToken()).toMatch(
+ /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,
+ );
+ });
+
+ it("returns an honest bounded failure when the endpoint fails", async () => {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async () => Promise.reject(new Error("secret endpoint"))),
+ );
+ const result = await submitProductFeedback("https://feedback.example.test", {
+ ...buildProductFeedbackSubmission({
+ draft: {
+ feedback: "Send failed.",
+ element: null,
+ },
+ }),
+ });
+ expect(result).toEqual({
+ ok: false,
+ rejection: {
+ reason: "internal",
+ message: "Akeru could not send the feedback. Your draft is still available.",
+ },
+ });
+ });
+
+ it("refreshes a consumed verification challenge after a rejected submission", () => {
+ const submission = {
+ ...buildProductFeedbackSubmission({
+ draft: { feedback: "Retry this.", element: null },
+ }),
+ turnstileToken: "consumed-token",
+ };
+
+ expect(
+ shouldRefreshProductFeedbackChallenge(submission, {
+ ok: false,
+ rejection: { reason: "cooldown", message: "Try again." },
+ }),
+ ).toBe(true);
+ expect(
+ shouldRefreshProductFeedbackChallenge(submission, {
+ ok: true,
+ receipt: {
+ feedbackId: "feedback-1",
+ receivedAt: "2026-08-31T00:00:00.000Z",
+ },
+ }),
+ ).toBe(false);
+ });
+});
diff --git a/apps/web/src/productFeedbackSubmission.ts b/apps/web/src/productFeedbackSubmission.ts
new file mode 100644
index 000000000..957971c2f
--- /dev/null
+++ b/apps/web/src/productFeedbackSubmission.ts
@@ -0,0 +1,120 @@
+import {
+ PRODUCT_FEEDBACK_TEXT_MAX_CHARS,
+ ProductFeedbackReceipt,
+ ProductFeedbackRejection,
+ type ProductFeedbackSubmission,
+} from "@t3tools/contracts";
+import * as Exit from "effect/Exit";
+import * as Schema from "effect/Schema";
+
+import { randomUUID } from "./lib/utils";
+import type { ProductFeedbackDraft } from "./productFeedbackStore";
+
+const INSTALL_TOKEN_STORAGE_KEY = "akeru.product-feedback.install-token.v1";
+const INSTALL_TOKEN_MAX_AGE_MS = 30 * 86_400_000;
+const INSTALL_TOKEN_PATTERN =
+ /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
+const decodeProductFeedbackReceipt = Schema.decodeUnknownExit(ProductFeedbackReceipt);
+const decodeProductFeedbackRejection = Schema.decodeUnknownExit(ProductFeedbackRejection);
+
+interface StoredInstallToken {
+ readonly token: string;
+ readonly createdAt: number;
+}
+
+function newInstallToken(): StoredInstallToken {
+ return { token: randomUUID(), createdAt: Date.now() };
+}
+
+export function readOrRotateProductFeedbackInstallToken(force = false): string {
+ let stored: StoredInstallToken | null = null;
+ const current = Date.now();
+ try {
+ const raw = globalThis.localStorage?.getItem(INSTALL_TOKEN_STORAGE_KEY);
+ if (raw) {
+ const value: unknown = JSON.parse(raw);
+ if (
+ typeof value === "object" &&
+ value !== null &&
+ "token" in value &&
+ "createdAt" in value &&
+ typeof value.token === "string" &&
+ INSTALL_TOKEN_PATTERN.test(value.token) &&
+ typeof value.createdAt === "number" &&
+ Number.isSafeInteger(value.createdAt) &&
+ value.createdAt >= 0 &&
+ value.createdAt <= current
+ ) {
+ stored = { token: value.token, createdAt: value.createdAt };
+ }
+ }
+ } catch {
+ stored = null;
+ }
+ if (force || !stored || current - stored.createdAt >= INSTALL_TOKEN_MAX_AGE_MS) {
+ stored = newInstallToken();
+ try {
+ globalThis.localStorage?.setItem(INSTALL_TOKEN_STORAGE_KEY, JSON.stringify(stored));
+ } catch {
+ // Private browsing and storage quotas must not block feedback submission.
+ }
+ }
+ return stored.token;
+}
+
+export function buildProductFeedbackSubmission(input: {
+ readonly draft: ProductFeedbackDraft;
+ readonly website?: string | undefined;
+ readonly turnstileToken?: string | undefined;
+}): ProductFeedbackSubmission {
+ const feedback = input.draft.feedback.trim().slice(0, PRODUCT_FEEDBACK_TEXT_MAX_CHARS);
+ return {
+ schemaVersion: 1,
+ feedback,
+ ...(input.draft.element ? { element: input.draft.element } : {}),
+ installToken: readOrRotateProductFeedbackInstallToken(),
+ ...(input.turnstileToken ? { turnstileToken: input.turnstileToken } : {}),
+ website: input.website ?? "",
+ };
+}
+
+export type ProductFeedbackSubmitResult =
+ | { readonly ok: true; readonly receipt: ProductFeedbackReceipt }
+ | { readonly ok: false; readonly rejection: ProductFeedbackRejection };
+
+export function shouldRefreshProductFeedbackChallenge(
+ submission: ProductFeedbackSubmission,
+ result: ProductFeedbackSubmitResult,
+): boolean {
+ return Boolean(submission.turnstileToken) && !result.ok;
+}
+
+export async function submitProductFeedback(
+ endpoint: string,
+ submission: ProductFeedbackSubmission,
+): Promise<ProductFeedbackSubmitResult> {
+ try {
+ const response = await fetch(endpoint, {
+ method: "POST",
+ headers: { "content-type": "application/json" },
+ body: JSON.stringify(submission),
+ });
+ const body: unknown = await response.json();
+ if (response.ok) {
+ const decoded = decodeProductFeedbackReceipt(body);
+ if (Exit.isSuccess(decoded)) return { ok: true, receipt: decoded.value };
+ } else {
+ const decoded = decodeProductFeedbackRejection(body);
+ if (Exit.isSuccess(decoded)) return { ok: false, rejection: decoded.value };
+ }
+ } catch {
+ // The bounded message below is the only network detail shown to the user.
+ }
+ return {
+ ok: false,
+ rejection: {
+ reason: "internal",
+ message: "Akeru could not send the feedback. Your draft is still available.",
+ },
+ };
+}
diff --git a/apps/web/src/routes/__root.tsx b/apps/web/src/routes/__root.tsx
index 73d998273..e9b016e0c 100644
--- a/apps/web/src/routes/__root.tsx
+++ b/apps/web/src/routes/__root.tsx
@@ -19,6 +19,7 @@ import { ThemeEditorHost } from "../components/settings/ThemeEditorHost";
import { SettingsDialog } from "../components/settings/SettingsDialog";
import { PluginsDialog } from "../components/plugins/PluginsDialog";
import { UsageDialog } from "../components/usage/UsageDialog";
+import { ProductFeedbackDialog } from "../components/productFeedback/ProductFeedbackDialog";
import { RootRouteErrorView } from "./RootRouteErrorView";
import {
AnchoredToastProvider,
@@ -147,6 +148,7 @@ function RootRouteView() {
<SettingsDialog />
<PluginsDialog />
<UsageDialog />
+ <ProductFeedbackDialog />
{/* Above the router: a theme draft is judged by walking the app, so the
editor has to survive navigation away from settings. */}
<ThemeEditorHost />
diff --git a/apps/web/src/session-logic.test.ts b/apps/web/src/session-logic.test.ts
index 0c07e53db..82caf36e5 100644
--- a/apps/web/src/session-logic.test.ts
+++ b/apps/web/src/session-logic.test.ts
@@ -62,6 +62,27 @@ function makeActivity(overrides: {
}
describe("derivePendingApprovals", () => {
+ it("keeps feedback tool arguments for the editable draft", () => {
+ const args = { feedback: "The button is unresponsive." };
+ const approvals = derivePendingApprovals([
+ makeActivity({
+ kind: "approval.requested",
+ tone: "approval",
+ payload: {
+ requestId: "feedback-approval",
+ requestType: "dynamic_tool_call",
+ toolName: "akeru_product_feedback",
+ args,
+ },
+ }),
+ ]);
+
+ expect(approvals[0]).toMatchObject({
+ toolName: "akeru_product_feedback",
+ args,
+ });
+ });
+
it("tracks open approvals and removes resolved ones", () => {
const activities: OrchestrationThreadActivity[] = [
makeActivity({
diff --git a/apps/web/src/session-logic.ts b/apps/web/src/session-logic.ts
index 59165ec6b..c2bb7687a 100644
--- a/apps/web/src/session-logic.ts
+++ b/apps/web/src/session-logic.ts
@@ -124,6 +124,8 @@ export interface PendingApproval {
detail?: string;
appName?: string;
options?: ReadonlyArray<ProviderApprovalOption>;
+ toolName?: string;
+ args?: unknown;
}
const isProviderRequestKind = Schema.is(ProviderRequestKind);
@@ -439,6 +441,8 @@ export function derivePendingApprovals(
: null;
const detail = payload && typeof payload.detail === "string" ? payload.detail : undefined;
const appName = payload && typeof payload.appName === "string" ? payload.appName : undefined;
+ const toolName = payload && typeof payload.toolName === "string" ? payload.toolName : undefined;
+ const args = payload?.args;
const options = Array.isArray(payload?.options)
? payload.options.filter(isProviderApprovalOption)
: undefined;
@@ -450,6 +454,8 @@ export function derivePendingApprovals(
createdAt: activity.createdAt,
...(detail ? { detail } : {}),
...(appName ? { appName } : {}),
+ ...(toolName ? { toolName } : {}),
+ ...(args !== undefined ? { args } : {}),
...(options && options.length > 0 ? { options } : {}),
});
continue;
diff --git a/docs/README.md b/docs/README.md
index 622d81064..ee90a6752 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -6,6 +6,7 @@
- [Permission modes](./user/permission-modes.md)
- [Keyboard shortcuts](./user/keybindings.md)
- [Organizing threads](./user/thread-sidebar.md)
+- [Sending product feedback](./user/product-feedback.md)
- [Review usage](./user/usage.md)
- [Customize a project icon](./user/project-settings.md)
- [Mobile appearance](./user/mobile-appearance.md)
diff --git a/docs/internals/product-feedback.md b/docs/internals/product-feedback.md
new file mode 100644
index 000000000..3614e1950
--- /dev/null
+++ b/docs/internals/product-feedback.md
@@ -0,0 +1,43 @@
+# Product feedback
+
+> For maintainers. Using Akeru Bot? See [Product feedback](../user/product-feedback.md).
+
+Product feedback uses a standalone Cloudflare Worker in `infra/feedback`. Static web clients cannot own the inbox, and each distributed Akeru Bot server belongs to one installation. The default central endpoint is `https://feedback.akeru.bot/v1/feedback`. The Worker stores no Linear issue and exposes no public inbox route.
+
+## Client boundary
+
+The shared web store owns the editable draft. Help, Settings, the command palette, the desktop Help menu, and the Akeru Bot tool open the same composer. A network failure does not clear it. Only a validated success receipt clears it.
+
+The element picker excludes feedback UI, form controls, editable content, and nodes marked private or sensitive. It produces only a bounded selector, component name, source name, role, and short label. It never reads values, HTML, attributes other than the named safe markers, styles, screenshots, files, workspace paths, or full URLs.
+
+`akeru_product_feedback` is part of the Codex-backed Mastra tool catalog. Legacy Claude, Cursor, Grok, and OpenCode adapters do not receive this tool. Its schema accepts only feedback text. The tool returns a local draft acknowledgement. It does not call the central endpoint. Full-access and automatic modes use category policies instead of Mastra `yolo`, and the tool has an explicit per-tool `ask` policy. Its approval offers one-time **Add to feedback draft** and **Cancel** actions. It never offers session approval. The user must select **Send** in the composer after approval.
+
+The server settings `productFeedbackEnabled` and `productFeedbackEndpoint` are enabled by default and server-authoritative. Endpoint validation accepts absolute HTTPS URLs. It accepts HTTP only for `localhost`, `127.0.0.0/8`, or `[::1]`.
+
+Mobile shares the contracts and server settings but does not expose a product-feedback entry point in this first version. It shows Codex feedback requests as unsupported and allows only cancellation. Web and desktop own the element picker because it describes web DOM elements.
+
+## Central endpoint
+
+The Worker accepts a strict 16 KiB JSON body. Unknown properties fail decoding. Accepted fields and limits are defined in `packages/contracts/src/productFeedback.ts`. The body does not accept a thread or conversation.
+
+Before storage, the Worker:
+
+- Rejects a non-empty honeypot.
+- Applies a 30-second installation cooldown and a five-second coarse-network burst cooldown.
+- Blocks the same content from the same coarse network for 24 hours.
+- Limits a coarse network to 20 accepted submissions per hour.
+- Requires Turnstile only after five accepted submissions from the coarse network in one hour.
+- Normalizes IPv4 to `/24` and IPv6 to `/64`.
+- HMACs the rotating installation token, coarse IP, and content fingerprint.
+
+The client keeps its installation token for 30 days. A successful send does not rotate it. The coarse-network cooldown and duplicate check still apply if a custom client changes that token.
+
+D1 stores only the HMAC identifiers and the bounded safe payload. It does not store the raw installation token, raw IP, Turnstile token, or honeypot. A daily cron removes rows after 90 days. Submission returns a generated feedback ID and receipt time.
+
+The Cloudflare deployment trusts only `CF-Connecting-IP`. A self-host adapter must pass the socket address from a trusted proxy. It must not trust an arbitrary `X-Forwarded-For` header.
+
+## Operations and self-hosting
+
+Deploy the Worker from `infra/feedback`. Configure `AKERU_FEEDBACK_HMAC_SECRET`, `AKERU_FEEDBACK_TURNSTILE_SITE_KEY`, and `AKERU_FEEDBACK_TURNSTILE_SECRET_KEY`. The central Worker returns `503` until all three values are valid.
+
+Maintainers inspect the inbox with authenticated local D1 tooling. Do not add a public listing route. A self-hosted Akeru Bot environment can replace the endpoint in **Settings → About**. Keep production endpoints on HTTPS.
diff --git a/docs/internals/remote.md b/docs/internals/remote.md
index afce95f72..6b7c67ad9 100644
--- a/docs/internals/remote.md
+++ b/docs/internals/remote.md
@@ -187,7 +187,7 @@ it separate from access.
came from SSH launch for reconnect and lifecycle UX only; that metadata never changes the protocol
or the identity model.
- **Client-managed local publish.** A local server is published through the relay with
- `t3 connect link`, exposing a desktop-hosted environment to mobile without router or firewall
+ `akeru connect link`, exposing a desktop-hosted environment to mobile without router or firewall
changes.
The same `ExecutionEnvironment` can be reached several of these ways. Only the launch and access
diff --git a/docs/internals/server-updates.md b/docs/internals/server-updates.md
index 4648fa1fd..00438aa6b 100644
--- a/docs/internals/server-updates.md
+++ b/docs/internals/server-updates.md
@@ -14,8 +14,8 @@ The service files under `<baseDir>/runtime` are:
- `service-state.json`, the launcher's durable selection state;
- `versions/<version>`, immutable exact-version npm installs.
-The launcher is the only runtime writer of `service-state.json`. `t3 service install` and
-`t3 service update` may replace the launcher and state while the unit is stopped. Server children
+The launcher is the only runtime writer of `service-state.json`. `akeru service install` and
+`akeru service update` may replace the launcher and state while the unit is stopped. Server children
only communicate with the launcher over their inherited IPC channel.
The state contains one active version and, at most, one update record:
@@ -29,7 +29,7 @@ Every write uses same-directory replacement plus file and directory fsync.
## Remote Update
-1. The active server installs `t3@<target>` into a unique staging directory.
+1. The active server installs `akeru-bot@<target>` into a unique staging directory.
2. The target runs `__service-preflight` and verifies that the stable launcher supports its update
protocol.
3. The staging directory is renamed to its immutable version path only after preflight succeeds.
@@ -65,7 +65,7 @@ The protocol version is part of the safety boundary. A target that requires data
blocked when the installed launcher is too old. Upgrade the launcher once with:
```sh
-npx t3@<version> service update
+npx akeru-bot@<version> service update
```
The local command stops the unit, selects the new launcher and exact runtime, then restarts the
diff --git a/docs/internals/t3-connect.md b/docs/internals/t3-connect.md
index 6f796123e..9c60a3e24 100644
--- a/docs/internals/t3-connect.md
+++ b/docs/internals/t3-connect.md
@@ -51,7 +51,7 @@ should set `T3CODE_CLERK_PUBLISHABLE_KEY`, `T3CODE_CLERK_JWT_TEMPLATE`,
production builds only need the Clerk publishable key, JWT template name, and relay URL in their EAS
environment.
-When any client-facing public value is absent, cloud UI is omitted. The `t3 connect` command group is
+When any client-facing public value is absent, cloud UI is omitted. The `akeru connect` command group is
always registered: when the CLI public values are absent, `makeCli` in `apps/server/src/bin.ts`
registers a hidden fallback `connect` command that reports the missing configuration instead of
silently vanishing from help. The bundled server still accepts runtime overrides for self-hosted or
@@ -73,7 +73,7 @@ personal developer stage.
## Headless CLI OAuth Application
-The `t3 connect` commands authorize a headless environment with a separate Clerk OAuth application.
+The `akeru connect` commands authorize a headless environment with a separate Clerk OAuth application.
This uses an OAuth public client with PKCE, so the CLI stores no client secret.
In **Clerk Dashboard > OAuth applications**:
@@ -114,19 +114,19 @@ t3 connect unlink
t3 connect logout
```
-`t3 serve` is a separate top-level command, not a connect subcommand.
+`akeru serve` is a separate top-level command, not a connect subcommand.
-`t3 connect login` opens the Clerk authorization flow and stores the CLI credential without enabling
-cloud exposure. `t3 connect link` installs the pinned managed `cloudflared` binary when needed,
+`akeru connect login` opens the Clerk authorization flow and stores the CLI credential without enabling
+cloud exposure. `akeru connect link` installs the pinned managed `cloudflared` binary when needed,
authorizes when needed, and records durable intent to expose the environment. It works without a
-running T3 server. The next `t3 serve` or `t3 start` reconciles the relay link and launches the
-managed tunnel. `t3 connect unlink` records disabled intent immediately, stops a reachable running
+running T3 server. The next `akeru serve` or `akeru start` reconciles the relay link and launches the
+managed tunnel. `akeru connect unlink` records disabled intent immediately, stops a reachable running
connector, and attempts to revoke the relay-side environment record. It retains the stored CLI
-authorization so `t3 connect link` can re-enable exposure without another browser flow. `t3 connect
+authorization so `akeru connect link` can re-enable exposure without another browser flow. `akeru connect
logout` performs the same cleanup and removes the stored CLI authorization.
The background service has an independent lifecycle. Connect setup may offer to install it, but
-logout leaves it running; manage it with `t3 service status`, `install`, `update`, and `uninstall`.
+logout leaves it running; manage it with `akeru service status`, `install`, `update`, and `uninstall`.
### Headless and SSH authorization
diff --git a/docs/operations/observability.md b/docs/operations/observability.md
index 7341bfb5e..f4857ad9f 100644
--- a/docs/operations/observability.md
+++ b/docs/operations/observability.md
@@ -79,7 +79,7 @@ You do not need any extra env vars. Just run the app normally and inspect `serve
Examples:
```bash
-npx t3
+npx akeru-bot
```
```bash
@@ -130,7 +130,7 @@ export T3CODE_TRACE_TIMING_ENABLED=true
CLI:
```bash
-npx t3
+npx akeru-bot
```
Monorepo web/server dev:
diff --git a/docs/operations/release.md b/docs/operations/release.md
index ff2e5da20..8898da181 100644
--- a/docs/operations/release.md
+++ b/docs/operations/release.md
@@ -67,7 +67,7 @@ vp run --filter @t3tools/marketing build
Run the CLI package dry-run after the server build has produced `apps/server/dist/client`:
```sh
-vp run --filter t3 build
+vp run --filter akeru-bot build
node apps/server/scripts/cli.ts publish --dry-run --app-version 0.0.0-smoke.0 --verbose
```
diff --git a/docs/user/background-service.md b/docs/user/background-service.md
index 17de5777b..22190c616 100644
--- a/docs/user/background-service.md
+++ b/docs/user/background-service.md
@@ -8,25 +8,25 @@ keeping a terminal open.
Install it with the latest T3 Code release:
```sh
-npx t3@latest service install
+npx akeru-bot@latest service install
```
Check whether it is installed:
```sh
-npx t3@latest service status
+npx akeru-bot@latest service status
```
Update or repair it:
```sh
-npx t3@latest service update
+npx akeru-bot@latest service update
```
Stop it and remove it from startup:
```sh
-npx t3@latest service uninstall
+npx akeru-bot@latest service uninstall
```
Updating restarts T3 Code briefly. Let active agent work and terminal commands finish first.
@@ -69,5 +69,5 @@ A few more macOS notes:
T3 Connect may offer to install the service during setup so the host stays reachable in the
background. This is only an onboarding shortcut: the service and T3 Connect are managed separately.
-Signing out of T3 Connect does not remove the service. Use `t3 service uninstall` when you no longer
+Signing out of T3 Connect does not remove the service. Use `akeru service uninstall` when you no longer
want T3 Code to start in the background.
diff --git a/docs/user/install.md b/docs/user/install.md
index 15f96e00d..a27816a32 100644
--- a/docs/user/install.md
+++ b/docs/user/install.md
@@ -11,11 +11,11 @@ At least one provider CLI, installed and authenticated. See [Providers](#provide
## Run Without Installing
```bash
-npx t3@latest
+npx akeru-bot@latest
```
This starts the T3 Code server on your machine and opens the local web app. Use
-`npx t3@latest --help` for the full CLI reference.
+`npx akeru-bot@latest --help` for the full CLI reference.
## Desktop App
diff --git a/docs/user/product-feedback.md b/docs/user/product-feedback.md
new file mode 100644
index 000000000..db335136c
--- /dev/null
+++ b/docs/user/product-feedback.md
@@ -0,0 +1,16 @@
+# Product feedback
+
+Open **Feedback** from the sidebar or command palette. You can also select **Send feedback** in **Settings → About**. Desktop builds include **Help → Send Feedback**.
+
+Write the feedback and select **Send**. Select **Choose an element** to attach a privacy-safe reference to part of the Akeru Bot interface. The picker does not collect form values, page HTML, screenshots, files, workspace paths, or full URLs.
+
+A submission contains:
+
+- Feedback text, up to 4,000 characters.
+- An optional interface element descriptor.
+
+It does not contain screenshots, raw DOM, input values, credentials, tool results, a thread, or a full conversation. No account is required. A failed send keeps the draft. A confirmed send clears it.
+
+Akeru Bot keeps accepted feedback for 90 days. Turn off **Product feedback** in **Settings → About** to disable sending. Self-hosted environments can set an HTTPS endpoint there. Loopback HTTP endpoints are allowed for local testing.
+
+Codex-backed Akeru bots can propose feedback text. A proposal can only add bounded text to the same editable draft after one-time approval. The bot cannot send it. You must select **Send** for each submission. Review agent proposals on web or desktop. Mobile can cancel them but cannot open the draft in this version.
diff --git a/docs/user/remote-access.md b/docs/user/remote-access.md
index 5993fca5b..ee3ef2804 100644
--- a/docs/user/remote-access.md
+++ b/docs/user/remote-access.md
@@ -7,20 +7,20 @@ Use this when you want to connect to a T3 Code server from another device such a
If a server is already running on this machine, mint a fresh pairing token and QR code without restarting anything:
```bash
-npx t3 pair
+npx akeru-bot pair
```
-`t3 pair` finds the running server (the shared `~/.t3` install, or the current worktree's dev server when run inside one), issues a one-time pairing token, and prints the pairing URL as a QR code you can scan from your phone.
+`akeru pair` finds the running server (the shared `~/.t3` install, or the current worktree's dev server when run inside one), issues a one-time pairing token, and prints the pairing URL as a QR code you can scan from your phone.
If the server is only bound to loopback, the printed URL is not reachable from another device. Pair over your tailnet instead:
```bash
-npx t3 pair --tailscale
+npx akeru-bot pair --tailscale
```
This publishes the server over Tailscale Serve HTTPS (configuring the mapping if needed — it persists until you run `tailscale serve --https=443 off`) and pairs through the `https://machine.tailnet.ts.net/` URL. Use `--tailscale-serve-port` for a different HTTPS port, `--ttl` to change the token lifetime, and `--base-dir` to target a specific data directory.
-If no server is running, `t3 pair` says so and points you at `npx t3 serve` or `npx t3 connect`.
+If no server is running, `akeru pair` says so and points you at `npx akeru-bot serve` or `npx akeru-bot connect`.
## Recommended Setup
@@ -73,7 +73,7 @@ Depending on your Tailscale setup, this may include:
The Tailscale HTTPS endpoint uses the clean MagicDNS URL, such as
`https://machine.tailnet.ts.net/`, and is off until you opt in. Turn on **Enable Tailscale HTTPS**
on the **Tailscale HTTPS** row in **Settings** → **Connections**. The desktop app restarts the
-backend with the same server-side behavior as `t3 serve --tailscale-serve`, then the server asks
+backend with the same server-side behavior as `akeru serve --tailscale-serve`, then the server asks
Tailscale Serve to proxy HTTPS traffic to the local backend. Turn the same switch off to stop it.
The Tailscale support is an endpoint provider add-on. The core remote model still works without Tailscale: LAN HTTP endpoints, custom HTTPS endpoints, future tunnels, and SSH-launched environments all use the same saved environment and pairing flow.
@@ -84,13 +84,13 @@ For `https://app.t3.codes`, prefer an HTTPS Tailnet or other HTTPS endpoint. A p
Use this when you want to run the server without a GUI, for example on a remote machine over SSH.
-Run the server with `t3 serve`.
+Run the server with `akeru serve`.
```bash
-npx t3 serve --host "$(tailscale ip -4)"
+npx akeru-bot serve --host "$(tailscale ip -4)"
```
-`t3 serve` starts the server without opening a browser and prints:
+`akeru serve` starts the server without opening a browser and prints:
- a connection string
- a pairing token
@@ -104,19 +104,19 @@ From there, connect from another device in either of these ways:
- in the desktop app, enter the host and token separately
- in the hosted web app, open a hosted pairing URL when the backend is reachable over HTTPS
-Use `t3 serve --help` for the full flag reference. It supports the same general startup options as the normal server command, including an optional `cwd` argument.
+Use `akeru serve --help` for the full flag reference. It supports the same general startup options as the normal server command, including an optional `cwd` argument.
For hosted web pairing over Tailscale HTTPS, opt in to Tailscale Serve:
```bash
-npx t3 serve --tailscale-serve
+npx akeru-bot serve --tailscale-serve
```
By default this configures Tailscale Serve on HTTPS port 443 and advertises
`https://machine.tailnet.ts.net/`. Advanced users can choose a different HTTPS port:
```bash
-npx t3 serve --tailscale-serve --tailscale-serve-port 8443
+npx akeru-bot serve --tailscale-serve --tailscale-serve-port 8443
```
Once paired, add projects normally: open the Command Palette and choose **Add Project**, then pick
@@ -186,7 +186,7 @@ The remote device does not need a long-lived secret up front.
Instead:
-1. `t3 serve` issues a one-time owner pairing token.
+1. `akeru serve` issues a one-time owner pairing token.
2. The remote device exchanges that token with the server.
3. The server creates an authenticated session for that device.
@@ -208,7 +208,7 @@ Hosted pairing does not proxy traffic through T3 Code. The browser still connect
## Managing Access Later
-Use `t3 auth` to manage access after the initial pairing flow.
+Use `akeru auth` to manage access after the initial pairing flow.
Typical uses:
@@ -216,7 +216,7 @@ Typical uses:
- inspect active sessions
- revoke old pairing links or sessions
-Use `t3 auth --help` and the nested subcommand help pages for the full reference.
+Use `akeru auth --help` and the nested subcommand help pages for the full reference.
### Deregister a T3 Connect Environment
@@ -235,4 +235,4 @@ controls remain in **Settings** → **Connections** on web and desktop or **Sett
- Prefer binding `--host` to a trusted private address, such as a Tailnet IP, instead of exposing the server broadly.
- Anyone with a valid pairing credential can create a session until that credential expires or is revoked.
- Hosted pairing links keep the credential in the URL hash so it is not sent to the hosted app server, but it can still be exposed through browser history, screenshots, logs, or copy/paste.
-- Use `t3 auth` to revoke credentials or sessions you no longer trust.
+- Use `akeru auth` to revoke credentials or sessions you no longer trust.
diff --git a/docs/user/updating.md b/docs/user/updating.md
index 564d05fd4..90591b61f 100644
--- a/docs/user/updating.md
+++ b/docs/user/updating.md
@@ -32,7 +32,7 @@ The available action depends on how that server was started. T3 Code does not up
servers silently in the background.
An older background-service launcher may ask you to run the exact
-`npx t3@<version> service update` command on the server machine. That one local update installs the
+`npx akeru-bot@<version> service update` command on the server machine. That one local update installs the
rollback support needed for later remote updates, including versions that change the database.
After selecting **Update**, the notice becomes a live status line: **Downloading…** while the new
@@ -40,17 +40,17 @@ version is fetched and verified, then **Restarting…** while the server restart
status appears in the conversation and in Connections, so navigating between them does not lose the
update. A failure remains visible with its error and an option to retry.
-**Copy update command** gives you `npx t3@<client-version>`, which relaunches the server directly
+**Copy update command** gives you `npx akeru-bot@<client-version>`, which relaunches the server directly
at the matching version. Add whatever startup options you normally use.
If the server instead runs as the T3 Code background service, update the service on the host and
pin the same version:
```sh
-npx t3@<client-version> service update
+npx akeru-bot@<client-version> service update
```
-`service update` installs the version of the CLI that invoked it, so `npx t3@latest service update`
+`service update` installs the version of the CLI that invoked it, so `npx akeru-bot@latest service update`
only resolves the skew when your client happens to be on the latest release. The exact version from
the warning always works.
@@ -67,7 +67,7 @@ If a step fails:
1. Retry the offered action once.
2. Make sure you updated the machine named in the warning, not only the device you are using.
-3. For a command-line server, relaunch it with `npx t3@<client-version>`, replacing
+3. For a command-line server, relaunch it with `npx akeru-bot@<client-version>`, replacing
`<client-version>` with the client version shown in the warning.
## The Mobile App
diff --git a/infra/feedback/.env.example b/infra/feedback/.env.example
new file mode 100644
index 000000000..1f1306648
--- /dev/null
+++ b/infra/feedback/.env.example
@@ -0,0 +1,3 @@
+AKERU_FEEDBACK_HMAC_SECRET=replace-with-at-least-32-random-bytes
+AKERU_FEEDBACK_TURNSTILE_SITE_KEY=
+AKERU_FEEDBACK_TURNSTILE_SECRET_KEY=
diff --git a/infra/feedback/README.md b/infra/feedback/README.md
new file mode 100644
index 000000000..5fcf1e9b1
--- /dev/null
+++ b/infra/feedback/README.md
@@ -0,0 +1,15 @@
+# Akeru feedback Worker
+
+This standalone Cloudflare Worker receives anonymous Akeru Bot product feedback. It uses D1 and has no dependency on the relay control plane.
+
+Set these deployment values:
+
+- `AKERU_FEEDBACK_HMAC_SECRET`: required HMAC secret.
+- `AKERU_FEEDBACK_TURNSTILE_SITE_KEY`: required Turnstile site key.
+- `AKERU_FEEDBACK_TURNSTILE_SECRET_KEY`: required Turnstile secret key.
+
+Run the focused test with `vp test run infra/feedback/src/endpoint.test.ts`. Run the typecheck with `vp run --filter akeru-feedback typecheck`. Deploy only on direct request with `vp run --filter akeru-feedback deploy`.
+
+The Worker binds `feedback.akeru.bot` and accepts `POST /v1/feedback`. Use authenticated D1 tooling to inspect rows in `akeru_feedback_inbox`. Do not add a public inbox route or create Linear issues from this Worker. A daily cron removes rows after 90 days.
+
+Cloudflare supplies the trusted client address through `CF-Connecting-IP`. A self-host adapter must use a trusted proxy socket address and must not accept arbitrary `X-Forwarded-For` values.
diff --git a/infra/feedback/alchemy.run.ts b/infra/feedback/alchemy.run.ts
new file mode 100644
index 000000000..bed000082
--- /dev/null
+++ b/infra/feedback/alchemy.run.ts
@@ -0,0 +1,50 @@
+import * as Alchemy from "alchemy";
+import * as Cloudflare from "alchemy/Cloudflare";
+import * as Config from "effect/Config";
+import * as Effect from "effect/Effect";
+import * as Redacted from "effect/Redacted";
+
+import { FeedbackDatabase } from "./src/database.ts";
+
+export const FeedbackWorker = Cloudflare.Worker("FeedbackWorker", {
+ main: new URL("./src/worker.ts", import.meta.url).pathname,
+ compatibility: {
+ date: "2026-08-30",
+ flags: ["nodejs_compat"],
+ },
+ domain: "feedback.akeru.bot",
+ crons: ["0 3 * * *"],
+ env: {
+ DB: FeedbackDatabase,
+ HMAC_SECRET: Config.redacted("AKERU_FEEDBACK_HMAC_SECRET"),
+ TURNSTILE_SITE_KEY: Config.string("AKERU_FEEDBACK_TURNSTILE_SITE_KEY").pipe(
+ Config.withDefault(""),
+ ),
+ TURNSTILE_SECRET_KEY: Config.redacted("AKERU_FEEDBACK_TURNSTILE_SECRET_KEY").pipe(
+ Config.withDefault(Redacted.make("")),
+ ),
+ },
+ observability: {
+ enabled: true,
+ headSamplingRate: 1,
+ },
+});
+
+export type FeedbackWorkerEnv = Cloudflare.InferEnv<typeof FeedbackWorker>;
+
+export default Alchemy.Stack(
+ "AkeruFeedback",
+ {
+ providers: Cloudflare.providers(),
+ state: Cloudflare.state(),
+ },
+ Effect.gen(function* () {
+ const database = yield* FeedbackDatabase;
+ const worker = yield* FeedbackWorker;
+ return {
+ databaseName: database.databaseName,
+ workerName: worker.workerName,
+ url: worker.url,
+ };
+ }),
+);
diff --git a/infra/feedback/migrations/0001_feedback_inbox.sql b/infra/feedback/migrations/0001_feedback_inbox.sql
new file mode 100644
index 000000000..9ab7179d6
--- /dev/null
+++ b/infra/feedback/migrations/0001_feedback_inbox.sql
@@ -0,0 +1,18 @@
+CREATE TABLE akeru_feedback_inbox (
+ feedback_id TEXT PRIMARY KEY,
+ received_at TEXT NOT NULL,
+ expires_at TEXT NOT NULL,
+ install_hash TEXT NOT NULL,
+ coarse_ip_hash TEXT NOT NULL,
+ content_hash TEXT NOT NULL,
+ payload_json TEXT NOT NULL
+);
+
+CREATE INDEX idx_akeru_feedback_ip_received
+ ON akeru_feedback_inbox(coarse_ip_hash, received_at);
+CREATE INDEX idx_akeru_feedback_install_received
+ ON akeru_feedback_inbox(install_hash, received_at);
+CREATE INDEX idx_akeru_feedback_duplicate
+ ON akeru_feedback_inbox(install_hash, content_hash, received_at);
+CREATE INDEX idx_akeru_feedback_expires
+ ON akeru_feedback_inbox(expires_at);
diff --git a/infra/feedback/package.json b/infra/feedback/package.json
new file mode 100644
index 000000000..e0ddf7da6
--- /dev/null
+++ b/infra/feedback/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "akeru-feedback",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "deploy": "alchemy deploy",
+ "test": "vp test run",
+ "typecheck": "tsgo --noEmit"
+ },
+ "dependencies": {
+ "@t3tools/contracts": "workspace:*",
+ "alchemy": "2.0.0-beta.65",
+ "effect": "catalog:"
+ },
+ "devDependencies": {
+ "@cloudflare/workers-types": "^4.20260601.1",
+ "@effect/vitest": "catalog:",
+ "@types/node": "catalog:",
+ "vite-plus": "catalog:"
+ }
+}
diff --git a/infra/feedback/src/database.ts b/infra/feedback/src/database.ts
new file mode 100644
index 000000000..814e1c947
--- /dev/null
+++ b/infra/feedback/src/database.ts
@@ -0,0 +1,6 @@
+import * as Cloudflare from "alchemy/Cloudflare";
+
+export const FeedbackDatabase = Cloudflare.D1.Database("FeedbackDatabase", {
+ migrationsDir: "./migrations",
+ primaryLocationHint: "enam",
+});
diff --git a/infra/feedback/src/endpoint.test.ts b/infra/feedback/src/endpoint.test.ts
new file mode 100644
index 000000000..a9d022ac6
--- /dev/null
+++ b/infra/feedback/src/endpoint.test.ts
@@ -0,0 +1,293 @@
+// @effect-diagnostics globalDate:off
+import { describe, expect, it } from "@effect/vitest";
+
+import {
+ PRODUCT_FEEDBACK_BODY_MAX_BYTES,
+ type ProductFeedbackSubmission,
+} from "@t3tools/contracts";
+import {
+ coarseIpAddress,
+ makeProductFeedbackEndpoint,
+ type ProductFeedbackRepository,
+ type StoredProductFeedback,
+} from "./endpoint.ts";
+
+const baseSubmission = (): ProductFeedbackSubmission => ({
+ schemaVersion: 1,
+ feedback: "The send button stays disabled.",
+ installToken: "install_token_1234567890",
+ website: "",
+});
+
+function makeRepository() {
+ const rows: StoredProductFeedback[] = [];
+ let forcedIpCount: number | null = null;
+ const repository: ProductFeedbackRepository = {
+ countByCoarseIpHashSince: async (hash, since) =>
+ forcedIpCount ??
+ rows.filter((row) => row.coarseIpHash === hash && row.receivedAt >= since).length,
+ findLatestByInstallHash: async (hash) =>
+ rows
+ .filter((row) => row.installHash === hash)
+ .toSorted((left, right) => right.receivedAt.localeCompare(left.receivedAt))[0] ?? null,
+ tryInsert: async (row, constraints) => {
+ if (
+ rows.filter(
+ (stored) =>
+ stored.coarseIpHash === row.coarseIpHash &&
+ stored.receivedAt >= constraints.coarseIpSince,
+ ).length >= constraints.coarseIpLimit
+ ) {
+ return "rate_limited";
+ }
+ if (
+ rows.some(
+ (stored) =>
+ stored.coarseIpHash === row.coarseIpHash &&
+ stored.receivedAt >= constraints.coarseIpCooldownSince,
+ )
+ ) {
+ return "cooldown";
+ }
+ if (
+ rows.some(
+ (stored) =>
+ stored.installHash === row.installHash && stored.receivedAt >= constraints.installSince,
+ )
+ ) {
+ return "cooldown";
+ }
+ if (
+ rows.some(
+ (stored) =>
+ stored.coarseIpHash === row.coarseIpHash &&
+ stored.contentHash === row.contentHash &&
+ stored.receivedAt >= constraints.duplicateSince,
+ )
+ ) {
+ return "duplicate";
+ }
+ rows.push(row);
+ return "accepted";
+ },
+ deleteExpired: async (now) => {
+ for (let index = rows.length - 1; index >= 0; index -= 1) {
+ if (rows[index]!.expiresAt <= now) rows.splice(index, 1);
+ }
+ },
+ };
+ return {
+ repository,
+ rows,
+ setIpCount: (count: number) => {
+ forcedIpCount = count;
+ },
+ };
+}
+
+function request(payload: unknown, headers?: HeadersInit): Request {
+ return new Request("https://feedback.akeru.test/v1/feedback", {
+ method: "POST",
+ headers: {
+ "content-type": "application/json",
+ "cf-connecting-ip": "203.0.113.42",
+ ...headers,
+ },
+ body: typeof payload === "string" ? payload : JSON.stringify(payload),
+ });
+}
+
+async function reason(response: Response): Promise<string> {
+ return ((await response.json()) as { reason: string }).reason;
+}
+
+describe("product feedback endpoint", () => {
+ it("stores a strict, privacy-bounded payload and returns a feedback id", async () => {
+ const memory = makeRepository();
+ const endpoint = makeProductFeedbackEndpoint({
+ repository: memory.repository,
+ hmacSecret: "test-secret-that-is-long-enough",
+ randomId: () => "feedback-1",
+ now: () => new Date("2026-08-30T12:00:00.000Z"),
+ });
+ const response = await endpoint(
+ request({
+ ...baseSubmission(),
+ turnstileToken: "challenge-token",
+ element: {
+ selector: "button[data-feedback-target='send']",
+ component: "ComposerSendButton",
+ source: "ComposerSendButton",
+ role: "button",
+ label: "Send",
+ },
+ }),
+ );
+
+ expect(response.status).toBe(201);
+ expect(await response.json()).toEqual({
+ feedbackId: "fb_feedback-1",
+ receivedAt: "2026-08-30T12:00:00.000Z",
+ });
+ expect(memory.rows).toHaveLength(1);
+ expect(memory.rows[0]).not.toHaveProperty("installToken");
+ expect(memory.rows[0]?.submission).not.toHaveProperty("installToken");
+ expect(memory.rows[0]?.submission).not.toHaveProperty("turnstileToken");
+ expect(memory.rows[0]?.submission).not.toHaveProperty("website");
+ expect(memory.rows[0]?.installHash).toMatch(/^[a-f0-9]{64}$/);
+ expect(memory.rows[0]?.coarseIpHash).toMatch(/^[a-f0-9]{64}$/);
+ });
+
+ it("rejects malformed JSON, excess fields, oversized bodies, and honeypots", async () => {
+ const memory = makeRepository();
+ const endpoint = makeProductFeedbackEndpoint({
+ repository: memory.repository,
+ hmacSecret: "test-secret-that-is-long-enough",
+ });
+
+ expect(await reason(await endpoint(request("{")))).toBe("malformed");
+ expect(
+ await reason(await endpoint(request({ ...baseSubmission(), conversation: "full" }))),
+ ).toBe("malformed");
+ expect(
+ await reason(await endpoint(request({ ...baseSubmission(), website: "bot.example" }))),
+ ).toBe("honeypot");
+ const oversized = "x".repeat(PRODUCT_FEEDBACK_BODY_MAX_BYTES + 1);
+ const oversizedResponse = await endpoint(request(oversized));
+ expect(oversizedResponse.status).toBe(413);
+ expect(await reason(oversizedResponse)).toBe("oversized");
+ });
+
+ it("enforces per-install cooldown and duplicate detection", async () => {
+ const memory = makeRepository();
+ let now = new Date("2026-08-30T12:00:00.000Z");
+ const endpoint = makeProductFeedbackEndpoint({
+ repository: memory.repository,
+ hmacSecret: "test-secret-that-is-long-enough",
+ now: () => now,
+ });
+
+ expect((await endpoint(request(baseSubmission()))).status).toBe(201);
+ now = new Date("2026-08-30T12:00:10.000Z");
+ expect(
+ await reason(await endpoint(request({ ...baseSubmission(), feedback: "Another note" }))),
+ ).toBe("cooldown");
+ now = new Date("2026-08-30T12:00:31.000Z");
+ expect(await reason(await endpoint(request(baseSubmission())))).toBe("duplicate");
+ });
+
+ it("blocks token rotation from bypassing network cooldown and duplicate detection", async () => {
+ const memory = makeRepository();
+ let now = new Date("2026-08-30T12:00:00.000Z");
+ const endpoint = makeProductFeedbackEndpoint({
+ repository: memory.repository,
+ hmacSecret: "test-secret-that-is-long-enough",
+ now: () => now,
+ });
+
+ expect((await endpoint(request(baseSubmission()))).status).toBe(201);
+ now = new Date("2026-08-30T12:00:01.000Z");
+ expect(
+ await reason(
+ await endpoint(
+ request({
+ ...baseSubmission(),
+ feedback: "A different message.",
+ installToken: "another_install_token_12345",
+ }),
+ ),
+ ),
+ ).toBe("cooldown");
+
+ now = new Date("2026-08-30T12:00:06.000Z");
+ expect(
+ await reason(
+ await endpoint(
+ request({
+ ...baseSubmission(),
+ installToken: "another_install_token_12345",
+ }),
+ ),
+ ),
+ ).toBe("duplicate");
+ });
+
+ it("rate limits coarse networks and challenges only suspicious traffic", async () => {
+ const memory = makeRepository();
+ memory.setIpCount(5);
+ const challenged = makeProductFeedbackEndpoint({
+ repository: memory.repository,
+ hmacSecret: "test-secret-that-is-long-enough",
+ turnstile: { siteKey: "site-key", verify: async (token) => token === "valid" },
+ });
+ const challengeResponse = await challenged(request(baseSubmission()));
+ const challengeBody = await challengeResponse.json();
+ expect(challengeBody).toMatchObject({ challengeSiteKey: "site-key" });
+ expect(challengeBody).toMatchObject({ reason: "challenge_required" });
+
+ expect(
+ await reason(await challenged(request({ ...baseSubmission(), turnstileToken: "invalid" }))),
+ ).toBe("challenge_failed");
+ expect(
+ (await challenged(request({ ...baseSubmission(), turnstileToken: "valid" }))).status,
+ ).toBe(201);
+
+ const limitedMemory = makeRepository();
+ limitedMemory.setIpCount(20);
+ const limited = makeProductFeedbackEndpoint({
+ repository: limitedMemory.repository,
+ hmacSecret: "test-secret-that-is-long-enough",
+ });
+ expect(await reason(await limited(request(baseSubmission())))).toBe("rate_limited");
+
+ const noChallengeMemory = makeRepository();
+ noChallengeMemory.setIpCount(5);
+ const noChallenge = makeProductFeedbackEndpoint({
+ repository: noChallengeMemory.repository,
+ hmacSecret: "test-secret-that-is-long-enough",
+ });
+ expect((await noChallenge(request(baseSubmission()))).status).toBe(201);
+ });
+
+ it("turns repository failures into a bounded honest response", async () => {
+ const memory = makeRepository();
+ const endpoint = makeProductFeedbackEndpoint({
+ repository: {
+ ...memory.repository,
+ countByCoarseIpHashSince: async () => {
+ throw new Error("database url and secret must not escape");
+ },
+ },
+ hmacSecret: "test-secret-that-is-long-enough",
+ });
+ const response = await endpoint(request(baseSubmission()));
+ expect(response.status).toBe(500);
+ const body = await response.text();
+ expect(body).not.toContain("database url");
+ expect(body).not.toContain("secret");
+ });
+
+ it("accepts only one of two concurrent matching submissions", async () => {
+ const memory = makeRepository();
+ const endpoint = makeProductFeedbackEndpoint({
+ repository: memory.repository,
+ hmacSecret: "test-secret-that-is-long-enough",
+ now: () => new Date("2026-08-30T12:00:00.000Z"),
+ });
+
+ const responses = await Promise.all([
+ endpoint(request(baseSubmission())),
+ endpoint(request(baseSubmission())),
+ ]);
+ expect(responses.filter((response) => response.status === 201)).toHaveLength(1);
+ expect(memory.rows).toHaveLength(1);
+ });
+});
+
+describe("coarseIpAddress", () => {
+ it("normalizes IPv4, mapped IPv4, and compressed IPv6", () => {
+ expect(coarseIpAddress("203.0.113.99")).toBe("203.0.113.0/24");
+ expect(coarseIpAddress("::ffff:203.0.113.99")).toBe("203.0.113.0/24");
+ expect(coarseIpAddress("2001:db8:abcd:1234::99")).toBe("2001:0db8:abcd:1234::/64");
+ });
+});
diff --git a/infra/feedback/src/endpoint.ts b/infra/feedback/src/endpoint.ts
new file mode 100644
index 000000000..ad52113e1
--- /dev/null
+++ b/infra/feedback/src/endpoint.ts
@@ -0,0 +1,361 @@
+// @effect-diagnostics globalDate:off cryptoRandomUUID:off
+import {
+ PRODUCT_FEEDBACK_BODY_MAX_BYTES,
+ ProductFeedbackSubmission,
+ type ProductFeedbackReceipt,
+ type ProductFeedbackRejection,
+ type ProductFeedbackSubmission as ProductFeedbackSubmissionValue,
+} from "@t3tools/contracts";
+import * as Exit from "effect/Exit";
+import * as Schema from "effect/Schema";
+
+export const PRODUCT_FEEDBACK_COOLDOWN_SECONDS = 30;
+export const PRODUCT_FEEDBACK_NETWORK_COOLDOWN_SECONDS = 5;
+export const PRODUCT_FEEDBACK_DUPLICATE_WINDOW_SECONDS = 86_400;
+export const PRODUCT_FEEDBACK_IP_WINDOW_SECONDS = 3_600;
+export const PRODUCT_FEEDBACK_IP_LIMIT = 20;
+export const PRODUCT_FEEDBACK_SUSPICIOUS_AFTER = 5;
+export const PRODUCT_FEEDBACK_RETENTION_DAYS = 90;
+
+export interface StoredProductFeedback {
+ readonly feedbackId: string;
+ readonly receivedAt: string;
+ readonly expiresAt: string;
+ readonly installHash: string;
+ readonly coarseIpHash: string;
+ readonly contentHash: string;
+ readonly submission: Omit<
+ ProductFeedbackSubmissionValue,
+ "installToken" | "turnstileToken" | "website"
+ >;
+}
+
+export interface ProductFeedbackRepository {
+ readonly countByCoarseIpHashSince: (coarseIpHash: string, since: string) => Promise<number>;
+ readonly findLatestByInstallHash: (installHash: string) => Promise<StoredProductFeedback | null>;
+ readonly tryInsert: (
+ feedback: StoredProductFeedback,
+ constraints: {
+ readonly coarseIpSince: string;
+ readonly coarseIpCooldownSince: string;
+ readonly installSince: string;
+ readonly duplicateSince: string;
+ readonly coarseIpLimit: number;
+ },
+ ) => Promise<"accepted" | "cooldown" | "duplicate" | "rate_limited">;
+ readonly deleteExpired: (now: string) => Promise<void>;
+}
+
+export interface ProductFeedbackEndpointOptions {
+ readonly repository: ProductFeedbackRepository;
+ readonly hmacSecret: string;
+ readonly resolveIp?: (request: Request) => string;
+ readonly now?: () => Date;
+ readonly randomId?: () => string;
+ readonly turnstile?: {
+ readonly siteKey: string;
+ readonly verify: (token: string, remoteIp: string) => Promise<boolean>;
+ };
+}
+
+const decodeSubmission = Schema.decodeUnknownExit(ProductFeedbackSubmission, {
+ onExcessProperty: "error",
+});
+const encoder = new TextEncoder();
+
+function rejection(
+ status: number,
+ body: ProductFeedbackRejection,
+ headers?: HeadersInit,
+): Response {
+ return Response.json(body, {
+ status,
+ headers: {
+ "Access-Control-Allow-Origin": "*",
+ "Cache-Control": "no-store",
+ ...headers,
+ },
+ });
+}
+
+function receipt(body: ProductFeedbackReceipt): Response {
+ return Response.json(body, {
+ status: 201,
+ headers: { "Access-Control-Allow-Origin": "*", "Cache-Control": "no-store" },
+ });
+}
+
+function secondsBetween(later: Date, earlierIso: string): number {
+ return Math.floor((later.getTime() - new Date(earlierIso).getTime()) / 1_000);
+}
+
+function isoSecondsBefore(now: Date, seconds: number): string {
+ return new Date(now.getTime() - seconds * 1_000).toISOString();
+}
+
+function normalizedIpv4(ip: string): string | null {
+ const match = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(ip);
+ if (!match) return null;
+ const octets = match.slice(1).map(Number);
+ return octets.every((octet) => octet >= 0 && octet <= 255) ? octets.join(".") : null;
+}
+
+function normalizedIpv6(ip: string): string | null {
+ const mapped = /^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/i.exec(ip);
+ if (mapped?.[1]) return normalizedIpv4(mapped[1]);
+ if (!/^[0-9a-f:]+$/i.test(ip) || ip.split("::").length > 2) return null;
+ const [left = "", right = ""] = ip.split("::");
+ const leftGroups = left ? left.split(":") : [];
+ const rightGroups = right ? right.split(":") : [];
+ const missing = 8 - leftGroups.length - rightGroups.length;
+ if (missing < 0 || (!ip.includes("::") && missing !== 0)) return null;
+ const groups = [...leftGroups, ...Array.from({ length: missing }, () => "0"), ...rightGroups];
+ if (groups.length !== 8 || groups.some((group) => group.length > 4)) return null;
+ return groups.map((group) => group.padStart(4, "0").toLowerCase()).join(":");
+}
+
+export function coarseIpAddress(ip: string): string {
+ const value = ip.trim().toLowerCase();
+ const ipv4 = normalizedIpv4(value);
+ if (ipv4) return `${ipv4.split(".").slice(0, 3).join(".")}.0/24`;
+ const ipv6 = normalizedIpv6(value);
+ if (!ipv6) return "unknown";
+ const mappedIpv4 = normalizedIpv4(ipv6);
+ if (mappedIpv4) return `${mappedIpv4.split(".").slice(0, 3).join(".")}.0/24`;
+ return `${ipv6.split(":").slice(0, 4).join(":")}::/64`;
+}
+
+async function hmac(secret: string, value: string): Promise<string> {
+ const key = await crypto.subtle.importKey(
+ "raw",
+ encoder.encode(secret),
+ { name: "HMAC", hash: "SHA-256" },
+ false,
+ ["sign"],
+ );
+ const signature = await crypto.subtle.sign("HMAC", key, encoder.encode(value));
+ return Array.from(new Uint8Array(signature), (byte) => byte.toString(16).padStart(2, "0")).join(
+ "",
+ );
+}
+
+function contentFingerprint(submission: ProductFeedbackSubmissionValue): string {
+ return JSON.stringify({
+ feedback: submission.feedback,
+ element: submission.element,
+ });
+}
+
+async function readBoundedBody(request: Request): Promise<string | null> {
+ if (!request.body) return "";
+ const reader = request.body.getReader();
+ const chunks: Uint8Array[] = [];
+ let byteLength = 0;
+ for (;;) {
+ const result = await reader.read();
+ if (result.done) break;
+ byteLength += result.value.byteLength;
+ if (byteLength > PRODUCT_FEEDBACK_BODY_MAX_BYTES) {
+ await reader.cancel();
+ return null;
+ }
+ chunks.push(result.value);
+ }
+ const body = new Uint8Array(byteLength);
+ let offset = 0;
+ for (const chunk of chunks) {
+ body.set(chunk, offset);
+ offset += chunk.byteLength;
+ }
+ return new TextDecoder("utf-8", { fatal: true }).decode(body);
+}
+
+function optionsResponse(): Response {
+ return new Response(null, {
+ status: 204,
+ headers: {
+ "Access-Control-Allow-Headers": "content-type",
+ "Access-Control-Allow-Methods": "POST, OPTIONS",
+ "Access-Control-Allow-Origin": "*",
+ "Access-Control-Max-Age": "86400",
+ },
+ });
+}
+
+export function makeProductFeedbackEndpoint(options: ProductFeedbackEndpointOptions) {
+ const now = options.now ?? (() => new Date());
+ const randomId = options.randomId ?? (() => crypto.randomUUID());
+ const resolveIp =
+ options.resolveIp ?? ((request) => request.headers.get("cf-connecting-ip") ?? "unknown");
+
+ return async (request: Request): Promise<Response> => {
+ try {
+ if (request.method === "OPTIONS") return optionsResponse();
+ if (request.method !== "POST") {
+ return rejection(405, { reason: "malformed", message: "Use POST for feedback." });
+ }
+ if (!request.headers.get("content-type")?.toLowerCase().startsWith("application/json")) {
+ return rejection(400, { reason: "malformed", message: "Send feedback as JSON." });
+ }
+
+ const contentLength = Number(request.headers.get("content-length") ?? 0);
+ if (Number.isFinite(contentLength) && contentLength > PRODUCT_FEEDBACK_BODY_MAX_BYTES) {
+ return rejection(413, {
+ reason: "oversized",
+ message: "The feedback payload is too large.",
+ });
+ }
+
+ let text: string | null;
+ try {
+ text = await readBoundedBody(request);
+ } catch {
+ return rejection(400, { reason: "malformed", message: "The feedback body is invalid." });
+ }
+ if (text === null) {
+ return rejection(413, {
+ reason: "oversized",
+ message: "The feedback payload is too large.",
+ });
+ }
+
+ let untrusted: unknown;
+ try {
+ untrusted = JSON.parse(text);
+ } catch {
+ return rejection(400, {
+ reason: "malformed",
+ message: "The feedback payload is not JSON.",
+ });
+ }
+ if (
+ typeof untrusted === "object" &&
+ untrusted !== null &&
+ "website" in untrusted &&
+ typeof untrusted.website === "string" &&
+ untrusted.website.length > 0
+ ) {
+ return rejection(400, {
+ reason: "honeypot",
+ message: "The feedback payload was rejected.",
+ });
+ }
+
+ const decoded = decodeSubmission(untrusted);
+ if (Exit.isFailure(decoded)) {
+ return rejection(400, { reason: "malformed", message: "The feedback fields are invalid." });
+ }
+
+ const submission = decoded.value;
+ const current = now();
+ const ip = resolveIp(request);
+ const [installHash, coarseIpHash, contentHash] = await Promise.all([
+ hmac(options.hmacSecret, `install:${submission.installToken}`),
+ hmac(options.hmacSecret, `ip:${coarseIpAddress(ip)}`),
+ hmac(options.hmacSecret, `content:${contentFingerprint(submission)}`),
+ ]);
+ const ipCount = await options.repository.countByCoarseIpHashSince(
+ coarseIpHash,
+ isoSecondsBefore(current, PRODUCT_FEEDBACK_IP_WINDOW_SECONDS),
+ );
+ if (ipCount >= PRODUCT_FEEDBACK_IP_LIMIT) {
+ return rejection(
+ 429,
+ {
+ reason: "rate_limited",
+ message: "Too many feedback submissions came from this network. Try again later.",
+ retryAfterSeconds: PRODUCT_FEEDBACK_IP_WINDOW_SECONDS,
+ },
+ { "Retry-After": String(PRODUCT_FEEDBACK_IP_WINDOW_SECONDS) },
+ );
+ }
+
+ if (ipCount >= PRODUCT_FEEDBACK_SUSPICIOUS_AFTER && options.turnstile) {
+ if (!submission.turnstileToken) {
+ return rejection(429, {
+ reason: "challenge_required",
+ message: "Complete the verification challenge before sending feedback.",
+ challengeSiteKey: options.turnstile.siteKey,
+ });
+ }
+ if (!(await options.turnstile.verify(submission.turnstileToken, ip))) {
+ return rejection(400, {
+ reason: "challenge_failed",
+ message: "The verification challenge failed. Try again.",
+ });
+ }
+ }
+
+ const latest = await options.repository.findLatestByInstallHash(installHash);
+ if (latest) {
+ const elapsed = secondsBetween(current, latest.receivedAt);
+ if (elapsed < PRODUCT_FEEDBACK_COOLDOWN_SECONDS) {
+ const retryAfterSeconds = PRODUCT_FEEDBACK_COOLDOWN_SECONDS - Math.max(0, elapsed);
+ return rejection(
+ 429,
+ {
+ reason: "cooldown",
+ message: "Wait before sending more feedback from this installation.",
+ retryAfterSeconds,
+ },
+ { "Retry-After": String(retryAfterSeconds) },
+ );
+ }
+ }
+
+ const feedbackId = `fb_${randomId()}`;
+ const receivedAt = current.toISOString();
+ const expiresAt = new Date(
+ current.getTime() + PRODUCT_FEEDBACK_RETENTION_DAYS * 86_400_000,
+ ).toISOString();
+ const { installToken: _, turnstileToken: __, website: ___, ...safeSubmission } = submission;
+ const acceptance = await options.repository.tryInsert(
+ {
+ feedbackId,
+ receivedAt,
+ expiresAt,
+ installHash,
+ coarseIpHash,
+ contentHash,
+ submission: safeSubmission,
+ },
+ {
+ coarseIpSince: isoSecondsBefore(current, PRODUCT_FEEDBACK_IP_WINDOW_SECONDS),
+ coarseIpCooldownSince: isoSecondsBefore(
+ current,
+ PRODUCT_FEEDBACK_NETWORK_COOLDOWN_SECONDS,
+ ),
+ installSince: isoSecondsBefore(current, PRODUCT_FEEDBACK_COOLDOWN_SECONDS),
+ duplicateSince: isoSecondsBefore(current, PRODUCT_FEEDBACK_DUPLICATE_WINDOW_SECONDS),
+ coarseIpLimit: PRODUCT_FEEDBACK_IP_LIMIT,
+ },
+ );
+ if (acceptance === "rate_limited") {
+ return rejection(429, {
+ reason: "rate_limited",
+ message: "Too many feedback submissions came from this network. Try again later.",
+ retryAfterSeconds: PRODUCT_FEEDBACK_IP_WINDOW_SECONDS,
+ });
+ }
+ if (acceptance === "cooldown") {
+ return rejection(429, {
+ reason: "cooldown",
+ message: "Wait before sending more feedback from this installation.",
+ retryAfterSeconds: PRODUCT_FEEDBACK_COOLDOWN_SECONDS,
+ });
+ }
+ if (acceptance === "duplicate") {
+ return rejection(409, {
+ reason: "duplicate",
+ message: "This feedback was already received.",
+ });
+ }
+ return receipt({ feedbackId, receivedAt });
+ } catch {
+ return rejection(500, {
+ reason: "internal",
+ message: "Akeru could not store the feedback. The draft is still available.",
+ });
+ }
+ };
+}
diff --git a/infra/feedback/src/worker.test.ts b/infra/feedback/src/worker.test.ts
new file mode 100644
index 000000000..e251695c9
--- /dev/null
+++ b/infra/feedback/src/worker.test.ts
@@ -0,0 +1,52 @@
+import { describe, expect, it, vi } from "vite-plus/test";
+
+import type { FeedbackWorkerEnv } from "../alchemy.run.ts";
+import worker from "./worker.ts";
+
+function env(overrides: Partial<FeedbackWorkerEnv> = {}): FeedbackWorkerEnv {
+ return {
+ DB: { prepare: vi.fn() } as unknown as D1Database,
+ HMAC_SECRET: "test-secret-that-is-at-least-32-bytes",
+ TURNSTILE_SITE_KEY: "",
+ TURNSTILE_SECRET_KEY: "",
+ ...overrides,
+ } as FeedbackWorkerEnv;
+}
+
+describe("feedback worker", () => {
+ it("stays disabled when the HMAC secret is too short", async () => {
+ const response = await worker.fetch(
+ new Request("https://feedback.akeru.bot/v1/feedback", { method: "POST" }),
+ env({ HMAC_SECRET: "short" }),
+ );
+
+ expect(response.status).toBe(503);
+ expect(await response.json()).toMatchObject({ reason: "disabled" });
+ });
+
+ it("stays disabled until Turnstile is configured", async () => {
+ const response = await worker.fetch(
+ new Request("https://feedback.akeru.bot/v1/feedback", { method: "POST" }),
+ env(),
+ );
+
+ expect(response.status).toBe(503);
+ expect(await response.json()).toMatchObject({ reason: "disabled" });
+ });
+
+ it("deletes expired rows during the daily scheduled run", async () => {
+ const run = vi.fn(async () => undefined);
+ const bind = vi.fn(() => ({ run }));
+ const prepare = vi.fn(() => ({ bind }));
+
+ await worker.scheduled(
+ {} as ScheduledController,
+ env({ DB: { prepare } as unknown as D1Database }),
+ {} as ExecutionContext,
+ );
+
+ expect(prepare).toHaveBeenCalledWith("DELETE FROM akeru_feedback_inbox WHERE expires_at <= ?");
+ expect(bind).toHaveBeenCalledWith(expect.stringMatching(/^\d{4}-\d{2}-\d{2}T/));
+ expect(run).toHaveBeenCalledOnce();
+ });
+});
diff --git a/infra/feedback/src/worker.ts b/infra/feedback/src/worker.ts
new file mode 100644
index 000000000..0685a6378
--- /dev/null
+++ b/infra/feedback/src/worker.ts
@@ -0,0 +1,194 @@
+// @effect-diagnostics globalFetch:off globalDate:off
+import { StoredProductFeedbackSubmission } from "@t3tools/contracts";
+import * as Exit from "effect/Exit";
+import * as Schema from "effect/Schema";
+
+import type { FeedbackWorkerEnv } from "../alchemy.run.ts";
+import { makeProductFeedbackEndpoint, type ProductFeedbackRepository } from "./endpoint.ts";
+
+interface FeedbackRow {
+ readonly feedback_id: string;
+ readonly received_at: string;
+ readonly expires_at: string;
+ readonly install_hash: string;
+ readonly coarse_ip_hash: string;
+ readonly content_hash: string;
+ readonly payload_json: string;
+}
+
+const TurnstileResponse = Schema.Struct({ success: Schema.Boolean });
+const decodeStoredProductFeedbackSubmission = Schema.decodeUnknownExit(
+ StoredProductFeedbackSubmission,
+ { onExcessProperty: "error" },
+);
+const decodeTurnstileResponse = Schema.decodeUnknownExit(TurnstileResponse);
+
+export function makeRepository(database: FeedbackWorkerEnv["DB"]): ProductFeedbackRepository {
+ return {
+ countByCoarseIpHashSince: async (hash, since) => {
+ const row = await database
+ .prepare(
+ "SELECT COUNT(*) AS count FROM akeru_feedback_inbox WHERE coarse_ip_hash = ? AND received_at >= ?",
+ )
+ .bind(hash, since)
+ .first<{ count: number }>();
+ return row?.count ?? 0;
+ },
+ findLatestByInstallHash: async (hash) => {
+ const row = await database
+ .prepare(
+ "SELECT * FROM akeru_feedback_inbox WHERE install_hash = ? ORDER BY received_at DESC LIMIT 1",
+ )
+ .bind(hash)
+ .first<FeedbackRow>();
+ if (!row) return null;
+ const decoded = decodeStoredProductFeedbackSubmission(JSON.parse(row.payload_json));
+ if (Exit.isFailure(decoded)) {
+ throw new Error("Stored feedback payload is invalid.");
+ }
+ return {
+ feedbackId: row.feedback_id,
+ receivedAt: row.received_at,
+ expiresAt: row.expires_at,
+ installHash: row.install_hash,
+ coarseIpHash: row.coarse_ip_hash,
+ contentHash: row.content_hash,
+ submission: decoded.value,
+ };
+ },
+ tryInsert: async (feedback, constraints) => {
+ const result = await database
+ .prepare(
+ `INSERT INTO akeru_feedback_inbox
+ (feedback_id, received_at, expires_at, install_hash, coarse_ip_hash, content_hash, payload_json)
+ SELECT ?, ?, ?, ?, ?, ?, ?
+ WHERE (SELECT COUNT(*) FROM akeru_feedback_inbox
+ WHERE coarse_ip_hash = ? AND received_at >= ?) < ?
+ AND NOT EXISTS (SELECT 1 FROM akeru_feedback_inbox
+ WHERE coarse_ip_hash = ? AND received_at >= ?)
+ AND NOT EXISTS (SELECT 1 FROM akeru_feedback_inbox
+ WHERE install_hash = ? AND received_at >= ?)
+ AND NOT EXISTS (SELECT 1 FROM akeru_feedback_inbox
+ WHERE coarse_ip_hash = ? AND content_hash = ? AND received_at >= ?)`,
+ )
+ .bind(
+ feedback.feedbackId,
+ feedback.receivedAt,
+ feedback.expiresAt,
+ feedback.installHash,
+ feedback.coarseIpHash,
+ feedback.contentHash,
+ JSON.stringify(feedback.submission),
+ feedback.coarseIpHash,
+ constraints.coarseIpSince,
+ constraints.coarseIpLimit,
+ feedback.coarseIpHash,
+ constraints.coarseIpCooldownSince,
+ feedback.installHash,
+ constraints.installSince,
+ feedback.coarseIpHash,
+ feedback.contentHash,
+ constraints.duplicateSince,
+ )
+ .run();
+ if (result.meta.changes === 1) return "accepted";
+ if (
+ ((
+ await database
+ .prepare(
+ "SELECT COUNT(*) AS count FROM akeru_feedback_inbox WHERE coarse_ip_hash = ? AND received_at >= ?",
+ )
+ .bind(feedback.coarseIpHash, constraints.coarseIpSince)
+ .first<{ count: number }>()
+ )?.count ?? 0) >= constraints.coarseIpLimit
+ ) {
+ return "rate_limited";
+ }
+ if (
+ (await database
+ .prepare(
+ "SELECT feedback_id FROM akeru_feedback_inbox WHERE coarse_ip_hash = ? AND received_at >= ? LIMIT 1",
+ )
+ .bind(feedback.coarseIpHash, constraints.coarseIpCooldownSince)
+ .first()) !== null
+ ) {
+ return "cooldown";
+ }
+ if (
+ (await database
+ .prepare(
+ "SELECT feedback_id FROM akeru_feedback_inbox WHERE install_hash = ? AND received_at >= ? LIMIT 1",
+ )
+ .bind(feedback.installHash, constraints.installSince)
+ .first()) !== null
+ ) {
+ return "cooldown";
+ }
+ return "duplicate";
+ },
+ deleteExpired: async (now) => {
+ await database
+ .prepare("DELETE FROM akeru_feedback_inbox WHERE expires_at <= ?")
+ .bind(now)
+ .run();
+ },
+ };
+}
+
+function makeTurnstile(env: FeedbackWorkerEnv) {
+ if (!env.TURNSTILE_SITE_KEY || !env.TURNSTILE_SECRET_KEY) return undefined;
+ return {
+ siteKey: env.TURNSTILE_SITE_KEY,
+ verify: async (token: string, remoteIp: string) => {
+ const response = await fetch("https://challenges.cloudflare.com/turnstile/v0/siteverify", {
+ method: "POST",
+ body: new URLSearchParams({
+ secret: env.TURNSTILE_SECRET_KEY,
+ response: token,
+ remoteip: remoteIp,
+ }),
+ });
+ if (!response.ok) return false;
+ const decoded = decodeTurnstileResponse(await response.json());
+ return Exit.isSuccess(decoded) && decoded.value.success;
+ },
+ };
+}
+
+function validHmacSecret(secret: string): boolean {
+ return new TextEncoder().encode(secret).byteLength >= 32;
+}
+
+export default {
+ async fetch(request: Request, env: FeedbackWorkerEnv): Promise<Response> {
+ const url = new URL(request.url);
+ if (url.pathname !== "/v1/feedback") {
+ return new Response("Not Found", { status: 404 });
+ }
+ if (!validHmacSecret(env.HMAC_SECRET)) {
+ return Response.json(
+ { reason: "disabled", message: "Product feedback is not configured." },
+ { status: 503, headers: { "Cache-Control": "no-store" } },
+ );
+ }
+ const turnstile = makeTurnstile(env);
+ if (!turnstile) {
+ return Response.json(
+ { reason: "disabled", message: "Product feedback is not configured." },
+ { status: 503, headers: { "Cache-Control": "no-store" } },
+ );
+ }
+ return makeProductFeedbackEndpoint({
+ repository: makeRepository(env.DB),
+ hmacSecret: env.HMAC_SECRET,
+ turnstile,
+ })(request);
+ },
+ async scheduled(
+ _controller: ScheduledController,
+ env: FeedbackWorkerEnv,
+ _context: ExecutionContext,
+ ): Promise<void> {
+ await makeRepository(env.DB).deleteExpired(new Date().toISOString());
+ },
+};
diff --git a/infra/feedback/tsconfig.json b/infra/feedback/tsconfig.json
new file mode 100644
index 000000000..0e252145b
--- /dev/null
+++ b/infra/feedback/tsconfig.json
@@ -0,0 +1,8 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "lib": ["ES2024", "WebWorker"],
+ "types": ["@cloudflare/workers-types"]
+ },
+ "include": ["alchemy.run.ts", "src/**/*.ts"]
+}
diff --git a/package.json b/package.json
index f1f4dc869..bf504b2f5 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"dev:marketing": "vp run --filter @t3tools/marketing dev",
"dev:desktop": "node scripts/dev-runner.ts dev:desktop",
"migrate-dev-db": "node apps/server/scripts/migrate-dev-db.ts",
- "start": "vp run --filter t3 start",
+ "start": "vp run --filter akeru-bot start",
"start:desktop": "vp run --filter @t3tools/desktop start",
"start:marketing": "vp run --filter @t3tools/marketing preview",
"start:mock-update-server": "node scripts/mock-update-server.ts",
@@ -20,7 +20,7 @@
"icons:check": "node scripts/export-brand-icons.ts --check",
"build": "vp run --filter './apps/*' --filter './packages/*' --filter './oxlint-plugin-t3code' --filter './scripts' build",
"build:marketing": "vp run --filter @t3tools/marketing build",
- "build:desktop": "vp run --filter @t3tools/desktop --filter t3 build",
+ "build:desktop": "vp run --filter @t3tools/desktop --filter akeru-bot build",
"build:resource-monitor": "cargo build --locked --release --manifest-path native/resource-monitor/Cargo.toml",
"check:public-dependencies": "node scripts/check-public-dependencies.ts",
"typecheck": "vp run -r --concurrency-limit 2 typecheck",
diff --git a/packages/contracts/src/index.ts b/packages/contracts/src/index.ts
index 6b4f95c8d..7bcce8acb 100644
--- a/packages/contracts/src/index.ts
+++ b/packages/contracts/src/index.ts
@@ -1,5 +1,6 @@
export * from "./baseSchemas.ts";
export * from "./background.ts";
+export * from "./productFeedback.ts";
export * from "./auth.ts";
export * from "./environment.ts";
export * from "./environmentHttp.ts";
diff --git a/packages/contracts/src/productFeedback.test.ts b/packages/contracts/src/productFeedback.test.ts
new file mode 100644
index 000000000..105b4233e
--- /dev/null
+++ b/packages/contracts/src/productFeedback.test.ts
@@ -0,0 +1,55 @@
+import { describe, expect, it } from "vite-plus/test";
+import * as Exit from "effect/Exit";
+import * as Schema from "effect/Schema";
+
+import { ProductFeedbackSubmission, ProductFeedbackToolDraft } from "./productFeedback.ts";
+
+const submission = {
+ schemaVersion: 1,
+ feedback: "The button does not respond.",
+ installToken: "install_token_1234567890",
+ website: "",
+} as const;
+
+describe("ProductFeedbackSubmission", () => {
+ it("accepts the bounded anonymous payload", () => {
+ expect(Exit.isSuccess(Schema.decodeUnknownExit(ProductFeedbackSubmission)(submission))).toBe(
+ true,
+ );
+ });
+
+ it("rejects conversation data and oversized feedback", () => {
+ expect(
+ Exit.isFailure(
+ Schema.decodeUnknownExit(ProductFeedbackSubmission, {
+ onExcessProperty: "error",
+ })({ ...submission, conversation: "private thread" }),
+ ),
+ ).toBe(true);
+ expect(
+ Exit.isFailure(
+ Schema.decodeUnknownExit(ProductFeedbackSubmission)({
+ ...submission,
+ feedback: "x".repeat(4_001),
+ }),
+ ),
+ ).toBe(true);
+ });
+});
+
+describe("ProductFeedbackToolDraft", () => {
+ it("accepts feedback text and rejects every other field", () => {
+ const decode = Schema.decodeUnknownExit(ProductFeedbackToolDraft, {
+ onExcessProperty: "error",
+ });
+ expect(Exit.isSuccess(decode({ feedback: "Add a shortcut." }))).toBe(true);
+ expect(
+ Exit.isFailure(
+ decode({
+ feedback: "Add a shortcut.",
+ installToken: "not-agent-controlled",
+ }),
+ ),
+ ).toBe(true);
+ });
+});
diff --git a/packages/contracts/src/productFeedback.ts b/packages/contracts/src/productFeedback.ts
new file mode 100644
index 000000000..f47c4957c
--- /dev/null
+++ b/packages/contracts/src/productFeedback.ts
@@ -0,0 +1,82 @@
+import * as Schema from "effect/Schema";
+
+import { TrimmedNonEmptyString, TrimmedString } from "./baseSchemas.ts";
+
+export const PRODUCT_FEEDBACK_BODY_MAX_BYTES = 16_384;
+export const PRODUCT_FEEDBACK_TEXT_MAX_CHARS = 4_000;
+export const PRODUCT_FEEDBACK_ELEMENT_LABEL_MAX_CHARS = 120;
+export const AKERU_PRODUCT_FEEDBACK_TOOL_NAME = "akeru_product_feedback";
+
+const ShortText = TrimmedNonEmptyString.check(Schema.isMaxLength(128));
+
+/**
+ * A privacy-filtered reference to Akeru UI. This deliberately excludes DOM,
+ * attributes, styles, values, and files.
+ */
+export const ProductFeedbackElement = Schema.Struct({
+ selector: TrimmedNonEmptyString.check(Schema.isMaxLength(256)),
+ component: Schema.optionalKey(ShortText),
+ source: Schema.optionalKey(
+ TrimmedNonEmptyString.check(Schema.isMaxLength(128), Schema.isPattern(/^[a-z0-9_.:-]+$/i)),
+ ),
+ role: Schema.optionalKey(TrimmedNonEmptyString.check(Schema.isMaxLength(64))),
+ label: Schema.optionalKey(
+ TrimmedNonEmptyString.check(Schema.isMaxLength(PRODUCT_FEEDBACK_ELEMENT_LABEL_MAX_CHARS)),
+ ),
+});
+export type ProductFeedbackElement = typeof ProductFeedbackElement.Type;
+
+/** Editable fields that an agent may propose. No network or host metadata is accepted here. */
+export const ProductFeedbackToolDraft = Schema.Struct({
+ feedback: TrimmedNonEmptyString.check(Schema.isMaxLength(PRODUCT_FEEDBACK_TEXT_MAX_CHARS)),
+});
+export type ProductFeedbackToolDraft = typeof ProductFeedbackToolDraft.Type;
+
+export const ProductFeedbackSubmission = Schema.Struct({
+ schemaVersion: Schema.Literal(1),
+ feedback: TrimmedNonEmptyString.check(Schema.isMaxLength(PRODUCT_FEEDBACK_TEXT_MAX_CHARS)),
+ element: Schema.optionalKey(ProductFeedbackElement),
+ installToken: TrimmedNonEmptyString.check(
+ Schema.isMinLength(22),
+ Schema.isMaxLength(128),
+ Schema.isPattern(/^[a-z0-9_-]+$/i),
+ ),
+ turnstileToken: Schema.optionalKey(TrimmedNonEmptyString.check(Schema.isMaxLength(2_048))),
+ website: TrimmedString.check(Schema.isMaxLength(0)),
+});
+export type ProductFeedbackSubmission = typeof ProductFeedbackSubmission.Type;
+
+export const StoredProductFeedbackSubmission = Schema.Struct({
+ schemaVersion: ProductFeedbackSubmission.fields.schemaVersion,
+ feedback: ProductFeedbackSubmission.fields.feedback,
+ element: ProductFeedbackSubmission.fields.element,
+});
+export type StoredProductFeedbackSubmission = typeof StoredProductFeedbackSubmission.Type;
+
+export const ProductFeedbackReceipt = Schema.Struct({
+ feedbackId: TrimmedNonEmptyString.check(Schema.isMaxLength(64)),
+ receivedAt: TrimmedNonEmptyString.check(Schema.isMaxLength(64)),
+});
+export type ProductFeedbackReceipt = typeof ProductFeedbackReceipt.Type;
+
+export const ProductFeedbackRejectionReason = Schema.Literals([
+ "malformed",
+ "oversized",
+ "duplicate",
+ "cooldown",
+ "rate_limited",
+ "honeypot",
+ "challenge_required",
+ "challenge_failed",
+ "disabled",
+ "internal",
+]);
+export type ProductFeedbackRejectionReason = typeof ProductFeedbackRejectionReason.Type;
+
+export const ProductFeedbackRejection = Schema.Struct({
+ reason: ProductFeedbackRejectionReason,
+ message: TrimmedNonEmptyString.check(Schema.isMaxLength(256)),
+ retryAfterSeconds: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(1))),
+ challengeSiteKey: Schema.optionalKey(TrimmedNonEmptyString.check(Schema.isMaxLength(128))),
+});
+export type ProductFeedbackRejection = typeof ProductFeedbackRejection.Type;
diff --git a/packages/contracts/src/providerRuntime.ts b/packages/contracts/src/providerRuntime.ts
index e813c6ce4..c431ded52 100644
--- a/packages/contracts/src/providerRuntime.ts
+++ b/packages/contracts/src/providerRuntime.ts
@@ -432,6 +432,7 @@ export type ContentDeltaPayload = typeof ContentDeltaPayload.Type;
const RequestOpenedPayload = Schema.Struct({
requestType: CanonicalRequestType,
+ toolName: Schema.optional(TrimmedNonEmptyStringSchema),
detail: Schema.optional(TrimmedNonEmptyStringSchema),
appName: Schema.optional(TrimmedNonEmptyStringSchema),
options: Schema.optional(Schema.Array(ProviderApprovalOption)),
diff --git a/packages/contracts/src/settings.test.ts b/packages/contracts/src/settings.test.ts
index d555ce747..b6c8f0b33 100644
--- a/packages/contracts/src/settings.test.ts
+++ b/packages/contracts/src/settings.test.ts
@@ -42,6 +42,31 @@ describe("ServerSettings voice", () => {
});
});
+describe("ServerSettings product feedback", () => {
+ it("defaults to the Akeru endpoint and remains server patchable", () => {
+ expect(decodeServerSettings({})).toMatchObject({
+ productFeedbackEnabled: true,
+ productFeedbackEndpoint: "https://feedback.akeru.bot/v1/feedback",
+ });
+ expect(
+ decodeServerSettingsPatch({
+ productFeedbackEnabled: false,
+ productFeedbackEndpoint: "http://localhost:8787/v1/feedback",
+ }),
+ ).toEqual({
+ productFeedbackEnabled: false,
+ productFeedbackEndpoint: "http://localhost:8787/v1/feedback",
+ });
+ });
+
+ it("rejects insecure non-loopback and relative endpoints", () => {
+ expect(() =>
+ decodeServerSettingsPatch({ productFeedbackEndpoint: "http://feedback.example.test" }),
+ ).toThrow();
+ expect(() => decodeServerSettingsPatch({ productFeedbackEndpoint: "/api/feedback" })).toThrow();
+ });
+});
+
describe("ClaudeSettings auto-compaction", () => {
it("uses Claude's default threshold when no override is configured", () => {
expect(decodeClaudeSettings({}).autoCompactWindow).toBe("");
diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.ts
index 4bf61e8bc..65eeb4ad8 100644
--- a/packages/contracts/src/settings.ts
+++ b/packages/contracts/src/settings.ts
@@ -143,6 +143,15 @@ export const DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE: EnvironmentIdentificationM
export const FontFamilyPreference = Schema.String.check(Schema.isMaxLength(200));
export type FontFamilyPreference = typeof FontFamilyPreference.Type;
+export const DEFAULT_PRODUCT_FEEDBACK_ENDPOINT = "https://feedback.akeru.bot/v1/feedback";
+export const ProductFeedbackEndpoint = TrimmedNonEmptyString.check(
+ Schema.isMaxLength(2_048),
+ Schema.isPattern(
+ /^(?:https:\/\/[a-z0-9.-]+(?::\d+)?|http:\/\/(?:localhost|127(?:\.\d{1,3}){3}|\[::1\])(?::\d+)?)(?:\/[^\s]*)?$/i,
+ ),
+);
+export type ProductFeedbackEndpoint = typeof ProductFeedbackEndpoint.Type;
+
/**
* Defaults for the in-app preview browser, applied whenever a tab is opened
* without an explicit viewport/zoom/appearance — by the user opening a browser
@@ -639,6 +648,10 @@ export const ServerSettings = Schema.Struct({
Schema.withDecodingDefault(Effect.succeed(false)),
),
enableProviderUpdateChecks: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))),
+ productFeedbackEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))),
+ productFeedbackEndpoint: ProductFeedbackEndpoint.pipe(
+ Schema.withDecodingDefault(Effect.succeed(DEFAULT_PRODUCT_FEEDBACK_ENDPOINT)),
+ ),
/**
* Whether agents may drive the in-app preview browser. Turning this off
* withholds the MCP credential, so the `t3-code` server (and with it every
@@ -865,6 +878,8 @@ export const ServerSettingsPatch = Schema.Struct({
// Server settings
enableLegacyTokenStreaming: Schema.optionalKey(Schema.Boolean),
enableProviderUpdateChecks: Schema.optionalKey(Schema.Boolean),
+ productFeedbackEnabled: Schema.optionalKey(Schema.Boolean),
+ productFeedbackEndpoint: Schema.optionalKey(ProductFeedbackEndpoint),
enableAgentBrowserAccess: Schema.optionalKey(Schema.Boolean),
voice: Schema.optionalKey(
Schema.Struct({
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0c0f4767f..7e43f3d63 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -754,6 +754,31 @@ importers:
specifier: 'catalog:'
+ infra/feedback:
+ dependencies:
+ '@t3tools/contracts':
+ specifier: workspace:*
+ version: link:../../packages/contracts
+ alchemy:
+ specifier: 2.0.0-beta.65
+ version: 2.0.0-beta.65(be45c0a0ef6c0522fc35072b6c9c2266)
+ effect:
+ specifier: 4.0.0-beta.103
+ version: 4.0.0-beta.103(patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)
+ devDependencies:
+ '@cloudflare/workers-types':
+ specifier: ^4.20260601.1
+ version: 4.20260604.1
+ '@effect/vitest':
+ specifier: 4.0.0-beta.103
+ version: 4.0.0-beta.103(patch_hash=a16b1e870d8c29e4a98b17cc4c638a4ff471753d8ca3487f78a22b759caf951b)([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@types/node':
+ specifier: 24.12.4
+ version: 24.12.4
+ vite-plus:
+ specifier: 'catalog:'
+
infra/relay:
dependencies:
'@clerk/backend':
@@ -4269,6 +4294,9 @@ packages:
'@oxc-project/[email protected]':
resolution: {integrity: sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==}
+ '@oxc-project/[email protected]':
+ resolution: {integrity: sha512-IJ3s6ltHLp45S0bh7phkX+gJO7A1Wuz2EaqpAhb8WjqDwbzMiWKHhyyT42tskaWjEYXtHtVCPpnBJVT9+dcRLg==}
+
resolution: {integrity: sha512-qVBsEO+KugOsCmUHcO8iqNnqc65p7PCKpCs8M66mPZ+Ri+CWbcpoQOEJBg2OTu03+0qu++NK1jj6IzvQVs0Sig==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5080,6 +5108,12 @@ packages:
resolution: {integrity: sha512-3qndQUQXLdwafMEqfhz24hUtDPcsf1Bu3q52Kb8MqeH8JUh3h6R4HYW3ZJXiQsLcyYyFM68PuIwlLRlg1xDEpg==}
engines: {node: ^14.18.0 || >=16.0.0}
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-b+jTcARdTiFLI6jB4a5XjTm0RWd6KcRfQj/I2356fxUZemiho9zQLxo0RtCuMDAyKcLo6cEltkgbQp6d1+sjjQ==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm]
+ os: [android]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-s70pVGhw4zqGeFnXWvAzJDlvxhlRollagdCCKRgOsgUOH3N1l0LIxf83AtGzmb5SiVM4Hjl5HyarMRfdfj3DaQ==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5092,6 +5126,12 @@ packages:
cpu: [arm64]
os: [android]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-lkWU8ZJaRk9q3CIEY1Tc7vIFALp3Xw5NfGJo2hQg5oIqNgxWi1zI+IiDEK3r70BF5Dzol1tcXsnzsRc8NLhG+Q==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [android]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-4ksWc9n0mhlZpZ9PMZgTGjeOPRu8MB1Z3Tz0Mo02eWfWCHMW1zN82Qz/pL/rC+yQa+8ZnutMF0JjJe7PjwasYw==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5104,6 +5144,12 @@ packages:
cpu: [arm64]
os: [darwin]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-dgR56NYnvAszm7Ob1B2/Vn0e8bUQYZH2UjVaMMtMVOCKFSfjhfLmuA/9+O+F+ajUdG6B/bSssrKW6JJYASa8jA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [darwin]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-SUSDOI6WwUVNcWxd02QEBjLdY1VPHvlEkw6T/8nYG322iYWCTxRb1vzk4E+mWWYehTp7ERibq54LSJGjmouOsw==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5116,6 +5162,12 @@ packages:
cpu: [x64]
os: [darwin]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-vpVxFvUCFioJqug7OTvqptkc4yb8UX0AwfDmJpaR/0sWz+BUmqSVAf7c8JkUgnN8YLspb4a/N6NhTyMAmdyQ7Q==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [darwin]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-hwnz3nw9dbJ05EDO/PvcjaaewqqDy7Y1rn1UO81l8iIK1GjenME75dl16ajbvSSMfv66WXSRCYKIqfgq2KCfxw==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5128,6 +5180,12 @@ packages:
cpu: [x64]
os: [freebsd]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-h1wG6Y6K3JlRswxsI64qQJqBAy4vrLuHgRbc8CZMGSWTOFRY6ghMApM1NKzB2I0n5xV1fjkE18SuVl2QpLeNpA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [freebsd]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-IS+W7epTcwANmFSQFrS1SivEXHtl1JtuQA9wlxrZTcNi6mx+FDOYrakGevvvTwgj2JvWiK8B29/qD9BELZPyXQ==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5140,6 +5198,12 @@ packages:
cpu: [arm]
os: [linux]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-tbCiqub0q2MVWJKgF5PoAlNWCtQydiOYSLIkd8sByqK/6MMYLJRcSXSYodqYtd0O+Fw7QaVmKKlS4oL94YRZ0w==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm]
+ os: [linux]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-e6usGaHKW5BMNZOymS1UcEYGowQMWcgZ71Z17Sl/h2+ZziNJ1a9n3Zvcz6LdRyIW5572wBCTH/Z+bKuZouGk9Q==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5154,6 +5218,13 @@ packages:
os: [linux]
libc: [glibc]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-oxK9+baEBPhZG5HB4URY+uU04zJWeZlH6Tb9rB5DK4DF9XR1uXNLXt5Q5ZsugTKayNCNLhkcwz/ye74hRI98dg==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [linux]
+ libc: [glibc]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-b/CgbwAJpmrRLp02RPfhbudf5tZnN9nsPWK82znefso832etkem8H7FSZwxrOI9djcdTP7U6YfNhbRnh7djErg==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5168,6 +5239,13 @@ packages:
os: [linux]
libc: [musl]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-muWCk27FVBEZtv0MsK8gnfSmgczA8KQ0uRVJbTABKhkRfQc38aUrcb7fhi3BNiyseFmgcRsoMfQsSNJ+DbZdSw==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [linux]
+ libc: [musl]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-4EII1iNGRUN5WwGbF/kOh/EIkoDN9HsupgLQoXfY+D1oyJm7/F4t5PYU5n8SWZgG0FEwakyM8pGgwcBYruGTlA==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5182,6 +5260,13 @@ packages:
os: [linux]
libc: [glibc]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-eWDoSfU7Co2qj3vgB3Dt4lj1mG6CoWbcJQkRMP3XJplyCMtuaq3LHvPFjS9QIPvMGWVadJC04Xiy0IdcVPtnwQ==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [ppc64]
+ os: [linux]
+ libc: [glibc]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-AH8oq3XqQo4IibpVXvPeLDI5pzkpYn0WiZAfT05kFzoJ6tQNzwRdDYQ45M8I/gslbodRZwW8uxLhbSBbkv96rA==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5196,6 +5281,13 @@ packages:
os: [linux]
libc: [glibc]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-2bWNjRSIayvupRKxXUY2tWG9fYdoUlTqWywHRvE8Eq3GvuQ+f2HeIkve697fIt+IQs/PV8yFsdWuhp1aJ1PdnA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [s390x]
+ os: [linux]
+ libc: [glibc]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-cLnjV3xfo7KslbU41Z7z8BH/E1y5mzUYzAqih1d1MDaIGZRCMqTijqLv76/P7fyHuvUcfGsIpqCdddbxLLK9rA==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5210,6 +5302,13 @@ packages:
os: [linux]
libc: [glibc]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-KekI0gS0wLxe1UBSQSjenBVwou/JkcQPDzBPICGZjxUv9k3RteHDPBQaiOicZUFKRIH2wKEimGwVpnJsbPzu7w==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [linux]
+ libc: [glibc]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-0phclDw1spsL7dUB37sIARuis2tAgomCJXAHZlpt8PXZ4Ba0dRP1e+66lsRqrfhISeN9bEGNjQs+T/Fbd7oYGw==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5224,6 +5323,13 @@ packages:
os: [linux]
libc: [musl]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-TvtPnfVr+HtyGiDmPK4VWmlNm7QhNNAcK5Q9A7aOXsI8545yCyaoMaicXrFZ72JzeYjaUVk7yT243zT0jzjFKQ==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [linux]
+ libc: [musl]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-0ag/hEgXOwgw4t8QyQvUCxvEg+V0KBcA6YuOx9g0r02MprutRF5dyljgm3EmR02O292UX7UeS6HzWHAl6KgyhA==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5236,6 +5342,12 @@ packages:
cpu: [arm64]
os: [openharmony]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-iOo0VEay2XFhaCcH0sps5XIimkSuOnNaZrf6+ZkoSOQBJPKNU48RkmJv0/lSpipexu5P+ouFgafe5IGr/DiQfg==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [openharmony]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-LEXei6vo0E5wTGwpkJ4KoT3OZJRnglwldt5ziLzOlc6qqb55z4tWNq2A+PFqCJuvWWdP53CVhG1Z9NtToDPJrA==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5258,6 +5370,12 @@ packages:
cpu: [arm64]
os: [win32]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-y5NTmmasMS455JlOCO4ZM9krIchv3Mvm1crL1iUPGOPgEzSkves9n0SdC5Sjz6+qWDFhd8/JpfWMH8NSWNHe+A==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [win32]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-3hkiolcUAvPB9FLb3UZdfjVVNWherN1f/skkGWJP/fgSQhYUZpSIRr0/I8ZK9TkF3F7kxvJAk0+IcKvPHk9qQg==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -5270,6 +5388,12 @@ packages:
cpu: [x64]
os: [win32]
+ '@rolldown/[email protected]':
+ resolution: {integrity: sha512-np8iZSLfXlAD4kWhiyq/u0Yt8oZDtRQ8lGhQaCXo2rl37KNjeU0GjJuwr4P3oeZ++ROfofsKNBqR5LTO8aXyWQ==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [win32]
+
'@rolldown/[email protected]':
resolution: {integrity: sha512-+zEk16yGlz1F9STiRr6uG9hmIXb6nprjLczV/htGptYuLoCuxb+itZ03RKCEeOhBpDDd1NU7qF6x1VLMUp62bw==}
engines: {node: '>=22.12.0 || ^24.0.0'}
@@ -9749,6 +9873,12 @@ packages:
cpu: [arm64]
os: [android]
+ resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [arm64]
+ os: [android]
+
resolution: {integrity: sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==}
engines: {node: '>= 12.0.0'}
@@ -9767,6 +9897,12 @@ packages:
cpu: [arm64]
os: [darwin]
+ resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [arm64]
+ os: [darwin]
+
resolution: {integrity: sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==}
engines: {node: '>= 12.0.0'}
@@ -9785,6 +9921,12 @@ packages:
cpu: [x64]
os: [darwin]
+ resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [x64]
+ os: [darwin]
+
resolution: {integrity: sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==}
engines: {node: '>= 12.0.0'}
@@ -9803,6 +9945,12 @@ packages:
cpu: [x64]
os: [freebsd]
+ resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [x64]
+ os: [freebsd]
+
resolution: {integrity: sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==}
engines: {node: '>= 12.0.0'}
@@ -9821,6 +9969,12 @@ packages:
cpu: [arm]
os: [linux]
+ resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [arm]
+ os: [linux]
+
resolution: {integrity: sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==}
engines: {node: '>= 12.0.0'}
@@ -9842,6 +9996,13 @@ packages:
os: [linux]
libc: [glibc]
+ resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [arm64]
+ os: [linux]
+ libc: [glibc]
+
resolution: {integrity: sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==}
engines: {node: '>= 12.0.0'}
@@ -9863,6 +10024,13 @@ packages:
os: [linux]
libc: [musl]
+ resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [arm64]
+ os: [linux]
+ libc: [musl]
+
resolution: {integrity: sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==}
engines: {node: '>= 12.0.0'}
@@ -9884,6 +10052,13 @@ packages:
os: [linux]
libc: [glibc]
+ resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [x64]
+ os: [linux]
+ libc: [glibc]
+
resolution: {integrity: sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==}
engines: {node: '>= 12.0.0'}
@@ -9905,6 +10080,13 @@ packages:
os: [linux]
libc: [musl]
+ resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [x64]
+ os: [linux]
+ libc: [musl]
+
resolution: {integrity: sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==}
engines: {node: '>= 12.0.0'}
@@ -9923,6 +10105,12 @@ packages:
cpu: [arm64]
os: [win32]
+ resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [arm64]
+ os: [win32]
+
resolution: {integrity: sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==}
engines: {node: '>= 12.0.0'}
@@ -9941,6 +10129,12 @@ packages:
cpu: [x64]
os: [win32]
+ resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==}
+ engines: {node: '>= 12.0.0'}
+ cpu: [x64]
+ os: [win32]
+
resolution: {integrity: sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==}
engines: {node: '>= 12.0.0'}
@@ -9953,6 +10147,10 @@ packages:
resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==}
engines: {node: '>= 12.0.0'}
+ resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==}
+ engines: {node: '>= 12.0.0'}
+
resolution: {integrity: sha512-xIqbzPMBYArJRmPGUZD9CzV9wOqmVtQnaAn3wrj3s6WYW0bQvPI7x+sPYUGmDTYMHefVK//zc6HEYZ1qnxIK+Q==}
@@ -10539,6 +10737,11 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
+ resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==}
+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
+ hasBin: true
+
resolution: {integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==}
@@ -11083,6 +11286,10 @@ packages:
resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==}
engines: {node: '>=12'}
+ resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==}
+ engines: {node: '>=12'}
+
resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==}
@@ -11146,6 +11353,10 @@ packages:
resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==}
engines: {node: ^10 || ^12 || >=14}
+ resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==}
+ engines: {node: ^10 || ^12 || >=14}
+
resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==}
engines: {node: '>=4'}
@@ -11818,6 +12029,11 @@ packages:
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
+ resolution: {integrity: sha512-vMM4q3aixf46GiF1Kok8jDPFsEpXgFWGjUHXNkNHNm+Y2adXAG2dbX91jkti3i0ZRsOlcmbuzAz1poObSHCmUA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ hasBin: true
+
resolution: {integrity: sha512-T9mWdbWfQtp0B5lv/HX+wrhYsmXRlcWnXXmJbXqKJhlRaoS6KMhq0gpyzW4UJfclcxrEdLnTgjT2NjruLONu0g==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
@@ -12866,6 +13082,49 @@ packages:
'@vitest/browser-webdriverio':
optional: true
+ resolution: {integrity: sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ hasBin: true
+ peerDependencies:
+ '@types/node': 24.12.4
+ '@vitejs/devtools': ^0.4.0 || ^0.5.0
+ esbuild: ^0.27.0 || ^0.28.0
+ jiti: '>=1.21.0'
+ less: ^4.0.0
+ sass: ^1.70.0
+ sass-embedded: ^1.70.0
+ stylus: '>=0.54.8'
+ sugarss: ^5.0.0
+ terser: ^5.16.0
+ tsx: ^4.8.1
+ yaml: ^2.9.0
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+ '@vitejs/devtools':
+ optional: true
+ esbuild:
+ optional: true
+ jiti:
+ optional: true
+ less:
+ optional: true
+ sass:
+ optional: true
+ sass-embedded:
+ optional: true
+ stylus:
+ optional: true
+ sugarss:
+ optional: true
+ terser:
+ optional: true
+ tsx:
+ optional: true
+ yaml:
+ optional: true
+
resolution: {integrity: sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==}
peerDependencies:
@@ -15174,6 +15433,17 @@ snapshots:
transitivePeerDependencies:
- workerd
+ dependencies:
+ '@cloudflare/unenv-preset': 2.16.1([email protected])([email protected])
+ magic-string: 0.30.21
+ unenv: 2.0.0-rc.24
+ optionalDependencies:
+ rolldown: 1.1.5
+ transitivePeerDependencies:
+ - workerd
+
'@distilled.cloud/[email protected](@distilled.cloud/[email protected]([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected]))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected]))([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))':
dependencies:
'@alchemy.run/node-utils': 0.0.5
@@ -15184,6 +15454,20 @@ snapshots:
'@effect/platform-bun': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])
'@effect/platform-node': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected])
+ '@distilled.cloud/[email protected](6093597ae904d08741e8e8ac3f08a6e5)':
+ dependencies:
+ '@distilled.cloud/cloudflare': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@distilled.cloud/cloudflare-runtime': 0.13.10(@distilled.cloud/[email protected]([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected]))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected]))([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ effect: 4.0.0-beta.103(patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)
+ optionalDependencies:
+ '@effect/platform-bun': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])
+ '@effect/platform-node': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected])
+ transitivePeerDependencies:
+ - rolldown
+ - workerd
+
'@distilled.cloud/[email protected](f97c3167f1a1990dddb83bff73e575e5)':
dependencies:
'@distilled.cloud/cloudflare': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
@@ -17464,6 +17748,8 @@ snapshots:
'@oxc-project/[email protected]': {}
+ '@oxc-project/[email protected]': {}
+
optional: true
@@ -18478,78 +18764,117 @@ snapshots:
'@rivetkit/[email protected]': {}
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
dependencies:
'@emnapi/core': 1.10.0
@@ -18570,12 +18895,18 @@ snapshots:
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
'@rolldown/[email protected]':
optional: true
'@rolldown/[email protected]':
optional: true
+ '@rolldown/[email protected]':
+ optional: true
+
dependencies:
'@babel/core': 7.29.7
@@ -20027,6 +20358,69 @@ snapshots:
- utf-8-validate
- workerd
+ [email protected](be45c0a0ef6c0522fc35072b6c9c2266):
+ dependencies:
+ '@alchemy.run/node-utils': 0.0.5
+ '@aws-sdk/credential-providers': 3.1062.0
+ '@clack/prompts': 0.11.0
+ '@distilled.cloud/aws': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@distilled.cloud/axiom': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@distilled.cloud/cloudflare': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@distilled.cloud/cloudflare-runtime': 0.13.10(@distilled.cloud/[email protected]([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected]))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected]))([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@distilled.cloud/cloudflare-vite-plugin': 0.13.10(6093597ae904d08741e8e8ac3f08a6e5)
+ '@distilled.cloud/core': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@distilled.cloud/neon': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@distilled.cloud/planetscale': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@effect/sql-d1': 4.0.0-beta.101([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@effect/vitest': 4.0.0-beta.103(patch_hash=a16b1e870d8c29e4a98b17cc4c638a4ff471753d8ca3487f78a22b759caf951b)([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ '@libsql/client': 0.17.3([email protected])([email protected])
+ '@octokit/rest': 22.0.1
+ '@octokit/webhooks': 14.2.0
+ '@smithy/node-config-provider': 4.4.6
+ '@smithy/shared-ini-file-loader': 4.5.6
+ '@smithy/types': 4.14.3
+ '@types/aws-lambda': 8.10.161
+ aws4fetch: 1.0.20
+ capnweb: 0.6.1
+ effect: 4.0.0-beta.103(patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)
+ fast-glob: 3.3.3
+ fast-xml-parser: 5.8.0
+ jszip: 3.10.1
+ libsodium-wrappers: 0.8.4
+ mongodb: 6.21.0(@aws-sdk/[email protected])([email protected])
+ mysql2: 3.22.4(@types/[email protected])
+ pathe: 2.0.3
+ pg: 8.21.0
+ picomatch: 4.0.4
+ react: 19.2.6
+ rolldown: 1.1.5
+ undici: 7.27.1
+ yaml: 2.9.0
+ optionalDependencies:
+ '@effect/platform-bun': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])
+ '@effect/platform-node': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected])
+ '@effect/sql-pg': 4.0.0-beta.103([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
+ drizzle-kit: 1.0.0-rc.4
+ drizzle-orm: 1.0.0-rc.4(364f9547bd74875ecdea197c1b3898c3)
+ transitivePeerDependencies:
+ - '@mongodb-js/zstd'
+ - '@types/node'
+ - '@types/react'
+ - bufferutil
+ - gcp-metadata
+ - kerberos
+ - mongodb-client-encryption
+ - pg-native
+ - react-devtools-core
+ - snappy
+ - socks
+ - utf-8-validate
+ - workerd
+
@@ -23708,6 +24102,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23717,6 +24114,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23726,6 +24126,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23735,6 +24138,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23744,6 +24150,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23753,6 +24162,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23762,6 +24174,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23771,6 +24186,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23780,6 +24198,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23789,6 +24210,9 @@ snapshots:
optional: true
+ optional: true
+
optional: true
@@ -23798,6 +24222,9 @@ snapshots:
optional: true
+ optional: true
+
dependencies:
detect-libc: 2.1.2
@@ -23845,6 +24272,22 @@ snapshots:
lightningcss-win32-arm64-msvc: 1.32.0
lightningcss-win32-x64-msvc: 1.32.0
+ dependencies:
+ detect-libc: 2.1.2
+ optionalDependencies:
+ lightningcss-android-arm64: 1.33.0
+ lightningcss-darwin-arm64: 1.33.0
+ lightningcss-darwin-x64: 1.33.0
+ lightningcss-freebsd-x64: 1.33.0
+ lightningcss-linux-arm-gnueabihf: 1.33.0
+ lightningcss-linux-arm64-gnu: 1.33.0
+ lightningcss-linux-arm64-musl: 1.33.0
+ lightningcss-linux-x64-gnu: 1.33.0
+ lightningcss-linux-x64-musl: 1.33.0
+ lightningcss-win32-arm64-msvc: 1.33.0
+ lightningcss-win32-x64-msvc: 1.33.0
+
dependencies:
'@promptbook/utils': 0.69.5
@@ -24733,6 +25176,8 @@ snapshots:
+
@@ -25310,6 +25755,8 @@ snapshots:
+
dependencies:
split2: 4.2.0
@@ -25398,6 +25845,12 @@ snapshots:
picocolors: 1.1.1
source-map-js: 1.2.1
+ dependencies:
+ nanoid: 3.3.18
+ picocolors: 1.1.1
+ source-map-js: 1.2.1
+
@@ -26370,6 +26823,27 @@ snapshots:
'@rolldown/binding-win32-arm64-msvc': 1.1.5
'@rolldown/binding-win32-x64-msvc': 1.1.5
+ dependencies:
+ '@oxc-project/types': 0.147.0
+ '@rolldown/pluginutils': 1.0.1
+ optionalDependencies:
+ '@rolldown/binding-android-arm-eabi': 1.2.6
+ '@rolldown/binding-android-arm64': 1.2.6
+ '@rolldown/binding-darwin-arm64': 1.2.6
+ '@rolldown/binding-darwin-x64': 1.2.6
+ '@rolldown/binding-freebsd-x64': 1.2.6
+ '@rolldown/binding-linux-arm-gnueabihf': 1.2.6
+ '@rolldown/binding-linux-arm64-gnu': 1.2.6
+ '@rolldown/binding-linux-arm64-musl': 1.2.6
+ '@rolldown/binding-linux-ppc64-gnu': 1.2.6
+ '@rolldown/binding-linux-s390x-gnu': 1.2.6
+ '@rolldown/binding-linux-x64-gnu': 1.2.6
+ '@rolldown/binding-linux-x64-musl': 1.2.6
+ '@rolldown/binding-openharmony-arm64': 1.2.6
+ '@rolldown/binding-win32-arm64-msvc': 1.2.6
+ '@rolldown/binding-win32-x64-msvc': 1.2.6
+
dependencies:
'@types/estree': 1.0.9
@@ -27559,6 +28033,21 @@ snapshots:
- utf-8-validate
- yaml
+ dependencies:
+ lightningcss: 1.33.0
+ picomatch: 4.0.7
+ postcss: 8.5.26
+ rolldown: 1.2.6
+ tinyglobby: 0.2.17
+ optionalDependencies:
+ '@types/node': 24.12.4
+ esbuild: 0.28.1
+ fsevents: 2.3.3
+ jiti: 2.7.0
+ terser: 5.48.0
+ yaml: 2.9.0
+
optionalDependencies:
diff --git a/scripts/dev-runner.test.ts b/scripts/dev-runner.test.ts
index 9fe2e76f9..66ed7641a 100644
--- a/scripts/dev-runner.test.ts
+++ b/scripts/dev-runner.test.ts
@@ -92,7 +92,7 @@ it.layer(NodeServices.layer)("dev-runner", (it) => {
"run",
"--filter=@t3tools/contracts",
"--filter=@t3tools/web",
- "--filter=t3",
+ "--filter=akeru-bot",
"--parallel",
"dev",
]);
diff --git a/scripts/dev-runner.ts b/scripts/dev-runner.ts
index 08b9e5cec..2a18dcff5 100644
--- a/scripts/dev-runner.ts
+++ b/scripts/dev-runner.ts
@@ -80,11 +80,11 @@ const MODE_ARGS = {
"run",
"--filter=@t3tools/contracts",
"--filter=@t3tools/web",
- "--filter=t3",
+ "--filter=akeru-bot",
"--parallel",
"dev",
],
- "dev:server": ["run", "--filter=t3", "dev"],
+ "dev:server": ["run", "--filter=akeru-bot", "dev"],
"dev:web": ["run", "--filter=@t3tools/web", "dev"],
"dev:desktop": ["run", "--filter=@t3tools/desktop", "--filter=@t3tools/web", "dev"],
} as const satisfies Record<string, ReadonlyArray<string>>;
diff --git a/scripts/release-smoke.ts b/scripts/release-smoke.ts
index 0e864e260..773661f91 100644
--- a/scripts/release-smoke.ts
+++ b/scripts/release-smoke.ts
@@ -65,7 +65,7 @@ for (const [needle, label] of [
["xcrun stapler staple", "DMG ticket stapling"],
["codesign --verify", "app signature verification"],
["spctl --assess", "Gatekeeper verification"],
- ["vp run --filter t3 build", "CLI and web build"],
+ ["vp run --filter akeru-bot build", "CLI and web build"],
["--dry-run", "CLI package dry-run"],
["vp run --filter @t3tools/marketing typecheck", "marketing typecheck"],
["vp run --filter @t3tools/marketing build", "marketing build"],