Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Env flags (unset behavior):
| `HUB_DATA_DIR` | hub boot fails — required runtime config |
| `CI` | set by GitHub Actions; not a caller flag |
| `E2E_PROVIDER` / `E2E_PROVIDER_API_KEY` / `OLLAMA_BASE_URL` | live-inference e2e stays on the noop/stub path |
| `EVAL_PROVIDER` / `EVAL_PROVIDER_API_KEY` | `bun run eval` runs against the stub |
| `CHROME_PATH` | browser walkthrough falls back to platform defaults, fails if none exist |

## Tests
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/myra-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function readErrorBody(response: Response): Promise<string> {
}

/** Idempotently ensures the `package-registry` asset Myra's tarball is
* published into, mirroring `packages/onboarding`'s `ensureWorkflowAsset`
* published into, mirroring `the deleted onboarding package's `ensureWorkflowAsset`
* 409-then-list pattern. */
export async function ensureMyraSourceAsset(
tenantId: string,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/myra-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//
// The one variant that installs cleanly today, entirely over stock
// routes and with no hub or seed change, is the same shape
// `packages/onboarding`'s `seedTenant` and the e2e harness already push:
// `the deleted onboarding package's `seedTenant` and the e2e harness already push:
// the built definition rendered as the two-file source package
// `@corbits/workflows`' `renderWorkflowSourceTree` emits, published as a
// `tarball` inside a stock `package-registry` asset via `PUT
Expand Down
9 changes: 4 additions & 5 deletions apps/web/src/myra-workbench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import { listAgentDefinitions, type AgentDefinition } from "./agents-api";

export const MYRA_WORKBENCH_TITLE = "Myra";

/** The seeded workflow asset backing Myra
* (`packages/onboarding/src/tenant-seed.ts` deploys it as `assistant`,
* stamped with catalog displayName "Myra"). A
* chat's `definitionId` names this deployed definition's row id, never the
* asset name itself. */
/** The deployed workflow asset backing Myra (`myra-source.ts` /
* `myra-deploy.ts` deploy it as `assistant`, stamped with catalog
* displayName "Myra"). A chat's `definitionId` names this deployed
* definition's row id, never the asset name itself. */
const MYRA_ASSET_NAME = WORKFLOW_CATALOG.find(
(entry) => entry.displayName === MYRA_WORKBENCH_TITLE,
)?.assetName;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/onboarding/provider-connect-step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export type ExistingOffering = {
* ancestor, or minted by an earlier run of this step) needs no UI at
* all: every visible offering becomes `sourceOfferingIds`, and the
* lowest-priority one is the default — the same rule
* `resolveRealSourceOfferingIds` in `packages/onboarding` applies. */
* `resolveRealSourceOfferingIds` in the deleted onboarding package applies. */
export async function resolveExistingOffering(tenantId: string): Promise<ExistingOffering | null> {
const models = await getResolvedCatalog(tenantId);
const offerings = models
Expand Down
56 changes: 1 addition & 55 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions docs/local-rip.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
A "local rip" is the whole platform proof, run by hand on your own
machine, with your own real key: sign up, get a personal bench, connect a
real inference provider, and watch a working workbench come up in front of
you — nothing mocked, nothing skipped. `scripts/e2e/local-rip.test.ts`
proves the same path with a stubbed provider probe and a scratch database
(see its own header comment); this doc is the honest, no-shortcuts version
for a person, not CI.
you — nothing mocked, nothing skipped. `scripts/e2e/browser/walkthrough.ts` proves the same path end to end
against a real browser with a stubbed provider probe and a scratch
database; this doc is the honest, no-shortcuts version for a person, not
CI.

This covers the whole path: sign-up through a fully connected bench, with
a real inference provider wired up end to end.
Expand Down Expand Up @@ -59,7 +59,7 @@ The app root renders the sign-in screen when you're not authenticated
an account with any email/password. Self-serve sign-up is ungated in
stock composition — there is no signup mode left to open, so sign-up
works out of the box here, against `bun run dev` and any deployed hub
alike. `scripts/e2e/local-rip.test.ts`'s "signup stays ungated once the
alike. `scripts/e2e/browser/walkthrough.ts`'s "signup stays ungated once the
hub is occupied" hop proves exactly that response.

## 3. Name your bench
Expand Down Expand Up @@ -116,7 +116,7 @@ through the hub's native asset REST routes). Descendants inherit it;
`seedTenant` does not pack. Isolated
tests run with no explicit tenant config so the walkthrough's personal
bench is itself the root — then the same publish happens once onto that
bench, and **assistant** comes up live by default; `scripts/e2e/local-rip.test.ts`
bench, and **assistant** comes up live by default; `scripts/e2e/browser/walkthrough.ts`
also deploys **echo** and **workbench-digest** from `CATALOG_WORKFLOWS`
onto that same bench (the on-demand path, exercised directly rather
than assumed) to prove they still come up live too. The default
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"setup": "bun scripts/db-setup.ts",
"setup:memory": "bun run scripts/setup-memory.ts",
"reset": "bun scripts/reset.ts",
"build:sidecar-image": "docker build -f apps/sidecar/Dockerfile -t corbits-sidecar:dev .",
"eval": "bun run scripts/evals-run.ts"
"build:sidecar-image": "docker build -f apps/sidecar/Dockerfile -t corbits-sidecar:dev ."
},
"devDependencies": {
"@corbits/artifacts": "github:corbitsdev/corbits-artifacts#5309a15d4aa504f132c54b4da08bb672b4903873",
Expand Down
2 changes: 1 addition & 1 deletion packages/chat/src/platform-port.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// than duplicating it inside this package (which would violate "apps
// stay generic; packages own the domain" the other way around), this
// package depends on this narrow port, injected by the hub exactly as
// `@workbench/onboarding` injects `pushWorkflow` instead of
// the deleted `@workbench/onboarding` used to inject `pushWorkflow` instead of
// reimplementing workflow push.
//
// Split into its three real seams — launching, mail, and the live
Expand Down
63 changes: 1 addition & 62 deletions packages/connections/src/connected-hook.test.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
import { describe, expect, spyOn, test } from "bun:test";
import * as errorSink from "@corbits/error-sink";
import {
fireConnectedHook,
fireInferenceCredentialSeedableHook,
type InferenceCredentialSeedableInfo,
type ServiceConnectedInfo,
} from "./connected-hook";

function seedableInfo(): InferenceCredentialSeedableInfo {
return {
userId: "user_1",
tenantId: "tenant_1",
tenantDomain: "tenant-1.example",
principalId: "principal_1",
provider: "ollama",
apiKey: "secret",
};
}
import { fireConnectedHook, type ServiceConnectedInfo } from "./connected-hook";

function connectedInfo(): ServiceConnectedInfo {
return {
Expand Down Expand Up @@ -55,48 +39,3 @@ describe("fireConnectedHook", () => {
report.mockRestore();
});
});

describe("fireInferenceCredentialSeedableHook", () => {
test("does nothing when no hook is wired", async () => {
await expect(
fireInferenceCredentialSeedableHook(undefined, () => {}, seedableInfo()),
).resolves.toBeUndefined();
});

test("calls the hook with the connect's tenant, provider, and key", async () => {
const calls: InferenceCredentialSeedableInfo[] = [];
await fireInferenceCredentialSeedableHook(
(info) => {
calls.push(info);
},
() => {},
seedableInfo(),
);
expect(calls).toEqual([seedableInfo()]);
});

test("logs and reports a hook failure rather than breaking the connect", async () => {
const report = spyOn(errorSink, "reportError").mockReturnValue("ref_test");
const logged: string[] = [];
await expect(
fireInferenceCredentialSeedableHook(
() => {
throw new Error("drain unavailable");
},
(line) => logged.push(line),
seedableInfo(),
),
).resolves.toBeUndefined();
expect(logged).toHaveLength(1);
expect(logged[0]).toContain("tenant_1");
expect(logged[0]).toContain("drain unavailable");
expect(report).toHaveBeenCalledTimes(1);
expect(report.mock.calls[0]?.[0]).toBeInstanceOf(Error);
expect(report.mock.calls[0]?.[1]).toMatchObject({
operation: "fire_inference_credential_seedable_hook",
tenantId: "tenant_1",
extra: { provider: "ollama" },
});
report.mockRestore();
});
});
Loading
Loading