@agimon-ai/po-git 0.0.0-alpha.12 → 0.0.0-alpha.14
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/README.md +1 -1
- package/dist/extensions/server.cjs +19 -16
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts +2 -2
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +16 -13
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{worktreeOperations-BSeyxUai.mjs → worktreeOperations-Cd8Q12L4.mjs} +2 -2
- package/dist/{worktreeOperations-BSeyxUai.mjs.map → worktreeOperations-Cd8Q12L4.mjs.map} +1 -1
- package/dist/{worktreeOperations-DGUbUnYU.cjs → worktreeOperations-Dxs3txKL.cjs} +2 -2
- package/dist/{worktreeOperations-DGUbUnYU.cjs.map → worktreeOperations-Dxs3txKL.cjs.map} +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ This package is a composable [Po](https://www.npmjs.com/package/@agimon-ai/po) s
|
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
|
-
Add `@agimon-ai/po-git` to a selected layer in `.po/modes.yaml`, then run `po sync`. Native metadata selects its server and browser
|
|
14
|
+
Add `@agimon-ai/po-git` to a selected layer in `.po/modes.yaml`, then run `po sync`. Native metadata selects its server and browser plugins; there is no standalone Pi entry.
|
|
15
15
|
|
|
16
16
|
## Use
|
|
17
17
|
|
|
@@ -2,14 +2,14 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_worktreeOperations = require("../worktreeOperations-
|
|
5
|
+
const require_worktreeOperations = require("../worktreeOperations-Dxs3txKL.cjs");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
node_fs = require_worktreeOperations.__toESM(node_fs, 1);
|
|
8
8
|
let node_os = require("node:os");
|
|
9
9
|
node_os = require_worktreeOperations.__toESM(node_os, 1);
|
|
10
10
|
let node_path = require("node:path");
|
|
11
11
|
node_path = require_worktreeOperations.__toESM(node_path, 1);
|
|
12
|
-
let
|
|
12
|
+
let _agimon_ai_po_core_serverPlugin = require("@agimon-ai/po-core/serverPlugin");
|
|
13
13
|
let _agimon_ai_po_core_extensionFile = require("@agimon-ai/po-core/extensionFile");
|
|
14
14
|
let _agimon_ai_po_session = require("@agimon-ai/po-session");
|
|
15
15
|
let typebox = require("typebox");
|
|
@@ -310,8 +310,8 @@ function progressResult(action, label) {
|
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
312
|
function createGitSession({ context, host: serverHost }) {
|
|
313
|
-
if (serverHost.context.directEvents === void 0) throw new Error("Git
|
|
314
|
-
if (serverHost.context.sessionId === void 0) throw new Error("Git
|
|
313
|
+
if (serverHost.context.directEvents === void 0) throw new Error("Git server plugin requires the session direct event bus.");
|
|
314
|
+
if (serverHost.context.sessionId === void 0) throw new Error("Git server plugin requires a session identity.");
|
|
315
315
|
const sessionId = serverHost.context.sessionId;
|
|
316
316
|
const directEvents = serverHost.context.directEvents;
|
|
317
317
|
const messageInbox = require_worktreeOperations.createWorktreeMessageInbox(directEvents, sessionId);
|
|
@@ -331,11 +331,11 @@ function createGitSession({ context, host: serverHost }) {
|
|
|
331
331
|
},
|
|
332
332
|
name: "po-git",
|
|
333
333
|
kind: "context",
|
|
334
|
-
read: () => (0,
|
|
334
|
+
read: () => (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "llms.txt")
|
|
335
335
|
}, {
|
|
336
336
|
name: "po-use-git",
|
|
337
337
|
kind: "skill",
|
|
338
|
-
read: () => (0,
|
|
338
|
+
read: () => (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-use-git/SKILL.md")
|
|
339
339
|
}];
|
|
340
340
|
const tool = {
|
|
341
341
|
name: RUN_WORKTREE_TOOL_NAME,
|
|
@@ -1590,9 +1590,9 @@ const GIT_CHANGES_TYPE = "git_changes";
|
|
|
1590
1590
|
* DESIGN PATTERNS:
|
|
1591
1591
|
* - Apart from the worktrees channel. Worktrees are repository management;
|
|
1592
1592
|
* this is the session's own code change.
|
|
1593
|
-
* - Push, not poll. The session
|
|
1594
|
-
* tool call and settled turn; recounts are coalesced to one in
|
|
1595
|
-
* one rerun, so a burst of tool calls costs at most two.
|
|
1593
|
+
* - Push, not poll. The session's server plugin publishes a "changed" event
|
|
1594
|
+
* after every tool call and settled turn; recounts are coalesced to one in
|
|
1595
|
+
* flight plus one rerun, so a burst of tool calls costs at most two.
|
|
1596
1596
|
* - One sync command per session. A rebase and a push must never overlap.
|
|
1597
1597
|
* - Auth is read fresh for each command from the session's workspace, and goes
|
|
1598
1598
|
* only into that command's git child.
|
|
@@ -2058,13 +2058,16 @@ var runWorktree_server_default = (0, _agimon_ai_po_core_extensionFile.defineServ
|
|
|
2058
2058
|
//#endregion
|
|
2059
2059
|
//#region generated/server.ts
|
|
2060
2060
|
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
2061
|
+
/* v8 ignore next -- generated normalization branch */
|
|
2062
|
+
const defined = (values) => values.filter((value) => value !== void 0);
|
|
2061
2063
|
const via = (identity, value) => value === void 0 ? void 0 : {
|
|
2062
2064
|
...identity,
|
|
2063
2065
|
...value
|
|
2064
2066
|
};
|
|
2065
|
-
const
|
|
2067
|
+
const serverPlugin = (0, _agimon_ai_po_core_serverPlugin.defineServerPlugin)({
|
|
2066
2068
|
name: "@agimon-ai/po-git",
|
|
2067
|
-
providerOverrides: (0,
|
|
2069
|
+
providerOverrides: (0, _agimon_ai_po_core_serverPlugin.composeServerProviderOverrides)(root_server_default),
|
|
2070
|
+
injects: (0, _agimon_ai_po_core_extensionFile.composeRootInjects)({ session: [root_server_default] }),
|
|
2068
2071
|
global: (context) => ({
|
|
2069
2072
|
get api() {
|
|
2070
2073
|
return [at(route_server_default, context)];
|
|
@@ -2078,11 +2081,11 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
2078
2081
|
return [at(route_server_default, context)];
|
|
2079
2082
|
},
|
|
2080
2083
|
get channels() {
|
|
2081
|
-
return [() => via({ frameType: "git_changes" }, git_changes_server_default()), () => via({ frameType: "git_worktrees" }, git_worktrees_server_default())];
|
|
2084
|
+
return defined([context.hosted("global") ? void 0 : () => via({ frameType: "git_changes" }, git_changes_server_default()), context.hosted("global") ? void 0 : () => via({ frameType: "git_worktrees" }, git_worktrees_server_default())]);
|
|
2082
2085
|
}
|
|
2083
2086
|
}),
|
|
2084
2087
|
session: async (context) => {
|
|
2085
|
-
const scopeSession = await root_server_default
|
|
2088
|
+
const scopeSession = await context.scopeRoot("session", root_server_default, context);
|
|
2086
2089
|
const contextSession = {
|
|
2087
2090
|
...context,
|
|
2088
2091
|
root: scopeSession.value
|
|
@@ -2093,7 +2096,7 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
2093
2096
|
return [at(route_server_default, context)];
|
|
2094
2097
|
},
|
|
2095
2098
|
get channels() {
|
|
2096
|
-
return [() => via({ frameType: "git_changes" }, git_changes_server_default()), () => via({ frameType: "git_worktrees" }, git_worktrees_server_default())];
|
|
2099
|
+
return defined([context.hosted("global") ? void 0 : () => via({ frameType: "git_changes" }, git_changes_server_default()), context.hosted("global") ? void 0 : () => via({ frameType: "git_worktrees" }, git_worktrees_server_default())]);
|
|
2097
2100
|
},
|
|
2098
2101
|
get hooks() {
|
|
2099
2102
|
return [via({ event: "agent_settled" }, at(agent_settled_server_default, contextSession)), via({ event: "tool_execution_end" }, at(tool_execution_end_server_default, contextSession))];
|
|
@@ -2116,7 +2119,7 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
2116
2119
|
}
|
|
2117
2120
|
});
|
|
2118
2121
|
//#endregion
|
|
2119
|
-
exports.default =
|
|
2120
|
-
exports.
|
|
2122
|
+
exports.default = serverPlugin;
|
|
2123
|
+
exports.serverPlugin = serverPlugin;
|
|
2121
2124
|
|
|
2122
2125
|
//# sourceMappingURL=server.cjs.map
|