@agimon-ai/po-plan 0.0.0-alpha.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 +98 -0
- package/dist/apiContracts.cjs +57 -0
- package/dist/apiContracts.cjs.map +1 -0
- package/dist/apiContracts.d.mts +53 -0
- package/dist/apiContracts.d.mts.map +1 -0
- package/dist/apiContracts.mjs +52 -0
- package/dist/apiContracts.mjs.map +1 -0
- package/dist/config-BC-Tou05.mjs +25 -0
- package/dist/config-BC-Tou05.mjs.map +1 -0
- package/dist/config-D0iTexGm.cjs +42 -0
- package/dist/config-D0iTexGm.cjs.map +1 -0
- package/dist/config-DWo57HKB.d.mts +13 -0
- package/dist/config-DWo57HKB.d.mts.map +1 -0
- package/dist/config.cjs +12 -0
- package/dist/config.d.mts +2 -0
- package/dist/config.mjs +2 -0
- package/dist/extensions/mcp-ui.mjs +46 -0
- package/dist/extensions/mcp-ui.mjs.map +1 -0
- package/dist/extensions/mcp.cjs +93 -0
- package/dist/extensions/mcp.cjs.map +1 -0
- package/dist/extensions/mcp.d.mts +5 -0
- package/dist/extensions/mcp.d.mts.map +1 -0
- package/dist/extensions/mcp.mjs +88 -0
- package/dist/extensions/mcp.mjs.map +1 -0
- package/dist/extensions/server.cjs +1025 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +993 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/extensions/web.mjs +861 -0
- package/dist/extensions/web.mjs.map +1 -0
- package/dist/fableFlow-BDc8a__Y.mjs +214 -0
- package/dist/fableFlow-BDc8a__Y.mjs.map +1 -0
- package/dist/fableFlow-CzfrLPzJ.cjs +279 -0
- package/dist/fableFlow-CzfrLPzJ.cjs.map +1 -0
- package/dist/fableFlow.cjs +13 -0
- package/dist/fableFlow.d.mts +2 -0
- package/dist/fableFlow.mjs +2 -0
- package/dist/index-C8e7IK60.d.mts +68 -0
- package/dist/index-C8e7IK60.d.mts.map +1 -0
- package/dist/index-C9QBG9cw.d.mts +51 -0
- package/dist/index-C9QBG9cw.d.mts.map +1 -0
- package/dist/index.cjs +31 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +4 -0
- package/dist/logSinkTelemetry.cjs +42 -0
- package/dist/logSinkTelemetry.cjs.map +1 -0
- package/dist/logSinkTelemetry.d.mts +33 -0
- package/dist/logSinkTelemetry.d.mts.map +1 -0
- package/dist/logSinkTelemetry.mjs +40 -0
- package/dist/logSinkTelemetry.mjs.map +1 -0
- package/dist/planConfig.cjs +190 -0
- package/dist/planConfig.cjs.map +1 -0
- package/dist/planConfig.d.mts +47 -0
- package/dist/planConfig.d.mts.map +1 -0
- package/dist/planConfig.mjs +186 -0
- package/dist/planConfig.mjs.map +1 -0
- package/dist/prompts-DUVUPNZd.cjs +103 -0
- package/dist/prompts-DUVUPNZd.cjs.map +1 -0
- package/dist/prompts-DnVJGtEC.mjs +68 -0
- package/dist/prompts-DnVJGtEC.mjs.map +1 -0
- package/dist/prompts.cjs +8 -0
- package/dist/prompts.d.mts +2 -0
- package/dist/prompts.mjs +2 -0
- package/llms.txt +9 -0
- package/package.json +164 -0
- package/src/prompts/po-use-plan/SKILL.md +44 -0
- package/src/types/planApi.ts +125 -0
- package/src/types/planSettings.ts +78 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vuong Ngo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# @agimon-ai/po-plan
|
|
2
|
+
|
|
3
|
+
Create and review stored plans in Po with file edits withheld, explicit completion, and normal, debug, or code review flows.
|
|
4
|
+
|
|
5
|
+
Part of the [Po distribution](https://www.npmjs.com/package/@agimon-ai/po).
|
|
6
|
+
|
|
7
|
+
Plan mode withholds the `edit` and `write` tools while it is active, and adds its own tools
|
|
8
|
+
without removing anything else other packages supply. Planning instructions still require
|
|
9
|
+
read-only exploration until the user approves implementation, except for saving the plan
|
|
10
|
+
through `write_plan`. `bash` stays available, so Plan raises the cost of an accidental write
|
|
11
|
+
rather than preventing one. Plan is not a sandbox or a repository permission boundary.
|
|
12
|
+
|
|
13
|
+
> **Alpha:** planning flows and tool contracts may change between releases.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- Node.js 24 or newer
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
The seeded `modes.yaml` selects Plan in `default.packages`. Keep it there or select it through a
|
|
22
|
+
layer; Plan remains inactive until requested.
|
|
23
|
+
|
|
24
|
+
## Start and exit
|
|
25
|
+
|
|
26
|
+
Normal planning expects repository exploration and delegation where available. Debug planning
|
|
27
|
+
separates verified evidence from hypotheses. Code Review planning inspects changes read-only,
|
|
28
|
+
reports actionable findings with severity and file references, and proposes scoped fixes with
|
|
29
|
+
validation steps. All three flavors use the same stored-plan and explicit approval workflow.
|
|
30
|
+
Saved Fable sessions resume as normal planning while retaining their original model settings.
|
|
31
|
+
The child capability ceiling comes from `doom/subagent-policy` and is removed when either
|
|
32
|
+
provider or Plan unloads.
|
|
33
|
+
|
|
34
|
+
A model restoration failure leaves Plan active and reports the failure rather than pretending
|
|
35
|
+
the session was restored.
|
|
36
|
+
|
|
37
|
+
## Write and complete a plan
|
|
38
|
+
|
|
39
|
+
`write_plan` accepts visible Markdown plan content and writes a unique file under `~/.po/plans` by
|
|
40
|
+
default. It refuses a plan that is empty or was not presented in visible assistant output, and it
|
|
41
|
+
validates the destination before writing. The plan path and content become visible session state.
|
|
42
|
+
|
|
43
|
+
After a plan exists, `complete_plan` asks whether to exit or continue planning. The user must
|
|
44
|
+
explicitly approve exit. If the selected mode already exposes `ask_user_question`, Plan reuses it;
|
|
45
|
+
it does not activate an omitted feedback layer.
|
|
46
|
+
|
|
47
|
+
## Read and edit the plan in the cockpit
|
|
48
|
+
|
|
49
|
+
Once `write_plan` succeeds, a `plan` group appears in the cockpit's activity dock and stays for the
|
|
50
|
+
rest of the session, including after Plan mode is exited: that is when the agent starts
|
|
51
|
+
implementing, which is when the plan is most worth having open. The row opens a temporary tab that
|
|
52
|
+
renders the plan as Markdown, with a `source` view that edits it and saves back to the plan file.
|
|
53
|
+
|
|
54
|
+
The agent reads the plan file at the start of every turn, so a saved edit is what it implements. A
|
|
55
|
+
save carries the hash the reader loaded and is refused if the agent rewrote the plan in the
|
|
56
|
+
meantime, rather than overwriting it.
|
|
57
|
+
|
|
58
|
+
The cockpit reaches the plan through this package's session API, mounted at `/api/plugin/plans`.
|
|
59
|
+
Because a host imports the built entry, a change here needs `pnpm build` and `po sync` before a
|
|
60
|
+
running cockpit sees it.
|
|
61
|
+
|
|
62
|
+
## Configure models and storage
|
|
63
|
+
|
|
64
|
+
Put planning settings in the repository's `.po/config.yaml` or the global
|
|
65
|
+
`~/.po/config.yaml`:
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
modes:
|
|
69
|
+
planning:
|
|
70
|
+
main:
|
|
71
|
+
model: provider/planning-model
|
|
72
|
+
thinking: high
|
|
73
|
+
subagents:
|
|
74
|
+
model: provider/research-model
|
|
75
|
+
thinking: medium
|
|
76
|
+
plansDirectory: ~/.po/plans
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`main` controls the planning model, `subagents` controls delegated research defaults, and
|
|
80
|
+
`plansDirectory` can be absolute, repository-relative, or under `~`. Planning and delegated model
|
|
81
|
+
calls consume provider quota.
|
|
82
|
+
|
|
83
|
+
## Public API
|
|
84
|
+
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pnpm build
|
|
89
|
+
pnpm typecheck
|
|
90
|
+
pnpm test
|
|
91
|
+
pnpm lint
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Maintained by [Agimon](https://agimon.ai/about).
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
MIT
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
let _agimon_ai_po_core_apiContracts = require("@agimon-ai/po-core/apiContracts");
|
|
6
|
+
let typebox = require("typebox");
|
|
7
|
+
//#region src/schemas/apiContracts.ts
|
|
8
|
+
const S = typebox.Type.String();
|
|
9
|
+
const B = typebox.Type.Boolean();
|
|
10
|
+
const O = typebox.Type.Optional;
|
|
11
|
+
const PlanDetailSchema = typebox.Type.Object({
|
|
12
|
+
path: S,
|
|
13
|
+
title: S,
|
|
14
|
+
writtenAt: S,
|
|
15
|
+
planId: O(S),
|
|
16
|
+
content: S,
|
|
17
|
+
hash: S,
|
|
18
|
+
unavailable: B,
|
|
19
|
+
reason: O(S)
|
|
20
|
+
});
|
|
21
|
+
const apiContracts = (0, _agimon_ai_po_core_apiContracts.defineApiContract)({
|
|
22
|
+
version: 1,
|
|
23
|
+
sockets: [],
|
|
24
|
+
dynamic: [],
|
|
25
|
+
http: [{
|
|
26
|
+
id: "plan.current",
|
|
27
|
+
scope: "session",
|
|
28
|
+
basePath: "plans",
|
|
29
|
+
path: "/current",
|
|
30
|
+
method: "GET",
|
|
31
|
+
authentication: "owner",
|
|
32
|
+
description: "Read the current plan.",
|
|
33
|
+
responses: (0, _agimon_ai_po_core_apiContracts.jsonApiResponses)(PlanDetailSchema)
|
|
34
|
+
}, {
|
|
35
|
+
id: "plan.save",
|
|
36
|
+
scope: "session",
|
|
37
|
+
basePath: "plans",
|
|
38
|
+
path: "/content",
|
|
39
|
+
method: "PUT",
|
|
40
|
+
authentication: "owner",
|
|
41
|
+
description: "Save the plan if its hash has not changed.",
|
|
42
|
+
body: {
|
|
43
|
+
required: true,
|
|
44
|
+
contentType: "application/json",
|
|
45
|
+
schema: typebox.Type.Object({
|
|
46
|
+
expectedHash: S,
|
|
47
|
+
content: S
|
|
48
|
+
})
|
|
49
|
+
},
|
|
50
|
+
responses: (0, _agimon_ai_po_core_apiContracts.jsonApiResponses)(typebox.Type.Object({ hash: S }))
|
|
51
|
+
}]
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
exports.apiContracts = apiContracts;
|
|
55
|
+
exports.default = apiContracts;
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=apiContracts.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract","jsonApiResponses"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst B = Type.Boolean();\nconst O = Type.Optional;\nexport const PlanDetailSchema = Type.Object({\n path: S,\n title: S,\n writtenAt: S,\n planId: O(S),\n content: S,\n hash: S,\n unavailable: B,\n reason: O(S),\n});\nexport const apiContracts = defineApiContract({\n version: 1,\n sockets: [],\n dynamic: [],\n http: [\n {\n id: 'plan.current',\n scope: 'session',\n basePath: 'plans',\n path: '/current',\n method: 'GET',\n authentication: 'owner',\n description: 'Read the current plan.',\n responses: jsonApiResponses(PlanDetailSchema),\n },\n {\n id: 'plan.save',\n scope: 'session',\n basePath: 'plans',\n path: '/content',\n method: 'PUT',\n authentication: 'owner',\n description: 'Save the plan if its hash has not changed.',\n body: { required: true, contentType: 'application/json', schema: Type.Object({ expectedHash: S, content: S }) },\n responses: jsonApiResponses(Type.Object({ hash: S })),\n },\n ],\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;AAGA,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,QAAQ;AACvB,MAAM,IAAIA,QAAAA,KAAK;AACf,MAAa,mBAAmBA,QAAAA,KAAK,OAAO;CAC1C,MAAM;CACN,OAAO;CACP,WAAW;CACX,QAAQ,EAAE,CAAC;CACX,SAAS;CACT,MAAM;CACN,aAAa;CACb,QAAQ,EAAE,CAAC;AACb,CAAC;AACD,MAAa,gBAAA,GAAeC,gCAAAA,kBAAAA,CAAkB;CAC5C,SAAS;CACT,SAAS,CAAC;CACV,SAAS,CAAC;CACV,MAAM,CACJ;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,MAAM;EACN,QAAQ;EACR,gBAAgB;EAChB,aAAa;EACb,YAAA,GAAWC,gCAAAA,iBAAAA,CAAiB,gBAAgB;CAC9C,GACA;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,MAAM;EACN,QAAQ;EACR,gBAAgB;EAChB,aAAa;EACb,MAAM;GAAE,UAAU;GAAM,aAAa;GAAoB,QAAQF,QAAAA,KAAK,OAAO;IAAE,cAAc;IAAG,SAAS;GAAE,CAAC;EAAE;EAC9G,YAAA,GAAWE,gCAAAA,iBAAAA,CAAiBF,QAAAA,KAAK,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;CACtD,CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
//#region src/schemas/apiContracts.d.ts
|
|
3
|
+
export declare const apiContracts: {
|
|
4
|
+
version: 1;
|
|
5
|
+
protocols?: Record<string, string> | undefined;
|
|
6
|
+
schemas?: Record<string, boolean | object> | undefined;
|
|
7
|
+
http: {
|
|
8
|
+
id: string;
|
|
9
|
+
scope: "global" | "session" | "workspace";
|
|
10
|
+
basePath?: string | undefined;
|
|
11
|
+
path: string;
|
|
12
|
+
method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
|
|
13
|
+
description: string;
|
|
14
|
+
availability?: string | undefined;
|
|
15
|
+
authentication: "device" | "none" | "owner";
|
|
16
|
+
parameters?: {
|
|
17
|
+
name: string;
|
|
18
|
+
in: "header" | "path" | "query";
|
|
19
|
+
required: boolean;
|
|
20
|
+
schema: boolean | object;
|
|
21
|
+
}[] | undefined;
|
|
22
|
+
body?: {
|
|
23
|
+
contentType: string;
|
|
24
|
+
contentTypes?: string[] | undefined;
|
|
25
|
+
required: boolean;
|
|
26
|
+
schema: boolean | object;
|
|
27
|
+
} | undefined;
|
|
28
|
+
responses: Record<string, {
|
|
29
|
+
description: string;
|
|
30
|
+
contentType?: string | undefined;
|
|
31
|
+
schema?: boolean | object | undefined;
|
|
32
|
+
events?: Record<string, boolean | object> | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
}[];
|
|
35
|
+
sockets: {
|
|
36
|
+
id: string;
|
|
37
|
+
scope: "global" | "session" | "workspace";
|
|
38
|
+
description: string;
|
|
39
|
+
availability?: string | undefined;
|
|
40
|
+
service: string;
|
|
41
|
+
member: string;
|
|
42
|
+
direction: "client-to-server" | "server-to-client";
|
|
43
|
+
kind: "channel" | "method" | "state";
|
|
44
|
+
input: boolean | object;
|
|
45
|
+
output?: boolean | object | undefined;
|
|
46
|
+
errors?: boolean | object | undefined;
|
|
47
|
+
}[];
|
|
48
|
+
dynamic: string[];
|
|
49
|
+
gaps?: string[] | undefined;
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { apiContracts as default };
|
|
53
|
+
//# sourceMappingURL=apiContracts.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";;qBAgBa"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineApiContract, jsonApiResponses } from "@agimon-ai/po-core/apiContracts";
|
|
2
|
+
import { Type } from "typebox";
|
|
3
|
+
//#region src/schemas/apiContracts.ts
|
|
4
|
+
const S = Type.String();
|
|
5
|
+
const B = Type.Boolean();
|
|
6
|
+
const O = Type.Optional;
|
|
7
|
+
const PlanDetailSchema = Type.Object({
|
|
8
|
+
path: S,
|
|
9
|
+
title: S,
|
|
10
|
+
writtenAt: S,
|
|
11
|
+
planId: O(S),
|
|
12
|
+
content: S,
|
|
13
|
+
hash: S,
|
|
14
|
+
unavailable: B,
|
|
15
|
+
reason: O(S)
|
|
16
|
+
});
|
|
17
|
+
const apiContracts = defineApiContract({
|
|
18
|
+
version: 1,
|
|
19
|
+
sockets: [],
|
|
20
|
+
dynamic: [],
|
|
21
|
+
http: [{
|
|
22
|
+
id: "plan.current",
|
|
23
|
+
scope: "session",
|
|
24
|
+
basePath: "plans",
|
|
25
|
+
path: "/current",
|
|
26
|
+
method: "GET",
|
|
27
|
+
authentication: "owner",
|
|
28
|
+
description: "Read the current plan.",
|
|
29
|
+
responses: jsonApiResponses(PlanDetailSchema)
|
|
30
|
+
}, {
|
|
31
|
+
id: "plan.save",
|
|
32
|
+
scope: "session",
|
|
33
|
+
basePath: "plans",
|
|
34
|
+
path: "/content",
|
|
35
|
+
method: "PUT",
|
|
36
|
+
authentication: "owner",
|
|
37
|
+
description: "Save the plan if its hash has not changed.",
|
|
38
|
+
body: {
|
|
39
|
+
required: true,
|
|
40
|
+
contentType: "application/json",
|
|
41
|
+
schema: Type.Object({
|
|
42
|
+
expectedHash: S,
|
|
43
|
+
content: S
|
|
44
|
+
})
|
|
45
|
+
},
|
|
46
|
+
responses: jsonApiResponses(Type.Object({ hash: S }))
|
|
47
|
+
}]
|
|
48
|
+
});
|
|
49
|
+
//#endregion
|
|
50
|
+
export { apiContracts, apiContracts as default };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=apiContracts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst B = Type.Boolean();\nconst O = Type.Optional;\nexport const PlanDetailSchema = Type.Object({\n path: S,\n title: S,\n writtenAt: S,\n planId: O(S),\n content: S,\n hash: S,\n unavailable: B,\n reason: O(S),\n});\nexport const apiContracts = defineApiContract({\n version: 1,\n sockets: [],\n dynamic: [],\n http: [\n {\n id: 'plan.current',\n scope: 'session',\n basePath: 'plans',\n path: '/current',\n method: 'GET',\n authentication: 'owner',\n description: 'Read the current plan.',\n responses: jsonApiResponses(PlanDetailSchema),\n },\n {\n id: 'plan.save',\n scope: 'session',\n basePath: 'plans',\n path: '/content',\n method: 'PUT',\n authentication: 'owner',\n description: 'Save the plan if its hash has not changed.',\n body: { required: true, contentType: 'application/json', schema: Type.Object({ expectedHash: S, content: S }) },\n responses: jsonApiResponses(Type.Object({ hash: S })),\n },\n ],\n});\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK,QAAQ;AACvB,MAAM,IAAI,KAAK;AACf,MAAa,mBAAmB,KAAK,OAAO;CAC1C,MAAM;CACN,OAAO;CACP,WAAW;CACX,QAAQ,EAAE,CAAC;CACX,SAAS;CACT,MAAM;CACN,aAAa;CACb,QAAQ,EAAE,CAAC;AACb,CAAC;AACD,MAAa,eAAe,kBAAkB;CAC5C,SAAS;CACT,SAAS,CAAC;CACV,SAAS,CAAC;CACV,MAAM,CACJ;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,MAAM;EACN,QAAQ;EACR,gBAAgB;EAChB,aAAa;EACb,WAAW,iBAAiB,gBAAgB;CAC9C,GACA;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,MAAM;EACN,QAAQ;EACR,gBAAgB;EAChB,aAAa;EACb,MAAM;GAAE,UAAU;GAAM,aAAa;GAAoB,QAAQ,KAAK,OAAO;IAAE,cAAc;IAAG,SAAS;GAAE,CAAC;EAAE;EAC9G,WAAW,iBAAiB,KAAK,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;CACtD,CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getHarnessState, globalDoomConfigPath, loadDoomConfig, loadHarnessState, mergeDoomConfigs, parseDoomConfig, parsePlanningModeConfig, repositoryDoomConfigPath, resolvePlanningPlansDirectory } from "@agimon-ai/po-config";
|
|
2
|
+
//#region src/schemas/plan/config.ts
|
|
3
|
+
const DEFAULT_PROJECT_TRUST = "ask";
|
|
4
|
+
function parseDoomConfig$1(content, filePath) {
|
|
5
|
+
const config = parseDoomConfig(content, filePath);
|
|
6
|
+
return config.modes ? { modes: config.modes } : {};
|
|
7
|
+
}
|
|
8
|
+
function mergeDoomConfigs$1(globalConfig, repositoryConfig) {
|
|
9
|
+
const merged = mergeDoomConfigs({
|
|
10
|
+
...globalConfig,
|
|
11
|
+
projectTrust: DEFAULT_PROJECT_TRUST
|
|
12
|
+
}, {
|
|
13
|
+
...repositoryConfig,
|
|
14
|
+
projectTrust: DEFAULT_PROJECT_TRUST
|
|
15
|
+
});
|
|
16
|
+
return merged.modes ? { modes: merged.modes } : {};
|
|
17
|
+
}
|
|
18
|
+
function loadDoomConfig$1(repoRoot, homeDirectory) {
|
|
19
|
+
const config = loadDoomConfig(repoRoot, homeDirectory);
|
|
20
|
+
return config.modes ? { modes: config.modes } : {};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { mergeDoomConfigs$1 as a, repositoryDoomConfigPath as c, loadHarnessState as i, resolvePlanningPlansDirectory as l, globalDoomConfigPath as n, parseDoomConfig$1 as o, loadDoomConfig$1 as r, parsePlanningModeConfig as s, getHarnessState as t };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=config-BC-Tou05.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-BC-Tou05.mjs","names":["parseDoomConfig","parseSharedDoomConfig","mergeDoomConfigs","mergeSharedDoomConfigs","loadDoomConfig","loadSharedDoomConfig"],"sources":["../src/schemas/plan/config.ts"],"sourcesContent":["import {\n getHarnessState,\n globalDoomConfigPath,\n loadHarnessState,\n loadDoomConfig as loadSharedDoomConfig,\n mergeDoomConfigs as mergeSharedDoomConfigs,\n type PlanningAgentConfig,\n type PlanningModeConfig,\n type PlanningThinkingLevel,\n parsePlanningModeConfig,\n parseDoomConfig as parseSharedDoomConfig,\n repositoryDoomConfigPath,\n resolvePlanningPlansDirectory,\n} from '@agimon-ai/po-config';\n\nexport type { PlanningAgentConfig, PlanningModeConfig, PlanningThinkingLevel };\n\nexport interface DoomConfig {\n modes?: {\n planning?: PlanningModeConfig;\n };\n}\n\nconst DEFAULT_PROJECT_TRUST = 'ask' as const;\n\nexport {\n getHarnessState,\n globalDoomConfigPath,\n loadHarnessState,\n parsePlanningModeConfig,\n repositoryDoomConfigPath,\n resolvePlanningPlansDirectory,\n};\n\nexport function parseDoomConfig(content: string, filePath: string): DoomConfig {\n const config = parseSharedDoomConfig(content, filePath);\n return config.modes ? { modes: config.modes } : {};\n}\n\nexport function mergeDoomConfigs(globalConfig: DoomConfig, repositoryConfig: DoomConfig): DoomConfig {\n const merged = mergeSharedDoomConfigs(\n { ...globalConfig, projectTrust: DEFAULT_PROJECT_TRUST },\n { ...repositoryConfig, projectTrust: DEFAULT_PROJECT_TRUST },\n );\n return merged.modes ? { modes: merged.modes } : {};\n}\n\nexport function loadDoomConfig(repoRoot: string, homeDirectory?: string): DoomConfig {\n const config = loadSharedDoomConfig(repoRoot, homeDirectory);\n return config.modes ? { modes: config.modes } : {};\n}\n"],"mappings":";;AAuBA,MAAM,wBAAwB;AAW9B,SAAgBA,kBAAgB,SAAiB,UAA8B;CAC7E,MAAM,SAASC,gBAAsB,SAAS,QAAQ;CACtD,OAAO,OAAO,QAAQ,EAAE,OAAO,OAAO,MAAM,IAAI,CAAC;AACnD;AAEA,SAAgBC,mBAAiB,cAA0B,kBAA0C;CACnG,MAAM,SAASC,iBACb;EAAE,GAAG;EAAc,cAAc;CAAsB,GACvD;EAAE,GAAG;EAAkB,cAAc;CAAsB,CAC7D;CACA,OAAO,OAAO,QAAQ,EAAE,OAAO,OAAO,MAAM,IAAI,CAAC;AACnD;AAEA,SAAgBC,iBAAe,UAAkB,eAAoC;CACnF,MAAM,SAASC,eAAqB,UAAU,aAAa;CAC3D,OAAO,OAAO,QAAQ,EAAE,OAAO,OAAO,MAAM,IAAI,CAAC;AACnD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
let _agimon_ai_po_config = require("@agimon-ai/po-config");
|
|
2
|
+
//#region src/schemas/plan/config.ts
|
|
3
|
+
const DEFAULT_PROJECT_TRUST = "ask";
|
|
4
|
+
function parseDoomConfig(content, filePath) {
|
|
5
|
+
const config = (0, _agimon_ai_po_config.parseDoomConfig)(content, filePath);
|
|
6
|
+
return config.modes ? { modes: config.modes } : {};
|
|
7
|
+
}
|
|
8
|
+
function mergeDoomConfigs(globalConfig, repositoryConfig) {
|
|
9
|
+
const merged = (0, _agimon_ai_po_config.mergeDoomConfigs)({
|
|
10
|
+
...globalConfig,
|
|
11
|
+
projectTrust: DEFAULT_PROJECT_TRUST
|
|
12
|
+
}, {
|
|
13
|
+
...repositoryConfig,
|
|
14
|
+
projectTrust: DEFAULT_PROJECT_TRUST
|
|
15
|
+
});
|
|
16
|
+
return merged.modes ? { modes: merged.modes } : {};
|
|
17
|
+
}
|
|
18
|
+
function loadDoomConfig(repoRoot, homeDirectory) {
|
|
19
|
+
const config = (0, _agimon_ai_po_config.loadDoomConfig)(repoRoot, homeDirectory);
|
|
20
|
+
return config.modes ? { modes: config.modes } : {};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
Object.defineProperty(exports, "loadDoomConfig", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return loadDoomConfig;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "mergeDoomConfigs", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function() {
|
|
32
|
+
return mergeDoomConfigs;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "parseDoomConfig", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function() {
|
|
38
|
+
return parseDoomConfig;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=config-D0iTexGm.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-D0iTexGm.cjs","names":["parseSharedDoomConfig","mergeSharedDoomConfigs","loadSharedDoomConfig"],"sources":["../src/schemas/plan/config.ts"],"sourcesContent":["import {\n getHarnessState,\n globalDoomConfigPath,\n loadHarnessState,\n loadDoomConfig as loadSharedDoomConfig,\n mergeDoomConfigs as mergeSharedDoomConfigs,\n type PlanningAgentConfig,\n type PlanningModeConfig,\n type PlanningThinkingLevel,\n parsePlanningModeConfig,\n parseDoomConfig as parseSharedDoomConfig,\n repositoryDoomConfigPath,\n resolvePlanningPlansDirectory,\n} from '@agimon-ai/po-config';\n\nexport type { PlanningAgentConfig, PlanningModeConfig, PlanningThinkingLevel };\n\nexport interface DoomConfig {\n modes?: {\n planning?: PlanningModeConfig;\n };\n}\n\nconst DEFAULT_PROJECT_TRUST = 'ask' as const;\n\nexport {\n getHarnessState,\n globalDoomConfigPath,\n loadHarnessState,\n parsePlanningModeConfig,\n repositoryDoomConfigPath,\n resolvePlanningPlansDirectory,\n};\n\nexport function parseDoomConfig(content: string, filePath: string): DoomConfig {\n const config = parseSharedDoomConfig(content, filePath);\n return config.modes ? { modes: config.modes } : {};\n}\n\nexport function mergeDoomConfigs(globalConfig: DoomConfig, repositoryConfig: DoomConfig): DoomConfig {\n const merged = mergeSharedDoomConfigs(\n { ...globalConfig, projectTrust: DEFAULT_PROJECT_TRUST },\n { ...repositoryConfig, projectTrust: DEFAULT_PROJECT_TRUST },\n );\n return merged.modes ? { modes: merged.modes } : {};\n}\n\nexport function loadDoomConfig(repoRoot: string, homeDirectory?: string): DoomConfig {\n const config = loadSharedDoomConfig(repoRoot, homeDirectory);\n return config.modes ? { modes: config.modes } : {};\n}\n"],"mappings":";;AAuBA,MAAM,wBAAwB;AAW9B,SAAgB,gBAAgB,SAAiB,UAA8B;CAC7E,MAAM,UAAA,GAASA,qBAAAA,gBAAAA,CAAsB,SAAS,QAAQ;CACtD,OAAO,OAAO,QAAQ,EAAE,OAAO,OAAO,MAAM,IAAI,CAAC;AACnD;AAEA,SAAgB,iBAAiB,cAA0B,kBAA0C;CACnG,MAAM,UAAA,GAASC,qBAAAA,iBAAAA,CACb;EAAE,GAAG;EAAc,cAAc;CAAsB,GACvD;EAAE,GAAG;EAAkB,cAAc;CAAsB,CAC7D;CACA,OAAO,OAAO,QAAQ,EAAE,OAAO,OAAO,MAAM,IAAI,CAAC;AACnD;AAEA,SAAgB,eAAe,UAAkB,eAAoC;CACnF,MAAM,UAAA,GAASC,qBAAAA,eAAAA,CAAqB,UAAU,aAAa;CAC3D,OAAO,OAAO,QAAQ,EAAE,OAAO,OAAO,MAAM,IAAI,CAAC;AACnD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PlanningAgentConfig, PlanningModeConfig, PlanningThinkingLevel, getHarnessState, globalDoomConfigPath, loadHarnessState, parsePlanningModeConfig, repositoryDoomConfigPath, resolvePlanningPlansDirectory } from "@agimon-ai/po-config";
|
|
2
|
+
//#region src/schemas/plan/config.d.ts
|
|
3
|
+
interface DoomConfig {
|
|
4
|
+
modes?: {
|
|
5
|
+
planning?: PlanningModeConfig;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
declare function parseDoomConfig$1(content: string, filePath: string): DoomConfig;
|
|
9
|
+
declare function mergeDoomConfigs$1(globalConfig: DoomConfig, repositoryConfig: DoomConfig): DoomConfig;
|
|
10
|
+
declare function loadDoomConfig$1(repoRoot: string, homeDirectory?: string): DoomConfig;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { getHarnessState as a, loadHarnessState as c, parsePlanningModeConfig as d, repositoryDoomConfigPath as f, PlanningThinkingLevel as i, mergeDoomConfigs$1 as l, PlanningAgentConfig as n, globalDoomConfigPath as o, resolvePlanningPlansDirectory as p, PlanningModeConfig as r, loadDoomConfig$1 as s, DoomConfig as t, parseDoomConfig$1 as u };
|
|
13
|
+
//# sourceMappingURL=config-DWo57HKB.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-DWo57HKB.d.mts","names":["parseDoomConfig","mergeDoomConfigs","loadDoomConfig"],"sources":["../src/schemas/plan/config.ts"],"mappings":";;UAiBiB;EACf;IACE,WAAW;;;iBAeCA,kBAAgB,iBAAiB,mBAAmB;iBAKpDC,mBAAiB,cAAc,YAAY,kBAAkB,aAAa;iBAQ1EC,iBAAe,kBAAkB,yBAAyB"}
|
package/dist/config.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_config = require("./config-D0iTexGm.cjs");
|
|
3
|
+
let _agimon_ai_po_config = require("@agimon-ai/po-config");
|
|
4
|
+
exports.getHarnessState = _agimon_ai_po_config.getHarnessState;
|
|
5
|
+
exports.globalDoomConfigPath = _agimon_ai_po_config.globalDoomConfigPath;
|
|
6
|
+
exports.loadDoomConfig = require_config.loadDoomConfig;
|
|
7
|
+
exports.loadHarnessState = _agimon_ai_po_config.loadHarnessState;
|
|
8
|
+
exports.mergeDoomConfigs = require_config.mergeDoomConfigs;
|
|
9
|
+
exports.parseDoomConfig = require_config.parseDoomConfig;
|
|
10
|
+
exports.parsePlanningModeConfig = _agimon_ai_po_config.parsePlanningModeConfig;
|
|
11
|
+
exports.repositoryDoomConfigPath = _agimon_ai_po_config.repositoryDoomConfigPath;
|
|
12
|
+
exports.resolvePlanningPlansDirectory = _agimon_ai_po_config.resolvePlanningPlansDirectory;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as getHarnessState, c as loadHarnessState, d as parsePlanningModeConfig, f as repositoryDoomConfigPath, i as PlanningThinkingLevel, l as mergeDoomConfigs, n as PlanningAgentConfig, o as globalDoomConfigPath, p as resolvePlanningPlansDirectory, r as PlanningModeConfig, s as loadDoomConfig, t as DoomConfig, u as parseDoomConfig } from "./config-DWo57HKB.mjs";
|
|
2
|
+
export { DoomConfig, type PlanningAgentConfig, type PlanningModeConfig, type PlanningThinkingLevel, getHarnessState, globalDoomConfigPath, loadDoomConfig, loadHarnessState, mergeDoomConfigs, parseDoomConfig, parsePlanningModeConfig, repositoryDoomConfigPath, resolvePlanningPlansDirectory };
|
package/dist/config.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as mergeDoomConfigs, c as repositoryDoomConfigPath, i as loadHarnessState, l as resolvePlanningPlansDirectory, n as globalDoomConfigPath, o as parseDoomConfig, r as loadDoomConfig, s as parsePlanningModeConfig, t as getHarnessState } from "./config-BC-Tou05.mjs";
|
|
2
|
+
export { getHarnessState, globalDoomConfigPath, loadDoomConfig, loadHarnessState, mergeDoomConfigs, parseDoomConfig, parsePlanningModeConfig, repositoryDoomConfigPath, resolvePlanningPlansDirectory };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineMcpWidget } from "@agimon-ai/po-core/web";
|
|
2
|
+
import { McpToolFields, McpToolFrame, McpToolOutput } from "@agimon-ai/po-web-components";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/extensions/workspaces/sessions/(frontend)/tool/complete_plan.mcp.tsx
|
|
5
|
+
function CompletePlanMcpWidget(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx(McpToolFrame, {
|
|
7
|
+
...props,
|
|
8
|
+
title: "Request plan approval",
|
|
9
|
+
children: /* @__PURE__ */ jsx(McpToolOutput, { result: props.result })
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
var complete_plan_mcp_default = defineMcpWidget(CompletePlanMcpWidget);
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/extensions/workspaces/sessions/(frontend)/tool/record_debug_evidence.mcp.tsx
|
|
15
|
+
function RecordDebugEvidenceMcpWidget(props) {
|
|
16
|
+
return /* @__PURE__ */ jsxs(McpToolFrame, {
|
|
17
|
+
...props,
|
|
18
|
+
title: "Record debug evidence",
|
|
19
|
+
children: [/* @__PURE__ */ jsx(McpToolFields, { fields: [
|
|
20
|
+
["Issue", props.args.issue],
|
|
21
|
+
["Expected behavior", props.args.expectedBehavior],
|
|
22
|
+
["Observed behavior", props.args.actualBehavior]
|
|
23
|
+
] }), /* @__PURE__ */ jsx(McpToolOutput, { result: props.result })]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
var record_debug_evidence_mcp_default = defineMcpWidget(RecordDebugEvidenceMcpWidget);
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/extensions/workspaces/sessions/(frontend)/tool/write_plan.mcp.tsx
|
|
29
|
+
function WritePlanMcpWidget(props) {
|
|
30
|
+
return /* @__PURE__ */ jsxs(McpToolFrame, {
|
|
31
|
+
...props,
|
|
32
|
+
title: "Save plan",
|
|
33
|
+
children: [/* @__PURE__ */ jsx(McpToolFields, { fields: [["Characters", typeof props.args.markdown === "string" ? props.args.markdown.length : void 0]] }), /* @__PURE__ */ jsx(McpToolOutput, { result: props.result })]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region generated/mcp-ui.ts
|
|
38
|
+
const widgets = {
|
|
39
|
+
"@agimon-ai/po-plan/complete_plan": complete_plan_mcp_default,
|
|
40
|
+
"@agimon-ai/po-plan/record_debug_evidence": record_debug_evidence_mcp_default,
|
|
41
|
+
"@agimon-ai/po-plan/write_plan": defineMcpWidget(WritePlanMcpWidget)
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { widgets };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=mcp-ui.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-ui.mjs","names":["Widget0","Widget1","Widget2"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/complete_plan.mcp.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/record_debug_evidence.mcp.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/write_plan.mcp.tsx","../../generated/mcp-ui.ts"],"sourcesContent":["import { defineMcpWidget, type DoomMcpWidgetProps } from '@agimon-ai/po-core/web';\nimport { McpToolFrame, McpToolOutput } from '@agimon-ai/po-web-components';\n\nfunction CompletePlanMcpWidget(props: DoomMcpWidgetProps) {\n return (\n <McpToolFrame {...props} title=\"Request plan approval\">\n <McpToolOutput result={props.result} />\n </McpToolFrame>\n );\n}\n\nexport default defineMcpWidget(CompletePlanMcpWidget);\n","import { defineMcpWidget, type DoomMcpWidgetProps } from '@agimon-ai/po-core/web';\nimport { McpToolFrame, McpToolFields, McpToolOutput } from '@agimon-ai/po-web-components';\n\nfunction RecordDebugEvidenceMcpWidget(props: DoomMcpWidgetProps) {\n return (\n <McpToolFrame {...props} title=\"Record debug evidence\">\n <McpToolFields\n fields={[\n ['Issue', props.args.issue],\n ['Expected behavior', props.args.expectedBehavior],\n ['Observed behavior', props.args.actualBehavior],\n ]}\n />\n <McpToolOutput result={props.result} />\n </McpToolFrame>\n );\n}\n\nexport default defineMcpWidget(RecordDebugEvidenceMcpWidget);\n","import { defineMcpWidget, type DoomMcpWidgetProps } from '@agimon-ai/po-core/web';\nimport { McpToolFrame, McpToolFields, McpToolOutput } from '@agimon-ai/po-web-components';\n\nfunction WritePlanMcpWidget(props: DoomMcpWidgetProps) {\n return (\n <McpToolFrame {...props} title=\"Save plan\">\n <McpToolFields\n fields={[['Characters', typeof props.args.markdown === 'string' ? props.args.markdown.length : undefined]]}\n />\n <McpToolOutput result={props.result} />\n </McpToolFrame>\n );\n}\n\nexport default defineMcpWidget(WritePlanMcpWidget);\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport type { ComponentType } from 'react';\nimport type { DoomMcpWidgetProps } from '@agimon-ai/po-core/mcpWidget';\nimport Widget0 from \"../src/extensions/workspaces/sessions/(frontend)/tool/complete_plan.mcp\";\nimport Widget1 from \"../src/extensions/workspaces/sessions/(frontend)/tool/record_debug_evidence.mcp\";\nimport Widget2 from \"../src/extensions/workspaces/sessions/(frontend)/tool/write_plan.mcp\";\n\nexport const widgets: Readonly<Record<string, ComponentType<DoomMcpWidgetProps>>> = {\n \"@agimon-ai/po-plan/complete_plan\": Widget0,\n \"@agimon-ai/po-plan/record_debug_evidence\": Widget1,\n \"@agimon-ai/po-plan/write_plan\": Widget2,\n};\n"],"mappings":";;;;AAGA,SAAS,sBAAsB,OAA2B;CACxD,OACE,oBAAC,cAAD;EAAc,GAAI;EAAO,OAAM;EAC7B,UAAA,oBAAC,eAAD,EAAe,QAAQ,MAAM,OAAS,CAAA;CAC1B,CAAA;AAElB;AAEA,IAAA,4BAAe,gBAAgB,qBAAqB;;;ACRpD,SAAS,6BAA6B,OAA2B;CAC/D,OACE,qBAAC,cAAD;EAAc,GAAI;EAAO,OAAM;EAA/B,UAAA,CACE,oBAAC,eAAD,EACE,QAAQ;GACN,CAAC,SAAS,MAAM,KAAK,KAAK;GAC1B,CAAC,qBAAqB,MAAM,KAAK,gBAAgB;GACjD,CAAC,qBAAqB,MAAM,KAAK,cAAc;EACjD,EACD,CAAA,GACD,oBAAC,eAAD,EAAe,QAAQ,MAAM,OAAS,CAAA,CAC1B;;AAElB;AAEA,IAAA,oCAAe,gBAAgB,4BAA4B;;;ACf3D,SAAS,mBAAmB,OAA2B;CACrD,OACE,qBAAC,cAAD;EAAc,GAAI;EAAO,OAAM;EAA/B,UAAA,CACE,oBAAC,eAAD,EACE,QAAQ,CAAC,CAAC,cAAc,OAAO,MAAM,KAAK,aAAa,WAAW,MAAM,KAAK,SAAS,SAAS,KAAA,CAAS,CAAC,EAC1G,CAAA,GACD,oBAAC,eAAD,EAAe,QAAQ,MAAM,OAAS,CAAA,CAC1B;;AAElB;;;ACLA,MAAa,UAAuE;CAClF,oCAAoCA;CACpC,4CAA4CC;CAC5C,iCDIa,gBAAgB,kBCJIC;AACnC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
let _agimon_ai_po_core_mcpFacet = require("@agimon-ai/po-core/mcpFacet");
|
|
6
|
+
let _agimon_ai_po_core_serverFacet = require("@agimon-ai/po-core/serverFacet");
|
|
7
|
+
let typebox = require("typebox");
|
|
8
|
+
//#region src/extensions/workspaces/sessions/(backend)/skill/po-use-plan.mcp.ts
|
|
9
|
+
var po_use_plan_mcp_default = (0, _agimon_ai_po_core_mcpFacet.defineMcpSkill)({
|
|
10
|
+
name: "po-use-plan",
|
|
11
|
+
description: "Use Doom Pi Plan to draft reviewable normal, debug, or code review plans, persist them, and exit safely.",
|
|
12
|
+
read: () => (0, _agimon_ai_po_core_serverFacet.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-use-plan/SKILL.md")
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/schemas/mcpTools.ts
|
|
16
|
+
const markdown = typebox.Type.String({ minLength: 1 });
|
|
17
|
+
const remoteWritePlanParameters = typebox.Type.Object({ markdown }, { additionalProperties: false });
|
|
18
|
+
typebox.Type.Object({ markdown: typebox.Type.Optional(markdown) }, { additionalProperties: false });
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/services/mcpTools/index.ts
|
|
21
|
+
const PLAN_MCP_TOOLS_SERVICE = "doom/plan-mcp-tools";
|
|
22
|
+
const MODE_ID = "plan";
|
|
23
|
+
const MODE_LABEL = "Plan";
|
|
24
|
+
function bindMcpTool(context, name) {
|
|
25
|
+
const catalog = context.services.get(PLAN_MCP_TOOLS_SERVICE);
|
|
26
|
+
const tool = catalog?.get(name);
|
|
27
|
+
if (!tool || !catalog) throw new Error(`Plan tool is unavailable: ${name}`);
|
|
28
|
+
const writesPlan = name === "write_plan";
|
|
29
|
+
return {
|
|
30
|
+
...tool,
|
|
31
|
+
...writesPlan ? {
|
|
32
|
+
description: "Save the supplied Markdown plan in the bound session. Requires active Plan mode. Saving does not approve implementation.",
|
|
33
|
+
parameters: remoteWritePlanParameters,
|
|
34
|
+
annotations: {
|
|
35
|
+
readOnlyHint: false,
|
|
36
|
+
destructiveHint: false,
|
|
37
|
+
openWorldHint: false
|
|
38
|
+
}
|
|
39
|
+
} : {},
|
|
40
|
+
execute(toolCallId, parameters, signal, onUpdate) {
|
|
41
|
+
if (!(context.selection.read().state?.["minor-mode"] ?? []).includes(MODE_ID)) {
|
|
42
|
+
const inactiveTools = [...catalog.names()].sort().join(", ");
|
|
43
|
+
throw new Error(`${MODE_LABEL} minor mode is inactive. Inactive ${MODE_LABEL} tools: ${inactiveTools}.`);
|
|
44
|
+
}
|
|
45
|
+
if (writesPlan && (typeof parameters !== "object" || parameters === null || !("markdown" in parameters) || typeof parameters.markdown !== "string" || !parameters.markdown.trim())) throw new Error("Supply the complete visible plan in the markdown argument. Remote calls cannot read the ChatGPT transcript.");
|
|
46
|
+
const executionSignal = AbortSignal.any([context.signal, signal ?? context.signal]);
|
|
47
|
+
return tool.execute(toolCallId, parameters, executionSignal, onUpdate, context.execution);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/extensions/workspaces/sessions/(backend)/tool/complete_plan.mcp.ts
|
|
53
|
+
var complete_plan_mcp_default = (0, _agimon_ai_po_core_mcpFacet.defineMcpTool)((context) => bindMcpTool(context, "complete_plan"));
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/extensions/workspaces/sessions/(backend)/tool/record_debug_evidence.mcp.ts
|
|
56
|
+
var record_debug_evidence_mcp_default = (0, _agimon_ai_po_core_mcpFacet.defineMcpTool)((context) => bindMcpTool(context, "record_debug_evidence"));
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/extensions/workspaces/sessions/(backend)/tool/write_plan.mcp.ts
|
|
59
|
+
var write_plan_mcp_default = (0, _agimon_ai_po_core_mcpFacet.defineMcpTool)((context) => bindMcpTool(context, "write_plan"));
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region generated/mcp.ts
|
|
62
|
+
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
63
|
+
const via = (identity, value) => value === void 0 ? void 0 : {
|
|
64
|
+
...identity,
|
|
65
|
+
...value
|
|
66
|
+
};
|
|
67
|
+
const withWidget = (key, value) => value === void 0 ? value : {
|
|
68
|
+
...value,
|
|
69
|
+
_meta: {
|
|
70
|
+
...value._meta,
|
|
71
|
+
["po/widget"]: key
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const mcp = (0, _agimon_ai_po_core_mcpFacet.defineMcpPlugin)({
|
|
75
|
+
name: "@agimon-ai/po-plan",
|
|
76
|
+
session: (context) => ({
|
|
77
|
+
get skills() {
|
|
78
|
+
return [at(po_use_plan_mcp_default, context)];
|
|
79
|
+
},
|
|
80
|
+
get tools() {
|
|
81
|
+
return [
|
|
82
|
+
withWidget("@agimon-ai/po-plan/complete_plan", via({ name: "complete_plan" }, at(complete_plan_mcp_default, context))),
|
|
83
|
+
withWidget("@agimon-ai/po-plan/record_debug_evidence", via({ name: "record_debug_evidence" }, at(record_debug_evidence_mcp_default, context))),
|
|
84
|
+
withWidget("@agimon-ai/po-plan/write_plan", via({ name: "write_plan" }, at(write_plan_mcp_default, context)))
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
//#endregion
|
|
90
|
+
exports.default = mcp;
|
|
91
|
+
exports.mcp = mcp;
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=mcp.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.cjs","names":["defineMcpSkill","readPackageResource","Type","defineMcpTool","defineMcpTool","defineMcpTool","defineMcpPlugin","skillPoUsePlan","toolCompletePlan","toolRecordDebugEvidence","toolWritePlan"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/po-use-plan.mcp.ts","../../src/schemas/mcpTools.ts","../../src/services/mcpTools/index.ts","../../src/extensions/workspaces/sessions/(backend)/tool/complete_plan.mcp.ts","../../src/extensions/workspaces/sessions/(backend)/tool/record_debug_evidence.mcp.ts","../../src/extensions/workspaces/sessions/(backend)/tool/write_plan.mcp.ts","../../generated/mcp.ts"],"sourcesContent":["import { defineMcpSkill } from '@agimon-ai/po-core/mcpFacet';\nimport { readPackageResource } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineMcpSkill({\n name: 'po-use-plan',\n description:\n 'Use Doom Pi Plan to draft reviewable normal, debug, or code review plans, persist them, and exit safely.',\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-use-plan/SKILL.md'),\n});\n","import { Type } from 'typebox';\n\nconst markdown = Type.String({ minLength: 1 });\n\nexport const remoteWritePlanParameters = Type.Object({ markdown }, { additionalProperties: false });\nexport const writePlanParameters = Type.Object({ markdown: Type.Optional(markdown) }, { additionalProperties: false });\n","import type { DoomHeadlessTool } from '@agimon-ai/po-core/headless';\nimport type { DoomMcpPluginContext } from '@agimon-ai/po-core/mcpFacet';\nimport type { Context } from '@deepseek-ai/cordis';\n\nimport { remoteWritePlanParameters } from '../../schemas/mcpTools';\n\nexport const PLAN_MCP_TOOLS_SERVICE = 'doom/plan-mcp-tools';\n\nconst MODE_ID = 'plan';\nconst MODE_LABEL = 'Plan';\n\nexport interface McpToolCatalog {\n get(name: string): DoomHeadlessTool | undefined;\n names(): readonly string[];\n}\n\nexport function mountMcpTools(tools: readonly DoomHeadlessTool[]) {\n return (context: Context): void => {\n context.plugin((providerContext) => {\n providerContext.provide(PLAN_MCP_TOOLS_SERVICE, {\n get: (name) => tools.find((tool) => tool.name === name),\n names: () => tools.map((tool) => tool.name),\n } satisfies McpToolCatalog);\n });\n };\n}\n\nexport function bindMcpTool(context: DoomMcpPluginContext, name: string): DoomHeadlessTool {\n const catalog = context.services.get<McpToolCatalog>(PLAN_MCP_TOOLS_SERVICE);\n const tool = catalog?.get(name);\n if (!tool || !catalog) throw new Error(`Plan tool is unavailable: ${name}`);\n const writesPlan = name === 'write_plan';\n return {\n ...tool,\n ...(writesPlan\n ? {\n description:\n 'Save the supplied Markdown plan in the bound session. Requires active Plan mode. Saving does not approve implementation.',\n parameters: remoteWritePlanParameters,\n annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },\n }\n : {}),\n execute(toolCallId, parameters, signal, onUpdate) {\n const activeModes = context.selection.read().state?.['minor-mode'] ?? [];\n if (!activeModes.includes(MODE_ID)) {\n const inactiveTools = [...catalog.names()].sort().join(', ');\n throw new Error(`${MODE_LABEL} minor mode is inactive. Inactive ${MODE_LABEL} tools: ${inactiveTools}.`);\n }\n if (\n writesPlan &&\n (typeof parameters !== 'object' ||\n parameters === null ||\n !('markdown' in parameters) ||\n typeof parameters.markdown !== 'string' ||\n !parameters.markdown.trim())\n ) {\n throw new Error(\n 'Supply the complete visible plan in the markdown argument. Remote calls cannot read the ChatGPT transcript.',\n );\n }\n const executionSignal = AbortSignal.any([context.signal, signal ?? context.signal]);\n return tool.execute(toolCallId, parameters, executionSignal, onUpdate, context.execution);\n },\n };\n}\n","import { defineMcpTool, type DoomMcpPluginContext } from '@agimon-ai/po-core/mcpFacet';\n\nimport { bindMcpTool } from '../../../../../services/mcpTools';\n\nexport default defineMcpTool((context: DoomMcpPluginContext) => bindMcpTool(context, 'complete_plan'));\n","import { defineMcpTool, type DoomMcpPluginContext } from '@agimon-ai/po-core/mcpFacet';\n\nimport { bindMcpTool } from '../../../../../services/mcpTools';\n\nexport default defineMcpTool((context: DoomMcpPluginContext) => bindMcpTool(context, 'record_debug_evidence'));\n","import { defineMcpTool, type DoomMcpPluginContext } from '@agimon-ai/po-core/mcpFacet';\n\nimport { bindMcpTool } from '../../../../../services/mcpTools';\n\nexport default defineMcpTool((context: DoomMcpPluginContext) => bindMcpTool(context, 'write_plan'));\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineMcpPlugin, type DoomMcpSessionPlugin } from '@agimon-ai/po-core/mcpFacet';\n\nimport skillPoUsePlan from '../src/extensions/workspaces/sessions/(backend)/skill/po-use-plan.mcp';\nimport toolCompletePlan from '../src/extensions/workspaces/sessions/(backend)/tool/complete_plan.mcp';\nimport toolRecordDebugEvidence from '../src/extensions/workspaces/sessions/(backend)/tool/record_debug_evidence.mcp';\nimport toolWritePlan from '../src/extensions/workspaces/sessions/(backend)/tool/write_plan.mcp';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nconst withWidget = <T>(key: string, value: T): T => value === undefined ? value : ({\n ...value, _meta: { ...(value as { _meta?: object })._meta, [\"po/widget\"]: key },\n});\n\nexport const mcp = defineMcpPlugin({\n name: '@agimon-ai/po-plan',\n session: (context) => ({\n get skills(): DoomMcpSessionPlugin['skills'] { return [at(skillPoUsePlan, context)]; },\n get tools(): DoomMcpSessionPlugin['tools'] { return [withWidget(\"@agimon-ai/po-plan/complete_plan\", via({ name: 'complete_plan' }, at(toolCompletePlan, context))), withWidget(\"@agimon-ai/po-plan/record_debug_evidence\", via({ name: 'record_debug_evidence' }, at(toolRecordDebugEvidence, context))), withWidget(\"@agimon-ai/po-plan/write_plan\", via({ name: 'write_plan' }, at(toolWritePlan, context)))]; },\n }) satisfies DoomMcpSessionPlugin,\n});\n\nexport default mcp;\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.mts","names":[],"sources":["../../generated/mcp.ts"],"mappings":";qBAkBa,2CAAG"}
|