@ignite-agent/agent 0.1.0 → 0.4.1

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.
Files changed (66) hide show
  1. package/AI.txt +7 -0
  2. package/LICENSE +57 -4
  3. package/README.md +194 -12
  4. package/dist/cli/index.js +105 -21
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/cli/project.d.ts +39 -0
  7. package/dist/cli/project.js +276 -0
  8. package/dist/cli/project.js.map +1 -0
  9. package/dist/client-public.d.ts +2 -0
  10. package/dist/client-public.js +3 -0
  11. package/dist/client-public.js.map +1 -0
  12. package/dist/client.d.ts +3 -1
  13. package/dist/client.js +7 -0
  14. package/dist/client.js.map +1 -1
  15. package/dist/env.js +1 -2
  16. package/dist/env.js.map +1 -1
  17. package/dist/ignite.css +228 -0
  18. package/dist/index.d.ts +9 -3
  19. package/dist/index.js +8 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/mcp.d.ts +22 -0
  22. package/dist/mcp.js +88 -0
  23. package/dist/mcp.js.map +1 -0
  24. package/dist/operator/blog.d.ts +21 -0
  25. package/dist/operator/blog.js +32 -0
  26. package/dist/operator/blog.js.map +1 -0
  27. package/dist/operator/card.d.ts +5 -0
  28. package/dist/operator/card.js +11 -0
  29. package/dist/operator/card.js.map +1 -0
  30. package/dist/operator/jsonld.d.ts +6 -0
  31. package/dist/operator/jsonld.js +6 -3
  32. package/dist/operator/jsonld.js.map +1 -1
  33. package/dist/operator/metadata.d.ts +1 -0
  34. package/dist/operator/metadata.js +1 -0
  35. package/dist/operator/metadata.js.map +1 -1
  36. package/dist/operator/page.d.ts +17 -0
  37. package/dist/operator/page.js +51 -0
  38. package/dist/operator/page.js.map +1 -0
  39. package/dist/operator/prose.d.ts +19 -0
  40. package/dist/operator/prose.js +26 -0
  41. package/dist/operator/prose.js.map +1 -0
  42. package/dist/operator/proxy.d.ts +2 -0
  43. package/dist/operator/proxy.js +43 -22
  44. package/dist/operator/proxy.js.map +1 -1
  45. package/dist/operator/robots.d.ts +1 -0
  46. package/dist/operator/robots.js +1 -0
  47. package/dist/operator/robots.js.map +1 -1
  48. package/dist/operator/sitemap-merge.d.ts +10 -0
  49. package/dist/operator/sitemap-merge.js +56 -0
  50. package/dist/operator/sitemap-merge.js.map +1 -0
  51. package/dist/operator/sitemap.d.ts +5 -1
  52. package/dist/operator/sitemap.js +28 -17
  53. package/dist/operator/sitemap.js.map +1 -1
  54. package/dist/operator/ui.d.ts +44 -0
  55. package/dist/operator/ui.js +477 -0
  56. package/dist/operator/ui.js.map +1 -0
  57. package/dist/operator/wiki.d.ts +21 -0
  58. package/dist/operator/wiki.js +41 -0
  59. package/dist/operator/wiki.js.map +1 -0
  60. package/dist/types.d.ts +39 -0
  61. package/onboarding/CLAUDE-CODE-SETUP.md +52 -18
  62. package/onboarding/CURSOR-SETUP.md +73 -0
  63. package/onboarding/LOVABLE-SETUP.md +76 -0
  64. package/onboarding/MIGRATE-EXISTING.md +94 -0
  65. package/onboarding/REPLIT-SETUP.md +76 -0
  66. package/package.json +32 -9
package/dist/types.d.ts CHANGED
@@ -36,3 +36,42 @@ export type MetadataDirective = {
36
36
  images?: string[];
37
37
  };
38
38
  };
