@flowriki/agent 0.1.0-beta.49 → 0.1.0-beta.50
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.
|
@@ -1684,6 +1684,21 @@ var BugSchema = z7.object({
|
|
|
1684
1684
|
updatedAt: z7.string()
|
|
1685
1685
|
}).strict();
|
|
1686
1686
|
var STOP = new Set("a an the and or of to in on for with by is are be as at it this that from user users can should must shall will when then given".split(" "));
|
|
1687
|
+
var CODEBASE_TAGS = ["all", "web", "android", "ios", "mobile", "other"];
|
|
1688
|
+
var CODEBASE_TAG_NAME = { all: "All combined", web: "Web", android: "Android", ios: "iOS", mobile: "Mobile", other: "Other" };
|
|
1689
|
+
var CodebaseIndexSchema = z8.object({
|
|
1690
|
+
schemaVersion: z8.literal(1).default(1),
|
|
1691
|
+
/** By the folder's page name (codebaseName), the tags it was given. */
|
|
1692
|
+
folders: z8.record(z8.object({ tags: z8.array(z8.enum(CODEBASE_TAGS)).default([]) }).strict()).default({})
|
|
1693
|
+
}).strict();
|
|
1694
|
+
function codebaseIndexOf(text) {
|
|
1695
|
+
try {
|
|
1696
|
+
const parsed = CodebaseIndexSchema.safeParse(JSON.parse(text ?? ""));
|
|
1697
|
+
return parsed.success ? parsed.data : CodebaseIndexSchema.parse({});
|
|
1698
|
+
} catch {
|
|
1699
|
+
return CodebaseIndexSchema.parse({});
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1687
1702
|
var ConversationSchema = z8.object({
|
|
1688
1703
|
id: z8.string().regex(/^conv_[A-Za-z0-9]+$/),
|
|
1689
1704
|
projectId: z8.string().min(1),
|
|
@@ -4071,6 +4086,8 @@ export {
|
|
|
4071
4086
|
PrerequisiteProblem,
|
|
4072
4087
|
expandForRun,
|
|
4073
4088
|
DeliveredHelperSchema,
|
|
4089
|
+
CODEBASE_TAG_NAME,
|
|
4090
|
+
codebaseIndexOf,
|
|
4074
4091
|
runWhereOf,
|
|
4075
4092
|
WEB_CLOUD_BROWSER_NAME,
|
|
4076
4093
|
webCloudOf,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
textIndependent,
|
|
66
66
|
validateActors,
|
|
67
67
|
webCloudOf
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-GLZFHC64.js";
|
|
69
69
|
|
|
70
70
|
// src/engine/machine.ts
|
|
71
71
|
import fs from "fs";
|
|
@@ -73,7 +73,7 @@ import os from "os";
|
|
|
73
73
|
import path from "path";
|
|
74
74
|
import { createRequire } from "module";
|
|
75
75
|
import { spawnSync } from "child_process";
|
|
76
|
-
var AGENT_VERSION = "0.1.0-beta.
|
|
76
|
+
var AGENT_VERSION = "0.1.0-beta.50";
|
|
77
77
|
async function prepareBrowsers() {
|
|
78
78
|
if (browsersReady()) {
|
|
79
79
|
return { ok: true, already: true, message: "chromium is already installed" };
|
|
@@ -133,7 +133,7 @@ async function checkMachine() {
|
|
|
133
133
|
}
|
|
134
134
|
} catch {
|
|
135
135
|
}
|
|
136
|
-
const { mobileDoctor: mobileDoctor2 } = await import("./dist-
|
|
136
|
+
const { mobileDoctor: mobileDoctor2 } = await import("./dist-Z3WSTACX.js");
|
|
137
137
|
return {
|
|
138
138
|
agentVersion: AGENT_VERSION,
|
|
139
139
|
node: process.versions.node,
|
package/dist/cli.js
CHANGED
|
@@ -23,13 +23,15 @@ import {
|
|
|
23
23
|
runtimeValue,
|
|
24
24
|
start,
|
|
25
25
|
status
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KRWHHKSS.js";
|
|
27
27
|
import {
|
|
28
28
|
CLOUD_PROVIDERS,
|
|
29
29
|
CLOUD_PROVIDER_NAME,
|
|
30
|
+
CODEBASE_TAG_NAME,
|
|
30
31
|
MobileLane,
|
|
31
32
|
RecordedStepSchema,
|
|
32
33
|
checkMobileAssertion,
|
|
34
|
+
codebaseIndexOf,
|
|
33
35
|
isMobile,
|
|
34
36
|
listDevices,
|
|
35
37
|
locate,
|
|
@@ -46,7 +48,7 @@ import {
|
|
|
46
48
|
screenLines,
|
|
47
49
|
stepRefusedOn,
|
|
48
50
|
targetFor
|
|
49
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-GLZFHC64.js";
|
|
50
52
|
|
|
51
53
|
// src/cli.ts
|
|
52
54
|
import { parseArgs } from "util";
|
|
@@ -1221,13 +1223,17 @@ THE MODEL \u2014 get this right before recording anything:
|
|
|
1221
1223
|
KNOWLEDGE: project_brief is the project's memory \u2014 read it first. Search the
|
|
1222
1224
|
knowledge pages with knowledge_search; read one with knowledge_read.
|
|
1223
1225
|
product.md is "About the product": the person's own description of
|
|
1224
|
-
the product, in their words, as long as they like \u2014 read it first.
|
|
1225
|
-
|
|
1226
|
-
|
|
1226
|
+
the product, in their words, as long as they like \u2014 read it first. Beside it,
|
|
1227
|
+
product/web.md, product/android.md and product/ios.md hold what is particular
|
|
1228
|
+
to that platform's app, when the project tests more than one. They
|
|
1229
|
+
write them, often with you in a conversation beside it; propose text there and
|
|
1230
|
+
let them decide, rather than writing product pages unless they ask you to.
|
|
1227
1231
|
A linked codebase folder is learned into
|
|
1228
1232
|
codebase/<folder>.md, which must start "# <folder>", then "Commit: <full sha>"
|
|
1229
1233
|
and "Learned: <yyyy-mm-dd>" lines: that is how the Knowledge screen shows it
|
|
1230
|
-
as learned.
|
|
1234
|
+
as learned. codebase.json says which platform's code each folder holds (Web,
|
|
1235
|
+
Android, iOS, Mobile, All combined, Other): read the web folder's page for a
|
|
1236
|
+
website test and the phone folder's for an app test. Keep what you learn with write_knowledge (features/<name>.md,
|
|
1231
1237
|
memory/decisions.md, a session summary), on Claude's branch for review \u2014
|
|
1232
1238
|
never a password, key or token.
|
|
1233
1239
|
|
|
@@ -2003,20 +2009,30 @@ Use it with start_flow signIn {"profileId": "\u2026", "accountId": "${made.accou
|
|
|
2003
2009
|
{
|
|
2004
2010
|
name: "project_brief",
|
|
2005
2011
|
title: "Read the project's memory",
|
|
2006
|
-
description: "The project's own knowledge, in one call: About the product (product.md), memory/decisions.md, what each linked codebase folder was learned as, and the list of feature pages and session summaries. Call it first in every conversation.",
|
|
2012
|
+
description: "The project's own knowledge, in one call: About the product (product.md, and product/<web|android|ios>.md where a platform differs), memory/decisions.md, what each linked codebase folder was learned as and which platform's code it holds, and the list of feature pages and session summaries. Call it first in every conversation.",
|
|
2007
2013
|
inputSchema: { type: "object", properties: { projectId: { type: "string" } }, additionalProperties: false },
|
|
2008
2014
|
annotations: { readOnlyHint: true },
|
|
2009
2015
|
run: async (args) => {
|
|
2010
2016
|
const projectId = await projectFor(args["projectId"]);
|
|
2011
2017
|
const { pages } = await service.knowledgePages(projectId);
|
|
2012
2018
|
const read = async (path2) => pages.some((p) => p.path === path2) ? (await service.knowledgePage(projectId, path2)).content : null;
|
|
2013
|
-
const [product, glossary, decisions] = await Promise.all(["product.md", "glossary.md", "memory/decisions.md"].map(read));
|
|
2019
|
+
const [product, glossary, decisions, web, android, ios, tagged] = await Promise.all(["product.md", "glossary.md", "memory/decisions.md", "product/web.md", "product/android.md", "product/ios.md", "codebase.json"].map(read));
|
|
2014
2020
|
const codebases = pages.filter((p) => p.path.startsWith("codebase/"));
|
|
2015
|
-
const
|
|
2016
|
-
const
|
|
2021
|
+
const tags = codebaseIndexOf(tagged).folders;
|
|
2022
|
+
const headers = await Promise.all(codebases.map(async (p) => {
|
|
2023
|
+
const holds = tags[p.path.slice("codebase/".length, -".md".length)]?.tags ?? [];
|
|
2024
|
+
return `- ${p.path}${holds.length ? ` (${holds.map((t) => CODEBASE_TAG_NAME[t]).join(", ")} code)` : ""}: ${(await read(p.path))?.split("\n").filter((l) => l.trim()).slice(0, 3).join(" \xB7 ") ?? ""}`;
|
|
2025
|
+
}));
|
|
2026
|
+
const shown = /* @__PURE__ */ new Set(["product.md", "glossary.md", "memory/decisions.md", "product/web.md", "product/android.md", "product/ios.md", "codebase.json", ...codebases.map((p) => p.path)]);
|
|
2017
2027
|
const parts = [
|
|
2018
2028
|
product ? `## About the product (product.md)
|
|
2019
2029
|
${product}` : "No About the product yet \u2014 the person writes it on the Knowledge screen; offer to help draft it.",
|
|
2030
|
+
web ? `## About the website (product/web.md)
|
|
2031
|
+
${web}` : "",
|
|
2032
|
+
android ? `## About the Android app (product/android.md)
|
|
2033
|
+
${android}` : "",
|
|
2034
|
+
ios ? `## About the iOS app (product/ios.md)
|
|
2035
|
+
${ios}` : "",
|
|
2020
2036
|
glossary ? `## glossary.md (older page; terms now belong in product.md)
|
|
2021
2037
|
${glossary}` : "",
|
|
2022
2038
|
decisions ? `## memory/decisions.md
|
|
@@ -2046,7 +2062,7 @@ ${pages.filter((p) => !shown.has(p.path)).map((p) => `- ${p.path}`).join("\n") |
|
|
|
2046
2062
|
{
|
|
2047
2063
|
name: "knowledge_read",
|
|
2048
2064
|
title: "Read a knowledge page",
|
|
2049
|
-
description: "Read one knowledge page by path (product.md, codebase/<folder>.md, features/<name>.md, memory/\u2026).",
|
|
2065
|
+
description: "Read one knowledge page by path (product.md, product/<web|android|ios>.md, codebase/<folder>.md, features/<name>.md, memory/\u2026).",
|
|
2050
2066
|
inputSchema: { type: "object", properties: { projectId: { type: "string" }, path: { type: "string" } }, required: ["path"], additionalProperties: false },
|
|
2051
2067
|
annotations: { readOnlyHint: true },
|
|
2052
2068
|
run: async (args) => {
|
|
@@ -2058,7 +2074,7 @@ ${pages.filter((p) => !shown.has(p.path)).map((p) => `- ${p.path}`).join("\n") |
|
|
|
2058
2074
|
{
|
|
2059
2075
|
name: "write_knowledge",
|
|
2060
2076
|
title: "Write a knowledge page",
|
|
2061
|
-
description: `Write what the project should remember, on Claude's working branch for review: product.md (About the product \u2014 the person's own description; write it only when they ask), codebase/<folder>.md (what a linked folder holds \u2014 starting with "# <folder>", "Commit: <sha>" and "Learned: <yyyy-mm-dd>" lines, then routes, screens, forms and their validation, roles, APIs, flags; summarised, never copied code), features/<name>.md (screens, rules, quirks), memory/decisions.md (decisions and conventions), memory/sessions/<yyyy-mm-dd>-<topic>.md (what a job did). append: true adds to the end instead of replacing. Never a password, key or token \u2014 those are refused.`,
|
|
2077
|
+
description: `Write what the project should remember, on Claude's working branch for review: product.md (About the product \u2014 the person's own description; write it only when they ask) and product/<web|android|ios>.md (what is particular to that platform's app), codebase/<folder>.md (what a linked folder holds \u2014 starting with "# <folder>", "Commit: <sha>" and "Learned: <yyyy-mm-dd>" lines, then routes, screens, forms and their validation, roles, APIs, flags; summarised, never copied code), features/<name>.md (screens, rules, quirks), memory/decisions.md (decisions and conventions), memory/sessions/<yyyy-mm-dd>-<topic>.md (what a job did). append: true adds to the end instead of replacing. Never a password, key or token \u2014 those are refused.`,
|
|
2062
2078
|
inputSchema: {
|
|
2063
2079
|
type: "object",
|
|
2064
2080
|
properties: { projectId: { type: "string" }, path: { type: "string" }, content: { type: "string" }, append: { type: "boolean" }, branch: { type: "string" } },
|
package/dist/engine.js
CHANGED
package/package.json
CHANGED