@mvarble/mesearch-workflow 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.md +109 -2
- package/agents/reference/authoring.md +127 -0
- package/agents/reference/workflow.md +106 -0
- package/agents/skills/wf-abandon/SKILL.md +16 -0
- package/agents/skills/wf-approve/SKILL.md +23 -0
- package/agents/skills/wf-build/SKILL.md +41 -0
- package/agents/skills/wf-plan/SKILL.md +47 -0
- package/agents/skills/wf-publish/SKILL.md +41 -0
- package/agents/skills/wf-reopen/SKILL.md +20 -0
- package/agents/skills/wf-resume/SKILL.md +16 -0
- package/agents/skills/wf-start/SKILL.md +25 -0
- package/agents/skills/wf-status/SKILL.md +12 -0
- package/agents/skills/wf-writeup/SKILL.md +58 -0
- package/app/ambient.d.ts +71 -0
- package/app/lib/components/CopyCode.svelte +24 -0
- package/app/lib/components/DocumentMap.svelte +38 -0
- package/app/lib/components/DocumentPage.svelte +184 -0
- package/app/lib/components/Icon.svelte +35 -0
- package/app/lib/components/ImageFigure.svelte +213 -0
- package/app/lib/components/LinkList.svelte +46 -0
- package/app/lib/components/ModelGraph.svelte +169 -0
- package/app/lib/components/OpenEntry.svelte +35 -0
- package/app/lib/components/PageList.svelte +35 -0
- package/app/lib/components/PrevNext.svelte +24 -0
- package/app/lib/components/Proof.svelte +12 -0
- package/app/lib/components/Shell.svelte +55 -0
- package/app/lib/components/Sidebar.svelte +77 -0
- package/app/lib/components/StageRail.svelte +30 -0
- package/app/lib/components/Statement.svelte +41 -0
- package/app/lib/components/Tex.svelte +25 -0
- package/app/lib/components/ThemeToggle.svelte +17 -0
- package/app/lib/components/Timeline.svelte +31 -0
- package/app/lib/components/Toc.svelte +41 -0
- package/app/lib/components/TopBar.svelte +55 -0
- package/app/lib/components/TrackCard.svelte +20 -0
- package/app/lib/documents.ts +52 -0
- package/app/lib/graph/describe.ts +29 -0
- package/app/lib/graph/geometry.ts +296 -0
- package/app/lib/graph/spec.ts +158 -0
- package/app/lib/kit.ts +11 -0
- package/app/lib/load.ts +12 -0
- package/app/lib/map.ts +6 -0
- package/app/lib/nav.ts +91 -0
- package/app/lib/questions.ts +33 -0
- package/app/lib/server/document.ts +117 -0
- package/app/lib/server/map.ts +41 -0
- package/app/lib/server/markdown.ts +134 -0
- package/app/lib/server/open.ts +35 -0
- package/app/lib/server/repo.ts +6 -0
- package/app/lib/server/specs.ts +26 -0
- package/app/lib/server/title.ts +9 -0
- package/app/lib/state/persisted.svelte.ts +40 -0
- package/app/lib/state/theme.svelte.ts +24 -0
- package/app/lib/tex.ts +99 -0
- package/app/params/slug.ts +5 -0
- package/app/params/track.ts +5 -0
- package/app/routes/+layout.ts +2 -0
- package/app/routes/[...key].md/+server.ts +19 -0
- package/app/routes/[track=track]/+page.server.ts +14 -0
- package/app/routes/[track=track]/+page.svelte +24 -0
- package/app/routes/[track=track]/[slug=slug]/+page.server.ts +9 -0
- package/app/routes/[track=track]/[slug=slug]/+page.svelte +7 -0
- package/app/routes/[track=track]/[slug=slug]/+page.ts +4 -0
- package/app/routes/archive/+page.server.ts +18 -0
- package/app/routes/archive/+page.svelte +44 -0
- package/app/routes/archive/[entry=slug]/+page.server.ts +9 -0
- package/app/routes/archive/[entry=slug]/+page.svelte +7 -0
- package/app/routes/archive/[entry=slug]/+page.ts +4 -0
- package/app/routes/archive/[entry=slug]/[name=slug]/+page.server.ts +14 -0
- package/app/routes/archive/[entry=slug]/[name=slug]/+page.svelte +7 -0
- package/app/routes/archive/[entry=slug]/[name=slug]/+page.ts +4 -0
- package/app/routes/llms-full.txt/+server.ts +17 -0
- package/app/routes/llms.txt/+server.ts +50 -0
- package/app/routes/math/+page.server.ts +21 -0
- package/app/routes/math/+page.svelte +56 -0
- package/app/routes/math/[slug=slug]/+page.server.ts +8 -0
- package/app/routes/math/[slug=slug]/+page.svelte +7 -0
- package/app/routes/math/[slug=slug]/+page.ts +4 -0
- package/app/styles/base.css +98 -0
- package/app/styles/code.css +83 -0
- package/app/styles/index.css +17 -0
- package/app/styles/katex.css +14 -0
- package/app/styles/layout.css +545 -0
- package/app/styles/text.css +96 -0
- package/app/styles/tokens/dimensions.css +31 -0
- package/app/styles/tokens/typography.css +33 -0
- package/app/styles/tokens.css +2 -0
- package/app/styles/utils/archive.css +339 -0
- package/app/styles/utils/buttons.css +28 -0
- package/app/styles/utils/callouts.css +41 -0
- package/app/styles/utils/cards.css +95 -0
- package/app/styles/utils/graph.css +186 -0
- package/app/styles/utils/map.css +45 -0
- package/app/styles/utils/tables.css +25 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +88 -0
- package/dist/cli.js.map +1 -0
- package/dist/engine/cli.d.ts +12 -0
- package/dist/engine/cli.js +744 -0
- package/dist/engine/cli.js.map +1 -0
- package/dist/engine/config.d.ts +40 -0
- package/dist/engine/config.js +16 -0
- package/dist/engine/config.js.map +1 -0
- package/dist/engine/lib.d.ts +108 -0
- package/dist/engine/lib.js +375 -0
- package/dist/engine/lib.js.map +1 -0
- package/dist/engine/main.d.ts +1 -0
- package/dist/engine/main.js +45 -0
- package/dist/engine/main.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/site/hooks.d.ts +27 -0
- package/dist/site/hooks.js +2 -0
- package/dist/site/hooks.js.map +1 -0
- package/dist/site/index.d.ts +1 -0
- package/dist/site/index.js +2 -0
- package/dist/site/index.js.map +1 -0
- package/dist/site/preset/index.d.ts +15 -0
- package/dist/site/preset/index.js +556 -0
- package/dist/site/preset/index.js.map +1 -0
- package/dist/site/preset/runtime.d.ts +42 -0
- package/dist/site/preset/runtime.js +99 -0
- package/dist/site/preset/runtime.js.map +1 -0
- package/dist/site/preset/types.d.ts +87 -0
- package/dist/site/preset/types.js +2 -0
- package/dist/site/preset/types.js.map +1 -0
- package/dist/site/vite.d.ts +14 -0
- package/dist/site/vite.js +202 -0
- package/dist/site/vite.js.map +1 -0
- package/dist/sync/index.d.ts +17 -0
- package/dist/sync/index.js +175 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/init.d.ts +7 -0
- package/dist/sync/init.js +62 -0
- package/dist/sync/init.js.map +1 -0
- package/dist/sync/render.d.ts +3 -0
- package/dist/sync/render.js +118 -0
- package/dist/sync/render.js.map +1 -0
- package/dist/sync/site.d.ts +3 -0
- package/dist/sync/site.js +58 -0
- package/dist/sync/site.js.map +1 -0
- package/package.json +78 -3
- package/templates/.agents/reference/authoring.md +11 -0
- package/templates/.agents/reference/stages/README.md +4 -0
- package/templates/AGENTS.md +36 -0
- package/templates/site/content/landing.md +5 -0
- package/templates/site/katex.config.ts +5 -0
- package/templates/site/package.json +22 -0
- package/templates/site/src/app.d.ts +8 -0
- package/templates/site/src/app.html +23 -0
- package/templates/site/src/lib/components/Logo.svelte +12 -0
- package/templates/site/src/lib/site.ts +39 -0
- package/templates/site/src/routes/+layout.server.ts +3 -0
- package/templates/site/src/routes/+layout.svelte +11 -0
- package/templates/site/src/routes/+page.server.ts +3 -0
- package/templates/site/src/routes/+page.svelte +34 -0
- package/templates/site/src/routes/+page.ts +7 -0
- package/templates/site/src/styles/index.css +4 -0
- package/templates/site/src/styles/tokens/colors.css +107 -0
- package/templates/site/static/favicon.svg +1 -0
- package/templates/site/tsconfig.json +20 -0
- package/templates/site/vite.config.ts +4 -0
- package/templates/workflow.config.ts +40 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
9
|
+
// The entry point `bin/wf` runs, from `.workflow/engine/` in a project: it loads the project's
|
|
10
|
+
// `workflow.config.ts` with Node alone (its imports are types, which Node strips), so it works
|
|
11
|
+
// before anything is installed.
|
|
12
|
+
import fs from 'node:fs';
|
|
13
|
+
import path from 'node:path';
|
|
14
|
+
import { pathToFileURL } from 'node:url';
|
|
15
|
+
import { run } from "./cli.js";
|
|
16
|
+
import { CONFIG_FILE } from "./config.js";
|
|
17
|
+
import { repoRoot, WorkflowError } from "./lib.js";
|
|
18
|
+
const argv = process.argv.slice(2);
|
|
19
|
+
// Only the hook reads stdin, and it is always given one.
|
|
20
|
+
const stdin = argv[0] == 'guard' ? fs.readFileSync(0, 'utf8') : undefined;
|
|
21
|
+
let root;
|
|
22
|
+
try {
|
|
23
|
+
root = repoRoot(process.cwd());
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
if (!(error instanceof WorkflowError))
|
|
27
|
+
throw error;
|
|
28
|
+
process.stderr.write(`wf: ${error.message}\n`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
const file = path.join(root, CONFIG_FILE);
|
|
32
|
+
if (!fs.existsSync(file)) {
|
|
33
|
+
// The guard runs before every edit, in any repository the hook is set for: without a config
|
|
34
|
+
// there are no rules to keep.
|
|
35
|
+
if (argv[0] == 'guard')
|
|
36
|
+
process.exit(0);
|
|
37
|
+
process.stderr.write(`wf: ${CONFIG_FILE} is missing at ${root}; \`mesearch-wf init\` writes one.\n`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
const config = (await import(__rewriteRelativeImportExtension(pathToFileURL(file).href))).default;
|
|
41
|
+
const result = run(argv, { cwd: process.cwd(), stdin, config });
|
|
42
|
+
process.stdout.write(result.stdout);
|
|
43
|
+
process.stderr.write(result.stderr);
|
|
44
|
+
process.exitC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,CAAC;IACvB,4FAA4F;IAC5F,8BAA8B;IAC9B,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO;QAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAChB,OAAO,WAAW,kBAAkB,IAAI,sCAAsC,CACjF,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AACD,MAAM,MAAM,GAAI,CAAC,MAAM,MAAM,kCAAC,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,EAAC,CAAiC,CAAC,OAAO,CAAC;AACjG,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AAChE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACpC,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { Area, CheckContext, KindConfig, StageConfig, WorkflowConfig, } from './engine/config.ts';
|
|
2
|
+
export { CONFIG_FILE } from './engine/config.ts';
|
|
3
|
+
export { run, type Result, type RunOptions } from './engine/cli.ts';
|
|
4
|
+
export type { ChangeGroup, ChangeLink, MarkdownContext, SiteHooks } from './site/hooks.ts';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAgC,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SiteDocument, SiteEntry } from './preset/types.ts';
|
|
2
|
+
export interface MarkdownContext {
|
|
3
|
+
doc: SiteDocument;
|
|
4
|
+
script: string;
|
|
5
|
+
file: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ChangeLink {
|
|
8
|
+
href: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** Set the label in the monospace face, as a crate's name. */
|
|
11
|
+
code?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ChangeGroup {
|
|
14
|
+
/** The sentence before the list: "The crates it changed:". */
|
|
15
|
+
intro: string;
|
|
16
|
+
links: ChangeLink[];
|
|
17
|
+
}
|
|
18
|
+
export interface SiteHooks {
|
|
19
|
+
/** What an entry changed besides its pages, as skoro lists the crates a branch touched. */
|
|
20
|
+
entryChanges?(entry: SiteEntry): ChangeGroup[];
|
|
21
|
+
/**
|
|
22
|
+
* Rewrites of a document's body for its Markdown export (`/<key>.md`, `llms-full.txt`), run in
|
|
23
|
+
* order after `<ModelGraph>` is described and before statements are quoted: replace a
|
|
24
|
+
* component of the site's own with text a reader without a browser can follow.
|
|
25
|
+
*/
|
|
26
|
+
markdown?: ((body: string, context: MarkdownContext) => string)[];
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/site/hooks.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { docsSite, type DocsSiteOptions } from './vite.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/site/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwB,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type DateProvider, type Preset } from '@mvarble/mesearch-cms';
|
|
2
|
+
export type * from './types.ts';
|
|
3
|
+
export type { SiteCms } from './runtime.ts';
|
|
4
|
+
export interface SitePresetOptions {
|
|
5
|
+
tracks: string[];
|
|
6
|
+
parts?: string[];
|
|
7
|
+
documents?: Record<string, string>;
|
|
8
|
+
contentDir?: string;
|
|
9
|
+
base?: string;
|
|
10
|
+
sectionTitles?: Record<string, string>;
|
|
11
|
+
statementComponent?: string;
|
|
12
|
+
dates?: DateProvider;
|
|
13
|
+
}
|
|
14
|
+
export declare const DEFAULT_DOCUMENTS: Record<string, string>;
|
|
15
|
+
export declare function docsPreset(options: SitePresetOptions): Preset;
|