39
+ export type FeedPage = {
40
+ slug: string;
41
+ kind: 'wiki' | 'article';
42
+ path: string;
43
+ title: string;
44
+ html: string;
45
+ updatedAt: string;
46
+ indexable: boolean;
47
+ excerpt?: string | null;
48
+ publishedAt?: string | null;
49
+ parent?: {
50
+ slug: string;
51
+ title: string;
52
+ path: string;
53
+ } | null;
54
+ author?: {
55
+ name: string;
56
+ url?: string | null;
57
+ image?: string | null;
58
+ } | null;
59
+ image?: {
60
+ url: string;
61
+ alt?: string | null;
62
+ width?: number | null;
63
+ height?: number | null;
64
+ } | null;
65
+ images?: Array<{
66
+ url: string;
67
+ alt?: string | null;
68
+ }> | null;
69
+ datePublished?: string | null;
70
+ dateModified?: string | null;
71
+ lastReviewed?: string | null;
72
+ };
73
+ export type FeedIndex = {
74
+ generatedAt: string;
75
+ version: string;
76
+ pages: FeedPage[];
77
+ };
@@ -1,51 +1,85 @@
1
1
  # Set up Ignite in this Next.js app (Claude Code prompt)
2
2
 
3
- Paste the block below to Claude Code (or any coding agent) from the root of your Next.js App Router project. It
4
- wires in `@ignite-agent/agent` and verifies the build. You need your Ignite site id and site token first — get them by
3
+ Paste the block below to Claude Code from the root of your Next.js App Router project. It wires in
4
+ `@ignite-agent/agent` and verifies the build. You need your Ignite site id and site token first — get them by
5
5
  running `npx ignite connect`, or from your Ignite workspace.
6
6
 
7
+ `AGENTS.md` in the package is the source of truth. This file is the copy-paste prompt.
8
+
7
9
  ---
8
10
 
9
- You are setting up the `@ignite-agent/agent` package in this Next.js App Router project. Do the following, then stop
10
- and report what changed.
11
+ You are setting up the `@ignite-agent/agent` package in this Next.js App Router project. Follow this exactly,
12
+ then stop and report what changed.
13
+
14
+ Hard rules:
15
+ - Server-only. Never `"use client"` on Ignite routes. Never fetch Ignite from the browser.
16
+ - Env vars are `IGNITE_SITE_ID` and `IGNITE_SITE_TOKEN`. Never `NEXT_PUBLIC_IGNITE_SITE_TOKEN`.
17
+ - Do not invent client-side fetching or MCP calls from React.
18
+ - Additive: if a target file already exists, show it and skip. Do not overwrite robots, sitemap, proxy,
19
+ middleware, or layout without asking.
20
+ - Never delete or replace an existing blog or wiki. If `app/blog` or `app/w` already has host pages, wrap
21
+ them (`tryLoadFeedPage` + `mergeSlugs`, local slugs win). Do not write the one-line Ignite re-export over
22
+ those files. See `onboarding/MIGRATE-EXISTING.md`.
23
+ - Use `app/` or `src/app/` according to this repo. Put `proxy.ts` / `middleware.ts` at the project root.
11
24
 
12
- 1. Confirm this is a Next.js App Router project (an `app/` directory, `next` in `package.json`). If it is a Pages
13
- Router project, stop and tell me — this setup targets the App Router.
25
+ 1. Confirm this is a Next.js App Router project (`app/` or `src/app/`, `next` in `package.json`). If it is a
26
+ Pages Router project, stop and tell me.
14
27
 
15
- 2. Install the package: `npm install @ignite-agent/agent` (use the project's package manager if it isn't npm).
28
+ 2. Install the package with this project's package manager (`npm install @ignite-agent/agent`, or pnpm/yarn/bun).
16
29
 
17
30
  3. Add the site credentials to `.env.local` (create it if missing), using the values I give you:
18
31
  ```
19
32
  IGNITE_SITE_ID=...
20
33
  IGNITE_SITE_TOKEN=...
21
34
  ```
22
- Never hardcode these in source. If the project deploys on Vercel or similar, remind me to set the same two
23
- environment variables there.
35
+ Never hardcode these in source. Remind me to set the same two in Vercel / the host.
24
36
 
25
- 4. Create `app/robots.ts` with exactly:
37
+ 4. Create these files (skip and show if they already exist):
26
38
  ```ts
39
+ // app/robots.ts (or src/app/robots.ts)
27
40
  export { default } from '@ignite-agent/agent/robots'
28
41
  ```
29
- If `app/robots.ts` already exists, show me its contents and ask before replacing.
30
-
31
- 5. Create `app/sitemap.ts` with exactly:
32
42
  ```ts
43
+ // app/sitemap.ts
33
44
  export { default } from '@ignite-agent/agent/sitemap'
34
45
  ```
