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
391 changes: 391 additions & 0 deletions docs/KNOWLEDGE_COMPOSITION.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/catalog/RECIPE_BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ deferred).
| --- | --- |
| **Intent** | A fictional makerspace helpdesk (“Bench Ticket”) runs a small support-desk site with first-party email-code login, sessions, mail to a catcher, and ticket create/list/reply. |
| **Packages (published)** | `@pegma/identity`, `@pegma/sessions`, `@pegma/mail`, `@pegma/rate-limit`, `@pegma/health`, `@pegma/support-desk-*`, `@pegma/storage-core`, `@pegma/spine` |
| **Adapters** | memory (local Docker); `storage-cloudflare-d1`; `storage-azure-tables`; forthcoming `storage-dynamodb` |
| **Adapters** | memory (local Docker); `storage-cloudflare-d1`; `storage-azure-tables`; published `storage-dynamodb@0.4.5` |
| **Host must provide** | HTTP, cookies, injected Store, mail catcher, email-code secret |
| **Non-goals** | Auth0/Entra/Cognito, Stripe, production email, passkeys-required login |
| **Anti-patterns** | Treating Support Desk as hosted SaaS; giving Audit/Mail their own store |
Expand Down
21 changes: 14 additions & 7 deletions evals/assembly-eval.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const EVAL_NPM: Record<string, string | null> = {
'@pegma/spine': '0.1.1',
'@pegma/storage-core': '0.4.0',
'@pegma/storage-azure-tables': '0.4.0',
'@pegma/storage-cloudflare-d1': '0.4.1',
'@pegma/storage-cloudflare-d1': '0.4.6',
'@pegma/storage-dynamodb': '0.4.5',
'@pegma/storage-blobs': '0.1.0',
'@pegma/storage-azure-blob': '0.1.0',
'@pegma/storage-cloudflare-r2': '0.1.0',
Expand Down Expand Up @@ -102,7 +103,9 @@ describe('assembly eval harness (Phase 5)', () => {
it('compiles the real catalog artifact (not a hand-built twin)', () => {
expect(catalog.schemaVersion).toBe('0.1.0');
expect(catalog.components.length).toBe(components.length);
const scaffold = catalog.recipes.find((r) => r.id === 'static-brochure-minimal');
const scaffold = catalog.recipes.find(
(r) => r.id === 'static-brochure-minimal',
);
expect(scaffold?.fixture.status).toBe('green');
expect(scaffold?.fixture.citation).toContain('scaffold-cf-minimal');
expect(scaffold?.capabilityTags).toEqual(['static_host']);
Expand Down Expand Up @@ -132,13 +135,17 @@ describe('assembly eval harness (Phase 5)', () => {
}
expect(withCatalog.passRate).toBe(1);

const staticCase = withCatalog.cases.find((c) => c.id === 'static-brochure')!;
const staticCase = withCatalog.cases.find(
(c) => c.id === 'static-brochure',
)!;
expect(staticCase.primaryRecipeId).toBe('static-brochure-minimal');

const healthCase = withCatalog.cases.find((c) => c.id === 'health-endpoint-only')!;
const healthCase = withCatalog.cases.find(
(c) => c.id === 'health-endpoint-only',
)!;
expect(healthCase.primaryRecipeId).not.toBe('static-brochure-minimal');
expect(healthCase.packageNames.some((p) => p.includes('@pegma/health'))).toBe(
true,
);
expect(
healthCase.packageNames.some((p) => p.includes('@pegma/health')),
).toBe(true);
});
});
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
"worker:dev": "wrangler dev -c worker/wrangler.jsonc",
"worker:deploy": "wrangler deploy -c worker/wrangler.jsonc",
"worker:tail": "wrangler tail pegma-dev-api",
"worker:types": "wrangler types worker/worker-configuration.d.ts -c worker/wrangler.jsonc"
"worker:types": "wrangler types worker/worker-configuration.d.ts -c worker/wrangler.jsonc && node scripts/normalize-worker-types.mjs"
},
"dependencies": {
"@modelcontextprotocol/server": "^2.0.0",
"@pegma/agent-access": "0.1.1",
"@pegma/audit": "0.2.0",
"@pegma/authorization-admin": "0.4.0",
"@pegma/authorization-core": "0.4.0",
Expand All @@ -29,14 +30,19 @@
"@pegma/authorization-storage": "0.4.0",
"@pegma/health": "^0.2.0",
"@pegma/identity": "0.1.2",
"@pegma/knowledge-base-application": "0.1.4",
"@pegma/knowledge-base-contracts": "0.1.4",
"@pegma/knowledge-base-core": "0.1.4",
"@pegma/knowledge-base-mcp": "0.1.4",
"@pegma/logger-cloudflare": "^0.1.1",
"@pegma/logger-datadog": "^0.1.1",
"@pegma/logger-tee": "^0.1.1",
"@pegma/mail": "0.1.1",
"@pegma/rate-limit": "0.2.0",
"@pegma/rate-limit-paged": "npm:@pegma/rate-limit@0.3.3",
"@pegma/sessions": "0.2.0",
"@pegma/spine": "^0.1.1",
"@pegma/storage-cloudflare-d1": "0.4.1",
"@pegma/storage-cloudflare-d1": "0.4.6",
"@pegma/storage-core": "0.4.0",
"@pegma/support-desk-application": "0.1.1",
"@pegma/support-desk-contracts": "0.1.1",
Expand Down
Loading
Loading