@otea/cli 0.0.0-stage → 0.1.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 +661 -0
- package/README.es.md +151 -0
- package/README.md +252 -2
- package/THIRD_PARTY_NOTICES.md +114 -0
- package/bin/otea.mjs +28 -0
- package/dist/app/agent-detail.js +26 -0
- package/dist/app/agent-draft.js +429 -0
- package/dist/app/agent-prompts.js +52 -0
- package/dist/app/agents.js +77 -0
- package/dist/app/asking.js +43 -0
- package/dist/app/board-archive.js +243 -0
- package/dist/app/board-migration.js +272 -0
- package/dist/app/boards.js +870 -0
- package/dist/app/branch-owner.js +48 -0
- package/dist/app/brief.js +53 -0
- package/dist/app/choices.js +61 -0
- package/dist/app/collections.js +101 -0
- package/dist/app/context.js +1 -0
- package/dist/app/crop.js +56 -0
- package/dist/app/devices.js +62 -0
- package/dist/app/draft-request.js +82 -0
- package/dist/app/events.js +12 -0
- package/dist/app/evidence.js +287 -0
- package/dist/app/gates.js +610 -0
- package/dist/app/guide.js +37 -0
- package/dist/app/home.js +145 -0
- package/dist/app/init-boards.js +36 -0
- package/dist/app/intake.js +25 -0
- package/dist/app/item-search.js +141 -0
- package/dist/app/items.js +318 -0
- package/dist/app/keep-waiting.js +44 -0
- package/dist/app/land-order.js +107 -0
- package/dist/app/language.js +52 -0
- package/dist/app/launcher.js +56 -0
- package/dist/app/lease-take.js +54 -0
- package/dist/app/leases.js +86 -0
- package/dist/app/machine.js +39 -0
- package/dist/app/merged.js +89 -0
- package/dist/app/migrate.js +171 -0
- package/dist/app/next.js +1637 -0
- package/dist/app/notes.js +319 -0
- package/dist/app/notify-targets.js +113 -0
- package/dist/app/opened.js +25 -0
- package/dist/app/owner-only.js +34 -0
- package/dist/app/performance.js +28 -0
- package/dist/app/phone.js +97 -0
- package/dist/app/presence.js +596 -0
- package/dist/app/preset-views.js +25 -0
- package/dist/app/presets.js +129 -0
- package/dist/app/priority.js +156 -0
- package/dist/app/profile.js +86 -0
- package/dist/app/project.js +247 -0
- package/dist/app/proofs.js +179 -0
- package/dist/app/questions.js +215 -0
- package/dist/app/reader-filter.js +58 -0
- package/dist/app/relations.js +164 -0
- package/dist/app/relay.js +98 -0
- package/dist/app/repos.js +176 -0
- package/dist/app/restart.js +92 -0
- package/dist/app/set-aside.js +64 -0
- package/dist/app/system-locale.js +6 -0
- package/dist/app/tailscale-cli.js +77 -0
- package/dist/app/tailscale-testing.js +41 -0
- package/dist/app/tailscale.js +177 -0
- package/dist/app/tips.js +30 -0
- package/dist/app/topics-everywhere.js +53 -0
- package/dist/app/topics.js +453 -0
- package/dist/app/undo.js +52 -0
- package/dist/app/validate.js +131 -0
- package/dist/app/watch.js +48 -0
- package/dist/cli/command.js +44 -0
- package/dist/cli/commands.js +3303 -0
- package/dist/cli/exit-codes.js +70 -0
- package/dist/cli/forge.js +176 -0
- package/dist/cli/format.js +340 -0
- package/dist/cli/gh.js +17 -0
- package/dist/cli/gitrepo.js +489 -0
- package/dist/cli/help.js +101 -0
- package/dist/cli/hooks.js +232 -0
- package/dist/cli/main.js +37 -0
- package/dist/cli/merged-outside.js +58 -0
- package/dist/cli/names.js +154 -0
- package/dist/cli/opener.js +21 -0
- package/dist/cli/owner.js +154 -0
- package/dist/cli/phone.js +221 -0
- package/dist/cli/ports.js +24 -0
- package/dist/cli/probe.js +18 -0
- package/dist/cli/run.js +246 -0
- package/dist/cli/serve-file.js +21 -0
- package/dist/cli/stats.js +55 -0
- package/dist/cli/version.js +3 -0
- package/dist/core/agent-guide.js +31 -0
- package/dist/core/agent-prompts.js +139 -0
- package/dist/core/authority.js +94 -0
- package/dist/core/board/analysis.js +86 -0
- package/dist/core/board/choices.js +100 -0
- package/dist/core/board/compile.js +362 -0
- package/dist/core/board/engine.js +523 -0
- package/dist/core/board/hints.js +46 -0
- package/dist/core/board/history.js +146 -0
- package/dist/core/board/ids.js +87 -0
- package/dist/core/board/joins.js +30 -0
- package/dist/core/board/mentions.js +68 -0
- package/dist/core/board/merged.js +18 -0
- package/dist/core/board/model.js +135 -0
- package/dist/core/board/next.js +1116 -0
- package/dist/core/board/notes.js +298 -0
- package/dist/core/board/performance.js +218 -0
- package/dist/core/board/plan.js +299 -0
- package/dist/core/board/problems.js +232 -0
- package/dist/core/board/proofs.js +84 -0
- package/dist/core/board/questions.js +114 -0
- package/dist/core/board/reading.js +220 -0
- package/dist/core/board/readings.js +534 -0
- package/dist/core/board/schema.js +335 -0
- package/dist/core/board/shape-words.js +179 -0
- package/dist/core/board/template-words.js +23 -0
- package/dist/core/board/templates-catalogue.js +965 -0
- package/dist/core/board/templates-coverage.js +261 -0
- package/dist/core/board/templates-flows.js +779 -0
- package/dist/core/board/templates.js +586 -0
- package/dist/core/brief.js +93 -0
- package/dist/core/diagram.js +80 -0
- package/dist/core/errors.js +12 -0
- package/dist/core/evidence.js +33 -0
- package/dist/core/fields.js +129 -0
- package/dist/core/hierarchy.js +30 -0
- package/dist/core/icons.js +181 -0
- package/dist/core/image-crop.js +166 -0
- package/dist/core/item.js +49 -0
- package/dist/core/lease.js +31 -0
- package/dist/core/modules.js +318 -0
- package/dist/core/notify/planner.js +117 -0
- package/dist/core/notify/signals.js +66 -0
- package/dist/core/notify/text.js +60 -0
- package/dist/core/path-key.js +22 -0
- package/dist/core/placement.js +161 -0
- package/dist/core/preset-labels.js +66 -0
- package/dist/core/preset-notes.js +109 -0
- package/dist/core/preset.js +541 -0
- package/dist/core/profile.js +55 -0
- package/dist/core/project-id.js +20 -0
- package/dist/core/refusal.js +1 -0
- package/dist/core/relations.js +208 -0
- package/dist/core/repo.js +54 -0
- package/dist/core/samples.js +161 -0
- package/dist/core/search-words.js +68 -0
- package/dist/core/test-report.js +120 -0
- package/dist/core/time.js +8 -0
- package/dist/core/validation.js +60 -0
- package/dist/core/views.js +171 -0
- package/dist/core/workflow.js +51 -0
- package/dist/mcp/commands.js +101 -0
- package/dist/mcp/server.js +239 -0
- package/dist/mcp/words.js +95 -0
- package/dist/server/boards.js +232 -0
- package/dist/server/changes.js +42 -0
- package/dist/server/diff-tip.js +83 -0
- package/dist/server/drift.js +87 -0
- package/dist/server/errors.js +87 -0
- package/dist/server/evidence.js +82 -0
- package/dist/server/hosts.js +6 -0
- package/dist/server/hub.js +98 -0
- package/dist/server/lan-access.js +62 -0
- package/dist/server/lan.js +164 -0
- package/dist/server/listen.js +70 -0
- package/dist/server/notifier.js +156 -0
- package/dist/server/notify-api.js +151 -0
- package/dist/server/pairing.js +124 -0
- package/dist/server/projects.js +191 -0
- package/dist/server/push.js +199 -0
- package/dist/server/server.js +960 -0
- package/dist/server/session.js +43 -0
- package/dist/server/stream.js +36 -0
- package/dist/server/test-push.js +38 -0
- package/dist/server/token.js +37 -0
- package/dist/server/transports.js +54 -0
- package/dist/server/ui.js +44 -0
- package/dist/server/writes.js +361 -0
- package/dist/server/wrong-address.js +36 -0
- package/dist/store/boards.js +111 -0
- package/dist/store/database.js +45 -0
- package/dist/store/machine.js +77 -0
- package/dist/store/migrations.js +493 -0
- package/dist/store/queries.js +585 -0
- package/dist/store/registry.js +72 -0
- package/package.json +73 -4
- package/presets/architecture/playbook.md +69 -0
- package/presets/architecture/preset.yaml +80 -0
- package/presets/architecture/samples.yaml +23 -0
- package/presets/bug-triage/playbook.md +129 -0
- package/presets/bug-triage/preset.yaml +127 -0
- package/presets/bug-triage/samples/wall-slide-after.png +0 -0
- package/presets/bug-triage/samples/wall-slide-before.png +0 -0
- package/presets/bug-triage/samples.yaml +72 -0
- package/presets/change/playbook.md +115 -0
- package/presets/change/preset.yaml +141 -0
- package/presets/change/samples.yaml +62 -0
- package/presets/review/playbook.md +51 -0
- package/presets/review/preset.yaml +62 -0
- package/presets/review/samples.yaml +27 -0
- package/presets/tasks/playbook.md +78 -0
- package/presets/tasks/preset.yaml +61 -0
- package/presets/tasks/samples.yaml +46 -0
- package/schemas/board.schema.json +764 -0
- package/ui/dist/THIRD_PARTY_NOTICES.md +114 -0
- package/ui/dist/assets/dm-mono-latin-400-normal--0xN8mdc.woff +0 -0
- package/ui/dist/assets/dm-mono-latin-400-normal-4GdczIuU.woff2 +0 -0
- package/ui/dist/assets/dm-mono-latin-500-normal-CN8Miw6E.woff +0 -0
- package/ui/dist/assets/dm-mono-latin-500-normal-DRMDZjhP.woff2 +0 -0
- package/ui/dist/assets/dm-mono-latin-ext-400-normal-1aZr6b2b.woff +0 -0
- package/ui/dist/assets/dm-mono-latin-ext-400-normal-C2zvOubV.woff2 +0 -0
- package/ui/dist/assets/dm-mono-latin-ext-500-normal-BtRyHRi6.woff2 +0 -0
- package/ui/dist/assets/dm-mono-latin-ext-500-normal-Dw3M13d8.woff +0 -0
- package/ui/dist/assets/index-C3OzJope.js +103 -0
- package/ui/dist/assets/index-COdEjckQ.css +1 -0
- package/ui/dist/assets/newsreader-latin-ext-opsz-italic-CSPGnFdO.woff2 +0 -0
- package/ui/dist/assets/newsreader-latin-ext-opsz-normal-BQn1nviT.woff2 +0 -0
- package/ui/dist/assets/newsreader-latin-opsz-italic-kJKFiXvB.woff2 +0 -0
- package/ui/dist/assets/newsreader-latin-opsz-normal-s-izfB6B.woff2 +0 -0
- package/ui/dist/assets/newsreader-vietnamese-opsz-italic-DTr-ymY4.woff2 +0 -0
- package/ui/dist/assets/newsreader-vietnamese-opsz-normal-BjhtXyW2.woff2 +0 -0
- package/ui/dist/assets/pdf-YwugTw7Y.js +54 -0
- package/ui/dist/assets/pdf-engine-CkBopwck.js +1 -0
- package/ui/dist/assets/pdf-rELvHkft.js +56 -0
- package/ui/dist/assets/pdf.worker.min-B5Yc7dP4.mjs +27 -0
- package/ui/dist/assets/pdf.worker.min-B7U8ptvh.js +1 -0
- package/ui/dist/assets/pdf.worker.min-CIqJB0yW.mjs +28 -0
- package/ui/dist/assets/pdf.worker.min-UqOn5EDC.js +1 -0
- package/ui/dist/assets/schibsted-grotesk-latin-ext-wght-normal-hsMS0n0O.woff2 +0 -0
- package/ui/dist/assets/schibsted-grotesk-latin-wght-normal-Bb8VGrTG.woff2 +0 -0
- package/ui/dist/icons/apple-touch-icon.png +0 -0
- package/ui/dist/icons/otea-192.png +0 -0
- package/ui/dist/icons/otea-512.png +0 -0
- package/ui/dist/icons/otea-badge.png +0 -0
- package/ui/dist/icons/otea-maskable-512.png +0 -0
- package/ui/dist/index.html +25 -0
- package/ui/dist/manifest.webmanifest +24 -0
- package/ui/dist/otea-idle.svg +5 -0
- package/ui/dist/otea-working.svg +5 -0
- package/ui/dist/otea-yours-working.svg +5 -0
- package/ui/dist/otea-yours.svg +5 -0
- package/ui/dist/sw.js +1 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export const PROMPT_KINDS = ['start', 'join', 'design'];
|
|
2
|
+
export function isPromptKind(kind) {
|
|
3
|
+
return PROMPT_KINDS.includes(kind);
|
|
4
|
+
}
|
|
5
|
+
// Every agent connects: it refreshes AGENTS.md and is told which MCP server to add to its own
|
|
6
|
+
// harness. Nothing it writes names it, so another agent's connect never takes anything from it.
|
|
7
|
+
const CONNECT = 'otea connect --as <name> --model <model> --effort <effort>';
|
|
8
|
+
const CONNECT_ES = 'otea connect --as <nombre> --model <modelo> --effort <esfuerzo>';
|
|
9
|
+
// A restart a harness needs to load the server comes first, before the interview: a new session
|
|
10
|
+
// would not know what was said (p3-company run 2), unless it reopens the same conversation.
|
|
11
|
+
const CONNECTS = "it writes AGENTS.md and prints the MCP server to add to your own harness's config: add it yourself if you have not. If your harness must restart or reload to load it, or I must approve it, ask me now, before step 2, and tell me to reopen this same conversation with your harness's resume option, if it has one, so you keep what we said; Otea keeps every item and board draft either way. Until it loads, the otea command does the same";
|
|
12
|
+
const CONNECTS_ES = 'escribe AGENTS.md e imprime el servidor MCP que tienes que agregar a la configuración de tu propio harness: agrégalo tú si no lo tienes. Si tu harness tiene que reiniciarse o recargarse para cargarlo, o tengo que aprobarlo, pídemelo ahora, antes del paso 2, y dime que reabra esta misma conversación con la opción de reanudar de tu harness, si la tiene, para que conserves lo que hablamos; Otea guarda todos los ítems y borradores de tableros de todos modos. Hasta que cargue, el comando otea hace lo mismo';
|
|
13
|
+
const DRAFT = 'otea board draft --new "<name>" --why "<what it is for, in my words>" --template <key>';
|
|
14
|
+
const NAME = (example) => `lowercase letters, digits and dashes, such as ${example}`;
|
|
15
|
+
const NAME_ES = (example) => `letras minúsculas, dígitos y guiones, como ${example}`;
|
|
16
|
+
// The example name a prompt gives: claude-b, or the next letter nobody works under, so an agent
|
|
17
|
+
// that takes it as given does not take a name in use.
|
|
18
|
+
function exampleName(taken = []) {
|
|
19
|
+
for (let code = 98; code <= 122; code++) {
|
|
20
|
+
const name = `claude-${String.fromCharCode(code)}`;
|
|
21
|
+
if (!taken.includes(name))
|
|
22
|
+
return name;
|
|
23
|
+
}
|
|
24
|
+
return 'claude-new';
|
|
25
|
+
}
|
|
26
|
+
const DRAFT_ES = 'otea board draft --new "<nombre>" --why "<para qué es, con mis palabras>" --template <clave>';
|
|
27
|
+
const LOOP = 'otea wait --turn agent --unclaimed';
|
|
28
|
+
// The desk is the person's to open (P4-R3-9): one an agent starts in its shell closes with it.
|
|
29
|
+
const DESK = 'Never start the desk (otea serve) yourself: I run it in a terminal of my own or open the Otea desktop app, since one you start closes with your session. If I ask you to start it anyway, run otea serve --no-open.';
|
|
30
|
+
const DESK_ES = 'Nunca abras tú el escritorio (otea serve): lo abro yo en una terminal mía o con la app de escritorio de Otea, porque el que abres tú se cierra con tu sesión. Si igual te pido que lo abras, ejecuta otea serve --no-open.';
|
|
31
|
+
// Topics are off until the person turns them on (P4-R3-10): the interview offers them.
|
|
32
|
+
const TOPICS = 'Ask me too whether you should keep a record of the side questions I ask you off the work (Topics); if I say yes, turn it on: `otea topic on`.';
|
|
33
|
+
const TOPICS_ES = 'Pregúntame también si quiero que lleves registro de las preguntas sueltas que te hago fuera del trabajo (Temas); si digo que sí, actívalo: `otea topic on`.';
|
|
34
|
+
const PROFILE = 'otea profile --as <name> --model <model> --effort <effort> --harness <harness>';
|
|
35
|
+
const PROFILE_ES = 'otea profile --as <nombre> --model <modelo> --effort <esfuerzo> --harness <harness>';
|
|
36
|
+
const WORDS = {
|
|
37
|
+
en: {
|
|
38
|
+
start: (repo) => [
|
|
39
|
+
'Set up Otea in this project and design with me how we will work. Otea is where I hand you work and review what you hand back. Go one step at a time and tell me what you did after each one.',
|
|
40
|
+
`1. Set up: ${repo ? 'in the repository root' : 'in this folder'}, run \`otea init\` if the project is not set up yet (no template). Pick a short name of your own (${NAME(exampleName())}) and connect: \`${CONNECT}\`, with unknown for any value this session does not tell you (never guess, and never open config files outside the project to find it); ${CONNECTS}. Then put your name on every otea command (\`--as <name>\`; MCP tools: as). Declare it for this session too: \`${PROFILE}\`. Read the guide: \`otea board\`. ${DESK}`,
|
|
41
|
+
repo
|
|
42
|
+
? '2. Read the project before asking me anything: the README, how the code is laid out, the git history (how often it changes, in what bursts), CLAUDE.md or AGENTS.md, and its CI.'
|
|
43
|
+
: '2. Read the project before asking me anything: what is in this folder, any README or notes, and CLAUDE.md or AGENTS.md.',
|
|
44
|
+
`3. Ask me, one question at a time and in plain words, only what you still need: what kind of work happens here, what you do and what I do, what I need to see to approve something (${repo ? 'a diff, screenshots, a video, test results, a document' : 'screenshots, the page or file itself, a document'}), how many review rounds are usual, and what must never happen without me${repo ? ' (for code: whether anything may reach the remote before I see it)' : ''}. ${TOPICS}`,
|
|
45
|
+
`4. Design the board or boards. Start from the closest template (\`otea board draft --help\` lists them, sets too) and adapt it: \`${DRAFT}\`; \`otea board draft <request id>\` (the id it printed) prints it as JSON. Edit it, with the evidence each review needs, and hand it in with \`otea board draft <request id> --file board.json\` until it reports nothing wrong. You never publish it.`,
|
|
46
|
+
'5. Tell me where to review it (Studio, from the link the draft prints), that I publish it, and to try it with a first item; offer to adjust it with a new draft if something does not fit.',
|
|
47
|
+
`Then keep working until I stop you: run \`otea next\`, do the step, hand it off and run \`otea next\` again; when there is nothing, run \`${LOOP}\` (in the background if you can) and then \`otea next\`. Answer my notes with \`otea reply\`.`,
|
|
48
|
+
],
|
|
49
|
+
design: [
|
|
50
|
+
'Design one more board for this project with me. You never publish it: I do, in Studio.',
|
|
51
|
+
'1. Read the project and its boards first: what is in it, its history and `otea board`. Put your agent name on every otea command (`--as <name>`; MCP tools: as).',
|
|
52
|
+
'2. Ask me, one question at a time, what the board is for: who does each step, what I need to see to approve (a diff, screenshots, a video, test results, a document) and how many review rounds are usual.',
|
|
53
|
+
`3. Start from the closest template (\`otea board draft --help\` lists them, sets too): \`${DRAFT}\`; \`otea board draft <request id>\` (the id it printed) prints it as JSON. Adapt it and hand it in with \`otea board draft <request id> --file board.json\` until it reports nothing wrong.`,
|
|
54
|
+
'4. Tell me where to review it (the Studio link the draft prints), to try it with a first item, and that you will adjust it with a new draft if something does not fit.',
|
|
55
|
+
],
|
|
56
|
+
join: {
|
|
57
|
+
intro: 'Join the work on this project as one more agent, alongside the others. Do not design or change boards.',
|
|
58
|
+
firstIntro: 'Start working on this project as its agent: its boards are ready. Do not design or change boards.',
|
|
59
|
+
connect: (taken, example) => `1. Run \`otea whoami --harness <harness>\` (the tool you run in): it gives back the name you worked under here before. Without one, pick a name of your own (${NAME(example)})${taken}. Then connect: \`${CONNECT}\`, with unknown for any value this session does not tell you (never guess, and never open config files outside the project to find it); ${CONNECTS}. Then put your name on every command (\`--as <name>\`; MCP tools: as). Declare it for this session too: \`${PROFILE}\`.`,
|
|
60
|
+
worktree: 'Other agents work in this same checkout: do your work on your own branch in your own git worktree (`git worktree add`), never in files another agent is changing.',
|
|
61
|
+
firstWorktree: 'More agents may join this same checkout: do your work on your own branch in your own git worktree (`git worktree add`), never in files another agent is changing.',
|
|
62
|
+
folder: 'Other agents work in this same folder: never change files another agent is changing.',
|
|
63
|
+
taken: (names) => `, not one already working here (${names})`,
|
|
64
|
+
read: '2. Read the guide and the boards: `otea board`. Where agents work:',
|
|
65
|
+
board: (name, steps, waiting) => `- ${name}: ${steps}${waiting > 0 ? ` (${waiting} waiting for an agent now)` : ''}`,
|
|
66
|
+
none: '- no board has agent steps yet; wait for one with the loop below.',
|
|
67
|
+
loop: `3. Work the queue until I stop you: \`otea next --claim\`, do the step, hand it off and run \`otea next\` again; when there is nothing, run \`${LOOP}\` (in the background if you can) and then \`otea next\`. Never take an item another agent holds. Answer my notes with \`otea reply\`.`,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
es: {
|
|
71
|
+
start: (repo) => [
|
|
72
|
+
'Configura Otea en este proyecto y diseña conmigo cómo vamos a trabajar. Otea es donde te paso trabajo y reviso lo que me devuelves. Ve paso a paso y dime qué hiciste después de cada uno.',
|
|
73
|
+
`1. Configuración: ${repo ? 'en la raíz del repositorio' : 'en esta carpeta'}, ejecuta \`otea init\` si el proyecto aún no está configurado (sin plantilla). Elige un nombre corto propio (${NAME_ES(exampleName())}) y conéctate: \`${CONNECT_ES}\`, con unknown en lo que esta sesión no te diga (nunca adivines ni abras archivos de configuración fuera del proyecto para buscarlo); ${CONNECTS_ES}. Luego pon tu nombre en cada comando de otea (\`--as <nombre>\`; herramientas MCP: as). Decláralo también para esta sesión: \`${PROFILE_ES}\`. Lee la guía: \`otea board\`. ${DESK_ES}`,
|
|
74
|
+
repo
|
|
75
|
+
? '2. Lee el proyecto antes de preguntarme nada: el README, cómo está organizado el código, el historial de git (cada cuánto cambia y en qué rachas), CLAUDE.md o AGENTS.md, y su CI.'
|
|
76
|
+
: '2. Lee el proyecto antes de preguntarme nada: qué hay en esta carpeta, el README o las notas que tenga, y CLAUDE.md o AGENTS.md.',
|
|
77
|
+
`3. Pregúntame, una pregunta a la vez y con palabras simples, solo lo que te falte: qué clase de trabajo se hace aquí, qué haces tú y qué hago yo, qué necesito ver para aprobar algo (${repo ? 'un diff, capturas, un vídeo, resultados de pruebas, un documento' : 'capturas, la página o el archivo mismo, un documento'}), cuántas rondas de revisión son normales y qué no debe pasar nunca sin mí${repo ? ' (en el código: si algo puede llegar al remoto antes de que yo lo vea)' : ''}. ${TOPICS_ES}`,
|
|
78
|
+
`4. Diseña el tablero o los tableros. Parte de la plantilla más cercana (\`otea board draft --help\` las lista, también los conjuntos) y adáptala: \`${DRAFT_ES}\`; \`otea board draft <id del Pedido>\` (el id que imprimió) lo imprime en JSON. Edítalo, con la evidencia que pide cada revisión, y entrégalo con \`otea board draft <id del Pedido> --file board.json\` hasta que no marque nada mal. Nunca lo publicas tú.`,
|
|
79
|
+
'5. Dime dónde revisarlo (Studio, desde el enlace que imprime el borrador), que lo publico yo, y que lo pruebe con un primer ítem; ofréceme ajustarlo con un borrador nuevo si algo no encaja.',
|
|
80
|
+
`Después sigue trabajando hasta que te detenga: ejecuta \`otea next\`, haz el paso, entrégalo y vuelve a ejecutar \`otea next\`; cuando no haya nada, ejecuta \`${LOOP}\` (en segundo plano si puedes) y luego \`otea next\`. Contesta mis notas con \`otea reply\`.`,
|
|
81
|
+
],
|
|
82
|
+
design: [
|
|
83
|
+
'Diseña conmigo un tablero más para este proyecto. Nunca lo publicas tú: lo publico yo, en Studio.',
|
|
84
|
+
'1. Primero lee el proyecto y sus tableros: qué hay en él, su historial y `otea board`. Pon tu nombre de agente en cada comando de otea (`--as <nombre>`; herramientas MCP: as).',
|
|
85
|
+
'2. Pregúntame, una pregunta a la vez, para qué es el tablero: quién hace cada paso, qué necesito ver para aprobar (un diff, capturas, un vídeo, resultados de pruebas, un documento) y cuántas rondas de revisión son normales.',
|
|
86
|
+
`3. Parte de la plantilla más cercana (\`otea board draft --help\` las lista, también los conjuntos): \`${DRAFT_ES}\`; \`otea board draft <id del Pedido>\` (el id que imprimió) lo imprime en JSON. Adáptalo y entrégalo con \`otea board draft <id del Pedido> --file board.json\` hasta que no marque nada mal.`,
|
|
87
|
+
'4. Dime dónde revisarlo (el enlace a Studio que imprime el borrador), que lo pruebe con un primer ítem, y que lo ajustarás con un borrador nuevo si algo no encaja.',
|
|
88
|
+
],
|
|
89
|
+
join: {
|
|
90
|
+
intro: 'Súmate al trabajo de este proyecto como un agente más, junto a los otros. No diseñes ni cambies tableros.',
|
|
91
|
+
firstIntro: 'Empieza a trabajar en este proyecto como su agente: sus tableros están listos. No diseñes ni cambies tableros.',
|
|
92
|
+
connect: (taken, example) => `1. Ejecuta \`otea whoami --harness <harness>\` (la herramienta en la que trabajas): te devuelve el nombre con el que ya trabajaste aquí. Si no te da ninguno, elige un nombre propio (${NAME_ES(example)})${taken}. Luego conéctate: \`${CONNECT_ES}\`, con unknown en lo que esta sesión no te diga (nunca adivines ni abras archivos de configuración fuera del proyecto para buscarlo); ${CONNECTS_ES}. Luego pon tu nombre en cada comando (\`--as <nombre>\`; herramientas MCP: as). Decláralo también para esta sesión: \`${PROFILE_ES}\`.`,
|
|
93
|
+
worktree: 'Otros agentes trabajan en esta misma copia del repositorio: haz tu trabajo en tu propia rama y en tu propio worktree de git (`git worktree add`), nunca en archivos que otro agente está cambiando.',
|
|
94
|
+
firstWorktree: 'Pueden sumarse más agentes a esta misma copia del repositorio: haz tu trabajo en tu propia rama y en tu propio worktree de git (`git worktree add`), nunca en archivos que otro agente está cambiando.',
|
|
95
|
+
folder: 'Otros agentes trabajan en esta misma carpeta: nunca cambies archivos que otro agente está cambiando.',
|
|
96
|
+
taken: (names) => `, que no sea uno de los que ya trabajan aquí (${names})`,
|
|
97
|
+
read: '2. Lee la guía y los tableros: `otea board`. Donde trabajan los agentes:',
|
|
98
|
+
board: (name, steps, waiting) => `- ${name}: ${steps}${waiting > 0 ? ` (${waiting} ${waiting === 1 ? 'espera' : 'esperan'} a un agente ahora)` : ''}`,
|
|
99
|
+
none: '- ningún tablero tiene pasos de agente todavía; espera con el bucle de abajo.',
|
|
100
|
+
loop: `3. Trabaja la cola hasta que te detenga: \`otea next --claim\`, haz el paso, entrégalo y vuelve a ejecutar \`otea next\`; cuando no haya nada, ejecuta \`${LOOP}\` (en segundo plano si puedes) y luego \`otea next\`. Nunca tomes un ítem que tiene otro agente. Contesta mis notas con \`otea reply\`.`,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
// `repo`: whether the project is a git repository (the default); a plain folder hears no git words.
|
|
105
|
+
export function startPrompt(lang, repo = true) {
|
|
106
|
+
return WORDS[lang].start(repo).join('\n');
|
|
107
|
+
}
|
|
108
|
+
export function designPrompt(lang) {
|
|
109
|
+
return WORDS[lang].design.join('\n');
|
|
110
|
+
}
|
|
111
|
+
export function joinPrompt(lang, facts) {
|
|
112
|
+
const words = WORDS[lang].join;
|
|
113
|
+
const working = [...new Set(facts.working)];
|
|
114
|
+
const taken = working.length > 0 ? words.taken(working.join(', ')) : '';
|
|
115
|
+
const boards = facts.boards.filter(({ agentSteps }) => agentSteps.length > 0);
|
|
116
|
+
// Nobody to join: nobody works there now (or no agent was ever seen).
|
|
117
|
+
const first = facts.first === true || working.length === 0;
|
|
118
|
+
const repo = facts.repo !== false;
|
|
119
|
+
// The first prompt is pasted into a second chat too, before the first agent shows: it asks for
|
|
120
|
+
// a worktree as well, so two sessions never share one checkout.
|
|
121
|
+
const apart = repo ? (first ? words.firstWorktree : words.worktree) : first ? '' : words.folder;
|
|
122
|
+
return [
|
|
123
|
+
[first ? words.firstIntro : words.intro, apart].filter(Boolean).join(' '),
|
|
124
|
+
words.connect(taken, exampleName(working)),
|
|
125
|
+
words.read,
|
|
126
|
+
...(boards.length > 0
|
|
127
|
+
? boards.map(({ name, agentSteps, waiting }) => words.board(name, agentSteps.join(', '), waiting))
|
|
128
|
+
: [words.none]),
|
|
129
|
+
words.loop,
|
|
130
|
+
].join('\n');
|
|
131
|
+
}
|
|
132
|
+
// The prompt for a moment, `join` built from the project's facts.
|
|
133
|
+
export function agentPrompt(kind, lang, facts) {
|
|
134
|
+
if (kind === 'start')
|
|
135
|
+
return startPrompt(lang, facts.repo !== false);
|
|
136
|
+
if (kind === 'design')
|
|
137
|
+
return designPrompt(lang);
|
|
138
|
+
return joinPrompt(lang, facts);
|
|
139
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { OteaError } from './errors.js';
|
|
2
|
+
import { assertTransition, closesOf, requirementsOf, stateLabel, transitionsFrom, turnOf, } from './workflow.js';
|
|
3
|
+
const CHANNEL_REACH = {
|
|
4
|
+
cli: ['agent'],
|
|
5
|
+
mcp: ['agent'],
|
|
6
|
+
ui: ['agent', 'human', 'human-ui'],
|
|
7
|
+
};
|
|
8
|
+
const WHO = {
|
|
9
|
+
agent: 'any actor',
|
|
10
|
+
human: 'a human',
|
|
11
|
+
'human-ui': 'a human in the web UI',
|
|
12
|
+
};
|
|
13
|
+
export function mayPerform(by, { actor, channel }) {
|
|
14
|
+
if (!CHANNEL_REACH[channel].includes(by))
|
|
15
|
+
return false;
|
|
16
|
+
return by === 'agent' || actor.kind === 'human';
|
|
17
|
+
}
|
|
18
|
+
// A move as a reader says it, its states by name.
|
|
19
|
+
function moving(workflow, from, to) {
|
|
20
|
+
return `Moving from "${stateLabel(workflow, from)}" to "${stateLabel(workflow, to)}"`;
|
|
21
|
+
}
|
|
22
|
+
function forbidden(workflow, from, to, transitions, performer) {
|
|
23
|
+
const required = [...new Set(transitions.map(({ by }) => `${by} authority (${WHO[by]})`))];
|
|
24
|
+
const { actor, channel } = performer;
|
|
25
|
+
return new OteaError('forbidden', `${moving(workflow, from, to)} requires ${required.join(' or ')}; ${actor.kind} "${actor.name}" via ${channel} may not`, { kind: 'move', why: 'not_allowed', from, to });
|
|
26
|
+
}
|
|
27
|
+
function moveTo(workflow, { to, by, reasonRequired }) {
|
|
28
|
+
const move = { to, by, reasonRequired, turn: turnOf(workflow, to) };
|
|
29
|
+
const closes = closesOf(workflow, to);
|
|
30
|
+
if (closes !== undefined)
|
|
31
|
+
move.closes = closes;
|
|
32
|
+
const requires = requirementsOf(workflow, to);
|
|
33
|
+
if (requires.length > 0)
|
|
34
|
+
move.requires = requires;
|
|
35
|
+
return move;
|
|
36
|
+
}
|
|
37
|
+
export function availableMoves(workflow, from, performer) {
|
|
38
|
+
const moves = new Map();
|
|
39
|
+
for (const transition of transitionsFrom(workflow, from)) {
|
|
40
|
+
const { to, by } = transition;
|
|
41
|
+
if (moves.has(to) || !mayPerform(by, performer))
|
|
42
|
+
continue;
|
|
43
|
+
moves.set(to, moveTo(workflow, transition));
|
|
44
|
+
}
|
|
45
|
+
return [...moves.values()];
|
|
46
|
+
}
|
|
47
|
+
// The moves a relayed decision may take from a state: the targets of its `human` transitions, as
|
|
48
|
+
// authorizeRelay allows them.
|
|
49
|
+
export function relayableMoves(workflow, from) {
|
|
50
|
+
const moves = new Map();
|
|
51
|
+
for (const transition of transitionsFrom(workflow, from)) {
|
|
52
|
+
const { to, by } = transition;
|
|
53
|
+
if (moves.has(to) || by !== 'human')
|
|
54
|
+
continue;
|
|
55
|
+
moves.set(to, moveTo(workflow, transition));
|
|
56
|
+
}
|
|
57
|
+
return [...moves.values()];
|
|
58
|
+
}
|
|
59
|
+
function requireReason(workflow, transition, reason) {
|
|
60
|
+
if (transition.reasonRequired && !reason?.trim()) {
|
|
61
|
+
const { from, to } = transition;
|
|
62
|
+
throw new OteaError('reason_required', `${moving(workflow, from, to)} requires a reason`, {
|
|
63
|
+
kind: 'move',
|
|
64
|
+
why: 'reason_required',
|
|
65
|
+
from,
|
|
66
|
+
to,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export function authorizeMove(workflow, from, to, performer, reason,
|
|
71
|
+
// The reason is given otherwise: a send-back with the person's review comments.
|
|
72
|
+
reasonGiven = false) {
|
|
73
|
+
const transitions = assertTransition(workflow, from, to);
|
|
74
|
+
const allowed = transitions.find(({ by }) => mayPerform(by, performer));
|
|
75
|
+
if (!allowed)
|
|
76
|
+
throw forbidden(workflow, from, to, transitions, performer);
|
|
77
|
+
if (!reasonGiven)
|
|
78
|
+
requireReason(workflow, allowed, reason);
|
|
79
|
+
return allowed;
|
|
80
|
+
}
|
|
81
|
+
// A relayed decision is the human's, made in conversation and recorded by an agent: it may take
|
|
82
|
+
// only a `human` transition. `human-ui` stays in the web UI and `agent` moves need no human.
|
|
83
|
+
export function authorizeRelay(workflow, from, to, reason) {
|
|
84
|
+
const transitions = assertTransition(workflow, from, to);
|
|
85
|
+
const human = transitions.find(({ by }) => by === 'human');
|
|
86
|
+
if (human) {
|
|
87
|
+
requireReason(workflow, human, reason);
|
|
88
|
+
return human;
|
|
89
|
+
}
|
|
90
|
+
if (transitions.some(({ by }) => by === 'agent')) {
|
|
91
|
+
throw new OteaError('not_relayable', `${moving(workflow, from, to)} needs no human decision; make it with "otea move"`);
|
|
92
|
+
}
|
|
93
|
+
throw new OteaError('forbidden', `${moving(workflow, from, to)} requires human-ui authority (${WHO['human-ui']}) and cannot be relayed; the human must make it in the web UI`);
|
|
94
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { LEVELS } from './model.js';
|
|
2
|
+
// Analysis views cross a board's items to help pick what to tackle first (the effort × risk matrix
|
|
3
|
+
// of the bug triage panel). A view never names a board's field: it asks for roles, and a board says
|
|
4
|
+
// which of its own fields plays each role (`analysis` in board.json, mapped in Studio). A view shows
|
|
5
|
+
// only on a board that mapped the roles it needs, so no board is tied to a view.
|
|
6
|
+
//
|
|
7
|
+
// This module is pure and browser-safe: the server, the CLI and the web UI import it.
|
|
8
|
+
export const SCALE_ROLES = ['effort', 'risk', 'impact'];
|
|
9
|
+
export const ROLES = [...SCALE_ROLES, 'area', 'due'];
|
|
10
|
+
// The kinds a role reads. A scale is an order of values: a level (low → critical), a number, or a
|
|
11
|
+
// choice whose options, in their order, are the scale. An area groups (a choice, several, or a
|
|
12
|
+
// short text); a due date is a date. A long text never plays a role.
|
|
13
|
+
export const ROLE_KINDS = {
|
|
14
|
+
effort: ['choice', 'level', 'number'],
|
|
15
|
+
risk: ['choice', 'level', 'number'],
|
|
16
|
+
impact: ['choice', 'level', 'number'],
|
|
17
|
+
area: ['choice', 'multi', 'text'],
|
|
18
|
+
due: ['date'],
|
|
19
|
+
};
|
|
20
|
+
export function isRole(value) {
|
|
21
|
+
return ROLES.includes(value);
|
|
22
|
+
}
|
|
23
|
+
export function isScaleRole(role) {
|
|
24
|
+
return SCALE_ROLES.includes(role);
|
|
25
|
+
}
|
|
26
|
+
export function fitsRole(role, part) {
|
|
27
|
+
return ROLE_KINDS[role].includes(part.kind);
|
|
28
|
+
}
|
|
29
|
+
// The parts of a board that may play a role, in board order.
|
|
30
|
+
export function partsFor(def, role) {
|
|
31
|
+
return Object.values(def.parts).filter((part) => fitsRole(role, part));
|
|
32
|
+
}
|
|
33
|
+
// The part a role is mapped to, when the board has it and it still fits.
|
|
34
|
+
export function rolePart(def, role) {
|
|
35
|
+
const ref = def.analysis?.[role];
|
|
36
|
+
if (ref === undefined)
|
|
37
|
+
return undefined;
|
|
38
|
+
const part = def.parts[ref];
|
|
39
|
+
return part && fitsRole(role, part) ? part : undefined;
|
|
40
|
+
}
|
|
41
|
+
// The scale roles a board mapped (to parts that fit), in role order.
|
|
42
|
+
export function mappedScales(def) {
|
|
43
|
+
return SCALE_ROLES.filter((role) => rolePart(def, role) !== undefined);
|
|
44
|
+
}
|
|
45
|
+
export const VIEWS = ['matrix'];
|
|
46
|
+
// The views a board turns on: the matrix crosses any two scale roles.
|
|
47
|
+
export function viewsOf(def) {
|
|
48
|
+
return mappedScales(def).length >= 2 ? ['matrix'] : [];
|
|
49
|
+
}
|
|
50
|
+
// The default axes of the matrix: effort across and risk up when both are mapped, else the first
|
|
51
|
+
// two scale roles the board mapped.
|
|
52
|
+
export function defaultAxes(def) {
|
|
53
|
+
const scales = mappedScales(def);
|
|
54
|
+
if (scales.length < 2)
|
|
55
|
+
return undefined;
|
|
56
|
+
if (scales.includes('effort') && scales.includes('risk'))
|
|
57
|
+
return { x: 'effort', y: 'risk' };
|
|
58
|
+
const [x, y] = scales;
|
|
59
|
+
return { x, y };
|
|
60
|
+
}
|
|
61
|
+
// The steps of a part's scale, lowest first. A number part has no fixed steps: its scale is the
|
|
62
|
+
// distinct values the items carry, sorted (`values`); a level reads its keys, which the caller
|
|
63
|
+
// words in the language on screen.
|
|
64
|
+
export function scaleOf(part, values = []) {
|
|
65
|
+
if (part.kind === 'level')
|
|
66
|
+
return LEVELS.map((level) => ({ value: level, name: level }));
|
|
67
|
+
if (part.kind === 'choice')
|
|
68
|
+
return part.options.map(({ id, name }) => ({ value: id, name }));
|
|
69
|
+
if (part.kind === 'number') {
|
|
70
|
+
const numbers = [
|
|
71
|
+
...new Set(values
|
|
72
|
+
.filter((v) => v.trim() !== '')
|
|
73
|
+
.map(Number)
|
|
74
|
+
.filter(Number.isFinite)),
|
|
75
|
+
].sort((a, b) => a - b);
|
|
76
|
+
return numbers.map((n) => ({ value: String(n), name: String(n) }));
|
|
77
|
+
}
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
// Where a value sits on a scale (0 lowest), or undefined when the item has no value there.
|
|
81
|
+
export function stepOf(steps, value) {
|
|
82
|
+
if (value === undefined || value === '')
|
|
83
|
+
return undefined;
|
|
84
|
+
const index = steps.findIndex((step) => step.value === value || Number(step.value) === Number(value));
|
|
85
|
+
return index === -1 ? undefined : index;
|
|
86
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { isClosed, positionOf, stateOf, waysOf } from './engine.js';
|
|
2
|
+
import { DONE, stepById } from './model.js';
|
|
3
|
+
// The options a decision weighs and the one the person picks. Options are a long text the board
|
|
4
|
+
// shows as options (`show: 'options'`), written one `### A · Name` heading per option, a line that
|
|
5
|
+
// sums it up, then `+ ` gains and `- ` costs; `(recommended)` after the name marks the agent's
|
|
6
|
+
// pick. Reviewing an item that carries two or more, the person picks one, with an optional
|
|
7
|
+
// comment: an option_chosen event, the last of which is the item's choice, read by next and show
|
|
8
|
+
// and drawn on the item's page.
|
|
9
|
+
export const OPTION_CHOSEN = 'option_chosen';
|
|
10
|
+
const HEADING = /^#{2,4}\s+([A-Za-z0-9]{1,2})\s*[·.:)\-–—]\s*(.+?)\s*$/;
|
|
11
|
+
const RECOMMENDED = /\s*\((?:recommended|recomendada|recomendado)\)\s*$/i;
|
|
12
|
+
// The options a text holds; none when it holds no such heading (it is then plain Markdown).
|
|
13
|
+
export function optionsOf(text) {
|
|
14
|
+
const options = [];
|
|
15
|
+
for (const raw of text.split(/\r?\n/)) {
|
|
16
|
+
const line = raw.trim();
|
|
17
|
+
const heading = HEADING.exec(line);
|
|
18
|
+
if (heading) {
|
|
19
|
+
const [, letter = '', named = ''] = heading;
|
|
20
|
+
options.push({
|
|
21
|
+
letter: letter.toUpperCase(),
|
|
22
|
+
name: named.replace(RECOMMENDED, ''),
|
|
23
|
+
summary: '',
|
|
24
|
+
gains: [],
|
|
25
|
+
costs: [],
|
|
26
|
+
recommended: RECOMMENDED.test(named),
|
|
27
|
+
});
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const option = options.at(-1);
|
|
31
|
+
if (!option || line === '')
|
|
32
|
+
continue;
|
|
33
|
+
if (/^\+\s+/.test(line))
|
|
34
|
+
option.gains.push(line.replace(/^\+\s+/, ''));
|
|
35
|
+
else if (/^[-*]\s+/.test(line))
|
|
36
|
+
option.costs.push(line.replace(/^[-*]\s+/, ''));
|
|
37
|
+
else
|
|
38
|
+
option.summary = option.summary ? `${option.summary} ${line}` : line;
|
|
39
|
+
}
|
|
40
|
+
return options;
|
|
41
|
+
}
|
|
42
|
+
// The options the person picks from on the item: the first long text the board shows as options
|
|
43
|
+
// that holds two or more. Undefined when there is nothing to pick.
|
|
44
|
+
export function pickableOptions(def, fields) {
|
|
45
|
+
for (const part of Object.values(def.parts)) {
|
|
46
|
+
if (part.kind !== 'long' || part.show !== 'options')
|
|
47
|
+
continue;
|
|
48
|
+
const value = fields[part.id];
|
|
49
|
+
if (typeof value !== 'string')
|
|
50
|
+
continue;
|
|
51
|
+
const options = optionsOf(value);
|
|
52
|
+
if (options.length >= 2)
|
|
53
|
+
return { part: part.id, options };
|
|
54
|
+
}
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
// Where the person picks: on their review of the step that hands the options in (a later review
|
|
58
|
+
// never asks again: the choice is made), or, on a board whose steps never hand them in, on any
|
|
59
|
+
// review of theirs. forward: the states the approvals out of that review lead to, each of which
|
|
60
|
+
// carries the pick. Undefined when this review asks for no pick.
|
|
61
|
+
export function pickAt(def, item) {
|
|
62
|
+
const position = positionOf(item.state);
|
|
63
|
+
if (isClosed(position) || position.phase !== 'review')
|
|
64
|
+
return undefined;
|
|
65
|
+
const step = stepById(def, position.step);
|
|
66
|
+
if (step?.reviewer !== 'you')
|
|
67
|
+
return undefined;
|
|
68
|
+
const found = pickableOptions(def, item.fields);
|
|
69
|
+
if (!found)
|
|
70
|
+
return undefined;
|
|
71
|
+
const handing = def.steps.filter(({ hand }) => hand.some(({ ref }) => ref === found.part));
|
|
72
|
+
if (handing.length > 0 && !handing.includes(step))
|
|
73
|
+
return undefined;
|
|
74
|
+
const forward = waysOf(def, step.id).map((way) => stateOf(way === DONE ? { closed: DONE } : { step: way, phase: 'doing' }));
|
|
75
|
+
return { ...found, forward };
|
|
76
|
+
}
|
|
77
|
+
// The item's choice: the last option the person picked.
|
|
78
|
+
export function choiceOf(events) {
|
|
79
|
+
const last = events.findLast(({ type }) => type === OPTION_CHOSEN);
|
|
80
|
+
if (!last)
|
|
81
|
+
return undefined;
|
|
82
|
+
const { data } = last;
|
|
83
|
+
const comment = typeof data.comment === 'string' ? data.comment.trim() : '';
|
|
84
|
+
return {
|
|
85
|
+
option: String(data.option ?? ''),
|
|
86
|
+
name: String(data.name ?? ''),
|
|
87
|
+
...(comment ? { comment } : {}),
|
|
88
|
+
at: last.at,
|
|
89
|
+
by: last.actor.name,
|
|
90
|
+
step: String(data.step ?? ''),
|
|
91
|
+
stepName: String(data.stepName ?? data.step ?? ''),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
// What an agent reads of the choice, in English as the rest of next and show.
|
|
95
|
+
export function choiceLines(choice) {
|
|
96
|
+
const lines = [` ${choice.option} · ${choice.name} (in ${choice.stepName})`];
|
|
97
|
+
if (choice.comment)
|
|
98
|
+
lines.push(` Their comment: "${choice.comment}"`);
|
|
99
|
+
return lines;
|
|
100
|
+
}
|