35
- Same rule if it already exists.
46
+ ```ts
47
+ // app/w/[slug]/page.tsx
48
+ export { default, generateStaticParams, generateMetadata, revalidate } from '@ignite-agent/agent/wiki'
49
+ ```
50
+ ```ts
51
+ // app/w/page.tsx
52
+ export { WikiIndex as default, revalidate } from '@ignite-agent/agent/wiki'
53
+ ```
54
+ ```ts
55
+ // app/blog/[slug]/page.tsx
56
+ export { default, generateStaticParams, generateMetadata, revalidate } from '@ignite-agent/agent/blog'
57
+ ```
58
+ ```ts
59
+ // app/blog/page.tsx
60
+ export { BlogIndex as default, revalidate } from '@ignite-agent/agent/blog'
61
+ ```
36
62
 
37
- 6. In `app/layout.tsx`, import and render the JSON-LD component inside `<head>` (or at the top of `<body>` if the
38
- layout has no explicit `<head>`):
63
+ 5. In `app/layout.tsx` (or `src/app/layout.tsx`), import and render JSON-LD inside `<head>` (or at the top of
64
+ `<body>` if the layout has no explicit `<head>`):
39
65
  ```tsx
40
66
  import { IgniteJsonLd } from '@ignite-agent/agent/jsonld'
41
67
  // ...
42
68
  <IgniteJsonLd />
43
69
  ```
44
70
 
45
- 7. (Optional, recommended) Create `proxy.ts` at the project root with:
71
+ 6. Crawl logging, optional. If `package.json` has Next 15, create `middleware.ts` at the project root:
72
+ ```ts
73
+ export { middleware, config } from '@ignite-agent/agent/proxy'
74
+ ```
75
+ If Next 16+, create `proxy.ts` at the project root:
46
76
  ```ts
47
77
  export { proxy, config } from '@ignite-agent/agent/proxy'
48
78
  ```
49
79
  If a `proxy.ts` or `middleware.ts` already exists, do NOT overwrite it — show it to me and we will merge.
50
80
 
