mayura 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/docs/README.md +17 -5
- package/docs/cli/init.md +15 -3
- package/docs/guides/choosing-a-starter.md +80 -0
- package/docs/guides/framework-starters.md +5 -1
- package/docs/guides/hono.md +94 -0
- package/docs/guides/nextjs.md +94 -0
- package/docs/guides/nuxt.md +94 -0
- package/docs/guides/rag-deployment.md +48 -0
- package/docs/guides/rag-modal-pinecone-starter.md +63 -0
- package/docs/guides/rag-production.md +34 -15
- package/docs/guides/rag-quickstart.md +119 -0
- package/docs/guides/rag.md +11 -1
- package/docs/guides/react-router.md +94 -0
- package/docs/guides/release-readiness.md +76 -39
- package/docs/guides/sveltekit.md +94 -0
- package/docs/guides/tanstack-start.md +94 -0
- package/docs/integrations/reranker-cohere.md +1 -0
- package/docs/integrations/reranker-jina.md +1 -0
- package/docs/integrations/reranker-voyage.md +1 -0
- package/docs/integrations/vector-chroma.md +1 -0
- package/docs/integrations/vector-libsql.md +1 -0
- package/docs/integrations/vector-pgvector.md +1 -0
- package/docs/integrations/vector-pinecone.md +4 -1
- package/docs/integrations/vector-qdrant.md +1 -0
- package/docs/integrations/vector-weaviate.md +1 -0
- package/docs/introduction.md +5 -0
- package/docs/project/whats-new.md +70 -2
- package/docs/quickstart.md +5 -3
- package/lib/adapter-code-docker/image/Dockerfile +1 -1
- package/lib/adapter-code-docker/package.json +1 -1
- package/lib/adapter-code-quickjs/package.json +1 -1
- package/lib/adapter-mcp/package.json +1 -1
- package/lib/ag-ui/package.json +1 -1
- package/lib/artifacts/package.json +1 -1
- package/lib/auth/package.json +1 -1
- package/lib/authz/package.json +1 -1
- package/lib/browser/package.json +1 -1
- package/lib/cli/dist/index.d.ts +1 -1
- package/lib/cli/dist/index.d.ts.map +1 -1
- package/lib/cli/dist/index.js +63 -20
- package/lib/cli/dist/index.js.map +1 -1
- package/lib/cli/dist/interactive.js +2 -2
- package/lib/cli/dist/interactive.js.map +1 -1
- package/lib/cli/package.json +1 -1
- package/lib/cli/src/index.ts +51 -12
- package/lib/cli/src/interactive.ts +2 -2
- package/lib/cli/starter-assets/manifest.json +1 -0
- package/lib/cli/starters/hono/package.json +2 -2
- package/lib/cli/starters/rag-modal-pinecone/README.md +60 -0
- package/lib/cli/starters/rag-modal-pinecone/dot-env.example +23 -0
- package/lib/cli/starters/{event-automation → rag-modal-pinecone}/dot-gitignore +2 -4
- package/lib/cli/starters/rag-modal-pinecone/fixtures/on-call.md +4 -0
- package/lib/cli/starters/rag-modal-pinecone/mayura.project.json +13 -0
- package/lib/cli/starters/rag-modal-pinecone/modal-app.py +110 -0
- package/lib/cli/starters/rag-modal-pinecone/package.json +28 -0
- package/lib/cli/starters/rag-modal-pinecone/src/application.ts +148 -0
- package/lib/cli/starters/rag-modal-pinecone/src/cli.ts +78 -0
- package/lib/cli/starters/rag-modal-pinecone/src/hosted.ts +137 -0
- package/lib/cli/starters/rag-modal-pinecone/test/modal_worker_test.py +53 -0
- package/lib/cli/starters/rag-modal-pinecone/test/pipeline.test.ts +137 -0
- package/lib/cli/starters/{cli-agent → rag-modal-pinecone}/tsconfig.json +0 -1
- package/lib/client/package.json +1 -1
- package/lib/client-react/package.json +1 -1
- package/lib/code-mode/package.json +1 -1
- package/lib/code-mode-workflows/package.json +1 -1
- package/lib/context/package.json +1 -1
- package/lib/core/package.json +1 -1
- package/lib/exporter-otlp/dist/otlp-http-json.js +1 -1
- package/lib/exporter-otlp/dist/otlp-http-json.js.map +1 -1
- package/lib/exporter-otlp/dist/signals.js +2 -2
- package/lib/exporter-otlp/dist/signals.js.map +1 -1
- package/lib/exporter-otlp/package.json +1 -1
- package/lib/exporter-otlp/src/otlp-http-json.ts +1 -1
- package/lib/exporter-otlp/src/signals.ts +2 -2
- package/lib/files/package.json +1 -1
- package/lib/guardrails/package.json +1 -1
- package/lib/helpers/package.json +1 -1
- package/lib/keys/package.json +1 -1
- package/lib/memory/package.json +1 -1
- package/lib/memory-remote/package.json +1 -1
- package/lib/observability/package.json +1 -1
- package/lib/provider-anthropic/package.json +1 -1
- package/lib/provider-openai/package.json +1 -1
- package/lib/rag/package.json +1 -1
- package/lib/runtime/package.json +1 -1
- package/lib/sandbox/package.json +1 -1
- package/lib/sdk/package.json +1 -1
- package/lib/server/package.json +1 -1
- package/lib/server-node/package.json +1 -1
- package/lib/skills/package.json +1 -1
- package/lib/storage/package.json +1 -1
- package/lib/storage-contracts/package.json +1 -1
- package/lib/storage-postgres/package.json +1 -1
- package/lib/storage-sql/package.json +1 -1
- package/lib/storage-sqlite/package.json +1 -1
- package/lib/terminal/package.json +1 -1
- package/lib/testing/package.json +1 -1
- package/lib/threads/package.json +1 -1
- package/lib/tools/package.json +1 -1
- package/lib/voice/package.json +1 -1
- package/lib/workflows/package.json +1 -1
- package/lib/workstream/package.json +1 -1
- package/llms-full.txt +1362 -289
- package/llms.txt +17 -4
- package/package.json +4 -4
- package/lib/cli/starters/cli-agent/dot-github/workflows/ci.yml +0 -13
- package/lib/cli/starters/cli-agent/dot-gitignore +0 -10
- package/lib/cli/starters/event-automation/dot-dockerignore +0 -7
- package/lib/cli/starters/event-automation/dot-github/workflows/ci.yml +0 -13
- package/lib/cli/starters/event-automation/src/model.ts +0 -40
- package/lib/cli/starters/event-automation/tsconfig.json +0 -20
- package/lib/cli/starters/nextjs/Dockerfile +0 -12
- package/lib/cli/starters/nextjs/compose.yaml +0 -19
- package/lib/cli/starters/nextjs/dot-dockerignore +0 -11
- package/lib/cli/starters/nextjs/dot-env.example +0 -7
- package/lib/cli/starters/nextjs/scripts/setup.mjs +0 -9
- package/lib/cli/starters/nextjs/server/application.mjs +0 -74
- package/lib/cli/starters/nextjs/server/auth.mjs +0 -24
- package/lib/cli/starters/nextjs/server/worker.mjs +0 -11
- package/lib/cli/starters/nextjs/server/workflows.mjs +0 -23
- package/lib/cli/starters/nextjs/src/ChatApp.jsx +0 -57
- package/lib/cli/starters/nextjs/src/Notebook.jsx +0 -25
- package/lib/cli/starters/nextjs/src/components/mayura/approval.tsx +0 -142
- package/lib/cli/starters/nextjs/src/components/mayura/thread-history.tsx +0 -142
- package/lib/cli/starters/nextjs/src/components/mayura/thread-list.tsx +0 -9
- package/lib/cli/starters/nextjs/src/components/mayura/ui.css +0 -14
- package/lib/cli/starters/nextjs/src/connect.js +0 -21
- package/lib/cli/starters/nextjs/src/session.js +0 -138
- package/lib/cli/starters/nextjs/src/style.css +0 -11
- package/lib/cli/starters/nextjs/test/server.test.mjs +0 -95
- package/lib/cli/starters/nextjs/test/session.test.mjs +0 -16
- package/lib/cli/starters/nuxt/compose.yaml +0 -19
- package/lib/cli/starters/nuxt/dot-dockerignore +0 -11
- package/lib/cli/starters/nuxt/dot-env.example +0 -7
- package/lib/cli/starters/nuxt/dot-gitignore +0 -14
- package/lib/cli/starters/nuxt/scripts/setup.mjs +0 -9
- package/lib/cli/starters/nuxt/server/application.mjs +0 -74
- package/lib/cli/starters/nuxt/server/auth.mjs +0 -24
- package/lib/cli/starters/nuxt/server/worker.mjs +0 -11
- package/lib/cli/starters/nuxt/server/workflows.mjs +0 -23
- package/lib/cli/starters/nuxt/src/connect.js +0 -21
- package/lib/cli/starters/nuxt/src/session.js +0 -138
- package/lib/cli/starters/nuxt/src/style.css +0 -11
- package/lib/cli/starters/nuxt/test/server.test.mjs +0 -95
- package/lib/cli/starters/nuxt/test/session.test.mjs +0 -16
- package/lib/cli/starters/react-router/Dockerfile +0 -12
- package/lib/cli/starters/react-router/compose.yaml +0 -19
- package/lib/cli/starters/react-router/dot-dockerignore +0 -11
- package/lib/cli/starters/react-router/dot-env.example +0 -7
- package/lib/cli/starters/react-router/dot-gitignore +0 -14
- package/lib/cli/starters/react-router/scripts/setup.mjs +0 -9
- package/lib/cli/starters/react-router/server/application.mjs +0 -74
- package/lib/cli/starters/react-router/server/auth.mjs +0 -24
- package/lib/cli/starters/react-router/server/worker.mjs +0 -11
- package/lib/cli/starters/react-router/server/workflows.mjs +0 -23
- package/lib/cli/starters/react-router/src/ChatApp.jsx +0 -57
- package/lib/cli/starters/react-router/src/Notebook.jsx +0 -25
- package/lib/cli/starters/react-router/src/components/mayura/approval.tsx +0 -142
- package/lib/cli/starters/react-router/src/components/mayura/thread-history.tsx +0 -142
- package/lib/cli/starters/react-router/src/components/mayura/thread-list.tsx +0 -9
- package/lib/cli/starters/react-router/src/components/mayura/ui.css +0 -14
- package/lib/cli/starters/react-router/src/connect.js +0 -21
- package/lib/cli/starters/react-router/src/session.js +0 -138
- package/lib/cli/starters/react-router/src/style.css +0 -11
- package/lib/cli/starters/react-router/src/vite-env.d.ts +0 -1
- package/lib/cli/starters/react-router/test/server.test.mjs +0 -95
- package/lib/cli/starters/react-router/test/session.test.mjs +0 -16
- package/lib/cli/starters/research-team/dot-dockerignore +0 -7
- package/lib/cli/starters/research-team/dot-github/workflows/ci.yml +0 -13
- package/lib/cli/starters/research-team/dot-gitignore +0 -10
- package/lib/cli/starters/research-team/src/model.ts +0 -40
- package/lib/cli/starters/research-team/tsconfig.json +0 -20
- package/lib/cli/starters/support-agent/dot-dockerignore +0 -7
- package/lib/cli/starters/support-agent/dot-github/workflows/ci.yml +0 -13
- package/lib/cli/starters/support-agent/dot-gitignore +0 -10
- package/lib/cli/starters/support-agent/src/model.ts +0 -40
- package/lib/cli/starters/support-agent/tsconfig.json +0 -20
- package/lib/cli/starters/sveltekit/Dockerfile +0 -12
- package/lib/cli/starters/sveltekit/compose.yaml +0 -19
- package/lib/cli/starters/sveltekit/dot-dockerignore +0 -11
- package/lib/cli/starters/sveltekit/dot-env.example +0 -7
- package/lib/cli/starters/sveltekit/dot-gitignore +0 -14
- package/lib/cli/starters/sveltekit/scripts/setup.mjs +0 -9
- package/lib/cli/starters/sveltekit/server/application.mjs +0 -74
- package/lib/cli/starters/sveltekit/server/auth.mjs +0 -24
- package/lib/cli/starters/sveltekit/server/worker.mjs +0 -11
- package/lib/cli/starters/sveltekit/server/workflows.mjs +0 -23
- package/lib/cli/starters/sveltekit/src/connect.js +0 -21
- package/lib/cli/starters/sveltekit/src/session.js +0 -138
- package/lib/cli/starters/sveltekit/src/style.css +0 -11
- package/lib/cli/starters/sveltekit/src/view.js +0 -49
- package/lib/cli/starters/sveltekit/test/server.test.mjs +0 -95
- package/lib/cli/starters/sveltekit/test/session.test.mjs +0 -16
- package/lib/cli/starters/tanstack-start/Dockerfile +0 -12
- package/lib/cli/starters/tanstack-start/compose.yaml +0 -19
- package/lib/cli/starters/tanstack-start/dot-dockerignore +0 -11
- package/lib/cli/starters/tanstack-start/dot-env.example +0 -7
- package/lib/cli/starters/tanstack-start/dot-gitignore +0 -14
- package/lib/cli/starters/tanstack-start/scripts/setup.mjs +0 -9
- package/lib/cli/starters/tanstack-start/server/application.mjs +0 -74
- package/lib/cli/starters/tanstack-start/server/auth.mjs +0 -24
- package/lib/cli/starters/tanstack-start/server/worker.mjs +0 -11
- package/lib/cli/starters/tanstack-start/server/workflows.mjs +0 -23
- package/lib/cli/starters/tanstack-start/src/ChatApp.jsx +0 -57
- package/lib/cli/starters/tanstack-start/src/Notebook.jsx +0 -25
- package/lib/cli/starters/tanstack-start/src/components/mayura/approval.tsx +0 -142
- package/lib/cli/starters/tanstack-start/src/components/mayura/thread-history.tsx +0 -142
- package/lib/cli/starters/tanstack-start/src/components/mayura/thread-list.tsx +0 -9
- package/lib/cli/starters/tanstack-start/src/components/mayura/ui.css +0 -14
- package/lib/cli/starters/tanstack-start/src/connect.js +0 -21
- package/lib/cli/starters/tanstack-start/src/session.js +0 -138
- package/lib/cli/starters/tanstack-start/src/style.css +0 -11
- package/lib/cli/starters/tanstack-start/test/server.test.mjs +0 -95
- package/lib/cli/starters/tanstack-start/test/session.test.mjs +0 -16
- /package/lib/cli/{starters/hono/src/components/mayura/ui.css → starter-assets/011cacc77ada0de5b447674e9fc4374a247b9a46eb169722b12649753f24188f} +0 -0
- /package/lib/cli/{starters/hono/test/server.test.mjs → starter-assets/0c825d6a776673ec6274cfc29cd45b1a8c56dcb880c291a91075c77e1ef1e4f3} +0 -0
- /package/lib/cli/{starters/hono/server/auth.mjs → starter-assets/0dd570bfacc357d23be3340250090b9a4c6193a49cdd02e9b6789e7bee8433dd} +0 -0
- /package/lib/cli/{starters/hono/src/components/mayura/approval.tsx → starter-assets/11292bd14cdaf27a8f8317ba4ab768d706a726b2e26474b599f3db116674b4b3} +0 -0
- /package/lib/cli/{starters/nextjs/dot-gitignore → starter-assets/1873b02e070347f9a449e07084242982fa6af412c45aa764985d553975b64589} +0 -0
- /package/lib/cli/{starters/hono/src/style.css → starter-assets/2f3869e6d69134e43be713c4590bfe48896a5c54ece6ffc1a4f204cfcfe54218} +0 -0
- /package/lib/cli/{starters/hono/server/worker.mjs → starter-assets/350d77757f548369beff29d658cf1620752d4e23b4b732d99a1b403ca043137f} +0 -0
- /package/lib/cli/{starters/approval-workflow/src/model.ts → starter-assets/37294d24c04b71eaf6d6f0bd52fd4c1cc7a5d3cb63da9c7920ed1d44276da9cb} +0 -0
- /package/lib/cli/{starters/approval-workflow/tsconfig.json → starter-assets/4387d6537dd5924ae62326aa3d7d8cbad1e5abd930aecc9daa6fab1ac2f6ef24} +0 -0
- /package/lib/cli/{starters/hono/dot-dockerignore → starter-assets/4434be031b58cc6ee680b2860b2ad1fe4089af7ee866c13223dfb621dd042ff1} +0 -0
- /package/lib/cli/{starters/hono/src/ChatApp.jsx → starter-assets/46e199317648a076243d6c8e7ffedc48785a6ffc0f203b88c7c4a9479b34c5b9} +0 -0
- /package/lib/cli/{starters/hono/src/components/mayura/thread-history.tsx → starter-assets/4741fccbca2e0d2fc6f61d11af3cf7bcc5f0238b67bb46282287207abdc6c536} +0 -0
- /package/lib/cli/{starters/approval-workflow/dot-dockerignore → starter-assets/4be664708b0120da5d2b73c5a27968093da06b8728f88f2bda2a1ccbf40f6891} +0 -0
- /package/lib/cli/{starters/hono/server/workflows.mjs → starter-assets/4d11f729672df54969a851494877a3c5aee24bb8f8c68eacaaa22e715bf5ed69} +0 -0
- /package/lib/cli/{starters/hono/dot-env.example → starter-assets/4f141323062660c4dc5b563300d57bb4cdbdc7fe9bfba96e43d9c64bb274474e} +0 -0
- /package/lib/cli/{starters/hono/Dockerfile → starter-assets/5471b74c46258d1edb00eb8f60f4219c389a252f7e224f2692f8f3e71ae43e3e} +0 -0
- /package/lib/cli/{starters/hono/scripts/setup.mjs → starter-assets/56e2d6db9fe4b0449c979acd06947a5b776bcc645184b54b8d3654a48bd12c38} +0 -0
- /package/lib/cli/{starters/hono/src/Notebook.jsx → starter-assets/6138d1e2ca4469daf4f5545d140943f6e23b0c37f865051b266ec99695cf181a} +0 -0
- /package/lib/cli/{starters/hono/src/vite-env.d.ts → starter-assets/65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5} +0 -0
- /package/lib/cli/{starters/hono/server/application.mjs → starter-assets/757f43c27415654049ecf01b67d560c83d788108d1aebcf1f16a86d956bd7fb6} +0 -0
- /package/lib/cli/{starters/hono/src/components/mayura/thread-list.tsx → starter-assets/97601d0bf331df7bbde88f7ee269610bc8a1239f8eeb58fded6416e588a5b7dd} +0 -0
- /package/lib/cli/{starters/approval-workflow/dot-github/workflows/ci.yml → starter-assets/aa4182c76778ba2194ecbfde9a960c20181534fd1ab484df126278dbc6eb0186} +0 -0
- /package/lib/cli/{starters/hono/src/session.js → starter-assets/abcc6ebd29ba47a079befb6568054dec8f43d4c729187e4a3610af39789e77be} +0 -0
- /package/lib/cli/{starters/hono/compose.yaml → starter-assets/cc1df6f5ce0eebffc567ecea1d599eba97cd1b94ab01551085c0eb87a28e3a6c} +0 -0
- /package/lib/cli/{starters/hono/src/connect.js → starter-assets/cd3ddb959b277e7d495cc020a6f8146acfbcc9d05ececa3809e8aafcf84504d9} +0 -0
- /package/lib/cli/{starters/hono/test/session.test.mjs → starter-assets/dfe75fd07538427d80ba76767e037e929664c80ff5a41b7544496a789181bb73} +0 -0
- /package/lib/cli/{starters/approval-workflow/dot-gitignore → starter-assets/f3ef7285253ec9668732f535306beee602e91cb6e20f83d4799b3323399ce569} +0 -0
- /package/lib/cli/{starters/nuxt/src/view.js → starter-assets/ff840fe960683d377e78f731b5d4318adf6050384791fa20e4948d34192aa35d} +0 -0
package/README.md
CHANGED
|
@@ -34,6 +34,8 @@ with a CLI that scaffolds, runs and operates your project.
|
|
|
34
34
|
run.
|
|
35
35
|
- **Memory and context.** Native memory with keyword, semantic and hybrid search, plus Mem0, Supermemory and
|
|
36
36
|
OpenViking adapters.
|
|
37
|
+
- **Retrieval with citations.** Publish scoped documents through durable ingestion, retrieve exact evidence and
|
|
38
|
+
revoke source visibility before cleanup. [RAG quickstart](docs/guides/rag-quickstart.md)
|
|
37
39
|
- **Skills, MCP and Code Mode.** Load `SKILL.md` skills on demand, call MCP tools, and run model-written code in a
|
|
38
40
|
QuickJS or Docker sandbox.
|
|
39
41
|
- **Multi-agent.** Child agents, agents as tools and speculative branches under one shared budget.
|
package/docs/README.md
CHANGED
|
@@ -11,7 +11,8 @@ Mayura is a TypeScript framework for building AI agents, typed tools and durable
|
|
|
11
11
|
- [Introduction](introduction.md): what Mayura is and how its parts fit together.
|
|
12
12
|
- [Quickstart](quickstart.md): create a project, or add a first agent to your own.
|
|
13
13
|
- [Installation](installation.md): requirements, optional packages and TypeScript settings.
|
|
14
|
-
- [V1.2 release validation status](guides/release-readiness.md):
|
|
14
|
+
- [V1.2 release validation status](guides/release-readiness.md): stable publication, all 106 trusted publishers, preserved prerelease tags and remaining limits.
|
|
15
|
+
- [Choose a starter](guides/choosing-a-starter.md): pick a complete application, a framework notebook or a focused template.
|
|
15
16
|
- [Using Mayura with AI coding agents](ai-agents.md): documentation your assistant can read offline.
|
|
16
17
|
|
|
17
18
|
## Concepts
|
|
@@ -24,10 +25,21 @@ Mayura is a TypeScript framework for building AI agents, typed tools and durable
|
|
|
24
25
|
- [Costs and budgets](concepts/costs-and-budgets.md): prices, cost caps and shared budgets.
|
|
25
26
|
- [Workflows](concepts/workflows.md): multi-step work, in memory or durable.
|
|
26
27
|
|
|
27
|
-
- [
|
|
28
|
-
|
|
28
|
+
- [RAG quickstart](guides/rag-quickstart.md): ingest Markdown, retrieve a cited passage and delete the source locally.
|
|
29
29
|
- [Retrieval augmented generation](guides/rag.md): scoped evidence, durable ingestion, vector stores and reranking.
|
|
30
|
-
- [RAG production qualification](guides/rag-production.md): the
|
|
30
|
+
- [RAG production qualification](guides/rag-production.md): the qualification matrix, measured recall and latency, and experimental configurations.
|
|
31
|
+
- [Build and deploy a retrieval agent](guides/rag-deployment.md): from offline testing to a scoped hosted deployment.
|
|
32
|
+
- [Modal + Pinecone RAG starter](guides/rag-modal-pinecone-starter.md): run the demo and connect scoped hosted retrieval.
|
|
33
|
+
|
|
34
|
+
## Frameworks and starters
|
|
35
|
+
|
|
36
|
+
- [Framework starters](guides/framework-starters.md): shared notebook architecture, identity, persistence and workers.
|
|
37
|
+
- [Next.js](guides/nextjs.md): App Router, React thread history and tool approvals.
|
|
38
|
+
- [Hono](guides/hono.md): Fetch routing, Vite React and alternate runtime source.
|
|
39
|
+
- [React Router](guides/react-router.md): resource routes and owned React conversation controls.
|
|
40
|
+
- [TanStack Start](guides/tanstack-start.md): server routes, a React notebook and a separate worker.
|
|
41
|
+
- [SvelteKit](guides/sveltekit.md): native Svelte controls and headless conversation stores.
|
|
42
|
+
- [Nuxt](guides/nuxt.md): Nitro routing and native Vue conversation controls.
|
|
31
43
|
|
|
32
44
|
## Agents and models
|
|
33
45
|
|
|
@@ -247,7 +259,7 @@ Mayura is a TypeScript framework for building AI agents, typed tools and durable
|
|
|
247
259
|
|
|
248
260
|
## Project
|
|
249
261
|
|
|
250
|
-
- [What's new in 1.1](project/whats-new.md):
|
|
262
|
+
- [What's new in 1.2.1](project/whats-new.md): qualified RAG, configurable workflow limits and release history.
|
|
251
263
|
- [Versioning and stability](project/versioning.md): what each release promises.
|
|
252
264
|
- [Supported platforms](project/support.md): Node.js versions, operating systems and getting help.
|
|
253
265
|
- [Security model](project/security.md): what Mayura protects against, and reporting vulnerabilities.
|
package/docs/cli/init.md
CHANGED
|
@@ -6,8 +6,8 @@ description: "Create a Mayura project from a starter or a template with mayura i
|
|
|
6
6
|
`mayura init` creates a new project. You choose between two kinds of starting point:
|
|
7
7
|
|
|
8
8
|
- A **starter** is a complete application you can run, test and ship: configuration read from the environment,
|
|
9
|
-
tests and CI.
|
|
10
|
-
assistant.
|
|
9
|
+
tests and CI. Choose four server applications, six framework notebooks with persistent chat and exact approvals,
|
|
10
|
+
or the `cli-agent` command-line assistant. See [Choose a starter](../guides/choosing-a-starter.md).
|
|
11
11
|
- A **template** is one small file that shows one feature, with a `package.json` and `tsconfig.json` around it. Start
|
|
12
12
|
here to learn a single idea.
|
|
13
13
|
|
|
@@ -43,7 +43,8 @@ below instead.
|
|
|
43
43
|
|
|
44
44
|
### Choosing a model provider
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
The model-provider wizard offers the choices below. The [RAG starter](../guides/rag-modal-pinecone-starter.md)
|
|
47
|
+
starts offline and uses its generated README to configure both hosted services.
|
|
47
48
|
|
|
48
49
|
| Choice | What it asks for |
|
|
49
50
|
|---|---|
|
|
@@ -126,6 +127,17 @@ it does not do. The server starters use SQLite locally and PostgreSQL when `DATA
|
|
|
126
127
|
| `research-team` | Multi-agent research as one durable workflow: a planner, up to four parallel researchers over a source library and a writer whose citations are checked, under one shared budget. The report is stored as a content-addressed artifact, with optional OpenTelemetry traces. |
|
|
127
128
|
| `event-automation` | Signed webhooks start durable workflow runs in which a triage agent acts on a ticket tracker through MCP tools under explicit permissions. Forged, stale and replayed deliveries start nothing, and assigning an urgent ticket waits for operator approval. |
|
|
128
129
|
| `cli-agent` | A command-line assistant: `assistant chat`, or one request such as `assistant list files in src`, about the folder you run it in. File tools stay inside that folder and never open `.env` files, you confirm every write, skills load from `skills/`, and replies stream. `npm run dev` starts the chat. |
|
|
130
|
+
| [`rag-modal-pinecone`](../guides/rag-modal-pinecone-starter.md) | A retrieval agent with durable Markdown ingestion and exact citations. `npm run dev` runs the offline demo. Use the generated README to configure Modal and Pinecone. |
|
|
131
|
+
| `nextjs` | App Router notebook with persistent threads, exact note approvals and a separate indexing worker. |
|
|
132
|
+
| `hono` | Hono/Vite React notebook with a Node path and additional Bun, Deno and Workers source. |
|
|
133
|
+
| `react-router` | React Router resource routes and an owned React notebook interface. |
|
|
134
|
+
| `tanstack-start` | TanStack Start server routes, React notebook and separate worker. |
|
|
135
|
+
| `sveltekit` | Native Svelte controls with the headless conversation stores. |
|
|
136
|
+
| `nuxt` | Nitro server bridge and native Vue conversation controls. |
|
|
137
|
+
|
|
138
|
+
The framework notebooks first use `npm run setup` to create a local session, then `npm run dev` and a separate
|
|
139
|
+
`npm run worker`. See [framework starters](../guides/framework-starters.md) for the shared architecture and the
|
|
140
|
+
dedicated guide for your framework. This demonstration identity must be replaced before opening the app to customers.
|
|
129
141
|
|
|
130
142
|
Browse the source at
|
|
131
143
|
[packages/cli/starters](https://github.com/KartikeyAI/mayura/blob/main/packages/cli/starters).
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Choose a starter"
|
|
3
|
+
description: "Choose among runnable Mayura applications, six framework notebooks and focused templates, then follow the right setup path."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Start with the application shape you need. A **starter** includes an application, tests and configuration;
|
|
7
|
+
a **template** demonstrates one capability in a smaller project. Both can begin with offline model fixtures.
|
|
8
|
+
You do not need a model API key to learn the approval and persistence flow.
|
|
9
|
+
|
|
10
|
+
## Pick an application
|
|
11
|
+
|
|
12
|
+
| Your goal | Starter | What you start with |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| Chat inside Next.js | `nextjs` | App Router, React notebook, exact note approvals and indexing worker |
|
|
15
|
+
| Fetch routing with a separate frontend | `hono` | Hono, Vite React and additional runtime source |
|
|
16
|
+
| Chat in React Router | `react-router` | Resource routes and React notebook controls |
|
|
17
|
+
| Chat in TanStack Start | `tanstack-start` | Server routes and React notebook controls |
|
|
18
|
+
| Native Svelte chat | `sveltekit` | Svelte controls over the headless conversation stores |
|
|
19
|
+
| Native Vue chat | `nuxt` | Nitro routing and Vue conversation controls |
|
|
20
|
+
| A customer support service | `support-agent` | Scoped support chat and server deployment source |
|
|
21
|
+
| A durable review process | `approval-workflow` | A refund workflow that waits for human approval |
|
|
22
|
+
| Parallel research | `research-team` | Planner, researchers and writer with bounded shared spending |
|
|
23
|
+
| Webhook-driven work | `event-automation` | Signed webhook admission and durable MCP tool work |
|
|
24
|
+
| Interactive terminal use | `cli-agent` | Terminal conversation with confirmation for writes |
|
|
25
|
+
| A retrieval agent with citations | [`rag-modal-pinecone`](rag-modal-pinecone-starter.md) | Durable Markdown ingestion, an offline demo and optional hosted retrieval |
|
|
26
|
+
|
|
27
|
+
The six framework notebooks share one portable server application and the same scope, approval and recovery
|
|
28
|
+
contract. Choose the framework your team already operates; choosing a framework does not change an agent's authority.
|
|
29
|
+
Use [Next.js](nextjs.md), [Hono](hono.md), [React Router](react-router.md), [TanStack Start](tanstack-start.md),
|
|
30
|
+
[SvelteKit](sveltekit.md) or [Nuxt](nuxt.md) for exact setup and generated file locations.
|
|
31
|
+
|
|
32
|
+
## Generate a reviewed directory
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npx mayura@1.2.1 init --starter nextjs --directory ./my-notebook --apply
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Replace `nextjs` with the selected starter ID. The [initializer](../cli/init.md) supports a plan before writing and
|
|
39
|
+
refuses unapproved replacement of existing files. Run from a directory you own; use the generated README for that
|
|
40
|
+
starter's install, build and environment commands.
|
|
41
|
+
|
|
42
|
+
For a framework notebook:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
cd my-notebook
|
|
46
|
+
npm install
|
|
47
|
+
npm run setup
|
|
48
|
+
npm run dev
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use Node 24.14.1 or a later supported 24.x release; the Nuxt toolchain requires 24.15.0 or later.
|
|
52
|
+
Read the local token from ignored `.data/login-token`, enter it in the notebook and start `npm run worker` in another
|
|
53
|
+
terminal. Setup never prints that credential and does not overwrite existing credentials. Other starter families
|
|
54
|
+
have their own setup instructions; do not assume the notebook login flow applies to a CLI or support service.
|
|
55
|
+
|
|
56
|
+
## What to verify first
|
|
57
|
+
|
|
58
|
+
Send a note, inspect the proposed input, approve once and inspect its recorded outcome. Reject another proposal
|
|
59
|
+
and confirm that it did not write. Let the separate worker process indexing, then reload and reconnect to inspect
|
|
60
|
+
the saved thread. If submission is uncertain, retain its original input and key for explicit recovery.
|
|
61
|
+
|
|
62
|
+
The notebook is a local, single-user identity demonstration. Before exposing it to customers, replace its
|
|
63
|
+
authenticator with verified per-tenant identity. The host owns scope, route capabilities, tools and budgets;
|
|
64
|
+
browser data never grants authority. Keep secrets on the server and configure the exact public origin.
|
|
65
|
+
|
|
66
|
+
## Choose a template for one concept
|
|
67
|
+
|
|
68
|
+
Use the interactive initializer to see the current template catalog when you want a small example rather than a
|
|
69
|
+
complete service. Templates suit learning a tool schema, a model call or a workflow primitive. When adapting one
|
|
70
|
+
for customers, supply your own identity, persistence, server lifecycle, deployment and operational recovery.
|
|
71
|
+
|
|
72
|
+
## Before adding paid work
|
|
73
|
+
|
|
74
|
+
Select a [model provider](model-providers.md) or [AI gateway](ai-gateways.md), declare prices and a finite model-call
|
|
75
|
+
cap, and grant only the model/tools needed for the application. Preserve separate worker permissions and
|
|
76
|
+
[authorization](authorization.md). A UI approval does not authorize an unrelated workflow tool.
|
|
77
|
+
|
|
78
|
+
The V1.2 package release and cross-platform checks passed. Rendered browser, external provider and live deployment
|
|
79
|
+
qualification remain separate from offline fixture checks. Follow [framework architecture](framework-starters.md),
|
|
80
|
+
[deployment](deployment.md) and [release evidence](release-readiness.md) before production rollout.
|
|
@@ -16,6 +16,10 @@ scripted offline tests, a separate workflow worker, deployment files and an envi
|
|
|
16
16
|
| `sveltekit` | Catch-all `+server.ts` | Native Svelte with headless stores | Node worker |
|
|
17
17
|
| `nuxt` | Nitro catch-all with a Web Request/Response bridge | Native Vue with headless stores | Node worker |
|
|
18
18
|
|
|
19
|
+
Follow the dedicated setup for [Next.js](nextjs.md), [Hono](hono.md), [React Router](react-router.md),
|
|
20
|
+
[TanStack Start](tanstack-start.md), [SvelteKit](sveltekit.md) or [Nuxt](nuxt.md).
|
|
21
|
+
For other application shapes, see [Choose a starter](choosing-a-starter.md).
|
|
22
|
+
|
|
19
23
|
## Generate and connect
|
|
20
24
|
|
|
21
25
|
```sh
|
|
@@ -84,7 +88,7 @@ and generates, packs, installs and tests each server contract offline. Like the
|
|
|
84
88
|
are qualified in the workspace; generated packed installs qualify the Mayura server contract separately.
|
|
85
89
|
The shared runtime checks passed on Bun, Deno, workerd and Vercel Edge; they do not qualify the Hono-specific Bun/Deno entry points or a deployed Workers/D1 application. Those profiles and rendered browser interaction checks remain outstanding.
|
|
86
90
|
|
|
87
|
-
Tests, type checks, framework builds and mounted HTTP approval/worker flows passed locally on Windows using Node 24.15.0 for framework qualification.
|
|
91
|
+
Tests, type checks, framework builds and mounted HTTP approval/worker flows passed locally on Windows using Node 24.15.0 for framework qualification. The final V1.2 main qualification passed all 39 jobs, including Linux/macOS/Windows Node 22/24 consumer lanes. This does not establish rendered browser or live deployment qualification. TanStack's Node adapter uses a pinned Nitro beta; framework compiler integrations use TypeScript 6 tooling. Keep the starter's declared Node version and repeat qualification on the target deployment. See [release validation status](release-readiness.md).
|
|
88
92
|
|
|
89
93
|
The Stagehand/OpenAI/Zod and Mistral/OpenTelemetry peer conflicts are resolved in the workspace lockfile. An exact
|
|
90
94
|
local pnpm metadata hook gives the legacy OpenAI 4 SDK its own supported Zod 3 dependency; Mayura, Stagehand and
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Mayura with Hono"
|
|
3
|
+
description: "Run the Hono notebook starter with persistent threads, exact tool approvals, a scoped server and a separate durable worker."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the `hono` starter to build a Hono application with a working approval flow before adding a paid model.
|
|
7
|
+
It includes persistent scoped chat, a deterministic note agent, an explicit approve/reject interface and a separate
|
|
8
|
+
durable indexing worker. This is runnable application source, not a hosted service.
|
|
9
|
+
|
|
10
|
+
## Generate and run
|
|
11
|
+
|
|
12
|
+
Use Node 24.14.1 or a later supported 24.x version. Run the initializer from a directory you own;
|
|
13
|
+
inspect its plan before applying it to an existing project.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx mayura@1.2.1 init --starter hono --directory ./my-notebook --apply
|
|
17
|
+
cd my-notebook
|
|
18
|
+
npm install
|
|
19
|
+
npm run setup
|
|
20
|
+
npm run dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Open `http://localhost:3000`. Read the generated ignored `.data/login-token` file locally and enter its value in
|
|
24
|
+
the notebook's password field. Setup creates an eight-hour local session, never prints its token, and refuses to
|
|
25
|
+
replace existing credentials. Keep `.env` and `.data` out of source control.
|
|
26
|
+
|
|
27
|
+
In another terminal, inside the generated project:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npm run worker
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Follow a complete conversation
|
|
34
|
+
|
|
35
|
+
1. Connect with the local session and create a thread.
|
|
36
|
+
2. Send a note. Inspect the exact proposed input before approving or rejecting it.
|
|
37
|
+
3. Approve once: the note is saved and a separate durable indexing workflow is submitted.
|
|
38
|
+
4. Let the worker process the index job. Reload, re-enter the session and inspect the persisted history.
|
|
39
|
+
5. If a response is lost, inspect the saved run before using the explicit recovery action. Do not send the note again
|
|
40
|
+
with a new key to repair an uncertain write.
|
|
41
|
+
|
|
42
|
+
The fixture needs no provider API key, model billing or external write. A rejected proposal must not save a note.
|
|
43
|
+
Thread history and approval controls remain scoped to the identity verified by the server.
|
|
44
|
+
|
|
45
|
+
## Framework boundary
|
|
46
|
+
|
|
47
|
+
Hono mounts the native Fetch handler while Vite builds the React notebook. The Node entry point and the separate worker share the application configuration. Keep the API prefix and the origin-pinned browser transport in agreement when mounting behind another router.
|
|
48
|
+
|
|
49
|
+
| Part | Generated location |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| HTTP bridge | `server/hono-node.mjs` |
|
|
52
|
+
| Notebook interface | `src/` |
|
|
53
|
+
| Application and tool configuration | `server/application.mjs` |
|
|
54
|
+
| Session verification | `server/auth.mjs` |
|
|
55
|
+
| Background processing | `server/worker.mjs` |
|
|
56
|
+
|
|
57
|
+
The API is mounted at `/api/mayura/*`; the browser's origin-pinned transport preserves the native Mayura route
|
|
58
|
+
contract while adding that prefix. Start with the Node path before selecting another runtime. Review the generated start:bun, start:deno, dev:workers and deploy:workers scripts rather than reusing Node SQLite imports at the edge. Workers needs a configured D1 binding and secret identity directory; serve only built frontend assets.
|
|
59
|
+
|
|
60
|
+
## Customize identity, tools and storage
|
|
61
|
+
|
|
62
|
+
Replace the single-user demonstration authenticator with verified application identity before opening the app to
|
|
63
|
+
customers. The host fixes principal, project, route capabilities and agent permissions. Browser input cannot choose
|
|
64
|
+
a tenant or grant itself a capability. Never distribute one shared owner token to multiple customers.
|
|
65
|
+
|
|
66
|
+
The note agent and indexing worker have separate grants. If you replace the fixture model, declare the model grant,
|
|
67
|
+
prices, finite per-call cost cap and run budget. A gateway subscription does not remove those limits. See
|
|
68
|
+
[AI gateways](ai-gateways.md) and [authorization](authorization.md).
|
|
69
|
+
|
|
70
|
+
The starter also ships Bun and Deno entry points using PostgreSQL, and Workers source with a D1 binding, assets and a scheduled handler. Those application-specific profiles still need qualification on the target host; shared runtime CI is not a live Workers deployment check.
|
|
71
|
+
|
|
72
|
+
A note write and workflow submission are separate operations. If scheduling is unconfirmed after the note was saved,
|
|
73
|
+
reconcile the missing index job using the note's identity; never replay the browser write to repair scheduling.
|
|
74
|
+
See [framework starter architecture](framework-starters.md) for worker leadership, retention and recovery details.
|
|
75
|
+
|
|
76
|
+
## Verify your changes
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
npm test
|
|
80
|
+
npm run typecheck
|
|
81
|
+
npm run build
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The V1.2 release passed the complete cross-platform qualification matrix, including generated packed server
|
|
85
|
+
contracts and workspace framework builds/HTTP approval flows. Rendered browser interaction and actual framework
|
|
86
|
+
deployments are separate checks; qualify your target before exposing customer data. See
|
|
87
|
+
[release validation status](release-readiness.md) and [deployment](deployment.md).
|
|
88
|
+
|
|
89
|
+
## Continue building
|
|
90
|
+
|
|
91
|
+
- [Threads and compaction](threads.md): history, recording and bounded summaries.
|
|
92
|
+
- [Approvals and human input](approvals-and-human-input.md): exact-call decisions and durable resumption.
|
|
93
|
+
- [Copy-in UI](copy-in-ui.md) and [headless stores](react.md): customize the conversation interface.
|
|
94
|
+
- [Choose a starter](choosing-a-starter.md): compare this notebook with the other application shapes.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Mayura with Next.js"
|
|
3
|
+
description: "Run the Next.js notebook starter with persistent threads, exact tool approvals, a scoped server and a separate durable worker."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the `nextjs` starter to build a Next.js application with a working approval flow before adding a paid model.
|
|
7
|
+
It includes persistent scoped chat, a deterministic note agent, an explicit approve/reject interface and a separate
|
|
8
|
+
durable indexing worker. This is runnable application source, not a hosted service.
|
|
9
|
+
|
|
10
|
+
## Generate and run
|
|
11
|
+
|
|
12
|
+
Use Node 24.14.1 or a later supported 24.x version. Run the initializer from a directory you own;
|
|
13
|
+
inspect its plan before applying it to an existing project.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx mayura@1.2.1 init --starter nextjs --directory ./my-notebook --apply
|
|
17
|
+
cd my-notebook
|
|
18
|
+
npm install
|
|
19
|
+
npm run setup
|
|
20
|
+
npm run dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Open `http://localhost:3000`. Read the generated ignored `.data/login-token` file locally and enter its value in
|
|
24
|
+
the notebook's password field. Setup creates an eight-hour local session, never prints its token, and refuses to
|
|
25
|
+
replace existing credentials. Keep `.env` and `.data` out of source control.
|
|
26
|
+
|
|
27
|
+
In another terminal, inside the generated project:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npm run worker
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Follow a complete conversation
|
|
34
|
+
|
|
35
|
+
1. Connect with the local session and create a thread.
|
|
36
|
+
2. Send a note. Inspect the exact proposed input before approving or rejecting it.
|
|
37
|
+
3. Approve once: the note is saved and a separate durable indexing workflow is submitted.
|
|
38
|
+
4. Let the worker process the index job. Reload, re-enter the session and inspect the persisted history.
|
|
39
|
+
5. If a response is lost, inspect the saved run before using the explicit recovery action. Do not send the note again
|
|
40
|
+
with a new key to repair an uncertain write.
|
|
41
|
+
|
|
42
|
+
The fixture needs no provider API key, model billing or external write. A rejected proposal must not save a note.
|
|
43
|
+
Thread history and approval controls remain scoped to the identity verified by the server.
|
|
44
|
+
|
|
45
|
+
## Framework boundary
|
|
46
|
+
|
|
47
|
+
The App Router catch-all exports the native HTTP methods and uses the Node runtime. Keep the Mayura host in the server module; never import it into a client component. The page renders the React notebook while browser transport adds the API mount prefix.
|
|
48
|
+
|
|
49
|
+
| Part | Generated location |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| HTTP bridge | `app/api/mayura/[[...path]]/route.ts` |
|
|
52
|
+
| Notebook interface | `app/page.tsx` |
|
|
53
|
+
| Application and tool configuration | `server/application.mjs` |
|
|
54
|
+
| Session verification | `server/auth.mjs` |
|
|
55
|
+
| Background processing | `server/worker.mjs` |
|
|
56
|
+
|
|
57
|
+
The API is mounted at `/api/mayura/*`; the browser's origin-pinned transport preserves the native Mayura route
|
|
58
|
+
contract while adding that prefix. Keep interactive controls inside the existing client boundary. Customize the copied React components rather than sending the private session directory through page props. The server route must preserve event-stream response bodies and avoid caching authenticated run responses.
|
|
59
|
+
|
|
60
|
+
## Customize identity, tools and storage
|
|
61
|
+
|
|
62
|
+
Replace the single-user demonstration authenticator with verified application identity before opening the app to
|
|
63
|
+
customers. The host fixes principal, project, route capabilities and agent permissions. Browser input cannot choose
|
|
64
|
+
a tenant or grant itself a capability. Never distribute one shared owner token to multiple customers.
|
|
65
|
+
|
|
66
|
+
The note agent and indexing worker have separate grants. If you replace the fixture model, declare the model grant,
|
|
67
|
+
prices, finite per-call cost cap and run budget. A gateway subscription does not remove those limits. See
|
|
68
|
+
[AI gateways](ai-gateways.md) and [authorization](authorization.md).
|
|
69
|
+
|
|
70
|
+
Use the generated Node deployment first. A serverless Next.js host needs shared PostgreSQL and a trusted worker or scheduler outside the request lifecycle. A local SQLite file is not shared across function instances. The starter is not a React Server Actions transport: approvals go through the scoped HTTP API.
|
|
71
|
+
|
|
72
|
+
A note write and workflow submission are separate operations. If scheduling is unconfirmed after the note was saved,
|
|
73
|
+
reconcile the missing index job using the note's identity; never replay the browser write to repair scheduling.
|
|
74
|
+
See [framework starter architecture](framework-starters.md) for worker leadership, retention and recovery details.
|
|
75
|
+
|
|
76
|
+
## Verify your changes
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
npm test
|
|
80
|
+
npm run typecheck
|
|
81
|
+
npm run build
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The V1.2 release passed the complete cross-platform qualification matrix, including generated packed server
|
|
85
|
+
contracts and workspace framework builds/HTTP approval flows. Rendered browser interaction and actual framework
|
|
86
|
+
deployments are separate checks; qualify your target before exposing customer data. See
|
|
87
|
+
[release validation status](release-readiness.md) and [deployment](deployment.md).
|
|
88
|
+
|
|
89
|
+
## Continue building
|
|
90
|
+
|
|
91
|
+
- [Threads and compaction](threads.md): history, recording and bounded summaries.
|
|
92
|
+
- [Approvals and human input](approvals-and-human-input.md): exact-call decisions and durable resumption.
|
|
93
|
+
- [Copy-in UI](copy-in-ui.md) and [headless stores](react.md): customize the conversation interface.
|
|
94
|
+
- [Choose a starter](choosing-a-starter.md): compare this notebook with the other application shapes.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Mayura with Nuxt"
|
|
3
|
+
description: "Run the Nuxt notebook starter with persistent threads, exact tool approvals, a scoped server and a separate durable worker."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the `nuxt` starter to build a Nuxt application with a working approval flow before adding a paid model.
|
|
7
|
+
It includes persistent scoped chat, a deterministic note agent, an explicit approve/reject interface and a separate
|
|
8
|
+
durable indexing worker. This is runnable application source, not a hosted service.
|
|
9
|
+
|
|
10
|
+
## Generate and run
|
|
11
|
+
|
|
12
|
+
Use Node 24.15.0 or a later supported 24.x version. Run the initializer from a directory you own;
|
|
13
|
+
inspect its plan before applying it to an existing project.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx mayura@1.2.1 init --starter nuxt --directory ./my-notebook --apply
|
|
17
|
+
cd my-notebook
|
|
18
|
+
npm install
|
|
19
|
+
npm run setup
|
|
20
|
+
npm run dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Open `http://localhost:3000`. Read the generated ignored `.data/login-token` file locally and enter its value in
|
|
24
|
+
the notebook's password field. Setup creates an eight-hour local session, never prints its token, and refuses to
|
|
25
|
+
replace existing credentials. Keep `.env` and `.data` out of source control.
|
|
26
|
+
|
|
27
|
+
In another terminal, inside the generated project:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npm run worker
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Follow a complete conversation
|
|
34
|
+
|
|
35
|
+
1. Connect with the local session and create a thread.
|
|
36
|
+
2. Send a note. Inspect the exact proposed input before approving or rejecting it.
|
|
37
|
+
3. Approve once: the note is saved and a separate durable indexing workflow is submitted.
|
|
38
|
+
4. Let the worker process the index job. Reload, re-enter the session and inspect the persisted history.
|
|
39
|
+
5. If a response is lost, inspect the saved run before using the explicit recovery action. Do not send the note again
|
|
40
|
+
with a new key to repair an uncertain write.
|
|
41
|
+
|
|
42
|
+
The fixture needs no provider API key, model billing or external write. A rejected proposal must not save a note.
|
|
43
|
+
Thread history and approval controls remain scoped to the identity verified by the server.
|
|
44
|
+
|
|
45
|
+
## Framework boundary
|
|
46
|
+
|
|
47
|
+
The Nitro route converts the H3 event to a Web Request and returns the native Web Response through the H3 bridge. The Vue page uses headless stores and explicit controls. Keep credentials and the application host in private server configuration, outside public runtime config.
|
|
48
|
+
|
|
49
|
+
| Part | Generated location |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| HTTP bridge | `server/routes/api/mayura/[...path].ts` |
|
|
52
|
+
| Notebook interface | `app/app.vue` |
|
|
53
|
+
| Application and tool configuration | `server/application.mjs` |
|
|
54
|
+
| Session verification | `server/auth.mjs` |
|
|
55
|
+
| Background processing | `server/worker.mjs` |
|
|
56
|
+
|
|
57
|
+
The API is mounted at `/api/mayura/*`; the browser's origin-pinned transport preserves the native Mayura route
|
|
58
|
+
contract while adding that prefix. Retain the native Request/Response bridge when customizing Nitro middleware. Avoid reading and rebuilding approval payloads or buffering event streams in a page API wrapper. The React copy-in registry does not generate Vue components in 1.2; customize the supplied native Vue controls.
|
|
59
|
+
|
|
60
|
+
## Customize identity, tools and storage
|
|
61
|
+
|
|
62
|
+
Replace the single-user demonstration authenticator with verified application identity before opening the app to
|
|
63
|
+
customers. The host fixes principal, project, route capabilities and agent permissions. Browser input cannot choose
|
|
64
|
+
a tenant or grant itself a capability. Never distribute one shared owner token to multiple customers.
|
|
65
|
+
|
|
66
|
+
The note agent and indexing worker have separate grants. If you replace the fixture model, declare the model grant,
|
|
67
|
+
prices, finite per-call cost cap and run budget. A gateway subscription does not remove those limits. See
|
|
68
|
+
[AI gateways](ai-gateways.md) and [authorization](authorization.md).
|
|
69
|
+
|
|
70
|
+
Use Node 24.15.0 or a later supported 24.x version for the generated Nuxt toolchain. Build the Nitro application and run the separate worker against the same store. Select a deployment preset deliberately; the Node/SQLite application is not automatically portable to edge presets.
|
|
71
|
+
|
|
72
|
+
A note write and workflow submission are separate operations. If scheduling is unconfirmed after the note was saved,
|
|
73
|
+
reconcile the missing index job using the note's identity; never replay the browser write to repair scheduling.
|
|
74
|
+
See [framework starter architecture](framework-starters.md) for worker leadership, retention and recovery details.
|
|
75
|
+
|
|
76
|
+
## Verify your changes
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
npm test
|
|
80
|
+
npm run typecheck
|
|
81
|
+
npm run build
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The V1.2 release passed the complete cross-platform qualification matrix, including generated packed server
|
|
85
|
+
contracts and workspace framework builds/HTTP approval flows. Rendered browser interaction and actual framework
|
|
86
|
+
deployments are separate checks; qualify your target before exposing customer data. See
|
|
87
|
+
[release validation status](release-readiness.md) and [deployment](deployment.md).
|
|
88
|
+
|
|
89
|
+
## Continue building
|
|
90
|
+
|
|
91
|
+
- [Threads and compaction](threads.md): history, recording and bounded summaries.
|
|
92
|
+
- [Approvals and human input](approvals-and-human-input.md): exact-call decisions and durable resumption.
|
|
93
|
+
- [Copy-in UI](copy-in-ui.md) and [headless stores](react.md): customize the conversation interface.
|
|
94
|
+
- [Choose a starter](choosing-a-starter.md): compare this notebook with the other application shapes.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Build and deploy a retrieval agent
|
|
3
|
+
description: Start offline, connect a scoped vector store, and qualify retrieval and citations on your own workload.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Start with the [RAG quickstart](rag-quickstart.md) to ingest, retrieve, verify citations and delete a source
|
|
7
|
+
from an npm install. The [Modal + Pinecone starter](rag-modal-pinecone-starter.md) adds an offline demo
|
|
8
|
+
and an opt-in hosted walkthrough.
|
|
9
|
+
|
|
10
|
+
The repository also includes a single-file example in `examples/rag.mjs`. It ingests Markdown in a durable workflow, then answers with
|
|
11
|
+
citation identities using a scripted model and a deterministic hashing embedder. After building the workspace, run:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node examples/rag.mjs
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This exercises the ingestion, publication and retrieval paths without an API key. Use the
|
|
18
|
+
[RAG API guide](rag.md) to adapt the example to your application.
|
|
19
|
+
|
|
20
|
+
## Move from the example to your application
|
|
21
|
+
|
|
22
|
+
1. **Resolve scope on the server.** Derive the principal and project from the authenticated request. Create the
|
|
23
|
+
[retrieval tool](rag.md#scoped-retrieval-and-tools) with that scope and its permissions. Keep provider credentials in
|
|
24
|
+
host configuration, and keep scope and index selection out of the model's tool arguments.
|
|
25
|
+
2. **Pin the index space.** Record the embedder, dimensions, chunking settings and catalog scope together.
|
|
26
|
+
When changing any of these, prepare a new index space. For Pinecone, provision a cosine index with self-provided
|
|
27
|
+
vectors and matching dimensions. See the [Pinecone integration](../integrations/vector-pinecone.md).
|
|
28
|
+
3. **Publish from a separate ingestion workflow.** Stage embeddings first, then activate the exact revision through
|
|
29
|
+
the catalog. Keep ingestion credentials and write permission out of the answering path. Preserve the durable
|
|
30
|
+
journal so a restart can reuse completed work and surface uncertain results for reconciliation.
|
|
31
|
+
4. **Return evidence the viewer can open.** Resolve citations to the active source revision and check access at
|
|
32
|
+
display time. Keep citation IDs paired with their source offsets. Ask the agent to abstain when it lacks enough
|
|
33
|
+
evidence, and review generated claims against the cited passages.
|
|
34
|
+
|
|
35
|
+
## Qualify the deployment you intend to operate
|
|
36
|
+
|
|
37
|
+
Use representative documents and independently reviewed questions. Include single-source and multi-source
|
|
38
|
+
answers, insufficient-evidence cases, unpublished revisions and access denials. Evaluate evidence coverage and
|
|
39
|
+
answer grounding separately. Measure retrieval latency and full answer latency under expected concurrent load.
|
|
40
|
+
|
|
41
|
+
Exercise recovery by interrupting ingestion and retrieval. Verify which operations resume, which results are
|
|
42
|
+
reused, and how uncertain paid work is reconciled. Check that cleanup receipts account for every resource
|
|
43
|
+
allocated by the qualification run and preserve pre-existing resources.
|
|
44
|
+
|
|
45
|
+
Mayura V1.2.1 qualifies the [registered Modal and Pinecone Loki v28 profile](rag-production.md) within its
|
|
46
|
+
tested software-operations workload. Other combinations of corpus, models, providers and deployment settings
|
|
47
|
+
need their own evidence. The 4.725-second p95 upper bound applies to acquisition and ranking in the 40-case
|
|
48
|
+
evaluation. Use your own end-to-end measurements for an answer-latency target.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Run the Modal + Pinecone RAG starter
|
|
3
|
+
description: Generate the Mayura RAG starter, run its offline demo, and connect private Modal inference and a scoped Pinecone index.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The `rag-modal-pinecone` starter ingests Markdown through a durable workflow and returns an answer with exact
|
|
7
|
+
source revisions and offsets. It has an offline demo and a hosted mode using Nomic embeddings on Modal,
|
|
8
|
+
Pinecone vectors, and Modal DeepSeek for reranking and generation.
|
|
9
|
+
|
|
10
|
+
## Generate and run the demo
|
|
11
|
+
|
|
12
|
+
The starter is included in Mayura 1.2.2. Once that version is available on npm, generate the project with the
|
|
13
|
+
published CLI.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx mayura@1.2.2 init --starter rag-modal-pinecone --directory ./mayura-rag-starter --apply
|
|
17
|
+
cd mayura-rag-starter
|
|
18
|
+
npm install
|
|
19
|
+
npm run dev
|
|
20
|
+
npm test
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For a source checkout, run `pnpm build` and use the built CLI from the workspace root.
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
node packages/cli/dist/bin.js init --starter rag-modal-pinecone --directory ../mayura-rag-starter --apply
|
|
27
|
+
cd ../mayura-rag-starter
|
|
28
|
+
npm install
|
|
29
|
+
npm run dev
|
|
30
|
+
npm test
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The demo requires no API key and uses an in-memory vector store. It reads `fixtures/on-call.md` and prints a
|
|
34
|
+
JSON answer that includes the incident-summary deadline and a citation with its document, revision, chunk ID,
|
|
35
|
+
reference and exact offsets. The tests exercise the hosted protocol with local fixtures.
|
|
36
|
+
|
|
37
|
+
## Connect Modal and Pinecone
|
|
38
|
+
|
|
39
|
+
Follow the generated README to deploy `modal-app.py` as a private Modal Function and create a Modal workspace
|
|
40
|
+
proxy token before setting up a Shared Endpoint for DeepSeek V4.1 Flash 1017. In
|
|
41
|
+
[Pinecone](../integrations/vector-pinecone.md), create a dedicated
|
|
42
|
+
768-dimensional cosine index with self-provided vectors. The starter uses the `2025-10` data-plane API.
|
|
43
|
+
|
|
44
|
+
On Windows PowerShell, set `$env:PYTHONIOENCODING = 'utf-8'` before running `modal deploy` if your console
|
|
45
|
+
uses a legacy encoding. Modal streams the model pull's progress characters during the first image build.
|
|
46
|
+
|
|
47
|
+
Copy the generated `.env.example` to `.env`. Set the data-plane host and key, the Modal environment and SDK
|
|
48
|
+
credentials, the Modal inference endpoint hostname and proxy token, and the per-operation USD-micro bounds.
|
|
49
|
+
Use a stable principal ID, project ID and persistent SQLite path. Test with the sample public corpus first.
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
npm run build
|
|
53
|
+
npm run ingest -- --hosted on-call fixtures/on-call.md
|
|
54
|
+
npm run ask -- --hosted "When should the incident summary be posted?"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Pinecone can acknowledge changes before queries see them. Let the index catch up if the first search abstains.
|
|
58
|
+
When updating a source, ingest under its existing source ID and retain the same catalog. If an ingestion
|
|
59
|
+
acknowledgement is lost, keep the journal and run ID for [reconciliation](rag.md#durable-ingestion).
|
|
60
|
+
|
|
61
|
+
The starter shares the embedding model and provider choices of the [qualified Loki profile](rag-production.md).
|
|
62
|
+
Its example corpus, prompts and deployment have their own quality and capacity characteristics. Follow
|
|
63
|
+
[Build and deploy a retrieval agent](rag-deployment.md) to qualify your actual corpus, concurrency and scope policy.
|