@popoverai/dotrequirements 0.38.3 → 0.39.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/dist/commands/solution/brief.d.ts +2 -1
- package/dist/commands/solution/change.d.ts +12 -0
- package/dist/commands/solution/change.js +29 -0
- package/dist/commands/solution/contract.d.ts +1 -1
- package/dist/commands/solution/contract.js +1 -1
- package/dist/commands/solution/index.js +6 -0
- package/dist/convex.d.ts +1 -0
- package/dist/convex.js +2 -0
- package/dist/schema/browser.d.ts +1 -1
- package/dist/schema/browser.js +6 -4
- package/package.json +1 -1
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* images and demo scripts `next` saves in the checkout (SIGHT-9.3, 13.1).
|
|
13
13
|
*/
|
|
14
14
|
export type Brief = {
|
|
15
|
-
|
|
15
|
+
/** `request`: what the solution's agent asked it, which it answers (CONVO-11). */
|
|
16
|
+
kind: "step" | "review" | "request";
|
|
16
17
|
/** The outcome the agent took; `label` is its name too. */
|
|
17
18
|
step: {
|
|
18
19
|
label: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type WhereOptions } from "./run-file.js";
|
|
2
|
+
/**
|
|
3
|
+
* `dotreq solution change --comment "<what changed and why>"`: a made
|
|
4
|
+
* outcome's drafter, asked by the solution's agent to change it, records
|
|
5
|
+
* the change in place (VERB-8). Its commits are pushed first, as before any
|
|
6
|
+
* record (VERB-8.1, SOLBRANCH-3); the outcome stays made, and its history
|
|
7
|
+
* says what changed and why, at the solution's agent's request.
|
|
8
|
+
*/
|
|
9
|
+
export declare function changeCommand(options: WhereOptions & {
|
|
10
|
+
comment?: string;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=change.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { api } from "../../convex.js";
|
|
2
|
+
import { solutionClient } from "./client.js";
|
|
3
|
+
import { pushBeforeRecord } from "./pushing.js";
|
|
4
|
+
import { requireWhere } from "./run-file.js";
|
|
5
|
+
/**
|
|
6
|
+
* `dotreq solution change --comment "<what changed and why>"`: a made
|
|
7
|
+
* outcome's drafter, asked by the solution's agent to change it, records
|
|
8
|
+
* the change in place (VERB-8). Its commits are pushed first, as before any
|
|
9
|
+
* record (VERB-8.1, SOLBRANCH-3); the outcome stays made, and its history
|
|
10
|
+
* says what changed and why, at the solution's agent's request.
|
|
11
|
+
*/
|
|
12
|
+
export async function changeCommand(options) {
|
|
13
|
+
const comment = options.comment?.trim();
|
|
14
|
+
// VERB-8.3: what it says is all the history shows of the change.
|
|
15
|
+
if (!comment) {
|
|
16
|
+
throw new Error("Say what changed and why with --comment: what you say is what the outcome's history shows of the change.");
|
|
17
|
+
}
|
|
18
|
+
const where = requireWhere(options);
|
|
19
|
+
const client = solutionClient();
|
|
20
|
+
await pushBeforeRecord(client, where);
|
|
21
|
+
const { done } = await client.mutation(api.solutions.mutations.changeInPlace, {
|
|
22
|
+
solutionId: where.solutionId,
|
|
23
|
+
agent: where.agent,
|
|
24
|
+
...(where.outcome ? { outcome: where.outcome } : {}),
|
|
25
|
+
comment,
|
|
26
|
+
});
|
|
27
|
+
console.log(done);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=change.js.map
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* request is validated against; the CLI can't import the backend, so this
|
|
6
6
|
* is that text, and a test keeps the two the same.
|
|
7
7
|
*/
|
|
8
|
-
export declare const REQUEST_CONTRACT = "Ask the person to decide something about the outcome you are drafting or reviewing. A choice presents options with a recommendation. The person may answer in their own words instead of picking an option, and their words are then the decision you work from. One decision per request: if two things need deciding, ask twice.\n\nA request is JSON with a \"kind\" and the fields of that kind:\n\nchoice:\n question (text, up to 200 characters): The question, phrased as a question in the words the person will read it, not as a topic.\n options (list, at least 2): The live alternatives. More than four makes deciding harder; give more only when each is a genuine choice. Leave out anything you have already ruled out.\n name (text, up to 200 characters): The option as you would say it to the person: a noun phrase they can repeat back, not a label.\n benefits (list of text, each up to 200 characters): What is better if this option is taken. One line each, in your own words.\n costs (list of text, each up to 200 characters): What is worse if this option is taken: what it would take to build, and what the person lives with afterwards. Effort is a cost like any other.\n note (text, up to 600 characters, optional): Anything you learned or checked about this option that is not a benefit or a cost. Leave it out when there is nothing to add.\n action (object, optional): An action you may take only with the person's permission, which choosing this option gives. Once they choose it, take it with `dotreq solution approval complete <decision>`. Leave it out for anything you may do yourself.\n tool (text, up to 200 characters): The action, by name.
|
|
8
|
+
export declare const REQUEST_CONTRACT = "Ask the person to decide something about the outcome you are drafting or reviewing. A choice presents options with a recommendation. The person may answer in their own words instead of picking an option, and their words are then the decision you work from. One decision per request: if two things need deciding, ask twice.\n\nA request is JSON with a \"kind\" and the fields of that kind:\n\nchoice:\n question (text, up to 200 characters): The question, phrased as a question in the words the person will read it, not as a topic.\n options (list, at least 2): The live alternatives. More than four makes deciding harder; give more only when each is a genuine choice. Leave out anything you have already ruled out.\n name (text, up to 200 characters): The option as you would say it to the person: a noun phrase they can repeat back, not a label.\n benefits (list of text, each up to 200 characters): What is better if this option is taken. One line each, in your own words.\n costs (list of text, each up to 200 characters): What is worse if this option is taken: what it would take to build, and what the person lives with afterwards. Effort is a cost like any other.\n note (text, up to 600 characters, optional): Anything you learned or checked about this option that is not a benefit or a cost. Leave it out when there is nothing to add.\n action (object, optional): An action you may take only with the person's permission, which choosing this option gives. Once they choose it, take it with `dotreq solution approval complete <decision>`. Leave it out for anything you may do yourself.\n tool (text, up to 200 characters): The action, by name. Those that need the person's permission: \"fix\", starting a fix, and \"make with you\", making the outcome you're on with the person and the solution's agent instead (args: { outcome }), when it needs their judgement more than your best guess (CONVO-8).\n args (object): The action's arguments, as it takes them: a fix's are below.\n recommendation (object): Which option you would take, and the one reason why.\n option (text, up to 200 characters): The name of the option you recommend, exactly as it appears in options.\n because (text, up to 200 characters): The one reason that carries it, in one line. The full reasoning belongs in background.\n background (text, up to 4000 characters): What the person needs to know to decide well that the options do not already say. Include only context that would substantially change the quality of the decision. The person reads this after the options, so do not reiterate them.\n\nThe args of a \"fix\" action:\n name (text, up to 120 characters): A short name for the fix, from what it puts right, as \"dice below the controls\".\n words (text, up to 2000 characters): What you found, in your own words.\n plan (text, up to 2000 characters): The fix as you would put it to the person, in a sentence or two.\n redo (list, at least 1): The outcomes the fix redoes, and what would change in each.\n outcome (text, up to 200 characters): An outcome to redo, by its name.\n change (text, up to 2000 characters): What would change in it.\n rerun (list of text, each up to 200 characters): The outcomes that await the ones redone and should run again from them. Empty when none should.";
|
|
9
9
|
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -17,7 +17,7 @@ choice:
|
|
|
17
17
|
costs (list of text, each up to 200 characters): What is worse if this option is taken: what it would take to build, and what the person lives with afterwards. Effort is a cost like any other.
|
|
18
18
|
note (text, up to 600 characters, optional): Anything you learned or checked about this option that is not a benefit or a cost. Leave it out when there is nothing to add.
|
|
19
19
|
action (object, optional): An action you may take only with the person's permission, which choosing this option gives. Once they choose it, take it with \`dotreq solution approval complete <decision>\`. Leave it out for anything you may do yourself.
|
|
20
|
-
tool (text, up to 200 characters): The action, by name.
|
|
20
|
+
tool (text, up to 200 characters): The action, by name. Those that need the person's permission: "fix", starting a fix, and "make with you", making the outcome you're on with the person and the solution's agent instead (args: { outcome }), when it needs their judgement more than your best guess (CONVO-8).
|
|
21
21
|
args (object): The action's arguments, as it takes them: a fix's are below.
|
|
22
22
|
recommendation (object): Which option you would take, and the one reason why.
|
|
23
23
|
option (text, up to 200 characters): The name of the option you recommend, exactly as it appears in options.
|
|
@@ -2,6 +2,7 @@ import { Option } from "commander";
|
|
|
2
2
|
import { approvalCompleteCommand } from "./approval.js";
|
|
3
3
|
import { askCommand } from "./ask.js";
|
|
4
4
|
import { authorCommand } from "./author.js";
|
|
5
|
+
import { changeCommand } from "./change.js";
|
|
5
6
|
import { checkoutCommand, pushCommand } from "./checkout.js";
|
|
6
7
|
import { REQUEST_CONTRACT } from "./contract.js";
|
|
7
8
|
import { createCommand } from "./create.js";
|
|
@@ -269,6 +270,11 @@ export function registerSolution(program) {
|
|
|
269
270
|
whereOptions(solution
|
|
270
271
|
.command("things <name>", HIDDEN)
|
|
271
272
|
.description("What an outcome or an input holds now, or the outcomes a checkpoint presents: one reference a line")).action(wrap(thingsCommand));
|
|
273
|
+
whereOptions(solution
|
|
274
|
+
.command("change", HIDDEN)
|
|
275
|
+
.description("Record a change you made in place to a made outcome, as the solution's agent asked: what changed and why. The outcome stays made"))
|
|
276
|
+
.option("--comment <text>", "What changed and why: what the outcome's history shows of the change (required)")
|
|
277
|
+
.action(wrap(changeCommand));
|
|
272
278
|
whereOptions(solution
|
|
273
279
|
.command("stall <reason>", HIDDEN)
|
|
274
280
|
.description("Your work cannot go on, and no decision would fix that: what has to change before it can be started again"))
|
package/dist/convex.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ export declare const api: {
|
|
|
101
101
|
ask: import("convex/server").FunctionReference<"mutation", "public", any, any, string | undefined>;
|
|
102
102
|
completeApproval: import("convex/server").FunctionReference<"mutation", "public", any, any, string | undefined>;
|
|
103
103
|
stall: import("convex/server").FunctionReference<"mutation", "public", any, any, string | undefined>;
|
|
104
|
+
changeInPlace: import("convex/server").FunctionReference<"mutation", "public", any, any, string | undefined>;
|
|
104
105
|
answer: import("convex/server").FunctionReference<"mutation", "public", any, any, string | undefined>;
|
|
105
106
|
approveCheckpoint: import("convex/server").FunctionReference<"mutation", "public", any, any, string | undefined>;
|
|
106
107
|
removeRehearsal: import("convex/server").FunctionReference<"mutation", "public", any, any, string | undefined>;
|
package/dist/convex.js
CHANGED
|
@@ -115,6 +115,8 @@ export const api = {
|
|
|
115
115
|
// DECIDE-4: the action on the option the owner chose, taken once.
|
|
116
116
|
completeApproval: mutation("solutions/mutations:completeApproval"),
|
|
117
117
|
stall: mutation("solutions/mutations:stall"),
|
|
118
|
+
// VERB-8: a made outcome's drafter's change in place.
|
|
119
|
+
changeInPlace: mutation("solutions/mutations:changeInPlace"),
|
|
118
120
|
answer: mutation("solutions/mutations:answer"),
|
|
119
121
|
// A rehearsal's scripted approval of a checkpoint (CHECKPOINT-1.1).
|
|
120
122
|
approveCheckpoint: mutation("solutions/mutations:approveCheckpoint"),
|
package/dist/schema/browser.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export { buildRequirementMarkdown, buildRequirementsMarkdown, DEFAULT_DELIMITER, } from "./builder.js";
|
|
7
7
|
export type { ConvexRequirement } from "./conversions.js";
|
|
8
8
|
export { buildMetadata, constructKey, convexToRequirements, extractRequirementKeys, groupByRoot, parseKey, requirementsToConvex, } from "./conversions.js";
|
|
9
|
-
export { DELIMITER_PATTERN, type ExtractedRequirementBlock, extractRequirementBlocks, findRequirementById, flattenRequirementTree, getAllRequirements, parseCriterionLine, parseRequirementBlock, parseRequirementBlocksFromMarkdown, parseRootLine, ROOT_LABEL_MARKER, splitRequirementFenceContent, stripFrontmatterBlock, } from "./parser-core.js";
|
|
9
|
+
export { DELIMITER_PATTERN, type ExtractedRequirementBlock, extractFrontmatterBlock, extractRequirementBlocks, findRequirementById, flattenRequirementTree, getAllRequirements, parseCriterionLine, parseRequirementBlock, parseRequirementBlocksFromMarkdown, parseRootLine, ROOT_LABEL_MARKER, splitRequirementFenceContent, stripFrontmatterBlock, } from "./parser-core.js";
|
|
10
10
|
export { carriesBranchVersion } from "./provenance.js";
|
|
11
11
|
export type { Metadata, ParsedCriterion, RequirementKey, RequirementNode, RequirementPrefix, RequirementsFile, } from "./schemas.js";
|
|
12
12
|
export { buildRequirementKey, canonicalRequirementKey, MetadataSchema, normalizePrefix, ParsedCriterionSchema, parseRequirementKey, REQUIREMENT_KEY_PATTERN, REQUIREMENT_PREFIX_PATTERN, RequirementKeySchema, RequirementNodeSchema, RequirementPrefixSchema, RequirementsFileSchema, ValidationError, validateKey, validateMetadata, validatePrefix, validateRequirementNode, validateRequirementsFile, } from "./schemas.js";
|
package/dist/schema/browser.js
CHANGED
|
@@ -8,12 +8,14 @@ export { buildRequirementMarkdown, buildRequirementsMarkdown, DEFAULT_DELIMITER,
|
|
|
8
8
|
export { buildMetadata, constructKey, convexToRequirements, extractRequirementKeys, groupByRoot, parseKey, requirementsToConvex, } from "./conversions.js";
|
|
9
9
|
// Parser core (pure TypeScript - browser-safe, no fs dependency)
|
|
10
10
|
// These functions parse markdown strings directly without file I/O
|
|
11
|
-
export { DELIMITER_PATTERN,
|
|
11
|
+
export { DELIMITER_PATTERN,
|
|
12
|
+
// With stripFrontmatterBlock: a requirements file read from a repository
|
|
13
|
+
// in the browser (SOLDOC-12), and one the solution's agent submits, read
|
|
14
|
+
// from its checkout (BRANCH-1.0).
|
|
15
|
+
extractFrontmatterBlock, extractRequirementBlocks, findRequirementById, flattenRequirementTree, getAllRequirements, parseCriterionLine, parseRequirementBlock, parseRequirementBlocksFromMarkdown, parseRootLine,
|
|
12
16
|
// The web reaches parser-core only through this entry point, so without this
|
|
13
17
|
// its readers have no way to import the marker and must hard-code it.
|
|
14
|
-
ROOT_LABEL_MARKER, splitRequirementFenceContent,
|
|
15
|
-
// A requirements file read from a repository in the browser (SOLDOC-12).
|
|
16
|
-
stripFrontmatterBlock, } from "./parser-core.js";
|
|
18
|
+
ROOT_LABEL_MARKER, splitRequirementFenceContent, stripFrontmatterBlock, } from "./parser-core.js";
|
|
17
19
|
// Whether a publish that says it lands a branch version matches it
|
|
18
20
|
// (BRANCH-7.11), checked by the web app's merge and by the backend alike
|
|
19
21
|
export { carriesBranchVersion } from "./provenance.js";
|
package/package.json
CHANGED