51
- 8. Run the build (`npm run build`) and report any errors. Do not change unrelated files.
81
+ 7. Brand, optional. If a global CSS file exists and does not already define `--ignite-color-text`, append the
82
+ mapping from the package README (shadcn uses `hsl(var(--foreground))`; full colors like oklch/hex use
83
+ `var(--foreground)`). Or run `npx ignite init` and let it write routes + the mapping.
84
+
85
+ 8. Run `npx ignite doctor` if possible, then the project build. Report errors. Do not change unrelated files.
@@ -0,0 +1,73 @@
1
+ # Set up Ignite in this Next.js app (Cursor prompt)
2
+
3
+ Paste the block below into Cursor Agent from the root of your Next.js App Router project. You need your Ignite
4
+ site id and site token first (`npx ignite connect`, or from your Ignite workspace).
5
+
6
+ You can also save this prompt as `.cursor/rules/ignite.mdc`. `AGENTS.md` in the package is the source of truth.
7
+
8
+ ---
9
+
10
+ You are setting up `@ignite-agent/agent` in this Next.js App Router project. Follow this exactly, then stop and
11
+ report what changed.
12
+
13
+ Hard rules:
14
+ - App Router only (`app/` or `src/app/`). Pages Router → stop.
15
+ - Server-only. No `"use client"` on Ignite routes. No `fetch` of the Ignite API from the browser.
16
+ - `.env.local`: `IGNITE_SITE_ID` and `IGNITE_SITE_TOKEN`. Never `NEXT_PUBLIC_IGNITE_SITE_TOKEN`.
17
+ - Do not call MCP (`npx ignite mcp`) from React. MCP is for the editor, not the app.
18
+ - If a target file already exists, show it and skip. Do not overwrite robots, sitemap, proxy, middleware, or
19
+ layout without asking.
20
+ - Never delete or replace an existing blog or wiki. Wrap host `/blog` and `/w` routes (`tryLoadFeedPage` +
21
+ `mergeSlugs`, local slugs win). See `onboarding/MIGRATE-EXISTING.md`.
22
+
23
+ 1. Confirm App Router (`app/` or `src/app/`, `next` in `package.json`).
24
+
25
+ 2. Install with this repo's package manager: `npm install @ignite-agent/agent` (or pnpm/yarn/bun).
26
+
27
+ 3. Write `.env.local` (create if missing) with the values I provide:
28
+ ```
29
+ IGNITE_SITE_ID=...
30
+ IGNITE_SITE_TOKEN=...
31
+ ```
32
+ Remind me to set the same two in Vercel / the host. Do not commit `.env.local`.
33
+
34
+ 4. Create these files under `app/` or `src/app/` to match the repo:
35
+ ```ts
36
+ // robots.ts
37
+ export { default } from '@ignite-agent/agent/robots'
38
+ ```
39
+ ```ts
40
+ // sitemap.ts
41
+ export { default } from '@ignite-agent/agent/sitemap'
42
+ ```
43
+ ```ts
44
+ // w/[slug]/page.tsx
45
+ export { default, generateStaticParams, generateMetadata, revalidate } from '@ignite-agent/agent/wiki'
46
+ ```
47
+ ```ts
48
+ // w/page.tsx
49
+ export { WikiIndex as default, revalidate } from '@ignite-agent/agent/wiki'
50
+ ```
51
+ ```ts
52
+ // blog/[slug]/page.tsx
53
+ export { default, generateStaticParams, generateMetadata, revalidate } from '@ignite-agent/agent/blog'
54
+ ```
55
+ ```ts
56
+ // blog/page.tsx
57
+ export { BlogIndex as default, revalidate } from '@ignite-agent/agent/blog'
58
+ ```
59
+
60
+ 5. In the root `layout.tsx`, render JSON-LD in `<head>` (or the top of `<body>`):
61
+ ```tsx
62
+ import { IgniteJsonLd } from '@ignite-agent/agent/jsonld'
63
+ <IgniteJsonLd />
64
+ ```
65
+
66
+ 6. Optional crawl logging. Next 15: project-root `middleware.ts` exporting `{ middleware, config }` from
67
+ `@ignite-agent/agent/proxy`. Next 16+: project-root `proxy.ts` exporting `{ proxy, config }`. Do not
68
+ overwrite an existing file.
69
+
70
+ 7. Optional brand. If `globals.css` has no `--ignite-color-text`, append the README mapping (shadcn:
71
+ `hsl(var(--foreground))`; oklch/hex: `var(--foreground)`). `npx ignite init` does routes + this mapping.
72
+
73
+ 8. Run `npx ignite doctor`, then the project build. Report errors. Do not change unrelated files.
@@ -0,0 +1,76 @@
1
+ # Set up Ignite in this Next.js app (Lovable prompt)
2
+
3
+ Paste the block below into Lovable. This package is **Next.js App Router and server-only**. If this Lovable
4
+ project is not Next.js App Router, stop — do not install it on a Vite SPA.
5
+
6
+ You need your Ignite site id and site token (`npx ignite connect`, or from your Ignite workspace).
7
+
8
+ `AGENTS.md` in the package is the source of truth.
9
+
10
+ ---
11
+
12
+ Set up `@ignite-agent/agent` in this project. Follow this exactly. Then stop and list every file you changed.
13
+
14
+ Hard rules (do not break these):
15
+ - This package is server-only. Do not add `"use client"` to any Ignite route.
16
+ - Do not fetch `app.igniteagent.ai` from the browser. Do not put the token in any `NEXT_PUBLIC_*` variable.
17
+ - Do not use MCP in the app. Do not add axios/SWR/React Query for Ignite.
18
+ - If this project is Vite, Remix, or Pages Router, stop and say so. Do not invent a client integration.
19
+ - If a target file already exists, show it and skip. Do not overwrite it.
20
+ - Never delete or replace an existing blog or wiki. Wrap host `/blog` and `/w` routes (`tryLoadFeedPage` +
21
+ `mergeSlugs`, local slugs win). See `onboarding/MIGRATE-EXISTING.md`.
22
+
23
+ 1. Confirm Next.js App Router: `app/` or `src/app/` exists, and `next` is in `package.json`.
24
+
25
+ 2. Install: `npm install @ignite-agent/agent` (use the project's package manager).
26
+
27
+ 3. Put secrets in the project's **server** environment (Lovable / host env UI and `.env.local` if the repo uses
28
+ it). Names:
29
+ ```
30
+ IGNITE_SITE_ID=...
31
+ IGNITE_SITE_TOKEN=...
32
+ ```
33
+ I will paste the values. Never print the token back in full in chat after writing it.
34
+
35
+ 4. Create these files under `app/` or `src/app/` (whichever this repo uses):
36
+ ```ts
37
+ // robots.ts
38
+ export { default } from '@ignite-agent/agent/robots'
39
+ ```
40
+ ```ts
41
+ // sitemap.ts
42
+ export { default } from '@ignite-agent/agent/sitemap'
43
+ ```
44
+ ```ts
45
+ // w/[slug]/page.tsx
46
+ export { default, generateStaticParams, generateMetadata, revalidate } from '@ignite-agent/agent/wiki'
47
+ ```
48
+ ```ts
49
+ // w/page.tsx
50
+ export { WikiIndex as default, revalidate } from '@ignite-agent/agent/wiki'
51
+ ```
52
+ ```ts
53
+ // blog/[slug]/page.tsx
54
+ export { default, generateStaticParams, generateMetadata, revalidate } from '@ignite-agent/agent/blog'
55
+ ```
56
+ ```ts
57
+ // blog/page.tsx
58
+ export { BlogIndex as default, revalidate } from '@ignite-agent/agent/blog'
59
+ ```
60
+ Leave those files as one-line re-exports. Do not restyle them in the route file.
61
+
62
+ 5. In the root layout, render:
63
+ ```tsx
64
+ import { IgniteJsonLd } from '@ignite-agent/agent/jsonld'
65
+ <IgniteJsonLd />
66
+ ```
67
+ inside `<head>` if present, otherwise at the top of `<body>`.
68
+
69
+ 6. Optional: Next 15 → `middleware.ts` at the project root exporting `{ middleware, config }` from
70
+ `@ignite-agent/agent/proxy`. Next 16+ → `proxy.ts` exporting `{ proxy, config }`. Skip if that file exists.
71
+
72
+ 7. Optional brand: if global CSS exists and has no `--ignite-color-text`, map host colors using the package
73
+ README. shadcn HSL channels need `hsl(var(--foreground))`. Full colors use `var(--foreground)`.
74
+
75
+ 8. Run the production build. Fix only errors caused by this setup. Report what you created and whether the
76
+ build passed.
@@ -0,0 +1,94 @@
1
+ # Keep existing blog / wiki routes
2
+
3
+ `npx ignite init` never overwrites `app/blog/**` or `app/w/**` if those files already exist.
4
+ Your posts stay. Ignite pages fill slugs the host does not already serve.
5
+
6
+ Collision rule: **local slug wins.** If both the host and the Hub have `/blog/hello`, the host page
7
+ renders. Do not delete host files. Do not re-export over them.
8
+
9
+ ## Page route (blog)
10
+
11
+ Rename nothing. Edit the existing `app/blog/[slug]/page.tsx` (or `src/app/...`) to try the local
12
+ loader first, then the Hub:
13
+
14
+ ```tsx
15
+ import { notFound } from 'next/navigation'
16
+ import {
17
+ FeedArticle,
18
+ feedPageMetadata,
19
+ generateStaticParams as igniteParams,
20
+ mergeSlugs,
21
+ revalidate,
22
+ tryLoadFeedPage,
23
+ } from '@ignite-agent/agent/blog'
24
+
25
+ export { revalidate }
26
+
27
+ export async function generateStaticParams() {
28
+ const local = await localSlugs()
29
+ return mergeSlugs(local, await igniteParams())
30
+ }
31
+
32
+ export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }) {
33
+ const { slug } = await params
34
+ const local = await loadLocal(slug)
35
+ if (local) return localMetadata(local)
36
+ const page = await tryLoadFeedPage('article', slug)
37
+ return page ? feedPageMetadata(page) : {}
38
+ }
39
+
40
+ export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
41
+ const { slug } = await params
42
+ const local = await loadLocal(slug)
43
+ if (local) return <ExistingPost post={local} />
44
+ const page = await tryLoadFeedPage('article', slug)
45
+ if (!page) notFound()
46
+ return <FeedArticle page={page} />
47
+ }
48
+ ```
49
+
50
+ Replace `localSlugs` / `loadLocal` / `ExistingPost` / `localMetadata` with the loaders you already
51
+ have. Wiki is the same with `@ignite-agent/agent/wiki` and `tryLoadFeedPage('wiki', slug)`.
52
+
53
+ ## Index route
54
+
55
+ If `app/blog/page.tsx` already lists your posts, keep it. Render Hub articles underneath (or in a
56
+ second section). Do not replace the page with `BlogIndex as default`.
57
+
58
+ ```tsx
59
+ import { BlogIndex } from '@ignite-agent/agent/blog'
60
+
61
+ export default async function Blog() {
62
+ return (
63
+ <main>
64
+ <ExistingIndex />
65
+ <BlogIndex />
66
+ </main>
67
+ )
68
+ }
69
+ ```
70
+
71
+ `BlogIndex` returns `null` when the Hub has no articles, so an empty feed does not blank the page.
72
+
73
+ ## Sitemap
74
+
75
+ If `app/sitemap.ts` already exists, leave it. `igniteSitemap()` already includes published wiki/blog
76
+ URLs. Merge them into the host list; do not drop local URLs.
77
+
78
+ ```ts
79
+ import igniteSitemap, { mergeSitemap } from '@ignite-agent/agent/sitemap'
80
+
81
+ export default async function sitemap() {
82
+ const local = await localSitemap()
83
+ return mergeSitemap(local, await igniteSitemap())
84
+ }
85
+ ```
86
+
87
+ Set `IGNITE_SITE_URL` so Ignite locs are absolute (`https://yourdomain.com/w/...`).
88
+
89
+ ## What not to do
90
+
91
+ - Do not delete `app/blog` or `app/w`.
92
+ - Do not write the one-line Ignite re-export over a host page.
93
+ - Do not fetch the Hub from a Client Component to "merge" feeds.
94
+ - Do not invent Hub slugs that copy local posts. New Ignite pages need unused slugs.
@@ -0,0 +1,76 @@
1
+ # Set up Ignite in this Next.js app (Replit Agent prompt)
2
+
3
+ Paste the block below into Replit Agent from the Next.js App Router Repl. Put the Ignite site token in
4
+ **Secrets**, not in client code.
5
+
6
+ You need your Ignite site id and site token (`npx ignite connect`, or from your Ignite workspace).
7
+
8
+ `AGENTS.md` in the package is the source of truth.
9
+
10
+ ---
11
+
12
+ Set up `@ignite-agent/agent` in this Repl. Follow this exactly, then stop and report what changed.
13
+
14
+ Hard rules:
15
+ - Next.js App Router only (`app/` or `src/app/`). If this Repl is not that, stop.
16
+ - Server-only. No `"use client"` on Ignite files. No `fetch` of Ignite from the browser.
17
+ - Secrets: `IGNITE_SITE_ID` and `IGNITE_SITE_TOKEN` in Replit Secrets (and `.env.local` if the Repl uses it).
18
+ Never `NEXT_PUBLIC_IGNITE_SITE_TOKEN`. Never put the token in `index.html` or a client component.
19
+ - Do not use MCP inside the web app.
20
+ - If a target file already exists, show it and skip.
21
+ - Never delete or replace an existing blog or wiki. Wrap host `/blog` and `/w` routes (`tryLoadFeedPage` +
22
+ `mergeSlugs`, local slugs win). See `onboarding/MIGRATE-EXISTING.md`.
23
+
24
+ 1. Confirm App Router (`app/` or `src/app/`, `next` in `package.json`).
25
+
26
+ 2. Install with the Repl's package manager: `npm install @ignite-agent/agent`.
27
+
28
+ 3. Set Secrets (Replit sidebar → Secrets), names exactly:
29
+ ```
30
+ IGNITE_SITE_ID=...
31
+ IGNITE_SITE_TOKEN=...
32
+ ```
33
+ I will paste the values. Also write `.env.local` with the same two if the project already uses dotenv.
34
+ Do not commit secrets.
35
+
36
+ 4. Create these files under `app/` or `src/app/`:
37
+ ```ts
38
+ // robots.ts
39
+ export { default } from '@ignite-agent/agent/robots'
40
+ ```
41
+ ```ts
42
+ // sitemap.ts
43
+ export { default } from '@ignite-agent/agent/sitemap'
44
+ ```
45
+ ```ts
46
+ // w/[slug]/page.tsx
47
+ export { default, generateStaticParams, generateMetadata, revalidate } from '@ignite-agent/agent/wiki'
48
+ ```
49
+ ```ts
50
+ // w/page.tsx
51
+ export { WikiIndex as default, revalidate } from '@ignite-agent/agent/wiki'
52
+ ```
53
+ ```ts
54
+ // blog/[slug]/page.tsx
55
+ export { default, generateStaticParams, generateMetadata, revalidate } from '@ignite-agent/agent/blog'
56
+ ```
57
+ ```ts
58
+ // blog/page.tsx
59
+ export { BlogIndex as default, revalidate } from '@ignite-agent/agent/blog'
60
+ ```
61
+
62
+ 5. In the root layout, add JSON-LD in `<head>` (or top of `<body>`):
63
+ ```tsx
64
+ import { IgniteJsonLd } from '@ignite-agent/agent/jsonld'
65
+ <IgniteJsonLd />
66
+ ```
67
+
68
+ 6. Optional crawl logging. Next 15: project-root `middleware.ts` exporting `{ middleware, config }` from
69
+ `@ignite-agent/agent/proxy`. Next 16+: project-root `proxy.ts` exporting `{ proxy, config }`. Do not
70
+ overwrite an existing file.
71
+
72
+ 7. Optional brand. If `globals.css` has no `--ignite-color-text`, append the README mapping. Or run
73
+ `npx ignite init`.
74
+
75
+ 8. Run `npx ignite doctor` if the CLI is available, then the Repl build. Report errors. Do not change
76
+ unrelated files.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@ignite-agent/agent",
3
- "version": "0.1.0",
4
- "description": "Ignite for Next.js: a drop-in App Router SDK for robots, sitemap, JSON-LD, metadata, crawl logging, and the approve-and-apply change loop, driven by your Ignite workspace.",
3
+ "version": "0.4.1",
4
+ "description": "Ignite for Next.js: App Router SDK for robots, sitemap, JSON-LD, metadata, crawl logging, and hosted wiki/blog pages. Server-only. The front end reads JSON; MCP is for coding agents, not the browser.",
5
5
  "type": "module",
6
- "license": "UNLICENSED",
6
+ "license": "SEE LICENSE IN LICENSE",
7
7
  "private": false,
8
8
  "publishConfig": {
9
9
  "access": "public"
@@ -16,7 +16,13 @@
16
16
  },
17
17
  "files": [
18
18
  "dist",
19
- "onboarding"
19
+ "onboarding",
20
+ "LICENSE",
21
+ "AI.txt",
22
+ "dist/ignite.css",
23
+ "!dist/**/*.test.js",
24
+ "!dist/**/*.test.d.ts",
25
+ "!dist/**/*.test.js.map"
20
26
  ],
21
27
  "exports": {
22
28
  ".": "./dist/index.js",
@@ -25,20 +31,28 @@
25
31
  "./jsonld": "./dist/operator/jsonld.js",
26
32
  "./metadata": "./dist/operator/metadata.js",
27
33
  "./proxy": "./dist/operator/proxy.js",
28
- "./client": "./dist/client.js"
34
+ "./wiki": "./dist/operator/wiki.js",
35
+ "./blog": "./dist/operator/blog.js",
36
+ "./client": "./dist/client-public.js",
37
+ "./styles.css": "./dist/ignite.css"
29
38
  },
30
39
  "scripts": {
31
- "build": "tsc -p tsconfig.json",
40
+ "build": "tsc -p tsconfig.json && node scripts/write-css.mjs",
32
41
  "prepublishOnly": "npm run build",
33
42
  "typecheck": "tsc -p tsconfig.json --noEmit",
34
- "test": "node --test dist/**/*.test.js"
43
+ "test": "npm run build && node --test dist/client.test.js dist/mcp.test.js dist/operator/ui.test.js dist/operator/sitemap-merge.test.js dist/cli/project.test.js"
44
+ },
45
+ "dependencies": {
46
+ "server-only": "^0.0.1"
35
47
  },
36
48
  "peerDependencies": {
37
49
  "next": ">=15.0.0 <17.0.0",
38
50
  "react": ">=18.2.0"
39
51
  },
40
52
  "peerDependenciesMeta": {
41
- "react": { "optional": true }
53
+ "react": {
54
+ "optional": true
55
+ }
42
56
  },
43
57
  "devDependencies": {
44
58
  "@types/node": "^22.0.0",
@@ -47,5 +61,14 @@
47
61
  "react": "^19.0.0",
48
62
  "typescript": "^5.6.0"
49
63
  },
50
- "keywords": ["ignite", "nextjs", "app-router", "robots", "sitemap", "json-ld", "metadata", "ai-search", "llm"]
64
+ "keywords": [
65
+ "ignite",
66
+ "nextjs",
67
+ "app-router",
68
+ "robots",
69
+ "sitemap",
70
+ "json-ld",
71
+ "metadata",
72
+ "ai-search"
73
+ ]
51
74
  }